ss-component-new 1.1.705 → 1.1.706
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-C4GdlaE_.js → index--BKY6t09.js} +1 -1
- package/dist/{index-DUU6OAKk.cjs → index-5qBWrSZU.cjs} +1 -1
- package/dist/{index-DvfpG4_J.js → index-B9in1by_.js} +1 -1
- package/dist/{index-BoTUpSOX.cjs → index-BNFlELdW.cjs} +1 -1
- package/dist/{index-CSgKvrbc.js → index-BSNZVFKa.js} +2 -2
- package/dist/{index-CDalSbPe.js → index-BX997DA0.js} +1 -1
- package/dist/{index-BjsNI0sE.cjs → index-BcYG8wjE.cjs} +1 -1
- package/dist/{index-RkKfpDrn.cjs → index-BpxPo5VN.cjs} +1 -1
- package/dist/{index-DH2fHE0C.js → index-BqKCUIAh.js} +1 -1
- package/dist/{index-DtSCWFoV.js → index-BvHT4_-u.js} +1 -1
- package/dist/{index-CDu2-bnW.js → index-C968jgil.js} +7 -7
- package/dist/{index-DQSABKox.js → index-CAk5h97W.js} +1 -1
- package/dist/{index-CVjbMfr4.js → index-CDe8uAMr.js} +1 -1
- package/dist/{index-DcauoQ9J.cjs → index-CFvDfrn7.cjs} +1 -1
- package/dist/{index-C2AmcC7I.cjs → index-CNmvvV-c.cjs} +1 -1
- package/dist/{index-BCptnKiw.cjs → index-C_0_jtSi.cjs} +1 -1
- package/dist/{index-BDBbBGv0.js → index-Cgxq0tAs.js} +4 -4
- package/dist/{index-i4soKcZT.cjs → index-ChbTmas3.cjs} +1 -1
- package/dist/{index-CacmvkYL.js → index-D0Y__qdd.js} +1 -1
- package/dist/{index-CY9ojx1M.cjs → index-D6TpnpGO.cjs} +28 -28
- package/dist/{index-B4V92iJo.js → index-DWGvYkk9.js} +3881 -3876
- package/dist/{index-CX1EihKH.cjs → index-DXCBhoy9.cjs} +1 -1
- package/dist/{index-SVlnmF1B.cjs → index-Djy7tVKB.cjs} +1 -1
- package/dist/{index-0NVRAttI.cjs → index-DlD9sRqq.cjs} +1 -1
- package/dist/{index-vRVNGbbp.cjs → index-RRvgacXx.cjs} +1 -1
- package/dist/{index-BUHEtPGJ.js → index-SWU-wgRh.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-D9NqP2j8.cjs → index.vue_vue_type_style_index_0_scoped_8606206c_lang-DO2vPyVK.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-Bxbq3udn.js → index.vue_vue_type_style_index_0_scoped_8606206c_lang-DZhCOVL9.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-DTyG-Er7.js → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-0THhazyL.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Bt4ON04S.cjs → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-CwX4Xyil.cjs} +1 -1
- package/dist/{main-LiHXs1zY.cjs → main-CEEPDwK7.cjs} +1 -1
- package/dist/{main-DxGD2oGV.js → main-Dy0la9NS.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +4 -4
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +7 -7
- package/dist/{threeModel-BXxjJWj_.cjs → threeModel-DPwvjltF.cjs} +1 -1
- package/dist/{threeModel-CMHexzwI.js → threeModel-DjgnMY8_.js} +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const y=require("vue"),Oe=require("./menu-vml_xHJD.cjs"),On=require("./index-Chz6JgEi.cjs"),Pn=require("./index-2p69g4HY.cjs"),rn=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dc6lRgBQ.cjs"),Pi=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),wu=require("./login-CCz_BcJe.cjs");var Tu="[object String]";function Vo(s){return typeof s=="string"||!Pn.isArray(s)&&Pn.isObjectLike(s)&&Pn.baseGetTag(s)==Tu}const Ho=s=>s.match(/\((.*)\)/)[1],Cu={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(s){const e=s,t=y.ref(null),n=y.ref(!1),i=y.ref(null);return y.watch(()=>e==null?void 0:e.isVisible,()=>{n.value=e==null?void 0:e.isVisible},{deep:!0,immediate:!0}),y.watch(()=>i.value,()=>{y.nextTick(()=>{var r,o;(o=(r=t.value)==null?void 0:r.updatePopper)==null||o.call(r)})},{deep:!0,immediate:!0}),(r,o)=>{const a=y.resolveComponent("el-popover");return y.openBlock(),y.createBlock(a,{visible:n.value,title:e==null?void 0:e.title,placement:e==null?void 0:e.placement,width:e==null?void 0:e.width,ref_key:"popOverRef",ref:t},{reference:y.withCtx(()=>[y.createElementVNode("div",null,[y.renderSlot(r.$slots,"reference",{ref_key:"referenceRef",ref:i})])]),default:y.withCtx(()=>[y.createElementVNode("div",null,[y.renderSlot(r.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/const Vl="177",Ti={ROTATE:0,DOLLY:1,PAN:2},Is={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Ru=0,vc=1,Du=2,v0=1,Hl=2,Si=3,Qn=0,In=1,pn=2,Wi=0,Bs=1,yc=2,xc=3,Mc=4,Lu=5,rs=100,Pu=101,Fu=102,Uu=103,Nu=104,Iu=200,zu=201,Bu=202,Ou=203,Go=204,Wo=205,ku=206,Vu=207,Hu=208,Gu=209,Wu=210,Xu=211,ju=212,qu=213,$u=214,Xo=0,jo=1,qo=2,Hs=3,$o=4,Yo=5,Jo=6,Ko=7,Fa=0,Yu=1,Ju=2,Xi=0,Ku=1,Zu=2,Qu=3,Gl=4,e2=5,t2=6,n2=7,bc="attached",i2="detached",y0=300,Gs=301,Ws=302,Zo=303,Qo=304,Ua=306,di=1e3,ri=1001,el=1002,jn=1003,s2=1004,wr=1005,Xn=1006,Xa=1007,Ai=1008,mi=1009,x0=1010,M0=1011,_r=1012,Wl=1013,hs=1014,fi=1015,Sr=1016,Xl=1017,jl=1018,vr=1020,b0=35902,S0=1021,E0=1022,Zn=1023,yr=1026,xr=1027,A0=1028,ql=1029,w0=1030,$l=1031,Yl=1033,ga=33776,_a=33777,va=33778,ya=33779,tl=35840,nl=35841,il=35842,sl=35843,rl=36196,al=37492,ol=37496,ll=37808,cl=37809,hl=37810,ul=37811,dl=37812,fl=37813,pl=37814,ml=37815,gl=37816,_l=37817,vl=37818,yl=37819,xl=37820,Ml=37821,xa=36492,bl=36494,Sl=36495,T0=36283,El=36284,Al=36285,wl=36286,Ea=2300,Tl=2301,ja=2302,Sc=2400,Ec=2401,Ac=2402,r2=2500,a2=3200,o2=3201,Na=0,l2=1,Hi="",qt="srgb",Xs="srgb-linear",Aa="linear",an="srgb",ms=7680,wc=519,c2=512,h2=513,u2=514,C0=515,d2=516,f2=517,p2=518,m2=519,Cl=35044,Tc="300 es",wi=2e3,wa=2001;class ds{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const i=n[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let r=0,o=i.length;r<o;r++)i[r].call(this,e);e.target=null}}}const Rn=["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 Cc=1234567;const dr=Math.PI/180,js=180/Math.PI;function ai(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Rn[s&255]+Rn[s>>8&255]+Rn[s>>16&255]+Rn[s>>24&255]+"-"+Rn[e&255]+Rn[e>>8&255]+"-"+Rn[e>>16&15|64]+Rn[e>>24&255]+"-"+Rn[t&63|128]+Rn[t>>8&255]+"-"+Rn[t>>16&255]+Rn[t>>24&255]+Rn[n&255]+Rn[n>>8&255]+Rn[n>>16&255]+Rn[n>>24&255]).toLowerCase()}function Vt(s,e,t){return Math.max(e,Math.min(t,s))}function Jl(s,e){return(s%e+e)%e}function g2(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function _2(s,e,t){return s!==e?(t-s)/(e-s):0}function fr(s,e,t){return(1-t)*s+t*e}function v2(s,e,t,n){return fr(s,e,1-Math.exp(-t*n))}function y2(s,e=1){return e-Math.abs(Jl(s,e*2)-e)}function x2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function M2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function b2(s,e){return s+Math.floor(Math.random()*(e-s+1))}function S2(s,e){return s+Math.random()*(e-s)}function E2(s){return s*(.5-Math.random())}function A2(s){s!==void 0&&(Cc=s);let e=Cc+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function w2(s){return s*dr}function T2(s){return s*js}function C2(s){return(s&s-1)===0&&s!==0}function R2(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function D2(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function L2(s,e,t,n,i){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+n)/2),d=o((e+n)/2),m=r((e-n)/2),u=o((e-n)/2),h=r((n-e)/2),g=o((n-e)/2);switch(i){case"XYX":s.set(a*d,l*m,l*u,a*c);break;case"YZY":s.set(l*u,a*d,l*m,a*c);break;case"ZXZ":s.set(l*m,l*u,a*d,a*c);break;case"XZX":s.set(a*d,l*g,l*h,a*c);break;case"YXY":s.set(l*h,a*d,l*g,a*c);break;case"ZYZ":s.set(l*g,l*h,a*d,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function si(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function tn(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}const Ei={DEG2RAD:dr,RAD2DEG:js,generateUUID:ai,clamp:Vt,euclideanModulo:Jl,mapLinear:g2,inverseLerp:_2,lerp:fr,damp:v2,pingpong:y2,smoothstep:x2,smootherstep:M2,randInt:b2,randFloat:S2,randFloatSpread:E2,seededRandom:A2,degToRad:w2,radToDeg:T2,isPowerOfTwo:C2,ceilPowerOfTwo:R2,floorPowerOfTwo:D2,setQuaternionFromProperEuler:L2,normalize:tn,denormalize:si};class et{constructor(e=0,t=0){et.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,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,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 n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*n-o*i+e.x,this.y=r*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Vn{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,o,a){let l=n[i+0],c=n[i+1],d=n[i+2],m=n[i+3];const u=r[o+0],h=r[o+1],g=r[o+2],_=r[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m;return}if(a===1){e[t+0]=u,e[t+1]=h,e[t+2]=g,e[t+3]=_;return}if(m!==_||l!==u||c!==h||d!==g){let p=1-a;const f=l*u+c*h+d*g+m*_,x=f>=0?1:-1,y=1-f*f;if(y>Number.EPSILON){const U=Math.sqrt(y),C=Math.atan2(U,f*x);p=Math.sin(p*C)/U,a=Math.sin(a*C)/U}const S=a*x;if(l=l*p+u*S,c=c*p+h*S,d=d*p+g*S,m=m*p+_*S,p===1-a){const U=1/Math.sqrt(l*l+c*c+d*d+m*m);l*=U,c*=U,d*=U,m*=U}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m}static multiplyQuaternionsFlat(e,t,n,i,r,o){const a=n[i],l=n[i+1],c=n[i+2],d=n[i+3],m=r[o],u=r[o+1],h=r[o+2],g=r[o+3];return e[t]=a*g+d*m+l*h-c*u,e[t+1]=l*g+d*u+c*m-a*h,e[t+2]=c*g+d*h+a*u-l*m,e[t+3]=d*g-a*m-l*u-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(i/2),m=a(r/2),u=l(n/2),h=l(i/2),g=l(r/2);switch(o){case"XYZ":this._x=u*d*m+c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m-u*h*g;break;case"YXZ":this._x=u*d*m+c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m+u*h*g;break;case"ZXY":this._x=u*d*m-c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m-u*h*g;break;case"ZYX":this._x=u*d*m-c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m+u*h*g;break;case"YZX":this._x=u*d*m+c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m-u*h*g;break;case"XZY":this._x=u*d*m-c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m+u*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],d=t[6],m=t[10],u=n+a+m;if(u>0){const h=.5/Math.sqrt(u+1);this._w=.25/h,this._x=(d-l)*h,this._y=(r-c)*h,this._z=(o-i)*h}else if(n>a&&n>m){const h=2*Math.sqrt(1+n-a-m);this._w=(d-l)/h,this._x=.25*h,this._y=(i+o)/h,this._z=(r+c)/h}else if(a>m){const h=2*Math.sqrt(1+a-n-m);this._w=(r-c)/h,this._x=(i+o)/h,this._y=.25*h,this._z=(l+d)/h}else{const h=2*Math.sqrt(1+m-n-a);this._w=(o-i)/h,this._x=(r+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vt(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+o*a+i*c-r*l,this._y=i*d+o*l+r*a-n*c,this._z=r*d+o*c+n*l-i*a,this._w=o*d-n*a-i*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+n*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const h=1-t;return this._w=h*o+t*this._w,this._x=h*n+t*this._x,this._y=h*i+t*this._y,this._z=h*r+t*this._z,this.normalize(),this}const c=Math.sqrt(l),d=Math.atan2(c,a),m=Math.sin((1-t)*d)/c,u=Math.sin(t*d)/c;return this._w=o*m+this._w*u,this._x=n*m+this._x*u,this._y=i*m+this._y*u,this._z=r*m+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class I{constructor(e=0,t=0,n=0){I.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,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(Rc.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Rc.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=e.elements,o=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*n),d=2*(a*t-r*i),m=2*(r*n-o*t);return this.x=t+l*c+o*m-a*d,this.y=n+l*d+a*c-r*m,this.z=i+l*m+r*d-o*c,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,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=i*l-r*a,this.y=r*o-n*l,this.z=n*a-i*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return qa.copy(this).projectOnVector(e),this.sub(qa)}reflect(e){return this.sub(qa.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}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,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,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(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const qa=new I,Rc=new Vn;class kt{constructor(e,t,n,i,r,o,a,l,c){kt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,o,a,l,c)}set(e,t,n,i,r,o,a,l,c){const d=this.elements;return d[0]=e,d[1]=i,d[2]=a,d[3]=t,d[4]=r,d[5]=l,d[6]=n,d[7]=o,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.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 n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],d=n[4],m=n[7],u=n[2],h=n[5],g=n[8],_=i[0],p=i[3],f=i[6],x=i[1],y=i[4],S=i[7],U=i[2],C=i[5],L=i[8];return r[0]=o*_+a*x+l*U,r[3]=o*p+a*y+l*C,r[6]=o*f+a*S+l*L,r[1]=c*_+d*x+m*U,r[4]=c*p+d*y+m*C,r[7]=c*f+d*S+m*L,r[2]=u*_+h*x+g*U,r[5]=u*p+h*y+g*C,r[8]=u*f+h*S+g*L,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*o*d-t*a*c-n*r*d+n*a*l+i*r*c-i*o*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],m=d*o-a*c,u=a*l-d*r,h=c*r-o*l,g=t*m+n*u+i*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=m*_,e[1]=(i*c-d*n)*_,e[2]=(a*n-i*o)*_,e[3]=u*_,e[4]=(d*t-i*l)*_,e[5]=(i*r-a*t)*_,e[6]=h*_,e[7]=(n*l-c*t)*_,e[8]=(o*t-n*r)*_,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,n,i,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply($a.makeScale(e,t)),this}rotate(e){return this.premultiply($a.makeRotation(-e)),this}translate(e,t){return this.premultiply($a.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,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,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const $a=new kt;function R0(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}function Mr(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function P2(){const s=Mr("canvas");return s.style.display="block",s}const Dc={};function Os(s){s in Dc||(Dc[s]=!0,console.warn(s))}function F2(s,e,t){return new Promise(function(n,i){function r(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:i();break;case s.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:n()}}setTimeout(r,t)})}function U2(s){const e=s.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function N2(s){const e=s.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const Lc=new kt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Pc=new kt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function I2(){const s={enabled:!0,workingColorSpace:Xs,spaces:{},convert:function(i,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===an&&(i.r=Ci(i.r),i.g=Ci(i.g),i.b=Ci(i.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(i.applyMatrix3(this.spaces[r].toXYZ),i.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===an&&(i.r=ks(i.r),i.g=ks(i.g),i.b=ks(i.b))),i},workingToColorSpace:function(i,r){return this.convert(i,this.workingColorSpace,r)},colorSpaceToWorking:function(i,r){return this.convert(i,r,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Hi?Aa:this.spaces[i].transfer},getLuminanceCoefficients:function(i,r=this.workingColorSpace){return i.fromArray(this.spaces[r].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,r,o){return i.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,r){return Os("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(i,r)},toWorkingColorSpace:function(i,r){return Os("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(i,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return s.define({[Xs]:{primaries:e,whitePoint:n,transfer:Aa,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:qt},outputColorSpaceConfig:{drawingBufferColorSpace:qt}},[qt]:{primaries:e,whitePoint:n,transfer:an,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:qt}}}),s}const Gt=I2();function Ci(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function ks(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}let gs;class z2{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{gs===void 0&&(gs=Mr("canvas")),gs.width=e.width,gs.height=e.height;const i=gs.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=gs}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Mr("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o<r.length;o++)r[o]=Ci(r[o]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Ci(t[n]/255)*255):t[n]=Ci(t[n]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let B2=0;class Kl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:B2++}),this.uuid=ai(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?r.push(Ya(i[o].image)):r.push(Ya(i[o]))}else r=Ya(i);n.url=r}return t||(e.images[this.uuid]=n),n}}function Ya(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?z2.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let O2=0;const Ja=new I;class Tn extends ds{constructor(e=Tn.DEFAULT_IMAGE,t=Tn.DEFAULT_MAPPING,n=ri,i=ri,r=Xn,o=Ai,a=Zn,l=mi,c=Tn.DEFAULT_ANISOTROPY,d=Hi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:O2++}),this.uuid=ai(),this.name="",this.source=new Kl(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new et(0,0),this.repeat=new et(1,1),this.center=new et(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new kt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=d,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Ja).x}get height(){return this.source.getSize(Ja).y}get depth(){return this.source.getSize(Ja).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).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,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==y0)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case di:e.x=e.x-Math.floor(e.x);break;case ri:e.x=e.x<0?0:1;break;case el:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case di:e.y=e.y-Math.floor(e.y);break;case ri:e.y=e.y<0?0:1;break;case el:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Tn.DEFAULT_IMAGE=null;Tn.DEFAULT_MAPPING=y0;Tn.DEFAULT_ANISOTROPY=1;class Xt{constructor(e=0,t=0,n=0,i=1){Xt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}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,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*n+o[11]*i+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,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,n,i,r;const l=e.elements,c=l[0],d=l[4],m=l[8],u=l[1],h=l[5],g=l[9],_=l[2],p=l[6],f=l[10];if(Math.abs(d-u)<.01&&Math.abs(m-_)<.01&&Math.abs(g-p)<.01){if(Math.abs(d+u)<.1&&Math.abs(m+_)<.1&&Math.abs(g+p)<.1&&Math.abs(c+h+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const y=(c+1)/2,S=(h+1)/2,U=(f+1)/2,C=(d+u)/4,L=(m+_)/4,P=(g+p)/4;return y>S&&y>U?y<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(y),i=C/n,r=L/n):S>U?S<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(S),n=C/i,r=P/i):U<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(U),n=L/r,i=P/r),this.set(n,i,r,t),this}let x=Math.sqrt((p-g)*(p-g)+(m-_)*(m-_)+(u-d)*(u-d));return Math.abs(x)<.001&&(x=1),this.x=(p-g)/x,this.y=(m-_)/x,this.z=(u-d)/x,this.w=Math.acos((c+h+f-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,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 k2 extends ds{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Xn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Xt(0,0,e,t),this.scissorTest=!1,this.viewport=new Xt(0,0,e,t);const i={width:e,height:t,depth:n.depth},r=new Tn(i);this.textures=[];const o=n.count;for(let a=0;a<o;a++)this.textures[a]=r.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:Xn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n,this.textures[i].isArrayTexture=this.textures[i].image.depth>1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const i=Object.assign({},e.textures[t].image);this.textures[t].source=new Kl(i)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class us extends k2{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class D0 extends Tn{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=jn,this.minFilter=jn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class V2 extends Tn{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=jn,this.minFilter=jn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Fn{constructor(e=new I(1/0,1/0,1/0),t=new I(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ti.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ti.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=ti.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=r.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,ti):ti.fromBufferAttribute(r,o),ti.applyMatrix4(e.matrixWorld),this.expandByPoint(ti);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Tr.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Tr.copy(n.boundingBox)),Tr.applyMatrix4(e.matrixWorld),this.union(Tr)}const i=e.children;for(let r=0,o=i.length;r<o;r++)this.expandByObject(i[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ti),ti.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(er),Cr.subVectors(this.max,er),_s.subVectors(e.a,er),vs.subVectors(e.b,er),ys.subVectors(e.c,er),Ni.subVectors(vs,_s),Ii.subVectors(ys,vs),Ji.subVectors(_s,ys);let t=[0,-Ni.z,Ni.y,0,-Ii.z,Ii.y,0,-Ji.z,Ji.y,Ni.z,0,-Ni.x,Ii.z,0,-Ii.x,Ji.z,0,-Ji.x,-Ni.y,Ni.x,0,-Ii.y,Ii.x,0,-Ji.y,Ji.x,0];return!Ka(t,_s,vs,ys,Cr)||(t=[1,0,0,0,1,0,0,0,1],!Ka(t,_s,vs,ys,Cr))?!1:(Rr.crossVectors(Ni,Ii),t=[Rr.x,Rr.y,Rr.z],Ka(t,_s,vs,ys,Cr))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ti).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ti).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(_i[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_i[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_i[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_i[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_i[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_i[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_i[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_i[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_i),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const _i=[new I,new I,new I,new I,new I,new I,new I,new I],ti=new I,Tr=new Fn,_s=new I,vs=new I,ys=new I,Ni=new I,Ii=new I,Ji=new I,er=new I,Cr=new I,Rr=new I,Ki=new I;function Ka(s,e,t,n,i){for(let r=0,o=s.length-3;r<=o;r+=3){Ki.fromArray(s,r);const a=i.x*Math.abs(Ki.x)+i.y*Math.abs(Ki.y)+i.z*Math.abs(Ki.z),l=e.dot(Ki),c=t.dot(Ki),d=n.dot(Ki);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const H2=new Fn,tr=new I,Za=new I;class Fi{constructor(e=new I,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):H2.setFromPoints(e).getCenter(n);let i=0;for(let r=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}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;tr.subVectors(e,this.center);const t=tr.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(tr,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Za.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(tr.copy(e.center).add(Za)),this.expandByPoint(tr.copy(e.center).sub(Za))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const vi=new I,Qa=new I,Dr=new I,zi=new I,eo=new I,Lr=new I,to=new I;class Ys{constructor(e=new I,t=new I(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,vi)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=vi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(vi.copy(this.origin).addScaledVector(this.direction,t),vi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Qa.copy(e).add(t).multiplyScalar(.5),Dr.copy(t).sub(e).normalize(),zi.copy(this.origin).sub(Qa);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Dr),a=zi.dot(this.direction),l=-zi.dot(Dr),c=zi.lengthSq(),d=Math.abs(1-o*o);let m,u,h,g;if(d>0)if(m=o*l-a,u=o*a-l,g=r*d,m>=0)if(u>=-g)if(u<=g){const _=1/d;m*=_,u*=_,h=m*(m+o*u+2*a)+u*(o*m+u+2*l)+c}else u=r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;else u=-r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;else u<=-g?(m=Math.max(0,-(-o*r+a)),u=m>0?-r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c):u<=g?(m=0,u=Math.min(Math.max(-r,-l),r),h=u*(u+2*l)+c):(m=Math.max(0,-(o*r+a)),u=m>0?r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c);else u=o>0?-r:r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,m),i&&i.copy(Qa).addScaledVector(Dr,u),h}intersectSphere(e,t){vi.subVectors(e.center,this.origin);const n=vi.dot(this.direction),i=vi.dot(vi)-n*n,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,o,a,l;const c=1/this.direction.x,d=1/this.direction.y,m=1/this.direction.z,u=this.origin;return c>=0?(n=(e.min.x-u.x)*c,i=(e.max.x-u.x)*c):(n=(e.max.x-u.x)*c,i=(e.min.x-u.x)*c),d>=0?(r=(e.min.y-u.y)*d,o=(e.max.y-u.y)*d):(r=(e.max.y-u.y)*d,o=(e.min.y-u.y)*d),n>o||r>i||((r>n||isNaN(n))&&(n=r),(o<i||isNaN(i))&&(i=o),m>=0?(a=(e.min.z-u.z)*m,l=(e.max.z-u.z)*m):(a=(e.max.z-u.z)*m,l=(e.min.z-u.z)*m),n>l||a>i)||((a>n||n!==n)&&(n=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,vi)!==null}intersectTriangle(e,t,n,i,r){eo.subVectors(t,e),Lr.subVectors(n,e),to.crossVectors(eo,Lr);let o=this.direction.dot(to),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;zi.subVectors(this.origin,e);const l=a*this.direction.dot(Lr.crossVectors(zi,Lr));if(l<0)return null;const c=a*this.direction.dot(eo.cross(zi));if(c<0||l+c>o)return null;const d=-a*zi.dot(to);return d<0?null:this.at(d/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Et{constructor(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p){Et.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p)}set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p){const f=this.elements;return f[0]=e,f[4]=t,f[8]=n,f[12]=i,f[1]=r,f[5]=o,f[9]=a,f[13]=l,f[2]=c,f[6]=d,f[10]=m,f[14]=u,f[3]=h,f[7]=g,f[11]=_,f[15]=p,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 Et().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[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,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/xs.setFromMatrixColumn(e,0).length(),r=1/xs.setFromMatrixColumn(e,1).length(),o=1/xs.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,r=e.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),c=Math.sin(i),d=Math.cos(r),m=Math.sin(r);if(e.order==="XYZ"){const u=o*d,h=o*m,g=a*d,_=a*m;t[0]=l*d,t[4]=-l*m,t[8]=c,t[1]=h+g*c,t[5]=u-_*c,t[9]=-a*l,t[2]=_-u*c,t[6]=g+h*c,t[10]=o*l}else if(e.order==="YXZ"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u+_*a,t[4]=g*a-h,t[8]=o*c,t[1]=o*m,t[5]=o*d,t[9]=-a,t[2]=h*a-g,t[6]=_+u*a,t[10]=o*l}else if(e.order==="ZXY"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u-_*a,t[4]=-o*m,t[8]=g+h*a,t[1]=h+g*a,t[5]=o*d,t[9]=_-u*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const u=o*d,h=o*m,g=a*d,_=a*m;t[0]=l*d,t[4]=g*c-h,t[8]=u*c+_,t[1]=l*m,t[5]=_*c+u,t[9]=h*c-g,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const u=o*l,h=o*c,g=a*l,_=a*c;t[0]=l*d,t[4]=_-u*m,t[8]=g*m+h,t[1]=m,t[5]=o*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*m+g,t[10]=u-_*m}else if(e.order==="XZY"){const u=o*l,h=o*c,g=a*l,_=a*c;t[0]=l*d,t[4]=-m,t[8]=c*d,t[1]=u*m+_,t[5]=o*d,t[9]=h*m-g,t[2]=g*m-h,t[6]=a*d,t[10]=_*m+u}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(G2,e,W2)}lookAt(e,t,n){const i=this.elements;return Gn.subVectors(e,t),Gn.lengthSq()===0&&(Gn.z=1),Gn.normalize(),Bi.crossVectors(n,Gn),Bi.lengthSq()===0&&(Math.abs(n.z)===1?Gn.x+=1e-4:Gn.z+=1e-4,Gn.normalize(),Bi.crossVectors(n,Gn)),Bi.normalize(),Pr.crossVectors(Gn,Bi),i[0]=Bi.x,i[4]=Pr.x,i[8]=Gn.x,i[1]=Bi.y,i[5]=Pr.y,i[9]=Gn.y,i[2]=Bi.z,i[6]=Pr.z,i[10]=Gn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],d=n[1],m=n[5],u=n[9],h=n[13],g=n[2],_=n[6],p=n[10],f=n[14],x=n[3],y=n[7],S=n[11],U=n[15],C=i[0],L=i[4],P=i[8],E=i[12],A=i[1],D=i[5],O=i[9],V=i[13],Q=i[2],se=i[6],G=i[10],ce=i[14],Z=i[3],ge=i[7],De=i[11],ye=i[15];return r[0]=o*C+a*A+l*Q+c*Z,r[4]=o*L+a*D+l*se+c*ge,r[8]=o*P+a*O+l*G+c*De,r[12]=o*E+a*V+l*ce+c*ye,r[1]=d*C+m*A+u*Q+h*Z,r[5]=d*L+m*D+u*se+h*ge,r[9]=d*P+m*O+u*G+h*De,r[13]=d*E+m*V+u*ce+h*ye,r[2]=g*C+_*A+p*Q+f*Z,r[6]=g*L+_*D+p*se+f*ge,r[10]=g*P+_*O+p*G+f*De,r[14]=g*E+_*V+p*ce+f*ye,r[3]=x*C+y*A+S*Q+U*Z,r[7]=x*L+y*D+S*se+U*ge,r[11]=x*P+y*O+S*G+U*De,r[15]=x*E+y*V+S*ce+U*ye,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],n=e[4],i=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],d=e[2],m=e[6],u=e[10],h=e[14],g=e[3],_=e[7],p=e[11],f=e[15];return g*(+r*l*m-i*c*m-r*a*u+n*c*u+i*a*h-n*l*h)+_*(+t*l*h-t*c*u+r*o*u-i*o*h+i*c*d-r*l*d)+p*(+t*c*m-t*a*h-r*o*m+n*o*h+r*a*d-n*c*d)+f*(-i*a*d-t*l*m+t*a*u+i*o*m-n*o*u+n*l*d)}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,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],m=e[9],u=e[10],h=e[11],g=e[12],_=e[13],p=e[14],f=e[15],x=m*p*c-_*u*c+_*l*h-a*p*h-m*l*f+a*u*f,y=g*u*c-d*p*c-g*l*h+o*p*h+d*l*f-o*u*f,S=d*_*c-g*m*c+g*a*h-o*_*h-d*a*f+o*m*f,U=g*m*l-d*_*l-g*a*u+o*_*u+d*a*p-o*m*p,C=t*x+n*y+i*S+r*U;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/C;return e[0]=x*L,e[1]=(_*u*r-m*p*r-_*i*h+n*p*h+m*i*f-n*u*f)*L,e[2]=(a*p*r-_*l*r+_*i*c-n*p*c-a*i*f+n*l*f)*L,e[3]=(m*l*r-a*u*r-m*i*c+n*u*c+a*i*h-n*l*h)*L,e[4]=y*L,e[5]=(d*p*r-g*u*r+g*i*h-t*p*h-d*i*f+t*u*f)*L,e[6]=(g*l*r-o*p*r-g*i*c+t*p*c+o*i*f-t*l*f)*L,e[7]=(o*u*r-d*l*r+d*i*c-t*u*c-o*i*h+t*l*h)*L,e[8]=S*L,e[9]=(g*m*r-d*_*r-g*n*h+t*_*h+d*n*f-t*m*f)*L,e[10]=(o*_*r-g*a*r+g*n*c-t*_*c-o*n*f+t*a*f)*L,e[11]=(d*a*r-o*m*r-d*n*c+t*m*c+o*n*h-t*a*h)*L,e[12]=U*L,e[13]=(d*_*i-g*m*i+g*n*u-t*_*u-d*n*p+t*m*p)*L,e[14]=(g*a*i-o*_*i-g*n*l+t*_*l+o*n*p-t*a*p)*L,e[15]=(o*m*i-d*a*i+d*n*l-t*m*l-o*n*u+t*a*u)*L,this}scale(e){const t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),r=1-n,o=e.x,a=e.y,l=e.z,c=r*o,d=r*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,d*a+n,d*l-i*o,0,c*l-i*a,d*l+i*o,r*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,o){return this.set(1,n,r,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,d=o+o,m=a+a,u=r*c,h=r*d,g=r*m,_=o*d,p=o*m,f=a*m,x=l*c,y=l*d,S=l*m,U=n.x,C=n.y,L=n.z;return i[0]=(1-(_+f))*U,i[1]=(h+S)*U,i[2]=(g-y)*U,i[3]=0,i[4]=(h-S)*C,i[5]=(1-(u+f))*C,i[6]=(p+x)*C,i[7]=0,i[8]=(g+y)*L,i[9]=(p-x)*L,i[10]=(1-(u+_))*L,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let r=xs.set(i[0],i[1],i[2]).length();const o=xs.set(i[4],i[5],i[6]).length(),a=xs.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],ni.copy(this);const c=1/r,d=1/o,m=1/a;return ni.elements[0]*=c,ni.elements[1]*=c,ni.elements[2]*=c,ni.elements[4]*=d,ni.elements[5]*=d,ni.elements[6]*=d,ni.elements[8]*=m,ni.elements[9]*=m,ni.elements[10]*=m,t.setFromRotationMatrix(ni),n.x=r,n.y=o,n.z=a,this}makePerspective(e,t,n,i,r,o,a=wi){const l=this.elements,c=2*r/(t-e),d=2*r/(n-i),m=(t+e)/(t-e),u=(n+i)/(n-i);let h,g;if(a===wi)h=-(o+r)/(o-r),g=-2*o*r/(o-r);else if(a===wa)h=-o/(o-r),g=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=m,l[12]=0,l[1]=0,l[5]=d,l[9]=u,l[13]=0,l[2]=0,l[6]=0,l[10]=h,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,i,r,o,a=wi){const l=this.elements,c=1/(t-e),d=1/(n-i),m=1/(o-r),u=(t+e)*c,h=(n+i)*d;let g,_;if(a===wi)g=(o+r)*m,_=-2*m;else if(a===wa)g=r*m,_=-1*m;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-u,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-h,l[2]=0,l[6]=0,l[10]=_,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const xs=new I,ni=new Et,G2=new I(0,0,0),W2=new I(1,1,1),Bi=new I,Pr=new I,Gn=new I,Fc=new Et,Uc=new Vn;class Sn{constructor(e=0,t=0,n=0,i=Sn.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],l=i[1],c=i[5],d=i[9],m=i[2],u=i[6],h=i[10];switch(t){case"XYZ":this._y=Math.asin(Vt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,h),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(u,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Vt(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-m,r),this._z=0);break;case"ZXY":this._x=Math.asin(Vt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-m,h),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-Vt(m,-1,1)),Math.abs(m)<.9999999?(this._x=Math.atan2(u,h),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Vt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-m,r)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-Vt(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(u,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-d,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Fc.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Fc,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Uc.setFromEuler(this),this.setFromQuaternion(Uc,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Sn.DEFAULT_ORDER="XYZ";class Zl{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let X2=0;const Nc=new I,Ms=new Vn,yi=new Et,Fr=new I,nr=new I,j2=new I,q2=new Vn,Ic=new I(1,0,0),zc=new I(0,1,0),Bc=new I(0,0,1),Oc={type:"added"},$2={type:"removed"},bs={type:"childadded",child:null},no={type:"childremoved",child:null};class ln extends ds{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:X2++}),this.uuid=ai(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ln.DEFAULT_UP.clone();const e=new I,t=new Sn,n=new Vn,i=new I(1,1,1);function r(){n.setFromEuler(t,!1)}function o(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Et},normalMatrix:{value:new kt}}),this.matrix=new Et,this.matrixWorld=new Et,this.matrixAutoUpdate=ln.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=ln.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Zl,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Ms.setFromAxisAngle(e,t),this.quaternion.multiply(Ms),this}rotateOnWorldAxis(e,t){return Ms.setFromAxisAngle(e,t),this.quaternion.premultiply(Ms),this}rotateX(e){return this.rotateOnAxis(Ic,e)}rotateY(e){return this.rotateOnAxis(zc,e)}rotateZ(e){return this.rotateOnAxis(Bc,e)}translateOnAxis(e,t){return Nc.copy(e).applyQuaternion(this.quaternion),this.position.add(Nc.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Ic,e)}translateY(e){return this.translateOnAxis(zc,e)}translateZ(e){return this.translateOnAxis(Bc,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(yi.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Fr.copy(e):Fr.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),nr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?yi.lookAt(nr,Fr,this.up):yi.lookAt(Fr,nr,this.up),this.quaternion.setFromRotationMatrix(yi),i&&(yi.extractRotation(i.matrixWorld),Ms.setFromRotationMatrix(yi),this.quaternion.premultiply(Ms.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(Oc),bs.child=e,this.dispatchEvent(bs),bs.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent($2),no.child=e,this.dispatchEvent(no),no.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),yi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),yi.multiply(e.parent.matrixWorld)),e.applyMatrix4(yi),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Oc),bs.child=e,this.dispatchEvent(bs),bs.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,e,j2),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,q2,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(a=>({...a})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c<d;c++){const m=l[c];r(e.shapes,m)}else r(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(r(e.materials,this.material[l]));i.material=a}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];i.animations.push(r(e.animations,l))}}if(t){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),d=o(e.images),m=o(e.shapes),u=o(e.skeletons),h=o(e.animations),g=o(e.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),m.length>0&&(n.shapes=m),u.length>0&&(n.skeletons=u),h.length>0&&(n.animations=h),g.length>0&&(n.nodes=g)}return n.object=i,n;function o(a){const l=[];for(const c in a){const d=a[c];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const i=e.children[n];this.add(i.clone())}return this}}ln.DEFAULT_UP=new I(0,1,0);ln.DEFAULT_MATRIX_AUTO_UPDATE=!0;ln.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const ii=new I,xi=new I,io=new I,Mi=new I,Ss=new I,Es=new I,kc=new I,so=new I,ro=new I,ao=new I,oo=new Xt,lo=new Xt,co=new Xt;class Kn{constructor(e=new I,t=new I,n=new I){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),ii.subVectors(e,t),i.cross(ii);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){ii.subVectors(i,t),xi.subVectors(n,t),io.subVectors(e,t);const o=ii.dot(ii),a=ii.dot(xi),l=ii.dot(io),c=xi.dot(xi),d=xi.dot(io),m=o*c-a*a;if(m===0)return r.set(0,0,0),null;const u=1/m,h=(c*l-a*d)*u,g=(o*d-a*l)*u;return r.set(1-h-g,g,h)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Mi)===null?!1:Mi.x>=0&&Mi.y>=0&&Mi.x+Mi.y<=1}static getInterpolation(e,t,n,i,r,o,a,l){return this.getBarycoord(e,t,n,i,Mi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,Mi.x),l.addScaledVector(o,Mi.y),l.addScaledVector(a,Mi.z),l)}static getInterpolatedAttribute(e,t,n,i,r,o){return oo.setScalar(0),lo.setScalar(0),co.setScalar(0),oo.fromBufferAttribute(e,t),lo.fromBufferAttribute(e,n),co.fromBufferAttribute(e,i),o.setScalar(0),o.addScaledVector(oo,r.x),o.addScaledVector(lo,r.y),o.addScaledVector(co,r.z),o}static isFrontFacing(e,t,n,i){return ii.subVectors(n,t),xi.subVectors(e,t),ii.cross(xi).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),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 ii.subVectors(this.c,this.b),xi.subVectors(this.a,this.b),ii.cross(xi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Kn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Kn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return Kn.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return Kn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Kn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,r=this.c;let o,a;Ss.subVectors(i,n),Es.subVectors(r,n),so.subVectors(e,n);const l=Ss.dot(so),c=Es.dot(so);if(l<=0&&c<=0)return t.copy(n);ro.subVectors(e,i);const d=Ss.dot(ro),m=Es.dot(ro);if(d>=0&&m<=d)return t.copy(i);const u=l*m-d*c;if(u<=0&&l>=0&&d<=0)return o=l/(l-d),t.copy(n).addScaledVector(Ss,o);ao.subVectors(e,r);const h=Ss.dot(ao),g=Es.dot(ao);if(g>=0&&h<=g)return t.copy(r);const _=h*c-l*g;if(_<=0&&c>=0&&g<=0)return a=c/(c-g),t.copy(n).addScaledVector(Es,a);const p=d*g-h*m;if(p<=0&&m-d>=0&&h-g>=0)return kc.subVectors(r,i),a=(m-d)/(m-d+(h-g)),t.copy(i).addScaledVector(kc,a);const f=1/(p+_+u);return o=_*f,a=u*f,t.copy(n).addScaledVector(Ss,o).addScaledVector(Es,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const L0={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},Oi={h:0,s:0,l:0},Ur={h:0,s:0,l:0};function ho(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}class Tt{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=qt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Gt.workingColorSpace){if(e=Jl(e,1),t=Vt(t,0,1),n=Vt(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,o=2*n-r;this.r=ho(o,r,e+1/3),this.g=ho(o,r,e),this.b=ho(o,r,e-1/3)}return Gt.colorSpaceToWorking(this,i),this}setStyle(e,t=qt){function n(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=qt){const n=L0[e.toLowerCase()];return n!==void 0?this.setHex(n,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=Ci(e.r),this.g=Ci(e.g),this.b=Ci(e.b),this}copyLinearToSRGB(e){return this.r=ks(e.r),this.g=ks(e.g),this.b=ks(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=qt){return Gt.workingToColorSpace(Dn.copy(this),e),Math.round(Vt(Dn.r*255,0,255))*65536+Math.round(Vt(Dn.g*255,0,255))*256+Math.round(Vt(Dn.b*255,0,255))}getHexString(e=qt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Dn.copy(this),t);const n=Dn.r,i=Dn.g,r=Dn.b,o=Math.max(n,i,r),a=Math.min(n,i,r);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const m=o-a;switch(c=d<=.5?m/(o+a):m/(2-o-a),o){case n:l=(i-r)/m+(i<r?6:0);break;case i:l=(r-n)/m+2;break;case r:l=(n-i)/m+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Gt.workingColorSpace){return Gt.workingToColorSpace(Dn.copy(this),t),e.r=Dn.r,e.g=Dn.g,e.b=Dn.b,e}getStyle(e=qt){Gt.workingToColorSpace(Dn.copy(this),e);const t=Dn.r,n=Dn.g,i=Dn.b;return e!==qt?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(Oi),this.setHSL(Oi.h+e,Oi.s+t,Oi.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Oi),e.getHSL(Ur);const n=fr(Oi.h,Ur.h,t),i=fr(Oi.s,Ur.s,t),r=fr(Oi.l,Ur.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Dn=new Tt;Tt.NAMES=L0;let Y2=0;class qn extends ds{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Y2++}),this.uuid=ai(),this.name="",this.type="Material",this.blending=Bs,this.side=Qn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Go,this.blendDst=Wo,this.blendEquation=rs,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Tt(0,0,0),this.blendAlpha=0,this.depthFunc=Hs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=wc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=ms,this.stencilZFail=ms,this.stencilZPass=ms,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Bs&&(n.blending=this.blending),this.side!==Qn&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Go&&(n.blendSrc=this.blendSrc),this.blendDst!==Wo&&(n.blendDst=this.blendDst),this.blendEquation!==rs&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Hs&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==wc&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ms&&(n.stencilFail=this.stencilFail),this.stencilZFail!==ms&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==ms&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=i(e.textures),o=i(e.images);r.length>0&&(n.textures=r),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const i=t.length;n=new Array(i);for(let r=0;r!==i;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class qi extends qn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const gn=new I,Nr=new et;let J2=0;class mn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:J2++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Cl,this.updateRanges=[],this.gpuType=fi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Nr.fromBufferAttribute(this,t),Nr.applyMatrix3(e),this.setXY(t,Nr.x,Nr.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyMatrix3(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyMatrix4(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyNormalMatrix(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.transformDirection(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=si(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=tn(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=si(t,this.array)),t}setX(e,t){return this.normalized&&(t=tn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=si(t,this.array)),t}setY(e,t){return this.normalized&&(t=tn(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=si(t,this.array)),t}setZ(e,t){return this.normalized&&(t=tn(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=si(t,this.array)),t}setW(e,t){return this.normalized&&(t=tn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array),r=tn(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Cl&&(e.usage=this.usage),e}}class P0 extends mn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class K2 extends mn{constructor(e,t,n){super(new Int32Array(e),t,n)}}class F0 extends mn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class It extends mn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Z2=0;const $n=new Et,uo=new ln,As=new I,Wn=new Fn,ir=new Fn,Mn=new I;class hn extends ds{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Z2++}),this.uuid=ai(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=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 Array.isArray(e)?this.index=new(R0(e)?F0:P0)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}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 this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const r=new kt().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return $n.makeRotationFromQuaternion(e),this.applyMatrix4($n),this}rotateX(e){return $n.makeRotationX(e),this.applyMatrix4($n),this}rotateY(e){return $n.makeRotationY(e),this.applyMatrix4($n),this}rotateZ(e){return $n.makeRotationZ(e),this.applyMatrix4($n),this}translate(e,t,n){return $n.makeTranslation(e,t,n),this.applyMatrix4($n),this}scale(e,t,n){return $n.makeScale(e,t,n),this.applyMatrix4($n),this}lookAt(e){return uo.lookAt(e),uo.updateMatrix(),this.applyMatrix4(uo.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(As).negate(),this.translate(As.x,As.y,As.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let i=0,r=e.length;i<r;i++){const o=e[i];n.push(o.x,o.y,o.z||0)}this.setAttribute("position",new It(n,3))}else{const n=Math.min(e.length,t.count);for(let i=0;i<n;i++){const r=e[i];t.setXYZ(i,r.x,r.y,r.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Fn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new I(-1/0,-1/0,-1/0),new I(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){const r=t[n];Wn.setFromBufferAttribute(r),this.morphTargetsRelative?(Mn.addVectors(this.boundingBox.min,Wn.min),this.boundingBox.expandByPoint(Mn),Mn.addVectors(this.boundingBox.max,Wn.max),this.boundingBox.expandByPoint(Mn)):(this.boundingBox.expandByPoint(Wn.min),this.boundingBox.expandByPoint(Wn.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(){this.boundingSphere===null&&(this.boundingSphere=new Fi);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new I,1/0);return}if(e){const n=this.boundingSphere.center;if(Wn.setFromBufferAttribute(e),t)for(let r=0,o=t.length;r<o;r++){const a=t[r];ir.setFromBufferAttribute(a),this.morphTargetsRelative?(Mn.addVectors(Wn.min,ir.min),Wn.expandByPoint(Mn),Mn.addVectors(Wn.max,ir.max),Wn.expandByPoint(Mn)):(Wn.expandByPoint(ir.min),Wn.expandByPoint(ir.max))}Wn.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)Mn.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(Mn));if(t)for(let r=0,o=t.length;r<o;r++){const a=t[r],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)Mn.fromBufferAttribute(a,c),l&&(As.fromBufferAttribute(e,c),Mn.add(As)),i=Math.max(i,n.distanceToSquared(Mn))}this.boundingSphere.radius=Math.sqrt(i),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(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,i=t.normal,r=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new mn(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new I,l[P]=new I;const c=new I,d=new I,m=new I,u=new et,h=new et,g=new et,_=new I,p=new I;function f(P,E,A){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,E),m.fromBufferAttribute(n,A),u.fromBufferAttribute(r,P),h.fromBufferAttribute(r,E),g.fromBufferAttribute(r,A),d.sub(c),m.sub(c),h.sub(u),g.sub(u);const D=1/(h.x*g.y-g.x*h.y);isFinite(D)&&(_.copy(d).multiplyScalar(g.y).addScaledVector(m,-h.y).multiplyScalar(D),p.copy(m).multiplyScalar(h.x).addScaledVector(d,-g.x).multiplyScalar(D),a[P].add(_),a[E].add(_),a[A].add(_),l[P].add(p),l[E].add(p),l[A].add(p))}let x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let P=0,E=x.length;P<E;++P){const A=x[P],D=A.start,O=A.count;for(let V=D,Q=D+O;V<Q;V+=3)f(e.getX(V+0),e.getX(V+1),e.getX(V+2))}const y=new I,S=new I,U=new I,C=new I;function L(P){U.fromBufferAttribute(i,P),C.copy(U);const E=a[P];y.copy(E),y.sub(U.multiplyScalar(U.dot(E))).normalize(),S.crossVectors(C,E);const D=S.dot(l[P])<0?-1:1;o.setXYZW(P,y.x,y.y,y.z,D)}for(let P=0,E=x.length;P<E;++P){const A=x[P],D=A.start,O=A.count;for(let V=D,Q=D+O;V<Q;V+=3)L(e.getX(V+0)),L(e.getX(V+1)),L(e.getX(V+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new mn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let u=0,h=n.count;u<h;u++)n.setXYZ(u,0,0,0);const i=new I,r=new I,o=new I,a=new I,l=new I,c=new I,d=new I,m=new I;if(e)for(let u=0,h=e.count;u<h;u+=3){const g=e.getX(u+0),_=e.getX(u+1),p=e.getX(u+2);i.fromBufferAttribute(t,g),r.fromBufferAttribute(t,_),o.fromBufferAttribute(t,p),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),a.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),c.fromBufferAttribute(n,p),a.add(d),l.add(d),c.add(d),n.setXYZ(g,a.x,a.y,a.z),n.setXYZ(_,l.x,l.y,l.z),n.setXYZ(p,c.x,c.y,c.z)}else for(let u=0,h=t.count;u<h;u+=3)i.fromBufferAttribute(t,u+0),r.fromBufferAttribute(t,u+1),o.fromBufferAttribute(t,u+2),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),n.setXYZ(u+0,d.x,d.y,d.z),n.setXYZ(u+1,d.x,d.y,d.z),n.setXYZ(u+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Mn.fromBufferAttribute(e,t),Mn.normalize(),e.setXYZ(t,Mn.x,Mn.y,Mn.z)}toNonIndexed(){function e(a,l){const c=a.array,d=a.itemSize,m=a.normalized,u=new c.constructor(l.length*d);let h=0,g=0;for(let _=0,p=l.length;_<p;_++){a.isInterleavedBufferAttribute?h=l[_]*a.data.stride+a.offset:h=l[_]*d;for(let f=0;f<d;f++)u[g++]=c[h++]}return new mn(u,d,m)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new hn,n=this.index.array,i=this.attributes;for(const a in i){const l=i[a],c=e(l,n);t.setAttribute(a,c)}const r=this.morphAttributes;for(const a in r){const l=[],c=r[a];for(let d=0,m=c.length;d<m;d++){const u=c[d],h=e(u,n);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],d=[];for(let m=0,u=c.length;m<u;m++){const h=c[m];d.push(h.toJSON(e.data))}d.length>0&&(i[l]=d,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),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 n=e.index;n!==null&&this.setIndex(n.clone());const i=e.attributes;for(const c in i){const d=i[c];this.setAttribute(c,d.clone(t))}const r=e.morphAttributes;for(const c in r){const d=[],m=r[c];for(let u=0,h=m.length;u<h;u++)d.push(m[u].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,d=o.length;c<d;c++){const m=o[c];this.addGroup(m.start,m.count,m.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Vc=new Et,Zi=new Ys,Ir=new Fi,Hc=new I,zr=new I,Br=new I,Or=new I,fo=new I,kr=new I,Gc=new I,Vr=new I;class zt extends ln{constructor(e=new hn,t=new qi){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const a=this.morphTargetInfluences;if(r&&a){kr.set(0,0,0);for(let l=0,c=r.length;l<c;l++){const d=a[l],m=r[l];d!==0&&(fo.fromBufferAttribute(m,e),o?kr.addScaledVector(fo,d):kr.addScaledVector(fo.sub(t),d))}t.add(kr)}return t}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Ir.copy(n.boundingSphere),Ir.applyMatrix4(r),Zi.copy(e.ray).recast(e.near),!(Ir.containsPoint(Zi.origin)===!1&&(Zi.intersectSphere(Ir,Hc)===null||Zi.origin.distanceToSquared(Hc)>(e.far-e.near)**2))&&(Vc.copy(r).invert(),Zi.copy(e.ray).applyMatrix4(Vc),!(n.boundingBox!==null&&Zi.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Zi)))}_computeIntersections(e,t,n){let i;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,d=r.attributes.uv1,m=r.attributes.normal,u=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const p=u[g],f=o[p.materialIndex],x=Math.max(p.start,h.start),y=Math.min(a.count,Math.min(p.start+p.count,h.start+h.count));for(let S=x,U=y;S<U;S+=3){const C=a.getX(S),L=a.getX(S+1),P=a.getX(S+2);i=Hr(this,f,e,n,c,d,m,C,L,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=p.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(a.count,h.start+h.count);for(let p=g,f=_;p<f;p+=3){const x=a.getX(p),y=a.getX(p+1),S=a.getX(p+2);i=Hr(this,o,e,n,c,d,m,x,y,S),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const p=u[g],f=o[p.materialIndex],x=Math.max(p.start,h.start),y=Math.min(l.count,Math.min(p.start+p.count,h.start+h.count));for(let S=x,U=y;S<U;S+=3){const C=S,L=S+1,P=S+2;i=Hr(this,f,e,n,c,d,m,C,L,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=p.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(l.count,h.start+h.count);for(let p=g,f=_;p<f;p+=3){const x=p,y=p+1,S=p+2;i=Hr(this,o,e,n,c,d,m,x,y,S),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}}}function Q2(s,e,t,n,i,r,o,a){let l;if(e.side===In?l=n.intersectTriangle(o,r,i,!0,a):l=n.intersectTriangle(i,r,o,e.side===Qn,a),l===null)return null;Vr.copy(a),Vr.applyMatrix4(s.matrixWorld);const c=t.ray.origin.distanceTo(Vr);return c<t.near||c>t.far?null:{distance:c,point:Vr.clone(),object:s}}function Hr(s,e,t,n,i,r,o,a,l,c){s.getVertexPosition(a,zr),s.getVertexPosition(l,Br),s.getVertexPosition(c,Or);const d=Q2(s,e,t,n,zr,Br,Or,Gc);if(d){const m=new I;Kn.getBarycoord(Gc,zr,Br,Or,m),i&&(d.uv=Kn.getInterpolatedAttribute(i,a,l,c,m,new et)),r&&(d.uv1=Kn.getInterpolatedAttribute(r,a,l,c,m,new et)),o&&(d.normal=Kn.getInterpolatedAttribute(o,a,l,c,m,new I),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const u={a,b:l,c,normal:new I,materialIndex:0};Kn.getNormal(zr,Br,Or,u.normal),d.face=u,d.barycoord=m}return d}class $i extends hn{constructor(e=1,t=1,n=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],d=[],m=[];let u=0,h=0;g("z","y","x",-1,-1,n,t,e,o,r,0),g("z","y","x",1,-1,n,t,-e,o,r,1),g("x","z","y",1,1,e,n,t,i,o,2),g("x","z","y",1,-1,e,n,-t,i,o,3),g("x","y","z",1,-1,e,t,n,i,r,4),g("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(l),this.setAttribute("position",new It(c,3)),this.setAttribute("normal",new It(d,3)),this.setAttribute("uv",new It(m,2));function g(_,p,f,x,y,S,U,C,L,P,E){const A=S/L,D=U/P,O=S/2,V=U/2,Q=C/2,se=L+1,G=P+1;let ce=0,Z=0;const ge=new I;for(let De=0;De<G;De++){const ye=De*D-V;for(let _e=0;_e<se;_e++){const ae=_e*A-O;ge[_]=ae*x,ge[p]=ye*y,ge[f]=Q,c.push(ge.x,ge.y,ge.z),ge[_]=0,ge[p]=0,ge[f]=C>0?1:-1,d.push(ge.x,ge.y,ge.z),m.push(_e/L),m.push(1-De/P),ce+=1}}for(let De=0;De<P;De++)for(let ye=0;ye<L;ye++){const _e=u+ye+se*De,ae=u+ye+se*(De+1),j=u+(ye+1)+se*(De+1),Y=u+(ye+1)+se*De;l.push(_e,ae,Y),l.push(ae,j,Y),Z+=6}a.addGroup(h,Z,E),h+=Z,u+=ce}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new $i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function qs(s){const e={};for(const t in s){e[t]={};for(const n in s[t]){const i=s[t][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=i.clone():Array.isArray(i)?e[t][n]=i.slice():e[t][n]=i}}return e}function Nn(s){const e={};for(let t=0;t<s.length;t++){const n=qs(s[t]);for(const i in n)e[i]=n[i]}return e}function e1(s){const e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function U0(s){const e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}const Ql={clone:qs,merge:Nn};var t1=`void main() {
|
|
5
|
+
*/const Vl="177",Ti={ROTATE:0,DOLLY:1,PAN:2},Is={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Ru=0,vc=1,Du=2,v0=1,Hl=2,Si=3,Qn=0,In=1,pn=2,Wi=0,Bs=1,yc=2,xc=3,Mc=4,Lu=5,rs=100,Pu=101,Fu=102,Nu=103,Uu=104,Iu=200,zu=201,Bu=202,Ou=203,Go=204,Wo=205,ku=206,Vu=207,Hu=208,Gu=209,Wu=210,Xu=211,ju=212,qu=213,$u=214,Xo=0,jo=1,qo=2,Hs=3,$o=4,Yo=5,Jo=6,Ko=7,Fa=0,Yu=1,Ju=2,Xi=0,Ku=1,Zu=2,Qu=3,Gl=4,e2=5,t2=6,n2=7,bc="attached",i2="detached",y0=300,Gs=301,Ws=302,Zo=303,Qo=304,Na=306,di=1e3,ri=1001,el=1002,jn=1003,s2=1004,wr=1005,Xn=1006,Xa=1007,Ai=1008,mi=1009,x0=1010,M0=1011,_r=1012,Wl=1013,hs=1014,fi=1015,Sr=1016,Xl=1017,jl=1018,vr=1020,b0=35902,S0=1021,E0=1022,Zn=1023,yr=1026,xr=1027,A0=1028,ql=1029,w0=1030,$l=1031,Yl=1033,ga=33776,_a=33777,va=33778,ya=33779,tl=35840,nl=35841,il=35842,sl=35843,rl=36196,al=37492,ol=37496,ll=37808,cl=37809,hl=37810,ul=37811,dl=37812,fl=37813,pl=37814,ml=37815,gl=37816,_l=37817,vl=37818,yl=37819,xl=37820,Ml=37821,xa=36492,bl=36494,Sl=36495,T0=36283,El=36284,Al=36285,wl=36286,Ea=2300,Tl=2301,ja=2302,Sc=2400,Ec=2401,Ac=2402,r2=2500,a2=3200,o2=3201,Ua=0,l2=1,Hi="",qt="srgb",Xs="srgb-linear",Aa="linear",an="srgb",ms=7680,wc=519,c2=512,h2=513,u2=514,C0=515,d2=516,f2=517,p2=518,m2=519,Cl=35044,Tc="300 es",wi=2e3,wa=2001;class ds{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const i=n[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let r=0,o=i.length;r<o;r++)i[r].call(this,e);e.target=null}}}const Rn=["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 Cc=1234567;const dr=Math.PI/180,js=180/Math.PI;function ai(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Rn[s&255]+Rn[s>>8&255]+Rn[s>>16&255]+Rn[s>>24&255]+"-"+Rn[e&255]+Rn[e>>8&255]+"-"+Rn[e>>16&15|64]+Rn[e>>24&255]+"-"+Rn[t&63|128]+Rn[t>>8&255]+"-"+Rn[t>>16&255]+Rn[t>>24&255]+Rn[n&255]+Rn[n>>8&255]+Rn[n>>16&255]+Rn[n>>24&255]).toLowerCase()}function Vt(s,e,t){return Math.max(e,Math.min(t,s))}function Jl(s,e){return(s%e+e)%e}function g2(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function _2(s,e,t){return s!==e?(t-s)/(e-s):0}function fr(s,e,t){return(1-t)*s+t*e}function v2(s,e,t,n){return fr(s,e,1-Math.exp(-t*n))}function y2(s,e=1){return e-Math.abs(Jl(s,e*2)-e)}function x2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function M2(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function b2(s,e){return s+Math.floor(Math.random()*(e-s+1))}function S2(s,e){return s+Math.random()*(e-s)}function E2(s){return s*(.5-Math.random())}function A2(s){s!==void 0&&(Cc=s);let e=Cc+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function w2(s){return s*dr}function T2(s){return s*js}function C2(s){return(s&s-1)===0&&s!==0}function R2(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function D2(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function L2(s,e,t,n,i){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+n)/2),d=o((e+n)/2),m=r((e-n)/2),u=o((e-n)/2),h=r((n-e)/2),g=o((n-e)/2);switch(i){case"XYX":s.set(a*d,l*m,l*u,a*c);break;case"YZY":s.set(l*u,a*d,l*m,a*c);break;case"ZXZ":s.set(l*m,l*u,a*d,a*c);break;case"XZX":s.set(a*d,l*g,l*h,a*c);break;case"YXY":s.set(l*h,a*d,l*g,a*c);break;case"ZYZ":s.set(l*g,l*h,a*d,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function si(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function tn(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}const Ei={DEG2RAD:dr,RAD2DEG:js,generateUUID:ai,clamp:Vt,euclideanModulo:Jl,mapLinear:g2,inverseLerp:_2,lerp:fr,damp:v2,pingpong:y2,smoothstep:x2,smootherstep:M2,randInt:b2,randFloat:S2,randFloatSpread:E2,seededRandom:A2,degToRad:w2,radToDeg:T2,isPowerOfTwo:C2,ceilPowerOfTwo:R2,floorPowerOfTwo:D2,setQuaternionFromProperEuler:L2,normalize:tn,denormalize:si};class et{constructor(e=0,t=0){et.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,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,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 n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*n-o*i+e.x,this.y=r*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Vn{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,o,a){let l=n[i+0],c=n[i+1],d=n[i+2],m=n[i+3];const u=r[o+0],h=r[o+1],g=r[o+2],_=r[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m;return}if(a===1){e[t+0]=u,e[t+1]=h,e[t+2]=g,e[t+3]=_;return}if(m!==_||l!==u||c!==h||d!==g){let p=1-a;const f=l*u+c*h+d*g+m*_,v=f>=0?1:-1,b=1-f*f;if(b>Number.EPSILON){const F=Math.sqrt(b),C=Math.atan2(F,f*v);p=Math.sin(p*C)/F,a=Math.sin(a*C)/F}const S=a*v;if(l=l*p+u*S,c=c*p+h*S,d=d*p+g*S,m=m*p+_*S,p===1-a){const F=1/Math.sqrt(l*l+c*c+d*d+m*m);l*=F,c*=F,d*=F,m*=F}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=m}static multiplyQuaternionsFlat(e,t,n,i,r,o){const a=n[i],l=n[i+1],c=n[i+2],d=n[i+3],m=r[o],u=r[o+1],h=r[o+2],g=r[o+3];return e[t]=a*g+d*m+l*h-c*u,e[t+1]=l*g+d*u+c*m-a*h,e[t+2]=c*g+d*h+a*u-l*m,e[t+3]=d*g-a*m-l*u-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(i/2),m=a(r/2),u=l(n/2),h=l(i/2),g=l(r/2);switch(o){case"XYZ":this._x=u*d*m+c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m-u*h*g;break;case"YXZ":this._x=u*d*m+c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m+u*h*g;break;case"ZXY":this._x=u*d*m-c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m-u*h*g;break;case"ZYX":this._x=u*d*m-c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m+u*h*g;break;case"YZX":this._x=u*d*m+c*h*g,this._y=c*h*m+u*d*g,this._z=c*d*g-u*h*m,this._w=c*d*m-u*h*g;break;case"XZY":this._x=u*d*m-c*h*g,this._y=c*h*m-u*d*g,this._z=c*d*g+u*h*m,this._w=c*d*m+u*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],d=t[6],m=t[10],u=n+a+m;if(u>0){const h=.5/Math.sqrt(u+1);this._w=.25/h,this._x=(d-l)*h,this._y=(r-c)*h,this._z=(o-i)*h}else if(n>a&&n>m){const h=2*Math.sqrt(1+n-a-m);this._w=(d-l)/h,this._x=.25*h,this._y=(i+o)/h,this._z=(r+c)/h}else if(a>m){const h=2*Math.sqrt(1+a-n-m);this._w=(r-c)/h,this._x=(i+o)/h,this._y=.25*h,this._z=(l+d)/h}else{const h=2*Math.sqrt(1+m-n-a);this._w=(o-i)/h,this._x=(r+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vt(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+o*a+i*c-r*l,this._y=i*d+o*l+r*a-n*c,this._z=r*d+o*c+n*l-i*a,this._w=o*d-n*a-i*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+n*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const h=1-t;return this._w=h*o+t*this._w,this._x=h*n+t*this._x,this._y=h*i+t*this._y,this._z=h*r+t*this._z,this.normalize(),this}const c=Math.sqrt(l),d=Math.atan2(c,a),m=Math.sin((1-t)*d)/c,u=Math.sin(t*d)/c;return this._w=o*m+this._w*u,this._x=n*m+this._x*u,this._y=i*m+this._y*u,this._z=r*m+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class I{constructor(e=0,t=0,n=0){I.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,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(Rc.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Rc.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=e.elements,o=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*i-a*n),d=2*(a*t-r*i),m=2*(r*n-o*t);return this.x=t+l*c+o*m-a*d,this.y=n+l*d+a*c-r*m,this.z=i+l*m+r*d-o*c,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,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=i*l-r*a,this.y=r*o-n*l,this.z=n*a-i*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return qa.copy(this).projectOnVector(e),this.sub(qa)}reflect(e){return this.sub(qa.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Vt(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}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,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,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(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const qa=new I,Rc=new Vn;class kt{constructor(e,t,n,i,r,o,a,l,c){kt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,o,a,l,c)}set(e,t,n,i,r,o,a,l,c){const d=this.elements;return d[0]=e,d[1]=i,d[2]=a,d[3]=t,d[4]=r,d[5]=l,d[6]=n,d[7]=o,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.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 n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],d=n[4],m=n[7],u=n[2],h=n[5],g=n[8],_=i[0],p=i[3],f=i[6],v=i[1],b=i[4],S=i[7],F=i[2],C=i[5],R=i[8];return r[0]=o*_+a*v+l*F,r[3]=o*p+a*b+l*C,r[6]=o*f+a*S+l*R,r[1]=c*_+d*v+m*F,r[4]=c*p+d*b+m*C,r[7]=c*f+d*S+m*R,r[2]=u*_+h*v+g*F,r[5]=u*p+h*b+g*C,r[8]=u*f+h*S+g*R,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],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*o*d-t*a*c-n*r*d+n*a*l+i*r*c-i*o*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],m=d*o-a*c,u=a*l-d*r,h=c*r-o*l,g=t*m+n*u+i*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=m*_,e[1]=(i*c-d*n)*_,e[2]=(a*n-i*o)*_,e[3]=u*_,e[4]=(d*t-i*l)*_,e[5]=(i*r-a*t)*_,e[6]=h*_,e[7]=(n*l-c*t)*_,e[8]=(o*t-n*r)*_,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,n,i,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(n*l,n*c,-n*(l*o+c*a)+o+e,-i*c,i*l,-i*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply($a.makeScale(e,t)),this}rotate(e){return this.premultiply($a.makeRotation(-e)),this}translate(e,t){return this.premultiply($a.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,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,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const $a=new kt;function R0(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}function Mr(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}function P2(){const s=Mr("canvas");return s.style.display="block",s}const Dc={};function Os(s){s in Dc||(Dc[s]=!0,console.warn(s))}function F2(s,e,t){return new Promise(function(n,i){function r(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:i();break;case s.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:n()}}setTimeout(r,t)})}function N2(s){const e=s.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function U2(s){const e=s.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const Lc=new kt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Pc=new kt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function I2(){const s={enabled:!0,workingColorSpace:Xs,spaces:{},convert:function(i,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===an&&(i.r=Ci(i.r),i.g=Ci(i.g),i.b=Ci(i.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(i.applyMatrix3(this.spaces[r].toXYZ),i.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===an&&(i.r=ks(i.r),i.g=ks(i.g),i.b=ks(i.b))),i},workingToColorSpace:function(i,r){return this.convert(i,this.workingColorSpace,r)},colorSpaceToWorking:function(i,r){return this.convert(i,r,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Hi?Aa:this.spaces[i].transfer},getLuminanceCoefficients:function(i,r=this.workingColorSpace){return i.fromArray(this.spaces[r].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,r,o){return i.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,r){return Os("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(i,r)},toWorkingColorSpace:function(i,r){return Os("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(i,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return s.define({[Xs]:{primaries:e,whitePoint:n,transfer:Aa,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:qt},outputColorSpaceConfig:{drawingBufferColorSpace:qt}},[qt]:{primaries:e,whitePoint:n,transfer:an,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:qt}}}),s}const Gt=I2();function Ci(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function ks(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}let gs;class z2{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{gs===void 0&&(gs=Mr("canvas")),gs.width=e.width,gs.height=e.height;const i=gs.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=gs}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Mr("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o<r.length;o++)r[o]=Ci(r[o]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Ci(t[n]/255)*255):t[n]=Ci(t[n]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let B2=0;class Kl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:B2++}),this.uuid=ai(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let o=0,a=i.length;o<a;o++)i[o].isDataTexture?r.push(Ya(i[o].image)):r.push(Ya(i[o]))}else r=Ya(i);n.url=r}return t||(e.images[this.uuid]=n),n}}function Ya(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?z2.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let O2=0;const Ja=new I;class Tn extends ds{constructor(e=Tn.DEFAULT_IMAGE,t=Tn.DEFAULT_MAPPING,n=ri,i=ri,r=Xn,o=Ai,a=Zn,l=mi,c=Tn.DEFAULT_ANISOTROPY,d=Hi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:O2++}),this.uuid=ai(),this.name="",this.source=new Kl(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new et(0,0),this.repeat=new et(1,1),this.center=new et(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new kt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=d,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Ja).x}get height(){return this.source.getSize(Ja).y}get depth(){return this.source.getSize(Ja).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).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,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==y0)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case di:e.x=e.x-Math.floor(e.x);break;case ri:e.x=e.x<0?0:1;break;case el:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case di:e.y=e.y-Math.floor(e.y);break;case ri:e.y=e.y<0?0:1;break;case el:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Tn.DEFAULT_IMAGE=null;Tn.DEFAULT_MAPPING=y0;Tn.DEFAULT_ANISOTROPY=1;class Xt{constructor(e=0,t=0,n=0,i=1){Xt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}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,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*n+o[11]*i+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,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,n,i,r;const l=e.elements,c=l[0],d=l[4],m=l[8],u=l[1],h=l[5],g=l[9],_=l[2],p=l[6],f=l[10];if(Math.abs(d-u)<.01&&Math.abs(m-_)<.01&&Math.abs(g-p)<.01){if(Math.abs(d+u)<.1&&Math.abs(m+_)<.1&&Math.abs(g+p)<.1&&Math.abs(c+h+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,S=(h+1)/2,F=(f+1)/2,C=(d+u)/4,R=(m+_)/4,P=(g+p)/4;return b>S&&b>F?b<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(b),i=C/n,r=R/n):S>F?S<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(S),n=C/i,r=P/i):F<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(F),n=R/r,i=P/r),this.set(n,i,r,t),this}let v=Math.sqrt((p-g)*(p-g)+(m-_)*(m-_)+(u-d)*(u-d));return Math.abs(v)<.001&&(v=1),this.x=(p-g)/v,this.y=(m-_)/v,this.z=(u-d)/v,this.w=Math.acos((c+h+f-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,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 k2 extends ds{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Xn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Xt(0,0,e,t),this.scissorTest=!1,this.viewport=new Xt(0,0,e,t);const i={width:e,height:t,depth:n.depth},r=new Tn(i);this.textures=[];const o=n.count;for(let a=0;a<o;a++)this.textures[a]=r.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:Xn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n,this.textures[i].isArrayTexture=this.textures[i].image.depth>1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const i=Object.assign({},e.textures[t].image);this.textures[t].source=new Kl(i)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class us extends k2{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class D0 extends Tn{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=jn,this.minFilter=jn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class V2 extends Tn{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=jn,this.minFilter=jn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Fn{constructor(e=new I(1/0,1/0,1/0),t=new I(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ti.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ti.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=ti.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const r=n.getAttribute("position");if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=r.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,ti):ti.fromBufferAttribute(r,o),ti.applyMatrix4(e.matrixWorld),this.expandByPoint(ti);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Tr.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Tr.copy(n.boundingBox)),Tr.applyMatrix4(e.matrixWorld),this.union(Tr)}const i=e.children;for(let r=0,o=i.length;r<o;r++)this.expandByObject(i[r],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ti),ti.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(er),Cr.subVectors(this.max,er),_s.subVectors(e.a,er),vs.subVectors(e.b,er),ys.subVectors(e.c,er),Ui.subVectors(vs,_s),Ii.subVectors(ys,vs),Ji.subVectors(_s,ys);let t=[0,-Ui.z,Ui.y,0,-Ii.z,Ii.y,0,-Ji.z,Ji.y,Ui.z,0,-Ui.x,Ii.z,0,-Ii.x,Ji.z,0,-Ji.x,-Ui.y,Ui.x,0,-Ii.y,Ii.x,0,-Ji.y,Ji.x,0];return!Ka(t,_s,vs,ys,Cr)||(t=[1,0,0,0,1,0,0,0,1],!Ka(t,_s,vs,ys,Cr))?!1:(Rr.crossVectors(Ui,Ii),t=[Rr.x,Rr.y,Rr.z],Ka(t,_s,vs,ys,Cr))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ti).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ti).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(_i[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_i[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_i[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_i[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_i[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_i[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_i[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_i[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_i),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const _i=[new I,new I,new I,new I,new I,new I,new I,new I],ti=new I,Tr=new Fn,_s=new I,vs=new I,ys=new I,Ui=new I,Ii=new I,Ji=new I,er=new I,Cr=new I,Rr=new I,Ki=new I;function Ka(s,e,t,n,i){for(let r=0,o=s.length-3;r<=o;r+=3){Ki.fromArray(s,r);const a=i.x*Math.abs(Ki.x)+i.y*Math.abs(Ki.y)+i.z*Math.abs(Ki.z),l=e.dot(Ki),c=t.dot(Ki),d=n.dot(Ki);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const H2=new Fn,tr=new I,Za=new I;class Fi{constructor(e=new I,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):H2.setFromPoints(e).getCenter(n);let i=0;for(let r=0,o=e.length;r<o;r++)i=Math.max(i,n.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}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;tr.subVectors(e,this.center);const t=tr.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(tr,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Za.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(tr.copy(e.center).add(Za)),this.expandByPoint(tr.copy(e.center).sub(Za))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const vi=new I,Qa=new I,Dr=new I,zi=new I,eo=new I,Lr=new I,to=new I;class Ys{constructor(e=new I,t=new I(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,vi)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=vi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(vi.copy(this.origin).addScaledVector(this.direction,t),vi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Qa.copy(e).add(t).multiplyScalar(.5),Dr.copy(t).sub(e).normalize(),zi.copy(this.origin).sub(Qa);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Dr),a=zi.dot(this.direction),l=-zi.dot(Dr),c=zi.lengthSq(),d=Math.abs(1-o*o);let m,u,h,g;if(d>0)if(m=o*l-a,u=o*a-l,g=r*d,m>=0)if(u>=-g)if(u<=g){const _=1/d;m*=_,u*=_,h=m*(m+o*u+2*a)+u*(o*m+u+2*l)+c}else u=r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;else u=-r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;else u<=-g?(m=Math.max(0,-(-o*r+a)),u=m>0?-r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c):u<=g?(m=0,u=Math.min(Math.max(-r,-l),r),h=u*(u+2*l)+c):(m=Math.max(0,-(o*r+a)),u=m>0?r:Math.min(Math.max(-r,-l),r),h=-m*m+u*(u+2*l)+c);else u=o>0?-r:r,m=Math.max(0,-(o*u+a)),h=-m*m+u*(u+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,m),i&&i.copy(Qa).addScaledVector(Dr,u),h}intersectSphere(e,t){vi.subVectors(e.center,this.origin);const n=vi.dot(this.direction),i=vi.dot(vi)-n*n,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,o,a,l;const c=1/this.direction.x,d=1/this.direction.y,m=1/this.direction.z,u=this.origin;return c>=0?(n=(e.min.x-u.x)*c,i=(e.max.x-u.x)*c):(n=(e.max.x-u.x)*c,i=(e.min.x-u.x)*c),d>=0?(r=(e.min.y-u.y)*d,o=(e.max.y-u.y)*d):(r=(e.max.y-u.y)*d,o=(e.min.y-u.y)*d),n>o||r>i||((r>n||isNaN(n))&&(n=r),(o<i||isNaN(i))&&(i=o),m>=0?(a=(e.min.z-u.z)*m,l=(e.max.z-u.z)*m):(a=(e.max.z-u.z)*m,l=(e.min.z-u.z)*m),n>l||a>i)||((a>n||n!==n)&&(n=a),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,vi)!==null}intersectTriangle(e,t,n,i,r){eo.subVectors(t,e),Lr.subVectors(n,e),to.crossVectors(eo,Lr);let o=this.direction.dot(to),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;zi.subVectors(this.origin,e);const l=a*this.direction.dot(Lr.crossVectors(zi,Lr));if(l<0)return null;const c=a*this.direction.dot(eo.cross(zi));if(c<0||l+c>o)return null;const d=-a*zi.dot(to);return d<0?null:this.at(d/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Et{constructor(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p){Et.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p)}set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,p){const f=this.elements;return f[0]=e,f[4]=t,f[8]=n,f[12]=i,f[1]=r,f[5]=o,f[9]=a,f[13]=l,f[2]=c,f[6]=d,f[10]=m,f[14]=u,f[3]=h,f[7]=g,f[11]=_,f[15]=p,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 Et().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[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,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/xs.setFromMatrixColumn(e,0).length(),r=1/xs.setFromMatrixColumn(e,1).length(),o=1/xs.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,r=e.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(i),c=Math.sin(i),d=Math.cos(r),m=Math.sin(r);if(e.order==="XYZ"){const u=o*d,h=o*m,g=a*d,_=a*m;t[0]=l*d,t[4]=-l*m,t[8]=c,t[1]=h+g*c,t[5]=u-_*c,t[9]=-a*l,t[2]=_-u*c,t[6]=g+h*c,t[10]=o*l}else if(e.order==="YXZ"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u+_*a,t[4]=g*a-h,t[8]=o*c,t[1]=o*m,t[5]=o*d,t[9]=-a,t[2]=h*a-g,t[6]=_+u*a,t[10]=o*l}else if(e.order==="ZXY"){const u=l*d,h=l*m,g=c*d,_=c*m;t[0]=u-_*a,t[4]=-o*m,t[8]=g+h*a,t[1]=h+g*a,t[5]=o*d,t[9]=_-u*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const u=o*d,h=o*m,g=a*d,_=a*m;t[0]=l*d,t[4]=g*c-h,t[8]=u*c+_,t[1]=l*m,t[5]=_*c+u,t[9]=h*c-g,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const u=o*l,h=o*c,g=a*l,_=a*c;t[0]=l*d,t[4]=_-u*m,t[8]=g*m+h,t[1]=m,t[5]=o*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*m+g,t[10]=u-_*m}else if(e.order==="XZY"){const u=o*l,h=o*c,g=a*l,_=a*c;t[0]=l*d,t[4]=-m,t[8]=c*d,t[1]=u*m+_,t[5]=o*d,t[9]=h*m-g,t[2]=g*m-h,t[6]=a*d,t[10]=_*m+u}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(G2,e,W2)}lookAt(e,t,n){const i=this.elements;return Gn.subVectors(e,t),Gn.lengthSq()===0&&(Gn.z=1),Gn.normalize(),Bi.crossVectors(n,Gn),Bi.lengthSq()===0&&(Math.abs(n.z)===1?Gn.x+=1e-4:Gn.z+=1e-4,Gn.normalize(),Bi.crossVectors(n,Gn)),Bi.normalize(),Pr.crossVectors(Gn,Bi),i[0]=Bi.x,i[4]=Pr.x,i[8]=Gn.x,i[1]=Bi.y,i[5]=Pr.y,i[9]=Gn.y,i[2]=Bi.z,i[6]=Pr.z,i[10]=Gn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],d=n[1],m=n[5],u=n[9],h=n[13],g=n[2],_=n[6],p=n[10],f=n[14],v=n[3],b=n[7],S=n[11],F=n[15],C=i[0],R=i[4],P=i[8],A=i[12],E=i[1],L=i[5],B=i[9],H=i[13],Q=i[2],ae=i[6],G=i[10],le=i[14],Z=i[3],ve=i[7],Ee=i[11],be=i[15];return r[0]=o*C+a*E+l*Q+c*Z,r[4]=o*R+a*L+l*ae+c*ve,r[8]=o*P+a*B+l*G+c*Ee,r[12]=o*A+a*H+l*le+c*be,r[1]=d*C+m*E+u*Q+h*Z,r[5]=d*R+m*L+u*ae+h*ve,r[9]=d*P+m*B+u*G+h*Ee,r[13]=d*A+m*H+u*le+h*be,r[2]=g*C+_*E+p*Q+f*Z,r[6]=g*R+_*L+p*ae+f*ve,r[10]=g*P+_*B+p*G+f*Ee,r[14]=g*A+_*H+p*le+f*be,r[3]=v*C+b*E+S*Q+F*Z,r[7]=v*R+b*L+S*ae+F*ve,r[11]=v*P+b*B+S*G+F*Ee,r[15]=v*A+b*H+S*le+F*be,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],n=e[4],i=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],d=e[2],m=e[6],u=e[10],h=e[14],g=e[3],_=e[7],p=e[11],f=e[15];return g*(+r*l*m-i*c*m-r*a*u+n*c*u+i*a*h-n*l*h)+_*(+t*l*h-t*c*u+r*o*u-i*o*h+i*c*d-r*l*d)+p*(+t*c*m-t*a*h-r*o*m+n*o*h+r*a*d-n*c*d)+f*(-i*a*d-t*l*m+t*a*u+i*o*m-n*o*u+n*l*d)}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,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],d=e[8],m=e[9],u=e[10],h=e[11],g=e[12],_=e[13],p=e[14],f=e[15],v=m*p*c-_*u*c+_*l*h-a*p*h-m*l*f+a*u*f,b=g*u*c-d*p*c-g*l*h+o*p*h+d*l*f-o*u*f,S=d*_*c-g*m*c+g*a*h-o*_*h-d*a*f+o*m*f,F=g*m*l-d*_*l-g*a*u+o*_*u+d*a*p-o*m*p,C=t*v+n*b+i*S+r*F;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const R=1/C;return e[0]=v*R,e[1]=(_*u*r-m*p*r-_*i*h+n*p*h+m*i*f-n*u*f)*R,e[2]=(a*p*r-_*l*r+_*i*c-n*p*c-a*i*f+n*l*f)*R,e[3]=(m*l*r-a*u*r-m*i*c+n*u*c+a*i*h-n*l*h)*R,e[4]=b*R,e[5]=(d*p*r-g*u*r+g*i*h-t*p*h-d*i*f+t*u*f)*R,e[6]=(g*l*r-o*p*r-g*i*c+t*p*c+o*i*f-t*l*f)*R,e[7]=(o*u*r-d*l*r+d*i*c-t*u*c-o*i*h+t*l*h)*R,e[8]=S*R,e[9]=(g*m*r-d*_*r-g*n*h+t*_*h+d*n*f-t*m*f)*R,e[10]=(o*_*r-g*a*r+g*n*c-t*_*c-o*n*f+t*a*f)*R,e[11]=(d*a*r-o*m*r-d*n*c+t*m*c+o*n*h-t*a*h)*R,e[12]=F*R,e[13]=(d*_*i-g*m*i+g*n*u-t*_*u-d*n*p+t*m*p)*R,e[14]=(g*a*i-o*_*i-g*n*l+t*_*l+o*n*p-t*a*p)*R,e[15]=(o*m*i-d*a*i+d*n*l-t*m*l-o*n*u+t*a*u)*R,this}scale(e){const t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),r=1-n,o=e.x,a=e.y,l=e.z,c=r*o,d=r*a;return this.set(c*o+n,c*a-i*l,c*l+i*a,0,c*a+i*l,d*a+n,d*l-i*o,0,c*l-i*a,d*l+i*o,r*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,o){return this.set(1,n,r,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,d=o+o,m=a+a,u=r*c,h=r*d,g=r*m,_=o*d,p=o*m,f=a*m,v=l*c,b=l*d,S=l*m,F=n.x,C=n.y,R=n.z;return i[0]=(1-(_+f))*F,i[1]=(h+S)*F,i[2]=(g-b)*F,i[3]=0,i[4]=(h-S)*C,i[5]=(1-(u+f))*C,i[6]=(p+v)*C,i[7]=0,i[8]=(g+b)*R,i[9]=(p-v)*R,i[10]=(1-(u+_))*R,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let r=xs.set(i[0],i[1],i[2]).length();const o=xs.set(i[4],i[5],i[6]).length(),a=xs.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],ni.copy(this);const c=1/r,d=1/o,m=1/a;return ni.elements[0]*=c,ni.elements[1]*=c,ni.elements[2]*=c,ni.elements[4]*=d,ni.elements[5]*=d,ni.elements[6]*=d,ni.elements[8]*=m,ni.elements[9]*=m,ni.elements[10]*=m,t.setFromRotationMatrix(ni),n.x=r,n.y=o,n.z=a,this}makePerspective(e,t,n,i,r,o,a=wi){const l=this.elements,c=2*r/(t-e),d=2*r/(n-i),m=(t+e)/(t-e),u=(n+i)/(n-i);let h,g;if(a===wi)h=-(o+r)/(o-r),g=-2*o*r/(o-r);else if(a===wa)h=-o/(o-r),g=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=m,l[12]=0,l[1]=0,l[5]=d,l[9]=u,l[13]=0,l[2]=0,l[6]=0,l[10]=h,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,i,r,o,a=wi){const l=this.elements,c=1/(t-e),d=1/(n-i),m=1/(o-r),u=(t+e)*c,h=(n+i)*d;let g,_;if(a===wi)g=(o+r)*m,_=-2*m;else if(a===wa)g=r*m,_=-1*m;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-u,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-h,l[2]=0,l[6]=0,l[10]=_,l[14]=-g,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const xs=new I,ni=new Et,G2=new I(0,0,0),W2=new I(1,1,1),Bi=new I,Pr=new I,Gn=new I,Fc=new Et,Nc=new Vn;class Sn{constructor(e=0,t=0,n=0,i=Sn.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],l=i[1],c=i[5],d=i[9],m=i[2],u=i[6],h=i[10];switch(t){case"XYZ":this._y=Math.asin(Vt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,h),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(u,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Vt(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-m,r),this._z=0);break;case"ZXY":this._x=Math.asin(Vt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-m,h),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-Vt(m,-1,1)),Math.abs(m)<.9999999?(this._x=Math.atan2(u,h),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Vt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-m,r)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-Vt(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(u,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-d,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Fc.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Fc,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Nc.setFromEuler(this),this.setFromQuaternion(Nc,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Sn.DEFAULT_ORDER="XYZ";class Zl{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let X2=0;const Uc=new I,Ms=new Vn,yi=new Et,Fr=new I,nr=new I,j2=new I,q2=new Vn,Ic=new I(1,0,0),zc=new I(0,1,0),Bc=new I(0,0,1),Oc={type:"added"},$2={type:"removed"},bs={type:"childadded",child:null},no={type:"childremoved",child:null};class ln extends ds{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:X2++}),this.uuid=ai(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ln.DEFAULT_UP.clone();const e=new I,t=new Sn,n=new Vn,i=new I(1,1,1);function r(){n.setFromEuler(t,!1)}function o(){t.setFromQuaternion(n,void 0,!1)}t._onChange(r),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Et},normalMatrix:{value:new kt}}),this.matrix=new Et,this.matrixWorld=new Et,this.matrixAutoUpdate=ln.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=ln.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Zl,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Ms.setFromAxisAngle(e,t),this.quaternion.multiply(Ms),this}rotateOnWorldAxis(e,t){return Ms.setFromAxisAngle(e,t),this.quaternion.premultiply(Ms),this}rotateX(e){return this.rotateOnAxis(Ic,e)}rotateY(e){return this.rotateOnAxis(zc,e)}rotateZ(e){return this.rotateOnAxis(Bc,e)}translateOnAxis(e,t){return Uc.copy(e).applyQuaternion(this.quaternion),this.position.add(Uc.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Ic,e)}translateY(e){return this.translateOnAxis(zc,e)}translateZ(e){return this.translateOnAxis(Bc,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(yi.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Fr.copy(e):Fr.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),nr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?yi.lookAt(nr,Fr,this.up):yi.lookAt(Fr,nr,this.up),this.quaternion.setFromRotationMatrix(yi),i&&(yi.extractRotation(i.matrixWorld),Ms.setFromRotationMatrix(yi),this.quaternion.premultiply(Ms.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(Oc),bs.child=e,this.dispatchEvent(bs),bs.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent($2),no.child=e,this.dispatchEvent(no),no.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),yi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),yi.multiply(e.parent.matrixWorld)),e.applyMatrix4(yi),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(Oc),bs.child=e,this.dispatchEvent(bs),bs.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,e,j2),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nr,q2,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(a=>({...a})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c<d;c++){const m=l[c];r(e.shapes,m)}else r(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(r(e.materials,this.material[l]));i.material=a}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];i.animations.push(r(e.animations,l))}}if(t){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),d=o(e.images),m=o(e.shapes),u=o(e.skeletons),h=o(e.animations),g=o(e.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),m.length>0&&(n.shapes=m),u.length>0&&(n.skeletons=u),h.length>0&&(n.animations=h),g.length>0&&(n.nodes=g)}return n.object=i,n;function o(a){const l=[];for(const c in a){const d=a[c];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const i=e.children[n];this.add(i.clone())}return this}}ln.DEFAULT_UP=new I(0,1,0);ln.DEFAULT_MATRIX_AUTO_UPDATE=!0;ln.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const ii=new I,xi=new I,io=new I,Mi=new I,Ss=new I,Es=new I,kc=new I,so=new I,ro=new I,ao=new I,oo=new Xt,lo=new Xt,co=new Xt;class Kn{constructor(e=new I,t=new I,n=new I){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),ii.subVectors(e,t),i.cross(ii);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){ii.subVectors(i,t),xi.subVectors(n,t),io.subVectors(e,t);const o=ii.dot(ii),a=ii.dot(xi),l=ii.dot(io),c=xi.dot(xi),d=xi.dot(io),m=o*c-a*a;if(m===0)return r.set(0,0,0),null;const u=1/m,h=(c*l-a*d)*u,g=(o*d-a*l)*u;return r.set(1-h-g,g,h)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Mi)===null?!1:Mi.x>=0&&Mi.y>=0&&Mi.x+Mi.y<=1}static getInterpolation(e,t,n,i,r,o,a,l){return this.getBarycoord(e,t,n,i,Mi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,Mi.x),l.addScaledVector(o,Mi.y),l.addScaledVector(a,Mi.z),l)}static getInterpolatedAttribute(e,t,n,i,r,o){return oo.setScalar(0),lo.setScalar(0),co.setScalar(0),oo.fromBufferAttribute(e,t),lo.fromBufferAttribute(e,n),co.fromBufferAttribute(e,i),o.setScalar(0),o.addScaledVector(oo,r.x),o.addScaledVector(lo,r.y),o.addScaledVector(co,r.z),o}static isFrontFacing(e,t,n,i){return ii.subVectors(n,t),xi.subVectors(e,t),ii.cross(xi).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),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 ii.subVectors(this.c,this.b),xi.subVectors(this.a,this.b),ii.cross(xi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Kn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Kn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return Kn.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return Kn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Kn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,r=this.c;let o,a;Ss.subVectors(i,n),Es.subVectors(r,n),so.subVectors(e,n);const l=Ss.dot(so),c=Es.dot(so);if(l<=0&&c<=0)return t.copy(n);ro.subVectors(e,i);const d=Ss.dot(ro),m=Es.dot(ro);if(d>=0&&m<=d)return t.copy(i);const u=l*m-d*c;if(u<=0&&l>=0&&d<=0)return o=l/(l-d),t.copy(n).addScaledVector(Ss,o);ao.subVectors(e,r);const h=Ss.dot(ao),g=Es.dot(ao);if(g>=0&&h<=g)return t.copy(r);const _=h*c-l*g;if(_<=0&&c>=0&&g<=0)return a=c/(c-g),t.copy(n).addScaledVector(Es,a);const p=d*g-h*m;if(p<=0&&m-d>=0&&h-g>=0)return kc.subVectors(r,i),a=(m-d)/(m-d+(h-g)),t.copy(i).addScaledVector(kc,a);const f=1/(p+_+u);return o=_*f,a=u*f,t.copy(n).addScaledVector(Ss,o).addScaledVector(Es,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const L0={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},Oi={h:0,s:0,l:0},Nr={h:0,s:0,l:0};function ho(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}class Tt{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=qt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Gt.workingColorSpace){if(e=Jl(e,1),t=Vt(t,0,1),n=Vt(n,0,1),t===0)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,o=2*n-r;this.r=ho(o,r,e+1/3),this.g=ho(o,r,e),this.b=ho(o,r,e-1/3)}return Gt.colorSpaceToWorking(this,i),this}setStyle(e,t=qt){function n(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=qt){const n=L0[e.toLowerCase()];return n!==void 0?this.setHex(n,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=Ci(e.r),this.g=Ci(e.g),this.b=Ci(e.b),this}copyLinearToSRGB(e){return this.r=ks(e.r),this.g=ks(e.g),this.b=ks(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=qt){return Gt.workingToColorSpace(Dn.copy(this),e),Math.round(Vt(Dn.r*255,0,255))*65536+Math.round(Vt(Dn.g*255,0,255))*256+Math.round(Vt(Dn.b*255,0,255))}getHexString(e=qt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Dn.copy(this),t);const n=Dn.r,i=Dn.g,r=Dn.b,o=Math.max(n,i,r),a=Math.min(n,i,r);let l,c;const d=(a+o)/2;if(a===o)l=0,c=0;else{const m=o-a;switch(c=d<=.5?m/(o+a):m/(2-o-a),o){case n:l=(i-r)/m+(i<r?6:0);break;case i:l=(r-n)/m+2;break;case r:l=(n-i)/m+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Gt.workingColorSpace){return Gt.workingToColorSpace(Dn.copy(this),t),e.r=Dn.r,e.g=Dn.g,e.b=Dn.b,e}getStyle(e=qt){Gt.workingToColorSpace(Dn.copy(this),e);const t=Dn.r,n=Dn.g,i=Dn.b;return e!==qt?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(Oi),this.setHSL(Oi.h+e,Oi.s+t,Oi.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Oi),e.getHSL(Nr);const n=fr(Oi.h,Nr.h,t),i=fr(Oi.s,Nr.s,t),r=fr(Oi.l,Nr.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Dn=new Tt;Tt.NAMES=L0;let Y2=0;class qn extends ds{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Y2++}),this.uuid=ai(),this.name="",this.type="Material",this.blending=Bs,this.side=Qn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Go,this.blendDst=Wo,this.blendEquation=rs,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Tt(0,0,0),this.blendAlpha=0,this.depthFunc=Hs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=wc,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=ms,this.stencilZFail=ms,this.stencilZPass=ms,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Bs&&(n.blending=this.blending),this.side!==Qn&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Go&&(n.blendSrc=this.blendSrc),this.blendDst!==Wo&&(n.blendDst=this.blendDst),this.blendEquation!==rs&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Hs&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==wc&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ms&&(n.stencilFail=this.stencilFail),this.stencilZFail!==ms&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==ms&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=i(e.textures),o=i(e.images);r.length>0&&(n.textures=r),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const i=t.length;n=new Array(i);for(let r=0;r!==i;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class qi extends qn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const gn=new I,Ur=new et;let J2=0;class mn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:J2++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Cl,this.updateRanges=[],this.gpuType=fi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Ur.fromBufferAttribute(this,t),Ur.applyMatrix3(e),this.setXY(t,Ur.x,Ur.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyMatrix3(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyMatrix4(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.applyNormalMatrix(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)gn.fromBufferAttribute(this,t),gn.transformDirection(e),this.setXYZ(t,gn.x,gn.y,gn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=si(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=tn(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=si(t,this.array)),t}setX(e,t){return this.normalized&&(t=tn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=si(t,this.array)),t}setY(e,t){return this.normalized&&(t=tn(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=si(t,this.array)),t}setZ(e,t){return this.normalized&&(t=tn(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=si(t,this.array)),t}setW(e,t){return this.normalized&&(t=tn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array),r=tn(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Cl&&(e.usage=this.usage),e}}class P0 extends mn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class K2 extends mn{constructor(e,t,n){super(new Int32Array(e),t,n)}}class F0 extends mn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class It extends mn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Z2=0;const $n=new Et,uo=new ln,As=new I,Wn=new Fn,ir=new Fn,Mn=new I;class hn extends ds{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Z2++}),this.uuid=ai(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=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 Array.isArray(e)?this.index=new(R0(e)?F0:P0)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}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 this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const r=new kt().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return $n.makeRotationFromQuaternion(e),this.applyMatrix4($n),this}rotateX(e){return $n.makeRotationX(e),this.applyMatrix4($n),this}rotateY(e){return $n.makeRotationY(e),this.applyMatrix4($n),this}rotateZ(e){return $n.makeRotationZ(e),this.applyMatrix4($n),this}translate(e,t,n){return $n.makeTranslation(e,t,n),this.applyMatrix4($n),this}scale(e,t,n){return $n.makeScale(e,t,n),this.applyMatrix4($n),this}lookAt(e){return uo.lookAt(e),uo.updateMatrix(),this.applyMatrix4(uo.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(As).negate(),this.translate(As.x,As.y,As.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let i=0,r=e.length;i<r;i++){const o=e[i];n.push(o.x,o.y,o.z||0)}this.setAttribute("position",new It(n,3))}else{const n=Math.min(e.length,t.count);for(let i=0;i<n;i++){const r=e[i];t.setXYZ(i,r.x,r.y,r.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Fn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new I(-1/0,-1/0,-1/0),new I(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){const r=t[n];Wn.setFromBufferAttribute(r),this.morphTargetsRelative?(Mn.addVectors(this.boundingBox.min,Wn.min),this.boundingBox.expandByPoint(Mn),Mn.addVectors(this.boundingBox.max,Wn.max),this.boundingBox.expandByPoint(Mn)):(this.boundingBox.expandByPoint(Wn.min),this.boundingBox.expandByPoint(Wn.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(){this.boundingSphere===null&&(this.boundingSphere=new Fi);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new I,1/0);return}if(e){const n=this.boundingSphere.center;if(Wn.setFromBufferAttribute(e),t)for(let r=0,o=t.length;r<o;r++){const a=t[r];ir.setFromBufferAttribute(a),this.morphTargetsRelative?(Mn.addVectors(Wn.min,ir.min),Wn.expandByPoint(Mn),Mn.addVectors(Wn.max,ir.max),Wn.expandByPoint(Mn)):(Wn.expandByPoint(ir.min),Wn.expandByPoint(ir.max))}Wn.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)Mn.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(Mn));if(t)for(let r=0,o=t.length;r<o;r++){const a=t[r],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)Mn.fromBufferAttribute(a,c),l&&(As.fromBufferAttribute(e,c),Mn.add(As)),i=Math.max(i,n.distanceToSquared(Mn))}this.boundingSphere.radius=Math.sqrt(i),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(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,i=t.normal,r=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new mn(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new I,l[P]=new I;const c=new I,d=new I,m=new I,u=new et,h=new et,g=new et,_=new I,p=new I;function f(P,A,E){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,A),m.fromBufferAttribute(n,E),u.fromBufferAttribute(r,P),h.fromBufferAttribute(r,A),g.fromBufferAttribute(r,E),d.sub(c),m.sub(c),h.sub(u),g.sub(u);const L=1/(h.x*g.y-g.x*h.y);isFinite(L)&&(_.copy(d).multiplyScalar(g.y).addScaledVector(m,-h.y).multiplyScalar(L),p.copy(m).multiplyScalar(h.x).addScaledVector(d,-g.x).multiplyScalar(L),a[P].add(_),a[A].add(_),a[E].add(_),l[P].add(p),l[A].add(p),l[E].add(p))}let v=this.groups;v.length===0&&(v=[{start:0,count:e.count}]);for(let P=0,A=v.length;P<A;++P){const E=v[P],L=E.start,B=E.count;for(let H=L,Q=L+B;H<Q;H+=3)f(e.getX(H+0),e.getX(H+1),e.getX(H+2))}const b=new I,S=new I,F=new I,C=new I;function R(P){F.fromBufferAttribute(i,P),C.copy(F);const A=a[P];b.copy(A),b.sub(F.multiplyScalar(F.dot(A))).normalize(),S.crossVectors(C,A);const L=S.dot(l[P])<0?-1:1;o.setXYZW(P,b.x,b.y,b.z,L)}for(let P=0,A=v.length;P<A;++P){const E=v[P],L=E.start,B=E.count;for(let H=L,Q=L+B;H<Q;H+=3)R(e.getX(H+0)),R(e.getX(H+1)),R(e.getX(H+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new mn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let u=0,h=n.count;u<h;u++)n.setXYZ(u,0,0,0);const i=new I,r=new I,o=new I,a=new I,l=new I,c=new I,d=new I,m=new I;if(e)for(let u=0,h=e.count;u<h;u+=3){const g=e.getX(u+0),_=e.getX(u+1),p=e.getX(u+2);i.fromBufferAttribute(t,g),r.fromBufferAttribute(t,_),o.fromBufferAttribute(t,p),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),a.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),c.fromBufferAttribute(n,p),a.add(d),l.add(d),c.add(d),n.setXYZ(g,a.x,a.y,a.z),n.setXYZ(_,l.x,l.y,l.z),n.setXYZ(p,c.x,c.y,c.z)}else for(let u=0,h=t.count;u<h;u+=3)i.fromBufferAttribute(t,u+0),r.fromBufferAttribute(t,u+1),o.fromBufferAttribute(t,u+2),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),n.setXYZ(u+0,d.x,d.y,d.z),n.setXYZ(u+1,d.x,d.y,d.z),n.setXYZ(u+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Mn.fromBufferAttribute(e,t),Mn.normalize(),e.setXYZ(t,Mn.x,Mn.y,Mn.z)}toNonIndexed(){function e(a,l){const c=a.array,d=a.itemSize,m=a.normalized,u=new c.constructor(l.length*d);let h=0,g=0;for(let _=0,p=l.length;_<p;_++){a.isInterleavedBufferAttribute?h=l[_]*a.data.stride+a.offset:h=l[_]*d;for(let f=0;f<d;f++)u[g++]=c[h++]}return new mn(u,d,m)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new hn,n=this.index.array,i=this.attributes;for(const a in i){const l=i[a],c=e(l,n);t.setAttribute(a,c)}const r=this.morphAttributes;for(const a in r){const l=[],c=r[a];for(let d=0,m=c.length;d<m;d++){const u=c[d],h=e(u,n);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],d=[];for(let m=0,u=c.length;m<u;m++){const h=c[m];d.push(h.toJSON(e.data))}d.length>0&&(i[l]=d,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),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 n=e.index;n!==null&&this.setIndex(n.clone());const i=e.attributes;for(const c in i){const d=i[c];this.setAttribute(c,d.clone(t))}const r=e.morphAttributes;for(const c in r){const d=[],m=r[c];for(let u=0,h=m.length;u<h;u++)d.push(m[u].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,d=o.length;c<d;c++){const m=o[c];this.addGroup(m.start,m.count,m.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Vc=new Et,Zi=new Ys,Ir=new Fi,Hc=new I,zr=new I,Br=new I,Or=new I,fo=new I,kr=new I,Gc=new I,Vr=new I;class zt extends ln{constructor(e=new hn,t=new qi){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const a=this.morphTargetInfluences;if(r&&a){kr.set(0,0,0);for(let l=0,c=r.length;l<c;l++){const d=a[l],m=r[l];d!==0&&(fo.fromBufferAttribute(m,e),o?kr.addScaledVector(fo,d):kr.addScaledVector(fo.sub(t),d))}t.add(kr)}return t}raycast(e,t){const n=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Ir.copy(n.boundingSphere),Ir.applyMatrix4(r),Zi.copy(e.ray).recast(e.near),!(Ir.containsPoint(Zi.origin)===!1&&(Zi.intersectSphere(Ir,Hc)===null||Zi.origin.distanceToSquared(Hc)>(e.far-e.near)**2))&&(Vc.copy(r).invert(),Zi.copy(e.ray).applyMatrix4(Vc),!(n.boundingBox!==null&&Zi.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Zi)))}_computeIntersections(e,t,n){let i;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,d=r.attributes.uv1,m=r.attributes.normal,u=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const p=u[g],f=o[p.materialIndex],v=Math.max(p.start,h.start),b=Math.min(a.count,Math.min(p.start+p.count,h.start+h.count));for(let S=v,F=b;S<F;S+=3){const C=a.getX(S),R=a.getX(S+1),P=a.getX(S+2);i=Hr(this,f,e,n,c,d,m,C,R,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=p.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(a.count,h.start+h.count);for(let p=g,f=_;p<f;p+=3){const v=a.getX(p),b=a.getX(p+1),S=a.getX(p+2);i=Hr(this,o,e,n,c,d,m,v,b,S),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const p=u[g],f=o[p.materialIndex],v=Math.max(p.start,h.start),b=Math.min(l.count,Math.min(p.start+p.count,h.start+h.count));for(let S=v,F=b;S<F;S+=3){const C=S,R=S+1,P=S+2;i=Hr(this,f,e,n,c,d,m,C,R,P),i&&(i.faceIndex=Math.floor(S/3),i.face.materialIndex=p.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(l.count,h.start+h.count);for(let p=g,f=_;p<f;p+=3){const v=p,b=p+1,S=p+2;i=Hr(this,o,e,n,c,d,m,v,b,S),i&&(i.faceIndex=Math.floor(p/3),t.push(i))}}}}function Q2(s,e,t,n,i,r,o,a){let l;if(e.side===In?l=n.intersectTriangle(o,r,i,!0,a):l=n.intersectTriangle(i,r,o,e.side===Qn,a),l===null)return null;Vr.copy(a),Vr.applyMatrix4(s.matrixWorld);const c=t.ray.origin.distanceTo(Vr);return c<t.near||c>t.far?null:{distance:c,point:Vr.clone(),object:s}}function Hr(s,e,t,n,i,r,o,a,l,c){s.getVertexPosition(a,zr),s.getVertexPosition(l,Br),s.getVertexPosition(c,Or);const d=Q2(s,e,t,n,zr,Br,Or,Gc);if(d){const m=new I;Kn.getBarycoord(Gc,zr,Br,Or,m),i&&(d.uv=Kn.getInterpolatedAttribute(i,a,l,c,m,new et)),r&&(d.uv1=Kn.getInterpolatedAttribute(r,a,l,c,m,new et)),o&&(d.normal=Kn.getInterpolatedAttribute(o,a,l,c,m,new I),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const u={a,b:l,c,normal:new I,materialIndex:0};Kn.getNormal(zr,Br,Or,u.normal),d.face=u,d.barycoord=m}return d}class $i extends hn{constructor(e=1,t=1,n=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],d=[],m=[];let u=0,h=0;g("z","y","x",-1,-1,n,t,e,o,r,0),g("z","y","x",1,-1,n,t,-e,o,r,1),g("x","z","y",1,1,e,n,t,i,o,2),g("x","z","y",1,-1,e,n,-t,i,o,3),g("x","y","z",1,-1,e,t,n,i,r,4),g("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(l),this.setAttribute("position",new It(c,3)),this.setAttribute("normal",new It(d,3)),this.setAttribute("uv",new It(m,2));function g(_,p,f,v,b,S,F,C,R,P,A){const E=S/R,L=F/P,B=S/2,H=F/2,Q=C/2,ae=R+1,G=P+1;let le=0,Z=0;const ve=new I;for(let Ee=0;Ee<G;Ee++){const be=Ee*L-H;for(let ge=0;ge<ae;ge++){const se=ge*E-B;ve[_]=se*v,ve[p]=be*b,ve[f]=Q,c.push(ve.x,ve.y,ve.z),ve[_]=0,ve[p]=0,ve[f]=C>0?1:-1,d.push(ve.x,ve.y,ve.z),m.push(ge/R),m.push(1-Ee/P),le+=1}}for(let Ee=0;Ee<P;Ee++)for(let be=0;be<R;be++){const ge=u+be+ae*Ee,se=u+be+ae*(Ee+1),j=u+(be+1)+ae*(Ee+1),q=u+(be+1)+ae*Ee;l.push(ge,se,q),l.push(se,j,q),Z+=6}a.addGroup(h,Z,A),h+=Z,u+=le}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new $i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function qs(s){const e={};for(const t in s){e[t]={};for(const n in s[t]){const i=s[t][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=i.clone():Array.isArray(i)?e[t][n]=i.slice():e[t][n]=i}}return e}function Un(s){const e={};for(let t=0;t<s.length;t++){const n=qs(s[t]);for(const i in n)e[i]=n[i]}return e}function e1(s){const e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function N0(s){const e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}const Ql={clone:qs,merge:Un};var t1=`void main() {
|
|
6
6
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
7
7
|
}`,n1=`void main() {
|
|
8
8
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
9
|
-
}`;class Li extends qn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=t1,this.fragmentShader=n1,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=qs(e.uniforms),this.uniformsGroups=e1(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 i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?t.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[i]={type:"m4",value:o.toArray()}:t.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class
|
|
9
|
+
}`;class Li extends qn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=t1,this.fragmentShader=n1,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=qs(e.uniforms),this.uniformsGroups=e1(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 i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?t.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[i]={type:"m4",value:o.toArray()}:t.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class U0 extends ln{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Et,this.projectionMatrix=new Et,this.projectionMatrixInverse=new Et,this.coordinateSystem=wi}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const ki=new I,Wc=new et,Xc=new et;class bn extends U0{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=js*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(dr*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return js*2*Math.atan(Math.tan(dr*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){ki.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ki.x,ki.y).multiplyScalar(-e/ki.z),ki.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ki.x,ki.y).multiplyScalar(-e/ki.z)}getViewSize(e,t){return this.getViewBounds(e,Wc,Xc),t.subVectors(Xc,Wc)}setViewOffset(e,t,n,i,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(dr*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;r+=o.offsetX*i/l,t-=o.offsetY*n/c,i*=o.width/l,n*=o.height/c}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const ws=-90,Ts=1;class i1 extends ln{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new bn(ws,Ts,e,t);i.layers=this.layers,this.add(i);const r=new bn(ws,Ts,e,t);r.layers=this.layers,this.add(r);const o=new bn(ws,Ts,e,t);o.layers=this.layers,this.add(o);const a=new bn(ws,Ts,e,t);a.layers=this.layers,this.add(a);const l=new bn(ws,Ts,e,t);l.layers=this.layers,this.add(l);const c=new bn(ws,Ts,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,i,r,o,a,l]=t;for(const c of t)this.remove(c);if(e===wi)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===wa)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,c,d]=this.children,m=e.getRenderTarget(),u=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;const _=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,r),e.setRenderTarget(n,1,i),e.render(t,o),e.setRenderTarget(n,2,i),e.render(t,a),e.setRenderTarget(n,3,i),e.render(t,l),e.setRenderTarget(n,4,i),e.render(t,c),n.texture.generateMipmaps=_,e.setRenderTarget(n,5,i),e.render(t,d),e.setRenderTarget(m,u,h),e.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class I0 extends Tn{constructor(e=[],t=Gs,n,i,r,o,a,l,c,d){super(e,t,n,i,r,o,a,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class s1 extends us{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new I0(i),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:`
|
|
10
10
|
|
|
11
11
|
varying vec3 vWorldDirection;
|
|
12
12
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
42
42
|
|
|
43
43
|
}
|
|
44
|
-
`},i=new $i(5,5,5),r=new Li({name:"CubemapFromEquirect",uniforms:qs(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:In,blending:Wi});r.uniforms.tEquirect.value=t;const o=new zt(i,r),a=t.minFilter;return t.minFilter===Ai&&(t.minFilter=Xn),new i1(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,i);e.setRenderTarget(r)}}class Ln extends ln{constructor(){super(),this.isGroup=!0,this.type="Group"}}const r1={type:"move"};class po{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ln,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Ln,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new I,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new I),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ln,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new I,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new I),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const p=t.getJointPose(_,n),f=this._getHandJoint(c,_);p!==null&&(f.matrix.fromArray(p.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,f.jointRadius=p.radius),f.visible=p!==null}const d=c.joints["index-finger-tip"],m=c.joints["thumb-tip"],u=d.position.distanceTo(m.position),h=.02,g=.005;c.inputState.pinching&&u>h+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&u<=h-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(r1)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Ln;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ia extends ln{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Sn,this.environmentIntensity=1,this.environmentRotation=new Sn,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class z0{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Cl,this.updateRanges=[],this.version=0,this.uuid=ai()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ai()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ai()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Un=new I;class pi{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}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,n=this.data.count;t<n;t++)Un.fromBufferAttribute(this,t),Un.applyMatrix4(e),this.setXYZ(t,Un.x,Un.y,Un.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Un.fromBufferAttribute(this,t),Un.applyNormalMatrix(e),this.setXYZ(t,Un.x,Un.y,Un.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Un.fromBufferAttribute(this,t),Un.transformDirection(e),this.setXYZ(t,Un.x,Un.y,Un.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=si(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=tn(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=tn(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=si(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=si(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=si(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=si(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array),r=tn(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return new mn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new pi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class za extends qn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Tt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let Cs;const sr=new I,Rs=new I,Ds=new I,Ls=new et,rr=new et,B0=new Et,Gr=new I,ar=new I,Wr=new I,jc=new et,mo=new et,qc=new et;class ec extends ln{constructor(e=new za){if(super(),this.isSprite=!0,this.type="Sprite",Cs===void 0){Cs=new hn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new z0(t,5);Cs.setIndex([0,1,2,0,2,3]),Cs.setAttribute("position",new pi(n,3,0,!1)),Cs.setAttribute("uv",new pi(n,2,3,!1))}this.geometry=Cs,this.material=e,this.center=new et(.5,.5),this.count=1}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Rs.setFromMatrixScale(this.matrixWorld),B0.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ds.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Rs.multiplyScalar(-Ds.z);const n=this.material.rotation;let i,r;n!==0&&(r=Math.cos(n),i=Math.sin(n));const o=this.center;Xr(Gr.set(-.5,-.5,0),Ds,o,Rs,i,r),Xr(ar.set(.5,-.5,0),Ds,o,Rs,i,r),Xr(Wr.set(.5,.5,0),Ds,o,Rs,i,r),jc.set(0,0),mo.set(1,0),qc.set(1,1);let a=e.ray.intersectTriangle(Gr,ar,Wr,!1,sr);if(a===null&&(Xr(ar.set(-.5,.5,0),Ds,o,Rs,i,r),mo.set(0,1),a=e.ray.intersectTriangle(Gr,Wr,ar,!1,sr),a===null))return;const l=e.ray.origin.distanceTo(sr);l<e.near||l>e.far||t.push({distance:l,point:sr.clone(),uv:Kn.getInterpolation(sr,Gr,ar,Wr,jc,mo,qc,new et),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Xr(s,e,t,n,i,r){Ls.subVectors(s,t).addScalar(.5).multiply(n),i!==void 0?(rr.x=r*Ls.x-i*Ls.y,rr.y=i*Ls.x+r*Ls.y):rr.copy(Ls),s.copy(e),s.x+=rr.x,s.y+=rr.y,s.applyMatrix4(B0)}const jr=new I,$c=new I;class O0 extends ln{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n<i;n++){const r=t[n];this.addLevel(r.object.clone(),r.distance,r.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const i=this.levels;let r;for(r=0;r<i.length&&!(t<i[r].distance);r++);return i.splice(r,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const i=t.splice(n,1);return this.remove(i[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n<i;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){jr.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(jr);this.getObjectForDistance(i).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){jr.setFromMatrixPosition(e.matrixWorld),$c.setFromMatrixPosition(this.matrixWorld);const n=jr.distanceTo($c)/e.zoom;t[0].object.visible=!0;let i,r;for(i=1,r=t.length;i<r;i++){let o=t[i].distance;if(t[i].object.visible&&(o-=o*t[i].hysteresis),n>=o)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;i<r;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let i=0,r=n.length;i<r;i++){const o=n[i];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}}const Yc=new I,Jc=new Xt,Kc=new Xt,a1=new I,Zc=new Et,qr=new I,go=new Fi,Qc=new Et,_o=new Ys;class o1 extends zt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=bc,this.bindMatrix=new Et,this.bindMatrixInverse=new Et,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Fn),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qr),this.boundingBox.expandByPoint(qr)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Fi),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qr),this.boundingSphere.expandByPoint(qr)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),go.copy(this.boundingSphere),go.applyMatrix4(i),e.ray.intersectsSphere(go)!==!1&&(Qc.copy(i).invert(),_o.copy(e.ray).applyMatrix4(Qc),!(this.boundingBox!==null&&_o.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,_o)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Xt,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===bc?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===i2?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;Jc.fromBufferAttribute(i.attributes.skinIndex,e),Kc.fromBufferAttribute(i.attributes.skinWeight,e),Yc.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let r=0;r<4;r++){const o=Kc.getComponent(r);if(o!==0){const a=Jc.getComponent(r);Zc.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(a1.copy(Yc).applyMatrix4(Zc),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class k0 extends ln{constructor(){super(),this.isBone=!0,this.type="Bone"}}class V0 extends Tn{constructor(e=null,t=1,n=1,i,r,o,a,l,c=jn,d=jn,m,u){super(null,o,a,l,c,d,i,r,m,u),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const eh=new Et,l1=new Et;class tc{constructor(e=[],t=[]){this.uuid=ai(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)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 n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Et)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new Et;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let r=0,o=e.length;r<o;r++){const a=e[r]?e[r].matrixWorld:l1;eh.multiplyMatrices(a,t[r]),eh.toArray(n,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new tc(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new V0(t,e,e,Zn,fi);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const r=e.bones[n];let o=t[r];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),o=new k0),this.bones.push(o),this.boneInverses.push(new Et().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){const o=t[i];e.bones.push(o.uuid);const a=n[i];e.boneInverses.push(a.toArray())}return e}}const vo=new I,c1=new I,h1=new kt;class Jn{constructor(e=new I(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=vo.subVectors(n,t).cross(c1.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(vo),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(e.start).addScaledVector(n,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||h1.getNormalMatrix(e),i=this.coplanarPoint(vo).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Qi=new Fi,$r=new I;class nc{constructor(e=new Jn,t=new Jn,n=new Jn,i=new Jn,r=new Jn,o=new Jn){this.planes=[e,t,n,i,r,o]}set(e,t,n,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=wi){const n=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],l=i[3],c=i[4],d=i[5],m=i[6],u=i[7],h=i[8],g=i[9],_=i[10],p=i[11],f=i[12],x=i[13],y=i[14],S=i[15];if(n[0].setComponents(l-r,u-c,p-h,S-f).normalize(),n[1].setComponents(l+r,u+c,p+h,S+f).normalize(),n[2].setComponents(l+o,u+d,p+g,S+x).normalize(),n[3].setComponents(l-o,u-d,p-g,S-x).normalize(),n[4].setComponents(l-a,u-m,p-_,S-y).normalize(),t===wi)n[5].setComponents(l+a,u+m,p+_,S+y).normalize();else if(t===wa)n[5].setComponents(a,m,_,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Qi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Qi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Qi)}intersectsSprite(e){return Qi.center.set(0,0,0),Qi.radius=.7071067811865476,Qi.applyMatrix4(e.matrixWorld),this.intersectsSphere(Qi)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if($r.x=i.normal.x>0?e.max.x:e.min.x,$r.y=i.normal.y>0?e.max.y:e.min.y,$r.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint($r)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class Ri extends qn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Tt(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 Ta=new I,Ca=new I,th=new Et,or=new Ys,Yr=new Fi,yo=new I,nh=new I;class Ba extends ln{constructor(e=new hn,t=new Ri){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,r=t.count;i<r;i++)Ta.fromBufferAttribute(t,i-1),Ca.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=Ta.distanceTo(Ca);e.setAttribute("lineDistance",new It(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Yr.copy(n.boundingSphere),Yr.applyMatrix4(i),Yr.radius+=r,e.ray.intersectsSphere(Yr)===!1)return;th.copy(i).invert(),or.copy(e.ray).applyMatrix4(th);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=this.isLineSegments?2:1,d=n.index,u=n.attributes.position;if(d!==null){const h=Math.max(0,o.start),g=Math.min(d.count,o.start+o.count);for(let _=h,p=g-1;_<p;_+=c){const f=d.getX(_),x=d.getX(_+1),y=Jr(this,e,or,l,f,x,_);y&&t.push(y)}if(this.isLineLoop){const _=d.getX(g-1),p=d.getX(h),f=Jr(this,e,or,l,_,p,g-1);f&&t.push(f)}}else{const h=Math.max(0,o.start),g=Math.min(u.count,o.start+o.count);for(let _=h,p=g-1;_<p;_+=c){const f=Jr(this,e,or,l,_,_+1,_);f&&t.push(f)}if(this.isLineLoop){const _=Jr(this,e,or,l,g-1,h,g-1);_&&t.push(_)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function Jr(s,e,t,n,i,r,o){const a=s.geometry.attributes.position;if(Ta.fromBufferAttribute(a,i),Ca.fromBufferAttribute(a,r),t.distanceSqToSegment(Ta,Ca,yo,nh)>n)return;yo.applyMatrix4(s.matrixWorld);const c=e.ray.origin.distanceTo(yo);if(!(c<e.near||c>e.far))return{distance:c,point:nh.clone().applyMatrix4(s.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:s}}const ih=new I,sh=new I;class Ra extends Ba{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,r=t.count;i<r;i+=2)ih.fromBufferAttribute(t,i),sh.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+ih.distanceTo(sh);e.setAttribute("lineDistance",new It(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Gi extends qn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Tt(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 rh=new Et,Rl=new Ys,Kr=new Fi,Zr=new I;class Vs extends ln{constructor(e=new hn,t=new Gi){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Kr.copy(n.boundingSphere),Kr.applyMatrix4(i),Kr.radius+=r,e.ray.intersectsSphere(Kr)===!1)return;rh.copy(i).invert(),Rl.copy(e.ray).applyMatrix4(rh);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,m=n.attributes.position;if(c!==null){const u=Math.max(0,o.start),h=Math.min(c.count,o.start+o.count);for(let g=u,_=h;g<_;g++){const p=c.getX(g);Zr.fromBufferAttribute(m,p),ah(Zr,p,l,i,e,t,this)}}else{const u=Math.max(0,o.start),h=Math.min(m.count,o.start+o.count);for(let g=u,_=h;g<_;g++)Zr.fromBufferAttribute(m,g),ah(Zr,g,l,i,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function ah(s,e,t,n,i,r,o){const a=Rl.distanceSqToPoint(s);if(a<t){const l=new I;Rl.closestPointToPoint(s,l),l.applyMatrix4(n);const c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class u1 extends Tn{constructor(e,t,n,i,r,o,a,l,c){super(e,t,n,i,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class H0 extends Tn{constructor(e,t,n=hs,i,r,o,a=jn,l=jn,c,d=yr,m=1){if(d!==yr&&d!==xr)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const u={width:e,height:t,depth:m};super(u,i,r,o,a,l,d,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Kl(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class ic extends hn{constructor(e=1,t=1,n=1,i=32,r=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:o,thetaStart:a,thetaLength:l};const c=this;i=Math.floor(i),r=Math.floor(r);const d=[],m=[],u=[],h=[];let g=0;const _=[],p=n/2;let f=0;x(),o===!1&&(e>0&&y(!0),t>0&&y(!1)),this.setIndex(d),this.setAttribute("position",new It(m,3)),this.setAttribute("normal",new It(u,3)),this.setAttribute("uv",new It(h,2));function x(){const S=new I,U=new I;let C=0;const L=(t-e)/n;for(let P=0;P<=r;P++){const E=[],A=P/r,D=A*(t-e)+e;for(let O=0;O<=i;O++){const V=O/i,Q=V*l+a,se=Math.sin(Q),G=Math.cos(Q);U.x=D*se,U.y=-A*n+p,U.z=D*G,m.push(U.x,U.y,U.z),S.set(se,L,G).normalize(),u.push(S.x,S.y,S.z),h.push(V,1-A),E.push(g++)}_.push(E)}for(let P=0;P<i;P++)for(let E=0;E<r;E++){const A=_[E][P],D=_[E+1][P],O=_[E+1][P+1],V=_[E][P+1];(e>0||E!==0)&&(d.push(A,D,V),C+=3),(t>0||E!==r-1)&&(d.push(D,O,V),C+=3)}c.addGroup(f,C,0),f+=C}function y(S){const U=g,C=new et,L=new I;let P=0;const E=S===!0?e:t,A=S===!0?1:-1;for(let O=1;O<=i;O++)m.push(0,p*A,0),u.push(0,A,0),h.push(.5,.5),g++;const D=g;for(let O=0;O<=i;O++){const Q=O/i*l+a,se=Math.cos(Q),G=Math.sin(Q);L.x=E*G,L.y=p*A,L.z=E*se,m.push(L.x,L.y,L.z),u.push(0,A,0),C.x=se*.5+.5,C.y=G*.5*A+.5,h.push(C.x,C.y),g++}for(let O=0;O<i;O++){const V=U+O,Q=D+O;S===!0?d.push(Q,Q+1,V):d.push(Q+1,Q,V),P+=3}c.addGroup(f,P,S===!0?1:2),f+=P}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ic(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ui{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),r=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let i=0;const r=n.length;let o;t?o=t:o=e*n[r-1];let a=0,l=r-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=n[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,n[i]===o)return i/(r-1);const d=n[i],u=n[i+1]-d,h=(o-d)/u;return(i+h)/(r-1)}getTangent(e,t){let i=e-1e-4,r=e+1e-4;i<0&&(i=0),r>1&&(r=1);const o=this.getPoint(i),a=this.getPoint(r),l=t||(o.isVector2?new et:new I);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new I,i=[],r=[],o=[],a=new I,l=new Et;for(let h=0;h<=e;h++){const g=h/e;i[h]=this.getTangentAt(g,new I)}r[0]=new I,o[0]=new I;let c=Number.MAX_VALUE;const d=Math.abs(i[0].x),m=Math.abs(i[0].y),u=Math.abs(i[0].z);d<=c&&(c=d,n.set(1,0,0)),m<=c&&(c=m,n.set(0,1,0)),u<=c&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),o[0].crossVectors(i[0],r[0]);for(let h=1;h<=e;h++){if(r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),a.crossVectors(i[h-1],i[h]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Vt(i[h-1].dot(i[h]),-1,1));r[h].applyMatrix4(l.makeRotationAxis(a,g))}o[h].crossVectors(i[h],r[h])}if(t===!0){let h=Math.acos(Vt(r[0].dot(r[e]),-1,1));h/=e,i[0].dot(a.crossVectors(r[0],r[e]))>0&&(h=-h);for(let g=1;g<=e;g++)r[g].applyMatrix4(l.makeRotationAxis(i[g],h*g)),o[g].crossVectors(i[g],r[g])}return{tangents:i,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class G0 extends Ui{constructor(e=0,t=0,n=1,i=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new et){const n=t,i=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(o?r=0:r=i),this.aClockwise===!0&&!o&&(r===i?r=-i:r=r-i);const a=this.aStartAngle+e*r;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const d=Math.cos(this.aRotation),m=Math.sin(this.aRotation),u=l-this.aX,h=c-this.aY;l=u*d-h*m+this.aX,c=u*m+h*d+this.aY}return n.set(l,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class d1 extends G0{constructor(e,t,n,i,r,o){super(e,t,n,n,i,r,o),this.isArcCurve=!0,this.type="ArcCurve"}}function sc(){let s=0,e=0,t=0,n=0;function i(r,o,a,l){s=r,e=a,t=-3*r+3*o-2*a-l,n=2*r-2*o+a+l}return{initCatmullRom:function(r,o,a,l,c){i(o,a,c*(a-r),c*(l-o))},initNonuniformCatmullRom:function(r,o,a,l,c,d,m){let u=(o-r)/c-(a-r)/(c+d)+(a-o)/d,h=(a-o)/d-(l-o)/(d+m)+(l-a)/m;u*=d,h*=d,i(o,a,u,h)},calc:function(r){const o=r*r,a=o*r;return s+e*r+t*o+n*a}}}const Qr=new I,xo=new sc,Mo=new sc,bo=new sc;class rc extends Ui{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new I){const n=t,i=this.points,r=i.length,o=(r-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,d;this.closed||a>0?c=i[(a-1)%r]:(Qr.subVectors(i[0],i[1]).add(i[0]),c=Qr);const m=i[a%r],u=i[(a+1)%r];if(this.closed||a+2<r?d=i[(a+2)%r]:(Qr.subVectors(i[r-1],i[r-2]).add(i[r-1]),d=Qr),this.curveType==="centripetal"||this.curveType==="chordal"){const h=this.curveType==="chordal"?.5:.25;let g=Math.pow(c.distanceToSquared(m),h),_=Math.pow(m.distanceToSquared(u),h),p=Math.pow(u.distanceToSquared(d),h);_<1e-4&&(_=1),g<1e-4&&(g=_),p<1e-4&&(p=_),xo.initNonuniformCatmullRom(c.x,m.x,u.x,d.x,g,_,p),Mo.initNonuniformCatmullRom(c.y,m.y,u.y,d.y,g,_,p),bo.initNonuniformCatmullRom(c.z,m.z,u.z,d.z,g,_,p)}else this.curveType==="catmullrom"&&(xo.initCatmullRom(c.x,m.x,u.x,d.x,this.tension),Mo.initCatmullRom(c.y,m.y,u.y,d.y,this.tension),bo.initCatmullRom(c.z,m.z,u.z,d.z,this.tension));return n.set(xo.calc(l),Mo.calc(l),bo.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new I().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function oh(s,e,t,n,i){const r=(n-e)*.5,o=(i-t)*.5,a=s*s,l=s*a;return(2*t-2*n+r+o)*l+(-3*t+3*n-2*r-o)*a+r*s+t}function f1(s,e){const t=1-s;return t*t*e}function p1(s,e){return 2*(1-s)*s*e}function m1(s,e){return s*s*e}function pr(s,e,t,n){return f1(s,e)+p1(s,t)+m1(s,n)}function g1(s,e){const t=1-s;return t*t*t*e}function _1(s,e){const t=1-s;return 3*t*t*s*e}function v1(s,e){return 3*(1-s)*s*s*e}function y1(s,e){return s*s*s*e}function mr(s,e,t,n,i){return g1(s,e)+_1(s,t)+v1(s,n)+y1(s,i)}class x1 extends Ui{constructor(e=new et,t=new et,n=new et,i=new et){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new et){const n=t,i=this.v0,r=this.v1,o=this.v2,a=this.v3;return n.set(mr(e,i.x,r.x,o.x,a.x),mr(e,i.y,r.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class M1 extends Ui{constructor(e=new I,t=new I,n=new I,i=new I){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new I){const n=t,i=this.v0,r=this.v1,o=this.v2,a=this.v3;return n.set(mr(e,i.x,r.x,o.x,a.x),mr(e,i.y,r.y,o.y,a.y),mr(e,i.z,r.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class b1 extends Ui{constructor(e=new et,t=new et){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new et){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new et){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class S1 extends Ui{constructor(e=new I,t=new I){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new I){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new I){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class E1 extends Ui{constructor(e=new et,t=new et,n=new et){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new et){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(pr(e,i.x,r.x,o.x),pr(e,i.y,r.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class W0 extends Ui{constructor(e=new I,t=new I,n=new I){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new I){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(pr(e,i.x,r.x,o.x),pr(e,i.y,r.y,o.y),pr(e,i.z,r.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class A1 extends Ui{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new et){const n=t,i=this.points,r=(i.length-1)*e,o=Math.floor(r),a=r-o,l=i[o===0?o:o-1],c=i[o],d=i[o>i.length-2?i.length-1:o+1],m=i[o>i.length-3?i.length-1:o+2];return n.set(oh(a,l.x,c.x,d.x,m.x),oh(a,l.y,c.y,d.y,m.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new et().fromArray(i))}return this}}var w1=Object.freeze({__proto__:null,ArcCurve:d1,CatmullRomCurve3:rc,CubicBezierCurve:x1,CubicBezierCurve3:M1,EllipseCurve:G0,LineCurve:b1,LineCurve3:S1,QuadraticBezierCurve:E1,QuadraticBezierCurve3:W0,SplineCurve:A1});class Di extends hn{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,o=t/2,a=Math.floor(n),l=Math.floor(i),c=a+1,d=l+1,m=e/a,u=t/l,h=[],g=[],_=[],p=[];for(let f=0;f<d;f++){const x=f*u-o;for(let y=0;y<c;y++){const S=y*m-r;g.push(S,-x,0),_.push(0,0,1),p.push(y/a),p.push(1-f/l)}}for(let f=0;f<l;f++)for(let x=0;x<a;x++){const y=x+c*f,S=x+c*(f+1),U=x+1+c*(f+1),C=x+1+c*f;h.push(y,S,C),h.push(S,U,C)}this.setIndex(h),this.setAttribute("position",new It(g,3)),this.setAttribute("normal",new It(_,3)),this.setAttribute("uv",new It(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Di(e.width,e.height,e.widthSegments,e.heightSegments)}}class Oa extends hn{constructor(e=1,t=32,n=16,i=0,r=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(o+a,Math.PI);let c=0;const d=[],m=new I,u=new I,h=[],g=[],_=[],p=[];for(let f=0;f<=n;f++){const x=[],y=f/n;let S=0;f===0&&o===0?S=.5/t:f===n&&l===Math.PI&&(S=-.5/t);for(let U=0;U<=t;U++){const C=U/t;m.x=-e*Math.cos(i+C*r)*Math.sin(o+y*a),m.y=e*Math.cos(o+y*a),m.z=e*Math.sin(i+C*r)*Math.sin(o+y*a),g.push(m.x,m.y,m.z),u.copy(m).normalize(),_.push(u.x,u.y,u.z),p.push(C+S,1-y),x.push(c++)}d.push(x)}for(let f=0;f<n;f++)for(let x=0;x<t;x++){const y=d[f][x+1],S=d[f][x],U=d[f+1][x],C=d[f+1][x+1];(f!==0||o>0)&&h.push(y,S,C),(f!==n-1||l<Math.PI)&&h.push(S,U,C)}this.setIndex(h),this.setAttribute("position",new It(g,3)),this.setAttribute("normal",new It(_,3)),this.setAttribute("uv",new It(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Oa(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class ka extends hn{constructor(e=new W0(new I(-1,-1,0),new I(-1,1,0),new I(1,1,0)),t=64,n=1,i=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r};const o=e.computeFrenetFrames(t,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new I,l=new I,c=new et;let d=new I;const m=[],u=[],h=[],g=[];_(),this.setIndex(g),this.setAttribute("position",new It(m,3)),this.setAttribute("normal",new It(u,3)),this.setAttribute("uv",new It(h,2));function _(){for(let y=0;y<t;y++)p(y);p(r===!1?t:0),x(),f()}function p(y){d=e.getPointAt(y/t,d);const S=o.normals[y],U=o.binormals[y];for(let C=0;C<=i;C++){const L=C/i*Math.PI*2,P=Math.sin(L),E=-Math.cos(L);l.x=E*S.x+P*U.x,l.y=E*S.y+P*U.y,l.z=E*S.z+P*U.z,l.normalize(),u.push(l.x,l.y,l.z),a.x=d.x+n*l.x,a.y=d.y+n*l.y,a.z=d.z+n*l.z,m.push(a.x,a.y,a.z)}}function f(){for(let y=1;y<=t;y++)for(let S=1;S<=i;S++){const U=(i+1)*(y-1)+(S-1),C=(i+1)*y+(S-1),L=(i+1)*y+S,P=(i+1)*(y-1)+S;g.push(U,C,P),g.push(C,L,P)}}function x(){for(let y=0;y<=t;y++)for(let S=0;S<=i;S++)c.x=y/t,c.y=S/i,h.push(c.x,c.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new ka(new w1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class T1 extends hn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,i=new I,r=new I;if(e.index!==null){const o=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let c=0,d=l.length;c<d;++c){const m=l[c],u=m.start,h=m.count;for(let g=u,_=u+h;g<_;g+=3)for(let p=0;p<3;p++){const f=a.getX(g+p),x=a.getX(g+(p+1)%3);i.fromBufferAttribute(o,f),r.fromBufferAttribute(o,x),lh(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}}else{const o=e.attributes.position;for(let a=0,l=o.count/3;a<l;a++)for(let c=0;c<3;c++){const d=3*a+c,m=3*a+(c+1)%3;i.fromBufferAttribute(o,d),r.fromBufferAttribute(o,m),lh(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new It(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function lh(s,e,t){const n=`${s.x},${s.y},${s.z}-${e.x},${e.y},${e.z}`,i=`${e.x},${e.y},${e.z}-${s.x},${s.y},${s.z}`;return t.has(n)===!0||t.has(i)===!0?!1:(t.add(n),t.add(i),!0)}class X0 extends qn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Tt(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class j0 extends qn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Tt(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 Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Na,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class fn extends qn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Tt(16777215),this.specular=new Tt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Na,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class C1 extends qn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Na,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class R1 extends qn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=a2,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 D1 extends qn{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 ea(s,e){return!s||s.constructor===e?s:typeof e.BYTES_PER_ELEMENT=="number"?new e(s):Array.prototype.slice.call(s)}function L1(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function P1(s){function e(i,r){return s[i]-s[r]}const t=s.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function ch(s,e,t){const n=s.length,i=new s.constructor(n);for(let r=0,o=0;o!==n;++r){const a=t[r]*e;for(let l=0;l!==e;++l)i[o++]=s[a+l]}return i}function q0(s,e,t,n){let i=1,r=s[0];for(;r!==void 0&&r[n]===void 0;)r=s[i++];if(r===void 0)return;let o=r[n];if(o!==void 0)if(Array.isArray(o))do o=r[n],o!==void 0&&(e.push(r.time),t.push(...o)),r=s[i++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[n],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=s[i++];while(r!==void 0);else do o=r[n],o!==void 0&&(e.push(r.time),t.push(o)),r=s[i++];while(r!==void 0)}class Va{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];n:{e:{let o;t:{i:if(!(e<i)){for(let a=n+2;;){if(i===void 0){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(r=i,i=t[++n],e<i)break e}o=t.length;break t}if(!(e>=r)){const a=t[1];e<a&&(n=2,r=a);for(let l=n-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=r,r=t[--n-1],e>=r)break e}o=n,n=0;break t}break n}for(;n<o;){const a=n+o>>>1;e<t[a]?o=a:n=a+1}if(i=t[n],r=t[n-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let o=0;o!==i;++o)t[o]=n[r+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class F1 extends Va{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Sc,endingEnd:Sc}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,o=e+1,a=i[r],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case Ec:r=e,a=2*t-n;break;case Ac:r=i.length-2,a=t+i[r]-i[r+1];break;default:r=e,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case Ec:o=e,l=2*n-t;break;case Ac:o=1,l=n+i[1]-i[0];break;default:o=e-1,l=t}const c=(n-t)*.5,d=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-n),this._offsetPrev=r*d,this._offsetNext=o*d}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,d=this._offsetPrev,m=this._offsetNext,u=this._weightPrev,h=this._weightNext,g=(n-t)/(i-t),_=g*g,p=_*g,f=-u*p+2*u*_-u*g,x=(1+u)*p+(-1.5-2*u)*_+(-.5+u)*g+1,y=(-1-h)*p+(1.5+h)*_+.5*g,S=h*p-h*_;for(let U=0;U!==a;++U)r[U]=f*o[d+U]+x*o[c+U]+y*o[l+U]+S*o[m+U];return r}}class U1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,d=(n-t)/(i-t),m=1-d;for(let u=0;u!==a;++u)r[u]=o[c+u]*m+o[l+u]*d;return r}}class N1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class li{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ea(t,this.TimeBufferType),this.values=ea(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:ea(e.times,Array),values:ea(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new N1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new U1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new F1(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Ea:t=this.InterpolantFactoryMethodDiscrete;break;case Tl:t=this.InterpolantFactoryMethodLinear;break;case ja:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ea;case this.InterpolantFactoryMethodLinear:return Tl;case this.InterpolantFactoryMethodSmooth:return ja}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,o=i-1;for(;r!==i&&n[r]<e;)++r;for(;o!==-1&&n[o]>t;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=n.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,r=n.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&L1(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===ja,r=e.length-1;let o=1;for(let a=1;a<r;++a){let l=!1;const c=e[a],d=e[a+1];if(c!==d&&(a!==1||c!==e[0]))if(i)l=!0;else{const m=a*n,u=m-n,h=m+n;for(let g=0;g!==n;++g){const _=t[m+g];if(_!==t[u+g]||_!==t[h+g]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const m=a*n,u=o*n;for(let h=0;h!==n;++h)t[u+h]=t[m+h]}++o}}if(r>0){e[o]=e[r];for(let a=r*n,l=o*n,c=0;c!==n;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}li.prototype.ValueTypeName="";li.prototype.TimeBufferType=Float32Array;li.prototype.ValueBufferType=Float32Array;li.prototype.DefaultInterpolation=Tl;class Js extends li{constructor(e,t,n){super(e,t,n)}}Js.prototype.ValueTypeName="bool";Js.prototype.ValueBufferType=Array;Js.prototype.DefaultInterpolation=Ea;Js.prototype.InterpolantFactoryMethodLinear=void 0;Js.prototype.InterpolantFactoryMethodSmooth=void 0;class $0 extends li{constructor(e,t,n,i){super(e,t,n,i)}}$0.prototype.ValueTypeName="color";class Da extends li{constructor(e,t,n,i){super(e,t,n,i)}}Da.prototype.ValueTypeName="number";class I1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-t)/(i-t);let c=e*a;for(let d=c+a;c!==d;c+=4)Vn.slerpFlat(r,0,o,c-a,o,c,l);return r}}class Er extends li{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new I1(this.times,this.values,this.getValueSize(),e)}}Er.prototype.ValueTypeName="quaternion";Er.prototype.InterpolantFactoryMethodSmooth=void 0;class Ks extends li{constructor(e,t,n){super(e,t,n)}}Ks.prototype.ValueTypeName="string";Ks.prototype.ValueBufferType=Array;Ks.prototype.DefaultInterpolation=Ea;Ks.prototype.InterpolantFactoryMethodLinear=void 0;Ks.prototype.InterpolantFactoryMethodSmooth=void 0;class $s extends li{constructor(e,t,n,i){super(e,t,n,i)}}$s.prototype.ValueTypeName="vector";class hh{constructor(e="",t=-1,n=[],i=r2){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=ai(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(B1(n[o]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=n.length;r!==o;++r)t.push(li.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,o=[];for(let a=0;a<r;a++){let l=[],c=[];l.push((a+r-1)%r,a,(a+1)%r),c.push(0,1,0);const d=P1(l);l=ch(l,1,d),c=ch(c,1,d),!i&&l[0]===0&&(l.push(r),c.push(c[0])),o.push(new Da(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],d=c.name.match(r);if(d&&d.length>1){const m=d[1];let u=i[m];u||(i[m]=u=[]),u.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],t,n));return o}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(m,u,h,g,_){if(h.length!==0){const p=[],f=[];q0(h,p,f,g),p.length!==0&&_.push(new m(u,p,f))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let m=0;m<c.length;m++){const u=c[m].keys;if(!(!u||u.length===0))if(u[0].morphTargets){const h={};let g;for(g=0;g<u.length;g++)if(u[g].morphTargets)for(let _=0;_<u[g].morphTargets.length;_++)h[u[g].morphTargets[_]]=-1;for(const _ in h){const p=[],f=[];for(let x=0;x!==u[g].morphTargets.length;++x){const y=u[g];p.push(y.time),f.push(y.morphTarget===_?1:0)}i.push(new Da(".morphTargetInfluence["+_+"]",p,f))}l=h.length*o}else{const h=".bones["+t[m].name+"]";n($s,h+".position",u,"pos",i),n(Er,h+".quaternion",u,"rot",i),n($s,h+".scale",u,"scl",i)}}return i.length===0?null:new this(r,l,i,a)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,i=e.length;n!==i;++n){const r=this.tracks[n];t=Math.max(t,r.times[r.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let 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 z1(s){switch(s.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Da;case"vector":case"vector2":case"vector3":case"vector4":return $s;case"color":return $0;case"quaternion":return Er;case"bool":case"boolean":return Js;case"string":return Ks}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function B1(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=z1(s.type);if(s.times===void 0){const t=[],n=[];q0(s.keys,t,n,"value"),s.times=t,s.values=n}return e.parse!==void 0?e.parse(s):new e(s.name,s.times,s.values,s.interpolation)}const La={enabled:!1,files:{},add:function(s,e){this.enabled!==!1&&(this.files[s]=e)},get:function(s){if(this.enabled!==!1)return this.files[s]},remove:function(s){delete this.files[s]},clear:function(){this.files={}}};class Y0{constructor(e,t,n){const i=this;let r=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){a++,r===!1&&i.onStart!==void 0&&i.onStart(d,o,a),r=!0},this.itemEnd=function(d){o++,i.onProgress!==void 0&&i.onProgress(d,o,a),o===a&&(r=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(d){i.onError!==void 0&&i.onError(d)},this.resolveURL=function(d){return l?l(d):d},this.setURLModifier=function(d){return l=d,this},this.addHandler=function(d,m){return c.push(d,m),this},this.removeHandler=function(d){const m=c.indexOf(d);return m!==-1&&c.splice(m,2),this},this.getHandler=function(d){for(let m=0,u=c.length;m<u;m+=2){const h=c[m],g=c[m+1];if(h.global&&(h.lastIndex=0),h.test(d))return g}return null}}}const ac=new Y0;class oi{constructor(e){this.manager=e!==void 0?e:ac,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,r){n.load(e,i,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}oi.DEFAULT_MATERIAL_NAME="__DEFAULT";const bi={};class O1 extends Error{constructor(e,t){super(e),this.response=t}}class Zs extends oi{constructor(e){super(e),this.mimeType="",this.responseType=""}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=La.get(e);if(r!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0),r;if(bi[e]!==void 0){bi[e].push({onLoad:t,onProgress:n,onError:i});return}bi[e]=[],bi[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const d=bi[e],m=c.body.getReader(),u=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),h=u?parseInt(u):0,g=h!==0;let _=0;const p=new ReadableStream({start(f){x();function x(){m.read().then(({done:y,value:S})=>{if(y)f.close();else{_+=S.byteLength;const U=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:h});for(let C=0,L=d.length;C<L;C++){const P=d[C];P.onProgress&&P.onProgress(U)}f.enqueue(S),x()}},y=>{f.error(y)})}}});return new Response(p)}else throw new O1(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return c.json();default:if(a==="")return c.text();{const m=/charset="?([^;"\s]*)"?/i.exec(a),u=m&&m[1]?m[1].toLowerCase():void 0,h=new TextDecoder(u);return c.arrayBuffer().then(g=>h.decode(g))}}}).then(c=>{La.add(e,c);const d=bi[e];delete bi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onLoad&&h.onLoad(c)}}).catch(c=>{const d=bi[e];if(d===void 0)throw this.manager.itemError(e),c;delete bi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onError&&h.onError(c)}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 k1 extends oi{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=La.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a=Mr("img");function l(){d(),La.add(e,this),t&&t(this),r.manager.itemEnd(e)}function c(m){d(),i&&i(m),r.manager.itemError(e),r.manager.itemEnd(e)}function d(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class V1 extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new V0,a=new Zs(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(r.withCredentials),a.load(e,function(l){let c;try{c=r.parse(l)}catch(d){if(i!==void 0)i(d);else{console.error(d);return}}c.image!==void 0?o.image=c.image:c.data!==void 0&&(o.image.width=c.width,o.image.height=c.height,o.image.data=c.data),o.wrapS=c.wrapS!==void 0?c.wrapS:ri,o.wrapT=c.wrapT!==void 0?c.wrapT:ri,o.magFilter=c.magFilter!==void 0?c.magFilter:Xn,o.minFilter=c.minFilter!==void 0?c.minFilter:Xn,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0&&(o.colorSpace=c.colorSpace),c.flipY!==void 0&&(o.flipY=c.flipY),c.format!==void 0&&(o.format=c.format),c.type!==void 0&&(o.type=c.type),c.mipmaps!==void 0&&(o.mipmaps=c.mipmaps,o.minFilter=Ai),c.mipmapCount===1&&(o.minFilter=Xn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},n,i),o}}class oc extends oi{constructor(e){super(e)}load(e,t,n,i){const r=new Tn,o=new k1(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}}class Ar extends ln{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Tt(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,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(t.object.target=this.target.uuid),t}}class J0 extends Ar{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Tt(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const So=new Et,uh=new I,dh=new I;class lc{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new et(512,512),this.mapType=mi,this.map=null,this.mapPass=null,this.matrix=new Et,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new nc,this._frameExtents=new et(1,1),this._viewportCount=1,this._viewports=[new Xt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;uh.setFromMatrixPosition(e.matrixWorld),t.position.copy(uh),dh.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(dh),t.updateMatrixWorld(),So.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(So),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(So)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class H1 extends lc{constructor(){super(new bn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=js*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=e.distance||t.far;(n!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class G1 extends Ar{constructor(e,t,n=0,i=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.target=new ln,this.distance=n,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new H1}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 fh=new Et,lr=new I,Eo=new I;class W1 extends lc{constructor(){super(new bn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new et(4,2),this._viewportCount=6,this._viewports=[new Xt(2,1,1,1),new Xt(0,1,1,1),new Xt(3,1,1,1),new Xt(1,1,1,1),new Xt(3,0,1,1),new Xt(1,0,1,1)],this._cubeDirections=[new I(1,0,0),new I(-1,0,0),new I(0,0,1),new I(0,0,-1),new I(0,1,0),new I(0,-1,0)],this._cubeUps=[new I(0,1,0),new I(0,1,0),new I(0,1,0),new I(0,1,0),new I(0,0,1),new I(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,r=e.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),lr.setFromMatrixPosition(e.matrixWorld),n.position.copy(lr),Eo.copy(n.position),Eo.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Eo),n.updateMatrixWorld(),i.makeTranslation(-lr.x,-lr.y,-lr.z),fh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fh)}}class Pa extends Ar{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new W1}get power(){return this.intensity*4*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 Ha extends N0{constructor(e=-1,t=1,n=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,o=n+e,a=i+t,l=i-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,o=r+c*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}class X1 extends lc{constructor(){super(new Ha(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class gr extends Ar{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.target=new ln,this.shadow=new X1}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class cc extends Ar{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class hc{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class j1 extends hn{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class q1 extends bn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class $1{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ph(),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=ph();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function ph(){return performance.now()}class Dl extends z0{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}const mh=new Et;class Y1{constructor(e,t,n=0,i=1/0){this.ray=new Ys(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Zl,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: Unsupported camera type: "+t.type)}setFromXRController(e){return mh.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(mh),this}intersectObject(e,t=!0,n=[]){return Ll(e,this,n,t),n.sort(gh),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)Ll(e[i],this,n,t);return n.sort(gh),n}}function gh(s,e){return s.distance-e.distance}function Ll(s,e,t,n){let i=!0;if(s.layers.test(e.layers)&&s.raycast(e,t)===!1&&(i=!1),i===!0&&n===!0){const r=s.children;for(let o=0,a=r.length;o<a;o++)Ll(r[o],e,t,!0)}}class Pl{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Vt(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Vt(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const _h=new I,ta=new I;class J1{constructor(e=new I,t=new I){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){_h.subVectors(e,this.start),ta.subVectors(this.end,this.start);const n=ta.dot(ta);let r=ta.dot(_h)/n;return t&&(r=Vt(r,0,1)),r}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}class K0 extends Ra{constructor(e=10,t=10,n=4473924,i=8947848){n=new Tt(n),i=new Tt(i);const r=t/2,o=e/t,a=e/2,l=[],c=[];for(let u=0,h=0,g=-a;u<=t;u++,g+=o){l.push(-a,0,g,a,0,g),l.push(g,0,-a,g,0,a);const _=u===r?n:i;_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3}const d=new hn;d.setAttribute("position",new It(l,3)),d.setAttribute("color",new It(c,3));const m=new Ri({vertexColors:!0,toneMapped:!1});super(d,m),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class K1 extends ds{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){console.warn("THREE.Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function vh(s,e,t,n){const i=Z1(n);switch(t){case S0:return s*e;case A0:return s*e/i.components*i.byteLength;case ql:return s*e/i.components*i.byteLength;case w0:return s*e*2/i.components*i.byteLength;case $l:return s*e*2/i.components*i.byteLength;case E0:return s*e*3/i.components*i.byteLength;case Zn:return s*e*4/i.components*i.byteLength;case Yl:return s*e*4/i.components*i.byteLength;case ga:case _a:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case va:case ya:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case nl:case sl:return Math.max(s,16)*Math.max(e,8)/4;case tl:case il:return Math.max(s,8)*Math.max(e,8)/2;case rl:case al:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case ol:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case ll:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case cl:return Math.floor((s+4)/5)*Math.floor((e+3)/4)*16;case hl:return Math.floor((s+4)/5)*Math.floor((e+4)/5)*16;case ul:return Math.floor((s+5)/6)*Math.floor((e+4)/5)*16;case dl:return Math.floor((s+5)/6)*Math.floor((e+5)/6)*16;case fl:return Math.floor((s+7)/8)*Math.floor((e+4)/5)*16;case pl:return Math.floor((s+7)/8)*Math.floor((e+5)/6)*16;case ml:return Math.floor((s+7)/8)*Math.floor((e+7)/8)*16;case gl:return Math.floor((s+9)/10)*Math.floor((e+4)/5)*16;case _l:return Math.floor((s+9)/10)*Math.floor((e+5)/6)*16;case vl:return Math.floor((s+9)/10)*Math.floor((e+7)/8)*16;case yl:return Math.floor((s+9)/10)*Math.floor((e+9)/10)*16;case xl:return Math.floor((s+11)/12)*Math.floor((e+9)/10)*16;case Ml:return Math.floor((s+11)/12)*Math.floor((e+11)/12)*16;case xa:case bl:case Sl:return Math.ceil(s/4)*Math.ceil(e/4)*16;case T0:case El:return Math.ceil(s/4)*Math.ceil(e/4)*8;case Al:case wl:return Math.ceil(s/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function Z1(s){switch(s){case mi:case x0:return{byteLength:1,components:1};case _r:case M0:case Sr:return{byteLength:2,components:1};case Xl:case jl:return{byteLength:2,components:4};case hs:case Wl:case fi:return{byteLength:4,components:1};case b0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Vl}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Vl);/**
|
|
44
|
+
`},i=new $i(5,5,5),r=new Li({name:"CubemapFromEquirect",uniforms:qs(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:In,blending:Wi});r.uniforms.tEquirect.value=t;const o=new zt(i,r),a=t.minFilter;return t.minFilter===Ai&&(t.minFilter=Xn),new i1(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,i);e.setRenderTarget(r)}}class Ln extends ln{constructor(){super(),this.isGroup=!0,this.type="Group"}}const r1={type:"move"};class po{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ln,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Ln,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new I,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new I),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ln,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new I,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new I),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const p=t.getJointPose(_,n),f=this._getHandJoint(c,_);p!==null&&(f.matrix.fromArray(p.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,f.jointRadius=p.radius),f.visible=p!==null}const d=c.joints["index-finger-tip"],m=c.joints["thumb-tip"],u=d.position.distanceTo(m.position),h=.02,g=.005;c.inputState.pinching&&u>h+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&u<=h-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(r1)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Ln;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ia extends ln{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Sn,this.environmentIntensity=1,this.environmentRotation=new Sn,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class z0{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Cl,this.updateRanges=[],this.version=0,this.uuid=ai()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ai()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=ai()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Nn=new I;class pi{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}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,n=this.data.count;t<n;t++)Nn.fromBufferAttribute(this,t),Nn.applyMatrix4(e),this.setXYZ(t,Nn.x,Nn.y,Nn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Nn.fromBufferAttribute(this,t),Nn.applyNormalMatrix(e),this.setXYZ(t,Nn.x,Nn.y,Nn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Nn.fromBufferAttribute(this,t),Nn.transformDirection(e),this.setXYZ(t,Nn.x,Nn.y,Nn.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=si(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=tn(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=tn(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=si(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=si(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=si(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=si(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=tn(t,this.array),n=tn(n,this.array),i=tn(i,this.array),r=tn(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return new mn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new pi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)t.push(this.data.array[i+r])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class za extends qn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Tt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let Cs;const sr=new I,Rs=new I,Ds=new I,Ls=new et,rr=new et,B0=new Et,Gr=new I,ar=new I,Wr=new I,jc=new et,mo=new et,qc=new et;class ec extends ln{constructor(e=new za){if(super(),this.isSprite=!0,this.type="Sprite",Cs===void 0){Cs=new hn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new z0(t,5);Cs.setIndex([0,1,2,0,2,3]),Cs.setAttribute("position",new pi(n,3,0,!1)),Cs.setAttribute("uv",new pi(n,2,3,!1))}this.geometry=Cs,this.material=e,this.center=new et(.5,.5),this.count=1}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Rs.setFromMatrixScale(this.matrixWorld),B0.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ds.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Rs.multiplyScalar(-Ds.z);const n=this.material.rotation;let i,r;n!==0&&(r=Math.cos(n),i=Math.sin(n));const o=this.center;Xr(Gr.set(-.5,-.5,0),Ds,o,Rs,i,r),Xr(ar.set(.5,-.5,0),Ds,o,Rs,i,r),Xr(Wr.set(.5,.5,0),Ds,o,Rs,i,r),jc.set(0,0),mo.set(1,0),qc.set(1,1);let a=e.ray.intersectTriangle(Gr,ar,Wr,!1,sr);if(a===null&&(Xr(ar.set(-.5,.5,0),Ds,o,Rs,i,r),mo.set(0,1),a=e.ray.intersectTriangle(Gr,Wr,ar,!1,sr),a===null))return;const l=e.ray.origin.distanceTo(sr);l<e.near||l>e.far||t.push({distance:l,point:sr.clone(),uv:Kn.getInterpolation(sr,Gr,ar,Wr,jc,mo,qc,new et),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Xr(s,e,t,n,i,r){Ls.subVectors(s,t).addScalar(.5).multiply(n),i!==void 0?(rr.x=r*Ls.x-i*Ls.y,rr.y=i*Ls.x+r*Ls.y):rr.copy(Ls),s.copy(e),s.x+=rr.x,s.y+=rr.y,s.applyMatrix4(B0)}const jr=new I,$c=new I;class O0 extends ln{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n<i;n++){const r=t[n];this.addLevel(r.object.clone(),r.distance,r.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const i=this.levels;let r;for(r=0;r<i.length&&!(t<i[r].distance);r++);return i.splice(r,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const i=t.splice(n,1);return this.remove(i[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,i;for(n=1,i=t.length;n<i;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){jr.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(jr);this.getObjectForDistance(i).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){jr.setFromMatrixPosition(e.matrixWorld),$c.setFromMatrixPosition(this.matrixWorld);const n=jr.distanceTo($c)/e.zoom;t[0].object.visible=!0;let i,r;for(i=1,r=t.length;i<r;i++){let o=t[i].distance;if(t[i].object.visible&&(o-=o*t[i].hysteresis),n>=o)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;i<r;i++)t[i].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let i=0,r=n.length;i<r;i++){const o=n[i];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}}const Yc=new I,Jc=new Xt,Kc=new Xt,a1=new I,Zc=new Et,qr=new I,go=new Fi,Qc=new Et,_o=new Ys;class o1 extends zt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=bc,this.bindMatrix=new Et,this.bindMatrixInverse=new Et,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Fn),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qr),this.boundingBox.expandByPoint(qr)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Fi),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,qr),this.boundingSphere.expandByPoint(qr)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),go.copy(this.boundingSphere),go.applyMatrix4(i),e.ray.intersectsSphere(go)!==!1&&(Qc.copy(i).invert(),_o.copy(e.ray).applyMatrix4(Qc),!(this.boundingBox!==null&&_o.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,_o)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Xt,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===bc?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===i2?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;Jc.fromBufferAttribute(i.attributes.skinIndex,e),Kc.fromBufferAttribute(i.attributes.skinWeight,e),Yc.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let r=0;r<4;r++){const o=Kc.getComponent(r);if(o!==0){const a=Jc.getComponent(r);Zc.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(a1.copy(Yc).applyMatrix4(Zc),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class k0 extends ln{constructor(){super(),this.isBone=!0,this.type="Bone"}}class V0 extends Tn{constructor(e=null,t=1,n=1,i,r,o,a,l,c=jn,d=jn,m,u){super(null,o,a,l,c,d,i,r,m,u),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const eh=new Et,l1=new Et;class tc{constructor(e=[],t=[]){this.uuid=ai(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)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 n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Et)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new Et;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let r=0,o=e.length;r<o;r++){const a=e[r]?e[r].matrixWorld:l1;eh.multiplyMatrices(a,t[r]),eh.toArray(n,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new tc(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new V0(t,e,e,Zn,fi);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const r=e.bones[n];let o=t[r];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),o=new k0),this.bones.push(o),this.boneInverses.push(new Et().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){const o=t[i];e.bones.push(o.uuid);const a=n[i];e.boneInverses.push(a.toArray())}return e}}const vo=new I,c1=new I,h1=new kt;class Jn{constructor(e=new I(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=vo.subVectors(n,t).cross(c1.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(vo),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(e.start).addScaledVector(n,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||h1.getNormalMatrix(e),i=this.coplanarPoint(vo).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Qi=new Fi,$r=new I;class nc{constructor(e=new Jn,t=new Jn,n=new Jn,i=new Jn,r=new Jn,o=new Jn){this.planes=[e,t,n,i,r,o]}set(e,t,n,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=wi){const n=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],l=i[3],c=i[4],d=i[5],m=i[6],u=i[7],h=i[8],g=i[9],_=i[10],p=i[11],f=i[12],v=i[13],b=i[14],S=i[15];if(n[0].setComponents(l-r,u-c,p-h,S-f).normalize(),n[1].setComponents(l+r,u+c,p+h,S+f).normalize(),n[2].setComponents(l+o,u+d,p+g,S+v).normalize(),n[3].setComponents(l-o,u-d,p-g,S-v).normalize(),n[4].setComponents(l-a,u-m,p-_,S-b).normalize(),t===wi)n[5].setComponents(l+a,u+m,p+_,S+b).normalize();else if(t===wa)n[5].setComponents(a,m,_,b).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Qi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Qi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Qi)}intersectsSprite(e){return Qi.center.set(0,0,0),Qi.radius=.7071067811865476,Qi.applyMatrix4(e.matrixWorld),this.intersectsSphere(Qi)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if($r.x=i.normal.x>0?e.max.x:e.min.x,$r.y=i.normal.y>0?e.max.y:e.min.y,$r.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint($r)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class Ri extends qn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Tt(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 Ta=new I,Ca=new I,th=new Et,or=new Ys,Yr=new Fi,yo=new I,nh=new I;class Ba extends ln{constructor(e=new hn,t=new Ri){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,r=t.count;i<r;i++)Ta.fromBufferAttribute(t,i-1),Ca.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=Ta.distanceTo(Ca);e.setAttribute("lineDistance",new It(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Yr.copy(n.boundingSphere),Yr.applyMatrix4(i),Yr.radius+=r,e.ray.intersectsSphere(Yr)===!1)return;th.copy(i).invert(),or.copy(e.ray).applyMatrix4(th);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=this.isLineSegments?2:1,d=n.index,u=n.attributes.position;if(d!==null){const h=Math.max(0,o.start),g=Math.min(d.count,o.start+o.count);for(let _=h,p=g-1;_<p;_+=c){const f=d.getX(_),v=d.getX(_+1),b=Jr(this,e,or,l,f,v,_);b&&t.push(b)}if(this.isLineLoop){const _=d.getX(g-1),p=d.getX(h),f=Jr(this,e,or,l,_,p,g-1);f&&t.push(f)}}else{const h=Math.max(0,o.start),g=Math.min(u.count,o.start+o.count);for(let _=h,p=g-1;_<p;_+=c){const f=Jr(this,e,or,l,_,_+1,_);f&&t.push(f)}if(this.isLineLoop){const _=Jr(this,e,or,l,g-1,h,g-1);_&&t.push(_)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function Jr(s,e,t,n,i,r,o){const a=s.geometry.attributes.position;if(Ta.fromBufferAttribute(a,i),Ca.fromBufferAttribute(a,r),t.distanceSqToSegment(Ta,Ca,yo,nh)>n)return;yo.applyMatrix4(s.matrixWorld);const c=e.ray.origin.distanceTo(yo);if(!(c<e.near||c>e.far))return{distance:c,point:nh.clone().applyMatrix4(s.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:s}}const ih=new I,sh=new I;class Ra extends Ba{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,r=t.count;i<r;i+=2)ih.fromBufferAttribute(t,i),sh.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+ih.distanceTo(sh);e.setAttribute("lineDistance",new It(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Gi extends qn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Tt(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 rh=new Et,Rl=new Ys,Kr=new Fi,Zr=new I;class Vs extends ln{constructor(e=new hn,t=new Gi){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Kr.copy(n.boundingSphere),Kr.applyMatrix4(i),Kr.radius+=r,e.ray.intersectsSphere(Kr)===!1)return;rh.copy(i).invert(),Rl.copy(e.ray).applyMatrix4(rh);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,m=n.attributes.position;if(c!==null){const u=Math.max(0,o.start),h=Math.min(c.count,o.start+o.count);for(let g=u,_=h;g<_;g++){const p=c.getX(g);Zr.fromBufferAttribute(m,p),ah(Zr,p,l,i,e,t,this)}}else{const u=Math.max(0,o.start),h=Math.min(m.count,o.start+o.count);for(let g=u,_=h;g<_;g++)Zr.fromBufferAttribute(m,g),ah(Zr,g,l,i,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r<o;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function ah(s,e,t,n,i,r,o){const a=Rl.distanceSqToPoint(s);if(a<t){const l=new I;Rl.closestPointToPoint(s,l),l.applyMatrix4(n);const c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class u1 extends Tn{constructor(e,t,n,i,r,o,a,l,c){super(e,t,n,i,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class H0 extends Tn{constructor(e,t,n=hs,i,r,o,a=jn,l=jn,c,d=yr,m=1){if(d!==yr&&d!==xr)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const u={width:e,height:t,depth:m};super(u,i,r,o,a,l,d,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Kl(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class ic extends hn{constructor(e=1,t=1,n=1,i=32,r=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:o,thetaStart:a,thetaLength:l};const c=this;i=Math.floor(i),r=Math.floor(r);const d=[],m=[],u=[],h=[];let g=0;const _=[],p=n/2;let f=0;v(),o===!1&&(e>0&&b(!0),t>0&&b(!1)),this.setIndex(d),this.setAttribute("position",new It(m,3)),this.setAttribute("normal",new It(u,3)),this.setAttribute("uv",new It(h,2));function v(){const S=new I,F=new I;let C=0;const R=(t-e)/n;for(let P=0;P<=r;P++){const A=[],E=P/r,L=E*(t-e)+e;for(let B=0;B<=i;B++){const H=B/i,Q=H*l+a,ae=Math.sin(Q),G=Math.cos(Q);F.x=L*ae,F.y=-E*n+p,F.z=L*G,m.push(F.x,F.y,F.z),S.set(ae,R,G).normalize(),u.push(S.x,S.y,S.z),h.push(H,1-E),A.push(g++)}_.push(A)}for(let P=0;P<i;P++)for(let A=0;A<r;A++){const E=_[A][P],L=_[A+1][P],B=_[A+1][P+1],H=_[A][P+1];(e>0||A!==0)&&(d.push(E,L,H),C+=3),(t>0||A!==r-1)&&(d.push(L,B,H),C+=3)}c.addGroup(f,C,0),f+=C}function b(S){const F=g,C=new et,R=new I;let P=0;const A=S===!0?e:t,E=S===!0?1:-1;for(let B=1;B<=i;B++)m.push(0,p*E,0),u.push(0,E,0),h.push(.5,.5),g++;const L=g;for(let B=0;B<=i;B++){const Q=B/i*l+a,ae=Math.cos(Q),G=Math.sin(Q);R.x=A*G,R.y=p*E,R.z=A*ae,m.push(R.x,R.y,R.z),u.push(0,E,0),C.x=ae*.5+.5,C.y=G*.5*E+.5,h.push(C.x,C.y),g++}for(let B=0;B<i;B++){const H=F+B,Q=L+B;S===!0?d.push(Q,Q+1,H):d.push(Q+1,Q,H),P+=3}c.addGroup(f,P,S===!0?1:2),f+=P}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ic(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ni{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),r=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let i=0;const r=n.length;let o;t?o=t:o=e*n[r-1];let a=0,l=r-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=n[i]-o,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,n[i]===o)return i/(r-1);const d=n[i],u=n[i+1]-d,h=(o-d)/u;return(i+h)/(r-1)}getTangent(e,t){let i=e-1e-4,r=e+1e-4;i<0&&(i=0),r>1&&(r=1);const o=this.getPoint(i),a=this.getPoint(r),l=t||(o.isVector2?new et:new I);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new I,i=[],r=[],o=[],a=new I,l=new Et;for(let h=0;h<=e;h++){const g=h/e;i[h]=this.getTangentAt(g,new I)}r[0]=new I,o[0]=new I;let c=Number.MAX_VALUE;const d=Math.abs(i[0].x),m=Math.abs(i[0].y),u=Math.abs(i[0].z);d<=c&&(c=d,n.set(1,0,0)),m<=c&&(c=m,n.set(0,1,0)),u<=c&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),o[0].crossVectors(i[0],r[0]);for(let h=1;h<=e;h++){if(r[h]=r[h-1].clone(),o[h]=o[h-1].clone(),a.crossVectors(i[h-1],i[h]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Vt(i[h-1].dot(i[h]),-1,1));r[h].applyMatrix4(l.makeRotationAxis(a,g))}o[h].crossVectors(i[h],r[h])}if(t===!0){let h=Math.acos(Vt(r[0].dot(r[e]),-1,1));h/=e,i[0].dot(a.crossVectors(r[0],r[e]))>0&&(h=-h);for(let g=1;g<=e;g++)r[g].applyMatrix4(l.makeRotationAxis(i[g],h*g)),o[g].crossVectors(i[g],r[g])}return{tangents:i,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class G0 extends Ni{constructor(e=0,t=0,n=1,i=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new et){const n=t,i=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(o?r=0:r=i),this.aClockwise===!0&&!o&&(r===i?r=-i:r=r-i);const a=this.aStartAngle+e*r;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const d=Math.cos(this.aRotation),m=Math.sin(this.aRotation),u=l-this.aX,h=c-this.aY;l=u*d-h*m+this.aX,c=u*m+h*d+this.aY}return n.set(l,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class d1 extends G0{constructor(e,t,n,i,r,o){super(e,t,n,n,i,r,o),this.isArcCurve=!0,this.type="ArcCurve"}}function sc(){let s=0,e=0,t=0,n=0;function i(r,o,a,l){s=r,e=a,t=-3*r+3*o-2*a-l,n=2*r-2*o+a+l}return{initCatmullRom:function(r,o,a,l,c){i(o,a,c*(a-r),c*(l-o))},initNonuniformCatmullRom:function(r,o,a,l,c,d,m){let u=(o-r)/c-(a-r)/(c+d)+(a-o)/d,h=(a-o)/d-(l-o)/(d+m)+(l-a)/m;u*=d,h*=d,i(o,a,u,h)},calc:function(r){const o=r*r,a=o*r;return s+e*r+t*o+n*a}}}const Qr=new I,xo=new sc,Mo=new sc,bo=new sc;class rc extends Ni{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new I){const n=t,i=this.points,r=i.length,o=(r-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,d;this.closed||a>0?c=i[(a-1)%r]:(Qr.subVectors(i[0],i[1]).add(i[0]),c=Qr);const m=i[a%r],u=i[(a+1)%r];if(this.closed||a+2<r?d=i[(a+2)%r]:(Qr.subVectors(i[r-1],i[r-2]).add(i[r-1]),d=Qr),this.curveType==="centripetal"||this.curveType==="chordal"){const h=this.curveType==="chordal"?.5:.25;let g=Math.pow(c.distanceToSquared(m),h),_=Math.pow(m.distanceToSquared(u),h),p=Math.pow(u.distanceToSquared(d),h);_<1e-4&&(_=1),g<1e-4&&(g=_),p<1e-4&&(p=_),xo.initNonuniformCatmullRom(c.x,m.x,u.x,d.x,g,_,p),Mo.initNonuniformCatmullRom(c.y,m.y,u.y,d.y,g,_,p),bo.initNonuniformCatmullRom(c.z,m.z,u.z,d.z,g,_,p)}else this.curveType==="catmullrom"&&(xo.initCatmullRom(c.x,m.x,u.x,d.x,this.tension),Mo.initCatmullRom(c.y,m.y,u.y,d.y,this.tension),bo.initCatmullRom(c.z,m.z,u.z,d.z,this.tension));return n.set(xo.calc(l),Mo.calc(l),bo.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new I().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function oh(s,e,t,n,i){const r=(n-e)*.5,o=(i-t)*.5,a=s*s,l=s*a;return(2*t-2*n+r+o)*l+(-3*t+3*n-2*r-o)*a+r*s+t}function f1(s,e){const t=1-s;return t*t*e}function p1(s,e){return 2*(1-s)*s*e}function m1(s,e){return s*s*e}function pr(s,e,t,n){return f1(s,e)+p1(s,t)+m1(s,n)}function g1(s,e){const t=1-s;return t*t*t*e}function _1(s,e){const t=1-s;return 3*t*t*s*e}function v1(s,e){return 3*(1-s)*s*s*e}function y1(s,e){return s*s*s*e}function mr(s,e,t,n,i){return g1(s,e)+_1(s,t)+v1(s,n)+y1(s,i)}class x1 extends Ni{constructor(e=new et,t=new et,n=new et,i=new et){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new et){const n=t,i=this.v0,r=this.v1,o=this.v2,a=this.v3;return n.set(mr(e,i.x,r.x,o.x,a.x),mr(e,i.y,r.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class M1 extends Ni{constructor(e=new I,t=new I,n=new I,i=new I){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new I){const n=t,i=this.v0,r=this.v1,o=this.v2,a=this.v3;return n.set(mr(e,i.x,r.x,o.x,a.x),mr(e,i.y,r.y,o.y,a.y),mr(e,i.z,r.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class b1 extends Ni{constructor(e=new et,t=new et){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new et){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new et){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class S1 extends Ni{constructor(e=new I,t=new I){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new I){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new I){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class E1 extends Ni{constructor(e=new et,t=new et,n=new et){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new et){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(pr(e,i.x,r.x,o.x),pr(e,i.y,r.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class W0 extends Ni{constructor(e=new I,t=new I,n=new I){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new I){const n=t,i=this.v0,r=this.v1,o=this.v2;return n.set(pr(e,i.x,r.x,o.x),pr(e,i.y,r.y,o.y),pr(e,i.z,r.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class A1 extends Ni{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new et){const n=t,i=this.points,r=(i.length-1)*e,o=Math.floor(r),a=r-o,l=i[o===0?o:o-1],c=i[o],d=i[o>i.length-2?i.length-1:o+1],m=i[o>i.length-3?i.length-1:o+2];return n.set(oh(a,l.x,c.x,d.x,m.x),oh(a,l.y,c.y,d.y,m.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new et().fromArray(i))}return this}}var w1=Object.freeze({__proto__:null,ArcCurve:d1,CatmullRomCurve3:rc,CubicBezierCurve:x1,CubicBezierCurve3:M1,EllipseCurve:G0,LineCurve:b1,LineCurve3:S1,QuadraticBezierCurve:E1,QuadraticBezierCurve3:W0,SplineCurve:A1});class Di extends hn{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,o=t/2,a=Math.floor(n),l=Math.floor(i),c=a+1,d=l+1,m=e/a,u=t/l,h=[],g=[],_=[],p=[];for(let f=0;f<d;f++){const v=f*u-o;for(let b=0;b<c;b++){const S=b*m-r;g.push(S,-v,0),_.push(0,0,1),p.push(b/a),p.push(1-f/l)}}for(let f=0;f<l;f++)for(let v=0;v<a;v++){const b=v+c*f,S=v+c*(f+1),F=v+1+c*(f+1),C=v+1+c*f;h.push(b,S,C),h.push(S,F,C)}this.setIndex(h),this.setAttribute("position",new It(g,3)),this.setAttribute("normal",new It(_,3)),this.setAttribute("uv",new It(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Di(e.width,e.height,e.widthSegments,e.heightSegments)}}class Oa extends hn{constructor(e=1,t=32,n=16,i=0,r=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(o+a,Math.PI);let c=0;const d=[],m=new I,u=new I,h=[],g=[],_=[],p=[];for(let f=0;f<=n;f++){const v=[],b=f/n;let S=0;f===0&&o===0?S=.5/t:f===n&&l===Math.PI&&(S=-.5/t);for(let F=0;F<=t;F++){const C=F/t;m.x=-e*Math.cos(i+C*r)*Math.sin(o+b*a),m.y=e*Math.cos(o+b*a),m.z=e*Math.sin(i+C*r)*Math.sin(o+b*a),g.push(m.x,m.y,m.z),u.copy(m).normalize(),_.push(u.x,u.y,u.z),p.push(C+S,1-b),v.push(c++)}d.push(v)}for(let f=0;f<n;f++)for(let v=0;v<t;v++){const b=d[f][v+1],S=d[f][v],F=d[f+1][v],C=d[f+1][v+1];(f!==0||o>0)&&h.push(b,S,C),(f!==n-1||l<Math.PI)&&h.push(S,F,C)}this.setIndex(h),this.setAttribute("position",new It(g,3)),this.setAttribute("normal",new It(_,3)),this.setAttribute("uv",new It(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Oa(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class ka extends hn{constructor(e=new W0(new I(-1,-1,0),new I(-1,1,0),new I(1,1,0)),t=64,n=1,i=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r};const o=e.computeFrenetFrames(t,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new I,l=new I,c=new et;let d=new I;const m=[],u=[],h=[],g=[];_(),this.setIndex(g),this.setAttribute("position",new It(m,3)),this.setAttribute("normal",new It(u,3)),this.setAttribute("uv",new It(h,2));function _(){for(let b=0;b<t;b++)p(b);p(r===!1?t:0),v(),f()}function p(b){d=e.getPointAt(b/t,d);const S=o.normals[b],F=o.binormals[b];for(let C=0;C<=i;C++){const R=C/i*Math.PI*2,P=Math.sin(R),A=-Math.cos(R);l.x=A*S.x+P*F.x,l.y=A*S.y+P*F.y,l.z=A*S.z+P*F.z,l.normalize(),u.push(l.x,l.y,l.z),a.x=d.x+n*l.x,a.y=d.y+n*l.y,a.z=d.z+n*l.z,m.push(a.x,a.y,a.z)}}function f(){for(let b=1;b<=t;b++)for(let S=1;S<=i;S++){const F=(i+1)*(b-1)+(S-1),C=(i+1)*b+(S-1),R=(i+1)*b+S,P=(i+1)*(b-1)+S;g.push(F,C,P),g.push(C,R,P)}}function v(){for(let b=0;b<=t;b++)for(let S=0;S<=i;S++)c.x=b/t,c.y=S/i,h.push(c.x,c.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new ka(new w1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class T1 extends hn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,i=new I,r=new I;if(e.index!==null){const o=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let c=0,d=l.length;c<d;++c){const m=l[c],u=m.start,h=m.count;for(let g=u,_=u+h;g<_;g+=3)for(let p=0;p<3;p++){const f=a.getX(g+p),v=a.getX(g+(p+1)%3);i.fromBufferAttribute(o,f),r.fromBufferAttribute(o,v),lh(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}}else{const o=e.attributes.position;for(let a=0,l=o.count/3;a<l;a++)for(let c=0;c<3;c++){const d=3*a+c,m=3*a+(c+1)%3;i.fromBufferAttribute(o,d),r.fromBufferAttribute(o,m),lh(i,r,n)===!0&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new It(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function lh(s,e,t){const n=`${s.x},${s.y},${s.z}-${e.x},${e.y},${e.z}`,i=`${e.x},${e.y},${e.z}-${s.x},${s.y},${s.z}`;return t.has(n)===!0||t.has(i)===!0?!1:(t.add(n),t.add(i),!0)}class X0 extends qn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Tt(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class j0 extends qn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Tt(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 Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class fn extends qn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Tt(16777215),this.specular=new Tt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class C1 extends qn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Tt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Tt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new et(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Sn,this.combine=Fa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class R1 extends qn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=a2,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 D1 extends qn{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 ea(s,e){return!s||s.constructor===e?s:typeof e.BYTES_PER_ELEMENT=="number"?new e(s):Array.prototype.slice.call(s)}function L1(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function P1(s){function e(i,r){return s[i]-s[r]}const t=s.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function ch(s,e,t){const n=s.length,i=new s.constructor(n);for(let r=0,o=0;o!==n;++r){const a=t[r]*e;for(let l=0;l!==e;++l)i[o++]=s[a+l]}return i}function q0(s,e,t,n){let i=1,r=s[0];for(;r!==void 0&&r[n]===void 0;)r=s[i++];if(r===void 0)return;let o=r[n];if(o!==void 0)if(Array.isArray(o))do o=r[n],o!==void 0&&(e.push(r.time),t.push(...o)),r=s[i++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[n],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=s[i++];while(r!==void 0);else do o=r[n],o!==void 0&&(e.push(r.time),t.push(o)),r=s[i++];while(r!==void 0)}class Va{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],r=t[n-1];n:{e:{let o;t:{i:if(!(e<i)){for(let a=n+2;;){if(i===void 0){if(e<r)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(r=i,i=t[++n],e<i)break e}o=t.length;break t}if(!(e>=r)){const a=t[1];e<a&&(n=2,r=a);for(let l=n-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=r,r=t[--n-1],e>=r)break e}o=n,n=0;break t}break n}for(;n<o;){const a=n+o>>>1;e<t[a]?o=a:n=a+1}if(i=t[n],r=t[n-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let o=0;o!==i;++o)t[o]=n[r+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class F1 extends Va{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Sc,endingEnd:Sc}}intervalChanged_(e,t,n){const i=this.parameterPositions;let r=e-2,o=e+1,a=i[r],l=i[o];if(a===void 0)switch(this.getSettings_().endingStart){case Ec:r=e,a=2*t-n;break;case Ac:r=i.length-2,a=t+i[r]-i[r+1];break;default:r=e,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case Ec:o=e,l=2*n-t;break;case Ac:o=1,l=n+i[1]-i[0];break;default:o=e-1,l=t}const c=(n-t)*.5,d=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-n),this._offsetPrev=r*d,this._offsetNext=o*d}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,d=this._offsetPrev,m=this._offsetNext,u=this._weightPrev,h=this._weightNext,g=(n-t)/(i-t),_=g*g,p=_*g,f=-u*p+2*u*_-u*g,v=(1+u)*p+(-1.5-2*u)*_+(-.5+u)*g+1,b=(-1-h)*p+(1.5+h)*_+.5*g,S=h*p-h*_;for(let F=0;F!==a;++F)r[F]=f*o[d+F]+v*o[c+F]+b*o[l+F]+S*o[m+F];return r}}class N1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,d=(n-t)/(i-t),m=1-d;for(let u=0;u!==a;++u)r[u]=o[c+u]*m+o[l+u]*d;return r}}class U1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class li{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ea(t,this.TimeBufferType),this.values=ea(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:ea(e.times,Array),values:ea(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new U1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new N1(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new F1(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Ea:t=this.InterpolantFactoryMethodDiscrete;break;case Tl:t=this.InterpolantFactoryMethodLinear;break;case ja:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ea;case this.InterpolantFactoryMethodLinear:return Tl;case this.InterpolantFactoryMethodSmooth:return ja}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let r=0,o=i-1;for(;r!==i&&n[r]<e;)++r;for(;o!==-1&&n[o]>t;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=n.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,r=n.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(i!==void 0&&L1(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===ja,r=e.length-1;let o=1;for(let a=1;a<r;++a){let l=!1;const c=e[a],d=e[a+1];if(c!==d&&(a!==1||c!==e[0]))if(i)l=!0;else{const m=a*n,u=m-n,h=m+n;for(let g=0;g!==n;++g){const _=t[m+g];if(_!==t[u+g]||_!==t[h+g]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const m=a*n,u=o*n;for(let h=0;h!==n;++h)t[u+h]=t[m+h]}++o}}if(r>0){e[o]=e[r];for(let a=r*n,l=o*n,c=0;c!==n;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}li.prototype.ValueTypeName="";li.prototype.TimeBufferType=Float32Array;li.prototype.ValueBufferType=Float32Array;li.prototype.DefaultInterpolation=Tl;class Js extends li{constructor(e,t,n){super(e,t,n)}}Js.prototype.ValueTypeName="bool";Js.prototype.ValueBufferType=Array;Js.prototype.DefaultInterpolation=Ea;Js.prototype.InterpolantFactoryMethodLinear=void 0;Js.prototype.InterpolantFactoryMethodSmooth=void 0;class $0 extends li{constructor(e,t,n,i){super(e,t,n,i)}}$0.prototype.ValueTypeName="color";class Da extends li{constructor(e,t,n,i){super(e,t,n,i)}}Da.prototype.ValueTypeName="number";class I1 extends Va{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-t)/(i-t);let c=e*a;for(let d=c+a;c!==d;c+=4)Vn.slerpFlat(r,0,o,c-a,o,c,l);return r}}class Er extends li{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new I1(this.times,this.values,this.getValueSize(),e)}}Er.prototype.ValueTypeName="quaternion";Er.prototype.InterpolantFactoryMethodSmooth=void 0;class Ks extends li{constructor(e,t,n){super(e,t,n)}}Ks.prototype.ValueTypeName="string";Ks.prototype.ValueBufferType=Array;Ks.prototype.DefaultInterpolation=Ea;Ks.prototype.InterpolantFactoryMethodLinear=void 0;Ks.prototype.InterpolantFactoryMethodSmooth=void 0;class $s extends li{constructor(e,t,n,i){super(e,t,n,i)}}$s.prototype.ValueTypeName="vector";class hh{constructor(e="",t=-1,n=[],i=r2){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=ai(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(B1(n[o]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=n.length;r!==o;++r)t.push(li.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const r=t.length,o=[];for(let a=0;a<r;a++){let l=[],c=[];l.push((a+r-1)%r,a,(a+1)%r),c.push(0,1,0);const d=P1(l);l=ch(l,1,d),c=ch(c,1,d),!i&&l[0]===0&&(l.push(r),c.push(c[0])),o.push(new Da(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],d=c.name.match(r);if(d&&d.length>1){const m=d[1];let u=i[m];u||(i[m]=u=[]),u.push(c)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],t,n));return o}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(m,u,h,g,_){if(h.length!==0){const p=[],f=[];q0(h,p,f,g),p.length!==0&&_.push(new m(u,p,f))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let m=0;m<c.length;m++){const u=c[m].keys;if(!(!u||u.length===0))if(u[0].morphTargets){const h={};let g;for(g=0;g<u.length;g++)if(u[g].morphTargets)for(let _=0;_<u[g].morphTargets.length;_++)h[u[g].morphTargets[_]]=-1;for(const _ in h){const p=[],f=[];for(let v=0;v!==u[g].morphTargets.length;++v){const b=u[g];p.push(b.time),f.push(b.morphTarget===_?1:0)}i.push(new Da(".morphTargetInfluence["+_+"]",p,f))}l=h.length*o}else{const h=".bones["+t[m].name+"]";n($s,h+".position",u,"pos",i),n(Er,h+".quaternion",u,"rot",i),n($s,h+".scale",u,"scl",i)}}return i.length===0?null:new this(r,l,i,a)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,i=e.length;n!==i;++n){const r=this.tracks[n];t=Math.max(t,r.times[r.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let 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 z1(s){switch(s.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Da;case"vector":case"vector2":case"vector3":case"vector4":return $s;case"color":return $0;case"quaternion":return Er;case"bool":case"boolean":return Js;case"string":return Ks}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function B1(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=z1(s.type);if(s.times===void 0){const t=[],n=[];q0(s.keys,t,n,"value"),s.times=t,s.values=n}return e.parse!==void 0?e.parse(s):new e(s.name,s.times,s.values,s.interpolation)}const La={enabled:!1,files:{},add:function(s,e){this.enabled!==!1&&(this.files[s]=e)},get:function(s){if(this.enabled!==!1)return this.files[s]},remove:function(s){delete this.files[s]},clear:function(){this.files={}}};class Y0{constructor(e,t,n){const i=this;let r=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(d){a++,r===!1&&i.onStart!==void 0&&i.onStart(d,o,a),r=!0},this.itemEnd=function(d){o++,i.onProgress!==void 0&&i.onProgress(d,o,a),o===a&&(r=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(d){i.onError!==void 0&&i.onError(d)},this.resolveURL=function(d){return l?l(d):d},this.setURLModifier=function(d){return l=d,this},this.addHandler=function(d,m){return c.push(d,m),this},this.removeHandler=function(d){const m=c.indexOf(d);return m!==-1&&c.splice(m,2),this},this.getHandler=function(d){for(let m=0,u=c.length;m<u;m+=2){const h=c[m],g=c[m+1];if(h.global&&(h.lastIndex=0),h.test(d))return g}return null}}}const ac=new Y0;class oi{constructor(e){this.manager=e!==void 0?e:ac,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,r){n.load(e,i,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}oi.DEFAULT_MATERIAL_NAME="__DEFAULT";const bi={};class O1 extends Error{constructor(e,t){super(e),this.response=t}}class Zs extends oi{constructor(e){super(e),this.mimeType="",this.responseType=""}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=La.get(e);if(r!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0),r;if(bi[e]!==void 0){bi[e].push({onLoad:t,onProgress:n,onError:i});return}bi[e]=[],bi[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const d=bi[e],m=c.body.getReader(),u=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),h=u?parseInt(u):0,g=h!==0;let _=0;const p=new ReadableStream({start(f){v();function v(){m.read().then(({done:b,value:S})=>{if(b)f.close();else{_+=S.byteLength;const F=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:h});for(let C=0,R=d.length;C<R;C++){const P=d[C];P.onProgress&&P.onProgress(F)}f.enqueue(S),v()}},b=>{f.error(b)})}}});return new Response(p)}else throw new O1(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return c.json();default:if(a==="")return c.text();{const m=/charset="?([^;"\s]*)"?/i.exec(a),u=m&&m[1]?m[1].toLowerCase():void 0,h=new TextDecoder(u);return c.arrayBuffer().then(g=>h.decode(g))}}}).then(c=>{La.add(e,c);const d=bi[e];delete bi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onLoad&&h.onLoad(c)}}).catch(c=>{const d=bi[e];if(d===void 0)throw this.manager.itemError(e),c;delete bi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onError&&h.onError(c)}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 k1 extends oi{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=La.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a=Mr("img");function l(){d(),La.add(e,this),t&&t(this),r.manager.itemEnd(e)}function c(m){d(),i&&i(m),r.manager.itemError(e),r.manager.itemEnd(e)}function d(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class V1 extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new V0,a=new Zs(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(r.withCredentials),a.load(e,function(l){let c;try{c=r.parse(l)}catch(d){if(i!==void 0)i(d);else{console.error(d);return}}c.image!==void 0?o.image=c.image:c.data!==void 0&&(o.image.width=c.width,o.image.height=c.height,o.image.data=c.data),o.wrapS=c.wrapS!==void 0?c.wrapS:ri,o.wrapT=c.wrapT!==void 0?c.wrapT:ri,o.magFilter=c.magFilter!==void 0?c.magFilter:Xn,o.minFilter=c.minFilter!==void 0?c.minFilter:Xn,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0&&(o.colorSpace=c.colorSpace),c.flipY!==void 0&&(o.flipY=c.flipY),c.format!==void 0&&(o.format=c.format),c.type!==void 0&&(o.type=c.type),c.mipmaps!==void 0&&(o.mipmaps=c.mipmaps,o.minFilter=Ai),c.mipmapCount===1&&(o.minFilter=Xn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},n,i),o}}class oc extends oi{constructor(e){super(e)}load(e,t,n,i){const r=new Tn,o=new k1(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}}class Ar extends ln{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Tt(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,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(t.object.target=this.target.uuid),t}}class J0 extends Ar{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Tt(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const So=new Et,uh=new I,dh=new I;class lc{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new et(512,512),this.mapType=mi,this.map=null,this.mapPass=null,this.matrix=new Et,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new nc,this._frameExtents=new et(1,1),this._viewportCount=1,this._viewports=[new Xt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;uh.setFromMatrixPosition(e.matrixWorld),t.position.copy(uh),dh.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(dh),t.updateMatrixWorld(),So.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(So),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(So)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class H1 extends lc{constructor(){super(new bn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=js*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=e.distance||t.far;(n!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class G1 extends Ar{constructor(e,t,n=0,i=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.target=new ln,this.distance=n,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new H1}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 fh=new Et,lr=new I,Eo=new I;class W1 extends lc{constructor(){super(new bn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new et(4,2),this._viewportCount=6,this._viewports=[new Xt(2,1,1,1),new Xt(0,1,1,1),new Xt(3,1,1,1),new Xt(1,1,1,1),new Xt(3,0,1,1),new Xt(1,0,1,1)],this._cubeDirections=[new I(1,0,0),new I(-1,0,0),new I(0,0,1),new I(0,0,-1),new I(0,1,0),new I(0,-1,0)],this._cubeUps=[new I(0,1,0),new I(0,1,0),new I(0,1,0),new I(0,1,0),new I(0,0,1),new I(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,r=e.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),lr.setFromMatrixPosition(e.matrixWorld),n.position.copy(lr),Eo.copy(n.position),Eo.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Eo),n.updateMatrixWorld(),i.makeTranslation(-lr.x,-lr.y,-lr.z),fh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fh)}}class Pa extends Ar{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new W1}get power(){return this.intensity*4*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 Ha extends U0{constructor(e=-1,t=1,n=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-e,o=n+e,a=i+t,l=i-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,o=r+c*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}class X1 extends lc{constructor(){super(new Ha(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class gr extends Ar{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ln.DEFAULT_UP),this.updateMatrix(),this.target=new ln,this.shadow=new X1}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class cc extends Ar{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class hc{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class j1 extends hn{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class q1 extends bn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class $1{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ph(),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=ph();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function ph(){return performance.now()}class Dl extends z0{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}const mh=new Et;class Y1{constructor(e,t,n=0,i=1/0){this.ray=new Ys(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new Zl,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: Unsupported camera type: "+t.type)}setFromXRController(e){return mh.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(mh),this}intersectObject(e,t=!0,n=[]){return Ll(e,this,n,t),n.sort(gh),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)Ll(e[i],this,n,t);return n.sort(gh),n}}function gh(s,e){return s.distance-e.distance}function Ll(s,e,t,n){let i=!0;if(s.layers.test(e.layers)&&s.raycast(e,t)===!1&&(i=!1),i===!0&&n===!0){const r=s.children;for(let o=0,a=r.length;o<a;o++)Ll(r[o],e,t,!0)}}class Pl{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Vt(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(Vt(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const _h=new I,ta=new I;class J1{constructor(e=new I,t=new I){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){_h.subVectors(e,this.start),ta.subVectors(this.end,this.start);const n=ta.dot(ta);let r=ta.dot(_h)/n;return t&&(r=Vt(r,0,1)),r}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}class K0 extends Ra{constructor(e=10,t=10,n=4473924,i=8947848){n=new Tt(n),i=new Tt(i);const r=t/2,o=e/t,a=e/2,l=[],c=[];for(let u=0,h=0,g=-a;u<=t;u++,g+=o){l.push(-a,0,g,a,0,g),l.push(g,0,-a,g,0,a);const _=u===r?n:i;_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3,_.toArray(c,h),h+=3}const d=new hn;d.setAttribute("position",new It(l,3)),d.setAttribute("color",new It(c,3));const m=new Ri({vertexColors:!0,toneMapped:!1});super(d,m),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class K1 extends ds{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){console.warn("THREE.Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function vh(s,e,t,n){const i=Z1(n);switch(t){case S0:return s*e;case A0:return s*e/i.components*i.byteLength;case ql:return s*e/i.components*i.byteLength;case w0:return s*e*2/i.components*i.byteLength;case $l:return s*e*2/i.components*i.byteLength;case E0:return s*e*3/i.components*i.byteLength;case Zn:return s*e*4/i.components*i.byteLength;case Yl:return s*e*4/i.components*i.byteLength;case ga:case _a:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case va:case ya:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case nl:case sl:return Math.max(s,16)*Math.max(e,8)/4;case tl:case il:return Math.max(s,8)*Math.max(e,8)/2;case rl:case al:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case ol:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case ll:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case cl:return Math.floor((s+4)/5)*Math.floor((e+3)/4)*16;case hl:return Math.floor((s+4)/5)*Math.floor((e+4)/5)*16;case ul:return Math.floor((s+5)/6)*Math.floor((e+4)/5)*16;case dl:return Math.floor((s+5)/6)*Math.floor((e+5)/6)*16;case fl:return Math.floor((s+7)/8)*Math.floor((e+4)/5)*16;case pl:return Math.floor((s+7)/8)*Math.floor((e+5)/6)*16;case ml:return Math.floor((s+7)/8)*Math.floor((e+7)/8)*16;case gl:return Math.floor((s+9)/10)*Math.floor((e+4)/5)*16;case _l:return Math.floor((s+9)/10)*Math.floor((e+5)/6)*16;case vl:return Math.floor((s+9)/10)*Math.floor((e+7)/8)*16;case yl:return Math.floor((s+9)/10)*Math.floor((e+9)/10)*16;case xl:return Math.floor((s+11)/12)*Math.floor((e+9)/10)*16;case Ml:return Math.floor((s+11)/12)*Math.floor((e+11)/12)*16;case xa:case bl:case Sl:return Math.ceil(s/4)*Math.ceil(e/4)*16;case T0:case El:return Math.ceil(s/4)*Math.ceil(e/4)*8;case Al:case wl:return Math.ceil(s/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function Z1(s){switch(s){case mi:case x0:return{byteLength:1,components:1};case _r:case M0:case Sr:return{byteLength:2,components:1};case Xl:case jl:return{byteLength:2,components:4};case hs:case Wl:case fi:return{byteLength:4,components:1};case b0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Vl}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Vl);/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2010-2025 Three.js Authors
|
|
47
47
|
* SPDX-License-Identifier: MIT
|
|
@@ -587,7 +587,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
|
|
|
587
587
|
uniform sampler2D envMap;
|
|
588
588
|
#endif
|
|
589
589
|
|
|
590
|
-
#endif`,
|
|
590
|
+
#endif`,Nd=`#ifdef USE_ENVMAP
|
|
591
591
|
uniform float reflectivity;
|
|
592
592
|
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
|
|
593
593
|
#define ENV_WORLDPOS
|
|
@@ -598,7 +598,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
|
|
|
598
598
|
#else
|
|
599
599
|
varying vec3 vReflect;
|
|
600
600
|
#endif
|
|
601
|
-
#endif`,
|
|
601
|
+
#endif`,Ud=`#ifdef USE_ENVMAP
|
|
602
602
|
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
|
|
603
603
|
#define ENV_WORLDPOS
|
|
604
604
|
#endif
|
|
@@ -1685,11 +1685,11 @@ gl_Position = projectionMatrix * mvPosition;`,Pf=`#ifdef DITHERING
|
|
|
1685
1685
|
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
|
|
1686
1686
|
return color + dither_shift_RGB;
|
|
1687
1687
|
}
|
|
1688
|
-
#endif`,
|
|
1688
|
+
#endif`,Nf=`float roughnessFactor = roughness;
|
|
1689
1689
|
#ifdef USE_ROUGHNESSMAP
|
|
1690
1690
|
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
|
|
1691
1691
|
roughnessFactor *= texelRoughness.g;
|
|
1692
|
-
#endif`,
|
|
1692
|
+
#endif`,Uf=`#ifdef USE_ROUGHNESSMAP
|
|
1693
1693
|
uniform sampler2D roughnessMap;
|
|
1694
1694
|
#endif`,If=`#if NUM_SPOT_LIGHT_COORDS > 0
|
|
1695
1695
|
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
|
|
@@ -3571,7 +3571,7 @@ void main() {
|
|
|
3571
3571
|
#include <tonemapping_fragment>
|
|
3572
3572
|
#include <colorspace_fragment>
|
|
3573
3573
|
#include <fog_fragment>
|
|
3574
|
-
}`,Ht={alphahash_fragment:ed,alphahash_pars_fragment:td,alphamap_fragment:nd,alphamap_pars_fragment:id,alphatest_fragment:sd,alphatest_pars_fragment:rd,aomap_fragment:ad,aomap_pars_fragment:od,batching_pars_vertex:ld,batching_vertex:cd,begin_vertex:hd,beginnormal_vertex:ud,bsdfs:dd,iridescence_fragment:fd,bumpmap_pars_fragment:pd,clipping_planes_fragment:md,clipping_planes_pars_fragment:gd,clipping_planes_pars_vertex:_d,clipping_planes_vertex:vd,color_fragment:yd,color_pars_fragment:xd,color_pars_vertex:Md,color_vertex:bd,common:Sd,cube_uv_reflection_fragment:Ed,defaultnormal_vertex:Ad,displacementmap_pars_vertex:wd,displacementmap_vertex:Td,emissivemap_fragment:Cd,emissivemap_pars_fragment:Rd,colorspace_fragment:Dd,colorspace_pars_fragment:Ld,envmap_fragment:Pd,envmap_common_pars_fragment:Fd,envmap_pars_fragment:Ud,envmap_pars_vertex:Nd,envmap_physical_pars_fragment:jd,envmap_vertex:Id,fog_vertex:zd,fog_pars_vertex:Bd,fog_fragment:Od,fog_pars_fragment:kd,gradientmap_pars_fragment:Vd,lightmap_pars_fragment:Hd,lights_lambert_fragment:Gd,lights_lambert_pars_fragment:Wd,lights_pars_begin:Xd,lights_toon_fragment:qd,lights_toon_pars_fragment:$d,lights_phong_fragment:Yd,lights_phong_pars_fragment:Jd,lights_physical_fragment:Kd,lights_physical_pars_fragment:Zd,lights_fragment_begin:Qd,lights_fragment_maps:ef,lights_fragment_end:tf,logdepthbuf_fragment:nf,logdepthbuf_pars_fragment:sf,logdepthbuf_pars_vertex:rf,logdepthbuf_vertex:af,map_fragment:of,map_pars_fragment:lf,map_particle_fragment:cf,map_particle_pars_fragment:hf,metalnessmap_fragment:uf,metalnessmap_pars_fragment:df,morphinstance_vertex:ff,morphcolor_vertex:pf,morphnormal_vertex:mf,morphtarget_pars_vertex:gf,morphtarget_vertex:_f,normal_fragment_begin:vf,normal_fragment_maps:yf,normal_pars_fragment:xf,normal_pars_vertex:Mf,normal_vertex:bf,normalmap_pars_fragment:Sf,clearcoat_normal_fragment_begin:Ef,clearcoat_normal_fragment_maps:Af,clearcoat_pars_fragment:wf,iridescence_pars_fragment:Tf,opaque_fragment:Cf,packing:Rf,premultiplied_alpha_fragment:Df,project_vertex:Lf,dithering_fragment:Pf,dithering_pars_fragment:Ff,roughnessmap_fragment:Uf,roughnessmap_pars_fragment:Nf,shadowmap_pars_fragment:If,shadowmap_pars_vertex:zf,shadowmap_vertex:Bf,shadowmask_pars_fragment:Of,skinbase_vertex:kf,skinning_pars_vertex:Vf,skinning_vertex:Hf,skinnormal_vertex:Gf,specularmap_fragment:Wf,specularmap_pars_fragment:Xf,tonemapping_fragment:jf,tonemapping_pars_fragment:qf,transmission_fragment:$f,transmission_pars_fragment:Yf,uv_pars_fragment:Jf,uv_pars_vertex:Kf,uv_vertex:Zf,worldpos_vertex:Qf,background_vert:ep,background_frag:tp,backgroundCube_vert:np,backgroundCube_frag:ip,cube_vert:sp,cube_frag:rp,depth_vert:ap,depth_frag:op,distanceRGBA_vert:lp,distanceRGBA_frag:cp,equirect_vert:hp,equirect_frag:up,linedashed_vert:dp,linedashed_frag:fp,meshbasic_vert:pp,meshbasic_frag:mp,meshlambert_vert:gp,meshlambert_frag:_p,meshmatcap_vert:vp,meshmatcap_frag:yp,meshnormal_vert:xp,meshnormal_frag:Mp,meshphong_vert:bp,meshphong_frag:Sp,meshphysical_vert:Ep,meshphysical_frag:Ap,meshtoon_vert:wp,meshtoon_frag:Tp,points_vert:Cp,points_frag:Rp,shadow_vert:Dp,shadow_frag:Lp,sprite_vert:Pp,sprite_frag:Fp},Ke={common:{diffuse:{value:new Tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new kt},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new kt}},envmap:{envMap:{value:null},envMapRotation:{value:new kt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new kt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new kt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new kt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new kt},normalScale:{value:new et(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new kt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new kt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new kt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new kt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Tt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 Tt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0},uvTransform:{value:new kt}},sprite:{diffuse:{value:new Tt(16777215)},opacity:{value:1},center:{value:new et(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new kt},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0}}},kn={basic:{uniforms:Nn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.fog]),vertexShader:Ht.meshbasic_vert,fragmentShader:Ht.meshbasic_frag},lambert:{uniforms:Nn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new Tt(0)}}]),vertexShader:Ht.meshlambert_vert,fragmentShader:Ht.meshlambert_frag},phong:{uniforms:Nn([Ke.common,Ke.specularmap,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,Ke.lights,{emissive:{value:new Tt(0)},specular:{value:new Tt(1118481)},shininess:{value:30}}]),vertexShader:Ht.meshphong_vert,fragmentShader:Ht.meshphong_frag},standard:{uniforms:Nn([Ke.common,Ke.envmap,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.roughnessmap,Ke.metalnessmap,Ke.fog,Ke.lights,{emissive:{value:new Tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ht.meshphysical_vert,fragmentShader:Ht.meshphysical_frag},toon:{uniforms:Nn([Ke.common,Ke.aomap,Ke.lightmap,Ke.emissivemap,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.gradientmap,Ke.fog,Ke.lights,{emissive:{value:new Tt(0)}}]),vertexShader:Ht.meshtoon_vert,fragmentShader:Ht.meshtoon_frag},matcap:{uniforms:Nn([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,Ke.fog,{matcap:{value:null}}]),vertexShader:Ht.meshmatcap_vert,fragmentShader:Ht.meshmatcap_frag},points:{uniforms:Nn([Ke.points,Ke.fog]),vertexShader:Ht.points_vert,fragmentShader:Ht.points_frag},dashed:{uniforms:Nn([Ke.common,Ke.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ht.linedashed_vert,fragmentShader:Ht.linedashed_frag},depth:{uniforms:Nn([Ke.common,Ke.displacementmap]),vertexShader:Ht.depth_vert,fragmentShader:Ht.depth_frag},normal:{uniforms:Nn([Ke.common,Ke.bumpmap,Ke.normalmap,Ke.displacementmap,{opacity:{value:1}}]),vertexShader:Ht.meshnormal_vert,fragmentShader:Ht.meshnormal_frag},sprite:{uniforms:Nn([Ke.sprite,Ke.fog]),vertexShader:Ht.sprite_vert,fragmentShader:Ht.sprite_frag},background:{uniforms:{uvTransform:{value:new kt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ht.background_vert,fragmentShader:Ht.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new kt}},vertexShader:Ht.backgroundCube_vert,fragmentShader:Ht.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ht.cube_vert,fragmentShader:Ht.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ht.equirect_vert,fragmentShader:Ht.equirect_frag},distanceRGBA:{uniforms:Nn([Ke.common,Ke.displacementmap,{referencePosition:{value:new I},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ht.distanceRGBA_vert,fragmentShader:Ht.distanceRGBA_frag},shadow:{uniforms:Nn([Ke.lights,Ke.fog,{color:{value:new Tt(0)},opacity:{value:1}}]),vertexShader:Ht.shadow_vert,fragmentShader:Ht.shadow_frag}};kn.physical={uniforms:Nn([kn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new kt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new kt},clearcoatNormalScale:{value:new et(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new kt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new kt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new kt},sheen:{value:0},sheenColor:{value:new Tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new kt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new kt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new kt},transmissionSamplerSize:{value:new et},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new kt},attenuationDistance:{value:0},attenuationColor:{value:new Tt(0)},specularColor:{value:new Tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new kt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new kt},anisotropyVector:{value:new et},anisotropyMap:{value:null},anisotropyMapTransform:{value:new kt}}]),vertexShader:Ht.meshphysical_vert,fragmentShader:Ht.meshphysical_frag};const na={r:0,b:0,g:0},es=new Sn,Up=new Et;function Np(s,e,t,n,i,r,o){const a=new Tt(0);let l=r===!0?0:1,c,d,m=null,u=0,h=null;function g(y){let S=y.isScene===!0?y.background:null;return S&&S.isTexture&&(S=(y.backgroundBlurriness>0?t:e).get(S)),S}function _(y){let S=!1;const U=g(y);U===null?f(a,l):U&&U.isColor&&(f(U,1),S=!0);const C=s.xr.getEnvironmentBlendMode();C==="additive"?n.buffers.color.setClear(0,0,0,1,o):C==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(s.autoClear||S)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function p(y,S){const U=g(S);U&&(U.isCubeTexture||U.mapping===Ua)?(d===void 0&&(d=new zt(new $i(1,1,1),new Li({name:"BackgroundCubeMaterial",uniforms:qs(kn.backgroundCube.uniforms),vertexShader:kn.backgroundCube.vertexShader,fragmentShader:kn.backgroundCube.fragmentShader,side:In,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(C,L,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),es.copy(S.backgroundRotation),es.x*=-1,es.y*=-1,es.z*=-1,U.isCubeTexture&&U.isRenderTargetTexture===!1&&(es.y*=-1,es.z*=-1),d.material.uniforms.envMap.value=U,d.material.uniforms.flipEnvMap.value=U.isCubeTexture&&U.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Up.makeRotationFromEuler(es)),d.material.toneMapped=Gt.getTransfer(U.colorSpace)!==an,(m!==U||u!==U.version||h!==s.toneMapping)&&(d.material.needsUpdate=!0,m=U,u=U.version,h=s.toneMapping),d.layers.enableAll(),y.unshift(d,d.geometry,d.material,0,0,null)):U&&U.isTexture&&(c===void 0&&(c=new zt(new Di(2,2),new Li({name:"BackgroundMaterial",uniforms:qs(kn.background.uniforms),vertexShader:kn.background.vertexShader,fragmentShader:kn.background.fragmentShader,side:Qn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=U,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=Gt.getTransfer(U.colorSpace)!==an,U.matrixAutoUpdate===!0&&U.updateMatrix(),c.material.uniforms.uvTransform.value.copy(U.matrix),(m!==U||u!==U.version||h!==s.toneMapping)&&(c.material.needsUpdate=!0,m=U,u=U.version,h=s.toneMapping),c.layers.enableAll(),y.unshift(c,c.geometry,c.material,0,0,null))}function f(y,S){y.getRGB(na,U0(s)),n.buffers.color.setClear(na.r,na.g,na.b,S,o)}function x(){d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(y,S=1){a.set(y),l=S,f(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(y){l=y,f(a,l)},render:_,addToRenderList:p,dispose:x}}function Ip(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=u(null);let r=i,o=!1;function a(A,D,O,V,Q){let se=!1;const G=m(V,O,D);r!==G&&(r=G,c(r.object)),se=h(A,V,O,Q),se&&g(A,V,O,Q),Q!==null&&e.update(Q,s.ELEMENT_ARRAY_BUFFER),(se||o)&&(o=!1,S(A,D,O,V),Q!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(Q).buffer))}function l(){return s.createVertexArray()}function c(A){return s.bindVertexArray(A)}function d(A){return s.deleteVertexArray(A)}function m(A,D,O){const V=O.wireframe===!0;let Q=n[A.id];Q===void 0&&(Q={},n[A.id]=Q);let se=Q[D.id];se===void 0&&(se={},Q[D.id]=se);let G=se[V];return G===void 0&&(G=u(l()),se[V]=G),G}function u(A){const D=[],O=[],V=[];for(let Q=0;Q<t;Q++)D[Q]=0,O[Q]=0,V[Q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:D,enabledAttributes:O,attributeDivisors:V,object:A,attributes:{},index:null}}function h(A,D,O,V){const Q=r.attributes,se=D.attributes;let G=0;const ce=O.getAttributes();for(const Z in ce)if(ce[Z].location>=0){const De=Q[Z];let ye=se[Z];if(ye===void 0&&(Z==="instanceMatrix"&&A.instanceMatrix&&(ye=A.instanceMatrix),Z==="instanceColor"&&A.instanceColor&&(ye=A.instanceColor)),De===void 0||De.attribute!==ye||ye&&De.data!==ye.data)return!0;G++}return r.attributesNum!==G||r.index!==V}function g(A,D,O,V){const Q={},se=D.attributes;let G=0;const ce=O.getAttributes();for(const Z in ce)if(ce[Z].location>=0){let De=se[Z];De===void 0&&(Z==="instanceMatrix"&&A.instanceMatrix&&(De=A.instanceMatrix),Z==="instanceColor"&&A.instanceColor&&(De=A.instanceColor));const ye={};ye.attribute=De,De&&De.data&&(ye.data=De.data),Q[Z]=ye,G++}r.attributes=Q,r.attributesNum=G,r.index=V}function _(){const A=r.newAttributes;for(let D=0,O=A.length;D<O;D++)A[D]=0}function p(A){f(A,0)}function f(A,D){const O=r.newAttributes,V=r.enabledAttributes,Q=r.attributeDivisors;O[A]=1,V[A]===0&&(s.enableVertexAttribArray(A),V[A]=1),Q[A]!==D&&(s.vertexAttribDivisor(A,D),Q[A]=D)}function x(){const A=r.newAttributes,D=r.enabledAttributes;for(let O=0,V=D.length;O<V;O++)D[O]!==A[O]&&(s.disableVertexAttribArray(O),D[O]=0)}function y(A,D,O,V,Q,se,G){G===!0?s.vertexAttribIPointer(A,D,O,Q,se):s.vertexAttribPointer(A,D,O,V,Q,se)}function S(A,D,O,V){_();const Q=V.attributes,se=O.getAttributes(),G=D.defaultAttributeValues;for(const ce in se){const Z=se[ce];if(Z.location>=0){let ge=Q[ce];if(ge===void 0&&(ce==="instanceMatrix"&&A.instanceMatrix&&(ge=A.instanceMatrix),ce==="instanceColor"&&A.instanceColor&&(ge=A.instanceColor)),ge!==void 0){const De=ge.normalized,ye=ge.itemSize,_e=e.get(ge);if(_e===void 0)continue;const ae=_e.buffer,j=_e.type,Y=_e.bytesPerElement,ee=j===s.INT||j===s.UNSIGNED_INT||ge.gpuType===Wl;if(ge.isInterleavedBufferAttribute){const ne=ge.data,he=ne.stride,J=ge.offset;if(ne.isInstancedInterleavedBuffer){for(let ue=0;ue<Z.locationSize;ue++)f(Z.location+ue,ne.meshPerAttribute);A.isInstancedMesh!==!0&&V._maxInstanceCount===void 0&&(V._maxInstanceCount=ne.meshPerAttribute*ne.count)}else for(let ue=0;ue<Z.locationSize;ue++)p(Z.location+ue);s.bindBuffer(s.ARRAY_BUFFER,ae);for(let ue=0;ue<Z.locationSize;ue++)y(Z.location+ue,ye/Z.locationSize,j,De,he*Y,(J+ye/Z.locationSize*ue)*Y,ee)}else{if(ge.isInstancedBufferAttribute){for(let ne=0;ne<Z.locationSize;ne++)f(Z.location+ne,ge.meshPerAttribute);A.isInstancedMesh!==!0&&V._maxInstanceCount===void 0&&(V._maxInstanceCount=ge.meshPerAttribute*ge.count)}else for(let ne=0;ne<Z.locationSize;ne++)p(Z.location+ne);s.bindBuffer(s.ARRAY_BUFFER,ae);for(let ne=0;ne<Z.locationSize;ne++)y(Z.location+ne,ye/Z.locationSize,j,De,ye*Y,ye/Z.locationSize*ne*Y,ee)}}else if(G!==void 0){const De=G[ce];if(De!==void 0)switch(De.length){case 2:s.vertexAttrib2fv(Z.location,De);break;case 3:s.vertexAttrib3fv(Z.location,De);break;case 4:s.vertexAttrib4fv(Z.location,De);break;default:s.vertexAttrib1fv(Z.location,De)}}}}x()}function U(){P();for(const A in n){const D=n[A];for(const O in D){const V=D[O];for(const Q in V)d(V[Q].object),delete V[Q];delete D[O]}delete n[A]}}function C(A){if(n[A.id]===void 0)return;const D=n[A.id];for(const O in D){const V=D[O];for(const Q in V)d(V[Q].object),delete V[Q];delete D[O]}delete n[A.id]}function L(A){for(const D in n){const O=n[D];if(O[A.id]===void 0)continue;const V=O[A.id];for(const Q in V)d(V[Q].object),delete V[Q];delete O[A.id]}}function P(){E(),o=!0,r!==i&&(r=i,c(r.object))}function E(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:P,resetDefaultState:E,dispose:U,releaseStatesOfGeometry:C,releaseStatesOfProgram:L,initAttributes:_,enableAttribute:p,disableUnusedAttributes:x}}function zp(s,e,t){let n;function i(c){n=c}function r(c,d){s.drawArrays(n,c,d),t.update(d,n,1)}function o(c,d,m){m!==0&&(s.drawArraysInstanced(n,c,d,m),t.update(d,n,m))}function a(c,d,m){if(m===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,c,0,d,0,m);let h=0;for(let g=0;g<m;g++)h+=d[g];t.update(h,n,1)}function l(c,d,m,u){if(m===0)return;const h=e.get("WEBGL_multi_draw");if(h===null)for(let g=0;g<c.length;g++)o(c[g],d[g],u[g]);else{h.multiDrawArraysInstancedWEBGL(n,c,0,d,0,u,0,m);let g=0;for(let _=0;_<m;_++)g+=d[_]*u[_];t.update(g,n,1)}}this.setMode=i,this.render=r,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function Bp(s,e,t,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const L=e.get("EXT_texture_filter_anisotropic");i=s.getParameter(L.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(L){return!(L!==Zn&&n.convert(L)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(L){const P=L===Sr&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(L!==mi&&n.convert(L)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&L!==fi&&!P)}function l(L){if(L==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const m=t.logarithmicDepthBuffer===!0,u=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),h=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),g=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=s.getParameter(s.MAX_TEXTURE_SIZE),p=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),f=s.getParameter(s.MAX_VERTEX_ATTRIBS),x=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),y=s.getParameter(s.MAX_VARYING_VECTORS),S=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),U=g>0,C=s.getParameter(s.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:m,reverseDepthBuffer:u,maxTextures:h,maxVertexTextures:g,maxTextureSize:_,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:x,maxVaryings:y,maxFragmentUniforms:S,vertexTextures:U,maxSamples:C}}function Op(s){const e=this;let t=null,n=0,i=!1,r=!1;const o=new Jn,a=new kt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(m,u){const h=m.length!==0||u||n!==0||i;return i=u,n=m.length,h},this.beginShadows=function(){r=!0,d(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(m,u){t=d(m,u,0)},this.setState=function(m,u,h){const g=m.clippingPlanes,_=m.clipIntersection,p=m.clipShadows,f=s.get(m);if(!i||g===null||g.length===0||r&&!p)r?d(null):c();else{const x=r?0:n,y=x*4;let S=f.clippingState||null;l.value=S,S=d(g,u,y,h);for(let U=0;U!==y;++U)S[U]=t[U];f.clippingState=S,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(m,u,h,g){const _=m!==null?m.length:0;let p=null;if(_!==0){if(p=l.value,g!==!0||p===null){const f=h+_*4,x=u.matrixWorldInverse;a.getNormalMatrix(x),(p===null||p.length<f)&&(p=new Float32Array(f));for(let y=0,S=h;y!==_;++y,S+=4)o.copy(m[y]).applyMatrix4(x,a),o.normal.toArray(p,S),p[S+3]=o.constant}l.value=p,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,p}}function kp(s){let e=new WeakMap;function t(o,a){return a===Zo?o.mapping=Gs:a===Qo&&(o.mapping=Ws),o}function n(o){if(o&&o.isTexture){const a=o.mapping;if(a===Zo||a===Qo)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new s1(l.height);return c.fromEquirectangularTexture(s,o),e.set(o,c),o.addEventListener("dispose",i),t(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:n,dispose:r}}const zs=4,yh=[.125,.215,.35,.446,.526,.582],as=20,Ao=new Ha,xh=new Tt;let wo=null,To=0,Co=0,Ro=!1;const ss=(1+Math.sqrt(5))/2,Ps=1/ss,Mh=[new I(-ss,Ps,0),new I(ss,Ps,0),new I(-Ps,0,ss),new I(Ps,0,ss),new I(0,ss,-Ps),new I(0,ss,Ps),new I(-1,1,-1),new I(1,1,-1),new I(-1,1,1),new I(1,1,1)],Vp=new I;class bh{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,n=.1,i=100,r={}){const{size:o=256,position:a=Vp}=r;wo=this._renderer.getRenderTarget(),To=this._renderer.getActiveCubeFace(),Co=this._renderer.getActiveMipmapLevel(),Ro=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,n,i,l,a),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(){this._cubemapMaterial===null&&(this._cubemapMaterial=Ah(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Eh(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(wo,To,Co),this._renderer.xr.enabled=Ro,e.scissorTest=!1,ia(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Gs||e.mapping===Ws?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),wo=this._renderer.getRenderTarget(),To=this._renderer.getActiveCubeFace(),Co=this._renderer.getActiveMipmapLevel(),Ro=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Xn,minFilter:Xn,generateMipmaps:!1,type:Sr,format:Zn,colorSpace:Xs,depthBuffer:!1},i=Sh(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Sh(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=Hp(r)),this._blurMaterial=Gp(r,e,t)}return i}_compileMaterial(e){const t=new zt(this._lodPlanes[0],e);this._renderer.compile(t,Ao)}_sceneToCubeUV(e,t,n,i,r){const l=new bn(90,1,t,n),c=[1,-1,1,1,1,1],d=[1,1,1,-1,-1,-1],m=this._renderer,u=m.autoClear,h=m.toneMapping;m.getClearColor(xh),m.toneMapping=Xi,m.autoClear=!1;const g=new qi({name:"PMREM.Background",side:In,depthWrite:!1,depthTest:!1}),_=new zt(new $i,g);let p=!1;const f=e.background;f?f.isColor&&(g.color.copy(f),e.background=null,p=!0):(g.color.copy(xh),p=!0);for(let x=0;x<6;x++){const y=x%3;y===0?(l.up.set(0,c[x],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x+d[x],r.y,r.z)):y===1?(l.up.set(0,0,c[x]),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y+d[x],r.z)):(l.up.set(0,c[x],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y,r.z+d[x]));const S=this._cubeSize;ia(i,y*S,x>2?S:0,S,S),m.setRenderTarget(i),p&&m.render(_,l),m.render(e,l)}_.geometry.dispose(),_.material.dispose(),m.toneMapping=h,m.autoClear=u,e.background=f}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===Gs||e.mapping===Ws;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Ah()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Eh());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new zt(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;ia(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(o,Ao)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodPlanes.length;for(let r=1;r<i;r++){const o=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),a=Mh[(i-r-1)%Mh.length];this._blur(e,r-1,r,o,a)}t.autoClear=n}_blur(e,t,n,i,r){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",r),this._halfBlur(o,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const d=3,m=new zt(this._lodPlanes[i],c),u=c.uniforms,h=this._sizeLods[n]-1,g=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*as-1),_=r/g,p=isFinite(r)?1+Math.floor(d*_):as;p>as&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${as}`);const f=[];let x=0;for(let L=0;L<as;++L){const P=L/_,E=Math.exp(-P*P/2);f.push(E),L===0?x+=E:L<p&&(x+=2*E)}for(let L=0;L<f.length;L++)f[L]=f[L]/x;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=f,u.latitudinal.value=o==="latitudinal",a&&(u.poleAxis.value=a);const{_lodMax:y}=this;u.dTheta.value=g,u.mipInt.value=y-n;const S=this._sizeLods[i],U=3*S*(i>y-zs?i-y+zs:0),C=4*(this._cubeSize-S);ia(t,U,C,3*S,2*S),l.setRenderTarget(t),l.render(m,Ao)}}function Hp(s){const e=[],t=[],n=[];let i=s;const r=s-zs+1+yh.length;for(let o=0;o<r;o++){const a=Math.pow(2,i);t.push(a);let l=1/a;o>s-zs?l=yh[o-s+zs-1]:o===0&&(l=0),n.push(l);const c=1/(a-2),d=-c,m=1+c,u=[d,d,m,d,m,m,d,d,m,m,d,m],h=6,g=6,_=3,p=2,f=1,x=new Float32Array(_*g*h),y=new Float32Array(p*g*h),S=new Float32Array(f*g*h);for(let C=0;C<h;C++){const L=C%3*2/3-1,P=C>2?0:-1,E=[L,P,0,L+2/3,P,0,L+2/3,P+1,0,L,P,0,L+2/3,P+1,0,L,P+1,0];x.set(E,_*g*C),y.set(u,p*g*C);const A=[C,C,C,C,C,C];S.set(A,f*g*C)}const U=new hn;U.setAttribute("position",new mn(x,_)),U.setAttribute("uv",new mn(y,p)),U.setAttribute("faceIndex",new mn(S,f)),e.push(U),i>zs&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function Sh(s,e,t){const n=new us(s,e,t);return n.texture.mapping=Ua,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ia(s,e,t,n,i){s.viewport.set(e,t,n,i),s.scissor.set(e,t,n,i)}function Gp(s,e,t){const n=new Float32Array(as),i=new I(0,1,0);return new Li({name:"SphericalGaussianBlur",defines:{n:as,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:uc(),fragmentShader:`
|
|
3574
|
+
}`,Ht={alphahash_fragment:ed,alphahash_pars_fragment:td,alphamap_fragment:nd,alphamap_pars_fragment:id,alphatest_fragment:sd,alphatest_pars_fragment:rd,aomap_fragment:ad,aomap_pars_fragment:od,batching_pars_vertex:ld,batching_vertex:cd,begin_vertex:hd,beginnormal_vertex:ud,bsdfs:dd,iridescence_fragment:fd,bumpmap_pars_fragment:pd,clipping_planes_fragment:md,clipping_planes_pars_fragment:gd,clipping_planes_pars_vertex:_d,clipping_planes_vertex:vd,color_fragment:yd,color_pars_fragment:xd,color_pars_vertex:Md,color_vertex:bd,common:Sd,cube_uv_reflection_fragment:Ed,defaultnormal_vertex:Ad,displacementmap_pars_vertex:wd,displacementmap_vertex:Td,emissivemap_fragment:Cd,emissivemap_pars_fragment:Rd,colorspace_fragment:Dd,colorspace_pars_fragment:Ld,envmap_fragment:Pd,envmap_common_pars_fragment:Fd,envmap_pars_fragment:Nd,envmap_pars_vertex:Ud,envmap_physical_pars_fragment:jd,envmap_vertex:Id,fog_vertex:zd,fog_pars_vertex:Bd,fog_fragment:Od,fog_pars_fragment:kd,gradientmap_pars_fragment:Vd,lightmap_pars_fragment:Hd,lights_lambert_fragment:Gd,lights_lambert_pars_fragment:Wd,lights_pars_begin:Xd,lights_toon_fragment:qd,lights_toon_pars_fragment:$d,lights_phong_fragment:Yd,lights_phong_pars_fragment:Jd,lights_physical_fragment:Kd,lights_physical_pars_fragment:Zd,lights_fragment_begin:Qd,lights_fragment_maps:ef,lights_fragment_end:tf,logdepthbuf_fragment:nf,logdepthbuf_pars_fragment:sf,logdepthbuf_pars_vertex:rf,logdepthbuf_vertex:af,map_fragment:of,map_pars_fragment:lf,map_particle_fragment:cf,map_particle_pars_fragment:hf,metalnessmap_fragment:uf,metalnessmap_pars_fragment:df,morphinstance_vertex:ff,morphcolor_vertex:pf,morphnormal_vertex:mf,morphtarget_pars_vertex:gf,morphtarget_vertex:_f,normal_fragment_begin:vf,normal_fragment_maps:yf,normal_pars_fragment:xf,normal_pars_vertex:Mf,normal_vertex:bf,normalmap_pars_fragment:Sf,clearcoat_normal_fragment_begin:Ef,clearcoat_normal_fragment_maps:Af,clearcoat_pars_fragment:wf,iridescence_pars_fragment:Tf,opaque_fragment:Cf,packing:Rf,premultiplied_alpha_fragment:Df,project_vertex:Lf,dithering_fragment:Pf,dithering_pars_fragment:Ff,roughnessmap_fragment:Nf,roughnessmap_pars_fragment:Uf,shadowmap_pars_fragment:If,shadowmap_pars_vertex:zf,shadowmap_vertex:Bf,shadowmask_pars_fragment:Of,skinbase_vertex:kf,skinning_pars_vertex:Vf,skinning_vertex:Hf,skinnormal_vertex:Gf,specularmap_fragment:Wf,specularmap_pars_fragment:Xf,tonemapping_fragment:jf,tonemapping_pars_fragment:qf,transmission_fragment:$f,transmission_pars_fragment:Yf,uv_pars_fragment:Jf,uv_pars_vertex:Kf,uv_vertex:Zf,worldpos_vertex:Qf,background_vert:ep,background_frag:tp,backgroundCube_vert:np,backgroundCube_frag:ip,cube_vert:sp,cube_frag:rp,depth_vert:ap,depth_frag:op,distanceRGBA_vert:lp,distanceRGBA_frag:cp,equirect_vert:hp,equirect_frag:up,linedashed_vert:dp,linedashed_frag:fp,meshbasic_vert:pp,meshbasic_frag:mp,meshlambert_vert:gp,meshlambert_frag:_p,meshmatcap_vert:vp,meshmatcap_frag:yp,meshnormal_vert:xp,meshnormal_frag:Mp,meshphong_vert:bp,meshphong_frag:Sp,meshphysical_vert:Ep,meshphysical_frag:Ap,meshtoon_vert:wp,meshtoon_frag:Tp,points_vert:Cp,points_frag:Rp,shadow_vert:Dp,shadow_frag:Lp,sprite_vert:Pp,sprite_frag:Fp},Je={common:{diffuse:{value:new Tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new kt},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new kt}},envmap:{envMap:{value:null},envMapRotation:{value:new kt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new kt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new kt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new kt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new kt},normalScale:{value:new et(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new kt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new kt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new kt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new kt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Tt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 Tt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0},uvTransform:{value:new kt}},sprite:{diffuse:{value:new Tt(16777215)},opacity:{value:1},center:{value:new et(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new kt},alphaMap:{value:null},alphaMapTransform:{value:new kt},alphaTest:{value:0}}},kn={basic:{uniforms:Un([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.fog]),vertexShader:Ht.meshbasic_vert,fragmentShader:Ht.meshbasic_frag},lambert:{uniforms:Un([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new Tt(0)}}]),vertexShader:Ht.meshlambert_vert,fragmentShader:Ht.meshlambert_frag},phong:{uniforms:Un([Je.common,Je.specularmap,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,Je.lights,{emissive:{value:new Tt(0)},specular:{value:new Tt(1118481)},shininess:{value:30}}]),vertexShader:Ht.meshphong_vert,fragmentShader:Ht.meshphong_frag},standard:{uniforms:Un([Je.common,Je.envmap,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.roughnessmap,Je.metalnessmap,Je.fog,Je.lights,{emissive:{value:new Tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ht.meshphysical_vert,fragmentShader:Ht.meshphysical_frag},toon:{uniforms:Un([Je.common,Je.aomap,Je.lightmap,Je.emissivemap,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.gradientmap,Je.fog,Je.lights,{emissive:{value:new Tt(0)}}]),vertexShader:Ht.meshtoon_vert,fragmentShader:Ht.meshtoon_frag},matcap:{uniforms:Un([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,Je.fog,{matcap:{value:null}}]),vertexShader:Ht.meshmatcap_vert,fragmentShader:Ht.meshmatcap_frag},points:{uniforms:Un([Je.points,Je.fog]),vertexShader:Ht.points_vert,fragmentShader:Ht.points_frag},dashed:{uniforms:Un([Je.common,Je.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ht.linedashed_vert,fragmentShader:Ht.linedashed_frag},depth:{uniforms:Un([Je.common,Je.displacementmap]),vertexShader:Ht.depth_vert,fragmentShader:Ht.depth_frag},normal:{uniforms:Un([Je.common,Je.bumpmap,Je.normalmap,Je.displacementmap,{opacity:{value:1}}]),vertexShader:Ht.meshnormal_vert,fragmentShader:Ht.meshnormal_frag},sprite:{uniforms:Un([Je.sprite,Je.fog]),vertexShader:Ht.sprite_vert,fragmentShader:Ht.sprite_frag},background:{uniforms:{uvTransform:{value:new kt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ht.background_vert,fragmentShader:Ht.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new kt}},vertexShader:Ht.backgroundCube_vert,fragmentShader:Ht.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ht.cube_vert,fragmentShader:Ht.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ht.equirect_vert,fragmentShader:Ht.equirect_frag},distanceRGBA:{uniforms:Un([Je.common,Je.displacementmap,{referencePosition:{value:new I},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ht.distanceRGBA_vert,fragmentShader:Ht.distanceRGBA_frag},shadow:{uniforms:Un([Je.lights,Je.fog,{color:{value:new Tt(0)},opacity:{value:1}}]),vertexShader:Ht.shadow_vert,fragmentShader:Ht.shadow_frag}};kn.physical={uniforms:Un([kn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new kt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new kt},clearcoatNormalScale:{value:new et(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new kt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new kt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new kt},sheen:{value:0},sheenColor:{value:new Tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new kt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new kt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new kt},transmissionSamplerSize:{value:new et},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new kt},attenuationDistance:{value:0},attenuationColor:{value:new Tt(0)},specularColor:{value:new Tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new kt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new kt},anisotropyVector:{value:new et},anisotropyMap:{value:null},anisotropyMapTransform:{value:new kt}}]),vertexShader:Ht.meshphysical_vert,fragmentShader:Ht.meshphysical_frag};const na={r:0,b:0,g:0},es=new Sn,Np=new Et;function Up(s,e,t,n,i,r,o){const a=new Tt(0);let l=r===!0?0:1,c,d,m=null,u=0,h=null;function g(b){let S=b.isScene===!0?b.background:null;return S&&S.isTexture&&(S=(b.backgroundBlurriness>0?t:e).get(S)),S}function _(b){let S=!1;const F=g(b);F===null?f(a,l):F&&F.isColor&&(f(F,1),S=!0);const C=s.xr.getEnvironmentBlendMode();C==="additive"?n.buffers.color.setClear(0,0,0,1,o):C==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(s.autoClear||S)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function p(b,S){const F=g(S);F&&(F.isCubeTexture||F.mapping===Na)?(d===void 0&&(d=new zt(new $i(1,1,1),new Li({name:"BackgroundCubeMaterial",uniforms:qs(kn.backgroundCube.uniforms),vertexShader:kn.backgroundCube.vertexShader,fragmentShader:kn.backgroundCube.fragmentShader,side:In,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(C,R,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),es.copy(S.backgroundRotation),es.x*=-1,es.y*=-1,es.z*=-1,F.isCubeTexture&&F.isRenderTargetTexture===!1&&(es.y*=-1,es.z*=-1),d.material.uniforms.envMap.value=F,d.material.uniforms.flipEnvMap.value=F.isCubeTexture&&F.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Np.makeRotationFromEuler(es)),d.material.toneMapped=Gt.getTransfer(F.colorSpace)!==an,(m!==F||u!==F.version||h!==s.toneMapping)&&(d.material.needsUpdate=!0,m=F,u=F.version,h=s.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null)):F&&F.isTexture&&(c===void 0&&(c=new zt(new Di(2,2),new Li({name:"BackgroundMaterial",uniforms:qs(kn.background.uniforms),vertexShader:kn.background.vertexShader,fragmentShader:kn.background.fragmentShader,side:Qn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=F,c.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,c.material.toneMapped=Gt.getTransfer(F.colorSpace)!==an,F.matrixAutoUpdate===!0&&F.updateMatrix(),c.material.uniforms.uvTransform.value.copy(F.matrix),(m!==F||u!==F.version||h!==s.toneMapping)&&(c.material.needsUpdate=!0,m=F,u=F.version,h=s.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function f(b,S){b.getRGB(na,N0(s)),n.buffers.color.setClear(na.r,na.g,na.b,S,o)}function v(){d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(b,S=1){a.set(b),l=S,f(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,f(a,l)},render:_,addToRenderList:p,dispose:v}}function Ip(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},i=u(null);let r=i,o=!1;function a(E,L,B,H,Q){let ae=!1;const G=m(H,B,L);r!==G&&(r=G,c(r.object)),ae=h(E,H,B,Q),ae&&g(E,H,B,Q),Q!==null&&e.update(Q,s.ELEMENT_ARRAY_BUFFER),(ae||o)&&(o=!1,S(E,L,B,H),Q!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(Q).buffer))}function l(){return s.createVertexArray()}function c(E){return s.bindVertexArray(E)}function d(E){return s.deleteVertexArray(E)}function m(E,L,B){const H=B.wireframe===!0;let Q=n[E.id];Q===void 0&&(Q={},n[E.id]=Q);let ae=Q[L.id];ae===void 0&&(ae={},Q[L.id]=ae);let G=ae[H];return G===void 0&&(G=u(l()),ae[H]=G),G}function u(E){const L=[],B=[],H=[];for(let Q=0;Q<t;Q++)L[Q]=0,B[Q]=0,H[Q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:B,attributeDivisors:H,object:E,attributes:{},index:null}}function h(E,L,B,H){const Q=r.attributes,ae=L.attributes;let G=0;const le=B.getAttributes();for(const Z in le)if(le[Z].location>=0){const Ee=Q[Z];let be=ae[Z];if(be===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(be=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(be=E.instanceColor)),Ee===void 0||Ee.attribute!==be||be&&Ee.data!==be.data)return!0;G++}return r.attributesNum!==G||r.index!==H}function g(E,L,B,H){const Q={},ae=L.attributes;let G=0;const le=B.getAttributes();for(const Z in le)if(le[Z].location>=0){let Ee=ae[Z];Ee===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(Ee=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(Ee=E.instanceColor));const be={};be.attribute=Ee,Ee&&Ee.data&&(be.data=Ee.data),Q[Z]=be,G++}r.attributes=Q,r.attributesNum=G,r.index=H}function _(){const E=r.newAttributes;for(let L=0,B=E.length;L<B;L++)E[L]=0}function p(E){f(E,0)}function f(E,L){const B=r.newAttributes,H=r.enabledAttributes,Q=r.attributeDivisors;B[E]=1,H[E]===0&&(s.enableVertexAttribArray(E),H[E]=1),Q[E]!==L&&(s.vertexAttribDivisor(E,L),Q[E]=L)}function v(){const E=r.newAttributes,L=r.enabledAttributes;for(let B=0,H=L.length;B<H;B++)L[B]!==E[B]&&(s.disableVertexAttribArray(B),L[B]=0)}function b(E,L,B,H,Q,ae,G){G===!0?s.vertexAttribIPointer(E,L,B,Q,ae):s.vertexAttribPointer(E,L,B,H,Q,ae)}function S(E,L,B,H){_();const Q=H.attributes,ae=B.getAttributes(),G=L.defaultAttributeValues;for(const le in ae){const Z=ae[le];if(Z.location>=0){let ve=Q[le];if(ve===void 0&&(le==="instanceMatrix"&&E.instanceMatrix&&(ve=E.instanceMatrix),le==="instanceColor"&&E.instanceColor&&(ve=E.instanceColor)),ve!==void 0){const Ee=ve.normalized,be=ve.itemSize,ge=e.get(ve);if(ge===void 0)continue;const se=ge.buffer,j=ge.type,q=ge.bytesPerElement,ne=j===s.INT||j===s.UNSIGNED_INT||ve.gpuType===Wl;if(ve.isInterleavedBufferAttribute){const ee=ve.data,ue=ee.stride,$=ve.offset;if(ee.isInstancedInterleavedBuffer){for(let pe=0;pe<Z.locationSize;pe++)f(Z.location+pe,ee.meshPerAttribute);E.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let pe=0;pe<Z.locationSize;pe++)p(Z.location+pe);s.bindBuffer(s.ARRAY_BUFFER,se);for(let pe=0;pe<Z.locationSize;pe++)b(Z.location+pe,be/Z.locationSize,j,Ee,ue*q,($+be/Z.locationSize*pe)*q,ne)}else{if(ve.isInstancedBufferAttribute){for(let ee=0;ee<Z.locationSize;ee++)f(Z.location+ee,ve.meshPerAttribute);E.isInstancedMesh!==!0&&H._maxInstanceCount===void 0&&(H._maxInstanceCount=ve.meshPerAttribute*ve.count)}else for(let ee=0;ee<Z.locationSize;ee++)p(Z.location+ee);s.bindBuffer(s.ARRAY_BUFFER,se);for(let ee=0;ee<Z.locationSize;ee++)b(Z.location+ee,be/Z.locationSize,j,Ee,be*q,be/Z.locationSize*ee*q,ne)}}else if(G!==void 0){const Ee=G[le];if(Ee!==void 0)switch(Ee.length){case 2:s.vertexAttrib2fv(Z.location,Ee);break;case 3:s.vertexAttrib3fv(Z.location,Ee);break;case 4:s.vertexAttrib4fv(Z.location,Ee);break;default:s.vertexAttrib1fv(Z.location,Ee)}}}}v()}function F(){P();for(const E in n){const L=n[E];for(const B in L){const H=L[B];for(const Q in H)d(H[Q].object),delete H[Q];delete L[B]}delete n[E]}}function C(E){if(n[E.id]===void 0)return;const L=n[E.id];for(const B in L){const H=L[B];for(const Q in H)d(H[Q].object),delete H[Q];delete L[B]}delete n[E.id]}function R(E){for(const L in n){const B=n[L];if(B[E.id]===void 0)continue;const H=B[E.id];for(const Q in H)d(H[Q].object),delete H[Q];delete B[E.id]}}function P(){A(),o=!0,r!==i&&(r=i,c(r.object))}function A(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:P,resetDefaultState:A,dispose:F,releaseStatesOfGeometry:C,releaseStatesOfProgram:R,initAttributes:_,enableAttribute:p,disableUnusedAttributes:v}}function zp(s,e,t){let n;function i(c){n=c}function r(c,d){s.drawArrays(n,c,d),t.update(d,n,1)}function o(c,d,m){m!==0&&(s.drawArraysInstanced(n,c,d,m),t.update(d,n,m))}function a(c,d,m){if(m===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,c,0,d,0,m);let h=0;for(let g=0;g<m;g++)h+=d[g];t.update(h,n,1)}function l(c,d,m,u){if(m===0)return;const h=e.get("WEBGL_multi_draw");if(h===null)for(let g=0;g<c.length;g++)o(c[g],d[g],u[g]);else{h.multiDrawArraysInstancedWEBGL(n,c,0,d,0,u,0,m);let g=0;for(let _=0;_<m;_++)g+=d[_]*u[_];t.update(g,n,1)}}this.setMode=i,this.render=r,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function Bp(s,e,t,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const R=e.get("EXT_texture_filter_anisotropic");i=s.getParameter(R.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(R){return!(R!==Zn&&n.convert(R)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(R){const P=R===Sr&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(R!==mi&&n.convert(R)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&R!==fi&&!P)}function l(R){if(R==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";R="mediump"}return R==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const d=l(c);d!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const m=t.logarithmicDepthBuffer===!0,u=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),h=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),g=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=s.getParameter(s.MAX_TEXTURE_SIZE),p=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),f=s.getParameter(s.MAX_VERTEX_ATTRIBS),v=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),b=s.getParameter(s.MAX_VARYING_VECTORS),S=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),F=g>0,C=s.getParameter(s.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:m,reverseDepthBuffer:u,maxTextures:h,maxVertexTextures:g,maxTextureSize:_,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:v,maxVaryings:b,maxFragmentUniforms:S,vertexTextures:F,maxSamples:C}}function Op(s){const e=this;let t=null,n=0,i=!1,r=!1;const o=new Jn,a=new kt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(m,u){const h=m.length!==0||u||n!==0||i;return i=u,n=m.length,h},this.beginShadows=function(){r=!0,d(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(m,u){t=d(m,u,0)},this.setState=function(m,u,h){const g=m.clippingPlanes,_=m.clipIntersection,p=m.clipShadows,f=s.get(m);if(!i||g===null||g.length===0||r&&!p)r?d(null):c();else{const v=r?0:n,b=v*4;let S=f.clippingState||null;l.value=S,S=d(g,u,b,h);for(let F=0;F!==b;++F)S[F]=t[F];f.clippingState=S,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(m,u,h,g){const _=m!==null?m.length:0;let p=null;if(_!==0){if(p=l.value,g!==!0||p===null){const f=h+_*4,v=u.matrixWorldInverse;a.getNormalMatrix(v),(p===null||p.length<f)&&(p=new Float32Array(f));for(let b=0,S=h;b!==_;++b,S+=4)o.copy(m[b]).applyMatrix4(v,a),o.normal.toArray(p,S),p[S+3]=o.constant}l.value=p,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,p}}function kp(s){let e=new WeakMap;function t(o,a){return a===Zo?o.mapping=Gs:a===Qo&&(o.mapping=Ws),o}function n(o){if(o&&o.isTexture){const a=o.mapping;if(a===Zo||a===Qo)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new s1(l.height);return c.fromEquirectangularTexture(s,o),e.set(o,c),o.addEventListener("dispose",i),t(c.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:n,dispose:r}}const zs=4,yh=[.125,.215,.35,.446,.526,.582],as=20,Ao=new Ha,xh=new Tt;let wo=null,To=0,Co=0,Ro=!1;const ss=(1+Math.sqrt(5))/2,Ps=1/ss,Mh=[new I(-ss,Ps,0),new I(ss,Ps,0),new I(-Ps,0,ss),new I(Ps,0,ss),new I(0,ss,-Ps),new I(0,ss,Ps),new I(-1,1,-1),new I(1,1,-1),new I(-1,1,1),new I(1,1,1)],Vp=new I;class bh{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,n=.1,i=100,r={}){const{size:o=256,position:a=Vp}=r;wo=this._renderer.getRenderTarget(),To=this._renderer.getActiveCubeFace(),Co=this._renderer.getActiveMipmapLevel(),Ro=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,n,i,l,a),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(){this._cubemapMaterial===null&&(this._cubemapMaterial=Ah(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Eh(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(wo,To,Co),this._renderer.xr.enabled=Ro,e.scissorTest=!1,ia(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Gs||e.mapping===Ws?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),wo=this._renderer.getRenderTarget(),To=this._renderer.getActiveCubeFace(),Co=this._renderer.getActiveMipmapLevel(),Ro=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Xn,minFilter:Xn,generateMipmaps:!1,type:Sr,format:Zn,colorSpace:Xs,depthBuffer:!1},i=Sh(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=Sh(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=Hp(r)),this._blurMaterial=Gp(r,e,t)}return i}_compileMaterial(e){const t=new zt(this._lodPlanes[0],e);this._renderer.compile(t,Ao)}_sceneToCubeUV(e,t,n,i,r){const l=new bn(90,1,t,n),c=[1,-1,1,1,1,1],d=[1,1,1,-1,-1,-1],m=this._renderer,u=m.autoClear,h=m.toneMapping;m.getClearColor(xh),m.toneMapping=Xi,m.autoClear=!1;const g=new qi({name:"PMREM.Background",side:In,depthWrite:!1,depthTest:!1}),_=new zt(new $i,g);let p=!1;const f=e.background;f?f.isColor&&(g.color.copy(f),e.background=null,p=!0):(g.color.copy(xh),p=!0);for(let v=0;v<6;v++){const b=v%3;b===0?(l.up.set(0,c[v],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x+d[v],r.y,r.z)):b===1?(l.up.set(0,0,c[v]),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y+d[v],r.z)):(l.up.set(0,c[v],0),l.position.set(r.x,r.y,r.z),l.lookAt(r.x,r.y,r.z+d[v]));const S=this._cubeSize;ia(i,b*S,v>2?S:0,S,S),m.setRenderTarget(i),p&&m.render(_,l),m.render(e,l)}_.geometry.dispose(),_.material.dispose(),m.toneMapping=h,m.autoClear=u,e.background=f}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===Gs||e.mapping===Ws;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Ah()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Eh());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new zt(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;ia(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(o,Ao)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodPlanes.length;for(let r=1;r<i;r++){const o=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),a=Mh[(i-r-1)%Mh.length];this._blur(e,r-1,r,o,a)}t.autoClear=n}_blur(e,t,n,i,r){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",r),this._halfBlur(o,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const d=3,m=new zt(this._lodPlanes[i],c),u=c.uniforms,h=this._sizeLods[n]-1,g=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*as-1),_=r/g,p=isFinite(r)?1+Math.floor(d*_):as;p>as&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${p} samples when the maximum is set to ${as}`);const f=[];let v=0;for(let R=0;R<as;++R){const P=R/_,A=Math.exp(-P*P/2);f.push(A),R===0?v+=A:R<p&&(v+=2*A)}for(let R=0;R<f.length;R++)f[R]=f[R]/v;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=f,u.latitudinal.value=o==="latitudinal",a&&(u.poleAxis.value=a);const{_lodMax:b}=this;u.dTheta.value=g,u.mipInt.value=b-n;const S=this._sizeLods[i],F=3*S*(i>b-zs?i-b+zs:0),C=4*(this._cubeSize-S);ia(t,F,C,3*S,2*S),l.setRenderTarget(t),l.render(m,Ao)}}function Hp(s){const e=[],t=[],n=[];let i=s;const r=s-zs+1+yh.length;for(let o=0;o<r;o++){const a=Math.pow(2,i);t.push(a);let l=1/a;o>s-zs?l=yh[o-s+zs-1]:o===0&&(l=0),n.push(l);const c=1/(a-2),d=-c,m=1+c,u=[d,d,m,d,m,m,d,d,m,m,d,m],h=6,g=6,_=3,p=2,f=1,v=new Float32Array(_*g*h),b=new Float32Array(p*g*h),S=new Float32Array(f*g*h);for(let C=0;C<h;C++){const R=C%3*2/3-1,P=C>2?0:-1,A=[R,P,0,R+2/3,P,0,R+2/3,P+1,0,R,P,0,R+2/3,P+1,0,R,P+1,0];v.set(A,_*g*C),b.set(u,p*g*C);const E=[C,C,C,C,C,C];S.set(E,f*g*C)}const F=new hn;F.setAttribute("position",new mn(v,_)),F.setAttribute("uv",new mn(b,p)),F.setAttribute("faceIndex",new mn(S,f)),e.push(F),i>zs&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function Sh(s,e,t){const n=new us(s,e,t);return n.texture.mapping=Na,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ia(s,e,t,n,i){s.viewport.set(e,t,n,i),s.scissor.set(e,t,n,i)}function Gp(s,e,t){const n=new Float32Array(as),i=new I(0,1,0);return new Li({name:"SphericalGaussianBlur",defines:{n:as,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:uc(),fragmentShader:`
|
|
3575
3575
|
|
|
3576
3576
|
precision mediump float;
|
|
3577
3577
|
precision mediump int;
|
|
@@ -3721,9 +3721,9 @@ void main() {
|
|
|
3721
3721
|
gl_Position = vec4( position, 1.0 );
|
|
3722
3722
|
|
|
3723
3723
|
}
|
|
3724
|
-
`}function Wp(s){let e=new WeakMap,t=null;function n(a){if(a&&a.isTexture){const l=a.mapping,c=l===Zo||l===Qo,d=l===Gs||l===Ws;if(c||d){let m=e.get(a);const u=m!==void 0?m.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==u)return t===null&&(t=new bh(s)),m=c?t.fromEquirectangular(a,m):t.fromCubemap(a,m),m.texture.pmremVersion=a.pmremVersion,e.set(a,m),m.texture;if(m!==void 0)return m.texture;{const h=a.image;return c&&h&&h.height>0||d&&h&&i(h)?(t===null&&(t=new bh(s)),m=c?t.fromEquirectangular(a):t.fromCubemap(a),m.texture.pmremVersion=a.pmremVersion,e.set(a,m),a.addEventListener("dispose",r),m.texture):null}}}return a}function i(a){let l=0;const c=6;for(let d=0;d<c;d++)a[d]!==void 0&&l++;return l===c}function r(a){const l=a.target;l.removeEventListener("dispose",r);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:o}}function Xp(s){const e={};function t(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=s.getExtension("WEBGL_depth_texture")||s.getExtension("MOZ_WEBGL_depth_texture")||s.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=s.getExtension("EXT_texture_filter_anisotropic")||s.getExtension("MOZ_EXT_texture_filter_anisotropic")||s.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=s.getExtension("WEBGL_compressed_texture_s3tc")||s.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=s.getExtension("WEBGL_compressed_texture_pvrtc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=s.getExtension(n)}return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){const i=t(n);return i===null&&Os("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function jp(s,e,t,n){const i={},r=new WeakMap;function o(m){const u=m.target;u.index!==null&&e.remove(u.index);for(const g in u.attributes)e.remove(u.attributes[g]);u.removeEventListener("dispose",o),delete i[u.id];const h=r.get(u);h&&(e.remove(h),r.delete(u)),n.releaseStatesOfGeometry(u),u.isInstancedBufferGeometry===!0&&delete u._maxInstanceCount,t.memory.geometries--}function a(m,u){return i[u.id]===!0||(u.addEventListener("dispose",o),i[u.id]=!0,t.memory.geometries++),u}function l(m){const u=m.attributes;for(const h in u)e.update(u[h],s.ARRAY_BUFFER)}function c(m){const u=[],h=m.index,g=m.attributes.position;let _=0;if(h!==null){const x=h.array;_=h.version;for(let y=0,S=x.length;y<S;y+=3){const U=x[y+0],C=x[y+1],L=x[y+2];u.push(U,C,C,L,L,U)}}else if(g!==void 0){const x=g.array;_=g.version;for(let y=0,S=x.length/3-1;y<S;y+=3){const U=y+0,C=y+1,L=y+2;u.push(U,C,C,L,L,U)}}else return;const p=new(R0(u)?F0:P0)(u,1);p.version=_;const f=r.get(m);f&&e.remove(f),r.set(m,p)}function d(m){const u=r.get(m);if(u){const h=m.index;h!==null&&u.version<h.version&&c(m)}else c(m);return r.get(m)}return{get:a,update:l,getWireframeAttribute:d}}function qp(s,e,t){let n;function i(u){n=u}let r,o;function a(u){r=u.type,o=u.bytesPerElement}function l(u,h){s.drawElements(n,h,r,u*o),t.update(h,n,1)}function c(u,h,g){g!==0&&(s.drawElementsInstanced(n,h,r,u*o,g),t.update(h,n,g))}function d(u,h,g){if(g===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,h,0,r,u,0,g);let p=0;for(let f=0;f<g;f++)p+=h[f];t.update(p,n,1)}function m(u,h,g,_){if(g===0)return;const p=e.get("WEBGL_multi_draw");if(p===null)for(let f=0;f<u.length;f++)c(u[f]/o,h[f],_[f]);else{p.multiDrawElementsInstancedWEBGL(n,h,0,r,u,0,_,0,g);let f=0;for(let x=0;x<g;x++)f+=h[x]*_[x];t.update(f,n,1)}}this.setMode=i,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=d,this.renderMultiDrawInstances=m}function $p(s){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(r,o,a){switch(t.calls++,o){case s.TRIANGLES:t.triangles+=a*(r/3);break;case s.LINES:t.lines+=a*(r/2);break;case s.LINE_STRIP:t.lines+=a*(r-1);break;case s.LINE_LOOP:t.lines+=a*r;break;case s.POINTS:t.points+=a*r;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:n}}function Yp(s,e,t){const n=new WeakMap,i=new Xt;function r(o,a,l){const c=o.morphTargetInfluences,d=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,m=d!==void 0?d.length:0;let u=n.get(a);if(u===void 0||u.count!==m){let E=function(){L.dispose(),n.delete(a),a.removeEventListener("dispose",E)};u!==void 0&&u.texture.dispose();const h=a.morphAttributes.position!==void 0,g=a.morphAttributes.normal!==void 0,_=a.morphAttributes.color!==void 0,p=a.morphAttributes.position||[],f=a.morphAttributes.normal||[],x=a.morphAttributes.color||[];let y=0;h===!0&&(y=1),g===!0&&(y=2),_===!0&&(y=3);let S=a.attributes.position.count*y,U=1;S>e.maxTextureSize&&(U=Math.ceil(S/e.maxTextureSize),S=e.maxTextureSize);const C=new Float32Array(S*U*4*m),L=new D0(C,S,U,m);L.type=fi,L.needsUpdate=!0;const P=y*4;for(let A=0;A<m;A++){const D=p[A],O=f[A],V=x[A],Q=S*U*4*A;for(let se=0;se<D.count;se++){const G=se*P;h===!0&&(i.fromBufferAttribute(D,se),C[Q+G+0]=i.x,C[Q+G+1]=i.y,C[Q+G+2]=i.z,C[Q+G+3]=0),g===!0&&(i.fromBufferAttribute(O,se),C[Q+G+4]=i.x,C[Q+G+5]=i.y,C[Q+G+6]=i.z,C[Q+G+7]=0),_===!0&&(i.fromBufferAttribute(V,se),C[Q+G+8]=i.x,C[Q+G+9]=i.y,C[Q+G+10]=i.z,C[Q+G+11]=V.itemSize===4?i.w:1)}}u={count:m,texture:L,size:new et(S,U)},n.set(a,u),a.addEventListener("dispose",E)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(s,"morphTexture",o.morphTexture,t);else{let h=0;for(let _=0;_<c.length;_++)h+=c[_];const g=a.morphTargetsRelative?1:1-h;l.getUniforms().setValue(s,"morphTargetBaseInfluence",g),l.getUniforms().setValue(s,"morphTargetInfluences",c)}l.getUniforms().setValue(s,"morphTargetsTexture",u.texture,t),l.getUniforms().setValue(s,"morphTargetsTextureSize",u.size)}return{update:r}}function Jp(s,e,t,n){let i=new WeakMap;function r(l){const c=n.render.frame,d=l.geometry,m=e.get(l,d);if(i.get(m)!==c&&(e.update(m),i.set(m,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),i.get(l)!==c&&(t.update(l.instanceMatrix,s.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,s.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){const u=l.skeleton;i.get(u)!==c&&(u.update(),i.set(u,c))}return m}function o(){i=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:r,dispose:o}}const Q0=new Tn,wh=new H0(1,1),eu=new D0,tu=new V2,nu=new I0,Th=[],Ch=[],Rh=new Float32Array(16),Dh=new Float32Array(9),Lh=new Float32Array(4);function Qs(s,e,t){const n=s[0];if(n<=0||n>0)return s;const i=e*t;let r=Th[i];if(r===void 0&&(r=new Float32Array(i),Th[i]=r),e!==0){n.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,s[o].toArray(r,a)}return r}function vn(s,e){if(s.length!==e.length)return!1;for(let t=0,n=s.length;t<n;t++)if(s[t]!==e[t])return!1;return!0}function yn(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function Ga(s,e){let t=Ch[e];t===void 0&&(t=new Int32Array(e),Ch[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function Kp(s,e){const t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function Zp(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2fv(this.addr,e),yn(t,e)}}function Qp(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(s.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(vn(t,e))return;s.uniform3fv(this.addr,e),yn(t,e)}}function em(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.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(vn(t,e))return;s.uniform4fv(this.addr,e),yn(t,e)}}function tm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Lh.set(n),s.uniformMatrix2fv(this.addr,!1,Lh),yn(t,n)}}function nm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Dh.set(n),s.uniformMatrix3fv(this.addr,!1,Dh),yn(t,n)}}function im(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Rh.set(n),s.uniformMatrix4fv(this.addr,!1,Rh),yn(t,n)}}function sm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function rm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2iv(this.addr,e),yn(t,e)}}function am(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(vn(t,e))return;s.uniform3iv(this.addr,e),yn(t,e)}}function om(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.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(vn(t,e))return;s.uniform4iv(this.addr,e),yn(t,e)}}function lm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function cm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2uiv(this.addr,e),yn(t,e)}}function hm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(vn(t,e))return;s.uniform3uiv(this.addr,e),yn(t,e)}}function um(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.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(vn(t,e))return;s.uniform4uiv(this.addr,e),yn(t,e)}}function dm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i);let r;this.type===s.SAMPLER_2D_SHADOW?(wh.compareFunction=C0,r=wh):r=Q0,t.setTexture2D(e||r,i)}function fm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture3D(e||tu,i)}function pm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTextureCube(e||nu,i)}function mm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||eu,i)}function gm(s){switch(s){case 5126:return Kp;case 35664:return Zp;case 35665:return Qp;case 35666:return em;case 35674:return tm;case 35675:return nm;case 35676:return im;case 5124:case 35670:return sm;case 35667:case 35671:return rm;case 35668:case 35672:return am;case 35669:case 35673:return om;case 5125:return lm;case 36294:return cm;case 36295:return hm;case 36296:return um;case 35678:case 36198:case 36298:case 36306:case 35682:return dm;case 35679:case 36299:case 36307:return fm;case 35680:case 36300:case 36308:case 36293:return pm;case 36289:case 36303:case 36311:case 36292:return mm}}function _m(s,e){s.uniform1fv(this.addr,e)}function vm(s,e){const t=Qs(e,this.size,2);s.uniform2fv(this.addr,t)}function ym(s,e){const t=Qs(e,this.size,3);s.uniform3fv(this.addr,t)}function xm(s,e){const t=Qs(e,this.size,4);s.uniform4fv(this.addr,t)}function Mm(s,e){const t=Qs(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function bm(s,e){const t=Qs(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function Sm(s,e){const t=Qs(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function Em(s,e){s.uniform1iv(this.addr,e)}function Am(s,e){s.uniform2iv(this.addr,e)}function wm(s,e){s.uniform3iv(this.addr,e)}function Tm(s,e){s.uniform4iv(this.addr,e)}function Cm(s,e){s.uniform1uiv(this.addr,e)}function Rm(s,e){s.uniform2uiv(this.addr,e)}function Dm(s,e){s.uniform3uiv(this.addr,e)}function Lm(s,e){s.uniform4uiv(this.addr,e)}function Pm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture2D(e[o]||Q0,r[o])}function Fm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture3D(e[o]||tu,r[o])}function Um(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTextureCube(e[o]||nu,r[o])}function Nm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture2DArray(e[o]||eu,r[o])}function Im(s){switch(s){case 5126:return _m;case 35664:return vm;case 35665:return ym;case 35666:return xm;case 35674:return Mm;case 35675:return bm;case 35676:return Sm;case 5124:case 35670:return Em;case 35667:case 35671:return Am;case 35668:case 35672:return wm;case 35669:case 35673:return Tm;case 5125:return Cm;case 36294:return Rm;case 36295:return Dm;case 36296:return Lm;case 35678:case 36198:case 36298:case 36306:case 35682:return Pm;case 35679:case 36299:case 36307:return Fm;case 35680:case 36300:case 36308:case 36293:return Um;case 36289:case 36303:case 36311:case 36292:return Nm}}class zm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=gm(t.type)}}class Bm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=Im(t.type)}}class Om{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,o=i.length;r!==o;++r){const a=i[r];a.setValue(e,t[a.id],n)}}}const Do=/(\w+)(\])?(\[|\.)?/g;function Ph(s,e){s.seq.push(e),s.map[e.id]=e}function km(s,e,t){const n=s.name,i=n.length;for(Do.lastIndex=0;;){const r=Do.exec(n),o=Do.lastIndex;let a=r[1];const l=r[2]==="]",c=r[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===i){Ph(t,c===void 0?new zm(a,s,e):new Bm(a,s,e));break}else{let m=t.map[a];m===void 0&&(m=new Om(a),Ph(t,m)),t=m}}}class Ma{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const r=e.getActiveUniform(t,i),o=e.getUniformLocation(t,r.name);km(r,o,this)}}setValue(e,t,n,i){const r=this.map[t];r!==void 0&&r.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,o=t.length;r!==o;++r){const a=t[r],l=n[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const o=e[i];o.id in t&&n.push(o)}return n}}function Fh(s,e,t){const n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}const Vm=37297;let Hm=0;function Gm(s,e){const t=s.split(`
|
|
3724
|
+
`}function Wp(s){let e=new WeakMap,t=null;function n(a){if(a&&a.isTexture){const l=a.mapping,c=l===Zo||l===Qo,d=l===Gs||l===Ws;if(c||d){let m=e.get(a);const u=m!==void 0?m.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==u)return t===null&&(t=new bh(s)),m=c?t.fromEquirectangular(a,m):t.fromCubemap(a,m),m.texture.pmremVersion=a.pmremVersion,e.set(a,m),m.texture;if(m!==void 0)return m.texture;{const h=a.image;return c&&h&&h.height>0||d&&h&&i(h)?(t===null&&(t=new bh(s)),m=c?t.fromEquirectangular(a):t.fromCubemap(a),m.texture.pmremVersion=a.pmremVersion,e.set(a,m),a.addEventListener("dispose",r),m.texture):null}}}return a}function i(a){let l=0;const c=6;for(let d=0;d<c;d++)a[d]!==void 0&&l++;return l===c}function r(a){const l=a.target;l.removeEventListener("dispose",r);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:o}}function Xp(s){const e={};function t(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=s.getExtension("WEBGL_depth_texture")||s.getExtension("MOZ_WEBGL_depth_texture")||s.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=s.getExtension("EXT_texture_filter_anisotropic")||s.getExtension("MOZ_EXT_texture_filter_anisotropic")||s.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=s.getExtension("WEBGL_compressed_texture_s3tc")||s.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=s.getExtension("WEBGL_compressed_texture_pvrtc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=s.getExtension(n)}return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){const i=t(n);return i===null&&Os("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function jp(s,e,t,n){const i={},r=new WeakMap;function o(m){const u=m.target;u.index!==null&&e.remove(u.index);for(const g in u.attributes)e.remove(u.attributes[g]);u.removeEventListener("dispose",o),delete i[u.id];const h=r.get(u);h&&(e.remove(h),r.delete(u)),n.releaseStatesOfGeometry(u),u.isInstancedBufferGeometry===!0&&delete u._maxInstanceCount,t.memory.geometries--}function a(m,u){return i[u.id]===!0||(u.addEventListener("dispose",o),i[u.id]=!0,t.memory.geometries++),u}function l(m){const u=m.attributes;for(const h in u)e.update(u[h],s.ARRAY_BUFFER)}function c(m){const u=[],h=m.index,g=m.attributes.position;let _=0;if(h!==null){const v=h.array;_=h.version;for(let b=0,S=v.length;b<S;b+=3){const F=v[b+0],C=v[b+1],R=v[b+2];u.push(F,C,C,R,R,F)}}else if(g!==void 0){const v=g.array;_=g.version;for(let b=0,S=v.length/3-1;b<S;b+=3){const F=b+0,C=b+1,R=b+2;u.push(F,C,C,R,R,F)}}else return;const p=new(R0(u)?F0:P0)(u,1);p.version=_;const f=r.get(m);f&&e.remove(f),r.set(m,p)}function d(m){const u=r.get(m);if(u){const h=m.index;h!==null&&u.version<h.version&&c(m)}else c(m);return r.get(m)}return{get:a,update:l,getWireframeAttribute:d}}function qp(s,e,t){let n;function i(u){n=u}let r,o;function a(u){r=u.type,o=u.bytesPerElement}function l(u,h){s.drawElements(n,h,r,u*o),t.update(h,n,1)}function c(u,h,g){g!==0&&(s.drawElementsInstanced(n,h,r,u*o,g),t.update(h,n,g))}function d(u,h,g){if(g===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,h,0,r,u,0,g);let p=0;for(let f=0;f<g;f++)p+=h[f];t.update(p,n,1)}function m(u,h,g,_){if(g===0)return;const p=e.get("WEBGL_multi_draw");if(p===null)for(let f=0;f<u.length;f++)c(u[f]/o,h[f],_[f]);else{p.multiDrawElementsInstancedWEBGL(n,h,0,r,u,0,_,0,g);let f=0;for(let v=0;v<g;v++)f+=h[v]*_[v];t.update(f,n,1)}}this.setMode=i,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=d,this.renderMultiDrawInstances=m}function $p(s){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(r,o,a){switch(t.calls++,o){case s.TRIANGLES:t.triangles+=a*(r/3);break;case s.LINES:t.lines+=a*(r/2);break;case s.LINE_STRIP:t.lines+=a*(r-1);break;case s.LINE_LOOP:t.lines+=a*r;break;case s.POINTS:t.points+=a*r;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:n}}function Yp(s,e,t){const n=new WeakMap,i=new Xt;function r(o,a,l){const c=o.morphTargetInfluences,d=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,m=d!==void 0?d.length:0;let u=n.get(a);if(u===void 0||u.count!==m){let A=function(){R.dispose(),n.delete(a),a.removeEventListener("dispose",A)};u!==void 0&&u.texture.dispose();const h=a.morphAttributes.position!==void 0,g=a.morphAttributes.normal!==void 0,_=a.morphAttributes.color!==void 0,p=a.morphAttributes.position||[],f=a.morphAttributes.normal||[],v=a.morphAttributes.color||[];let b=0;h===!0&&(b=1),g===!0&&(b=2),_===!0&&(b=3);let S=a.attributes.position.count*b,F=1;S>e.maxTextureSize&&(F=Math.ceil(S/e.maxTextureSize),S=e.maxTextureSize);const C=new Float32Array(S*F*4*m),R=new D0(C,S,F,m);R.type=fi,R.needsUpdate=!0;const P=b*4;for(let E=0;E<m;E++){const L=p[E],B=f[E],H=v[E],Q=S*F*4*E;for(let ae=0;ae<L.count;ae++){const G=ae*P;h===!0&&(i.fromBufferAttribute(L,ae),C[Q+G+0]=i.x,C[Q+G+1]=i.y,C[Q+G+2]=i.z,C[Q+G+3]=0),g===!0&&(i.fromBufferAttribute(B,ae),C[Q+G+4]=i.x,C[Q+G+5]=i.y,C[Q+G+6]=i.z,C[Q+G+7]=0),_===!0&&(i.fromBufferAttribute(H,ae),C[Q+G+8]=i.x,C[Q+G+9]=i.y,C[Q+G+10]=i.z,C[Q+G+11]=H.itemSize===4?i.w:1)}}u={count:m,texture:R,size:new et(S,F)},n.set(a,u),a.addEventListener("dispose",A)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(s,"morphTexture",o.morphTexture,t);else{let h=0;for(let _=0;_<c.length;_++)h+=c[_];const g=a.morphTargetsRelative?1:1-h;l.getUniforms().setValue(s,"morphTargetBaseInfluence",g),l.getUniforms().setValue(s,"morphTargetInfluences",c)}l.getUniforms().setValue(s,"morphTargetsTexture",u.texture,t),l.getUniforms().setValue(s,"morphTargetsTextureSize",u.size)}return{update:r}}function Jp(s,e,t,n){let i=new WeakMap;function r(l){const c=n.render.frame,d=l.geometry,m=e.get(l,d);if(i.get(m)!==c&&(e.update(m),i.set(m,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),i.get(l)!==c&&(t.update(l.instanceMatrix,s.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,s.ARRAY_BUFFER),i.set(l,c))),l.isSkinnedMesh){const u=l.skeleton;i.get(u)!==c&&(u.update(),i.set(u,c))}return m}function o(){i=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:r,dispose:o}}const Q0=new Tn,wh=new H0(1,1),eu=new D0,tu=new V2,nu=new I0,Th=[],Ch=[],Rh=new Float32Array(16),Dh=new Float32Array(9),Lh=new Float32Array(4);function Qs(s,e,t){const n=s[0];if(n<=0||n>0)return s;const i=e*t;let r=Th[i];if(r===void 0&&(r=new Float32Array(i),Th[i]=r),e!==0){n.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,s[o].toArray(r,a)}return r}function vn(s,e){if(s.length!==e.length)return!1;for(let t=0,n=s.length;t<n;t++)if(s[t]!==e[t])return!1;return!0}function yn(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function Ga(s,e){let t=Ch[e];t===void 0&&(t=new Int32Array(e),Ch[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function Kp(s,e){const t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function Zp(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2fv(this.addr,e),yn(t,e)}}function Qp(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(s.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(vn(t,e))return;s.uniform3fv(this.addr,e),yn(t,e)}}function em(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.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(vn(t,e))return;s.uniform4fv(this.addr,e),yn(t,e)}}function tm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Lh.set(n),s.uniformMatrix2fv(this.addr,!1,Lh),yn(t,n)}}function nm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Dh.set(n),s.uniformMatrix3fv(this.addr,!1,Dh),yn(t,n)}}function im(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(vn(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),yn(t,e)}else{if(vn(t,n))return;Rh.set(n),s.uniformMatrix4fv(this.addr,!1,Rh),yn(t,n)}}function sm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function rm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2iv(this.addr,e),yn(t,e)}}function am(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(vn(t,e))return;s.uniform3iv(this.addr,e),yn(t,e)}}function om(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.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(vn(t,e))return;s.uniform4iv(this.addr,e),yn(t,e)}}function lm(s,e){const t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function cm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(vn(t,e))return;s.uniform2uiv(this.addr,e),yn(t,e)}}function hm(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(vn(t,e))return;s.uniform3uiv(this.addr,e),yn(t,e)}}function um(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.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(vn(t,e))return;s.uniform4uiv(this.addr,e),yn(t,e)}}function dm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i);let r;this.type===s.SAMPLER_2D_SHADOW?(wh.compareFunction=C0,r=wh):r=Q0,t.setTexture2D(e||r,i)}function fm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture3D(e||tu,i)}function pm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTextureCube(e||nu,i)}function mm(s,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(s.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||eu,i)}function gm(s){switch(s){case 5126:return Kp;case 35664:return Zp;case 35665:return Qp;case 35666:return em;case 35674:return tm;case 35675:return nm;case 35676:return im;case 5124:case 35670:return sm;case 35667:case 35671:return rm;case 35668:case 35672:return am;case 35669:case 35673:return om;case 5125:return lm;case 36294:return cm;case 36295:return hm;case 36296:return um;case 35678:case 36198:case 36298:case 36306:case 35682:return dm;case 35679:case 36299:case 36307:return fm;case 35680:case 36300:case 36308:case 36293:return pm;case 36289:case 36303:case 36311:case 36292:return mm}}function _m(s,e){s.uniform1fv(this.addr,e)}function vm(s,e){const t=Qs(e,this.size,2);s.uniform2fv(this.addr,t)}function ym(s,e){const t=Qs(e,this.size,3);s.uniform3fv(this.addr,t)}function xm(s,e){const t=Qs(e,this.size,4);s.uniform4fv(this.addr,t)}function Mm(s,e){const t=Qs(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function bm(s,e){const t=Qs(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function Sm(s,e){const t=Qs(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function Em(s,e){s.uniform1iv(this.addr,e)}function Am(s,e){s.uniform2iv(this.addr,e)}function wm(s,e){s.uniform3iv(this.addr,e)}function Tm(s,e){s.uniform4iv(this.addr,e)}function Cm(s,e){s.uniform1uiv(this.addr,e)}function Rm(s,e){s.uniform2uiv(this.addr,e)}function Dm(s,e){s.uniform3uiv(this.addr,e)}function Lm(s,e){s.uniform4uiv(this.addr,e)}function Pm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture2D(e[o]||Q0,r[o])}function Fm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture3D(e[o]||tu,r[o])}function Nm(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTextureCube(e[o]||nu,r[o])}function Um(s,e,t){const n=this.cache,i=e.length,r=Ga(t,i);vn(n,r)||(s.uniform1iv(this.addr,r),yn(n,r));for(let o=0;o!==i;++o)t.setTexture2DArray(e[o]||eu,r[o])}function Im(s){switch(s){case 5126:return _m;case 35664:return vm;case 35665:return ym;case 35666:return xm;case 35674:return Mm;case 35675:return bm;case 35676:return Sm;case 5124:case 35670:return Em;case 35667:case 35671:return Am;case 35668:case 35672:return wm;case 35669:case 35673:return Tm;case 5125:return Cm;case 36294:return Rm;case 36295:return Dm;case 36296:return Lm;case 35678:case 36198:case 36298:case 36306:case 35682:return Pm;case 35679:case 36299:case 36307:return Fm;case 35680:case 36300:case 36308:case 36293:return Nm;case 36289:case 36303:case 36311:case 36292:return Um}}class zm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=gm(t.type)}}class Bm{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=Im(t.type)}}class Om{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let r=0,o=i.length;r!==o;++r){const a=i[r];a.setValue(e,t[a.id],n)}}}const Do=/(\w+)(\])?(\[|\.)?/g;function Ph(s,e){s.seq.push(e),s.map[e.id]=e}function km(s,e,t){const n=s.name,i=n.length;for(Do.lastIndex=0;;){const r=Do.exec(n),o=Do.lastIndex;let a=r[1];const l=r[2]==="]",c=r[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===i){Ph(t,c===void 0?new zm(a,s,e):new Bm(a,s,e));break}else{let m=t.map[a];m===void 0&&(m=new Om(a),Ph(t,m)),t=m}}}class Ma{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const r=e.getActiveUniform(t,i),o=e.getUniformLocation(t,r.name);km(r,o,this)}}setValue(e,t,n,i){const r=this.map[t];r!==void 0&&r.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,o=t.length;r!==o;++r){const a=t[r],l=n[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,r=e.length;i!==r;++i){const o=e[i];o.id in t&&n.push(o)}return n}}function Fh(s,e,t){const n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}const Vm=37297;let Hm=0;function Gm(s,e){const t=s.split(`
|
|
3725
3725
|
`),n=[],i=Math.max(e-6,0),r=Math.min(e+6,t.length);for(let o=i;o<r;o++){const a=o+1;n.push(`${a===e?">":" "} ${a}: ${t[o]}`)}return n.join(`
|
|
3726
|
-
`)}const
|
|
3726
|
+
`)}const Nh=new kt;function Wm(s){Gt._getMatrix(Nh,Gt.workingColorSpace,s);const e=`mat3( ${Nh.elements.map(t=>t.toFixed(4))} )`;switch(Gt.getTransfer(s)){case Aa:return[e,"LinearTransferOETF"];case an:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",s),[e,"LinearTransferOETF"]}}function Uh(s,e,t){const n=s.getShaderParameter(e,s.COMPILE_STATUS),i=s.getShaderInfoLog(e).trim();if(n&&i==="")return"";const r=/ERROR: 0:(\d+)/.exec(i);if(r){const o=parseInt(r[1]);return t.toUpperCase()+`
|
|
3727
3727
|
|
|
3728
3728
|
`+i+`
|
|
3729
3729
|
|
|
@@ -3751,7 +3751,7 @@ void main() {
|
|
|
3751
3751
|
`;return s.precision==="highp"?e+=`
|
|
3752
3752
|
#define HIGH_PRECISION`:s.precision==="mediump"?e+=`
|
|
3753
3753
|
#define MEDIUM_PRECISION`:s.precision==="lowp"&&(e+=`
|
|
3754
|
-
#define LOW_PRECISION`),e}function n3(s){let e="SHADOWMAP_TYPE_BASIC";return s.shadowMapType===v0?e="SHADOWMAP_TYPE_PCF":s.shadowMapType===Hl?e="SHADOWMAP_TYPE_PCF_SOFT":s.shadowMapType===Si&&(e="SHADOWMAP_TYPE_VSM"),e}function i3(s){let e="ENVMAP_TYPE_CUBE";if(s.envMap)switch(s.envMapMode){case Gs:case Ws:e="ENVMAP_TYPE_CUBE";break;case
|
|
3754
|
+
#define LOW_PRECISION`),e}function n3(s){let e="SHADOWMAP_TYPE_BASIC";return s.shadowMapType===v0?e="SHADOWMAP_TYPE_PCF":s.shadowMapType===Hl?e="SHADOWMAP_TYPE_PCF_SOFT":s.shadowMapType===Si&&(e="SHADOWMAP_TYPE_VSM"),e}function i3(s){let e="ENVMAP_TYPE_CUBE";if(s.envMap)switch(s.envMapMode){case Gs:case Ws:e="ENVMAP_TYPE_CUBE";break;case Na:e="ENVMAP_TYPE_CUBE_UV";break}return e}function s3(s){let e="ENVMAP_MODE_REFLECTION";if(s.envMap)switch(s.envMapMode){case Ws:e="ENVMAP_MODE_REFRACTION";break}return e}function r3(s){let e="ENVMAP_BLENDING_NONE";if(s.envMap)switch(s.combine){case Fa:e="ENVMAP_BLENDING_MULTIPLY";break;case Yu:e="ENVMAP_BLENDING_MIX";break;case Ju:e="ENVMAP_BLENDING_ADD";break}return e}function a3(s){const e=s.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:n,maxMip:t}}function o3(s,e,t,n){const i=s.getContext(),r=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=n3(t),c=i3(t),d=s3(t),m=r3(t),u=a3(t),h=$m(t),g=Ym(r),_=i.createProgram();let p,f,v=t.glslVersion?"#version "+t.glslVersion+`
|
|
3755
3755
|
`:"";t.isRawShaderMaterial?(p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(ur).join(`
|
|
3756
3756
|
`),p.length>0&&(p+=`
|
|
3757
3757
|
`),f=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(ur).join(`
|
|
@@ -3760,19 +3760,19 @@ void main() {
|
|
|
3760
3760
|
`].filter(ur).join(`
|
|
3761
3761
|
`),f=[Oh(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+d:"",t.envMap?"#define "+m:"",u?"#define CUBEUV_TEXEL_WIDTH "+u.texelWidth:"",u?"#define CUBEUV_TEXEL_HEIGHT "+u.texelHeight:"",u?"#define CUBEUV_MAX_MIP "+u.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.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",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.alphaHash?"#define USE_ALPHAHASH":"",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.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",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 "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Xi?"#define TONE_MAPPING":"",t.toneMapping!==Xi?Ht.tonemapping_pars_fragment:"",t.toneMapping!==Xi?jm("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Ht.colorspace_pars_fragment,Xm("linearToOutputTexel",t.outputColorSpace),qm(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
|
|
3762
3762
|
`].filter(ur).join(`
|
|
3763
|
-
`)),o=Fl(o),o=Ih(o,t),o=zh(o,t),a=Fl(a),a=Ih(a,t),a=zh(a,t),o=Bh(o),a=Bh(a),t.isRawShaderMaterial!==!0&&(
|
|
3763
|
+
`)),o=Fl(o),o=Ih(o,t),o=zh(o,t),a=Fl(a),a=Ih(a,t),a=zh(a,t),o=Bh(o),a=Bh(a),t.isRawShaderMaterial!==!0&&(v=`#version 300 es
|
|
3764
3764
|
`,p=[h,"#define attribute in","#define varying out","#define texture2D texture"].join(`
|
|
3765
3765
|
`)+`
|
|
3766
3766
|
`+p,f=["#define varying in",t.glslVersion===Tc?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Tc?"":"#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(`
|
|
3767
3767
|
`)+`
|
|
3768
|
-
`+f);const
|
|
3768
|
+
`+f);const b=v+p+o,S=v+f+a,F=Fh(i,i.VERTEX_SHADER,b),C=Fh(i,i.FRAGMENT_SHADER,S);i.attachShader(_,F),i.attachShader(_,C),t.index0AttributeName!==void 0?i.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_);function R(L){if(s.debug.checkShaderErrors){const B=i.getProgramInfoLog(_).trim(),H=i.getShaderInfoLog(F).trim(),Q=i.getShaderInfoLog(C).trim();let ae=!0,G=!0;if(i.getProgramParameter(_,i.LINK_STATUS)===!1)if(ae=!1,typeof s.debug.onShaderError=="function")s.debug.onShaderError(i,_,F,C);else{const le=Uh(i,F,"vertex"),Z=Uh(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(_,i.VALIDATE_STATUS)+`
|
|
3769
3769
|
|
|
3770
|
-
Material Name: `+
|
|
3771
|
-
Material Type: `+
|
|
3770
|
+
Material Name: `+L.name+`
|
|
3771
|
+
Material Type: `+L.type+`
|
|
3772
3772
|
|
|
3773
|
-
Program Info Log: `+
|
|
3774
|
-
`+
|
|
3775
|
-
`+Z)}else O!==""?console.warn("THREE.WebGLProgram: Program Info Log:",O):(V===""||Q==="")&&(G=!1);G&&(D.diagnostics={runnable:se,programLog:O,vertexShader:{log:V,prefix:p},fragmentShader:{log:Q,prefix:f}})}i.deleteShader(U),i.deleteShader(C),P=new Ma(i,_),E=Jm(i,_)}let P;this.getUniforms=function(){return P===void 0&&L(this),P};let E;this.getAttributes=function(){return E===void 0&&L(this),E};let A=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return A===!1&&(A=i.getProgramParameter(_,Vm)),A},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=Hm++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=U,this.fragmentShader=C,this}let l3=0;class c3{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}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 n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new h3(e),t.set(e,n)),n}}class h3{constructor(e){this.id=l3++,this.code=e,this.usedTimes=0}}function u3(s,e,t,n,i,r,o){const a=new Zl,l=new c3,c=new Set,d=[],m=i.logarithmicDepthBuffer,u=i.vertexTextures;let h=i.precision;const g={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 _(E){return c.add(E),E===0?"uv":`uv${E}`}function p(E,A,D,O,V){const Q=O.fog,se=V.geometry,G=E.isMeshStandardMaterial?O.environment:null,ce=(E.isMeshStandardMaterial?t:e).get(E.envMap||G),Z=ce&&ce.mapping===Ua?ce.image.height:null,ge=g[E.type];E.precision!==null&&(h=i.getMaxPrecision(E.precision),h!==E.precision&&console.warn("THREE.WebGLProgram.getParameters:",E.precision,"not supported, using",h,"instead."));const De=se.morphAttributes.position||se.morphAttributes.normal||se.morphAttributes.color,ye=De!==void 0?De.length:0;let _e=0;se.morphAttributes.position!==void 0&&(_e=1),se.morphAttributes.normal!==void 0&&(_e=2),se.morphAttributes.color!==void 0&&(_e=3);let ae,j,Y,ee;if(ge){const Nt=kn[ge];ae=Nt.vertexShader,j=Nt.fragmentShader}else ae=E.vertexShader,j=E.fragmentShader,l.update(E),Y=l.getVertexShaderID(E),ee=l.getFragmentShaderID(E);const ne=s.getRenderTarget(),he=s.state.buffers.depth.getReversed(),J=V.isInstancedMesh===!0,ue=V.isBatchedMesh===!0,Ce=!!E.map,je=!!E.matcap,We=!!ce,B=!!E.aoMap,_t=!!E.lightMap,dt=!!E.bumpMap,at=!!E.normalMap,Fe=!!E.displacementMap,tt=!!E.emissiveMap,Le=!!E.metalnessMap,ot=!!E.roughnessMap,jt=E.anisotropy>0,k=E.clearcoat>0,T=E.dispersion>0,oe=E.iridescence>0,be=E.sheen>0,Re=E.transmission>0,xe=jt&&!!E.anisotropyMap,vt=k&&!!E.clearcoatMap,Ze=k&&!!E.clearcoatNormalMap,mt=k&&!!E.clearcoatRoughnessMap,yt=oe&&!!E.iridescenceMap,Ne=oe&&!!E.iridescenceThicknessMap,st=be&&!!E.sheenColorMap,Rt=be&&!!E.sheenRoughnessMap,At=!!E.specularMap,Je=!!E.specularColorMap,Lt=!!E.specularIntensityMap,K=Re&&!!E.transmissionMap,Ye=Re&&!!E.thicknessMap,Ie=!!E.gradientMap,ut=!!E.alphaMap,ze=E.alphaTest>0,Ae=!!E.alphaHash,pt=!!E.extensions;let Ft=Xi;E.toneMapped&&(ne===null||ne.isXRRenderTarget===!0)&&(Ft=s.toneMapping);const Qt={shaderID:ge,shaderType:E.type,shaderName:E.name,vertexShader:ae,fragmentShader:j,defines:E.defines,customVertexShaderID:Y,customFragmentShaderID:ee,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:h,batching:ue,batchingColor:ue&&V._colorsTexture!==null,instancing:J,instancingColor:J&&V.instanceColor!==null,instancingMorph:J&&V.morphTexture!==null,supportsVertexTextures:u,outputColorSpace:ne===null?s.outputColorSpace:ne.isXRRenderTarget===!0?ne.texture.colorSpace:Xs,alphaToCoverage:!!E.alphaToCoverage,map:Ce,matcap:je,envMap:We,envMapMode:We&&ce.mapping,envMapCubeUVHeight:Z,aoMap:B,lightMap:_t,bumpMap:dt,normalMap:at,displacementMap:u&&Fe,emissiveMap:tt,normalMapObjectSpace:at&&E.normalMapType===l2,normalMapTangentSpace:at&&E.normalMapType===Na,metalnessMap:Le,roughnessMap:ot,anisotropy:jt,anisotropyMap:xe,clearcoat:k,clearcoatMap:vt,clearcoatNormalMap:Ze,clearcoatRoughnessMap:mt,dispersion:T,iridescence:oe,iridescenceMap:yt,iridescenceThicknessMap:Ne,sheen:be,sheenColorMap:st,sheenRoughnessMap:Rt,specularMap:At,specularColorMap:Je,specularIntensityMap:Lt,transmission:Re,transmissionMap:K,thicknessMap:Ye,gradientMap:Ie,opaque:E.transparent===!1&&E.blending===Bs&&E.alphaToCoverage===!1,alphaMap:ut,alphaTest:ze,alphaHash:Ae,combine:E.combine,mapUv:Ce&&_(E.map.channel),aoMapUv:B&&_(E.aoMap.channel),lightMapUv:_t&&_(E.lightMap.channel),bumpMapUv:dt&&_(E.bumpMap.channel),normalMapUv:at&&_(E.normalMap.channel),displacementMapUv:Fe&&_(E.displacementMap.channel),emissiveMapUv:tt&&_(E.emissiveMap.channel),metalnessMapUv:Le&&_(E.metalnessMap.channel),roughnessMapUv:ot&&_(E.roughnessMap.channel),anisotropyMapUv:xe&&_(E.anisotropyMap.channel),clearcoatMapUv:vt&&_(E.clearcoatMap.channel),clearcoatNormalMapUv:Ze&&_(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:mt&&_(E.clearcoatRoughnessMap.channel),iridescenceMapUv:yt&&_(E.iridescenceMap.channel),iridescenceThicknessMapUv:Ne&&_(E.iridescenceThicknessMap.channel),sheenColorMapUv:st&&_(E.sheenColorMap.channel),sheenRoughnessMapUv:Rt&&_(E.sheenRoughnessMap.channel),specularMapUv:At&&_(E.specularMap.channel),specularColorMapUv:Je&&_(E.specularColorMap.channel),specularIntensityMapUv:Lt&&_(E.specularIntensityMap.channel),transmissionMapUv:K&&_(E.transmissionMap.channel),thicknessMapUv:Ye&&_(E.thicknessMap.channel),alphaMapUv:ut&&_(E.alphaMap.channel),vertexTangents:!!se.attributes.tangent&&(at||jt),vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!se.attributes.color&&se.attributes.color.itemSize===4,pointsUvs:V.isPoints===!0&&!!se.attributes.uv&&(Ce||ut),fog:!!Q,useFog:E.fog===!0,fogExp2:!!Q&&Q.isFogExp2,flatShading:E.flatShading===!0,sizeAttenuation:E.sizeAttenuation===!0,logarithmicDepthBuffer:m,reverseDepthBuffer:he,skinning:V.isSkinnedMesh===!0,morphTargets:se.morphAttributes.position!==void 0,morphNormals:se.morphAttributes.normal!==void 0,morphColors:se.morphAttributes.color!==void 0,morphTargetsCount:ye,morphTextureStride:_e,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:s.shadowMap.enabled&&D.length>0,shadowMapType:s.shadowMap.type,toneMapping:Ft,decodeVideoTexture:Ce&&E.map.isVideoTexture===!0&&Gt.getTransfer(E.map.colorSpace)===an,decodeVideoTextureEmissive:tt&&E.emissiveMap.isVideoTexture===!0&&Gt.getTransfer(E.emissiveMap.colorSpace)===an,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===pn,flipSided:E.side===In,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionClipCullDistance:pt&&E.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(pt&&E.extensions.multiDraw===!0||ue)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()};return Qt.vertexUv1s=c.has(1),Qt.vertexUv2s=c.has(2),Qt.vertexUv3s=c.has(3),c.clear(),Qt}function f(E){const A=[];if(E.shaderID?A.push(E.shaderID):(A.push(E.customVertexShaderID),A.push(E.customFragmentShaderID)),E.defines!==void 0)for(const D in E.defines)A.push(D),A.push(E.defines[D]);return E.isRawShaderMaterial===!1&&(x(A,E),y(A,E),A.push(s.outputColorSpace)),A.push(E.customProgramCacheKey),A.join()}function x(E,A){E.push(A.precision),E.push(A.outputColorSpace),E.push(A.envMapMode),E.push(A.envMapCubeUVHeight),E.push(A.mapUv),E.push(A.alphaMapUv),E.push(A.lightMapUv),E.push(A.aoMapUv),E.push(A.bumpMapUv),E.push(A.normalMapUv),E.push(A.displacementMapUv),E.push(A.emissiveMapUv),E.push(A.metalnessMapUv),E.push(A.roughnessMapUv),E.push(A.anisotropyMapUv),E.push(A.clearcoatMapUv),E.push(A.clearcoatNormalMapUv),E.push(A.clearcoatRoughnessMapUv),E.push(A.iridescenceMapUv),E.push(A.iridescenceThicknessMapUv),E.push(A.sheenColorMapUv),E.push(A.sheenRoughnessMapUv),E.push(A.specularMapUv),E.push(A.specularColorMapUv),E.push(A.specularIntensityMapUv),E.push(A.transmissionMapUv),E.push(A.thicknessMapUv),E.push(A.combine),E.push(A.fogExp2),E.push(A.sizeAttenuation),E.push(A.morphTargetsCount),E.push(A.morphAttributeCount),E.push(A.numDirLights),E.push(A.numPointLights),E.push(A.numSpotLights),E.push(A.numSpotLightMaps),E.push(A.numHemiLights),E.push(A.numRectAreaLights),E.push(A.numDirLightShadows),E.push(A.numPointLightShadows),E.push(A.numSpotLightShadows),E.push(A.numSpotLightShadowsWithMaps),E.push(A.numLightProbes),E.push(A.shadowMapType),E.push(A.toneMapping),E.push(A.numClippingPlanes),E.push(A.numClipIntersection),E.push(A.depthPacking)}function y(E,A){a.disableAll(),A.supportsVertexTextures&&a.enable(0),A.instancing&&a.enable(1),A.instancingColor&&a.enable(2),A.instancingMorph&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),A.dispersion&&a.enable(20),A.batchingColor&&a.enable(21),E.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.reverseDepthBuffer&&a.enable(4),A.skinning&&a.enable(5),A.morphTargets&&a.enable(6),A.morphNormals&&a.enable(7),A.morphColors&&a.enable(8),A.premultipliedAlpha&&a.enable(9),A.shadowMapEnabled&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.opaque&&a.enable(17),A.pointsUvs&&a.enable(18),A.decodeVideoTexture&&a.enable(19),A.decodeVideoTextureEmissive&&a.enable(20),A.alphaToCoverage&&a.enable(21),E.push(a.mask)}function S(E){const A=g[E.type];let D;if(A){const O=kn[A];D=Ql.clone(O.uniforms)}else D=E.uniforms;return D}function U(E,A){let D;for(let O=0,V=d.length;O<V;O++){const Q=d[O];if(Q.cacheKey===A){D=Q,++D.usedTimes;break}}return D===void 0&&(D=new o3(s,A,E,r),d.push(D)),D}function C(E){if(--E.usedTimes===0){const A=d.indexOf(E);d[A]=d[d.length-1],d.pop(),E.destroy()}}function L(E){l.remove(E)}function P(){l.dispose()}return{getParameters:p,getProgramCacheKey:f,getUniforms:S,acquireProgram:U,releaseProgram:C,releaseShaderCache:L,programs:d,dispose:P}}function d3(){let s=new WeakMap;function e(o){return s.has(o)}function t(o){let a=s.get(o);return a===void 0&&(a={},s.set(o,a)),a}function n(o){s.delete(o)}function i(o,a,l){s.get(o)[a]=l}function r(){s=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:r}}function f3(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.z!==e.z?s.z-e.z:s.id-e.id}function kh(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function Vh(){const s=[];let e=0;const t=[],n=[],i=[];function r(){e=0,t.length=0,n.length=0,i.length=0}function o(m,u,h,g,_,p){let f=s[e];return f===void 0?(f={id:m.id,object:m,geometry:u,material:h,groupOrder:g,renderOrder:m.renderOrder,z:_,group:p},s[e]=f):(f.id=m.id,f.object=m,f.geometry=u,f.material=h,f.groupOrder=g,f.renderOrder=m.renderOrder,f.z=_,f.group=p),e++,f}function a(m,u,h,g,_,p){const f=o(m,u,h,g,_,p);h.transmission>0?n.push(f):h.transparent===!0?i.push(f):t.push(f)}function l(m,u,h,g,_,p){const f=o(m,u,h,g,_,p);h.transmission>0?n.unshift(f):h.transparent===!0?i.unshift(f):t.unshift(f)}function c(m,u){t.length>1&&t.sort(m||f3),n.length>1&&n.sort(u||kh),i.length>1&&i.sort(u||kh)}function d(){for(let m=e,u=s.length;m<u;m++){const h=s[m];if(h.id===null)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}}return{opaque:t,transmissive:n,transparent:i,init:r,push:a,unshift:l,finish:d,sort:c}}function p3(){let s=new WeakMap;function e(n,i){const r=s.get(n);let o;return r===void 0?(o=new Vh,s.set(n,[o])):i>=r.length?(o=new Vh,r.push(o)):o=r[i],o}function t(){s=new WeakMap}return{get:e,dispose:t}}function m3(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new I,color:new Tt};break;case"SpotLight":t={position:new I,direction:new I,color:new Tt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new I,color:new Tt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new I,skyColor:new Tt,groundColor:new Tt};break;case"RectAreaLight":t={color:new Tt,position:new I,halfWidth:new I,halfHeight:new I};break}return s[e.id]=t,t}}}function g3(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}let _3=0;function v3(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function y3(s){const e=new m3,t=g3(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new I);const i=new I,r=new Et,o=new Et;function a(c){let d=0,m=0,u=0;for(let E=0;E<9;E++)n.probe[E].set(0,0,0);let h=0,g=0,_=0,p=0,f=0,x=0,y=0,S=0,U=0,C=0,L=0;c.sort(v3);for(let E=0,A=c.length;E<A;E++){const D=c[E],O=D.color,V=D.intensity,Q=D.distance,se=D.shadow&&D.shadow.map?D.shadow.map.texture:null;if(D.isAmbientLight)d+=O.r*V,m+=O.g*V,u+=O.b*V;else if(D.isLightProbe){for(let G=0;G<9;G++)n.probe[G].addScaledVector(D.sh.coefficients[G],V);L++}else if(D.isDirectionalLight){const G=e.get(D);if(G.color.copy(D.color).multiplyScalar(D.intensity),D.castShadow){const ce=D.shadow,Z=t.get(D);Z.shadowIntensity=ce.intensity,Z.shadowBias=ce.bias,Z.shadowNormalBias=ce.normalBias,Z.shadowRadius=ce.radius,Z.shadowMapSize=ce.mapSize,n.directionalShadow[h]=Z,n.directionalShadowMap[h]=se,n.directionalShadowMatrix[h]=D.shadow.matrix,x++}n.directional[h]=G,h++}else if(D.isSpotLight){const G=e.get(D);G.position.setFromMatrixPosition(D.matrixWorld),G.color.copy(O).multiplyScalar(V),G.distance=Q,G.coneCos=Math.cos(D.angle),G.penumbraCos=Math.cos(D.angle*(1-D.penumbra)),G.decay=D.decay,n.spot[_]=G;const ce=D.shadow;if(D.map&&(n.spotLightMap[U]=D.map,U++,ce.updateMatrices(D),D.castShadow&&C++),n.spotLightMatrix[_]=ce.matrix,D.castShadow){const Z=t.get(D);Z.shadowIntensity=ce.intensity,Z.shadowBias=ce.bias,Z.shadowNormalBias=ce.normalBias,Z.shadowRadius=ce.radius,Z.shadowMapSize=ce.mapSize,n.spotShadow[_]=Z,n.spotShadowMap[_]=se,S++}_++}else if(D.isRectAreaLight){const G=e.get(D);G.color.copy(O).multiplyScalar(V),G.halfWidth.set(D.width*.5,0,0),G.halfHeight.set(0,D.height*.5,0),n.rectArea[p]=G,p++}else if(D.isPointLight){const G=e.get(D);if(G.color.copy(D.color).multiplyScalar(D.intensity),G.distance=D.distance,G.decay=D.decay,D.castShadow){const ce=D.shadow,Z=t.get(D);Z.shadowIntensity=ce.intensity,Z.shadowBias=ce.bias,Z.shadowNormalBias=ce.normalBias,Z.shadowRadius=ce.radius,Z.shadowMapSize=ce.mapSize,Z.shadowCameraNear=ce.camera.near,Z.shadowCameraFar=ce.camera.far,n.pointShadow[g]=Z,n.pointShadowMap[g]=se,n.pointShadowMatrix[g]=D.shadow.matrix,y++}n.point[g]=G,g++}else if(D.isHemisphereLight){const G=e.get(D);G.skyColor.copy(D.color).multiplyScalar(V),G.groundColor.copy(D.groundColor).multiplyScalar(V),n.hemi[f]=G,f++}}p>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ke.LTC_FLOAT_1,n.rectAreaLTC2=Ke.LTC_FLOAT_2):(n.rectAreaLTC1=Ke.LTC_HALF_1,n.rectAreaLTC2=Ke.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=m,n.ambient[2]=u;const P=n.hash;(P.directionalLength!==h||P.pointLength!==g||P.spotLength!==_||P.rectAreaLength!==p||P.hemiLength!==f||P.numDirectionalShadows!==x||P.numPointShadows!==y||P.numSpotShadows!==S||P.numSpotMaps!==U||P.numLightProbes!==L)&&(n.directional.length=h,n.spot.length=_,n.rectArea.length=p,n.point.length=g,n.hemi.length=f,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=y,n.pointShadowMap.length=y,n.spotShadow.length=S,n.spotShadowMap.length=S,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=y,n.spotLightMatrix.length=S+U-C,n.spotLightMap.length=U,n.numSpotLightShadowsWithMaps=C,n.numLightProbes=L,P.directionalLength=h,P.pointLength=g,P.spotLength=_,P.rectAreaLength=p,P.hemiLength=f,P.numDirectionalShadows=x,P.numPointShadows=y,P.numSpotShadows=S,P.numSpotMaps=U,P.numLightProbes=L,n.version=_3++)}function l(c,d){let m=0,u=0,h=0,g=0,_=0;const p=d.matrixWorldInverse;for(let f=0,x=c.length;f<x;f++){const y=c[f];if(y.isDirectionalLight){const S=n.directional[m];S.direction.setFromMatrixPosition(y.matrixWorld),i.setFromMatrixPosition(y.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(p),m++}else if(y.isSpotLight){const S=n.spot[h];S.position.setFromMatrixPosition(y.matrixWorld),S.position.applyMatrix4(p),S.direction.setFromMatrixPosition(y.matrixWorld),i.setFromMatrixPosition(y.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(p),h++}else if(y.isRectAreaLight){const S=n.rectArea[g];S.position.setFromMatrixPosition(y.matrixWorld),S.position.applyMatrix4(p),o.identity(),r.copy(y.matrixWorld),r.premultiply(p),o.extractRotation(r),S.halfWidth.set(y.width*.5,0,0),S.halfHeight.set(0,y.height*.5,0),S.halfWidth.applyMatrix4(o),S.halfHeight.applyMatrix4(o),g++}else if(y.isPointLight){const S=n.point[u];S.position.setFromMatrixPosition(y.matrixWorld),S.position.applyMatrix4(p),u++}else if(y.isHemisphereLight){const S=n.hemi[_];S.direction.setFromMatrixPosition(y.matrixWorld),S.direction.transformDirection(p),_++}}}return{setup:a,setupView:l,state:n}}function Hh(s){const e=new y3(s),t=[],n=[];function i(d){c.camera=d,t.length=0,n.length=0}function r(d){t.push(d)}function o(d){n.push(d)}function a(){e.setup(t)}function l(d){e.setupView(t,d)}const c={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:l,pushLight:r,pushShadow:o}}function x3(s){let e=new WeakMap;function t(i,r=0){const o=e.get(i);let a;return o===void 0?(a=new Hh(s),e.set(i,[a])):r>=o.length?(a=new Hh(s),o.push(a)):a=o[r],a}function n(){e=new WeakMap}return{get:t,dispose:n}}const M3=`void main() {
|
|
3773
|
+
Program Info Log: `+B+`
|
|
3774
|
+
`+le+`
|
|
3775
|
+
`+Z)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(H===""||Q==="")&&(G=!1);G&&(L.diagnostics={runnable:ae,programLog:B,vertexShader:{log:H,prefix:p},fragmentShader:{log:Q,prefix:f}})}i.deleteShader(F),i.deleteShader(C),P=new Ma(i,_),A=Jm(i,_)}let P;this.getUniforms=function(){return P===void 0&&R(this),P};let A;this.getAttributes=function(){return A===void 0&&R(this),A};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=i.getProgramParameter(_,Vm)),E},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=Hm++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=F,this.fragmentShader=C,this}let l3=0;class c3{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}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 n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new h3(e),t.set(e,n)),n}}class h3{constructor(e){this.id=l3++,this.code=e,this.usedTimes=0}}function u3(s,e,t,n,i,r,o){const a=new Zl,l=new c3,c=new Set,d=[],m=i.logarithmicDepthBuffer,u=i.vertexTextures;let h=i.precision;const g={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 _(A){return c.add(A),A===0?"uv":`uv${A}`}function p(A,E,L,B,H){const Q=B.fog,ae=H.geometry,G=A.isMeshStandardMaterial?B.environment:null,le=(A.isMeshStandardMaterial?t:e).get(A.envMap||G),Z=le&&le.mapping===Na?le.image.height:null,ve=g[A.type];A.precision!==null&&(h=i.getMaxPrecision(A.precision),h!==A.precision&&console.warn("THREE.WebGLProgram.getParameters:",A.precision,"not supported, using",h,"instead."));const Ee=ae.morphAttributes.position||ae.morphAttributes.normal||ae.morphAttributes.color,be=Ee!==void 0?Ee.length:0;let ge=0;ae.morphAttributes.position!==void 0&&(ge=1),ae.morphAttributes.normal!==void 0&&(ge=2),ae.morphAttributes.color!==void 0&&(ge=3);let se,j,q,ne;if(ve){const Ut=kn[ve];se=Ut.vertexShader,j=Ut.fragmentShader}else se=A.vertexShader,j=A.fragmentShader,l.update(A),q=l.getVertexShaderID(A),ne=l.getFragmentShaderID(A);const ee=s.getRenderTarget(),ue=s.state.buffers.depth.getReversed(),$=H.isInstancedMesh===!0,pe=H.isBatchedMesh===!0,Ce=!!A.map,Ke=!!A.matcap,He=!!le,O=!!A.aoMap,_t=!!A.lightMap,dt=!!A.bumpMap,at=!!A.normalMap,Fe=!!A.displacementMap,tt=!!A.emissiveMap,Le=!!A.metalnessMap,ot=!!A.roughnessMap,jt=A.anisotropy>0,k=A.clearcoat>0,T=A.dispersion>0,oe=A.iridescence>0,Se=A.sheen>0,De=A.transmission>0,ye=jt&&!!A.anisotropyMap,vt=k&&!!A.clearcoatMap,Ze=k&&!!A.clearcoatNormalMap,mt=k&&!!A.clearcoatRoughnessMap,yt=oe&&!!A.iridescenceMap,Ue=oe&&!!A.iridescenceThicknessMap,st=Se&&!!A.sheenColorMap,Rt=Se&&!!A.sheenRoughnessMap,At=!!A.specularMap,Ye=!!A.specularColorMap,Lt=!!A.specularIntensityMap,K=De&&!!A.transmissionMap,$e=De&&!!A.thicknessMap,Ie=!!A.gradientMap,ut=!!A.alphaMap,ze=A.alphaTest>0,we=!!A.alphaHash,pt=!!A.extensions;let Ft=Xi;A.toneMapped&&(ee===null||ee.isXRRenderTarget===!0)&&(Ft=s.toneMapping);const Qt={shaderID:ve,shaderType:A.type,shaderName:A.name,vertexShader:se,fragmentShader:j,defines:A.defines,customVertexShaderID:q,customFragmentShaderID:ne,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:h,batching:pe,batchingColor:pe&&H._colorsTexture!==null,instancing:$,instancingColor:$&&H.instanceColor!==null,instancingMorph:$&&H.morphTexture!==null,supportsVertexTextures:u,outputColorSpace:ee===null?s.outputColorSpace:ee.isXRRenderTarget===!0?ee.texture.colorSpace:Xs,alphaToCoverage:!!A.alphaToCoverage,map:Ce,matcap:Ke,envMap:He,envMapMode:He&&le.mapping,envMapCubeUVHeight:Z,aoMap:O,lightMap:_t,bumpMap:dt,normalMap:at,displacementMap:u&&Fe,emissiveMap:tt,normalMapObjectSpace:at&&A.normalMapType===l2,normalMapTangentSpace:at&&A.normalMapType===Ua,metalnessMap:Le,roughnessMap:ot,anisotropy:jt,anisotropyMap:ye,clearcoat:k,clearcoatMap:vt,clearcoatNormalMap:Ze,clearcoatRoughnessMap:mt,dispersion:T,iridescence:oe,iridescenceMap:yt,iridescenceThicknessMap:Ue,sheen:Se,sheenColorMap:st,sheenRoughnessMap:Rt,specularMap:At,specularColorMap:Ye,specularIntensityMap:Lt,transmission:De,transmissionMap:K,thicknessMap:$e,gradientMap:Ie,opaque:A.transparent===!1&&A.blending===Bs&&A.alphaToCoverage===!1,alphaMap:ut,alphaTest:ze,alphaHash:we,combine:A.combine,mapUv:Ce&&_(A.map.channel),aoMapUv:O&&_(A.aoMap.channel),lightMapUv:_t&&_(A.lightMap.channel),bumpMapUv:dt&&_(A.bumpMap.channel),normalMapUv:at&&_(A.normalMap.channel),displacementMapUv:Fe&&_(A.displacementMap.channel),emissiveMapUv:tt&&_(A.emissiveMap.channel),metalnessMapUv:Le&&_(A.metalnessMap.channel),roughnessMapUv:ot&&_(A.roughnessMap.channel),anisotropyMapUv:ye&&_(A.anisotropyMap.channel),clearcoatMapUv:vt&&_(A.clearcoatMap.channel),clearcoatNormalMapUv:Ze&&_(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:mt&&_(A.clearcoatRoughnessMap.channel),iridescenceMapUv:yt&&_(A.iridescenceMap.channel),iridescenceThicknessMapUv:Ue&&_(A.iridescenceThicknessMap.channel),sheenColorMapUv:st&&_(A.sheenColorMap.channel),sheenRoughnessMapUv:Rt&&_(A.sheenRoughnessMap.channel),specularMapUv:At&&_(A.specularMap.channel),specularColorMapUv:Ye&&_(A.specularColorMap.channel),specularIntensityMapUv:Lt&&_(A.specularIntensityMap.channel),transmissionMapUv:K&&_(A.transmissionMap.channel),thicknessMapUv:$e&&_(A.thicknessMap.channel),alphaMapUv:ut&&_(A.alphaMap.channel),vertexTangents:!!ae.attributes.tangent&&(at||jt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!ae.attributes.color&&ae.attributes.color.itemSize===4,pointsUvs:H.isPoints===!0&&!!ae.attributes.uv&&(Ce||ut),fog:!!Q,useFog:A.fog===!0,fogExp2:!!Q&&Q.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:m,reverseDepthBuffer:ue,skinning:H.isSkinnedMesh===!0,morphTargets:ae.morphAttributes.position!==void 0,morphNormals:ae.morphAttributes.normal!==void 0,morphColors:ae.morphAttributes.color!==void 0,morphTargetsCount:be,morphTextureStride:ge,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:A.dithering,shadowMapEnabled:s.shadowMap.enabled&&L.length>0,shadowMapType:s.shadowMap.type,toneMapping:Ft,decodeVideoTexture:Ce&&A.map.isVideoTexture===!0&&Gt.getTransfer(A.map.colorSpace)===an,decodeVideoTextureEmissive:tt&&A.emissiveMap.isVideoTexture===!0&&Gt.getTransfer(A.emissiveMap.colorSpace)===an,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===pn,flipSided:A.side===In,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionClipCullDistance:pt&&A.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(pt&&A.extensions.multiDraw===!0||pe)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:A.customProgramCacheKey()};return Qt.vertexUv1s=c.has(1),Qt.vertexUv2s=c.has(2),Qt.vertexUv3s=c.has(3),c.clear(),Qt}function f(A){const E=[];if(A.shaderID?E.push(A.shaderID):(E.push(A.customVertexShaderID),E.push(A.customFragmentShaderID)),A.defines!==void 0)for(const L in A.defines)E.push(L),E.push(A.defines[L]);return A.isRawShaderMaterial===!1&&(v(E,A),b(E,A),E.push(s.outputColorSpace)),E.push(A.customProgramCacheKey),E.join()}function v(A,E){A.push(E.precision),A.push(E.outputColorSpace),A.push(E.envMapMode),A.push(E.envMapCubeUVHeight),A.push(E.mapUv),A.push(E.alphaMapUv),A.push(E.lightMapUv),A.push(E.aoMapUv),A.push(E.bumpMapUv),A.push(E.normalMapUv),A.push(E.displacementMapUv),A.push(E.emissiveMapUv),A.push(E.metalnessMapUv),A.push(E.roughnessMapUv),A.push(E.anisotropyMapUv),A.push(E.clearcoatMapUv),A.push(E.clearcoatNormalMapUv),A.push(E.clearcoatRoughnessMapUv),A.push(E.iridescenceMapUv),A.push(E.iridescenceThicknessMapUv),A.push(E.sheenColorMapUv),A.push(E.sheenRoughnessMapUv),A.push(E.specularMapUv),A.push(E.specularColorMapUv),A.push(E.specularIntensityMapUv),A.push(E.transmissionMapUv),A.push(E.thicknessMapUv),A.push(E.combine),A.push(E.fogExp2),A.push(E.sizeAttenuation),A.push(E.morphTargetsCount),A.push(E.morphAttributeCount),A.push(E.numDirLights),A.push(E.numPointLights),A.push(E.numSpotLights),A.push(E.numSpotLightMaps),A.push(E.numHemiLights),A.push(E.numRectAreaLights),A.push(E.numDirLightShadows),A.push(E.numPointLightShadows),A.push(E.numSpotLightShadows),A.push(E.numSpotLightShadowsWithMaps),A.push(E.numLightProbes),A.push(E.shadowMapType),A.push(E.toneMapping),A.push(E.numClippingPlanes),A.push(E.numClipIntersection),A.push(E.depthPacking)}function b(A,E){a.disableAll(),E.supportsVertexTextures&&a.enable(0),E.instancing&&a.enable(1),E.instancingColor&&a.enable(2),E.instancingMorph&&a.enable(3),E.matcap&&a.enable(4),E.envMap&&a.enable(5),E.normalMapObjectSpace&&a.enable(6),E.normalMapTangentSpace&&a.enable(7),E.clearcoat&&a.enable(8),E.iridescence&&a.enable(9),E.alphaTest&&a.enable(10),E.vertexColors&&a.enable(11),E.vertexAlphas&&a.enable(12),E.vertexUv1s&&a.enable(13),E.vertexUv2s&&a.enable(14),E.vertexUv3s&&a.enable(15),E.vertexTangents&&a.enable(16),E.anisotropy&&a.enable(17),E.alphaHash&&a.enable(18),E.batching&&a.enable(19),E.dispersion&&a.enable(20),E.batchingColor&&a.enable(21),A.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.reverseDepthBuffer&&a.enable(4),E.skinning&&a.enable(5),E.morphTargets&&a.enable(6),E.morphNormals&&a.enable(7),E.morphColors&&a.enable(8),E.premultipliedAlpha&&a.enable(9),E.shadowMapEnabled&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.decodeVideoTextureEmissive&&a.enable(20),E.alphaToCoverage&&a.enable(21),A.push(a.mask)}function S(A){const E=g[A.type];let L;if(E){const B=kn[E];L=Ql.clone(B.uniforms)}else L=A.uniforms;return L}function F(A,E){let L;for(let B=0,H=d.length;B<H;B++){const Q=d[B];if(Q.cacheKey===E){L=Q,++L.usedTimes;break}}return L===void 0&&(L=new o3(s,E,A,r),d.push(L)),L}function C(A){if(--A.usedTimes===0){const E=d.indexOf(A);d[E]=d[d.length-1],d.pop(),A.destroy()}}function R(A){l.remove(A)}function P(){l.dispose()}return{getParameters:p,getProgramCacheKey:f,getUniforms:S,acquireProgram:F,releaseProgram:C,releaseShaderCache:R,programs:d,dispose:P}}function d3(){let s=new WeakMap;function e(o){return s.has(o)}function t(o){let a=s.get(o);return a===void 0&&(a={},s.set(o,a)),a}function n(o){s.delete(o)}function i(o,a,l){s.get(o)[a]=l}function r(){s=new WeakMap}return{has:e,get:t,remove:n,update:i,dispose:r}}function f3(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.z!==e.z?s.z-e.z:s.id-e.id}function kh(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function Vh(){const s=[];let e=0;const t=[],n=[],i=[];function r(){e=0,t.length=0,n.length=0,i.length=0}function o(m,u,h,g,_,p){let f=s[e];return f===void 0?(f={id:m.id,object:m,geometry:u,material:h,groupOrder:g,renderOrder:m.renderOrder,z:_,group:p},s[e]=f):(f.id=m.id,f.object=m,f.geometry=u,f.material=h,f.groupOrder=g,f.renderOrder=m.renderOrder,f.z=_,f.group=p),e++,f}function a(m,u,h,g,_,p){const f=o(m,u,h,g,_,p);h.transmission>0?n.push(f):h.transparent===!0?i.push(f):t.push(f)}function l(m,u,h,g,_,p){const f=o(m,u,h,g,_,p);h.transmission>0?n.unshift(f):h.transparent===!0?i.unshift(f):t.unshift(f)}function c(m,u){t.length>1&&t.sort(m||f3),n.length>1&&n.sort(u||kh),i.length>1&&i.sort(u||kh)}function d(){for(let m=e,u=s.length;m<u;m++){const h=s[m];if(h.id===null)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}}return{opaque:t,transmissive:n,transparent:i,init:r,push:a,unshift:l,finish:d,sort:c}}function p3(){let s=new WeakMap;function e(n,i){const r=s.get(n);let o;return r===void 0?(o=new Vh,s.set(n,[o])):i>=r.length?(o=new Vh,r.push(o)):o=r[i],o}function t(){s=new WeakMap}return{get:e,dispose:t}}function m3(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new I,color:new Tt};break;case"SpotLight":t={position:new I,direction:new I,color:new Tt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new I,color:new Tt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new I,skyColor:new Tt,groundColor:new Tt};break;case"RectAreaLight":t={color:new Tt,position:new I,halfWidth:new I,halfHeight:new I};break}return s[e.id]=t,t}}}function g3(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new et,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}let _3=0;function v3(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function y3(s){const e=new m3,t=g3(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)n.probe.push(new I);const i=new I,r=new Et,o=new Et;function a(c){let d=0,m=0,u=0;for(let A=0;A<9;A++)n.probe[A].set(0,0,0);let h=0,g=0,_=0,p=0,f=0,v=0,b=0,S=0,F=0,C=0,R=0;c.sort(v3);for(let A=0,E=c.length;A<E;A++){const L=c[A],B=L.color,H=L.intensity,Q=L.distance,ae=L.shadow&&L.shadow.map?L.shadow.map.texture:null;if(L.isAmbientLight)d+=B.r*H,m+=B.g*H,u+=B.b*H;else if(L.isLightProbe){for(let G=0;G<9;G++)n.probe[G].addScaledVector(L.sh.coefficients[G],H);R++}else if(L.isDirectionalLight){const G=e.get(L);if(G.color.copy(L.color).multiplyScalar(L.intensity),L.castShadow){const le=L.shadow,Z=t.get(L);Z.shadowIntensity=le.intensity,Z.shadowBias=le.bias,Z.shadowNormalBias=le.normalBias,Z.shadowRadius=le.radius,Z.shadowMapSize=le.mapSize,n.directionalShadow[h]=Z,n.directionalShadowMap[h]=ae,n.directionalShadowMatrix[h]=L.shadow.matrix,v++}n.directional[h]=G,h++}else if(L.isSpotLight){const G=e.get(L);G.position.setFromMatrixPosition(L.matrixWorld),G.color.copy(B).multiplyScalar(H),G.distance=Q,G.coneCos=Math.cos(L.angle),G.penumbraCos=Math.cos(L.angle*(1-L.penumbra)),G.decay=L.decay,n.spot[_]=G;const le=L.shadow;if(L.map&&(n.spotLightMap[F]=L.map,F++,le.updateMatrices(L),L.castShadow&&C++),n.spotLightMatrix[_]=le.matrix,L.castShadow){const Z=t.get(L);Z.shadowIntensity=le.intensity,Z.shadowBias=le.bias,Z.shadowNormalBias=le.normalBias,Z.shadowRadius=le.radius,Z.shadowMapSize=le.mapSize,n.spotShadow[_]=Z,n.spotShadowMap[_]=ae,S++}_++}else if(L.isRectAreaLight){const G=e.get(L);G.color.copy(B).multiplyScalar(H),G.halfWidth.set(L.width*.5,0,0),G.halfHeight.set(0,L.height*.5,0),n.rectArea[p]=G,p++}else if(L.isPointLight){const G=e.get(L);if(G.color.copy(L.color).multiplyScalar(L.intensity),G.distance=L.distance,G.decay=L.decay,L.castShadow){const le=L.shadow,Z=t.get(L);Z.shadowIntensity=le.intensity,Z.shadowBias=le.bias,Z.shadowNormalBias=le.normalBias,Z.shadowRadius=le.radius,Z.shadowMapSize=le.mapSize,Z.shadowCameraNear=le.camera.near,Z.shadowCameraFar=le.camera.far,n.pointShadow[g]=Z,n.pointShadowMap[g]=ae,n.pointShadowMatrix[g]=L.shadow.matrix,b++}n.point[g]=G,g++}else if(L.isHemisphereLight){const G=e.get(L);G.skyColor.copy(L.color).multiplyScalar(H),G.groundColor.copy(L.groundColor).multiplyScalar(H),n.hemi[f]=G,f++}}p>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Je.LTC_FLOAT_1,n.rectAreaLTC2=Je.LTC_FLOAT_2):(n.rectAreaLTC1=Je.LTC_HALF_1,n.rectAreaLTC2=Je.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=m,n.ambient[2]=u;const P=n.hash;(P.directionalLength!==h||P.pointLength!==g||P.spotLength!==_||P.rectAreaLength!==p||P.hemiLength!==f||P.numDirectionalShadows!==v||P.numPointShadows!==b||P.numSpotShadows!==S||P.numSpotMaps!==F||P.numLightProbes!==R)&&(n.directional.length=h,n.spot.length=_,n.rectArea.length=p,n.point.length=g,n.hemi.length=f,n.directionalShadow.length=v,n.directionalShadowMap.length=v,n.pointShadow.length=b,n.pointShadowMap.length=b,n.spotShadow.length=S,n.spotShadowMap.length=S,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=b,n.spotLightMatrix.length=S+F-C,n.spotLightMap.length=F,n.numSpotLightShadowsWithMaps=C,n.numLightProbes=R,P.directionalLength=h,P.pointLength=g,P.spotLength=_,P.rectAreaLength=p,P.hemiLength=f,P.numDirectionalShadows=v,P.numPointShadows=b,P.numSpotShadows=S,P.numSpotMaps=F,P.numLightProbes=R,n.version=_3++)}function l(c,d){let m=0,u=0,h=0,g=0,_=0;const p=d.matrixWorldInverse;for(let f=0,v=c.length;f<v;f++){const b=c[f];if(b.isDirectionalLight){const S=n.directional[m];S.direction.setFromMatrixPosition(b.matrixWorld),i.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(p),m++}else if(b.isSpotLight){const S=n.spot[h];S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(p),S.direction.setFromMatrixPosition(b.matrixWorld),i.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(i),S.direction.transformDirection(p),h++}else if(b.isRectAreaLight){const S=n.rectArea[g];S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(p),o.identity(),r.copy(b.matrixWorld),r.premultiply(p),o.extractRotation(r),S.halfWidth.set(b.width*.5,0,0),S.halfHeight.set(0,b.height*.5,0),S.halfWidth.applyMatrix4(o),S.halfHeight.applyMatrix4(o),g++}else if(b.isPointLight){const S=n.point[u];S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(p),u++}else if(b.isHemisphereLight){const S=n.hemi[_];S.direction.setFromMatrixPosition(b.matrixWorld),S.direction.transformDirection(p),_++}}}return{setup:a,setupView:l,state:n}}function Hh(s){const e=new y3(s),t=[],n=[];function i(d){c.camera=d,t.length=0,n.length=0}function r(d){t.push(d)}function o(d){n.push(d)}function a(){e.setup(t)}function l(d){e.setupView(t,d)}const c={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:l,pushLight:r,pushShadow:o}}function x3(s){let e=new WeakMap;function t(i,r=0){const o=e.get(i);let a;return o===void 0?(a=new Hh(s),e.set(i,[a])):r>=o.length?(a=new Hh(s),o.push(a)):a=o[r],a}function n(){e=new WeakMap}return{get:t,dispose:n}}const M3=`void main() {
|
|
3776
3776
|
gl_Position = vec4( position, 1.0 );
|
|
3777
3777
|
}`,b3=`uniform sampler2D shadow_pass;
|
|
3778
3778
|
uniform vec2 resolution;
|
|
@@ -3800,7 +3800,7 @@ void main() {
|
|
|
3800
3800
|
squared_mean = squared_mean / samples;
|
|
3801
3801
|
float std_dev = sqrt( squared_mean - mean * mean );
|
|
3802
3802
|
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
|
|
3803
|
-
}`;function S3(s,e,t){let n=new nc;const i=new et,r=new et,o=new Xt,a=new R1({depthPacking:o2}),l=new D1,c={},d=t.maxTextureSize,m={[Qn]:In,[In]:Qn,[pn]:pn},u=new Li({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new et},radius:{value:4}},vertexShader:M3,fragmentShader:b3}),h=u.clone();h.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new mn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new zt(g,u),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=v0;let f=this.type;this.render=function(C,L,P){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||C.length===0)return;const E=s.getRenderTarget(),A=s.getActiveCubeFace(),D=s.getActiveMipmapLevel(),O=s.state;O.setBlending(Wi),O.buffers.color.setClear(1,1,1,1),O.buffers.depth.setTest(!0),O.setScissorTest(!1);const V=f!==Si&&this.type===Si,Q=f===Si&&this.type!==Si;for(let se=0,G=C.length;se<G;se++){const ce=C[se],Z=ce.shadow;if(Z===void 0){console.warn("THREE.WebGLShadowMap:",ce,"has no shadow.");continue}if(Z.autoUpdate===!1&&Z.needsUpdate===!1)continue;i.copy(Z.mapSize);const ge=Z.getFrameExtents();if(i.multiply(ge),r.copy(Z.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/ge.x),i.x=r.x*ge.x,Z.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/ge.y),i.y=r.y*ge.y,Z.mapSize.y=r.y)),Z.map===null||V===!0||Q===!0){const ye=this.type!==Si?{minFilter:jn,magFilter:jn}:{};Z.map!==null&&Z.map.dispose(),Z.map=new us(i.x,i.y,ye),Z.map.texture.name=ce.name+".shadowMap",Z.camera.updateProjectionMatrix()}s.setRenderTarget(Z.map),s.clear();const De=Z.getViewportCount();for(let ye=0;ye<De;ye++){const _e=Z.getViewport(ye);o.set(r.x*_e.x,r.y*_e.y,r.x*_e.z,r.y*_e.w),O.viewport(o),Z.updateMatrices(ce,ye),n=Z.getFrustum(),S(L,P,Z.camera,ce,this.type)}Z.isPointLightShadow!==!0&&this.type===Si&&x(Z,P),Z.needsUpdate=!1}f=this.type,p.needsUpdate=!1,s.setRenderTarget(E,A,D)};function x(C,L){const P=e.update(_);u.defines.VSM_SAMPLES!==C.blurSamples&&(u.defines.VSM_SAMPLES=C.blurSamples,h.defines.VSM_SAMPLES=C.blurSamples,u.needsUpdate=!0,h.needsUpdate=!0),C.mapPass===null&&(C.mapPass=new us(i.x,i.y)),u.uniforms.shadow_pass.value=C.map.texture,u.uniforms.resolution.value=C.mapSize,u.uniforms.radius.value=C.radius,s.setRenderTarget(C.mapPass),s.clear(),s.renderBufferDirect(L,null,P,u,_,null),h.uniforms.shadow_pass.value=C.mapPass.texture,h.uniforms.resolution.value=C.mapSize,h.uniforms.radius.value=C.radius,s.setRenderTarget(C.map),s.clear(),s.renderBufferDirect(L,null,P,h,_,null)}function y(C,L,P,E){let A=null;const D=P.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(D!==void 0)A=D;else if(A=P.isPointLight===!0?l:a,s.localClippingEnabled&&L.clipShadows===!0&&Array.isArray(L.clippingPlanes)&&L.clippingPlanes.length!==0||L.displacementMap&&L.displacementScale!==0||L.alphaMap&&L.alphaTest>0||L.map&&L.alphaTest>0||L.alphaToCoverage===!0){const O=A.uuid,V=L.uuid;let Q=c[O];Q===void 0&&(Q={},c[O]=Q);let se=Q[V];se===void 0&&(se=A.clone(),Q[V]=se,L.addEventListener("dispose",U)),A=se}if(A.visible=L.visible,A.wireframe=L.wireframe,E===Si?A.side=L.shadowSide!==null?L.shadowSide:L.side:A.side=L.shadowSide!==null?L.shadowSide:m[L.side],A.alphaMap=L.alphaMap,A.alphaTest=L.alphaToCoverage===!0?.5:L.alphaTest,A.map=L.map,A.clipShadows=L.clipShadows,A.clippingPlanes=L.clippingPlanes,A.clipIntersection=L.clipIntersection,A.displacementMap=L.displacementMap,A.displacementScale=L.displacementScale,A.displacementBias=L.displacementBias,A.wireframeLinewidth=L.wireframeLinewidth,A.linewidth=L.linewidth,P.isPointLight===!0&&A.isMeshDistanceMaterial===!0){const O=s.properties.get(A);O.light=P}return A}function S(C,L,P,E,A){if(C.visible===!1)return;if(C.layers.test(L.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&A===Si)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,C.matrixWorld);const V=e.update(C),Q=C.material;if(Array.isArray(Q)){const se=V.groups;for(let G=0,ce=se.length;G<ce;G++){const Z=se[G],ge=Q[Z.materialIndex];if(ge&&ge.visible){const De=y(C,ge,E,A);C.onBeforeShadow(s,C,L,P,V,De,Z),s.renderBufferDirect(P,null,V,De,C,Z),C.onAfterShadow(s,C,L,P,V,De,Z)}}}else if(Q.visible){const se=y(C,Q,E,A);C.onBeforeShadow(s,C,L,P,V,se,null),s.renderBufferDirect(P,null,V,se,C,null),C.onAfterShadow(s,C,L,P,V,se,null)}}const O=C.children;for(let V=0,Q=O.length;V<Q;V++)S(O[V],L,P,E,A)}function U(C){C.target.removeEventListener("dispose",U);for(const P in c){const E=c[P],A=C.target.uuid;A in E&&(E[A].dispose(),delete E[A])}}}const E3={[Xo]:jo,[qo]:Jo,[$o]:Ko,[Hs]:Yo,[jo]:Xo,[Jo]:qo,[Ko]:$o,[Yo]:Hs};function A3(s,e){function t(){let K=!1;const Ye=new Xt;let Ie=null;const ut=new Xt(0,0,0,0);return{setMask:function(ze){Ie!==ze&&!K&&(s.colorMask(ze,ze,ze,ze),Ie=ze)},setLocked:function(ze){K=ze},setClear:function(ze,Ae,pt,Ft,Qt){Qt===!0&&(ze*=Ft,Ae*=Ft,pt*=Ft),Ye.set(ze,Ae,pt,Ft),ut.equals(Ye)===!1&&(s.clearColor(ze,Ae,pt,Ft),ut.copy(Ye))},reset:function(){K=!1,Ie=null,ut.set(-1,0,0,0)}}}function n(){let K=!1,Ye=!1,Ie=null,ut=null,ze=null;return{setReversed:function(Ae){if(Ye!==Ae){const pt=e.get("EXT_clip_control");Ae?pt.clipControlEXT(pt.LOWER_LEFT_EXT,pt.ZERO_TO_ONE_EXT):pt.clipControlEXT(pt.LOWER_LEFT_EXT,pt.NEGATIVE_ONE_TO_ONE_EXT),Ye=Ae;const Ft=ze;ze=null,this.setClear(Ft)}},getReversed:function(){return Ye},setTest:function(Ae){Ae?ne(s.DEPTH_TEST):he(s.DEPTH_TEST)},setMask:function(Ae){Ie!==Ae&&!K&&(s.depthMask(Ae),Ie=Ae)},setFunc:function(Ae){if(Ye&&(Ae=E3[Ae]),ut!==Ae){switch(Ae){case Xo:s.depthFunc(s.NEVER);break;case jo:s.depthFunc(s.ALWAYS);break;case qo:s.depthFunc(s.LESS);break;case Hs:s.depthFunc(s.LEQUAL);break;case $o:s.depthFunc(s.EQUAL);break;case Yo:s.depthFunc(s.GEQUAL);break;case Jo:s.depthFunc(s.GREATER);break;case Ko:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}ut=Ae}},setLocked:function(Ae){K=Ae},setClear:function(Ae){ze!==Ae&&(Ye&&(Ae=1-Ae),s.clearDepth(Ae),ze=Ae)},reset:function(){K=!1,Ie=null,ut=null,ze=null,Ye=!1}}}function i(){let K=!1,Ye=null,Ie=null,ut=null,ze=null,Ae=null,pt=null,Ft=null,Qt=null;return{setTest:function(Nt){K||(Nt?ne(s.STENCIL_TEST):he(s.STENCIL_TEST))},setMask:function(Nt){Ye!==Nt&&!K&&(s.stencilMask(Nt),Ye=Nt)},setFunc:function(Nt,Cn,Hn){(Ie!==Nt||ut!==Cn||ze!==Hn)&&(s.stencilFunc(Nt,Cn,Hn),Ie=Nt,ut=Cn,ze=Hn)},setOp:function(Nt,Cn,Hn){(Ae!==Nt||pt!==Cn||Ft!==Hn)&&(s.stencilOp(Nt,Cn,Hn),Ae=Nt,pt=Cn,Ft=Hn)},setLocked:function(Nt){K=Nt},setClear:function(Nt){Qt!==Nt&&(s.clearStencil(Nt),Qt=Nt)},reset:function(){K=!1,Ye=null,Ie=null,ut=null,ze=null,Ae=null,pt=null,Ft=null,Qt=null}}}const r=new t,o=new n,a=new i,l=new WeakMap,c=new WeakMap;let d={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,x=null,y=null,S=null,U=null,C=null,L=new Tt(0,0,0),P=0,E=!1,A=null,D=null,O=null,V=null,Q=null;const se=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let G=!1,ce=0;const Z=s.getParameter(s.VERSION);Z.indexOf("WebGL")!==-1?(ce=parseFloat(/^WebGL (\d)/.exec(Z)[1]),G=ce>=1):Z.indexOf("OpenGL ES")!==-1&&(ce=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),G=ce>=2);let ge=null,De={};const ye=s.getParameter(s.SCISSOR_BOX),_e=s.getParameter(s.VIEWPORT),ae=new Xt().fromArray(ye),j=new Xt().fromArray(_e);function Y(K,Ye,Ie,ut){const ze=new Uint8Array(4),Ae=s.createTexture();s.bindTexture(K,Ae),s.texParameteri(K,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(K,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let pt=0;pt<Ie;pt++)K===s.TEXTURE_3D||K===s.TEXTURE_2D_ARRAY?s.texImage3D(Ye,0,s.RGBA,1,1,ut,0,s.RGBA,s.UNSIGNED_BYTE,ze):s.texImage2D(Ye+pt,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,ze);return Ae}const ee={};ee[s.TEXTURE_2D]=Y(s.TEXTURE_2D,s.TEXTURE_2D,1),ee[s.TEXTURE_CUBE_MAP]=Y(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),ee[s.TEXTURE_2D_ARRAY]=Y(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),ee[s.TEXTURE_3D]=Y(s.TEXTURE_3D,s.TEXTURE_3D,1,1),r.setClear(0,0,0,1),o.setClear(1),a.setClear(0),ne(s.DEPTH_TEST),o.setFunc(Hs),dt(!1),at(vc),ne(s.CULL_FACE),B(Wi);function ne(K){d[K]!==!0&&(s.enable(K),d[K]=!0)}function he(K){d[K]!==!1&&(s.disable(K),d[K]=!1)}function J(K,Ye){return m[K]!==Ye?(s.bindFramebuffer(K,Ye),m[K]=Ye,K===s.DRAW_FRAMEBUFFER&&(m[s.FRAMEBUFFER]=Ye),K===s.FRAMEBUFFER&&(m[s.DRAW_FRAMEBUFFER]=Ye),!0):!1}function ue(K,Ye){let Ie=h,ut=!1;if(K){Ie=u.get(Ye),Ie===void 0&&(Ie=[],u.set(Ye,Ie));const ze=K.textures;if(Ie.length!==ze.length||Ie[0]!==s.COLOR_ATTACHMENT0){for(let Ae=0,pt=ze.length;Ae<pt;Ae++)Ie[Ae]=s.COLOR_ATTACHMENT0+Ae;Ie.length=ze.length,ut=!0}}else Ie[0]!==s.BACK&&(Ie[0]=s.BACK,ut=!0);ut&&s.drawBuffers(Ie)}function Ce(K){return g!==K?(s.useProgram(K),g=K,!0):!1}const je={[rs]:s.FUNC_ADD,[Pu]:s.FUNC_SUBTRACT,[Fu]:s.FUNC_REVERSE_SUBTRACT};je[Uu]=s.MIN,je[Nu]=s.MAX;const We={[Iu]:s.ZERO,[zu]:s.ONE,[Bu]:s.SRC_COLOR,[Go]:s.SRC_ALPHA,[Wu]:s.SRC_ALPHA_SATURATE,[Hu]:s.DST_COLOR,[ku]:s.DST_ALPHA,[Ou]:s.ONE_MINUS_SRC_COLOR,[Wo]:s.ONE_MINUS_SRC_ALPHA,[Gu]:s.ONE_MINUS_DST_COLOR,[Vu]:s.ONE_MINUS_DST_ALPHA,[Xu]:s.CONSTANT_COLOR,[ju]:s.ONE_MINUS_CONSTANT_COLOR,[qu]:s.CONSTANT_ALPHA,[$u]:s.ONE_MINUS_CONSTANT_ALPHA};function B(K,Ye,Ie,ut,ze,Ae,pt,Ft,Qt,Nt){if(K===Wi){_===!0&&(he(s.BLEND),_=!1);return}if(_===!1&&(ne(s.BLEND),_=!0),K!==Lu){if(K!==p||Nt!==E){if((f!==rs||S!==rs)&&(s.blendEquation(s.FUNC_ADD),f=rs,S=rs),Nt)switch(K){case Bs:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case yc:s.blendFunc(s.ONE,s.ONE);break;case xc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Mc:s.blendFuncSeparate(s.ZERO,s.SRC_COLOR,s.ZERO,s.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}else switch(K){case Bs:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case yc:s.blendFunc(s.SRC_ALPHA,s.ONE);break;case xc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Mc:s.blendFunc(s.ZERO,s.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}x=null,y=null,U=null,C=null,L.set(0,0,0),P=0,p=K,E=Nt}return}ze=ze||Ye,Ae=Ae||Ie,pt=pt||ut,(Ye!==f||ze!==S)&&(s.blendEquationSeparate(je[Ye],je[ze]),f=Ye,S=ze),(Ie!==x||ut!==y||Ae!==U||pt!==C)&&(s.blendFuncSeparate(We[Ie],We[ut],We[Ae],We[pt]),x=Ie,y=ut,U=Ae,C=pt),(Ft.equals(L)===!1||Qt!==P)&&(s.blendColor(Ft.r,Ft.g,Ft.b,Qt),L.copy(Ft),P=Qt),p=K,E=!1}function _t(K,Ye){K.side===pn?he(s.CULL_FACE):ne(s.CULL_FACE);let Ie=K.side===In;Ye&&(Ie=!Ie),dt(Ie),K.blending===Bs&&K.transparent===!1?B(Wi):B(K.blending,K.blendEquation,K.blendSrc,K.blendDst,K.blendEquationAlpha,K.blendSrcAlpha,K.blendDstAlpha,K.blendColor,K.blendAlpha,K.premultipliedAlpha),o.setFunc(K.depthFunc),o.setTest(K.depthTest),o.setMask(K.depthWrite),r.setMask(K.colorWrite);const ut=K.stencilWrite;a.setTest(ut),ut&&(a.setMask(K.stencilWriteMask),a.setFunc(K.stencilFunc,K.stencilRef,K.stencilFuncMask),a.setOp(K.stencilFail,K.stencilZFail,K.stencilZPass)),tt(K.polygonOffset,K.polygonOffsetFactor,K.polygonOffsetUnits),K.alphaToCoverage===!0?ne(s.SAMPLE_ALPHA_TO_COVERAGE):he(s.SAMPLE_ALPHA_TO_COVERAGE)}function dt(K){A!==K&&(K?s.frontFace(s.CW):s.frontFace(s.CCW),A=K)}function at(K){K!==Ru?(ne(s.CULL_FACE),K!==D&&(K===vc?s.cullFace(s.BACK):K===Du?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):he(s.CULL_FACE),D=K}function Fe(K){K!==O&&(G&&s.lineWidth(K),O=K)}function tt(K,Ye,Ie){K?(ne(s.POLYGON_OFFSET_FILL),(V!==Ye||Q!==Ie)&&(s.polygonOffset(Ye,Ie),V=Ye,Q=Ie)):he(s.POLYGON_OFFSET_FILL)}function Le(K){K?ne(s.SCISSOR_TEST):he(s.SCISSOR_TEST)}function ot(K){K===void 0&&(K=s.TEXTURE0+se-1),ge!==K&&(s.activeTexture(K),ge=K)}function jt(K,Ye,Ie){Ie===void 0&&(ge===null?Ie=s.TEXTURE0+se-1:Ie=ge);let ut=De[Ie];ut===void 0&&(ut={type:void 0,texture:void 0},De[Ie]=ut),(ut.type!==K||ut.texture!==Ye)&&(ge!==Ie&&(s.activeTexture(Ie),ge=Ie),s.bindTexture(K,Ye||ee[K]),ut.type=K,ut.texture=Ye)}function k(){const K=De[ge];K!==void 0&&K.type!==void 0&&(s.bindTexture(K.type,null),K.type=void 0,K.texture=void 0)}function T(){try{s.compressedTexImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function oe(){try{s.compressedTexImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function be(){try{s.texSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Re(){try{s.texSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function xe(){try{s.compressedTexSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function vt(){try{s.compressedTexSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ze(){try{s.texStorage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function mt(){try{s.texStorage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function yt(){try{s.texImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ne(){try{s.texImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function st(K){ae.equals(K)===!1&&(s.scissor(K.x,K.y,K.z,K.w),ae.copy(K))}function Rt(K){j.equals(K)===!1&&(s.viewport(K.x,K.y,K.z,K.w),j.copy(K))}function At(K,Ye){let Ie=c.get(Ye);Ie===void 0&&(Ie=new WeakMap,c.set(Ye,Ie));let ut=Ie.get(K);ut===void 0&&(ut=s.getUniformBlockIndex(Ye,K.name),Ie.set(K,ut))}function Je(K,Ye){const ut=c.get(Ye).get(K);l.get(Ye)!==ut&&(s.uniformBlockBinding(Ye,ut,K.__bindingPointIndex),l.set(Ye,ut))}function Lt(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),o.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),d={},ge=null,De={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,x=null,y=null,S=null,U=null,C=null,L=new Tt(0,0,0),P=0,E=!1,A=null,D=null,O=null,V=null,Q=null,ae.set(0,0,s.canvas.width,s.canvas.height),j.set(0,0,s.canvas.width,s.canvas.height),r.reset(),o.reset(),a.reset()}return{buffers:{color:r,depth:o,stencil:a},enable:ne,disable:he,bindFramebuffer:J,drawBuffers:ue,useProgram:Ce,setBlending:B,setMaterial:_t,setFlipSided:dt,setCullFace:at,setLineWidth:Fe,setPolygonOffset:tt,setScissorTest:Le,activeTexture:ot,bindTexture:jt,unbindTexture:k,compressedTexImage2D:T,compressedTexImage3D:oe,texImage2D:yt,texImage3D:Ne,updateUBOMapping:At,uniformBlockBinding:Je,texStorage2D:Ze,texStorage3D:mt,texSubImage2D:be,texSubImage3D:Re,compressedTexSubImage2D:xe,compressedTexSubImage3D:vt,scissor:st,viewport:Rt,reset:Lt}}function w3(s,e,t,n,i,r,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new et,d=new WeakMap;let m;const u=new WeakMap;let h=!1;try{h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(k,T){return h?new OffscreenCanvas(k,T):Mr("canvas")}function _(k,T,oe){let be=1;const Re=jt(k);if((Re.width>oe||Re.height>oe)&&(be=oe/Math.max(Re.width,Re.height)),be<1)if(typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&k instanceof ImageBitmap||typeof VideoFrame<"u"&&k instanceof VideoFrame){const xe=Math.floor(be*Re.width),vt=Math.floor(be*Re.height);m===void 0&&(m=g(xe,vt));const Ze=T?g(xe,vt):m;return Ze.width=xe,Ze.height=vt,Ze.getContext("2d").drawImage(k,0,0,xe,vt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Re.width+"x"+Re.height+") to ("+xe+"x"+vt+")."),Ze}else return"data"in k&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Re.width+"x"+Re.height+")."),k;return k}function p(k){return k.generateMipmaps}function f(k){s.generateMipmap(k)}function x(k){return k.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:k.isWebGL3DRenderTarget?s.TEXTURE_3D:k.isWebGLArrayRenderTarget||k.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function y(k,T,oe,be,Re=!1){if(k!==null){if(s[k]!==void 0)return s[k];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+k+"'")}let xe=T;if(T===s.RED&&(oe===s.FLOAT&&(xe=s.R32F),oe===s.HALF_FLOAT&&(xe=s.R16F),oe===s.UNSIGNED_BYTE&&(xe=s.R8)),T===s.RED_INTEGER&&(oe===s.UNSIGNED_BYTE&&(xe=s.R8UI),oe===s.UNSIGNED_SHORT&&(xe=s.R16UI),oe===s.UNSIGNED_INT&&(xe=s.R32UI),oe===s.BYTE&&(xe=s.R8I),oe===s.SHORT&&(xe=s.R16I),oe===s.INT&&(xe=s.R32I)),T===s.RG&&(oe===s.FLOAT&&(xe=s.RG32F),oe===s.HALF_FLOAT&&(xe=s.RG16F),oe===s.UNSIGNED_BYTE&&(xe=s.RG8)),T===s.RG_INTEGER&&(oe===s.UNSIGNED_BYTE&&(xe=s.RG8UI),oe===s.UNSIGNED_SHORT&&(xe=s.RG16UI),oe===s.UNSIGNED_INT&&(xe=s.RG32UI),oe===s.BYTE&&(xe=s.RG8I),oe===s.SHORT&&(xe=s.RG16I),oe===s.INT&&(xe=s.RG32I)),T===s.RGB_INTEGER&&(oe===s.UNSIGNED_BYTE&&(xe=s.RGB8UI),oe===s.UNSIGNED_SHORT&&(xe=s.RGB16UI),oe===s.UNSIGNED_INT&&(xe=s.RGB32UI),oe===s.BYTE&&(xe=s.RGB8I),oe===s.SHORT&&(xe=s.RGB16I),oe===s.INT&&(xe=s.RGB32I)),T===s.RGBA_INTEGER&&(oe===s.UNSIGNED_BYTE&&(xe=s.RGBA8UI),oe===s.UNSIGNED_SHORT&&(xe=s.RGBA16UI),oe===s.UNSIGNED_INT&&(xe=s.RGBA32UI),oe===s.BYTE&&(xe=s.RGBA8I),oe===s.SHORT&&(xe=s.RGBA16I),oe===s.INT&&(xe=s.RGBA32I)),T===s.RGB&&oe===s.UNSIGNED_INT_5_9_9_9_REV&&(xe=s.RGB9_E5),T===s.RGBA){const vt=Re?Aa:Gt.getTransfer(be);oe===s.FLOAT&&(xe=s.RGBA32F),oe===s.HALF_FLOAT&&(xe=s.RGBA16F),oe===s.UNSIGNED_BYTE&&(xe=vt===an?s.SRGB8_ALPHA8:s.RGBA8),oe===s.UNSIGNED_SHORT_4_4_4_4&&(xe=s.RGBA4),oe===s.UNSIGNED_SHORT_5_5_5_1&&(xe=s.RGB5_A1)}return(xe===s.R16F||xe===s.R32F||xe===s.RG16F||xe===s.RG32F||xe===s.RGBA16F||xe===s.RGBA32F)&&e.get("EXT_color_buffer_float"),xe}function S(k,T){let oe;return k?T===null||T===hs||T===vr?oe=s.DEPTH24_STENCIL8:T===fi?oe=s.DEPTH32F_STENCIL8:T===_r&&(oe=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):T===null||T===hs||T===vr?oe=s.DEPTH_COMPONENT24:T===fi?oe=s.DEPTH_COMPONENT32F:T===_r&&(oe=s.DEPTH_COMPONENT16),oe}function U(k,T){return p(k)===!0||k.isFramebufferTexture&&k.minFilter!==jn&&k.minFilter!==Xn?Math.log2(Math.max(T.width,T.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?T.mipmaps.length:1}function C(k){const T=k.target;T.removeEventListener("dispose",C),P(T),T.isVideoTexture&&d.delete(T)}function L(k){const T=k.target;T.removeEventListener("dispose",L),A(T)}function P(k){const T=n.get(k);if(T.__webglInit===void 0)return;const oe=k.source,be=u.get(oe);if(be){const Re=be[T.__cacheKey];Re.usedTimes--,Re.usedTimes===0&&E(k),Object.keys(be).length===0&&u.delete(oe)}n.remove(k)}function E(k){const T=n.get(k);s.deleteTexture(T.__webglTexture);const oe=k.source,be=u.get(oe);delete be[T.__cacheKey],o.memory.textures--}function A(k){const T=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let be=0;be<6;be++){if(Array.isArray(T.__webglFramebuffer[be]))for(let Re=0;Re<T.__webglFramebuffer[be].length;Re++)s.deleteFramebuffer(T.__webglFramebuffer[be][Re]);else s.deleteFramebuffer(T.__webglFramebuffer[be]);T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer[be])}else{if(Array.isArray(T.__webglFramebuffer))for(let be=0;be<T.__webglFramebuffer.length;be++)s.deleteFramebuffer(T.__webglFramebuffer[be]);else s.deleteFramebuffer(T.__webglFramebuffer);if(T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer),T.__webglMultisampledFramebuffer&&s.deleteFramebuffer(T.__webglMultisampledFramebuffer),T.__webglColorRenderbuffer)for(let be=0;be<T.__webglColorRenderbuffer.length;be++)T.__webglColorRenderbuffer[be]&&s.deleteRenderbuffer(T.__webglColorRenderbuffer[be]);T.__webglDepthRenderbuffer&&s.deleteRenderbuffer(T.__webglDepthRenderbuffer)}const oe=k.textures;for(let be=0,Re=oe.length;be<Re;be++){const xe=n.get(oe[be]);xe.__webglTexture&&(s.deleteTexture(xe.__webglTexture),o.memory.textures--),n.remove(oe[be])}n.remove(k)}let D=0;function O(){D=0}function V(){const k=D;return k>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+i.maxTextures),D+=1,k}function Q(k){const T=[];return T.push(k.wrapS),T.push(k.wrapT),T.push(k.wrapR||0),T.push(k.magFilter),T.push(k.minFilter),T.push(k.anisotropy),T.push(k.internalFormat),T.push(k.format),T.push(k.type),T.push(k.generateMipmaps),T.push(k.premultiplyAlpha),T.push(k.flipY),T.push(k.unpackAlignment),T.push(k.colorSpace),T.join()}function se(k,T){const oe=n.get(k);if(k.isVideoTexture&&Le(k),k.isRenderTargetTexture===!1&&k.version>0&&oe.__version!==k.version){const be=k.image;if(be===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(be.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ee(oe,k,T);return}}t.bindTexture(s.TEXTURE_2D,oe.__webglTexture,s.TEXTURE0+T)}function G(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ee(oe,k,T);return}t.bindTexture(s.TEXTURE_2D_ARRAY,oe.__webglTexture,s.TEXTURE0+T)}function ce(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ee(oe,k,T);return}t.bindTexture(s.TEXTURE_3D,oe.__webglTexture,s.TEXTURE0+T)}function Z(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ne(oe,k,T);return}t.bindTexture(s.TEXTURE_CUBE_MAP,oe.__webglTexture,s.TEXTURE0+T)}const ge={[di]:s.REPEAT,[ri]:s.CLAMP_TO_EDGE,[el]:s.MIRRORED_REPEAT},De={[jn]:s.NEAREST,[s2]:s.NEAREST_MIPMAP_NEAREST,[wr]:s.NEAREST_MIPMAP_LINEAR,[Xn]:s.LINEAR,[Xa]:s.LINEAR_MIPMAP_NEAREST,[Ai]:s.LINEAR_MIPMAP_LINEAR},ye={[c2]:s.NEVER,[m2]:s.ALWAYS,[h2]:s.LESS,[C0]:s.LEQUAL,[u2]:s.EQUAL,[p2]:s.GEQUAL,[d2]:s.GREATER,[f2]:s.NOTEQUAL};function _e(k,T){if(T.type===fi&&e.has("OES_texture_float_linear")===!1&&(T.magFilter===Xn||T.magFilter===Xa||T.magFilter===wr||T.magFilter===Ai||T.minFilter===Xn||T.minFilter===Xa||T.minFilter===wr||T.minFilter===Ai)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(k,s.TEXTURE_WRAP_S,ge[T.wrapS]),s.texParameteri(k,s.TEXTURE_WRAP_T,ge[T.wrapT]),(k===s.TEXTURE_3D||k===s.TEXTURE_2D_ARRAY)&&s.texParameteri(k,s.TEXTURE_WRAP_R,ge[T.wrapR]),s.texParameteri(k,s.TEXTURE_MAG_FILTER,De[T.magFilter]),s.texParameteri(k,s.TEXTURE_MIN_FILTER,De[T.minFilter]),T.compareFunction&&(s.texParameteri(k,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(k,s.TEXTURE_COMPARE_FUNC,ye[T.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(T.magFilter===jn||T.minFilter!==wr&&T.minFilter!==Ai||T.type===fi&&e.has("OES_texture_float_linear")===!1)return;if(T.anisotropy>1||n.get(T).__currentAnisotropy){const oe=e.get("EXT_texture_filter_anisotropic");s.texParameterf(k,oe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(T.anisotropy,i.getMaxAnisotropy())),n.get(T).__currentAnisotropy=T.anisotropy}}}function ae(k,T){let oe=!1;k.__webglInit===void 0&&(k.__webglInit=!0,T.addEventListener("dispose",C));const be=T.source;let Re=u.get(be);Re===void 0&&(Re={},u.set(be,Re));const xe=Q(T);if(xe!==k.__cacheKey){Re[xe]===void 0&&(Re[xe]={texture:s.createTexture(),usedTimes:0},o.memory.textures++,oe=!0),Re[xe].usedTimes++;const vt=Re[k.__cacheKey];vt!==void 0&&(Re[k.__cacheKey].usedTimes--,vt.usedTimes===0&&E(T)),k.__cacheKey=xe,k.__webglTexture=Re[xe].texture}return oe}function j(k,T,oe){return Math.floor(Math.floor(k/oe)/T)}function Y(k,T,oe,be){const xe=k.updateRanges;if(xe.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,T.width,T.height,oe,be,T.data);else{xe.sort((Ne,st)=>Ne.start-st.start);let vt=0;for(let Ne=1;Ne<xe.length;Ne++){const st=xe[vt],Rt=xe[Ne],At=st.start+st.count,Je=j(Rt.start,T.width,4),Lt=j(st.start,T.width,4);Rt.start<=At+1&&Je===Lt&&j(Rt.start+Rt.count-1,T.width,4)===Je?st.count=Math.max(st.count,Rt.start+Rt.count-st.start):(++vt,xe[vt]=Rt)}xe.length=vt+1;const Ze=s.getParameter(s.UNPACK_ROW_LENGTH),mt=s.getParameter(s.UNPACK_SKIP_PIXELS),yt=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,T.width);for(let Ne=0,st=xe.length;Ne<st;Ne++){const Rt=xe[Ne],At=Math.floor(Rt.start/4),Je=Math.ceil(Rt.count/4),Lt=At%T.width,K=Math.floor(At/T.width),Ye=Je,Ie=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,Lt),s.pixelStorei(s.UNPACK_SKIP_ROWS,K),t.texSubImage2D(s.TEXTURE_2D,0,Lt,K,Ye,Ie,oe,be,T.data)}k.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,Ze),s.pixelStorei(s.UNPACK_SKIP_PIXELS,mt),s.pixelStorei(s.UNPACK_SKIP_ROWS,yt)}}function ee(k,T,oe){let be=s.TEXTURE_2D;(T.isDataArrayTexture||T.isCompressedArrayTexture)&&(be=s.TEXTURE_2D_ARRAY),T.isData3DTexture&&(be=s.TEXTURE_3D);const Re=ae(k,T),xe=T.source;t.bindTexture(be,k.__webglTexture,s.TEXTURE0+oe);const vt=n.get(xe);if(xe.version!==vt.__version||Re===!0){t.activeTexture(s.TEXTURE0+oe);const Ze=Gt.getPrimaries(Gt.workingColorSpace),mt=T.colorSpace===Hi?null:Gt.getPrimaries(T.colorSpace),yt=T.colorSpace===Hi||Ze===mt?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,T.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,T.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,T.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,yt);let Ne=_(T.image,!1,i.maxTextureSize);Ne=ot(T,Ne);const st=r.convert(T.format,T.colorSpace),Rt=r.convert(T.type);let At=y(T.internalFormat,st,Rt,T.colorSpace,T.isVideoTexture);_e(be,T);let Je;const Lt=T.mipmaps,K=T.isVideoTexture!==!0,Ye=vt.__version===void 0||Re===!0,Ie=xe.dataReady,ut=U(T,Ne);if(T.isDepthTexture)At=S(T.format===xr,T.type),Ye&&(K?t.texStorage2D(s.TEXTURE_2D,1,At,Ne.width,Ne.height):t.texImage2D(s.TEXTURE_2D,0,At,Ne.width,Ne.height,0,st,Rt,null));else if(T.isDataTexture)if(Lt.length>0){K&&Ye&&t.texStorage2D(s.TEXTURE_2D,ut,At,Lt[0].width,Lt[0].height);for(let ze=0,Ae=Lt.length;ze<Ae;ze++)Je=Lt[ze],K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,Je.width,Je.height,st,Rt,Je.data):t.texImage2D(s.TEXTURE_2D,ze,At,Je.width,Je.height,0,st,Rt,Je.data);T.generateMipmaps=!1}else K?(Ye&&t.texStorage2D(s.TEXTURE_2D,ut,At,Ne.width,Ne.height),Ie&&Y(T,Ne,st,Rt)):t.texImage2D(s.TEXTURE_2D,0,At,Ne.width,Ne.height,0,st,Rt,Ne.data);else if(T.isCompressedTexture)if(T.isCompressedArrayTexture){K&&Ye&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ut,At,Lt[0].width,Lt[0].height,Ne.depth);for(let ze=0,Ae=Lt.length;ze<Ae;ze++)if(Je=Lt[ze],T.format!==Zn)if(st!==null)if(K){if(Ie)if(T.layerUpdates.size>0){const pt=vh(Je.width,Je.height,T.format,T.type);for(const Ft of T.layerUpdates){const Qt=Je.data.subarray(Ft*pt/Je.data.BYTES_PER_ELEMENT,(Ft+1)*pt/Je.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,Ft,Je.width,Je.height,1,st,Qt)}T.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,0,Je.width,Je.height,Ne.depth,st,Je.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,ze,At,Je.width,Je.height,Ne.depth,0,Je.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else K?Ie&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,0,Je.width,Je.height,Ne.depth,st,Rt,Je.data):t.texImage3D(s.TEXTURE_2D_ARRAY,ze,At,Je.width,Je.height,Ne.depth,0,st,Rt,Je.data)}else{K&&Ye&&t.texStorage2D(s.TEXTURE_2D,ut,At,Lt[0].width,Lt[0].height);for(let ze=0,Ae=Lt.length;ze<Ae;ze++)Je=Lt[ze],T.format!==Zn?st!==null?K?Ie&&t.compressedTexSubImage2D(s.TEXTURE_2D,ze,0,0,Je.width,Je.height,st,Je.data):t.compressedTexImage2D(s.TEXTURE_2D,ze,At,Je.width,Je.height,0,Je.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,Je.width,Je.height,st,Rt,Je.data):t.texImage2D(s.TEXTURE_2D,ze,At,Je.width,Je.height,0,st,Rt,Je.data)}else if(T.isDataArrayTexture)if(K){if(Ye&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ut,At,Ne.width,Ne.height,Ne.depth),Ie)if(T.layerUpdates.size>0){const ze=vh(Ne.width,Ne.height,T.format,T.type);for(const Ae of T.layerUpdates){const pt=Ne.data.subarray(Ae*ze/Ne.data.BYTES_PER_ELEMENT,(Ae+1)*ze/Ne.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,Ae,Ne.width,Ne.height,1,st,Rt,pt)}T.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,Ne.width,Ne.height,Ne.depth,st,Rt,Ne.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,At,Ne.width,Ne.height,Ne.depth,0,st,Rt,Ne.data);else if(T.isData3DTexture)K?(Ye&&t.texStorage3D(s.TEXTURE_3D,ut,At,Ne.width,Ne.height,Ne.depth),Ie&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,Ne.width,Ne.height,Ne.depth,st,Rt,Ne.data)):t.texImage3D(s.TEXTURE_3D,0,At,Ne.width,Ne.height,Ne.depth,0,st,Rt,Ne.data);else if(T.isFramebufferTexture){if(Ye)if(K)t.texStorage2D(s.TEXTURE_2D,ut,At,Ne.width,Ne.height);else{let ze=Ne.width,Ae=Ne.height;for(let pt=0;pt<ut;pt++)t.texImage2D(s.TEXTURE_2D,pt,At,ze,Ae,0,st,Rt,null),ze>>=1,Ae>>=1}}else if(Lt.length>0){if(K&&Ye){const ze=jt(Lt[0]);t.texStorage2D(s.TEXTURE_2D,ut,At,ze.width,ze.height)}for(let ze=0,Ae=Lt.length;ze<Ae;ze++)Je=Lt[ze],K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,st,Rt,Je):t.texImage2D(s.TEXTURE_2D,ze,At,st,Rt,Je);T.generateMipmaps=!1}else if(K){if(Ye){const ze=jt(Ne);t.texStorage2D(s.TEXTURE_2D,ut,At,ze.width,ze.height)}Ie&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,st,Rt,Ne)}else t.texImage2D(s.TEXTURE_2D,0,At,st,Rt,Ne);p(T)&&f(be),vt.__version=xe.version,T.onUpdate&&T.onUpdate(T)}k.__version=T.version}function ne(k,T,oe){if(T.image.length!==6)return;const be=ae(k,T),Re=T.source;t.bindTexture(s.TEXTURE_CUBE_MAP,k.__webglTexture,s.TEXTURE0+oe);const xe=n.get(Re);if(Re.version!==xe.__version||be===!0){t.activeTexture(s.TEXTURE0+oe);const vt=Gt.getPrimaries(Gt.workingColorSpace),Ze=T.colorSpace===Hi?null:Gt.getPrimaries(T.colorSpace),mt=T.colorSpace===Hi||vt===Ze?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,T.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,T.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,T.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,mt);const yt=T.isCompressedTexture||T.image[0].isCompressedTexture,Ne=T.image[0]&&T.image[0].isDataTexture,st=[];for(let Ae=0;Ae<6;Ae++)!yt&&!Ne?st[Ae]=_(T.image[Ae],!0,i.maxCubemapSize):st[Ae]=Ne?T.image[Ae].image:T.image[Ae],st[Ae]=ot(T,st[Ae]);const Rt=st[0],At=r.convert(T.format,T.colorSpace),Je=r.convert(T.type),Lt=y(T.internalFormat,At,Je,T.colorSpace),K=T.isVideoTexture!==!0,Ye=xe.__version===void 0||be===!0,Ie=Re.dataReady;let ut=U(T,Rt);_e(s.TEXTURE_CUBE_MAP,T);let ze;if(yt){K&&Ye&&t.texStorage2D(s.TEXTURE_CUBE_MAP,ut,Lt,Rt.width,Rt.height);for(let Ae=0;Ae<6;Ae++){ze=st[Ae].mipmaps;for(let pt=0;pt<ze.length;pt++){const Ft=ze[pt];T.format!==Zn?At!==null?K?Ie&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,pt,0,0,Ft.width,Ft.height,At,Ft.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,pt,Lt,Ft.width,Ft.height,0,Ft.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,pt,0,0,Ft.width,Ft.height,At,Je,Ft.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,pt,Lt,Ft.width,Ft.height,0,At,Je,Ft.data)}}}else{if(ze=T.mipmaps,K&&Ye){ze.length>0&&ut++;const Ae=jt(st[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,ut,Lt,Ae.width,Ae.height)}for(let Ae=0;Ae<6;Ae++)if(Ne){K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,0,0,0,st[Ae].width,st[Ae].height,At,Je,st[Ae].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,0,Lt,st[Ae].width,st[Ae].height,0,At,Je,st[Ae].data);for(let pt=0;pt<ze.length;pt++){const Qt=ze[pt].image[Ae].image;K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,pt+1,0,0,Qt.width,Qt.height,At,Je,Qt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,pt+1,Lt,Qt.width,Qt.height,0,At,Je,Qt.data)}}else{K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,0,0,0,At,Je,st[Ae]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,0,Lt,At,Je,st[Ae]);for(let pt=0;pt<ze.length;pt++){const Ft=ze[pt];K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,pt+1,0,0,At,Je,Ft.image[Ae]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Ae,pt+1,Lt,At,Je,Ft.image[Ae])}}}p(T)&&f(s.TEXTURE_CUBE_MAP),xe.__version=Re.version,T.onUpdate&&T.onUpdate(T)}k.__version=T.version}function he(k,T,oe,be,Re,xe){const vt=r.convert(oe.format,oe.colorSpace),Ze=r.convert(oe.type),mt=y(oe.internalFormat,vt,Ze,oe.colorSpace),yt=n.get(T),Ne=n.get(oe);if(Ne.__renderTarget=T,!yt.__hasExternalTextures){const st=Math.max(1,T.width>>xe),Rt=Math.max(1,T.height>>xe);Re===s.TEXTURE_3D||Re===s.TEXTURE_2D_ARRAY?t.texImage3D(Re,xe,mt,st,Rt,T.depth,0,vt,Ze,null):t.texImage2D(Re,xe,mt,st,Rt,0,vt,Ze,null)}t.bindFramebuffer(s.FRAMEBUFFER,k),tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,be,Re,Ne.__webglTexture,0,Fe(T)):(Re===s.TEXTURE_2D||Re>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Re<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,be,Re,Ne.__webglTexture,xe),t.bindFramebuffer(s.FRAMEBUFFER,null)}function J(k,T,oe){if(s.bindRenderbuffer(s.RENDERBUFFER,k),T.depthBuffer){const be=T.depthTexture,Re=be&&be.isDepthTexture?be.type:null,xe=S(T.stencilBuffer,Re),vt=T.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ze=Fe(T);tt(T)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Ze,xe,T.width,T.height):oe?s.renderbufferStorageMultisample(s.RENDERBUFFER,Ze,xe,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,xe,T.width,T.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,vt,s.RENDERBUFFER,k)}else{const be=T.textures;for(let Re=0;Re<be.length;Re++){const xe=be[Re],vt=r.convert(xe.format,xe.colorSpace),Ze=r.convert(xe.type),mt=y(xe.internalFormat,vt,Ze,xe.colorSpace),yt=Fe(T);oe&&tt(T)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,yt,mt,T.width,T.height):tt(T)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,yt,mt,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,mt,T.width,T.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function ue(k,T){if(T&&T.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(s.FRAMEBUFFER,k),!(T.depthTexture&&T.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const be=n.get(T.depthTexture);be.__renderTarget=T,(!be.__webglTexture||T.depthTexture.image.width!==T.width||T.depthTexture.image.height!==T.height)&&(T.depthTexture.image.width=T.width,T.depthTexture.image.height=T.height,T.depthTexture.needsUpdate=!0),se(T.depthTexture,0);const Re=be.__webglTexture,xe=Fe(T);if(T.depthTexture.format===yr)tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Re,0,xe):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Re,0);else if(T.depthTexture.format===xr)tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Re,0,xe):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Re,0);else throw new Error("Unknown depthTexture format")}function Ce(k){const T=n.get(k),oe=k.isWebGLCubeRenderTarget===!0;if(T.__boundDepthTexture!==k.depthTexture){const be=k.depthTexture;if(T.__depthDisposeCallback&&T.__depthDisposeCallback(),be){const Re=()=>{delete T.__boundDepthTexture,delete T.__depthDisposeCallback,be.removeEventListener("dispose",Re)};be.addEventListener("dispose",Re),T.__depthDisposeCallback=Re}T.__boundDepthTexture=be}if(k.depthTexture&&!T.__autoAllocateDepthBuffer){if(oe)throw new Error("target.depthTexture not supported in Cube render targets");const be=k.texture.mipmaps;be&&be.length>0?ue(T.__webglFramebuffer[0],k):ue(T.__webglFramebuffer,k)}else if(oe){T.__webglDepthbuffer=[];for(let be=0;be<6;be++)if(t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[be]),T.__webglDepthbuffer[be]===void 0)T.__webglDepthbuffer[be]=s.createRenderbuffer(),J(T.__webglDepthbuffer[be],k,!1);else{const Re=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,xe=T.__webglDepthbuffer[be];s.bindRenderbuffer(s.RENDERBUFFER,xe),s.framebufferRenderbuffer(s.FRAMEBUFFER,Re,s.RENDERBUFFER,xe)}}else{const be=k.texture.mipmaps;if(be&&be.length>0?t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer),T.__webglDepthbuffer===void 0)T.__webglDepthbuffer=s.createRenderbuffer(),J(T.__webglDepthbuffer,k,!1);else{const Re=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,xe=T.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,xe),s.framebufferRenderbuffer(s.FRAMEBUFFER,Re,s.RENDERBUFFER,xe)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function je(k,T,oe){const be=n.get(k);T!==void 0&&he(be.__webglFramebuffer,k,k.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),oe!==void 0&&Ce(k)}function We(k){const T=k.texture,oe=n.get(k),be=n.get(T);k.addEventListener("dispose",L);const Re=k.textures,xe=k.isWebGLCubeRenderTarget===!0,vt=Re.length>1;if(vt||(be.__webglTexture===void 0&&(be.__webglTexture=s.createTexture()),be.__version=T.version,o.memory.textures++),xe){oe.__webglFramebuffer=[];for(let Ze=0;Ze<6;Ze++)if(T.mipmaps&&T.mipmaps.length>0){oe.__webglFramebuffer[Ze]=[];for(let mt=0;mt<T.mipmaps.length;mt++)oe.__webglFramebuffer[Ze][mt]=s.createFramebuffer()}else oe.__webglFramebuffer[Ze]=s.createFramebuffer()}else{if(T.mipmaps&&T.mipmaps.length>0){oe.__webglFramebuffer=[];for(let Ze=0;Ze<T.mipmaps.length;Ze++)oe.__webglFramebuffer[Ze]=s.createFramebuffer()}else oe.__webglFramebuffer=s.createFramebuffer();if(vt)for(let Ze=0,mt=Re.length;Ze<mt;Ze++){const yt=n.get(Re[Ze]);yt.__webglTexture===void 0&&(yt.__webglTexture=s.createTexture(),o.memory.textures++)}if(k.samples>0&&tt(k)===!1){oe.__webglMultisampledFramebuffer=s.createFramebuffer(),oe.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,oe.__webglMultisampledFramebuffer);for(let Ze=0;Ze<Re.length;Ze++){const mt=Re[Ze];oe.__webglColorRenderbuffer[Ze]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ze]);const yt=r.convert(mt.format,mt.colorSpace),Ne=r.convert(mt.type),st=y(mt.internalFormat,yt,Ne,mt.colorSpace,k.isXRRenderTarget===!0),Rt=Fe(k);s.renderbufferStorageMultisample(s.RENDERBUFFER,Rt,st,k.width,k.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ze,s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ze])}s.bindRenderbuffer(s.RENDERBUFFER,null),k.depthBuffer&&(oe.__webglDepthRenderbuffer=s.createRenderbuffer(),J(oe.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(xe){t.bindTexture(s.TEXTURE_CUBE_MAP,be.__webglTexture),_e(s.TEXTURE_CUBE_MAP,T);for(let Ze=0;Ze<6;Ze++)if(T.mipmaps&&T.mipmaps.length>0)for(let mt=0;mt<T.mipmaps.length;mt++)he(oe.__webglFramebuffer[Ze][mt],k,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ze,mt);else he(oe.__webglFramebuffer[Ze],k,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ze,0);p(T)&&f(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(vt){for(let Ze=0,mt=Re.length;Ze<mt;Ze++){const yt=Re[Ze],Ne=n.get(yt);t.bindTexture(s.TEXTURE_2D,Ne.__webglTexture),_e(s.TEXTURE_2D,yt),he(oe.__webglFramebuffer,k,yt,s.COLOR_ATTACHMENT0+Ze,s.TEXTURE_2D,0),p(yt)&&f(s.TEXTURE_2D)}t.unbindTexture()}else{let Ze=s.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(Ze=k.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(Ze,be.__webglTexture),_e(Ze,T),T.mipmaps&&T.mipmaps.length>0)for(let mt=0;mt<T.mipmaps.length;mt++)he(oe.__webglFramebuffer[mt],k,T,s.COLOR_ATTACHMENT0,Ze,mt);else he(oe.__webglFramebuffer,k,T,s.COLOR_ATTACHMENT0,Ze,0);p(T)&&f(Ze),t.unbindTexture()}k.depthBuffer&&Ce(k)}function B(k){const T=k.textures;for(let oe=0,be=T.length;oe<be;oe++){const Re=T[oe];if(p(Re)){const xe=x(k),vt=n.get(Re).__webglTexture;t.bindTexture(xe,vt),f(xe),t.unbindTexture()}}}const _t=[],dt=[];function at(k){if(k.samples>0){if(tt(k)===!1){const T=k.textures,oe=k.width,be=k.height;let Re=s.COLOR_BUFFER_BIT;const xe=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,vt=n.get(k),Ze=T.length>1;if(Ze)for(let yt=0;yt<T.length;yt++)t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,vt.__webglMultisampledFramebuffer);const mt=k.texture.mipmaps;mt&&mt.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglFramebuffer);for(let yt=0;yt<T.length;yt++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(Re|=s.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(Re|=s.STENCIL_BUFFER_BIT)),Ze){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,vt.__webglColorRenderbuffer[yt]);const Ne=n.get(T[yt]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Ne,0)}s.blitFramebuffer(0,0,oe,be,0,0,oe,be,Re,s.NEAREST),l===!0&&(_t.length=0,dt.length=0,_t.push(s.COLOR_ATTACHMENT0+yt),k.depthBuffer&&k.resolveDepthBuffer===!1&&(_t.push(xe),dt.push(xe),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,dt)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,_t))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),Ze)for(let yt=0;yt<T.length;yt++){t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.RENDERBUFFER,vt.__webglColorRenderbuffer[yt]);const Ne=n.get(T[yt]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.TEXTURE_2D,Ne,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const T=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[T])}}}function Fe(k){return Math.min(i.maxSamples,k.samples)}function tt(k){const T=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&T.__useRenderToTexture!==!1}function Le(k){const T=o.render.frame;d.get(k)!==T&&(d.set(k,T),k.update())}function ot(k,T){const oe=k.colorSpace,be=k.format,Re=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||oe!==Xs&&oe!==Hi&&(Gt.getTransfer(oe)===an?(be!==Zn||Re!==mi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",oe)),T}function jt(k){return typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement?(c.width=k.naturalWidth||k.width,c.height=k.naturalHeight||k.height):typeof VideoFrame<"u"&&k instanceof VideoFrame?(c.width=k.displayWidth,c.height=k.displayHeight):(c.width=k.width,c.height=k.height),c}this.allocateTextureUnit=V,this.resetTextureUnits=O,this.setTexture2D=se,this.setTexture2DArray=G,this.setTexture3D=ce,this.setTextureCube=Z,this.rebindTextures=je,this.setupRenderTarget=We,this.updateRenderTargetMipmap=B,this.updateMultisampleRenderTarget=at,this.setupDepthRenderbuffer=Ce,this.setupFrameBufferTexture=he,this.useMultisampledRTT=tt}function T3(s,e){function t(n,i=Hi){let r;const o=Gt.getTransfer(i);if(n===mi)return s.UNSIGNED_BYTE;if(n===Xl)return s.UNSIGNED_SHORT_4_4_4_4;if(n===jl)return s.UNSIGNED_SHORT_5_5_5_1;if(n===b0)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===x0)return s.BYTE;if(n===M0)return s.SHORT;if(n===_r)return s.UNSIGNED_SHORT;if(n===Wl)return s.INT;if(n===hs)return s.UNSIGNED_INT;if(n===fi)return s.FLOAT;if(n===Sr)return s.HALF_FLOAT;if(n===S0)return s.ALPHA;if(n===E0)return s.RGB;if(n===Zn)return s.RGBA;if(n===yr)return s.DEPTH_COMPONENT;if(n===xr)return s.DEPTH_STENCIL;if(n===A0)return s.RED;if(n===ql)return s.RED_INTEGER;if(n===w0)return s.RG;if(n===$l)return s.RG_INTEGER;if(n===Yl)return s.RGBA_INTEGER;if(n===ga||n===_a||n===va||n===ya)if(o===an)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(n===ga)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===_a)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===va)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===ya)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(n===ga)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===_a)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===va)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ya)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===tl||n===nl||n===il||n===sl)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(n===tl)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===nl)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===il)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===sl)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===rl||n===al||n===ol)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(n===rl||n===al)return o===an?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===ol)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===ll||n===cl||n===hl||n===ul||n===dl||n===fl||n===pl||n===ml||n===gl||n===_l||n===vl||n===yl||n===xl||n===Ml)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(n===ll)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===cl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ul)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===dl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===fl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===pl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ml)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===gl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_l)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===vl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===yl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ml)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===xa||n===bl||n===Sl)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(n===xa)return o===an?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===bl)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Sl)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===T0||n===El||n===Al||n===wl)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===xa)return r.COMPRESSED_RED_RGTC1_EXT;if(n===El)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Al)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===wl)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===vr?s.UNSIGNED_INT_24_8:s[n]!==void 0?s[n]:null}return{convert:t}}const C3=`
|
|
3803
|
+
}`;function S3(s,e,t){let n=new nc;const i=new et,r=new et,o=new Xt,a=new R1({depthPacking:o2}),l=new D1,c={},d=t.maxTextureSize,m={[Qn]:In,[In]:Qn,[pn]:pn},u=new Li({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new et},radius:{value:4}},vertexShader:M3,fragmentShader:b3}),h=u.clone();h.defines.HORIZONTAL_PASS=1;const g=new hn;g.setAttribute("position",new mn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new zt(g,u),p=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=v0;let f=this.type;this.render=function(C,R,P){if(p.enabled===!1||p.autoUpdate===!1&&p.needsUpdate===!1||C.length===0)return;const A=s.getRenderTarget(),E=s.getActiveCubeFace(),L=s.getActiveMipmapLevel(),B=s.state;B.setBlending(Wi),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const H=f!==Si&&this.type===Si,Q=f===Si&&this.type!==Si;for(let ae=0,G=C.length;ae<G;ae++){const le=C[ae],Z=le.shadow;if(Z===void 0){console.warn("THREE.WebGLShadowMap:",le,"has no shadow.");continue}if(Z.autoUpdate===!1&&Z.needsUpdate===!1)continue;i.copy(Z.mapSize);const ve=Z.getFrameExtents();if(i.multiply(ve),r.copy(Z.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/ve.x),i.x=r.x*ve.x,Z.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/ve.y),i.y=r.y*ve.y,Z.mapSize.y=r.y)),Z.map===null||H===!0||Q===!0){const be=this.type!==Si?{minFilter:jn,magFilter:jn}:{};Z.map!==null&&Z.map.dispose(),Z.map=new us(i.x,i.y,be),Z.map.texture.name=le.name+".shadowMap",Z.camera.updateProjectionMatrix()}s.setRenderTarget(Z.map),s.clear();const Ee=Z.getViewportCount();for(let be=0;be<Ee;be++){const ge=Z.getViewport(be);o.set(r.x*ge.x,r.y*ge.y,r.x*ge.z,r.y*ge.w),B.viewport(o),Z.updateMatrices(le,be),n=Z.getFrustum(),S(R,P,Z.camera,le,this.type)}Z.isPointLightShadow!==!0&&this.type===Si&&v(Z,P),Z.needsUpdate=!1}f=this.type,p.needsUpdate=!1,s.setRenderTarget(A,E,L)};function v(C,R){const P=e.update(_);u.defines.VSM_SAMPLES!==C.blurSamples&&(u.defines.VSM_SAMPLES=C.blurSamples,h.defines.VSM_SAMPLES=C.blurSamples,u.needsUpdate=!0,h.needsUpdate=!0),C.mapPass===null&&(C.mapPass=new us(i.x,i.y)),u.uniforms.shadow_pass.value=C.map.texture,u.uniforms.resolution.value=C.mapSize,u.uniforms.radius.value=C.radius,s.setRenderTarget(C.mapPass),s.clear(),s.renderBufferDirect(R,null,P,u,_,null),h.uniforms.shadow_pass.value=C.mapPass.texture,h.uniforms.resolution.value=C.mapSize,h.uniforms.radius.value=C.radius,s.setRenderTarget(C.map),s.clear(),s.renderBufferDirect(R,null,P,h,_,null)}function b(C,R,P,A){let E=null;const L=P.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(L!==void 0)E=L;else if(E=P.isPointLight===!0?l:a,s.localClippingEnabled&&R.clipShadows===!0&&Array.isArray(R.clippingPlanes)&&R.clippingPlanes.length!==0||R.displacementMap&&R.displacementScale!==0||R.alphaMap&&R.alphaTest>0||R.map&&R.alphaTest>0||R.alphaToCoverage===!0){const B=E.uuid,H=R.uuid;let Q=c[B];Q===void 0&&(Q={},c[B]=Q);let ae=Q[H];ae===void 0&&(ae=E.clone(),Q[H]=ae,R.addEventListener("dispose",F)),E=ae}if(E.visible=R.visible,E.wireframe=R.wireframe,A===Si?E.side=R.shadowSide!==null?R.shadowSide:R.side:E.side=R.shadowSide!==null?R.shadowSide:m[R.side],E.alphaMap=R.alphaMap,E.alphaTest=R.alphaToCoverage===!0?.5:R.alphaTest,E.map=R.map,E.clipShadows=R.clipShadows,E.clippingPlanes=R.clippingPlanes,E.clipIntersection=R.clipIntersection,E.displacementMap=R.displacementMap,E.displacementScale=R.displacementScale,E.displacementBias=R.displacementBias,E.wireframeLinewidth=R.wireframeLinewidth,E.linewidth=R.linewidth,P.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const B=s.properties.get(E);B.light=P}return E}function S(C,R,P,A,E){if(C.visible===!1)return;if(C.layers.test(R.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&E===Si)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,C.matrixWorld);const H=e.update(C),Q=C.material;if(Array.isArray(Q)){const ae=H.groups;for(let G=0,le=ae.length;G<le;G++){const Z=ae[G],ve=Q[Z.materialIndex];if(ve&&ve.visible){const Ee=b(C,ve,A,E);C.onBeforeShadow(s,C,R,P,H,Ee,Z),s.renderBufferDirect(P,null,H,Ee,C,Z),C.onAfterShadow(s,C,R,P,H,Ee,Z)}}}else if(Q.visible){const ae=b(C,Q,A,E);C.onBeforeShadow(s,C,R,P,H,ae,null),s.renderBufferDirect(P,null,H,ae,C,null),C.onAfterShadow(s,C,R,P,H,ae,null)}}const B=C.children;for(let H=0,Q=B.length;H<Q;H++)S(B[H],R,P,A,E)}function F(C){C.target.removeEventListener("dispose",F);for(const P in c){const A=c[P],E=C.target.uuid;E in A&&(A[E].dispose(),delete A[E])}}}const E3={[Xo]:jo,[qo]:Jo,[$o]:Ko,[Hs]:Yo,[jo]:Xo,[Jo]:qo,[Ko]:$o,[Yo]:Hs};function A3(s,e){function t(){let K=!1;const $e=new Xt;let Ie=null;const ut=new Xt(0,0,0,0);return{setMask:function(ze){Ie!==ze&&!K&&(s.colorMask(ze,ze,ze,ze),Ie=ze)},setLocked:function(ze){K=ze},setClear:function(ze,we,pt,Ft,Qt){Qt===!0&&(ze*=Ft,we*=Ft,pt*=Ft),$e.set(ze,we,pt,Ft),ut.equals($e)===!1&&(s.clearColor(ze,we,pt,Ft),ut.copy($e))},reset:function(){K=!1,Ie=null,ut.set(-1,0,0,0)}}}function n(){let K=!1,$e=!1,Ie=null,ut=null,ze=null;return{setReversed:function(we){if($e!==we){const pt=e.get("EXT_clip_control");we?pt.clipControlEXT(pt.LOWER_LEFT_EXT,pt.ZERO_TO_ONE_EXT):pt.clipControlEXT(pt.LOWER_LEFT_EXT,pt.NEGATIVE_ONE_TO_ONE_EXT),$e=we;const Ft=ze;ze=null,this.setClear(Ft)}},getReversed:function(){return $e},setTest:function(we){we?ee(s.DEPTH_TEST):ue(s.DEPTH_TEST)},setMask:function(we){Ie!==we&&!K&&(s.depthMask(we),Ie=we)},setFunc:function(we){if($e&&(we=E3[we]),ut!==we){switch(we){case Xo:s.depthFunc(s.NEVER);break;case jo:s.depthFunc(s.ALWAYS);break;case qo:s.depthFunc(s.LESS);break;case Hs:s.depthFunc(s.LEQUAL);break;case $o:s.depthFunc(s.EQUAL);break;case Yo:s.depthFunc(s.GEQUAL);break;case Jo:s.depthFunc(s.GREATER);break;case Ko:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}ut=we}},setLocked:function(we){K=we},setClear:function(we){ze!==we&&($e&&(we=1-we),s.clearDepth(we),ze=we)},reset:function(){K=!1,Ie=null,ut=null,ze=null,$e=!1}}}function i(){let K=!1,$e=null,Ie=null,ut=null,ze=null,we=null,pt=null,Ft=null,Qt=null;return{setTest:function(Ut){K||(Ut?ee(s.STENCIL_TEST):ue(s.STENCIL_TEST))},setMask:function(Ut){$e!==Ut&&!K&&(s.stencilMask(Ut),$e=Ut)},setFunc:function(Ut,Cn,Hn){(Ie!==Ut||ut!==Cn||ze!==Hn)&&(s.stencilFunc(Ut,Cn,Hn),Ie=Ut,ut=Cn,ze=Hn)},setOp:function(Ut,Cn,Hn){(we!==Ut||pt!==Cn||Ft!==Hn)&&(s.stencilOp(Ut,Cn,Hn),we=Ut,pt=Cn,Ft=Hn)},setLocked:function(Ut){K=Ut},setClear:function(Ut){Qt!==Ut&&(s.clearStencil(Ut),Qt=Ut)},reset:function(){K=!1,$e=null,Ie=null,ut=null,ze=null,we=null,pt=null,Ft=null,Qt=null}}}const r=new t,o=new n,a=new i,l=new WeakMap,c=new WeakMap;let d={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,v=null,b=null,S=null,F=null,C=null,R=new Tt(0,0,0),P=0,A=!1,E=null,L=null,B=null,H=null,Q=null;const ae=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let G=!1,le=0;const Z=s.getParameter(s.VERSION);Z.indexOf("WebGL")!==-1?(le=parseFloat(/^WebGL (\d)/.exec(Z)[1]),G=le>=1):Z.indexOf("OpenGL ES")!==-1&&(le=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),G=le>=2);let ve=null,Ee={};const be=s.getParameter(s.SCISSOR_BOX),ge=s.getParameter(s.VIEWPORT),se=new Xt().fromArray(be),j=new Xt().fromArray(ge);function q(K,$e,Ie,ut){const ze=new Uint8Array(4),we=s.createTexture();s.bindTexture(K,we),s.texParameteri(K,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(K,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let pt=0;pt<Ie;pt++)K===s.TEXTURE_3D||K===s.TEXTURE_2D_ARRAY?s.texImage3D($e,0,s.RGBA,1,1,ut,0,s.RGBA,s.UNSIGNED_BYTE,ze):s.texImage2D($e+pt,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,ze);return we}const ne={};ne[s.TEXTURE_2D]=q(s.TEXTURE_2D,s.TEXTURE_2D,1),ne[s.TEXTURE_CUBE_MAP]=q(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),ne[s.TEXTURE_2D_ARRAY]=q(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),ne[s.TEXTURE_3D]=q(s.TEXTURE_3D,s.TEXTURE_3D,1,1),r.setClear(0,0,0,1),o.setClear(1),a.setClear(0),ee(s.DEPTH_TEST),o.setFunc(Hs),dt(!1),at(vc),ee(s.CULL_FACE),O(Wi);function ee(K){d[K]!==!0&&(s.enable(K),d[K]=!0)}function ue(K){d[K]!==!1&&(s.disable(K),d[K]=!1)}function $(K,$e){return m[K]!==$e?(s.bindFramebuffer(K,$e),m[K]=$e,K===s.DRAW_FRAMEBUFFER&&(m[s.FRAMEBUFFER]=$e),K===s.FRAMEBUFFER&&(m[s.DRAW_FRAMEBUFFER]=$e),!0):!1}function pe(K,$e){let Ie=h,ut=!1;if(K){Ie=u.get($e),Ie===void 0&&(Ie=[],u.set($e,Ie));const ze=K.textures;if(Ie.length!==ze.length||Ie[0]!==s.COLOR_ATTACHMENT0){for(let we=0,pt=ze.length;we<pt;we++)Ie[we]=s.COLOR_ATTACHMENT0+we;Ie.length=ze.length,ut=!0}}else Ie[0]!==s.BACK&&(Ie[0]=s.BACK,ut=!0);ut&&s.drawBuffers(Ie)}function Ce(K){return g!==K?(s.useProgram(K),g=K,!0):!1}const Ke={[rs]:s.FUNC_ADD,[Pu]:s.FUNC_SUBTRACT,[Fu]:s.FUNC_REVERSE_SUBTRACT};Ke[Nu]=s.MIN,Ke[Uu]=s.MAX;const He={[Iu]:s.ZERO,[zu]:s.ONE,[Bu]:s.SRC_COLOR,[Go]:s.SRC_ALPHA,[Wu]:s.SRC_ALPHA_SATURATE,[Hu]:s.DST_COLOR,[ku]:s.DST_ALPHA,[Ou]:s.ONE_MINUS_SRC_COLOR,[Wo]:s.ONE_MINUS_SRC_ALPHA,[Gu]:s.ONE_MINUS_DST_COLOR,[Vu]:s.ONE_MINUS_DST_ALPHA,[Xu]:s.CONSTANT_COLOR,[ju]:s.ONE_MINUS_CONSTANT_COLOR,[qu]:s.CONSTANT_ALPHA,[$u]:s.ONE_MINUS_CONSTANT_ALPHA};function O(K,$e,Ie,ut,ze,we,pt,Ft,Qt,Ut){if(K===Wi){_===!0&&(ue(s.BLEND),_=!1);return}if(_===!1&&(ee(s.BLEND),_=!0),K!==Lu){if(K!==p||Ut!==A){if((f!==rs||S!==rs)&&(s.blendEquation(s.FUNC_ADD),f=rs,S=rs),Ut)switch(K){case Bs:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case yc:s.blendFunc(s.ONE,s.ONE);break;case xc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Mc:s.blendFuncSeparate(s.ZERO,s.SRC_COLOR,s.ZERO,s.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}else switch(K){case Bs:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case yc:s.blendFunc(s.SRC_ALPHA,s.ONE);break;case xc:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case Mc:s.blendFunc(s.ZERO,s.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",K);break}v=null,b=null,F=null,C=null,R.set(0,0,0),P=0,p=K,A=Ut}return}ze=ze||$e,we=we||Ie,pt=pt||ut,($e!==f||ze!==S)&&(s.blendEquationSeparate(Ke[$e],Ke[ze]),f=$e,S=ze),(Ie!==v||ut!==b||we!==F||pt!==C)&&(s.blendFuncSeparate(He[Ie],He[ut],He[we],He[pt]),v=Ie,b=ut,F=we,C=pt),(Ft.equals(R)===!1||Qt!==P)&&(s.blendColor(Ft.r,Ft.g,Ft.b,Qt),R.copy(Ft),P=Qt),p=K,A=!1}function _t(K,$e){K.side===pn?ue(s.CULL_FACE):ee(s.CULL_FACE);let Ie=K.side===In;$e&&(Ie=!Ie),dt(Ie),K.blending===Bs&&K.transparent===!1?O(Wi):O(K.blending,K.blendEquation,K.blendSrc,K.blendDst,K.blendEquationAlpha,K.blendSrcAlpha,K.blendDstAlpha,K.blendColor,K.blendAlpha,K.premultipliedAlpha),o.setFunc(K.depthFunc),o.setTest(K.depthTest),o.setMask(K.depthWrite),r.setMask(K.colorWrite);const ut=K.stencilWrite;a.setTest(ut),ut&&(a.setMask(K.stencilWriteMask),a.setFunc(K.stencilFunc,K.stencilRef,K.stencilFuncMask),a.setOp(K.stencilFail,K.stencilZFail,K.stencilZPass)),tt(K.polygonOffset,K.polygonOffsetFactor,K.polygonOffsetUnits),K.alphaToCoverage===!0?ee(s.SAMPLE_ALPHA_TO_COVERAGE):ue(s.SAMPLE_ALPHA_TO_COVERAGE)}function dt(K){E!==K&&(K?s.frontFace(s.CW):s.frontFace(s.CCW),E=K)}function at(K){K!==Ru?(ee(s.CULL_FACE),K!==L&&(K===vc?s.cullFace(s.BACK):K===Du?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):ue(s.CULL_FACE),L=K}function Fe(K){K!==B&&(G&&s.lineWidth(K),B=K)}function tt(K,$e,Ie){K?(ee(s.POLYGON_OFFSET_FILL),(H!==$e||Q!==Ie)&&(s.polygonOffset($e,Ie),H=$e,Q=Ie)):ue(s.POLYGON_OFFSET_FILL)}function Le(K){K?ee(s.SCISSOR_TEST):ue(s.SCISSOR_TEST)}function ot(K){K===void 0&&(K=s.TEXTURE0+ae-1),ve!==K&&(s.activeTexture(K),ve=K)}function jt(K,$e,Ie){Ie===void 0&&(ve===null?Ie=s.TEXTURE0+ae-1:Ie=ve);let ut=Ee[Ie];ut===void 0&&(ut={type:void 0,texture:void 0},Ee[Ie]=ut),(ut.type!==K||ut.texture!==$e)&&(ve!==Ie&&(s.activeTexture(Ie),ve=Ie),s.bindTexture(K,$e||ne[K]),ut.type=K,ut.texture=$e)}function k(){const K=Ee[ve];K!==void 0&&K.type!==void 0&&(s.bindTexture(K.type,null),K.type=void 0,K.texture=void 0)}function T(){try{s.compressedTexImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function oe(){try{s.compressedTexImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Se(){try{s.texSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function De(){try{s.texSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function ye(){try{s.compressedTexSubImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function vt(){try{s.compressedTexSubImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ze(){try{s.texStorage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function mt(){try{s.texStorage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function yt(){try{s.texImage2D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function Ue(){try{s.texImage3D(...arguments)}catch(K){console.error("THREE.WebGLState:",K)}}function st(K){se.equals(K)===!1&&(s.scissor(K.x,K.y,K.z,K.w),se.copy(K))}function Rt(K){j.equals(K)===!1&&(s.viewport(K.x,K.y,K.z,K.w),j.copy(K))}function At(K,$e){let Ie=c.get($e);Ie===void 0&&(Ie=new WeakMap,c.set($e,Ie));let ut=Ie.get(K);ut===void 0&&(ut=s.getUniformBlockIndex($e,K.name),Ie.set(K,ut))}function Ye(K,$e){const ut=c.get($e).get(K);l.get($e)!==ut&&(s.uniformBlockBinding($e,ut,K.__bindingPointIndex),l.set($e,ut))}function Lt(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),o.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),d={},ve=null,Ee={},m={},u=new WeakMap,h=[],g=null,_=!1,p=null,f=null,v=null,b=null,S=null,F=null,C=null,R=new Tt(0,0,0),P=0,A=!1,E=null,L=null,B=null,H=null,Q=null,se.set(0,0,s.canvas.width,s.canvas.height),j.set(0,0,s.canvas.width,s.canvas.height),r.reset(),o.reset(),a.reset()}return{buffers:{color:r,depth:o,stencil:a},enable:ee,disable:ue,bindFramebuffer:$,drawBuffers:pe,useProgram:Ce,setBlending:O,setMaterial:_t,setFlipSided:dt,setCullFace:at,setLineWidth:Fe,setPolygonOffset:tt,setScissorTest:Le,activeTexture:ot,bindTexture:jt,unbindTexture:k,compressedTexImage2D:T,compressedTexImage3D:oe,texImage2D:yt,texImage3D:Ue,updateUBOMapping:At,uniformBlockBinding:Ye,texStorage2D:Ze,texStorage3D:mt,texSubImage2D:Se,texSubImage3D:De,compressedTexSubImage2D:ye,compressedTexSubImage3D:vt,scissor:st,viewport:Rt,reset:Lt}}function w3(s,e,t,n,i,r,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new et,d=new WeakMap;let m;const u=new WeakMap;let h=!1;try{h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(k,T){return h?new OffscreenCanvas(k,T):Mr("canvas")}function _(k,T,oe){let Se=1;const De=jt(k);if((De.width>oe||De.height>oe)&&(Se=oe/Math.max(De.width,De.height)),Se<1)if(typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&k instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&k instanceof ImageBitmap||typeof VideoFrame<"u"&&k instanceof VideoFrame){const ye=Math.floor(Se*De.width),vt=Math.floor(Se*De.height);m===void 0&&(m=g(ye,vt));const Ze=T?g(ye,vt):m;return Ze.width=ye,Ze.height=vt,Ze.getContext("2d").drawImage(k,0,0,ye,vt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+De.width+"x"+De.height+") to ("+ye+"x"+vt+")."),Ze}else return"data"in k&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+De.width+"x"+De.height+")."),k;return k}function p(k){return k.generateMipmaps}function f(k){s.generateMipmap(k)}function v(k){return k.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:k.isWebGL3DRenderTarget?s.TEXTURE_3D:k.isWebGLArrayRenderTarget||k.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function b(k,T,oe,Se,De=!1){if(k!==null){if(s[k]!==void 0)return s[k];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+k+"'")}let ye=T;if(T===s.RED&&(oe===s.FLOAT&&(ye=s.R32F),oe===s.HALF_FLOAT&&(ye=s.R16F),oe===s.UNSIGNED_BYTE&&(ye=s.R8)),T===s.RED_INTEGER&&(oe===s.UNSIGNED_BYTE&&(ye=s.R8UI),oe===s.UNSIGNED_SHORT&&(ye=s.R16UI),oe===s.UNSIGNED_INT&&(ye=s.R32UI),oe===s.BYTE&&(ye=s.R8I),oe===s.SHORT&&(ye=s.R16I),oe===s.INT&&(ye=s.R32I)),T===s.RG&&(oe===s.FLOAT&&(ye=s.RG32F),oe===s.HALF_FLOAT&&(ye=s.RG16F),oe===s.UNSIGNED_BYTE&&(ye=s.RG8)),T===s.RG_INTEGER&&(oe===s.UNSIGNED_BYTE&&(ye=s.RG8UI),oe===s.UNSIGNED_SHORT&&(ye=s.RG16UI),oe===s.UNSIGNED_INT&&(ye=s.RG32UI),oe===s.BYTE&&(ye=s.RG8I),oe===s.SHORT&&(ye=s.RG16I),oe===s.INT&&(ye=s.RG32I)),T===s.RGB_INTEGER&&(oe===s.UNSIGNED_BYTE&&(ye=s.RGB8UI),oe===s.UNSIGNED_SHORT&&(ye=s.RGB16UI),oe===s.UNSIGNED_INT&&(ye=s.RGB32UI),oe===s.BYTE&&(ye=s.RGB8I),oe===s.SHORT&&(ye=s.RGB16I),oe===s.INT&&(ye=s.RGB32I)),T===s.RGBA_INTEGER&&(oe===s.UNSIGNED_BYTE&&(ye=s.RGBA8UI),oe===s.UNSIGNED_SHORT&&(ye=s.RGBA16UI),oe===s.UNSIGNED_INT&&(ye=s.RGBA32UI),oe===s.BYTE&&(ye=s.RGBA8I),oe===s.SHORT&&(ye=s.RGBA16I),oe===s.INT&&(ye=s.RGBA32I)),T===s.RGB&&oe===s.UNSIGNED_INT_5_9_9_9_REV&&(ye=s.RGB9_E5),T===s.RGBA){const vt=De?Aa:Gt.getTransfer(Se);oe===s.FLOAT&&(ye=s.RGBA32F),oe===s.HALF_FLOAT&&(ye=s.RGBA16F),oe===s.UNSIGNED_BYTE&&(ye=vt===an?s.SRGB8_ALPHA8:s.RGBA8),oe===s.UNSIGNED_SHORT_4_4_4_4&&(ye=s.RGBA4),oe===s.UNSIGNED_SHORT_5_5_5_1&&(ye=s.RGB5_A1)}return(ye===s.R16F||ye===s.R32F||ye===s.RG16F||ye===s.RG32F||ye===s.RGBA16F||ye===s.RGBA32F)&&e.get("EXT_color_buffer_float"),ye}function S(k,T){let oe;return k?T===null||T===hs||T===vr?oe=s.DEPTH24_STENCIL8:T===fi?oe=s.DEPTH32F_STENCIL8:T===_r&&(oe=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):T===null||T===hs||T===vr?oe=s.DEPTH_COMPONENT24:T===fi?oe=s.DEPTH_COMPONENT32F:T===_r&&(oe=s.DEPTH_COMPONENT16),oe}function F(k,T){return p(k)===!0||k.isFramebufferTexture&&k.minFilter!==jn&&k.minFilter!==Xn?Math.log2(Math.max(T.width,T.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?T.mipmaps.length:1}function C(k){const T=k.target;T.removeEventListener("dispose",C),P(T),T.isVideoTexture&&d.delete(T)}function R(k){const T=k.target;T.removeEventListener("dispose",R),E(T)}function P(k){const T=n.get(k);if(T.__webglInit===void 0)return;const oe=k.source,Se=u.get(oe);if(Se){const De=Se[T.__cacheKey];De.usedTimes--,De.usedTimes===0&&A(k),Object.keys(Se).length===0&&u.delete(oe)}n.remove(k)}function A(k){const T=n.get(k);s.deleteTexture(T.__webglTexture);const oe=k.source,Se=u.get(oe);delete Se[T.__cacheKey],o.memory.textures--}function E(k){const T=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let Se=0;Se<6;Se++){if(Array.isArray(T.__webglFramebuffer[Se]))for(let De=0;De<T.__webglFramebuffer[Se].length;De++)s.deleteFramebuffer(T.__webglFramebuffer[Se][De]);else s.deleteFramebuffer(T.__webglFramebuffer[Se]);T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer[Se])}else{if(Array.isArray(T.__webglFramebuffer))for(let Se=0;Se<T.__webglFramebuffer.length;Se++)s.deleteFramebuffer(T.__webglFramebuffer[Se]);else s.deleteFramebuffer(T.__webglFramebuffer);if(T.__webglDepthbuffer&&s.deleteRenderbuffer(T.__webglDepthbuffer),T.__webglMultisampledFramebuffer&&s.deleteFramebuffer(T.__webglMultisampledFramebuffer),T.__webglColorRenderbuffer)for(let Se=0;Se<T.__webglColorRenderbuffer.length;Se++)T.__webglColorRenderbuffer[Se]&&s.deleteRenderbuffer(T.__webglColorRenderbuffer[Se]);T.__webglDepthRenderbuffer&&s.deleteRenderbuffer(T.__webglDepthRenderbuffer)}const oe=k.textures;for(let Se=0,De=oe.length;Se<De;Se++){const ye=n.get(oe[Se]);ye.__webglTexture&&(s.deleteTexture(ye.__webglTexture),o.memory.textures--),n.remove(oe[Se])}n.remove(k)}let L=0;function B(){L=0}function H(){const k=L;return k>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+i.maxTextures),L+=1,k}function Q(k){const T=[];return T.push(k.wrapS),T.push(k.wrapT),T.push(k.wrapR||0),T.push(k.magFilter),T.push(k.minFilter),T.push(k.anisotropy),T.push(k.internalFormat),T.push(k.format),T.push(k.type),T.push(k.generateMipmaps),T.push(k.premultiplyAlpha),T.push(k.flipY),T.push(k.unpackAlignment),T.push(k.colorSpace),T.join()}function ae(k,T){const oe=n.get(k);if(k.isVideoTexture&&Le(k),k.isRenderTargetTexture===!1&&k.version>0&&oe.__version!==k.version){const Se=k.image;if(Se===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Se.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ne(oe,k,T);return}}t.bindTexture(s.TEXTURE_2D,oe.__webglTexture,s.TEXTURE0+T)}function G(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ne(oe,k,T);return}t.bindTexture(s.TEXTURE_2D_ARRAY,oe.__webglTexture,s.TEXTURE0+T)}function le(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ne(oe,k,T);return}t.bindTexture(s.TEXTURE_3D,oe.__webglTexture,s.TEXTURE0+T)}function Z(k,T){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ee(oe,k,T);return}t.bindTexture(s.TEXTURE_CUBE_MAP,oe.__webglTexture,s.TEXTURE0+T)}const ve={[di]:s.REPEAT,[ri]:s.CLAMP_TO_EDGE,[el]:s.MIRRORED_REPEAT},Ee={[jn]:s.NEAREST,[s2]:s.NEAREST_MIPMAP_NEAREST,[wr]:s.NEAREST_MIPMAP_LINEAR,[Xn]:s.LINEAR,[Xa]:s.LINEAR_MIPMAP_NEAREST,[Ai]:s.LINEAR_MIPMAP_LINEAR},be={[c2]:s.NEVER,[m2]:s.ALWAYS,[h2]:s.LESS,[C0]:s.LEQUAL,[u2]:s.EQUAL,[p2]:s.GEQUAL,[d2]:s.GREATER,[f2]:s.NOTEQUAL};function ge(k,T){if(T.type===fi&&e.has("OES_texture_float_linear")===!1&&(T.magFilter===Xn||T.magFilter===Xa||T.magFilter===wr||T.magFilter===Ai||T.minFilter===Xn||T.minFilter===Xa||T.minFilter===wr||T.minFilter===Ai)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(k,s.TEXTURE_WRAP_S,ve[T.wrapS]),s.texParameteri(k,s.TEXTURE_WRAP_T,ve[T.wrapT]),(k===s.TEXTURE_3D||k===s.TEXTURE_2D_ARRAY)&&s.texParameteri(k,s.TEXTURE_WRAP_R,ve[T.wrapR]),s.texParameteri(k,s.TEXTURE_MAG_FILTER,Ee[T.magFilter]),s.texParameteri(k,s.TEXTURE_MIN_FILTER,Ee[T.minFilter]),T.compareFunction&&(s.texParameteri(k,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(k,s.TEXTURE_COMPARE_FUNC,be[T.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(T.magFilter===jn||T.minFilter!==wr&&T.minFilter!==Ai||T.type===fi&&e.has("OES_texture_float_linear")===!1)return;if(T.anisotropy>1||n.get(T).__currentAnisotropy){const oe=e.get("EXT_texture_filter_anisotropic");s.texParameterf(k,oe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(T.anisotropy,i.getMaxAnisotropy())),n.get(T).__currentAnisotropy=T.anisotropy}}}function se(k,T){let oe=!1;k.__webglInit===void 0&&(k.__webglInit=!0,T.addEventListener("dispose",C));const Se=T.source;let De=u.get(Se);De===void 0&&(De={},u.set(Se,De));const ye=Q(T);if(ye!==k.__cacheKey){De[ye]===void 0&&(De[ye]={texture:s.createTexture(),usedTimes:0},o.memory.textures++,oe=!0),De[ye].usedTimes++;const vt=De[k.__cacheKey];vt!==void 0&&(De[k.__cacheKey].usedTimes--,vt.usedTimes===0&&A(T)),k.__cacheKey=ye,k.__webglTexture=De[ye].texture}return oe}function j(k,T,oe){return Math.floor(Math.floor(k/oe)/T)}function q(k,T,oe,Se){const ye=k.updateRanges;if(ye.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,T.width,T.height,oe,Se,T.data);else{ye.sort((Ue,st)=>Ue.start-st.start);let vt=0;for(let Ue=1;Ue<ye.length;Ue++){const st=ye[vt],Rt=ye[Ue],At=st.start+st.count,Ye=j(Rt.start,T.width,4),Lt=j(st.start,T.width,4);Rt.start<=At+1&&Ye===Lt&&j(Rt.start+Rt.count-1,T.width,4)===Ye?st.count=Math.max(st.count,Rt.start+Rt.count-st.start):(++vt,ye[vt]=Rt)}ye.length=vt+1;const Ze=s.getParameter(s.UNPACK_ROW_LENGTH),mt=s.getParameter(s.UNPACK_SKIP_PIXELS),yt=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,T.width);for(let Ue=0,st=ye.length;Ue<st;Ue++){const Rt=ye[Ue],At=Math.floor(Rt.start/4),Ye=Math.ceil(Rt.count/4),Lt=At%T.width,K=Math.floor(At/T.width),$e=Ye,Ie=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,Lt),s.pixelStorei(s.UNPACK_SKIP_ROWS,K),t.texSubImage2D(s.TEXTURE_2D,0,Lt,K,$e,Ie,oe,Se,T.data)}k.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,Ze),s.pixelStorei(s.UNPACK_SKIP_PIXELS,mt),s.pixelStorei(s.UNPACK_SKIP_ROWS,yt)}}function ne(k,T,oe){let Se=s.TEXTURE_2D;(T.isDataArrayTexture||T.isCompressedArrayTexture)&&(Se=s.TEXTURE_2D_ARRAY),T.isData3DTexture&&(Se=s.TEXTURE_3D);const De=se(k,T),ye=T.source;t.bindTexture(Se,k.__webglTexture,s.TEXTURE0+oe);const vt=n.get(ye);if(ye.version!==vt.__version||De===!0){t.activeTexture(s.TEXTURE0+oe);const Ze=Gt.getPrimaries(Gt.workingColorSpace),mt=T.colorSpace===Hi?null:Gt.getPrimaries(T.colorSpace),yt=T.colorSpace===Hi||Ze===mt?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,T.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,T.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,T.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,yt);let Ue=_(T.image,!1,i.maxTextureSize);Ue=ot(T,Ue);const st=r.convert(T.format,T.colorSpace),Rt=r.convert(T.type);let At=b(T.internalFormat,st,Rt,T.colorSpace,T.isVideoTexture);ge(Se,T);let Ye;const Lt=T.mipmaps,K=T.isVideoTexture!==!0,$e=vt.__version===void 0||De===!0,Ie=ye.dataReady,ut=F(T,Ue);if(T.isDepthTexture)At=S(T.format===xr,T.type),$e&&(K?t.texStorage2D(s.TEXTURE_2D,1,At,Ue.width,Ue.height):t.texImage2D(s.TEXTURE_2D,0,At,Ue.width,Ue.height,0,st,Rt,null));else if(T.isDataTexture)if(Lt.length>0){K&&$e&&t.texStorage2D(s.TEXTURE_2D,ut,At,Lt[0].width,Lt[0].height);for(let ze=0,we=Lt.length;ze<we;ze++)Ye=Lt[ze],K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,st,Rt,Ye.data):t.texImage2D(s.TEXTURE_2D,ze,At,Ye.width,Ye.height,0,st,Rt,Ye.data);T.generateMipmaps=!1}else K?($e&&t.texStorage2D(s.TEXTURE_2D,ut,At,Ue.width,Ue.height),Ie&&q(T,Ue,st,Rt)):t.texImage2D(s.TEXTURE_2D,0,At,Ue.width,Ue.height,0,st,Rt,Ue.data);else if(T.isCompressedTexture)if(T.isCompressedArrayTexture){K&&$e&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ut,At,Lt[0].width,Lt[0].height,Ue.depth);for(let ze=0,we=Lt.length;ze<we;ze++)if(Ye=Lt[ze],T.format!==Zn)if(st!==null)if(K){if(Ie)if(T.layerUpdates.size>0){const pt=vh(Ye.width,Ye.height,T.format,T.type);for(const Ft of T.layerUpdates){const Qt=Ye.data.subarray(Ft*pt/Ye.data.BYTES_PER_ELEMENT,(Ft+1)*pt/Ye.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,Ft,Ye.width,Ye.height,1,st,Qt)}T.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,0,Ye.width,Ye.height,Ue.depth,st,Ye.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,ze,At,Ye.width,Ye.height,Ue.depth,0,Ye.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else K?Ie&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,ze,0,0,0,Ye.width,Ye.height,Ue.depth,st,Rt,Ye.data):t.texImage3D(s.TEXTURE_2D_ARRAY,ze,At,Ye.width,Ye.height,Ue.depth,0,st,Rt,Ye.data)}else{K&&$e&&t.texStorage2D(s.TEXTURE_2D,ut,At,Lt[0].width,Lt[0].height);for(let ze=0,we=Lt.length;ze<we;ze++)Ye=Lt[ze],T.format!==Zn?st!==null?K?Ie&&t.compressedTexSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,st,Ye.data):t.compressedTexImage2D(s.TEXTURE_2D,ze,At,Ye.width,Ye.height,0,Ye.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,Ye.width,Ye.height,st,Rt,Ye.data):t.texImage2D(s.TEXTURE_2D,ze,At,Ye.width,Ye.height,0,st,Rt,Ye.data)}else if(T.isDataArrayTexture)if(K){if($e&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ut,At,Ue.width,Ue.height,Ue.depth),Ie)if(T.layerUpdates.size>0){const ze=vh(Ue.width,Ue.height,T.format,T.type);for(const we of T.layerUpdates){const pt=Ue.data.subarray(we*ze/Ue.data.BYTES_PER_ELEMENT,(we+1)*ze/Ue.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,we,Ue.width,Ue.height,1,st,Rt,pt)}T.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,Ue.width,Ue.height,Ue.depth,st,Rt,Ue.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,At,Ue.width,Ue.height,Ue.depth,0,st,Rt,Ue.data);else if(T.isData3DTexture)K?($e&&t.texStorage3D(s.TEXTURE_3D,ut,At,Ue.width,Ue.height,Ue.depth),Ie&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,Ue.width,Ue.height,Ue.depth,st,Rt,Ue.data)):t.texImage3D(s.TEXTURE_3D,0,At,Ue.width,Ue.height,Ue.depth,0,st,Rt,Ue.data);else if(T.isFramebufferTexture){if($e)if(K)t.texStorage2D(s.TEXTURE_2D,ut,At,Ue.width,Ue.height);else{let ze=Ue.width,we=Ue.height;for(let pt=0;pt<ut;pt++)t.texImage2D(s.TEXTURE_2D,pt,At,ze,we,0,st,Rt,null),ze>>=1,we>>=1}}else if(Lt.length>0){if(K&&$e){const ze=jt(Lt[0]);t.texStorage2D(s.TEXTURE_2D,ut,At,ze.width,ze.height)}for(let ze=0,we=Lt.length;ze<we;ze++)Ye=Lt[ze],K?Ie&&t.texSubImage2D(s.TEXTURE_2D,ze,0,0,st,Rt,Ye):t.texImage2D(s.TEXTURE_2D,ze,At,st,Rt,Ye);T.generateMipmaps=!1}else if(K){if($e){const ze=jt(Ue);t.texStorage2D(s.TEXTURE_2D,ut,At,ze.width,ze.height)}Ie&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,st,Rt,Ue)}else t.texImage2D(s.TEXTURE_2D,0,At,st,Rt,Ue);p(T)&&f(Se),vt.__version=ye.version,T.onUpdate&&T.onUpdate(T)}k.__version=T.version}function ee(k,T,oe){if(T.image.length!==6)return;const Se=se(k,T),De=T.source;t.bindTexture(s.TEXTURE_CUBE_MAP,k.__webglTexture,s.TEXTURE0+oe);const ye=n.get(De);if(De.version!==ye.__version||Se===!0){t.activeTexture(s.TEXTURE0+oe);const vt=Gt.getPrimaries(Gt.workingColorSpace),Ze=T.colorSpace===Hi?null:Gt.getPrimaries(T.colorSpace),mt=T.colorSpace===Hi||vt===Ze?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,T.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,T.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,T.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,mt);const yt=T.isCompressedTexture||T.image[0].isCompressedTexture,Ue=T.image[0]&&T.image[0].isDataTexture,st=[];for(let we=0;we<6;we++)!yt&&!Ue?st[we]=_(T.image[we],!0,i.maxCubemapSize):st[we]=Ue?T.image[we].image:T.image[we],st[we]=ot(T,st[we]);const Rt=st[0],At=r.convert(T.format,T.colorSpace),Ye=r.convert(T.type),Lt=b(T.internalFormat,At,Ye,T.colorSpace),K=T.isVideoTexture!==!0,$e=ye.__version===void 0||Se===!0,Ie=De.dataReady;let ut=F(T,Rt);ge(s.TEXTURE_CUBE_MAP,T);let ze;if(yt){K&&$e&&t.texStorage2D(s.TEXTURE_CUBE_MAP,ut,Lt,Rt.width,Rt.height);for(let we=0;we<6;we++){ze=st[we].mipmaps;for(let pt=0;pt<ze.length;pt++){const Ft=ze[pt];T.format!==Zn?At!==null?K?Ie&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt,0,0,Ft.width,Ft.height,At,Ft.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt,Lt,Ft.width,Ft.height,0,Ft.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt,0,0,Ft.width,Ft.height,At,Ye,Ft.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt,Lt,Ft.width,Ft.height,0,At,Ye,Ft.data)}}}else{if(ze=T.mipmaps,K&&$e){ze.length>0&&ut++;const we=jt(st[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,ut,Lt,we.width,we.height)}for(let we=0;we<6;we++)if(Ue){K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,0,0,0,st[we].width,st[we].height,At,Ye,st[we].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,0,Lt,st[we].width,st[we].height,0,At,Ye,st[we].data);for(let pt=0;pt<ze.length;pt++){const Qt=ze[pt].image[we].image;K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt+1,0,0,Qt.width,Qt.height,At,Ye,Qt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt+1,Lt,Qt.width,Qt.height,0,At,Ye,Qt.data)}}else{K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,0,0,0,At,Ye,st[we]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,0,Lt,At,Ye,st[we]);for(let pt=0;pt<ze.length;pt++){const Ft=ze[pt];K?Ie&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt+1,0,0,At,Ye,Ft.image[we]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+we,pt+1,Lt,At,Ye,Ft.image[we])}}}p(T)&&f(s.TEXTURE_CUBE_MAP),ye.__version=De.version,T.onUpdate&&T.onUpdate(T)}k.__version=T.version}function ue(k,T,oe,Se,De,ye){const vt=r.convert(oe.format,oe.colorSpace),Ze=r.convert(oe.type),mt=b(oe.internalFormat,vt,Ze,oe.colorSpace),yt=n.get(T),Ue=n.get(oe);if(Ue.__renderTarget=T,!yt.__hasExternalTextures){const st=Math.max(1,T.width>>ye),Rt=Math.max(1,T.height>>ye);De===s.TEXTURE_3D||De===s.TEXTURE_2D_ARRAY?t.texImage3D(De,ye,mt,st,Rt,T.depth,0,vt,Ze,null):t.texImage2D(De,ye,mt,st,Rt,0,vt,Ze,null)}t.bindFramebuffer(s.FRAMEBUFFER,k),tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,Se,De,Ue.__webglTexture,0,Fe(T)):(De===s.TEXTURE_2D||De>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&De<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,Se,De,Ue.__webglTexture,ye),t.bindFramebuffer(s.FRAMEBUFFER,null)}function $(k,T,oe){if(s.bindRenderbuffer(s.RENDERBUFFER,k),T.depthBuffer){const Se=T.depthTexture,De=Se&&Se.isDepthTexture?Se.type:null,ye=S(T.stencilBuffer,De),vt=T.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ze=Fe(T);tt(T)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Ze,ye,T.width,T.height):oe?s.renderbufferStorageMultisample(s.RENDERBUFFER,Ze,ye,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,ye,T.width,T.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,vt,s.RENDERBUFFER,k)}else{const Se=T.textures;for(let De=0;De<Se.length;De++){const ye=Se[De],vt=r.convert(ye.format,ye.colorSpace),Ze=r.convert(ye.type),mt=b(ye.internalFormat,vt,Ze,ye.colorSpace),yt=Fe(T);oe&&tt(T)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,yt,mt,T.width,T.height):tt(T)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,yt,mt,T.width,T.height):s.renderbufferStorage(s.RENDERBUFFER,mt,T.width,T.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function pe(k,T){if(T&&T.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(s.FRAMEBUFFER,k),!(T.depthTexture&&T.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Se=n.get(T.depthTexture);Se.__renderTarget=T,(!Se.__webglTexture||T.depthTexture.image.width!==T.width||T.depthTexture.image.height!==T.height)&&(T.depthTexture.image.width=T.width,T.depthTexture.image.height=T.height,T.depthTexture.needsUpdate=!0),ae(T.depthTexture,0);const De=Se.__webglTexture,ye=Fe(T);if(T.depthTexture.format===yr)tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,De,0,ye):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,De,0);else if(T.depthTexture.format===xr)tt(T)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,De,0,ye):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,De,0);else throw new Error("Unknown depthTexture format")}function Ce(k){const T=n.get(k),oe=k.isWebGLCubeRenderTarget===!0;if(T.__boundDepthTexture!==k.depthTexture){const Se=k.depthTexture;if(T.__depthDisposeCallback&&T.__depthDisposeCallback(),Se){const De=()=>{delete T.__boundDepthTexture,delete T.__depthDisposeCallback,Se.removeEventListener("dispose",De)};Se.addEventListener("dispose",De),T.__depthDisposeCallback=De}T.__boundDepthTexture=Se}if(k.depthTexture&&!T.__autoAllocateDepthBuffer){if(oe)throw new Error("target.depthTexture not supported in Cube render targets");const Se=k.texture.mipmaps;Se&&Se.length>0?pe(T.__webglFramebuffer[0],k):pe(T.__webglFramebuffer,k)}else if(oe){T.__webglDepthbuffer=[];for(let Se=0;Se<6;Se++)if(t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[Se]),T.__webglDepthbuffer[Se]===void 0)T.__webglDepthbuffer[Se]=s.createRenderbuffer(),$(T.__webglDepthbuffer[Se],k,!1);else{const De=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ye=T.__webglDepthbuffer[Se];s.bindRenderbuffer(s.RENDERBUFFER,ye),s.framebufferRenderbuffer(s.FRAMEBUFFER,De,s.RENDERBUFFER,ye)}}else{const Se=k.texture.mipmaps;if(Se&&Se.length>0?t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,T.__webglFramebuffer),T.__webglDepthbuffer===void 0)T.__webglDepthbuffer=s.createRenderbuffer(),$(T.__webglDepthbuffer,k,!1);else{const De=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ye=T.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,ye),s.framebufferRenderbuffer(s.FRAMEBUFFER,De,s.RENDERBUFFER,ye)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function Ke(k,T,oe){const Se=n.get(k);T!==void 0&&ue(Se.__webglFramebuffer,k,k.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),oe!==void 0&&Ce(k)}function He(k){const T=k.texture,oe=n.get(k),Se=n.get(T);k.addEventListener("dispose",R);const De=k.textures,ye=k.isWebGLCubeRenderTarget===!0,vt=De.length>1;if(vt||(Se.__webglTexture===void 0&&(Se.__webglTexture=s.createTexture()),Se.__version=T.version,o.memory.textures++),ye){oe.__webglFramebuffer=[];for(let Ze=0;Ze<6;Ze++)if(T.mipmaps&&T.mipmaps.length>0){oe.__webglFramebuffer[Ze]=[];for(let mt=0;mt<T.mipmaps.length;mt++)oe.__webglFramebuffer[Ze][mt]=s.createFramebuffer()}else oe.__webglFramebuffer[Ze]=s.createFramebuffer()}else{if(T.mipmaps&&T.mipmaps.length>0){oe.__webglFramebuffer=[];for(let Ze=0;Ze<T.mipmaps.length;Ze++)oe.__webglFramebuffer[Ze]=s.createFramebuffer()}else oe.__webglFramebuffer=s.createFramebuffer();if(vt)for(let Ze=0,mt=De.length;Ze<mt;Ze++){const yt=n.get(De[Ze]);yt.__webglTexture===void 0&&(yt.__webglTexture=s.createTexture(),o.memory.textures++)}if(k.samples>0&&tt(k)===!1){oe.__webglMultisampledFramebuffer=s.createFramebuffer(),oe.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,oe.__webglMultisampledFramebuffer);for(let Ze=0;Ze<De.length;Ze++){const mt=De[Ze];oe.__webglColorRenderbuffer[Ze]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ze]);const yt=r.convert(mt.format,mt.colorSpace),Ue=r.convert(mt.type),st=b(mt.internalFormat,yt,Ue,mt.colorSpace,k.isXRRenderTarget===!0),Rt=Fe(k);s.renderbufferStorageMultisample(s.RENDERBUFFER,Rt,st,k.width,k.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ze,s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ze])}s.bindRenderbuffer(s.RENDERBUFFER,null),k.depthBuffer&&(oe.__webglDepthRenderbuffer=s.createRenderbuffer(),$(oe.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(ye){t.bindTexture(s.TEXTURE_CUBE_MAP,Se.__webglTexture),ge(s.TEXTURE_CUBE_MAP,T);for(let Ze=0;Ze<6;Ze++)if(T.mipmaps&&T.mipmaps.length>0)for(let mt=0;mt<T.mipmaps.length;mt++)ue(oe.__webglFramebuffer[Ze][mt],k,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ze,mt);else ue(oe.__webglFramebuffer[Ze],k,T,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ze,0);p(T)&&f(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(vt){for(let Ze=0,mt=De.length;Ze<mt;Ze++){const yt=De[Ze],Ue=n.get(yt);t.bindTexture(s.TEXTURE_2D,Ue.__webglTexture),ge(s.TEXTURE_2D,yt),ue(oe.__webglFramebuffer,k,yt,s.COLOR_ATTACHMENT0+Ze,s.TEXTURE_2D,0),p(yt)&&f(s.TEXTURE_2D)}t.unbindTexture()}else{let Ze=s.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(Ze=k.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(Ze,Se.__webglTexture),ge(Ze,T),T.mipmaps&&T.mipmaps.length>0)for(let mt=0;mt<T.mipmaps.length;mt++)ue(oe.__webglFramebuffer[mt],k,T,s.COLOR_ATTACHMENT0,Ze,mt);else ue(oe.__webglFramebuffer,k,T,s.COLOR_ATTACHMENT0,Ze,0);p(T)&&f(Ze),t.unbindTexture()}k.depthBuffer&&Ce(k)}function O(k){const T=k.textures;for(let oe=0,Se=T.length;oe<Se;oe++){const De=T[oe];if(p(De)){const ye=v(k),vt=n.get(De).__webglTexture;t.bindTexture(ye,vt),f(ye),t.unbindTexture()}}}const _t=[],dt=[];function at(k){if(k.samples>0){if(tt(k)===!1){const T=k.textures,oe=k.width,Se=k.height;let De=s.COLOR_BUFFER_BIT;const ye=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,vt=n.get(k),Ze=T.length>1;if(Ze)for(let yt=0;yt<T.length;yt++)t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,vt.__webglMultisampledFramebuffer);const mt=k.texture.mipmaps;mt&&mt.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglFramebuffer);for(let yt=0;yt<T.length;yt++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(De|=s.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(De|=s.STENCIL_BUFFER_BIT)),Ze){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,vt.__webglColorRenderbuffer[yt]);const Ue=n.get(T[yt]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Ue,0)}s.blitFramebuffer(0,0,oe,Se,0,0,oe,Se,De,s.NEAREST),l===!0&&(_t.length=0,dt.length=0,_t.push(s.COLOR_ATTACHMENT0+yt),k.depthBuffer&&k.resolveDepthBuffer===!1&&(_t.push(ye),dt.push(ye),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,dt)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,_t))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),Ze)for(let yt=0;yt<T.length;yt++){t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.RENDERBUFFER,vt.__webglColorRenderbuffer[yt]);const Ue=n.get(T[yt]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,vt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+yt,s.TEXTURE_2D,Ue,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,vt.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const T=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[T])}}}function Fe(k){return Math.min(i.maxSamples,k.samples)}function tt(k){const T=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&T.__useRenderToTexture!==!1}function Le(k){const T=o.render.frame;d.get(k)!==T&&(d.set(k,T),k.update())}function ot(k,T){const oe=k.colorSpace,Se=k.format,De=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||oe!==Xs&&oe!==Hi&&(Gt.getTransfer(oe)===an?(Se!==Zn||De!==mi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",oe)),T}function jt(k){return typeof HTMLImageElement<"u"&&k instanceof HTMLImageElement?(c.width=k.naturalWidth||k.width,c.height=k.naturalHeight||k.height):typeof VideoFrame<"u"&&k instanceof VideoFrame?(c.width=k.displayWidth,c.height=k.displayHeight):(c.width=k.width,c.height=k.height),c}this.allocateTextureUnit=H,this.resetTextureUnits=B,this.setTexture2D=ae,this.setTexture2DArray=G,this.setTexture3D=le,this.setTextureCube=Z,this.rebindTextures=Ke,this.setupRenderTarget=He,this.updateRenderTargetMipmap=O,this.updateMultisampleRenderTarget=at,this.setupDepthRenderbuffer=Ce,this.setupFrameBufferTexture=ue,this.useMultisampledRTT=tt}function T3(s,e){function t(n,i=Hi){let r;const o=Gt.getTransfer(i);if(n===mi)return s.UNSIGNED_BYTE;if(n===Xl)return s.UNSIGNED_SHORT_4_4_4_4;if(n===jl)return s.UNSIGNED_SHORT_5_5_5_1;if(n===b0)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===x0)return s.BYTE;if(n===M0)return s.SHORT;if(n===_r)return s.UNSIGNED_SHORT;if(n===Wl)return s.INT;if(n===hs)return s.UNSIGNED_INT;if(n===fi)return s.FLOAT;if(n===Sr)return s.HALF_FLOAT;if(n===S0)return s.ALPHA;if(n===E0)return s.RGB;if(n===Zn)return s.RGBA;if(n===yr)return s.DEPTH_COMPONENT;if(n===xr)return s.DEPTH_STENCIL;if(n===A0)return s.RED;if(n===ql)return s.RED_INTEGER;if(n===w0)return s.RG;if(n===$l)return s.RG_INTEGER;if(n===Yl)return s.RGBA_INTEGER;if(n===ga||n===_a||n===va||n===ya)if(o===an)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(n===ga)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===_a)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===va)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===ya)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(n===ga)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===_a)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===va)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===ya)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===tl||n===nl||n===il||n===sl)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(n===tl)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===nl)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===il)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===sl)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===rl||n===al||n===ol)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(n===rl||n===al)return o===an?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===ol)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===ll||n===cl||n===hl||n===ul||n===dl||n===fl||n===pl||n===ml||n===gl||n===_l||n===vl||n===yl||n===xl||n===Ml)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(n===ll)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===cl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ul)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===dl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===fl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===pl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ml)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===gl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_l)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===vl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===yl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xl)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ml)return o===an?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===xa||n===bl||n===Sl)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(n===xa)return o===an?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===bl)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Sl)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===T0||n===El||n===Al||n===wl)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===xa)return r.COMPRESSED_RED_RGTC1_EXT;if(n===El)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Al)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===wl)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===vr?s.UNSIGNED_INT_24_8:s[n]!==void 0?s[n]:null}return{convert:t}}const C3=`
|
|
3804
3804
|
void main() {
|
|
3805
3805
|
|
|
3806
3806
|
gl_Position = vec4( position, 1.0 );
|
|
@@ -3824,7 +3824,7 @@ void main() {
|
|
|
3824
3824
|
|
|
3825
3825
|
}
|
|
3826
3826
|
|
|
3827
|
-
}`;class D3{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new Tn,r=e.properties.get(i);r.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new Li({vertexShader:C3,fragmentShader:R3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new zt(new Di(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class L3 extends ds{constructor(e,t){super();const n=this;let i=null,r=1,o=null,a="local-floor",l=1,c=null,d=null,m=null,u=null,h=null,g=null;const _=new D3,p=t.getContextAttributes();let f=null,x=null;const y=[],S=[],U=new et;let C=null;const L=new bn;L.viewport=new Xt;const P=new bn;P.viewport=new Xt;const E=[L,P],A=new q1;let D=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(j){let Y=y[j];return Y===void 0&&(Y=new po,y[j]=Y),Y.getTargetRaySpace()},this.getControllerGrip=function(j){let Y=y[j];return Y===void 0&&(Y=new po,y[j]=Y),Y.getGripSpace()},this.getHand=function(j){let Y=y[j];return Y===void 0&&(Y=new po,y[j]=Y),Y.getHandSpace()};function V(j){const Y=S.indexOf(j.inputSource);if(Y===-1)return;const ee=y[Y];ee!==void 0&&(ee.update(j.inputSource,j.frame,c||o),ee.dispatchEvent({type:j.type,data:j.inputSource}))}function Q(){i.removeEventListener("select",V),i.removeEventListener("selectstart",V),i.removeEventListener("selectend",V),i.removeEventListener("squeeze",V),i.removeEventListener("squeezestart",V),i.removeEventListener("squeezeend",V),i.removeEventListener("end",Q),i.removeEventListener("inputsourceschange",se);for(let j=0;j<y.length;j++){const Y=S[j];Y!==null&&(S[j]=null,y[j].disconnect(Y))}D=null,O=null,_.reset(),e.setRenderTarget(f),h=null,u=null,m=null,i=null,x=null,ae.stop(),n.isPresenting=!1,e.setPixelRatio(C),e.setSize(U.width,U.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(j){r=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(j){a=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(j){c=j},this.getBaseLayer=function(){return u!==null?u:h},this.getBinding=function(){return m},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(j){if(i=j,i!==null){if(f=e.getRenderTarget(),i.addEventListener("select",V),i.addEventListener("selectstart",V),i.addEventListener("selectend",V),i.addEventListener("squeeze",V),i.addEventListener("squeezestart",V),i.addEventListener("squeezeend",V),i.addEventListener("end",Q),i.addEventListener("inputsourceschange",se),p.xrCompatible!==!0&&await t.makeXRCompatible(),C=e.getPixelRatio(),e.getSize(U),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let ee=null,ne=null,he=null;p.depth&&(he=p.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ee=p.stencil?xr:yr,ne=p.stencil?vr:hs);const J={colorFormat:t.RGBA8,depthFormat:he,scaleFactor:r};m=new XRWebGLBinding(i,t),u=m.createProjectionLayer(J),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),x=new us(u.textureWidth,u.textureHeight,{format:Zn,type:mi,depthTexture:new H0(u.textureWidth,u.textureHeight,ne,void 0,void 0,void 0,void 0,void 0,void 0,ee),stencilBuffer:p.stencil,colorSpace:e.outputColorSpace,samples:p.antialias?4:0,resolveDepthBuffer:u.ignoreDepthValues===!1,resolveStencilBuffer:u.ignoreDepthValues===!1})}else{const ee={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,t,ee),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),x=new us(h.framebufferWidth,h.framebufferHeight,{format:Zn,type:mi,colorSpace:e.outputColorSpace,stencilBuffer:p.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}x.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),ae.setContext(i),ae.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function se(j){for(let Y=0;Y<j.removed.length;Y++){const ee=j.removed[Y],ne=S.indexOf(ee);ne>=0&&(S[ne]=null,y[ne].disconnect(ee))}for(let Y=0;Y<j.added.length;Y++){const ee=j.added[Y];let ne=S.indexOf(ee);if(ne===-1){for(let J=0;J<y.length;J++)if(J>=S.length){S.push(ee),ne=J;break}else if(S[J]===null){S[J]=ee,ne=J;break}if(ne===-1)break}const he=y[ne];he&&he.connect(ee)}}const G=new I,ce=new I;function Z(j,Y,ee){G.setFromMatrixPosition(Y.matrixWorld),ce.setFromMatrixPosition(ee.matrixWorld);const ne=G.distanceTo(ce),he=Y.projectionMatrix.elements,J=ee.projectionMatrix.elements,ue=he[14]/(he[10]-1),Ce=he[14]/(he[10]+1),je=(he[9]+1)/he[5],We=(he[9]-1)/he[5],B=(he[8]-1)/he[0],_t=(J[8]+1)/J[0],dt=ue*B,at=ue*_t,Fe=ne/(-B+_t),tt=Fe*-B;if(Y.matrixWorld.decompose(j.position,j.quaternion,j.scale),j.translateX(tt),j.translateZ(Fe),j.matrixWorld.compose(j.position,j.quaternion,j.scale),j.matrixWorldInverse.copy(j.matrixWorld).invert(),he[10]===-1)j.projectionMatrix.copy(Y.projectionMatrix),j.projectionMatrixInverse.copy(Y.projectionMatrixInverse);else{const Le=ue+Fe,ot=Ce+Fe,jt=dt-tt,k=at+(ne-tt),T=je*Ce/ot*Le,oe=We*Ce/ot*Le;j.projectionMatrix.makePerspective(jt,k,T,oe,Le,ot),j.projectionMatrixInverse.copy(j.projectionMatrix).invert()}}function ge(j,Y){Y===null?j.matrixWorld.copy(j.matrix):j.matrixWorld.multiplyMatrices(Y.matrixWorld,j.matrix),j.matrixWorldInverse.copy(j.matrixWorld).invert()}this.updateCamera=function(j){if(i===null)return;let Y=j.near,ee=j.far;_.texture!==null&&(_.depthNear>0&&(Y=_.depthNear),_.depthFar>0&&(ee=_.depthFar)),A.near=P.near=L.near=Y,A.far=P.far=L.far=ee,(D!==A.near||O!==A.far)&&(i.updateRenderState({depthNear:A.near,depthFar:A.far}),D=A.near,O=A.far),L.layers.mask=j.layers.mask|2,P.layers.mask=j.layers.mask|4,A.layers.mask=L.layers.mask|P.layers.mask;const ne=j.parent,he=A.cameras;ge(A,ne);for(let J=0;J<he.length;J++)ge(he[J],ne);he.length===2?Z(A,L,P):A.projectionMatrix.copy(L.projectionMatrix),De(j,A,ne)};function De(j,Y,ee){ee===null?j.matrix.copy(Y.matrixWorld):(j.matrix.copy(ee.matrixWorld),j.matrix.invert(),j.matrix.multiply(Y.matrixWorld)),j.matrix.decompose(j.position,j.quaternion,j.scale),j.updateMatrixWorld(!0),j.projectionMatrix.copy(Y.projectionMatrix),j.projectionMatrixInverse.copy(Y.projectionMatrixInverse),j.isPerspectiveCamera&&(j.fov=js*2*Math.atan(1/j.projectionMatrix.elements[5]),j.zoom=1)}this.getCamera=function(){return A},this.getFoveation=function(){if(!(u===null&&h===null))return l},this.setFoveation=function(j){l=j,u!==null&&(u.fixedFoveation=j),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=j)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(A)};let ye=null;function _e(j,Y){if(d=Y.getViewerPose(c||o),g=Y,d!==null){const ee=d.views;h!==null&&(e.setRenderTargetFramebuffer(x,h.framebuffer),e.setRenderTarget(x));let ne=!1;ee.length!==A.cameras.length&&(A.cameras.length=0,ne=!0);for(let ue=0;ue<ee.length;ue++){const Ce=ee[ue];let je=null;if(h!==null)je=h.getViewport(Ce);else{const B=m.getViewSubImage(u,Ce);je=B.viewport,ue===0&&(e.setRenderTargetTextures(x,B.colorTexture,B.depthStencilTexture),e.setRenderTarget(x))}let We=E[ue];We===void 0&&(We=new bn,We.layers.enable(ue),We.viewport=new Xt,E[ue]=We),We.matrix.fromArray(Ce.transform.matrix),We.matrix.decompose(We.position,We.quaternion,We.scale),We.projectionMatrix.fromArray(Ce.projectionMatrix),We.projectionMatrixInverse.copy(We.projectionMatrix).invert(),We.viewport.set(je.x,je.y,je.width,je.height),ue===0&&(A.matrix.copy(We.matrix),A.matrix.decompose(A.position,A.quaternion,A.scale)),ne===!0&&A.cameras.push(We)}const he=i.enabledFeatures;if(he&&he.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&m){const ue=m.getDepthInformation(ee[0]);ue&&ue.isValid&&ue.texture&&_.init(e,ue,i.renderState)}}for(let ee=0;ee<y.length;ee++){const ne=S[ee],he=y[ee];ne!==null&&he!==void 0&&he.update(ne,Y,c||o)}ye&&ye(j,Y),Y.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:Y}),g=null}const ae=new Z0;ae.setAnimationLoop(_e),this.setAnimationLoop=function(j){ye=j},this.dispose=function(){}}}const ts=new Sn,P3=new Et;function F3(s,e){function t(p,f){p.matrixAutoUpdate===!0&&p.updateMatrix(),f.value.copy(p.matrix)}function n(p,f){f.color.getRGB(p.fogColor.value,U0(s)),f.isFog?(p.fogNear.value=f.near,p.fogFar.value=f.far):f.isFogExp2&&(p.fogDensity.value=f.density)}function i(p,f,x,y,S){f.isMeshBasicMaterial||f.isMeshLambertMaterial?r(p,f):f.isMeshToonMaterial?(r(p,f),m(p,f)):f.isMeshPhongMaterial?(r(p,f),d(p,f)):f.isMeshStandardMaterial?(r(p,f),u(p,f),f.isMeshPhysicalMaterial&&h(p,f,S)):f.isMeshMatcapMaterial?(r(p,f),g(p,f)):f.isMeshDepthMaterial?r(p,f):f.isMeshDistanceMaterial?(r(p,f),_(p,f)):f.isMeshNormalMaterial?r(p,f):f.isLineBasicMaterial?(o(p,f),f.isLineDashedMaterial&&a(p,f)):f.isPointsMaterial?l(p,f,x,y):f.isSpriteMaterial?c(p,f):f.isShadowMaterial?(p.color.value.copy(f.color),p.opacity.value=f.opacity):f.isShaderMaterial&&(f.uniformsNeedUpdate=!1)}function r(p,f){p.opacity.value=f.opacity,f.color&&p.diffuse.value.copy(f.color),f.emissive&&p.emissive.value.copy(f.emissive).multiplyScalar(f.emissiveIntensity),f.map&&(p.map.value=f.map,t(f.map,p.mapTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.bumpMap&&(p.bumpMap.value=f.bumpMap,t(f.bumpMap,p.bumpMapTransform),p.bumpScale.value=f.bumpScale,f.side===In&&(p.bumpScale.value*=-1)),f.normalMap&&(p.normalMap.value=f.normalMap,t(f.normalMap,p.normalMapTransform),p.normalScale.value.copy(f.normalScale),f.side===In&&p.normalScale.value.negate()),f.displacementMap&&(p.displacementMap.value=f.displacementMap,t(f.displacementMap,p.displacementMapTransform),p.displacementScale.value=f.displacementScale,p.displacementBias.value=f.displacementBias),f.emissiveMap&&(p.emissiveMap.value=f.emissiveMap,t(f.emissiveMap,p.emissiveMapTransform)),f.specularMap&&(p.specularMap.value=f.specularMap,t(f.specularMap,p.specularMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest);const x=e.get(f),y=x.envMap,S=x.envMapRotation;y&&(p.envMap.value=y,ts.copy(S),ts.x*=-1,ts.y*=-1,ts.z*=-1,y.isCubeTexture&&y.isRenderTargetTexture===!1&&(ts.y*=-1,ts.z*=-1),p.envMapRotation.value.setFromMatrix4(P3.makeRotationFromEuler(ts)),p.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=f.reflectivity,p.ior.value=f.ior,p.refractionRatio.value=f.refractionRatio),f.lightMap&&(p.lightMap.value=f.lightMap,p.lightMapIntensity.value=f.lightMapIntensity,t(f.lightMap,p.lightMapTransform)),f.aoMap&&(p.aoMap.value=f.aoMap,p.aoMapIntensity.value=f.aoMapIntensity,t(f.aoMap,p.aoMapTransform))}function o(p,f){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,f.map&&(p.map.value=f.map,t(f.map,p.mapTransform))}function a(p,f){p.dashSize.value=f.dashSize,p.totalSize.value=f.dashSize+f.gapSize,p.scale.value=f.scale}function l(p,f,x,y){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,p.size.value=f.size*x,p.scale.value=y*.5,f.map&&(p.map.value=f.map,t(f.map,p.uvTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest)}function c(p,f){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,p.rotation.value=f.rotation,f.map&&(p.map.value=f.map,t(f.map,p.mapTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest)}function d(p,f){p.specular.value.copy(f.specular),p.shininess.value=Math.max(f.shininess,1e-4)}function m(p,f){f.gradientMap&&(p.gradientMap.value=f.gradientMap)}function u(p,f){p.metalness.value=f.metalness,f.metalnessMap&&(p.metalnessMap.value=f.metalnessMap,t(f.metalnessMap,p.metalnessMapTransform)),p.roughness.value=f.roughness,f.roughnessMap&&(p.roughnessMap.value=f.roughnessMap,t(f.roughnessMap,p.roughnessMapTransform)),f.envMap&&(p.envMapIntensity.value=f.envMapIntensity)}function h(p,f,x){p.ior.value=f.ior,f.sheen>0&&(p.sheenColor.value.copy(f.sheenColor).multiplyScalar(f.sheen),p.sheenRoughness.value=f.sheenRoughness,f.sheenColorMap&&(p.sheenColorMap.value=f.sheenColorMap,t(f.sheenColorMap,p.sheenColorMapTransform)),f.sheenRoughnessMap&&(p.sheenRoughnessMap.value=f.sheenRoughnessMap,t(f.sheenRoughnessMap,p.sheenRoughnessMapTransform))),f.clearcoat>0&&(p.clearcoat.value=f.clearcoat,p.clearcoatRoughness.value=f.clearcoatRoughness,f.clearcoatMap&&(p.clearcoatMap.value=f.clearcoatMap,t(f.clearcoatMap,p.clearcoatMapTransform)),f.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=f.clearcoatRoughnessMap,t(f.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),f.clearcoatNormalMap&&(p.clearcoatNormalMap.value=f.clearcoatNormalMap,t(f.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(f.clearcoatNormalScale),f.side===In&&p.clearcoatNormalScale.value.negate())),f.dispersion>0&&(p.dispersion.value=f.dispersion),f.iridescence>0&&(p.iridescence.value=f.iridescence,p.iridescenceIOR.value=f.iridescenceIOR,p.iridescenceThicknessMinimum.value=f.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=f.iridescenceThicknessRange[1],f.iridescenceMap&&(p.iridescenceMap.value=f.iridescenceMap,t(f.iridescenceMap,p.iridescenceMapTransform)),f.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=f.iridescenceThicknessMap,t(f.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),f.transmission>0&&(p.transmission.value=f.transmission,p.transmissionSamplerMap.value=x.texture,p.transmissionSamplerSize.value.set(x.width,x.height),f.transmissionMap&&(p.transmissionMap.value=f.transmissionMap,t(f.transmissionMap,p.transmissionMapTransform)),p.thickness.value=f.thickness,f.thicknessMap&&(p.thicknessMap.value=f.thicknessMap,t(f.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=f.attenuationDistance,p.attenuationColor.value.copy(f.attenuationColor)),f.anisotropy>0&&(p.anisotropyVector.value.set(f.anisotropy*Math.cos(f.anisotropyRotation),f.anisotropy*Math.sin(f.anisotropyRotation)),f.anisotropyMap&&(p.anisotropyMap.value=f.anisotropyMap,t(f.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=f.specularIntensity,p.specularColor.value.copy(f.specularColor),f.specularColorMap&&(p.specularColorMap.value=f.specularColorMap,t(f.specularColorMap,p.specularColorMapTransform)),f.specularIntensityMap&&(p.specularIntensityMap.value=f.specularIntensityMap,t(f.specularIntensityMap,p.specularIntensityMapTransform))}function g(p,f){f.matcap&&(p.matcap.value=f.matcap)}function _(p,f){const x=e.get(f).light;p.referencePosition.value.setFromMatrixPosition(x.matrixWorld),p.nearDistance.value=x.shadow.camera.near,p.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function U3(s,e,t,n){let i={},r={},o=[];const a=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function l(x,y){const S=y.program;n.uniformBlockBinding(x,S)}function c(x,y){let S=i[x.id];S===void 0&&(g(x),S=d(x),i[x.id]=S,x.addEventListener("dispose",p));const U=y.program;n.updateUBOMapping(x,U);const C=e.render.frame;r[x.id]!==C&&(u(x),r[x.id]=C)}function d(x){const y=m();x.__bindingPointIndex=y;const S=s.createBuffer(),U=x.__size,C=x.usage;return s.bindBuffer(s.UNIFORM_BUFFER,S),s.bufferData(s.UNIFORM_BUFFER,U,C),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,y,S),S}function m(){for(let x=0;x<a;x++)if(o.indexOf(x)===-1)return o.push(x),x;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function u(x){const y=i[x.id],S=x.uniforms,U=x.__cache;s.bindBuffer(s.UNIFORM_BUFFER,y);for(let C=0,L=S.length;C<L;C++){const P=Array.isArray(S[C])?S[C]:[S[C]];for(let E=0,A=P.length;E<A;E++){const D=P[E];if(h(D,C,E,U)===!0){const O=D.__offset,V=Array.isArray(D.value)?D.value:[D.value];let Q=0;for(let se=0;se<V.length;se++){const G=V[se],ce=_(G);typeof G=="number"||typeof G=="boolean"?(D.__data[0]=G,s.bufferSubData(s.UNIFORM_BUFFER,O+Q,D.__data)):G.isMatrix3?(D.__data[0]=G.elements[0],D.__data[1]=G.elements[1],D.__data[2]=G.elements[2],D.__data[3]=0,D.__data[4]=G.elements[3],D.__data[5]=G.elements[4],D.__data[6]=G.elements[5],D.__data[7]=0,D.__data[8]=G.elements[6],D.__data[9]=G.elements[7],D.__data[10]=G.elements[8],D.__data[11]=0):(G.toArray(D.__data,Q),Q+=ce.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,O,D.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function h(x,y,S,U){const C=x.value,L=y+"_"+S;if(U[L]===void 0)return typeof C=="number"||typeof C=="boolean"?U[L]=C:U[L]=C.clone(),!0;{const P=U[L];if(typeof C=="number"||typeof C=="boolean"){if(P!==C)return U[L]=C,!0}else if(P.equals(C)===!1)return P.copy(C),!0}return!1}function g(x){const y=x.uniforms;let S=0;const U=16;for(let L=0,P=y.length;L<P;L++){const E=Array.isArray(y[L])?y[L]:[y[L]];for(let A=0,D=E.length;A<D;A++){const O=E[A],V=Array.isArray(O.value)?O.value:[O.value];for(let Q=0,se=V.length;Q<se;Q++){const G=V[Q],ce=_(G),Z=S%U,ge=Z%ce.boundary,De=Z+ge;S+=ge,De!==0&&U-De<ce.storage&&(S+=U-De),O.__data=new Float32Array(ce.storage/Float32Array.BYTES_PER_ELEMENT),O.__offset=S,S+=ce.storage}}}const C=S%U;return C>0&&(S+=U-C),x.__size=S,x.__cache={},this}function _(x){const y={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(y.boundary=4,y.storage=4):x.isVector2?(y.boundary=8,y.storage=8):x.isVector3||x.isColor?(y.boundary=16,y.storage=12):x.isVector4?(y.boundary=16,y.storage=16):x.isMatrix3?(y.boundary=48,y.storage=48):x.isMatrix4?(y.boundary=64,y.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),y}function p(x){const y=x.target;y.removeEventListener("dispose",p);const S=o.indexOf(y.__bindingPointIndex);o.splice(S,1),s.deleteBuffer(i[y.id]),delete i[y.id],delete r[y.id]}function f(){for(const x in i)s.deleteBuffer(i[x]);o=[],i={},r={}}return{bind:l,update:c,dispose:f}}class iu{constructor(e={}){const{canvas:t=P2(),context:n=null,depth:i=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:m=!1,reverseDepthBuffer:u=!1}=e;this.isWebGLRenderer=!0;let h;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=n.getContextAttributes().alpha}else h=o;const g=new Uint32Array(4),_=new Int32Array(4);let p=null,f=null;const x=[],y=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=Xi,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const S=this;let U=!1;this._outputColorSpace=qt;let C=0,L=0,P=null,E=-1,A=null;const D=new Xt,O=new Xt;let V=null;const Q=new Tt(0);let se=0,G=t.width,ce=t.height,Z=1,ge=null,De=null;const ye=new Xt(0,0,G,ce),_e=new Xt(0,0,G,ce);let ae=!1;const j=new nc;let Y=!1,ee=!1;const ne=new Et,he=new Et,J=new I,ue=new Xt,Ce={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let je=!1;function We(){return P===null?Z:1}let B=n;function _t(w,H){return t.getContext(w,H)}try{const w={alpha:!0,depth:i,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:d,failIfMajorPerformanceCaveat:m};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Vl}`),t.addEventListener("webglcontextlost",ut,!1),t.addEventListener("webglcontextrestored",ze,!1),t.addEventListener("webglcontextcreationerror",Ae,!1),B===null){const H="webgl2";if(B=_t(H,w),B===null)throw _t(H)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(w){throw console.error("THREE.WebGLRenderer: "+w.message),w}let dt,at,Fe,tt,Le,ot,jt,k,T,oe,be,Re,xe,vt,Ze,mt,yt,Ne,st,Rt,At,Je,Lt,K;function Ye(){dt=new Xp(B),dt.init(),Je=new T3(B,dt),at=new Bp(B,dt,e,Je),Fe=new A3(B,dt),at.reverseDepthBuffer&&u&&Fe.buffers.depth.setReversed(!0),tt=new $p(B),Le=new d3,ot=new w3(B,dt,Fe,Le,at,Je,tt),jt=new kp(S),k=new Wp(S),T=new Q1(B),Lt=new Ip(B,T),oe=new jp(B,T,tt,Lt),be=new Jp(B,oe,T,tt),st=new Yp(B,at,ot),mt=new Op(Le),Re=new u3(S,jt,k,dt,at,Lt,mt),xe=new F3(S,Le),vt=new p3,Ze=new x3(dt),Ne=new Np(S,jt,k,Fe,be,h,l),yt=new S3(S,be,at),K=new U3(B,tt,at,Fe),Rt=new zp(B,dt,tt),At=new qp(B,dt,tt),tt.programs=Re.programs,S.capabilities=at,S.extensions=dt,S.properties=Le,S.renderLists=vt,S.shadowMap=yt,S.state=Fe,S.info=tt}Ye();const Ie=new L3(S,B);this.xr=Ie,this.getContext=function(){return B},this.getContextAttributes=function(){return B.getContextAttributes()},this.forceContextLoss=function(){const w=dt.get("WEBGL_lose_context");w&&w.loseContext()},this.forceContextRestore=function(){const w=dt.get("WEBGL_lose_context");w&&w.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(w){w!==void 0&&(Z=w,this.setSize(G,ce,!1))},this.getSize=function(w){return w.set(G,ce)},this.setSize=function(w,H,X=!0){if(Ie.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=w,ce=H,t.width=Math.floor(w*Z),t.height=Math.floor(H*Z),X===!0&&(t.style.width=w+"px",t.style.height=H+"px"),this.setViewport(0,0,w,H)},this.getDrawingBufferSize=function(w){return w.set(G*Z,ce*Z).floor()},this.setDrawingBufferSize=function(w,H,X){G=w,ce=H,Z=X,t.width=Math.floor(w*X),t.height=Math.floor(H*X),this.setViewport(0,0,w,H)},this.getCurrentViewport=function(w){return w.copy(D)},this.getViewport=function(w){return w.copy(ye)},this.setViewport=function(w,H,X,$){w.isVector4?ye.set(w.x,w.y,w.z,w.w):ye.set(w,H,X,$),Fe.viewport(D.copy(ye).multiplyScalar(Z).round())},this.getScissor=function(w){return w.copy(_e)},this.setScissor=function(w,H,X,$){w.isVector4?_e.set(w.x,w.y,w.z,w.w):_e.set(w,H,X,$),Fe.scissor(O.copy(_e).multiplyScalar(Z).round())},this.getScissorTest=function(){return ae},this.setScissorTest=function(w){Fe.setScissorTest(ae=w)},this.setOpaqueSort=function(w){ge=w},this.setTransparentSort=function(w){De=w},this.getClearColor=function(w){return w.copy(Ne.getClearColor())},this.setClearColor=function(){Ne.setClearColor(...arguments)},this.getClearAlpha=function(){return Ne.getClearAlpha()},this.setClearAlpha=function(){Ne.setClearAlpha(...arguments)},this.clear=function(w=!0,H=!0,X=!0){let $=0;if(w){let z=!1;if(P!==null){const pe=P.texture.format;z=pe===Yl||pe===$l||pe===ql}if(z){const pe=P.texture.type,ie=pe===mi||pe===hs||pe===_r||pe===vr||pe===Xl||pe===jl,Ee=Ne.getClearColor(),re=Ne.getClearAlpha(),He=Ee.r,Se=Ee.g,Pe=Ee.b;ie?(g[0]=He,g[1]=Se,g[2]=Pe,g[3]=re,B.clearBufferuiv(B.COLOR,0,g)):(_[0]=He,_[1]=Se,_[2]=Pe,_[3]=re,B.clearBufferiv(B.COLOR,0,_))}else $|=B.COLOR_BUFFER_BIT}H&&($|=B.DEPTH_BUFFER_BIT),X&&($|=B.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),B.clear($)},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",ut,!1),t.removeEventListener("webglcontextrestored",ze,!1),t.removeEventListener("webglcontextcreationerror",Ae,!1),Ne.dispose(),vt.dispose(),Ze.dispose(),Le.dispose(),jt.dispose(),k.dispose(),be.dispose(),Lt.dispose(),K.dispose(),Re.dispose(),Ie.dispose(),Ie.removeEventListener("sessionstart",fs),Ie.removeEventListener("sessionend",Yi),ei.stop()};function ut(w){w.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),U=!0}function ze(){console.log("THREE.WebGLRenderer: Context Restored."),U=!1;const w=tt.autoReset,H=yt.enabled,X=yt.autoUpdate,$=yt.needsUpdate,z=yt.type;Ye(),tt.autoReset=w,yt.enabled=H,yt.autoUpdate=X,yt.needsUpdate=$,yt.type=z}function Ae(w){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",w.statusMessage)}function pt(w){const H=w.target;H.removeEventListener("dispose",pt),Ft(H)}function Ft(w){Qt(w),Le.remove(w)}function Qt(w){const H=Le.get(w).programs;H!==void 0&&(H.forEach(function(X){Re.releaseProgram(X)}),w.isShaderMaterial&&Re.releaseShaderCache(w))}this.renderBufferDirect=function(w,H,X,$,z,pe){H===null&&(H=Ce);const ie=z.isMesh&&z.matrixWorld.determinant()<0,Ee=Te(w,H,X,$,z);Fe.setMaterial($,ie);let re=X.index,He=1;if($.wireframe===!0){if(re=oe.getWireframeAttribute(X),re===void 0)return;He=2}const Se=X.drawRange,Pe=X.attributes.position;let it=Se.start*He,Mt=(Se.start+Se.count)*He;pe!==null&&(it=Math.max(it,pe.start*He),Mt=Math.min(Mt,(pe.start+pe.count)*He)),re!==null?(it=Math.max(it,0),Mt=Math.min(Mt,re.count)):Pe!=null&&(it=Math.max(it,0),Mt=Math.min(Mt,Pe.count));const Ct=Mt-it;if(Ct<0||Ct===1/0)return;Lt.setup(z,$,Ee,X,re);let bt,St=Rt;if(re!==null&&(bt=T.get(re),St=At,St.setIndex(bt)),z.isMesh)$.wireframe===!0?(Fe.setLineWidth($.wireframeLinewidth*We()),St.setMode(B.LINES)):St.setMode(B.TRIANGLES);else if(z.isLine){let Qe=$.linewidth;Qe===void 0&&(Qe=1),Fe.setLineWidth(Qe*We()),z.isLineSegments?St.setMode(B.LINES):z.isLineLoop?St.setMode(B.LINE_LOOP):St.setMode(B.LINE_STRIP)}else z.isPoints?St.setMode(B.POINTS):z.isSprite&&St.setMode(B.TRIANGLES);if(z.isBatchedMesh)if(z._multiDrawInstances!==null)Os("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),St.renderMultiDrawInstances(z._multiDrawStarts,z._multiDrawCounts,z._multiDrawCount,z._multiDrawInstances);else if(dt.get("WEBGL_multi_draw"))St.renderMultiDraw(z._multiDrawStarts,z._multiDrawCounts,z._multiDrawCount);else{const Qe=z._multiDrawStarts,Wt=z._multiDrawCounts,Ut=z._multiDrawCount,nn=re?T.get(re).bytesPerElement:1,Bt=Le.get($).currentProgram.getUniforms();for(let cn=0;cn<Ut;cn++)Bt.setValue(B,"_gl_DrawID",cn),St.render(Qe[cn]/nn,Wt[cn])}else if(z.isInstancedMesh)St.renderInstances(it,Ct,z.count);else if(X.isInstancedBufferGeometry){const Qe=X._maxInstanceCount!==void 0?X._maxInstanceCount:1/0,Wt=Math.min(X.instanceCount,Qe);St.renderInstances(it,Ct,Wt)}else St.render(it,Ct)};function Nt(w,H,X){w.transparent===!0&&w.side===pn&&w.forceSinglePass===!1?(w.side=In,w.needsUpdate=!0,me(w,H,X),w.side=Qn,w.needsUpdate=!0,me(w,H,X),w.side=pn):me(w,H,X)}this.compile=function(w,H,X=null){X===null&&(X=w),f=Ze.get(X),f.init(H),y.push(f),X.traverseVisible(function(z){z.isLight&&z.layers.test(H.layers)&&(f.pushLight(z),z.castShadow&&f.pushShadow(z))}),w!==X&&w.traverseVisible(function(z){z.isLight&&z.layers.test(H.layers)&&(f.pushLight(z),z.castShadow&&f.pushShadow(z))}),f.setupLights();const $=new Set;return w.traverse(function(z){if(!(z.isMesh||z.isPoints||z.isLine||z.isSprite))return;const pe=z.material;if(pe)if(Array.isArray(pe))for(let ie=0;ie<pe.length;ie++){const Ee=pe[ie];Nt(Ee,X,z),$.add(Ee)}else Nt(pe,X,z),$.add(pe)}),f=y.pop(),$},this.compileAsync=function(w,H,X=null){const $=this.compile(w,H,X);return new Promise(z=>{function pe(){if($.forEach(function(ie){Le.get(ie).currentProgram.isReady()&&$.delete(ie)}),$.size===0){z(w);return}setTimeout(pe,10)}dt.get("KHR_parallel_shader_compile")!==null?pe():setTimeout(pe,10)})};let Cn=null;function Hn(w){Cn&&Cn(w)}function fs(){ei.stop()}function Yi(){ei.start()}const ei=new Z0;ei.setAnimationLoop(Hn),typeof self<"u"&&ei.setContext(self),this.setAnimationLoop=function(w){Cn=w,Ie.setAnimationLoop(w),w===null?ei.stop():ei.start()},Ie.addEventListener("sessionstart",fs),Ie.addEventListener("sessionend",Yi),this.render=function(w,H){if(H!==void 0&&H.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(U===!0)return;if(w.matrixWorldAutoUpdate===!0&&w.updateMatrixWorld(),H.parent===null&&H.matrixWorldAutoUpdate===!0&&H.updateMatrixWorld(),Ie.enabled===!0&&Ie.isPresenting===!0&&(Ie.cameraAutoUpdate===!0&&Ie.updateCamera(H),H=Ie.getCamera()),w.isScene===!0&&w.onBeforeRender(S,w,H,P),f=Ze.get(w,y.length),f.init(H),y.push(f),he.multiplyMatrices(H.projectionMatrix,H.matrixWorldInverse),j.setFromProjectionMatrix(he),ee=this.localClippingEnabled,Y=mt.init(this.clippingPlanes,ee),p=vt.get(w,x.length),p.init(),x.push(p),Ie.enabled===!0&&Ie.isPresenting===!0){const pe=S.xr.getDepthSensingMesh();pe!==null&&q(pe,H,-1/0,S.sortObjects)}q(w,H,0,S.sortObjects),p.finish(),S.sortObjects===!0&&p.sort(ge,De),je=Ie.enabled===!1||Ie.isPresenting===!1||Ie.hasDepthSensing()===!1,je&&Ne.addToRenderList(p,w),this.info.render.frame++,Y===!0&&mt.beginShadows();const X=f.state.shadowsArray;yt.render(X,w,H),Y===!0&&mt.endShadows(),this.info.autoReset===!0&&this.info.reset();const $=p.opaque,z=p.transmissive;if(f.setupLights(),H.isArrayCamera){const pe=H.cameras;if(z.length>0)for(let ie=0,Ee=pe.length;ie<Ee;ie++){const re=pe[ie];le($,z,w,re)}je&&Ne.render(w);for(let ie=0,Ee=pe.length;ie<Ee;ie++){const re=pe[ie];W(p,w,re,re.viewport)}}else z.length>0&&le($,z,w,H),je&&Ne.render(w),W(p,w,H);P!==null&&L===0&&(ot.updateMultisampleRenderTarget(P),ot.updateRenderTargetMipmap(P)),w.isScene===!0&&w.onAfterRender(S,w,H),Lt.resetDefaultState(),E=-1,A=null,y.pop(),y.length>0?(f=y[y.length-1],Y===!0&&mt.setGlobalState(S.clippingPlanes,f.state.camera)):f=null,x.pop(),x.length>0?p=x[x.length-1]:p=null};function q(w,H,X,$){if(w.visible===!1)return;if(w.layers.test(H.layers)){if(w.isGroup)X=w.renderOrder;else if(w.isLOD)w.autoUpdate===!0&&w.update(H);else if(w.isLight)f.pushLight(w),w.castShadow&&f.pushShadow(w);else if(w.isSprite){if(!w.frustumCulled||j.intersectsSprite(w)){$&&ue.setFromMatrixPosition(w.matrixWorld).applyMatrix4(he);const ie=be.update(w),Ee=w.material;Ee.visible&&p.push(w,ie,Ee,X,ue.z,null)}}else if((w.isMesh||w.isLine||w.isPoints)&&(!w.frustumCulled||j.intersectsObject(w))){const ie=be.update(w),Ee=w.material;if($&&(w.boundingSphere!==void 0?(w.boundingSphere===null&&w.computeBoundingSphere(),ue.copy(w.boundingSphere.center)):(ie.boundingSphere===null&&ie.computeBoundingSphere(),ue.copy(ie.boundingSphere.center)),ue.applyMatrix4(w.matrixWorld).applyMatrix4(he)),Array.isArray(Ee)){const re=ie.groups;for(let He=0,Se=re.length;He<Se;He++){const Pe=re[He],it=Ee[Pe.materialIndex];it&&it.visible&&p.push(w,ie,it,X,ue.z,Pe)}}else Ee.visible&&p.push(w,ie,Ee,X,ue.z,null)}}const pe=w.children;for(let ie=0,Ee=pe.length;ie<Ee;ie++)q(pe[ie],H,X,$)}function W(w,H,X,$){const z=w.opaque,pe=w.transmissive,ie=w.transparent;f.setupLightsView(X),Y===!0&&mt.setGlobalState(S.clippingPlanes,X),$&&Fe.viewport(D.copy($)),z.length>0&&fe(z,H,X),pe.length>0&&fe(pe,H,X),ie.length>0&&fe(ie,H,X),Fe.buffers.depth.setTest(!0),Fe.buffers.depth.setMask(!0),Fe.buffers.color.setMask(!0),Fe.setPolygonOffset(!1)}function le(w,H,X,$){if((X.isScene===!0?X.overrideMaterial:null)!==null)return;f.state.transmissionRenderTarget[$.id]===void 0&&(f.state.transmissionRenderTarget[$.id]=new us(1,1,{generateMipmaps:!0,type:dt.has("EXT_color_buffer_half_float")||dt.has("EXT_color_buffer_float")?Sr:mi,minFilter:Ai,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Gt.workingColorSpace}));const pe=f.state.transmissionRenderTarget[$.id],ie=$.viewport||D;pe.setSize(ie.z*S.transmissionResolutionScale,ie.w*S.transmissionResolutionScale);const Ee=S.getRenderTarget();S.setRenderTarget(pe),S.getClearColor(Q),se=S.getClearAlpha(),se<1&&S.setClearColor(16777215,.5),S.clear(),je&&Ne.render(X);const re=S.toneMapping;S.toneMapping=Xi;const He=$.viewport;if($.viewport!==void 0&&($.viewport=void 0),f.setupLightsView($),Y===!0&&mt.setGlobalState(S.clippingPlanes,$),fe(w,X,$),ot.updateMultisampleRenderTarget(pe),ot.updateRenderTargetMipmap(pe),dt.has("WEBGL_multisampled_render_to_texture")===!1){let Se=!1;for(let Pe=0,it=H.length;Pe<it;Pe++){const Mt=H[Pe],Ct=Mt.object,bt=Mt.geometry,St=Mt.material,Qe=Mt.group;if(St.side===pn&&Ct.layers.test($.layers)){const Wt=St.side;St.side=In,St.needsUpdate=!0,ve(Ct,X,$,bt,St,Qe),St.side=Wt,St.needsUpdate=!0,Se=!0}}Se===!0&&(ot.updateMultisampleRenderTarget(pe),ot.updateRenderTargetMipmap(pe))}S.setRenderTarget(Ee),S.setClearColor(Q,se),He!==void 0&&($.viewport=He),S.toneMapping=re}function fe(w,H,X){const $=H.isScene===!0?H.overrideMaterial:null;for(let z=0,pe=w.length;z<pe;z++){const ie=w[z],Ee=ie.object,re=ie.geometry,He=ie.group;let Se=ie.material;Se.allowOverride===!0&&$!==null&&(Se=$),Ee.layers.test(X.layers)&&ve(Ee,H,X,re,Se,He)}}function ve(w,H,X,$,z,pe){w.onBeforeRender(S,H,X,$,z,pe),w.modelViewMatrix.multiplyMatrices(X.matrixWorldInverse,w.matrixWorld),w.normalMatrix.getNormalMatrix(w.modelViewMatrix),z.onBeforeRender(S,H,X,$,w,pe),z.transparent===!0&&z.side===pn&&z.forceSinglePass===!1?(z.side=In,z.needsUpdate=!0,S.renderBufferDirect(X,H,$,z,w,pe),z.side=Qn,z.needsUpdate=!0,S.renderBufferDirect(X,H,$,z,w,pe),z.side=pn):S.renderBufferDirect(X,H,$,z,w,pe),w.onAfterRender(S,H,X,$,z,pe)}function me(w,H,X){H.isScene!==!0&&(H=Ce);const $=Le.get(w),z=f.state.lights,pe=f.state.shadowsArray,ie=z.state.version,Ee=Re.getParameters(w,z.state,pe,H,X),re=Re.getProgramCacheKey(Ee);let He=$.programs;$.environment=w.isMeshStandardMaterial?H.environment:null,$.fog=H.fog,$.envMap=(w.isMeshStandardMaterial?k:jt).get(w.envMap||$.environment),$.envMapRotation=$.environment!==null&&w.envMap===null?H.environmentRotation:w.envMapRotation,He===void 0&&(w.addEventListener("dispose",pt),He=new Map,$.programs=He);let Se=He.get(re);if(Se!==void 0){if($.currentProgram===Se&&$.lightsStateVersion===ie)return we(w,Ee),Se}else Ee.uniforms=Re.getUniforms(w),w.onBeforeCompile(Ee,S),Se=Re.acquireProgram(Ee,re),He.set(re,Se),$.uniforms=Ee.uniforms;const Pe=$.uniforms;return(!w.isShaderMaterial&&!w.isRawShaderMaterial||w.clipping===!0)&&(Pe.clippingPlanes=mt.uniform),we(w,Ee),$.needsLights=te(w),$.lightsStateVersion=ie,$.needsLights&&(Pe.ambientLightColor.value=z.state.ambient,Pe.lightProbe.value=z.state.probe,Pe.directionalLights.value=z.state.directional,Pe.directionalLightShadows.value=z.state.directionalShadow,Pe.spotLights.value=z.state.spot,Pe.spotLightShadows.value=z.state.spotShadow,Pe.rectAreaLights.value=z.state.rectArea,Pe.ltc_1.value=z.state.rectAreaLTC1,Pe.ltc_2.value=z.state.rectAreaLTC2,Pe.pointLights.value=z.state.point,Pe.pointLightShadows.value=z.state.pointShadow,Pe.hemisphereLights.value=z.state.hemi,Pe.directionalShadowMap.value=z.state.directionalShadowMap,Pe.directionalShadowMatrix.value=z.state.directionalShadowMatrix,Pe.spotShadowMap.value=z.state.spotShadowMap,Pe.spotLightMatrix.value=z.state.spotLightMatrix,Pe.spotLightMap.value=z.state.spotLightMap,Pe.pointShadowMap.value=z.state.pointShadowMap,Pe.pointShadowMatrix.value=z.state.pointShadowMatrix),$.currentProgram=Se,$.uniformsList=null,Se}function Be(w){if(w.uniformsList===null){const H=w.currentProgram.getUniforms();w.uniformsList=Ma.seqWithValue(H.seq,w.uniforms)}return w.uniformsList}function we(w,H){const X=Le.get(w);X.outputColorSpace=H.outputColorSpace,X.batching=H.batching,X.batchingColor=H.batchingColor,X.instancing=H.instancing,X.instancingColor=H.instancingColor,X.instancingMorph=H.instancingMorph,X.skinning=H.skinning,X.morphTargets=H.morphTargets,X.morphNormals=H.morphNormals,X.morphColors=H.morphColors,X.morphTargetsCount=H.morphTargetsCount,X.numClippingPlanes=H.numClippingPlanes,X.numIntersection=H.numClipIntersection,X.vertexAlphas=H.vertexAlphas,X.vertexTangents=H.vertexTangents,X.toneMapping=H.toneMapping}function Te(w,H,X,$,z){H.isScene!==!0&&(H=Ce),ot.resetTextureUnits();const pe=H.fog,ie=$.isMeshStandardMaterial?H.environment:null,Ee=P===null?S.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:Xs,re=($.isMeshStandardMaterial?k:jt).get($.envMap||ie),He=$.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,Se=!!X.attributes.tangent&&(!!$.normalMap||$.anisotropy>0),Pe=!!X.morphAttributes.position,it=!!X.morphAttributes.normal,Mt=!!X.morphAttributes.color;let Ct=Xi;$.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(Ct=S.toneMapping);const bt=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,St=bt!==void 0?bt.length:0,Qe=Le.get($),Wt=f.state.lights;if(Y===!0&&(ee===!0||w!==A)){const sn=w===A&&$.id===E;mt.setState($,w,sn)}let Ut=!1;$.version===Qe.__version?(Qe.needsLights&&Qe.lightsStateVersion!==Wt.state.version||Qe.outputColorSpace!==Ee||z.isBatchedMesh&&Qe.batching===!1||!z.isBatchedMesh&&Qe.batching===!0||z.isBatchedMesh&&Qe.batchingColor===!0&&z.colorTexture===null||z.isBatchedMesh&&Qe.batchingColor===!1&&z.colorTexture!==null||z.isInstancedMesh&&Qe.instancing===!1||!z.isInstancedMesh&&Qe.instancing===!0||z.isSkinnedMesh&&Qe.skinning===!1||!z.isSkinnedMesh&&Qe.skinning===!0||z.isInstancedMesh&&Qe.instancingColor===!0&&z.instanceColor===null||z.isInstancedMesh&&Qe.instancingColor===!1&&z.instanceColor!==null||z.isInstancedMesh&&Qe.instancingMorph===!0&&z.morphTexture===null||z.isInstancedMesh&&Qe.instancingMorph===!1&&z.morphTexture!==null||Qe.envMap!==re||$.fog===!0&&Qe.fog!==pe||Qe.numClippingPlanes!==void 0&&(Qe.numClippingPlanes!==mt.numPlanes||Qe.numIntersection!==mt.numIntersection)||Qe.vertexAlphas!==He||Qe.vertexTangents!==Se||Qe.morphTargets!==Pe||Qe.morphNormals!==it||Qe.morphColors!==Mt||Qe.toneMapping!==Ct||Qe.morphTargetsCount!==St)&&(Ut=!0):(Ut=!0,Qe.__version=$.version);let nn=Qe.currentProgram;Ut===!0&&(nn=me($,H,z));let Bt=!1,cn=!1,Ge=!1;const Pt=nn.getUniforms(),Ot=Qe.uniforms;if(Fe.useProgram(nn.program)&&(Bt=!0,cn=!0,Ge=!0),$.id!==E&&(E=$.id,cn=!0),Bt||A!==w){Fe.buffers.depth.getReversed()?(ne.copy(w.projectionMatrix),U2(ne),N2(ne),Pt.setValue(B,"projectionMatrix",ne)):Pt.setValue(B,"projectionMatrix",w.projectionMatrix),Pt.setValue(B,"viewMatrix",w.matrixWorldInverse);const Kt=Pt.map.cameraPosition;Kt!==void 0&&Kt.setValue(B,J.setFromMatrixPosition(w.matrixWorld)),at.logarithmicDepthBuffer&&Pt.setValue(B,"logDepthBufFC",2/(Math.log(w.far+1)/Math.LN2)),($.isMeshPhongMaterial||$.isMeshToonMaterial||$.isMeshLambertMaterial||$.isMeshBasicMaterial||$.isMeshStandardMaterial||$.isShaderMaterial)&&Pt.setValue(B,"isOrthographic",w.isOrthographicCamera===!0),A!==w&&(A=w,cn=!0,Ge=!0)}if(z.isSkinnedMesh){Pt.setOptional(B,z,"bindMatrix"),Pt.setOptional(B,z,"bindMatrixInverse");const sn=z.skeleton;sn&&(sn.boneTexture===null&&sn.computeBoneTexture(),Pt.setValue(B,"boneTexture",sn.boneTexture,ot))}z.isBatchedMesh&&(Pt.setOptional(B,z,"batchingTexture"),Pt.setValue(B,"batchingTexture",z._matricesTexture,ot),Pt.setOptional(B,z,"batchingIdTexture"),Pt.setValue(B,"batchingIdTexture",z._indirectTexture,ot),Pt.setOptional(B,z,"batchingColorTexture"),z._colorsTexture!==null&&Pt.setValue(B,"batchingColorTexture",z._colorsTexture,ot));const Jt=X.morphAttributes;if((Jt.position!==void 0||Jt.normal!==void 0||Jt.color!==void 0)&&st.update(z,X,nn),(cn||Qe.receiveShadow!==z.receiveShadow)&&(Qe.receiveShadow=z.receiveShadow,Pt.setValue(B,"receiveShadow",z.receiveShadow)),$.isMeshGouraudMaterial&&$.envMap!==null&&(Ot.envMap.value=re,Ot.flipEnvMap.value=re.isCubeTexture&&re.isRenderTargetTexture===!1?-1:1),$.isMeshStandardMaterial&&$.envMap===null&&H.environment!==null&&(Ot.envMapIntensity.value=H.environmentIntensity),cn&&(Pt.setValue(B,"toneMappingExposure",S.toneMappingExposure),Qe.needsLights&&$e(Ot,Ge),pe&&$.fog===!0&&xe.refreshFogUniforms(Ot,pe),xe.refreshMaterialUniforms(Ot,$,Z,ce,f.state.transmissionRenderTarget[w.id]),Ma.upload(B,Be(Qe),Ot,ot)),$.isShaderMaterial&&$.uniformsNeedUpdate===!0&&(Ma.upload(B,Be(Qe),Ot,ot),$.uniformsNeedUpdate=!1),$.isSpriteMaterial&&Pt.setValue(B,"center",z.center),Pt.setValue(B,"modelViewMatrix",z.modelViewMatrix),Pt.setValue(B,"normalMatrix",z.normalMatrix),Pt.setValue(B,"modelMatrix",z.matrixWorld),$.isShaderMaterial||$.isRawShaderMaterial){const sn=$.uniformsGroups;for(let Kt=0,rt=sn.length;Kt<rt;Kt++){const ke=sn[Kt];K.update(ke,nn),K.bind(ke,nn)}}return nn}function $e(w,H){w.ambientLightColor.needsUpdate=H,w.lightProbe.needsUpdate=H,w.directionalLights.needsUpdate=H,w.directionalLightShadows.needsUpdate=H,w.pointLights.needsUpdate=H,w.pointLightShadows.needsUpdate=H,w.spotLights.needsUpdate=H,w.spotLightShadows.needsUpdate=H,w.rectAreaLights.needsUpdate=H,w.hemisphereLights.needsUpdate=H}function te(w){return w.isMeshLambertMaterial||w.isMeshToonMaterial||w.isMeshPhongMaterial||w.isMeshStandardMaterial||w.isShadowMaterial||w.isShaderMaterial&&w.lights===!0}this.getActiveCubeFace=function(){return C},this.getActiveMipmapLevel=function(){return L},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(w,H,X){const $=Le.get(w);$.__autoAllocateDepthBuffer=w.resolveDepthBuffer===!1,$.__autoAllocateDepthBuffer===!1&&($.__useRenderToTexture=!1),Le.get(w.texture).__webglTexture=H,Le.get(w.depthTexture).__webglTexture=$.__autoAllocateDepthBuffer?void 0:X,$.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(w,H){const X=Le.get(w);X.__webglFramebuffer=H,X.__useDefaultFramebuffer=H===void 0};const Ve=B.createFramebuffer();this.setRenderTarget=function(w,H=0,X=0){P=w,C=H,L=X;let $=!0,z=null,pe=!1,ie=!1;if(w){const re=Le.get(w);if(re.__useDefaultFramebuffer!==void 0)Fe.bindFramebuffer(B.FRAMEBUFFER,null),$=!1;else if(re.__webglFramebuffer===void 0)ot.setupRenderTarget(w);else if(re.__hasExternalTextures)ot.rebindTextures(w,Le.get(w.texture).__webglTexture,Le.get(w.depthTexture).__webglTexture);else if(w.depthBuffer){const Pe=w.depthTexture;if(re.__boundDepthTexture!==Pe){if(Pe!==null&&Le.has(Pe)&&(w.width!==Pe.image.width||w.height!==Pe.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");ot.setupDepthRenderbuffer(w)}}const He=w.texture;(He.isData3DTexture||He.isDataArrayTexture||He.isCompressedArrayTexture)&&(ie=!0);const Se=Le.get(w).__webglFramebuffer;w.isWebGLCubeRenderTarget?(Array.isArray(Se[H])?z=Se[H][X]:z=Se[H],pe=!0):w.samples>0&&ot.useMultisampledRTT(w)===!1?z=Le.get(w).__webglMultisampledFramebuffer:Array.isArray(Se)?z=Se[X]:z=Se,D.copy(w.viewport),O.copy(w.scissor),V=w.scissorTest}else D.copy(ye).multiplyScalar(Z).floor(),O.copy(_e).multiplyScalar(Z).floor(),V=ae;if(X!==0&&(z=Ve),Fe.bindFramebuffer(B.FRAMEBUFFER,z)&&$&&Fe.drawBuffers(w,z),Fe.viewport(D),Fe.scissor(O),Fe.setScissorTest(V),pe){const re=Le.get(w.texture);B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_CUBE_MAP_POSITIVE_X+H,re.__webglTexture,X)}else if(ie){const re=Le.get(w.texture),He=H;B.framebufferTextureLayer(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,re.__webglTexture,X,He)}else if(w!==null&&X!==0){const re=Le.get(w.texture);B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,re.__webglTexture,X)}E=-1},this.readRenderTargetPixels=function(w,H,X,$,z,pe,ie,Ee=0){if(!(w&&w.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let re=Le.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ie!==void 0&&(re=re[ie]),re){Fe.bindFramebuffer(B.FRAMEBUFFER,re);try{const He=w.textures[Ee],Se=He.format,Pe=He.type;if(!at.textureFormatReadable(Se)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!at.textureTypeReadable(Pe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}H>=0&&H<=w.width-$&&X>=0&&X<=w.height-z&&(w.textures.length>1&&B.readBuffer(B.COLOR_ATTACHMENT0+Ee),B.readPixels(H,X,$,z,Je.convert(Se),Je.convert(Pe),pe))}finally{const He=P!==null?Le.get(P).__webglFramebuffer:null;Fe.bindFramebuffer(B.FRAMEBUFFER,He)}}},this.readRenderTargetPixelsAsync=async function(w,H,X,$,z,pe,ie,Ee=0){if(!(w&&w.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let re=Le.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ie!==void 0&&(re=re[ie]),re)if(H>=0&&H<=w.width-$&&X>=0&&X<=w.height-z){Fe.bindFramebuffer(B.FRAMEBUFFER,re);const He=w.textures[Ee],Se=He.format,Pe=He.type;if(!at.textureFormatReadable(Se))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!at.textureTypeReadable(Pe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const it=B.createBuffer();B.bindBuffer(B.PIXEL_PACK_BUFFER,it),B.bufferData(B.PIXEL_PACK_BUFFER,pe.byteLength,B.STREAM_READ),w.textures.length>1&&B.readBuffer(B.COLOR_ATTACHMENT0+Ee),B.readPixels(H,X,$,z,Je.convert(Se),Je.convert(Pe),0);const Mt=P!==null?Le.get(P).__webglFramebuffer:null;Fe.bindFramebuffer(B.FRAMEBUFFER,Mt);const Ct=B.fenceSync(B.SYNC_GPU_COMMANDS_COMPLETE,0);return B.flush(),await F2(B,Ct,4),B.bindBuffer(B.PIXEL_PACK_BUFFER,it),B.getBufferSubData(B.PIXEL_PACK_BUFFER,0,pe),B.deleteBuffer(it),B.deleteSync(Ct),pe}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(w,H=null,X=0){const $=Math.pow(2,-X),z=Math.floor(w.image.width*$),pe=Math.floor(w.image.height*$),ie=H!==null?H.x:0,Ee=H!==null?H.y:0;ot.setTexture2D(w,0),B.copyTexSubImage2D(B.TEXTURE_2D,X,0,0,ie,Ee,z,pe),Fe.unbindTexture()};const Xe=B.createFramebuffer(),ft=B.createFramebuffer();this.copyTextureToTexture=function(w,H,X=null,$=null,z=0,pe=null){pe===null&&(z!==0?(Os("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),pe=z,z=0):pe=0);let ie,Ee,re,He,Se,Pe,it,Mt,Ct;const bt=w.isCompressedTexture?w.mipmaps[pe]:w.image;if(X!==null)ie=X.max.x-X.min.x,Ee=X.max.y-X.min.y,re=X.isBox3?X.max.z-X.min.z:1,He=X.min.x,Se=X.min.y,Pe=X.isBox3?X.min.z:0;else{const Jt=Math.pow(2,-z);ie=Math.floor(bt.width*Jt),Ee=Math.floor(bt.height*Jt),w.isDataArrayTexture?re=bt.depth:w.isData3DTexture?re=Math.floor(bt.depth*Jt):re=1,He=0,Se=0,Pe=0}$!==null?(it=$.x,Mt=$.y,Ct=$.z):(it=0,Mt=0,Ct=0);const St=Je.convert(H.format),Qe=Je.convert(H.type);let Wt;H.isData3DTexture?(ot.setTexture3D(H,0),Wt=B.TEXTURE_3D):H.isDataArrayTexture||H.isCompressedArrayTexture?(ot.setTexture2DArray(H,0),Wt=B.TEXTURE_2D_ARRAY):(ot.setTexture2D(H,0),Wt=B.TEXTURE_2D),B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,H.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,H.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,H.unpackAlignment);const Ut=B.getParameter(B.UNPACK_ROW_LENGTH),nn=B.getParameter(B.UNPACK_IMAGE_HEIGHT),Bt=B.getParameter(B.UNPACK_SKIP_PIXELS),cn=B.getParameter(B.UNPACK_SKIP_ROWS),Ge=B.getParameter(B.UNPACK_SKIP_IMAGES);B.pixelStorei(B.UNPACK_ROW_LENGTH,bt.width),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,bt.height),B.pixelStorei(B.UNPACK_SKIP_PIXELS,He),B.pixelStorei(B.UNPACK_SKIP_ROWS,Se),B.pixelStorei(B.UNPACK_SKIP_IMAGES,Pe);const Pt=w.isDataArrayTexture||w.isData3DTexture,Ot=H.isDataArrayTexture||H.isData3DTexture;if(w.isDepthTexture){const Jt=Le.get(w),sn=Le.get(H),Kt=Le.get(Jt.__renderTarget),rt=Le.get(sn.__renderTarget);Fe.bindFramebuffer(B.READ_FRAMEBUFFER,Kt.__webglFramebuffer),Fe.bindFramebuffer(B.DRAW_FRAMEBUFFER,rt.__webglFramebuffer);for(let ke=0;ke<re;ke++)Pt&&(B.framebufferTextureLayer(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Le.get(w).__webglTexture,z,Pe+ke),B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Le.get(H).__webglTexture,pe,Ct+ke)),B.blitFramebuffer(He,Se,ie,Ee,it,Mt,ie,Ee,B.DEPTH_BUFFER_BIT,B.NEAREST);Fe.bindFramebuffer(B.READ_FRAMEBUFFER,null),Fe.bindFramebuffer(B.DRAW_FRAMEBUFFER,null)}else if(z!==0||w.isRenderTargetTexture||Le.has(w)){const Jt=Le.get(w),sn=Le.get(H);Fe.bindFramebuffer(B.READ_FRAMEBUFFER,Xe),Fe.bindFramebuffer(B.DRAW_FRAMEBUFFER,ft);for(let Kt=0;Kt<re;Kt++)Pt?B.framebufferTextureLayer(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,Jt.__webglTexture,z,Pe+Kt):B.framebufferTexture2D(B.READ_FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,Jt.__webglTexture,z),Ot?B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,sn.__webglTexture,pe,Ct+Kt):B.framebufferTexture2D(B.DRAW_FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,sn.__webglTexture,pe),z!==0?B.blitFramebuffer(He,Se,ie,Ee,it,Mt,ie,Ee,B.COLOR_BUFFER_BIT,B.NEAREST):Ot?B.copyTexSubImage3D(Wt,pe,it,Mt,Ct+Kt,He,Se,ie,Ee):B.copyTexSubImage2D(Wt,pe,it,Mt,He,Se,ie,Ee);Fe.bindFramebuffer(B.READ_FRAMEBUFFER,null),Fe.bindFramebuffer(B.DRAW_FRAMEBUFFER,null)}else Ot?w.isDataTexture||w.isData3DTexture?B.texSubImage3D(Wt,pe,it,Mt,Ct,ie,Ee,re,St,Qe,bt.data):H.isCompressedArrayTexture?B.compressedTexSubImage3D(Wt,pe,it,Mt,Ct,ie,Ee,re,St,bt.data):B.texSubImage3D(Wt,pe,it,Mt,Ct,ie,Ee,re,St,Qe,bt):w.isDataTexture?B.texSubImage2D(B.TEXTURE_2D,pe,it,Mt,ie,Ee,St,Qe,bt.data):w.isCompressedTexture?B.compressedTexSubImage2D(B.TEXTURE_2D,pe,it,Mt,bt.width,bt.height,St,bt.data):B.texSubImage2D(B.TEXTURE_2D,pe,it,Mt,ie,Ee,St,Qe,bt);B.pixelStorei(B.UNPACK_ROW_LENGTH,Ut),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,nn),B.pixelStorei(B.UNPACK_SKIP_PIXELS,Bt),B.pixelStorei(B.UNPACK_SKIP_ROWS,cn),B.pixelStorei(B.UNPACK_SKIP_IMAGES,Ge),pe===0&&H.generateMipmaps&&B.generateMipmap(Wt),Fe.unbindTexture()},this.copyTextureToTexture3D=function(w,H,X=null,$=null,z=0){return Os('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(w,H,X,$,z)},this.initRenderTarget=function(w){Le.get(w).__webglFramebuffer===void 0&&ot.setupRenderTarget(w)},this.initTexture=function(w){w.isCubeTexture?ot.setTextureCube(w,0):w.isData3DTexture?ot.setTexture3D(w,0):w.isDataArrayTexture||w.isCompressedArrayTexture?ot.setTexture2DArray(w,0):ot.setTexture2D(w,0),Fe.unbindTexture()},this.resetState=function(){C=0,L=0,P=null,Fe.reset(),Lt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return wi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Gt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Gt._getUnpackColorSpace()}}const Gh={type:"change"},dc={type:"start"},su={type:"end"},ra=new Ys,Wh=new Jn,N3=Math.cos(70*Ei.DEG2RAD),_n=new I,Bn=2*Math.PI,on={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Lo=1e-6;class ru extends K1{constructor(e,t=null){super(e,t),this.state=on.NONE,this.target=new I,this.cursor=new I,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=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.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Ti.ROTATE,MIDDLE:Ti.DOLLY,RIGHT:Ti.PAN},this.touches={ONE:Is.ROTATE,TWO:Is.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new I,this._lastQuaternion=new Vn,this._lastTargetPosition=new I,this._quat=new Vn().setFromUnitVectors(e.up,new I(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Pl,this._sphericalDelta=new Pl,this._scale=1,this._panOffset=new I,this._rotateStart=new et,this._rotateEnd=new et,this._rotateDelta=new et,this._panStart=new et,this._panEnd=new et,this._panDelta=new et,this._dollyStart=new et,this._dollyEnd=new et,this._dollyDelta=new et,this._dollyDirection=new I,this._mouse=new et,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=z3.bind(this),this._onPointerDown=I3.bind(this),this._onPointerUp=B3.bind(this),this._onContextMenu=X3.bind(this),this._onMouseWheel=V3.bind(this),this._onKeyDown=H3.bind(this),this._onTouchStart=G3.bind(this),this._onTouchMove=W3.bind(this),this._onMouseDown=O3.bind(this),this._onMouseMove=k3.bind(this),this._interceptControlDown=j3.bind(this),this._interceptControlUp=q3.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Gh),this.update(),this.state=on.NONE}update(e=null){const t=this.object.position;_n.copy(t).sub(this.target),_n.applyQuaternion(this._quat),this._spherical.setFromVector3(_n),this.autoRotate&&this.state===on.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,i=this.maxAzimuthAngle;isFinite(n)&&isFinite(i)&&(n<-Math.PI?n+=Bn:n>Math.PI&&(n-=Bn),i<-Math.PI?i+=Bn:i>Math.PI&&(i-=Bn),n<=i?this._spherical.theta=Math.max(n,Math.min(i,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+i)/2?Math.max(n,this._spherical.theta):Math.min(i,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=o!=this._spherical.radius}if(_n.setFromSpherical(this._spherical),_n.applyQuaternion(this._quatInverse),t.copy(this.target).add(_n),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){const a=_n.length();o=this._clampDistance(a*this._scale);const l=a-o;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),r=!!l}else if(this.object.isOrthographicCamera){const a=new I(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=l!==this.object.zoom;const c=new I(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=_n.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;o!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(ra.origin.copy(this.object.position),ra.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ra.direction))<N3?this.object.lookAt(this.target):(Wh.setFromNormalAndCoplanarPoint(this.object.up,this.target),ra.intersectPlane(Wh,this.target))))}else if(this.object.isOrthographicCamera){const o=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),o!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>Lo||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Lo||this._lastTargetPosition.distanceToSquared(this.target)>Lo?(this.dispatchEvent(Gh),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Bn/60*this.autoRotateSpeed*e:Bn/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){_n.setFromMatrixColumn(t,0),_n.multiplyScalar(-e),this._panOffset.add(_n)}_panUp(e,t){this.screenSpacePanning===!0?_n.setFromMatrixColumn(t,1):(_n.setFromMatrixColumn(t,0),_n.crossVectors(this.object.up,_n)),_n.multiplyScalar(e),this._panOffset.add(_n)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;_n.copy(i).sub(this.target);let r=_n.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/n.clientHeight,this.object.matrix),this._panUp(2*t*r/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),i=e-n.left,r=t-n.top,o=n.width,a=n.height;this._mouse.x=i/o*2-1,this._mouse.y=-(r/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Bn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Bn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._rotateStart.set(n,i)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panStart.set(n,i)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,r=Math.sqrt(n*n+i*i);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),r=.5*(e.pageY+n.y);this._rotateEnd.set(i,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Bn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Bn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panEnd.set(n,i)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,r=Math.sqrt(n*n+i*i);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const o=(e.pageX+t.x)*.5,a=(e.pageY+t.y)*.5;this._updateZoomParameters(o,a)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new et,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function I3(s){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(s.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(s)&&(this._addPointer(s),s.pointerType==="touch"?this._onTouchStart(s):this._onMouseDown(s)))}function z3(s){this.enabled!==!1&&(s.pointerType==="touch"?this._onTouchMove(s):this._onMouseMove(s))}function B3(s){switch(this._removePointer(s),this._pointers.length){case 0:this.domElement.releasePointerCapture(s.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(su),this.state=on.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function O3(s){let e;switch(s.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case Ti.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(s),this.state=on.DOLLY;break;case Ti.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=on.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=on.ROTATE}break;case Ti.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=on.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=on.PAN}break;default:this.state=on.NONE}this.state!==on.NONE&&this.dispatchEvent(dc)}function k3(s){switch(this.state){case on.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(s);break;case on.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(s);break;case on.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(s);break}}function V3(s){this.enabled===!1||this.enableZoom===!1||this.state!==on.NONE||(s.preventDefault(),this.dispatchEvent(dc),this._handleMouseWheel(this._customWheelEvent(s)),this.dispatchEvent(su))}function H3(s){this.enabled!==!1&&this._handleKeyDown(s)}function G3(s){switch(this._trackPointer(s),this._pointers.length){case 1:switch(this.touches.ONE){case Is.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(s),this.state=on.TOUCH_ROTATE;break;case Is.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(s),this.state=on.TOUCH_PAN;break;default:this.state=on.NONE}break;case 2:switch(this.touches.TWO){case Is.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(s),this.state=on.TOUCH_DOLLY_PAN;break;case Is.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(s),this.state=on.TOUCH_DOLLY_ROTATE;break;default:this.state=on.NONE}break;default:this.state=on.NONE}this.state!==on.NONE&&this.dispatchEvent(dc)}function W3(s){switch(this._trackPointer(s),this.state){case on.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(s),this.update();break;case on.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(s),this.update();break;case on.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(s),this.update();break;case on.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(s),this.update();break;default:this.state=on.NONE}}function X3(s){this.enabled!==!1&&s.preventDefault()}function j3(s){s.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function q3(s){s.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var $3=Object.defineProperty,Y3=(s,e,t)=>e in s?$3(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Zt=(s,e,t)=>Y3(s,typeof e!="symbol"?e+"":e,t);const au=(s,e)=>{const[t,n]=e.split("-");return Object.assign(s.style,{left:n==="left"?"0":n==="center"?"50%":"",right:n==="right"?"0":"",top:t==="top"?"0":t==="bottom"?"":"50%",bottom:t==="bottom"?"0":"",transform:`${n==="center"?"translateX(-50%)":""} ${t==="center"?"translateY(-50%)":""}`}),e},J3=({placement:s,size:e,offset:t,id:n,className:i})=>{const r=document.createElement("div"),{top:o,left:a,right:l,bottom:c}=t;return Object.assign(r.style,{id:n,position:"absolute",zIndex:"1000",height:`${e}px`,width:`${e}px`,margin:`${o}px ${l}px ${c}px ${a}px`,borderRadius:"100%"}),au(r,s),n&&(r.id=n),i&&(r.className=i),r},K3=s=>{const e=typeof s=="string"?document.querySelector(s):s;if(!e)throw Error("Invalid DOM element");return e};function Ul(s,e,t){return Math.max(e,Math.min(t,s))}const Z3=[["x",0,3],["y",1,4],["z",2,5]],Xh=new I;function jh({isSphere:s},e,t){s&&(Xh.set(0,0,1).applyQuaternion(t.quaternion),Z3.forEach(([n,i,r])=>{const o=Xh[n];let a=e[i],l=a.userData.opacity;a.material.opacity=Ul(o>=0?l:l/2,0,1),a=e[r],l=a.userData.opacity,a.material.opacity=Ul(o>=0?l/2:l,0,1)}))}const Q3=(s,e,t=10)=>Math.abs(s.clientX-e.x)<t&&Math.abs(s.clientY-e.y)<t,qh=new Y1,$h=new et,Yh=(s,e,t,n)=>{$h.set((s.clientX-e.left)/e.width*2-1,-((s.clientY-e.top)/e.height)*2+1),qh.setFromCamera($h,t);const i=qh.intersectObjects(n,!1),r=i.length?i[0]:null;return!r||!r.object.visible?null:r},Po=1e-6,e4=2*Math.PI,ou=["x","y","z"],br=[...ou,"nx","ny","nz"],t4=["x","z","y","nx","nz","ny"],n4=["z","x","y","nz","nx","ny"],Nl="Right",ba="Top",Il="Front",zl="Left",Sa="Bottom",Bl="Back",i4=[Nl,ba,Il,zl,Sa,Bl].map(s=>s.toLocaleLowerCase()),lu=1.3,Jh=(s,e=!0)=>{const{material:t,userData:n}=s,{color:i,opacity:r}=e?n.hover:n;t.color.set(i),t.opacity=r},ns=s=>JSON.parse(JSON.stringify(s)),s4=s=>{const e=s.type||"sphere",t=e==="sphere",n=s.resolution||t?64:128,i=ln.DEFAULT_UP,r=i.z===1,o=i.x===1,{container:a}=s;s.container=void 0,s=JSON.parse(JSON.stringify(s)),s.container=a;const l=r?t4:o?n4:br;i4.forEach((u,h)=>{s[u]&&(s[l[h]]=s[u])});const c={enabled:!0,color:16777215,opacity:1,scale:.7,labelColor:2236962,line:!1,border:{size:0,color:14540253},hover:{color:t?16777215:9688043,labelColor:2236962,opacity:1,scale:.7,border:{size:0,color:14540253}}},d={line:!1,scale:t?.45:.7,hover:{scale:t?.5:.7}},m={type:e,container:document.body,size:128,placement:"top-right",resolution:n,lineWidth:4,radius:t?1:.2,smoothness:18,animated:!0,speed:1,background:{enabled:!0,color:t?16777215:14739180,opacity:t?0:1,hover:{color:t?16777215:14739180,opacity:t?.2:1}},font:{family:"sans-serif",weight:900},offset:{top:10,left:10,bottom:10,right:10},corners:{enabled:!t,color:t?15915362:16777215,opacity:1,scale:t?.15:.2,radius:1,smoothness:18,hover:{color:t?16777215:9688043,opacity:1,scale:t?.2:.225}},edges:{enabled:!t,color:t?15915362:16777215,opacity:t?1:0,radius:t?1:.125,smoothness:18,scale:t?.15:1,hover:{color:t?16777215:9688043,opacity:1,scale:t?.2:1}},x:{...ns(c),...t?{label:"X",color:16725587,line:!0}:{label:o?ba:Nl}},y:{...ns(c),...t?{label:"Y",color:9100032,line:!0}:{label:r||o?Il:ba}},z:{...ns(c),...t?{label:"Z",color:2920447,line:!0}:{label:r?ba:o?Nl:Il}},nx:{...ns(d),label:t?"":o?Sa:zl},ny:{...ns(d),label:t?"":r||o?Bl:Sa},nz:{...ns(d),label:t?"":r?Sa:o?zl:Bl}};return Ol(s,m),ou.forEach(u=>Ol(s[`n${u}`],ns(s[u]))),{...s,isSphere:t}};function Ol(s,...e){if(s instanceof HTMLElement||typeof s!="object"||s===null)return s;for(const t of e)for(const n in t)n!=="container"&&n in t&&(s[n]===void 0?s[n]=t[n]:typeof t[n]=="object"&&!Array.isArray(t[n])&&(s[n]=Ol(s[n]||{},t[n])));return s}const r4=(s,e=2)=>{const t=new Tt,n=e*2,{isSphere:i,resolution:r,radius:o,font:a,corners:l,edges:c}=s,d=br.map(L=>({...s[L],radius:o}));i&&l.enabled&&d.push(l),i&&c.enabled&&d.push(c);const m=document.createElement("canvas"),u=m.getContext("2d");m.width=r*2+n*2,m.height=r*d.length+n*d.length;const[h,g]=U(d,r,a);d.forEach(({radius:L,label:P,color:E,labelColor:A,border:D,hover:{color:O,labelColor:V,border:Q}},se)=>{const G=r*se+se*n+e;S(e,G,e,r,L,P,D,E,A),S(r+e*3,G,e,r,L,P,Q??D,O??E,V??A)});const _=d.length,p=e/(r*2),f=e/(r*6),x=1/_,y=new u1(m);return y.repeat.set(.5-2*p,x-2*f),y.offset.set(p,1-f),Object.assign(y,{colorSpace:qt,wrapS:di,wrapT:di,userData:{offsetX:p,offsetY:f,cellHeight:x}}),y;function S(L,P,E,A,D,O,V,Q,se){if(D=D*(A/2),Q!=null&&Q!==""&&(G(),u.fillStyle=t.set(Q).getStyle(),u.fill()),V&&V.size){const ce=V.size*A/2;L+=ce,P+=ce,A-=V.size*A,D=Math.max(0,D-ce),G(),u.strokeStyle=t.set(V.color).getStyle(),u.lineWidth=V.size*A,u.stroke()}O&&C(u,L+A/2,P+(A+E)/2,O,t.set(se).getStyle());function G(){u.beginPath(),u.moveTo(L+D,P),u.lineTo(L+A-D,P),u.arcTo(L+A,P,L+A,P+D,D),u.lineTo(L+A,P+A-D),u.arcTo(L+A,P+A,L+A-D,P+A,D),u.lineTo(L+D,P+A),u.arcTo(L,P+A,L,P+A-D,D),u.lineTo(L,P+D),u.arcTo(L,P,L+D,P,D),u.closePath()}}function U(L,P,E){const A=[...L].sort((De,ye)=>{var _e,ae;return(((_e=De.label)==null?void 0:_e.length)||0)-(((ae=ye.label)==null?void 0:ae.length)||0)}).pop().label,{family:D,weight:O}=E,V=i?Math.sqrt(Math.pow(P*.7,2)/2):P;let Q=V,se=0,G=0;do{u.font=`${O} ${Q}px ${D}`;const De=u.measureText(A);se=De.width,G=De.fontBoundingBoxDescent,Q--}while(se>V&&Q>0);const ce=V/G,Z=Math.min(V/se,ce),ge=Math.floor(Q*Z);return[`${O} ${ge}px ${D}`,ce]}function C(L,P,E,A,D){L.font=h,L.textAlign="center",L.textBaseline="middle",L.fillStyle=D,L.fillText(A,P,E+(i?g:0))}},a4=(s,e)=>s.offset.x=(e?.5:0)+s.userData.offsetX,fc=(s,e)=>{const{offset:t,userData:{offsetY:n,cellHeight:i}}=s;t.y=1-(e+1)*i+n};function pc(s,e,t=2,n=2){const i=t/2-s,r=n/2-s,o=s/t,a=(t-s)/t,l=s/n,c=(n-s)/n,d=[i,r,0,-i,r,0,-i,-r,0,i,-r,0],m=[a,c,o,c,o,l,a,l],u=[3*(e+1)+3,3*(e+1)+4,e+4,e+5,2*(e+1)+4,2,1,2*(e+1)+3,3,4*(e+1)+3,4,0],h=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11].map(C=>u[C]);let g,_,p,f,x,y,S,U;for(let C=0;C<4;C++){f=C<1||C>2?i:-i,x=C<2?r:-r,y=C<1||C>2?a:o,S=C<2?c:l;for(let L=0;L<=e;L++)g=Math.PI/2*(C+L/e),_=Math.cos(g),p=Math.sin(g),d.push(f+s*_,x+s*p,0),m.push(y+o*_,S+l*p),L<e&&(U=(e+1)*C+L+4,h.push(C,U,U+1))}return new hn().setIndex(new mn(new Uint32Array(h),1)).setAttribute("position",new mn(new Float32Array(d),3)).setAttribute("uv",new mn(new Float32Array(m),2))}const o4=(s,e)=>{const t=new I,{isSphere:n,radius:i,smoothness:r}=s,o=pc(i,r);return br.map((a,l)=>{const c=l<3,d=br[l],m=l?e.clone():e;fc(m,l);const{enabled:u,scale:h,opacity:g,hover:_}=s[d],p={map:m,opacity:g,transparent:!0},f=n?new ec(new za(p)):new zt(o,new qi(p)),x=c?d:d[1];return f.position[x]=(c?1:-1)*(n?lu:1),n||f.lookAt(t.copy(f.position).multiplyScalar(1.7)),f.scale.setScalar(h),f.renderOrder=1,f.visible=u,f.userData={scale:h,opacity:g,hover:_},f})},l4=(s,e)=>{const{isSphere:t,corners:n}=s;if(!n.enabled)return[];const{color:i,opacity:r,scale:o,radius:a,smoothness:l,hover:c}=n,d=t?null:pc(a,l),m={transparent:!0,opacity:r},u=[1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1].map(g=>g*.85),h=new I;return Array(u.length/3).fill(0).map((g,_)=>{if(t){const x=e.clone();fc(x,6),m.map=x}else m.color=i;const p=t?new ec(new za(m)):new zt(d,new qi(m)),f=_*3;return p.position.set(u[f],u[f+1],u[f+2]),t&&p.position.normalize().multiplyScalar(1.7),p.scale.setScalar(o),p.lookAt(h.copy(p.position).multiplyScalar(2)),p.renderOrder=1,p.userData={color:i,opacity:r,scale:o,hover:c},p})},c4=(s,e,t)=>{const{isSphere:n,edges:i}=s;if(!i.enabled)return[];const{color:r,opacity:o,scale:a,hover:l,radius:c,smoothness:d}=i,m=n?null:pc(c,d,1.2,.25),u={transparent:!0,opacity:o},h=[0,1,1,0,-1,1,1,0,1,-1,0,1,0,1,-1,0,-1,-1,1,0,-1,-1,0,-1,1,1,0,1,-1,0,-1,1,0,-1,-1,0].map(p=>p*.925),g=new I,_=new I(0,1,0);return Array(h.length/3).fill(0).map((p,f)=>{if(n){const S=e.clone();fc(S,t),u.map=S}else u.color=r;const x=n?new ec(new za(u)):new zt(m,new qi(u)),y=f*3;return x.position.set(h[y],h[y+1],h[y+2]),n&&x.position.normalize().multiplyScalar(1.7),x.scale.setScalar(a),x.up.copy(_),x.lookAt(g.copy(x.position).multiplyScalar(2)),!n&&!x.position.y&&(x.rotation.z=Math.PI/2),x.renderOrder=1,x.userData={color:r,opacity:o,scale:a,hover:l},x})};function h4(s,e=!1){const t=s[0].index!==null,n=new Set(Object.keys(s[0].attributes)),i=new Set(Object.keys(s[0].morphAttributes)),r={},o={},a=s[0].morphTargetsRelative,l=new hn;let c=0;for(let d=0;d<s.length;++d){const m=s[d];let u=0;if(t!==(m.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const h in m.attributes){if(!n.has(h))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+'. All geometries must have compatible attributes; make sure "'+h+'" attribute exists among all geometries, or in none of them.'),null;r[h]===void 0&&(r[h]=[]),r[h].push(m.attributes[h]),u++}if(u!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". Make sure all geometries have the same number of attributes."),null;if(a!==m.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const h in m.morphAttributes){if(!i.has(h))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". .morphAttributes must be consistent throughout all geometries."),null;o[h]===void 0&&(o[h]=[]),o[h].push(m.morphAttributes[h])}if(e){let h;if(t)h=m.index.count;else if(m.attributes.position!==void 0)h=m.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". The geometry must have either an index or a position attribute"),null;l.addGroup(c,h,d),c+=h}}if(t){let d=0;const m=[];for(let u=0;u<s.length;++u){const h=s[u].index;for(let g=0;g<h.count;++g)m.push(h.getX(g)+d);d+=s[u].attributes.position.count}l.setIndex(m)}for(const d in r){const m=Kh(r[d]);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+d+" attribute."),null;l.setAttribute(d,m)}for(const d in o){const m=o[d][0].length;if(m===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[d]=[];for(let u=0;u<m;++u){const h=[];for(let _=0;_<o[d].length;++_)h.push(o[d][_][u]);const g=Kh(h);if(!g)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+d+" morphAttribute."),null;l.morphAttributes[d].push(g)}}return l}function Kh(s){let e,t,n,i=-1,r=0;for(let c=0;c<s.length;++c){const d=s[c];if(e===void 0&&(e=d.array.constructor),e!==d.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=d.itemSize),t!==d.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(n===void 0&&(n=d.normalized),n!==d.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=d.gpuType),i!==d.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=d.count*t}const o=new e(r),a=new mn(o,t,n);let l=0;for(let c=0;c<s.length;++c){const d=s[c];if(d.isInterleavedBufferAttribute){const m=l/t;for(let u=0,h=d.count;u<h;u++)for(let g=0;g<t;g++){const _=d.getComponent(u,g);a.setComponent(u+m,g,_)}}else o.set(d.array,l);l+=d.count*t}return i!==void 0&&(a.gpuType=i),a}const u4=(s,e)=>{const{isSphere:t,background:{enabled:n,color:i,opacity:r,hover:o}}=e;let a;const l=new qi({color:i,side:In,opacity:r,transparent:!0,depthWrite:!1});if(!n)return null;if(t)a=new zt(new Oa(1.8,64,64),l);else{let c;s.forEach(d=>{const m=d.scale.x;d.scale.setScalar(.9),d.updateMatrix();const u=d.geometry.clone();u.applyMatrix4(d.matrix),c=c?h4([c,u]):u,d.scale.setScalar(m)}),a=new zt(c,l)}return a.userData={color:i,opacity:r,hover:o},a},Zh=new Fn,aa=new I;class cu extends j1{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new It(e,3)),this.setAttribute("uv",new It(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Dl(t,6,1);return this.setAttribute("instanceStart",new pi(n,3,0)),this.setAttribute("instanceEnd",new pi(n,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Dl(t,6,1);return this.setAttribute("instanceColorStart",new pi(n,3,0)),this.setAttribute("instanceColorEnd",new pi(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new T1(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Fn);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Zh.setFromBufferAttribute(t),this.boundingBox.union(Zh))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Fi),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)aa.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(aa)),aa.fromBufferAttribute(t,r),i=Math.max(i,n.distanceToSquared(aa));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}Ke.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new et(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};kn.line={uniforms:Ql.merge([Ke.common,Ke.fog,Ke.line]),vertexShader:`
|
|
3827
|
+
}`;class D3{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new Tn,r=e.properties.get(i);r.__webglTexture=t.texture,(t.depthNear!==n.depthNear||t.depthFar!==n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new Li({vertexShader:C3,fragmentShader:R3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new zt(new Di(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class L3 extends ds{constructor(e,t){super();const n=this;let i=null,r=1,o=null,a="local-floor",l=1,c=null,d=null,m=null,u=null,h=null,g=null;const _=new D3,p=t.getContextAttributes();let f=null,v=null;const b=[],S=[],F=new et;let C=null;const R=new bn;R.viewport=new Xt;const P=new bn;P.viewport=new Xt;const A=[R,P],E=new q1;let L=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(j){let q=b[j];return q===void 0&&(q=new po,b[j]=q),q.getTargetRaySpace()},this.getControllerGrip=function(j){let q=b[j];return q===void 0&&(q=new po,b[j]=q),q.getGripSpace()},this.getHand=function(j){let q=b[j];return q===void 0&&(q=new po,b[j]=q),q.getHandSpace()};function H(j){const q=S.indexOf(j.inputSource);if(q===-1)return;const ne=b[q];ne!==void 0&&(ne.update(j.inputSource,j.frame,c||o),ne.dispatchEvent({type:j.type,data:j.inputSource}))}function Q(){i.removeEventListener("select",H),i.removeEventListener("selectstart",H),i.removeEventListener("selectend",H),i.removeEventListener("squeeze",H),i.removeEventListener("squeezestart",H),i.removeEventListener("squeezeend",H),i.removeEventListener("end",Q),i.removeEventListener("inputsourceschange",ae);for(let j=0;j<b.length;j++){const q=S[j];q!==null&&(S[j]=null,b[j].disconnect(q))}L=null,B=null,_.reset(),e.setRenderTarget(f),h=null,u=null,m=null,i=null,v=null,se.stop(),n.isPresenting=!1,e.setPixelRatio(C),e.setSize(F.width,F.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(j){r=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(j){a=j,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(j){c=j},this.getBaseLayer=function(){return u!==null?u:h},this.getBinding=function(){return m},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(j){if(i=j,i!==null){if(f=e.getRenderTarget(),i.addEventListener("select",H),i.addEventListener("selectstart",H),i.addEventListener("selectend",H),i.addEventListener("squeeze",H),i.addEventListener("squeezestart",H),i.addEventListener("squeezeend",H),i.addEventListener("end",Q),i.addEventListener("inputsourceschange",ae),p.xrCompatible!==!0&&await t.makeXRCompatible(),C=e.getPixelRatio(),e.getSize(F),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let ne=null,ee=null,ue=null;p.depth&&(ue=p.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ne=p.stencil?xr:yr,ee=p.stencil?vr:hs);const $={colorFormat:t.RGBA8,depthFormat:ue,scaleFactor:r};m=new XRWebGLBinding(i,t),u=m.createProjectionLayer($),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),v=new us(u.textureWidth,u.textureHeight,{format:Zn,type:mi,depthTexture:new H0(u.textureWidth,u.textureHeight,ee,void 0,void 0,void 0,void 0,void 0,void 0,ne),stencilBuffer:p.stencil,colorSpace:e.outputColorSpace,samples:p.antialias?4:0,resolveDepthBuffer:u.ignoreDepthValues===!1,resolveStencilBuffer:u.ignoreDepthValues===!1})}else{const ne={antialias:p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,t,ne),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),v=new us(h.framebufferWidth,h.framebufferHeight,{format:Zn,type:mi,colorSpace:e.outputColorSpace,stencilBuffer:p.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}v.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),se.setContext(i),se.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function ae(j){for(let q=0;q<j.removed.length;q++){const ne=j.removed[q],ee=S.indexOf(ne);ee>=0&&(S[ee]=null,b[ee].disconnect(ne))}for(let q=0;q<j.added.length;q++){const ne=j.added[q];let ee=S.indexOf(ne);if(ee===-1){for(let $=0;$<b.length;$++)if($>=S.length){S.push(ne),ee=$;break}else if(S[$]===null){S[$]=ne,ee=$;break}if(ee===-1)break}const ue=b[ee];ue&&ue.connect(ne)}}const G=new I,le=new I;function Z(j,q,ne){G.setFromMatrixPosition(q.matrixWorld),le.setFromMatrixPosition(ne.matrixWorld);const ee=G.distanceTo(le),ue=q.projectionMatrix.elements,$=ne.projectionMatrix.elements,pe=ue[14]/(ue[10]-1),Ce=ue[14]/(ue[10]+1),Ke=(ue[9]+1)/ue[5],He=(ue[9]-1)/ue[5],O=(ue[8]-1)/ue[0],_t=($[8]+1)/$[0],dt=pe*O,at=pe*_t,Fe=ee/(-O+_t),tt=Fe*-O;if(q.matrixWorld.decompose(j.position,j.quaternion,j.scale),j.translateX(tt),j.translateZ(Fe),j.matrixWorld.compose(j.position,j.quaternion,j.scale),j.matrixWorldInverse.copy(j.matrixWorld).invert(),ue[10]===-1)j.projectionMatrix.copy(q.projectionMatrix),j.projectionMatrixInverse.copy(q.projectionMatrixInverse);else{const Le=pe+Fe,ot=Ce+Fe,jt=dt-tt,k=at+(ee-tt),T=Ke*Ce/ot*Le,oe=He*Ce/ot*Le;j.projectionMatrix.makePerspective(jt,k,T,oe,Le,ot),j.projectionMatrixInverse.copy(j.projectionMatrix).invert()}}function ve(j,q){q===null?j.matrixWorld.copy(j.matrix):j.matrixWorld.multiplyMatrices(q.matrixWorld,j.matrix),j.matrixWorldInverse.copy(j.matrixWorld).invert()}this.updateCamera=function(j){if(i===null)return;let q=j.near,ne=j.far;_.texture!==null&&(_.depthNear>0&&(q=_.depthNear),_.depthFar>0&&(ne=_.depthFar)),E.near=P.near=R.near=q,E.far=P.far=R.far=ne,(L!==E.near||B!==E.far)&&(i.updateRenderState({depthNear:E.near,depthFar:E.far}),L=E.near,B=E.far),R.layers.mask=j.layers.mask|2,P.layers.mask=j.layers.mask|4,E.layers.mask=R.layers.mask|P.layers.mask;const ee=j.parent,ue=E.cameras;ve(E,ee);for(let $=0;$<ue.length;$++)ve(ue[$],ee);ue.length===2?Z(E,R,P):E.projectionMatrix.copy(R.projectionMatrix),Ee(j,E,ee)};function Ee(j,q,ne){ne===null?j.matrix.copy(q.matrixWorld):(j.matrix.copy(ne.matrixWorld),j.matrix.invert(),j.matrix.multiply(q.matrixWorld)),j.matrix.decompose(j.position,j.quaternion,j.scale),j.updateMatrixWorld(!0),j.projectionMatrix.copy(q.projectionMatrix),j.projectionMatrixInverse.copy(q.projectionMatrixInverse),j.isPerspectiveCamera&&(j.fov=js*2*Math.atan(1/j.projectionMatrix.elements[5]),j.zoom=1)}this.getCamera=function(){return E},this.getFoveation=function(){if(!(u===null&&h===null))return l},this.setFoveation=function(j){l=j,u!==null&&(u.fixedFoveation=j),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=j)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(E)};let be=null;function ge(j,q){if(d=q.getViewerPose(c||o),g=q,d!==null){const ne=d.views;h!==null&&(e.setRenderTargetFramebuffer(v,h.framebuffer),e.setRenderTarget(v));let ee=!1;ne.length!==E.cameras.length&&(E.cameras.length=0,ee=!0);for(let pe=0;pe<ne.length;pe++){const Ce=ne[pe];let Ke=null;if(h!==null)Ke=h.getViewport(Ce);else{const O=m.getViewSubImage(u,Ce);Ke=O.viewport,pe===0&&(e.setRenderTargetTextures(v,O.colorTexture,O.depthStencilTexture),e.setRenderTarget(v))}let He=A[pe];He===void 0&&(He=new bn,He.layers.enable(pe),He.viewport=new Xt,A[pe]=He),He.matrix.fromArray(Ce.transform.matrix),He.matrix.decompose(He.position,He.quaternion,He.scale),He.projectionMatrix.fromArray(Ce.projectionMatrix),He.projectionMatrixInverse.copy(He.projectionMatrix).invert(),He.viewport.set(Ke.x,Ke.y,Ke.width,Ke.height),pe===0&&(E.matrix.copy(He.matrix),E.matrix.decompose(E.position,E.quaternion,E.scale)),ee===!0&&E.cameras.push(He)}const ue=i.enabledFeatures;if(ue&&ue.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&m){const pe=m.getDepthInformation(ne[0]);pe&&pe.isValid&&pe.texture&&_.init(e,pe,i.renderState)}}for(let ne=0;ne<b.length;ne++){const ee=S[ne],ue=b[ne];ee!==null&&ue!==void 0&&ue.update(ee,q,c||o)}be&&be(j,q),q.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:q}),g=null}const se=new Z0;se.setAnimationLoop(ge),this.setAnimationLoop=function(j){be=j},this.dispose=function(){}}}const ts=new Sn,P3=new Et;function F3(s,e){function t(p,f){p.matrixAutoUpdate===!0&&p.updateMatrix(),f.value.copy(p.matrix)}function n(p,f){f.color.getRGB(p.fogColor.value,N0(s)),f.isFog?(p.fogNear.value=f.near,p.fogFar.value=f.far):f.isFogExp2&&(p.fogDensity.value=f.density)}function i(p,f,v,b,S){f.isMeshBasicMaterial||f.isMeshLambertMaterial?r(p,f):f.isMeshToonMaterial?(r(p,f),m(p,f)):f.isMeshPhongMaterial?(r(p,f),d(p,f)):f.isMeshStandardMaterial?(r(p,f),u(p,f),f.isMeshPhysicalMaterial&&h(p,f,S)):f.isMeshMatcapMaterial?(r(p,f),g(p,f)):f.isMeshDepthMaterial?r(p,f):f.isMeshDistanceMaterial?(r(p,f),_(p,f)):f.isMeshNormalMaterial?r(p,f):f.isLineBasicMaterial?(o(p,f),f.isLineDashedMaterial&&a(p,f)):f.isPointsMaterial?l(p,f,v,b):f.isSpriteMaterial?c(p,f):f.isShadowMaterial?(p.color.value.copy(f.color),p.opacity.value=f.opacity):f.isShaderMaterial&&(f.uniformsNeedUpdate=!1)}function r(p,f){p.opacity.value=f.opacity,f.color&&p.diffuse.value.copy(f.color),f.emissive&&p.emissive.value.copy(f.emissive).multiplyScalar(f.emissiveIntensity),f.map&&(p.map.value=f.map,t(f.map,p.mapTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.bumpMap&&(p.bumpMap.value=f.bumpMap,t(f.bumpMap,p.bumpMapTransform),p.bumpScale.value=f.bumpScale,f.side===In&&(p.bumpScale.value*=-1)),f.normalMap&&(p.normalMap.value=f.normalMap,t(f.normalMap,p.normalMapTransform),p.normalScale.value.copy(f.normalScale),f.side===In&&p.normalScale.value.negate()),f.displacementMap&&(p.displacementMap.value=f.displacementMap,t(f.displacementMap,p.displacementMapTransform),p.displacementScale.value=f.displacementScale,p.displacementBias.value=f.displacementBias),f.emissiveMap&&(p.emissiveMap.value=f.emissiveMap,t(f.emissiveMap,p.emissiveMapTransform)),f.specularMap&&(p.specularMap.value=f.specularMap,t(f.specularMap,p.specularMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest);const v=e.get(f),b=v.envMap,S=v.envMapRotation;b&&(p.envMap.value=b,ts.copy(S),ts.x*=-1,ts.y*=-1,ts.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(ts.y*=-1,ts.z*=-1),p.envMapRotation.value.setFromMatrix4(P3.makeRotationFromEuler(ts)),p.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=f.reflectivity,p.ior.value=f.ior,p.refractionRatio.value=f.refractionRatio),f.lightMap&&(p.lightMap.value=f.lightMap,p.lightMapIntensity.value=f.lightMapIntensity,t(f.lightMap,p.lightMapTransform)),f.aoMap&&(p.aoMap.value=f.aoMap,p.aoMapIntensity.value=f.aoMapIntensity,t(f.aoMap,p.aoMapTransform))}function o(p,f){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,f.map&&(p.map.value=f.map,t(f.map,p.mapTransform))}function a(p,f){p.dashSize.value=f.dashSize,p.totalSize.value=f.dashSize+f.gapSize,p.scale.value=f.scale}function l(p,f,v,b){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,p.size.value=f.size*v,p.scale.value=b*.5,f.map&&(p.map.value=f.map,t(f.map,p.uvTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest)}function c(p,f){p.diffuse.value.copy(f.color),p.opacity.value=f.opacity,p.rotation.value=f.rotation,f.map&&(p.map.value=f.map,t(f.map,p.mapTransform)),f.alphaMap&&(p.alphaMap.value=f.alphaMap,t(f.alphaMap,p.alphaMapTransform)),f.alphaTest>0&&(p.alphaTest.value=f.alphaTest)}function d(p,f){p.specular.value.copy(f.specular),p.shininess.value=Math.max(f.shininess,1e-4)}function m(p,f){f.gradientMap&&(p.gradientMap.value=f.gradientMap)}function u(p,f){p.metalness.value=f.metalness,f.metalnessMap&&(p.metalnessMap.value=f.metalnessMap,t(f.metalnessMap,p.metalnessMapTransform)),p.roughness.value=f.roughness,f.roughnessMap&&(p.roughnessMap.value=f.roughnessMap,t(f.roughnessMap,p.roughnessMapTransform)),f.envMap&&(p.envMapIntensity.value=f.envMapIntensity)}function h(p,f,v){p.ior.value=f.ior,f.sheen>0&&(p.sheenColor.value.copy(f.sheenColor).multiplyScalar(f.sheen),p.sheenRoughness.value=f.sheenRoughness,f.sheenColorMap&&(p.sheenColorMap.value=f.sheenColorMap,t(f.sheenColorMap,p.sheenColorMapTransform)),f.sheenRoughnessMap&&(p.sheenRoughnessMap.value=f.sheenRoughnessMap,t(f.sheenRoughnessMap,p.sheenRoughnessMapTransform))),f.clearcoat>0&&(p.clearcoat.value=f.clearcoat,p.clearcoatRoughness.value=f.clearcoatRoughness,f.clearcoatMap&&(p.clearcoatMap.value=f.clearcoatMap,t(f.clearcoatMap,p.clearcoatMapTransform)),f.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=f.clearcoatRoughnessMap,t(f.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),f.clearcoatNormalMap&&(p.clearcoatNormalMap.value=f.clearcoatNormalMap,t(f.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(f.clearcoatNormalScale),f.side===In&&p.clearcoatNormalScale.value.negate())),f.dispersion>0&&(p.dispersion.value=f.dispersion),f.iridescence>0&&(p.iridescence.value=f.iridescence,p.iridescenceIOR.value=f.iridescenceIOR,p.iridescenceThicknessMinimum.value=f.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=f.iridescenceThicknessRange[1],f.iridescenceMap&&(p.iridescenceMap.value=f.iridescenceMap,t(f.iridescenceMap,p.iridescenceMapTransform)),f.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=f.iridescenceThicknessMap,t(f.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),f.transmission>0&&(p.transmission.value=f.transmission,p.transmissionSamplerMap.value=v.texture,p.transmissionSamplerSize.value.set(v.width,v.height),f.transmissionMap&&(p.transmissionMap.value=f.transmissionMap,t(f.transmissionMap,p.transmissionMapTransform)),p.thickness.value=f.thickness,f.thicknessMap&&(p.thicknessMap.value=f.thicknessMap,t(f.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=f.attenuationDistance,p.attenuationColor.value.copy(f.attenuationColor)),f.anisotropy>0&&(p.anisotropyVector.value.set(f.anisotropy*Math.cos(f.anisotropyRotation),f.anisotropy*Math.sin(f.anisotropyRotation)),f.anisotropyMap&&(p.anisotropyMap.value=f.anisotropyMap,t(f.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=f.specularIntensity,p.specularColor.value.copy(f.specularColor),f.specularColorMap&&(p.specularColorMap.value=f.specularColorMap,t(f.specularColorMap,p.specularColorMapTransform)),f.specularIntensityMap&&(p.specularIntensityMap.value=f.specularIntensityMap,t(f.specularIntensityMap,p.specularIntensityMapTransform))}function g(p,f){f.matcap&&(p.matcap.value=f.matcap)}function _(p,f){const v=e.get(f).light;p.referencePosition.value.setFromMatrixPosition(v.matrixWorld),p.nearDistance.value=v.shadow.camera.near,p.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function N3(s,e,t,n){let i={},r={},o=[];const a=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,b){const S=b.program;n.uniformBlockBinding(v,S)}function c(v,b){let S=i[v.id];S===void 0&&(g(v),S=d(v),i[v.id]=S,v.addEventListener("dispose",p));const F=b.program;n.updateUBOMapping(v,F);const C=e.render.frame;r[v.id]!==C&&(u(v),r[v.id]=C)}function d(v){const b=m();v.__bindingPointIndex=b;const S=s.createBuffer(),F=v.__size,C=v.usage;return s.bindBuffer(s.UNIFORM_BUFFER,S),s.bufferData(s.UNIFORM_BUFFER,F,C),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,b,S),S}function m(){for(let v=0;v<a;v++)if(o.indexOf(v)===-1)return o.push(v),v;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function u(v){const b=i[v.id],S=v.uniforms,F=v.__cache;s.bindBuffer(s.UNIFORM_BUFFER,b);for(let C=0,R=S.length;C<R;C++){const P=Array.isArray(S[C])?S[C]:[S[C]];for(let A=0,E=P.length;A<E;A++){const L=P[A];if(h(L,C,A,F)===!0){const B=L.__offset,H=Array.isArray(L.value)?L.value:[L.value];let Q=0;for(let ae=0;ae<H.length;ae++){const G=H[ae],le=_(G);typeof G=="number"||typeof G=="boolean"?(L.__data[0]=G,s.bufferSubData(s.UNIFORM_BUFFER,B+Q,L.__data)):G.isMatrix3?(L.__data[0]=G.elements[0],L.__data[1]=G.elements[1],L.__data[2]=G.elements[2],L.__data[3]=0,L.__data[4]=G.elements[3],L.__data[5]=G.elements[4],L.__data[6]=G.elements[5],L.__data[7]=0,L.__data[8]=G.elements[6],L.__data[9]=G.elements[7],L.__data[10]=G.elements[8],L.__data[11]=0):(G.toArray(L.__data,Q),Q+=le.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,B,L.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function h(v,b,S,F){const C=v.value,R=b+"_"+S;if(F[R]===void 0)return typeof C=="number"||typeof C=="boolean"?F[R]=C:F[R]=C.clone(),!0;{const P=F[R];if(typeof C=="number"||typeof C=="boolean"){if(P!==C)return F[R]=C,!0}else if(P.equals(C)===!1)return P.copy(C),!0}return!1}function g(v){const b=v.uniforms;let S=0;const F=16;for(let R=0,P=b.length;R<P;R++){const A=Array.isArray(b[R])?b[R]:[b[R]];for(let E=0,L=A.length;E<L;E++){const B=A[E],H=Array.isArray(B.value)?B.value:[B.value];for(let Q=0,ae=H.length;Q<ae;Q++){const G=H[Q],le=_(G),Z=S%F,ve=Z%le.boundary,Ee=Z+ve;S+=ve,Ee!==0&&F-Ee<le.storage&&(S+=F-Ee),B.__data=new Float32Array(le.storage/Float32Array.BYTES_PER_ELEMENT),B.__offset=S,S+=le.storage}}}const C=S%F;return C>0&&(S+=F-C),v.__size=S,v.__cache={},this}function _(v){const b={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(b.boundary=4,b.storage=4):v.isVector2?(b.boundary=8,b.storage=8):v.isVector3||v.isColor?(b.boundary=16,b.storage=12):v.isVector4?(b.boundary=16,b.storage=16):v.isMatrix3?(b.boundary=48,b.storage=48):v.isMatrix4?(b.boundary=64,b.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),b}function p(v){const b=v.target;b.removeEventListener("dispose",p);const S=o.indexOf(b.__bindingPointIndex);o.splice(S,1),s.deleteBuffer(i[b.id]),delete i[b.id],delete r[b.id]}function f(){for(const v in i)s.deleteBuffer(i[v]);o=[],i={},r={}}return{bind:l,update:c,dispose:f}}class iu{constructor(e={}){const{canvas:t=P2(),context:n=null,depth:i=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:m=!1,reverseDepthBuffer:u=!1}=e;this.isWebGLRenderer=!0;let h;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=n.getContextAttributes().alpha}else h=o;const g=new Uint32Array(4),_=new Int32Array(4);let p=null,f=null;const v=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=Xi,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const S=this;let F=!1;this._outputColorSpace=qt;let C=0,R=0,P=null,A=-1,E=null;const L=new Xt,B=new Xt;let H=null;const Q=new Tt(0);let ae=0,G=t.width,le=t.height,Z=1,ve=null,Ee=null;const be=new Xt(0,0,G,le),ge=new Xt(0,0,G,le);let se=!1;const j=new nc;let q=!1,ne=!1;const ee=new Et,ue=new Et,$=new I,pe=new Xt,Ce={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Ke=!1;function He(){return P===null?Z:1}let O=n;function _t(w,V){return t.getContext(w,V)}try{const w={alpha:!0,depth:i,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:d,failIfMajorPerformanceCaveat:m};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Vl}`),t.addEventListener("webglcontextlost",ut,!1),t.addEventListener("webglcontextrestored",ze,!1),t.addEventListener("webglcontextcreationerror",we,!1),O===null){const V="webgl2";if(O=_t(V,w),O===null)throw _t(V)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(w){throw console.error("THREE.WebGLRenderer: "+w.message),w}let dt,at,Fe,tt,Le,ot,jt,k,T,oe,Se,De,ye,vt,Ze,mt,yt,Ue,st,Rt,At,Ye,Lt,K;function $e(){dt=new Xp(O),dt.init(),Ye=new T3(O,dt),at=new Bp(O,dt,e,Ye),Fe=new A3(O,dt),at.reverseDepthBuffer&&u&&Fe.buffers.depth.setReversed(!0),tt=new $p(O),Le=new d3,ot=new w3(O,dt,Fe,Le,at,Ye,tt),jt=new kp(S),k=new Wp(S),T=new Q1(O),Lt=new Ip(O,T),oe=new jp(O,T,tt,Lt),Se=new Jp(O,oe,T,tt),st=new Yp(O,at,ot),mt=new Op(Le),De=new u3(S,jt,k,dt,at,Lt,mt),ye=new F3(S,Le),vt=new p3,Ze=new x3(dt),Ue=new Up(S,jt,k,Fe,Se,h,l),yt=new S3(S,Se,at),K=new N3(O,tt,at,Fe),Rt=new zp(O,dt,tt),At=new qp(O,dt,tt),tt.programs=De.programs,S.capabilities=at,S.extensions=dt,S.properties=Le,S.renderLists=vt,S.shadowMap=yt,S.state=Fe,S.info=tt}$e();const Ie=new L3(S,O);this.xr=Ie,this.getContext=function(){return O},this.getContextAttributes=function(){return O.getContextAttributes()},this.forceContextLoss=function(){const w=dt.get("WEBGL_lose_context");w&&w.loseContext()},this.forceContextRestore=function(){const w=dt.get("WEBGL_lose_context");w&&w.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(w){w!==void 0&&(Z=w,this.setSize(G,le,!1))},this.getSize=function(w){return w.set(G,le)},this.setSize=function(w,V,X=!0){if(Ie.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=w,le=V,t.width=Math.floor(w*Z),t.height=Math.floor(V*Z),X===!0&&(t.style.width=w+"px",t.style.height=V+"px"),this.setViewport(0,0,w,V)},this.getDrawingBufferSize=function(w){return w.set(G*Z,le*Z).floor()},this.setDrawingBufferSize=function(w,V,X){G=w,le=V,Z=X,t.width=Math.floor(w*X),t.height=Math.floor(V*X),this.setViewport(0,0,w,V)},this.getCurrentViewport=function(w){return w.copy(L)},this.getViewport=function(w){return w.copy(be)},this.setViewport=function(w,V,X,J){w.isVector4?be.set(w.x,w.y,w.z,w.w):be.set(w,V,X,J),Fe.viewport(L.copy(be).multiplyScalar(Z).round())},this.getScissor=function(w){return w.copy(ge)},this.setScissor=function(w,V,X,J){w.isVector4?ge.set(w.x,w.y,w.z,w.w):ge.set(w,V,X,J),Fe.scissor(B.copy(ge).multiplyScalar(Z).round())},this.getScissorTest=function(){return se},this.setScissorTest=function(w){Fe.setScissorTest(se=w)},this.setOpaqueSort=function(w){ve=w},this.setTransparentSort=function(w){Ee=w},this.getClearColor=function(w){return w.copy(Ue.getClearColor())},this.setClearColor=function(){Ue.setClearColor(...arguments)},this.getClearAlpha=function(){return Ue.getClearAlpha()},this.setClearAlpha=function(){Ue.setClearAlpha(...arguments)},this.clear=function(w=!0,V=!0,X=!0){let J=0;if(w){let z=!1;if(P!==null){const fe=P.texture.format;z=fe===Yl||fe===$l||fe===ql}if(z){const fe=P.texture.type,ie=fe===mi||fe===hs||fe===_r||fe===vr||fe===Xl||fe===jl,Ae=Ue.getClearColor(),re=Ue.getClearAlpha(),Ge=Ae.r,Me=Ae.g,Pe=Ae.b;ie?(g[0]=Ge,g[1]=Me,g[2]=Pe,g[3]=re,O.clearBufferuiv(O.COLOR,0,g)):(_[0]=Ge,_[1]=Me,_[2]=Pe,_[3]=re,O.clearBufferiv(O.COLOR,0,_))}else J|=O.COLOR_BUFFER_BIT}V&&(J|=O.DEPTH_BUFFER_BIT),X&&(J|=O.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),O.clear(J)},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",ut,!1),t.removeEventListener("webglcontextrestored",ze,!1),t.removeEventListener("webglcontextcreationerror",we,!1),Ue.dispose(),vt.dispose(),Ze.dispose(),Le.dispose(),jt.dispose(),k.dispose(),Se.dispose(),Lt.dispose(),K.dispose(),De.dispose(),Ie.dispose(),Ie.removeEventListener("sessionstart",fs),Ie.removeEventListener("sessionend",Yi),ei.stop()};function ut(w){w.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),F=!0}function ze(){console.log("THREE.WebGLRenderer: Context Restored."),F=!1;const w=tt.autoReset,V=yt.enabled,X=yt.autoUpdate,J=yt.needsUpdate,z=yt.type;$e(),tt.autoReset=w,yt.enabled=V,yt.autoUpdate=X,yt.needsUpdate=J,yt.type=z}function we(w){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",w.statusMessage)}function pt(w){const V=w.target;V.removeEventListener("dispose",pt),Ft(V)}function Ft(w){Qt(w),Le.remove(w)}function Qt(w){const V=Le.get(w).programs;V!==void 0&&(V.forEach(function(X){De.releaseProgram(X)}),w.isShaderMaterial&&De.releaseShaderCache(w))}this.renderBufferDirect=function(w,V,X,J,z,fe){V===null&&(V=Ce);const ie=z.isMesh&&z.matrixWorld.determinant()<0,Ae=Re(w,V,X,J,z);Fe.setMaterial(J,ie);let re=X.index,Ge=1;if(J.wireframe===!0){if(re=oe.getWireframeAttribute(X),re===void 0)return;Ge=2}const Me=X.drawRange,Pe=X.attributes.position;let it=Me.start*Ge,Mt=(Me.start+Me.count)*Ge;fe!==null&&(it=Math.max(it,fe.start*Ge),Mt=Math.min(Mt,(fe.start+fe.count)*Ge)),re!==null?(it=Math.max(it,0),Mt=Math.min(Mt,re.count)):Pe!=null&&(it=Math.max(it,0),Mt=Math.min(Mt,Pe.count));const Ct=Mt-it;if(Ct<0||Ct===1/0)return;Lt.setup(z,J,Ae,X,re);let bt,St=Rt;if(re!==null&&(bt=T.get(re),St=At,St.setIndex(bt)),z.isMesh)J.wireframe===!0?(Fe.setLineWidth(J.wireframeLinewidth*He()),St.setMode(O.LINES)):St.setMode(O.TRIANGLES);else if(z.isLine){let Qe=J.linewidth;Qe===void 0&&(Qe=1),Fe.setLineWidth(Qe*He()),z.isLineSegments?St.setMode(O.LINES):z.isLineLoop?St.setMode(O.LINE_LOOP):St.setMode(O.LINE_STRIP)}else z.isPoints?St.setMode(O.POINTS):z.isSprite&&St.setMode(O.TRIANGLES);if(z.isBatchedMesh)if(z._multiDrawInstances!==null)Os("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),St.renderMultiDrawInstances(z._multiDrawStarts,z._multiDrawCounts,z._multiDrawCount,z._multiDrawInstances);else if(dt.get("WEBGL_multi_draw"))St.renderMultiDraw(z._multiDrawStarts,z._multiDrawCounts,z._multiDrawCount);else{const Qe=z._multiDrawStarts,Wt=z._multiDrawCounts,Nt=z._multiDrawCount,nn=re?T.get(re).bytesPerElement:1,Bt=Le.get(J).currentProgram.getUniforms();for(let cn=0;cn<Nt;cn++)Bt.setValue(O,"_gl_DrawID",cn),St.render(Qe[cn]/nn,Wt[cn])}else if(z.isInstancedMesh)St.renderInstances(it,Ct,z.count);else if(X.isInstancedBufferGeometry){const Qe=X._maxInstanceCount!==void 0?X._maxInstanceCount:1/0,Wt=Math.min(X.instanceCount,Qe);St.renderInstances(it,Ct,Wt)}else St.render(it,Ct)};function Ut(w,V,X){w.transparent===!0&&w.side===pn&&w.forceSinglePass===!1?(w.side=In,w.needsUpdate=!0,me(w,V,X),w.side=Qn,w.needsUpdate=!0,me(w,V,X),w.side=pn):me(w,V,X)}this.compile=function(w,V,X=null){X===null&&(X=w),f=Ze.get(X),f.init(V),b.push(f),X.traverseVisible(function(z){z.isLight&&z.layers.test(V.layers)&&(f.pushLight(z),z.castShadow&&f.pushShadow(z))}),w!==X&&w.traverseVisible(function(z){z.isLight&&z.layers.test(V.layers)&&(f.pushLight(z),z.castShadow&&f.pushShadow(z))}),f.setupLights();const J=new Set;return w.traverse(function(z){if(!(z.isMesh||z.isPoints||z.isLine||z.isSprite))return;const fe=z.material;if(fe)if(Array.isArray(fe))for(let ie=0;ie<fe.length;ie++){const Ae=fe[ie];Ut(Ae,X,z),J.add(Ae)}else Ut(fe,X,z),J.add(fe)}),f=b.pop(),J},this.compileAsync=function(w,V,X=null){const J=this.compile(w,V,X);return new Promise(z=>{function fe(){if(J.forEach(function(ie){Le.get(ie).currentProgram.isReady()&&J.delete(ie)}),J.size===0){z(w);return}setTimeout(fe,10)}dt.get("KHR_parallel_shader_compile")!==null?fe():setTimeout(fe,10)})};let Cn=null;function Hn(w){Cn&&Cn(w)}function fs(){ei.stop()}function Yi(){ei.start()}const ei=new Z0;ei.setAnimationLoop(Hn),typeof self<"u"&&ei.setContext(self),this.setAnimationLoop=function(w){Cn=w,Ie.setAnimationLoop(w),w===null?ei.stop():ei.start()},Ie.addEventListener("sessionstart",fs),Ie.addEventListener("sessionend",Yi),this.render=function(w,V){if(V!==void 0&&V.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(F===!0)return;if(w.matrixWorldAutoUpdate===!0&&w.updateMatrixWorld(),V.parent===null&&V.matrixWorldAutoUpdate===!0&&V.updateMatrixWorld(),Ie.enabled===!0&&Ie.isPresenting===!0&&(Ie.cameraAutoUpdate===!0&&Ie.updateCamera(V),V=Ie.getCamera()),w.isScene===!0&&w.onBeforeRender(S,w,V,P),f=Ze.get(w,b.length),f.init(V),b.push(f),ue.multiplyMatrices(V.projectionMatrix,V.matrixWorldInverse),j.setFromProjectionMatrix(ue),ne=this.localClippingEnabled,q=mt.init(this.clippingPlanes,ne),p=vt.get(w,v.length),p.init(),v.push(p),Ie.enabled===!0&&Ie.isPresenting===!0){const fe=S.xr.getDepthSensingMesh();fe!==null&&Y(fe,V,-1/0,S.sortObjects)}Y(w,V,0,S.sortObjects),p.finish(),S.sortObjects===!0&&p.sort(ve,Ee),Ke=Ie.enabled===!1||Ie.isPresenting===!1||Ie.hasDepthSensing()===!1,Ke&&Ue.addToRenderList(p,w),this.info.render.frame++,q===!0&&mt.beginShadows();const X=f.state.shadowsArray;yt.render(X,w,V),q===!0&&mt.endShadows(),this.info.autoReset===!0&&this.info.reset();const J=p.opaque,z=p.transmissive;if(f.setupLights(),V.isArrayCamera){const fe=V.cameras;if(z.length>0)for(let ie=0,Ae=fe.length;ie<Ae;ie++){const re=fe[ie];ce(J,z,w,re)}Ke&&Ue.render(w);for(let ie=0,Ae=fe.length;ie<Ae;ie++){const re=fe[ie];W(p,w,re,re.viewport)}}else z.length>0&&ce(J,z,w,V),Ke&&Ue.render(w),W(p,w,V);P!==null&&R===0&&(ot.updateMultisampleRenderTarget(P),ot.updateRenderTargetMipmap(P)),w.isScene===!0&&w.onAfterRender(S,w,V),Lt.resetDefaultState(),A=-1,E=null,b.pop(),b.length>0?(f=b[b.length-1],q===!0&&mt.setGlobalState(S.clippingPlanes,f.state.camera)):f=null,v.pop(),v.length>0?p=v[v.length-1]:p=null};function Y(w,V,X,J){if(w.visible===!1)return;if(w.layers.test(V.layers)){if(w.isGroup)X=w.renderOrder;else if(w.isLOD)w.autoUpdate===!0&&w.update(V);else if(w.isLight)f.pushLight(w),w.castShadow&&f.pushShadow(w);else if(w.isSprite){if(!w.frustumCulled||j.intersectsSprite(w)){J&&pe.setFromMatrixPosition(w.matrixWorld).applyMatrix4(ue);const ie=Se.update(w),Ae=w.material;Ae.visible&&p.push(w,ie,Ae,X,pe.z,null)}}else if((w.isMesh||w.isLine||w.isPoints)&&(!w.frustumCulled||j.intersectsObject(w))){const ie=Se.update(w),Ae=w.material;if(J&&(w.boundingSphere!==void 0?(w.boundingSphere===null&&w.computeBoundingSphere(),pe.copy(w.boundingSphere.center)):(ie.boundingSphere===null&&ie.computeBoundingSphere(),pe.copy(ie.boundingSphere.center)),pe.applyMatrix4(w.matrixWorld).applyMatrix4(ue)),Array.isArray(Ae)){const re=ie.groups;for(let Ge=0,Me=re.length;Ge<Me;Ge++){const Pe=re[Ge],it=Ae[Pe.materialIndex];it&&it.visible&&p.push(w,ie,it,X,pe.z,Pe)}}else Ae.visible&&p.push(w,ie,Ae,X,pe.z,null)}}const fe=w.children;for(let ie=0,Ae=fe.length;ie<Ae;ie++)Y(fe[ie],V,X,J)}function W(w,V,X,J){const z=w.opaque,fe=w.transmissive,ie=w.transparent;f.setupLightsView(X),q===!0&&mt.setGlobalState(S.clippingPlanes,X),J&&Fe.viewport(L.copy(J)),z.length>0&&de(z,V,X),fe.length>0&&de(fe,V,X),ie.length>0&&de(ie,V,X),Fe.buffers.depth.setTest(!0),Fe.buffers.depth.setMask(!0),Fe.buffers.color.setMask(!0),Fe.setPolygonOffset(!1)}function ce(w,V,X,J){if((X.isScene===!0?X.overrideMaterial:null)!==null)return;f.state.transmissionRenderTarget[J.id]===void 0&&(f.state.transmissionRenderTarget[J.id]=new us(1,1,{generateMipmaps:!0,type:dt.has("EXT_color_buffer_half_float")||dt.has("EXT_color_buffer_float")?Sr:mi,minFilter:Ai,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Gt.workingColorSpace}));const fe=f.state.transmissionRenderTarget[J.id],ie=J.viewport||L;fe.setSize(ie.z*S.transmissionResolutionScale,ie.w*S.transmissionResolutionScale);const Ae=S.getRenderTarget();S.setRenderTarget(fe),S.getClearColor(Q),ae=S.getClearAlpha(),ae<1&&S.setClearColor(16777215,.5),S.clear(),Ke&&Ue.render(X);const re=S.toneMapping;S.toneMapping=Xi;const Ge=J.viewport;if(J.viewport!==void 0&&(J.viewport=void 0),f.setupLightsView(J),q===!0&&mt.setGlobalState(S.clippingPlanes,J),de(w,X,J),ot.updateMultisampleRenderTarget(fe),ot.updateRenderTargetMipmap(fe),dt.has("WEBGL_multisampled_render_to_texture")===!1){let Me=!1;for(let Pe=0,it=V.length;Pe<it;Pe++){const Mt=V[Pe],Ct=Mt.object,bt=Mt.geometry,St=Mt.material,Qe=Mt.group;if(St.side===pn&&Ct.layers.test(J.layers)){const Wt=St.side;St.side=In,St.needsUpdate=!0,_e(Ct,X,J,bt,St,Qe),St.side=Wt,St.needsUpdate=!0,Me=!0}}Me===!0&&(ot.updateMultisampleRenderTarget(fe),ot.updateRenderTargetMipmap(fe))}S.setRenderTarget(Ae),S.setClearColor(Q,ae),Ge!==void 0&&(J.viewport=Ge),S.toneMapping=re}function de(w,V,X){const J=V.isScene===!0?V.overrideMaterial:null;for(let z=0,fe=w.length;z<fe;z++){const ie=w[z],Ae=ie.object,re=ie.geometry,Ge=ie.group;let Me=ie.material;Me.allowOverride===!0&&J!==null&&(Me=J),Ae.layers.test(X.layers)&&_e(Ae,V,X,re,Me,Ge)}}function _e(w,V,X,J,z,fe){w.onBeforeRender(S,V,X,J,z,fe),w.modelViewMatrix.multiplyMatrices(X.matrixWorldInverse,w.matrixWorld),w.normalMatrix.getNormalMatrix(w.modelViewMatrix),z.onBeforeRender(S,V,X,J,w,fe),z.transparent===!0&&z.side===pn&&z.forceSinglePass===!1?(z.side=In,z.needsUpdate=!0,S.renderBufferDirect(X,V,J,z,w,fe),z.side=Qn,z.needsUpdate=!0,S.renderBufferDirect(X,V,J,z,w,fe),z.side=pn):S.renderBufferDirect(X,V,J,z,w,fe),w.onAfterRender(S,V,X,J,z,fe)}function me(w,V,X){V.isScene!==!0&&(V=Ce);const J=Le.get(w),z=f.state.lights,fe=f.state.shadowsArray,ie=z.state.version,Ae=De.getParameters(w,z.state,fe,V,X),re=De.getProgramCacheKey(Ae);let Ge=J.programs;J.environment=w.isMeshStandardMaterial?V.environment:null,J.fog=V.fog,J.envMap=(w.isMeshStandardMaterial?k:jt).get(w.envMap||J.environment),J.envMapRotation=J.environment!==null&&w.envMap===null?V.environmentRotation:w.envMapRotation,Ge===void 0&&(w.addEventListener("dispose",pt),Ge=new Map,J.programs=Ge);let Me=Ge.get(re);if(Me!==void 0){if(J.currentProgram===Me&&J.lightsStateVersion===ie)return Te(w,Ae),Me}else Ae.uniforms=De.getUniforms(w),w.onBeforeCompile(Ae,S),Me=De.acquireProgram(Ae,re),Ge.set(re,Me),J.uniforms=Ae.uniforms;const Pe=J.uniforms;return(!w.isShaderMaterial&&!w.isRawShaderMaterial||w.clipping===!0)&&(Pe.clippingPlanes=mt.uniform),Te(w,Ae),J.needsLights=te(w),J.lightsStateVersion=ie,J.needsLights&&(Pe.ambientLightColor.value=z.state.ambient,Pe.lightProbe.value=z.state.probe,Pe.directionalLights.value=z.state.directional,Pe.directionalLightShadows.value=z.state.directionalShadow,Pe.spotLights.value=z.state.spot,Pe.spotLightShadows.value=z.state.spotShadow,Pe.rectAreaLights.value=z.state.rectArea,Pe.ltc_1.value=z.state.rectAreaLTC1,Pe.ltc_2.value=z.state.rectAreaLTC2,Pe.pointLights.value=z.state.point,Pe.pointLightShadows.value=z.state.pointShadow,Pe.hemisphereLights.value=z.state.hemi,Pe.directionalShadowMap.value=z.state.directionalShadowMap,Pe.directionalShadowMatrix.value=z.state.directionalShadowMatrix,Pe.spotShadowMap.value=z.state.spotShadowMap,Pe.spotLightMatrix.value=z.state.spotLightMatrix,Pe.spotLightMap.value=z.state.spotLightMap,Pe.pointShadowMap.value=z.state.pointShadowMap,Pe.pointShadowMatrix.value=z.state.pointShadowMatrix),J.currentProgram=Me,J.uniformsList=null,Me}function Be(w){if(w.uniformsList===null){const V=w.currentProgram.getUniforms();w.uniformsList=Ma.seqWithValue(V.seq,w.uniforms)}return w.uniformsList}function Te(w,V){const X=Le.get(w);X.outputColorSpace=V.outputColorSpace,X.batching=V.batching,X.batchingColor=V.batchingColor,X.instancing=V.instancing,X.instancingColor=V.instancingColor,X.instancingMorph=V.instancingMorph,X.skinning=V.skinning,X.morphTargets=V.morphTargets,X.morphNormals=V.morphNormals,X.morphColors=V.morphColors,X.morphTargetsCount=V.morphTargetsCount,X.numClippingPlanes=V.numClippingPlanes,X.numIntersection=V.numClipIntersection,X.vertexAlphas=V.vertexAlphas,X.vertexTangents=V.vertexTangents,X.toneMapping=V.toneMapping}function Re(w,V,X,J,z){V.isScene!==!0&&(V=Ce),ot.resetTextureUnits();const fe=V.fog,ie=J.isMeshStandardMaterial?V.environment:null,Ae=P===null?S.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:Xs,re=(J.isMeshStandardMaterial?k:jt).get(J.envMap||ie),Ge=J.vertexColors===!0&&!!X.attributes.color&&X.attributes.color.itemSize===4,Me=!!X.attributes.tangent&&(!!J.normalMap||J.anisotropy>0),Pe=!!X.morphAttributes.position,it=!!X.morphAttributes.normal,Mt=!!X.morphAttributes.color;let Ct=Xi;J.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(Ct=S.toneMapping);const bt=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,St=bt!==void 0?bt.length:0,Qe=Le.get(J),Wt=f.state.lights;if(q===!0&&(ne===!0||w!==E)){const sn=w===E&&J.id===A;mt.setState(J,w,sn)}let Nt=!1;J.version===Qe.__version?(Qe.needsLights&&Qe.lightsStateVersion!==Wt.state.version||Qe.outputColorSpace!==Ae||z.isBatchedMesh&&Qe.batching===!1||!z.isBatchedMesh&&Qe.batching===!0||z.isBatchedMesh&&Qe.batchingColor===!0&&z.colorTexture===null||z.isBatchedMesh&&Qe.batchingColor===!1&&z.colorTexture!==null||z.isInstancedMesh&&Qe.instancing===!1||!z.isInstancedMesh&&Qe.instancing===!0||z.isSkinnedMesh&&Qe.skinning===!1||!z.isSkinnedMesh&&Qe.skinning===!0||z.isInstancedMesh&&Qe.instancingColor===!0&&z.instanceColor===null||z.isInstancedMesh&&Qe.instancingColor===!1&&z.instanceColor!==null||z.isInstancedMesh&&Qe.instancingMorph===!0&&z.morphTexture===null||z.isInstancedMesh&&Qe.instancingMorph===!1&&z.morphTexture!==null||Qe.envMap!==re||J.fog===!0&&Qe.fog!==fe||Qe.numClippingPlanes!==void 0&&(Qe.numClippingPlanes!==mt.numPlanes||Qe.numIntersection!==mt.numIntersection)||Qe.vertexAlphas!==Ge||Qe.vertexTangents!==Me||Qe.morphTargets!==Pe||Qe.morphNormals!==it||Qe.morphColors!==Mt||Qe.toneMapping!==Ct||Qe.morphTargetsCount!==St)&&(Nt=!0):(Nt=!0,Qe.__version=J.version);let nn=Qe.currentProgram;Nt===!0&&(nn=me(J,V,z));let Bt=!1,cn=!1,We=!1;const Pt=nn.getUniforms(),Ot=Qe.uniforms;if(Fe.useProgram(nn.program)&&(Bt=!0,cn=!0,We=!0),J.id!==A&&(A=J.id,cn=!0),Bt||E!==w){Fe.buffers.depth.getReversed()?(ee.copy(w.projectionMatrix),N2(ee),U2(ee),Pt.setValue(O,"projectionMatrix",ee)):Pt.setValue(O,"projectionMatrix",w.projectionMatrix),Pt.setValue(O,"viewMatrix",w.matrixWorldInverse);const Kt=Pt.map.cameraPosition;Kt!==void 0&&Kt.setValue(O,$.setFromMatrixPosition(w.matrixWorld)),at.logarithmicDepthBuffer&&Pt.setValue(O,"logDepthBufFC",2/(Math.log(w.far+1)/Math.LN2)),(J.isMeshPhongMaterial||J.isMeshToonMaterial||J.isMeshLambertMaterial||J.isMeshBasicMaterial||J.isMeshStandardMaterial||J.isShaderMaterial)&&Pt.setValue(O,"isOrthographic",w.isOrthographicCamera===!0),E!==w&&(E=w,cn=!0,We=!0)}if(z.isSkinnedMesh){Pt.setOptional(O,z,"bindMatrix"),Pt.setOptional(O,z,"bindMatrixInverse");const sn=z.skeleton;sn&&(sn.boneTexture===null&&sn.computeBoneTexture(),Pt.setValue(O,"boneTexture",sn.boneTexture,ot))}z.isBatchedMesh&&(Pt.setOptional(O,z,"batchingTexture"),Pt.setValue(O,"batchingTexture",z._matricesTexture,ot),Pt.setOptional(O,z,"batchingIdTexture"),Pt.setValue(O,"batchingIdTexture",z._indirectTexture,ot),Pt.setOptional(O,z,"batchingColorTexture"),z._colorsTexture!==null&&Pt.setValue(O,"batchingColorTexture",z._colorsTexture,ot));const Jt=X.morphAttributes;if((Jt.position!==void 0||Jt.normal!==void 0||Jt.color!==void 0)&&st.update(z,X,nn),(cn||Qe.receiveShadow!==z.receiveShadow)&&(Qe.receiveShadow=z.receiveShadow,Pt.setValue(O,"receiveShadow",z.receiveShadow)),J.isMeshGouraudMaterial&&J.envMap!==null&&(Ot.envMap.value=re,Ot.flipEnvMap.value=re.isCubeTexture&&re.isRenderTargetTexture===!1?-1:1),J.isMeshStandardMaterial&&J.envMap===null&&V.environment!==null&&(Ot.envMapIntensity.value=V.environmentIntensity),cn&&(Pt.setValue(O,"toneMappingExposure",S.toneMappingExposure),Qe.needsLights&&qe(Ot,We),fe&&J.fog===!0&&ye.refreshFogUniforms(Ot,fe),ye.refreshMaterialUniforms(Ot,J,Z,le,f.state.transmissionRenderTarget[w.id]),Ma.upload(O,Be(Qe),Ot,ot)),J.isShaderMaterial&&J.uniformsNeedUpdate===!0&&(Ma.upload(O,Be(Qe),Ot,ot),J.uniformsNeedUpdate=!1),J.isSpriteMaterial&&Pt.setValue(O,"center",z.center),Pt.setValue(O,"modelViewMatrix",z.modelViewMatrix),Pt.setValue(O,"normalMatrix",z.normalMatrix),Pt.setValue(O,"modelMatrix",z.matrixWorld),J.isShaderMaterial||J.isRawShaderMaterial){const sn=J.uniformsGroups;for(let Kt=0,rt=sn.length;Kt<rt;Kt++){const ke=sn[Kt];K.update(ke,nn),K.bind(ke,nn)}}return nn}function qe(w,V){w.ambientLightColor.needsUpdate=V,w.lightProbe.needsUpdate=V,w.directionalLights.needsUpdate=V,w.directionalLightShadows.needsUpdate=V,w.pointLights.needsUpdate=V,w.pointLightShadows.needsUpdate=V,w.spotLights.needsUpdate=V,w.spotLightShadows.needsUpdate=V,w.rectAreaLights.needsUpdate=V,w.hemisphereLights.needsUpdate=V}function te(w){return w.isMeshLambertMaterial||w.isMeshToonMaterial||w.isMeshPhongMaterial||w.isMeshStandardMaterial||w.isShadowMaterial||w.isShaderMaterial&&w.lights===!0}this.getActiveCubeFace=function(){return C},this.getActiveMipmapLevel=function(){return R},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(w,V,X){const J=Le.get(w);J.__autoAllocateDepthBuffer=w.resolveDepthBuffer===!1,J.__autoAllocateDepthBuffer===!1&&(J.__useRenderToTexture=!1),Le.get(w.texture).__webglTexture=V,Le.get(w.depthTexture).__webglTexture=J.__autoAllocateDepthBuffer?void 0:X,J.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(w,V){const X=Le.get(w);X.__webglFramebuffer=V,X.__useDefaultFramebuffer=V===void 0};const Ve=O.createFramebuffer();this.setRenderTarget=function(w,V=0,X=0){P=w,C=V,R=X;let J=!0,z=null,fe=!1,ie=!1;if(w){const re=Le.get(w);if(re.__useDefaultFramebuffer!==void 0)Fe.bindFramebuffer(O.FRAMEBUFFER,null),J=!1;else if(re.__webglFramebuffer===void 0)ot.setupRenderTarget(w);else if(re.__hasExternalTextures)ot.rebindTextures(w,Le.get(w.texture).__webglTexture,Le.get(w.depthTexture).__webglTexture);else if(w.depthBuffer){const Pe=w.depthTexture;if(re.__boundDepthTexture!==Pe){if(Pe!==null&&Le.has(Pe)&&(w.width!==Pe.image.width||w.height!==Pe.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");ot.setupDepthRenderbuffer(w)}}const Ge=w.texture;(Ge.isData3DTexture||Ge.isDataArrayTexture||Ge.isCompressedArrayTexture)&&(ie=!0);const Me=Le.get(w).__webglFramebuffer;w.isWebGLCubeRenderTarget?(Array.isArray(Me[V])?z=Me[V][X]:z=Me[V],fe=!0):w.samples>0&&ot.useMultisampledRTT(w)===!1?z=Le.get(w).__webglMultisampledFramebuffer:Array.isArray(Me)?z=Me[X]:z=Me,L.copy(w.viewport),B.copy(w.scissor),H=w.scissorTest}else L.copy(be).multiplyScalar(Z).floor(),B.copy(ge).multiplyScalar(Z).floor(),H=se;if(X!==0&&(z=Ve),Fe.bindFramebuffer(O.FRAMEBUFFER,z)&&J&&Fe.drawBuffers(w,z),Fe.viewport(L),Fe.scissor(B),Fe.setScissorTest(H),fe){const re=Le.get(w.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_CUBE_MAP_POSITIVE_X+V,re.__webglTexture,X)}else if(ie){const re=Le.get(w.texture),Ge=V;O.framebufferTextureLayer(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,re.__webglTexture,X,Ge)}else if(w!==null&&X!==0){const re=Le.get(w.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,re.__webglTexture,X)}A=-1},this.readRenderTargetPixels=function(w,V,X,J,z,fe,ie,Ae=0){if(!(w&&w.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let re=Le.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ie!==void 0&&(re=re[ie]),re){Fe.bindFramebuffer(O.FRAMEBUFFER,re);try{const Ge=w.textures[Ae],Me=Ge.format,Pe=Ge.type;if(!at.textureFormatReadable(Me)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!at.textureTypeReadable(Pe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}V>=0&&V<=w.width-J&&X>=0&&X<=w.height-z&&(w.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+Ae),O.readPixels(V,X,J,z,Ye.convert(Me),Ye.convert(Pe),fe))}finally{const Ge=P!==null?Le.get(P).__webglFramebuffer:null;Fe.bindFramebuffer(O.FRAMEBUFFER,Ge)}}},this.readRenderTargetPixelsAsync=async function(w,V,X,J,z,fe,ie,Ae=0){if(!(w&&w.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let re=Le.get(w).__webglFramebuffer;if(w.isWebGLCubeRenderTarget&&ie!==void 0&&(re=re[ie]),re)if(V>=0&&V<=w.width-J&&X>=0&&X<=w.height-z){Fe.bindFramebuffer(O.FRAMEBUFFER,re);const Ge=w.textures[Ae],Me=Ge.format,Pe=Ge.type;if(!at.textureFormatReadable(Me))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!at.textureTypeReadable(Pe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const it=O.createBuffer();O.bindBuffer(O.PIXEL_PACK_BUFFER,it),O.bufferData(O.PIXEL_PACK_BUFFER,fe.byteLength,O.STREAM_READ),w.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+Ae),O.readPixels(V,X,J,z,Ye.convert(Me),Ye.convert(Pe),0);const Mt=P!==null?Le.get(P).__webglFramebuffer:null;Fe.bindFramebuffer(O.FRAMEBUFFER,Mt);const Ct=O.fenceSync(O.SYNC_GPU_COMMANDS_COMPLETE,0);return O.flush(),await F2(O,Ct,4),O.bindBuffer(O.PIXEL_PACK_BUFFER,it),O.getBufferSubData(O.PIXEL_PACK_BUFFER,0,fe),O.deleteBuffer(it),O.deleteSync(Ct),fe}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(w,V=null,X=0){const J=Math.pow(2,-X),z=Math.floor(w.image.width*J),fe=Math.floor(w.image.height*J),ie=V!==null?V.x:0,Ae=V!==null?V.y:0;ot.setTexture2D(w,0),O.copyTexSubImage2D(O.TEXTURE_2D,X,0,0,ie,Ae,z,fe),Fe.unbindTexture()};const Xe=O.createFramebuffer(),ft=O.createFramebuffer();this.copyTextureToTexture=function(w,V,X=null,J=null,z=0,fe=null){fe===null&&(z!==0?(Os("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),fe=z,z=0):fe=0);let ie,Ae,re,Ge,Me,Pe,it,Mt,Ct;const bt=w.isCompressedTexture?w.mipmaps[fe]:w.image;if(X!==null)ie=X.max.x-X.min.x,Ae=X.max.y-X.min.y,re=X.isBox3?X.max.z-X.min.z:1,Ge=X.min.x,Me=X.min.y,Pe=X.isBox3?X.min.z:0;else{const Jt=Math.pow(2,-z);ie=Math.floor(bt.width*Jt),Ae=Math.floor(bt.height*Jt),w.isDataArrayTexture?re=bt.depth:w.isData3DTexture?re=Math.floor(bt.depth*Jt):re=1,Ge=0,Me=0,Pe=0}J!==null?(it=J.x,Mt=J.y,Ct=J.z):(it=0,Mt=0,Ct=0);const St=Ye.convert(V.format),Qe=Ye.convert(V.type);let Wt;V.isData3DTexture?(ot.setTexture3D(V,0),Wt=O.TEXTURE_3D):V.isDataArrayTexture||V.isCompressedArrayTexture?(ot.setTexture2DArray(V,0),Wt=O.TEXTURE_2D_ARRAY):(ot.setTexture2D(V,0),Wt=O.TEXTURE_2D),O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,V.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,V.unpackAlignment);const Nt=O.getParameter(O.UNPACK_ROW_LENGTH),nn=O.getParameter(O.UNPACK_IMAGE_HEIGHT),Bt=O.getParameter(O.UNPACK_SKIP_PIXELS),cn=O.getParameter(O.UNPACK_SKIP_ROWS),We=O.getParameter(O.UNPACK_SKIP_IMAGES);O.pixelStorei(O.UNPACK_ROW_LENGTH,bt.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,bt.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,Ge),O.pixelStorei(O.UNPACK_SKIP_ROWS,Me),O.pixelStorei(O.UNPACK_SKIP_IMAGES,Pe);const Pt=w.isDataArrayTexture||w.isData3DTexture,Ot=V.isDataArrayTexture||V.isData3DTexture;if(w.isDepthTexture){const Jt=Le.get(w),sn=Le.get(V),Kt=Le.get(Jt.__renderTarget),rt=Le.get(sn.__renderTarget);Fe.bindFramebuffer(O.READ_FRAMEBUFFER,Kt.__webglFramebuffer),Fe.bindFramebuffer(O.DRAW_FRAMEBUFFER,rt.__webglFramebuffer);for(let ke=0;ke<re;ke++)Pt&&(O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Le.get(w).__webglTexture,z,Pe+ke),O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Le.get(V).__webglTexture,fe,Ct+ke)),O.blitFramebuffer(Ge,Me,ie,Ae,it,Mt,ie,Ae,O.DEPTH_BUFFER_BIT,O.NEAREST);Fe.bindFramebuffer(O.READ_FRAMEBUFFER,null),Fe.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else if(z!==0||w.isRenderTargetTexture||Le.has(w)){const Jt=Le.get(w),sn=Le.get(V);Fe.bindFramebuffer(O.READ_FRAMEBUFFER,Xe),Fe.bindFramebuffer(O.DRAW_FRAMEBUFFER,ft);for(let Kt=0;Kt<re;Kt++)Pt?O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Jt.__webglTexture,z,Pe+Kt):O.framebufferTexture2D(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,Jt.__webglTexture,z),Ot?O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,sn.__webglTexture,fe,Ct+Kt):O.framebufferTexture2D(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,sn.__webglTexture,fe),z!==0?O.blitFramebuffer(Ge,Me,ie,Ae,it,Mt,ie,Ae,O.COLOR_BUFFER_BIT,O.NEAREST):Ot?O.copyTexSubImage3D(Wt,fe,it,Mt,Ct+Kt,Ge,Me,ie,Ae):O.copyTexSubImage2D(Wt,fe,it,Mt,Ge,Me,ie,Ae);Fe.bindFramebuffer(O.READ_FRAMEBUFFER,null),Fe.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else Ot?w.isDataTexture||w.isData3DTexture?O.texSubImage3D(Wt,fe,it,Mt,Ct,ie,Ae,re,St,Qe,bt.data):V.isCompressedArrayTexture?O.compressedTexSubImage3D(Wt,fe,it,Mt,Ct,ie,Ae,re,St,bt.data):O.texSubImage3D(Wt,fe,it,Mt,Ct,ie,Ae,re,St,Qe,bt):w.isDataTexture?O.texSubImage2D(O.TEXTURE_2D,fe,it,Mt,ie,Ae,St,Qe,bt.data):w.isCompressedTexture?O.compressedTexSubImage2D(O.TEXTURE_2D,fe,it,Mt,bt.width,bt.height,St,bt.data):O.texSubImage2D(O.TEXTURE_2D,fe,it,Mt,ie,Ae,St,Qe,bt);O.pixelStorei(O.UNPACK_ROW_LENGTH,Nt),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,nn),O.pixelStorei(O.UNPACK_SKIP_PIXELS,Bt),O.pixelStorei(O.UNPACK_SKIP_ROWS,cn),O.pixelStorei(O.UNPACK_SKIP_IMAGES,We),fe===0&&V.generateMipmaps&&O.generateMipmap(Wt),Fe.unbindTexture()},this.copyTextureToTexture3D=function(w,V,X=null,J=null,z=0){return Os('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(w,V,X,J,z)},this.initRenderTarget=function(w){Le.get(w).__webglFramebuffer===void 0&&ot.setupRenderTarget(w)},this.initTexture=function(w){w.isCubeTexture?ot.setTextureCube(w,0):w.isData3DTexture?ot.setTexture3D(w,0):w.isDataArrayTexture||w.isCompressedArrayTexture?ot.setTexture2DArray(w,0):ot.setTexture2D(w,0),Fe.unbindTexture()},this.resetState=function(){C=0,R=0,P=null,Fe.reset(),Lt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return wi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Gt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Gt._getUnpackColorSpace()}}const Gh={type:"change"},dc={type:"start"},su={type:"end"},ra=new Ys,Wh=new Jn,U3=Math.cos(70*Ei.DEG2RAD),_n=new I,Bn=2*Math.PI,on={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Lo=1e-6;class ru extends K1{constructor(e,t=null){super(e,t),this.state=on.NONE,this.target=new I,this.cursor=new I,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=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.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Ti.ROTATE,MIDDLE:Ti.DOLLY,RIGHT:Ti.PAN},this.touches={ONE:Is.ROTATE,TWO:Is.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new I,this._lastQuaternion=new Vn,this._lastTargetPosition=new I,this._quat=new Vn().setFromUnitVectors(e.up,new I(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Pl,this._sphericalDelta=new Pl,this._scale=1,this._panOffset=new I,this._rotateStart=new et,this._rotateEnd=new et,this._rotateDelta=new et,this._panStart=new et,this._panEnd=new et,this._panDelta=new et,this._dollyStart=new et,this._dollyEnd=new et,this._dollyDelta=new et,this._dollyDirection=new I,this._mouse=new et,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=z3.bind(this),this._onPointerDown=I3.bind(this),this._onPointerUp=B3.bind(this),this._onContextMenu=X3.bind(this),this._onMouseWheel=V3.bind(this),this._onKeyDown=H3.bind(this),this._onTouchStart=G3.bind(this),this._onTouchMove=W3.bind(this),this._onMouseDown=O3.bind(this),this._onMouseMove=k3.bind(this),this._interceptControlDown=j3.bind(this),this._interceptControlUp=q3.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Gh),this.update(),this.state=on.NONE}update(e=null){const t=this.object.position;_n.copy(t).sub(this.target),_n.applyQuaternion(this._quat),this._spherical.setFromVector3(_n),this.autoRotate&&this.state===on.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,i=this.maxAzimuthAngle;isFinite(n)&&isFinite(i)&&(n<-Math.PI?n+=Bn:n>Math.PI&&(n-=Bn),i<-Math.PI?i+=Bn:i>Math.PI&&(i-=Bn),n<=i?this._spherical.theta=Math.max(n,Math.min(i,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+i)/2?Math.max(n,this._spherical.theta):Math.min(i,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=o!=this._spherical.radius}if(_n.setFromSpherical(this._spherical),_n.applyQuaternion(this._quatInverse),t.copy(this.target).add(_n),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){const a=_n.length();o=this._clampDistance(a*this._scale);const l=a-o;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),r=!!l}else if(this.object.isOrthographicCamera){const a=new I(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=l!==this.object.zoom;const c=new I(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=_n.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;o!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(ra.origin.copy(this.object.position),ra.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ra.direction))<U3?this.object.lookAt(this.target):(Wh.setFromNormalAndCoplanarPoint(this.object.up,this.target),ra.intersectPlane(Wh,this.target))))}else if(this.object.isOrthographicCamera){const o=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),o!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>Lo||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Lo||this._lastTargetPosition.distanceToSquared(this.target)>Lo?(this.dispatchEvent(Gh),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Bn/60*this.autoRotateSpeed*e:Bn/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){_n.setFromMatrixColumn(t,0),_n.multiplyScalar(-e),this._panOffset.add(_n)}_panUp(e,t){this.screenSpacePanning===!0?_n.setFromMatrixColumn(t,1):(_n.setFromMatrixColumn(t,0),_n.crossVectors(this.object.up,_n)),_n.multiplyScalar(e),this._panOffset.add(_n)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;_n.copy(i).sub(this.target);let r=_n.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/n.clientHeight,this.object.matrix),this._panUp(2*t*r/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),i=e-n.left,r=t-n.top,o=n.width,a=n.height;this._mouse.x=i/o*2-1,this._mouse.y=-(r/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Bn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Bn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-Bn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._rotateStart.set(n,i)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panStart.set(n,i)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,r=Math.sqrt(n*n+i*i);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),r=.5*(e.pageY+n.y);this._rotateEnd.set(i,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Bn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Bn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panEnd.set(n,i)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,r=Math.sqrt(n*n+i*i);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const o=(e.pageX+t.x)*.5,a=(e.pageY+t.y)*.5;this._updateZoomParameters(o,a)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new et,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function I3(s){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(s.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(s)&&(this._addPointer(s),s.pointerType==="touch"?this._onTouchStart(s):this._onMouseDown(s)))}function z3(s){this.enabled!==!1&&(s.pointerType==="touch"?this._onTouchMove(s):this._onMouseMove(s))}function B3(s){switch(this._removePointer(s),this._pointers.length){case 0:this.domElement.releasePointerCapture(s.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(su),this.state=on.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function O3(s){let e;switch(s.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case Ti.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(s),this.state=on.DOLLY;break;case Ti.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=on.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=on.ROTATE}break;case Ti.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=on.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=on.PAN}break;default:this.state=on.NONE}this.state!==on.NONE&&this.dispatchEvent(dc)}function k3(s){switch(this.state){case on.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(s);break;case on.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(s);break;case on.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(s);break}}function V3(s){this.enabled===!1||this.enableZoom===!1||this.state!==on.NONE||(s.preventDefault(),this.dispatchEvent(dc),this._handleMouseWheel(this._customWheelEvent(s)),this.dispatchEvent(su))}function H3(s){this.enabled!==!1&&this._handleKeyDown(s)}function G3(s){switch(this._trackPointer(s),this._pointers.length){case 1:switch(this.touches.ONE){case Is.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(s),this.state=on.TOUCH_ROTATE;break;case Is.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(s),this.state=on.TOUCH_PAN;break;default:this.state=on.NONE}break;case 2:switch(this.touches.TWO){case Is.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(s),this.state=on.TOUCH_DOLLY_PAN;break;case Is.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(s),this.state=on.TOUCH_DOLLY_ROTATE;break;default:this.state=on.NONE}break;default:this.state=on.NONE}this.state!==on.NONE&&this.dispatchEvent(dc)}function W3(s){switch(this._trackPointer(s),this.state){case on.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(s),this.update();break;case on.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(s),this.update();break;case on.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(s),this.update();break;case on.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(s),this.update();break;default:this.state=on.NONE}}function X3(s){this.enabled!==!1&&s.preventDefault()}function j3(s){s.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function q3(s){s.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var $3=Object.defineProperty,Y3=(s,e,t)=>e in s?$3(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Zt=(s,e,t)=>Y3(s,typeof e!="symbol"?e+"":e,t);const au=(s,e)=>{const[t,n]=e.split("-");return Object.assign(s.style,{left:n==="left"?"0":n==="center"?"50%":"",right:n==="right"?"0":"",top:t==="top"?"0":t==="bottom"?"":"50%",bottom:t==="bottom"?"0":"",transform:`${n==="center"?"translateX(-50%)":""} ${t==="center"?"translateY(-50%)":""}`}),e},J3=({placement:s,size:e,offset:t,id:n,className:i})=>{const r=document.createElement("div"),{top:o,left:a,right:l,bottom:c}=t;return Object.assign(r.style,{id:n,position:"absolute",zIndex:"1000",height:`${e}px`,width:`${e}px`,margin:`${o}px ${l}px ${c}px ${a}px`,borderRadius:"100%"}),au(r,s),n&&(r.id=n),i&&(r.className=i),r},K3=s=>{const e=typeof s=="string"?document.querySelector(s):s;if(!e)throw Error("Invalid DOM element");return e};function Nl(s,e,t){return Math.max(e,Math.min(t,s))}const Z3=[["x",0,3],["y",1,4],["z",2,5]],Xh=new I;function jh({isSphere:s},e,t){s&&(Xh.set(0,0,1).applyQuaternion(t.quaternion),Z3.forEach(([n,i,r])=>{const o=Xh[n];let a=e[i],l=a.userData.opacity;a.material.opacity=Nl(o>=0?l:l/2,0,1),a=e[r],l=a.userData.opacity,a.material.opacity=Nl(o>=0?l/2:l,0,1)}))}const Q3=(s,e,t=10)=>Math.abs(s.clientX-e.x)<t&&Math.abs(s.clientY-e.y)<t,qh=new Y1,$h=new et,Yh=(s,e,t,n)=>{$h.set((s.clientX-e.left)/e.width*2-1,-((s.clientY-e.top)/e.height)*2+1),qh.setFromCamera($h,t);const i=qh.intersectObjects(n,!1),r=i.length?i[0]:null;return!r||!r.object.visible?null:r},Po=1e-6,e4=2*Math.PI,ou=["x","y","z"],br=[...ou,"nx","ny","nz"],t4=["x","z","y","nx","nz","ny"],n4=["z","x","y","nz","nx","ny"],Ul="Right",ba="Top",Il="Front",zl="Left",Sa="Bottom",Bl="Back",i4=[Ul,ba,Il,zl,Sa,Bl].map(s=>s.toLocaleLowerCase()),lu=1.3,Jh=(s,e=!0)=>{const{material:t,userData:n}=s,{color:i,opacity:r}=e?n.hover:n;t.color.set(i),t.opacity=r},ns=s=>JSON.parse(JSON.stringify(s)),s4=s=>{const e=s.type||"sphere",t=e==="sphere",n=s.resolution||t?64:128,i=ln.DEFAULT_UP,r=i.z===1,o=i.x===1,{container:a}=s;s.container=void 0,s=JSON.parse(JSON.stringify(s)),s.container=a;const l=r?t4:o?n4:br;i4.forEach((u,h)=>{s[u]&&(s[l[h]]=s[u])});const c={enabled:!0,color:16777215,opacity:1,scale:.7,labelColor:2236962,line:!1,border:{size:0,color:14540253},hover:{color:t?16777215:9688043,labelColor:2236962,opacity:1,scale:.7,border:{size:0,color:14540253}}},d={line:!1,scale:t?.45:.7,hover:{scale:t?.5:.7}},m={type:e,container:document.body,size:128,placement:"top-right",resolution:n,lineWidth:4,radius:t?1:.2,smoothness:18,animated:!0,speed:1,background:{enabled:!0,color:t?16777215:14739180,opacity:t?0:1,hover:{color:t?16777215:14739180,opacity:t?.2:1}},font:{family:"sans-serif",weight:900},offset:{top:10,left:10,bottom:10,right:10},corners:{enabled:!t,color:t?15915362:16777215,opacity:1,scale:t?.15:.2,radius:1,smoothness:18,hover:{color:t?16777215:9688043,opacity:1,scale:t?.2:.225}},edges:{enabled:!t,color:t?15915362:16777215,opacity:t?1:0,radius:t?1:.125,smoothness:18,scale:t?.15:1,hover:{color:t?16777215:9688043,opacity:1,scale:t?.2:1}},x:{...ns(c),...t?{label:"X",color:16725587,line:!0}:{label:o?ba:Ul}},y:{...ns(c),...t?{label:"Y",color:9100032,line:!0}:{label:r||o?Il:ba}},z:{...ns(c),...t?{label:"Z",color:2920447,line:!0}:{label:r?ba:o?Ul:Il}},nx:{...ns(d),label:t?"":o?Sa:zl},ny:{...ns(d),label:t?"":r||o?Bl:Sa},nz:{...ns(d),label:t?"":r?Sa:o?zl:Bl}};return Ol(s,m),ou.forEach(u=>Ol(s[`n${u}`],ns(s[u]))),{...s,isSphere:t}};function Ol(s,...e){if(s instanceof HTMLElement||typeof s!="object"||s===null)return s;for(const t of e)for(const n in t)n!=="container"&&n in t&&(s[n]===void 0?s[n]=t[n]:typeof t[n]=="object"&&!Array.isArray(t[n])&&(s[n]=Ol(s[n]||{},t[n])));return s}const r4=(s,e=2)=>{const t=new Tt,n=e*2,{isSphere:i,resolution:r,radius:o,font:a,corners:l,edges:c}=s,d=br.map(R=>({...s[R],radius:o}));i&&l.enabled&&d.push(l),i&&c.enabled&&d.push(c);const m=document.createElement("canvas"),u=m.getContext("2d");m.width=r*2+n*2,m.height=r*d.length+n*d.length;const[h,g]=F(d,r,a);d.forEach(({radius:R,label:P,color:A,labelColor:E,border:L,hover:{color:B,labelColor:H,border:Q}},ae)=>{const G=r*ae+ae*n+e;S(e,G,e,r,R,P,L,A,E),S(r+e*3,G,e,r,R,P,Q??L,B??A,H??E)});const _=d.length,p=e/(r*2),f=e/(r*6),v=1/_,b=new u1(m);return b.repeat.set(.5-2*p,v-2*f),b.offset.set(p,1-f),Object.assign(b,{colorSpace:qt,wrapS:di,wrapT:di,userData:{offsetX:p,offsetY:f,cellHeight:v}}),b;function S(R,P,A,E,L,B,H,Q,ae){if(L=L*(E/2),Q!=null&&Q!==""&&(G(),u.fillStyle=t.set(Q).getStyle(),u.fill()),H&&H.size){const le=H.size*E/2;R+=le,P+=le,E-=H.size*E,L=Math.max(0,L-le),G(),u.strokeStyle=t.set(H.color).getStyle(),u.lineWidth=H.size*E,u.stroke()}B&&C(u,R+E/2,P+(E+A)/2,B,t.set(ae).getStyle());function G(){u.beginPath(),u.moveTo(R+L,P),u.lineTo(R+E-L,P),u.arcTo(R+E,P,R+E,P+L,L),u.lineTo(R+E,P+E-L),u.arcTo(R+E,P+E,R+E-L,P+E,L),u.lineTo(R+L,P+E),u.arcTo(R,P+E,R,P+E-L,L),u.lineTo(R,P+L),u.arcTo(R,P,R+L,P,L),u.closePath()}}function F(R,P,A){const E=[...R].sort((Ee,be)=>{var ge,se;return(((ge=Ee.label)==null?void 0:ge.length)||0)-(((se=be.label)==null?void 0:se.length)||0)}).pop().label,{family:L,weight:B}=A,H=i?Math.sqrt(Math.pow(P*.7,2)/2):P;let Q=H,ae=0,G=0;do{u.font=`${B} ${Q}px ${L}`;const Ee=u.measureText(E);ae=Ee.width,G=Ee.fontBoundingBoxDescent,Q--}while(ae>H&&Q>0);const le=H/G,Z=Math.min(H/ae,le),ve=Math.floor(Q*Z);return[`${B} ${ve}px ${L}`,le]}function C(R,P,A,E,L){R.font=h,R.textAlign="center",R.textBaseline="middle",R.fillStyle=L,R.fillText(E,P,A+(i?g:0))}},a4=(s,e)=>s.offset.x=(e?.5:0)+s.userData.offsetX,fc=(s,e)=>{const{offset:t,userData:{offsetY:n,cellHeight:i}}=s;t.y=1-(e+1)*i+n};function pc(s,e,t=2,n=2){const i=t/2-s,r=n/2-s,o=s/t,a=(t-s)/t,l=s/n,c=(n-s)/n,d=[i,r,0,-i,r,0,-i,-r,0,i,-r,0],m=[a,c,o,c,o,l,a,l],u=[3*(e+1)+3,3*(e+1)+4,e+4,e+5,2*(e+1)+4,2,1,2*(e+1)+3,3,4*(e+1)+3,4,0],h=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11].map(C=>u[C]);let g,_,p,f,v,b,S,F;for(let C=0;C<4;C++){f=C<1||C>2?i:-i,v=C<2?r:-r,b=C<1||C>2?a:o,S=C<2?c:l;for(let R=0;R<=e;R++)g=Math.PI/2*(C+R/e),_=Math.cos(g),p=Math.sin(g),d.push(f+s*_,v+s*p,0),m.push(b+o*_,S+l*p),R<e&&(F=(e+1)*C+R+4,h.push(C,F,F+1))}return new hn().setIndex(new mn(new Uint32Array(h),1)).setAttribute("position",new mn(new Float32Array(d),3)).setAttribute("uv",new mn(new Float32Array(m),2))}const o4=(s,e)=>{const t=new I,{isSphere:n,radius:i,smoothness:r}=s,o=pc(i,r);return br.map((a,l)=>{const c=l<3,d=br[l],m=l?e.clone():e;fc(m,l);const{enabled:u,scale:h,opacity:g,hover:_}=s[d],p={map:m,opacity:g,transparent:!0},f=n?new ec(new za(p)):new zt(o,new qi(p)),v=c?d:d[1];return f.position[v]=(c?1:-1)*(n?lu:1),n||f.lookAt(t.copy(f.position).multiplyScalar(1.7)),f.scale.setScalar(h),f.renderOrder=1,f.visible=u,f.userData={scale:h,opacity:g,hover:_},f})},l4=(s,e)=>{const{isSphere:t,corners:n}=s;if(!n.enabled)return[];const{color:i,opacity:r,scale:o,radius:a,smoothness:l,hover:c}=n,d=t?null:pc(a,l),m={transparent:!0,opacity:r},u=[1,1,1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1].map(g=>g*.85),h=new I;return Array(u.length/3).fill(0).map((g,_)=>{if(t){const v=e.clone();fc(v,6),m.map=v}else m.color=i;const p=t?new ec(new za(m)):new zt(d,new qi(m)),f=_*3;return p.position.set(u[f],u[f+1],u[f+2]),t&&p.position.normalize().multiplyScalar(1.7),p.scale.setScalar(o),p.lookAt(h.copy(p.position).multiplyScalar(2)),p.renderOrder=1,p.userData={color:i,opacity:r,scale:o,hover:c},p})},c4=(s,e,t)=>{const{isSphere:n,edges:i}=s;if(!i.enabled)return[];const{color:r,opacity:o,scale:a,hover:l,radius:c,smoothness:d}=i,m=n?null:pc(c,d,1.2,.25),u={transparent:!0,opacity:o},h=[0,1,1,0,-1,1,1,0,1,-1,0,1,0,1,-1,0,-1,-1,1,0,-1,-1,0,-1,1,1,0,1,-1,0,-1,1,0,-1,-1,0].map(p=>p*.925),g=new I,_=new I(0,1,0);return Array(h.length/3).fill(0).map((p,f)=>{if(n){const S=e.clone();fc(S,t),u.map=S}else u.color=r;const v=n?new ec(new za(u)):new zt(m,new qi(u)),b=f*3;return v.position.set(h[b],h[b+1],h[b+2]),n&&v.position.normalize().multiplyScalar(1.7),v.scale.setScalar(a),v.up.copy(_),v.lookAt(g.copy(v.position).multiplyScalar(2)),!n&&!v.position.y&&(v.rotation.z=Math.PI/2),v.renderOrder=1,v.userData={color:r,opacity:o,scale:a,hover:l},v})};function h4(s,e=!1){const t=s[0].index!==null,n=new Set(Object.keys(s[0].attributes)),i=new Set(Object.keys(s[0].morphAttributes)),r={},o={},a=s[0].morphTargetsRelative,l=new hn;let c=0;for(let d=0;d<s.length;++d){const m=s[d];let u=0;if(t!==(m.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const h in m.attributes){if(!n.has(h))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+'. All geometries must have compatible attributes; make sure "'+h+'" attribute exists among all geometries, or in none of them.'),null;r[h]===void 0&&(r[h]=[]),r[h].push(m.attributes[h]),u++}if(u!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". Make sure all geometries have the same number of attributes."),null;if(a!==m.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const h in m.morphAttributes){if(!i.has(h))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". .morphAttributes must be consistent throughout all geometries."),null;o[h]===void 0&&(o[h]=[]),o[h].push(m.morphAttributes[h])}if(e){let h;if(t)h=m.index.count;else if(m.attributes.position!==void 0)h=m.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+d+". The geometry must have either an index or a position attribute"),null;l.addGroup(c,h,d),c+=h}}if(t){let d=0;const m=[];for(let u=0;u<s.length;++u){const h=s[u].index;for(let g=0;g<h.count;++g)m.push(h.getX(g)+d);d+=s[u].attributes.position.count}l.setIndex(m)}for(const d in r){const m=Kh(r[d]);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+d+" attribute."),null;l.setAttribute(d,m)}for(const d in o){const m=o[d][0].length;if(m===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[d]=[];for(let u=0;u<m;++u){const h=[];for(let _=0;_<o[d].length;++_)h.push(o[d][_][u]);const g=Kh(h);if(!g)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+d+" morphAttribute."),null;l.morphAttributes[d].push(g)}}return l}function Kh(s){let e,t,n,i=-1,r=0;for(let c=0;c<s.length;++c){const d=s[c];if(e===void 0&&(e=d.array.constructor),e!==d.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=d.itemSize),t!==d.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(n===void 0&&(n=d.normalized),n!==d.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=d.gpuType),i!==d.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=d.count*t}const o=new e(r),a=new mn(o,t,n);let l=0;for(let c=0;c<s.length;++c){const d=s[c];if(d.isInterleavedBufferAttribute){const m=l/t;for(let u=0,h=d.count;u<h;u++)for(let g=0;g<t;g++){const _=d.getComponent(u,g);a.setComponent(u+m,g,_)}}else o.set(d.array,l);l+=d.count*t}return i!==void 0&&(a.gpuType=i),a}const u4=(s,e)=>{const{isSphere:t,background:{enabled:n,color:i,opacity:r,hover:o}}=e;let a;const l=new qi({color:i,side:In,opacity:r,transparent:!0,depthWrite:!1});if(!n)return null;if(t)a=new zt(new Oa(1.8,64,64),l);else{let c;s.forEach(d=>{const m=d.scale.x;d.scale.setScalar(.9),d.updateMatrix();const u=d.geometry.clone();u.applyMatrix4(d.matrix),c=c?h4([c,u]):u,d.scale.setScalar(m)}),a=new zt(c,l)}return a.userData={color:i,opacity:r,hover:o},a},Zh=new Fn,aa=new I;class cu extends j1{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new It(e,3)),this.setAttribute("uv",new It(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Dl(t,6,1);return this.setAttribute("instanceStart",new pi(n,3,0)),this.setAttribute("instanceEnd",new pi(n,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Dl(t,6,1);return this.setAttribute("instanceColorStart",new pi(n,3,0)),this.setAttribute("instanceColorEnd",new pi(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new T1(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Fn);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),Zh.setFromBufferAttribute(t),this.boundingBox.union(Zh))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Fi),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)aa.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(aa)),aa.fromBufferAttribute(t,r),i=Math.max(i,n.distanceToSquared(aa));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}Je.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new et(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};kn.line={uniforms:Ql.merge([Je.common,Je.fog,Je.line]),vertexShader:`
|
|
3828
3828
|
#include <common>
|
|
3829
3829
|
#include <color_pars_vertex>
|
|
3830
3830
|
#include <fog_pars_vertex>
|
|
@@ -4194,14 +4194,14 @@ void main() {
|
|
|
4194
4194
|
#include <premultiplied_alpha_fragment>
|
|
4195
4195
|
|
|
4196
4196
|
}
|
|
4197
|
-
`};class mc extends Li{constructor(e){super({type:"LineMaterial",uniforms:Ql.clone(kn.line.uniforms),vertexShader:kn.line.vertexShader,fragmentShader:kn.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const Fo=new Xt,Qh=new I,e0=new I,En=new Xt,An=new Xt,ci=new Xt,Uo=new I,No=new Et,wn=new J1,t0=new I,oa=new Fn,la=new Fi,hi=new Xt;let ui,os;function n0(s,e,t){return hi.set(0,0,-e,1).applyMatrix4(s.projectionMatrix),hi.multiplyScalar(1/hi.w),hi.x=os/t.width,hi.y=os/t.height,hi.applyMatrix4(s.projectionMatrixInverse),hi.multiplyScalar(1/hi.w),Math.abs(Math.max(hi.x,hi.y))}function d4(s,e){const t=s.matrixWorld,n=s.geometry,i=n.attributes.instanceStart,r=n.attributes.instanceEnd,o=Math.min(n.instanceCount,i.count);for(let a=0,l=o;a<l;a++){wn.start.fromBufferAttribute(i,a),wn.end.fromBufferAttribute(r,a),wn.applyMatrix4(t);const c=new I,d=new I;ui.distanceSqToSegment(wn.start,wn.end,d,c),d.distanceTo(c)<os*.5&&e.push({point:d,pointOnLine:c,distance:ui.origin.distanceTo(d),object:s,face:null,faceIndex:a,uv:null,uv1:null})}}function f4(s,e,t){const n=e.projectionMatrix,i=s.material.resolution,r=s.matrixWorld,o=s.geometry,a=o.attributes.instanceStart,l=o.attributes.instanceEnd,c=Math.min(o.instanceCount,a.count),d=-e.near;ui.at(1,ci),ci.w=1,ci.applyMatrix4(e.matrixWorldInverse),ci.applyMatrix4(n),ci.multiplyScalar(1/ci.w),ci.x*=i.x/2,ci.y*=i.y/2,ci.z=0,Uo.copy(ci),No.multiplyMatrices(e.matrixWorldInverse,r);for(let m=0,u=c;m<u;m++){if(En.fromBufferAttribute(a,m),An.fromBufferAttribute(l,m),En.w=1,An.w=1,En.applyMatrix4(No),An.applyMatrix4(No),En.z>d&&An.z>d)continue;if(En.z>d){const f=En.z-An.z,x=(En.z-d)/f;En.lerp(An,x)}else if(An.z>d){const f=An.z-En.z,x=(An.z-d)/f;An.lerp(En,x)}En.applyMatrix4(n),An.applyMatrix4(n),En.multiplyScalar(1/En.w),An.multiplyScalar(1/An.w),En.x*=i.x/2,En.y*=i.y/2,An.x*=i.x/2,An.y*=i.y/2,wn.start.copy(En),wn.start.z=0,wn.end.copy(An),wn.end.z=0;const h=wn.closestPointToPointParameter(Uo,!0);wn.at(h,t0);const g=Ei.lerp(En.z,An.z,h),_=g>=-1&&g<=1,p=Uo.distanceTo(t0)<os*.5;if(_&&p){wn.start.fromBufferAttribute(a,m),wn.end.fromBufferAttribute(l,m),wn.start.applyMatrix4(r),wn.end.applyMatrix4(r);const f=new I,x=new I;ui.distanceSqToSegment(wn.start,wn.end,x,f),t.push({point:x,pointOnLine:f,distance:ui.origin.distanceTo(x),object:s,face:null,faceIndex:m,uv:null,uv1:null})}}}class p4 extends zt{constructor(e=new cu,t=new mc({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let o=0,a=0,l=t.count;o<l;o++,a+=2)Qh.fromBufferAttribute(t,o),e0.fromBufferAttribute(n,o),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+Qh.distanceTo(e0);const r=new Dl(i,2,1);return e.setAttribute("instanceDistanceStart",new pi(r,1,0)),e.setAttribute("instanceDistanceEnd",new pi(r,1,1)),this}raycast(e,t){const n=this.material.worldUnits,i=e.camera;i===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const r=e.params.Line2!==void 0&&e.params.Line2.threshold||0;ui=e.ray;const o=this.matrixWorld,a=this.geometry,l=this.material;os=l.linewidth+r,a.boundingSphere===null&&a.computeBoundingSphere(),la.copy(a.boundingSphere).applyMatrix4(o);let c;if(n)c=os*.5;else{const m=Math.max(i.near,la.distanceToPoint(ui.origin));c=n0(i,m,l.resolution)}if(la.radius+=c,ui.intersectsSphere(la)===!1)return;a.boundingBox===null&&a.computeBoundingBox(),oa.copy(a.boundingBox).applyMatrix4(o);let d;if(n)d=os*.5;else{const m=Math.max(i.near,oa.distanceToPoint(ui.origin));d=n0(i,m,l.resolution)}oa.expandByScalar(d),ui.intersectsBox(oa)!==!1&&(n?d4(this,t):f4(this,i,t))}onBeforeRender(e){const t=this.material.uniforms;t&&t.resolution&&(e.getViewport(Fo),this.material.uniforms.resolution.value.set(Fo.z,Fo.w))}}class hu extends cu{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setPositions(n),this}setColors(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setColors(n),this}setFromPoints(e){const t=e.length-1,n=new Float32Array(6*t);for(let i=0;i<t;i++)n[6*i]=e[i].x,n[6*i+1]=e[i].y,n[6*i+2]=e[i].z||0,n[6*i+3]=e[i+1].x,n[6*i+4]=e[i+1].y,n[6*i+5]=e[i+1].z||0;return super.setPositions(n),this}fromLine(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class m4 extends p4{constructor(e=new hu,t=new mc({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}const g4=s=>{const e=new Tt,t=[],n=[],{isSphere:i}=s;if(br.forEach((a,l)=>{const{enabled:c,line:d,scale:m,color:u}=s[a];if(!c||!d)return;const h=l<3?1:-1,g=(i?lu-m/2:.975)*h;t.push(a.includes("x")?g:0,a.includes("y")?g:0,a.includes("z")?g:0,0,0,0);const _=e.set(u).toArray();n.push(..._,..._)}),!t.length)return null;const r=new hu().setPositions(t).setColors(n),o=new mc({linewidth:s.lineWidth,vertexColors:!0,resolution:new et(window.innerWidth,window.innerHeight)});return new m4(r,o).computeLineDistances()},_4=s=>{const{corners:e,edges:t}=s,n=[],i=r4(s),r=o4(s,i);n.push(...r),e.enabled&&n.push(...l4(s,i)),t.enabled&&n.push(...c4(s,i,e.enabled?7:6));const o=u4(r,s),a=g4(s);return[n,o,a]},cr=(s,e=!0)=>{const{material:t,userData:n}=s,{opacity:i,color:r,scale:o}=e?n.hover:n;s.scale.setScalar(o),t.opacity=i,t.map?a4(t.map,e):t.color.set(r)},Fs=new Et,i0=new Pl,v4=new et,is=new I,s0=new Xt;class uu extends ln{constructor(e,t,n={}){super(),Zt(this,"enabled",!0),Zt(this,"camera"),Zt(this,"renderer"),Zt(this,"options"),Zt(this,"target",new I),Zt(this,"animated",!0),Zt(this,"speed",1),Zt(this,"animating",!1),Zt(this,"_options"),Zt(this,"_intersections"),Zt(this,"_background",null),Zt(this,"_viewport",[0,0,0,0]),Zt(this,"_originalViewport",[0,0,0,0]),Zt(this,"_originalScissor",[0,0,0,0]),Zt(this,"_scene"),Zt(this,"_camera"),Zt(this,"_container"),Zt(this,"_domElement"),Zt(this,"_domRect"),Zt(this,"_dragging",!1),Zt(this,"_distance",0),Zt(this,"_clock",new $1),Zt(this,"_targetQuaternion",new Vn),Zt(this,"_quaternionStart",new Vn),Zt(this,"_quaternionEnd",new Vn),Zt(this,"_pointerStart",new et),Zt(this,"_focus",null),Zt(this,"_placement"),Zt(this,"_controls"),Zt(this,"_controlsListeners"),this.camera=e,this.renderer=t,this._scene=new Ia().add(this),this.set(n)}get placement(){return this._placement}set placement(e){this._placement=au(this._domElement,e),this.domUpdate()}set(e={}){this.dispose(),this.options=e,this._options=s4(e),this._camera=this._options.isSphere?new Ha(-1.8,1.8,1.8,-1.8,5,10):new bn(26,1,5,10),this._camera.position.set(0,0,7);const[t,n,i]=_4(this._options);n&&this.add(n),i&&this.add(i),this.add(...t),this._background=n,this._intersections=t;const{container:r,animated:o,speed:a}=this._options;return this.animated=o,this.speed=a,this._container=r?K3(r):document.body,this._domElement=J3(this._options),this._domElement.onpointerdown=l=>this._onPointerDown(l),this._domElement.onpointermove=l=>this._onPointerMove(l),this._domElement.onpointerleave=()=>this._onPointerLeave(),this._container.appendChild(this._domElement),this._controls&&this.attachControls(this._controls),this.update(),this._updateOrientation(!0),this}render(){this.animating&&this._animate();const{renderer:e,_viewport:t}=this,n=e.getScissorTest(),i=e.autoClear;return e.autoClear=!1,e.setViewport(...t),n&&e.setScissor(...t),e.clear(!1,!0,!1),e.render(this._scene,this._camera),e.setViewport(...this._originalViewport),n&&e.setScissor(...this._originalScissor),e.autoClear=i,this}domUpdate(){this._domRect=this._domElement.getBoundingClientRect();const e=this.renderer,t=this._domRect,n=e.domElement.getBoundingClientRect();return this._viewport.splice(0,4,t.left-n.left,e.domElement.clientHeight-(t.top-n.top+t.height),t.width,t.height),e.getViewport(s0).toArray(this._originalViewport),e.getScissorTest()&&e.getScissor(s0).toArray(this._originalScissor),this}cameraUpdate(){return this._updateOrientation(),this}update(e=!0){return e&&this._controls&&this._controls.update(),this.domUpdate().cameraUpdate()}attachControls(e){return this.detachControls(),this.target=e.target,this._controlsListeners={start:()=>e.enabled=!1,end:()=>e.enabled=!0,change:()=>this.update(!1)},this.addEventListener("start",this._controlsListeners.start),this.addEventListener("end",this._controlsListeners.end),e.addEventListener("change",this._controlsListeners.change),this._controls=e,this}detachControls(){if(!(!this._controlsListeners||!this._controls))return this.target=new I().copy(this._controls.target),this.removeEventListener("start",this._controlsListeners.start),this.removeEventListener("end",this._controlsListeners.end),this._controls.removeEventListener("change",this._controlsListeners.change),this._controlsListeners=void 0,this._controls=void 0,this}dispose(){var e;this.detachControls(),this.children.forEach(t=>{var n,i,r,o;this.remove(t);const a=t;(n=a.material)==null||n.dispose(),(r=(i=a.material)==null?void 0:i.map)==null||r.dispose(),(o=a.geometry)==null||o.dispose()}),(e=this._domElement)==null||e.remove()}_updateOrientation(e=!0){e&&(this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()),jh(this._options,this._intersections,this.camera)}_animate(){const{position:e,quaternion:t}=this.camera;if(e.set(0,0,1),!this.animated){e.applyQuaternion(this._quaternionEnd).multiplyScalar(this._distance).add(this.target),t.copy(this._targetQuaternion),this._updateOrientation(),this.animating=!1,this.dispatchEvent({type:"change"}),this.dispatchEvent({type:"end"});return}this._controls&&(this._controls.enabled=!1);const n=this._clock.getDelta()*e4*this.speed;this._quaternionStart.rotateTowards(this._quaternionEnd,n),e.applyQuaternion(this._quaternionStart).multiplyScalar(this._distance).add(this.target),t.rotateTowards(this._targetQuaternion,n),this._updateOrientation(),requestAnimationFrame(()=>this.dispatchEvent({type:"change"})),this._quaternionStart.angleTo(this._quaternionEnd)<Po&&(this._controls&&(this._controls.enabled=!0),this.animating=!1,this.dispatchEvent({type:"end"}))}_setOrientation(e){const t=this.camera,n=this.target;is.copy(e).multiplyScalar(this._distance),Fs.setPosition(is).lookAt(is,this.position,this.up),this._targetQuaternion.setFromRotationMatrix(Fs),is.add(n),Fs.lookAt(is,n,this.up),this._quaternionEnd.setFromRotationMatrix(Fs),Fs.setPosition(t.position).lookAt(t.position,n,this.up),this._quaternionStart.setFromRotationMatrix(Fs),this.animating=!0,this._clock.start(),this.dispatchEvent({type:"start"})}_onPointerDown(e){if(!this.enabled)return;const t=l=>{if(!this._dragging){if(Q3(l,this._pointerStart))return;this._dragging=!0}const c=v4.set(l.clientX,l.clientY).sub(this._pointerStart).multiplyScalar(1/this._domRect.width*Math.PI),d=this.coordinateConversion(is.subVectors(this.camera.position,this.target)),m=i0.setFromVector3(d);m.theta=o-c.x,m.phi=Ul(a-c.y,Po,Math.PI-Po),this.coordinateConversion(this.camera.position.setFromSpherical(m),!0).add(this.target),this.camera.lookAt(this.target),this.quaternion.copy(this.camera.quaternion).invert(),this._updateOrientation(!1),this.dispatchEvent({type:"change"})},n=()=>{if(document.removeEventListener("pointermove",t,!1),document.removeEventListener("pointerup",n,!1),!this._dragging)return this._handleClick(e);this._focus&&(cr(this._focus,!1),this._focus=null),this._dragging=!1,this.dispatchEvent({type:"end"})};if(this.animating)return;e.preventDefault(),this._pointerStart.set(e.clientX,e.clientY);const i=this.coordinateConversion(is.subVectors(this.camera.position,this.target)),r=i0.setFromVector3(i),o=r.theta,a=r.phi;this._distance=r.radius,document.addEventListener("pointermove",t,!1),document.addEventListener("pointerup",n,!1),this.dispatchEvent({type:"start"})}coordinateConversion(e,t=!1){const{x:n,y:i,z:r}=e,o=ln.DEFAULT_UP;return o.x===1?t?e.set(i,r,n):e.set(r,n,i):o.z===1?t?e.set(r,n,i):e.set(i,r,n):e}_onPointerMove(e){!this.enabled||this._dragging||(this._background&&Jh(this._background,!0),this._handleHover(e))}_onPointerLeave(){!this.enabled||this._dragging||(this._background&&Jh(this._background,!1),this._focus&&cr(this._focus,!1),this._domElement.style.cursor="")}_handleClick(e){const t=Yh(e,this._domRect,this._camera,this._intersections);this._focus&&(cr(this._focus,!1),this._focus=null),t&&(this._setOrientation(t.object.position),this.dispatchEvent({type:"change"}))}_handleHover(e){const t=Yh(e,this._domRect,this._camera,this._intersections),n=(t==null?void 0:t.object)||null;this._focus!==n&&(this._domElement.style.cursor=n?"pointer":"",this._focus&&cr(this._focus,!1),(this._focus=n)?cr(n,!0):jh(this._options,this._intersections,this.camera))}}function y4(s){let e=null,t=null,n=null,i=null,r=null,o=null,a=null,l=null;const d=1e3/30;let m=0;const u=v.ref([]),h=v.ref(new I),g=v.ref(new I),_=()=>{if(!s.value)return;e=new Ia,e.background=new Tt(15790320);const D=s.value;t=new bn(75,D.clientWidth/D.clientHeight,.1,1e4),t.position.set(8,-8,6),t.up.set(0,0,1),t.lookAt(0,0,0),n=new iu({antialias:!0,alpha:!0}),n.setSize(D.clientWidth,D.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=Hl,n.toneMapping=Gl,n.toneMappingExposure=1,n.outputColorSpace=qt,D.appendChild(n.domElement),i=new ru(t,n.domElement),i.enableDamping=!0,i.dampingFactor=.05,i.mouseButtons={LEFT:null,MIDDLE:Ti.PAN,RIGHT:Ti.ROTATE},i.panSpeed=.7,r=new uu(t,n,{container:D,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),r.attachControls(i),x(),y()},p=(D,O)=>{a&&(e.remove(a),a.dispose()),l&&(e.remove(l),l.geometry.dispose(),l.material.dispose());const V=Math.min(Math.max(Math.floor(D/20),30),40);a=new K0(D,V,13421772,14540253),a.rotateX(Math.PI/2),a.position.copy(O),e.add(a);const Q=new Di(D,D),se=new X0({opacity:.3,color:0});l=new zt(Q,se),l.position.copy(O),l.position.z-=.01,l.receiveShadow=!0,e.add(l)},f=()=>{if(u.value.length===0)return;const D=new Fn;let O=!1;if(u.value.forEach(Z=>{if(Z.userData.boundingBox)D.union(Z.userData.boundingBox),O=!0;else if(Z.userData.modelId&&modelBoundingBoxes.has(Z.userData.modelId)){const ge=modelBoundingBoxes.get(Z.userData.modelId);D.union(ge.box),O=!0}else D.expandByObject(Z),O=!0}),!O){console.warn("无法计算包围盒,网格更新失败");return}const V=D.getSize(new I),Q=D.getCenter(new I),se=Math.max(V.x,V.y,V.z),G=Math.max(se*8,50),ce=new I(Q.x,Q.y,D.min.z);p(G,ce)},x=()=>{const D=new cc(4210752,.6);e.add(D);const O=new gr(16777215,2);O.position.set(10,10,8),O.castShadow=!0,O.shadow.mapSize.width=4096,O.shadow.mapSize.height=4096,O.shadow.camera.near=.5,O.shadow.camera.far=50,O.shadow.camera.left=-50,O.shadow.camera.right=50,O.shadow.camera.top=50,O.shadow.camera.bottom=-50,e.add(O);const V=new gr(16777215,.8);V.position.set(-8,-8,6),e.add(V);const Q=new gr(16777215,.6);Q.position.set(0,-15,2),e.add(Q);const se=new J0(16777215,4473924,.8);e.add(se);const G=new Pa(16777215,1,50);G.position.set(15,15,15),e.add(G);const ce=new Pa(16777215,.5,50);ce.position.set(-15,-15,15),e.add(ce)},y=()=>{o=requestAnimationFrame(y),i&&i.update();const D=performance.now(),O=D-m;O<d||(m=D-O%d,n&&e&&t&&n.render(e,t),r&&r.render())},S=D=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(V=>{D[V]&&D[V].dispose&&D[V].dispose()}),D.dispose&&D.dispose()},U=D=>{D==null||D.traverse(O=>{O.geometry&&O.geometry.dispose(),O.material&&(Array.isArray(O.material)?O.material.forEach(V=>{S(V)}):S(O.material))})};return{currentModels:u,initialCameraPosition:h,initialTargetPosition:g,initThreeJS:_,handleResize:()=>{if(!s.value||!t||!n||!r)return;const D=s.value,O=D.clientWidth,V=D.clientHeight;t.aspect=O/V,t.updateProjectionMatrix(),n.setSize(O,V),r.update()},fitCameraToAllModels:D=>{if(!t||!i||u.value.length===0)return;const O=new Fn;let V=!1;if(u.value.forEach(ge=>{if(ge.userData.boundingBox)O.union(ge.userData.boundingBox),V=!0;else if(ge.userData.modelId&&D.has(ge.userData.modelId)){const De=D.get(ge.userData.modelId);O.union(De.box),V=!0}else O.expandByObject(ge),V=!0}),!V){console.warn("无法计算包围盒");return}const Q=O.getSize(new I),se=O.getCenter(new I),ce=Math.max(Q.x,Q.y,Q.z)*.8,Z=new I(se.x+ce,se.y-ce,se.z+ce);t.position.copy(Z),t.lookAt(se),i.target.copy(se),i.update(),h.value.copy(Z),g.value.copy(se),f()},getThreeJSObjects:()=>({scene:e,camera:t,renderer:n,controls:i,gizmo:r}),clearAllModels:()=>{if(!e)return;u.value.forEach(O=>{e.remove(O),U(O)});const D=[];e.children.forEach(O=>{!O.isLight&&!O.isCamera&&O.type!=="GridHelper"&&O!==l&&D.push(O)}),D.forEach(O=>{e.remove(O),U(O)}),u.value=[],f()},cleanup:()=>{o&&cancelAnimationFrame(o),a&&a.dispose(),l&&(l.geometry.dispose(),l.material.dispose()),n&&n.dispose(),i&&i.dispose(),r&&r.dispose()},updateGridForModels:f}}function x4(s,e){const t=v.ref(!1);let n=null,i=12700,r=new I,o=new I,a=new I,l=0,c=null;const d=p=>p<.5?4*p*p*p:1-Math.pow(-2*p+2,3)/2,m=p=>{const f=new I,x=l*1.2,y=new I(a.x+x,a.y,a.z),S=new I(a.x,a.y+x,a.z),U=new I(a.x,a.y-x,a.z);if(p<=.567){const L=p/.567*Math.PI*2;f.x=a.x+Math.cos(L)*x,f.z=a.z+Math.sin(L)*x,f.y=a.y}else if(p<=.724){const C=(p-.567)/.157,L=d(C);f.lerpVectors(y,S,L)}else if(p<=.881){const C=(p-.724)/.157,P=d(C)*Math.PI;f.x=a.x+Math.sin(P)*x,f.y=a.y+Math.cos(P)*x,f.z=a.z}else{const C=(p-.881)/.119,L=d(C);f.lerpVectors(U,r,L)}return f},u=()=>{const{camera:p,controls:f}=s();if(!p||!f)return;n||(n=Date.now());const x=Date.now()-n,y=Math.min(x/i,1);if(y>=1){g();return}const S=m(y);p.position.copy(S),p.lookAt(a),f.target.copy(a),c=requestAnimationFrame(u)},h=()=>{if(e.value.length===0)return;const{camera:p,controls:f}=s();if(!p||!f)return;r.copy(p.position),o.copy(f.target);const x=new Fn;e.value.forEach(E=>{x.expandByObject(E)});const y=x.getSize(new I);a=x.getCenter(new I),l=Math.max(y.x,y.y,y.z)*1.2;const S=new I(a.x+l*1.2,a.y,a.z);f.enabled=!1;const U=p.position.clone(),C=1e3,L=Date.now(),P=()=>{const E=Date.now()-L,A=Math.min(E/C,1),D=d(A);p.position.lerpVectors(U,S,D),p.lookAt(a),f.target.copy(a),A<1?requestAnimationFrame(P):(t.value=!0,n=null,u())};P()},g=()=>{t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{controls:p}=s();p&&(p.enabled=!0,p.target.copy(o))};return{isAnimating:t,toggleAnimation:()=>{if(t.value){t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{camera:p,controls:f}=s();if(!p||!f)return;f.enabled=!0;const x=p.position.clone(),y=f.target.clone(),S=1500,U=Date.now(),C=()=>{const L=Date.now()-U,P=Math.min(L/S,1),E=d(P);p.position.lerpVectors(x,r,E),f.target.lerpVectors(y,o,E),P<1&&requestAnimationFrame(C)};C()}else h()},startAnimation:h,stopAnimation:g}}function M4(s,e){const t=v.ref(!1),n=v.ref("none");let i=[],r=[],o=new Fn,a=new I;const l=()=>{i=[new Jn(new I(1,0,0),0),new Jn(new I(0,1,0),0),new Jn(new I(0,0,1),0)]},c=()=>{o.makeEmpty(),e.value.forEach(_=>{o.expandByObject(_)}),a=o.getCenter(new I)},d=_=>{const p=o.getSize(new I);let f,x,y;_==="x"?(f=new Di(p.z*1.2,p.y*1.2),x=new I(a.x,a.y,a.z),y=new Sn(0,Math.PI/2,0)):_==="y"?(f=new Di(p.x*1.2,p.z*1.2),x=new I(a.x,a.y,a.z),y=new Sn(Math.PI/2,0,0)):_==="z"&&(f=new Di(p.x*1.2,p.y*1.2),x=new I(a.x,a.y,a.z),y=new Sn(0,0,0));const S=new fn({color:8900331,transparent:!0,opacity:.3,side:pn,depthWrite:!1}),U=new zt(f,S);return U.position.copy(x),U.rotation.copy(y),U},m=()=>{if(u(),h(),n.value==="none")return;c();let _=null;if(n.value==="x"?(i[0].constant=-a.x,_=i[0]):n.value==="y"?(i[1].constant=-a.y,_=i[1]):n.value==="z"&&(i[2].constant=-a.z,_=i[2]),_){e.value.forEach(f=>{f.traverse(x=>{x.isMesh&&x.material&&(Array.isArray(x.material)?x.material.forEach(y=>{y.clippingPlanes=[_]}):x.material.clippingPlanes=[_])})});const{scene:p}=s();if(p){const f=d(n.value);p.add(f),r.push(f)}}},u=()=>{e.value.forEach(_=>{_.traverse(p=>{p.isMesh&&p.material&&(Array.isArray(p.material)?p.material.forEach(f=>{f.clippingPlanes=[]}):p.material.clippingPlanes=[])})})},h=()=>{const{scene:_}=s();_&&r.forEach(p=>{_.remove(p),p.geometry.dispose(),p.material.dispose()}),r=[]};return{isClipping:t,activeClippingAxis:n,toggleClipping:()=>{t.value=!t.value,t.value?(l(),e.value.length>0&&c()):(n.value="none",u(),h())},updateClippingPlanes:m,clearClippingPlanes:u,clearClippingMeshes:h}}class ji extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new Zs(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(a))}catch(l){i?i(l):console.error(l),r.manager.itemError(e)}},n,i)}parse(e){function t(c){const d=new DataView(c),m=32/8*3+32/8*3*3+16/8,u=d.getUint32(80,!0);if(80+32/8+u*m===d.byteLength)return!0;const g=[115,111,108,105,100];for(let _=0;_<5;_++)if(n(g,d,_))return!1;return!0}function n(c,d,m){for(let u=0,h=c.length;u<h;u++)if(c[u]!==d.getUint8(m+u))return!1;return!0}function i(c){const d=new DataView(c),m=d.getUint32(80,!0);let u,h,g,_=!1,p,f,x,y,S;for(let D=0;D<70;D++)d.getUint32(D,!1)==1129270351&&d.getUint8(D+4)==82&&d.getUint8(D+5)==61&&(_=!0,p=new Float32Array(m*3*3),f=d.getUint8(D+6)/255,x=d.getUint8(D+7)/255,y=d.getUint8(D+8)/255,S=d.getUint8(D+9)/255);const U=84,C=12*4+2,L=new hn,P=new Float32Array(m*3*3),E=new Float32Array(m*3*3),A=new Tt;for(let D=0;D<m;D++){const O=U+D*C,V=d.getFloat32(O,!0),Q=d.getFloat32(O+4,!0),se=d.getFloat32(O+8,!0);if(_){const G=d.getUint16(O+48,!0);(G&32768)===0?(u=(G&31)/31,h=(G>>5&31)/31,g=(G>>10&31)/31):(u=f,h=x,g=y)}for(let G=1;G<=3;G++){const ce=O+G*12,Z=D*3*3+(G-1)*3;P[Z]=d.getFloat32(ce,!0),P[Z+1]=d.getFloat32(ce+4,!0),P[Z+2]=d.getFloat32(ce+8,!0),E[Z]=V,E[Z+1]=Q,E[Z+2]=se,_&&(A.setRGB(u,h,g,qt),p[Z]=A.r,p[Z+1]=A.g,p[Z+2]=A.b)}}return L.setAttribute("position",new mn(P,3)),L.setAttribute("normal",new mn(E,3)),_&&(L.setAttribute("color",new mn(p,3)),L.hasColors=!0,L.alpha=S),L}function r(c){const d=new hn,m=/solid([\s\S]*?)endsolid/g,u=/facet([\s\S]*?)endfacet/g,h=/solid\s(.+)/;let g=0;const _=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,p=new RegExp("vertex"+_+_+_,"g"),f=new RegExp("normal"+_+_+_,"g"),x=[],y=[],S=[],U=new I;let C,L=0,P=0,E=0;for(;(C=m.exec(c))!==null;){P=E;const A=C[0],D=(C=h.exec(A))!==null?C[1]:"";for(S.push(D);(C=u.exec(A))!==null;){let Q=0,se=0;const G=C[0];for(;(C=f.exec(G))!==null;)U.x=parseFloat(C[1]),U.y=parseFloat(C[2]),U.z=parseFloat(C[3]),se++;for(;(C=p.exec(G))!==null;)x.push(parseFloat(C[1]),parseFloat(C[2]),parseFloat(C[3])),y.push(U.x,U.y,U.z),Q++,E++;se!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),Q!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const O=P,V=E-P;d.userData.groupNames=S,d.addGroup(O,V,L),L++}return d.setAttribute("position",new It(x,3)),d.setAttribute("normal",new It(y,3)),d}function o(c){return typeof c!="string"?new TextDecoder().decode(c):c}function a(c){if(typeof c=="string"){const d=new Uint8Array(c.length);for(let m=0;m<c.length;m++)d[m]=c.charCodeAt(m)&255;return d.buffer||d}else return c}const l=a(e);return t(l)?i(l):r(o(e))}}class r0 extends V1{constructor(e){super(e)}parse(e){function t(G){switch(G.image_type){case u:case _:if(G.colormap_length>256||G.colormap_size!==24||G.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case g:case p:case f:if(G.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case m:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+G.image_type)}if(G.width<=0||G.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(G.pixel_size!==8&&G.pixel_size!==16&&G.pixel_size!==24&&G.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+G.pixel_size)}function n(G,ce,Z,ge,De){let ye,_e;const ae=Z.pixel_size>>3,j=Z.width*Z.height*ae;if(ce&&(_e=De.subarray(ge,ge+=Z.colormap_length*(Z.colormap_size>>3))),G){ye=new Uint8Array(j);let Y,ee,ne,he=0;const J=new Uint8Array(ae);for(;he<j;)if(Y=De[ge++],ee=(Y&127)+1,Y&128){for(ne=0;ne<ae;++ne)J[ne]=De[ge++];for(ne=0;ne<ee;++ne)ye.set(J,he+ne*ae);he+=ae*ee}else{for(ee*=ae,ne=0;ne<ee;++ne)ye[he+ne]=De[ge++];he+=ee}}else ye=De.subarray(ge,ge+=ce?Z.width*Z.height:j);return{pixel_data:ye,palettes:_e}}function i(G,ce,Z,ge,De,ye,_e,ae,j){const Y=j;let ee,ne=0,he,J;const ue=A.width;for(J=ce;J!==ge;J+=Z)for(he=De;he!==_e;he+=ye,ne++)ee=ae[ne],G[(he+ue*J)*4+3]=255,G[(he+ue*J)*4+2]=Y[ee*3+0],G[(he+ue*J)*4+1]=Y[ee*3+1],G[(he+ue*J)*4+0]=Y[ee*3+2];return G}function r(G,ce,Z,ge,De,ye,_e,ae){let j,Y=0,ee,ne;const he=A.width;for(ne=ce;ne!==ge;ne+=Z)for(ee=De;ee!==_e;ee+=ye,Y+=2)j=ae[Y+0]+(ae[Y+1]<<8),G[(ee+he*ne)*4+0]=(j&31744)>>7,G[(ee+he*ne)*4+1]=(j&992)>>2,G[(ee+he*ne)*4+2]=(j&31)<<3,G[(ee+he*ne)*4+3]=j&32768?0:255;return G}function o(G,ce,Z,ge,De,ye,_e,ae){let j=0,Y,ee;const ne=A.width;for(ee=ce;ee!==ge;ee+=Z)for(Y=De;Y!==_e;Y+=ye,j+=3)G[(Y+ne*ee)*4+3]=255,G[(Y+ne*ee)*4+2]=ae[j+0],G[(Y+ne*ee)*4+1]=ae[j+1],G[(Y+ne*ee)*4+0]=ae[j+2];return G}function a(G,ce,Z,ge,De,ye,_e,ae){let j=0,Y,ee;const ne=A.width;for(ee=ce;ee!==ge;ee+=Z)for(Y=De;Y!==_e;Y+=ye,j+=4)G[(Y+ne*ee)*4+2]=ae[j+0],G[(Y+ne*ee)*4+1]=ae[j+1],G[(Y+ne*ee)*4+0]=ae[j+2],G[(Y+ne*ee)*4+3]=ae[j+3];return G}function l(G,ce,Z,ge,De,ye,_e,ae){let j,Y=0,ee,ne;const he=A.width;for(ne=ce;ne!==ge;ne+=Z)for(ee=De;ee!==_e;ee+=ye,Y++)j=ae[Y],G[(ee+he*ne)*4+0]=j,G[(ee+he*ne)*4+1]=j,G[(ee+he*ne)*4+2]=j,G[(ee+he*ne)*4+3]=255;return G}function c(G,ce,Z,ge,De,ye,_e,ae){let j=0,Y,ee;const ne=A.width;for(ee=ce;ee!==ge;ee+=Z)for(Y=De;Y!==_e;Y+=ye,j+=2)G[(Y+ne*ee)*4+0]=ae[j+0],G[(Y+ne*ee)*4+1]=ae[j+0],G[(Y+ne*ee)*4+2]=ae[j+0],G[(Y+ne*ee)*4+3]=ae[j+1];return G}function d(G,ce,Z,ge,De){let ye,_e,ae,j,Y,ee;switch((A.flags&x)>>y){default:case C:ye=0,ae=1,Y=ce,_e=0,j=1,ee=Z;break;case S:ye=0,ae=1,Y=ce,_e=Z-1,j=-1,ee=-1;break;case L:ye=ce-1,ae=-1,Y=-1,_e=0,j=1,ee=Z;break;case U:ye=ce-1,ae=-1,Y=-1,_e=Z-1,j=-1,ee=-1;break}if(V)switch(A.pixel_size){case 8:l(G,_e,j,ee,ye,ae,Y,ge);break;case 16:c(G,_e,j,ee,ye,ae,Y,ge);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(A.pixel_size){case 8:i(G,_e,j,ee,ye,ae,Y,ge,De);break;case 16:r(G,_e,j,ee,ye,ae,Y,ge);break;case 24:o(G,_e,j,ee,ye,ae,Y,ge);break;case 32:a(G,_e,j,ee,ye,ae,Y,ge);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return G}const m=0,u=1,h=2,g=3,_=9,p=10,f=11,x=48,y=4,S=0,U=1,C=2,L=3;if(e.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let P=0;const E=new Uint8Array(e),A={id_length:E[P++],colormap_type:E[P++],image_type:E[P++],colormap_index:E[P++]|E[P++]<<8,colormap_length:E[P++]|E[P++]<<8,colormap_size:E[P++],origin:[E[P++]|E[P++]<<8,E[P++]|E[P++]<<8],width:E[P++]|E[P++]<<8,height:E[P++]|E[P++]<<8,pixel_size:E[P++],flags:E[P++]};if(t(A),A.id_length+P>e.length)throw new Error("THREE.TGALoader: No data.");P+=A.id_length;let D=!1,O=!1,V=!1;switch(A.image_type){case _:D=!0,O=!0;break;case u:O=!0;break;case p:D=!0;break;case h:break;case f:D=!0,V=!0;break;case g:V=!0;break}const Q=new Uint8Array(A.width*A.height*4),se=n(D,O,A,P,E);return d(Q,A.width,A.height,se.pixel_data,se.palettes),{data:Q,width:A.width,height:A.height,flipY:!0,generateMipmaps:!0,minFilter:Ai}}}class b4 extends oi{load(e,t,n,i){const r=this,o=r.path===""?hc.extractUrlBase(e):r.path,a=new Zs(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(l){try{t(r.parse(l,o))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},n,i)}parse(e,t){function n(M,b){const F=[],R=M.childNodes;for(let N=0,de=R.length;N<de;N++){const Me=R[N];Me.nodeName===b&&F.push(Me)}return F}function i(M){if(M.length===0)return[];const b=M.trim().split(/\s+/),F=new Array(b.length);for(let R=0,N=b.length;R<N;R++)F[R]=b[R];return F}function r(M){if(M.length===0)return[];const b=M.trim().split(/\s+/),F=new Array(b.length);for(let R=0,N=b.length;R<N;R++)F[R]=parseFloat(b[R]);return F}function o(M){if(M.length===0)return[];const b=M.trim().split(/\s+/),F=new Array(b.length);for(let R=0,N=b.length;R<N;R++)F[R]=parseInt(b[R]);return F}function a(M){return M.substring(1)}function l(){return"three_default_"+ke++}function c(M){return Object.keys(M).length===0}function d(M){return{unit:m(n(M,"unit")[0]),upAxis:u(n(M,"up_axis")[0])}}function m(M){return M!==void 0&&M.hasAttribute("meter")===!0?parseFloat(M.getAttribute("meter")):1}function u(M){return M!==void 0?M.textContent:"Y_UP"}function h(M,b,F,R){const N=n(M,b)[0];if(N!==void 0){const de=n(N,F);for(let Me=0;Me<de.length;Me++)R(de[Me])}}function g(M,b){for(const F in M){const R=M[F];R.build=b(M[F])}}function _(M,b){return M.build!==void 0||(M.build=b(M)),M.build}function p(M){const b={sources:{},samplers:{},channels:{}};let F=!1;for(let R=0,N=M.childNodes.length;R<N;R++){const de=M.childNodes[R];if(de.nodeType!==1)continue;let Me;switch(de.nodeName){case"source":Me=de.getAttribute("id"),b.sources[Me]=Ie(de);break;case"sampler":Me=de.getAttribute("id"),b.samplers[Me]=f(de);break;case"channel":Me=de.getAttribute("target"),b.channels[Me]=x(de);break;case"animation":p(de),F=!0;break;default:console.log(de)}}F===!1&&(ht.animations[M.getAttribute("id")||Ei.generateUUID()]=b)}function f(M){const b={inputs:{}};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"input":const de=a(N.getAttribute("source")),Me=N.getAttribute("semantic");b.inputs[Me]=de;break}}return b}function x(M){const b={};let R=M.getAttribute("target").split("/");const N=R.shift();let de=R.shift();const Me=de.indexOf("(")!==-1,lt=de.indexOf(".")!==-1;if(lt)R=de.split("."),de=R.shift(),b.member=R.shift();else if(Me){const qe=de.split("(");de=qe.shift();for(let nt=0;nt<qe.length;nt++)qe[nt]=parseInt(qe[nt].replace(/\)/,""));b.indices=qe}return b.id=N,b.sid=de,b.arraySyntax=Me,b.memberSyntax=lt,b.sampler=a(M.getAttribute("source")),b}function y(M){const b=[],F=M.channels,R=M.samplers,N=M.sources;for(const de in F)if(F.hasOwnProperty(de)){const Me=F[de],lt=R[Me.sampler],qe=lt.inputs.INPUT,nt=lt.inputs.OUTPUT,ct=N[qe],Ue=N[nt],xt=U(Me,ct,Ue);A(xt,b)}return b}function S(M){return _(ht.animations[M],y)}function U(M,b,F){const R=ht.nodes[M.id],N=it(R.id),de=R.transforms[M.sid],Me=R.matrix.clone().transpose();let lt,qe,nt,ct,Ue,xt;const gt={};switch(de){case"matrix":for(nt=0,ct=b.array.length;nt<ct;nt++)if(lt=b.array[nt],qe=nt*F.stride,gt[lt]===void 0&&(gt[lt]={}),M.arraySyntax===!0){const dn=F.array[qe],en=M.indices[0]+4*M.indices[1];gt[lt][en]=dn}else for(Ue=0,xt=F.stride;Ue<xt;Ue++)gt[lt][Ue]=F.array[qe+Ue];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',de);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',de);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',de);break}const Dt=C(gt,Me);return{name:N.uuid,keyframes:Dt}}function C(M,b){const F=[];for(const N in M)F.push({time:parseFloat(N),value:M[N]});F.sort(R);for(let N=0;N<16;N++)D(F,N,b.elements[N]);return F;function R(N,de){return N.time-de.time}}const L=new I,P=new I,E=new Vn;function A(M,b){const F=M.keyframes,R=M.name,N=[],de=[],Me=[],lt=[];for(let qe=0,nt=F.length;qe<nt;qe++){const ct=F[qe],Ue=ct.time,xt=ct.value;H.fromArray(xt).transpose(),H.decompose(L,E,P),N.push(Ue),de.push(L.x,L.y,L.z),Me.push(E.x,E.y,E.z,E.w),lt.push(P.x,P.y,P.z)}return de.length>0&&b.push(new $s(R+".position",N,de)),Me.length>0&&b.push(new Er(R+".quaternion",N,Me)),lt.length>0&&b.push(new $s(R+".scale",N,lt)),b}function D(M,b,F){let R,N=!0,de,Me;for(de=0,Me=M.length;de<Me;de++)R=M[de],R.value[b]===void 0?R.value[b]=null:N=!1;if(N===!0)for(de=0,Me=M.length;de<Me;de++)R=M[de],R.value[b]=F;else O(M,b)}function O(M,b){let F,R;for(let N=0,de=M.length;N<de;N++){const Me=M[N];if(Me.value[b]===null){if(F=V(M,N,b),R=Q(M,N,b),F===null){Me.value[b]=R.value[b];continue}if(R===null){Me.value[b]=F.value[b];continue}se(Me,F,R,b)}}}function V(M,b,F){for(;b>=0;){const R=M[b];if(R.value[F]!==null)return R;b--}return null}function Q(M,b,F){for(;b<M.length;){const R=M[b];if(R.value[F]!==null)return R;b++}return null}function se(M,b,F,R){if(F.time-b.time===0){M.value[R]=b.value[R];return}M.value[R]=(M.time-b.time)*(F.value[R]-b.value[R])/(F.time-b.time)+b.value[R]}function G(M){const b={name:M.getAttribute("id")||"default",start:parseFloat(M.getAttribute("start")||0),end:parseFloat(M.getAttribute("end")||0),animations:[]};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"instance_animation":b.animations.push(a(N.getAttribute("url")));break}}ht.clips[M.getAttribute("id")]=b}function ce(M){const b=[],F=M.name,R=M.end-M.start||-1,N=M.animations;for(let de=0,Me=N.length;de<Me;de++){const lt=S(N[de]);for(let qe=0,nt=lt.length;qe<nt;qe++)b.push(lt[qe])}return new hh(F,R,b)}function Z(M){return _(ht.clips[M],ce)}function ge(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"skin":b.id=a(N.getAttribute("source")),b.skin=De(N);break;case"morph":b.id=a(N.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}ht.controllers[M.getAttribute("id")]=b}function De(M){const b={sources:{}};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"bind_shape_matrix":b.bindShapeMatrix=r(N.textContent);break;case"source":const de=N.getAttribute("id");b.sources[de]=Ie(N);break;case"joints":b.joints=ye(N);break;case"vertex_weights":b.vertexWeights=_e(N);break}}return b}function ye(M){const b={inputs:{}};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"input":const de=N.getAttribute("semantic"),Me=a(N.getAttribute("source"));b.inputs[de]=Me;break}}return b}function _e(M){const b={inputs:{}};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"input":const de=N.getAttribute("semantic"),Me=a(N.getAttribute("source")),lt=parseInt(N.getAttribute("offset"));b.inputs[de]={id:Me,offset:lt};break;case"vcount":b.vcount=o(N.textContent);break;case"v":b.v=o(N.textContent);break}}return b}function ae(M){const b={id:M.id},F=ht.geometries[b.id];return M.skin!==void 0&&(b.skin=j(M.skin),F.sources.skinIndices=b.skin.indices,F.sources.skinWeights=b.skin.weights),b}function j(M){const F={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},R=M.sources,N=M.vertexWeights,de=N.vcount,Me=N.v,lt=N.inputs.JOINT.offset,qe=N.inputs.WEIGHT.offset,nt=M.sources[M.joints.inputs.JOINT],ct=M.sources[M.joints.inputs.INV_BIND_MATRIX],Ue=R[N.inputs.WEIGHT.id].array;let xt=0,gt,Dt,wt;for(gt=0,wt=de.length;gt<wt;gt++){const en=de[gt],$t=[];for(Dt=0;Dt<en;Dt++){const Yt=Me[xt+lt],gi=Me[xt+qe],zn=Ue[gi];$t.push({index:Yt,weight:zn}),xt+=2}for($t.sort(dn),Dt=0;Dt<4;Dt++){const Yt=$t[Dt];Yt!==void 0?(F.indices.array.push(Yt.index),F.weights.array.push(Yt.weight)):(F.indices.array.push(0),F.weights.array.push(0))}}for(M.bindShapeMatrix?F.bindMatrix=new Et().fromArray(M.bindShapeMatrix).transpose():F.bindMatrix=new Et().identity(),gt=0,wt=nt.array.length;gt<wt;gt++){const en=nt.array[gt],$t=new Et().fromArray(ct.array,gt*ct.stride).transpose();F.joints.push({name:en,boneInverse:$t})}return F;function dn(en,$t){return $t.weight-en.weight}}function Y(M){return _(ht.controllers[M],ae)}function ee(M){const b={init_from:n(M,"init_from")[0].textContent};ht.images[M.getAttribute("id")]=b}function ne(M){return M.build!==void 0?M.build:M.init_from}function he(M){const b=ht.images[M];return b!==void 0?_(b,ne):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",M),null)}function J(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"profile_COMMON":b.profile=ue(N);break}}ht.effects[M.getAttribute("id")]=b}function ue(M){const b={surfaces:{},samplers:{}};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"newparam":Ce(N,b);break;case"technique":b.technique=B(N);break;case"extra":b.extra=Le(N);break}}return b}function Ce(M,b){const F=M.getAttribute("sid");for(let R=0,N=M.childNodes.length;R<N;R++){const de=M.childNodes[R];if(de.nodeType===1)switch(de.nodeName){case"surface":b.surfaces[F]=je(de);break;case"sampler2D":b.samplers[F]=We(de);break}}}function je(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"init_from":b.init_from=N.textContent;break}}return b}function We(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"source":b.source=N.textContent;break}}return b}function B(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"constant":case"lambert":case"blinn":case"phong":b.type=N.nodeName,b.parameters=_t(N);break;case"extra":b.extra=Le(N);break}}return b}function _t(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":b[N.nodeName]=dt(N);break;case"transparent":b[N.nodeName]={opaque:N.hasAttribute("opaque")?N.getAttribute("opaque"):"A_ONE",data:dt(N)};break}}return b}function dt(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"color":b[N.nodeName]=r(N.textContent);break;case"float":b[N.nodeName]=parseFloat(N.textContent);break;case"texture":b[N.nodeName]={id:N.getAttribute("texture"),extra:at(N)};break}}return b}function at(M){const b={technique:{}};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"extra":Fe(N,b);break}}return b}function Fe(M,b){for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"technique":tt(N,b);break}}}function tt(M,b){for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":b.technique[N.nodeName]=parseFloat(N.textContent);break;case"wrapU":case"wrapV":N.textContent.toUpperCase()==="TRUE"?b.technique[N.nodeName]=1:N.textContent.toUpperCase()==="FALSE"?b.technique[N.nodeName]=0:b.technique[N.nodeName]=parseInt(N.textContent);break;case"bump":b[N.nodeName]=jt(N);break}}}function Le(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"technique":b.technique=ot(N);break}}return b}function ot(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"double_sided":b[N.nodeName]=parseInt(N.textContent);break;case"bump":b[N.nodeName]=jt(N);break}}return b}function jt(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"texture":b[N.nodeName]={id:N.getAttribute("texture"),texcoord:N.getAttribute("texcoord"),extra:at(N)};break}}return b}function k(M){return M}function T(M){return _(ht.effects[M],k)}function oe(M){const b={name:M.getAttribute("name")};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"instance_effect":b.url=a(N.getAttribute("url"));break}}ht.materials[M.getAttribute("id")]=b}function be(M){let b,F=M.slice((M.lastIndexOf(".")-1>>>0)+2);switch(F=F.toLowerCase(),F){case"tga":b=Jt;break;default:b=Ot}return b}function Re(M){const b=T(M.url),F=b.profile.technique;let R;switch(F.type){case"phong":case"blinn":R=new fn;break;case"lambert":R=new C1;break;default:R=new qi;break}R.name=M.name||"";function N(qe,nt=null){const ct=b.profile.samplers[qe.id];let Ue=null;if(ct!==void 0){const xt=b.profile.surfaces[ct.source];Ue=he(xt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),Ue=he(qe.id);if(Ue!==null){const xt=be(Ue);if(xt!==void 0){const gt=xt.load(Ue),Dt=qe.extra;if(Dt!==void 0&&Dt.technique!==void 0&&c(Dt.technique)===!1){const wt=Dt.technique;gt.wrapS=wt.wrapU?di:ri,gt.wrapT=wt.wrapV?di:ri,gt.offset.set(wt.offsetU||0,wt.offsetV||0),gt.repeat.set(wt.repeatU||1,wt.repeatV||1)}else gt.wrapS=di,gt.wrapT=di;return nt!==null&&(gt.colorSpace=nt),gt}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",Ue),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",qe.id),null}const de=F.parameters;for(const qe in de){const nt=de[qe];switch(qe){case"diffuse":nt.color&&R.color.fromArray(nt.color),nt.texture&&(R.map=N(nt.texture,qt));break;case"specular":nt.color&&R.specular&&R.specular.fromArray(nt.color),nt.texture&&(R.specularMap=N(nt.texture));break;case"bump":nt.texture&&(R.normalMap=N(nt.texture));break;case"ambient":nt.texture&&(R.lightMap=N(nt.texture,qt));break;case"shininess":nt.float&&R.shininess&&(R.shininess=nt.float);break;case"emission":nt.color&&R.emissive&&R.emissive.fromArray(nt.color),nt.texture&&(R.emissiveMap=N(nt.texture,qt));break}}Gt.colorSpaceToWorking(R.color,qt),R.specular&&Gt.colorSpaceToWorking(R.specular,qt),R.emissive&&Gt.colorSpaceToWorking(R.emissive,qt);let Me=de.transparent,lt=de.transparency;if(lt===void 0&&Me&&(lt={float:1}),Me===void 0&<&&(Me={opaque:"A_ONE",data:{color:[1,1,1,1]}}),Me&<)if(Me.data.texture)R.transparent=!0;else{const qe=Me.data.color;switch(Me.opaque){case"A_ONE":R.opacity=qe[3]*lt.float;break;case"RGB_ZERO":R.opacity=1-qe[0]*lt.float;break;case"A_ZERO":R.opacity=1-qe[3]*lt.float;break;case"RGB_ONE":R.opacity=qe[0]*lt.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',Me.opaque)}R.opacity<1&&(R.transparent=!0)}if(F.extra!==void 0&&F.extra.technique!==void 0){const qe=F.extra.technique;for(const nt in qe){const ct=qe[nt];switch(nt){case"double_sided":R.side=ct===1?pn:Qn;break;case"bump":R.normalMap=N(ct.texture),R.normalScale=new et(1,1);break}}}return R}function xe(M){return _(ht.materials[M],Re)}function vt(M){const b={name:M.getAttribute("name")};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"optics":b.optics=Ze(N);break}}ht.cameras[M.getAttribute("id")]=b}function Ze(M){for(let b=0;b<M.childNodes.length;b++){const F=M.childNodes[b];switch(F.nodeName){case"technique_common":return mt(F)}}return{}}function mt(M){const b={};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];switch(R.nodeName){case"perspective":case"orthographic":b.technique=R.nodeName,b.parameters=yt(R);break}}return b}function yt(M){const b={};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];switch(R.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":b[R.nodeName]=parseFloat(R.textContent);break}}return b}function Ne(M){let b;switch(M.optics.technique){case"perspective":b=new bn(M.optics.parameters.yfov,M.optics.parameters.aspect_ratio,M.optics.parameters.znear,M.optics.parameters.zfar);break;case"orthographic":let F=M.optics.parameters.ymag,R=M.optics.parameters.xmag;const N=M.optics.parameters.aspect_ratio;R=R===void 0?F*N:R,F=F===void 0?R/N:F,R*=.5,F*=.5,b=new Ha(-R,R,F,-F,M.optics.parameters.znear,M.optics.parameters.zfar);break;default:b=new bn;break}return b.name=M.name||"",b}function st(M){const b=ht.cameras[M];return b!==void 0?_(b,Ne):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",M),null)}function Rt(M){let b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"technique_common":b=At(N);break}}ht.lights[M.getAttribute("id")]=b}function At(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"directional":case"point":case"spot":case"ambient":b.technique=N.nodeName,b.parameters=Je(N)}}return b}function Je(M){const b={};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"color":const de=r(N.textContent);b.color=new Tt().fromArray(de),Gt.colorSpaceToWorking(b.color,qt);break;case"falloff_angle":b.falloffAngle=parseFloat(N.textContent);break;case"quadratic_attenuation":const Me=parseFloat(N.textContent);b.distance=Me?Math.sqrt(1/Me):0;break}}return b}function Lt(M){let b;switch(M.technique){case"directional":b=new gr;break;case"point":b=new Pa;break;case"spot":b=new G1;break;case"ambient":b=new cc;break}return M.parameters.color&&b.color.copy(M.parameters.color),M.parameters.distance&&(b.distance=M.parameters.distance),b}function K(M){const b=ht.lights[M];return b!==void 0?_(b,Lt):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",M),null)}function Ye(M){const b={name:M.getAttribute("name"),sources:{},vertices:{},primitives:[]},F=n(M,"mesh")[0];if(F!==void 0){for(let R=0;R<F.childNodes.length;R++){const N=F.childNodes[R];if(N.nodeType!==1)continue;const de=N.getAttribute("id");switch(N.nodeName){case"source":b.sources[de]=Ie(N);break;case"vertices":b.vertices=ut(N);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",N.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":b.primitives.push(ze(N));break;default:console.log(N)}}ht.geometries[M.getAttribute("id")]=b}}function Ie(M){const b={array:[],stride:3};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"float_array":b.array=r(R.textContent);break;case"Name_array":b.array=i(R.textContent);break;case"technique_common":const N=n(R,"accessor")[0];N!==void 0&&(b.stride=parseInt(N.getAttribute("stride")));break}}return b}function ut(M){const b={};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];R.nodeType===1&&(b[R.getAttribute("semantic")]=a(R.getAttribute("source")))}return b}function ze(M){const b={type:M.nodeName,material:M.getAttribute("material"),count:parseInt(M.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let F=0,R=M.childNodes.length;F<R;F++){const N=M.childNodes[F];if(N.nodeType===1)switch(N.nodeName){case"input":const de=a(N.getAttribute("source")),Me=N.getAttribute("semantic"),lt=parseInt(N.getAttribute("offset")),qe=parseInt(N.getAttribute("set")),nt=qe>0?Me+qe:Me;b.inputs[nt]={id:de,offset:lt},b.stride=Math.max(b.stride,lt+1),Me==="TEXCOORD"&&(b.hasUV=!0);break;case"vcount":b.vcount=o(N.textContent);break;case"p":b.p=o(N.textContent);break}}return b}function Ae(M){const b={};for(let F=0;F<M.length;F++){const R=M[F];b[R.type]===void 0&&(b[R.type]=[]),b[R.type].push(R)}return b}function pt(M){let b=0;for(let F=0,R=M.length;F<R;F++)M[F].hasUV===!0&&b++;b>0&&b<M.length&&(M.uvsNeedsFix=!0)}function Ft(M){const b={},F=M.sources,R=M.vertices,N=M.primitives;if(N.length===0)return{};const de=Ae(N);for(const Me in de){const lt=de[Me];pt(lt),b[Me]=Qt(lt,F,R)}return b}function Qt(M,b,F){const R={},N={array:[],stride:0},de={array:[],stride:0},Me={array:[],stride:0},lt={array:[],stride:0},qe={array:[],stride:0},nt={array:[],stride:4},ct={array:[],stride:4},Ue=new hn,xt=[];let gt=0;for(let Dt=0;Dt<M.length;Dt++){const wt=M[Dt],dn=wt.inputs;let en=0;switch(wt.type){case"lines":case"linestrips":en=wt.count*2;break;case"triangles":en=wt.count*3;break;case"polylist":for(let $t=0;$t<wt.count;$t++){const Yt=wt.vcount[$t];switch(Yt){case 3:en+=3;break;case 4:en+=6;break;default:en+=(Yt-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",wt.type)}Ue.addGroup(gt,en,Dt),gt+=en,wt.material&&xt.push(wt.material);for(const $t in dn){const Yt=dn[$t];switch($t){case"VERTEX":for(const gi in F){const zn=F[gi];switch(gi){case"POSITION":const ps=N.array.length;if(Nt(wt,b[zn],Yt.offset,N.array),N.stride=b[zn].stride,b.skinWeights&&b.skinIndices&&(Nt(wt,b.skinIndices,Yt.offset,nt.array),Nt(wt,b.skinWeights,Yt.offset,ct.array)),wt.hasUV===!1&&M.uvsNeedsFix===!0){const Au=(N.array.length-ps)/N.stride;for(let _c=0;_c<Au;_c++)Me.array.push(0,0)}break;case"NORMAL":Nt(wt,b[zn],Yt.offset,de.array),de.stride=b[zn].stride;break;case"COLOR":Nt(wt,b[zn],Yt.offset,qe.array),qe.stride=b[zn].stride;break;case"TEXCOORD":Nt(wt,b[zn],Yt.offset,Me.array),Me.stride=b[zn].stride;break;case"TEXCOORD1":Nt(wt,b[zn],Yt.offset,lt.array),Me.stride=b[zn].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',gi)}}break;case"NORMAL":Nt(wt,b[Yt.id],Yt.offset,de.array),de.stride=b[Yt.id].stride;break;case"COLOR":Nt(wt,b[Yt.id],Yt.offset,qe.array,!0),qe.stride=b[Yt.id].stride;break;case"TEXCOORD":Nt(wt,b[Yt.id],Yt.offset,Me.array),Me.stride=b[Yt.id].stride;break;case"TEXCOORD1":Nt(wt,b[Yt.id],Yt.offset,lt.array),lt.stride=b[Yt.id].stride;break}}}return N.array.length>0&&Ue.setAttribute("position",new It(N.array,N.stride)),de.array.length>0&&Ue.setAttribute("normal",new It(de.array,de.stride)),qe.array.length>0&&Ue.setAttribute("color",new It(qe.array,qe.stride)),Me.array.length>0&&Ue.setAttribute("uv",new It(Me.array,Me.stride)),lt.array.length>0&&Ue.setAttribute("uv1",new It(lt.array,lt.stride)),nt.array.length>0&&Ue.setAttribute("skinIndex",new It(nt.array,nt.stride)),ct.array.length>0&&Ue.setAttribute("skinWeight",new It(ct.array,ct.stride)),R.data=Ue,R.type=M[0].type,R.materialKeys=xt,R}function Nt(M,b,F,R,N=!1){const de=M.p,Me=M.stride,lt=M.vcount;function qe(Ue){let xt=de[Ue+F]*ct;const gt=xt+ct;for(;xt<gt;xt++)R.push(nt[xt]);if(N){const Dt=R.length-ct-1;sn.setRGB(R[Dt+0],R[Dt+1],R[Dt+2],qt),R[Dt+0]=sn.r,R[Dt+1]=sn.g,R[Dt+2]=sn.b}}const nt=b.array,ct=b.stride;if(M.vcount!==void 0){let Ue=0;for(let xt=0,gt=lt.length;xt<gt;xt++){const Dt=lt[xt];if(Dt===4){const wt=Ue+Me*0,dn=Ue+Me*1,en=Ue+Me*2,$t=Ue+Me*3;qe(wt),qe(dn),qe($t),qe(dn),qe(en),qe($t)}else if(Dt===3){const wt=Ue+Me*0,dn=Ue+Me*1,en=Ue+Me*2;qe(wt),qe(dn),qe(en)}else if(Dt>4)for(let wt=1,dn=Dt-2;wt<=dn;wt++){const en=Ue+Me*0,$t=Ue+Me*wt,Yt=Ue+Me*(wt+1);qe(en),qe($t),qe(Yt)}Ue+=Me*Dt}}else for(let Ue=0,xt=de.length;Ue<xt;Ue+=Me)qe(Ue)}function Cn(M){return _(ht.geometries[M],Ft)}function Hn(M){const b={name:M.getAttribute("name")||"",joints:{},links:[]};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"technique_common":ei(R,b);break}}ht.kinematicsModels[M.getAttribute("id")]=b}function fs(M){return M.build!==void 0?M.build:M}function Yi(M){return _(ht.kinematicsModels[M],fs)}function ei(M,b){for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"joint":b.joints[R.getAttribute("sid")]=q(R);break;case"link":b.links.push(le(R));break}}}function q(M){let b;for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"prismatic":case"revolute":b=W(R);break}}return b}function W(M){const b={sid:M.getAttribute("sid"),name:M.getAttribute("name")||"",axis:new I,limits:{min:0,max:0},type:M.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"axis":const N=r(R.textContent);b.axis.fromArray(N);break;case"limits":const de=R.getElementsByTagName("max")[0],Me=R.getElementsByTagName("min")[0];b.limits.max=parseFloat(de.textContent),b.limits.min=parseFloat(Me.textContent);break}}return b.limits.min>=b.limits.max&&(b.static=!0),b.middlePosition=(b.limits.min+b.limits.max)/2,b}function le(M){const b={sid:M.getAttribute("sid"),name:M.getAttribute("name")||"",attachments:[],transforms:[]};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"attachment_full":b.attachments.push(fe(R));break;case"matrix":case"translate":case"rotate":b.transforms.push(ve(R));break}}return b}function fe(M){const b={joint:M.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"link":b.links.push(le(R));break;case"matrix":case"translate":case"rotate":b.transforms.push(ve(R));break}}return b}function ve(M){const b={type:M.nodeName},F=r(M.textContent);switch(b.type){case"matrix":b.obj=new Et,b.obj.fromArray(F).transpose();break;case"translate":b.obj=new I,b.obj.fromArray(F);break;case"rotate":b.obj=new I,b.obj.fromArray(F),b.angle=Ei.degToRad(F[3]);break}return b}function me(M){const b={name:M.getAttribute("name")||"",rigidBodies:{}};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"rigid_body":b.rigidBodies[R.getAttribute("name")]={},Be(R,b.rigidBodies[R.getAttribute("name")]);break}}ht.physicsModels[M.getAttribute("id")]=b}function Be(M,b){for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"technique_common":we(R,b);break}}}function we(M,b){for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"inertia":b.inertia=r(R.textContent);break;case"mass":b.mass=r(R.textContent)[0];break}}}function Te(M){const b={bindJointAxis:[]};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"bind_joint_axis":b.bindJointAxis.push($e(R));break}}ht.kinematicsScenes[a(M.getAttribute("url"))]=b}function $e(M){const b={target:M.getAttribute("target").split("/").pop()};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType===1)switch(R.nodeName){case"axis":const N=R.getElementsByTagName("param")[0];b.axis=N.textContent;const de=b.axis.split("inst_").pop().split("axis")[0];b.jointIndex=de.substring(0,de.length-1);break}}return b}function te(M){return M.build!==void 0?M.build:M}function Ve(M){return _(ht.kinematicsScenes[M],te)}function Xe(){const M=Object.keys(ht.kinematicsModels)[0],b=Object.keys(ht.kinematicsScenes)[0],F=Object.keys(ht.visualScenes)[0];if(M===void 0||b===void 0)return;const R=Yi(M),N=Ve(b),de=St(F),Me=N.bindJointAxis,lt={};for(let ct=0,Ue=Me.length;ct<Ue;ct++){const xt=Me[ct],gt=Bt.querySelector('[sid="'+xt.target+'"]');if(gt){const Dt=gt.parentElement;qe(xt.jointIndex,Dt)}}function qe(ct,Ue){const xt=Ue.getAttribute("name"),gt=R.joints[ct];de.traverse(function(Dt){Dt.name===xt&&(lt[ct]={object:Dt,transforms:ft(Ue),joint:gt,position:gt.zeroPosition})})}const nt=new Et;rt={joints:R&&R.joints,getJointValue:function(ct){const Ue=lt[ct];if(Ue)return Ue.position;console.warn("THREE.ColladaLoader: Joint "+ct+" doesn't exist.")},setJointValue:function(ct,Ue){const xt=lt[ct];if(xt){const gt=xt.joint;if(Ue>gt.limits.max||Ue<gt.limits.min)console.warn("THREE.ColladaLoader: Joint "+ct+" value "+Ue+" outside of limits (min: "+gt.limits.min+", max: "+gt.limits.max+").");else if(gt.static)console.warn("THREE.ColladaLoader: Joint "+ct+" is static.");else{const Dt=xt.object,wt=gt.axis,dn=xt.transforms;H.identity();for(let en=0;en<dn.length;en++){const $t=dn[en];if($t.sid&&$t.sid.indexOf(ct)!==-1)switch(gt.type){case"revolute":H.multiply(nt.makeRotationAxis(wt,Ei.degToRad(Ue)));break;case"prismatic":H.multiply(nt.makeTranslation(wt.x*Ue,wt.y*Ue,wt.z*Ue));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+gt.type);break}else switch($t.type){case"matrix":H.multiply($t.obj);break;case"translate":H.multiply(nt.makeTranslation($t.obj.x,$t.obj.y,$t.obj.z));break;case"scale":H.scale($t.obj);break;case"rotate":H.multiply(nt.makeRotationAxis($t.obj,$t.angle));break}}Dt.matrix.copy(H),Dt.matrix.decompose(Dt.position,Dt.quaternion,Dt.scale),lt[ct].position=Ue}}else console.log("THREE.ColladaLoader: "+ct+" does not exist.")}}}function ft(M){const b=[],F=Bt.querySelector('[id="'+M.id+'"]');for(let R=0;R<F.childNodes.length;R++){const N=F.childNodes[R];if(N.nodeType!==1)continue;let de,Me;switch(N.nodeName){case"matrix":de=r(N.textContent);const lt=new Et().fromArray(de).transpose();b.push({sid:N.getAttribute("sid"),type:N.nodeName,obj:lt});break;case"translate":case"scale":de=r(N.textContent),Me=new I().fromArray(de),b.push({sid:N.getAttribute("sid"),type:N.nodeName,obj:Me});break;case"rotate":de=r(N.textContent),Me=new I().fromArray(de);const qe=Ei.degToRad(de[3]);b.push({sid:N.getAttribute("sid"),type:N.nodeName,obj:Me,angle:qe});break}}return b}function w(M){const b=M.getElementsByTagName("node");for(let F=0;F<b.length;F++){const R=b[F];R.hasAttribute("id")===!1&&R.setAttribute("id",l())}}const H=new Et,X=new I;function $(M){const b={name:M.getAttribute("name")||"",type:M.getAttribute("type"),id:M.getAttribute("id"),sid:M.getAttribute("sid"),matrix:new Et,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];if(R.nodeType!==1)continue;let N;switch(R.nodeName){case"node":b.nodes.push(R.getAttribute("id")),$(R);break;case"instance_camera":b.instanceCameras.push(a(R.getAttribute("url")));break;case"instance_controller":b.instanceControllers.push(z(R));break;case"instance_light":b.instanceLights.push(a(R.getAttribute("url")));break;case"instance_geometry":b.instanceGeometries.push(z(R));break;case"instance_node":b.instanceNodes.push(a(R.getAttribute("url")));break;case"matrix":N=r(R.textContent),b.matrix.multiply(H.fromArray(N).transpose()),b.transforms[R.getAttribute("sid")]=R.nodeName;break;case"translate":N=r(R.textContent),X.fromArray(N),b.matrix.multiply(H.makeTranslation(X.x,X.y,X.z)),b.transforms[R.getAttribute("sid")]=R.nodeName;break;case"rotate":N=r(R.textContent);const de=Ei.degToRad(N[3]);b.matrix.multiply(H.makeRotationAxis(X.fromArray(N),de)),b.transforms[R.getAttribute("sid")]=R.nodeName;break;case"scale":N=r(R.textContent),b.matrix.scale(X.fromArray(N)),b.transforms[R.getAttribute("sid")]=R.nodeName;break;case"extra":break;default:console.log(R)}}return Pe(b.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",b.id):ht.nodes[b.id]=b,b}function z(M){const b={id:a(M.getAttribute("url")),materials:{},skeletons:[]};for(let F=0;F<M.childNodes.length;F++){const R=M.childNodes[F];switch(R.nodeName){case"bind_material":const N=R.getElementsByTagName("instance_material");for(let de=0;de<N.length;de++){const Me=N[de],lt=Me.getAttribute("symbol"),qe=Me.getAttribute("target");b.materials[lt]=a(qe)}break;case"skeleton":b.skeletons.push(a(R.textContent));break}}return b}function pe(M,b){const F=[],R=[];let N,de,Me;for(N=0;N<M.length;N++){const nt=M[N];let ct;if(Pe(nt))ct=it(nt),ie(ct,b,F);else if(bt(nt)){const xt=ht.visualScenes[nt].children;for(let gt=0;gt<xt.length;gt++){const Dt=xt[gt];if(Dt.type==="JOINT"){const wt=it(Dt.id);ie(wt,b,F)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",nt)}for(N=0;N<b.length;N++)for(de=0;de<F.length;de++)if(Me=F[de],Me.bone.name===b[N].name){R[N]=Me,Me.processed=!0;break}for(N=0;N<F.length;N++)Me=F[N],Me.processed===!1&&(R.push(Me),Me.processed=!0);const lt=[],qe=[];for(N=0;N<R.length;N++)Me=R[N],lt.push(Me.bone),qe.push(Me.boneInverse);return new tc(lt,qe)}function ie(M,b,F){M.traverse(function(R){if(R.isBone===!0){let N;for(let de=0;de<b.length;de++){const Me=b[de];if(Me.name===R.name){N=Me.boneInverse;break}}N===void 0&&(N=new Et),F.push({bone:R,boneInverse:N,processed:!1})}})}function Ee(M){const b=[],F=M.matrix,R=M.nodes,N=M.type,de=M.instanceCameras,Me=M.instanceControllers,lt=M.instanceLights,qe=M.instanceGeometries,nt=M.instanceNodes;for(let Ue=0,xt=R.length;Ue<xt;Ue++)b.push(it(R[Ue]));for(let Ue=0,xt=de.length;Ue<xt;Ue++){const gt=st(de[Ue]);gt!==null&&b.push(gt.clone())}for(let Ue=0,xt=Me.length;Ue<xt;Ue++){const gt=Me[Ue],Dt=Y(gt.id),wt=Cn(Dt.id),dn=Se(wt,gt.materials),en=gt.skeletons,$t=Dt.skin.joints,Yt=pe(en,$t);for(let gi=0,zn=dn.length;gi<zn;gi++){const ps=dn[gi];ps.isSkinnedMesh&&(ps.bind(Yt,Dt.skin.bindMatrix),ps.normalizeSkinWeights()),b.push(ps)}}for(let Ue=0,xt=lt.length;Ue<xt;Ue++){const gt=K(lt[Ue]);gt!==null&&b.push(gt.clone())}for(let Ue=0,xt=qe.length;Ue<xt;Ue++){const gt=qe[Ue],Dt=Cn(gt.id),wt=Se(Dt,gt.materials);for(let dn=0,en=wt.length;dn<en;dn++)b.push(wt[dn])}for(let Ue=0,xt=nt.length;Ue<xt;Ue++)b.push(it(nt[Ue]).clone());let ct;if(R.length===0&&b.length===1)ct=b[0];else{ct=N==="JOINT"?new k0:new Ln;for(let Ue=0;Ue<b.length;Ue++)ct.add(b[Ue])}return ct.name=N==="JOINT"?M.sid:M.name,ct.matrix.copy(F),ct.matrix.decompose(ct.position,ct.quaternion,ct.scale),ct}const re=new qi({name:oi.DEFAULT_MATERIAL_NAME,color:16711935});function He(M,b){const F=[];for(let R=0,N=M.length;R<N;R++){const de=b[M[R]];de===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",M[R]),F.push(re)):F.push(xe(de))}return F}function Se(M,b){const F=[];for(const R in M){const N=M[R],de=He(N.materialKeys,b);if(de.length===0&&(R==="lines"||R==="linestrips"?de.push(new Ri):de.push(new fn)),R==="lines"||R==="linestrips")for(let nt=0,ct=de.length;nt<ct;nt++){const Ue=de[nt];if(Ue.isMeshPhongMaterial===!0||Ue.isMeshLambertMaterial===!0){const xt=new Ri;xt.color.copy(Ue.color),xt.opacity=Ue.opacity,xt.transparent=Ue.transparent,de[nt]=xt}}const Me=N.data.attributes.skinIndex!==void 0,lt=de.length===1?de[0]:de;let qe;switch(R){case"lines":qe=new Ra(N.data,lt);break;case"linestrips":qe=new Ba(N.data,lt);break;case"triangles":case"polylist":Me?qe=new o1(N.data,lt):qe=new zt(N.data,lt);break}F.push(qe)}return F}function Pe(M){return ht.nodes[M]!==void 0}function it(M){return _(ht.nodes[M],Ee)}function Mt(M){const b={name:M.getAttribute("name"),children:[]};w(M);const F=n(M,"node");for(let R=0;R<F.length;R++)b.children.push($(F[R]));ht.visualScenes[M.getAttribute("id")]=b}function Ct(M){const b=new Ln;b.name=M.name;const F=M.children;for(let R=0;R<F.length;R++){const N=F[R];b.add(it(N.id))}return b}function bt(M){return ht.visualScenes[M]!==void 0}function St(M){return _(ht.visualScenes[M],Ct)}function Qe(M){const b=n(M,"instance_visual_scene")[0];return St(a(b.getAttribute("url")))}function Wt(){const M=ht.clips;if(c(M)===!0){if(c(ht.animations)===!1){const b=[];for(const F in ht.animations){const R=S(F);for(let N=0,de=R.length;N<de;N++)b.push(R[N])}Kt.push(new hh("default",-1,b))}}else for(const b in M)Kt.push(Z(b))}function Ut(M){let b="";const F=[M];for(;F.length;){const R=F.shift();R.nodeType===Node.TEXT_NODE?b+=R.textContent:(b+=`
|
|
4198
|
-
`,
|
|
4199
|
-
`,b),null}const Ge=Bt.getAttribute("version");console.debug("THREE.ColladaLoader: File version",Ge);const Pt=d(n(Bt,"asset")[0]),Ot=new oc(this.manager);Ot.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);let Jt;r0&&(Jt=new r0(this.manager),Jt.setPath(this.resourcePath||t));const sn=new Tt,Kt=[];let rt={},ke=0;const ht={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(Bt,"library_animations","animation",p),h(Bt,"library_animation_clips","animation_clip",G),h(Bt,"library_controllers","controller",ge),h(Bt,"library_images","image",ee),h(Bt,"library_effects","effect",J),h(Bt,"library_materials","material",oe),h(Bt,"library_cameras","camera",vt),h(Bt,"library_lights","light",Rt),h(Bt,"library_geometries","geometry",Ye),h(Bt,"library_nodes","node",$),h(Bt,"library_visual_scenes","visual_scene",Mt),h(Bt,"library_kinematics_models","kinematics_model",Hn),h(Bt,"library_physics_models","physics_model",me),h(Bt,"scene","instance_kinematics_scene",Te),g(ht.animations,y),g(ht.clips,ce),g(ht.controllers,ae),g(ht.images,ne),g(ht.effects,k),g(ht.materials,Re),g(ht.cameras,Ne),g(ht.lights,Lt),g(ht.geometries,Ft),g(ht.visualScenes,Ct),Wt(),Xe();const xn=Qe(n(Bt,"scene")[0]);return xn.animations=Kt,Pt.upAxis==="Z_UP"&&(console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."),xn.rotation.set(-Math.PI/2,0,0)),xn.scale.multiplyScalar(Pt.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),Kt},kinematics:rt,library:ht,scene:xn}}}const a0=new I,S4=new Sn,ca=new Et,Vi=new Et,ha=new Vn,ua=new I(1,1,1),da=new I;class Wa extends ln{constructor(...e){super(...e),this.urdfNode=null,this.urdfName=""}copy(e,t){return super.copy(e,t),this.urdfNode=e.urdfNode,this.urdfName=e.urdfName,this}}class E4 extends Wa{constructor(...e){super(...e),this.isURDFCollider=!0,this.type="URDFCollider"}}class A4 extends Wa{constructor(...e){super(...e),this.isURDFVisual=!0,this.type="URDFVisual"}}class du extends Wa{constructor(...e){super(...e),this.isURDFLink=!0,this.type="URDFLink"}}class fu extends Wa{get jointType(){return this._jointType}set jointType(e){if(this.jointType!==e)switch(this._jointType=e,this.matrixWorldNeedsUpdate=!0,e){case"fixed":this.jointValue=[];break;case"continuous":case"revolute":case"prismatic":this.jointValue=new Array(1).fill(0);break;case"planar":this.jointValue=new Array(3).fill(0),this.axis=new I(0,0,1);break;case"floating":this.jointValue=new Array(6).fill(0);break}}get angle(){return this.jointValue[0]}constructor(...e){super(...e),this.isURDFJoint=!0,this.type="URDFJoint",this.jointValue=null,this.jointType="fixed",this.axis=new I(1,0,0),this.limit={lower:0,upper:0},this.ignoreLimits=!1,this.origPosition=null,this.origQuaternion=null,this.mimicJoints=[]}copy(e,t){return super.copy(e,t),this.jointType=e.jointType,this.axis=e.axis.clone(),this.limit.lower=e.limit.lower,this.limit.upper=e.limit.upper,this.ignoreLimits=!1,this.jointValue=[...e.jointValue],this.origPosition=e.origPosition?e.origPosition.clone():null,this.origQuaternion=e.origQuaternion?e.origQuaternion.clone():null,this.mimicJoints=[...e.mimicJoints],this}setJointValue(...e){e=e.map(n=>n===null?null:parseFloat(n)),(!this.origPosition||!this.origQuaternion)&&(this.origPosition=this.position.clone(),this.origQuaternion=this.quaternion.clone());let t=!1;switch(this.mimicJoints.forEach(n=>{t=n.updateFromMimickedJoint(...e)||t}),this.jointType){case"fixed":return t;case"continuous":case"revolute":{let n=e[0];return n==null||n===this.jointValue[0]?t:(!this.ignoreLimits&&this.jointType==="revolute"&&(n=Math.min(this.limit.upper,n),n=Math.max(this.limit.lower,n)),this.quaternion.setFromAxisAngle(this.axis,n).premultiply(this.origQuaternion),this.jointValue[0]!==n?(this.jointValue[0]=n,this.matrixWorldNeedsUpdate=!0,!0):t)}case"prismatic":{let n=e[0];return n==null||n===this.jointValue[0]?t:(this.ignoreLimits||(n=Math.min(this.limit.upper,n),n=Math.max(this.limit.lower,n)),this.position.copy(this.origPosition),a0.copy(this.axis).applyEuler(this.rotation),this.position.addScaledVector(a0,n),this.jointValue[0]!==n?(this.jointValue[0]=n,this.matrixWorldNeedsUpdate=!0,!0):t)}case"floating":return this.jointValue.every((n,i)=>e[i]===n||e[i]===null)?t:(this.jointValue[0]=e[0]!==null?e[0]:this.jointValue[0],this.jointValue[1]=e[1]!==null?e[1]:this.jointValue[1],this.jointValue[2]=e[2]!==null?e[2]:this.jointValue[2],this.jointValue[3]=e[3]!==null?e[3]:this.jointValue[3],this.jointValue[4]=e[4]!==null?e[4]:this.jointValue[4],this.jointValue[5]=e[5]!==null?e[5]:this.jointValue[5],Vi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromEuler(S4.set(this.jointValue[3],this.jointValue[4],this.jointValue[5],"XYZ")),da.set(this.jointValue[0],this.jointValue[1],this.jointValue[2]),ca.compose(da,ha,ua),Vi.premultiply(ca),this.position.setFromMatrixPosition(Vi),this.rotation.setFromRotationMatrix(Vi),this.matrixWorldNeedsUpdate=!0,!0);case"planar":return this.jointValue.every((n,i)=>e[i]===n||e[i]===null)?t:(this.jointValue[0]=e[0]!==null?e[0]:this.jointValue[0],this.jointValue[1]=e[1]!==null?e[1]:this.jointValue[1],this.jointValue[2]=e[2]!==null?e[2]:this.jointValue[2],Vi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromAxisAngle(this.axis,this.jointValue[2]),da.set(this.jointValue[0],this.jointValue[1],0),ca.compose(da,ha,ua),Vi.premultiply(ca),this.position.setFromMatrixPosition(Vi),this.rotation.setFromRotationMatrix(Vi),this.matrixWorldNeedsUpdate=!0,!0)}return t}}class o0 extends fu{constructor(...e){super(...e),this.type="URDFMimicJoint",this.mimicJoint=null,this.offset=0,this.multiplier=1}updateFromMimickedJoint(...e){const t=e.map(n=>n*this.multiplier+this.offset);return super.setJointValue(...t)}copy(e,t){return super.copy(e,t),this.mimicJoint=e.mimicJoint,this.offset=e.offset,this.multiplier=e.multiplier,this}}class w4 extends du{constructor(...e){super(...e),this.isURDFRobot=!0,this.urdfNode=null,this.urdfRobotNode=null,this.robotName=null,this.links=null,this.joints=null,this.colliders=null,this.visual=null,this.frames=null}copy(e,t){super.copy(e,t),this.urdfRobotNode=e.urdfRobotNode,this.robotName=e.robotName,this.links={},this.joints={},this.colliders={},this.visual={},this.traverse(n=>{n.isURDFJoint&&n.urdfName in e.joints&&(this.joints[n.urdfName]=n),n.isURDFLink&&n.urdfName in e.links&&(this.links[n.urdfName]=n),n.isURDFCollider&&n.urdfName in e.colliders&&(this.colliders[n.urdfName]=n),n.isURDFVisual&&n.urdfName in e.visual&&(this.visual[n.urdfName]=n)});for(const n in this.joints)this.joints[n].mimicJoints=this.joints[n].mimicJoints.map(i=>this.joints[i.name]);return this.frames={...this.colliders,...this.visual,...this.links,...this.joints},this}getFrame(e){return this.frames[e]}setJointValue(e,...t){const n=this.joints[e];return n?n.setJointValue(...t):!1}setJointValues(e){let t=!1;for(const n in e){const i=e[n];Array.isArray(i)?t=this.setJointValue(n,...i)||t:t=this.setJointValue(n,i)||t}return t}}const Io=new Vn,l0=new Sn;function Us(s){return s?s.trim().split(/\s+/g).map(e=>parseFloat(e)):[0,0,0]}function c0(s,e,t=!1){t||s.rotation.set(0,0,0),l0.set(e[0],e[1],e[2],"ZYX"),Io.setFromEuler(l0),Io.multiply(s.quaternion),s.quaternion.copy(Io)}class gc{constructor(e){this.manager=e||ac,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(e){return new Promise((t,n)=>{this.load(e,t,null,n)})}load(e,t,n,i){const r=this.manager,o=hc.extractUrlBase(e),a=this.manager.resolveURL(e);r.itemStart(a),fetch(a,this.fetchOptions).then(l=>{if(l.ok)return n&&n(null),l.text();throw new Error(`URDFLoader: Failed to load url '${a}' with error code ${l.status} : ${l.statusText}.`)}).then(l=>{const c=this.parse(l,this.workingPath||o);t(c),r.itemEnd(a)}).catch(l=>{i?i(l):console.error("URDFLoader: Error loading file.",l),r.itemError(a),r.itemEnd(a)})}parse(e,t=this.workingPath){const n=this.packages,i=this.loadMeshCb,r=this.parseVisual,o=this.parseCollision,a=this.manager,l={},c={},d={};function m(x){if(!/^package:\/\//.test(x))return t?t+x:x;const[y,S]=x.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof n=="string")return n.endsWith(y)?n+"/"+S:n+"/"+y+"/"+S;if(n instanceof Function)return n(y)+"/"+S;if(typeof n=="object")return y in n?n[y]+"/"+S:(console.error(`URDFLoader : ${y} not found in provided package list.`),null)}function u(x){let y;x instanceof Document?y=[...x.children]:x instanceof Element?y=[x]:y=[...new DOMParser().parseFromString(x,"text/xml").children];const S=y.filter(U=>U.nodeName==="robot").pop();return h(S)}function h(x){const y=[...x.children],S=y.filter(D=>D.nodeName.toLowerCase()==="link"),U=y.filter(D=>D.nodeName.toLowerCase()==="joint"),C=y.filter(D=>D.nodeName.toLowerCase()==="material"),L=new w4;L.robotName=x.getAttribute("name"),L.urdfRobotNode=x,C.forEach(D=>{const O=D.getAttribute("name");d[O]=p(D)});const P={},E={};S.forEach(D=>{const O=D.getAttribute("name"),V=x.querySelector(`child[link="${O}"]`)===null;l[O]=_(D,P,E,V?L:null)}),U.forEach(D=>{const O=D.getAttribute("name");c[O]=g(D)}),L.joints=c,L.links=l,L.colliders=E,L.visual=P;const A=Object.values(c);return A.forEach(D=>{D instanceof o0&&c[D.mimicJoint].mimicJoints.push(D)}),A.forEach(D=>{const O=new Set,V=Q=>{if(O.has(Q))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");O.add(Q),Q.mimicJoints.forEach(se=>{V(se)})};V(D)}),L.frames={...E,...P,...l,...c},L}function g(x){const y=[...x.children],S=x.getAttribute("type");let U;const C=y.find(O=>O.nodeName.toLowerCase()==="mimic");C?(U=new o0,U.mimicJoint=C.getAttribute("joint"),U.multiplier=parseFloat(C.getAttribute("multiplier")||1),U.offset=parseFloat(C.getAttribute("offset")||0)):U=new fu,U.urdfNode=x,U.name=x.getAttribute("name"),U.urdfName=U.name,U.jointType=S;let L=null,P=null,E=[0,0,0],A=[0,0,0];y.forEach(O=>{const V=O.nodeName.toLowerCase();V==="origin"?(E=Us(O.getAttribute("xyz")),A=Us(O.getAttribute("rpy"))):V==="child"?P=l[O.getAttribute("link")]:V==="parent"?L=l[O.getAttribute("link")]:V==="limit"&&(U.limit.lower=parseFloat(O.getAttribute("lower")||U.limit.lower),U.limit.upper=parseFloat(O.getAttribute("upper")||U.limit.upper))}),L.add(U),U.add(P),c0(U,A),U.position.set(E[0],E[1],E[2]);const D=y.filter(O=>O.nodeName.toLowerCase()==="axis")[0];if(D){const O=D.getAttribute("xyz").split(/\s+/g).map(V=>parseFloat(V));U.axis=new I(O[0],O[1],O[2]),U.axis.normalize()}return U}function _(x,y,S,U=null){U===null&&(U=new du);const C=[...x.children];return U.name=x.getAttribute("name"),U.urdfName=U.name,U.urdfNode=x,r&&C.filter(P=>P.nodeName.toLowerCase()==="visual").forEach(P=>{const E=f(P,d);if(U.add(E),P.hasAttribute("name")){const A=P.getAttribute("name");E.name=A,E.urdfName=A,y[A]=E}}),o&&C.filter(P=>P.nodeName.toLowerCase()==="collision").forEach(P=>{const E=f(P);if(U.add(E),P.hasAttribute("name")){const A=P.getAttribute("name");E.name=A,E.urdfName=A,S[A]=E}}),U}function p(x){const y=[...x.children],S=new fn;return S.name=x.getAttribute("name")||"",y.forEach(U=>{const C=U.nodeName.toLowerCase();if(C==="color"){const L=U.getAttribute("rgba").split(/\s/g).map(P=>parseFloat(P));S.color.setRGB(L[0],L[1],L[2]),S.opacity=L[3],S.transparent=L[3]<1,S.depthWrite=!S.transparent}else if(C==="texture"){const L=U.getAttribute("filename");if(L){const P=new oc(a),E=m(L);S.map=P.load(E),S.map.colorSpace=qt}}}),S}function f(x,y={}){const S=x.nodeName.toLowerCase()==="collision",U=[...x.children];let C=null;const L=U.filter(E=>E.nodeName.toLowerCase()==="material")[0];if(L){const E=L.getAttribute("name");E&&E in y?C=y[E]:C=p(L)}else C=new fn;const P=S?new E4:new A4;return P.urdfNode=x,U.forEach(E=>{const A=E.nodeName.toLowerCase();if(A==="geometry"){const D=E.children[0].nodeName.toLowerCase();if(D==="mesh"){const O=E.children[0].getAttribute("filename"),V=m(O);if(V!==null){const Q=E.children[0].getAttribute("scale");if(Q){const se=Us(Q);P.scale.set(se[0],se[1],se[2])}i(V,a,(se,G)=>{G?console.error("URDFLoader: Error loading mesh.",G):se&&(se instanceof zt&&(se.material=C),se.position.set(0,0,0),se.quaternion.identity(),P.add(se))})}}else if(D==="box"){const O=new zt;O.geometry=new $i(1,1,1),O.material=C;const V=Us(E.children[0].getAttribute("size"));O.scale.set(V[0],V[1],V[2]),P.add(O)}else if(D==="sphere"){const O=new zt;O.geometry=new Oa(1,30,30),O.material=C;const V=parseFloat(E.children[0].getAttribute("radius"))||0;O.scale.set(V,V,V),P.add(O)}else if(D==="cylinder"){const O=new zt;O.geometry=new ic(1,1,1,30),O.material=C;const V=parseFloat(E.children[0].getAttribute("radius"))||0,Q=parseFloat(E.children[0].getAttribute("length"))||0;O.scale.set(V,Q,V),O.rotation.set(Math.PI/2,0,0),P.add(O)}}else if(A==="origin"){const D=Us(E.getAttribute("xyz")),O=Us(E.getAttribute("rpy"));P.position.set(D[0],D[1],D[2]),P.rotation.set(0,0,0),c0(P,O)}}),P}return u(e)}defaultMeshLoader(e,t,n){/\.stl$/i.test(e)?new ji(t).load(e,r=>{const o=new zt(r,new fn);n(o)}):/\.dae$/i.test(e)?new b4(t).load(e,r=>n(r.scene)):console.warn(`URDFLoader: Could not load model at ${e}.
|
|
4197
|
+
`};class mc extends Li{constructor(e){super({type:"LineMaterial",uniforms:Ql.clone(kn.line.uniforms),vertexShader:kn.line.vertexShader,fragmentShader:kn.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const Fo=new Xt,Qh=new I,e0=new I,En=new Xt,An=new Xt,ci=new Xt,No=new I,Uo=new Et,wn=new J1,t0=new I,oa=new Fn,la=new Fi,hi=new Xt;let ui,os;function n0(s,e,t){return hi.set(0,0,-e,1).applyMatrix4(s.projectionMatrix),hi.multiplyScalar(1/hi.w),hi.x=os/t.width,hi.y=os/t.height,hi.applyMatrix4(s.projectionMatrixInverse),hi.multiplyScalar(1/hi.w),Math.abs(Math.max(hi.x,hi.y))}function d4(s,e){const t=s.matrixWorld,n=s.geometry,i=n.attributes.instanceStart,r=n.attributes.instanceEnd,o=Math.min(n.instanceCount,i.count);for(let a=0,l=o;a<l;a++){wn.start.fromBufferAttribute(i,a),wn.end.fromBufferAttribute(r,a),wn.applyMatrix4(t);const c=new I,d=new I;ui.distanceSqToSegment(wn.start,wn.end,d,c),d.distanceTo(c)<os*.5&&e.push({point:d,pointOnLine:c,distance:ui.origin.distanceTo(d),object:s,face:null,faceIndex:a,uv:null,uv1:null})}}function f4(s,e,t){const n=e.projectionMatrix,i=s.material.resolution,r=s.matrixWorld,o=s.geometry,a=o.attributes.instanceStart,l=o.attributes.instanceEnd,c=Math.min(o.instanceCount,a.count),d=-e.near;ui.at(1,ci),ci.w=1,ci.applyMatrix4(e.matrixWorldInverse),ci.applyMatrix4(n),ci.multiplyScalar(1/ci.w),ci.x*=i.x/2,ci.y*=i.y/2,ci.z=0,No.copy(ci),Uo.multiplyMatrices(e.matrixWorldInverse,r);for(let m=0,u=c;m<u;m++){if(En.fromBufferAttribute(a,m),An.fromBufferAttribute(l,m),En.w=1,An.w=1,En.applyMatrix4(Uo),An.applyMatrix4(Uo),En.z>d&&An.z>d)continue;if(En.z>d){const f=En.z-An.z,v=(En.z-d)/f;En.lerp(An,v)}else if(An.z>d){const f=An.z-En.z,v=(An.z-d)/f;An.lerp(En,v)}En.applyMatrix4(n),An.applyMatrix4(n),En.multiplyScalar(1/En.w),An.multiplyScalar(1/An.w),En.x*=i.x/2,En.y*=i.y/2,An.x*=i.x/2,An.y*=i.y/2,wn.start.copy(En),wn.start.z=0,wn.end.copy(An),wn.end.z=0;const h=wn.closestPointToPointParameter(No,!0);wn.at(h,t0);const g=Ei.lerp(En.z,An.z,h),_=g>=-1&&g<=1,p=No.distanceTo(t0)<os*.5;if(_&&p){wn.start.fromBufferAttribute(a,m),wn.end.fromBufferAttribute(l,m),wn.start.applyMatrix4(r),wn.end.applyMatrix4(r);const f=new I,v=new I;ui.distanceSqToSegment(wn.start,wn.end,v,f),t.push({point:v,pointOnLine:f,distance:ui.origin.distanceTo(v),object:s,face:null,faceIndex:m,uv:null,uv1:null})}}}class p4 extends zt{constructor(e=new cu,t=new mc({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let o=0,a=0,l=t.count;o<l;o++,a+=2)Qh.fromBufferAttribute(t,o),e0.fromBufferAttribute(n,o),i[a]=a===0?0:i[a-1],i[a+1]=i[a]+Qh.distanceTo(e0);const r=new Dl(i,2,1);return e.setAttribute("instanceDistanceStart",new pi(r,1,0)),e.setAttribute("instanceDistanceEnd",new pi(r,1,1)),this}raycast(e,t){const n=this.material.worldUnits,i=e.camera;i===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const r=e.params.Line2!==void 0&&e.params.Line2.threshold||0;ui=e.ray;const o=this.matrixWorld,a=this.geometry,l=this.material;os=l.linewidth+r,a.boundingSphere===null&&a.computeBoundingSphere(),la.copy(a.boundingSphere).applyMatrix4(o);let c;if(n)c=os*.5;else{const m=Math.max(i.near,la.distanceToPoint(ui.origin));c=n0(i,m,l.resolution)}if(la.radius+=c,ui.intersectsSphere(la)===!1)return;a.boundingBox===null&&a.computeBoundingBox(),oa.copy(a.boundingBox).applyMatrix4(o);let d;if(n)d=os*.5;else{const m=Math.max(i.near,oa.distanceToPoint(ui.origin));d=n0(i,m,l.resolution)}oa.expandByScalar(d),ui.intersectsBox(oa)!==!1&&(n?d4(this,t):f4(this,i,t))}onBeforeRender(e){const t=this.material.uniforms;t&&t.resolution&&(e.getViewport(Fo),this.material.uniforms.resolution.value.set(Fo.z,Fo.w))}}class hu extends cu{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setPositions(n),this}setColors(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setColors(n),this}setFromPoints(e){const t=e.length-1,n=new Float32Array(6*t);for(let i=0;i<t;i++)n[6*i]=e[i].x,n[6*i+1]=e[i].y,n[6*i+2]=e[i].z||0,n[6*i+3]=e[i+1].x,n[6*i+4]=e[i+1].y,n[6*i+5]=e[i+1].z||0;return super.setPositions(n),this}fromLine(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class m4 extends p4{constructor(e=new hu,t=new mc({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}const g4=s=>{const e=new Tt,t=[],n=[],{isSphere:i}=s;if(br.forEach((a,l)=>{const{enabled:c,line:d,scale:m,color:u}=s[a];if(!c||!d)return;const h=l<3?1:-1,g=(i?lu-m/2:.975)*h;t.push(a.includes("x")?g:0,a.includes("y")?g:0,a.includes("z")?g:0,0,0,0);const _=e.set(u).toArray();n.push(..._,..._)}),!t.length)return null;const r=new hu().setPositions(t).setColors(n),o=new mc({linewidth:s.lineWidth,vertexColors:!0,resolution:new et(window.innerWidth,window.innerHeight)});return new m4(r,o).computeLineDistances()},_4=s=>{const{corners:e,edges:t}=s,n=[],i=r4(s),r=o4(s,i);n.push(...r),e.enabled&&n.push(...l4(s,i)),t.enabled&&n.push(...c4(s,i,e.enabled?7:6));const o=u4(r,s),a=g4(s);return[n,o,a]},cr=(s,e=!0)=>{const{material:t,userData:n}=s,{opacity:i,color:r,scale:o}=e?n.hover:n;s.scale.setScalar(o),t.opacity=i,t.map?a4(t.map,e):t.color.set(r)},Fs=new Et,i0=new Pl,v4=new et,is=new I,s0=new Xt;class uu extends ln{constructor(e,t,n={}){super(),Zt(this,"enabled",!0),Zt(this,"camera"),Zt(this,"renderer"),Zt(this,"options"),Zt(this,"target",new I),Zt(this,"animated",!0),Zt(this,"speed",1),Zt(this,"animating",!1),Zt(this,"_options"),Zt(this,"_intersections"),Zt(this,"_background",null),Zt(this,"_viewport",[0,0,0,0]),Zt(this,"_originalViewport",[0,0,0,0]),Zt(this,"_originalScissor",[0,0,0,0]),Zt(this,"_scene"),Zt(this,"_camera"),Zt(this,"_container"),Zt(this,"_domElement"),Zt(this,"_domRect"),Zt(this,"_dragging",!1),Zt(this,"_distance",0),Zt(this,"_clock",new $1),Zt(this,"_targetQuaternion",new Vn),Zt(this,"_quaternionStart",new Vn),Zt(this,"_quaternionEnd",new Vn),Zt(this,"_pointerStart",new et),Zt(this,"_focus",null),Zt(this,"_placement"),Zt(this,"_controls"),Zt(this,"_controlsListeners"),this.camera=e,this.renderer=t,this._scene=new Ia().add(this),this.set(n)}get placement(){return this._placement}set placement(e){this._placement=au(this._domElement,e),this.domUpdate()}set(e={}){this.dispose(),this.options=e,this._options=s4(e),this._camera=this._options.isSphere?new Ha(-1.8,1.8,1.8,-1.8,5,10):new bn(26,1,5,10),this._camera.position.set(0,0,7);const[t,n,i]=_4(this._options);n&&this.add(n),i&&this.add(i),this.add(...t),this._background=n,this._intersections=t;const{container:r,animated:o,speed:a}=this._options;return this.animated=o,this.speed=a,this._container=r?K3(r):document.body,this._domElement=J3(this._options),this._domElement.onpointerdown=l=>this._onPointerDown(l),this._domElement.onpointermove=l=>this._onPointerMove(l),this._domElement.onpointerleave=()=>this._onPointerLeave(),this._container.appendChild(this._domElement),this._controls&&this.attachControls(this._controls),this.update(),this._updateOrientation(!0),this}render(){this.animating&&this._animate();const{renderer:e,_viewport:t}=this,n=e.getScissorTest(),i=e.autoClear;return e.autoClear=!1,e.setViewport(...t),n&&e.setScissor(...t),e.clear(!1,!0,!1),e.render(this._scene,this._camera),e.setViewport(...this._originalViewport),n&&e.setScissor(...this._originalScissor),e.autoClear=i,this}domUpdate(){this._domRect=this._domElement.getBoundingClientRect();const e=this.renderer,t=this._domRect,n=e.domElement.getBoundingClientRect();return this._viewport.splice(0,4,t.left-n.left,e.domElement.clientHeight-(t.top-n.top+t.height),t.width,t.height),e.getViewport(s0).toArray(this._originalViewport),e.getScissorTest()&&e.getScissor(s0).toArray(this._originalScissor),this}cameraUpdate(){return this._updateOrientation(),this}update(e=!0){return e&&this._controls&&this._controls.update(),this.domUpdate().cameraUpdate()}attachControls(e){return this.detachControls(),this.target=e.target,this._controlsListeners={start:()=>e.enabled=!1,end:()=>e.enabled=!0,change:()=>this.update(!1)},this.addEventListener("start",this._controlsListeners.start),this.addEventListener("end",this._controlsListeners.end),e.addEventListener("change",this._controlsListeners.change),this._controls=e,this}detachControls(){if(!(!this._controlsListeners||!this._controls))return this.target=new I().copy(this._controls.target),this.removeEventListener("start",this._controlsListeners.start),this.removeEventListener("end",this._controlsListeners.end),this._controls.removeEventListener("change",this._controlsListeners.change),this._controlsListeners=void 0,this._controls=void 0,this}dispose(){var e;this.detachControls(),this.children.forEach(t=>{var n,i,r,o;this.remove(t);const a=t;(n=a.material)==null||n.dispose(),(r=(i=a.material)==null?void 0:i.map)==null||r.dispose(),(o=a.geometry)==null||o.dispose()}),(e=this._domElement)==null||e.remove()}_updateOrientation(e=!0){e&&(this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()),jh(this._options,this._intersections,this.camera)}_animate(){const{position:e,quaternion:t}=this.camera;if(e.set(0,0,1),!this.animated){e.applyQuaternion(this._quaternionEnd).multiplyScalar(this._distance).add(this.target),t.copy(this._targetQuaternion),this._updateOrientation(),this.animating=!1,this.dispatchEvent({type:"change"}),this.dispatchEvent({type:"end"});return}this._controls&&(this._controls.enabled=!1);const n=this._clock.getDelta()*e4*this.speed;this._quaternionStart.rotateTowards(this._quaternionEnd,n),e.applyQuaternion(this._quaternionStart).multiplyScalar(this._distance).add(this.target),t.rotateTowards(this._targetQuaternion,n),this._updateOrientation(),requestAnimationFrame(()=>this.dispatchEvent({type:"change"})),this._quaternionStart.angleTo(this._quaternionEnd)<Po&&(this._controls&&(this._controls.enabled=!0),this.animating=!1,this.dispatchEvent({type:"end"}))}_setOrientation(e){const t=this.camera,n=this.target;is.copy(e).multiplyScalar(this._distance),Fs.setPosition(is).lookAt(is,this.position,this.up),this._targetQuaternion.setFromRotationMatrix(Fs),is.add(n),Fs.lookAt(is,n,this.up),this._quaternionEnd.setFromRotationMatrix(Fs),Fs.setPosition(t.position).lookAt(t.position,n,this.up),this._quaternionStart.setFromRotationMatrix(Fs),this.animating=!0,this._clock.start(),this.dispatchEvent({type:"start"})}_onPointerDown(e){if(!this.enabled)return;const t=l=>{if(!this._dragging){if(Q3(l,this._pointerStart))return;this._dragging=!0}const c=v4.set(l.clientX,l.clientY).sub(this._pointerStart).multiplyScalar(1/this._domRect.width*Math.PI),d=this.coordinateConversion(is.subVectors(this.camera.position,this.target)),m=i0.setFromVector3(d);m.theta=o-c.x,m.phi=Nl(a-c.y,Po,Math.PI-Po),this.coordinateConversion(this.camera.position.setFromSpherical(m),!0).add(this.target),this.camera.lookAt(this.target),this.quaternion.copy(this.camera.quaternion).invert(),this._updateOrientation(!1),this.dispatchEvent({type:"change"})},n=()=>{if(document.removeEventListener("pointermove",t,!1),document.removeEventListener("pointerup",n,!1),!this._dragging)return this._handleClick(e);this._focus&&(cr(this._focus,!1),this._focus=null),this._dragging=!1,this.dispatchEvent({type:"end"})};if(this.animating)return;e.preventDefault(),this._pointerStart.set(e.clientX,e.clientY);const i=this.coordinateConversion(is.subVectors(this.camera.position,this.target)),r=i0.setFromVector3(i),o=r.theta,a=r.phi;this._distance=r.radius,document.addEventListener("pointermove",t,!1),document.addEventListener("pointerup",n,!1),this.dispatchEvent({type:"start"})}coordinateConversion(e,t=!1){const{x:n,y:i,z:r}=e,o=ln.DEFAULT_UP;return o.x===1?t?e.set(i,r,n):e.set(r,n,i):o.z===1?t?e.set(r,n,i):e.set(i,r,n):e}_onPointerMove(e){!this.enabled||this._dragging||(this._background&&Jh(this._background,!0),this._handleHover(e))}_onPointerLeave(){!this.enabled||this._dragging||(this._background&&Jh(this._background,!1),this._focus&&cr(this._focus,!1),this._domElement.style.cursor="")}_handleClick(e){const t=Yh(e,this._domRect,this._camera,this._intersections);this._focus&&(cr(this._focus,!1),this._focus=null),t&&(this._setOrientation(t.object.position),this.dispatchEvent({type:"change"}))}_handleHover(e){const t=Yh(e,this._domRect,this._camera,this._intersections),n=(t==null?void 0:t.object)||null;this._focus!==n&&(this._domElement.style.cursor=n?"pointer":"",this._focus&&cr(this._focus,!1),(this._focus=n)?cr(n,!0):jh(this._options,this._intersections,this.camera))}}function y4(s){let e=null,t=null,n=null,i=null,r=null,o=null,a=null,l=null;const d=1e3/30;let m=0;const u=y.ref([]),h=y.ref(new I),g=y.ref(new I),_=()=>{if(!s.value)return;e=new Ia,e.background=new Tt(15790320);const L=s.value;t=new bn(75,L.clientWidth/L.clientHeight,.1,1e4),t.position.set(8,-8,6),t.up.set(0,0,1),t.lookAt(0,0,0),n=new iu({antialias:!0,alpha:!0}),n.setSize(L.clientWidth,L.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=Hl,n.toneMapping=Gl,n.toneMappingExposure=1,n.outputColorSpace=qt,L.appendChild(n.domElement),i=new ru(t,n.domElement),i.enableDamping=!0,i.dampingFactor=.05,i.mouseButtons={LEFT:null,MIDDLE:Ti.PAN,RIGHT:Ti.ROTATE},i.panSpeed=.7,r=new uu(t,n,{container:L,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),r.attachControls(i),v(),b()},p=(L,B)=>{a&&(e.remove(a),a.dispose()),l&&(e.remove(l),l.geometry.dispose(),l.material.dispose());const H=Math.min(Math.max(Math.floor(L/20),30),40);a=new K0(L,H,13421772,14540253),a.rotateX(Math.PI/2),a.position.copy(B),e.add(a);const Q=new Di(L,L),ae=new X0({opacity:.3,color:0});l=new zt(Q,ae),l.position.copy(B),l.position.z-=.01,l.receiveShadow=!0,e.add(l)},f=()=>{if(u.value.length===0)return;const L=new Fn;let B=!1;if(u.value.forEach(Z=>{if(Z.userData.boundingBox)L.union(Z.userData.boundingBox),B=!0;else if(Z.userData.modelId&&modelBoundingBoxes.has(Z.userData.modelId)){const ve=modelBoundingBoxes.get(Z.userData.modelId);L.union(ve.box),B=!0}else L.expandByObject(Z),B=!0}),!B){console.warn("无法计算包围盒,网格更新失败");return}const H=L.getSize(new I),Q=L.getCenter(new I),ae=Math.max(H.x,H.y,H.z),G=Math.max(ae*8,50),le=new I(Q.x,Q.y,L.min.z);p(G,le)},v=()=>{const L=new cc(4210752,.6);e.add(L);const B=new gr(16777215,2);B.position.set(10,10,8),B.castShadow=!0,B.shadow.mapSize.width=4096,B.shadow.mapSize.height=4096,B.shadow.camera.near=.5,B.shadow.camera.far=50,B.shadow.camera.left=-50,B.shadow.camera.right=50,B.shadow.camera.top=50,B.shadow.camera.bottom=-50,e.add(B);const H=new gr(16777215,.8);H.position.set(-8,-8,6),e.add(H);const Q=new gr(16777215,.6);Q.position.set(0,-15,2),e.add(Q);const ae=new J0(16777215,4473924,.8);e.add(ae);const G=new Pa(16777215,1,50);G.position.set(15,15,15),e.add(G);const le=new Pa(16777215,.5,50);le.position.set(-15,-15,15),e.add(le)},b=()=>{o=requestAnimationFrame(b),i&&i.update();const L=performance.now(),B=L-m;B<d||(m=L-B%d,n&&e&&t&&n.render(e,t),r&&r.render())},S=L=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(H=>{L[H]&&L[H].dispose&&L[H].dispose()}),L.dispose&&L.dispose()},F=L=>{L==null||L.traverse(B=>{B.geometry&&B.geometry.dispose(),B.material&&(Array.isArray(B.material)?B.material.forEach(H=>{S(H)}):S(B.material))})};return{currentModels:u,initialCameraPosition:h,initialTargetPosition:g,initThreeJS:_,handleResize:()=>{if(!s.value||!t||!n||!r)return;const L=s.value,B=L.clientWidth,H=L.clientHeight;t.aspect=B/H,t.updateProjectionMatrix(),n.setSize(B,H),r.update()},fitCameraToAllModels:L=>{if(!t||!i||u.value.length===0)return;const B=new Fn;let H=!1;if(u.value.forEach(ve=>{if(ve.userData.boundingBox)B.union(ve.userData.boundingBox),H=!0;else if(ve.userData.modelId&&L.has(ve.userData.modelId)){const Ee=L.get(ve.userData.modelId);B.union(Ee.box),H=!0}else B.expandByObject(ve),H=!0}),!H){console.warn("无法计算包围盒");return}const Q=B.getSize(new I),ae=B.getCenter(new I),le=Math.max(Q.x,Q.y,Q.z)*.8,Z=new I(ae.x+le,ae.y-le,ae.z+le);t.position.copy(Z),t.lookAt(ae),i.target.copy(ae),i.update(),h.value.copy(Z),g.value.copy(ae),f()},getThreeJSObjects:()=>({scene:e,camera:t,renderer:n,controls:i,gizmo:r}),clearAllModels:()=>{if(!e)return;u.value.forEach(B=>{e.remove(B),F(B)});const L=[];e.children.forEach(B=>{!B.isLight&&!B.isCamera&&B.type!=="GridHelper"&&B!==l&&L.push(B)}),L.forEach(B=>{e.remove(B),F(B)}),u.value=[],f()},cleanup:()=>{o&&cancelAnimationFrame(o),a&&a.dispose(),l&&(l.geometry.dispose(),l.material.dispose()),n&&n.dispose(),i&&i.dispose(),r&&r.dispose()},updateGridForModels:f}}function x4(s,e){const t=y.ref(!1);let n=null,i=12700,r=new I,o=new I,a=new I,l=0,c=null;const d=p=>p<.5?4*p*p*p:1-Math.pow(-2*p+2,3)/2,m=p=>{const f=new I,v=l*1.2,b=new I(a.x+v,a.y,a.z),S=new I(a.x,a.y+v,a.z),F=new I(a.x,a.y-v,a.z);if(p<=.567){const R=p/.567*Math.PI*2;f.x=a.x+Math.cos(R)*v,f.z=a.z+Math.sin(R)*v,f.y=a.y}else if(p<=.724){const C=(p-.567)/.157,R=d(C);f.lerpVectors(b,S,R)}else if(p<=.881){const C=(p-.724)/.157,P=d(C)*Math.PI;f.x=a.x+Math.sin(P)*v,f.y=a.y+Math.cos(P)*v,f.z=a.z}else{const C=(p-.881)/.119,R=d(C);f.lerpVectors(F,r,R)}return f},u=()=>{const{camera:p,controls:f}=s();if(!p||!f)return;n||(n=Date.now());const v=Date.now()-n,b=Math.min(v/i,1);if(b>=1){g();return}const S=m(b);p.position.copy(S),p.lookAt(a),f.target.copy(a),c=requestAnimationFrame(u)},h=()=>{if(e.value.length===0)return;const{camera:p,controls:f}=s();if(!p||!f)return;r.copy(p.position),o.copy(f.target);const v=new Fn;e.value.forEach(A=>{v.expandByObject(A)});const b=v.getSize(new I);a=v.getCenter(new I),l=Math.max(b.x,b.y,b.z)*1.2;const S=new I(a.x+l*1.2,a.y,a.z);f.enabled=!1;const F=p.position.clone(),C=1e3,R=Date.now(),P=()=>{const A=Date.now()-R,E=Math.min(A/C,1),L=d(E);p.position.lerpVectors(F,S,L),p.lookAt(a),f.target.copy(a),E<1?requestAnimationFrame(P):(t.value=!0,n=null,u())};P()},g=()=>{t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{controls:p}=s();p&&(p.enabled=!0,p.target.copy(o))};return{isAnimating:t,toggleAnimation:()=>{if(t.value){t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{camera:p,controls:f}=s();if(!p||!f)return;f.enabled=!0;const v=p.position.clone(),b=f.target.clone(),S=1500,F=Date.now(),C=()=>{const R=Date.now()-F,P=Math.min(R/S,1),A=d(P);p.position.lerpVectors(v,r,A),f.target.lerpVectors(b,o,A),P<1&&requestAnimationFrame(C)};C()}else h()},startAnimation:h,stopAnimation:g}}function M4(s,e){const t=y.ref(!1),n=y.ref("none");let i=[],r=[],o=new Fn,a=new I;const l=()=>{i=[new Jn(new I(1,0,0),0),new Jn(new I(0,1,0),0),new Jn(new I(0,0,1),0)]},c=()=>{o.makeEmpty(),e.value.forEach(_=>{o.expandByObject(_)}),a=o.getCenter(new I)},d=_=>{const p=o.getSize(new I);let f,v,b;_==="x"?(f=new Di(p.z*1.2,p.y*1.2),v=new I(a.x,a.y,a.z),b=new Sn(0,Math.PI/2,0)):_==="y"?(f=new Di(p.x*1.2,p.z*1.2),v=new I(a.x,a.y,a.z),b=new Sn(Math.PI/2,0,0)):_==="z"&&(f=new Di(p.x*1.2,p.y*1.2),v=new I(a.x,a.y,a.z),b=new Sn(0,0,0));const S=new fn({color:8900331,transparent:!0,opacity:.3,side:pn,depthWrite:!1}),F=new zt(f,S);return F.position.copy(v),F.rotation.copy(b),F},m=()=>{if(u(),h(),n.value==="none")return;c();let _=null;if(n.value==="x"?(i[0].constant=-a.x,_=i[0]):n.value==="y"?(i[1].constant=-a.y,_=i[1]):n.value==="z"&&(i[2].constant=-a.z,_=i[2]),_){e.value.forEach(f=>{f.traverse(v=>{v.isMesh&&v.material&&(Array.isArray(v.material)?v.material.forEach(b=>{b.clippingPlanes=[_]}):v.material.clippingPlanes=[_])})});const{scene:p}=s();if(p){const f=d(n.value);p.add(f),r.push(f)}}},u=()=>{e.value.forEach(_=>{_.traverse(p=>{p.isMesh&&p.material&&(Array.isArray(p.material)?p.material.forEach(f=>{f.clippingPlanes=[]}):p.material.clippingPlanes=[])})})},h=()=>{const{scene:_}=s();_&&r.forEach(p=>{_.remove(p),p.geometry.dispose(),p.material.dispose()}),r=[]};return{isClipping:t,activeClippingAxis:n,toggleClipping:()=>{t.value=!t.value,t.value?(l(),e.value.length>0&&c()):(n.value="none",u(),h())},updateClippingPlanes:m,clearClippingPlanes:u,clearClippingMeshes:h}}class ji extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=new Zs(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(a))}catch(l){i?i(l):console.error(l),r.manager.itemError(e)}},n,i)}parse(e){function t(c){const d=new DataView(c),m=32/8*3+32/8*3*3+16/8,u=d.getUint32(80,!0);if(80+32/8+u*m===d.byteLength)return!0;const g=[115,111,108,105,100];for(let _=0;_<5;_++)if(n(g,d,_))return!1;return!0}function n(c,d,m){for(let u=0,h=c.length;u<h;u++)if(c[u]!==d.getUint8(m+u))return!1;return!0}function i(c){const d=new DataView(c),m=d.getUint32(80,!0);let u,h,g,_=!1,p,f,v,b,S;for(let L=0;L<70;L++)d.getUint32(L,!1)==1129270351&&d.getUint8(L+4)==82&&d.getUint8(L+5)==61&&(_=!0,p=new Float32Array(m*3*3),f=d.getUint8(L+6)/255,v=d.getUint8(L+7)/255,b=d.getUint8(L+8)/255,S=d.getUint8(L+9)/255);const F=84,C=12*4+2,R=new hn,P=new Float32Array(m*3*3),A=new Float32Array(m*3*3),E=new Tt;for(let L=0;L<m;L++){const B=F+L*C,H=d.getFloat32(B,!0),Q=d.getFloat32(B+4,!0),ae=d.getFloat32(B+8,!0);if(_){const G=d.getUint16(B+48,!0);(G&32768)===0?(u=(G&31)/31,h=(G>>5&31)/31,g=(G>>10&31)/31):(u=f,h=v,g=b)}for(let G=1;G<=3;G++){const le=B+G*12,Z=L*3*3+(G-1)*3;P[Z]=d.getFloat32(le,!0),P[Z+1]=d.getFloat32(le+4,!0),P[Z+2]=d.getFloat32(le+8,!0),A[Z]=H,A[Z+1]=Q,A[Z+2]=ae,_&&(E.setRGB(u,h,g,qt),p[Z]=E.r,p[Z+1]=E.g,p[Z+2]=E.b)}}return R.setAttribute("position",new mn(P,3)),R.setAttribute("normal",new mn(A,3)),_&&(R.setAttribute("color",new mn(p,3)),R.hasColors=!0,R.alpha=S),R}function r(c){const d=new hn,m=/solid([\s\S]*?)endsolid/g,u=/facet([\s\S]*?)endfacet/g,h=/solid\s(.+)/;let g=0;const _=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,p=new RegExp("vertex"+_+_+_,"g"),f=new RegExp("normal"+_+_+_,"g"),v=[],b=[],S=[],F=new I;let C,R=0,P=0,A=0;for(;(C=m.exec(c))!==null;){P=A;const E=C[0],L=(C=h.exec(E))!==null?C[1]:"";for(S.push(L);(C=u.exec(E))!==null;){let Q=0,ae=0;const G=C[0];for(;(C=f.exec(G))!==null;)F.x=parseFloat(C[1]),F.y=parseFloat(C[2]),F.z=parseFloat(C[3]),ae++;for(;(C=p.exec(G))!==null;)v.push(parseFloat(C[1]),parseFloat(C[2]),parseFloat(C[3])),b.push(F.x,F.y,F.z),Q++,A++;ae!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),Q!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const B=P,H=A-P;d.userData.groupNames=S,d.addGroup(B,H,R),R++}return d.setAttribute("position",new It(v,3)),d.setAttribute("normal",new It(b,3)),d}function o(c){return typeof c!="string"?new TextDecoder().decode(c):c}function a(c){if(typeof c=="string"){const d=new Uint8Array(c.length);for(let m=0;m<c.length;m++)d[m]=c.charCodeAt(m)&255;return d.buffer||d}else return c}const l=a(e);return t(l)?i(l):r(o(e))}}class r0 extends V1{constructor(e){super(e)}parse(e){function t(G){switch(G.image_type){case u:case _:if(G.colormap_length>256||G.colormap_size!==24||G.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case g:case p:case f:if(G.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case m:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+G.image_type)}if(G.width<=0||G.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(G.pixel_size!==8&&G.pixel_size!==16&&G.pixel_size!==24&&G.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+G.pixel_size)}function n(G,le,Z,ve,Ee){let be,ge;const se=Z.pixel_size>>3,j=Z.width*Z.height*se;if(le&&(ge=Ee.subarray(ve,ve+=Z.colormap_length*(Z.colormap_size>>3))),G){be=new Uint8Array(j);let q,ne,ee,ue=0;const $=new Uint8Array(se);for(;ue<j;)if(q=Ee[ve++],ne=(q&127)+1,q&128){for(ee=0;ee<se;++ee)$[ee]=Ee[ve++];for(ee=0;ee<ne;++ee)be.set($,ue+ee*se);ue+=se*ne}else{for(ne*=se,ee=0;ee<ne;++ee)be[ue+ee]=Ee[ve++];ue+=ne}}else be=Ee.subarray(ve,ve+=le?Z.width*Z.height:j);return{pixel_data:be,palettes:ge}}function i(G,le,Z,ve,Ee,be,ge,se,j){const q=j;let ne,ee=0,ue,$;const pe=E.width;for($=le;$!==ve;$+=Z)for(ue=Ee;ue!==ge;ue+=be,ee++)ne=se[ee],G[(ue+pe*$)*4+3]=255,G[(ue+pe*$)*4+2]=q[ne*3+0],G[(ue+pe*$)*4+1]=q[ne*3+1],G[(ue+pe*$)*4+0]=q[ne*3+2];return G}function r(G,le,Z,ve,Ee,be,ge,se){let j,q=0,ne,ee;const ue=E.width;for(ee=le;ee!==ve;ee+=Z)for(ne=Ee;ne!==ge;ne+=be,q+=2)j=se[q+0]+(se[q+1]<<8),G[(ne+ue*ee)*4+0]=(j&31744)>>7,G[(ne+ue*ee)*4+1]=(j&992)>>2,G[(ne+ue*ee)*4+2]=(j&31)<<3,G[(ne+ue*ee)*4+3]=j&32768?0:255;return G}function o(G,le,Z,ve,Ee,be,ge,se){let j=0,q,ne;const ee=E.width;for(ne=le;ne!==ve;ne+=Z)for(q=Ee;q!==ge;q+=be,j+=3)G[(q+ee*ne)*4+3]=255,G[(q+ee*ne)*4+2]=se[j+0],G[(q+ee*ne)*4+1]=se[j+1],G[(q+ee*ne)*4+0]=se[j+2];return G}function a(G,le,Z,ve,Ee,be,ge,se){let j=0,q,ne;const ee=E.width;for(ne=le;ne!==ve;ne+=Z)for(q=Ee;q!==ge;q+=be,j+=4)G[(q+ee*ne)*4+2]=se[j+0],G[(q+ee*ne)*4+1]=se[j+1],G[(q+ee*ne)*4+0]=se[j+2],G[(q+ee*ne)*4+3]=se[j+3];return G}function l(G,le,Z,ve,Ee,be,ge,se){let j,q=0,ne,ee;const ue=E.width;for(ee=le;ee!==ve;ee+=Z)for(ne=Ee;ne!==ge;ne+=be,q++)j=se[q],G[(ne+ue*ee)*4+0]=j,G[(ne+ue*ee)*4+1]=j,G[(ne+ue*ee)*4+2]=j,G[(ne+ue*ee)*4+3]=255;return G}function c(G,le,Z,ve,Ee,be,ge,se){let j=0,q,ne;const ee=E.width;for(ne=le;ne!==ve;ne+=Z)for(q=Ee;q!==ge;q+=be,j+=2)G[(q+ee*ne)*4+0]=se[j+0],G[(q+ee*ne)*4+1]=se[j+0],G[(q+ee*ne)*4+2]=se[j+0],G[(q+ee*ne)*4+3]=se[j+1];return G}function d(G,le,Z,ve,Ee){let be,ge,se,j,q,ne;switch((E.flags&v)>>b){default:case C:be=0,se=1,q=le,ge=0,j=1,ne=Z;break;case S:be=0,se=1,q=le,ge=Z-1,j=-1,ne=-1;break;case R:be=le-1,se=-1,q=-1,ge=0,j=1,ne=Z;break;case F:be=le-1,se=-1,q=-1,ge=Z-1,j=-1,ne=-1;break}if(H)switch(E.pixel_size){case 8:l(G,ge,j,ne,be,se,q,ve);break;case 16:c(G,ge,j,ne,be,se,q,ve);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(E.pixel_size){case 8:i(G,ge,j,ne,be,se,q,ve,Ee);break;case 16:r(G,ge,j,ne,be,se,q,ve);break;case 24:o(G,ge,j,ne,be,se,q,ve);break;case 32:a(G,ge,j,ne,be,se,q,ve);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return G}const m=0,u=1,h=2,g=3,_=9,p=10,f=11,v=48,b=4,S=0,F=1,C=2,R=3;if(e.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let P=0;const A=new Uint8Array(e),E={id_length:A[P++],colormap_type:A[P++],image_type:A[P++],colormap_index:A[P++]|A[P++]<<8,colormap_length:A[P++]|A[P++]<<8,colormap_size:A[P++],origin:[A[P++]|A[P++]<<8,A[P++]|A[P++]<<8],width:A[P++]|A[P++]<<8,height:A[P++]|A[P++]<<8,pixel_size:A[P++],flags:A[P++]};if(t(E),E.id_length+P>e.length)throw new Error("THREE.TGALoader: No data.");P+=E.id_length;let L=!1,B=!1,H=!1;switch(E.image_type){case _:L=!0,B=!0;break;case u:B=!0;break;case p:L=!0;break;case h:break;case f:L=!0,H=!0;break;case g:H=!0;break}const Q=new Uint8Array(E.width*E.height*4),ae=n(L,B,E,P,A);return d(Q,E.width,E.height,ae.pixel_data,ae.palettes),{data:Q,width:E.width,height:E.height,flipY:!0,generateMipmaps:!0,minFilter:Ai}}}class b4 extends oi{load(e,t,n,i){const r=this,o=r.path===""?hc.extractUrlBase(e):r.path,a=new Zs(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(l){try{t(r.parse(l,o))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},n,i)}parse(e,t){function n(x,M){const N=[],D=x.childNodes;for(let U=0,he=D.length;U<he;U++){const xe=D[U];xe.nodeName===M&&N.push(xe)}return N}function i(x){if(x.length===0)return[];const M=x.trim().split(/\s+/),N=new Array(M.length);for(let D=0,U=M.length;D<U;D++)N[D]=M[D];return N}function r(x){if(x.length===0)return[];const M=x.trim().split(/\s+/),N=new Array(M.length);for(let D=0,U=M.length;D<U;D++)N[D]=parseFloat(M[D]);return N}function o(x){if(x.length===0)return[];const M=x.trim().split(/\s+/),N=new Array(M.length);for(let D=0,U=M.length;D<U;D++)N[D]=parseInt(M[D]);return N}function a(x){return x.substring(1)}function l(){return"three_default_"+ke++}function c(x){return Object.keys(x).length===0}function d(x){return{unit:m(n(x,"unit")[0]),upAxis:u(n(x,"up_axis")[0])}}function m(x){return x!==void 0&&x.hasAttribute("meter")===!0?parseFloat(x.getAttribute("meter")):1}function u(x){return x!==void 0?x.textContent:"Y_UP"}function h(x,M,N,D){const U=n(x,M)[0];if(U!==void 0){const he=n(U,N);for(let xe=0;xe<he.length;xe++)D(he[xe])}}function g(x,M){for(const N in x){const D=x[N];D.build=M(x[N])}}function _(x,M){return x.build!==void 0||(x.build=M(x)),x.build}function p(x){const M={sources:{},samplers:{},channels:{}};let N=!1;for(let D=0,U=x.childNodes.length;D<U;D++){const he=x.childNodes[D];if(he.nodeType!==1)continue;let xe;switch(he.nodeName){case"source":xe=he.getAttribute("id"),M.sources[xe]=Ie(he);break;case"sampler":xe=he.getAttribute("id"),M.samplers[xe]=f(he);break;case"channel":xe=he.getAttribute("target"),M.channels[xe]=v(he);break;case"animation":p(he),N=!0;break;default:console.log(he)}}N===!1&&(ht.animations[x.getAttribute("id")||Ei.generateUUID()]=M)}function f(x){const M={inputs:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=a(U.getAttribute("source")),xe=U.getAttribute("semantic");M.inputs[xe]=he;break}}return M}function v(x){const M={};let D=x.getAttribute("target").split("/");const U=D.shift();let he=D.shift();const xe=he.indexOf("(")!==-1,lt=he.indexOf(".")!==-1;if(lt)D=he.split("."),he=D.shift(),M.member=D.shift();else if(xe){const je=he.split("(");he=je.shift();for(let nt=0;nt<je.length;nt++)je[nt]=parseInt(je[nt].replace(/\)/,""));M.indices=je}return M.id=U,M.sid=he,M.arraySyntax=xe,M.memberSyntax=lt,M.sampler=a(x.getAttribute("source")),M}function b(x){const M=[],N=x.channels,D=x.samplers,U=x.sources;for(const he in N)if(N.hasOwnProperty(he)){const xe=N[he],lt=D[xe.sampler],je=lt.inputs.INPUT,nt=lt.inputs.OUTPUT,ct=U[je],Ne=U[nt],xt=F(xe,ct,Ne);E(xt,M)}return M}function S(x){return _(ht.animations[x],b)}function F(x,M,N){const D=ht.nodes[x.id],U=it(D.id),he=D.transforms[x.sid],xe=D.matrix.clone().transpose();let lt,je,nt,ct,Ne,xt;const gt={};switch(he){case"matrix":for(nt=0,ct=M.array.length;nt<ct;nt++)if(lt=M.array[nt],je=nt*N.stride,gt[lt]===void 0&&(gt[lt]={}),x.arraySyntax===!0){const dn=N.array[je],en=x.indices[0]+4*x.indices[1];gt[lt][en]=dn}else for(Ne=0,xt=N.stride;Ne<xt;Ne++)gt[lt][Ne]=N.array[je+Ne];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',he);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',he);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',he);break}const Dt=C(gt,xe);return{name:U.uuid,keyframes:Dt}}function C(x,M){const N=[];for(const U in x)N.push({time:parseFloat(U),value:x[U]});N.sort(D);for(let U=0;U<16;U++)L(N,U,M.elements[U]);return N;function D(U,he){return U.time-he.time}}const R=new I,P=new I,A=new Vn;function E(x,M){const N=x.keyframes,D=x.name,U=[],he=[],xe=[],lt=[];for(let je=0,nt=N.length;je<nt;je++){const ct=N[je],Ne=ct.time,xt=ct.value;V.fromArray(xt).transpose(),V.decompose(R,A,P),U.push(Ne),he.push(R.x,R.y,R.z),xe.push(A.x,A.y,A.z,A.w),lt.push(P.x,P.y,P.z)}return he.length>0&&M.push(new $s(D+".position",U,he)),xe.length>0&&M.push(new Er(D+".quaternion",U,xe)),lt.length>0&&M.push(new $s(D+".scale",U,lt)),M}function L(x,M,N){let D,U=!0,he,xe;for(he=0,xe=x.length;he<xe;he++)D=x[he],D.value[M]===void 0?D.value[M]=null:U=!1;if(U===!0)for(he=0,xe=x.length;he<xe;he++)D=x[he],D.value[M]=N;else B(x,M)}function B(x,M){let N,D;for(let U=0,he=x.length;U<he;U++){const xe=x[U];if(xe.value[M]===null){if(N=H(x,U,M),D=Q(x,U,M),N===null){xe.value[M]=D.value[M];continue}if(D===null){xe.value[M]=N.value[M];continue}ae(xe,N,D,M)}}}function H(x,M,N){for(;M>=0;){const D=x[M];if(D.value[N]!==null)return D;M--}return null}function Q(x,M,N){for(;M<x.length;){const D=x[M];if(D.value[N]!==null)return D;M++}return null}function ae(x,M,N,D){if(N.time-M.time===0){x.value[D]=M.value[D];return}x.value[D]=(x.time-M.time)*(N.value[D]-M.value[D])/(N.time-M.time)+M.value[D]}function G(x){const M={name:x.getAttribute("id")||"default",start:parseFloat(x.getAttribute("start")||0),end:parseFloat(x.getAttribute("end")||0),animations:[]};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"instance_animation":M.animations.push(a(U.getAttribute("url")));break}}ht.clips[x.getAttribute("id")]=M}function le(x){const M=[],N=x.name,D=x.end-x.start||-1,U=x.animations;for(let he=0,xe=U.length;he<xe;he++){const lt=S(U[he]);for(let je=0,nt=lt.length;je<nt;je++)M.push(lt[je])}return new hh(N,D,M)}function Z(x){return _(ht.clips[x],le)}function ve(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"skin":M.id=a(U.getAttribute("source")),M.skin=Ee(U);break;case"morph":M.id=a(U.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}ht.controllers[x.getAttribute("id")]=M}function Ee(x){const M={sources:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"bind_shape_matrix":M.bindShapeMatrix=r(U.textContent);break;case"source":const he=U.getAttribute("id");M.sources[he]=Ie(U);break;case"joints":M.joints=be(U);break;case"vertex_weights":M.vertexWeights=ge(U);break}}return M}function be(x){const M={inputs:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=U.getAttribute("semantic"),xe=a(U.getAttribute("source"));M.inputs[he]=xe;break}}return M}function ge(x){const M={inputs:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=U.getAttribute("semantic"),xe=a(U.getAttribute("source")),lt=parseInt(U.getAttribute("offset"));M.inputs[he]={id:xe,offset:lt};break;case"vcount":M.vcount=o(U.textContent);break;case"v":M.v=o(U.textContent);break}}return M}function se(x){const M={id:x.id},N=ht.geometries[M.id];return x.skin!==void 0&&(M.skin=j(x.skin),N.sources.skinIndices=M.skin.indices,N.sources.skinWeights=M.skin.weights),M}function j(x){const N={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},D=x.sources,U=x.vertexWeights,he=U.vcount,xe=U.v,lt=U.inputs.JOINT.offset,je=U.inputs.WEIGHT.offset,nt=x.sources[x.joints.inputs.JOINT],ct=x.sources[x.joints.inputs.INV_BIND_MATRIX],Ne=D[U.inputs.WEIGHT.id].array;let xt=0,gt,Dt,wt;for(gt=0,wt=he.length;gt<wt;gt++){const en=he[gt],$t=[];for(Dt=0;Dt<en;Dt++){const Yt=xe[xt+lt],gi=xe[xt+je],zn=Ne[gi];$t.push({index:Yt,weight:zn}),xt+=2}for($t.sort(dn),Dt=0;Dt<4;Dt++){const Yt=$t[Dt];Yt!==void 0?(N.indices.array.push(Yt.index),N.weights.array.push(Yt.weight)):(N.indices.array.push(0),N.weights.array.push(0))}}for(x.bindShapeMatrix?N.bindMatrix=new Et().fromArray(x.bindShapeMatrix).transpose():N.bindMatrix=new Et().identity(),gt=0,wt=nt.array.length;gt<wt;gt++){const en=nt.array[gt],$t=new Et().fromArray(ct.array,gt*ct.stride).transpose();N.joints.push({name:en,boneInverse:$t})}return N;function dn(en,$t){return $t.weight-en.weight}}function q(x){return _(ht.controllers[x],se)}function ne(x){const M={init_from:n(x,"init_from")[0].textContent};ht.images[x.getAttribute("id")]=M}function ee(x){return x.build!==void 0?x.build:x.init_from}function ue(x){const M=ht.images[x];return M!==void 0?_(M,ee):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",x),null)}function $(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"profile_COMMON":M.profile=pe(U);break}}ht.effects[x.getAttribute("id")]=M}function pe(x){const M={surfaces:{},samplers:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"newparam":Ce(U,M);break;case"technique":M.technique=O(U);break;case"extra":M.extra=Le(U);break}}return M}function Ce(x,M){const N=x.getAttribute("sid");for(let D=0,U=x.childNodes.length;D<U;D++){const he=x.childNodes[D];if(he.nodeType===1)switch(he.nodeName){case"surface":M.surfaces[N]=Ke(he);break;case"sampler2D":M.samplers[N]=He(he);break}}}function Ke(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"init_from":M.init_from=U.textContent;break}}return M}function He(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"source":M.source=U.textContent;break}}return M}function O(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"constant":case"lambert":case"blinn":case"phong":M.type=U.nodeName,M.parameters=_t(U);break;case"extra":M.extra=Le(U);break}}return M}function _t(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":M[U.nodeName]=dt(U);break;case"transparent":M[U.nodeName]={opaque:U.hasAttribute("opaque")?U.getAttribute("opaque"):"A_ONE",data:dt(U)};break}}return M}function dt(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"color":M[U.nodeName]=r(U.textContent);break;case"float":M[U.nodeName]=parseFloat(U.textContent);break;case"texture":M[U.nodeName]={id:U.getAttribute("texture"),extra:at(U)};break}}return M}function at(x){const M={technique:{}};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"extra":Fe(U,M);break}}return M}function Fe(x,M){for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique":tt(U,M);break}}}function tt(x,M){for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":M.technique[U.nodeName]=parseFloat(U.textContent);break;case"wrapU":case"wrapV":U.textContent.toUpperCase()==="TRUE"?M.technique[U.nodeName]=1:U.textContent.toUpperCase()==="FALSE"?M.technique[U.nodeName]=0:M.technique[U.nodeName]=parseInt(U.textContent);break;case"bump":M[U.nodeName]=jt(U);break}}}function Le(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique":M.technique=ot(U);break}}return M}function ot(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"double_sided":M[U.nodeName]=parseInt(U.textContent);break;case"bump":M[U.nodeName]=jt(U);break}}return M}function jt(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"texture":M[U.nodeName]={id:U.getAttribute("texture"),texcoord:U.getAttribute("texcoord"),extra:at(U)};break}}return M}function k(x){return x}function T(x){return _(ht.effects[x],k)}function oe(x){const M={name:x.getAttribute("name")};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"instance_effect":M.url=a(U.getAttribute("url"));break}}ht.materials[x.getAttribute("id")]=M}function Se(x){let M,N=x.slice((x.lastIndexOf(".")-1>>>0)+2);switch(N=N.toLowerCase(),N){case"tga":M=Jt;break;default:M=Ot}return M}function De(x){const M=T(x.url),N=M.profile.technique;let D;switch(N.type){case"phong":case"blinn":D=new fn;break;case"lambert":D=new C1;break;default:D=new qi;break}D.name=x.name||"";function U(je,nt=null){const ct=M.profile.samplers[je.id];let Ne=null;if(ct!==void 0){const xt=M.profile.surfaces[ct.source];Ne=ue(xt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),Ne=ue(je.id);if(Ne!==null){const xt=Se(Ne);if(xt!==void 0){const gt=xt.load(Ne),Dt=je.extra;if(Dt!==void 0&&Dt.technique!==void 0&&c(Dt.technique)===!1){const wt=Dt.technique;gt.wrapS=wt.wrapU?di:ri,gt.wrapT=wt.wrapV?di:ri,gt.offset.set(wt.offsetU||0,wt.offsetV||0),gt.repeat.set(wt.repeatU||1,wt.repeatV||1)}else gt.wrapS=di,gt.wrapT=di;return nt!==null&&(gt.colorSpace=nt),gt}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",Ne),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",je.id),null}const he=N.parameters;for(const je in he){const nt=he[je];switch(je){case"diffuse":nt.color&&D.color.fromArray(nt.color),nt.texture&&(D.map=U(nt.texture,qt));break;case"specular":nt.color&&D.specular&&D.specular.fromArray(nt.color),nt.texture&&(D.specularMap=U(nt.texture));break;case"bump":nt.texture&&(D.normalMap=U(nt.texture));break;case"ambient":nt.texture&&(D.lightMap=U(nt.texture,qt));break;case"shininess":nt.float&&D.shininess&&(D.shininess=nt.float);break;case"emission":nt.color&&D.emissive&&D.emissive.fromArray(nt.color),nt.texture&&(D.emissiveMap=U(nt.texture,qt));break}}Gt.colorSpaceToWorking(D.color,qt),D.specular&&Gt.colorSpaceToWorking(D.specular,qt),D.emissive&&Gt.colorSpaceToWorking(D.emissive,qt);let xe=he.transparent,lt=he.transparency;if(lt===void 0&&xe&&(lt={float:1}),xe===void 0&<&&(xe={opaque:"A_ONE",data:{color:[1,1,1,1]}}),xe&<)if(xe.data.texture)D.transparent=!0;else{const je=xe.data.color;switch(xe.opaque){case"A_ONE":D.opacity=je[3]*lt.float;break;case"RGB_ZERO":D.opacity=1-je[0]*lt.float;break;case"A_ZERO":D.opacity=1-je[3]*lt.float;break;case"RGB_ONE":D.opacity=je[0]*lt.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',xe.opaque)}D.opacity<1&&(D.transparent=!0)}if(N.extra!==void 0&&N.extra.technique!==void 0){const je=N.extra.technique;for(const nt in je){const ct=je[nt];switch(nt){case"double_sided":D.side=ct===1?pn:Qn;break;case"bump":D.normalMap=U(ct.texture),D.normalScale=new et(1,1);break}}}return D}function ye(x){return _(ht.materials[x],De)}function vt(x){const M={name:x.getAttribute("name")};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"optics":M.optics=Ze(U);break}}ht.cameras[x.getAttribute("id")]=M}function Ze(x){for(let M=0;M<x.childNodes.length;M++){const N=x.childNodes[M];switch(N.nodeName){case"technique_common":return mt(N)}}return{}}function mt(x){const M={};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];switch(D.nodeName){case"perspective":case"orthographic":M.technique=D.nodeName,M.parameters=yt(D);break}}return M}function yt(x){const M={};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];switch(D.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":M[D.nodeName]=parseFloat(D.textContent);break}}return M}function Ue(x){let M;switch(x.optics.technique){case"perspective":M=new bn(x.optics.parameters.yfov,x.optics.parameters.aspect_ratio,x.optics.parameters.znear,x.optics.parameters.zfar);break;case"orthographic":let N=x.optics.parameters.ymag,D=x.optics.parameters.xmag;const U=x.optics.parameters.aspect_ratio;D=D===void 0?N*U:D,N=N===void 0?D/U:N,D*=.5,N*=.5,M=new Ha(-D,D,N,-N,x.optics.parameters.znear,x.optics.parameters.zfar);break;default:M=new bn;break}return M.name=x.name||"",M}function st(x){const M=ht.cameras[x];return M!==void 0?_(M,Ue):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",x),null)}function Rt(x){let M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"technique_common":M=At(U);break}}ht.lights[x.getAttribute("id")]=M}function At(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"directional":case"point":case"spot":case"ambient":M.technique=U.nodeName,M.parameters=Ye(U)}}return M}function Ye(x){const M={};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"color":const he=r(U.textContent);M.color=new Tt().fromArray(he),Gt.colorSpaceToWorking(M.color,qt);break;case"falloff_angle":M.falloffAngle=parseFloat(U.textContent);break;case"quadratic_attenuation":const xe=parseFloat(U.textContent);M.distance=xe?Math.sqrt(1/xe):0;break}}return M}function Lt(x){let M;switch(x.technique){case"directional":M=new gr;break;case"point":M=new Pa;break;case"spot":M=new G1;break;case"ambient":M=new cc;break}return x.parameters.color&&M.color.copy(x.parameters.color),x.parameters.distance&&(M.distance=x.parameters.distance),M}function K(x){const M=ht.lights[x];return M!==void 0?_(M,Lt):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",x),null)}function $e(x){const M={name:x.getAttribute("name"),sources:{},vertices:{},primitives:[]},N=n(x,"mesh")[0];if(N!==void 0){for(let D=0;D<N.childNodes.length;D++){const U=N.childNodes[D];if(U.nodeType!==1)continue;const he=U.getAttribute("id");switch(U.nodeName){case"source":M.sources[he]=Ie(U);break;case"vertices":M.vertices=ut(U);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",U.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":M.primitives.push(ze(U));break;default:console.log(U)}}ht.geometries[x.getAttribute("id")]=M}}function Ie(x){const M={array:[],stride:3};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"float_array":M.array=r(D.textContent);break;case"Name_array":M.array=i(D.textContent);break;case"technique_common":const U=n(D,"accessor")[0];U!==void 0&&(M.stride=parseInt(U.getAttribute("stride")));break}}return M}function ut(x){const M={};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];D.nodeType===1&&(M[D.getAttribute("semantic")]=a(D.getAttribute("source")))}return M}function ze(x){const M={type:x.nodeName,material:x.getAttribute("material"),count:parseInt(x.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let N=0,D=x.childNodes.length;N<D;N++){const U=x.childNodes[N];if(U.nodeType===1)switch(U.nodeName){case"input":const he=a(U.getAttribute("source")),xe=U.getAttribute("semantic"),lt=parseInt(U.getAttribute("offset")),je=parseInt(U.getAttribute("set")),nt=je>0?xe+je:xe;M.inputs[nt]={id:he,offset:lt},M.stride=Math.max(M.stride,lt+1),xe==="TEXCOORD"&&(M.hasUV=!0);break;case"vcount":M.vcount=o(U.textContent);break;case"p":M.p=o(U.textContent);break}}return M}function we(x){const M={};for(let N=0;N<x.length;N++){const D=x[N];M[D.type]===void 0&&(M[D.type]=[]),M[D.type].push(D)}return M}function pt(x){let M=0;for(let N=0,D=x.length;N<D;N++)x[N].hasUV===!0&&M++;M>0&&M<x.length&&(x.uvsNeedsFix=!0)}function Ft(x){const M={},N=x.sources,D=x.vertices,U=x.primitives;if(U.length===0)return{};const he=we(U);for(const xe in he){const lt=he[xe];pt(lt),M[xe]=Qt(lt,N,D)}return M}function Qt(x,M,N){const D={},U={array:[],stride:0},he={array:[],stride:0},xe={array:[],stride:0},lt={array:[],stride:0},je={array:[],stride:0},nt={array:[],stride:4},ct={array:[],stride:4},Ne=new hn,xt=[];let gt=0;for(let Dt=0;Dt<x.length;Dt++){const wt=x[Dt],dn=wt.inputs;let en=0;switch(wt.type){case"lines":case"linestrips":en=wt.count*2;break;case"triangles":en=wt.count*3;break;case"polylist":for(let $t=0;$t<wt.count;$t++){const Yt=wt.vcount[$t];switch(Yt){case 3:en+=3;break;case 4:en+=6;break;default:en+=(Yt-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",wt.type)}Ne.addGroup(gt,en,Dt),gt+=en,wt.material&&xt.push(wt.material);for(const $t in dn){const Yt=dn[$t];switch($t){case"VERTEX":for(const gi in N){const zn=N[gi];switch(gi){case"POSITION":const ps=U.array.length;if(Ut(wt,M[zn],Yt.offset,U.array),U.stride=M[zn].stride,M.skinWeights&&M.skinIndices&&(Ut(wt,M.skinIndices,Yt.offset,nt.array),Ut(wt,M.skinWeights,Yt.offset,ct.array)),wt.hasUV===!1&&x.uvsNeedsFix===!0){const Au=(U.array.length-ps)/U.stride;for(let _c=0;_c<Au;_c++)xe.array.push(0,0)}break;case"NORMAL":Ut(wt,M[zn],Yt.offset,he.array),he.stride=M[zn].stride;break;case"COLOR":Ut(wt,M[zn],Yt.offset,je.array),je.stride=M[zn].stride;break;case"TEXCOORD":Ut(wt,M[zn],Yt.offset,xe.array),xe.stride=M[zn].stride;break;case"TEXCOORD1":Ut(wt,M[zn],Yt.offset,lt.array),xe.stride=M[zn].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',gi)}}break;case"NORMAL":Ut(wt,M[Yt.id],Yt.offset,he.array),he.stride=M[Yt.id].stride;break;case"COLOR":Ut(wt,M[Yt.id],Yt.offset,je.array,!0),je.stride=M[Yt.id].stride;break;case"TEXCOORD":Ut(wt,M[Yt.id],Yt.offset,xe.array),xe.stride=M[Yt.id].stride;break;case"TEXCOORD1":Ut(wt,M[Yt.id],Yt.offset,lt.array),lt.stride=M[Yt.id].stride;break}}}return U.array.length>0&&Ne.setAttribute("position",new It(U.array,U.stride)),he.array.length>0&&Ne.setAttribute("normal",new It(he.array,he.stride)),je.array.length>0&&Ne.setAttribute("color",new It(je.array,je.stride)),xe.array.length>0&&Ne.setAttribute("uv",new It(xe.array,xe.stride)),lt.array.length>0&&Ne.setAttribute("uv1",new It(lt.array,lt.stride)),nt.array.length>0&&Ne.setAttribute("skinIndex",new It(nt.array,nt.stride)),ct.array.length>0&&Ne.setAttribute("skinWeight",new It(ct.array,ct.stride)),D.data=Ne,D.type=x[0].type,D.materialKeys=xt,D}function Ut(x,M,N,D,U=!1){const he=x.p,xe=x.stride,lt=x.vcount;function je(Ne){let xt=he[Ne+N]*ct;const gt=xt+ct;for(;xt<gt;xt++)D.push(nt[xt]);if(U){const Dt=D.length-ct-1;sn.setRGB(D[Dt+0],D[Dt+1],D[Dt+2],qt),D[Dt+0]=sn.r,D[Dt+1]=sn.g,D[Dt+2]=sn.b}}const nt=M.array,ct=M.stride;if(x.vcount!==void 0){let Ne=0;for(let xt=0,gt=lt.length;xt<gt;xt++){const Dt=lt[xt];if(Dt===4){const wt=Ne+xe*0,dn=Ne+xe*1,en=Ne+xe*2,$t=Ne+xe*3;je(wt),je(dn),je($t),je(dn),je(en),je($t)}else if(Dt===3){const wt=Ne+xe*0,dn=Ne+xe*1,en=Ne+xe*2;je(wt),je(dn),je(en)}else if(Dt>4)for(let wt=1,dn=Dt-2;wt<=dn;wt++){const en=Ne+xe*0,$t=Ne+xe*wt,Yt=Ne+xe*(wt+1);je(en),je($t),je(Yt)}Ne+=xe*Dt}}else for(let Ne=0,xt=he.length;Ne<xt;Ne+=xe)je(Ne)}function Cn(x){return _(ht.geometries[x],Ft)}function Hn(x){const M={name:x.getAttribute("name")||"",joints:{},links:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"technique_common":ei(D,M);break}}ht.kinematicsModels[x.getAttribute("id")]=M}function fs(x){return x.build!==void 0?x.build:x}function Yi(x){return _(ht.kinematicsModels[x],fs)}function ei(x,M){for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"joint":M.joints[D.getAttribute("sid")]=Y(D);break;case"link":M.links.push(ce(D));break}}}function Y(x){let M;for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"prismatic":case"revolute":M=W(D);break}}return M}function W(x){const M={sid:x.getAttribute("sid"),name:x.getAttribute("name")||"",axis:new I,limits:{min:0,max:0},type:x.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=r(D.textContent);M.axis.fromArray(U);break;case"limits":const he=D.getElementsByTagName("max")[0],xe=D.getElementsByTagName("min")[0];M.limits.max=parseFloat(he.textContent),M.limits.min=parseFloat(xe.textContent);break}}return M.limits.min>=M.limits.max&&(M.static=!0),M.middlePosition=(M.limits.min+M.limits.max)/2,M}function ce(x){const M={sid:x.getAttribute("sid"),name:x.getAttribute("name")||"",attachments:[],transforms:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"attachment_full":M.attachments.push(de(D));break;case"matrix":case"translate":case"rotate":M.transforms.push(_e(D));break}}return M}function de(x){const M={joint:x.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"link":M.links.push(ce(D));break;case"matrix":case"translate":case"rotate":M.transforms.push(_e(D));break}}return M}function _e(x){const M={type:x.nodeName},N=r(x.textContent);switch(M.type){case"matrix":M.obj=new Et,M.obj.fromArray(N).transpose();break;case"translate":M.obj=new I,M.obj.fromArray(N);break;case"rotate":M.obj=new I,M.obj.fromArray(N),M.angle=Ei.degToRad(N[3]);break}return M}function me(x){const M={name:x.getAttribute("name")||"",rigidBodies:{}};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"rigid_body":M.rigidBodies[D.getAttribute("name")]={},Be(D,M.rigidBodies[D.getAttribute("name")]);break}}ht.physicsModels[x.getAttribute("id")]=M}function Be(x,M){for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"technique_common":Te(D,M);break}}}function Te(x,M){for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"inertia":M.inertia=r(D.textContent);break;case"mass":M.mass=r(D.textContent)[0];break}}}function Re(x){const M={bindJointAxis:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"bind_joint_axis":M.bindJointAxis.push(qe(D));break}}ht.kinematicsScenes[a(x.getAttribute("url"))]=M}function qe(x){const M={target:x.getAttribute("target").split("/").pop()};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=D.getElementsByTagName("param")[0];M.axis=U.textContent;const he=M.axis.split("inst_").pop().split("axis")[0];M.jointIndex=he.substring(0,he.length-1);break}}return M}function te(x){return x.build!==void 0?x.build:x}function Ve(x){return _(ht.kinematicsScenes[x],te)}function Xe(){const x=Object.keys(ht.kinematicsModels)[0],M=Object.keys(ht.kinematicsScenes)[0],N=Object.keys(ht.visualScenes)[0];if(x===void 0||M===void 0)return;const D=Yi(x),U=Ve(M),he=St(N),xe=U.bindJointAxis,lt={};for(let ct=0,Ne=xe.length;ct<Ne;ct++){const xt=xe[ct],gt=Bt.querySelector('[sid="'+xt.target+'"]');if(gt){const Dt=gt.parentElement;je(xt.jointIndex,Dt)}}function je(ct,Ne){const xt=Ne.getAttribute("name"),gt=D.joints[ct];he.traverse(function(Dt){Dt.name===xt&&(lt[ct]={object:Dt,transforms:ft(Ne),joint:gt,position:gt.zeroPosition})})}const nt=new Et;rt={joints:D&&D.joints,getJointValue:function(ct){const Ne=lt[ct];if(Ne)return Ne.position;console.warn("THREE.ColladaLoader: Joint "+ct+" doesn't exist.")},setJointValue:function(ct,Ne){const xt=lt[ct];if(xt){const gt=xt.joint;if(Ne>gt.limits.max||Ne<gt.limits.min)console.warn("THREE.ColladaLoader: Joint "+ct+" value "+Ne+" outside of limits (min: "+gt.limits.min+", max: "+gt.limits.max+").");else if(gt.static)console.warn("THREE.ColladaLoader: Joint "+ct+" is static.");else{const Dt=xt.object,wt=gt.axis,dn=xt.transforms;V.identity();for(let en=0;en<dn.length;en++){const $t=dn[en];if($t.sid&&$t.sid.indexOf(ct)!==-1)switch(gt.type){case"revolute":V.multiply(nt.makeRotationAxis(wt,Ei.degToRad(Ne)));break;case"prismatic":V.multiply(nt.makeTranslation(wt.x*Ne,wt.y*Ne,wt.z*Ne));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+gt.type);break}else switch($t.type){case"matrix":V.multiply($t.obj);break;case"translate":V.multiply(nt.makeTranslation($t.obj.x,$t.obj.y,$t.obj.z));break;case"scale":V.scale($t.obj);break;case"rotate":V.multiply(nt.makeRotationAxis($t.obj,$t.angle));break}}Dt.matrix.copy(V),Dt.matrix.decompose(Dt.position,Dt.quaternion,Dt.scale),lt[ct].position=Ne}}else console.log("THREE.ColladaLoader: "+ct+" does not exist.")}}}function ft(x){const M=[],N=Bt.querySelector('[id="'+x.id+'"]');for(let D=0;D<N.childNodes.length;D++){const U=N.childNodes[D];if(U.nodeType!==1)continue;let he,xe;switch(U.nodeName){case"matrix":he=r(U.textContent);const lt=new Et().fromArray(he).transpose();M.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:lt});break;case"translate":case"scale":he=r(U.textContent),xe=new I().fromArray(he),M.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:xe});break;case"rotate":he=r(U.textContent),xe=new I().fromArray(he);const je=Ei.degToRad(he[3]);M.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:xe,angle:je});break}}return M}function w(x){const M=x.getElementsByTagName("node");for(let N=0;N<M.length;N++){const D=M[N];D.hasAttribute("id")===!1&&D.setAttribute("id",l())}}const V=new Et,X=new I;function J(x){const M={name:x.getAttribute("name")||"",type:x.getAttribute("type"),id:x.getAttribute("id"),sid:x.getAttribute("sid"),matrix:new Et,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];if(D.nodeType!==1)continue;let U;switch(D.nodeName){case"node":M.nodes.push(D.getAttribute("id")),J(D);break;case"instance_camera":M.instanceCameras.push(a(D.getAttribute("url")));break;case"instance_controller":M.instanceControllers.push(z(D));break;case"instance_light":M.instanceLights.push(a(D.getAttribute("url")));break;case"instance_geometry":M.instanceGeometries.push(z(D));break;case"instance_node":M.instanceNodes.push(a(D.getAttribute("url")));break;case"matrix":U=r(D.textContent),M.matrix.multiply(V.fromArray(U).transpose()),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"translate":U=r(D.textContent),X.fromArray(U),M.matrix.multiply(V.makeTranslation(X.x,X.y,X.z)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"rotate":U=r(D.textContent);const he=Ei.degToRad(U[3]);M.matrix.multiply(V.makeRotationAxis(X.fromArray(U),he)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"scale":U=r(D.textContent),M.matrix.scale(X.fromArray(U)),M.transforms[D.getAttribute("sid")]=D.nodeName;break;case"extra":break;default:console.log(D)}}return Pe(M.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",M.id):ht.nodes[M.id]=M,M}function z(x){const M={id:a(x.getAttribute("url")),materials:{},skeletons:[]};for(let N=0;N<x.childNodes.length;N++){const D=x.childNodes[N];switch(D.nodeName){case"bind_material":const U=D.getElementsByTagName("instance_material");for(let he=0;he<U.length;he++){const xe=U[he],lt=xe.getAttribute("symbol"),je=xe.getAttribute("target");M.materials[lt]=a(je)}break;case"skeleton":M.skeletons.push(a(D.textContent));break}}return M}function fe(x,M){const N=[],D=[];let U,he,xe;for(U=0;U<x.length;U++){const nt=x[U];let ct;if(Pe(nt))ct=it(nt),ie(ct,M,N);else if(bt(nt)){const xt=ht.visualScenes[nt].children;for(let gt=0;gt<xt.length;gt++){const Dt=xt[gt];if(Dt.type==="JOINT"){const wt=it(Dt.id);ie(wt,M,N)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",nt)}for(U=0;U<M.length;U++)for(he=0;he<N.length;he++)if(xe=N[he],xe.bone.name===M[U].name){D[U]=xe,xe.processed=!0;break}for(U=0;U<N.length;U++)xe=N[U],xe.processed===!1&&(D.push(xe),xe.processed=!0);const lt=[],je=[];for(U=0;U<D.length;U++)xe=D[U],lt.push(xe.bone),je.push(xe.boneInverse);return new tc(lt,je)}function ie(x,M,N){x.traverse(function(D){if(D.isBone===!0){let U;for(let he=0;he<M.length;he++){const xe=M[he];if(xe.name===D.name){U=xe.boneInverse;break}}U===void 0&&(U=new Et),N.push({bone:D,boneInverse:U,processed:!1})}})}function Ae(x){const M=[],N=x.matrix,D=x.nodes,U=x.type,he=x.instanceCameras,xe=x.instanceControllers,lt=x.instanceLights,je=x.instanceGeometries,nt=x.instanceNodes;for(let Ne=0,xt=D.length;Ne<xt;Ne++)M.push(it(D[Ne]));for(let Ne=0,xt=he.length;Ne<xt;Ne++){const gt=st(he[Ne]);gt!==null&&M.push(gt.clone())}for(let Ne=0,xt=xe.length;Ne<xt;Ne++){const gt=xe[Ne],Dt=q(gt.id),wt=Cn(Dt.id),dn=Me(wt,gt.materials),en=gt.skeletons,$t=Dt.skin.joints,Yt=fe(en,$t);for(let gi=0,zn=dn.length;gi<zn;gi++){const ps=dn[gi];ps.isSkinnedMesh&&(ps.bind(Yt,Dt.skin.bindMatrix),ps.normalizeSkinWeights()),M.push(ps)}}for(let Ne=0,xt=lt.length;Ne<xt;Ne++){const gt=K(lt[Ne]);gt!==null&&M.push(gt.clone())}for(let Ne=0,xt=je.length;Ne<xt;Ne++){const gt=je[Ne],Dt=Cn(gt.id),wt=Me(Dt,gt.materials);for(let dn=0,en=wt.length;dn<en;dn++)M.push(wt[dn])}for(let Ne=0,xt=nt.length;Ne<xt;Ne++)M.push(it(nt[Ne]).clone());let ct;if(D.length===0&&M.length===1)ct=M[0];else{ct=U==="JOINT"?new k0:new Ln;for(let Ne=0;Ne<M.length;Ne++)ct.add(M[Ne])}return ct.name=U==="JOINT"?x.sid:x.name,ct.matrix.copy(N),ct.matrix.decompose(ct.position,ct.quaternion,ct.scale),ct}const re=new qi({name:oi.DEFAULT_MATERIAL_NAME,color:16711935});function Ge(x,M){const N=[];for(let D=0,U=x.length;D<U;D++){const he=M[x[D]];he===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",x[D]),N.push(re)):N.push(ye(he))}return N}function Me(x,M){const N=[];for(const D in x){const U=x[D],he=Ge(U.materialKeys,M);if(he.length===0&&(D==="lines"||D==="linestrips"?he.push(new Ri):he.push(new fn)),D==="lines"||D==="linestrips")for(let nt=0,ct=he.length;nt<ct;nt++){const Ne=he[nt];if(Ne.isMeshPhongMaterial===!0||Ne.isMeshLambertMaterial===!0){const xt=new Ri;xt.color.copy(Ne.color),xt.opacity=Ne.opacity,xt.transparent=Ne.transparent,he[nt]=xt}}const xe=U.data.attributes.skinIndex!==void 0,lt=he.length===1?he[0]:he;let je;switch(D){case"lines":je=new Ra(U.data,lt);break;case"linestrips":je=new Ba(U.data,lt);break;case"triangles":case"polylist":xe?je=new o1(U.data,lt):je=new zt(U.data,lt);break}N.push(je)}return N}function Pe(x){return ht.nodes[x]!==void 0}function it(x){return _(ht.nodes[x],Ae)}function Mt(x){const M={name:x.getAttribute("name"),children:[]};w(x);const N=n(x,"node");for(let D=0;D<N.length;D++)M.children.push(J(N[D]));ht.visualScenes[x.getAttribute("id")]=M}function Ct(x){const M=new Ln;M.name=x.name;const N=x.children;for(let D=0;D<N.length;D++){const U=N[D];M.add(it(U.id))}return M}function bt(x){return ht.visualScenes[x]!==void 0}function St(x){return _(ht.visualScenes[x],Ct)}function Qe(x){const M=n(x,"instance_visual_scene")[0];return St(a(M.getAttribute("url")))}function Wt(){const x=ht.clips;if(c(x)===!0){if(c(ht.animations)===!1){const M=[];for(const N in ht.animations){const D=S(N);for(let U=0,he=D.length;U<he;U++)M.push(D[U])}Kt.push(new hh("default",-1,M))}}else for(const M in x)Kt.push(Z(M))}function Nt(x){let M="";const N=[x];for(;N.length;){const D=N.shift();D.nodeType===Node.TEXT_NODE?M+=D.textContent:(M+=`
|
|
4198
|
+
`,N.push(...D.childNodes))}return M.trim()}if(e.length===0)return{scene:new Ia};const nn=new DOMParser().parseFromString(e,"application/xml"),Bt=n(nn,"COLLADA")[0],cn=nn.getElementsByTagName("parsererror")[0];if(cn!==void 0){const x=n(cn,"div")[0];let M;return x?M=x.textContent:M=Nt(cn),console.error(`THREE.ColladaLoader: Failed to parse collada file.
|
|
4199
|
+
`,M),null}const We=Bt.getAttribute("version");console.debug("THREE.ColladaLoader: File version",We);const Pt=d(n(Bt,"asset")[0]),Ot=new oc(this.manager);Ot.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);let Jt;r0&&(Jt=new r0(this.manager),Jt.setPath(this.resourcePath||t));const sn=new Tt,Kt=[];let rt={},ke=0;const ht={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(Bt,"library_animations","animation",p),h(Bt,"library_animation_clips","animation_clip",G),h(Bt,"library_controllers","controller",ve),h(Bt,"library_images","image",ne),h(Bt,"library_effects","effect",$),h(Bt,"library_materials","material",oe),h(Bt,"library_cameras","camera",vt),h(Bt,"library_lights","light",Rt),h(Bt,"library_geometries","geometry",$e),h(Bt,"library_nodes","node",J),h(Bt,"library_visual_scenes","visual_scene",Mt),h(Bt,"library_kinematics_models","kinematics_model",Hn),h(Bt,"library_physics_models","physics_model",me),h(Bt,"scene","instance_kinematics_scene",Re),g(ht.animations,b),g(ht.clips,le),g(ht.controllers,se),g(ht.images,ee),g(ht.effects,k),g(ht.materials,De),g(ht.cameras,Ue),g(ht.lights,Lt),g(ht.geometries,Ft),g(ht.visualScenes,Ct),Wt(),Xe();const xn=Qe(n(Bt,"scene")[0]);return xn.animations=Kt,Pt.upAxis==="Z_UP"&&(console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."),xn.rotation.set(-Math.PI/2,0,0)),xn.scale.multiplyScalar(Pt.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),Kt},kinematics:rt,library:ht,scene:xn}}}const a0=new I,S4=new Sn,ca=new Et,Vi=new Et,ha=new Vn,ua=new I(1,1,1),da=new I;class Wa extends ln{constructor(...e){super(...e),this.urdfNode=null,this.urdfName=""}copy(e,t){return super.copy(e,t),this.urdfNode=e.urdfNode,this.urdfName=e.urdfName,this}}class E4 extends Wa{constructor(...e){super(...e),this.isURDFCollider=!0,this.type="URDFCollider"}}class A4 extends Wa{constructor(...e){super(...e),this.isURDFVisual=!0,this.type="URDFVisual"}}class du extends Wa{constructor(...e){super(...e),this.isURDFLink=!0,this.type="URDFLink"}}class fu extends Wa{get jointType(){return this._jointType}set jointType(e){if(this.jointType!==e)switch(this._jointType=e,this.matrixWorldNeedsUpdate=!0,e){case"fixed":this.jointValue=[];break;case"continuous":case"revolute":case"prismatic":this.jointValue=new Array(1).fill(0);break;case"planar":this.jointValue=new Array(3).fill(0),this.axis=new I(0,0,1);break;case"floating":this.jointValue=new Array(6).fill(0);break}}get angle(){return this.jointValue[0]}constructor(...e){super(...e),this.isURDFJoint=!0,this.type="URDFJoint",this.jointValue=null,this.jointType="fixed",this.axis=new I(1,0,0),this.limit={lower:0,upper:0},this.ignoreLimits=!1,this.origPosition=null,this.origQuaternion=null,this.mimicJoints=[]}copy(e,t){return super.copy(e,t),this.jointType=e.jointType,this.axis=e.axis.clone(),this.limit.lower=e.limit.lower,this.limit.upper=e.limit.upper,this.ignoreLimits=!1,this.jointValue=[...e.jointValue],this.origPosition=e.origPosition?e.origPosition.clone():null,this.origQuaternion=e.origQuaternion?e.origQuaternion.clone():null,this.mimicJoints=[...e.mimicJoints],this}setJointValue(...e){e=e.map(n=>n===null?null:parseFloat(n)),(!this.origPosition||!this.origQuaternion)&&(this.origPosition=this.position.clone(),this.origQuaternion=this.quaternion.clone());let t=!1;switch(this.mimicJoints.forEach(n=>{t=n.updateFromMimickedJoint(...e)||t}),this.jointType){case"fixed":return t;case"continuous":case"revolute":{let n=e[0];return n==null||n===this.jointValue[0]?t:(!this.ignoreLimits&&this.jointType==="revolute"&&(n=Math.min(this.limit.upper,n),n=Math.max(this.limit.lower,n)),this.quaternion.setFromAxisAngle(this.axis,n).premultiply(this.origQuaternion),this.jointValue[0]!==n?(this.jointValue[0]=n,this.matrixWorldNeedsUpdate=!0,!0):t)}case"prismatic":{let n=e[0];return n==null||n===this.jointValue[0]?t:(this.ignoreLimits||(n=Math.min(this.limit.upper,n),n=Math.max(this.limit.lower,n)),this.position.copy(this.origPosition),a0.copy(this.axis).applyEuler(this.rotation),this.position.addScaledVector(a0,n),this.jointValue[0]!==n?(this.jointValue[0]=n,this.matrixWorldNeedsUpdate=!0,!0):t)}case"floating":return this.jointValue.every((n,i)=>e[i]===n||e[i]===null)?t:(this.jointValue[0]=e[0]!==null?e[0]:this.jointValue[0],this.jointValue[1]=e[1]!==null?e[1]:this.jointValue[1],this.jointValue[2]=e[2]!==null?e[2]:this.jointValue[2],this.jointValue[3]=e[3]!==null?e[3]:this.jointValue[3],this.jointValue[4]=e[4]!==null?e[4]:this.jointValue[4],this.jointValue[5]=e[5]!==null?e[5]:this.jointValue[5],Vi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromEuler(S4.set(this.jointValue[3],this.jointValue[4],this.jointValue[5],"XYZ")),da.set(this.jointValue[0],this.jointValue[1],this.jointValue[2]),ca.compose(da,ha,ua),Vi.premultiply(ca),this.position.setFromMatrixPosition(Vi),this.rotation.setFromRotationMatrix(Vi),this.matrixWorldNeedsUpdate=!0,!0);case"planar":return this.jointValue.every((n,i)=>e[i]===n||e[i]===null)?t:(this.jointValue[0]=e[0]!==null?e[0]:this.jointValue[0],this.jointValue[1]=e[1]!==null?e[1]:this.jointValue[1],this.jointValue[2]=e[2]!==null?e[2]:this.jointValue[2],Vi.compose(this.origPosition,this.origQuaternion,ua),ha.setFromAxisAngle(this.axis,this.jointValue[2]),da.set(this.jointValue[0],this.jointValue[1],0),ca.compose(da,ha,ua),Vi.premultiply(ca),this.position.setFromMatrixPosition(Vi),this.rotation.setFromRotationMatrix(Vi),this.matrixWorldNeedsUpdate=!0,!0)}return t}}class o0 extends fu{constructor(...e){super(...e),this.type="URDFMimicJoint",this.mimicJoint=null,this.offset=0,this.multiplier=1}updateFromMimickedJoint(...e){const t=e.map(n=>n*this.multiplier+this.offset);return super.setJointValue(...t)}copy(e,t){return super.copy(e,t),this.mimicJoint=e.mimicJoint,this.offset=e.offset,this.multiplier=e.multiplier,this}}class w4 extends du{constructor(...e){super(...e),this.isURDFRobot=!0,this.urdfNode=null,this.urdfRobotNode=null,this.robotName=null,this.links=null,this.joints=null,this.colliders=null,this.visual=null,this.frames=null}copy(e,t){super.copy(e,t),this.urdfRobotNode=e.urdfRobotNode,this.robotName=e.robotName,this.links={},this.joints={},this.colliders={},this.visual={},this.traverse(n=>{n.isURDFJoint&&n.urdfName in e.joints&&(this.joints[n.urdfName]=n),n.isURDFLink&&n.urdfName in e.links&&(this.links[n.urdfName]=n),n.isURDFCollider&&n.urdfName in e.colliders&&(this.colliders[n.urdfName]=n),n.isURDFVisual&&n.urdfName in e.visual&&(this.visual[n.urdfName]=n)});for(const n in this.joints)this.joints[n].mimicJoints=this.joints[n].mimicJoints.map(i=>this.joints[i.name]);return this.frames={...this.colliders,...this.visual,...this.links,...this.joints},this}getFrame(e){return this.frames[e]}setJointValue(e,...t){const n=this.joints[e];return n?n.setJointValue(...t):!1}setJointValues(e){let t=!1;for(const n in e){const i=e[n];Array.isArray(i)?t=this.setJointValue(n,...i)||t:t=this.setJointValue(n,i)||t}return t}}const Io=new Vn,l0=new Sn;function Ns(s){return s?s.trim().split(/\s+/g).map(e=>parseFloat(e)):[0,0,0]}function c0(s,e,t=!1){t||s.rotation.set(0,0,0),l0.set(e[0],e[1],e[2],"ZYX"),Io.setFromEuler(l0),Io.multiply(s.quaternion),s.quaternion.copy(Io)}class gc{constructor(e){this.manager=e||ac,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(e){return new Promise((t,n)=>{this.load(e,t,null,n)})}load(e,t,n,i){const r=this.manager,o=hc.extractUrlBase(e),a=this.manager.resolveURL(e);r.itemStart(a),fetch(a,this.fetchOptions).then(l=>{if(l.ok)return n&&n(null),l.text();throw new Error(`URDFLoader: Failed to load url '${a}' with error code ${l.status} : ${l.statusText}.`)}).then(l=>{const c=this.parse(l,this.workingPath||o);t(c),r.itemEnd(a)}).catch(l=>{i?i(l):console.error("URDFLoader: Error loading file.",l),r.itemError(a),r.itemEnd(a)})}parse(e,t=this.workingPath){const n=this.packages,i=this.loadMeshCb,r=this.parseVisual,o=this.parseCollision,a=this.manager,l={},c={},d={};function m(v){if(!/^package:\/\//.test(v))return t?t+v:v;const[b,S]=v.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof n=="string")return n.endsWith(b)?n+"/"+S:n+"/"+b+"/"+S;if(n instanceof Function)return n(b)+"/"+S;if(typeof n=="object")return b in n?n[b]+"/"+S:(console.error(`URDFLoader : ${b} not found in provided package list.`),null)}function u(v){let b;v instanceof Document?b=[...v.children]:v instanceof Element?b=[v]:b=[...new DOMParser().parseFromString(v,"text/xml").children];const S=b.filter(F=>F.nodeName==="robot").pop();return h(S)}function h(v){const b=[...v.children],S=b.filter(L=>L.nodeName.toLowerCase()==="link"),F=b.filter(L=>L.nodeName.toLowerCase()==="joint"),C=b.filter(L=>L.nodeName.toLowerCase()==="material"),R=new w4;R.robotName=v.getAttribute("name"),R.urdfRobotNode=v,C.forEach(L=>{const B=L.getAttribute("name");d[B]=p(L)});const P={},A={};S.forEach(L=>{const B=L.getAttribute("name"),H=v.querySelector(`child[link="${B}"]`)===null;l[B]=_(L,P,A,H?R:null)}),F.forEach(L=>{const B=L.getAttribute("name");c[B]=g(L)}),R.joints=c,R.links=l,R.colliders=A,R.visual=P;const E=Object.values(c);return E.forEach(L=>{L instanceof o0&&c[L.mimicJoint].mimicJoints.push(L)}),E.forEach(L=>{const B=new Set,H=Q=>{if(B.has(Q))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");B.add(Q),Q.mimicJoints.forEach(ae=>{H(ae)})};H(L)}),R.frames={...A,...P,...l,...c},R}function g(v){const b=[...v.children],S=v.getAttribute("type");let F;const C=b.find(B=>B.nodeName.toLowerCase()==="mimic");C?(F=new o0,F.mimicJoint=C.getAttribute("joint"),F.multiplier=parseFloat(C.getAttribute("multiplier")||1),F.offset=parseFloat(C.getAttribute("offset")||0)):F=new fu,F.urdfNode=v,F.name=v.getAttribute("name"),F.urdfName=F.name,F.jointType=S;let R=null,P=null,A=[0,0,0],E=[0,0,0];b.forEach(B=>{const H=B.nodeName.toLowerCase();H==="origin"?(A=Ns(B.getAttribute("xyz")),E=Ns(B.getAttribute("rpy"))):H==="child"?P=l[B.getAttribute("link")]:H==="parent"?R=l[B.getAttribute("link")]:H==="limit"&&(F.limit.lower=parseFloat(B.getAttribute("lower")||F.limit.lower),F.limit.upper=parseFloat(B.getAttribute("upper")||F.limit.upper))}),R.add(F),F.add(P),c0(F,E),F.position.set(A[0],A[1],A[2]);const L=b.filter(B=>B.nodeName.toLowerCase()==="axis")[0];if(L){const B=L.getAttribute("xyz").split(/\s+/g).map(H=>parseFloat(H));F.axis=new I(B[0],B[1],B[2]),F.axis.normalize()}return F}function _(v,b,S,F=null){F===null&&(F=new du);const C=[...v.children];return F.name=v.getAttribute("name"),F.urdfName=F.name,F.urdfNode=v,r&&C.filter(P=>P.nodeName.toLowerCase()==="visual").forEach(P=>{const A=f(P,d);if(F.add(A),P.hasAttribute("name")){const E=P.getAttribute("name");A.name=E,A.urdfName=E,b[E]=A}}),o&&C.filter(P=>P.nodeName.toLowerCase()==="collision").forEach(P=>{const A=f(P);if(F.add(A),P.hasAttribute("name")){const E=P.getAttribute("name");A.name=E,A.urdfName=E,S[E]=A}}),F}function p(v){const b=[...v.children],S=new fn;return S.name=v.getAttribute("name")||"",b.forEach(F=>{const C=F.nodeName.toLowerCase();if(C==="color"){const R=F.getAttribute("rgba").split(/\s/g).map(P=>parseFloat(P));S.color.setRGB(R[0],R[1],R[2]),S.opacity=R[3],S.transparent=R[3]<1,S.depthWrite=!S.transparent}else if(C==="texture"){const R=F.getAttribute("filename");if(R){const P=new oc(a),A=m(R);S.map=P.load(A),S.map.colorSpace=qt}}}),S}function f(v,b={}){const S=v.nodeName.toLowerCase()==="collision",F=[...v.children];let C=null;const R=F.filter(A=>A.nodeName.toLowerCase()==="material")[0];if(R){const A=R.getAttribute("name");A&&A in b?C=b[A]:C=p(R)}else C=new fn;const P=S?new E4:new A4;return P.urdfNode=v,F.forEach(A=>{const E=A.nodeName.toLowerCase();if(E==="geometry"){const L=A.children[0].nodeName.toLowerCase();if(L==="mesh"){const B=A.children[0].getAttribute("filename"),H=m(B);if(H!==null){const Q=A.children[0].getAttribute("scale");if(Q){const ae=Ns(Q);P.scale.set(ae[0],ae[1],ae[2])}i(H,a,(ae,G)=>{G?console.error("URDFLoader: Error loading mesh.",G):ae&&(ae instanceof zt&&(ae.material=C),ae.position.set(0,0,0),ae.quaternion.identity(),P.add(ae))})}}else if(L==="box"){const B=new zt;B.geometry=new $i(1,1,1),B.material=C;const H=Ns(A.children[0].getAttribute("size"));B.scale.set(H[0],H[1],H[2]),P.add(B)}else if(L==="sphere"){const B=new zt;B.geometry=new Oa(1,30,30),B.material=C;const H=parseFloat(A.children[0].getAttribute("radius"))||0;B.scale.set(H,H,H),P.add(B)}else if(L==="cylinder"){const B=new zt;B.geometry=new ic(1,1,1,30),B.material=C;const H=parseFloat(A.children[0].getAttribute("radius"))||0,Q=parseFloat(A.children[0].getAttribute("length"))||0;B.scale.set(H,Q,H),B.rotation.set(Math.PI/2,0,0),P.add(B)}}else if(E==="origin"){const L=Ns(A.getAttribute("xyz")),B=Ns(A.getAttribute("rpy"));P.position.set(L[0],L[1],L[2]),P.rotation.set(0,0,0),c0(P,B)}}),P}return u(e)}defaultMeshLoader(e,t,n){/\.stl$/i.test(e)?new ji(t).load(e,r=>{const o=new zt(r,new fn);n(o)}):/\.dae$/i.test(e)?new b4(t).load(e,r=>n(r.scene)):console.warn(`URDFLoader: Could not load model at ${e}.
|
|
4200
4200
|
No loader available`)}}const T4=/^[og]\s*(.+)?/,C4=/^mtllib /,R4=/^usemtl /,D4=/^usemap /,h0=/\s+/,u0=new I,zo=new I,d0=new I,f0=new I,Yn=new I,fa=new Tt;function L4(){const s={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=t!==!1;return}const n=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:t!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(i,r){const o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);const a={index:this.materials.length,name:i||"",mtllib:Array.isArray(r)&&r.length>0?r[r.length-1]:"",smooth:o!==void 0?o.smooth:this.smooth,groupStart:o!==void 0?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){const c={index:typeof l=="number"?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(i){const r=this.currentMaterial();if(r&&r.groupEnd===-1&&(r.groupEnd=this.geometry.vertices.length/3,r.groupCount=r.groupEnd-r.groupStart,r.inherited=!1),i&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return i&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),r}},n&&n.name&&typeof n.clone=="function"){const i=n.clone(0);i.inherited=!0,this.object.materials.push(i)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/3)*3},parseNormalIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/3)*3},parseUVIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/2)*2},addVertex:function(e,t,n){const i=this.vertices,r=this.object.geometry.vertices;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[t+0],i[t+1],i[t+2]),r.push(i[n+0],i[n+1],i[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const i=this.normals,r=this.object.geometry.normals;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[t+0],i[t+1],i[t+2]),r.push(i[n+0],i[n+1],i[n+2])},addFaceNormal:function(e,t,n){const i=this.vertices,r=this.object.geometry.normals;u0.fromArray(i,e),zo.fromArray(i,t),d0.fromArray(i,n),Yn.subVectors(d0,zo),f0.subVectors(u0,zo),Yn.cross(f0),Yn.normalize(),r.push(Yn.x,Yn.y,Yn.z),r.push(Yn.x,Yn.y,Yn.z),r.push(Yn.x,Yn.y,Yn.z)},addColor:function(e,t,n){const i=this.colors,r=this.object.geometry.colors;i[e]!==void 0&&r.push(i[e+0],i[e+1],i[e+2]),i[t]!==void 0&&r.push(i[t+0],i[t+1],i[t+2]),i[n]!==void 0&&r.push(i[n+0],i[n+1],i[n+2])},addUV:function(e,t,n){const i=this.uvs,r=this.object.geometry.uvs;r.push(i[e+0],i[e+1]),r.push(i[t+0],i[t+1]),r.push(i[n+0],i[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,i,r,o,a,l,c){const d=this.vertices.length;let m=this.parseVertexIndex(e,d),u=this.parseVertexIndex(t,d),h=this.parseVertexIndex(n,d);if(this.addVertex(m,u,h),this.addColor(m,u,h),a!==void 0&&a!==""){const g=this.normals.length;m=this.parseNormalIndex(a,g),u=this.parseNormalIndex(l,g),h=this.parseNormalIndex(c,g),this.addNormal(m,u,h)}else this.addFaceNormal(m,u,h);if(i!==void 0&&i!==""){const g=this.uvs.length;m=this.parseUVIndex(i,g),u=this.parseUVIndex(r,g),h=this.parseUVIndex(o,g),this.addUV(m,u,h),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,i=e.length;n<i;n++){const r=this.parseVertexIndex(e[n],t);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";const n=this.vertices.length,i=this.uvs.length;for(let r=0,o=e.length;r<o;r++)this.addVertexLine(this.parseVertexIndex(e[r],n));for(let r=0,o=t.length;r<o;r++)this.addUVLine(this.parseUVIndex(t[r],i))}};return s.startObject("",!1),s}class ls extends oi{constructor(e){super(e),this.materials=null}load(e,t,n,i){const r=this,o=new Zs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(a))}catch(l){i?i(l):console.error(l),r.manager.itemError(e)}},n,i)}setMaterials(e){return this.materials=e,this}parse(e){const t=new L4;e.indexOf(`\r
|
|
4201
4201
|
`)!==-1&&(e=e.replace(/\r\n/g,`
|
|
4202
4202
|
`)),e.indexOf(`\\
|
|
4203
4203
|
`)!==-1&&(e=e.replace(/\\\n/g,""));const n=e.split(`
|
|
4204
|
-
`);let i=[];for(let a=0,l=n.length;a<l;a++){const c=n[a].trimStart();if(c.length===0)continue;const d=c.charAt(0);if(d!=="#")if(d==="v"){const m=c.split(h0);switch(m[0]){case"v":t.vertices.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3])),m.length>=7?(fa.setRGB(parseFloat(m[4]),parseFloat(m[5]),parseFloat(m[6]),qt),t.colors.push(fa.r,fa.g,fa.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3]));break;case"vt":t.uvs.push(parseFloat(m[1]),parseFloat(m[2]));break}}else if(d==="f"){const u=c.slice(1).trim().split(h0),h=[];for(let _=0,p=u.length;_<p;_++){const f=u[_];if(f.length>0){const
|
|
4205
|
-
`);let i={};const r=/\s+/,o={};for(let l=0;l<n.length;l++){let c=n[l];if(c=c.trim(),c.length===0||c.charAt(0)==="#")continue;const d=c.indexOf(" ");let m=d>=0?c.substring(0,d):c;m=m.toLowerCase();let u=d>=0?c.substring(d+1):"";if(u=u.trim(),m==="newmtl")i={name:u},o[u]=i;else if(m==="ka"||m==="kd"||m==="ks"||m==="ke"){const h=u.split(r,3);i[m]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else i[m]=u}const a=new P4(this.resourcePath||t,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class P4{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:Qn,this.wrap=this.options.wrap!==void 0?this.options.wrap:di}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const n in e){const i=e[n],r={};t[n]=r;for(const o in i){let a=!0,l=i[o];const c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(l=[l[0]/255,l[1]/255,l[2]/255]),this.options&&this.options.ignoreZeroRGBs&&l[0]===0&&l[1]===0&&l[2]===0&&(a=!1);break}a&&(r[c]=l)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return this.materials[e]===void 0&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,n=this.materialsInfo[e],i={name:e,side:this.side};function r(a,l){return typeof l!="string"||l===""?"":/^https?:\/\//i.test(l)?l:a+l}function o(a,l){if(i[a])return;const c=t.getTextureParams(l,i),d=t.loadTexture(r(t.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=t.wrap,d.wrapT=t.wrap,(a==="map"||a==="emissiveMap")&&(d.colorSpace=qt),i[a]=d}for(const a in n){const l=n[a];let c;if(l!=="")switch(a.toLowerCase()){case"kd":i.color=Gt.colorSpaceToWorking(new Tt().fromArray(l),qt);break;case"ks":i.specular=Gt.colorSpaceToWorking(new Tt().fromArray(l),qt);break;case"ke":i.emissive=Gt.colorSpaceToWorking(new Tt().fromArray(l),qt);break;case"map_kd":o("map",l);break;case"map_ks":o("specularMap",l);break;case"map_ke":o("emissiveMap",l);break;case"norm":o("normalMap",l);break;case"map_bump":case"bump":o("bumpMap",l);break;case"disp":o("displacementMap",l);break;case"map_d":o("alphaMap",l),i.transparent=!0;break;case"ns":i.shininess=parseFloat(l);break;case"d":c=parseFloat(l),c<1&&(i.opacity=c,i.transparent=!0);break;case"tr":c=parseFloat(l),this.options&&this.options.invertTrProperty&&(c=1-c),c>0&&(i.opacity=1-c,i.transparent=!0);break}}return this.materials[e]=new fn(i),this.materials[e]}getTextureParams(e,t){const n={scale:new et(1,1),offset:new et(0,0)},i=e.split(/\s+/);let r;return r=i.indexOf("-bm"),r>=0&&(t.bumpScale=parseFloat(i[r+1]),i.splice(r,2)),r=i.indexOf("-mm"),r>=0&&(t.displacementBias=parseFloat(i[r+1]),t.displacementScale=parseFloat(i[r+2]),i.splice(r,3)),r=i.indexOf("-s"),r>=0&&(n.scale.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),r=i.indexOf("-o"),r>=0&&(n.offset.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),n.url=i.join(" ").trim(),n}loadTexture(e,t,n,i,r){const o=this.manager!==void 0?this.manager:ac;let a=o.getHandler(e);a===null&&(a=new oc(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(e,n,i,r);return t!==void 0&&(l.mapping=t),l}}const Bo="http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";function
|
|
4206
|
-
`||P==="\r"?(f.trim().toLowerCase().startsWith("data")&&(
|
|
4207
|
-
`);for(let f=0,x=p.length;f<x;f++){if(p[f]==="")continue;const y=p[f].split(" ");if(h.x!==void 0&&(r.push(parseFloat(y[h.x])),r.push(parseFloat(y[h.y])),r.push(parseFloat(y[h.z]))),h.rgb!==void 0){const S=i.fields.findIndex(D=>D==="rgb"),U=i.type[S],C=parseFloat(y[h.rgb]);let L=C;if(U==="F"){const D=new Float32Array(1);D[0]=C,L=new Int32Array(D.buffer)[0]}const P=(L>>16&255)/255,E=(L>>8&255)/255,A=(L>>0&255)/255;d.setRGB(P,E,A,qt),a.push(d.r,d.g,d.b)}h.normal_x!==void 0&&(o.push(parseFloat(y[h.normal_x])),o.push(parseFloat(y[h.normal_y])),o.push(parseFloat(y[h.normal_z]))),h.intensity!==void 0&&l.push(parseFloat(y[h.intensity])),h.label!==void 0&&c.push(parseInt(y[h.label]))}}if(i.data==="binary_compressed"){const h=new Uint32Array(e.slice(i.headerLen,i.headerLen+8)),g=h[0],_=h[1],p=t(new Uint8Array(e,i.headerLen+8,g),_),f=new DataView(p.buffer),x=i.offset;for(let y=0;y<i.points;y++){if(x.x!==void 0){const S=i.fields.indexOf("x"),U=i.fields.indexOf("y"),C=i.fields.indexOf("z");r.push(this._getDataView(f,i.points*x.x+i.size[S]*y,i.type[S],i.size[S])),r.push(this._getDataView(f,i.points*x.y+i.size[U]*y,i.type[U],i.size[U])),r.push(this._getDataView(f,i.points*x.z+i.size[C]*y,i.type[C],i.size[C]))}if(x.rgb!==void 0){const S=i.fields.indexOf("rgb"),U=f.getUint8(i.points*x.rgb+i.size[S]*y+2)/255,C=f.getUint8(i.points*x.rgb+i.size[S]*y+1)/255,L=f.getUint8(i.points*x.rgb+i.size[S]*y+0)/255;d.setRGB(U,C,L,qt),a.push(d.r,d.g,d.b)}if(x.normal_x!==void 0){const S=i.fields.indexOf("normal_x"),U=i.fields.indexOf("normal_y"),C=i.fields.indexOf("normal_z");o.push(this._getDataView(f,i.points*x.normal_x+i.size[S]*y,i.type[S],i.size[S])),o.push(this._getDataView(f,i.points*x.normal_y+i.size[U]*y,i.type[U],i.size[U])),o.push(this._getDataView(f,i.points*x.normal_z+i.size[C]*y,i.type[C],i.size[C]))}if(x.intensity!==void 0){const S=i.fields.indexOf("intensity");l.push(this._getDataView(f,i.points*x.intensity+i.size[S]*y,i.type[S],i.size[S]))}if(x.label!==void 0){const S=i.fields.indexOf("label");c.push(f.getInt32(i.points*x.label+i.size[S]*y,this.littleEndian))}}}if(i.data==="binary"){const h=new DataView(e,i.headerLen),g=i.offset;for(let _=0,p=0;_<i.points;_++,p+=i.rowSize){if(g.x!==void 0){const f=i.fields.indexOf("x"),x=i.fields.indexOf("y"),y=i.fields.indexOf("z");r.push(this._getDataView(h,p+g.x,i.type[f],i.size[f])),r.push(this._getDataView(h,p+g.y,i.type[x],i.size[x])),r.push(this._getDataView(h,p+g.z,i.type[y],i.size[y]))}if(g.rgb!==void 0){const f=h.getUint8(p+g.rgb+2)/255,x=h.getUint8(p+g.rgb+1)/255,y=h.getUint8(p+g.rgb+0)/255;d.setRGB(f,x,y,qt),a.push(d.r,d.g,d.b)}if(g.normal_x!==void 0){const f=i.fields.indexOf("normal_x"),x=i.fields.indexOf("normal_y"),y=i.fields.indexOf("normal_z");o.push(this._getDataView(h,p+g.normal_x,i.type[f],i.size[f])),o.push(this._getDataView(h,p+g.normal_y,i.type[x],i.size[x])),o.push(this._getDataView(h,p+g.normal_z,i.type[y],i.size[y]))}if(g.intensity!==void 0){const f=i.fields.indexOf("intensity");l.push(this._getDataView(h,p+g.intensity,i.type[f],i.size[f]))}g.label!==void 0&&c.push(h.getInt32(p+g.label,this.littleEndian))}}const m=new hn;r.length>0&&m.setAttribute("position",new It(r,3)),o.length>0&&m.setAttribute("normal",new It(o,3)),a.length>0&&m.setAttribute("color",new It(a,3)),l.length>0&&m.setAttribute("intensity",new It(l,1)),c.length>0&&m.setAttribute("label",new K2(c,1)),m.computeBoundingSphere();const u=new Gi({size:.005});return a.length>0&&(u.vertexColors=!0),new Vs(m,u)}}const U4=Oe.useModelComp(Oe.pinia),{systemPath:p0}=Oe.storeToRefs(U4),pa=v.ref(),m0=new Map;function N4(s,e,t,n,i){const r=async u=>{try{const h=await On.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},o=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=p=>{try{const f=p.target.result,y=new cs().parse(f);y.preload(),h(y)}catch(f){g(f)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),a=async u=>{const h={materials:{},create:function(g){return this.materials[g]?this.materials[g]:(console.warn(`Material '${g}' not found, using default material`),new fn({color:8947848,side:pn}))},getAsArray:function(){const g=[];for(const _ in this.materials)g.push(this.materials[_]);return g},preload:function(){for(const g in this.materials)this.materials[g].map&&(this.materials[g].map.needsUpdate=!0)}};for(const g of u){const _=await o(g);Object.assign(h.materials,_.materials)}return h.preload(),h},l=async(u,h=[])=>new Promise((g,_)=>{const p=new FileReader;p.onload=async f=>{try{const x=f.target.result;let y=null;h&&h.length>0&&(h.length===1?y=await o(h[0]):y=await a(h));const S=new ls;y&&S.setMaterials(y);const U=S.parse(x);y||U.traverse(C=>{C.isMesh&&(C.material=new fn({color:8947848,side:pn}))}),g(U)}catch(x){_(x)}},p.onerror=()=>{_(new Error("OBJ文件读取失败"))},p.readAsText(u)}),c=async u=>{var h;try{t.value=!0;const{scene:g}=s();if(!g)throw new Error("Scene not initialized");i();const _=[];for(let p=0;p<u.length;p++){const f=u[p];n.value=`正在加载模型 ${p+1}/${u.length}...`;const x=await r(f.objUrl),y=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,S=new File([x],y,{type:x.type});let U=[];if(f.mtlUrls){const L=Array.isArray(f.mtlUrls)?f.mtlUrls:[f.mtlUrls];for(let P=0;P<L.length;P++){const E=L[P],A=await r(E),D=(E==null?void 0:E.split("/").pop())||`material_${p}_${P}.mtl`,O=new File([A],D,{type:A.type});U.push(O)}}const C=await l(S,U);g.add(C),e.value.push(C),_.push(C)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let p;const f=u.toLowerCase();switch(f){case".txt":case".cpt":case".obj":const x=await h.text();if(f===".txt"||f===".cpt"){const J=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Ce=[...x.matchAll(J)].map(B=>({x:parseFloat(B[1]),y:parseFloat(B[2]),z:parseFloat(B[3])})),je=new hn,We=Ce.flatMap(B=>[B.x,B.y,B.z]);if(je.setAttribute("position",new It(We,3)),f===".txt"){const B=new Gi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(je,B)}else if(f===".cpt"){const B=new Ri({color:"#5B5C99",linewidth:100});p=new Ba(je,B)}}else if(f===".obj"){const J=new ls;if(g&&g.length>0){const ue=new cs;for(const Ce of g){const je=await Ce.text(),We=ue.parse(je);We.preload(),J.setMaterials(We);break}}p=J.parse(x),(!g||g.length===0)&&p.traverse(ue=>{ue.isMesh&&(ue.material=new fn({color:"#B3B3D4"})),ue instanceof zt&&(ue.material.side=pn)})}break;case".stl":const y=await h.arrayBuffer(),U=new ji().parse(y),C=new fn({color:"#B3B3D4",side:pn});p=new zt(U,C);break;case".nc":const L=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],P={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},E=new Ln,A=L.map(J=>new Promise((ue,Ce)=>{new ji().load(p0.value===""?`/model/${J}`:`${p0.value}\\${J}`,We=>{const B=new fn({color:P[J]||"#B3B3D4",side:pn}),_t=new zt(We,B);ue(_t)},void 0,Ce)}));try{(await Promise.all(A)).forEach(ue=>E.add(ue)),p=E}catch(J){throw console.error("加载NC文件对应的STL文件失败:",J),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const D=new pu,O=new Ln;try{const J=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ue=new Blob([J.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),je=new Blob([Ce.data],{type:"application/octet-stream;charset=UTF-8"}),We=await new Promise((_t,dt)=>{const at=URL.createObjectURL(ue);D.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=1,tt[Le*3+1]=0,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)}),B=await new Promise((_t,dt)=>{const at=URL.createObjectURL(je);D.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=0,tt[Le*3+1]=1,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)});O.add(We),O.add(B),p=O}catch(J){throw console.error("PCD文件加载失败:",J),new Error("无法加载PCD文件")}break;case".urdf":const V=URL.createObjectURL(h),Q=new gc,se="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",G={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},ce=new Map,Z=new Map,ge=new Map,De=async J=>{if(ce.has(J))return console.log(`从缓存加载: ${J}`),ce.get(J);try{const ue=await Pn.axios.get(`${se}/${J}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Ce=new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&ce.set(J,Ce),Ce}catch(ue){throw console.error(`加载文件失败: ${J}`,ue),new Error(`无法加载文件: ${J}`)}},ye=(J="default")=>{if(Z.has(J))return Z.get(J);const ue=new fn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Qn});return Z.set(J,ue),ue},_e=J=>{try{J.isBufferGeometry&&J.mergeVertices&&J.mergeVertices(),J.computeVertexNormals&&J.computeVertexNormals(),J.computeBoundingSphere&&J.computeBoundingSphere(),J.deleteAttribute&&J.deleteAttribute("uv2")}catch(ue){console.warn("几何体优化失败,使用原始几何体:",ue)}return J},ae=async(J,ue,Ce)=>{const je=`stl_${ue}`;if(ge.has(je)){const dt=ge.get(je);return new zt(dt,ye())}const We=await J.arrayBuffer();let _t=new ji(Ce).parse(We);return _t=_e(_t),ge.set(je,_t),new zt(_t,ye())},j=async(J,ue,Ce)=>{const je=`obj_${ue}`;if(ce.has(je))return ce.get(je).clone();const We=await J.text(),B=new ls(Ce),_t=ue.replace(".obj",".mtl");try{const Fe=await(await De(_t)).text(),Le=new cs(Ce).parse(Fe);Le.preload(),B.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${_t}`)}const dt=B.parse(We);return dt.traverse(at=>{at.isMesh&&(at.geometry=_e(at.geometry),at.castShadow=!0,at.receiveShadow=!0,at.renderOrder=1)}),ce.set(je,dt),dt},Y=(J,ue)=>{const Ce=new O0;if(Ce.addLevel(J,0),J.geometry){const je=J.geometry.clone(),We=new zt(je,J.material);Ce.addLevel(We,50)}return Ce};let ee=0,ne=0;const he=[];Q.loadMeshCb=async(J,ue,Ce,je,We)=>{const B=J.split("/").pop(),_t=Ce||(()=>{});ee++;const dt=new Promise(async(at,Fe)=>{try{const tt=await De(B);if(!tt||tt.size===0)throw new Error(`文件为空: ${B}`);const Le=B.split(".").pop().toLowerCase();let ot;switch(Le){case"stl":ot=await ae(tt,B,ue);break;case"obj":ot=await j(tt,B,ue);break;default:throw new Error(`不支持的文件格式: ${Le}`)}G.enableLOD&&ot.isMesh&&(ot=Y(ot,B)),_t(ot),ne++,je&&je({loaded:ne,total:ee,progress:ne/ee}),at(ot)}catch(tt){console.error(`mesh文件加载失败: ${B}`,tt);const Le=new Ln;_t(Le),at(Le);const ot=new $i(.1,.1,.1),jt=new j0({color:16711680,wireframe:!0});return new zt(ot,jt)}});he.push(dt)};try{if(!V){pa.value=void 0;break}if(p=await Q.loadAsync(V),console.log(`URDF文件加载完成,等待${ee}个mesh文件加载...`),he.length>0)try{await Promise.allSettled(he),console.log(`所有mesh文件处理完成,成功加载: ${ne}/${ee}`)}catch(Ce){console.warn("部分mesh文件加载失败,但继续显示模型",Ce)}p.traverse(Ce=>{Ce.isMesh&&(Ce.castShadow=!0,Ce.receiveShadow=!0,Ce.renderOrder=1,Ce.material&&(Ce.material.needsUpdate=!0))}),console.time("计算包围盒");const J=new Fn;J.expandByObject(p);const ue=`urdf_${Date.now()}`;p.userData.boundingBox=J.clone(),p.userData.modelId=ue,m0.set(ue,{box:J.clone(),center:J.getCenter(new I),size:J.getSize(new I),maxSize:Math.max(...J.getSize(new I).toArray())}),pa.value=p,console.log("URDF模型加载完成并优化")}catch(J){console.error("URDF加载失败:",J),pa.value=void 0}finally{V&&URL.revokeObjectURL(V)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return p};return{addModelsFromUrls:c,loadModelByDefaultPath:async u=>{console.log(u);try{t.value=!0,n.value="正在加载模型...";const{scene:h}=s();if(!h)throw new Error("Scene not initialized");i(),await new Promise(_=>setTimeout(_,100));const g=[];for(let _=0;_<u.length;_++){const p=u[_],f=await d(p.suffix,p.blob,p.mtlBlobs||[],p.meshFiles||[]);f&&(h.add(f),e.value.push(f),g.push(f))}return t.value=!1,n.value="",g}catch(h){throw console.error("加载模型失败:",h),t.value=!1,n.value="",h}},urdfModel:pa,modelBoundingBoxes:m0}}const I4={class:"panel-content"},z4={__name:"animationPanel",props:{animationData:Object,model:Object},setup(s){const e=s;v.ref();const t=v.ref();return v.watch(()=>[e==null?void 0:e.animationData],()=>{var i;let n=((i=Oe.cloneDeep(e==null?void 0:e.animationData))==null?void 0:i["输出(动画数据)Content"])??[];n&&(t.value=n)},{deep:!0,immediate:!0}),(n,i)=>{var r,o,a;return v.openBlock(),v.createElementBlock("div",I4,[(v.openBlock(),v.createBlock(Eu,{itemData:(r=t.value)==null?void 0:r.compData,key:(o=t.value)==null?void 0:o.id,index:(a=t.value)==null?void 0:a.id,showHeader:!1},null,8,["itemData","index"]))])}}},B4=Pi._export_sfc(z4,[["__scopeId","data-v-ed10cedd"]]),O4={class:"panel-content"},k4={key:0,class:"joints-list"},V4={class:"joint-info-row"},H4={class:"joint-left"},G4={class:"joint-name"},W4={class:"joint-range"},X4={class:"joint-type"},j4={key:0,class:"joint-control-row"},q4={class:"slider-container"},$4=["min","max","value","onInput","disabled"],Y4={class:"value-display"},J4={class:"joint-value"},K4={class:"unit"},Z4={key:1,class:"empty-state"},hr=.001,Q4=1e3,ko=60,e6={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(s,{expose:e}){const t=s;v.ref(!0);const n=v.ref([]),i=v.ref(null),r=v.ref(null),o=v.ref(12.5),a=v.ref(),l=v.ref(1302),c=v.ref(30),d=v.ref(!1),m=v.ref(!1),u=v.ref(0),h=v.ref(0),g=v.ref(null),_=Ei.degToRad,p=v.ref(1),f=()=>Q4/ko/p.value;let x=[];v.watch(()=>t.animationData,ae=>{var Y;l.value=ae.extra.管长,o.value=ae.extra.外径/2;let j=((Y=Oe.cloneDeep(ae))==null?void 0:Y["输出(动画数据)"])??[];j&&j.length>0&&(x=j)},{deep:!0}),v.computed(()=>x.length>0);const y=(ae,j=!1)=>ae==="revolute"?j?Math.PI:-Math.PI:ae==="prismatic"?j?1:-1:0,S=()=>{if(!i.value)return Pn.ElMessage.error("未加载 URDF"),!1;let ae=null;return i.value.traverse(j=>{ae||j.name==="Pipe_Link"&&j.traverse(Y=>{Y instanceof zt&&!ae&&(ae=Y)})}),ae?(ae.position.y-=c.value*hr,a.value=ae,ae.material=new fn({color:11184810,shininess:80,side:pn}),!0):(Pn.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},U=ae=>{if(!ae||!ae.joints)return console.warn("URDF模型没有关节信息"),[];let j=null;if(ae.traverse(ee=>{ee.name==="Pipe_Link"&&!j&&(j=ee)}),j)a.value=j;else return console.warn("未找到管子模型"),[];const Y=[];return Object.keys(ae.joints).forEach(ee=>{const ne=ae.joints[ee];if(ne._jointType==="fixed")return;const he=ne.limit?{lower:ne.limit.lower??y(ne._jointType,!1),upper:ne.limit.upper??y(ne._jointType,!0)}:{lower:y(ne._jointType,!1),upper:y(ne._jointType,!0)};Y.push({name:ee,type:ne._jointType||"unknown",limit:he,currentValue:ne.angle||0,urdfJoint:ne})}),Y.sort((ee,ne)=>ee.name.localeCompare(ne.name))},C=(ae,j)=>{const Y=n.value.find(ne=>ne.name===ae);if(!Y)return;const ee=parseFloat(j);if(Y.limit){const ne=Math.max(Y.limit.lower,Math.min(Y.limit.upper,ee));Y.currentValue=ne}else Y.currentValue=ee;t.model&&t.model.setJointValue?t.model.setJointValue(ae,Y.currentValue):Y.urdfJoint&&Y.urdfJoint.setJointValue(Y.currentValue)},L=ae=>ae.reduce((j,Y)=>{let ee=0;const ne=Y.Y??0,he=Y.C??0,J=Y.R??0;return ne>0&&(ee+=ne),he>0&&J>0&&(ee+=J*_(he)),j+ee},0),P=ae=>{const j=[],Y=ae.Y??0,ee=ae.B??0,ne=ae.C??0,he=ae.R??0,J={pos:new I(0,0,0),localY:new I(0,1,0),localX:new I(1,0,0),localZ:new I(0,0,1)};if(!Y&&!ne)return j;if(j.push(J.pos.clone()),ee!==0){const ue=new Et().makeRotationAxis(J.localY,_(ee));J.localX.applyMatrix4(ue),J.localZ.applyMatrix4(ue)}if(Y>0&&(J.pos.add(J.localY.clone().multiplyScalar(Y*hr)),j.push(J.pos.clone())),ne>0&&he>0){const ue=_(ne),Ce=he*hr,je=J.pos.clone().add(J.localX.clone().multiplyScalar(-Ce)),We=Math.max(16,Math.ceil(ne/5));for(let B=1;B<=We;B++){const _t=ue*B/We,dt=new Et().makeRotationAxis(J.localZ,_t),Fe=J.localX.clone().multiplyScalar(Ce).applyMatrix4(dt),tt=je.clone().add(Fe);j.push(tt)}}return j},E=(ae,j=0)=>{let Y=x.slice(0,ae+1);const ee=x[ae+1];if(ee&&j>0){const We={...ee,B:(ee.B??0)*j,C:(ee.C??0)*j};Y.push(We)}const ne=L(Y),he=Math.max(0,l.value-ne),J=[];J.push(new I(0,0,0));const ue=new I(0,he*hr,0);he>0&&J.push(ue);let Ce={pos:ue.clone(),localY:new I(0,1,0),localX:new I(1,0,0),localZ:new I(0,0,1)};const je=[];for(let We=Y.length-1;We>=0;We--){const B=Y[We],_t=P(B);if(_t.length>0){const dt=_t.map(Le=>{const ot=Le.clone(),jt=new Et;return jt.makeBasis(Ce.localX,Ce.localY,Ce.localZ),ot.applyMatrix4(jt),ot.add(Ce.pos)});je.push(dt);const at=dt[dt.length-1];Ce.pos=at.clone();const Fe=B.B??0,tt=B.C??0;if(Fe!==0){const Le=new Et().makeRotationAxis(Ce.localY,_(Fe));Ce.localX.applyMatrix4(Le),Ce.localZ.applyMatrix4(Le)}if(tt>0){const Le=_(tt),ot=new Et().makeRotationAxis(Ce.localZ,Le);Ce.localY.applyMatrix4(ot),Ce.localX.applyMatrix4(ot)}}}for(const We of je)We.length>1&&J.push(...We.slice(1));J.length<2&&J.push(new I(0,.001,0));try{const We=new rc(J,!1,"catmullrom",.01),B=new ka(We,Math.max(2,J.length*4),o.value*hr,18,!1);a.value.geometry.dispose(),a.value.geometry=B}catch(We){console.error("管件更新失败",We)}},A=(ae,j,Y=1)=>{ae&&(Object.keys(ae).forEach(ee=>{const ne=ae[ee],he=n.value.find(J=>J.name===ee);he&&(he.currentValue=ne,t.model&&t.model.setJointValue?t.model.setJointValue(ee,ne):he.urdfJoint&&he.urdfJoint.setJointValue(ne))}),E(j,Y))},D=(ae,j,Y)=>ae+(j-ae)*Y,O=(ae,j,Y)=>{if(!ae||!j)return ae||j;const ee={};return Object.keys(ae).forEach(ne=>{const he=ae[ne],J=j[ne];ee[ne]=D(he,J||he,Y)}),ee},V=()=>{if(x.length===0){console.warn("没有动画数据");return}S(),d.value=!0,m.value=!1,u.value=0,h.value=0,Q()},Q=()=>{if(!d.value||m.value)return;const ae=u.value;if(ae>=x.length-1){const ne=x[x.length-1];A(ne,x.length-1,1),G();return}const j=h.value/ko,Y=x[ae],ee=x[ae+1];if(ee){const ne=O(Y,ee,j);A(ne,ae,j)}else A(Y,ae);h.value++,h.value>ko&&(h.value=0,u.value++),g.value=setTimeout(Q,f())},se=()=>{m.value=!0,g.value&&(clearTimeout(g.value),g.value=null)},G=()=>{d.value=!1,m.value=!1,p.value=1,g.value&&(clearTimeout(g.value),g.value=null)};e({startAnimation:V,pauseAnimation:se,stopAnimation:G,resetAll:()=>{G(),u.value=0,h.value=0,n.value.forEach(ae=>{(ae.type==="revolute"||ae.type==="prismatic")&&C(ae.name,0)}),E(-1,0)},fastForward:()=>{p.value<4&&(p.value=Math.min(4,p.value*2))},fastBackward:()=>{p.value>.25&&(p.value=Math.max(.25,p.value/2))}}),v.watch(()=>t.model,ae=>{ae?(i.value=ae,n.value=U(ae)):n.value=[]},{immediate:!0});const De=()=>{!t.model||d.value&&!m.value||n.value.forEach(ae=>{ae.urdfJoint&&ae.urdfJoint.angle!==void 0&&(ae.currentValue=ae.urdfJoint.angle)})},ye=()=>{const ae=()=>{De(),r.value=requestAnimationFrame(ae)};ae()},_e=()=>{r.value&&(cancelAnimationFrame(r.value),r.value=null)};return v.onMounted(()=>{ye()}),v.onUnmounted(()=>{_e(),G()}),(ae,j)=>(v.openBlock(),v.createElementBlock("div",O4,[n.value.length>0?(v.openBlock(),v.createElementBlock("div",k4,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(n.value,Y=>{var ee,ne,he,J;return v.openBlock(),v.createElementBlock("div",{key:Y.name,class:"joint-item"},[v.createElementVNode("div",V4,[v.createElementVNode("div",H4,[v.createElementVNode("span",G4,v.toDisplayString(Y.name),1),v.createElementVNode("span",W4," ["+v.toDisplayString(((ee=Y.limit)==null?void 0:ee.lower.toFixed(2))??(Y.type==="revolute"?"-3.14":"-1.00"))+", "+v.toDisplayString(((ne=Y.limit)==null?void 0:ne.upper.toFixed(2))??(Y.type==="revolute"?"3.14":"1.00"))+"] ",1)]),v.createElementVNode("span",X4,v.toDisplayString(Y.type),1)]),Y.type==="revolute"||Y.type==="prismatic"?(v.openBlock(),v.createElementBlock("div",j4,[v.createElementVNode("div",q4,[v.createElementVNode("input",{type:"range",min:((he=Y.limit)==null?void 0:he.lower)??(Y.type==="revolute"?-Math.PI:-1),max:((J=Y.limit)==null?void 0:J.upper)??(Y.type==="revolute"?Math.PI:1),step:.01,value:Y.currentValue,onInput:ue=>C(Y.name,ue.target.value),class:"joint-slider",disabled:d.value&&!m.value},null,40,$4)]),v.createElementVNode("div",Y4,[v.createElementVNode("span",J4,v.toDisplayString(Y.currentValue?Number(Y.currentValue).toFixed(3):"0.000"),1),v.createElementVNode("span",K4,v.toDisplayString(Y.type==="revolute"?"rad":"m"),1)])])):v.createCommentVNode("",!0)])}),128))])):(v.openBlock(),v.createElementBlock("div",Z4,j[0]||(j[0]=[v.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},t6=Pi._export_sfc(e6,[["__scopeId","data-v-7cbf5b39"]]),n6={class:"panel-content"},i6="id",s6={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:s=>["breadth","firstLevel"].includes(s)}},emits:["nodeClick"],setup(s,{emit:e}){const t=s,n=e,i=v.ref([]),r={children:"children",label:"label"},o=h=>{n("nodeClick",h)},a=(h,g=0)=>{const _=[];return Array.isArray(h)&&(h==null?void 0:h.length)>0&&h.forEach(p=>{if(!(p!=null&&p.isMesh)&&((p==null?void 0:p.type)==="URDFJoint"||(p==null?void 0:p.type)==="URDFLink")){const f={name:p==null?void 0:p.name,label:p==null?void 0:p.name,show:!0,level:g+1,isPenultimate:!1,type:p==null?void 0:p.type,id:p==null?void 0:p.id,limit:(p==null?void 0:p.limit)??"",children:a(p==null?void 0:p.children,g+1),path:p==null?void 0:p.name};_.push(f)}}),_},l=h=>h?[{name:h==null?void 0:h.name,label:h==null?void 0:h.name,show:!0,level:1,isPenultimate:!1,type:h==null?void 0:h.type,id:h==null?void 0:h.id,limit:(h==null?void 0:h.limit)??"",children:a(h==null?void 0:h.children,1),path:h==null?void 0:h.name}]:[],c=(h,g)=>{const _=[],p=[...h];for(;p.length>0&&_.length<g;){const f=p.shift();f.children&&f.children.length>0&&(_.push(f.id),p.push(...f.children))}return _},d=(h,g)=>{const _=[];return h.forEach(p=>{if(p.children&&p.children.length>0){_.push(p.id);const f=p.children.filter(x=>x.children&&x.children.length>0).slice(0,g).map(x=>x.id);_.push(...f)}}),_.slice(0,g+1)},m=v.computed(()=>!i.value||i.value.length===0?[]:t.expandStrategy==="firstLevel"?d(i.value,t.maxExpandCount):c(i.value,t.maxExpandCount)),u=v.computed(()=>t!=null&&t.model?l(t.model):[]);return v.watch(u,h=>{i.value=JSON.parse(JSON.stringify(h))},{immediate:!0}),(h,g)=>{const _=v.resolveComponent("el-tree");return v.openBlock(),v.createElementBlock("div",n6,[v.createVNode(_,{data:i.value,props:r,"default-expanded-keys":m.value,"node-key":i6,onNodeClick:o},null,8,["data","default-expanded-keys"])])}}},r6=Pi._export_sfc(s6,[["__scopeId","data-v-0dda287c"]]),a6=["xlink:href"],o6=v.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(s){const e=s,t=v.computed(()=>({backgroundColor:e.backgroundColor})),n=v.computed(()=>`#${e.prefix}-${e.name}`),i=v.computed(()=>{const{size:r}=e;let o=`${r}`;return o=`${o.replace("px","")}px`,{width:o,height:o}});return(r,o)=>(v.openBlock(),v.createElementBlock("div",{class:v.normalizeClass(["container",{active:r.active}]),style:v.normalizeStyle(t.value)},[(v.openBlock(),v.createElementBlock("svg",{class:v.normalizeClass(["svg-icon",[r.$attrs.class,r.spin&&"svg-icon-spin"]]),style:v.normalizeStyle(i.value),"aria-hidden":"true"},[v.createElementVNode("use",{"xlink:href":n.value},null,8,a6)],6))],6))}}),un=Pi._export_sfc(o6,[["__scopeId","data-v-00a72991"]]);window._iconfont_svg_string_4634042='<svg><symbol id="icon-lookAround" viewBox="0 0 1041 1024"><path d="M520.685026 798.355937c-10.788594 0-21.577187-2.790872-31.241101-8.372615l-291.583615-168.36871A62.482203 62.482203 0 0 1 166.619208 567.505024V230.850913c0-22.368629 11.913273-42.987756 31.241102-54.109588l291.583615-168.36871a62.482203 62.482203 0 0 1 62.482203 0l291.583615 168.36871c19.327828 11.121832 31.241102 31.740959 31.241101 54.109588v336.654111a62.482203 62.482203 0 0 1-31.241101 54.109588l-291.583615 168.36871a62.857096 62.857096 0 0 1-31.241102 8.372615zM291.583615 531.39031l229.101411 132.295652 229.101412-132.295652v-264.507993l-229.101412-132.295651L291.583615 266.923972v264.466338z m520.685026 36.114714h0.416548-0.416548z" fill="#aaaaaa" ></path><path d="M520.685026 461.660172c-10.788594 0-21.577187-2.790872-31.241101-8.372616l-291.583615-168.327055a62.482203 62.482203 0 0 1 62.482203-108.219176L520.685026 326.990196l260.342513-150.248871a62.482203 62.482203 0 1 1 62.482204 108.219176l-291.583615 168.327055a62.857096 62.857096 0 0 1-31.241102 8.372616z" fill="#aaaaaa" ></path><path d="M520.685026 798.355937a62.482203 62.482203 0 0 1-62.482203-62.482203V399.177969a62.482203 62.482203 0 1 1 124.964406 0v336.695765a62.482203 62.482203 0 0 1-62.482203 62.482203z" fill="#aaaaaa" ></path><path d="M520.685026 1003.172599c-53.276492 0-520.685026-5.248505-520.685026-187.446609 0-62.982061 54.776065-111.259976 162.870276-143.584103 33.073913-9.622259 67.855673 8.914128 77.769516 41.98804s-8.872473 67.897327-41.946386 77.769516c-30.324696 9.080747-49.194321 17.619981-60.649392 24.11813 46.32014 26.242525 178.657446 62.19062 382.641012 62.19062s336.320872-35.948094 382.641012-62.19062c-11.455071-6.498149-30.324696-15.037384-60.649392-24.11813a62.482203 62.482203 0 1 1 35.82313-119.757556c108.094211 32.324126 162.870276 80.643697 162.870276 143.584103 0 182.198104-467.408534 187.446609-520.685026 187.446609z m398.886385-175.366717h0.416548-0.416548z" fill="#72B02D" ></path></symbol><symbol id="icon-xuanzhuan" viewBox="0 0 1024 1024"><path d="M378.963454 724.443778l91.182641 163.473426c6.246088 11.212239 2.252687 25.39393-9.010749 31.691216l-163.473427 91.18264c-18.123894 10.085896-39.422029-6.758062-33.739113-26.673866l72.290786-254.707264c5.682916-19.967002 32.663967-23.090045 42.749862-4.966152z" fill="#FC794B" ></path><path d="M414.64807 903.9932c-1.228739 0-2.40628-0.051197-3.635018-0.204789C169.002752 879.367232 0.000003 771.443028 0.000003 641.452727c0-52.221389 27.032248-102.19009 78.127293-144.581571a35.827969 35.827969 0 0 1 50.480676 4.710165 35.827969 35.827969 0 0 1-4.710164 50.480676C100.090998 571.824209 71.727616 603.310634 71.727616 641.452727c0 88.929954 148.984551 171.050647 346.504275 191.068847 19.711014 1.9967 34.046298 19.557422 32.049597 39.268436a35.879166 35.879166 0 0 1-35.633418 32.20319zM608.430381 904.095595c-18.175091 0-33.79031-13.772111-35.633418-32.254387-1.945503-19.711014 12.389781-37.271736 32.100795-39.217239 198.134093-19.813409 347.528224-101.985301 347.528223-191.171242 0-23.550822-10.649068-47.050447-31.58882-69.935703-13.362532-14.59127-12.389781-37.271736 2.20149-50.634268 14.59127-13.362532 37.271736-12.389781 50.634268 2.20149 32.971151 35.9918 50.429479 76.898555 50.429478 118.368481 0 130.297485-169.463527 238.221689-412.088195 262.489276-1.177541 0.102395-2.40628 0.153592-3.583821 0.153592z" fill="#FC794B" ></path><path d="M846.703267 184.413179l-325.308534 184.464377L196.137396 184.413179 521.394733 0z" fill="#BEC5CB" ></path><path d="M521.394733 737.703915l325.308534-184.41318V184.413179l-325.308534 184.464377z" fill="#808487" ></path><path d="M521.394733 737.703915L196.137396 553.290735V184.413179l325.257337 184.464377z" fill="#9CA3A9" ></path></symbol><symbol id="icon-clipping" viewBox="0 0 1024 1024"><path d="M341.930667 201.770667l353.706666 204.245333v408.448l-353.706666-204.245333z" fill="#4A80FF" fill-opacity="0.15" ></path><path d="M320.853333 165.248l396.117334 228.608v457.173333l-395.946667-228.608z m353.749334 252.970667L362.837333 238.336v359.722667l311.466667 179.882666z" fill="#72B02D" ></path><path d="M544.384 746.453333l-211.669333-211.669333 18.688-18.688 211.669333 211.669333z" fill="#72B02D" ></path><path d="M693.717333 530.261333l-266.453333-266.325333 20.906667-20.906667 266.325333 266.453334z" fill="#72B02D" ></path><path d="M688.853333 621.098667l-366.933333-366.933334 24.448-24.704 366.933333 366.933334z" fill="#72B02D" ></path><path d="M689.664 713.856L321.578667 345.770667l24.618666-24.618667 368.085334 368.128z" fill="#72B02D" ></path><path d="M683.605333 799.317333l-355.712-355.712 24.234667-24.234666 355.712 355.712z" fill="#72B02D" ></path><path d="M537.770667 944.938667h-51.2v-418.602667l-362.666667-209.28 25.6-44.330667 362.666667 209.066667 362.666666-209.066667 25.6 44.330667-362.666666 209.066667z" fill="#AAAAAA" ></path><path d="M512.170667 53.461333a31.146667 31.146667 0 0 1 15.488 4.266667l370.090666 213.632a31.232 31.232 0 0 1 15.317334 26.794667v426.922666a31.274667 31.274667 0 0 1-15.317334 26.837334l-369.834666 213.333333a31.488 31.488 0 0 1-31.061334 0l-369.834666-213.333333a31.146667 31.146667 0 0 1-15.914667-26.837334V298.069333a31.146667 31.146667 0 0 1 15.573333-27.008l369.792-213.333333a30.976 30.976 0 0 1 15.701334-4.266667z m349.866666 256l-349.866666-201.642666-349.866667 201.856v403.84l349.866667 201.813333 349.866666-201.898667z" fill="#AAAAAA" ></path></symbol><symbol id="icon-viewReset" viewBox="0 0 1024 1024"><path d="M643.2 515.2c-89.6-67.2-179.2-60.8-268.8 0-32 22.4-67.2 57.6-105.6 89.6 38.4 32 70.4 70.4 108.8 96 28.8 19.2 60.8 32 96 38.4 118.4 19.2 188.8-57.6 268.8-137.6-35.2-28.8-60.8-64-99.2-86.4zM508.8 704c-51.2 0-96-41.6-96-99.2s41.6-105.6 96-105.6 96 41.6 96 99.2c0 64-38.4 105.6-96 105.6z" fill="#AAAAAA" ></path><path d="M515.2 544c-3.2 41.6 12.8 60.8 51.2 51.2 0 32-19.2 57.6-51.2 57.6s-57.6-22.4-51.2-57.6c-6.4-32 16-51.2 51.2-51.2" fill="#AAAAAA" ></path><path d="M652.8 3.2c9.6-3.2 19.2-3.2 28.8 0 9.6 3.2 12.8 12.8 12.8 22.4v108.8c70.4 28.8 131.2 70.4 179.2 128 80 89.6 118.4 214.4 108.8 336-9.6 124.8-70.4 236.8-166.4 313.6-96 80-224 118.4-345.6 108.8-124.8-9.6-243.2-67.2-323.2-160S32 649.6 41.6 524.8c9.6-118.4 70.4-233.6 160-307.2 22.4-19.2 60.8-19.2 80 3.2 19.2 22.4 19.2 57.6-3.2 80-70.4 57.6-115.2 140.8-124.8 233.6s22.4 185.6 80 249.6c60.8 70.4 147.2 115.2 243.2 124.8 96 9.6 188.8-19.2 259.2-80s118.4-140.8 124.8-236.8c9.6-89.6-22.4-185.6-80-249.6-28.8-28.8-57.6-57.6-89.6-76.8v89.6c0 9.6-3.2 19.2-12.8 22.4-9.6 3.2-19.2 3.2-28.8 0l-227.2-160c-3.2-3.2-9.6-12.8-9.6-19.2 0-9.6 3.2-12.8 9.6-19.2L652.8 3.2z" fill="#72B02D" ></path></symbol><symbol id="icon-donghuafangzhen" viewBox="0 0 1024 1024"><path d="M868.864 228.864c-19.968 0-38.912 7.68-53.248 20.992l-291.328-170.496c-7.168-5.12-16.896-5.12-24.064 0L208.896 248.832c-14.336-12.8-33.28-20.48-53.76-20.48-43.52 0-79.872 36.864-79.872 80.896 0 33.792 21.504 63.488 53.248 74.24v318.976c0 9.216 4.608 17.408 12.288 22.016L437.248 896c11.776 30.72 41.472 51.712 74.752 52.224 33.28-0.512 62.464-20.992 74.752-52.224l296.448-171.52c7.68-4.608 12.288-13.312 12.288-22.016V386.048c31.744-11.776 53.248-42.496 53.248-76.288 0-44.032-36.352-80.896-79.872-80.896zM155.136 339.456c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 15.872-12.8 28.672-29.184 29.184zM512 897.024c-16.896 0-29.184-12.288-29.184-29.696 0-14.848 12.288-29.696 29.184-29.696h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 14.848-14.848 29.696-29.184 29.696z m74.752-58.368c-11.776-30.208-40.96-51.712-74.752-51.712-27.136 0-52.224 14.336-67.072 37.376l-3.072 1.024c-4.608 2.048-8.704 5.632-9.728 10.752l-252.416-146.944V384.512C212.48 373.76 234.496 343.04 235.52 308.736l3.072 0.512h2.048c3.584 0 7.168-1.536 10.24-3.584 7.168-5.632 8.192-16.384 2.048-23.552L512 130.56l278.528 162.816c-7.68 36.864 11.264 74.24 45.568 90.624 0.512 5.632 3.584 10.24 8.704 13.312v291.328l-258.048 150.016z m282.112-499.2c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696v2.56c-1.024 14.848-13.824 27.136-29.184 26.624z" fill="#AAAAAA" ></path><path d="M422.912 724.992c-3.072-8.704-12.288-12.8-20.992-9.728-8.704 3.072-12.8 12.8-9.728 21.504l19.968 54.784c2.56 6.656 8.192 10.752 15.36 10.752 2.048 0 3.584-0.512 5.12-1.024 8.704-3.072 12.8-12.8 9.728-21.504l-19.456-54.784zM706.048 507.392c0-107.52-86.016-195.072-192-196.096-2.048-1.536-4.608-2.56-7.68-3.072l-24.064-3.072c-8.192-1.024-15.872 4.096-17.92 11.776-5.632 1.536-11.776 3.584-16.896 5.632 0.512-1.536 1.024-3.072 1.536-5.12 1.024-9.216-5.12-17.408-14.336-18.432l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.608 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l44.032 5.12C384 353.28 351.232 388.608 333.312 432.64c-25.088 60.928-17.92 130.048 18.432 184.832-1.024 3.584-1.024 7.168 0.512 10.24l19.968 54.784c1.024 3.072 3.072 5.632 6.144 7.68 7.168 5.12 17.408 3.072 22.528-4.096 3.072-4.608 3.584-10.24 2.048-15.36l-0.512-1.536c53.76 37.888 123.392 45.568 184.32 19.968 46.08-19.456 82.944-55.808 102.912-101.376l12.8-14.336c6.144-6.656 5.632-17.408-0.512-23.04 2.56-14.336 4.096-28.672 4.096-43.008z m-193.536 156.16C427.52 663.552 358.4 593.92 358.4 507.392c0-86.016 69.12-156.16 154.112-156.16s154.112 69.632 154.112 156.16c0 86.016-69.12 156.16-154.112 156.16z" fill="#72B02D" ></path><path d="M765.44 478.72c-6.144-5.632-15.872-5.632-22.016 0l-32.256 35.84c-4.096 4.608-5.632 11.776-3.072 17.92 2.56 6.144 8.192 9.728 14.848 9.728 4.608 0 8.704-2.048 11.776-5.12l32.256-35.84c5.12-7.168 4.608-16.896-1.536-22.528zM823.296 401.92c-5.632-1.024-11.776 0.512-15.872 5.12l-32.256 35.84c-4.608 4.608-5.632 11.776-3.072 17.92 1.024 2.048 2.56 4.096 4.096 5.632 6.656 6.144 16.896 5.632 23.04-1.536l32.256-35.84c4.096-4.096 5.632-10.752 3.584-16.384-1.024-5.632-5.632-9.728-11.776-10.752zM336.384 321.024c8.704 0 15.872-6.656 16.384-15.36 0.512-8.704-5.632-16.384-14.336-17.408l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.096 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l48.128 5.632h2.048z" fill="#72B02D" ></path></symbol><symbol id="icon-guanjianjiexi" viewBox="0 0 1024 1024"><path d="M298.496 200.704v83.456h-39.936v177.664h137.728V389.12h47.104v245.76h-47.104v-79.872H211.456c-10.752-3.584-54.272-14.336-54.272-57.856V280.064h-32.768V200.704h174.08m47.104-47.104H77.824v177.152h36.352v169.984c0 68.608 61.44 97.792 97.792 104.96H353.28v79.872h141.312V342.016H349.184v72.192h-43.52v-87.04h39.936V153.6zM627.712 389.12v79.872H812.544c10.752 3.584 54.272 14.336 54.272 54.272V740.352h32.768v83.456h-173.568v-83.456h39.936v-177.664h-137.728V634.88h-47.104V389.12h46.592m47.104-47.104h-141.312v340.48h141.312v-72.192h43.52v83.456h-39.936V870.4h267.776v-177.152h-36.352v-169.984c0-68.608-61.44-97.792-97.792-104.96H670.72V342.528h4.096z" fill="#AAAAAA" ></path></symbol><symbol id="icon-gongyishengcheng" viewBox="0 0 1024 1024"><path d="M889.344 391.68h29.696v-43.008h-208.896l1.024 45.056 28.16 3.072v20.992c55.808 5.632 108.032 28.672 150.016 66.56-0.512 0 0-92.672 0-92.672z m-366.592 102.912c13.312-13.312 27.648-24.576 43.008-34.816-2.048-70.144-5.632-153.088-8.704-179.712-5.632-48.64-34.816-204.288-226.816-202.752-191.488 1.536-223.744 164.864-230.912 207.36s-11.776 197.632-11.776 197.632h-24.576v43.008l208.896 1.024v-40.96h-24.064V316.928S245.76 230.912 335.36 231.424C424.448 232.448 415.232 327.68 414.72 327.68v313.856c4.608 0 6.144 77.824 50.176 144.896-13.312-32.256-20.48-67.072-20.48-102.912 0-71.168 27.648-138.24 78.336-188.928z" fill="#AAAAAA" ></path><path d="M75.264 601.6h31.232v281.088s41.984 29.184 141.824 0v-274.944l29.184-2.56v-44.032H75.264v40.448zM906.24 263.168h-29.184l1.024-188.416s-53.76-27.648-144.384 0l1.024 192-31.744 1.024V307.2h203.776l-0.512-44.032z" fill="#AAAAAA" ></path><path d="M934.912 627.712c-9.216-4.608-20.48-2.048-29.184 6.656l-21.504 21.504c-9.216 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l21.504-21.504c8.704-8.704 11.264-19.968 6.656-29.184-5.632-10.752-18.432-15.36-34.304-13.312-25.6 4.096-48.64 15.36-66.56 33.792-27.136 27.136-39.424 65.536-33.792 103.936l-178.176 178.176c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l178.176-178.176c37.888 6.144 76.288-6.656 103.936-33.792 17.92-17.92 29.696-41.472 33.792-66.56 2.048-15.872-2.56-28.672-13.312-34.304z m-9.728 30.72c-3.072 20.48-12.8 38.912-27.136 53.76-23.04 23.04-56.32 33.28-89.088 26.624l-6.144-1.536-186.88 186.88c-8.704 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l186.88-186.88-1.536-6.144c-6.656-32.256 3.072-65.536 26.624-89.088 14.848-14.848 33.28-24.064 53.76-27.136 1.536-0.512 3.072-0.512 4.608-0.512 2.56 0 4.608 0.512 5.12 1.024-0.512 0.512-1.024 1.536-2.048 2.56l-21.504 21.504c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l21.504-21.504c1.024-1.024 2.048-1.536 2.56-2.048 0.512 1.536 1.024 4.608 0.512 9.728z" fill="#72B02D" ></path><path d="M560.64 870.912c-12.8 12.8-12.8 33.28 0 45.568 6.144 6.144 14.336 9.216 23.04 9.216s16.896-3.072 23.04-9.216c6.144-6.144 9.728-14.336 9.728-23.04 0-8.704-3.584-16.896-9.728-23.04-12.8-12.288-33.792-12.288-46.08 0.512z m28.672 28.672c-3.072 3.072-8.704 3.072-11.776 0-3.072-3.072-3.072-8.704 0-11.776 1.536-1.536 3.584-2.56 6.144-2.56 2.048 0 4.096 1.024 6.144 2.56 1.536 1.536 2.56 3.584 2.56 6.144-0.512 2.048-1.536 4.096-3.072 5.632z m225.28-107.008c-4.096-4.096-10.24-4.096-14.336 0l-43.52 43.52c-4.096 4.096-4.096 10.24 0 14.336l102.4 102.4c15.872 15.872 41.984 15.872 57.856 0 15.872-15.872 15.872-41.984 0-57.856l-102.4-102.4z m-237.056-150.528l70.656 70.656 28.672-28.672-70.656-70.656-15.872-30.208-50.688-36.352-28.672 28.672 36.352 50.688 30.208 15.872z" fill="#72B02D" ></path></symbol><symbol id="icon-mojupipei" viewBox="0 0 1024 1024"><path d="M880.64 117.248c32.768 0 58.88 23.04 64.512 54.784l1.024 7.68v663.04c0.512 31.744-22.528 58.368-53.76 62.464l-7.68 1.024H151.552c-34.816 0-66.048-22.528-72.192-53.248l-1.024-6.656V183.296c0-31.744 27.648-59.904 61.952-65.024l7.168-1.024h142.848c24.064 0 44.032 16.896 48.64 39.936l1.024 6.656V406.528c0 7.68 5.12 14.848 12.288 16.896l3.584 0.512H424.96c13.312 0 25.088 9.216 29.184 22.528 6.144 23.552 33.792 46.08 58.368 46.08 22.528 0 48.128-19.456 55.808-39.424l2.048-5.632c2.048-10.24 9.216-18.432 19.456-21.504l5.12-1.024 3.072-0.512h71.168c6.144 0 11.776-3.584 14.336-9.728l1.024-3.584V164.864c0-23.04 15.872-41.984 37.888-46.592l6.144-1.024H880.64zM273.92 184.32H151.552l-2.048 0.512-2.048 0.512-2.56 1.536-1.536 649.728 3.072 1.536 3.072 1.024h1.024l328.192 3.072 2.048-286.72-2.048-0.512-10.24-3.584c-24.576-10.24-45.568-27.136-60.928-49.152l-6.144-9.216 1.024-1.536H349.184c-37.888-4.096-68.608-33.792-74.24-71.68l-1.024-8.192v-4.096V184.32z m476.16-3.072V409.6l-0.512 8.704c-3.584 36.864-32.256 66.56-68.608 72.192l-8.192 1.024h-4.096l-45.568-1.536-6.144 9.728c-14.848 22.528-36.352 40.448-61.44 51.2l-10.752 4.096-3.072 284.16h337.408v-655.36l-129.024-2.56z" fill="#AAAAAA" ></path></symbol><symbol id="icon-buchangshezhi" viewBox="0 0 1024 1024"><path d="M792.576 75.264h-686.08c-17.408 0-31.232 13.824-31.232 31.232v686.08c0 17.408 13.824 31.232 31.232 31.232h436.736c17.408 0 31.232-13.824 31.232-31.232s-13.824-31.232-31.232-31.232H137.728V262.656h624.128v280.576c0 17.408 13.824 31.232 31.232 31.232s31.232-13.824 31.232-31.232V106.496c-0.512-17.408-14.336-31.232-31.744-31.232z" fill="#AAAAAA" ></path><path d="M792.576 948.736c-17.408 0-31.232-13.824-31.232-31.232v-93.696h-93.696c-17.408 0-31.232-13.824-31.232-31.232 0-17.408 13.824-31.232 31.232-31.232h93.696v-93.696c0-17.408 13.824-31.232 31.232-31.232 17.408 0 31.232 13.824 31.232 31.232v93.696h93.696c17.408 0 31.232 13.824 31.232 31.232 0 17.408-13.824 31.232-31.232 31.232h-93.696v93.696c0 17.408-13.824 31.232-31.232 31.232z" fill="#72B02D" ></path><path d="M372.224 518.144l-110.08 110.08c-20.992 20.992-20.992 55.296 0 76.288s55.296 20.992 76.288 0l110.08-110.08c-16.896-6.144-32.768-15.872-46.592-29.696-13.824-13.312-23.552-29.696-29.696-46.592z m-57.856 162.304c-7.68 7.68-20.48 7.68-28.672 0-7.68-7.68-7.68-20.48 0-28.672 7.68-7.68 20.48-7.68 28.672 0 7.68 8.192 7.68 20.992 0 28.672z m340.48-292.864L592.384 450.56c-20.992 20.992-55.296 20.992-76.288 0s-20.992-55.296 0-76.288l62.976-62.976c-51.712-8.704-116.224 14.848-151.552 50.176-49.152 49.152-49.152 128.512 0 177.664s129.024 49.152 177.664 0c35.328-35.328 58.368-99.84 49.664-151.552z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shuchujiagongchengxu" viewBox="0 0 1024 1024"><path d="M876.544 473.6v374.272c0 16.384-13.312 29.696-29.696 29.696h-522.24c-16.384 0-29.696-13.312-29.696-29.696V503.296c0-16.384 13.312-29.696 29.696-29.696h551.936m40.96-70.656H253.952c-16.384 0-29.696 13.312-29.696 29.696v486.4c0 16.384 13.312 29.696 29.696 29.696h663.552c16.384 0 29.696-13.312 29.696-29.696v-486.4c0-16.384-13.312-29.696-29.696-29.696z" fill="#AAAAAA" ></path><path d="M489.984 211.968H814.08l-41.984-41.984c-13.824-13.824-13.824-36.352 0-50.176 13.824-13.824 36.352-13.824 50.176 0L947.712 245.76l-0.512 0.512 0.512 0.512-125.952 125.952c-13.824 13.824-36.352 13.824-50.176 0-13.824-13.824-13.824-36.352 0-50.176l38.912-38.912H489.472c-19.456 0-35.328-15.872-35.328-35.328 0.512-20.48 16.384-36.352 35.84-36.352z" fill="#72B02D" ></path><path d="M531.456 717.824c0-11.776-7.68-22.016-18.944-25.6l-55.808-16.896-14.848-4.608 14.848-4.608 55.808-16.896c11.264-3.584 18.944-13.824 18.944-25.6v-2.048c0-18.432-17.92-31.232-35.328-25.088L363.52 641.024c-10.752 3.584-17.92 13.824-17.92 25.088v8.192c0 11.264 7.168 21.504 17.92 25.088l132.608 45.568c17.408 6.144 35.328-7.168 35.328-25.088v-2.048z m123.392-96.768v2.048c0 11.776 7.68 22.016 18.944 25.6l56.32 16.896 14.848 4.608-14.848 4.608-56.32 16.896c-11.264 3.584-18.944 13.824-18.944 25.6v2.56c0 18.432 17.92 31.232 35.328 25.088l132.608-45.568c10.752-3.584 17.92-13.824 17.92-25.088v-8.192c0-11.264-7.168-21.504-17.92-25.088l-132.608-45.568c-17.408-6.144-35.328 7.168-35.328 25.6z m-54.784-64l-70.144 248.32c-4.608 16.896 8.192 33.792 25.6 33.792 11.776 0 22.528-8.192 25.6-19.456l70.144-248.32c4.608-16.896-8.192-33.792-25.6-33.792-11.776 0-22.016 8.192-25.6 19.456zM147.456 814.08V173.056c0-14.848 11.776-26.624 26.624-26.624h463.872c19.456 0 35.328-15.872 35.328-35.328 0-19.456-15.872-35.328-35.328-35.328H107.008c-16.896 0-30.72 13.824-30.72 30.72v748.032c0 16.896 13.824 30.72 30.72 30.72h40.448c19.456 0 35.328-15.872 35.328-35.328 0.512-19.968-15.36-35.84-35.328-35.84z" fill="#AAAAAA" ></path></symbol><symbol id="icon-guanjiekongzhi" viewBox="0 0 1024 1024"><path d="M648.192 377.344h-71.68c-18.432 0-33.792-14.848-33.792-33.792H366.592c12.288-30.72 25.088-80.896 0-134.656H542.72c0-18.432 15.36-33.792 33.792-33.792h67.584c1.536 0 2.56 0 4.096 0.512L719.36 87.04c10.752-13.312 29.184-16.384 44.032-7.68l168.96 100.864c15.872 9.728 20.992 30.208 11.776 46.08-9.728 15.872-30.208 20.992-46.592 11.264l-143.872-85.504L677.888 245.76v61.44l75.776 93.696 143.872-85.504c15.872-9.728 36.864-4.608 46.592 11.776 9.728 15.872 4.608 36.352-11.264 46.08h-0.512l-168.96 100.864c-14.336 8.704-33.28 5.12-44.032-7.68l-71.168-89.088zM319.488 780.8L102.912 415.744c76.8 69.632 185.344 48.64 231.424-13.312l222.72 378.368H711.68c18.432 0 33.792 14.848 33.792 33.792v100.864c0 18.432-15.36 33.792-33.792 33.792H170.496c-18.432 0-33.792-14.848-33.792-33.792v-100.864c0-18.432 15.36-33.792 33.792-33.792h148.992z" fill="#AAAAAA" ></path><path d="M204.288 148.48C133.12 148.48 75.264 205.824 75.264 276.48S133.12 404.48 204.288 404.48c71.168 0 129.024-57.344 129.024-128S275.456 148.48 204.288 148.48z m0 202.752c-41.472 0-74.752-33.28-74.752-74.752 0-40.96 33.792-74.24 74.752-74.24C245.76 202.24 279.04 235.52 279.04 276.48c0 41.472-33.792 75.264-74.752 74.752z" fill="#72B02D" ></path></symbol><symbol id="icon-jiegoushu" viewBox="0 0 1024 1024"><path d="M233.984 472.064h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44v238.08h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V233.984h-39.936c-22.016 0-39.936-17.92-39.936-39.936V115.2c0-22.016 17.92-39.936 39.936-39.936h158.72c22.016 0 39.936 17.92 39.936 39.936V194.56c0 22.016-17.92 39.936-39.936 39.936h-39.936v237.568z" fill="#AAAAAA" ></path><path d="M551.936 75.264h317.44c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V154.624c-0.512-44.032 35.328-79.36 79.36-79.36z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaitui" viewBox="0 0 1024 1024"><path d="M512 148.992c199.68 0 361.984 162.304 361.984 361.984S711.68 872.448 512 872.448s-361.984-162.304-361.984-361.984S312.32 148.992 512 148.992m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M670.72 456.192v109.056l-75.264-54.784L670.72 456.192m25.6-102.912c-10.24 0-20.992 3.072-30.208 10.24l-144.896 105.472c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-52.224-52.224z" fill="#72B02D" ></path><path d="M499.712 456.192v109.056L424.96 510.976l74.752-54.784m26.112-102.912c-10.24 0-20.992 3.072-30.208 10.24L350.208 468.992c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-51.712-52.224z" fill="#72B02D" ></path><path d="M314.368 381.44c-21.504 0-38.912 17.408-38.912 38.912v181.248c0 21.504 17.408 38.912 38.912 38.912s38.912-17.408 38.912-38.912V420.352c0-21.504-17.408-38.912-38.912-38.912z" fill="#72B02D" ></path></symbol><symbol id="icon-bofang" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M491.008 445.952l115.712 66.048-115.712 66.048V445.952m-23.552-87.04c-24.576 0-46.592 19.456-46.592 46.592v212.48c0 27.136 22.528 46.592 46.592 46.592 7.68 0 15.36-2.048 23.04-6.144l185.856-106.496c31.232-17.92 31.232-62.976 0-80.896L490.496 365.056c-7.168-4.096-15.36-6.144-23.04-6.144z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaijin" viewBox="0 0 1024 1024"><path d="M515.584 151.04c199.168 0 360.96 161.792 360.96 360.96s-161.792 360.96-360.96 360.96-360.96-161.792-360.96-360.96 161.792-360.96 360.96-360.96m0-74.752c-240.64 0-435.712 195.072-435.712 435.712s195.072 435.712 435.712 435.712 435.712-195.072 435.712-435.712-195.072-435.712-435.712-435.712z" fill="#AAAAAA" ></path><path d="M358.912 458.24L433.152 512l-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432L363.52 366.592c-9.216-6.656-19.456-9.728-29.696-9.728z" fill="#72B02D" ></path><path d="M527.36 458.24l74.24 53.76-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432l-142.848-103.936c-9.216-7.168-19.968-10.24-29.696-10.24z" fill="#72B02D" ></path><path d="M710.144 384.512c-20.992 0-38.4 17.408-38.4 38.4v178.688c0 20.992 17.408 38.4 38.4 38.4s38.4-17.408 38.4-38.4V422.912c0-21.504-17.408-38.4-38.4-38.4z" fill="#72B02D" ></path></symbol><symbol id="icon-zanting" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M416.768 353.28c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c-0.512-21.504-17.92-39.424-39.936-39.424z m190.464 0c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c0-21.504-17.92-39.424-39.936-39.424z" fill="#72B02D" ></path></symbol><symbol id="icon-zhongzhi" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M580.096 421.376c12.288 0 22.528 10.24 22.528 22.528v136.192c0 12.288-10.24 22.528-22.528 22.528H443.904c-12.288 0-22.528-10.24-22.528-22.528V443.904c0-12.288 10.24-22.528 22.528-22.528h136.192m0-68.096H443.904C393.728 353.28 353.28 393.728 353.28 443.904v136.192c0 50.176 40.448 90.624 90.624 90.624h136.192c50.176 0 90.624-40.448 90.624-90.624V443.904c0-50.176-40.448-90.624-90.624-90.624z" fill="#72B02D" ></path></symbol><symbol id="icon-suoxiao" viewBox="0 0 1024 1024"><path d="M491.008 463.36c32.256 0 58.88-26.112 58.88-58.88s-26.112-58.88-58.88-58.88H285.696c-32.256 0-58.88 26.112-58.88 58.88s26.112 58.88 58.88 58.88h205.312z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848 13.312 0 26.112-5.12 36.352-14.848 19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangda" viewBox="0 0 1024 1024"><path d="M488.96 333.824h-47.104V286.72c0-34.816-28.16-62.976-62.976-62.976-34.816 0-62.976 28.16-62.976 62.976v47.104h-47.104c-34.816 0-62.976 28.16-62.976 62.976s28.16 62.976 62.976 62.976h47.104V506.88c0 34.816 28.16 62.976 62.976 62.976 34.816 0 62.976-28.16 62.976-62.976v-47.104h47.104c34.816 0 62.976-28.16 62.976-62.976 0-34.304-28.16-62.976-62.976-62.976z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangdazhichuangkou" viewBox="0 0 1024 1024"><path d="M949.248 858.624l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 142.848-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.616-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-96.768 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M216.576 919.04h109.056v-102.912H216.576c-29.696 0-53.76-24.064-53.76-53.76V233.984c0-29.696 24.064-53.76 53.76-53.76H798.72c29.696 0 53.76 24.064 53.76 53.76v81.92h102.912v-81.92c0-86.528-70.144-156.672-156.672-156.672H216.576c-86.528 0-156.672 70.144-156.672 156.672v528.384c0 86.528 70.144 156.672 156.672 156.672z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shiyingpingmu" viewBox="0 0 1024 1024"><path d="M876.032 75.264H147.968c-39.936 0-72.704 32.768-72.704 72.704v728.064c0 39.936 32.768 72.704 72.704 72.704h728.064c39.936 0 72.704-32.768 72.704-72.704V147.968c0-39.936-32.768-72.704-72.704-72.704z m0 764.416c0 22.016-14.336 36.352-36.352 36.352H184.32c-22.016 0-36.352-14.336-36.352-36.352V184.32c0-22.016 14.336-36.352 36.352-36.352h655.36c22.016 0 36.352 14.336 36.352 36.352v655.36z" fill="#AAAAAA" ></path><path d="M329.728 184.32H220.672c-3.584 0-10.752 0-14.336 3.584-7.168 3.584-14.336 10.752-18.432 18.432-3.584 3.584-3.584 10.752-3.584 14.336v109.056c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352v-22.016l47.104 47.104c7.168 7.168 14.336 10.752 25.6 10.752 10.752 0 18.432-3.584 25.6-10.752 14.336-14.336 14.336-36.352 0-51.2l-47.104-47.104h22.016c22.016 0 36.352-14.336 36.352-36.352 0-21.504-14.848-35.84-36.864-35.84zM329.728 766.976h-22.016l47.104-47.104c14.336-14.336 14.336-36.352 0-51.2-14.336-14.336-36.352-14.336-51.2 0l-47.104 47.104v-22.016c0-22.016-14.336-36.352-36.352-36.352s-36.352 14.336-36.352 36.352v109.056c0 3.584 0 10.752 3.584 14.336 3.584 7.168 10.752 14.336 18.432 18.432 3.584 3.584 10.752 3.584 14.336 3.584h109.056c22.016 0 36.352-14.336 36.352-36.352s-13.824-35.84-35.84-35.84zM817.664 187.904c-3.584-3.584-10.752-3.584-14.336-3.584h-109.056c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h22.016l-47.104 47.104c-14.336 14.336-14.336 36.352 0 51.2 7.168 7.168 14.336 10.752 25.6 10.752s18.432-3.584 25.6-10.752l47.104-47.104v22.016c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352V220.672c0-3.584 0-10.752-3.584-14.336-4.096-7.68-11.264-14.848-18.944-18.432zM803.328 657.408c-22.016 0-36.352 14.336-36.352 36.352v22.016l-47.104-47.104c-14.336-14.336-36.352-14.336-51.2 0-14.336 14.336-14.336 36.352 0 51.2l47.104 47.104h-22.016c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h109.056c3.584 0 10.752 0 14.336-3.584 7.168-3.584 14.336-10.752 18.432-18.432 3.584-3.584 3.584-10.752 3.584-14.336v-109.056c0.512-22.016-13.824-36.864-35.84-36.864z" fill="#72B02D" ></path></symbol><symbol id="icon-yangshitu-01" viewBox="0 0 1024 1024"><path d="M645.632 882.688H150.528l252.928-204.8 477.696 0.512z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512z m-542.72 23.552H880.64l-234.496 203.264-228.864 0.512V140.8z m0 247.296l217.088-0.512-1.024 247.296H417.28V388.096z m-43.008-223.744v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m532.48 493.568H150.528l252.928-204.288 477.696 0.512-235.52 203.776z m271.36-247.808h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-zuoshitu-01" viewBox="0 0 1024 1024"><path d="M374.272 644.096l-262.656 211.968L112.64 373.76l261.632-209.408z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM112.64 373.76l261.632-209.408v479.744l-263.168 211.968L112.64 373.76z m520.192 507.904l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-qianshitu-01" viewBox="0 0 1024 1024"><path d="M112.64 389.12h520.704v493.056H112.64z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m259.584 717.824H112.64V389.12h520.704v493.056z m12.288-537.6l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-youshitu-01" viewBox="0 0 1024 1024"><path d="M916.992 659.456l-239.616 196.096V375.808l239.616-208.896z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m270.848 314.88l-239.104 196.096V375.808l239.104-208.896v492.544z" fill="#AAAAAA" ></path></symbol><symbol id="icon-houshitu-01" viewBox="0 0 1024 1024"><path d="M960 118.784V117.76v-1.024-1.024-1.024-0.512-0.512c1.536 7.68-1.024 15.872-6.656 20.992L677.376 373.76v299.52h-43.008V389.12H374.272v254.976l-262.656 211.968L112.64 389.12l261.632-0.512v-42.496h269.824l280.064-243.2c3.072-2.56 6.656-4.096 10.752-5.12H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c-0.512 0.512-0.512 1.024-1.024 2.048 0 0.512 0 0.512-0.512 1.024 0 0.512 0 0.512-0.512 1.024 0 0.512 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V907.264c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024c0 0.512 0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024s0 0.512 0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-242.176 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V658.944v-2.048V118.272c1.536 1.024 1.536 1.024 1.536 0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m258.56 717.312l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m44.544-26.112v-177.664H880.64l-203.264 177.664z m281.6-741.376v-0.512-0.512 1.024z" fill="#AAAAAA" ></path><path d="M916.992 634.88h-239.616V375.808l239.616-211.456zM644.096 346.112H417.28V141.824h462.336zM417.28 389.12H634.88v245.76H417.28z" fill="#72B02D" ></path><path d="M958.976 114.176c0 0.512 0.512 0.512 0 0z m-20.48-16.384H945.152l0.512 0.512 0.512 0.512h1.024l0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512c0 0.512 0.512 0.512 0.512 1.024s0 0.512 0.512 0.512c0 0.512 0.512 1.024 0.512 1.536 0 0.512 0.512 1.024 0.512 1.024-3.072-10.24-13.312-16.896-24.064-14.848h4.608v1.024z" fill="#C1272D" ></path></symbol><symbol id="icon-dingshitu-01" viewBox="0 0 1024 1024"><path d="M880.64 140.8l-234.496 203.776-497.664 1.536 256-206.336z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-497.664 1.536 256-205.824 476.16 1.024-234.496 203.264z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-toushitu-01" viewBox="0 0 1024 1024"><path d="M965.632 114.176V112.64v-1.024-0.512-1.024-0.512s0-0.512-0.512-1.024v-0.512c-0.512-1.024-0.512-2.048-1.024-3.072v-0.512c0-0.512-0.512-0.512-0.512-1.024s0-0.512-0.512-0.512l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512s-0.512-1.024-1.024-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024s-0.512 0-0.512-0.512c0 0-0.512 0-0.512-0.512H950.784h-0.512H392.704c-5.12 0-9.728 1.536-13.312 4.608l-312.32 251.392-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536 0 0 0 0.512-0.512 0.512 0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024c0 0.512 0 0.512-0.512 1.024s0 0.512 0 1.024 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V912.896c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024l0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512 0 0.512 0.512 0.512 1.024 1.024l0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512h583.168c7.68 0 14.848-4.096 18.432-10.752L957.44 675.84l1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V661.504v-1.536V658.432l1.024-544.256zM372.736 343.04l-229.888 0.512L372.736 158.72v184.32z m43.008 43.008l220.672-0.512-0.512 251.392h-220.16v-250.88z m-43.008 0v260.096l-267.264 215.552 1.536-474.624 265.728-1.024z m-227.84 502.272l257.024-208.384h233.984l-0.512 206.848-490.496 1.536z m503.296-545.792l-172.544 0.512H415.232V135.68h471.04l-238.08 206.848z m31.232 337.408h207.36l-207.36 181.248v-181.248z m0-43.008V373.76l243.2-212.48v475.648h-243.2z" fill="#AAAAAA" ></path></symbol><symbol id="icon-a-jixiebi3" viewBox="0 0 1024 1024"><path d="M483.386004 821.695719H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M483.386004 776.399147H164.779715l29.075502 22.648286h260.455285l29.075502-22.648286z" fill="#7A807D" ></path><path d="M483.386004 776.399147H164.779715l29.075502-22.648285h260.455285l29.075502 22.648285z" fill="#3F3F3F" ></path><path d="M483.386004 730.796518H164.779715l29.075502 22.954344h260.455285l29.075502-22.954344zM483.386004 685.499947H164.779715l29.075502 22.648285h260.455285l29.075502-22.648285z" fill="#7A807D" ></path><path d="M483.386004 730.796518H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M150.701051 623.064132h339.418227v62.435815H150.701051z" fill="#F7A53F" ></path><path d="M150.701051 821.695719h339.418227v31.217907H150.701051z" fill="#FFFFFF" ></path><path d="M607.951575 339.654504a74.984189 74.984189 0 0 1-23.872517 103.447575 75.290247 75.290247 0 0 1-103.753633-23.872518L293.324039 120.823095A75.290247 75.290247 0 0 1 317.196557 17.069462a75.290247 75.290247 0 0 1 103.753633 23.872517zM441.762128 517.474152v105.58998H198.752144v-105.58998a122.423166 122.423166 0 1 1 244.846331 0z" fill="#FFC200" ></path><path d="M627.233224 377.605685a103.141517 103.141517 0 0 1-52.948019 82.635637l-165.88339 118.750471-2.448463 1.836347a112.93537 112.93537 0 1 1-112.017197-194.346775l195.571007-84.471985a132.523077 132.523077 0 0 1 48.357151-12.854432A89.062853 89.062853 0 0 1 627.233224 377.605685z" fill="#FFE610" ></path><path d="M401.056425 493.601635a71.005436 71.005436 0 1 1-71.005436-71.311494 71.005436 71.005436 0 0 1 71.005436 71.311494z" fill="#FFFFFF" ></path><path d="M375.34756 493.601635a45.296571 45.296571 0 1 1-45.296571-45.60263 45.296571 45.296571 0 0 1 45.296571 45.60263z" fill="#48B8BF" ></path><path d="M592.342622 376.381453a49.88744 49.88744 0 1 1-49.581382-49.88744 49.88744 49.88744 0 0 1 49.581382 49.88744z" fill="#FFFFFF" ></path><path d="M574.285205 376.381453a30.605791 30.605791 0 1 1-30.605792-30.605791 30.605791 30.605791 0 0 1 30.605792 30.605791z" fill="#48B8BF" ></path><path d="M731.048068 230.789704l165.975207-62.099151 18.883774 50.46895-165.975207 62.068545z" fill="#FFE610" ></path><path d="M734.047436 202.785404l145.836596-54.294674 9.426584 25.31099-145.867202 54.294674z" fill="#F7A53F" ></path><path d="M808.419509 259.161272l23.872517 63.353988 31.523966 35.808776-19.893765 18.057417-48.051092-38.257239-27.851271-63.660046 40.399645-15.302896zM854.940312 242.022029l23.56646 63.04793-0.306058 47.745035 26.627038 0.612116 11.324143-60.293409-20.811938-66.414568-40.399645 15.302896zM716.173654 94.379691l102.345766-38.257239 37.216643 99.468822-102.345767 38.257239z" fill="#7A807D" ></path><path d="M841.473764 83.790087a66.108509 66.108509 0 0 1-65.802452 66.10851l-407.669142 15.608953a67.944857 67.944857 0 0 1-11.324142 0 82.635637 82.635637 0 0 1 0-165.271273 67.944857 67.944857 0 0 1 11.324142 0l407.669142 17.445301A66.108509 66.108509 0 0 1 841.473764 83.790087z" fill="#FFE610" ></path><path d="M402.892773 83.790087a46.520803 46.520803 0 1 1-46.520803-46.214745A46.520803 46.520803 0 0 1 402.892773 83.790087z" fill="#FFFFFF" ></path><path d="M386.059587 83.790087a30.605791 30.605791 0 1 1-30.605791-30.605791 30.605791 30.605791 0 0 1 30.605791 30.605791z" fill="#48B8BF" ></path><path d="M810.867972 83.790087a38.257239 38.257239 0 1 1-39.787528-38.257239A38.257239 38.257239 0 0 1 810.867972 83.790087z" fill="#FFFFFF" ></path><path d="M795.565077 83.790087a24.484633 24.484633 0 1 1-24.484633-24.484633 24.484633 24.484633 0 0 1 24.484633 24.484633z" fill="#48B8BF" ></path><path d="M106.93477 852.913626h639.66104v171.086374H106.93477z" fill="#FFE610" ></path><path d="M383.305066 709.678522h337.275822v207.201208H383.305066z" fill="#4D4D4D" ></path><path d="M407.177584 732.02075h291.061076v161.904636H407.177584z" fill="#FFFFFF" ></path><path d="M429.825869 755.893267h159.150116v16.22107h-159.150116zM429.825869 784.356653h131.604903v16.22107h-131.604903zM429.825869 812.820039h199.855818v16.22107h-199.855818zM429.825869 841.283425h146.601741v16.22107h-146.601741z" fill="#92D5D2" ></path><path d="M507.564579 732.326808l-31.830023 161.904636H407.177584v-161.904636h100.386995z" fill="#F5F5F5" opacity=".5" ></path><path d="M474.816383 916.87973h155.783478v31.830023h-155.783478z" fill="#7A807D" ></path><path d="M106.93477 977.173139h639.66104v46.826861H106.93477z" fill="#F7A53F" ></path><path d="M252.006221 899.740487h66.414567v48.969266H252.006221z" fill="#7A807D" ></path><path d="M319.64502 817.716966l-3.672695 11.324143-21.730112 70.699378h-21.730112l23.872518-76.820537 3.366637-11.324143 19.893764 6.121159z" fill="#999999" ></path><path d="M341.069074 809.147344A28.463386 28.463386 0 1 1 321.17531 773.950684a28.463386 28.463386 0 0 1 19.893764 35.19666z" fill="#48B8BF" ></path><path d="M322.705599 793.538391a13.16049 13.16049 0 1 1-26.014923 0 13.16049 13.16049 0 0 1 26.014923 0z" fill="#FFFFFF" ></path><path d="M165.085773 899.740487h66.414568v49.275324H165.085773z" fill="#7A807D" ></path><path d="M163.861542 817.716966l3.366637 11.324143 22.03617 70.699378h21.730111l-23.872517-76.820537-3.672695-11.324143-19.587706 6.121159z" fill="#999999" ></path><path d="M142.437488 809.147344a28.157328 28.157328 0 1 0 18.669532-35.19666 28.157328 28.157328 0 0 0-18.669532 35.19666z" fill="#F7A53F" ></path><path d="M160.800963 793.538391a13.16049 13.16049 0 1 0 12.854432-12.854433 12.854432 12.854432 0 0 0-12.854432 12.854433z" fill="#FFFFFF" ></path></symbol><symbol id="icon-jixiebi2" viewBox="0 0 1164 1024"><path d="M848.55632 485.108049h233.370249v430.146938h-233.370249z" fill="#FFE610" ></path><path d="M974.217224 605.245396h154.314351v64.211341h-154.314351zM974.217224 689.82485h154.314351v64.211341h-154.314351zM974.217224 774.749527h154.314351v64.211341h-154.314351z" fill="#54D9D9" ></path><path d="M306.557369 245.869021l99.078789 31.760448 69.389675 22.094225 145.683794 46.259783 69.734897 22.094225 119.101681 37.974449 66.627896 21.058558 1.035667-2.761778 21.749003-69.044453 23.129891-72.151453-22.784669-7.249667-79.746343-25.201225-20.368113-6.559223-337.972595-107.364124-21.40378-6.904445-87.686455-27.617781-45.224116 142.576794-0.345222 1.035667z" fill="#FFE610" ></path><path d="M412.33347 357.755556l10.70189-33.555604 441.470229 140.401894-10.667368 33.555604z" fill="#A3A3A3" ></path><path d="M380.331366 357.686512l25.408359-79.953476 69.424197 22.094225-25.408359 79.918953zM595.508402 425.626253l25.408359-79.953476 69.389674 22.059703-25.373836 79.953476z" fill="#3F3F3F" ></path><path d="M809.200982 411.575707a144.302906 144.302906 0 0 0 4.833112 37.284004 138.088905 138.088905 0 0 0 18.987224 43.152783 144.302906 144.302906 0 0 0 15.535002 19.677669 146.719461 146.719461 0 0 0 256.154919-100.114456 144.648128 144.648128 0 0 0-34.522226-94.5909 180.206021 180.206021 0 0 0-15.880224-16.570668 146.719461 146.719461 0 0 0-96.317012-34.522227 148.445573 148.445573 0 0 0-58.687784 10.356668 146.719461 146.719461 0 0 0-89.757788 129.803571 34.522226 34.522226 0 0 0-0.345223 5.523556z" fill="#FFC200" ></path><path d="M876.174101 411.575707A80.091565 80.091565 0 1 0 956.265666 331.484142a80.091565 80.091565 0 0 0-80.091565 80.091565z" fill="#FFFFFF" ></path><path d="M904.827549 411.575707a51.438117 51.438117 0 1 0 51.438117-51.092895 51.438117 51.438117 0 0 0-51.438117 51.092895z" fill="#54D9D9" ></path><path d="M218.076903 216.594173l37.007826-117.202958 88.894733 28.06657L306.902591 244.660743zM86.512699 119.345062l92.450522-16.467102 19.401491 108.745013-92.450522 16.467102z" fill="#8A8A8A" ></path><path d="M0 65.317778l45.224116 254.083585 21.058558-3.797445 31.415226-5.523556 22.094225-4.142667-13.808891-77.675009-19.332446-109.090235-12.082779-67.318341-14.499335 2.761778-21.403781 3.797445-38.664893 6.904445z" fill="#292929" ></path><path d="M95.626567 436.43171l16.570668-3.107-14.499335-123.244348-31.415226 5.523556 29.343893 120.827792z" fill="#7A807D" ></path><path d="M138.088905 153.349455a80.782009 80.782009 0 0 0 31.070003 63.520896 79.40112 79.40112 0 0 0 49.021562 16.915891 75.258453 75.258453 0 0 0 32.10567-6.904445 80.091565 80.091565 0 0 0 48.331117-73.532342 78.710676 78.710676 0 0 0-13.808891-44.18845 76.984564 76.984564 0 0 0-31.760448-27.617781l-7.59489-3.452222a83.543787 83.543787 0 0 0-12.428001-3.452223H217.835247A80.091565 80.091565 0 0 0 138.088905 153.349455z" fill="#FFC200" ></path><path d="M167.087575 153.694677A51.092895 51.092895 0 1 0 217.835247 103.637449a50.747673 50.747673 0 0 0-50.747672 50.057228z" fill="#FFFFFF" ></path><path d="M185.384355 153.694677a32.450893 32.450893 0 1 0 32.450892-34.522226 32.450893 32.450893 0 0 0-32.450892 34.522226z" fill="#54D9D9" ></path><path d="M38.664893 58.413333l21.403781-3.797445C66.627897 19.74844 108.745013 11.117883 141.88635 14.915328a89.757788 89.757788 0 0 1 81.472454 58.687784h9.321001a83.543787 83.543787 0 0 1 12.428001 3.452223l7.59489 3.452223c53.854673-42.807561 165.016241-17.951558 187.110466 48.331116l21.40378 6.904446C439.813162 59.449 307.593036 24.581551 241.655583 69.115223a113.923346 113.923346 0 0 0-108.745012-69.044452C90.793455 0.070771 41.081449 10.772661 38.664893 58.413333zM799.189537 244.14291l20.368113 6.559223a345.222262 345.222262 0 0 0 89.412566-34.522226c48.331117-22.784669 133.601015-34.522226 144.99335 34.522226a114.613791 114.613791 0 0 1 0 48.676339 180.206021 180.206021 0 0 1 15.880224 16.570668c15.880224-50.057228 3.797445-107.364124-54.545117-124.280014-83.198565-22.439447-141.541127 45.569339-216.109136 52.473784z" fill="#3F3F3F" ></path><path d="M44.18845 731.251522a105.638012 105.638012 0 0 0 105.638012 105.638012h698.729858v-31.415226H149.826462a74.222786 74.222786 0 0 1 0-148.445573h698.729858v-31.415225H149.826462a105.638012 105.638012 0 0 0-105.638012 105.638012z" fill="#8A8A8A" ></path><path d="M75.603675 731.251522a74.222786 74.222786 0 0 0 74.222787 74.222786h698.729858V655.993069H149.826462a74.222786 74.222786 0 0 0-74.222787 75.258453z" fill="#FFE610" ></path><path d="M103.566679 731.251522a51.092895 51.092895 0 1 0 50.747672-50.747673A50.747673 50.747673 0 0 0 103.566679 731.251522z" fill="#FFFFFF" ></path><path d="M121.863459 731.251522a32.450893 32.450893 0 1 0 32.450892-32.450893 32.450893 32.450893 0 0 0-32.450892 32.450893zM290.331922 731.251522a34.522226 34.522226 0 0 0 34.522227 34.522226h414.266714a34.522226 34.522226 0 0 0 34.522226-34.522226 34.522226 34.522226 0 0 0-34.522226-34.522226h-414.266714a34.522226 34.522226 0 0 0-34.522227 34.522226z" fill="#54D9D9" ></path><path d="M827.15254 877.625761h276.523032v61.794785h-276.523032z" fill="#F7A53F" ></path><path d="M839.925764 939.765768h250.976584v31.070004h-250.976584z" fill="#707070" ></path><path d="M747.75142 657.028735v148.445573h43.152783v31.415226h57.652117v-211.276024h-57.652117v31.415225h-43.152783z" fill="#B3B3B3" opacity=".76" ></path><path d="M14.499335 970.490549h1149.590133v53.509451H14.499335z" fill="#B86805" ></path><path d="M154.314351 836.889534H272.725587v133.601015H154.314351zM614.150404 836.889534h118.411236v133.601015h-118.411236z" fill="#F7A53F" ></path><path d="M614.150404 836.889534h118.411236v78.365453h-118.411236zM154.314351 836.889534H272.725587v78.365453H154.314351z" fill="#B3B3B3" opacity=".76" ></path></symbol><symbol id="icon-jixiebi4" viewBox="0 0 1123 1024"><path d="M502.569098 505.335276h543.234824v85.15391H502.569098z" fill="#FFE610" ></path><path d="M483.047648 203.089382a81.451566 81.451566 0 0 1-41.06236 73.373725l-302.919047 173.33701a82.124719 82.124719 0 0 1-81.788143-143.045105l302.919047-173.33701a82.124719 82.124719 0 0 1 83.807603 0 79.768682 79.768682 0 0 1 27.935868 28.945597A77.412645 77.412645 0 0 1 483.047648 203.089382z" fill="#FFC200" ></path><path d="M39.776109 803.542249h1082.094151v220.121174H39.776109z" fill="#FFE610" ></path><path d="M39.776109 971.830609h1082.094151v52.169391H39.776109zM466.218812 723.43699v146.747449H219.844654v-146.747449a123.187079 123.187079 0 0 1 246.374158 0z" fill="#FFC200" ></path><path d="M396.210854 790.415757a100.973016 100.973016 0 0 1-141.698798-23.896947l-235.603704-331.864645a100.973016 100.973016 0 0 1 23.896947-141.362222 100.973016 100.973016 0 0 1 141.698799 23.896947l235.603703 331.528068a100.973016 100.973016 0 0 1-24.233523 141.698799z" fill="#FFE610" ></path><path d="M146.470929 451.146424a86.16364 86.16364 0 1 1 29.282174-118.138428 86.16364 86.16364 0 0 1-29.282174 118.138428z" fill="#B8B8B8" ></path><path d="M131.661553 424.556864a56.881466 56.881466 0 1 1 19.52145-78.085799 56.544889 56.544889 0 0 1-19.52145 78.085799z" fill="#B8B8B8" ></path><path d="M120.554522 405.035414a35.677132 35.677132 0 0 1-36.686863-60.920386A35.677132 35.677132 0 1 1 120.554522 405.035414z" fill="#FFFFFF" ></path><path d="M370.9676 757.767815a56.881466 56.881466 0 1 1 19.184873-78.085798 56.881466 56.881466 0 0 1-19.184873 78.085798z" fill="#B8B8B8" ></path><path d="M358.850839 739.592672a35.677132 35.677132 0 1 1 12.116761-48.803624 35.677132 35.677132 0 0 1-12.116761 48.803624z" fill="#FFFFFF" ></path><path d="M423.136992 384.167657l-112.416624 66.305614-32.984519-55.871735 112.753201-65.969037 9.760725 16.492259 13.463069 22.887217 9.424148 16.155682z" fill="#8A8A8A" ></path><path d="M400.18246 345.023785l70.512822-41.398937 13.463069 22.887217-70.512823 41.432594z" fill="#C4C4C4" ></path><path d="M489.442606 313.823123a21.877487 21.877487 0 0 1-11.780186 27.935868 21.54091 21.54091 0 0 1-27.935867-12.116762l-29.955328-73.373725a21.54091 21.54091 0 0 1 12.116762-27.935868 21.204333 21.204333 0 0 1 27.599291 11.780186z" fill="#F7A53F" ></path><path d="M482.037918 318.19862a12.453339 12.453339 0 0 1-9.424148 14.809376 12.789915 12.789915 0 0 1-14.809376-9.424148 12.789915 12.789915 0 0 1 9.424148-14.809376 12.453339 12.453339 0 0 1 14.809376 9.424148z" fill="#707070" ></path><path d="M303.652257 388.543155a24.5701 24.5701 0 0 0-7.404688 8.077841l-24.906677 45.10128 32.311365 44.764704 36.350285-65.63246a24.906677 24.906677 0 0 0-36.013709-33.657672z m12.453338 6.394957a14.472799 14.472799 0 0 1 16.155683 12.116762 14.136222 14.136222 0 0 1-12.116762 16.155683 13.799645 13.799645 0 0 1-16.155683-11.780185 14.136222 14.136222 0 0 1 13.463069-16.49226z" fill="#B86805" ></path><path d="M305.33514 411.430372a13.799645 13.799645 0 0 0 16.155683 11.780185 14.136222 14.136222 0 0 0 12.116762-16.155683 14.472799 14.472799 0 0 0-16.155683-12.116762 14.136222 14.136222 0 0 0-12.116762 16.49226z" fill="#5E5E5E" ></path><path d="M625.4196 163.709906l-19.858026 12.116762-37.360016 22.55064-19.858027 12.116762-20.867756-34.667402-40.389207-66.64219-19.184872-31.301635 9.424148-5.721804 58.227772-35.340556 9.424148-5.385227 80.441836 132.27465z" fill="#8A8A8A" ></path><path d="M568.066927 198.276335l37.124412-22.516982 36.484917 60.14626-37.15807 22.55064z" fill="#4D4D4D" ></path><path d="M931.031261 336.373763l-85.15391 217.765137h-128.572307l-46.447587-118.811581-30.965058-79.768683-7.404688-19.184873 46.111011-46.447587h205.648375l46.784164 46.447587z" fill="#AEBABD" ></path><path d="M744.668732 483.861681l105.954351-43.182793 2.423352 5.890093-105.988009 43.182793zM840.8287 361.953594l-120.157889-26.252984 1.682884-6.058381 119.821312 26.252984-1.346307 6.058381zM683.916634 363.838423l6.125696-1.851172 32.984518 109.252803-6.159353 1.851172z" fill="#6A5060" ></path><path d="M880.544753 403.015954a49.813354 49.813354 0 1 1-49.813354-49.813355 50.149931 50.149931 0 0 1 49.813354 49.813355zM746.923796 359.597557a33.657672 33.657672 0 1 1-33.657672-33.657672 33.657672 33.657672 0 0 1 33.657672 33.657672zM767.454975 465.282647a26.589561 26.589561 0 0 1-26.58956 26.252984A26.252984 26.252984 0 0 1 741.201991 438.693086a26.589561 26.589561 0 0 1 26.252984 26.589561z" fill="#FFFFFF" ></path><path d="M846.887081 403.015954a16.155683 16.155683 0 1 1-16.155682-16.155683 16.155683 16.155683 0 0 1 16.155682 16.155683zM724.709732 359.597557a10.097302 10.097302 0 0 1-10.097302 9.760725 9.760725 9.760725 0 1 1 0-19.52145 10.097302 10.097302 0 0 1 10.097302 9.760725zM748.943256 465.282647A7.741265 7.741265 0 0 1 741.201991 472.350758a8.077841 8.077841 0 0 1-8.077841-8.077842 8.077841 8.077841 0 0 1 8.077841-8.077841 8.077841 8.077841 0 0 1 7.741265 9.087572z" fill="#788B90" opacity=".37" ></path><path d="M698.456748 219.581642h166.268899v46.11101h-166.268899z" fill="#F7A53F" ></path><path d="M702.159092 223.620562h5.048651v38.03317h-5.048651zM711.246663 223.620562h5.048651v38.03317h-5.048651zM720.334235 223.620562h5.048651v38.03317h-5.048651zM729.421806 223.620562h5.048651v38.03317h-5.048651zM738.509378 223.620562h5.04865v38.03317h-5.04865zM747.596949 223.620562h5.048651v38.03317h-5.048651zM756.68452 223.620562h5.048651v38.03317h-5.048651zM765.772092 223.620562h5.048651v38.03317h-5.048651zM774.859663 223.620562h5.048651v38.03317H774.859663zM783.610658 223.620562h5.048651v38.03317h-5.048651zM792.698229 223.620562h5.048651v38.03317h-5.048651zM801.785801 223.620562h5.04865v38.03317h-5.04865zM810.873372 223.620562h5.048651v38.03317h-5.048651zM819.960944 223.620562h5.04865v38.03317h-5.04865zM829.048515 223.620562h5.048651v38.03317h-5.048651zM838.136086 223.620562h5.048651v38.03317h-5.048651zM847.223658 223.620562h5.048651v38.03317h-5.048651zM856.311229 223.620562h5.048651v38.03317h-5.048651z" fill="#788B90" opacity=".38" ></path><path d="M738.845954 265.692652h85.490487v23.896947h-85.490487z" fill="#707070" ></path><path d="M735.816764 288.916446h-1.682884L640.228976 355.558636l-39.0429 26.926138-4.712074 3.365767-16.492259-23.896947a25.916407 25.916407 0 0 1 6.731534-36.013709l97.270672-67.315344a25.916407 25.916407 0 0 1 36.013709 6.731534z" fill="#58BFD2" ></path><path d="M670.857457 435.327319h-33.657672a12.116762 12.116762 0 0 1-10.433878-8.414418l-24.906677-44.428127 39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M827.365631 288.916446h1.682884l94.241481 65.63246 39.0429 26.926138 4.712074 3.365767 16.492259-23.896947a25.916407 25.916407 0 0 0-6.731534-35.003979l-97.270672-67.315344a25.916407 25.916407 0 0 0-36.013709 6.731534z" fill="#58BFD2" ></path><path d="M892.324938 435.327319h33.657672a12.116762 12.116762 0 0 0 10.433878-8.414418l24.906677-44.428127-39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M738.845954 265.692652h85.490487v12.116762h-85.490487zM922.95342 355.558636l-31.301635 79.768683-46.447588 118.811581 49.140201-194.541343-70.007957-69.671381h4.038921l94.578058 65.63246z" fill="#848484" opacity=".25" ></path><path d="M661.433309 321.900964l-48.467048-67.988497 21.204334-12.789915 38.033169 74.383455-10.770455 6.394957z" fill="#7A807D" ></path><path d="M535.553616 36.820483l-58.227772 33.657672-11.780186-19.184873A33.657672 33.657672 0 0 1 502.905674 1.143351a33.657672 33.657672 0 0 1 21.204334 15.482529z" fill="#F7A53F" ></path><path d="M527.475775 175.826668L483.047648 203.089382A77.412645 77.412645 0 0 0 471.940616 164.046483a79.768682 79.768682 0 0 0-27.599291-28.272444l42.745243-25.916408zM527.475775 175.826668l-40.389207-66.64219 40.389207 66.64219z" fill="#C4C4C4" ></path><path d="M956.274515 854.028757H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M650.999431 304.062398l-70.007958 14.809376 69.671381 8.414418-4.712074 38.033169 25.243254-25.243254 22.887217 25.243254-3.702344-36.350286 35.003979-1.682883-31.974789-19.52145 14.809376-35.677132-33.657672 24.906677-26.252984-43.754973 2.692614 50.823084z" fill="#FFFFFF" ></path><path d="M956.274515 803.542249H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 803.542249H600.512923l32.311365-25.579831h290.802285l32.647942 25.579831z" fill="#999999" ></path><path d="M956.274515 752.719165H600.512923l32.311365 25.243253h290.802285l32.647942-25.243253zM956.274515 702.232657H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 752.719165H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M584.693817 632.561276h378.985386v69.671381H584.693817zM584.693817 854.028757h378.985386v34.667402H584.693817z" fill="#FFC200" ></path><path d="M502.569098 590.489186h543.234824v42.07209H502.569098z" fill="#F7A53F" ></path><path d="M273.696929 882.637778h80.441836v59.574079H273.696929z" fill="#7A807D" ></path><path d="M355.821648 783.011069l-4.375497 13.799646-26.589561 85.827063h-26.252984l28.945598-93.231751 4.375497-13.799646 23.896947 7.404688z" fill="#999999" ></path><path d="M381.738055 772.913768a33.657672 33.657672 0 1 1-22.55064-43.08182 33.657672 33.657672 0 0 1 22.55064 43.08182z" fill="#F7A53F" ></path><path d="M359.523992 753.728895a15.819106 15.819106 0 1 1-15.819106-15.819106 15.819106 15.819106 0 0 1 15.819106 15.819106z" fill="#FFFFFF" ></path><path d="M168.348416 882.637778h80.441835v59.574079H168.348416z" fill="#7A807D" ></path><path d="M166.665532 783.011069l4.375497 13.799646 26.589561 85.827063h26.252984l-28.945598-93.231751-4.03892-13.799646-24.233524 7.404688z" fill="#999999" ></path><path d="M140.749125 772.913768a33.657672 33.657672 0 1 0 67.315343-20.53118 33.657672 33.657672 0 0 0-43.08182-22.55064 33.657672 33.657672 0 0 0-24.233523 43.08182z" fill="#68FF4B" ></path><path d="M162.963188 753.728895a15.819106 15.819106 0 1 0 15.819106-15.819106 15.819106 15.819106 0 0 0-15.819106 15.819106z" fill="#FFFFFF" ></path></symbol></svg>',(s=>{var e=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,r,o,a,l=function(m,u){u.parentNode.insertBefore(m,u)};if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(m){console&&console.log(m)}}n=function(){var m,u=document.createElement("div");u.innerHTML=s._iconfont_svg_string_4634042,(u=u.getElementsByTagName("svg")[0])&&(u.setAttribute("aria-hidden","true"),u.style.position="absolute",u.style.width=0,u.style.height=0,u.style.overflow="hidden",u=u,(m=document.body).firstChild?l(u,m.firstChild):m.appendChild(u))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(r=n,o=s.document,a=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,c())})}function c(){a||(a=!0,r())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const l6={class:"obj-viewer-container"},c6={class:"buttonGroup-top"},h6={class:"buttonGroup-topLeft"},u6={class:"buttonGroup-left"},d6={class:"buttonGroup-right"},f6={class:"buttonGroup-bottom"},p6={class:"left-panel"},m6={class:"panel-header"},g6={key:1,class:"clipping-content"},_6={class:"radio-group"},v6={class:"radio-label"},y6={class:"radio-label"},x6={class:"radio-label"},M6={class:"radio-label"},b6={class:"right-panel"},S6={class:"panel-header"},E6={key:0,class:"loading-overlay"},A6={__name:"threeView",props:{urdfUrl:{type:String,default:""},animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(s,{emit:e}){const t=e,n=s;let i=null,r=!1;const o=v.ref(null),a=v.ref(!1),l=v.ref("");v.ref(!1);const c=v.ref(!1),d=v.ref(!1),m=v.ref(""),u=v.ref(!1),h=v.ref(""),g=v.ref(),{currentModels:_,initialCameraPosition:p,initialTargetPosition:f,initThreeJS:x,handleResize:y,getThreeJSObjects:S,clearAllModels:U,cleanup:C}=y4(o),{loadUrdfFromUrl:L}=F4(S,_,a,l),{isAnimating:P,toggleAnimation:E,stopAnimation:A}=x4(S,_),{isClipping:D,activeClippingAxis:O,toggleClipping:V,updateClippingPlanes:Q}=M4(S,_),{urdfModel:se}=N4(S,_,a,l,U),G=()=>{if(c.value||_.value.length===0)return;c.value=!0,P.value&&A();const{camera:ye,controls:_e}=S();if(!ye||!_e)return;_e.enabled=!0;const ae=J=>J<.5?4*J*J*J:1-Math.pow(-2*J+2,3)/2,j=ye.position.clone(),Y=_e.target.clone(),ee=1500,ne=Date.now(),he=()=>{const J=Date.now()-ne,ue=Math.min(J/ee,1),Ce=ae(ue);ye.position.lerpVectors(j,p.value,Ce),_e.target.lerpVectors(Y,f.value,Ce),ue<1?requestAnimationFrame(he):c.value=!1};he()},ce=async()=>r?Promise.resolve():new Promise(ye=>{const _e=()=>{r?ye():requestAnimationFrame(_e)};_e()}),Z=ye=>{d.value=!0,m.value=ye,ye==="剖面视图"&&!D.value&&V()},ge=ye=>{u.value=!0,h.value=ye,ye==="动画仿真"&&t("getAnimationData")},De=()=>{v.nextTick(()=>{var ye;(ye=g.value)==null||ye.startAnimation()})};return v.watch(()=>n.urdfUrl,async(ye,_e)=>{if(ye)try{if(await ce(),await L(ye)){const{camera:j}=S();j&&(j.position.set(3,3,4),j.near=.01,j.far=1e4,j.updateProjectionMatrix())}}catch(ae){console.error("加载urdf模型失败",ae),Pn.ElMessage.error("加载urdf模型失败")}},{immediate:!0}),v.onMounted(async()=>{await v.nextTick();try{x(),i=S().scene,r=!0,window.addEventListener("resize",y)}catch(ye){console.error("Three.js初始化失败:",ye)}}),v.onBeforeUnmount(()=>{r=!1,m.value="",h.value="",window.removeEventListener("resize",y),P.value&&A(),C()}),(ye,_e)=>{var j,Y,ee,ne;const ae=v.resolveComponent("el-scrollbar");return v.openBlock(),v.createElementBlock("div",l6,[v.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),v.createElementVNode("div",c6,[v.createVNode(un,{name:"guanjianjiexi",size:"34"}),v.createVNode(un,{name:"guanjiekongzhi",size:"34"}),v.createVNode(un,{name:"gongyishengcheng",size:"34"}),v.createVNode(un,{name:"buchangshezhi",size:"34"}),v.createVNode(un,{name:"shuchujiagongchengxu",size:"34"})]),v.createElementVNode("div",h6,[v.createVNode(un,{name:"viewReset",size:"24",onClick:G,title:"重置"}),v.createVNode(un,{name:"fangda",size:"24",title:"放大"}),v.createVNode(un,{name:"suoxiao",size:"24",title:"缩小"}),v.createVNode(un,{name:"lookAround",size:"24",onClick:v.unref(E),title:v.unref(P)?"停止动画":"动画视图"},null,8,["onClick","title"])]),v.createElementVNode("div",u6,[v.createVNode(un,{name:"jiegoushu",size:"24",onClick:_e[0]||(_e[0]=he=>Z("场景树")),active:d.value&&m.value==="场景树",title:"场景树"},null,8,["active"]),v.createVNode(un,{name:"clipping",size:"24",onClick:_e[1]||(_e[1]=he=>Z("剖面视图")),active:d.value&&m.value==="剖面视图",title:"剖面视图"},null,8,["active"]),v.createVNode(un,{name:"donghuafangzhen",size:"24",onClick:_e[2]||(_e[2]=he=>Z("场景树3"))}),v.createVNode(un,{name:"donghuafangzhen",size:"24",onClick:_e[3]||(_e[3]=he=>Z("场景4"))})]),v.createElementVNode("div",d6,[v.createVNode(un,{name:"donghuafangzhen",size:"24"}),v.createVNode(un,{name:"donghuafangzhen",size:"24"}),v.createVNode(un,{name:"guanjiekongzhi",size:"24",onClick:_e[4]||(_e[4]=he=>ge("关节控制")),active:u.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),v.createVNode(un,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:_e[5]||(_e[5]=he=>ge("动画仿真")),active:u.value&&h.value==="动画仿真"},null,8,["active"]),v.createVNode(un,{name:"donghuafangzhen",size:"24"}),v.createVNode(un,{name:"donghuafangzhen",size:"24"})]),v.createElementVNode("div",f6,[v.createVNode(un,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(j=g.value)==null?void 0:j.fastBackward},null,8,["onClick"]),v.createVNode(un,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:De}),v.createVNode(un,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(Y=g.value)==null?void 0:Y.fastForward},null,8,["onClick"]),v.createVNode(un,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(ee=g.value)==null?void 0:ee.pauseAnimation},null,8,["onClick"]),v.createVNode(un,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(ne=g.value)==null?void 0:ne.resetAll},null,8,["onClick"])]),v.withDirectives(v.createElementVNode("div",p6,[v.createElementVNode("div",m6,[v.createElementVNode("span",null,v.toDisplayString(m.value),1),v.createElementVNode("span",{class:"close",onClick:_e[6]||(_e[6]=he=>d.value=!1)}," X ")]),v.createVNode(ae,{"max-height":"650px"},{default:v.withCtx(()=>[m.value==="场景树"?(v.openBlock(),v.createBlock(r6,{key:0,model:v.unref(se)},null,8,["model"])):v.createCommentVNode("",!0),m.value==="剖面视图"?(v.openBlock(),v.createElementBlock("div",g6,[v.createElementVNode("div",_6,[v.createElementVNode("label",v6,[v.withDirectives(v.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":_e[7]||(_e[7]=he=>v.isRef(O)?O.value=he:null),onChange:_e[8]||(_e[8]=(...he)=>v.unref(Q)&&v.unref(Q)(...he))},null,544),[[v.vModelRadio,v.unref(O)]]),_e[16]||(_e[16]=v.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),v.createElementVNode("label",y6,[v.withDirectives(v.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":_e[9]||(_e[9]=he=>v.isRef(O)?O.value=he:null),onChange:_e[10]||(_e[10]=(...he)=>v.unref(Q)&&v.unref(Q)(...he))},null,544),[[v.vModelRadio,v.unref(O)]]),_e[17]||(_e[17]=v.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),v.createElementVNode("label",x6,[v.withDirectives(v.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":_e[11]||(_e[11]=he=>v.isRef(O)?O.value=he:null),onChange:_e[12]||(_e[12]=(...he)=>v.unref(Q)&&v.unref(Q)(...he))},null,544),[[v.vModelRadio,v.unref(O)]]),_e[18]||(_e[18]=v.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),v.createElementVNode("label",M6,[v.withDirectives(v.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":_e[13]||(_e[13]=he=>v.isRef(O)?O.value=he:null),onChange:_e[14]||(_e[14]=(...he)=>v.unref(Q)&&v.unref(Q)(...he))},null,544),[[v.vModelRadio,v.unref(O)]]),_e[19]||(_e[19]=v.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):v.createCommentVNode("",!0)]),_:1})],512),[[v.vShow,d.value]]),v.withDirectives(v.createElementVNode("div",b6,[v.createElementVNode("div",S6,[v.createElementVNode("span",null,v.toDisplayString(h.value),1),v.createElementVNode("span",{class:"close",onClick:_e[15]||(_e[15]=he=>u.value=!1)}," X ")]),v.createVNode(ae,{"max-height":"650px"},{default:v.withCtx(()=>[v.withDirectives(v.createVNode(t6,{ref_key:"jointRef",ref:g,model:v.unref(se),scene:v.unref(i),animationData:s.animationData},null,8,["model","scene","animationData"]),[[v.vShow,h.value==="关节控制"]]),v.withDirectives(v.createVNode(B4,{animationData:s.animationData},null,8,["animationData"]),[[v.vShow,h.value==="动画仿真"]])]),_:1})],512),[[v.vShow,u.value]]),a.value?(v.openBlock(),v.createElementBlock("div",E6,[_e[20]||(_e[20]=v.createElementVNode("div",{class:"loading-spinner"},null,-1)),v.createElementVNode("p",null,v.toDisplayString(l.value),1)])):v.createCommentVNode("",!0)])}}},mu=Pi._export_sfc(A6,[["__scopeId","data-v-e3790e10"]]),w6={class:"extra-button-content"},T6={class:"table-operator-wrap"},C6={class:"extra-button-filter"},R6={title:"条件查询"},D6={class:"form-content-value"},L6={key:0,class:"extra-header"},P6={__name:"header",props:{compName:{type:String,default:"表格名称",required:!1},buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter"],setup(s,{emit:e}){const t=e,n=s,i=v.ref(""),r=v.ref(!1),o=v.ref([]),a=v.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),l=u=>{var g;const h=(g=o.value)==null?void 0:g.reduce((_,p,f)=>(f===0?_[p.label]=u:_[p.label]=p.value,_),{});t("filter",h)},c=u=>{t("buttonClick",u)},d=u=>{var h,g;o.value=(g=(h=rn.getColumnChild(Oe.cloneDeep(u)))==null?void 0:h.filter(_=>(_==null?void 0:_.label)!==""&&(_==null?void 0:_.label)!=="操作"))==null?void 0:g.map(_=>({label:(_==null?void 0:_.label)??"",value:"",name:(_==null?void 0:_.label)??"",isFormColHidden:_==null?void 0:_.isTableColHidden,width:2}))},m=u=>{var h;if((u==null?void 0:u.buttonName)==="确认"&&t("filter",u==null?void 0:u.content),(u==null?void 0:u.buttonName)==="清空"){const g=Oe.cloneDeep(u==null?void 0:u.content);for(const _ in g)g[_]="";o.value=(h=o.value)==null?void 0:h.map(_=>({..._,value:""})),t("filter",g)}r.value=!1};return v.onMounted(()=>{d(n.columns)}),v.watch(()=>n.columns,()=>{d(n.columns)},{deep:!0,immediate:!0}),(u,h)=>{var f;const g=v.resolveComponent("svg-icon"),_=v.resolveComponent("el-input"),p=v.resolveComponent("el-button");return v.openBlock(),v.createElementBlock("div",w6,[v.createElementVNode("div",{class:v.normalizeClass(s.compName?"table-name-wrap":"")},v.toDisplayString(s.compName),3),v.createElementVNode("div",T6,[v.createElementVNode("div",C6,[v.createVNode(Cu,{title:"",width:800,placement:"bottom-start",isVisible:r.value},{reference:v.withCtx(()=>[v.createVNode(_,{modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=x=>i.value=x),style:{width:"240px"},placeholder:"搜索","prefix-icon":v.unref(Pn.search_default),clearable:"",onInput:l},{append:v.withCtx(()=>[v.createElementVNode("span",R6,[v.createVNode(g,{onClick:h[0]||(h[0]=x=>r.value=!r.value),name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","prefix-icon"])]),content:v.withCtx(()=>[v.createElementVNode("div",D6,[(v.openBlock(),v.createBlock(On.ssForm,{rowContents:o.value,buttonValue:a.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:a.value,isStartJustify:!1,onOnButtonClick:m},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),n!=null&&n.buttons&&((f=n==null?void 0:n.buttons)==null?void 0:f.length)>0?(v.openBlock(),v.createElementBlock("div",L6,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(n==null?void 0:n.buttons,(x,y)=>(v.openBlock(),v.createElementBlock("div",{class:"extra-contents",key:y},[v.createVNode(p,{id:"themeButton",style:v.normalizeStyle({background:(x==null?void 0:x.background)??"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}),onClick:S=>c(x==null?void 0:x.label)},{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(x==null?void 0:x.label),1)]),_:2},1032,["style","onClick"])]))),128))])):v.createCommentVNode("",!0)])])}}},F6=Pi._export_sfc(P6,[["__scopeId","data-v-e343d690"]]),U6=v.defineComponent({__name:"batch",props:{buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(s,{emit:e}){const t=e,n=i=>{t("buttonClick",i)};return(i,r)=>{const o=v.resolveComponent("el-button");return v.openBlock(),v.createElementBlock("div",null,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(s.buttons,a=>{var l;return v.openBlock(),v.createBlock(o,{key:a==null?void 0:a.label,class:v.normalizeClass((l=a==null?void 0:a.label)!=null&&l.includes("删除")?"warning-type":"default-type"),onClick:c=>n(a==null?void 0:a.label)},{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(a==null?void 0:a.label),1)]),_:2},1032,["class","onClick"])}),128))])}}}),N6=Pi._export_sfc(U6,[["__scopeId","data-v-73ec704e"]]),I6=Oe.useModelComp(Oe.pinia),{systemPath:g0}=Oe.storeToRefs(I6),ma=v.ref(),_0=new Map;function z6(s,e,t,n,i){const r=async u=>{try{const h=await On.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},o=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=p=>{try{const f=p.target.result,y=new cs().parse(f);y.preload(),h(y)}catch(f){g(f)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),a=async u=>{const h={materials:{},create:function(g){return this.materials[g]?this.materials[g]:(console.warn(`Material '${g}' not found, using default material`),new fn({color:8947848,side:pn}))},getAsArray:function(){const g=[];for(const _ in this.materials)g.push(this.materials[_]);return g},preload:function(){for(const g in this.materials)this.materials[g].map&&(this.materials[g].map.needsUpdate=!0)}};for(const g of u){const _=await o(g);Object.assign(h.materials,_.materials)}return h.preload(),h},l=async(u,h=[])=>new Promise((g,_)=>{const p=new FileReader;p.onload=async f=>{try{const x=f.target.result;let y=null;h&&h.length>0&&(h.length===1?y=await o(h[0]):y=await a(h));const S=new ls;y&&S.setMaterials(y);const U=S.parse(x);y||U.traverse(C=>{C.isMesh&&(C.material=new fn({color:8947848,side:pn}))}),g(U)}catch(x){_(x)}},p.onerror=()=>{_(new Error("OBJ文件读取失败"))},p.readAsText(u)}),c=async u=>{var h;try{t.value=!0;const{scene:g}=s();if(!g)throw new Error("Scene not initialized");i();const _=[];for(let p=0;p<u.length;p++){const f=u[p];n.value=`正在加载模型 ${p+1}/${u.length}...`;const x=await r(f.objUrl),y=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,S=new File([x],y,{type:x.type});let U=[];if(f.mtlUrls){const L=Array.isArray(f.mtlUrls)?f.mtlUrls:[f.mtlUrls];for(let P=0;P<L.length;P++){const E=L[P],A=await r(E),D=(E==null?void 0:E.split("/").pop())||`material_${p}_${P}.mtl`,O=new File([A],D,{type:A.type});U.push(O)}}const C=await l(S,U);g.add(C),e.value.push(C),_.push(C)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let p;const f=u.toLowerCase();switch(f){case".txt":case".cpt":case".obj":const x=await h.text();if(f===".txt"||f===".cpt"){const J=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Ce=[...x.matchAll(J)].map(B=>({x:parseFloat(B[1]),y:parseFloat(B[2]),z:parseFloat(B[3])})),je=new hn,We=Ce.flatMap(B=>[B.x,B.y,B.z]);if(je.setAttribute("position",new It(We,3)),f===".txt"){const B=new Gi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(je,B)}else if(f===".cpt"){const B=new Ri({color:"#5B5C99",linewidth:100});p=new Ba(je,B)}}else if(f===".obj"){const J=new ls;if(g&&g.length>0){const ue=new cs;for(const Ce of g){const je=await Ce.text(),We=ue.parse(je);We.preload(),J.setMaterials(We);break}}p=J.parse(x),(!g||g.length===0)&&p.traverse(ue=>{ue.isMesh&&(ue.material=new fn({color:"#B3B3D4"})),ue instanceof zt&&(ue.material.side=pn)})}break;case".stl":const y=await h.arrayBuffer(),U=new ji().parse(y),C=new fn({color:"#B3B3D4",side:pn});p=new zt(U,C);break;case".nc":const L=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],P={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},E=new Ln,A=L.map(J=>new Promise((ue,Ce)=>{new ji().load(g0.value===""?`/model/${J}`:`${g0.value}\\${J}`,We=>{const B=new fn({color:P[J]||"#B3B3D4",side:pn}),_t=new zt(We,B);ue(_t)},void 0,Ce)}));try{(await Promise.all(A)).forEach(ue=>E.add(ue)),p=E}catch(J){throw console.error("加载NC文件对应的STL文件失败:",J),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const D=new pu,O=new Ln;try{const J=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ue=new Blob([J.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),je=new Blob([Ce.data],{type:"application/octet-stream;charset=UTF-8"}),We=await new Promise((_t,dt)=>{const at=URL.createObjectURL(ue);D.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=1,tt[Le*3+1]=0,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)}),B=await new Promise((_t,dt)=>{const at=URL.createObjectURL(je);D.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=0,tt[Le*3+1]=1,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)});O.add(We),O.add(B),p=O}catch(J){throw console.error("PCD文件加载失败:",J),new Error("无法加载PCD文件")}break;case".urdf":const V=URL.createObjectURL(h),Q=new gc,se="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",G={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},ce=new Map,Z=new Map,ge=new Map,De=async J=>{if(ce.has(J))return console.log(`从缓存加载: ${J}`),ce.get(J);try{const ue=await Pn.axios.get(`${se}/${J}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Ce=new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&ce.set(J,Ce),Ce}catch(ue){throw console.error(`加载文件失败: ${J}`,ue),new Error(`无法加载文件: ${J}`)}},ye=(J="default")=>{if(Z.has(J))return Z.get(J);const ue=new fn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Qn});return Z.set(J,ue),ue},_e=J=>{try{J.isBufferGeometry&&J.mergeVertices&&J.mergeVertices(),J.computeVertexNormals&&J.computeVertexNormals(),J.computeBoundingSphere&&J.computeBoundingSphere(),J.deleteAttribute&&J.deleteAttribute("uv2")}catch(ue){console.warn("几何体优化失败,使用原始几何体:",ue)}return J},ae=async(J,ue,Ce)=>{const je=`stl_${ue}`;if(ge.has(je)){const dt=ge.get(je);return new zt(dt,ye())}const We=await J.arrayBuffer();let _t=new ji(Ce).parse(We);return _t=_e(_t),ge.set(je,_t),new zt(_t,ye())},j=async(J,ue,Ce)=>{const je=`obj_${ue}`;if(ce.has(je))return ce.get(je).clone();const We=await J.text(),B=new ls(Ce),_t=ue.replace(".obj",".mtl");try{const Fe=await(await De(_t)).text(),Le=new cs(Ce).parse(Fe);Le.preload(),B.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${_t}`)}const dt=B.parse(We);return dt.traverse(at=>{at.isMesh&&(at.geometry=_e(at.geometry),at.castShadow=!0,at.receiveShadow=!0,at.renderOrder=1)}),ce.set(je,dt),dt},Y=(J,ue)=>{const Ce=new O0;if(Ce.addLevel(J,0),J.geometry){const je=J.geometry.clone(),We=new zt(je,J.material);Ce.addLevel(We,50)}return Ce};let ee=0,ne=0;const he=[];Q.loadMeshCb=async(J,ue,Ce,je,We)=>{const B=J.split("/").pop(),_t=Ce||(()=>{});ee++;const dt=new Promise(async(at,Fe)=>{try{const tt=await De(B);if(!tt||tt.size===0)throw new Error(`文件为空: ${B}`);const Le=B.split(".").pop().toLowerCase();let ot;switch(Le){case"stl":ot=await ae(tt,B,ue);break;case"obj":ot=await j(tt,B,ue);break;default:throw new Error(`不支持的文件格式: ${Le}`)}G.enableLOD&&ot.isMesh&&(ot=Y(ot,B)),_t(ot),ne++,je&&je({loaded:ne,total:ee,progress:ne/ee}),at(ot)}catch(tt){console.error(`mesh文件加载失败: ${B}`,tt);const Le=new Ln;_t(Le),at(Le);const ot=new $i(.1,.1,.1),jt=new j0({color:16711680,wireframe:!0});return new zt(ot,jt)}});he.push(dt)};try{if(!V){ma.value=void 0;break}if(p=await Q.loadAsync(V),console.log(`URDF文件加载完成,等待${ee}个mesh文件加载...`),he.length>0)try{await Promise.allSettled(he),console.log(`所有mesh文件处理完成,成功加载: ${ne}/${ee}`)}catch(Ce){console.warn("部分mesh文件加载失败,但继续显示模型",Ce)}p.traverse(Ce=>{Ce.isMesh&&(Ce.castShadow=!0,Ce.receiveShadow=!0,Ce.renderOrder=1,Ce.material&&(Ce.material.needsUpdate=!0))}),console.time("计算包围盒");const J=new Fn;J.expandByObject(p);const ue=`urdf_${Date.now()}`;p.userData.boundingBox=J.clone(),p.userData.modelId=ue,_0.set(ue,{box:J.clone(),center:J.getCenter(new I),size:J.getSize(new I),maxSize:Math.max(...J.getSize(new I).toArray())}),ma.value=p,console.log("URDF模型加载完成并优化")}catch(J){console.error("URDF加载失败:",J),ma.value=void 0}finally{V&&URL.revokeObjectURL(V)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return p};return{addModelsFromUrls:c,loadModelByDefaultPath:async u=>{console.log(u);try{t.value=!0,n.value="正在加载模型...";const{scene:h}=s();if(!h)throw new Error("Scene not initialized");i(),await new Promise(_=>setTimeout(_,100));const g=[];for(let _=0;_<u.length;_++){const p=u[_],f=await d(p.suffix,p.blob,p.mtlBlobs||[],p.meshFiles||[]);f&&(h.add(f),e.value.push(f),g.push(f))}return t.value=!1,n.value="",g}catch(h){throw console.error("加载模型失败:",h),t.value=!1,n.value="",h}},urdfModel:ma,modelBoundingBoxes:_0}}window._iconfont_svg_string_4634042='<svg><symbol id="icon-lookAround" viewBox="0 0 1041 1024"><path d="M520.685026 798.355937c-10.788594 0-21.577187-2.790872-31.241101-8.372615l-291.583615-168.36871A62.482203 62.482203 0 0 1 166.619208 567.505024V230.850913c0-22.368629 11.913273-42.987756 31.241102-54.109588l291.583615-168.36871a62.482203 62.482203 0 0 1 62.482203 0l291.583615 168.36871c19.327828 11.121832 31.241102 31.740959 31.241101 54.109588v336.654111a62.482203 62.482203 0 0 1-31.241101 54.109588l-291.583615 168.36871a62.857096 62.857096 0 0 1-31.241102 8.372615zM291.583615 531.39031l229.101411 132.295652 229.101412-132.295652v-264.507993l-229.101412-132.295651L291.583615 266.923972v264.466338z m520.685026 36.114714h0.416548-0.416548z" fill="#aaaaaa" ></path><path d="M520.685026 461.660172c-10.788594 0-21.577187-2.790872-31.241101-8.372616l-291.583615-168.327055a62.482203 62.482203 0 0 1 62.482203-108.219176L520.685026 326.990196l260.342513-150.248871a62.482203 62.482203 0 1 1 62.482204 108.219176l-291.583615 168.327055a62.857096 62.857096 0 0 1-31.241102 8.372616z" fill="#aaaaaa" ></path><path d="M520.685026 798.355937a62.482203 62.482203 0 0 1-62.482203-62.482203V399.177969a62.482203 62.482203 0 1 1 124.964406 0v336.695765a62.482203 62.482203 0 0 1-62.482203 62.482203z" fill="#aaaaaa" ></path><path d="M520.685026 1003.172599c-53.276492 0-520.685026-5.248505-520.685026-187.446609 0-62.982061 54.776065-111.259976 162.870276-143.584103 33.073913-9.622259 67.855673 8.914128 77.769516 41.98804s-8.872473 67.897327-41.946386 77.769516c-30.324696 9.080747-49.194321 17.619981-60.649392 24.11813 46.32014 26.242525 178.657446 62.19062 382.641012 62.19062s336.320872-35.948094 382.641012-62.19062c-11.455071-6.498149-30.324696-15.037384-60.649392-24.11813a62.482203 62.482203 0 1 1 35.82313-119.757556c108.094211 32.324126 162.870276 80.643697 162.870276 143.584103 0 182.198104-467.408534 187.446609-520.685026 187.446609z m398.886385-175.366717h0.416548-0.416548z" fill="#72B02D" ></path></symbol><symbol id="icon-xuanzhuan" viewBox="0 0 1024 1024"><path d="M378.963454 724.443778l91.182641 163.473426c6.246088 11.212239 2.252687 25.39393-9.010749 31.691216l-163.473427 91.18264c-18.123894 10.085896-39.422029-6.758062-33.739113-26.673866l72.290786-254.707264c5.682916-19.967002 32.663967-23.090045 42.749862-4.966152z" fill="#FC794B" ></path><path d="M414.64807 903.9932c-1.228739 0-2.40628-0.051197-3.635018-0.204789C169.002752 879.367232 0.000003 771.443028 0.000003 641.452727c0-52.221389 27.032248-102.19009 78.127293-144.581571a35.827969 35.827969 0 0 1 50.480676 4.710165 35.827969 35.827969 0 0 1-4.710164 50.480676C100.090998 571.824209 71.727616 603.310634 71.727616 641.452727c0 88.929954 148.984551 171.050647 346.504275 191.068847 19.711014 1.9967 34.046298 19.557422 32.049597 39.268436a35.879166 35.879166 0 0 1-35.633418 32.20319zM608.430381 904.095595c-18.175091 0-33.79031-13.772111-35.633418-32.254387-1.945503-19.711014 12.389781-37.271736 32.100795-39.217239 198.134093-19.813409 347.528224-101.985301 347.528223-191.171242 0-23.550822-10.649068-47.050447-31.58882-69.935703-13.362532-14.59127-12.389781-37.271736 2.20149-50.634268 14.59127-13.362532 37.271736-12.389781 50.634268 2.20149 32.971151 35.9918 50.429479 76.898555 50.429478 118.368481 0 130.297485-169.463527 238.221689-412.088195 262.489276-1.177541 0.102395-2.40628 0.153592-3.583821 0.153592z" fill="#FC794B" ></path><path d="M846.703267 184.413179l-325.308534 184.464377L196.137396 184.413179 521.394733 0z" fill="#BEC5CB" ></path><path d="M521.394733 737.703915l325.308534-184.41318V184.413179l-325.308534 184.464377z" fill="#808487" ></path><path d="M521.394733 737.703915L196.137396 553.290735V184.413179l325.257337 184.464377z" fill="#9CA3A9" ></path></symbol><symbol id="icon-clipping" viewBox="0 0 1024 1024"><path d="M341.930667 201.770667l353.706666 204.245333v408.448l-353.706666-204.245333z" fill="#4A80FF" fill-opacity="0.15" ></path><path d="M320.853333 165.248l396.117334 228.608v457.173333l-395.946667-228.608z m353.749334 252.970667L362.837333 238.336v359.722667l311.466667 179.882666z" fill="#72B02D" ></path><path d="M544.384 746.453333l-211.669333-211.669333 18.688-18.688 211.669333 211.669333z" fill="#72B02D" ></path><path d="M693.717333 530.261333l-266.453333-266.325333 20.906667-20.906667 266.325333 266.453334z" fill="#72B02D" ></path><path d="M688.853333 621.098667l-366.933333-366.933334 24.448-24.704 366.933333 366.933334z" fill="#72B02D" ></path><path d="M689.664 713.856L321.578667 345.770667l24.618666-24.618667 368.085334 368.128z" fill="#72B02D" ></path><path d="M683.605333 799.317333l-355.712-355.712 24.234667-24.234666 355.712 355.712z" fill="#72B02D" ></path><path d="M537.770667 944.938667h-51.2v-418.602667l-362.666667-209.28 25.6-44.330667 362.666667 209.066667 362.666666-209.066667 25.6 44.330667-362.666666 209.066667z" fill="#AAAAAA" ></path><path d="M512.170667 53.461333a31.146667 31.146667 0 0 1 15.488 4.266667l370.090666 213.632a31.232 31.232 0 0 1 15.317334 26.794667v426.922666a31.274667 31.274667 0 0 1-15.317334 26.837334l-369.834666 213.333333a31.488 31.488 0 0 1-31.061334 0l-369.834666-213.333333a31.146667 31.146667 0 0 1-15.914667-26.837334V298.069333a31.146667 31.146667 0 0 1 15.573333-27.008l369.792-213.333333a30.976 30.976 0 0 1 15.701334-4.266667z m349.866666 256l-349.866666-201.642666-349.866667 201.856v403.84l349.866667 201.813333 349.866666-201.898667z" fill="#AAAAAA" ></path></symbol><symbol id="icon-viewReset" viewBox="0 0 1024 1024"><path d="M643.2 515.2c-89.6-67.2-179.2-60.8-268.8 0-32 22.4-67.2 57.6-105.6 89.6 38.4 32 70.4 70.4 108.8 96 28.8 19.2 60.8 32 96 38.4 118.4 19.2 188.8-57.6 268.8-137.6-35.2-28.8-60.8-64-99.2-86.4zM508.8 704c-51.2 0-96-41.6-96-99.2s41.6-105.6 96-105.6 96 41.6 96 99.2c0 64-38.4 105.6-96 105.6z" fill="#AAAAAA" ></path><path d="M515.2 544c-3.2 41.6 12.8 60.8 51.2 51.2 0 32-19.2 57.6-51.2 57.6s-57.6-22.4-51.2-57.6c-6.4-32 16-51.2 51.2-51.2" fill="#AAAAAA" ></path><path d="M652.8 3.2c9.6-3.2 19.2-3.2 28.8 0 9.6 3.2 12.8 12.8 12.8 22.4v108.8c70.4 28.8 131.2 70.4 179.2 128 80 89.6 118.4 214.4 108.8 336-9.6 124.8-70.4 236.8-166.4 313.6-96 80-224 118.4-345.6 108.8-124.8-9.6-243.2-67.2-323.2-160S32 649.6 41.6 524.8c9.6-118.4 70.4-233.6 160-307.2 22.4-19.2 60.8-19.2 80 3.2 19.2 22.4 19.2 57.6-3.2 80-70.4 57.6-115.2 140.8-124.8 233.6s22.4 185.6 80 249.6c60.8 70.4 147.2 115.2 243.2 124.8 96 9.6 188.8-19.2 259.2-80s118.4-140.8 124.8-236.8c9.6-89.6-22.4-185.6-80-249.6-28.8-28.8-57.6-57.6-89.6-76.8v89.6c0 9.6-3.2 19.2-12.8 22.4-9.6 3.2-19.2 3.2-28.8 0l-227.2-160c-3.2-3.2-9.6-12.8-9.6-19.2 0-9.6 3.2-12.8 9.6-19.2L652.8 3.2z" fill="#72B02D" ></path></symbol><symbol id="icon-donghuafangzhen" viewBox="0 0 1024 1024"><path d="M868.864 228.864c-19.968 0-38.912 7.68-53.248 20.992l-291.328-170.496c-7.168-5.12-16.896-5.12-24.064 0L208.896 248.832c-14.336-12.8-33.28-20.48-53.76-20.48-43.52 0-79.872 36.864-79.872 80.896 0 33.792 21.504 63.488 53.248 74.24v318.976c0 9.216 4.608 17.408 12.288 22.016L437.248 896c11.776 30.72 41.472 51.712 74.752 52.224 33.28-0.512 62.464-20.992 74.752-52.224l296.448-171.52c7.68-4.608 12.288-13.312 12.288-22.016V386.048c31.744-11.776 53.248-42.496 53.248-76.288 0-44.032-36.352-80.896-79.872-80.896zM155.136 339.456c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 15.872-12.8 28.672-29.184 29.184zM512 897.024c-16.896 0-29.184-12.288-29.184-29.696 0-14.848 12.288-29.696 29.184-29.696h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 14.848-14.848 29.696-29.184 29.696z m74.752-58.368c-11.776-30.208-40.96-51.712-74.752-51.712-27.136 0-52.224 14.336-67.072 37.376l-3.072 1.024c-4.608 2.048-8.704 5.632-9.728 10.752l-252.416-146.944V384.512C212.48 373.76 234.496 343.04 235.52 308.736l3.072 0.512h2.048c3.584 0 7.168-1.536 10.24-3.584 7.168-5.632 8.192-16.384 2.048-23.552L512 130.56l278.528 162.816c-7.68 36.864 11.264 74.24 45.568 90.624 0.512 5.632 3.584 10.24 8.704 13.312v291.328l-258.048 150.016z m282.112-499.2c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696v2.56c-1.024 14.848-13.824 27.136-29.184 26.624z" fill="#AAAAAA" ></path><path d="M422.912 724.992c-3.072-8.704-12.288-12.8-20.992-9.728-8.704 3.072-12.8 12.8-9.728 21.504l19.968 54.784c2.56 6.656 8.192 10.752 15.36 10.752 2.048 0 3.584-0.512 5.12-1.024 8.704-3.072 12.8-12.8 9.728-21.504l-19.456-54.784zM706.048 507.392c0-107.52-86.016-195.072-192-196.096-2.048-1.536-4.608-2.56-7.68-3.072l-24.064-3.072c-8.192-1.024-15.872 4.096-17.92 11.776-5.632 1.536-11.776 3.584-16.896 5.632 0.512-1.536 1.024-3.072 1.536-5.12 1.024-9.216-5.12-17.408-14.336-18.432l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.608 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l44.032 5.12C384 353.28 351.232 388.608 333.312 432.64c-25.088 60.928-17.92 130.048 18.432 184.832-1.024 3.584-1.024 7.168 0.512 10.24l19.968 54.784c1.024 3.072 3.072 5.632 6.144 7.68 7.168 5.12 17.408 3.072 22.528-4.096 3.072-4.608 3.584-10.24 2.048-15.36l-0.512-1.536c53.76 37.888 123.392 45.568 184.32 19.968 46.08-19.456 82.944-55.808 102.912-101.376l12.8-14.336c6.144-6.656 5.632-17.408-0.512-23.04 2.56-14.336 4.096-28.672 4.096-43.008z m-193.536 156.16C427.52 663.552 358.4 593.92 358.4 507.392c0-86.016 69.12-156.16 154.112-156.16s154.112 69.632 154.112 156.16c0 86.016-69.12 156.16-154.112 156.16z" fill="#72B02D" ></path><path d="M765.44 478.72c-6.144-5.632-15.872-5.632-22.016 0l-32.256 35.84c-4.096 4.608-5.632 11.776-3.072 17.92 2.56 6.144 8.192 9.728 14.848 9.728 4.608 0 8.704-2.048 11.776-5.12l32.256-35.84c5.12-7.168 4.608-16.896-1.536-22.528zM823.296 401.92c-5.632-1.024-11.776 0.512-15.872 5.12l-32.256 35.84c-4.608 4.608-5.632 11.776-3.072 17.92 1.024 2.048 2.56 4.096 4.096 5.632 6.656 6.144 16.896 5.632 23.04-1.536l32.256-35.84c4.096-4.096 5.632-10.752 3.584-16.384-1.024-5.632-5.632-9.728-11.776-10.752zM336.384 321.024c8.704 0 15.872-6.656 16.384-15.36 0.512-8.704-5.632-16.384-14.336-17.408l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.096 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l48.128 5.632h2.048z" fill="#72B02D" ></path></symbol><symbol id="icon-guanjianjiexi" viewBox="0 0 1024 1024"><path d="M298.496 200.704v83.456h-39.936v177.664h137.728V389.12h47.104v245.76h-47.104v-79.872H211.456c-10.752-3.584-54.272-14.336-54.272-57.856V280.064h-32.768V200.704h174.08m47.104-47.104H77.824v177.152h36.352v169.984c0 68.608 61.44 97.792 97.792 104.96H353.28v79.872h141.312V342.016H349.184v72.192h-43.52v-87.04h39.936V153.6zM627.712 389.12v79.872H812.544c10.752 3.584 54.272 14.336 54.272 54.272V740.352h32.768v83.456h-173.568v-83.456h39.936v-177.664h-137.728V634.88h-47.104V389.12h46.592m47.104-47.104h-141.312v340.48h141.312v-72.192h43.52v83.456h-39.936V870.4h267.776v-177.152h-36.352v-169.984c0-68.608-61.44-97.792-97.792-104.96H670.72V342.528h4.096z" fill="#AAAAAA" ></path></symbol><symbol id="icon-gongyishengcheng" viewBox="0 0 1024 1024"><path d="M889.344 391.68h29.696v-43.008h-208.896l1.024 45.056 28.16 3.072v20.992c55.808 5.632 108.032 28.672 150.016 66.56-0.512 0 0-92.672 0-92.672z m-366.592 102.912c13.312-13.312 27.648-24.576 43.008-34.816-2.048-70.144-5.632-153.088-8.704-179.712-5.632-48.64-34.816-204.288-226.816-202.752-191.488 1.536-223.744 164.864-230.912 207.36s-11.776 197.632-11.776 197.632h-24.576v43.008l208.896 1.024v-40.96h-24.064V316.928S245.76 230.912 335.36 231.424C424.448 232.448 415.232 327.68 414.72 327.68v313.856c4.608 0 6.144 77.824 50.176 144.896-13.312-32.256-20.48-67.072-20.48-102.912 0-71.168 27.648-138.24 78.336-188.928z" fill="#AAAAAA" ></path><path d="M75.264 601.6h31.232v281.088s41.984 29.184 141.824 0v-274.944l29.184-2.56v-44.032H75.264v40.448zM906.24 263.168h-29.184l1.024-188.416s-53.76-27.648-144.384 0l1.024 192-31.744 1.024V307.2h203.776l-0.512-44.032z" fill="#AAAAAA" ></path><path d="M934.912 627.712c-9.216-4.608-20.48-2.048-29.184 6.656l-21.504 21.504c-9.216 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l21.504-21.504c8.704-8.704 11.264-19.968 6.656-29.184-5.632-10.752-18.432-15.36-34.304-13.312-25.6 4.096-48.64 15.36-66.56 33.792-27.136 27.136-39.424 65.536-33.792 103.936l-178.176 178.176c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l178.176-178.176c37.888 6.144 76.288-6.656 103.936-33.792 17.92-17.92 29.696-41.472 33.792-66.56 2.048-15.872-2.56-28.672-13.312-34.304z m-9.728 30.72c-3.072 20.48-12.8 38.912-27.136 53.76-23.04 23.04-56.32 33.28-89.088 26.624l-6.144-1.536-186.88 186.88c-8.704 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l186.88-186.88-1.536-6.144c-6.656-32.256 3.072-65.536 26.624-89.088 14.848-14.848 33.28-24.064 53.76-27.136 1.536-0.512 3.072-0.512 4.608-0.512 2.56 0 4.608 0.512 5.12 1.024-0.512 0.512-1.024 1.536-2.048 2.56l-21.504 21.504c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l21.504-21.504c1.024-1.024 2.048-1.536 2.56-2.048 0.512 1.536 1.024 4.608 0.512 9.728z" fill="#72B02D" ></path><path d="M560.64 870.912c-12.8 12.8-12.8 33.28 0 45.568 6.144 6.144 14.336 9.216 23.04 9.216s16.896-3.072 23.04-9.216c6.144-6.144 9.728-14.336 9.728-23.04 0-8.704-3.584-16.896-9.728-23.04-12.8-12.288-33.792-12.288-46.08 0.512z m28.672 28.672c-3.072 3.072-8.704 3.072-11.776 0-3.072-3.072-3.072-8.704 0-11.776 1.536-1.536 3.584-2.56 6.144-2.56 2.048 0 4.096 1.024 6.144 2.56 1.536 1.536 2.56 3.584 2.56 6.144-0.512 2.048-1.536 4.096-3.072 5.632z m225.28-107.008c-4.096-4.096-10.24-4.096-14.336 0l-43.52 43.52c-4.096 4.096-4.096 10.24 0 14.336l102.4 102.4c15.872 15.872 41.984 15.872 57.856 0 15.872-15.872 15.872-41.984 0-57.856l-102.4-102.4z m-237.056-150.528l70.656 70.656 28.672-28.672-70.656-70.656-15.872-30.208-50.688-36.352-28.672 28.672 36.352 50.688 30.208 15.872z" fill="#72B02D" ></path></symbol><symbol id="icon-mojupipei" viewBox="0 0 1024 1024"><path d="M880.64 117.248c32.768 0 58.88 23.04 64.512 54.784l1.024 7.68v663.04c0.512 31.744-22.528 58.368-53.76 62.464l-7.68 1.024H151.552c-34.816 0-66.048-22.528-72.192-53.248l-1.024-6.656V183.296c0-31.744 27.648-59.904 61.952-65.024l7.168-1.024h142.848c24.064 0 44.032 16.896 48.64 39.936l1.024 6.656V406.528c0 7.68 5.12 14.848 12.288 16.896l3.584 0.512H424.96c13.312 0 25.088 9.216 29.184 22.528 6.144 23.552 33.792 46.08 58.368 46.08 22.528 0 48.128-19.456 55.808-39.424l2.048-5.632c2.048-10.24 9.216-18.432 19.456-21.504l5.12-1.024 3.072-0.512h71.168c6.144 0 11.776-3.584 14.336-9.728l1.024-3.584V164.864c0-23.04 15.872-41.984 37.888-46.592l6.144-1.024H880.64zM273.92 184.32H151.552l-2.048 0.512-2.048 0.512-2.56 1.536-1.536 649.728 3.072 1.536 3.072 1.024h1.024l328.192 3.072 2.048-286.72-2.048-0.512-10.24-3.584c-24.576-10.24-45.568-27.136-60.928-49.152l-6.144-9.216 1.024-1.536H349.184c-37.888-4.096-68.608-33.792-74.24-71.68l-1.024-8.192v-4.096V184.32z m476.16-3.072V409.6l-0.512 8.704c-3.584 36.864-32.256 66.56-68.608 72.192l-8.192 1.024h-4.096l-45.568-1.536-6.144 9.728c-14.848 22.528-36.352 40.448-61.44 51.2l-10.752 4.096-3.072 284.16h337.408v-655.36l-129.024-2.56z" fill="#AAAAAA" ></path></symbol><symbol id="icon-buchangshezhi" viewBox="0 0 1024 1024"><path d="M792.576 75.264h-686.08c-17.408 0-31.232 13.824-31.232 31.232v686.08c0 17.408 13.824 31.232 31.232 31.232h436.736c17.408 0 31.232-13.824 31.232-31.232s-13.824-31.232-31.232-31.232H137.728V262.656h624.128v280.576c0 17.408 13.824 31.232 31.232 31.232s31.232-13.824 31.232-31.232V106.496c-0.512-17.408-14.336-31.232-31.744-31.232z" fill="#AAAAAA" ></path><path d="M792.576 948.736c-17.408 0-31.232-13.824-31.232-31.232v-93.696h-93.696c-17.408 0-31.232-13.824-31.232-31.232 0-17.408 13.824-31.232 31.232-31.232h93.696v-93.696c0-17.408 13.824-31.232 31.232-31.232 17.408 0 31.232 13.824 31.232 31.232v93.696h93.696c17.408 0 31.232 13.824 31.232 31.232 0 17.408-13.824 31.232-31.232 31.232h-93.696v93.696c0 17.408-13.824 31.232-31.232 31.232z" fill="#72B02D" ></path><path d="M372.224 518.144l-110.08 110.08c-20.992 20.992-20.992 55.296 0 76.288s55.296 20.992 76.288 0l110.08-110.08c-16.896-6.144-32.768-15.872-46.592-29.696-13.824-13.312-23.552-29.696-29.696-46.592z m-57.856 162.304c-7.68 7.68-20.48 7.68-28.672 0-7.68-7.68-7.68-20.48 0-28.672 7.68-7.68 20.48-7.68 28.672 0 7.68 8.192 7.68 20.992 0 28.672z m340.48-292.864L592.384 450.56c-20.992 20.992-55.296 20.992-76.288 0s-20.992-55.296 0-76.288l62.976-62.976c-51.712-8.704-116.224 14.848-151.552 50.176-49.152 49.152-49.152 128.512 0 177.664s129.024 49.152 177.664 0c35.328-35.328 58.368-99.84 49.664-151.552z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shuchujiagongchengxu" viewBox="0 0 1024 1024"><path d="M876.544 473.6v374.272c0 16.384-13.312 29.696-29.696 29.696h-522.24c-16.384 0-29.696-13.312-29.696-29.696V503.296c0-16.384 13.312-29.696 29.696-29.696h551.936m40.96-70.656H253.952c-16.384 0-29.696 13.312-29.696 29.696v486.4c0 16.384 13.312 29.696 29.696 29.696h663.552c16.384 0 29.696-13.312 29.696-29.696v-486.4c0-16.384-13.312-29.696-29.696-29.696z" fill="#AAAAAA" ></path><path d="M489.984 211.968H814.08l-41.984-41.984c-13.824-13.824-13.824-36.352 0-50.176 13.824-13.824 36.352-13.824 50.176 0L947.712 245.76l-0.512 0.512 0.512 0.512-125.952 125.952c-13.824 13.824-36.352 13.824-50.176 0-13.824-13.824-13.824-36.352 0-50.176l38.912-38.912H489.472c-19.456 0-35.328-15.872-35.328-35.328 0.512-20.48 16.384-36.352 35.84-36.352z" fill="#72B02D" ></path><path d="M531.456 717.824c0-11.776-7.68-22.016-18.944-25.6l-55.808-16.896-14.848-4.608 14.848-4.608 55.808-16.896c11.264-3.584 18.944-13.824 18.944-25.6v-2.048c0-18.432-17.92-31.232-35.328-25.088L363.52 641.024c-10.752 3.584-17.92 13.824-17.92 25.088v8.192c0 11.264 7.168 21.504 17.92 25.088l132.608 45.568c17.408 6.144 35.328-7.168 35.328-25.088v-2.048z m123.392-96.768v2.048c0 11.776 7.68 22.016 18.944 25.6l56.32 16.896 14.848 4.608-14.848 4.608-56.32 16.896c-11.264 3.584-18.944 13.824-18.944 25.6v2.56c0 18.432 17.92 31.232 35.328 25.088l132.608-45.568c10.752-3.584 17.92-13.824 17.92-25.088v-8.192c0-11.264-7.168-21.504-17.92-25.088l-132.608-45.568c-17.408-6.144-35.328 7.168-35.328 25.6z m-54.784-64l-70.144 248.32c-4.608 16.896 8.192 33.792 25.6 33.792 11.776 0 22.528-8.192 25.6-19.456l70.144-248.32c4.608-16.896-8.192-33.792-25.6-33.792-11.776 0-22.016 8.192-25.6 19.456zM147.456 814.08V173.056c0-14.848 11.776-26.624 26.624-26.624h463.872c19.456 0 35.328-15.872 35.328-35.328 0-19.456-15.872-35.328-35.328-35.328H107.008c-16.896 0-30.72 13.824-30.72 30.72v748.032c0 16.896 13.824 30.72 30.72 30.72h40.448c19.456 0 35.328-15.872 35.328-35.328 0.512-19.968-15.36-35.84-35.328-35.84z" fill="#AAAAAA" ></path></symbol><symbol id="icon-guanjiekongzhi" viewBox="0 0 1024 1024"><path d="M648.192 377.344h-71.68c-18.432 0-33.792-14.848-33.792-33.792H366.592c12.288-30.72 25.088-80.896 0-134.656H542.72c0-18.432 15.36-33.792 33.792-33.792h67.584c1.536 0 2.56 0 4.096 0.512L719.36 87.04c10.752-13.312 29.184-16.384 44.032-7.68l168.96 100.864c15.872 9.728 20.992 30.208 11.776 46.08-9.728 15.872-30.208 20.992-46.592 11.264l-143.872-85.504L677.888 245.76v61.44l75.776 93.696 143.872-85.504c15.872-9.728 36.864-4.608 46.592 11.776 9.728 15.872 4.608 36.352-11.264 46.08h-0.512l-168.96 100.864c-14.336 8.704-33.28 5.12-44.032-7.68l-71.168-89.088zM319.488 780.8L102.912 415.744c76.8 69.632 185.344 48.64 231.424-13.312l222.72 378.368H711.68c18.432 0 33.792 14.848 33.792 33.792v100.864c0 18.432-15.36 33.792-33.792 33.792H170.496c-18.432 0-33.792-14.848-33.792-33.792v-100.864c0-18.432 15.36-33.792 33.792-33.792h148.992z" fill="#AAAAAA" ></path><path d="M204.288 148.48C133.12 148.48 75.264 205.824 75.264 276.48S133.12 404.48 204.288 404.48c71.168 0 129.024-57.344 129.024-128S275.456 148.48 204.288 148.48z m0 202.752c-41.472 0-74.752-33.28-74.752-74.752 0-40.96 33.792-74.24 74.752-74.24C245.76 202.24 279.04 235.52 279.04 276.48c0 41.472-33.792 75.264-74.752 74.752z" fill="#72B02D" ></path></symbol><symbol id="icon-jiegoushu" viewBox="0 0 1024 1024"><path d="M233.984 472.064h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44v238.08h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V233.984h-39.936c-22.016 0-39.936-17.92-39.936-39.936V115.2c0-22.016 17.92-39.936 39.936-39.936h158.72c22.016 0 39.936 17.92 39.936 39.936V194.56c0 22.016-17.92 39.936-39.936 39.936h-39.936v237.568z" fill="#AAAAAA" ></path><path d="M551.936 75.264h317.44c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V154.624c-0.512-44.032 35.328-79.36 79.36-79.36z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaitui" viewBox="0 0 1024 1024"><path d="M512 148.992c199.68 0 361.984 162.304 361.984 361.984S711.68 872.448 512 872.448s-361.984-162.304-361.984-361.984S312.32 148.992 512 148.992m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M670.72 456.192v109.056l-75.264-54.784L670.72 456.192m25.6-102.912c-10.24 0-20.992 3.072-30.208 10.24l-144.896 105.472c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-52.224-52.224z" fill="#72B02D" ></path><path d="M499.712 456.192v109.056L424.96 510.976l74.752-54.784m26.112-102.912c-10.24 0-20.992 3.072-30.208 10.24L350.208 468.992c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-51.712-52.224z" fill="#72B02D" ></path><path d="M314.368 381.44c-21.504 0-38.912 17.408-38.912 38.912v181.248c0 21.504 17.408 38.912 38.912 38.912s38.912-17.408 38.912-38.912V420.352c0-21.504-17.408-38.912-38.912-38.912z" fill="#72B02D" ></path></symbol><symbol id="icon-bofang" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M491.008 445.952l115.712 66.048-115.712 66.048V445.952m-23.552-87.04c-24.576 0-46.592 19.456-46.592 46.592v212.48c0 27.136 22.528 46.592 46.592 46.592 7.68 0 15.36-2.048 23.04-6.144l185.856-106.496c31.232-17.92 31.232-62.976 0-80.896L490.496 365.056c-7.168-4.096-15.36-6.144-23.04-6.144z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaijin" viewBox="0 0 1024 1024"><path d="M515.584 151.04c199.168 0 360.96 161.792 360.96 360.96s-161.792 360.96-360.96 360.96-360.96-161.792-360.96-360.96 161.792-360.96 360.96-360.96m0-74.752c-240.64 0-435.712 195.072-435.712 435.712s195.072 435.712 435.712 435.712 435.712-195.072 435.712-435.712-195.072-435.712-435.712-435.712z" fill="#AAAAAA" ></path><path d="M358.912 458.24L433.152 512l-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432L363.52 366.592c-9.216-6.656-19.456-9.728-29.696-9.728z" fill="#72B02D" ></path><path d="M527.36 458.24l74.24 53.76-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432l-142.848-103.936c-9.216-7.168-19.968-10.24-29.696-10.24z" fill="#72B02D" ></path><path d="M710.144 384.512c-20.992 0-38.4 17.408-38.4 38.4v178.688c0 20.992 17.408 38.4 38.4 38.4s38.4-17.408 38.4-38.4V422.912c0-21.504-17.408-38.4-38.4-38.4z" fill="#72B02D" ></path></symbol><symbol id="icon-zanting" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M416.768 353.28c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c-0.512-21.504-17.92-39.424-39.936-39.424z m190.464 0c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c0-21.504-17.92-39.424-39.936-39.424z" fill="#72B02D" ></path></symbol><symbol id="icon-zhongzhi" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M580.096 421.376c12.288 0 22.528 10.24 22.528 22.528v136.192c0 12.288-10.24 22.528-22.528 22.528H443.904c-12.288 0-22.528-10.24-22.528-22.528V443.904c0-12.288 10.24-22.528 22.528-22.528h136.192m0-68.096H443.904C393.728 353.28 353.28 393.728 353.28 443.904v136.192c0 50.176 40.448 90.624 90.624 90.624h136.192c50.176 0 90.624-40.448 90.624-90.624V443.904c0-50.176-40.448-90.624-90.624-90.624z" fill="#72B02D" ></path></symbol><symbol id="icon-suoxiao" viewBox="0 0 1024 1024"><path d="M491.008 463.36c32.256 0 58.88-26.112 58.88-58.88s-26.112-58.88-58.88-58.88H285.696c-32.256 0-58.88 26.112-58.88 58.88s26.112 58.88 58.88 58.88h205.312z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848 13.312 0 26.112-5.12 36.352-14.848 19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangda" viewBox="0 0 1024 1024"><path d="M488.96 333.824h-47.104V286.72c0-34.816-28.16-62.976-62.976-62.976-34.816 0-62.976 28.16-62.976 62.976v47.104h-47.104c-34.816 0-62.976 28.16-62.976 62.976s28.16 62.976 62.976 62.976h47.104V506.88c0 34.816 28.16 62.976 62.976 62.976 34.816 0 62.976-28.16 62.976-62.976v-47.104h47.104c34.816 0 62.976-28.16 62.976-62.976 0-34.304-28.16-62.976-62.976-62.976z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangdazhichuangkou" viewBox="0 0 1024 1024"><path d="M949.248 858.624l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 142.848-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.616-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-96.768 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M216.576 919.04h109.056v-102.912H216.576c-29.696 0-53.76-24.064-53.76-53.76V233.984c0-29.696 24.064-53.76 53.76-53.76H798.72c29.696 0 53.76 24.064 53.76 53.76v81.92h102.912v-81.92c0-86.528-70.144-156.672-156.672-156.672H216.576c-86.528 0-156.672 70.144-156.672 156.672v528.384c0 86.528 70.144 156.672 156.672 156.672z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shiyingpingmu" viewBox="0 0 1024 1024"><path d="M876.032 75.264H147.968c-39.936 0-72.704 32.768-72.704 72.704v728.064c0 39.936 32.768 72.704 72.704 72.704h728.064c39.936 0 72.704-32.768 72.704-72.704V147.968c0-39.936-32.768-72.704-72.704-72.704z m0 764.416c0 22.016-14.336 36.352-36.352 36.352H184.32c-22.016 0-36.352-14.336-36.352-36.352V184.32c0-22.016 14.336-36.352 36.352-36.352h655.36c22.016 0 36.352 14.336 36.352 36.352v655.36z" fill="#AAAAAA" ></path><path d="M329.728 184.32H220.672c-3.584 0-10.752 0-14.336 3.584-7.168 3.584-14.336 10.752-18.432 18.432-3.584 3.584-3.584 10.752-3.584 14.336v109.056c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352v-22.016l47.104 47.104c7.168 7.168 14.336 10.752 25.6 10.752 10.752 0 18.432-3.584 25.6-10.752 14.336-14.336 14.336-36.352 0-51.2l-47.104-47.104h22.016c22.016 0 36.352-14.336 36.352-36.352 0-21.504-14.848-35.84-36.864-35.84zM329.728 766.976h-22.016l47.104-47.104c14.336-14.336 14.336-36.352 0-51.2-14.336-14.336-36.352-14.336-51.2 0l-47.104 47.104v-22.016c0-22.016-14.336-36.352-36.352-36.352s-36.352 14.336-36.352 36.352v109.056c0 3.584 0 10.752 3.584 14.336 3.584 7.168 10.752 14.336 18.432 18.432 3.584 3.584 10.752 3.584 14.336 3.584h109.056c22.016 0 36.352-14.336 36.352-36.352s-13.824-35.84-35.84-35.84zM817.664 187.904c-3.584-3.584-10.752-3.584-14.336-3.584h-109.056c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h22.016l-47.104 47.104c-14.336 14.336-14.336 36.352 0 51.2 7.168 7.168 14.336 10.752 25.6 10.752s18.432-3.584 25.6-10.752l47.104-47.104v22.016c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352V220.672c0-3.584 0-10.752-3.584-14.336-4.096-7.68-11.264-14.848-18.944-18.432zM803.328 657.408c-22.016 0-36.352 14.336-36.352 36.352v22.016l-47.104-47.104c-14.336-14.336-36.352-14.336-51.2 0-14.336 14.336-14.336 36.352 0 51.2l47.104 47.104h-22.016c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h109.056c3.584 0 10.752 0 14.336-3.584 7.168-3.584 14.336-10.752 18.432-18.432 3.584-3.584 3.584-10.752 3.584-14.336v-109.056c0.512-22.016-13.824-36.864-35.84-36.864z" fill="#72B02D" ></path></symbol><symbol id="icon-yangshitu-01" viewBox="0 0 1024 1024"><path d="M645.632 882.688H150.528l252.928-204.8 477.696 0.512z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512z m-542.72 23.552H880.64l-234.496 203.264-228.864 0.512V140.8z m0 247.296l217.088-0.512-1.024 247.296H417.28V388.096z m-43.008-223.744v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m532.48 493.568H150.528l252.928-204.288 477.696 0.512-235.52 203.776z m271.36-247.808h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-zuoshitu-01" viewBox="0 0 1024 1024"><path d="M374.272 644.096l-262.656 211.968L112.64 373.76l261.632-209.408z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM112.64 373.76l261.632-209.408v479.744l-263.168 211.968L112.64 373.76z m520.192 507.904l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-qianshitu-01" viewBox="0 0 1024 1024"><path d="M112.64 389.12h520.704v493.056H112.64z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m259.584 717.824H112.64V389.12h520.704v493.056z m12.288-537.6l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-youshitu-01" viewBox="0 0 1024 1024"><path d="M916.992 659.456l-239.616 196.096V375.808l239.616-208.896z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m270.848 314.88l-239.104 196.096V375.808l239.104-208.896v492.544z" fill="#AAAAAA" ></path></symbol><symbol id="icon-houshitu-01" viewBox="0 0 1024 1024"><path d="M960 118.784V117.76v-1.024-1.024-1.024-0.512-0.512c1.536 7.68-1.024 15.872-6.656 20.992L677.376 373.76v299.52h-43.008V389.12H374.272v254.976l-262.656 211.968L112.64 389.12l261.632-0.512v-42.496h269.824l280.064-243.2c3.072-2.56 6.656-4.096 10.752-5.12H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c-0.512 0.512-0.512 1.024-1.024 2.048 0 0.512 0 0.512-0.512 1.024 0 0.512 0 0.512-0.512 1.024 0 0.512 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V907.264c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024c0 0.512 0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024s0 0.512 0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-242.176 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V658.944v-2.048V118.272c1.536 1.024 1.536 1.024 1.536 0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m258.56 717.312l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m44.544-26.112v-177.664H880.64l-203.264 177.664z m281.6-741.376v-0.512-0.512 1.024z" fill="#AAAAAA" ></path><path d="M916.992 634.88h-239.616V375.808l239.616-211.456zM644.096 346.112H417.28V141.824h462.336zM417.28 389.12H634.88v245.76H417.28z" fill="#72B02D" ></path><path d="M958.976 114.176c0 0.512 0.512 0.512 0 0z m-20.48-16.384H945.152l0.512 0.512 0.512 0.512h1.024l0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512c0 0.512 0.512 0.512 0.512 1.024s0 0.512 0.512 0.512c0 0.512 0.512 1.024 0.512 1.536 0 0.512 0.512 1.024 0.512 1.024-3.072-10.24-13.312-16.896-24.064-14.848h4.608v1.024z" fill="#C1272D" ></path></symbol><symbol id="icon-dingshitu-01" viewBox="0 0 1024 1024"><path d="M880.64 140.8l-234.496 203.776-497.664 1.536 256-206.336z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-497.664 1.536 256-205.824 476.16 1.024-234.496 203.264z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-toushitu-01" viewBox="0 0 1024 1024"><path d="M965.632 114.176V112.64v-1.024-0.512-1.024-0.512s0-0.512-0.512-1.024v-0.512c-0.512-1.024-0.512-2.048-1.024-3.072v-0.512c0-0.512-0.512-0.512-0.512-1.024s0-0.512-0.512-0.512l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512s-0.512-1.024-1.024-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024s-0.512 0-0.512-0.512c0 0-0.512 0-0.512-0.512H950.784h-0.512H392.704c-5.12 0-9.728 1.536-13.312 4.608l-312.32 251.392-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536 0 0 0 0.512-0.512 0.512 0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024c0 0.512 0 0.512-0.512 1.024s0 0.512 0 1.024 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V912.896c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024l0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512 0 0.512 0.512 0.512 1.024 1.024l0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512h583.168c7.68 0 14.848-4.096 18.432-10.752L957.44 675.84l1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V661.504v-1.536V658.432l1.024-544.256zM372.736 343.04l-229.888 0.512L372.736 158.72v184.32z m43.008 43.008l220.672-0.512-0.512 251.392h-220.16v-250.88z m-43.008 0v260.096l-267.264 215.552 1.536-474.624 265.728-1.024z m-227.84 502.272l257.024-208.384h233.984l-0.512 206.848-490.496 1.536z m503.296-545.792l-172.544 0.512H415.232V135.68h471.04l-238.08 206.848z m31.232 337.408h207.36l-207.36 181.248v-181.248z m0-43.008V373.76l243.2-212.48v475.648h-243.2z" fill="#AAAAAA" ></path></symbol><symbol id="icon-a-jixiebi3" viewBox="0 0 1024 1024"><path d="M483.386004 821.695719H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M483.386004 776.399147H164.779715l29.075502 22.648286h260.455285l29.075502-22.648286z" fill="#7A807D" ></path><path d="M483.386004 776.399147H164.779715l29.075502-22.648285h260.455285l29.075502 22.648285z" fill="#3F3F3F" ></path><path d="M483.386004 730.796518H164.779715l29.075502 22.954344h260.455285l29.075502-22.954344zM483.386004 685.499947H164.779715l29.075502 22.648285h260.455285l29.075502-22.648285z" fill="#7A807D" ></path><path d="M483.386004 730.796518H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M150.701051 623.064132h339.418227v62.435815H150.701051z" fill="#F7A53F" ></path><path d="M150.701051 821.695719h339.418227v31.217907H150.701051z" fill="#FFFFFF" ></path><path d="M607.951575 339.654504a74.984189 74.984189 0 0 1-23.872517 103.447575 75.290247 75.290247 0 0 1-103.753633-23.872518L293.324039 120.823095A75.290247 75.290247 0 0 1 317.196557 17.069462a75.290247 75.290247 0 0 1 103.753633 23.872517zM441.762128 517.474152v105.58998H198.752144v-105.58998a122.423166 122.423166 0 1 1 244.846331 0z" fill="#FFC200" ></path><path d="M627.233224 377.605685a103.141517 103.141517 0 0 1-52.948019 82.635637l-165.88339 118.750471-2.448463 1.836347a112.93537 112.93537 0 1 1-112.017197-194.346775l195.571007-84.471985a132.523077 132.523077 0 0 1 48.357151-12.854432A89.062853 89.062853 0 0 1 627.233224 377.605685z" fill="#FFE610" ></path><path d="M401.056425 493.601635a71.005436 71.005436 0 1 1-71.005436-71.311494 71.005436 71.005436 0 0 1 71.005436 71.311494z" fill="#FFFFFF" ></path><path d="M375.34756 493.601635a45.296571 45.296571 0 1 1-45.296571-45.60263 45.296571 45.296571 0 0 1 45.296571 45.60263z" fill="#48B8BF" ></path><path d="M592.342622 376.381453a49.88744 49.88744 0 1 1-49.581382-49.88744 49.88744 49.88744 0 0 1 49.581382 49.88744z" fill="#FFFFFF" ></path><path d="M574.285205 376.381453a30.605791 30.605791 0 1 1-30.605792-30.605791 30.605791 30.605791 0 0 1 30.605792 30.605791z" fill="#48B8BF" ></path><path d="M731.048068 230.789704l165.975207-62.099151 18.883774 50.46895-165.975207 62.068545z" fill="#FFE610" ></path><path d="M734.047436 202.785404l145.836596-54.294674 9.426584 25.31099-145.867202 54.294674z" fill="#F7A53F" ></path><path d="M808.419509 259.161272l23.872517 63.353988 31.523966 35.808776-19.893765 18.057417-48.051092-38.257239-27.851271-63.660046 40.399645-15.302896zM854.940312 242.022029l23.56646 63.04793-0.306058 47.745035 26.627038 0.612116 11.324143-60.293409-20.811938-66.414568-40.399645 15.302896zM716.173654 94.379691l102.345766-38.257239 37.216643 99.468822-102.345767 38.257239z" fill="#7A807D" ></path><path d="M841.473764 83.790087a66.108509 66.108509 0 0 1-65.802452 66.10851l-407.669142 15.608953a67.944857 67.944857 0 0 1-11.324142 0 82.635637 82.635637 0 0 1 0-165.271273 67.944857 67.944857 0 0 1 11.324142 0l407.669142 17.445301A66.108509 66.108509 0 0 1 841.473764 83.790087z" fill="#FFE610" ></path><path d="M402.892773 83.790087a46.520803 46.520803 0 1 1-46.520803-46.214745A46.520803 46.520803 0 0 1 402.892773 83.790087z" fill="#FFFFFF" ></path><path d="M386.059587 83.790087a30.605791 30.605791 0 1 1-30.605791-30.605791 30.605791 30.605791 0 0 1 30.605791 30.605791z" fill="#48B8BF" ></path><path d="M810.867972 83.790087a38.257239 38.257239 0 1 1-39.787528-38.257239A38.257239 38.257239 0 0 1 810.867972 83.790087z" fill="#FFFFFF" ></path><path d="M795.565077 83.790087a24.484633 24.484633 0 1 1-24.484633-24.484633 24.484633 24.484633 0 0 1 24.484633 24.484633z" fill="#48B8BF" ></path><path d="M106.93477 852.913626h639.66104v171.086374H106.93477z" fill="#FFE610" ></path><path d="M383.305066 709.678522h337.275822v207.201208H383.305066z" fill="#4D4D4D" ></path><path d="M407.177584 732.02075h291.061076v161.904636H407.177584z" fill="#FFFFFF" ></path><path d="M429.825869 755.893267h159.150116v16.22107h-159.150116zM429.825869 784.356653h131.604903v16.22107h-131.604903zM429.825869 812.820039h199.855818v16.22107h-199.855818zM429.825869 841.283425h146.601741v16.22107h-146.601741z" fill="#92D5D2" ></path><path d="M507.564579 732.326808l-31.830023 161.904636H407.177584v-161.904636h100.386995z" fill="#F5F5F5" opacity=".5" ></path><path d="M474.816383 916.87973h155.783478v31.830023h-155.783478z" fill="#7A807D" ></path><path d="M106.93477 977.173139h639.66104v46.826861H106.93477z" fill="#F7A53F" ></path><path d="M252.006221 899.740487h66.414567v48.969266H252.006221z" fill="#7A807D" ></path><path d="M319.64502 817.716966l-3.672695 11.324143-21.730112 70.699378h-21.730112l23.872518-76.820537 3.366637-11.324143 19.893764 6.121159z" fill="#999999" ></path><path d="M341.069074 809.147344A28.463386 28.463386 0 1 1 321.17531 773.950684a28.463386 28.463386 0 0 1 19.893764 35.19666z" fill="#48B8BF" ></path><path d="M322.705599 793.538391a13.16049 13.16049 0 1 1-26.014923 0 13.16049 13.16049 0 0 1 26.014923 0z" fill="#FFFFFF" ></path><path d="M165.085773 899.740487h66.414568v49.275324H165.085773z" fill="#7A807D" ></path><path d="M163.861542 817.716966l3.366637 11.324143 22.03617 70.699378h21.730111l-23.872517-76.820537-3.672695-11.324143-19.587706 6.121159z" fill="#999999" ></path><path d="M142.437488 809.147344a28.157328 28.157328 0 1 0 18.669532-35.19666 28.157328 28.157328 0 0 0-18.669532 35.19666z" fill="#F7A53F" ></path><path d="M160.800963 793.538391a13.16049 13.16049 0 1 0 12.854432-12.854433 12.854432 12.854432 0 0 0-12.854432 12.854433z" fill="#FFFFFF" ></path></symbol><symbol id="icon-jixiebi2" viewBox="0 0 1164 1024"><path d="M848.55632 485.108049h233.370249v430.146938h-233.370249z" fill="#FFE610" ></path><path d="M974.217224 605.245396h154.314351v64.211341h-154.314351zM974.217224 689.82485h154.314351v64.211341h-154.314351zM974.217224 774.749527h154.314351v64.211341h-154.314351z" fill="#54D9D9" ></path><path d="M306.557369 245.869021l99.078789 31.760448 69.389675 22.094225 145.683794 46.259783 69.734897 22.094225 119.101681 37.974449 66.627896 21.058558 1.035667-2.761778 21.749003-69.044453 23.129891-72.151453-22.784669-7.249667-79.746343-25.201225-20.368113-6.559223-337.972595-107.364124-21.40378-6.904445-87.686455-27.617781-45.224116 142.576794-0.345222 1.035667z" fill="#FFE610" ></path><path d="M412.33347 357.755556l10.70189-33.555604 441.470229 140.401894-10.667368 33.555604z" fill="#A3A3A3" ></path><path d="M380.331366 357.686512l25.408359-79.953476 69.424197 22.094225-25.408359 79.918953zM595.508402 425.626253l25.408359-79.953476 69.389674 22.059703-25.373836 79.953476z" fill="#3F3F3F" ></path><path d="M809.200982 411.575707a144.302906 144.302906 0 0 0 4.833112 37.284004 138.088905 138.088905 0 0 0 18.987224 43.152783 144.302906 144.302906 0 0 0 15.535002 19.677669 146.719461 146.719461 0 0 0 256.154919-100.114456 144.648128 144.648128 0 0 0-34.522226-94.5909 180.206021 180.206021 0 0 0-15.880224-16.570668 146.719461 146.719461 0 0 0-96.317012-34.522227 148.445573 148.445573 0 0 0-58.687784 10.356668 146.719461 146.719461 0 0 0-89.757788 129.803571 34.522226 34.522226 0 0 0-0.345223 5.523556z" fill="#FFC200" ></path><path d="M876.174101 411.575707A80.091565 80.091565 0 1 0 956.265666 331.484142a80.091565 80.091565 0 0 0-80.091565 80.091565z" fill="#FFFFFF" ></path><path d="M904.827549 411.575707a51.438117 51.438117 0 1 0 51.438117-51.092895 51.438117 51.438117 0 0 0-51.438117 51.092895z" fill="#54D9D9" ></path><path d="M218.076903 216.594173l37.007826-117.202958 88.894733 28.06657L306.902591 244.660743zM86.512699 119.345062l92.450522-16.467102 19.401491 108.745013-92.450522 16.467102z" fill="#8A8A8A" ></path><path d="M0 65.317778l45.224116 254.083585 21.058558-3.797445 31.415226-5.523556 22.094225-4.142667-13.808891-77.675009-19.332446-109.090235-12.082779-67.318341-14.499335 2.761778-21.403781 3.797445-38.664893 6.904445z" fill="#292929" ></path><path d="M95.626567 436.43171l16.570668-3.107-14.499335-123.244348-31.415226 5.523556 29.343893 120.827792z" fill="#7A807D" ></path><path d="M138.088905 153.349455a80.782009 80.782009 0 0 0 31.070003 63.520896 79.40112 79.40112 0 0 0 49.021562 16.915891 75.258453 75.258453 0 0 0 32.10567-6.904445 80.091565 80.091565 0 0 0 48.331117-73.532342 78.710676 78.710676 0 0 0-13.808891-44.18845 76.984564 76.984564 0 0 0-31.760448-27.617781l-7.59489-3.452222a83.543787 83.543787 0 0 0-12.428001-3.452223H217.835247A80.091565 80.091565 0 0 0 138.088905 153.349455z" fill="#FFC200" ></path><path d="M167.087575 153.694677A51.092895 51.092895 0 1 0 217.835247 103.637449a50.747673 50.747673 0 0 0-50.747672 50.057228z" fill="#FFFFFF" ></path><path d="M185.384355 153.694677a32.450893 32.450893 0 1 0 32.450892-34.522226 32.450893 32.450893 0 0 0-32.450892 34.522226z" fill="#54D9D9" ></path><path d="M38.664893 58.413333l21.403781-3.797445C66.627897 19.74844 108.745013 11.117883 141.88635 14.915328a89.757788 89.757788 0 0 1 81.472454 58.687784h9.321001a83.543787 83.543787 0 0 1 12.428001 3.452223l7.59489 3.452223c53.854673-42.807561 165.016241-17.951558 187.110466 48.331116l21.40378 6.904446C439.813162 59.449 307.593036 24.581551 241.655583 69.115223a113.923346 113.923346 0 0 0-108.745012-69.044452C90.793455 0.070771 41.081449 10.772661 38.664893 58.413333zM799.189537 244.14291l20.368113 6.559223a345.222262 345.222262 0 0 0 89.412566-34.522226c48.331117-22.784669 133.601015-34.522226 144.99335 34.522226a114.613791 114.613791 0 0 1 0 48.676339 180.206021 180.206021 0 0 1 15.880224 16.570668c15.880224-50.057228 3.797445-107.364124-54.545117-124.280014-83.198565-22.439447-141.541127 45.569339-216.109136 52.473784z" fill="#3F3F3F" ></path><path d="M44.18845 731.251522a105.638012 105.638012 0 0 0 105.638012 105.638012h698.729858v-31.415226H149.826462a74.222786 74.222786 0 0 1 0-148.445573h698.729858v-31.415225H149.826462a105.638012 105.638012 0 0 0-105.638012 105.638012z" fill="#8A8A8A" ></path><path d="M75.603675 731.251522a74.222786 74.222786 0 0 0 74.222787 74.222786h698.729858V655.993069H149.826462a74.222786 74.222786 0 0 0-74.222787 75.258453z" fill="#FFE610" ></path><path d="M103.566679 731.251522a51.092895 51.092895 0 1 0 50.747672-50.747673A50.747673 50.747673 0 0 0 103.566679 731.251522z" fill="#FFFFFF" ></path><path d="M121.863459 731.251522a32.450893 32.450893 0 1 0 32.450892-32.450893 32.450893 32.450893 0 0 0-32.450892 32.450893zM290.331922 731.251522a34.522226 34.522226 0 0 0 34.522227 34.522226h414.266714a34.522226 34.522226 0 0 0 34.522226-34.522226 34.522226 34.522226 0 0 0-34.522226-34.522226h-414.266714a34.522226 34.522226 0 0 0-34.522227 34.522226z" fill="#54D9D9" ></path><path d="M827.15254 877.625761h276.523032v61.794785h-276.523032z" fill="#F7A53F" ></path><path d="M839.925764 939.765768h250.976584v31.070004h-250.976584z" fill="#707070" ></path><path d="M747.75142 657.028735v148.445573h43.152783v31.415226h57.652117v-211.276024h-57.652117v31.415225h-43.152783z" fill="#B3B3B3" opacity=".76" ></path><path d="M14.499335 970.490549h1149.590133v53.509451H14.499335z" fill="#B86805" ></path><path d="M154.314351 836.889534H272.725587v133.601015H154.314351zM614.150404 836.889534h118.411236v133.601015h-118.411236z" fill="#F7A53F" ></path><path d="M614.150404 836.889534h118.411236v78.365453h-118.411236zM154.314351 836.889534H272.725587v78.365453H154.314351z" fill="#B3B3B3" opacity=".76" ></path></symbol><symbol id="icon-jixiebi4" viewBox="0 0 1123 1024"><path d="M502.569098 505.335276h543.234824v85.15391H502.569098z" fill="#FFE610" ></path><path d="M483.047648 203.089382a81.451566 81.451566 0 0 1-41.06236 73.373725l-302.919047 173.33701a82.124719 82.124719 0 0 1-81.788143-143.045105l302.919047-173.33701a82.124719 82.124719 0 0 1 83.807603 0 79.768682 79.768682 0 0 1 27.935868 28.945597A77.412645 77.412645 0 0 1 483.047648 203.089382z" fill="#FFC200" ></path><path d="M39.776109 803.542249h1082.094151v220.121174H39.776109z" fill="#FFE610" ></path><path d="M39.776109 971.830609h1082.094151v52.169391H39.776109zM466.218812 723.43699v146.747449H219.844654v-146.747449a123.187079 123.187079 0 0 1 246.374158 0z" fill="#FFC200" ></path><path d="M396.210854 790.415757a100.973016 100.973016 0 0 1-141.698798-23.896947l-235.603704-331.864645a100.973016 100.973016 0 0 1 23.896947-141.362222 100.973016 100.973016 0 0 1 141.698799 23.896947l235.603703 331.528068a100.973016 100.973016 0 0 1-24.233523 141.698799z" fill="#FFE610" ></path><path d="M146.470929 451.146424a86.16364 86.16364 0 1 1 29.282174-118.138428 86.16364 86.16364 0 0 1-29.282174 118.138428z" fill="#B8B8B8" ></path><path d="M131.661553 424.556864a56.881466 56.881466 0 1 1 19.52145-78.085799 56.544889 56.544889 0 0 1-19.52145 78.085799z" fill="#B8B8B8" ></path><path d="M120.554522 405.035414a35.677132 35.677132 0 0 1-36.686863-60.920386A35.677132 35.677132 0 1 1 120.554522 405.035414z" fill="#FFFFFF" ></path><path d="M370.9676 757.767815a56.881466 56.881466 0 1 1 19.184873-78.085798 56.881466 56.881466 0 0 1-19.184873 78.085798z" fill="#B8B8B8" ></path><path d="M358.850839 739.592672a35.677132 35.677132 0 1 1 12.116761-48.803624 35.677132 35.677132 0 0 1-12.116761 48.803624z" fill="#FFFFFF" ></path><path d="M423.136992 384.167657l-112.416624 66.305614-32.984519-55.871735 112.753201-65.969037 9.760725 16.492259 13.463069 22.887217 9.424148 16.155682z" fill="#8A8A8A" ></path><path d="M400.18246 345.023785l70.512822-41.398937 13.463069 22.887217-70.512823 41.432594z" fill="#C4C4C4" ></path><path d="M489.442606 313.823123a21.877487 21.877487 0 0 1-11.780186 27.935868 21.54091 21.54091 0 0 1-27.935867-12.116762l-29.955328-73.373725a21.54091 21.54091 0 0 1 12.116762-27.935868 21.204333 21.204333 0 0 1 27.599291 11.780186z" fill="#F7A53F" ></path><path d="M482.037918 318.19862a12.453339 12.453339 0 0 1-9.424148 14.809376 12.789915 12.789915 0 0 1-14.809376-9.424148 12.789915 12.789915 0 0 1 9.424148-14.809376 12.453339 12.453339 0 0 1 14.809376 9.424148z" fill="#707070" ></path><path d="M303.652257 388.543155a24.5701 24.5701 0 0 0-7.404688 8.077841l-24.906677 45.10128 32.311365 44.764704 36.350285-65.63246a24.906677 24.906677 0 0 0-36.013709-33.657672z m12.453338 6.394957a14.472799 14.472799 0 0 1 16.155683 12.116762 14.136222 14.136222 0 0 1-12.116762 16.155683 13.799645 13.799645 0 0 1-16.155683-11.780185 14.136222 14.136222 0 0 1 13.463069-16.49226z" fill="#B86805" ></path><path d="M305.33514 411.430372a13.799645 13.799645 0 0 0 16.155683 11.780185 14.136222 14.136222 0 0 0 12.116762-16.155683 14.472799 14.472799 0 0 0-16.155683-12.116762 14.136222 14.136222 0 0 0-12.116762 16.49226z" fill="#5E5E5E" ></path><path d="M625.4196 163.709906l-19.858026 12.116762-37.360016 22.55064-19.858027 12.116762-20.867756-34.667402-40.389207-66.64219-19.184872-31.301635 9.424148-5.721804 58.227772-35.340556 9.424148-5.385227 80.441836 132.27465z" fill="#8A8A8A" ></path><path d="M568.066927 198.276335l37.124412-22.516982 36.484917 60.14626-37.15807 22.55064z" fill="#4D4D4D" ></path><path d="M931.031261 336.373763l-85.15391 217.765137h-128.572307l-46.447587-118.811581-30.965058-79.768683-7.404688-19.184873 46.111011-46.447587h205.648375l46.784164 46.447587z" fill="#AEBABD" ></path><path d="M744.668732 483.861681l105.954351-43.182793 2.423352 5.890093-105.988009 43.182793zM840.8287 361.953594l-120.157889-26.252984 1.682884-6.058381 119.821312 26.252984-1.346307 6.058381zM683.916634 363.838423l6.125696-1.851172 32.984518 109.252803-6.159353 1.851172z" fill="#6A5060" ></path><path d="M880.544753 403.015954a49.813354 49.813354 0 1 1-49.813354-49.813355 50.149931 50.149931 0 0 1 49.813354 49.813355zM746.923796 359.597557a33.657672 33.657672 0 1 1-33.657672-33.657672 33.657672 33.657672 0 0 1 33.657672 33.657672zM767.454975 465.282647a26.589561 26.589561 0 0 1-26.58956 26.252984A26.252984 26.252984 0 0 1 741.201991 438.693086a26.589561 26.589561 0 0 1 26.252984 26.589561z" fill="#FFFFFF" ></path><path d="M846.887081 403.015954a16.155683 16.155683 0 1 1-16.155682-16.155683 16.155683 16.155683 0 0 1 16.155682 16.155683zM724.709732 359.597557a10.097302 10.097302 0 0 1-10.097302 9.760725 9.760725 9.760725 0 1 1 0-19.52145 10.097302 10.097302 0 0 1 10.097302 9.760725zM748.943256 465.282647A7.741265 7.741265 0 0 1 741.201991 472.350758a8.077841 8.077841 0 0 1-8.077841-8.077842 8.077841 8.077841 0 0 1 8.077841-8.077841 8.077841 8.077841 0 0 1 7.741265 9.087572z" fill="#788B90" opacity=".37" ></path><path d="M698.456748 219.581642h166.268899v46.11101h-166.268899z" fill="#F7A53F" ></path><path d="M702.159092 223.620562h5.048651v38.03317h-5.048651zM711.246663 223.620562h5.048651v38.03317h-5.048651zM720.334235 223.620562h5.048651v38.03317h-5.048651zM729.421806 223.620562h5.048651v38.03317h-5.048651zM738.509378 223.620562h5.04865v38.03317h-5.04865zM747.596949 223.620562h5.048651v38.03317h-5.048651zM756.68452 223.620562h5.048651v38.03317h-5.048651zM765.772092 223.620562h5.048651v38.03317h-5.048651zM774.859663 223.620562h5.048651v38.03317H774.859663zM783.610658 223.620562h5.048651v38.03317h-5.048651zM792.698229 223.620562h5.048651v38.03317h-5.048651zM801.785801 223.620562h5.04865v38.03317h-5.04865zM810.873372 223.620562h5.048651v38.03317h-5.048651zM819.960944 223.620562h5.04865v38.03317h-5.04865zM829.048515 223.620562h5.048651v38.03317h-5.048651zM838.136086 223.620562h5.048651v38.03317h-5.048651zM847.223658 223.620562h5.048651v38.03317h-5.048651zM856.311229 223.620562h5.048651v38.03317h-5.048651z" fill="#788B90" opacity=".38" ></path><path d="M738.845954 265.692652h85.490487v23.896947h-85.490487z" fill="#707070" ></path><path d="M735.816764 288.916446h-1.682884L640.228976 355.558636l-39.0429 26.926138-4.712074 3.365767-16.492259-23.896947a25.916407 25.916407 0 0 1 6.731534-36.013709l97.270672-67.315344a25.916407 25.916407 0 0 1 36.013709 6.731534z" fill="#58BFD2" ></path><path d="M670.857457 435.327319h-33.657672a12.116762 12.116762 0 0 1-10.433878-8.414418l-24.906677-44.428127 39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M827.365631 288.916446h1.682884l94.241481 65.63246 39.0429 26.926138 4.712074 3.365767 16.492259-23.896947a25.916407 25.916407 0 0 0-6.731534-35.003979l-97.270672-67.315344a25.916407 25.916407 0 0 0-36.013709 6.731534z" fill="#58BFD2" ></path><path d="M892.324938 435.327319h33.657672a12.116762 12.116762 0 0 0 10.433878-8.414418l24.906677-44.428127-39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M738.845954 265.692652h85.490487v12.116762h-85.490487zM922.95342 355.558636l-31.301635 79.768683-46.447588 118.811581 49.140201-194.541343-70.007957-69.671381h4.038921l94.578058 65.63246z" fill="#848484" opacity=".25" ></path><path d="M661.433309 321.900964l-48.467048-67.988497 21.204334-12.789915 38.033169 74.383455-10.770455 6.394957z" fill="#7A807D" ></path><path d="M535.553616 36.820483l-58.227772 33.657672-11.780186-19.184873A33.657672 33.657672 0 0 1 502.905674 1.143351a33.657672 33.657672 0 0 1 21.204334 15.482529z" fill="#F7A53F" ></path><path d="M527.475775 175.826668L483.047648 203.089382A77.412645 77.412645 0 0 0 471.940616 164.046483a79.768682 79.768682 0 0 0-27.599291-28.272444l42.745243-25.916408zM527.475775 175.826668l-40.389207-66.64219 40.389207 66.64219z" fill="#C4C4C4" ></path><path d="M956.274515 854.028757H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M650.999431 304.062398l-70.007958 14.809376 69.671381 8.414418-4.712074 38.033169 25.243254-25.243254 22.887217 25.243254-3.702344-36.350286 35.003979-1.682883-31.974789-19.52145 14.809376-35.677132-33.657672 24.906677-26.252984-43.754973 2.692614 50.823084z" fill="#FFFFFF" ></path><path d="M956.274515 803.542249H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 803.542249H600.512923l32.311365-25.579831h290.802285l32.647942 25.579831z" fill="#999999" ></path><path d="M956.274515 752.719165H600.512923l32.311365 25.243253h290.802285l32.647942-25.243253zM956.274515 702.232657H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 752.719165H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M584.693817 632.561276h378.985386v69.671381H584.693817zM584.693817 854.028757h378.985386v34.667402H584.693817z" fill="#FFC200" ></path><path d="M502.569098 590.489186h543.234824v42.07209H502.569098z" fill="#F7A53F" ></path><path d="M273.696929 882.637778h80.441836v59.574079H273.696929z" fill="#7A807D" ></path><path d="M355.821648 783.011069l-4.375497 13.799646-26.589561 85.827063h-26.252984l28.945598-93.231751 4.375497-13.799646 23.896947 7.404688z" fill="#999999" ></path><path d="M381.738055 772.913768a33.657672 33.657672 0 1 1-22.55064-43.08182 33.657672 33.657672 0 0 1 22.55064 43.08182z" fill="#F7A53F" ></path><path d="M359.523992 753.728895a15.819106 15.819106 0 1 1-15.819106-15.819106 15.819106 15.819106 0 0 1 15.819106 15.819106z" fill="#FFFFFF" ></path><path d="M168.348416 882.637778h80.441835v59.574079H168.348416z" fill="#7A807D" ></path><path d="M166.665532 783.011069l4.375497 13.799646 26.589561 85.827063h26.252984l-28.945598-93.231751-4.03892-13.799646-24.233524 7.404688z" fill="#999999" ></path><path d="M140.749125 772.913768a33.657672 33.657672 0 1 0 67.315343-20.53118 33.657672 33.657672 0 0 0-43.08182-22.55064 33.657672 33.657672 0 0 0-24.233523 43.08182z" fill="#68FF4B" ></path><path d="M162.963188 753.728895a15.819106 15.819106 0 1 0 15.819106-15.819106 15.819106 15.819106 0 0 0-15.819106 15.819106z" fill="#FFFFFF" ></path></symbol></svg>',(s=>{var e=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,r,o,a,l=function(m,u){u.parentNode.insertBefore(m,u)};if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(m){console&&console.log(m)}}n=function(){var m,u=document.createElement("div");u.innerHTML=s._iconfont_svg_string_4634042,(u=u.getElementsByTagName("svg")[0])&&(u.setAttribute("aria-hidden","true"),u.style.position="absolute",u.style.width=0,u.style.height=0,u.style.overflow="hidden",u=u,(m=document.body).firstChild?l(u,m.firstChild):m.appendChild(u))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(r=n,o=s.document,a=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,c())})}function c(){a||(a=!0,r())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const gu=Oe.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(s){this.selectArray=s},setSelectString(s){this.selectString=s}}}),B6={class:"calculator-content"},O6={class:"calculator-child"},k6={class:"calculator-child"},V6=v.defineComponent({__name:"calculator",setup(s){const e=v.ref(),t=v.ref();return v.onMounted(()=>{e.value=[{type:"Upload",label:"输入",name:"input"}],t.value=[{type:"Upload",label:"输出",name:"output"}]}),(n,i)=>(v.openBlock(),v.createElementBlock("div",B6,[v.createElementVNode("div",O6,[v.createVNode(On.ssForm,{rowContents:e.value,isRowFlex:!0},null,8,["rowContents"])]),v.createElementVNode("div",k6,[v.createVNode(On.ssForm,{rowContents:t.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),H6=Pi._export_sfc(V6,[["__scopeId","data-v-73db0fe7"]]),_u=Oe.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(s){this.selectIndex=s},setSelectMenu(s){this.selectMenu=s},setSelectTitle(s){this.selectTitle=s}}}),vu=(s,e)=>{let t=s,n=e;return Array.isArray(t)&&(t=t==null?void 0:t.map((i,r)=>{if(Array.isArray(i)){let o={};return i=i==null?void 0:i.forEach((a,l)=>{var c;(c=n==null?void 0:n[l])!=null&&c.prop?o[n[l].prop]=a:Array.isArray(a)&&(o.children=vu(a,n))}),Object.assign(o,{id:r})}else return i})),t},yu=(s,e,t)=>{let n=s,i=e;return n=n==null?void 0:n.map((r,o)=>{var a,l;return!Array.isArray(r)||!((a=i==null?void 0:i[o])!=null&&a.label)&&!t||(r.unshift(((l=i==null?void 0:i[o])==null?void 0:l.label)??""),r.some(c=>Array.isArray(c))&&(r=r==null?void 0:r.map(c=>{var d;return Array.isArray(c)&&(c=yu(c,(d=i==null?void 0:i[o])==null?void 0:d.children,t)),c}))),r}),n},G6=(s,e,t)=>{if(e==="")return s==null?void 0:s.filter(n=>(n==null?void 0:n.id)!==t);{const n=e.split("-");return W6(s,n,t)}},W6=(s,e,t)=>{let n=s,i=e;return(i==null?void 0:i.length)===0?n=n==null?void 0:n.filter(r=>r.id!==t):n=n==null?void 0:n.map(r=>(r.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),r=xu(r,i,t)),r)),n},xu=(s,e,t)=>{var r,o;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=(r=n.children)==null?void 0:r.filter(a=>a.id!==t):n.children=(o=n.children)==null?void 0:o.map(a=>(a.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),a=xu(a,i,t)),a)),n},X6=(s,e,t)=>{if(e==="")return t;{const n=e.split("-");return j6(s,n,t)}},j6=(s,e,t)=>{let n=s,i=e;return(i==null?void 0:i.length)===0?n=t:n=n==null?void 0:n.map(r=>(r.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),r=Mu(r,i,t)),r)),n},Mu=(s,e,t)=>{var r;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=t:n.children=(r=n.children)==null?void 0:r.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Mu(o,i,t)),o)),n},bu=Oe.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:""}),actions:{setTableIndex(s){this.tableIndex=s},setTableShowThree(s){this.tableShowThree=s}}}),Su=Oe.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(s){this.objUrl=s},setBlobUrls(s){this.blobUrls=s}}}),kl=async s=>{var r,o,a,l,c,d,m;let e=(o=(r=Oe.cloneDeep(s))==null?void 0:r.optionUrl)==null?void 0:o.menuSelect,t=[];e==null||e.forEach(u=>{});let n="";const i=await rn.menuToParent(e);if(i==null||i.forEach(u=>{var h,g,_,p;(u==null?void 0:u.name)===(((p=(_=(g=(h=Oe.cloneDeep(s))==null?void 0:h.optionUrl)==null?void 0:g.groupSelect)==null?void 0:_[0])==null?void 0:p.replaceAll("'",""))??"")&&(n=u==null?void 0:u.id)}),n!==""){const u=(a=i==null?void 0:i[0])==null?void 0:a.compData;let h=(c=(l=u==null?void 0:u.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:l.contents)==null?void 0:c.map(_=>_==null?void 0:_.label),g=(m=(d=u==null?void 0:u.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:m.map(_=>(_=_==null?void 0:_.filter(p=>!(p!=null&&p.id)),_));g==null||g.forEach(_=>{t.push(rn.getValueToObjectValue(_,h))})}return t},q6={class:"table-content"},$6={class:"menu-config-wrap"},Y6=["onClick"],J6={key:0,class:"viewport-wrap"},K6=["onClick"],Z6={title:"选择显示列信息"},Q6={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","max-height":"300px",width:"300px",overflow:"auto"}},e5={class:"pop-view"},t5={class:"pop-wrapper"},n5={class:"file-list-pop"},i5=["title","onClick"],s5=["onClick"],r5={class:"form-content"},a5={key:0,class:"dialog-footer"},o5={class:"dialog-footer"},l5={__name:"index",props:{compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0}},emits:["change","contentChange","onButtonClick","contentClick","pageChange","rowClick"],setup(s,{emit:e}){const t=v.ref([]),n=Su(Oe.pinia),i=v.ref(null),r=s,o=e,a=v.ref([]),l=v.ref([]),c=v.ref(!1),d=v.ref([]),m=v.ref(!1),u=v.ref(),h=Oe.useMenuState(),{activeMenuPath:g}=Oe.storeToRefs(h),_=bu(Oe.pinia),p=Oe.useModelComp(Oe.pinia),{extraContents:f,cacheUpdatingData:x}=Oe.storeToRefs(p),y=v.ref([]);v.ref(!1);const S=v.ref("");v.ref();const U=v.ref(!0),C=v.ref(0),L=v.ref(!1),P=v.ref(""),E=v.ref(!1),A=v.ref({label:"查看三维模型"}),D=v.ref(!1),O=v.ref(),V=v.ref([]),Q=v.ref([]),se=v.ref(!1),G=v.ref(),ce=v.ref([]),Z=v.ref([]),ge=v.ref([]),De=v.ref(),ye=v.ref(),_e=gu(Oe.pinia),ae=v.ref(),j=_u(Oe.pinia),{selectIndex:Y,selectMenu:ee,selectTitle:ne}=Oe.storeToRefs(j),{selectString:he}=Oe.storeToRefs(_e),J=wu.useLoginState(Oe.pinia),{loginUserInfo:ue}=Oe.storeToRefs(J),Ce=v.ref(720),je=v.ref(!1),We=v.ref([]),B=v.ref(),_t=v.ref(!0),dt=q=>{We.value=q},at=(q,W)=>{B.value===W?_t.value=!1:_t.value=!0,B.value=W==null?void 0:W.changeProp},Fe=v.computed(()=>{var q;return(q=a.value)==null?void 0:q.filter(W=>(W==null?void 0:W.label)!=="操作")}),tt=()=>{E.value=!1},Le=q=>{o("clickTrigger",q)},ot=async q=>{var fe,ve,me,Be,we,Te,$e,te,Ve,Xe;const W=q==null?void 0:q.row;if((fe=W==null?void 0:W.toString())!=null&&fe.includes(".urdf")){G.value=W,c.value=!0;return}let le=[];if((ve=W==null?void 0:W.toString())!=null&&ve.includes(".stl")||(me=W==null?void 0:W.toString())!=null&&me.includes(".STL")||(Be=W==null?void 0:W.toString())!=null&&Be.includes(".obj")||(we=W==null?void 0:W.toString())!=null&&we.includes(".mtl")){let ft,w=[],H={};if(Array.isArray(W)?ft=W:ft=W==null?void 0:W.split(","),ft==null||ft.forEach(X=>{X.includes(".mtl")?w.push(X):H.blob=H.blob?H.blob+","+X:X}),(w==null?void 0:w.length)>0&&(H.mtlBlobs=w),($e=(Te=Object.values(H))==null?void 0:Te[0])!=null&&$e.includes("http:"))le.push(H);else{const X=new Blob([H.blob],{type:"application/octet-stream;charset=UTF-8"});let $=URL.createObjectURL(X),z="";(te=W==null?void 0:W.split("/"))==null||te.forEach((pe,ie)=>{var Ee;ie===((Ee=W==null?void 0:W.split("/"))==null?void 0:Ee.length)-1&&(z=pe)}),(Ve=H.blob)!=null&&Ve.includes(".stl")&&(z=(z==null?void 0:z.replaceAll(">",""))+".urdf"),u.value=[{name:z,blobUrl:$}],m.value=!0}}else{const ft=await axios.get(W,{responseType:"blob",headers:{"Content-Type":"application/json"}}),w=new Blob([ft.data],{type:"application/octet-stream;charset=UTF-8"});let H=URL.createObjectURL(w),X="";(Xe=W==null?void 0:W.split("/"))==null||Xe.forEach(($,z)=>{var pe;z===((pe=W==null?void 0:W.split("/"))==null?void 0:pe.length)-1&&(X=$)}),u.value=[{name:X,blobUrl:H}],m.value=!0}(le==null?void 0:le.length)>0&&n.setBlobUrls(le)},jt=q=>{var fe,ve,me,Be;const W=(Be=(fe=q==null?void 0:q.url)==null?void 0:fe.split("."))==null?void 0:Be[((me=(ve=q==null?void 0:q.url)==null?void 0:ve.split("."))==null?void 0:me.length)-1];return(q==null?void 0:q.name)+"."+W},k=async q=>{const W=await On.downloadAvatarApi({url:q==null?void 0:q.url}),le=URL.createObjectURL(W.data),ve={name:jt(q),blobUrl:le};u.value=[ve],m.value=!0},T=async q=>{const W=await On.downloadAvatarApi({url:q==null?void 0:q.url}),le=URL.createObjectURL(W.data),ve={name:jt(q),blobUrl:le},me=document.createElement("a");me.href=ve.blobUrl,me.download=ve.name,me.style.display="none",document.body.appendChild(me),me.click(),setTimeout(()=>{document.body.removeChild(me)},100)},oe=(q,W)=>{if(Object.values(W).length!==0)return Object.values(W).find(le=>{var fe,ve,me;return((fe=le==null?void 0:le.toString())==null?void 0:fe.includes(".txt"))||((ve=le==null?void 0:le.toString())==null?void 0:ve.includes(".cpt"))||((me=le==null?void 0:le.toString())==null?void 0:me.includes(".obj"))})?[...q,A.value]:q},be=q=>{var ve;he.value===""?q==null||q[0]:(q==null?void 0:q.find(me=>(me==null?void 0:me.selectLabel)==="("+he.value+")"))??(q==null||q.find(me=>!(me!=null&&me.selectLabel)));let W=q;(ve=a.value)!=null&&ve.find(me=>me.prop==="index");let le=De.value;const fe=[];return W==null||W.forEach((me,Be)=>{var Te;let we={};if(Array.isArray(me)){let $e=[];me==null||me.filter(te=>!(te!=null&&te.id)).forEach((te,Ve)=>{var Xe,ft,w,H,X;if((Xe=le==null?void 0:le[Ve])!=null&&Xe.prop&&!Array.isArray(te)){let $={};$[le[Ve].column]=te,f!=null&&f.value&&((ft=f==null?void 0:f.value)==null?void 0:ft.length)>0&&((w=f==null?void 0:f.value)!=null&&w.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify($)))&&($e=(H=f==null?void 0:f.value)==null?void 0:H.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify($))),$e&&$e.length>0?we[le[Ve].prop]=$e!=null&&$e.find(z=>{var pe;return((pe=Object.keys(z))==null?void 0:pe[0])===le[Ve].column})?(X=$e==null?void 0:$e.find(z=>{var pe;return((pe=Object.keys(z))==null?void 0:pe[0])===le[Ve].column}))==null?void 0:X[le[Ve].column]:te:we[le[Ve].prop]=te}})}else we=me;Array.isArray(me)&&me.some($e=>$e==null?void 0:$e.id)?fe.push(Object.assign(we,{id:(Te=me==null?void 0:me.find($e=>$e.id))==null?void 0:Te.id})):we.id?fe.push(we):fe.push(Object.assign(we,{id:Be}))}),fe},Re=async q=>{var ve,me,Be,we,Te;let W={};for(let $e in q)q[$e]!==""&&(W["tableData."+$e]=q[$e]);const le=await rn.filterContents({type:"data",tableId:r==null?void 0:r.index,systemKey:sessionStorage.getItem("systemKey"),pageKey:g.value},W),fe=(Be=(me=(ve=Oe.cloneDeep(le))==null?void 0:ve.data)==null?void 0:me.result)==null?void 0:Be.map($e=>{var Ve;let te=[];return te.push({id:$e.id}),te.push((Ve=$e==null?void 0:$e.value)==null?void 0:Ve.tableData),te});y.value=be(rn.getTableContents(fe,(Te=(we=Oe.cloneDeep(a.value))==null?void 0:we.map($e=>$e.label))==null?void 0:Te.filter($e=>$e!=="操作")))},xe=async q=>{var fe,ve,me,Be,we,Te,$e,te,Ve,Xe,ft,w,H,X;const W=(fe=Oe.cloneDeep(a.value))==null?void 0:fe.filter($=>$==null?void 0:$.isRoute);if((W==null?void 0:W.length)>0){let $=(ve=W==null?void 0:W[0])==null?void 0:ve.prop,z=Oe.cloneDeep(g).value+"/"+(q==null?void 0:q[$]),pe=Oe.cloneDeep(g).value,ie=await rn.getItemData(z,sessionStorage.getItem("systemKey"),"");if((ie==null?void 0:ie.length)>0)await rn.loadingConstruct(z,z+`/updateLoading${(me=ue.value)==null?void 0:me.account}`),p.setRouteToChildPath(pe),h.setActiveMenuPath(z+`/updateLoading${(Be=ue.value)==null?void 0:Be.account}`);else{let Ee=(we=W==null?void 0:W[0])==null?void 0:we.prop,re=Oe.cloneDeep(g).value+"/"+(q==null?void 0:q[Ee]),He=Oe.cloneDeep(g).value;await rn.getItemData(He+"/",sessionStorage.getItem("systemKey"),""),await rn.loadingConstruct(He+"/",re),await rn.loadingConstruct(re,re+`/updateLoading${(Te=ue.value)==null?void 0:Te.account}`),p.setRouteToChildPath(He),h.setActiveMenuPath(re+`/updateLoading${($e=ue.value)==null?void 0:$e.account}`)}}let le=await rn.getItemData(g.value,sessionStorage.getItem("systemKey"),q.id);if(le=le==null?void 0:le.filter($=>$.comp!=="methodButton"),le&&le.length>0){const $=!Array.isArray(ne.value)&&((te=ne.value)==null?void 0:te.key)!=="main"?[]:ne.value;$.push({key:ee.value===""?(Ve=q==null?void 0:q.id)==null?void 0:Ve.toString():ee.value+"-"+((Xe=q==null?void 0:q.id)==null?void 0:Xe.toString()),value:q[(ft=Object.keys(q))==null?void 0:ft.filter(z=>z!=="index"&&z!=="id")[0]]}),j.setSelectMenu(ee.value===""?(w=q==null?void 0:q.id)==null?void 0:w.toString():ee.value+"-"+((H=q==null?void 0:q.id)==null?void 0:H.toString())),j.setSelectTitle($),j.setSelectIndex((X=q==null?void 0:q.id)==null?void 0:X.toString()),o("pageChange",le)}},vt=q=>{var W;(W=Oe.cloneDeep(r.itemData))==null||W.map(le=>((le==null?void 0:le.key)==="tableContents"&&(le.contents=q),le))},Ze=async(q,W,le,fe)=>{var me,Be,we,Te,$e,te,Ve;if((fe==null?void 0:fe.data)==="查看"&&(q!=null&&q.every(Xe=>(Xe==null?void 0:Xe.url)&&(Xe==null?void 0:Xe.name)))){let Xe=Oe.cloneDeep(q);Xe=await((me=Oe.cloneDeep(Xe))==null?void 0:me.map(async w=>{var $,z,pe,ie;const H=await On.downloadAvatarApi({url:w==null?void 0:w.url});let X=URL.createObjectURL(H.data);return{name:(w==null?void 0:w.name)+"."+((ie=($=w==null?void 0:w.url)==null?void 0:$.split("."))==null?void 0:ie[((pe=(z=w==null?void 0:w.url)==null?void 0:z.split("."))==null?void 0:pe.length)-1]),blobUrl:X}}));let ft=await Promise.all(Xe);u.value=ft,m.value=!0}o("contentClick",q,W,le,{id:r==null?void 0:r.index,type:"table"});const ve=Oe.cloneDeep(a.value);if((fe==null?void 0:fe.isMainKey)===!0&&(ve==null?void 0:ve.length)>0){(Be=ve==null?void 0:ve[0])==null||Be.prop;let Xe=Oe.cloneDeep(g).value+"/"+(fe==null?void 0:fe.data),ft=Oe.cloneDeep(g).value,w=await rn.getItemData(Xe,sessionStorage.getItem("systemKey"),"");if((w==null?void 0:w.length)>0)await rn.loadingConstruct(Xe,Xe+`/updateLoading${(we=ue.value)==null?void 0:we.account}`),p.setRouteToChildPath(ft),h.setActiveMenuPath(Xe+`/updateLoading${(Te=ue.value)==null?void 0:Te.account}`);else{($e=ve==null?void 0:ve[0])==null||$e.prop;let H=Oe.cloneDeep(g).value+"/"+(fe==null?void 0:fe.data),X=Oe.cloneDeep(g).value;await rn.getItemData(X+"/",sessionStorage.getItem("systemKey"),""),await rn.loadingConstruct(X+"/",H),await rn.loadingConstruct(H,H+`/updateLoading${(te=ue.value)==null?void 0:te.account}`),p.setRouteToChildPath(X),h.setActiveMenuPath(H+`/updateLoading${(Ve=ue.value)==null?void 0:Ve.account}`)}}},mt=()=>{m.value=!1},yt=q=>{o("rowClick",q)};v.watch(()=>r.changedContent,()=>{var le,fe;if(!r.changedContent)return;let q=(le=y.value)==null?void 0:le.map(ve=>{var me;return ve.id===((me=r.changedContent)==null?void 0:me.id)&&(ve={...r.changedContent,id:r.changedContent.newId?r.changedContent.newId:r.changedContent.id},delete ve.newId),ve});const W=(fe=r.itemData)==null?void 0:fe.map(ve=>((ve==null?void 0:ve.key)==="tableContents"&&(ve.contents=q),ve));y.value=q,o("contentChange",{contents:W,index:r.index}),o("change",{content:q,index:r==null?void 0:r.index,buttonName:"",id:r==null?void 0:r.index})},{deep:!0,immediate:!0});const Ne=()=>{},st=(q,W,le)=>{var fe,ve,me,Be,we,Te,$e,te;if(S.value="",se.value=!0,U.value=!0,o("onButtonClick",q,W),q==="删除"){y.value=(fe=Oe.cloneDeep(y.value))==null?void 0:fe.filter(Xe=>(Xe==null?void 0:Xe.id)!==(W==null?void 0:W.id));const Ve=G6(ae.value,ee.value,W==null?void 0:W.id);vt(Ve),o("change",{content:y.value,singleContent:W,index:r==null?void 0:r.index,type:"delete",buttonName:q,column:a.value})}else if(q==="批量删除"){if(((ve=We.value)==null?void 0:ve.length)===0)return Pn.ElMessage.warning("请先勾选操作的数据");o("change",{content:y.value,singleContent:null,selectItems:We.value,index:r==null?void 0:r.index,type:"batchDelete",buttonName:q,column:a.value})}else if(q==="复制新增"){P.value="新增";const Ve=Oe.cloneDeep(W),Xe=(me=a.value)==null?void 0:me.find(H=>H==null?void 0:H.isMainKey),ft=Xe||((Be=a.value)==null?void 0:Be[0]),w=(we=Z.value)==null?void 0:we.find(H=>(H==null?void 0:H.label)==="新建");Lt(!0,w,{data:Ve,firstCol:ft})}else if(q==="新增")P.value="新增",Ye(""),E.value=!0;else if(q==="编辑")P.value="编辑",Ye(W),E.value=!0;else if(q==="查看")P.value="查看",Ye(W),se.value=!1,U.value=!1,E.value=!0;else if(q==="查看三维模型"){const Ve={};for(let ft in W)ft!=="id"&&(Ve[ft]=W[ft]);let Xe=(Te=Object.values(Ve))==null?void 0:Te[1];_.setTableShowThree(Xe)}else if((($e=le==null?void 0:le.extra)==null?void 0:$e.type)==="modelExample")P.value=q,D.value=!0;else if(q==="新建"){const Ve=(te=Z.value)==null?void 0:te.find(Xe=>(Xe==null?void 0:Xe.label)==="新建");Lt(!1,Ve)}else if(q==="修改模板"){let Ve=Oe.cloneDeep(g).value;p.setRouteToChildPath(Ve),h.setActiveMenuPath(Ve+"/")}},Rt=async q=>{var le,fe,ve,me,Be,we;const W=await Pn.getInsofDataApi({key:{pageKey:q,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((le=W==null?void 0:W.data)==null?void 0:le.code)===200)return Array.isArray((fe=W==null?void 0:W.data)==null?void 0:fe.result)&&((me=(ve=W==null?void 0:W.data)==null?void 0:ve.result)==null?void 0:me.length)>0?(we=(Be=W==null?void 0:W.data)==null?void 0:Be.result)==null?void 0:we.map(Te=>{var $e;return{id:Te==null?void 0:Te.id,...($e=Te==null?void 0:Te.value)==null?void 0:$e.pageData}}):[]},At=(q,W,le,fe)=>{var ve;o("contentChange",{contents:(ve=q==null?void 0:q.compData)==null?void 0:ve.map(me=>{var Be;return(me==null?void 0:me.key)==="formContent"?{...me,contents:(Be=me==null?void 0:me.contents)==null?void 0:Be.map(we=>(we==null?void 0:we.key)===W?{...we,value:le}:we)}:me}),index:q==null?void 0:q.id}),h.setActiveMenuPath(""),h.setActiveMenuPath(fe)},Je=(q,W)=>{let le=q==null?void 0:q[W==null?void 0:W.prop],fe=1;if(y.value.some(ve=>(ve==null?void 0:ve[W==null?void 0:W.prop])===le)){const ve=le;for(;y.value.some(me=>(me==null?void 0:me[W==null?void 0:W.prop])===`${ve}(${fe})`);)fe++;le=`${ve}(${fe})`}return le},Lt=async(q,W,le)=>{var Be,we,Te,$e,te;let fe,ve;const me=Je(le==null?void 0:le.data,le==null?void 0:le.firstCol);if(q?(fe=Oe.cloneDeep(g).value+"/"+((Te=le==null?void 0:le.data)==null?void 0:Te[(we=le==null?void 0:le.firstCol)==null?void 0:we.prop]),ve=Oe.cloneDeep(g).value+"/"+me):(fe=Oe.cloneDeep(g).value+"/",ve=Oe.cloneDeep(fe)+`loading${(Be=ue.value)==null?void 0:Be.account}`),W){const Ve=await rn.getItemData(ve,sessionStorage.getItem("systemKey"),"");if((Ve==null?void 0:Ve.length)>0)if(q){const Xe=Ve==null?void 0:Ve.find(ft=>{var w;return((w=ft==null?void 0:ft.comp)==null?void 0:w.toUpperCase())==="FORM"});Xe&&At(Xe,($e=le==null?void 0:le.firstCol)==null?void 0:$e.label,me,g.value)}else p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(ve);else if(await rn.loadingConstruct(fe,ve),q){const Xe=await Rt(ve);if((Xe==null?void 0:Xe.length)>0){const ft=Xe==null?void 0:Xe.find(w=>{var H;return((H=w==null?void 0:w.comp)==null?void 0:H.toUpperCase())==="FORM"});ft&&At(ft,(te=le==null?void 0:le.firstCol)==null?void 0:te.label,me,g.value)}}else p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(ve)}else q?(S.value="",ye.value=le==null?void 0:le.data,ze(!0,le==null?void 0:le.firstCol,me)):(p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(ve))},K=()=>{c.value=!1,G.value=null},Ye=q=>{var ve,me,Be,we,Te,$e;const W=[];let le=[];for(let te in q)Array.isArray(q==null?void 0:q[te])&&le.push(te);l.value=Oe.cloneDeep(a.value),(me=rn.getColumnChild((ve=Oe.cloneDeep(a.value))==null?void 0:ve.filter(te=>(te==null?void 0:te.label)!=="操作")))==null||me.forEach((te,Ve)=>{var Xe;le.find(ft=>ft===(te==null?void 0:te.prop))||(te!=null&&te.formType&&((Xe=te==null?void 0:te.formType)==null?void 0:Xe.toUpperCase())==="SELECT"?W.push({label:(te==null?void 0:te.label)??"",name:(te==null?void 0:te.prop)??"t"+Ve,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:(q==null?void 0:q[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??Ve,contents:(te==null?void 0:te.options)??[],width:1,isFormColHidden:te==null?void 0:te.isFormColHidden,optionUrl:{groupSelect:te==null?void 0:te.groupSelect,menuSelect:te==null?void 0:te.formMenuSelect,type:"Select",selectRelateType:te==null?void 0:te.selectRelateType}}):W.push({label:(te==null?void 0:te.label)??"",name:(te==null?void 0:te.prop)??"t"+Ve,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:(q==null?void 0:q[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??Ve,contents:(te==null?void 0:te.options)??[],width:1,isFormColHidden:te==null?void 0:te.isFormColHidden}))}),q===""||!q||(S.value=(q==null?void 0:q.id)??"");let fe=rn.getColumnChild((Be=Oe.cloneDeep(a.value))==null?void 0:Be.filter(te=>(te==null?void 0:te.label)!=="操作"));V.value&&((we=V.value)==null?void 0:we.length)>0&&(V.value=(Te=Oe.cloneDeep(V).value)==null?void 0:Te.map(te=>{var Xe;let Ve=(Xe=fe==null?void 0:fe.find(ft=>(ft==null?void 0:ft.label)===(te==null?void 0:te.label)))==null?void 0:Xe.prop;return Ve&&(te.value=q[Ve]),te})),ge.value=V.value&&(($e=V.value)==null?void 0:$e.length)>0?rn.getTableFormToForm(V.value):W},Ie=async()=>{var W;await v.nextTick();const q=(W=i.value)==null?void 0:W.$el;q&&rn.Sortable.create(q,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:le=>{var Be;const{oldIndex:fe,newIndex:ve}=le;if(fe===ve)return;const me=Fe.value.splice(fe,1)[0];Fe.value.splice(ve,0,me),a.value=(Be=a.value)==null?void 0:Be.slice().sort((we,Te)=>{var $e,te;return we.label==="操作"?1:Te.label==="操作"?-1:(($e=Fe.value)==null?void 0:$e.indexOf(we))-((te=Fe.value)==null?void 0:te.indexOf(Te))})}})};v.onMounted(()=>{O.value=window.innerWidth-240*2});const ut=()=>{v.nextTick(()=>{Ie()})},ze=(q=!0,W,le)=>{var Be;let fe=rn.getColumnChild((Be=Oe.cloneDeep(a.value))==null?void 0:Be.filter(we=>(we==null?void 0:we.label)!=="操作")),ve,me=Oe.cloneDeep(y.value);if(!ye.value){E.value=!1;return}if(S.value===""){C.value++;let we;W&&le?we={id:C.value,[W==null?void 0:W.prop]:le}:we={id:C.value},me.push(Object.assign(ye.value,we)),ve=Object.assign(ye.value,we)}else me=me==null?void 0:me.map(we=>{var Te,$e;if((we==null?void 0:we.id)===S.value){let te={};for(let Ve in we){let Xe=(Te=fe==null?void 0:fe.find(ft=>(ft==null?void 0:ft.prop)===Ve))==null?void 0:Te.label;Xe?te[Ve]=($e=ye.value)==null?void 0:$e[Xe]:te[Ve]=we[Ve]}we=Object.assign(te,ye.value),ve=we}return we});if(y.value=me,q){const we=X6(ae.value,ee.value,me);vt(we),E.value=!1,ye.value=void 0,p.setCacheUpdatingData({content:we,singleContent:ve,index:r==null?void 0:r.index,buttonName:P.value,column:a.value})}},Ae=async(q,W,le)=>{var $e,te,Ve,Xe,ft,w,H,X,$,z,pe;B.value=le==null?void 0:le.prop;const fe=Oe.cloneDeep(r.itemData),ve=fe==null?void 0:fe.map(ie=>{var Ee;return(ie==null?void 0:ie.key)==="header"&&((Ee=ie.contents)==null||Ee.map((re,He)=>{var Se,Pe,it,Mt,Ct,bt,St,Qe,Wt,Ut,nn,Bt,cn,Ge,Pt,Ot,Jt,sn,Kt;return re.type=re!=null&&re.type?re.type:(Mt=(it=(Pe=(Se=re==null?void 0:re.key)==null?void 0:Se.split("$"))==null?void 0:Pe[1])==null?void 0:it.split("("))!=null&&Mt[0]?(bt=(Ct=rn.FormType)==null?void 0:Ct.find(rt=>{var ke,ht,xn,M;return(rt==null?void 0:rt.key)===((M=(xn=(ht=(ke=re==null?void 0:re.key)==null?void 0:ke.split("$"))==null?void 0:ht[1])==null?void 0:xn.split("("))==null?void 0:M[0])}))==null?void 0:bt.value:"Input",re.options=re!=null&&re.options?re.options:((Wt=(Qe=(St=re==null?void 0:re.key)==null?void 0:St.split("$"))==null?void 0:Qe[1])==null?void 0:Wt.length)>0?(cn=(Bt=Ho((nn=(Ut=re==null?void 0:re.key)==null?void 0:Ut.split("$"))==null?void 0:nn[1]))==null?void 0:Bt.split(","))==null?void 0:cn.map(rt=>({label:rt,value:rt})):[],(Ge=re==null?void 0:re.key)!=null&&Ge.includes("$")&&(re.key=(Ot=(Pt=re==null?void 0:re.key)==null?void 0:Pt.split("$"))==null?void 0:Ot[0]),re.value=(Jt=Object.values(W))==null?void 0:Jt[He],re.optionUrl=re!=null&&re.formMenuSelect&&((sn=re==null?void 0:re.formMenuSelect)==null?void 0:sn.length)>0?{groupSelect:(Kt=re==null?void 0:re.groupSelect)==null?void 0:Kt.split(/[::]/).map(rt=>rt.trim()),menuSelect:re==null?void 0:re.formMenuSelect,selectRelateType:"",type:(re==null?void 0:re.formType)??(re!=null&&re.groupSelect?"Select":"")}:null,re})),ie});let me=Oe.cloneDeep(ge.value),Be=(te=($e=Oe.cloneDeep(ve))==null?void 0:$e.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:te.contents;me=me==null?void 0:me.map(ie=>{var Ee;return ie.value=(Ee=Be==null?void 0:Be.find((re,He)=>He===(ie==null?void 0:ie.id)))==null?void 0:Ee.value,ie});let we="",Te=(ft=(Xe=(Ve=Oe.cloneDeep(ve))==null?void 0:Ve.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Xe.contents)==null?void 0:ft.find((ie,Ee)=>{var re,He;return(ie==null?void 0:ie.label)===B.value||(Ee==null?void 0:Ee.toString())===((He=(re=B.value)==null?void 0:re.split("a"))==null?void 0:He[1].toString())});if((X=(H=(w=Oe.cloneDeep(ve))==null?void 0:w.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:H.contents)==null||X.forEach(ie=>{var Ee,re,He,Se,Pe;we===""&&((He=(re=(Ee=ie==null?void 0:ie.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:re[1])!=null&&He.includes("["))&&(we=(Pe=(Se=ie==null?void 0:ie.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Pe[1])}),($=Te==null?void 0:Te.optionUrl)!=null&&$.menuSelect){let ie=await kl(Te),Ee;if(ie==null||ie.forEach(re=>{var He,Se,Pe,it,Mt,Ct,bt,St,Qe,Wt;we===((Se=(He=Te==null?void 0:Te.optionUrl)==null?void 0:He.groupSelect)==null?void 0:Se[1])&&((Mt=(it=(Pe=Te==null?void 0:Te.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])!=null&&Mt.includes("["))&&((Wt=Oe.cloneDeep(re))==null?void 0:Wt[(Qe=(St=(bt=(Ct=Te==null?void 0:Te.optionUrl)==null?void 0:Ct.groupSelect)==null?void 0:bt[1])==null?void 0:St.replaceAll("[",""))==null?void 0:Qe.replaceAll("]","")])===(Te==null?void 0:Te.value)&&(Ee=re)}),Ee){let re=Oe.cloneDeep(me);re=re==null?void 0:re.map(Se=>{var Pe,it,Mt,Ct,bt,St,Qe,Wt,Ut,nn,Bt;return(Ee!=null&&Ee[Se==null?void 0:Se.label]||Ee!=null&&Ee[(Ct=(Mt=(it=(Pe=Se==null?void 0:Se.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])==null?void 0:Mt.replaceAll("[",""))==null?void 0:Ct.replaceAll("]","")])&&((Qe=(St=(bt=Se==null?void 0:Se.optionUrl)==null?void 0:bt.groupSelect)==null?void 0:St[1])!=null&&Qe.includes("["))&&(Se.value=(Ee==null?void 0:Ee[Se==null?void 0:Se.label])||(Ee==null?void 0:Ee[(Bt=(nn=(Ut=(Wt=Se==null?void 0:Se.optionUrl)==null?void 0:Wt.groupSelect)==null?void 0:Ut[1])==null?void 0:nn.replaceAll("[",""))==null?void 0:Bt.replaceAll("]","")])),Se}),y.value=(z=Oe.cloneDeep(y.value))==null?void 0:z.map(Se=>{if((Se==null?void 0:Se.id)===(W==null?void 0:W.id)){const Pe={};return re==null||re.forEach(it=>{Pe[it.name]=it.value}),Pe.id=Se==null?void 0:Se.id,Pe}return Se});let He=Oe.cloneDeep(re);He=He==null?void 0:He.map(Se=>{var Pe,it,Mt,Ct;return(it=(Pe=Se==null?void 0:Se.optionUrl)==null?void 0:Pe.menuSelect)!=null&&it.some(bt=>bt==null?void 0:bt.includes)&&(Se.optionUrl.menuSelect=(Ct=(Mt=Se==null?void 0:Se.optionUrl)==null?void 0:Mt.menuSelect)==null?void 0:Ct.map(bt=>{var St,Qe,Wt,Ut;if(bt!=null&&bt.includes("[")){let nn=(Qe=(St=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:St.split(":"))==null?void 0:Qe[1];bt=(Ut=(Wt=Oe.cloneDeep(re))==null?void 0:Wt.find(Bt=>(Bt==null?void 0:Bt.label)===nn))==null?void 0:Ut.value}return bt})),Se}),y.value=(pe=Oe.cloneDeep(y.value))==null?void 0:pe.map(Se=>{if((Se==null?void 0:Se.id)===(W==null?void 0:W.id)){const Pe={};return He==null||He.forEach(it=>{Pe[it.name]=it.value}),Pe.id=Se==null?void 0:Se.id,Pe}return Se})}}},pt=async q=>{var we,Te,$e,te,Ve,Xe,ft,w,H;if(!q)return;ye.value=q,o("onFormChange",q);const W=Oe.cloneDeep(r.itemData),le=W==null?void 0:W.map(X=>{var $;return(X==null?void 0:X.key)==="header"&&(($=X.contents)==null||$.map((z,pe)=>{var ie,Ee,re,He,Se,Pe,it,Mt,Ct,bt,St,Qe,Wt,Ut,nn,Bt,cn,Ge,Pt;return z.type=z!=null&&z.type?z.type:(He=(re=(Ee=(ie=z==null?void 0:z.key)==null?void 0:ie.split("$"))==null?void 0:Ee[1])==null?void 0:re.split("("))!=null&&He[0]?(Pe=(Se=rn.FormType)==null?void 0:Se.find(Ot=>{var Jt,sn,Kt,rt;return(Ot==null?void 0:Ot.key)===((rt=(Kt=(sn=(Jt=z==null?void 0:z.key)==null?void 0:Jt.split("$"))==null?void 0:sn[1])==null?void 0:Kt.split("("))==null?void 0:rt[0])}))==null?void 0:Pe.value:"Input",z.options=z!=null&&z.options?z.options:((Ct=(Mt=(it=z==null?void 0:z.key)==null?void 0:it.split("$"))==null?void 0:Mt[1])==null?void 0:Ct.length)>0?(Wt=(Qe=Ho((St=(bt=z==null?void 0:z.key)==null?void 0:bt.split("$"))==null?void 0:St[1]))==null?void 0:Qe.split(","))==null?void 0:Wt.map(Ot=>({label:Ot,value:Ot})):[],(Ut=z==null?void 0:z.key)!=null&&Ut.includes("$")&&(z.key=(Bt=(nn=z==null?void 0:z.key)==null?void 0:nn.split("$"))==null?void 0:Bt[0]),z.value=(cn=Object.values(q))==null?void 0:cn[pe],z.optionUrl=z!=null&&z.formMenuSelect&&((Ge=z==null?void 0:z.formMenuSelect)==null?void 0:Ge.length)>0?{groupSelect:(Pt=z==null?void 0:z.groupSelect)==null?void 0:Pt.split(/[::]/).map(Ot=>Ot.trim()),menuSelect:z==null?void 0:z.formMenuSelect,selectRelateType:"",type:(z==null?void 0:z.formType)??(z!=null&&z.groupSelect?"Select":"")}:null,z})),X});let fe=Oe.cloneDeep(ge.value),ve=(Te=(we=Oe.cloneDeep(le))==null?void 0:we.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Te.contents;if(fe=fe==null?void 0:fe.map(X=>{var $;return X.value=($=ve==null?void 0:ve.find((z,pe)=>pe===(X==null?void 0:X.id)))==null?void 0:$.value,X}),!_t.value)return;let me="",Be=(Ve=(te=($e=Oe.cloneDeep(le))==null?void 0:$e.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:te.contents)==null?void 0:Ve.find((X,$)=>{var z,pe;return(X==null?void 0:X.label)===B.value||($==null?void 0:$.toString())===((pe=(z=B.value)==null?void 0:z.split("a"))==null?void 0:pe[1].toString())});if((w=(ft=(Xe=Oe.cloneDeep(le))==null?void 0:Xe.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:ft.contents)==null||w.forEach(X=>{var $,z,pe,ie,Ee;me===""&&((pe=(z=($=X==null?void 0:X.optionUrl)==null?void 0:$.groupSelect)==null?void 0:z[1])!=null&&pe.includes("["))&&(me=(Ee=(ie=X==null?void 0:X.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:Ee[1])}),(H=Be==null?void 0:Be.optionUrl)!=null&&H.menuSelect&&_t.value){let X=await kl(Be),$;if(X==null||X.forEach(z=>{var pe,ie,Ee,re,He,Se,Pe,it,Mt,Ct;me===((ie=(pe=Be==null?void 0:Be.optionUrl)==null?void 0:pe.groupSelect)==null?void 0:ie[1])&&((He=(re=(Ee=Be==null?void 0:Be.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:re[1])!=null&&He.includes("["))&&((Ct=Oe.cloneDeep(z))==null?void 0:Ct[(Mt=(it=(Pe=(Se=Be==null?void 0:Be.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Pe[1])==null?void 0:it.replaceAll("[",""))==null?void 0:Mt.replaceAll("]","")])===(Be==null?void 0:Be.value)&&($=z)}),$){let z=Oe.cloneDeep(fe);z=z==null?void 0:z.map(ie=>{var Ee,re,He,Se,Pe,it,Mt,Ct,bt,St,Qe;return($!=null&&$[ie==null?void 0:ie.label]||$!=null&&$[(Se=(He=(re=(Ee=ie==null?void 0:ie.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:re[1])==null?void 0:He.replaceAll("[",""))==null?void 0:Se.replaceAll("]","")])&&((Mt=(it=(Pe=ie==null?void 0:ie.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])!=null&&Mt.includes("["))&&(ie.value=($==null?void 0:$[ie==null?void 0:ie.label])||($==null?void 0:$[(Qe=(St=(bt=(Ct=ie==null?void 0:ie.optionUrl)==null?void 0:Ct.groupSelect)==null?void 0:bt[1])==null?void 0:St.replaceAll("[",""))==null?void 0:Qe.replaceAll("]","")])),ie}),ge.value=z;let pe=Oe.cloneDeep(z);pe=pe==null?void 0:pe.map(ie=>{var Ee,re,He,Se;return(re=(Ee=ie==null?void 0:ie.optionUrl)==null?void 0:Ee.menuSelect)!=null&&re.some(Pe=>Pe==null?void 0:Pe.includes)&&(ie.optionUrl.menuSelect=(Se=(He=ie==null?void 0:ie.optionUrl)==null?void 0:He.menuSelect)==null?void 0:Se.map(Pe=>{var it,Mt,Ct,bt;if(Pe!=null&&Pe.includes("[")){let St=(Mt=(it=Pe==null?void 0:Pe.replaceAll("[","").replaceAll("]",""))==null?void 0:it.split(":"))==null?void 0:Mt[1];Pe=(bt=(Ct=Oe.cloneDeep(z))==null?void 0:Ct.find(Qe=>(Qe==null?void 0:Qe.label)===St))==null?void 0:bt.value}return Pe})),ie}),ge.value=pe}}_t.value=!1},Ft=q=>q?(q==null?void 0:q.toUpperCase())==="INPUT"?"TEXTAREA":q:"TEXTAREA",Qt=q=>{var me,Be;const W=(Be=(me=V.value)==null?void 0:me.find(we=>(we==null?void 0:we.label)===(q==null?void 0:q.label)))==null?void 0:Be.multiple,le=q==null?void 0:q.prop;if((q==null?void 0:q.formType)!="Select")return;y.value.forEach(we=>{const Te=we==null?void 0:we[le];W&&Vo(Te)&&(we[le]=[Te]),!W&&!Vo(Te)&&(we[le]="")})},Nt=q=>{var le,fe,ve,me,Be,we;Ye("");const W=(le=ge.value)==null?void 0:le.reduce((Te,$e)=>(Te[$e.name]=$e.value,Te),{});((fe=Object.keys(W))==null?void 0:fe.length)>0&&(ye.value=W,S.value="",C.value=(ve=y.value)==null?void 0:ve.length,ce.value=(me=Z.value)==null?void 0:me.filter(Te=>(Te==null?void 0:Te.label)!=="新增"),a.value=(we=(Be=l.value)==null?void 0:Be.filter(Te=>(Te==null?void 0:Te.label)!=="操作"))==null?void 0:we.map(Te=>{var te,Ve,Xe;const $e=(Ve=(te=V.value)==null?void 0:te.find(ft=>(ft==null?void 0:ft.label)===(Te==null?void 0:Te.label)))==null?void 0:Ve.multiple;return Qt(Te),{...Te,type:"edit",optionUrl:Te!=null&&Te.formMenuSelect&&((Xe=Te==null?void 0:Te.formMenuSelect)==null?void 0:Xe.length)>0?{groupSelect:Te==null?void 0:Te.groupSelect,menuSelect:Te==null?void 0:Te.formMenuSelect,selectRelateType:"",type:Te==null?void 0:Te.formType,multiple:$e}:null,columnType:Ft(Te==null?void 0:Te.formType)}}),q==="createClick"&&ze(!1))};v.watch(()=>[r.itemData,he.value,Y.value,ee.value,f==null?void 0:f.value],()=>{var Te,$e,te,Ve,Xe,ft,w,H,X,$,z,pe,ie,Ee,re,He,Se,Pe,it,Mt,Ct,bt,St,Qe,Wt,Ut,nn,Bt,cn;const q=(Te=Oe.cloneDeep(r.itemData))==null?void 0:Te.filter(Ge=>(Ge==null?void 0:Ge.key)==="header");($e=Oe.cloneDeep(r.itemData))==null||$e.filter(Ge=>(Ge==null?void 0:Ge.key)==="tableIndexColumn")[0];const W=(te=Oe.cloneDeep(r.itemData))==null?void 0:te.find(Ge=>(Ge==null?void 0:Ge.key)==="page"),le=(Ve=Oe.cloneDeep(r.itemData))==null?void 0:Ve.find(Ge=>(Ge==null?void 0:Ge.key)==="rowButton"),fe=(Xe=Oe.cloneDeep(r.itemData))==null?void 0:Xe.find(Ge=>(Ge==null?void 0:Ge.key)==="extraButton"),ve=(ft=Oe.cloneDeep(r.itemData))==null?void 0:ft.filter(Ge=>(Ge==null?void 0:Ge.key)==="tableContents"),me=(w=Oe.cloneDeep(r.itemData))==null?void 0:w.filter(Ge=>(Ge==null?void 0:Ge.key)==="tableIndex");V.value=($=(X=(H=Oe.cloneDeep(r.itemData))==null?void 0:H.filter(Ge=>(Ge==null?void 0:Ge.key)==="tableToForm"))==null?void 0:X[0])==null?void 0:$.contents,L.value=(W==null?void 0:W.contents)??!1;let Be=[];he.value===""?Be=q==null?void 0:q[0]:Be=(q==null?void 0:q.find(Ge=>(Ge==null?void 0:Ge.selectLabel)==="("+he.value+")"))??(q==null?void 0:q.find(Ge=>!(Ge!=null&&Ge.selectLabel)));let we=[];if(he.value===""?we=me==null?void 0:me[0]:we=(me==null?void 0:me.find(Ge=>(Ge==null?void 0:Ge.selectLabel)==="("+he.value+")"))??(me==null?void 0:me.find(Ge=>!(Ge!=null&&Ge.selectLabel))),((z=Be==null?void 0:Be.contents)==null?void 0:z.length)>0){let Ge=[];if(Be!=null&&Be.contents.some(rt=>Array.isArray(rt)&&(rt==null?void 0:rt.find(ke=>ke.children))))ee.value===""?Ge=(ie=(pe=rn.getGradeColumns(Oe.cloneDeep(Be==null?void 0:Be.contents)))==null?void 0:pe[0])==null?void 0:ie.filter(rt=>!Array.isArray(rt)):(ee.value.split("-"),Ge=(Ee=rn.getGradeColumns(Oe.cloneDeep(Be==null?void 0:Be.contents)))==null?void 0:Ee[0]);else{const rt=Be!=null&&Be.contents.some(ke=>Array.isArray(ke))?(re=Be==null?void 0:Be.contents)==null?void 0:re[0]:Be==null?void 0:Be.contents;rt==null||rt.forEach((ke,ht)=>{var xn;Ge.push({label:(ke==null?void 0:ke.label)??"",prop:(ke==null?void 0:ke.label)==="操作"?"operate":(ke==null?void 0:ke.prop)??"a"+ht,width:ke!=null&&ke.width?parseInt(ke.width):"",fixed:(ke==null?void 0:ke.fixed)??void 0,sortable:(ke==null?void 0:ke.sortable)??!1,align:(ke==null?void 0:ke.align)??"left",showOverflowTooltip:(ke==null?void 0:ke.showOverflowTooltip)??!0,isNotDrag:(ke==null?void 0:ke.isNotDrag)??!1,isEditCol:(ke==null?void 0:ke.isEditCol)??!1,isOperate:(ke==null?void 0:ke.isOperate)??!1,id:(ke==null?void 0:ke.id)??ht,type:(ke==null?void 0:ke.label)==="操作"?"operate":void 0,formType:(ke==null?void 0:ke.formType)??(ke!=null&&ke.groupSelect?"Select":""),isTableColHidden:ke==null?void 0:ke.isTableColHidden,isFormColHidden:ke==null?void 0:ke.isFormColHidden,options:(ke==null?void 0:ke.options)??[],value:(ke==null?void 0:ke.value)??"",formMenuSelect:(ke==null?void 0:ke.formMenuSelect)??[],isRoute:(ke==null?void 0:ke.isRoute)??!1,groupSelect:ke!=null&&ke.groupSelect?(xn=ke==null?void 0:ke.groupSelect)==null?void 0:xn.replaceAll('"',"").split(":"):[],isMainKey:ke==null?void 0:ke.isMainKey})})}a.value=Ge,d.value=Ge,t.value=(He=a.value)==null?void 0:He.map(rt=>rt==null?void 0:rt.label);let Pt=(Pe=(Se=rn.getAllLeafNodes(Oe.cloneDeep(a.value)))==null?void 0:Se.filter(rt=>(rt==null?void 0:rt.type)!=="operate"))==null?void 0:Pe.map((rt,ke)=>({prop:(rt==null?void 0:rt.prop)??"a"+ke,column:rt.label}));De.value=Pt;let Ot=[];he.value===""?Ot=ve==null?void 0:ve[0]:Ot=(ve==null?void 0:ve.find(rt=>(rt==null?void 0:rt.selectLabel)==="("+he.value+")"))??(ve==null?void 0:ve.find(rt=>!(rt!=null&&rt.selectLabel)));let Jt=Array.isArray((it=Ot==null?void 0:Ot.contents)==null?void 0:it[0])&&((Mt=Ot==null?void 0:Ot.contents)!=null&&Mt[0].every(rt=>Array.isArray(rt)))?(Ct=Oe.cloneDeep(Ot==null?void 0:Ot.contents))==null?void 0:Ct[0]:Oe.cloneDeep(Ot==null?void 0:Ot.contents);we!=null&&we.contents&&((bt=we==null?void 0:we.contents)==null?void 0:bt.length)!==0&&(Jt=(St=Oe.cloneDeep(Jt))==null?void 0:St.map((rt,ke)=>{if(!Array.isArray(rt)){let ht={};for(let xn in rt)xn!=="id"&&xn!=="index"&&(ht[xn]=rt[xn]);rt=Object.values(ht)}return rt}));const sn=!!((Qe=a.value)!=null&&Qe.find(rt=>rt.prop==="index"));Jt=yu(Oe.cloneDeep(Jt),we==null?void 0:we.contents,sn);const Kt=[];Jt==null||Jt.forEach((rt,ke)=>{var xn;let ht={};if(Array.isArray(rt)){let M=[];rt==null||rt.filter(b=>!(b!=null&&b.id)).forEach((b,F)=>{var R,N,de,Me,lt,qe;if((R=Pt==null?void 0:Pt[F])!=null&&R.prop&&!Array.isArray(b)){let nt={};nt[Pt[F].column]=b,f!=null&&f.value&&((N=f==null?void 0:f.value)==null?void 0:N.length)>0&&((de=f==null?void 0:f.value)!=null&&de.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(nt)))&&(M=(Me=f==null?void 0:f.value)==null?void 0:Me.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(nt))),M&&M.length>0?ht[Pt[F].prop]=M!=null&&M.find(ct=>{var Ue;return((Ue=Object.keys(ct))==null?void 0:Ue[0])===Pt[F].column})?(lt=M==null?void 0:M.find(ct=>{var Ue;return((Ue=Object.keys(ct))==null?void 0:Ue[0])===Pt[F].column}))==null?void 0:lt[Pt[F].column]:b:ht[Pt[F].prop]=b}else Array.isArray(b)&&((qe=Pt[F])!=null&&qe.prop?ht[Pt[F].prop]=b:ht.children=vu(b,Pt))})}else ht=rt;Array.isArray(rt)&&rt.some(M=>M==null?void 0:M.id)?Kt.push(Object.assign(ht,{id:(xn=rt==null?void 0:rt.find(M=>M.id))==null?void 0:xn.id})):ht.id?Kt.push(ht):Kt.push(Object.assign(ht,{id:ke.toString()}))}),y.value=Kt}else a.value=[],l.value=[],y.value=[];((Wt=le==null?void 0:le.contents)==null?void 0:Wt.length)>0?Q.value=le==null?void 0:le.contents:Q.value=[],((Ut=fe==null?void 0:fe.contents)==null?void 0:Ut.length)>0?(ce.value=fe==null?void 0:fe.contents,Z.value=fe==null?void 0:fe.contents):(ce.value=[],Z.value=[]),C.value=((nn=y==null?void 0:y.value)==null?void 0:nn.length)??0,ae.value=y.value,je.value&&(a.value=(cn=(Bt=l.value)==null?void 0:Bt.filter(Ge=>(Ge==null?void 0:Ge.label)!=="操作"))==null?void 0:cn.map(Ge=>{var Pt;return{...Ge,type:"edit",optionUrl:Ge!=null&&Ge.formMenuSelect&&((Pt=Ge==null?void 0:Ge.formMenuSelect)==null?void 0:Pt.length)>0?{groupSelect:Ge==null?void 0:Ge.groupSelect,menuSelect:Ge==null?void 0:Ge.formMenuSelect,selectRelateType:"",type:Ge==null?void 0:Ge.formType}:null}}),Nt())},{deep:!0,immediate:!0}),v.watch(()=>r==null?void 0:r.operatingForm,q=>{q!=null&&q.form&&(Ye(q==null?void 0:q.form),P.value=q==null?void 0:q.dialogTitle,se.value=!0,E.value=!0)},{immediate:!0,deep:!0});const Cn=()=>{je.value=!je.value,je.value?(Nt("viewChange"),p.setCacheUpdatingData(null)):(ce.value=Z.value,a.value=d.value,x.value&&o("change",x.value))};v.watch(()=>g.value,q=>{x.value&&(o("change",x.value),je.value=!1,p.setCacheUpdatingData(null))},{immediate:!0}),v.ref(!1);const Hn=q=>{Nt("createClick")},fs=(q,W,le)=>{var fe,ve;ye.value=Oe.cloneDeep(q),S.value=q==null?void 0:q.id,C.value=(fe=y.value)==null?void 0:fe.length,P.value=(q==null?void 0:q.id)===((ve=y.value)==null?void 0:ve.length)?"新增":"编辑",ze(!0),le&&je.value&&(je.value=!0)},Yi=q=>{var Te,$e,te,Ve,Xe,ft,w,H,X,$;const{row:W,column:le,item:fe,slotData:ve}=q;let me=W!=null&&W[le==null?void 0:le.prop]?(($e=(Te=W==null?void 0:W[le==null?void 0:le.prop])==null?void 0:Te[0])==null?void 0:$e.contents)??(W==null?void 0:W[le==null?void 0:le.prop]):((Ve=(te=W==null?void 0:W[fe==null?void 0:fe.prop])==null?void 0:te[0])==null?void 0:Ve.contents)??(W==null?void 0:W[fe==null?void 0:fe.prop])??((ft=(Xe=ve==null?void 0:ve[fe==null?void 0:fe.prop])==null?void 0:Xe[0])==null?void 0:ft.contents)??(ve==null?void 0:ve[fe==null?void 0:fe.prop])??((X=(H=W==null?void 0:W[(w=fe==null?void 0:fe.child)==null?void 0:w.prop])==null?void 0:H[0])==null?void 0:X.contents)??(W==null?void 0:W[($=fe==null?void 0:fe.child)==null?void 0:$.prop]),we=Array.isArray(me)&&!(me!=null&&me.every(z=>typeof z=="string"||typeof z=="number"))?"查看":me;return we=Array.isArray(we)?we.join(","):we,we},ei=q=>{var $e,te,Ve,Xe,ft,w,H,X,$,z;const{row:W,column:le,item:fe,slotData:ve}=q;let me=W!=null&&W[le==null?void 0:le.prop]?((te=($e=W==null?void 0:W[le==null?void 0:le.prop])==null?void 0:$e[0])==null?void 0:te.contents)??(W==null?void 0:W[le==null?void 0:le.prop]):((Xe=(Ve=W==null?void 0:W[fe==null?void 0:fe.prop])==null?void 0:Ve[0])==null?void 0:Xe.contents)??(W==null?void 0:W[fe==null?void 0:fe.prop])??((w=(ft=ve==null?void 0:ve[fe==null?void 0:fe.prop])==null?void 0:ft[0])==null?void 0:w.contents)??(ve==null?void 0:ve[fe==null?void 0:fe.prop])??(($=(X=W==null?void 0:W[(H=fe==null?void 0:fe.child)==null?void 0:H.prop])==null?void 0:X[0])==null?void 0:$.contents)??(W==null?void 0:W[(z=fe==null?void 0:fe.child)==null?void 0:z.prop]);const we=Array.isArray(me)&&!(me!=null&&me.every(pe=>typeof pe=="string"||typeof pe=="number")),Te=Array.isArray(me)&&(me==null?void 0:me.find(pe=>pe==null?void 0:pe.url));return we&&Te};return(q,W)=>{var Te,$e;const le=v.resolveComponent("el-icon"),fe=v.resolveComponent("el-popover"),ve=v.resolveComponent("svg-icon"),me=v.resolveComponent("el-checkbox"),Be=v.resolveComponent("el-checkbox-group"),we=v.resolveComponent("el-button");return v.openBlock(),v.createElementBlock("div",q6,[(v.openBlock(),v.createBlock(On.ssTable,{columns:a.value,checkedColumns:t.value,key:a.value,tableData:y.value,isEditViewport:je.value,isShowPagination:L.value,isShowEdit:!1,isShowDelete:!1,onDbClickRow:xe,extraButton:ce.value,onContentClick:Ze,onRowClick:yt,onSelectChange:dt,onCellChange:fs,onChange:Ae,onPreview:ot},v.createSlots({headerButton:v.withCtx(te=>[s.showHeader?(v.openBlock(),v.createBlock(F6,{key:0,compName:s.compName,buttons:te.buttons,onButtonClick:W[0]||(W[0]=Ve=>st(Ve,"",{})),columns:a.value,onFilter:Re},null,8,["compName","buttons","columns"])):v.createCommentVNode("",!0)]),viewport:v.withCtx(()=>{var te;return[((te=y.value)==null?void 0:te.length)>0?(v.openBlock(),v.createElementBlock("div",J6,[v.createElementVNode("span",{title:"编辑视图",onClick:Cn},[v.createVNode(ve,{name:"editTable",class:"view-icon"})])])):v.createCommentVNode("",!0)]}),rowCreate:v.withCtx(({row:te})=>[v.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:Ve=>Hn()},[v.createVNode(ve,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,K6)]),operateCol:v.withCtx(()=>[v.createVNode(fe,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"click",onShow:ut},{reference:v.withCtx(()=>[v.createElementVNode("span",Z6,[v.createVNode(ve,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:v.withCtx(()=>[v.createElementVNode("div",Q6,[v.createVNode(Be,{modelValue:t.value,"onUpdate:modelValue":W[2]||(W[2]=te=>t.value=te),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(Fe.value,te=>(v.openBlock(),v.createBlock(me,{key:te.label,label:te.label,value:te.label,style:{width:"100%",marginRight:0}},{default:v.withCtx(()=>[v.createElementVNode("span",null,v.toDisplayString(te.label),1),v.createVNode(ve,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px",cursor:"move",color:"grey",position:"absolute",right:"5px"}})]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:v.withCtx(te=>[ei(te)?(v.openBlock(),v.createBlock(fe,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:v.withCtx(()=>[v.createElementVNode("span",e5,v.toDisplayString(Yi(te)),1)]),default:v.withCtx(()=>{var Ve;return[v.createElementVNode("div",t5,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(te==null?void 0:te.row[(Ve=te==null?void 0:te.column)==null?void 0:Ve.prop],Xe=>(v.openBlock(),v.createElementBlock("div",n5,[v.createElementVNode("div",{class:"prop-url",title:jt(Xe),onClick:ft=>k(Xe)},v.toDisplayString(jt(Xe)),9,i5),v.createElementVNode("div",{class:"prop-download",onClick:ft=>T(Xe)}," 下载 ",8,s5)]))),256))])]}),_:2},1024)):(v.openBlock(),v.createElementBlock(v.Fragment,{key:1},[v.createTextVNode(v.toDisplayString(Yi(te)),1)],64))]),_:2},[((Te=Q.value)==null?void 0:Te.length)>0?{name:"actions",fn:v.withCtx(({item:te})=>[v.createVNode(fe,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:v.withCtx(()=>[v.createVNode(le,null,{default:v.withCtx(()=>[v.createVNode(v.unref(Pn.more_filled_default))]),_:1})]),default:v.withCtx(()=>[v.createElementVNode("div",$6,[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(oe(Q.value,te),(Ve,Xe)=>(v.openBlock(),v.createElementBlock("div",{class:"menu-config-item",key:Xe,onClick:ft=>st(Ve==null?void 0:Ve.label,te,{extra:Ve})},[v.createElementVNode("div",{style:v.normalizeStyle({color:Ve==null?void 0:Ve.textColor}),class:"extra-button-label"},v.toDisplayString(Ve==null?void 0:Ve.label),5)],8,Y6))),128))])]),_:2},1024)]),key:"0"}:void 0,(($e=y.value)==null?void 0:$e.length)>0?{name:"batchButton",fn:v.withCtx(te=>[v.createVNode(N6,{buttons:te.buttons,onButtonClick:W[1]||(W[1]=Ve=>st(Ve,"",{}))},null,8,["buttons"])]),key:"1"}:void 0]),1032,["columns","checkedColumns","tableData","isEditViewport","isShowPagination","extraButton"])),v.createVNode(On.ssDialog,{title:P.value,visible:E.value,width:Ce.value,onBeforeDestroy:tt},{default:v.withCtx(()=>[v.createElementVNode("div",r5,[v.createVNode(On.ssForm,{rowContents:ge.value,isEnableWrap:!1,onChange:pt,onClickTrigger:Le,isEdit:U.value,onBlurChange:at},null,8,["rowContents","isEdit"])])]),footer:v.withCtx(()=>[se.value?(v.openBlock(),v.createElementBlock("div",a5,[v.createVNode(we,{onClick:W[3]||(W[3]=te=>E.value=!1),id:"themeBorderButton"},{default:v.withCtx(()=>W[6]||(W[6]=[v.createTextVNode(v.toDisplayString("取消"))])),_:1,__:[6]}),v.createVNode(we,{class:"ok-button",onClick:ze,id:"themeButton"},{default:v.withCtx(()=>W[7]||(W[7]=[v.createTextVNode(v.toDisplayString("确认"))])),_:1,__:[7]})])):v.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),v.createVNode(On.ssDialog,{title:P.value,visible:D.value,width:O.value,onBeforeDestroy:W[5]||(W[5]=te=>D.value=!1)},{default:v.withCtx(()=>[v.createVNode(H6)]),footer:v.withCtx(()=>[v.createElementVNode("div",o5,[v.createVNode(we,{onClick:W[4]||(W[4]=te=>D.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:v.withCtx(()=>W[8]||(W[8]=[v.createTextVNode(v.toDisplayString("取消"))])),_:1,__:[8]}),v.createVNode(we,{class:"ok-button",onClick:Ne,id:"themeButton"},{default:v.withCtx(()=>W[9]||(W[9]=[v.createTextVNode(v.toDisplayString("确认"))])),_:1,__:[9]})])]),_:1},8,["title","visible","width"]),m.value?(v.openBlock(),v.createBlock(On.ssFilePreview,{key:0,fileDataList:u.value,onDestroy:mt},null,8,["fileDataList"])):v.createCommentVNode("",!0),c.value?(v.openBlock(),v.createBlock(On.ssDialog,{key:1,visible:c.value,onBeforeDestroy:K,style:{height:"700px",width:"1000px"}},{default:v.withCtx(()=>[c.value?(v.openBlock(),v.createBlock(mu,{key:0,"urdf-url":G.value},null,8,["urdf-url"])):v.createCommentVNode("",!0)]),_:1},8,["visible"])):v.createCommentVNode("",!0)])}}},Eu=Pi._export_sfc(l5,[["__scopeId","data-v-db6849fa"]]);exports.ACESFilmicToneMapping=Gl;exports.AmbientLight=cc;exports.Box3=Fn;exports.CatmullRomCurve3=rc;exports.Color=Tt;exports.DirectionalLight=gr;exports.DoubleSide=pn;exports.Euler=Sn;exports.GridHelper=K0;exports.HemisphereLight=J0;exports.MOUSE=Ti;exports.MathUtils=Ei;exports.Matrix4=Et;exports.Mesh=zt;exports.MeshPhongMaterial=fn;exports.OrbitControls=ru;exports.PCFSoftShadowMap=Hl;exports.PerspectiveCamera=bn;exports.Plane=Jn;exports.PlaneGeometry=Di;exports.PointLight=Pa;exports.SRGBColorSpace=qt;exports.Scene=Ia;exports.ShadowMaterial=X0;exports.TubeGeometry=ka;exports.Vector3=I;exports.WebGLRenderer=iu;exports.Xe=uu;exports.formGetOptions=Ho;exports.getSelectRow=kl;exports.isString=Vo;exports.ssTable=Eu;exports.threeView=mu;exports.useFormComp=Su;exports.useFormToTableComp=gu;exports.useModelLoader=z6;exports.useTableComp=bu;exports.useUnit=_u;
|
|
4204
|
+
`);let i=[];for(let a=0,l=n.length;a<l;a++){const c=n[a].trimStart();if(c.length===0)continue;const d=c.charAt(0);if(d!=="#")if(d==="v"){const m=c.split(h0);switch(m[0]){case"v":t.vertices.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3])),m.length>=7?(fa.setRGB(parseFloat(m[4]),parseFloat(m[5]),parseFloat(m[6]),qt),t.colors.push(fa.r,fa.g,fa.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3]));break;case"vt":t.uvs.push(parseFloat(m[1]),parseFloat(m[2]));break}}else if(d==="f"){const u=c.slice(1).trim().split(h0),h=[];for(let _=0,p=u.length;_<p;_++){const f=u[_];if(f.length>0){const v=f.split("/");h.push(v)}}const g=h[0];for(let _=1,p=h.length-1;_<p;_++){const f=h[_],v=h[_+1];t.addFace(g[0],f[0],v[0],g[1],f[1],v[1],g[2],f[2],v[2])}}else if(d==="l"){const m=c.substring(1).trim().split(" ");let u=[];const h=[];if(c.indexOf("/")===-1)u=m;else for(let g=0,_=m.length;g<_;g++){const p=m[g].split("/");p[0]!==""&&u.push(p[0]),p[1]!==""&&h.push(p[1])}t.addLineGeometry(u,h)}else if(d==="p"){const u=c.slice(1).trim().split(" ");t.addPointGeometry(u)}else if((i=T4.exec(c))!==null){const m=(" "+i[0].slice(1).trim()).slice(1);t.startObject(m)}else if(R4.test(c))t.object.startMaterial(c.substring(7).trim(),t.materialLibraries);else if(C4.test(c))t.materialLibraries.push(c.substring(7).trim());else if(D4.test(c))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(d==="s"){if(i=c.split(" "),i.length>1){const u=i[1].trim().toLowerCase();t.object.smooth=u!=="0"&&u!=="off"}else t.object.smooth=!0;const m=t.object.currentMaterial();m&&(m.smooth=t.object.smooth)}else{if(c==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}t.finalize();const r=new Ln;if(r.materialLibraries=[].concat(t.materialLibraries),!(t.objects.length===1&&t.objects[0].geometry.vertices.length===0)===!0)for(let a=0,l=t.objects.length;a<l;a++){const c=t.objects[a],d=c.geometry,m=c.materials,u=d.type==="Line",h=d.type==="Points";let g=!1;if(d.vertices.length===0)continue;const _=new hn;_.setAttribute("position",new It(d.vertices,3)),d.normals.length>0&&_.setAttribute("normal",new It(d.normals,3)),d.colors.length>0&&(g=!0,_.setAttribute("color",new It(d.colors,3))),d.hasUVIndices===!0&&_.setAttribute("uv",new It(d.uvs,2));const p=[];for(let v=0,b=m.length;v<b;v++){const S=m[v],F=S.name+"_"+S.smooth+"_"+g;let C=t.materials[F];if(this.materials!==null){if(C=this.materials.create(S.name),u&&C&&!(C instanceof Ri)){const R=new Ri;qn.prototype.copy.call(R,C),R.color.copy(C.color),C=R}else if(h&&C&&!(C instanceof Gi)){const R=new Gi({size:10,sizeAttenuation:!1});qn.prototype.copy.call(R,C),R.color.copy(C.color),R.map=C.map,C=R}}C===void 0&&(u?C=new Ri:h?C=new Gi({size:1,sizeAttenuation:!1}):C=new fn,C.name=S.name,C.flatShading=!S.smooth,C.vertexColors=g,t.materials[F]=C),p.push(C)}let f;if(p.length>1){for(let v=0,b=m.length;v<b;v++){const S=m[v];_.addGroup(S.groupStart,S.groupCount,v)}u?f=new Ra(_,p):h?f=new Vs(_,p):f=new zt(_,p)}else u?f=new Ra(_,p[0]):h?f=new Vs(_,p[0]):f=new zt(_,p[0]);f.name=c.name,r.add(f)}else if(t.vertices.length>0){const a=new Gi({size:1,sizeAttenuation:!1}),l=new hn;l.setAttribute("position",new It(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(l.setAttribute("color",new It(t.colors,3)),a.vertexColors=!0);const c=new Vs(l,a);r.add(c)}return r}}class cs extends oi{constructor(e){super(e)}load(e,t,n,i){const r=this,o=this.path===""?hc.extractUrlBase(e):this.path,a=new Zs(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){try{t(r.parse(l,o))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},n,i)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){const n=e.split(`
|
|
4205
|
+
`);let i={};const r=/\s+/,o={};for(let l=0;l<n.length;l++){let c=n[l];if(c=c.trim(),c.length===0||c.charAt(0)==="#")continue;const d=c.indexOf(" ");let m=d>=0?c.substring(0,d):c;m=m.toLowerCase();let u=d>=0?c.substring(d+1):"";if(u=u.trim(),m==="newmtl")i={name:u},o[u]=i;else if(m==="ka"||m==="kd"||m==="ks"||m==="ke"){const h=u.split(r,3);i[m]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else i[m]=u}const a=new P4(this.resourcePath||t,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(o),a}}class P4{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:Qn,this.wrap=this.options.wrap!==void 0?this.options.wrap:di}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const n in e){const i=e[n],r={};t[n]=r;for(const o in i){let a=!0,l=i[o];const c=o.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(l=[l[0]/255,l[1]/255,l[2]/255]),this.options&&this.options.ignoreZeroRGBs&&l[0]===0&&l[1]===0&&l[2]===0&&(a=!1);break}a&&(r[c]=l)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return this.materials[e]===void 0&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,n=this.materialsInfo[e],i={name:e,side:this.side};function r(a,l){return typeof l!="string"||l===""?"":/^https?:\/\//i.test(l)?l:a+l}function o(a,l){if(i[a])return;const c=t.getTextureParams(l,i),d=t.loadTexture(r(t.baseUrl,c.url));d.repeat.copy(c.scale),d.offset.copy(c.offset),d.wrapS=t.wrap,d.wrapT=t.wrap,(a==="map"||a==="emissiveMap")&&(d.colorSpace=qt),i[a]=d}for(const a in n){const l=n[a];let c;if(l!=="")switch(a.toLowerCase()){case"kd":i.color=Gt.colorSpaceToWorking(new Tt().fromArray(l),qt);break;case"ks":i.specular=Gt.colorSpaceToWorking(new Tt().fromArray(l),qt);break;case"ke":i.emissive=Gt.colorSpaceToWorking(new Tt().fromArray(l),qt);break;case"map_kd":o("map",l);break;case"map_ks":o("specularMap",l);break;case"map_ke":o("emissiveMap",l);break;case"norm":o("normalMap",l);break;case"map_bump":case"bump":o("bumpMap",l);break;case"disp":o("displacementMap",l);break;case"map_d":o("alphaMap",l),i.transparent=!0;break;case"ns":i.shininess=parseFloat(l);break;case"d":c=parseFloat(l),c<1&&(i.opacity=c,i.transparent=!0);break;case"tr":c=parseFloat(l),this.options&&this.options.invertTrProperty&&(c=1-c),c>0&&(i.opacity=1-c,i.transparent=!0);break}}return this.materials[e]=new fn(i),this.materials[e]}getTextureParams(e,t){const n={scale:new et(1,1),offset:new et(0,0)},i=e.split(/\s+/);let r;return r=i.indexOf("-bm"),r>=0&&(t.bumpScale=parseFloat(i[r+1]),i.splice(r,2)),r=i.indexOf("-mm"),r>=0&&(t.displacementBias=parseFloat(i[r+1]),t.displacementScale=parseFloat(i[r+2]),i.splice(r,3)),r=i.indexOf("-s"),r>=0&&(n.scale.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),r=i.indexOf("-o"),r>=0&&(n.offset.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),n.url=i.join(" ").trim(),n}loadTexture(e,t,n,i,r){const o=this.manager!==void 0?this.manager:ac;let a=o.getHandler(e);a===null&&(a=new oc(o)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const l=a.load(e,n,i,r);return t!==void 0&&(l.mapping=t),l}}const Bo="http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";function Us(s){if(s==null||!isFinite(s))return"";const e=s/(1024*1024);if(e>=1)return`${e.toFixed(1)} MB`;const t=s/1024;return t>=1?`${t.toFixed(1)} KB`:`${s} B`}function Oo(s){try{const e=s.split("?")[0].split("#")[0];return e.substring(e.lastIndexOf("/")+1)||e}catch{return s}}function F4(s,e,t,n){return{loadUrdfFromUrl:async r=>{t.value=!0,n.value="正在初始化 URDF 加载器...";const{scene:o}=s();if(!o)return console.error("场景尚未初始化,无法加载 URDF 模型。"),t.value=!1,null;let a=0,l=0;const c=new Y0;c.onStart=(u,h,g)=>{a=g||0,l=h||0,a>0?n.value=`开始下载资源: 0 / ${a}`:n.value="开始下载资源...",t.value=!0},c.onProgress=(u,h,g)=>{l=h||l,a=g||a;const _=Math.min(l+1,a||l+1);n.value=a?`正在加载第 ${_} / ${a} 个文件: ${Oo(u)}`:`正在加载: ${Oo(u)}`},c.onError=u=>{console.warn("资源加载失败:",u)},c.onLoad=()=>{n.value="资源加载完成",t.value=!1,setTimeout(()=>{!t.value&&n.value==="资源加载完成"&&(n.value="")},400)};const d=(u,h,g)=>{const _=Math.min(l+1,a||l+1),p=Oo(u);g&&g>0?n.value=a?`正在下载第 ${_} / ${a} 个文件: ${p}(${Us(h)} / ${Us(g)})`:`正在下载: ${p}(${Us(h)} / ${Us(g)})`:h&&h>0?n.value=a?`正在下载第 ${_} / ${a} 个文件: ${p}(已下载 ${Us(h)})`:`正在下载: ${p}(已下载 ${Us(h)})`:n.value=a?`正在下载第 ${_} / ${a} 个文件: ${p}`:`正在下载: ${p}`},m=new gc(c);m.packages=u=>`${Bo.endsWith("/")?Bo:Bo+"/"}${u}/`,m.loadMeshCb=(u,h,g)=>{const _=(()=>{const p=u.split("?")[0].split("#")[0],f=p.lastIndexOf(".");return f>=0?p.slice(f+1).toLowerCase():void 0})();switch(_){case"obj":{const p=(()=>{try{return new URL(".",u).toString()}catch{const F=u.lastIndexOf("/");return F>=0?u.slice(0,F+1):u}})(),f=(()=>{var C;return(((C=u.split("/").pop())==null?void 0:C.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),v=`${p}${f}.mtl`,b=F=>{const C=new ls(h);F&&C.setMaterials(F),C.load(u,R=>g(R),R=>{d(u,R==null?void 0:R.loaded,R==null?void 0:R.total)},R=>{console.error(`加载 OBJ 失败: ${u}`,R),g(new Ln)})},S=new cs(h);S.setResourcePath(p),S.load(v,F=>{try{F.preload()}catch{}b(F)},F=>{d(v,F==null?void 0:F.loaded,F==null?void 0:F.total)},F=>{console.warn(`未找到或加载材质失败: ${v}`),b(void 0)});break}case"stl":{new ji(h).load(u,f=>{const v=new fn({color:12303291,shininess:30}),b=new zt(f,v);b.castShadow=!0,b.receiveShadow=!0,g(b)},f=>{d(u,f==null?void 0:f.loaded,f==null?void 0:f.total)},f=>{console.error(`加载 STL 失败: ${u}`,f),g(new Ln)});break}default:console.error(`不支持的网格格式: .${_} (路径: ${u})`),g(new Ln)}};try{const u=r.split("/").pop();n.value=`正在下载 URDF 文件: ${u}`;const h=await new Promise((g,_)=>{m.load(r,p=>g(p),p=>{d(r,p==null?void 0:p.loaded,p==null?void 0:p.total)},p=>_(p))});return h.traverse(g=>{if(g.isMesh){const _=g;_.castShadow=!0,_.receiveShadow=!0}}),o.add(h),e.value.push(h),console.log("URDF 模型加载并添加到场景成功!",h),h}catch(u){return console.error(`加载 URDF 模型 (${r}) 时发生错误:`,u),n.value="模型加载失败",t.value=!1,null}}}}class pu extends oi{constructor(e){super(e),this.littleEndian=!0}load(e,t,n,i){const r=this,o=new Zs(r.manager);o.setPath(r.path),o.setResponseType("arraybuffer"),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(a){try{t(r.parse(a))}catch(l){i?i(l):console.error(l),r.manager.itemError(e)}},n,i)}_getDataView(e,t,n,i){switch(n){case"F":return i===8?e.getFloat64(t,this.littleEndian):e.getFloat32(t,this.littleEndian);case"I":return i===1?e.getInt8(t):i===2?e.getInt16(t,this.littleEndian):e.getInt32(t,this.littleEndian);case"U":return i===1?e.getUint8(t):i===2?e.getUint16(t,this.littleEndian):e.getUint32(t,this.littleEndian)}}parse(e){function t(h,g){const _=h.length,p=new Uint8Array(g);let f=0,v=0,b,S,F;do if(b=h[f++],b<32){if(b++,v+b>g)throw new Error("Output buffer is not large enough");if(f+b>_)throw new Error("Invalid compressed data");do p[v++]=h[f++];while(--b)}else{if(S=b>>5,F=v-((b&31)<<8)-1,f>=_)throw new Error("Invalid compressed data");if(S===7&&(S+=h[f++],f>=_))throw new Error("Invalid compressed data");if(F-=h[f++],v+S+2>g)throw new Error("Output buffer is not large enough");if(F<0)throw new Error("Invalid compressed data");if(F>=v)throw new Error("Invalid compressed data");do p[v++]=p[F++];while(--S+2)}while(f<_);return p}function n(h){const g={},_=new Uint8Array(h);let p="",f="",v=0,b=!1;const S=_.length;for(;v<S&&b===!1;){const P=String.fromCharCode(_[v++]);P===`
|
|
4206
|
+
`||P==="\r"?(f.trim().toLowerCase().startsWith("data")&&(b=!0),f=""):f+=P,p+=P}const F=p.search(/[\r\n]DATA\s(\S*)\s/i),C=/[\r\n]DATA\s(\S*)\s/i.exec(p.slice(F-1));if(g.data=C[1],g.headerLen=C[0].length+F,g.str=p.slice(0,g.headerLen),g.str=g.str.replace(/#.*/gi,""),g.version=/^VERSION (.*)/im.exec(g.str),g.fields=/^FIELDS (.*)/im.exec(g.str),g.size=/^SIZE (.*)/im.exec(g.str),g.type=/^TYPE (.*)/im.exec(g.str),g.count=/^COUNT (.*)/im.exec(g.str),g.width=/^WIDTH (.*)/im.exec(g.str),g.height=/^HEIGHT (.*)/im.exec(g.str),g.viewpoint=/^VIEWPOINT (.*)/im.exec(g.str),g.points=/^POINTS (.*)/im.exec(g.str),g.version!==null&&(g.version=parseFloat(g.version[1])),g.fields=g.fields!==null?g.fields[1].split(" "):[],g.type!==null&&(g.type=g.type[1].split(" ")),g.width!==null&&(g.width=parseInt(g.width[1])),g.height!==null&&(g.height=parseInt(g.height[1])),g.viewpoint!==null&&(g.viewpoint=g.viewpoint[1]),g.points!==null&&(g.points=parseInt(g.points[1],10)),g.points===null&&(g.points=g.width*g.height),g.size!==null&&(g.size=g.size[1].split(" ").map(function(P){return parseInt(P,10)})),g.count!==null)g.count=g.count[1].split(" ").map(function(P){return parseInt(P,10)});else{g.count=[];for(let P=0,A=g.fields.length;P<A;P++)g.count.push(1)}g.offset={};let R=0;for(let P=0,A=g.fields.length;P<A;P++)g.data==="ascii"?g.offset[g.fields[P]]=P:(g.offset[g.fields[P]]=R,R+=g.size[P]*g.count[P]);return g.rowSize=R,g}const i=n(e),r=[],o=[],a=[],l=[],c=[],d=new Tt;if(i.data==="ascii"){const h=i.offset,p=new TextDecoder().decode(e).slice(i.headerLen).split(`
|
|
4207
|
+
`);for(let f=0,v=p.length;f<v;f++){if(p[f]==="")continue;const b=p[f].split(" ");if(h.x!==void 0&&(r.push(parseFloat(b[h.x])),r.push(parseFloat(b[h.y])),r.push(parseFloat(b[h.z]))),h.rgb!==void 0){const S=i.fields.findIndex(L=>L==="rgb"),F=i.type[S],C=parseFloat(b[h.rgb]);let R=C;if(F==="F"){const L=new Float32Array(1);L[0]=C,R=new Int32Array(L.buffer)[0]}const P=(R>>16&255)/255,A=(R>>8&255)/255,E=(R>>0&255)/255;d.setRGB(P,A,E,qt),a.push(d.r,d.g,d.b)}h.normal_x!==void 0&&(o.push(parseFloat(b[h.normal_x])),o.push(parseFloat(b[h.normal_y])),o.push(parseFloat(b[h.normal_z]))),h.intensity!==void 0&&l.push(parseFloat(b[h.intensity])),h.label!==void 0&&c.push(parseInt(b[h.label]))}}if(i.data==="binary_compressed"){const h=new Uint32Array(e.slice(i.headerLen,i.headerLen+8)),g=h[0],_=h[1],p=t(new Uint8Array(e,i.headerLen+8,g),_),f=new DataView(p.buffer),v=i.offset;for(let b=0;b<i.points;b++){if(v.x!==void 0){const S=i.fields.indexOf("x"),F=i.fields.indexOf("y"),C=i.fields.indexOf("z");r.push(this._getDataView(f,i.points*v.x+i.size[S]*b,i.type[S],i.size[S])),r.push(this._getDataView(f,i.points*v.y+i.size[F]*b,i.type[F],i.size[F])),r.push(this._getDataView(f,i.points*v.z+i.size[C]*b,i.type[C],i.size[C]))}if(v.rgb!==void 0){const S=i.fields.indexOf("rgb"),F=f.getUint8(i.points*v.rgb+i.size[S]*b+2)/255,C=f.getUint8(i.points*v.rgb+i.size[S]*b+1)/255,R=f.getUint8(i.points*v.rgb+i.size[S]*b+0)/255;d.setRGB(F,C,R,qt),a.push(d.r,d.g,d.b)}if(v.normal_x!==void 0){const S=i.fields.indexOf("normal_x"),F=i.fields.indexOf("normal_y"),C=i.fields.indexOf("normal_z");o.push(this._getDataView(f,i.points*v.normal_x+i.size[S]*b,i.type[S],i.size[S])),o.push(this._getDataView(f,i.points*v.normal_y+i.size[F]*b,i.type[F],i.size[F])),o.push(this._getDataView(f,i.points*v.normal_z+i.size[C]*b,i.type[C],i.size[C]))}if(v.intensity!==void 0){const S=i.fields.indexOf("intensity");l.push(this._getDataView(f,i.points*v.intensity+i.size[S]*b,i.type[S],i.size[S]))}if(v.label!==void 0){const S=i.fields.indexOf("label");c.push(f.getInt32(i.points*v.label+i.size[S]*b,this.littleEndian))}}}if(i.data==="binary"){const h=new DataView(e,i.headerLen),g=i.offset;for(let _=0,p=0;_<i.points;_++,p+=i.rowSize){if(g.x!==void 0){const f=i.fields.indexOf("x"),v=i.fields.indexOf("y"),b=i.fields.indexOf("z");r.push(this._getDataView(h,p+g.x,i.type[f],i.size[f])),r.push(this._getDataView(h,p+g.y,i.type[v],i.size[v])),r.push(this._getDataView(h,p+g.z,i.type[b],i.size[b]))}if(g.rgb!==void 0){const f=h.getUint8(p+g.rgb+2)/255,v=h.getUint8(p+g.rgb+1)/255,b=h.getUint8(p+g.rgb+0)/255;d.setRGB(f,v,b,qt),a.push(d.r,d.g,d.b)}if(g.normal_x!==void 0){const f=i.fields.indexOf("normal_x"),v=i.fields.indexOf("normal_y"),b=i.fields.indexOf("normal_z");o.push(this._getDataView(h,p+g.normal_x,i.type[f],i.size[f])),o.push(this._getDataView(h,p+g.normal_y,i.type[v],i.size[v])),o.push(this._getDataView(h,p+g.normal_z,i.type[b],i.size[b]))}if(g.intensity!==void 0){const f=i.fields.indexOf("intensity");l.push(this._getDataView(h,p+g.intensity,i.type[f],i.size[f]))}g.label!==void 0&&c.push(h.getInt32(p+g.label,this.littleEndian))}}const m=new hn;r.length>0&&m.setAttribute("position",new It(r,3)),o.length>0&&m.setAttribute("normal",new It(o,3)),a.length>0&&m.setAttribute("color",new It(a,3)),l.length>0&&m.setAttribute("intensity",new It(l,1)),c.length>0&&m.setAttribute("label",new K2(c,1)),m.computeBoundingSphere();const u=new Gi({size:.005});return a.length>0&&(u.vertexColors=!0),new Vs(m,u)}}const N4=Oe.useModelComp(Oe.pinia),{systemPath:p0}=Oe.storeToRefs(N4),pa=y.ref(),m0=new Map;function U4(s,e,t,n,i){const r=async u=>{try{const h=await On.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},o=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=p=>{try{const f=p.target.result,b=new cs().parse(f);b.preload(),h(b)}catch(f){g(f)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),a=async u=>{const h={materials:{},create:function(g){return this.materials[g]?this.materials[g]:(console.warn(`Material '${g}' not found, using default material`),new fn({color:8947848,side:pn}))},getAsArray:function(){const g=[];for(const _ in this.materials)g.push(this.materials[_]);return g},preload:function(){for(const g in this.materials)this.materials[g].map&&(this.materials[g].map.needsUpdate=!0)}};for(const g of u){const _=await o(g);Object.assign(h.materials,_.materials)}return h.preload(),h},l=async(u,h=[])=>new Promise((g,_)=>{const p=new FileReader;p.onload=async f=>{try{const v=f.target.result;let b=null;h&&h.length>0&&(h.length===1?b=await o(h[0]):b=await a(h));const S=new ls;b&&S.setMaterials(b);const F=S.parse(v);b||F.traverse(C=>{C.isMesh&&(C.material=new fn({color:8947848,side:pn}))}),g(F)}catch(v){_(v)}},p.onerror=()=>{_(new Error("OBJ文件读取失败"))},p.readAsText(u)}),c=async u=>{var h;try{t.value=!0;const{scene:g}=s();if(!g)throw new Error("Scene not initialized");i();const _=[];for(let p=0;p<u.length;p++){const f=u[p];n.value=`正在加载模型 ${p+1}/${u.length}...`;const v=await r(f.objUrl),b=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,S=new File([v],b,{type:v.type});let F=[];if(f.mtlUrls){const R=Array.isArray(f.mtlUrls)?f.mtlUrls:[f.mtlUrls];for(let P=0;P<R.length;P++){const A=R[P],E=await r(A),L=(A==null?void 0:A.split("/").pop())||`material_${p}_${P}.mtl`,B=new File([E],L,{type:E.type});F.push(B)}}const C=await l(S,F);g.add(C),e.value.push(C),_.push(C)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let p;const f=u.toLowerCase();switch(f){case".txt":case".cpt":case".obj":const v=await h.text();if(f===".txt"||f===".cpt"){const $=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Ce=[...v.matchAll($)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),Ke=new hn,He=Ce.flatMap(O=>[O.x,O.y,O.z]);if(Ke.setAttribute("position",new It(He,3)),f===".txt"){const O=new Gi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(Ke,O)}else if(f===".cpt"){const O=new Ri({color:"#5B5C99",linewidth:100});p=new Ba(Ke,O)}}else if(f===".obj"){const $=new ls;if(g&&g.length>0){const pe=new cs;for(const Ce of g){const Ke=await Ce.text(),He=pe.parse(Ke);He.preload(),$.setMaterials(He);break}}p=$.parse(v),(!g||g.length===0)&&p.traverse(pe=>{pe.isMesh&&(pe.material=new fn({color:"#B3B3D4"})),pe instanceof zt&&(pe.material.side=pn)})}break;case".stl":const b=await h.arrayBuffer(),F=new ji().parse(b),C=new fn({color:"#B3B3D4",side:pn});p=new zt(F,C);break;case".nc":const R=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],P={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},A=new Ln,E=R.map($=>new Promise((pe,Ce)=>{new ji().load(p0.value===""?`/model/${$}`:`${p0.value}\\${$}`,He=>{const O=new fn({color:P[$]||"#B3B3D4",side:pn}),_t=new zt(He,O);pe(_t)},void 0,Ce)}));try{(await Promise.all(E)).forEach(pe=>A.add(pe)),p=A}catch($){throw console.error("加载NC文件对应的STL文件失败:",$),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const L=new pu,B=new Ln;try{const $=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),pe=new Blob([$.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ke=new Blob([Ce.data],{type:"application/octet-stream;charset=UTF-8"}),He=await new Promise((_t,dt)=>{const at=URL.createObjectURL(pe);L.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=1,tt[Le*3+1]=0,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)}),O=await new Promise((_t,dt)=>{const at=URL.createObjectURL(Ke);L.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=0,tt[Le*3+1]=1,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)});B.add(He),B.add(O),p=B}catch($){throw console.error("PCD文件加载失败:",$),new Error("无法加载PCD文件")}break;case".urdf":const H=URL.createObjectURL(h),Q=new gc,ae="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",G={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},le=new Map,Z=new Map,ve=new Map,Ee=async $=>{if(le.has($))return console.log(`从缓存加载: ${$}`),le.get($);try{const pe=await Pn.axios.get(`${ae}/${$}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Ce=new Blob([pe.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&le.set($,Ce),Ce}catch(pe){throw console.error(`加载文件失败: ${$}`,pe),new Error(`无法加载文件: ${$}`)}},be=($="default")=>{if(Z.has($))return Z.get($);const pe=new fn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Qn});return Z.set($,pe),pe},ge=$=>{try{$.isBufferGeometry&&$.mergeVertices&&$.mergeVertices(),$.computeVertexNormals&&$.computeVertexNormals(),$.computeBoundingSphere&&$.computeBoundingSphere(),$.deleteAttribute&&$.deleteAttribute("uv2")}catch(pe){console.warn("几何体优化失败,使用原始几何体:",pe)}return $},se=async($,pe,Ce)=>{const Ke=`stl_${pe}`;if(ve.has(Ke)){const dt=ve.get(Ke);return new zt(dt,be())}const He=await $.arrayBuffer();let _t=new ji(Ce).parse(He);return _t=ge(_t),ve.set(Ke,_t),new zt(_t,be())},j=async($,pe,Ce)=>{const Ke=`obj_${pe}`;if(le.has(Ke))return le.get(Ke).clone();const He=await $.text(),O=new ls(Ce),_t=pe.replace(".obj",".mtl");try{const Fe=await(await Ee(_t)).text(),Le=new cs(Ce).parse(Fe);Le.preload(),O.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${_t}`)}const dt=O.parse(He);return dt.traverse(at=>{at.isMesh&&(at.geometry=ge(at.geometry),at.castShadow=!0,at.receiveShadow=!0,at.renderOrder=1)}),le.set(Ke,dt),dt},q=($,pe)=>{const Ce=new O0;if(Ce.addLevel($,0),$.geometry){const Ke=$.geometry.clone(),He=new zt(Ke,$.material);Ce.addLevel(He,50)}return Ce};let ne=0,ee=0;const ue=[];Q.loadMeshCb=async($,pe,Ce,Ke,He)=>{const O=$.split("/").pop(),_t=Ce||(()=>{});ne++;const dt=new Promise(async(at,Fe)=>{try{const tt=await Ee(O);if(!tt||tt.size===0)throw new Error(`文件为空: ${O}`);const Le=O.split(".").pop().toLowerCase();let ot;switch(Le){case"stl":ot=await se(tt,O,pe);break;case"obj":ot=await j(tt,O,pe);break;default:throw new Error(`不支持的文件格式: ${Le}`)}G.enableLOD&&ot.isMesh&&(ot=q(ot,O)),_t(ot),ee++,Ke&&Ke({loaded:ee,total:ne,progress:ee/ne}),at(ot)}catch(tt){console.error(`mesh文件加载失败: ${O}`,tt);const Le=new Ln;_t(Le),at(Le);const ot=new $i(.1,.1,.1),jt=new j0({color:16711680,wireframe:!0});return new zt(ot,jt)}});ue.push(dt)};try{if(!H){pa.value=void 0;break}if(p=await Q.loadAsync(H),console.log(`URDF文件加载完成,等待${ne}个mesh文件加载...`),ue.length>0)try{await Promise.allSettled(ue),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${ne}`)}catch(Ce){console.warn("部分mesh文件加载失败,但继续显示模型",Ce)}p.traverse(Ce=>{Ce.isMesh&&(Ce.castShadow=!0,Ce.receiveShadow=!0,Ce.renderOrder=1,Ce.material&&(Ce.material.needsUpdate=!0))}),console.time("计算包围盒");const $=new Fn;$.expandByObject(p);const pe=`urdf_${Date.now()}`;p.userData.boundingBox=$.clone(),p.userData.modelId=pe,m0.set(pe,{box:$.clone(),center:$.getCenter(new I),size:$.getSize(new I),maxSize:Math.max(...$.getSize(new I).toArray())}),pa.value=p,console.log("URDF模型加载完成并优化")}catch($){console.error("URDF加载失败:",$),pa.value=void 0}finally{H&&URL.revokeObjectURL(H)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return p};return{addModelsFromUrls:c,loadModelByDefaultPath:async u=>{console.log(u);try{t.value=!0,n.value="正在加载模型...";const{scene:h}=s();if(!h)throw new Error("Scene not initialized");i(),await new Promise(_=>setTimeout(_,100));const g=[];for(let _=0;_<u.length;_++){const p=u[_],f=await d(p.suffix,p.blob,p.mtlBlobs||[],p.meshFiles||[]);f&&(h.add(f),e.value.push(f),g.push(f))}return t.value=!1,n.value="",g}catch(h){throw console.error("加载模型失败:",h),t.value=!1,n.value="",h}},urdfModel:pa,modelBoundingBoxes:m0}}const I4={class:"panel-content"},z4={__name:"animationPanel",props:{animationData:Object,model:Object},setup(s){const e=s;y.ref();const t=y.ref();return y.watch(()=>[e==null?void 0:e.animationData],()=>{var i;let n=((i=Oe.cloneDeep(e==null?void 0:e.animationData))==null?void 0:i["输出(动画数据)Content"])??[];n&&(t.value=n)},{deep:!0,immediate:!0}),(n,i)=>{var r,o,a;return y.openBlock(),y.createElementBlock("div",I4,[(y.openBlock(),y.createBlock(Eu,{itemData:(r=t.value)==null?void 0:r.compData,key:(o=t.value)==null?void 0:o.id,index:(a=t.value)==null?void 0:a.id,showHeader:!1},null,8,["itemData","index"]))])}}},B4=Pi._export_sfc(z4,[["__scopeId","data-v-ed10cedd"]]),O4={class:"panel-content"},k4={key:0,class:"joints-list"},V4={class:"joint-info-row"},H4={class:"joint-left"},G4={class:"joint-name"},W4={class:"joint-range"},X4={class:"joint-type"},j4={key:0,class:"joint-control-row"},q4={class:"slider-container"},$4=["min","max","value","onInput","disabled"],Y4={class:"value-display"},J4={class:"joint-value"},K4={class:"unit"},Z4={key:1,class:"empty-state"},hr=.001,Q4=1e3,ko=60,e6={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(s,{expose:e}){const t=s;y.ref(!0);const n=y.ref([]),i=y.ref(null),r=y.ref(null),o=y.ref(12.5),a=y.ref(),l=y.ref(1302),c=y.ref(30),d=y.ref(!1),m=y.ref(!1),u=y.ref(0),h=y.ref(0),g=y.ref(null),_=Ei.degToRad,p=y.ref(1),f=()=>Q4/ko/p.value;let v=[];y.watch(()=>t.animationData,se=>{var q;l.value=se.extra.管长,o.value=se.extra.外径/2;let j=((q=Oe.cloneDeep(se))==null?void 0:q["输出(动画数据)"])??[];j&&j.length>0&&(v=j)},{deep:!0}),y.computed(()=>v.length>0);const b=(se,j=!1)=>se==="revolute"?j?Math.PI:-Math.PI:se==="prismatic"?j?1:-1:0,S=()=>{if(!i.value)return Pn.ElMessage.error("未加载 URDF"),!1;let se=null;return i.value.traverse(j=>{se||j.name==="Pipe_Link"&&j.traverse(q=>{q instanceof zt&&!se&&(se=q)})}),se?(se.position.y-=c.value*hr,a.value=se,se.material=new fn({color:11184810,shininess:80,side:pn}),!0):(Pn.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},F=se=>{if(!se||!se.joints)return console.warn("URDF模型没有关节信息"),[];let j=null;if(se.traverse(ne=>{ne.name==="Pipe_Link"&&!j&&(j=ne)}),j)a.value=j;else return console.warn("未找到管子模型"),[];const q=[];return Object.keys(se.joints).forEach(ne=>{const ee=se.joints[ne];if(ee._jointType==="fixed")return;const ue=ee.limit?{lower:ee.limit.lower??b(ee._jointType,!1),upper:ee.limit.upper??b(ee._jointType,!0)}:{lower:b(ee._jointType,!1),upper:b(ee._jointType,!0)};q.push({name:ne,type:ee._jointType||"unknown",limit:ue,currentValue:ee.angle||0,urdfJoint:ee})}),q.sort((ne,ee)=>ne.name.localeCompare(ee.name))},C=(se,j)=>{const q=n.value.find(ee=>ee.name===se);if(!q)return;const ne=parseFloat(j);if(q.limit){const ee=Math.max(q.limit.lower,Math.min(q.limit.upper,ne));q.currentValue=ee}else q.currentValue=ne;t.model&&t.model.setJointValue?t.model.setJointValue(se,q.currentValue):q.urdfJoint&&q.urdfJoint.setJointValue(q.currentValue)},R=se=>se.reduce((j,q)=>{let ne=0;const ee=q.Y??0,ue=q.C??0,$=q.R??0;return ee>0&&(ne+=ee),ue>0&&$>0&&(ne+=$*_(ue)),j+ne},0),P=se=>{const j=[],q=se.Y??0,ne=se.B??0,ee=se.C??0,ue=se.R??0,$={pos:new I(0,0,0),localY:new I(0,1,0),localX:new I(1,0,0),localZ:new I(0,0,1)};if(!q&&!ee)return j;if(j.push($.pos.clone()),ne!==0){const pe=new Et().makeRotationAxis($.localY,_(ne));$.localX.applyMatrix4(pe),$.localZ.applyMatrix4(pe)}if(q>0&&($.pos.add($.localY.clone().multiplyScalar(q*hr)),j.push($.pos.clone())),ee>0&&ue>0){const pe=_(ee),Ce=ue*hr,Ke=$.pos.clone().add($.localX.clone().multiplyScalar(-Ce)),He=Math.max(16,Math.ceil(ee/5));for(let O=1;O<=He;O++){const _t=pe*O/He,dt=new Et().makeRotationAxis($.localZ,_t),Fe=$.localX.clone().multiplyScalar(Ce).applyMatrix4(dt),tt=Ke.clone().add(Fe);j.push(tt)}}return j},A=(se,j=0)=>{let q=v.slice(0,se+1);const ne=v[se+1];if(ne&&j>0){const He={...ne,B:(ne.B??0)*j,C:(ne.C??0)*j};q.push(He)}const ee=R(q),ue=Math.max(0,l.value-ee),$=[];$.push(new I(0,0,0));const pe=new I(0,ue*hr,0);ue>0&&$.push(pe);let Ce={pos:pe.clone(),localY:new I(0,1,0),localX:new I(1,0,0),localZ:new I(0,0,1)};const Ke=[];for(let He=q.length-1;He>=0;He--){const O=q[He],_t=P(O);if(_t.length>0){const dt=_t.map(Le=>{const ot=Le.clone(),jt=new Et;return jt.makeBasis(Ce.localX,Ce.localY,Ce.localZ),ot.applyMatrix4(jt),ot.add(Ce.pos)});Ke.push(dt);const at=dt[dt.length-1];Ce.pos=at.clone();const Fe=O.B??0,tt=O.C??0;if(Fe!==0){const Le=new Et().makeRotationAxis(Ce.localY,_(Fe));Ce.localX.applyMatrix4(Le),Ce.localZ.applyMatrix4(Le)}if(tt>0){const Le=_(tt),ot=new Et().makeRotationAxis(Ce.localZ,Le);Ce.localY.applyMatrix4(ot),Ce.localX.applyMatrix4(ot)}}}for(const He of Ke)He.length>1&&$.push(...He.slice(1));$.length<2&&$.push(new I(0,.001,0));try{const He=new rc($,!1,"catmullrom",.01),O=new ka(He,Math.max(2,$.length*4),o.value*hr,18,!1);a.value.geometry.dispose(),a.value.geometry=O}catch(He){console.error("管件更新失败",He)}},E=(se,j,q=1)=>{se&&(Object.keys(se).forEach(ne=>{const ee=se[ne],ue=n.value.find($=>$.name===ne);ue&&(ue.currentValue=ee,t.model&&t.model.setJointValue?t.model.setJointValue(ne,ee):ue.urdfJoint&&ue.urdfJoint.setJointValue(ee))}),A(j,q))},L=(se,j,q)=>se+(j-se)*q,B=(se,j,q)=>{if(!se||!j)return se||j;const ne={};return Object.keys(se).forEach(ee=>{const ue=se[ee],$=j[ee];ne[ee]=L(ue,$||ue,q)}),ne},H=()=>{if(v.length===0){console.warn("没有动画数据");return}S(),d.value=!0,m.value=!1,u.value=0,h.value=0,Q()},Q=()=>{if(!d.value||m.value)return;const se=u.value;if(se>=v.length-1){const ee=v[v.length-1];E(ee,v.length-1,1),G();return}const j=h.value/ko,q=v[se],ne=v[se+1];if(ne){const ee=B(q,ne,j);E(ee,se,j)}else E(q,se);h.value++,h.value>ko&&(h.value=0,u.value++),g.value=setTimeout(Q,f())},ae=()=>{m.value=!0,g.value&&(clearTimeout(g.value),g.value=null)},G=()=>{d.value=!1,m.value=!1,p.value=1,g.value&&(clearTimeout(g.value),g.value=null)};e({startAnimation:H,pauseAnimation:ae,stopAnimation:G,resetAll:()=>{G(),u.value=0,h.value=0,n.value.forEach(se=>{(se.type==="revolute"||se.type==="prismatic")&&C(se.name,0)}),A(-1,0)},fastForward:()=>{p.value<4&&(p.value=Math.min(4,p.value*2))},fastBackward:()=>{p.value>.25&&(p.value=Math.max(.25,p.value/2))}}),y.watch(()=>t.model,se=>{se?(i.value=se,n.value=F(se)):n.value=[]},{immediate:!0});const Ee=()=>{!t.model||d.value&&!m.value||n.value.forEach(se=>{se.urdfJoint&&se.urdfJoint.angle!==void 0&&(se.currentValue=se.urdfJoint.angle)})},be=()=>{const se=()=>{Ee(),r.value=requestAnimationFrame(se)};se()},ge=()=>{r.value&&(cancelAnimationFrame(r.value),r.value=null)};return y.onMounted(()=>{be()}),y.onUnmounted(()=>{ge(),G()}),(se,j)=>(y.openBlock(),y.createElementBlock("div",O4,[n.value.length>0?(y.openBlock(),y.createElementBlock("div",k4,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n.value,q=>{var ne,ee,ue,$;return y.openBlock(),y.createElementBlock("div",{key:q.name,class:"joint-item"},[y.createElementVNode("div",V4,[y.createElementVNode("div",H4,[y.createElementVNode("span",G4,y.toDisplayString(q.name),1),y.createElementVNode("span",W4," ["+y.toDisplayString(((ne=q.limit)==null?void 0:ne.lower.toFixed(2))??(q.type==="revolute"?"-3.14":"-1.00"))+", "+y.toDisplayString(((ee=q.limit)==null?void 0:ee.upper.toFixed(2))??(q.type==="revolute"?"3.14":"1.00"))+"] ",1)]),y.createElementVNode("span",X4,y.toDisplayString(q.type),1)]),q.type==="revolute"||q.type==="prismatic"?(y.openBlock(),y.createElementBlock("div",j4,[y.createElementVNode("div",q4,[y.createElementVNode("input",{type:"range",min:((ue=q.limit)==null?void 0:ue.lower)??(q.type==="revolute"?-Math.PI:-1),max:(($=q.limit)==null?void 0:$.upper)??(q.type==="revolute"?Math.PI:1),step:.01,value:q.currentValue,onInput:pe=>C(q.name,pe.target.value),class:"joint-slider",disabled:d.value&&!m.value},null,40,$4)]),y.createElementVNode("div",Y4,[y.createElementVNode("span",J4,y.toDisplayString(q.currentValue?Number(q.currentValue).toFixed(3):"0.000"),1),y.createElementVNode("span",K4,y.toDisplayString(q.type==="revolute"?"rad":"m"),1)])])):y.createCommentVNode("",!0)])}),128))])):(y.openBlock(),y.createElementBlock("div",Z4,j[0]||(j[0]=[y.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},t6=Pi._export_sfc(e6,[["__scopeId","data-v-7cbf5b39"]]),n6={class:"panel-content"},i6="id",s6={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:s=>["breadth","firstLevel"].includes(s)}},emits:["nodeClick"],setup(s,{emit:e}){const t=s,n=e,i=y.ref([]),r={children:"children",label:"label"},o=h=>{n("nodeClick",h)},a=(h,g=0)=>{const _=[];return Array.isArray(h)&&(h==null?void 0:h.length)>0&&h.forEach(p=>{if(!(p!=null&&p.isMesh)&&((p==null?void 0:p.type)==="URDFJoint"||(p==null?void 0:p.type)==="URDFLink")){const f={name:p==null?void 0:p.name,label:p==null?void 0:p.name,show:!0,level:g+1,isPenultimate:!1,type:p==null?void 0:p.type,id:p==null?void 0:p.id,limit:(p==null?void 0:p.limit)??"",children:a(p==null?void 0:p.children,g+1),path:p==null?void 0:p.name};_.push(f)}}),_},l=h=>h?[{name:h==null?void 0:h.name,label:h==null?void 0:h.name,show:!0,level:1,isPenultimate:!1,type:h==null?void 0:h.type,id:h==null?void 0:h.id,limit:(h==null?void 0:h.limit)??"",children:a(h==null?void 0:h.children,1),path:h==null?void 0:h.name}]:[],c=(h,g)=>{const _=[],p=[...h];for(;p.length>0&&_.length<g;){const f=p.shift();f.children&&f.children.length>0&&(_.push(f.id),p.push(...f.children))}return _},d=(h,g)=>{const _=[];return h.forEach(p=>{if(p.children&&p.children.length>0){_.push(p.id);const f=p.children.filter(v=>v.children&&v.children.length>0).slice(0,g).map(v=>v.id);_.push(...f)}}),_.slice(0,g+1)},m=y.computed(()=>!i.value||i.value.length===0?[]:t.expandStrategy==="firstLevel"?d(i.value,t.maxExpandCount):c(i.value,t.maxExpandCount)),u=y.computed(()=>t!=null&&t.model?l(t.model):[]);return y.watch(u,h=>{i.value=JSON.parse(JSON.stringify(h))},{immediate:!0}),(h,g)=>{const _=y.resolveComponent("el-tree");return y.openBlock(),y.createElementBlock("div",n6,[y.createVNode(_,{data:i.value,props:r,"default-expanded-keys":m.value,"node-key":i6,onNodeClick:o},null,8,["data","default-expanded-keys"])])}}},r6=Pi._export_sfc(s6,[["__scopeId","data-v-0dda287c"]]),a6=["xlink:href"],o6=y.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(s){const e=s,t=y.computed(()=>({backgroundColor:e.backgroundColor})),n=y.computed(()=>`#${e.prefix}-${e.name}`),i=y.computed(()=>{const{size:r}=e;let o=`${r}`;return o=`${o.replace("px","")}px`,{width:o,height:o}});return(r,o)=>(y.openBlock(),y.createElementBlock("div",{class:y.normalizeClass(["container",{active:r.active}]),style:y.normalizeStyle(t.value)},[(y.openBlock(),y.createElementBlock("svg",{class:y.normalizeClass(["svg-icon",[r.$attrs.class,r.spin&&"svg-icon-spin"]]),style:y.normalizeStyle(i.value),"aria-hidden":"true"},[y.createElementVNode("use",{"xlink:href":n.value},null,8,a6)],6))],6))}}),un=Pi._export_sfc(o6,[["__scopeId","data-v-00a72991"]]);window._iconfont_svg_string_4634042='<svg><symbol id="icon-lookAround" viewBox="0 0 1041 1024"><path d="M520.685026 798.355937c-10.788594 0-21.577187-2.790872-31.241101-8.372615l-291.583615-168.36871A62.482203 62.482203 0 0 1 166.619208 567.505024V230.850913c0-22.368629 11.913273-42.987756 31.241102-54.109588l291.583615-168.36871a62.482203 62.482203 0 0 1 62.482203 0l291.583615 168.36871c19.327828 11.121832 31.241102 31.740959 31.241101 54.109588v336.654111a62.482203 62.482203 0 0 1-31.241101 54.109588l-291.583615 168.36871a62.857096 62.857096 0 0 1-31.241102 8.372615zM291.583615 531.39031l229.101411 132.295652 229.101412-132.295652v-264.507993l-229.101412-132.295651L291.583615 266.923972v264.466338z m520.685026 36.114714h0.416548-0.416548z" fill="#aaaaaa" ></path><path d="M520.685026 461.660172c-10.788594 0-21.577187-2.790872-31.241101-8.372616l-291.583615-168.327055a62.482203 62.482203 0 0 1 62.482203-108.219176L520.685026 326.990196l260.342513-150.248871a62.482203 62.482203 0 1 1 62.482204 108.219176l-291.583615 168.327055a62.857096 62.857096 0 0 1-31.241102 8.372616z" fill="#aaaaaa" ></path><path d="M520.685026 798.355937a62.482203 62.482203 0 0 1-62.482203-62.482203V399.177969a62.482203 62.482203 0 1 1 124.964406 0v336.695765a62.482203 62.482203 0 0 1-62.482203 62.482203z" fill="#aaaaaa" ></path><path d="M520.685026 1003.172599c-53.276492 0-520.685026-5.248505-520.685026-187.446609 0-62.982061 54.776065-111.259976 162.870276-143.584103 33.073913-9.622259 67.855673 8.914128 77.769516 41.98804s-8.872473 67.897327-41.946386 77.769516c-30.324696 9.080747-49.194321 17.619981-60.649392 24.11813 46.32014 26.242525 178.657446 62.19062 382.641012 62.19062s336.320872-35.948094 382.641012-62.19062c-11.455071-6.498149-30.324696-15.037384-60.649392-24.11813a62.482203 62.482203 0 1 1 35.82313-119.757556c108.094211 32.324126 162.870276 80.643697 162.870276 143.584103 0 182.198104-467.408534 187.446609-520.685026 187.446609z m398.886385-175.366717h0.416548-0.416548z" fill="#72B02D" ></path></symbol><symbol id="icon-xuanzhuan" viewBox="0 0 1024 1024"><path d="M378.963454 724.443778l91.182641 163.473426c6.246088 11.212239 2.252687 25.39393-9.010749 31.691216l-163.473427 91.18264c-18.123894 10.085896-39.422029-6.758062-33.739113-26.673866l72.290786-254.707264c5.682916-19.967002 32.663967-23.090045 42.749862-4.966152z" fill="#FC794B" ></path><path d="M414.64807 903.9932c-1.228739 0-2.40628-0.051197-3.635018-0.204789C169.002752 879.367232 0.000003 771.443028 0.000003 641.452727c0-52.221389 27.032248-102.19009 78.127293-144.581571a35.827969 35.827969 0 0 1 50.480676 4.710165 35.827969 35.827969 0 0 1-4.710164 50.480676C100.090998 571.824209 71.727616 603.310634 71.727616 641.452727c0 88.929954 148.984551 171.050647 346.504275 191.068847 19.711014 1.9967 34.046298 19.557422 32.049597 39.268436a35.879166 35.879166 0 0 1-35.633418 32.20319zM608.430381 904.095595c-18.175091 0-33.79031-13.772111-35.633418-32.254387-1.945503-19.711014 12.389781-37.271736 32.100795-39.217239 198.134093-19.813409 347.528224-101.985301 347.528223-191.171242 0-23.550822-10.649068-47.050447-31.58882-69.935703-13.362532-14.59127-12.389781-37.271736 2.20149-50.634268 14.59127-13.362532 37.271736-12.389781 50.634268 2.20149 32.971151 35.9918 50.429479 76.898555 50.429478 118.368481 0 130.297485-169.463527 238.221689-412.088195 262.489276-1.177541 0.102395-2.40628 0.153592-3.583821 0.153592z" fill="#FC794B" ></path><path d="M846.703267 184.413179l-325.308534 184.464377L196.137396 184.413179 521.394733 0z" fill="#BEC5CB" ></path><path d="M521.394733 737.703915l325.308534-184.41318V184.413179l-325.308534 184.464377z" fill="#808487" ></path><path d="M521.394733 737.703915L196.137396 553.290735V184.413179l325.257337 184.464377z" fill="#9CA3A9" ></path></symbol><symbol id="icon-clipping" viewBox="0 0 1024 1024"><path d="M341.930667 201.770667l353.706666 204.245333v408.448l-353.706666-204.245333z" fill="#4A80FF" fill-opacity="0.15" ></path><path d="M320.853333 165.248l396.117334 228.608v457.173333l-395.946667-228.608z m353.749334 252.970667L362.837333 238.336v359.722667l311.466667 179.882666z" fill="#72B02D" ></path><path d="M544.384 746.453333l-211.669333-211.669333 18.688-18.688 211.669333 211.669333z" fill="#72B02D" ></path><path d="M693.717333 530.261333l-266.453333-266.325333 20.906667-20.906667 266.325333 266.453334z" fill="#72B02D" ></path><path d="M688.853333 621.098667l-366.933333-366.933334 24.448-24.704 366.933333 366.933334z" fill="#72B02D" ></path><path d="M689.664 713.856L321.578667 345.770667l24.618666-24.618667 368.085334 368.128z" fill="#72B02D" ></path><path d="M683.605333 799.317333l-355.712-355.712 24.234667-24.234666 355.712 355.712z" fill="#72B02D" ></path><path d="M537.770667 944.938667h-51.2v-418.602667l-362.666667-209.28 25.6-44.330667 362.666667 209.066667 362.666666-209.066667 25.6 44.330667-362.666666 209.066667z" fill="#AAAAAA" ></path><path d="M512.170667 53.461333a31.146667 31.146667 0 0 1 15.488 4.266667l370.090666 213.632a31.232 31.232 0 0 1 15.317334 26.794667v426.922666a31.274667 31.274667 0 0 1-15.317334 26.837334l-369.834666 213.333333a31.488 31.488 0 0 1-31.061334 0l-369.834666-213.333333a31.146667 31.146667 0 0 1-15.914667-26.837334V298.069333a31.146667 31.146667 0 0 1 15.573333-27.008l369.792-213.333333a30.976 30.976 0 0 1 15.701334-4.266667z m349.866666 256l-349.866666-201.642666-349.866667 201.856v403.84l349.866667 201.813333 349.866666-201.898667z" fill="#AAAAAA" ></path></symbol><symbol id="icon-viewReset" viewBox="0 0 1024 1024"><path d="M643.2 515.2c-89.6-67.2-179.2-60.8-268.8 0-32 22.4-67.2 57.6-105.6 89.6 38.4 32 70.4 70.4 108.8 96 28.8 19.2 60.8 32 96 38.4 118.4 19.2 188.8-57.6 268.8-137.6-35.2-28.8-60.8-64-99.2-86.4zM508.8 704c-51.2 0-96-41.6-96-99.2s41.6-105.6 96-105.6 96 41.6 96 99.2c0 64-38.4 105.6-96 105.6z" fill="#AAAAAA" ></path><path d="M515.2 544c-3.2 41.6 12.8 60.8 51.2 51.2 0 32-19.2 57.6-51.2 57.6s-57.6-22.4-51.2-57.6c-6.4-32 16-51.2 51.2-51.2" fill="#AAAAAA" ></path><path d="M652.8 3.2c9.6-3.2 19.2-3.2 28.8 0 9.6 3.2 12.8 12.8 12.8 22.4v108.8c70.4 28.8 131.2 70.4 179.2 128 80 89.6 118.4 214.4 108.8 336-9.6 124.8-70.4 236.8-166.4 313.6-96 80-224 118.4-345.6 108.8-124.8-9.6-243.2-67.2-323.2-160S32 649.6 41.6 524.8c9.6-118.4 70.4-233.6 160-307.2 22.4-19.2 60.8-19.2 80 3.2 19.2 22.4 19.2 57.6-3.2 80-70.4 57.6-115.2 140.8-124.8 233.6s22.4 185.6 80 249.6c60.8 70.4 147.2 115.2 243.2 124.8 96 9.6 188.8-19.2 259.2-80s118.4-140.8 124.8-236.8c9.6-89.6-22.4-185.6-80-249.6-28.8-28.8-57.6-57.6-89.6-76.8v89.6c0 9.6-3.2 19.2-12.8 22.4-9.6 3.2-19.2 3.2-28.8 0l-227.2-160c-3.2-3.2-9.6-12.8-9.6-19.2 0-9.6 3.2-12.8 9.6-19.2L652.8 3.2z" fill="#72B02D" ></path></symbol><symbol id="icon-donghuafangzhen" viewBox="0 0 1024 1024"><path d="M868.864 228.864c-19.968 0-38.912 7.68-53.248 20.992l-291.328-170.496c-7.168-5.12-16.896-5.12-24.064 0L208.896 248.832c-14.336-12.8-33.28-20.48-53.76-20.48-43.52 0-79.872 36.864-79.872 80.896 0 33.792 21.504 63.488 53.248 74.24v318.976c0 9.216 4.608 17.408 12.288 22.016L437.248 896c11.776 30.72 41.472 51.712 74.752 52.224 33.28-0.512 62.464-20.992 74.752-52.224l296.448-171.52c7.68-4.608 12.288-13.312 12.288-22.016V386.048c31.744-11.776 53.248-42.496 53.248-76.288 0-44.032-36.352-80.896-79.872-80.896zM155.136 339.456c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 15.872-12.8 28.672-29.184 29.184zM512 897.024c-16.896 0-29.184-12.288-29.184-29.696 0-14.848 12.288-29.696 29.184-29.696h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 14.848-14.848 29.696-29.184 29.696z m74.752-58.368c-11.776-30.208-40.96-51.712-74.752-51.712-27.136 0-52.224 14.336-67.072 37.376l-3.072 1.024c-4.608 2.048-8.704 5.632-9.728 10.752l-252.416-146.944V384.512C212.48 373.76 234.496 343.04 235.52 308.736l3.072 0.512h2.048c3.584 0 7.168-1.536 10.24-3.584 7.168-5.632 8.192-16.384 2.048-23.552L512 130.56l278.528 162.816c-7.68 36.864 11.264 74.24 45.568 90.624 0.512 5.632 3.584 10.24 8.704 13.312v291.328l-258.048 150.016z m282.112-499.2c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696v2.56c-1.024 14.848-13.824 27.136-29.184 26.624z" fill="#AAAAAA" ></path><path d="M422.912 724.992c-3.072-8.704-12.288-12.8-20.992-9.728-8.704 3.072-12.8 12.8-9.728 21.504l19.968 54.784c2.56 6.656 8.192 10.752 15.36 10.752 2.048 0 3.584-0.512 5.12-1.024 8.704-3.072 12.8-12.8 9.728-21.504l-19.456-54.784zM706.048 507.392c0-107.52-86.016-195.072-192-196.096-2.048-1.536-4.608-2.56-7.68-3.072l-24.064-3.072c-8.192-1.024-15.872 4.096-17.92 11.776-5.632 1.536-11.776 3.584-16.896 5.632 0.512-1.536 1.024-3.072 1.536-5.12 1.024-9.216-5.12-17.408-14.336-18.432l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.608 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l44.032 5.12C384 353.28 351.232 388.608 333.312 432.64c-25.088 60.928-17.92 130.048 18.432 184.832-1.024 3.584-1.024 7.168 0.512 10.24l19.968 54.784c1.024 3.072 3.072 5.632 6.144 7.68 7.168 5.12 17.408 3.072 22.528-4.096 3.072-4.608 3.584-10.24 2.048-15.36l-0.512-1.536c53.76 37.888 123.392 45.568 184.32 19.968 46.08-19.456 82.944-55.808 102.912-101.376l12.8-14.336c6.144-6.656 5.632-17.408-0.512-23.04 2.56-14.336 4.096-28.672 4.096-43.008z m-193.536 156.16C427.52 663.552 358.4 593.92 358.4 507.392c0-86.016 69.12-156.16 154.112-156.16s154.112 69.632 154.112 156.16c0 86.016-69.12 156.16-154.112 156.16z" fill="#72B02D" ></path><path d="M765.44 478.72c-6.144-5.632-15.872-5.632-22.016 0l-32.256 35.84c-4.096 4.608-5.632 11.776-3.072 17.92 2.56 6.144 8.192 9.728 14.848 9.728 4.608 0 8.704-2.048 11.776-5.12l32.256-35.84c5.12-7.168 4.608-16.896-1.536-22.528zM823.296 401.92c-5.632-1.024-11.776 0.512-15.872 5.12l-32.256 35.84c-4.608 4.608-5.632 11.776-3.072 17.92 1.024 2.048 2.56 4.096 4.096 5.632 6.656 6.144 16.896 5.632 23.04-1.536l32.256-35.84c4.096-4.096 5.632-10.752 3.584-16.384-1.024-5.632-5.632-9.728-11.776-10.752zM336.384 321.024c8.704 0 15.872-6.656 16.384-15.36 0.512-8.704-5.632-16.384-14.336-17.408l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.096 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l48.128 5.632h2.048z" fill="#72B02D" ></path></symbol><symbol id="icon-guanjianjiexi" viewBox="0 0 1024 1024"><path d="M298.496 200.704v83.456h-39.936v177.664h137.728V389.12h47.104v245.76h-47.104v-79.872H211.456c-10.752-3.584-54.272-14.336-54.272-57.856V280.064h-32.768V200.704h174.08m47.104-47.104H77.824v177.152h36.352v169.984c0 68.608 61.44 97.792 97.792 104.96H353.28v79.872h141.312V342.016H349.184v72.192h-43.52v-87.04h39.936V153.6zM627.712 389.12v79.872H812.544c10.752 3.584 54.272 14.336 54.272 54.272V740.352h32.768v83.456h-173.568v-83.456h39.936v-177.664h-137.728V634.88h-47.104V389.12h46.592m47.104-47.104h-141.312v340.48h141.312v-72.192h43.52v83.456h-39.936V870.4h267.776v-177.152h-36.352v-169.984c0-68.608-61.44-97.792-97.792-104.96H670.72V342.528h4.096z" fill="#AAAAAA" ></path></symbol><symbol id="icon-gongyishengcheng" viewBox="0 0 1024 1024"><path d="M889.344 391.68h29.696v-43.008h-208.896l1.024 45.056 28.16 3.072v20.992c55.808 5.632 108.032 28.672 150.016 66.56-0.512 0 0-92.672 0-92.672z m-366.592 102.912c13.312-13.312 27.648-24.576 43.008-34.816-2.048-70.144-5.632-153.088-8.704-179.712-5.632-48.64-34.816-204.288-226.816-202.752-191.488 1.536-223.744 164.864-230.912 207.36s-11.776 197.632-11.776 197.632h-24.576v43.008l208.896 1.024v-40.96h-24.064V316.928S245.76 230.912 335.36 231.424C424.448 232.448 415.232 327.68 414.72 327.68v313.856c4.608 0 6.144 77.824 50.176 144.896-13.312-32.256-20.48-67.072-20.48-102.912 0-71.168 27.648-138.24 78.336-188.928z" fill="#AAAAAA" ></path><path d="M75.264 601.6h31.232v281.088s41.984 29.184 141.824 0v-274.944l29.184-2.56v-44.032H75.264v40.448zM906.24 263.168h-29.184l1.024-188.416s-53.76-27.648-144.384 0l1.024 192-31.744 1.024V307.2h203.776l-0.512-44.032z" fill="#AAAAAA" ></path><path d="M934.912 627.712c-9.216-4.608-20.48-2.048-29.184 6.656l-21.504 21.504c-9.216 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l21.504-21.504c8.704-8.704 11.264-19.968 6.656-29.184-5.632-10.752-18.432-15.36-34.304-13.312-25.6 4.096-48.64 15.36-66.56 33.792-27.136 27.136-39.424 65.536-33.792 103.936l-178.176 178.176c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l178.176-178.176c37.888 6.144 76.288-6.656 103.936-33.792 17.92-17.92 29.696-41.472 33.792-66.56 2.048-15.872-2.56-28.672-13.312-34.304z m-9.728 30.72c-3.072 20.48-12.8 38.912-27.136 53.76-23.04 23.04-56.32 33.28-89.088 26.624l-6.144-1.536-186.88 186.88c-8.704 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l186.88-186.88-1.536-6.144c-6.656-32.256 3.072-65.536 26.624-89.088 14.848-14.848 33.28-24.064 53.76-27.136 1.536-0.512 3.072-0.512 4.608-0.512 2.56 0 4.608 0.512 5.12 1.024-0.512 0.512-1.024 1.536-2.048 2.56l-21.504 21.504c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l21.504-21.504c1.024-1.024 2.048-1.536 2.56-2.048 0.512 1.536 1.024 4.608 0.512 9.728z" fill="#72B02D" ></path><path d="M560.64 870.912c-12.8 12.8-12.8 33.28 0 45.568 6.144 6.144 14.336 9.216 23.04 9.216s16.896-3.072 23.04-9.216c6.144-6.144 9.728-14.336 9.728-23.04 0-8.704-3.584-16.896-9.728-23.04-12.8-12.288-33.792-12.288-46.08 0.512z m28.672 28.672c-3.072 3.072-8.704 3.072-11.776 0-3.072-3.072-3.072-8.704 0-11.776 1.536-1.536 3.584-2.56 6.144-2.56 2.048 0 4.096 1.024 6.144 2.56 1.536 1.536 2.56 3.584 2.56 6.144-0.512 2.048-1.536 4.096-3.072 5.632z m225.28-107.008c-4.096-4.096-10.24-4.096-14.336 0l-43.52 43.52c-4.096 4.096-4.096 10.24 0 14.336l102.4 102.4c15.872 15.872 41.984 15.872 57.856 0 15.872-15.872 15.872-41.984 0-57.856l-102.4-102.4z m-237.056-150.528l70.656 70.656 28.672-28.672-70.656-70.656-15.872-30.208-50.688-36.352-28.672 28.672 36.352 50.688 30.208 15.872z" fill="#72B02D" ></path></symbol><symbol id="icon-mojupipei" viewBox="0 0 1024 1024"><path d="M880.64 117.248c32.768 0 58.88 23.04 64.512 54.784l1.024 7.68v663.04c0.512 31.744-22.528 58.368-53.76 62.464l-7.68 1.024H151.552c-34.816 0-66.048-22.528-72.192-53.248l-1.024-6.656V183.296c0-31.744 27.648-59.904 61.952-65.024l7.168-1.024h142.848c24.064 0 44.032 16.896 48.64 39.936l1.024 6.656V406.528c0 7.68 5.12 14.848 12.288 16.896l3.584 0.512H424.96c13.312 0 25.088 9.216 29.184 22.528 6.144 23.552 33.792 46.08 58.368 46.08 22.528 0 48.128-19.456 55.808-39.424l2.048-5.632c2.048-10.24 9.216-18.432 19.456-21.504l5.12-1.024 3.072-0.512h71.168c6.144 0 11.776-3.584 14.336-9.728l1.024-3.584V164.864c0-23.04 15.872-41.984 37.888-46.592l6.144-1.024H880.64zM273.92 184.32H151.552l-2.048 0.512-2.048 0.512-2.56 1.536-1.536 649.728 3.072 1.536 3.072 1.024h1.024l328.192 3.072 2.048-286.72-2.048-0.512-10.24-3.584c-24.576-10.24-45.568-27.136-60.928-49.152l-6.144-9.216 1.024-1.536H349.184c-37.888-4.096-68.608-33.792-74.24-71.68l-1.024-8.192v-4.096V184.32z m476.16-3.072V409.6l-0.512 8.704c-3.584 36.864-32.256 66.56-68.608 72.192l-8.192 1.024h-4.096l-45.568-1.536-6.144 9.728c-14.848 22.528-36.352 40.448-61.44 51.2l-10.752 4.096-3.072 284.16h337.408v-655.36l-129.024-2.56z" fill="#AAAAAA" ></path></symbol><symbol id="icon-buchangshezhi" viewBox="0 0 1024 1024"><path d="M792.576 75.264h-686.08c-17.408 0-31.232 13.824-31.232 31.232v686.08c0 17.408 13.824 31.232 31.232 31.232h436.736c17.408 0 31.232-13.824 31.232-31.232s-13.824-31.232-31.232-31.232H137.728V262.656h624.128v280.576c0 17.408 13.824 31.232 31.232 31.232s31.232-13.824 31.232-31.232V106.496c-0.512-17.408-14.336-31.232-31.744-31.232z" fill="#AAAAAA" ></path><path d="M792.576 948.736c-17.408 0-31.232-13.824-31.232-31.232v-93.696h-93.696c-17.408 0-31.232-13.824-31.232-31.232 0-17.408 13.824-31.232 31.232-31.232h93.696v-93.696c0-17.408 13.824-31.232 31.232-31.232 17.408 0 31.232 13.824 31.232 31.232v93.696h93.696c17.408 0 31.232 13.824 31.232 31.232 0 17.408-13.824 31.232-31.232 31.232h-93.696v93.696c0 17.408-13.824 31.232-31.232 31.232z" fill="#72B02D" ></path><path d="M372.224 518.144l-110.08 110.08c-20.992 20.992-20.992 55.296 0 76.288s55.296 20.992 76.288 0l110.08-110.08c-16.896-6.144-32.768-15.872-46.592-29.696-13.824-13.312-23.552-29.696-29.696-46.592z m-57.856 162.304c-7.68 7.68-20.48 7.68-28.672 0-7.68-7.68-7.68-20.48 0-28.672 7.68-7.68 20.48-7.68 28.672 0 7.68 8.192 7.68 20.992 0 28.672z m340.48-292.864L592.384 450.56c-20.992 20.992-55.296 20.992-76.288 0s-20.992-55.296 0-76.288l62.976-62.976c-51.712-8.704-116.224 14.848-151.552 50.176-49.152 49.152-49.152 128.512 0 177.664s129.024 49.152 177.664 0c35.328-35.328 58.368-99.84 49.664-151.552z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shuchujiagongchengxu" viewBox="0 0 1024 1024"><path d="M876.544 473.6v374.272c0 16.384-13.312 29.696-29.696 29.696h-522.24c-16.384 0-29.696-13.312-29.696-29.696V503.296c0-16.384 13.312-29.696 29.696-29.696h551.936m40.96-70.656H253.952c-16.384 0-29.696 13.312-29.696 29.696v486.4c0 16.384 13.312 29.696 29.696 29.696h663.552c16.384 0 29.696-13.312 29.696-29.696v-486.4c0-16.384-13.312-29.696-29.696-29.696z" fill="#AAAAAA" ></path><path d="M489.984 211.968H814.08l-41.984-41.984c-13.824-13.824-13.824-36.352 0-50.176 13.824-13.824 36.352-13.824 50.176 0L947.712 245.76l-0.512 0.512 0.512 0.512-125.952 125.952c-13.824 13.824-36.352 13.824-50.176 0-13.824-13.824-13.824-36.352 0-50.176l38.912-38.912H489.472c-19.456 0-35.328-15.872-35.328-35.328 0.512-20.48 16.384-36.352 35.84-36.352z" fill="#72B02D" ></path><path d="M531.456 717.824c0-11.776-7.68-22.016-18.944-25.6l-55.808-16.896-14.848-4.608 14.848-4.608 55.808-16.896c11.264-3.584 18.944-13.824 18.944-25.6v-2.048c0-18.432-17.92-31.232-35.328-25.088L363.52 641.024c-10.752 3.584-17.92 13.824-17.92 25.088v8.192c0 11.264 7.168 21.504 17.92 25.088l132.608 45.568c17.408 6.144 35.328-7.168 35.328-25.088v-2.048z m123.392-96.768v2.048c0 11.776 7.68 22.016 18.944 25.6l56.32 16.896 14.848 4.608-14.848 4.608-56.32 16.896c-11.264 3.584-18.944 13.824-18.944 25.6v2.56c0 18.432 17.92 31.232 35.328 25.088l132.608-45.568c10.752-3.584 17.92-13.824 17.92-25.088v-8.192c0-11.264-7.168-21.504-17.92-25.088l-132.608-45.568c-17.408-6.144-35.328 7.168-35.328 25.6z m-54.784-64l-70.144 248.32c-4.608 16.896 8.192 33.792 25.6 33.792 11.776 0 22.528-8.192 25.6-19.456l70.144-248.32c4.608-16.896-8.192-33.792-25.6-33.792-11.776 0-22.016 8.192-25.6 19.456zM147.456 814.08V173.056c0-14.848 11.776-26.624 26.624-26.624h463.872c19.456 0 35.328-15.872 35.328-35.328 0-19.456-15.872-35.328-35.328-35.328H107.008c-16.896 0-30.72 13.824-30.72 30.72v748.032c0 16.896 13.824 30.72 30.72 30.72h40.448c19.456 0 35.328-15.872 35.328-35.328 0.512-19.968-15.36-35.84-35.328-35.84z" fill="#AAAAAA" ></path></symbol><symbol id="icon-guanjiekongzhi" viewBox="0 0 1024 1024"><path d="M648.192 377.344h-71.68c-18.432 0-33.792-14.848-33.792-33.792H366.592c12.288-30.72 25.088-80.896 0-134.656H542.72c0-18.432 15.36-33.792 33.792-33.792h67.584c1.536 0 2.56 0 4.096 0.512L719.36 87.04c10.752-13.312 29.184-16.384 44.032-7.68l168.96 100.864c15.872 9.728 20.992 30.208 11.776 46.08-9.728 15.872-30.208 20.992-46.592 11.264l-143.872-85.504L677.888 245.76v61.44l75.776 93.696 143.872-85.504c15.872-9.728 36.864-4.608 46.592 11.776 9.728 15.872 4.608 36.352-11.264 46.08h-0.512l-168.96 100.864c-14.336 8.704-33.28 5.12-44.032-7.68l-71.168-89.088zM319.488 780.8L102.912 415.744c76.8 69.632 185.344 48.64 231.424-13.312l222.72 378.368H711.68c18.432 0 33.792 14.848 33.792 33.792v100.864c0 18.432-15.36 33.792-33.792 33.792H170.496c-18.432 0-33.792-14.848-33.792-33.792v-100.864c0-18.432 15.36-33.792 33.792-33.792h148.992z" fill="#AAAAAA" ></path><path d="M204.288 148.48C133.12 148.48 75.264 205.824 75.264 276.48S133.12 404.48 204.288 404.48c71.168 0 129.024-57.344 129.024-128S275.456 148.48 204.288 148.48z m0 202.752c-41.472 0-74.752-33.28-74.752-74.752 0-40.96 33.792-74.24 74.752-74.24C245.76 202.24 279.04 235.52 279.04 276.48c0 41.472-33.792 75.264-74.752 74.752z" fill="#72B02D" ></path></symbol><symbol id="icon-jiegoushu" viewBox="0 0 1024 1024"><path d="M233.984 472.064h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44v238.08h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V233.984h-39.936c-22.016 0-39.936-17.92-39.936-39.936V115.2c0-22.016 17.92-39.936 39.936-39.936h158.72c22.016 0 39.936 17.92 39.936 39.936V194.56c0 22.016-17.92 39.936-39.936 39.936h-39.936v237.568z" fill="#AAAAAA" ></path><path d="M551.936 75.264h317.44c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V154.624c-0.512-44.032 35.328-79.36 79.36-79.36z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaitui" viewBox="0 0 1024 1024"><path d="M512 148.992c199.68 0 361.984 162.304 361.984 361.984S711.68 872.448 512 872.448s-361.984-162.304-361.984-361.984S312.32 148.992 512 148.992m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M670.72 456.192v109.056l-75.264-54.784L670.72 456.192m25.6-102.912c-10.24 0-20.992 3.072-30.208 10.24l-144.896 105.472c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-52.224-52.224z" fill="#72B02D" ></path><path d="M499.712 456.192v109.056L424.96 510.976l74.752-54.784m26.112-102.912c-10.24 0-20.992 3.072-30.208 10.24L350.208 468.992c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-51.712-52.224z" fill="#72B02D" ></path><path d="M314.368 381.44c-21.504 0-38.912 17.408-38.912 38.912v181.248c0 21.504 17.408 38.912 38.912 38.912s38.912-17.408 38.912-38.912V420.352c0-21.504-17.408-38.912-38.912-38.912z" fill="#72B02D" ></path></symbol><symbol id="icon-bofang" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M491.008 445.952l115.712 66.048-115.712 66.048V445.952m-23.552-87.04c-24.576 0-46.592 19.456-46.592 46.592v212.48c0 27.136 22.528 46.592 46.592 46.592 7.68 0 15.36-2.048 23.04-6.144l185.856-106.496c31.232-17.92 31.232-62.976 0-80.896L490.496 365.056c-7.168-4.096-15.36-6.144-23.04-6.144z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaijin" viewBox="0 0 1024 1024"><path d="M515.584 151.04c199.168 0 360.96 161.792 360.96 360.96s-161.792 360.96-360.96 360.96-360.96-161.792-360.96-360.96 161.792-360.96 360.96-360.96m0-74.752c-240.64 0-435.712 195.072-435.712 435.712s195.072 435.712 435.712 435.712 435.712-195.072 435.712-435.712-195.072-435.712-435.712-435.712z" fill="#AAAAAA" ></path><path d="M358.912 458.24L433.152 512l-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432L363.52 366.592c-9.216-6.656-19.456-9.728-29.696-9.728z" fill="#72B02D" ></path><path d="M527.36 458.24l74.24 53.76-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432l-142.848-103.936c-9.216-7.168-19.968-10.24-29.696-10.24z" fill="#72B02D" ></path><path d="M710.144 384.512c-20.992 0-38.4 17.408-38.4 38.4v178.688c0 20.992 17.408 38.4 38.4 38.4s38.4-17.408 38.4-38.4V422.912c0-21.504-17.408-38.4-38.4-38.4z" fill="#72B02D" ></path></symbol><symbol id="icon-zanting" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M416.768 353.28c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c-0.512-21.504-17.92-39.424-39.936-39.424z m190.464 0c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c0-21.504-17.92-39.424-39.936-39.424z" fill="#72B02D" ></path></symbol><symbol id="icon-zhongzhi" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M580.096 421.376c12.288 0 22.528 10.24 22.528 22.528v136.192c0 12.288-10.24 22.528-22.528 22.528H443.904c-12.288 0-22.528-10.24-22.528-22.528V443.904c0-12.288 10.24-22.528 22.528-22.528h136.192m0-68.096H443.904C393.728 353.28 353.28 393.728 353.28 443.904v136.192c0 50.176 40.448 90.624 90.624 90.624h136.192c50.176 0 90.624-40.448 90.624-90.624V443.904c0-50.176-40.448-90.624-90.624-90.624z" fill="#72B02D" ></path></symbol><symbol id="icon-suoxiao" viewBox="0 0 1024 1024"><path d="M491.008 463.36c32.256 0 58.88-26.112 58.88-58.88s-26.112-58.88-58.88-58.88H285.696c-32.256 0-58.88 26.112-58.88 58.88s26.112 58.88 58.88 58.88h205.312z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848 13.312 0 26.112-5.12 36.352-14.848 19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangda" viewBox="0 0 1024 1024"><path d="M488.96 333.824h-47.104V286.72c0-34.816-28.16-62.976-62.976-62.976-34.816 0-62.976 28.16-62.976 62.976v47.104h-47.104c-34.816 0-62.976 28.16-62.976 62.976s28.16 62.976 62.976 62.976h47.104V506.88c0 34.816 28.16 62.976 62.976 62.976 34.816 0 62.976-28.16 62.976-62.976v-47.104h47.104c34.816 0 62.976-28.16 62.976-62.976 0-34.304-28.16-62.976-62.976-62.976z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangdazhichuangkou" viewBox="0 0 1024 1024"><path d="M949.248 858.624l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 142.848-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.616-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-96.768 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M216.576 919.04h109.056v-102.912H216.576c-29.696 0-53.76-24.064-53.76-53.76V233.984c0-29.696 24.064-53.76 53.76-53.76H798.72c29.696 0 53.76 24.064 53.76 53.76v81.92h102.912v-81.92c0-86.528-70.144-156.672-156.672-156.672H216.576c-86.528 0-156.672 70.144-156.672 156.672v528.384c0 86.528 70.144 156.672 156.672 156.672z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shiyingpingmu" viewBox="0 0 1024 1024"><path d="M876.032 75.264H147.968c-39.936 0-72.704 32.768-72.704 72.704v728.064c0 39.936 32.768 72.704 72.704 72.704h728.064c39.936 0 72.704-32.768 72.704-72.704V147.968c0-39.936-32.768-72.704-72.704-72.704z m0 764.416c0 22.016-14.336 36.352-36.352 36.352H184.32c-22.016 0-36.352-14.336-36.352-36.352V184.32c0-22.016 14.336-36.352 36.352-36.352h655.36c22.016 0 36.352 14.336 36.352 36.352v655.36z" fill="#AAAAAA" ></path><path d="M329.728 184.32H220.672c-3.584 0-10.752 0-14.336 3.584-7.168 3.584-14.336 10.752-18.432 18.432-3.584 3.584-3.584 10.752-3.584 14.336v109.056c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352v-22.016l47.104 47.104c7.168 7.168 14.336 10.752 25.6 10.752 10.752 0 18.432-3.584 25.6-10.752 14.336-14.336 14.336-36.352 0-51.2l-47.104-47.104h22.016c22.016 0 36.352-14.336 36.352-36.352 0-21.504-14.848-35.84-36.864-35.84zM329.728 766.976h-22.016l47.104-47.104c14.336-14.336 14.336-36.352 0-51.2-14.336-14.336-36.352-14.336-51.2 0l-47.104 47.104v-22.016c0-22.016-14.336-36.352-36.352-36.352s-36.352 14.336-36.352 36.352v109.056c0 3.584 0 10.752 3.584 14.336 3.584 7.168 10.752 14.336 18.432 18.432 3.584 3.584 10.752 3.584 14.336 3.584h109.056c22.016 0 36.352-14.336 36.352-36.352s-13.824-35.84-35.84-35.84zM817.664 187.904c-3.584-3.584-10.752-3.584-14.336-3.584h-109.056c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h22.016l-47.104 47.104c-14.336 14.336-14.336 36.352 0 51.2 7.168 7.168 14.336 10.752 25.6 10.752s18.432-3.584 25.6-10.752l47.104-47.104v22.016c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352V220.672c0-3.584 0-10.752-3.584-14.336-4.096-7.68-11.264-14.848-18.944-18.432zM803.328 657.408c-22.016 0-36.352 14.336-36.352 36.352v22.016l-47.104-47.104c-14.336-14.336-36.352-14.336-51.2 0-14.336 14.336-14.336 36.352 0 51.2l47.104 47.104h-22.016c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h109.056c3.584 0 10.752 0 14.336-3.584 7.168-3.584 14.336-10.752 18.432-18.432 3.584-3.584 3.584-10.752 3.584-14.336v-109.056c0.512-22.016-13.824-36.864-35.84-36.864z" fill="#72B02D" ></path></symbol><symbol id="icon-yangshitu-01" viewBox="0 0 1024 1024"><path d="M645.632 882.688H150.528l252.928-204.8 477.696 0.512z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512z m-542.72 23.552H880.64l-234.496 203.264-228.864 0.512V140.8z m0 247.296l217.088-0.512-1.024 247.296H417.28V388.096z m-43.008-223.744v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m532.48 493.568H150.528l252.928-204.288 477.696 0.512-235.52 203.776z m271.36-247.808h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-zuoshitu-01" viewBox="0 0 1024 1024"><path d="M374.272 644.096l-262.656 211.968L112.64 373.76l261.632-209.408z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM112.64 373.76l261.632-209.408v479.744l-263.168 211.968L112.64 373.76z m520.192 507.904l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-qianshitu-01" viewBox="0 0 1024 1024"><path d="M112.64 389.12h520.704v493.056H112.64z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m259.584 717.824H112.64V389.12h520.704v493.056z m12.288-537.6l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-youshitu-01" viewBox="0 0 1024 1024"><path d="M916.992 659.456l-239.616 196.096V375.808l239.616-208.896z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m270.848 314.88l-239.104 196.096V375.808l239.104-208.896v492.544z" fill="#AAAAAA" ></path></symbol><symbol id="icon-houshitu-01" viewBox="0 0 1024 1024"><path d="M960 118.784V117.76v-1.024-1.024-1.024-0.512-0.512c1.536 7.68-1.024 15.872-6.656 20.992L677.376 373.76v299.52h-43.008V389.12H374.272v254.976l-262.656 211.968L112.64 389.12l261.632-0.512v-42.496h269.824l280.064-243.2c3.072-2.56 6.656-4.096 10.752-5.12H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c-0.512 0.512-0.512 1.024-1.024 2.048 0 0.512 0 0.512-0.512 1.024 0 0.512 0 0.512-0.512 1.024 0 0.512 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V907.264c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024c0 0.512 0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024s0 0.512 0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-242.176 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V658.944v-2.048V118.272c1.536 1.024 1.536 1.024 1.536 0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m258.56 717.312l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m44.544-26.112v-177.664H880.64l-203.264 177.664z m281.6-741.376v-0.512-0.512 1.024z" fill="#AAAAAA" ></path><path d="M916.992 634.88h-239.616V375.808l239.616-211.456zM644.096 346.112H417.28V141.824h462.336zM417.28 389.12H634.88v245.76H417.28z" fill="#72B02D" ></path><path d="M958.976 114.176c0 0.512 0.512 0.512 0 0z m-20.48-16.384H945.152l0.512 0.512 0.512 0.512h1.024l0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512c0 0.512 0.512 0.512 0.512 1.024s0 0.512 0.512 0.512c0 0.512 0.512 1.024 0.512 1.536 0 0.512 0.512 1.024 0.512 1.024-3.072-10.24-13.312-16.896-24.064-14.848h4.608v1.024z" fill="#C1272D" ></path></symbol><symbol id="icon-dingshitu-01" viewBox="0 0 1024 1024"><path d="M880.64 140.8l-234.496 203.776-497.664 1.536 256-206.336z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-497.664 1.536 256-205.824 476.16 1.024-234.496 203.264z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-toushitu-01" viewBox="0 0 1024 1024"><path d="M965.632 114.176V112.64v-1.024-0.512-1.024-0.512s0-0.512-0.512-1.024v-0.512c-0.512-1.024-0.512-2.048-1.024-3.072v-0.512c0-0.512-0.512-0.512-0.512-1.024s0-0.512-0.512-0.512l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512s-0.512-1.024-1.024-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024s-0.512 0-0.512-0.512c0 0-0.512 0-0.512-0.512H950.784h-0.512H392.704c-5.12 0-9.728 1.536-13.312 4.608l-312.32 251.392-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536 0 0 0 0.512-0.512 0.512 0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024c0 0.512 0 0.512-0.512 1.024s0 0.512 0 1.024 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V912.896c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024l0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512 0 0.512 0.512 0.512 1.024 1.024l0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512h583.168c7.68 0 14.848-4.096 18.432-10.752L957.44 675.84l1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V661.504v-1.536V658.432l1.024-544.256zM372.736 343.04l-229.888 0.512L372.736 158.72v184.32z m43.008 43.008l220.672-0.512-0.512 251.392h-220.16v-250.88z m-43.008 0v260.096l-267.264 215.552 1.536-474.624 265.728-1.024z m-227.84 502.272l257.024-208.384h233.984l-0.512 206.848-490.496 1.536z m503.296-545.792l-172.544 0.512H415.232V135.68h471.04l-238.08 206.848z m31.232 337.408h207.36l-207.36 181.248v-181.248z m0-43.008V373.76l243.2-212.48v475.648h-243.2z" fill="#AAAAAA" ></path></symbol><symbol id="icon-a-jixiebi3" viewBox="0 0 1024 1024"><path d="M483.386004 821.695719H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M483.386004 776.399147H164.779715l29.075502 22.648286h260.455285l29.075502-22.648286z" fill="#7A807D" ></path><path d="M483.386004 776.399147H164.779715l29.075502-22.648285h260.455285l29.075502 22.648285z" fill="#3F3F3F" ></path><path d="M483.386004 730.796518H164.779715l29.075502 22.954344h260.455285l29.075502-22.954344zM483.386004 685.499947H164.779715l29.075502 22.648285h260.455285l29.075502-22.648285z" fill="#7A807D" ></path><path d="M483.386004 730.796518H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M150.701051 623.064132h339.418227v62.435815H150.701051z" fill="#F7A53F" ></path><path d="M150.701051 821.695719h339.418227v31.217907H150.701051z" fill="#FFFFFF" ></path><path d="M607.951575 339.654504a74.984189 74.984189 0 0 1-23.872517 103.447575 75.290247 75.290247 0 0 1-103.753633-23.872518L293.324039 120.823095A75.290247 75.290247 0 0 1 317.196557 17.069462a75.290247 75.290247 0 0 1 103.753633 23.872517zM441.762128 517.474152v105.58998H198.752144v-105.58998a122.423166 122.423166 0 1 1 244.846331 0z" fill="#FFC200" ></path><path d="M627.233224 377.605685a103.141517 103.141517 0 0 1-52.948019 82.635637l-165.88339 118.750471-2.448463 1.836347a112.93537 112.93537 0 1 1-112.017197-194.346775l195.571007-84.471985a132.523077 132.523077 0 0 1 48.357151-12.854432A89.062853 89.062853 0 0 1 627.233224 377.605685z" fill="#FFE610" ></path><path d="M401.056425 493.601635a71.005436 71.005436 0 1 1-71.005436-71.311494 71.005436 71.005436 0 0 1 71.005436 71.311494z" fill="#FFFFFF" ></path><path d="M375.34756 493.601635a45.296571 45.296571 0 1 1-45.296571-45.60263 45.296571 45.296571 0 0 1 45.296571 45.60263z" fill="#48B8BF" ></path><path d="M592.342622 376.381453a49.88744 49.88744 0 1 1-49.581382-49.88744 49.88744 49.88744 0 0 1 49.581382 49.88744z" fill="#FFFFFF" ></path><path d="M574.285205 376.381453a30.605791 30.605791 0 1 1-30.605792-30.605791 30.605791 30.605791 0 0 1 30.605792 30.605791z" fill="#48B8BF" ></path><path d="M731.048068 230.789704l165.975207-62.099151 18.883774 50.46895-165.975207 62.068545z" fill="#FFE610" ></path><path d="M734.047436 202.785404l145.836596-54.294674 9.426584 25.31099-145.867202 54.294674z" fill="#F7A53F" ></path><path d="M808.419509 259.161272l23.872517 63.353988 31.523966 35.808776-19.893765 18.057417-48.051092-38.257239-27.851271-63.660046 40.399645-15.302896zM854.940312 242.022029l23.56646 63.04793-0.306058 47.745035 26.627038 0.612116 11.324143-60.293409-20.811938-66.414568-40.399645 15.302896zM716.173654 94.379691l102.345766-38.257239 37.216643 99.468822-102.345767 38.257239z" fill="#7A807D" ></path><path d="M841.473764 83.790087a66.108509 66.108509 0 0 1-65.802452 66.10851l-407.669142 15.608953a67.944857 67.944857 0 0 1-11.324142 0 82.635637 82.635637 0 0 1 0-165.271273 67.944857 67.944857 0 0 1 11.324142 0l407.669142 17.445301A66.108509 66.108509 0 0 1 841.473764 83.790087z" fill="#FFE610" ></path><path d="M402.892773 83.790087a46.520803 46.520803 0 1 1-46.520803-46.214745A46.520803 46.520803 0 0 1 402.892773 83.790087z" fill="#FFFFFF" ></path><path d="M386.059587 83.790087a30.605791 30.605791 0 1 1-30.605791-30.605791 30.605791 30.605791 0 0 1 30.605791 30.605791z" fill="#48B8BF" ></path><path d="M810.867972 83.790087a38.257239 38.257239 0 1 1-39.787528-38.257239A38.257239 38.257239 0 0 1 810.867972 83.790087z" fill="#FFFFFF" ></path><path d="M795.565077 83.790087a24.484633 24.484633 0 1 1-24.484633-24.484633 24.484633 24.484633 0 0 1 24.484633 24.484633z" fill="#48B8BF" ></path><path d="M106.93477 852.913626h639.66104v171.086374H106.93477z" fill="#FFE610" ></path><path d="M383.305066 709.678522h337.275822v207.201208H383.305066z" fill="#4D4D4D" ></path><path d="M407.177584 732.02075h291.061076v161.904636H407.177584z" fill="#FFFFFF" ></path><path d="M429.825869 755.893267h159.150116v16.22107h-159.150116zM429.825869 784.356653h131.604903v16.22107h-131.604903zM429.825869 812.820039h199.855818v16.22107h-199.855818zM429.825869 841.283425h146.601741v16.22107h-146.601741z" fill="#92D5D2" ></path><path d="M507.564579 732.326808l-31.830023 161.904636H407.177584v-161.904636h100.386995z" fill="#F5F5F5" opacity=".5" ></path><path d="M474.816383 916.87973h155.783478v31.830023h-155.783478z" fill="#7A807D" ></path><path d="M106.93477 977.173139h639.66104v46.826861H106.93477z" fill="#F7A53F" ></path><path d="M252.006221 899.740487h66.414567v48.969266H252.006221z" fill="#7A807D" ></path><path d="M319.64502 817.716966l-3.672695 11.324143-21.730112 70.699378h-21.730112l23.872518-76.820537 3.366637-11.324143 19.893764 6.121159z" fill="#999999" ></path><path d="M341.069074 809.147344A28.463386 28.463386 0 1 1 321.17531 773.950684a28.463386 28.463386 0 0 1 19.893764 35.19666z" fill="#48B8BF" ></path><path d="M322.705599 793.538391a13.16049 13.16049 0 1 1-26.014923 0 13.16049 13.16049 0 0 1 26.014923 0z" fill="#FFFFFF" ></path><path d="M165.085773 899.740487h66.414568v49.275324H165.085773z" fill="#7A807D" ></path><path d="M163.861542 817.716966l3.366637 11.324143 22.03617 70.699378h21.730111l-23.872517-76.820537-3.672695-11.324143-19.587706 6.121159z" fill="#999999" ></path><path d="M142.437488 809.147344a28.157328 28.157328 0 1 0 18.669532-35.19666 28.157328 28.157328 0 0 0-18.669532 35.19666z" fill="#F7A53F" ></path><path d="M160.800963 793.538391a13.16049 13.16049 0 1 0 12.854432-12.854433 12.854432 12.854432 0 0 0-12.854432 12.854433z" fill="#FFFFFF" ></path></symbol><symbol id="icon-jixiebi2" viewBox="0 0 1164 1024"><path d="M848.55632 485.108049h233.370249v430.146938h-233.370249z" fill="#FFE610" ></path><path d="M974.217224 605.245396h154.314351v64.211341h-154.314351zM974.217224 689.82485h154.314351v64.211341h-154.314351zM974.217224 774.749527h154.314351v64.211341h-154.314351z" fill="#54D9D9" ></path><path d="M306.557369 245.869021l99.078789 31.760448 69.389675 22.094225 145.683794 46.259783 69.734897 22.094225 119.101681 37.974449 66.627896 21.058558 1.035667-2.761778 21.749003-69.044453 23.129891-72.151453-22.784669-7.249667-79.746343-25.201225-20.368113-6.559223-337.972595-107.364124-21.40378-6.904445-87.686455-27.617781-45.224116 142.576794-0.345222 1.035667z" fill="#FFE610" ></path><path d="M412.33347 357.755556l10.70189-33.555604 441.470229 140.401894-10.667368 33.555604z" fill="#A3A3A3" ></path><path d="M380.331366 357.686512l25.408359-79.953476 69.424197 22.094225-25.408359 79.918953zM595.508402 425.626253l25.408359-79.953476 69.389674 22.059703-25.373836 79.953476z" fill="#3F3F3F" ></path><path d="M809.200982 411.575707a144.302906 144.302906 0 0 0 4.833112 37.284004 138.088905 138.088905 0 0 0 18.987224 43.152783 144.302906 144.302906 0 0 0 15.535002 19.677669 146.719461 146.719461 0 0 0 256.154919-100.114456 144.648128 144.648128 0 0 0-34.522226-94.5909 180.206021 180.206021 0 0 0-15.880224-16.570668 146.719461 146.719461 0 0 0-96.317012-34.522227 148.445573 148.445573 0 0 0-58.687784 10.356668 146.719461 146.719461 0 0 0-89.757788 129.803571 34.522226 34.522226 0 0 0-0.345223 5.523556z" fill="#FFC200" ></path><path d="M876.174101 411.575707A80.091565 80.091565 0 1 0 956.265666 331.484142a80.091565 80.091565 0 0 0-80.091565 80.091565z" fill="#FFFFFF" ></path><path d="M904.827549 411.575707a51.438117 51.438117 0 1 0 51.438117-51.092895 51.438117 51.438117 0 0 0-51.438117 51.092895z" fill="#54D9D9" ></path><path d="M218.076903 216.594173l37.007826-117.202958 88.894733 28.06657L306.902591 244.660743zM86.512699 119.345062l92.450522-16.467102 19.401491 108.745013-92.450522 16.467102z" fill="#8A8A8A" ></path><path d="M0 65.317778l45.224116 254.083585 21.058558-3.797445 31.415226-5.523556 22.094225-4.142667-13.808891-77.675009-19.332446-109.090235-12.082779-67.318341-14.499335 2.761778-21.403781 3.797445-38.664893 6.904445z" fill="#292929" ></path><path d="M95.626567 436.43171l16.570668-3.107-14.499335-123.244348-31.415226 5.523556 29.343893 120.827792z" fill="#7A807D" ></path><path d="M138.088905 153.349455a80.782009 80.782009 0 0 0 31.070003 63.520896 79.40112 79.40112 0 0 0 49.021562 16.915891 75.258453 75.258453 0 0 0 32.10567-6.904445 80.091565 80.091565 0 0 0 48.331117-73.532342 78.710676 78.710676 0 0 0-13.808891-44.18845 76.984564 76.984564 0 0 0-31.760448-27.617781l-7.59489-3.452222a83.543787 83.543787 0 0 0-12.428001-3.452223H217.835247A80.091565 80.091565 0 0 0 138.088905 153.349455z" fill="#FFC200" ></path><path d="M167.087575 153.694677A51.092895 51.092895 0 1 0 217.835247 103.637449a50.747673 50.747673 0 0 0-50.747672 50.057228z" fill="#FFFFFF" ></path><path d="M185.384355 153.694677a32.450893 32.450893 0 1 0 32.450892-34.522226 32.450893 32.450893 0 0 0-32.450892 34.522226z" fill="#54D9D9" ></path><path d="M38.664893 58.413333l21.403781-3.797445C66.627897 19.74844 108.745013 11.117883 141.88635 14.915328a89.757788 89.757788 0 0 1 81.472454 58.687784h9.321001a83.543787 83.543787 0 0 1 12.428001 3.452223l7.59489 3.452223c53.854673-42.807561 165.016241-17.951558 187.110466 48.331116l21.40378 6.904446C439.813162 59.449 307.593036 24.581551 241.655583 69.115223a113.923346 113.923346 0 0 0-108.745012-69.044452C90.793455 0.070771 41.081449 10.772661 38.664893 58.413333zM799.189537 244.14291l20.368113 6.559223a345.222262 345.222262 0 0 0 89.412566-34.522226c48.331117-22.784669 133.601015-34.522226 144.99335 34.522226a114.613791 114.613791 0 0 1 0 48.676339 180.206021 180.206021 0 0 1 15.880224 16.570668c15.880224-50.057228 3.797445-107.364124-54.545117-124.280014-83.198565-22.439447-141.541127 45.569339-216.109136 52.473784z" fill="#3F3F3F" ></path><path d="M44.18845 731.251522a105.638012 105.638012 0 0 0 105.638012 105.638012h698.729858v-31.415226H149.826462a74.222786 74.222786 0 0 1 0-148.445573h698.729858v-31.415225H149.826462a105.638012 105.638012 0 0 0-105.638012 105.638012z" fill="#8A8A8A" ></path><path d="M75.603675 731.251522a74.222786 74.222786 0 0 0 74.222787 74.222786h698.729858V655.993069H149.826462a74.222786 74.222786 0 0 0-74.222787 75.258453z" fill="#FFE610" ></path><path d="M103.566679 731.251522a51.092895 51.092895 0 1 0 50.747672-50.747673A50.747673 50.747673 0 0 0 103.566679 731.251522z" fill="#FFFFFF" ></path><path d="M121.863459 731.251522a32.450893 32.450893 0 1 0 32.450892-32.450893 32.450893 32.450893 0 0 0-32.450892 32.450893zM290.331922 731.251522a34.522226 34.522226 0 0 0 34.522227 34.522226h414.266714a34.522226 34.522226 0 0 0 34.522226-34.522226 34.522226 34.522226 0 0 0-34.522226-34.522226h-414.266714a34.522226 34.522226 0 0 0-34.522227 34.522226z" fill="#54D9D9" ></path><path d="M827.15254 877.625761h276.523032v61.794785h-276.523032z" fill="#F7A53F" ></path><path d="M839.925764 939.765768h250.976584v31.070004h-250.976584z" fill="#707070" ></path><path d="M747.75142 657.028735v148.445573h43.152783v31.415226h57.652117v-211.276024h-57.652117v31.415225h-43.152783z" fill="#B3B3B3" opacity=".76" ></path><path d="M14.499335 970.490549h1149.590133v53.509451H14.499335z" fill="#B86805" ></path><path d="M154.314351 836.889534H272.725587v133.601015H154.314351zM614.150404 836.889534h118.411236v133.601015h-118.411236z" fill="#F7A53F" ></path><path d="M614.150404 836.889534h118.411236v78.365453h-118.411236zM154.314351 836.889534H272.725587v78.365453H154.314351z" fill="#B3B3B3" opacity=".76" ></path></symbol><symbol id="icon-jixiebi4" viewBox="0 0 1123 1024"><path d="M502.569098 505.335276h543.234824v85.15391H502.569098z" fill="#FFE610" ></path><path d="M483.047648 203.089382a81.451566 81.451566 0 0 1-41.06236 73.373725l-302.919047 173.33701a82.124719 82.124719 0 0 1-81.788143-143.045105l302.919047-173.33701a82.124719 82.124719 0 0 1 83.807603 0 79.768682 79.768682 0 0 1 27.935868 28.945597A77.412645 77.412645 0 0 1 483.047648 203.089382z" fill="#FFC200" ></path><path d="M39.776109 803.542249h1082.094151v220.121174H39.776109z" fill="#FFE610" ></path><path d="M39.776109 971.830609h1082.094151v52.169391H39.776109zM466.218812 723.43699v146.747449H219.844654v-146.747449a123.187079 123.187079 0 0 1 246.374158 0z" fill="#FFC200" ></path><path d="M396.210854 790.415757a100.973016 100.973016 0 0 1-141.698798-23.896947l-235.603704-331.864645a100.973016 100.973016 0 0 1 23.896947-141.362222 100.973016 100.973016 0 0 1 141.698799 23.896947l235.603703 331.528068a100.973016 100.973016 0 0 1-24.233523 141.698799z" fill="#FFE610" ></path><path d="M146.470929 451.146424a86.16364 86.16364 0 1 1 29.282174-118.138428 86.16364 86.16364 0 0 1-29.282174 118.138428z" fill="#B8B8B8" ></path><path d="M131.661553 424.556864a56.881466 56.881466 0 1 1 19.52145-78.085799 56.544889 56.544889 0 0 1-19.52145 78.085799z" fill="#B8B8B8" ></path><path d="M120.554522 405.035414a35.677132 35.677132 0 0 1-36.686863-60.920386A35.677132 35.677132 0 1 1 120.554522 405.035414z" fill="#FFFFFF" ></path><path d="M370.9676 757.767815a56.881466 56.881466 0 1 1 19.184873-78.085798 56.881466 56.881466 0 0 1-19.184873 78.085798z" fill="#B8B8B8" ></path><path d="M358.850839 739.592672a35.677132 35.677132 0 1 1 12.116761-48.803624 35.677132 35.677132 0 0 1-12.116761 48.803624z" fill="#FFFFFF" ></path><path d="M423.136992 384.167657l-112.416624 66.305614-32.984519-55.871735 112.753201-65.969037 9.760725 16.492259 13.463069 22.887217 9.424148 16.155682z" fill="#8A8A8A" ></path><path d="M400.18246 345.023785l70.512822-41.398937 13.463069 22.887217-70.512823 41.432594z" fill="#C4C4C4" ></path><path d="M489.442606 313.823123a21.877487 21.877487 0 0 1-11.780186 27.935868 21.54091 21.54091 0 0 1-27.935867-12.116762l-29.955328-73.373725a21.54091 21.54091 0 0 1 12.116762-27.935868 21.204333 21.204333 0 0 1 27.599291 11.780186z" fill="#F7A53F" ></path><path d="M482.037918 318.19862a12.453339 12.453339 0 0 1-9.424148 14.809376 12.789915 12.789915 0 0 1-14.809376-9.424148 12.789915 12.789915 0 0 1 9.424148-14.809376 12.453339 12.453339 0 0 1 14.809376 9.424148z" fill="#707070" ></path><path d="M303.652257 388.543155a24.5701 24.5701 0 0 0-7.404688 8.077841l-24.906677 45.10128 32.311365 44.764704 36.350285-65.63246a24.906677 24.906677 0 0 0-36.013709-33.657672z m12.453338 6.394957a14.472799 14.472799 0 0 1 16.155683 12.116762 14.136222 14.136222 0 0 1-12.116762 16.155683 13.799645 13.799645 0 0 1-16.155683-11.780185 14.136222 14.136222 0 0 1 13.463069-16.49226z" fill="#B86805" ></path><path d="M305.33514 411.430372a13.799645 13.799645 0 0 0 16.155683 11.780185 14.136222 14.136222 0 0 0 12.116762-16.155683 14.472799 14.472799 0 0 0-16.155683-12.116762 14.136222 14.136222 0 0 0-12.116762 16.49226z" fill="#5E5E5E" ></path><path d="M625.4196 163.709906l-19.858026 12.116762-37.360016 22.55064-19.858027 12.116762-20.867756-34.667402-40.389207-66.64219-19.184872-31.301635 9.424148-5.721804 58.227772-35.340556 9.424148-5.385227 80.441836 132.27465z" fill="#8A8A8A" ></path><path d="M568.066927 198.276335l37.124412-22.516982 36.484917 60.14626-37.15807 22.55064z" fill="#4D4D4D" ></path><path d="M931.031261 336.373763l-85.15391 217.765137h-128.572307l-46.447587-118.811581-30.965058-79.768683-7.404688-19.184873 46.111011-46.447587h205.648375l46.784164 46.447587z" fill="#AEBABD" ></path><path d="M744.668732 483.861681l105.954351-43.182793 2.423352 5.890093-105.988009 43.182793zM840.8287 361.953594l-120.157889-26.252984 1.682884-6.058381 119.821312 26.252984-1.346307 6.058381zM683.916634 363.838423l6.125696-1.851172 32.984518 109.252803-6.159353 1.851172z" fill="#6A5060" ></path><path d="M880.544753 403.015954a49.813354 49.813354 0 1 1-49.813354-49.813355 50.149931 50.149931 0 0 1 49.813354 49.813355zM746.923796 359.597557a33.657672 33.657672 0 1 1-33.657672-33.657672 33.657672 33.657672 0 0 1 33.657672 33.657672zM767.454975 465.282647a26.589561 26.589561 0 0 1-26.58956 26.252984A26.252984 26.252984 0 0 1 741.201991 438.693086a26.589561 26.589561 0 0 1 26.252984 26.589561z" fill="#FFFFFF" ></path><path d="M846.887081 403.015954a16.155683 16.155683 0 1 1-16.155682-16.155683 16.155683 16.155683 0 0 1 16.155682 16.155683zM724.709732 359.597557a10.097302 10.097302 0 0 1-10.097302 9.760725 9.760725 9.760725 0 1 1 0-19.52145 10.097302 10.097302 0 0 1 10.097302 9.760725zM748.943256 465.282647A7.741265 7.741265 0 0 1 741.201991 472.350758a8.077841 8.077841 0 0 1-8.077841-8.077842 8.077841 8.077841 0 0 1 8.077841-8.077841 8.077841 8.077841 0 0 1 7.741265 9.087572z" fill="#788B90" opacity=".37" ></path><path d="M698.456748 219.581642h166.268899v46.11101h-166.268899z" fill="#F7A53F" ></path><path d="M702.159092 223.620562h5.048651v38.03317h-5.048651zM711.246663 223.620562h5.048651v38.03317h-5.048651zM720.334235 223.620562h5.048651v38.03317h-5.048651zM729.421806 223.620562h5.048651v38.03317h-5.048651zM738.509378 223.620562h5.04865v38.03317h-5.04865zM747.596949 223.620562h5.048651v38.03317h-5.048651zM756.68452 223.620562h5.048651v38.03317h-5.048651zM765.772092 223.620562h5.048651v38.03317h-5.048651zM774.859663 223.620562h5.048651v38.03317H774.859663zM783.610658 223.620562h5.048651v38.03317h-5.048651zM792.698229 223.620562h5.048651v38.03317h-5.048651zM801.785801 223.620562h5.04865v38.03317h-5.04865zM810.873372 223.620562h5.048651v38.03317h-5.048651zM819.960944 223.620562h5.04865v38.03317h-5.04865zM829.048515 223.620562h5.048651v38.03317h-5.048651zM838.136086 223.620562h5.048651v38.03317h-5.048651zM847.223658 223.620562h5.048651v38.03317h-5.048651zM856.311229 223.620562h5.048651v38.03317h-5.048651z" fill="#788B90" opacity=".38" ></path><path d="M738.845954 265.692652h85.490487v23.896947h-85.490487z" fill="#707070" ></path><path d="M735.816764 288.916446h-1.682884L640.228976 355.558636l-39.0429 26.926138-4.712074 3.365767-16.492259-23.896947a25.916407 25.916407 0 0 1 6.731534-36.013709l97.270672-67.315344a25.916407 25.916407 0 0 1 36.013709 6.731534z" fill="#58BFD2" ></path><path d="M670.857457 435.327319h-33.657672a12.116762 12.116762 0 0 1-10.433878-8.414418l-24.906677-44.428127 39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M827.365631 288.916446h1.682884l94.241481 65.63246 39.0429 26.926138 4.712074 3.365767 16.492259-23.896947a25.916407 25.916407 0 0 0-6.731534-35.003979l-97.270672-67.315344a25.916407 25.916407 0 0 0-36.013709 6.731534z" fill="#58BFD2" ></path><path d="M892.324938 435.327319h33.657672a12.116762 12.116762 0 0 0 10.433878-8.414418l24.906677-44.428127-39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M738.845954 265.692652h85.490487v12.116762h-85.490487zM922.95342 355.558636l-31.301635 79.768683-46.447588 118.811581 49.140201-194.541343-70.007957-69.671381h4.038921l94.578058 65.63246z" fill="#848484" opacity=".25" ></path><path d="M661.433309 321.900964l-48.467048-67.988497 21.204334-12.789915 38.033169 74.383455-10.770455 6.394957z" fill="#7A807D" ></path><path d="M535.553616 36.820483l-58.227772 33.657672-11.780186-19.184873A33.657672 33.657672 0 0 1 502.905674 1.143351a33.657672 33.657672 0 0 1 21.204334 15.482529z" fill="#F7A53F" ></path><path d="M527.475775 175.826668L483.047648 203.089382A77.412645 77.412645 0 0 0 471.940616 164.046483a79.768682 79.768682 0 0 0-27.599291-28.272444l42.745243-25.916408zM527.475775 175.826668l-40.389207-66.64219 40.389207 66.64219z" fill="#C4C4C4" ></path><path d="M956.274515 854.028757H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M650.999431 304.062398l-70.007958 14.809376 69.671381 8.414418-4.712074 38.033169 25.243254-25.243254 22.887217 25.243254-3.702344-36.350286 35.003979-1.682883-31.974789-19.52145 14.809376-35.677132-33.657672 24.906677-26.252984-43.754973 2.692614 50.823084z" fill="#FFFFFF" ></path><path d="M956.274515 803.542249H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 803.542249H600.512923l32.311365-25.579831h290.802285l32.647942 25.579831z" fill="#999999" ></path><path d="M956.274515 752.719165H600.512923l32.311365 25.243253h290.802285l32.647942-25.243253zM956.274515 702.232657H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 752.719165H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M584.693817 632.561276h378.985386v69.671381H584.693817zM584.693817 854.028757h378.985386v34.667402H584.693817z" fill="#FFC200" ></path><path d="M502.569098 590.489186h543.234824v42.07209H502.569098z" fill="#F7A53F" ></path><path d="M273.696929 882.637778h80.441836v59.574079H273.696929z" fill="#7A807D" ></path><path d="M355.821648 783.011069l-4.375497 13.799646-26.589561 85.827063h-26.252984l28.945598-93.231751 4.375497-13.799646 23.896947 7.404688z" fill="#999999" ></path><path d="M381.738055 772.913768a33.657672 33.657672 0 1 1-22.55064-43.08182 33.657672 33.657672 0 0 1 22.55064 43.08182z" fill="#F7A53F" ></path><path d="M359.523992 753.728895a15.819106 15.819106 0 1 1-15.819106-15.819106 15.819106 15.819106 0 0 1 15.819106 15.819106z" fill="#FFFFFF" ></path><path d="M168.348416 882.637778h80.441835v59.574079H168.348416z" fill="#7A807D" ></path><path d="M166.665532 783.011069l4.375497 13.799646 26.589561 85.827063h26.252984l-28.945598-93.231751-4.03892-13.799646-24.233524 7.404688z" fill="#999999" ></path><path d="M140.749125 772.913768a33.657672 33.657672 0 1 0 67.315343-20.53118 33.657672 33.657672 0 0 0-43.08182-22.55064 33.657672 33.657672 0 0 0-24.233523 43.08182z" fill="#68FF4B" ></path><path d="M162.963188 753.728895a15.819106 15.819106 0 1 0 15.819106-15.819106 15.819106 15.819106 0 0 0-15.819106 15.819106z" fill="#FFFFFF" ></path></symbol></svg>',(s=>{var e=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,r,o,a,l=function(m,u){u.parentNode.insertBefore(m,u)};if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(m){console&&console.log(m)}}n=function(){var m,u=document.createElement("div");u.innerHTML=s._iconfont_svg_string_4634042,(u=u.getElementsByTagName("svg")[0])&&(u.setAttribute("aria-hidden","true"),u.style.position="absolute",u.style.width=0,u.style.height=0,u.style.overflow="hidden",u=u,(m=document.body).firstChild?l(u,m.firstChild):m.appendChild(u))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(r=n,o=s.document,a=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,c())})}function c(){a||(a=!0,r())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const l6={class:"obj-viewer-container"},c6={class:"buttonGroup-top"},h6={class:"buttonGroup-topLeft"},u6={class:"buttonGroup-left"},d6={class:"buttonGroup-right"},f6={class:"buttonGroup-bottom"},p6={class:"left-panel"},m6={class:"panel-header"},g6={key:1,class:"clipping-content"},_6={class:"radio-group"},v6={class:"radio-label"},y6={class:"radio-label"},x6={class:"radio-label"},M6={class:"radio-label"},b6={class:"right-panel"},S6={class:"panel-header"},E6={key:0,class:"loading-overlay"},A6={__name:"threeView",props:{urdfUrl:{type:String,default:""},animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(s,{emit:e}){const t=e,n=s;let i=null,r=!1;const o=y.ref(null),a=y.ref(!1),l=y.ref("");y.ref(!1);const c=y.ref(!1),d=y.ref(!1),m=y.ref(""),u=y.ref(!1),h=y.ref(""),g=y.ref(),{currentModels:_,initialCameraPosition:p,initialTargetPosition:f,initThreeJS:v,handleResize:b,getThreeJSObjects:S,clearAllModels:F,cleanup:C}=y4(o),{loadUrdfFromUrl:R}=F4(S,_,a,l),{isAnimating:P,toggleAnimation:A,stopAnimation:E}=x4(S,_),{isClipping:L,activeClippingAxis:B,toggleClipping:H,updateClippingPlanes:Q}=M4(S,_),{urdfModel:ae}=U4(S,_,a,l,F),G=()=>{if(c.value||_.value.length===0)return;c.value=!0,P.value&&E();const{camera:be,controls:ge}=S();if(!be||!ge)return;ge.enabled=!0;const se=$=>$<.5?4*$*$*$:1-Math.pow(-2*$+2,3)/2,j=be.position.clone(),q=ge.target.clone(),ne=1500,ee=Date.now(),ue=()=>{const $=Date.now()-ee,pe=Math.min($/ne,1),Ce=se(pe);be.position.lerpVectors(j,p.value,Ce),ge.target.lerpVectors(q,f.value,Ce),pe<1?requestAnimationFrame(ue):c.value=!1};ue()},le=async()=>r?Promise.resolve():new Promise(be=>{const ge=()=>{r?be():requestAnimationFrame(ge)};ge()}),Z=be=>{d.value=!0,m.value=be,be==="剖面视图"&&!L.value&&H()},ve=be=>{u.value=!0,h.value=be,be==="动画仿真"&&t("getAnimationData")},Ee=()=>{y.nextTick(()=>{var be;(be=g.value)==null||be.startAnimation()})};return y.watch(()=>n.urdfUrl,async(be,ge)=>{if(be)try{if(await le(),await R(be)){const{camera:j}=S();j&&(j.position.set(3,3,4),j.near=.01,j.far=1e4,j.updateProjectionMatrix())}}catch(se){console.error("加载urdf模型失败",se),Pn.ElMessage.error("加载urdf模型失败")}},{immediate:!0}),y.onMounted(async()=>{await y.nextTick();try{v(),i=S().scene,r=!0,window.addEventListener("resize",b)}catch(be){console.error("Three.js初始化失败:",be)}}),y.onBeforeUnmount(()=>{r=!1,m.value="",h.value="",window.removeEventListener("resize",b),P.value&&E(),C()}),(be,ge)=>{var j,q,ne,ee;const se=y.resolveComponent("el-scrollbar");return y.openBlock(),y.createElementBlock("div",l6,[y.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),y.createElementVNode("div",c6,[y.createVNode(un,{name:"guanjianjiexi",size:"34"}),y.createVNode(un,{name:"guanjiekongzhi",size:"34"}),y.createVNode(un,{name:"gongyishengcheng",size:"34"}),y.createVNode(un,{name:"buchangshezhi",size:"34"}),y.createVNode(un,{name:"shuchujiagongchengxu",size:"34"})]),y.createElementVNode("div",h6,[y.createVNode(un,{name:"viewReset",size:"24",onClick:G,title:"重置"}),y.createVNode(un,{name:"fangda",size:"24",title:"放大"}),y.createVNode(un,{name:"suoxiao",size:"24",title:"缩小"}),y.createVNode(un,{name:"lookAround",size:"24",onClick:y.unref(A),title:y.unref(P)?"停止动画":"动画视图"},null,8,["onClick","title"])]),y.createElementVNode("div",u6,[y.createVNode(un,{name:"jiegoushu",size:"24",onClick:ge[0]||(ge[0]=ue=>Z("场景树")),active:d.value&&m.value==="场景树",title:"场景树"},null,8,["active"]),y.createVNode(un,{name:"clipping",size:"24",onClick:ge[1]||(ge[1]=ue=>Z("剖面视图")),active:d.value&&m.value==="剖面视图",title:"剖面视图"},null,8,["active"]),y.createVNode(un,{name:"donghuafangzhen",size:"24",onClick:ge[2]||(ge[2]=ue=>Z("场景树3"))}),y.createVNode(un,{name:"donghuafangzhen",size:"24",onClick:ge[3]||(ge[3]=ue=>Z("场景4"))})]),y.createElementVNode("div",d6,[y.createVNode(un,{name:"donghuafangzhen",size:"24"}),y.createVNode(un,{name:"donghuafangzhen",size:"24"}),y.createVNode(un,{name:"guanjiekongzhi",size:"24",onClick:ge[4]||(ge[4]=ue=>ve("关节控制")),active:u.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),y.createVNode(un,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:ge[5]||(ge[5]=ue=>ve("动画仿真")),active:u.value&&h.value==="动画仿真"},null,8,["active"]),y.createVNode(un,{name:"donghuafangzhen",size:"24"}),y.createVNode(un,{name:"donghuafangzhen",size:"24"})]),y.createElementVNode("div",f6,[y.createVNode(un,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(j=g.value)==null?void 0:j.fastBackward},null,8,["onClick"]),y.createVNode(un,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:Ee}),y.createVNode(un,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(q=g.value)==null?void 0:q.fastForward},null,8,["onClick"]),y.createVNode(un,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(ne=g.value)==null?void 0:ne.pauseAnimation},null,8,["onClick"]),y.createVNode(un,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(ee=g.value)==null?void 0:ee.resetAll},null,8,["onClick"])]),y.withDirectives(y.createElementVNode("div",p6,[y.createElementVNode("div",m6,[y.createElementVNode("span",null,y.toDisplayString(m.value),1),y.createElementVNode("span",{class:"close",onClick:ge[6]||(ge[6]=ue=>d.value=!1)}," X ")]),y.createVNode(se,{"max-height":"650px"},{default:y.withCtx(()=>[m.value==="场景树"?(y.openBlock(),y.createBlock(r6,{key:0,model:y.unref(ae)},null,8,["model"])):y.createCommentVNode("",!0),m.value==="剖面视图"?(y.openBlock(),y.createElementBlock("div",g6,[y.createElementVNode("div",_6,[y.createElementVNode("label",v6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":ge[7]||(ge[7]=ue=>y.isRef(B)?B.value=ue:null),onChange:ge[8]||(ge[8]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(B)]]),ge[16]||(ge[16]=y.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),y.createElementVNode("label",y6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":ge[9]||(ge[9]=ue=>y.isRef(B)?B.value=ue:null),onChange:ge[10]||(ge[10]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(B)]]),ge[17]||(ge[17]=y.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),y.createElementVNode("label",x6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":ge[11]||(ge[11]=ue=>y.isRef(B)?B.value=ue:null),onChange:ge[12]||(ge[12]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(B)]]),ge[18]||(ge[18]=y.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),y.createElementVNode("label",M6,[y.withDirectives(y.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":ge[13]||(ge[13]=ue=>y.isRef(B)?B.value=ue:null),onChange:ge[14]||(ge[14]=(...ue)=>y.unref(Q)&&y.unref(Q)(...ue))},null,544),[[y.vModelRadio,y.unref(B)]]),ge[19]||(ge[19]=y.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):y.createCommentVNode("",!0)]),_:1})],512),[[y.vShow,d.value]]),y.withDirectives(y.createElementVNode("div",b6,[y.createElementVNode("div",S6,[y.createElementVNode("span",null,y.toDisplayString(h.value),1),y.createElementVNode("span",{class:"close",onClick:ge[15]||(ge[15]=ue=>u.value=!1)}," X ")]),y.createVNode(se,{"max-height":"650px"},{default:y.withCtx(()=>[y.withDirectives(y.createVNode(t6,{ref_key:"jointRef",ref:g,model:y.unref(ae),scene:y.unref(i),animationData:s.animationData},null,8,["model","scene","animationData"]),[[y.vShow,h.value==="关节控制"]]),y.withDirectives(y.createVNode(B4,{animationData:s.animationData},null,8,["animationData"]),[[y.vShow,h.value==="动画仿真"]])]),_:1})],512),[[y.vShow,u.value]]),a.value?(y.openBlock(),y.createElementBlock("div",E6,[ge[20]||(ge[20]=y.createElementVNode("div",{class:"loading-spinner"},null,-1)),y.createElementVNode("p",null,y.toDisplayString(l.value),1)])):y.createCommentVNode("",!0)])}}},mu=Pi._export_sfc(A6,[["__scopeId","data-v-e3790e10"]]),w6={class:"extra-button-content"},T6={class:"table-operator-wrap"},C6={class:"extra-button-filter"},R6={title:"条件查询"},D6={class:"form-content-value"},L6={key:0,class:"extra-header"},P6={__name:"header",props:{compName:{type:String,default:"表格名称",required:!1},buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter"],setup(s,{emit:e}){const t=e,n=s,i=y.ref(""),r=y.ref(!1),o=y.ref([]),a=y.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),l=u=>{var g;const h=(g=o.value)==null?void 0:g.reduce((_,p,f)=>(f===0?_[p.label]=u:_[p.label]=p.value,_),{});t("filter",h)},c=u=>{t("buttonClick",u)},d=u=>{var h,g;o.value=(g=(h=rn.getColumnChild(Oe.cloneDeep(u)))==null?void 0:h.filter(_=>(_==null?void 0:_.label)!==""&&(_==null?void 0:_.label)!=="操作"))==null?void 0:g.map(_=>({label:(_==null?void 0:_.label)??"",value:"",name:(_==null?void 0:_.label)??"",isFormColHidden:_==null?void 0:_.isTableColHidden,width:2}))},m=u=>{var h;if((u==null?void 0:u.buttonName)==="确认"&&t("filter",u==null?void 0:u.content),(u==null?void 0:u.buttonName)==="清空"){const g=Oe.cloneDeep(u==null?void 0:u.content);for(const _ in g)g[_]="";o.value=(h=o.value)==null?void 0:h.map(_=>({..._,value:""})),t("filter",g)}r.value=!1};return y.onMounted(()=>{d(n.columns)}),y.watch(()=>n.columns,()=>{d(n.columns)},{deep:!0,immediate:!0}),(u,h)=>{var f;const g=y.resolveComponent("svg-icon"),_=y.resolveComponent("el-input"),p=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",w6,[y.createElementVNode("div",{class:y.normalizeClass(s.compName?"table-name-wrap":"")},y.toDisplayString(s.compName),3),y.createElementVNode("div",T6,[y.createElementVNode("div",C6,[y.createVNode(Cu,{title:"",width:800,placement:"bottom-start",isVisible:r.value},{reference:y.withCtx(()=>[y.createVNode(_,{modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=v=>i.value=v),style:{width:"240px"},placeholder:"搜索","prefix-icon":y.unref(Pn.search_default),clearable:"",onInput:l},{append:y.withCtx(()=>[y.createElementVNode("span",R6,[y.createVNode(g,{onClick:h[0]||(h[0]=v=>r.value=!r.value),name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","prefix-icon"])]),content:y.withCtx(()=>[y.createElementVNode("div",D6,[(y.openBlock(),y.createBlock(On.ssForm,{rowContents:o.value,buttonValue:a.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:a.value,isStartJustify:!1,onOnButtonClick:m},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),n!=null&&n.buttons&&((f=n==null?void 0:n.buttons)==null?void 0:f.length)>0?(y.openBlock(),y.createElementBlock("div",L6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n==null?void 0:n.buttons,(v,b)=>(y.openBlock(),y.createElementBlock("div",{class:"extra-contents",key:b},[y.createVNode(p,{id:"themeButton",style:y.normalizeStyle({background:(v==null?void 0:v.background)??"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}),onClick:S=>c(v==null?void 0:v.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(v==null?void 0:v.label),1)]),_:2},1032,["style","onClick"])]))),128))])):y.createCommentVNode("",!0)])])}}},F6=Pi._export_sfc(P6,[["__scopeId","data-v-e343d690"]]),N6=y.defineComponent({__name:"batch",props:{buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(s,{emit:e}){const t=e,n=i=>{t("buttonClick",i)};return(i,r)=>{const o=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",null,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(s.buttons,a=>{var l;return y.openBlock(),y.createBlock(o,{key:a==null?void 0:a.label,class:y.normalizeClass((l=a==null?void 0:a.label)!=null&&l.includes("删除")?"warning-type":"default-type"),onClick:c=>n(a==null?void 0:a.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(a==null?void 0:a.label),1)]),_:2},1032,["class","onClick"])}),128))])}}}),U6=Pi._export_sfc(N6,[["__scopeId","data-v-73ec704e"]]),I6=Oe.useModelComp(Oe.pinia),{systemPath:g0}=Oe.storeToRefs(I6),ma=y.ref(),_0=new Map;function z6(s,e,t,n,i){const r=async u=>{try{const h=await On.downloadAvatarApi({url:u});if(h.status!==200)throw new Error(`下载失败: ${h.status}`);return h.data}catch(h){throw console.error("addModelFromUrl失败:",h),h}},o=u=>new Promise((h,g)=>{const _=new FileReader;_.onload=p=>{try{const f=p.target.result,b=new cs().parse(f);b.preload(),h(b)}catch(f){g(f)}},_.onerror=()=>{g(new Error("MTL文件读取失败"))},_.readAsText(u)}),a=async u=>{const h={materials:{},create:function(g){return this.materials[g]?this.materials[g]:(console.warn(`Material '${g}' not found, using default material`),new fn({color:8947848,side:pn}))},getAsArray:function(){const g=[];for(const _ in this.materials)g.push(this.materials[_]);return g},preload:function(){for(const g in this.materials)this.materials[g].map&&(this.materials[g].map.needsUpdate=!0)}};for(const g of u){const _=await o(g);Object.assign(h.materials,_.materials)}return h.preload(),h},l=async(u,h=[])=>new Promise((g,_)=>{const p=new FileReader;p.onload=async f=>{try{const v=f.target.result;let b=null;h&&h.length>0&&(h.length===1?b=await o(h[0]):b=await a(h));const S=new ls;b&&S.setMaterials(b);const F=S.parse(v);b||F.traverse(C=>{C.isMesh&&(C.material=new fn({color:8947848,side:pn}))}),g(F)}catch(v){_(v)}},p.onerror=()=>{_(new Error("OBJ文件读取失败"))},p.readAsText(u)}),c=async u=>{var h;try{t.value=!0;const{scene:g}=s();if(!g)throw new Error("Scene not initialized");i();const _=[];for(let p=0;p<u.length;p++){const f=u[p];n.value=`正在加载模型 ${p+1}/${u.length}...`;const v=await r(f.objUrl),b=((h=f.objUrl)==null?void 0:h.split("/").pop())||`model_${p}.obj`,S=new File([v],b,{type:v.type});let F=[];if(f.mtlUrls){const R=Array.isArray(f.mtlUrls)?f.mtlUrls:[f.mtlUrls];for(let P=0;P<R.length;P++){const A=R[P],E=await r(A),L=(A==null?void 0:A.split("/").pop())||`material_${p}_${P}.mtl`,B=new File([E],L,{type:E.type});F.push(B)}}const C=await l(S,F);g.add(C),e.value.push(C),_.push(C)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let p;const f=u.toLowerCase();switch(f){case".txt":case".cpt":case".obj":const v=await h.text();if(f===".txt"||f===".cpt"){const $=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Ce=[...v.matchAll($)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),Ke=new hn,He=Ce.flatMap(O=>[O.x,O.y,O.z]);if(Ke.setAttribute("position",new It(He,3)),f===".txt"){const O=new Gi({color:"#5B5C99",size:1,sizeAttenuation:!1});p=new Vs(Ke,O)}else if(f===".cpt"){const O=new Ri({color:"#5B5C99",linewidth:100});p=new Ba(Ke,O)}}else if(f===".obj"){const $=new ls;if(g&&g.length>0){const pe=new cs;for(const Ce of g){const Ke=await Ce.text(),He=pe.parse(Ke);He.preload(),$.setMaterials(He);break}}p=$.parse(v),(!g||g.length===0)&&p.traverse(pe=>{pe.isMesh&&(pe.material=new fn({color:"#B3B3D4"})),pe instanceof zt&&(pe.material.side=pn)})}break;case".stl":const b=await h.arrayBuffer(),F=new ji().parse(b),C=new fn({color:"#B3B3D4",side:pn});p=new zt(F,C);break;case".nc":const R=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],P={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},A=new Ln,E=R.map($=>new Promise((pe,Ce)=>{new ji().load(g0.value===""?`/model/${$}`:`${g0.value}\\${$}`,He=>{const O=new fn({color:P[$]||"#B3B3D4",side:pn}),_t=new zt(He,O);pe(_t)},void 0,Ce)}));try{(await Promise.all(E)).forEach(pe=>A.add(pe)),p=A}catch($){throw console.error("加载NC文件对应的STL文件失败:",$),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const L=new pu,B=new Ln;try{const $=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),pe=new Blob([$.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=await Pn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ke=new Blob([Ce.data],{type:"application/octet-stream;charset=UTF-8"}),He=await new Promise((_t,dt)=>{const at=URL.createObjectURL(pe);L.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=1,tt[Le*3+1]=0,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)}),O=await new Promise((_t,dt)=>{const at=URL.createObjectURL(Ke);L.load(at,Fe=>{const tt=new Float32Array(Fe.geometry.attributes.position.count*3);for(let Le=0;Le<Fe.geometry.attributes.position.count;Le++)tt[Le*3]=0,tt[Le*3+1]=1,tt[Le*3+2]=0;Fe.geometry.setAttribute("color",new mn(tt,3)),Fe.material.vertexColors=!0,Fe.scale.set(.3,.3,.3),URL.revokeObjectURL(at),_t(Fe)},void 0,dt)});B.add(He),B.add(O),p=B}catch($){throw console.error("PCD文件加载失败:",$),new Error("无法加载PCD文件")}break;case".urdf":const H=URL.createObjectURL(h),Q=new gc,ae="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",G={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},le=new Map,Z=new Map,ve=new Map,Ee=async $=>{if(le.has($))return console.log(`从缓存加载: ${$}`),le.get($);try{const pe=await Pn.axios.get(`${ae}/${$}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Ce=new Blob([pe.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&le.set($,Ce),Ce}catch(pe){throw console.error(`加载文件失败: ${$}`,pe),new Error(`无法加载文件: ${$}`)}},be=($="default")=>{if(Z.has($))return Z.get($);const pe=new fn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Qn});return Z.set($,pe),pe},ge=$=>{try{$.isBufferGeometry&&$.mergeVertices&&$.mergeVertices(),$.computeVertexNormals&&$.computeVertexNormals(),$.computeBoundingSphere&&$.computeBoundingSphere(),$.deleteAttribute&&$.deleteAttribute("uv2")}catch(pe){console.warn("几何体优化失败,使用原始几何体:",pe)}return $},se=async($,pe,Ce)=>{const Ke=`stl_${pe}`;if(ve.has(Ke)){const dt=ve.get(Ke);return new zt(dt,be())}const He=await $.arrayBuffer();let _t=new ji(Ce).parse(He);return _t=ge(_t),ve.set(Ke,_t),new zt(_t,be())},j=async($,pe,Ce)=>{const Ke=`obj_${pe}`;if(le.has(Ke))return le.get(Ke).clone();const He=await $.text(),O=new ls(Ce),_t=pe.replace(".obj",".mtl");try{const Fe=await(await Ee(_t)).text(),Le=new cs(Ce).parse(Fe);Le.preload(),O.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${_t}`)}const dt=O.parse(He);return dt.traverse(at=>{at.isMesh&&(at.geometry=ge(at.geometry),at.castShadow=!0,at.receiveShadow=!0,at.renderOrder=1)}),le.set(Ke,dt),dt},q=($,pe)=>{const Ce=new O0;if(Ce.addLevel($,0),$.geometry){const Ke=$.geometry.clone(),He=new zt(Ke,$.material);Ce.addLevel(He,50)}return Ce};let ne=0,ee=0;const ue=[];Q.loadMeshCb=async($,pe,Ce,Ke,He)=>{const O=$.split("/").pop(),_t=Ce||(()=>{});ne++;const dt=new Promise(async(at,Fe)=>{try{const tt=await Ee(O);if(!tt||tt.size===0)throw new Error(`文件为空: ${O}`);const Le=O.split(".").pop().toLowerCase();let ot;switch(Le){case"stl":ot=await se(tt,O,pe);break;case"obj":ot=await j(tt,O,pe);break;default:throw new Error(`不支持的文件格式: ${Le}`)}G.enableLOD&&ot.isMesh&&(ot=q(ot,O)),_t(ot),ee++,Ke&&Ke({loaded:ee,total:ne,progress:ee/ne}),at(ot)}catch(tt){console.error(`mesh文件加载失败: ${O}`,tt);const Le=new Ln;_t(Le),at(Le);const ot=new $i(.1,.1,.1),jt=new j0({color:16711680,wireframe:!0});return new zt(ot,jt)}});ue.push(dt)};try{if(!H){ma.value=void 0;break}if(p=await Q.loadAsync(H),console.log(`URDF文件加载完成,等待${ne}个mesh文件加载...`),ue.length>0)try{await Promise.allSettled(ue),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${ne}`)}catch(Ce){console.warn("部分mesh文件加载失败,但继续显示模型",Ce)}p.traverse(Ce=>{Ce.isMesh&&(Ce.castShadow=!0,Ce.receiveShadow=!0,Ce.renderOrder=1,Ce.material&&(Ce.material.needsUpdate=!0))}),console.time("计算包围盒");const $=new Fn;$.expandByObject(p);const pe=`urdf_${Date.now()}`;p.userData.boundingBox=$.clone(),p.userData.modelId=pe,_0.set(pe,{box:$.clone(),center:$.getCenter(new I),size:$.getSize(new I),maxSize:Math.max(...$.getSize(new I).toArray())}),ma.value=p,console.log("URDF模型加载完成并优化")}catch($){console.error("URDF加载失败:",$),ma.value=void 0}finally{H&&URL.revokeObjectURL(H)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return p};return{addModelsFromUrls:c,loadModelByDefaultPath:async u=>{console.log(u);try{t.value=!0,n.value="正在加载模型...";const{scene:h}=s();if(!h)throw new Error("Scene not initialized");i(),await new Promise(_=>setTimeout(_,100));const g=[];for(let _=0;_<u.length;_++){const p=u[_],f=await d(p.suffix,p.blob,p.mtlBlobs||[],p.meshFiles||[]);f&&(h.add(f),e.value.push(f),g.push(f))}return t.value=!1,n.value="",g}catch(h){throw console.error("加载模型失败:",h),t.value=!1,n.value="",h}},urdfModel:ma,modelBoundingBoxes:_0}}window._iconfont_svg_string_4634042='<svg><symbol id="icon-lookAround" viewBox="0 0 1041 1024"><path d="M520.685026 798.355937c-10.788594 0-21.577187-2.790872-31.241101-8.372615l-291.583615-168.36871A62.482203 62.482203 0 0 1 166.619208 567.505024V230.850913c0-22.368629 11.913273-42.987756 31.241102-54.109588l291.583615-168.36871a62.482203 62.482203 0 0 1 62.482203 0l291.583615 168.36871c19.327828 11.121832 31.241102 31.740959 31.241101 54.109588v336.654111a62.482203 62.482203 0 0 1-31.241101 54.109588l-291.583615 168.36871a62.857096 62.857096 0 0 1-31.241102 8.372615zM291.583615 531.39031l229.101411 132.295652 229.101412-132.295652v-264.507993l-229.101412-132.295651L291.583615 266.923972v264.466338z m520.685026 36.114714h0.416548-0.416548z" fill="#aaaaaa" ></path><path d="M520.685026 461.660172c-10.788594 0-21.577187-2.790872-31.241101-8.372616l-291.583615-168.327055a62.482203 62.482203 0 0 1 62.482203-108.219176L520.685026 326.990196l260.342513-150.248871a62.482203 62.482203 0 1 1 62.482204 108.219176l-291.583615 168.327055a62.857096 62.857096 0 0 1-31.241102 8.372616z" fill="#aaaaaa" ></path><path d="M520.685026 798.355937a62.482203 62.482203 0 0 1-62.482203-62.482203V399.177969a62.482203 62.482203 0 1 1 124.964406 0v336.695765a62.482203 62.482203 0 0 1-62.482203 62.482203z" fill="#aaaaaa" ></path><path d="M520.685026 1003.172599c-53.276492 0-520.685026-5.248505-520.685026-187.446609 0-62.982061 54.776065-111.259976 162.870276-143.584103 33.073913-9.622259 67.855673 8.914128 77.769516 41.98804s-8.872473 67.897327-41.946386 77.769516c-30.324696 9.080747-49.194321 17.619981-60.649392 24.11813 46.32014 26.242525 178.657446 62.19062 382.641012 62.19062s336.320872-35.948094 382.641012-62.19062c-11.455071-6.498149-30.324696-15.037384-60.649392-24.11813a62.482203 62.482203 0 1 1 35.82313-119.757556c108.094211 32.324126 162.870276 80.643697 162.870276 143.584103 0 182.198104-467.408534 187.446609-520.685026 187.446609z m398.886385-175.366717h0.416548-0.416548z" fill="#72B02D" ></path></symbol><symbol id="icon-xuanzhuan" viewBox="0 0 1024 1024"><path d="M378.963454 724.443778l91.182641 163.473426c6.246088 11.212239 2.252687 25.39393-9.010749 31.691216l-163.473427 91.18264c-18.123894 10.085896-39.422029-6.758062-33.739113-26.673866l72.290786-254.707264c5.682916-19.967002 32.663967-23.090045 42.749862-4.966152z" fill="#FC794B" ></path><path d="M414.64807 903.9932c-1.228739 0-2.40628-0.051197-3.635018-0.204789C169.002752 879.367232 0.000003 771.443028 0.000003 641.452727c0-52.221389 27.032248-102.19009 78.127293-144.581571a35.827969 35.827969 0 0 1 50.480676 4.710165 35.827969 35.827969 0 0 1-4.710164 50.480676C100.090998 571.824209 71.727616 603.310634 71.727616 641.452727c0 88.929954 148.984551 171.050647 346.504275 191.068847 19.711014 1.9967 34.046298 19.557422 32.049597 39.268436a35.879166 35.879166 0 0 1-35.633418 32.20319zM608.430381 904.095595c-18.175091 0-33.79031-13.772111-35.633418-32.254387-1.945503-19.711014 12.389781-37.271736 32.100795-39.217239 198.134093-19.813409 347.528224-101.985301 347.528223-191.171242 0-23.550822-10.649068-47.050447-31.58882-69.935703-13.362532-14.59127-12.389781-37.271736 2.20149-50.634268 14.59127-13.362532 37.271736-12.389781 50.634268 2.20149 32.971151 35.9918 50.429479 76.898555 50.429478 118.368481 0 130.297485-169.463527 238.221689-412.088195 262.489276-1.177541 0.102395-2.40628 0.153592-3.583821 0.153592z" fill="#FC794B" ></path><path d="M846.703267 184.413179l-325.308534 184.464377L196.137396 184.413179 521.394733 0z" fill="#BEC5CB" ></path><path d="M521.394733 737.703915l325.308534-184.41318V184.413179l-325.308534 184.464377z" fill="#808487" ></path><path d="M521.394733 737.703915L196.137396 553.290735V184.413179l325.257337 184.464377z" fill="#9CA3A9" ></path></symbol><symbol id="icon-clipping" viewBox="0 0 1024 1024"><path d="M341.930667 201.770667l353.706666 204.245333v408.448l-353.706666-204.245333z" fill="#4A80FF" fill-opacity="0.15" ></path><path d="M320.853333 165.248l396.117334 228.608v457.173333l-395.946667-228.608z m353.749334 252.970667L362.837333 238.336v359.722667l311.466667 179.882666z" fill="#72B02D" ></path><path d="M544.384 746.453333l-211.669333-211.669333 18.688-18.688 211.669333 211.669333z" fill="#72B02D" ></path><path d="M693.717333 530.261333l-266.453333-266.325333 20.906667-20.906667 266.325333 266.453334z" fill="#72B02D" ></path><path d="M688.853333 621.098667l-366.933333-366.933334 24.448-24.704 366.933333 366.933334z" fill="#72B02D" ></path><path d="M689.664 713.856L321.578667 345.770667l24.618666-24.618667 368.085334 368.128z" fill="#72B02D" ></path><path d="M683.605333 799.317333l-355.712-355.712 24.234667-24.234666 355.712 355.712z" fill="#72B02D" ></path><path d="M537.770667 944.938667h-51.2v-418.602667l-362.666667-209.28 25.6-44.330667 362.666667 209.066667 362.666666-209.066667 25.6 44.330667-362.666666 209.066667z" fill="#AAAAAA" ></path><path d="M512.170667 53.461333a31.146667 31.146667 0 0 1 15.488 4.266667l370.090666 213.632a31.232 31.232 0 0 1 15.317334 26.794667v426.922666a31.274667 31.274667 0 0 1-15.317334 26.837334l-369.834666 213.333333a31.488 31.488 0 0 1-31.061334 0l-369.834666-213.333333a31.146667 31.146667 0 0 1-15.914667-26.837334V298.069333a31.146667 31.146667 0 0 1 15.573333-27.008l369.792-213.333333a30.976 30.976 0 0 1 15.701334-4.266667z m349.866666 256l-349.866666-201.642666-349.866667 201.856v403.84l349.866667 201.813333 349.866666-201.898667z" fill="#AAAAAA" ></path></symbol><symbol id="icon-viewReset" viewBox="0 0 1024 1024"><path d="M643.2 515.2c-89.6-67.2-179.2-60.8-268.8 0-32 22.4-67.2 57.6-105.6 89.6 38.4 32 70.4 70.4 108.8 96 28.8 19.2 60.8 32 96 38.4 118.4 19.2 188.8-57.6 268.8-137.6-35.2-28.8-60.8-64-99.2-86.4zM508.8 704c-51.2 0-96-41.6-96-99.2s41.6-105.6 96-105.6 96 41.6 96 99.2c0 64-38.4 105.6-96 105.6z" fill="#AAAAAA" ></path><path d="M515.2 544c-3.2 41.6 12.8 60.8 51.2 51.2 0 32-19.2 57.6-51.2 57.6s-57.6-22.4-51.2-57.6c-6.4-32 16-51.2 51.2-51.2" fill="#AAAAAA" ></path><path d="M652.8 3.2c9.6-3.2 19.2-3.2 28.8 0 9.6 3.2 12.8 12.8 12.8 22.4v108.8c70.4 28.8 131.2 70.4 179.2 128 80 89.6 118.4 214.4 108.8 336-9.6 124.8-70.4 236.8-166.4 313.6-96 80-224 118.4-345.6 108.8-124.8-9.6-243.2-67.2-323.2-160S32 649.6 41.6 524.8c9.6-118.4 70.4-233.6 160-307.2 22.4-19.2 60.8-19.2 80 3.2 19.2 22.4 19.2 57.6-3.2 80-70.4 57.6-115.2 140.8-124.8 233.6s22.4 185.6 80 249.6c60.8 70.4 147.2 115.2 243.2 124.8 96 9.6 188.8-19.2 259.2-80s118.4-140.8 124.8-236.8c9.6-89.6-22.4-185.6-80-249.6-28.8-28.8-57.6-57.6-89.6-76.8v89.6c0 9.6-3.2 19.2-12.8 22.4-9.6 3.2-19.2 3.2-28.8 0l-227.2-160c-3.2-3.2-9.6-12.8-9.6-19.2 0-9.6 3.2-12.8 9.6-19.2L652.8 3.2z" fill="#72B02D" ></path></symbol><symbol id="icon-donghuafangzhen" viewBox="0 0 1024 1024"><path d="M868.864 228.864c-19.968 0-38.912 7.68-53.248 20.992l-291.328-170.496c-7.168-5.12-16.896-5.12-24.064 0L208.896 248.832c-14.336-12.8-33.28-20.48-53.76-20.48-43.52 0-79.872 36.864-79.872 80.896 0 33.792 21.504 63.488 53.248 74.24v318.976c0 9.216 4.608 17.408 12.288 22.016L437.248 896c11.776 30.72 41.472 51.712 74.752 52.224 33.28-0.512 62.464-20.992 74.752-52.224l296.448-171.52c7.68-4.608 12.288-13.312 12.288-22.016V386.048c31.744-11.776 53.248-42.496 53.248-76.288 0-44.032-36.352-80.896-79.872-80.896zM155.136 339.456c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 15.872-12.8 28.672-29.184 29.184zM512 897.024c-16.896 0-29.184-12.288-29.184-29.696 0-14.848 12.288-29.696 29.184-29.696h2.048c15.36 0.512 27.648 13.824 27.136 29.696 0 14.848-14.848 29.696-29.184 29.696z m74.752-58.368c-11.776-30.208-40.96-51.712-74.752-51.712-27.136 0-52.224 14.336-67.072 37.376l-3.072 1.024c-4.608 2.048-8.704 5.632-9.728 10.752l-252.416-146.944V384.512C212.48 373.76 234.496 343.04 235.52 308.736l3.072 0.512h2.048c3.584 0 7.168-1.536 10.24-3.584 7.168-5.632 8.192-16.384 2.048-23.552L512 130.56l278.528 162.816c-7.68 36.864 11.264 74.24 45.568 90.624 0.512 5.632 3.584 10.24 8.704 13.312v291.328l-258.048 150.016z m282.112-499.2c-16.896 0-29.184-12.288-29.184-29.696v-2.048c0.512-15.36 13.312-27.648 29.184-27.136h2.048c15.36 0.512 27.648 13.824 27.136 29.696v2.56c-1.024 14.848-13.824 27.136-29.184 26.624z" fill="#AAAAAA" ></path><path d="M422.912 724.992c-3.072-8.704-12.288-12.8-20.992-9.728-8.704 3.072-12.8 12.8-9.728 21.504l19.968 54.784c2.56 6.656 8.192 10.752 15.36 10.752 2.048 0 3.584-0.512 5.12-1.024 8.704-3.072 12.8-12.8 9.728-21.504l-19.456-54.784zM706.048 507.392c0-107.52-86.016-195.072-192-196.096-2.048-1.536-4.608-2.56-7.68-3.072l-24.064-3.072c-8.192-1.024-15.872 4.096-17.92 11.776-5.632 1.536-11.776 3.584-16.896 5.632 0.512-1.536 1.024-3.072 1.536-5.12 1.024-9.216-5.12-17.408-14.336-18.432l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.608 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l44.032 5.12C384 353.28 351.232 388.608 333.312 432.64c-25.088 60.928-17.92 130.048 18.432 184.832-1.024 3.584-1.024 7.168 0.512 10.24l19.968 54.784c1.024 3.072 3.072 5.632 6.144 7.68 7.168 5.12 17.408 3.072 22.528-4.096 3.072-4.608 3.584-10.24 2.048-15.36l-0.512-1.536c53.76 37.888 123.392 45.568 184.32 19.968 46.08-19.456 82.944-55.808 102.912-101.376l12.8-14.336c6.144-6.656 5.632-17.408-0.512-23.04 2.56-14.336 4.096-28.672 4.096-43.008z m-193.536 156.16C427.52 663.552 358.4 593.92 358.4 507.392c0-86.016 69.12-156.16 154.112-156.16s154.112 69.632 154.112 156.16c0 86.016-69.12 156.16-154.112 156.16z" fill="#72B02D" ></path><path d="M765.44 478.72c-6.144-5.632-15.872-5.632-22.016 0l-32.256 35.84c-4.096 4.608-5.632 11.776-3.072 17.92 2.56 6.144 8.192 9.728 14.848 9.728 4.608 0 8.704-2.048 11.776-5.12l32.256-35.84c5.12-7.168 4.608-16.896-1.536-22.528zM823.296 401.92c-5.632-1.024-11.776 0.512-15.872 5.12l-32.256 35.84c-4.608 4.608-5.632 11.776-3.072 17.92 1.024 2.048 2.56 4.096 4.096 5.632 6.656 6.144 16.896 5.632 23.04-1.536l32.256-35.84c4.096-4.096 5.632-10.752 3.584-16.384-1.024-5.632-5.632-9.728-11.776-10.752zM336.384 321.024c8.704 0 15.872-6.656 16.384-15.36 0.512-8.704-5.632-16.384-14.336-17.408l-48.128-5.632c-5.632-1.024-11.776 1.536-15.36 6.144-3.584 4.608-4.096 11.264-2.048 16.896 2.56 5.632 7.68 9.216 13.312 9.728l48.128 5.632h2.048z" fill="#72B02D" ></path></symbol><symbol id="icon-guanjianjiexi" viewBox="0 0 1024 1024"><path d="M298.496 200.704v83.456h-39.936v177.664h137.728V389.12h47.104v245.76h-47.104v-79.872H211.456c-10.752-3.584-54.272-14.336-54.272-57.856V280.064h-32.768V200.704h174.08m47.104-47.104H77.824v177.152h36.352v169.984c0 68.608 61.44 97.792 97.792 104.96H353.28v79.872h141.312V342.016H349.184v72.192h-43.52v-87.04h39.936V153.6zM627.712 389.12v79.872H812.544c10.752 3.584 54.272 14.336 54.272 54.272V740.352h32.768v83.456h-173.568v-83.456h39.936v-177.664h-137.728V634.88h-47.104V389.12h46.592m47.104-47.104h-141.312v340.48h141.312v-72.192h43.52v83.456h-39.936V870.4h267.776v-177.152h-36.352v-169.984c0-68.608-61.44-97.792-97.792-104.96H670.72V342.528h4.096z" fill="#AAAAAA" ></path></symbol><symbol id="icon-gongyishengcheng" viewBox="0 0 1024 1024"><path d="M889.344 391.68h29.696v-43.008h-208.896l1.024 45.056 28.16 3.072v20.992c55.808 5.632 108.032 28.672 150.016 66.56-0.512 0 0-92.672 0-92.672z m-366.592 102.912c13.312-13.312 27.648-24.576 43.008-34.816-2.048-70.144-5.632-153.088-8.704-179.712-5.632-48.64-34.816-204.288-226.816-202.752-191.488 1.536-223.744 164.864-230.912 207.36s-11.776 197.632-11.776 197.632h-24.576v43.008l208.896 1.024v-40.96h-24.064V316.928S245.76 230.912 335.36 231.424C424.448 232.448 415.232 327.68 414.72 327.68v313.856c4.608 0 6.144 77.824 50.176 144.896-13.312-32.256-20.48-67.072-20.48-102.912 0-71.168 27.648-138.24 78.336-188.928z" fill="#AAAAAA" ></path><path d="M75.264 601.6h31.232v281.088s41.984 29.184 141.824 0v-274.944l29.184-2.56v-44.032H75.264v40.448zM906.24 263.168h-29.184l1.024-188.416s-53.76-27.648-144.384 0l1.024 192-31.744 1.024V307.2h203.776l-0.512-44.032z" fill="#AAAAAA" ></path><path d="M934.912 627.712c-9.216-4.608-20.48-2.048-29.184 6.656l-21.504 21.504c-9.216 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l21.504-21.504c8.704-8.704 11.264-19.968 6.656-29.184-5.632-10.752-18.432-15.36-34.304-13.312-25.6 4.096-48.64 15.36-66.56 33.792-27.136 27.136-39.424 65.536-33.792 103.936l-178.176 178.176c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l178.176-178.176c37.888 6.144 76.288-6.656 103.936-33.792 17.92-17.92 29.696-41.472 33.792-66.56 2.048-15.872-2.56-28.672-13.312-34.304z m-9.728 30.72c-3.072 20.48-12.8 38.912-27.136 53.76-23.04 23.04-56.32 33.28-89.088 26.624l-6.144-1.536-186.88 186.88c-8.704 9.216-20.992 13.824-33.792 13.824s-24.576-5.12-33.792-13.824c-9.216-9.216-13.824-20.992-13.824-33.792s5.12-24.576 13.824-33.792l186.88-186.88-1.536-6.144c-6.656-32.256 3.072-65.536 26.624-89.088 14.848-14.848 33.28-24.064 53.76-27.136 1.536-0.512 3.072-0.512 4.608-0.512 2.56 0 4.608 0.512 5.12 1.024-0.512 0.512-1.024 1.536-2.048 2.56l-21.504 21.504c-13.312 13.312-20.992 31.232-20.992 50.176s7.168 36.864 20.992 50.176c13.312 13.312 31.232 20.992 50.176 20.992 18.944 0 36.864-7.168 50.176-20.992l21.504-21.504c1.024-1.024 2.048-1.536 2.56-2.048 0.512 1.536 1.024 4.608 0.512 9.728z" fill="#72B02D" ></path><path d="M560.64 870.912c-12.8 12.8-12.8 33.28 0 45.568 6.144 6.144 14.336 9.216 23.04 9.216s16.896-3.072 23.04-9.216c6.144-6.144 9.728-14.336 9.728-23.04 0-8.704-3.584-16.896-9.728-23.04-12.8-12.288-33.792-12.288-46.08 0.512z m28.672 28.672c-3.072 3.072-8.704 3.072-11.776 0-3.072-3.072-3.072-8.704 0-11.776 1.536-1.536 3.584-2.56 6.144-2.56 2.048 0 4.096 1.024 6.144 2.56 1.536 1.536 2.56 3.584 2.56 6.144-0.512 2.048-1.536 4.096-3.072 5.632z m225.28-107.008c-4.096-4.096-10.24-4.096-14.336 0l-43.52 43.52c-4.096 4.096-4.096 10.24 0 14.336l102.4 102.4c15.872 15.872 41.984 15.872 57.856 0 15.872-15.872 15.872-41.984 0-57.856l-102.4-102.4z m-237.056-150.528l70.656 70.656 28.672-28.672-70.656-70.656-15.872-30.208-50.688-36.352-28.672 28.672 36.352 50.688 30.208 15.872z" fill="#72B02D" ></path></symbol><symbol id="icon-mojupipei" viewBox="0 0 1024 1024"><path d="M880.64 117.248c32.768 0 58.88 23.04 64.512 54.784l1.024 7.68v663.04c0.512 31.744-22.528 58.368-53.76 62.464l-7.68 1.024H151.552c-34.816 0-66.048-22.528-72.192-53.248l-1.024-6.656V183.296c0-31.744 27.648-59.904 61.952-65.024l7.168-1.024h142.848c24.064 0 44.032 16.896 48.64 39.936l1.024 6.656V406.528c0 7.68 5.12 14.848 12.288 16.896l3.584 0.512H424.96c13.312 0 25.088 9.216 29.184 22.528 6.144 23.552 33.792 46.08 58.368 46.08 22.528 0 48.128-19.456 55.808-39.424l2.048-5.632c2.048-10.24 9.216-18.432 19.456-21.504l5.12-1.024 3.072-0.512h71.168c6.144 0 11.776-3.584 14.336-9.728l1.024-3.584V164.864c0-23.04 15.872-41.984 37.888-46.592l6.144-1.024H880.64zM273.92 184.32H151.552l-2.048 0.512-2.048 0.512-2.56 1.536-1.536 649.728 3.072 1.536 3.072 1.024h1.024l328.192 3.072 2.048-286.72-2.048-0.512-10.24-3.584c-24.576-10.24-45.568-27.136-60.928-49.152l-6.144-9.216 1.024-1.536H349.184c-37.888-4.096-68.608-33.792-74.24-71.68l-1.024-8.192v-4.096V184.32z m476.16-3.072V409.6l-0.512 8.704c-3.584 36.864-32.256 66.56-68.608 72.192l-8.192 1.024h-4.096l-45.568-1.536-6.144 9.728c-14.848 22.528-36.352 40.448-61.44 51.2l-10.752 4.096-3.072 284.16h337.408v-655.36l-129.024-2.56z" fill="#AAAAAA" ></path></symbol><symbol id="icon-buchangshezhi" viewBox="0 0 1024 1024"><path d="M792.576 75.264h-686.08c-17.408 0-31.232 13.824-31.232 31.232v686.08c0 17.408 13.824 31.232 31.232 31.232h436.736c17.408 0 31.232-13.824 31.232-31.232s-13.824-31.232-31.232-31.232H137.728V262.656h624.128v280.576c0 17.408 13.824 31.232 31.232 31.232s31.232-13.824 31.232-31.232V106.496c-0.512-17.408-14.336-31.232-31.744-31.232z" fill="#AAAAAA" ></path><path d="M792.576 948.736c-17.408 0-31.232-13.824-31.232-31.232v-93.696h-93.696c-17.408 0-31.232-13.824-31.232-31.232 0-17.408 13.824-31.232 31.232-31.232h93.696v-93.696c0-17.408 13.824-31.232 31.232-31.232 17.408 0 31.232 13.824 31.232 31.232v93.696h93.696c17.408 0 31.232 13.824 31.232 31.232 0 17.408-13.824 31.232-31.232 31.232h-93.696v93.696c0 17.408-13.824 31.232-31.232 31.232z" fill="#72B02D" ></path><path d="M372.224 518.144l-110.08 110.08c-20.992 20.992-20.992 55.296 0 76.288s55.296 20.992 76.288 0l110.08-110.08c-16.896-6.144-32.768-15.872-46.592-29.696-13.824-13.312-23.552-29.696-29.696-46.592z m-57.856 162.304c-7.68 7.68-20.48 7.68-28.672 0-7.68-7.68-7.68-20.48 0-28.672 7.68-7.68 20.48-7.68 28.672 0 7.68 8.192 7.68 20.992 0 28.672z m340.48-292.864L592.384 450.56c-20.992 20.992-55.296 20.992-76.288 0s-20.992-55.296 0-76.288l62.976-62.976c-51.712-8.704-116.224 14.848-151.552 50.176-49.152 49.152-49.152 128.512 0 177.664s129.024 49.152 177.664 0c35.328-35.328 58.368-99.84 49.664-151.552z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shuchujiagongchengxu" viewBox="0 0 1024 1024"><path d="M876.544 473.6v374.272c0 16.384-13.312 29.696-29.696 29.696h-522.24c-16.384 0-29.696-13.312-29.696-29.696V503.296c0-16.384 13.312-29.696 29.696-29.696h551.936m40.96-70.656H253.952c-16.384 0-29.696 13.312-29.696 29.696v486.4c0 16.384 13.312 29.696 29.696 29.696h663.552c16.384 0 29.696-13.312 29.696-29.696v-486.4c0-16.384-13.312-29.696-29.696-29.696z" fill="#AAAAAA" ></path><path d="M489.984 211.968H814.08l-41.984-41.984c-13.824-13.824-13.824-36.352 0-50.176 13.824-13.824 36.352-13.824 50.176 0L947.712 245.76l-0.512 0.512 0.512 0.512-125.952 125.952c-13.824 13.824-36.352 13.824-50.176 0-13.824-13.824-13.824-36.352 0-50.176l38.912-38.912H489.472c-19.456 0-35.328-15.872-35.328-35.328 0.512-20.48 16.384-36.352 35.84-36.352z" fill="#72B02D" ></path><path d="M531.456 717.824c0-11.776-7.68-22.016-18.944-25.6l-55.808-16.896-14.848-4.608 14.848-4.608 55.808-16.896c11.264-3.584 18.944-13.824 18.944-25.6v-2.048c0-18.432-17.92-31.232-35.328-25.088L363.52 641.024c-10.752 3.584-17.92 13.824-17.92 25.088v8.192c0 11.264 7.168 21.504 17.92 25.088l132.608 45.568c17.408 6.144 35.328-7.168 35.328-25.088v-2.048z m123.392-96.768v2.048c0 11.776 7.68 22.016 18.944 25.6l56.32 16.896 14.848 4.608-14.848 4.608-56.32 16.896c-11.264 3.584-18.944 13.824-18.944 25.6v2.56c0 18.432 17.92 31.232 35.328 25.088l132.608-45.568c10.752-3.584 17.92-13.824 17.92-25.088v-8.192c0-11.264-7.168-21.504-17.92-25.088l-132.608-45.568c-17.408-6.144-35.328 7.168-35.328 25.6z m-54.784-64l-70.144 248.32c-4.608 16.896 8.192 33.792 25.6 33.792 11.776 0 22.528-8.192 25.6-19.456l70.144-248.32c4.608-16.896-8.192-33.792-25.6-33.792-11.776 0-22.016 8.192-25.6 19.456zM147.456 814.08V173.056c0-14.848 11.776-26.624 26.624-26.624h463.872c19.456 0 35.328-15.872 35.328-35.328 0-19.456-15.872-35.328-35.328-35.328H107.008c-16.896 0-30.72 13.824-30.72 30.72v748.032c0 16.896 13.824 30.72 30.72 30.72h40.448c19.456 0 35.328-15.872 35.328-35.328 0.512-19.968-15.36-35.84-35.328-35.84z" fill="#AAAAAA" ></path></symbol><symbol id="icon-guanjiekongzhi" viewBox="0 0 1024 1024"><path d="M648.192 377.344h-71.68c-18.432 0-33.792-14.848-33.792-33.792H366.592c12.288-30.72 25.088-80.896 0-134.656H542.72c0-18.432 15.36-33.792 33.792-33.792h67.584c1.536 0 2.56 0 4.096 0.512L719.36 87.04c10.752-13.312 29.184-16.384 44.032-7.68l168.96 100.864c15.872 9.728 20.992 30.208 11.776 46.08-9.728 15.872-30.208 20.992-46.592 11.264l-143.872-85.504L677.888 245.76v61.44l75.776 93.696 143.872-85.504c15.872-9.728 36.864-4.608 46.592 11.776 9.728 15.872 4.608 36.352-11.264 46.08h-0.512l-168.96 100.864c-14.336 8.704-33.28 5.12-44.032-7.68l-71.168-89.088zM319.488 780.8L102.912 415.744c76.8 69.632 185.344 48.64 231.424-13.312l222.72 378.368H711.68c18.432 0 33.792 14.848 33.792 33.792v100.864c0 18.432-15.36 33.792-33.792 33.792H170.496c-18.432 0-33.792-14.848-33.792-33.792v-100.864c0-18.432 15.36-33.792 33.792-33.792h148.992z" fill="#AAAAAA" ></path><path d="M204.288 148.48C133.12 148.48 75.264 205.824 75.264 276.48S133.12 404.48 204.288 404.48c71.168 0 129.024-57.344 129.024-128S275.456 148.48 204.288 148.48z m0 202.752c-41.472 0-74.752-33.28-74.752-74.752 0-40.96 33.792-74.24 74.752-74.24C245.76 202.24 279.04 235.52 279.04 276.48c0 41.472-33.792 75.264-74.752 74.752z" fill="#72B02D" ></path></symbol><symbol id="icon-jiegoushu" viewBox="0 0 1024 1024"><path d="M233.984 472.064h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44v238.08h317.44c0-44.032 35.328-79.36 79.36-79.36h238.08c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-238.08c-44.032 0-79.36-35.328-79.36-79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V233.984h-39.936c-22.016 0-39.936-17.92-39.936-39.936V115.2c0-22.016 17.92-39.936 39.936-39.936h158.72c22.016 0 39.936 17.92 39.936 39.936V194.56c0 22.016-17.92 39.936-39.936 39.936h-39.936v237.568z" fill="#AAAAAA" ></path><path d="M551.936 75.264h317.44c44.032 0 79.36 35.328 79.36 79.36v79.36c0 44.032-35.328 79.36-79.36 79.36h-317.44c-44.032 0-79.36-35.328-79.36-79.36V154.624c-0.512-44.032 35.328-79.36 79.36-79.36z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaitui" viewBox="0 0 1024 1024"><path d="M512 148.992c199.68 0 361.984 162.304 361.984 361.984S711.68 872.448 512 872.448s-361.984-162.304-361.984-361.984S312.32 148.992 512 148.992m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M670.72 456.192v109.056l-75.264-54.784L670.72 456.192m25.6-102.912c-10.24 0-20.992 3.072-30.208 10.24l-144.896 105.472c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-52.224-52.224z" fill="#72B02D" ></path><path d="M499.712 456.192v109.056L424.96 510.976l74.752-54.784m26.112-102.912c-10.24 0-20.992 3.072-30.208 10.24L350.208 468.992c-28.672 20.48-28.672 62.976 0 83.968l144.896 105.472c9.216 6.656 19.968 10.24 30.208 10.24 27.136 0 52.224-21.504 52.224-51.712V405.504c0-30.72-25.088-52.224-51.712-52.224z" fill="#72B02D" ></path><path d="M314.368 381.44c-21.504 0-38.912 17.408-38.912 38.912v181.248c0 21.504 17.408 38.912 38.912 38.912s38.912-17.408 38.912-38.912V420.352c0-21.504-17.408-38.912-38.912-38.912z" fill="#72B02D" ></path></symbol><symbol id="icon-bofang" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M491.008 445.952l115.712 66.048-115.712 66.048V445.952m-23.552-87.04c-24.576 0-46.592 19.456-46.592 46.592v212.48c0 27.136 22.528 46.592 46.592 46.592 7.68 0 15.36-2.048 23.04-6.144l185.856-106.496c31.232-17.92 31.232-62.976 0-80.896L490.496 365.056c-7.168-4.096-15.36-6.144-23.04-6.144z" fill="#72B02D" ></path></symbol><symbol id="icon-kuaijin" viewBox="0 0 1024 1024"><path d="M515.584 151.04c199.168 0 360.96 161.792 360.96 360.96s-161.792 360.96-360.96 360.96-360.96-161.792-360.96-360.96 161.792-360.96 360.96-360.96m0-74.752c-240.64 0-435.712 195.072-435.712 435.712s195.072 435.712 435.712 435.712 435.712-195.072 435.712-435.712-195.072-435.712-435.712-435.712z" fill="#AAAAAA" ></path><path d="M358.912 458.24L433.152 512l-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432L363.52 366.592c-9.216-6.656-19.456-9.728-29.696-9.728z" fill="#72B02D" ></path><path d="M527.36 458.24l74.24 53.76-74.24 53.76v-107.52m-25.088-101.376c-26.624 0-51.2 20.992-51.2 51.2v207.872c0 30.208 24.576 51.2 51.2 51.2 10.24 0 20.48-3.072 29.696-9.728l142.848-103.936c28.16-20.48 28.16-61.952 0-82.432l-142.848-103.936c-9.216-7.168-19.968-10.24-29.696-10.24z" fill="#72B02D" ></path><path d="M710.144 384.512c-20.992 0-38.4 17.408-38.4 38.4v178.688c0 20.992 17.408 38.4 38.4 38.4s38.4-17.408 38.4-38.4V422.912c0-21.504-17.408-38.4-38.4-38.4z" fill="#72B02D" ></path></symbol><symbol id="icon-zanting" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M416.768 353.28c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c-0.512-21.504-17.92-39.424-39.936-39.424z m190.464 0c-22.016 0-39.936 17.92-39.936 39.936v238.08c0 22.016 17.92 39.936 39.936 39.936s39.936-17.92 39.936-39.936V392.704c0-21.504-17.92-39.424-39.936-39.424z" fill="#72B02D" ></path></symbol><symbol id="icon-zhongzhi" viewBox="0 0 1024 1024"><path d="M512 150.016c199.68 0 361.984 162.304 361.984 361.984S711.68 873.984 512 873.984 150.016 711.68 150.016 512 312.32 150.016 512 150.016m0-74.752c-241.152 0-436.736 195.584-436.736 436.736s195.584 436.736 436.736 436.736 436.736-195.584 436.736-436.736-195.584-436.736-436.736-436.736z" fill="#AAAAAA" ></path><path d="M580.096 421.376c12.288 0 22.528 10.24 22.528 22.528v136.192c0 12.288-10.24 22.528-22.528 22.528H443.904c-12.288 0-22.528-10.24-22.528-22.528V443.904c0-12.288 10.24-22.528 22.528-22.528h136.192m0-68.096H443.904C393.728 353.28 353.28 393.728 353.28 443.904v136.192c0 50.176 40.448 90.624 90.624 90.624h136.192c50.176 0 90.624-40.448 90.624-90.624V443.904c0-50.176-40.448-90.624-90.624-90.624z" fill="#72B02D" ></path></symbol><symbol id="icon-suoxiao" viewBox="0 0 1024 1024"><path d="M491.008 463.36c32.256 0 58.88-26.112 58.88-58.88s-26.112-58.88-58.88-58.88H285.696c-32.256 0-58.88 26.112-58.88 58.88s26.112 58.88 58.88 58.88h205.312z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848 13.312 0 26.112-5.12 36.352-14.848 19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangda" viewBox="0 0 1024 1024"><path d="M488.96 333.824h-47.104V286.72c0-34.816-28.16-62.976-62.976-62.976-34.816 0-62.976 28.16-62.976 62.976v47.104h-47.104c-34.816 0-62.976 28.16-62.976 62.976s28.16 62.976 62.976 62.976h47.104V506.88c0 34.816 28.16 62.976 62.976 62.976 34.816 0 62.976-28.16 62.976-62.976v-47.104h47.104c34.816 0 62.976-28.16 62.976-62.976 0-34.304-28.16-62.976-62.976-62.976z" fill="#72B02D" ></path><path d="M810.496 720.384l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 143.36-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.104-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-97.28 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M811.008 106.496h-109.056V209.92h109.056c29.696 0 53.76 24.064 53.76 53.76v81.408H967.68v-81.92c0-86.016-70.144-156.672-156.672-156.672zM864.768 791.552c0 29.696-24.064 53.76-53.76 53.76h-109.056v102.912h109.056c86.528 0 156.672-70.144 156.672-156.672v-81.92h-102.912v81.92z m-690.176 0v-81.92H71.68v81.92c0 86.528 70.144 156.672 156.672 156.672h109.056v-102.912H228.352c-29.696 0-53.76-24.064-53.76-53.76z" fill="#AAAAAA" ></path></symbol><symbol id="icon-fangdazhichuangkou" viewBox="0 0 1024 1024"><path d="M949.248 858.624l-158.208-158.208c29.184-48.128 46.08-104.96 46.08-165.376 0-175.616-142.848-318.976-318.976-318.976s-318.976 142.848-318.976 318.976 142.848 318.976 318.976 318.976c78.336 0 150.016-28.16 205.824-75.264l152.576 152.576c10.24 10.24 23.04 14.848 36.352 14.848s26.112-5.12 36.352-14.848c19.968-19.968 19.968-52.736 0-72.704z m-431.616-107.52c-119.296 0-216.064-96.768-216.064-216.064 0-119.296 96.768-216.064 216.064-216.064s216.064 96.768 216.064 216.064c0 119.296-96.768 216.064-216.064 216.064z" fill="#72B02D" ></path><path d="M216.576 919.04h109.056v-102.912H216.576c-29.696 0-53.76-24.064-53.76-53.76V233.984c0-29.696 24.064-53.76 53.76-53.76H798.72c29.696 0 53.76 24.064 53.76 53.76v81.92h102.912v-81.92c0-86.528-70.144-156.672-156.672-156.672H216.576c-86.528 0-156.672 70.144-156.672 156.672v528.384c0 86.528 70.144 156.672 156.672 156.672z" fill="#AAAAAA" ></path></symbol><symbol id="icon-shiyingpingmu" viewBox="0 0 1024 1024"><path d="M876.032 75.264H147.968c-39.936 0-72.704 32.768-72.704 72.704v728.064c0 39.936 32.768 72.704 72.704 72.704h728.064c39.936 0 72.704-32.768 72.704-72.704V147.968c0-39.936-32.768-72.704-72.704-72.704z m0 764.416c0 22.016-14.336 36.352-36.352 36.352H184.32c-22.016 0-36.352-14.336-36.352-36.352V184.32c0-22.016 14.336-36.352 36.352-36.352h655.36c22.016 0 36.352 14.336 36.352 36.352v655.36z" fill="#AAAAAA" ></path><path d="M329.728 184.32H220.672c-3.584 0-10.752 0-14.336 3.584-7.168 3.584-14.336 10.752-18.432 18.432-3.584 3.584-3.584 10.752-3.584 14.336v109.056c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352v-22.016l47.104 47.104c7.168 7.168 14.336 10.752 25.6 10.752 10.752 0 18.432-3.584 25.6-10.752 14.336-14.336 14.336-36.352 0-51.2l-47.104-47.104h22.016c22.016 0 36.352-14.336 36.352-36.352 0-21.504-14.848-35.84-36.864-35.84zM329.728 766.976h-22.016l47.104-47.104c14.336-14.336 14.336-36.352 0-51.2-14.336-14.336-36.352-14.336-51.2 0l-47.104 47.104v-22.016c0-22.016-14.336-36.352-36.352-36.352s-36.352 14.336-36.352 36.352v109.056c0 3.584 0 10.752 3.584 14.336 3.584 7.168 10.752 14.336 18.432 18.432 3.584 3.584 10.752 3.584 14.336 3.584h109.056c22.016 0 36.352-14.336 36.352-36.352s-13.824-35.84-35.84-35.84zM817.664 187.904c-3.584-3.584-10.752-3.584-14.336-3.584h-109.056c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h22.016l-47.104 47.104c-14.336 14.336-14.336 36.352 0 51.2 7.168 7.168 14.336 10.752 25.6 10.752s18.432-3.584 25.6-10.752l47.104-47.104v22.016c0 22.016 14.336 36.352 36.352 36.352s36.352-14.336 36.352-36.352V220.672c0-3.584 0-10.752-3.584-14.336-4.096-7.68-11.264-14.848-18.944-18.432zM803.328 657.408c-22.016 0-36.352 14.336-36.352 36.352v22.016l-47.104-47.104c-14.336-14.336-36.352-14.336-51.2 0-14.336 14.336-14.336 36.352 0 51.2l47.104 47.104h-22.016c-22.016 0-36.352 14.336-36.352 36.352s14.336 36.352 36.352 36.352h109.056c3.584 0 10.752 0 14.336-3.584 7.168-3.584 14.336-10.752 18.432-18.432 3.584-3.584 3.584-10.752 3.584-14.336v-109.056c0.512-22.016-13.824-36.864-35.84-36.864z" fill="#72B02D" ></path></symbol><symbol id="icon-yangshitu-01" viewBox="0 0 1024 1024"><path d="M645.632 882.688H150.528l252.928-204.8 477.696 0.512z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512z m-542.72 23.552H880.64l-234.496 203.264-228.864 0.512V140.8z m0 247.296l217.088-0.512-1.024 247.296H417.28V388.096z m-43.008-223.744v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m532.48 493.568H150.528l252.928-204.288 477.696 0.512-235.52 203.776z m271.36-247.808h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-zuoshitu-01" viewBox="0 0 1024 1024"><path d="M374.272 644.096l-262.656 211.968L112.64 373.76l261.632-209.408z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM112.64 373.76l261.632-209.408v479.744l-263.168 211.968L112.64 373.76z m520.192 507.904l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-qianshitu-01" viewBox="0 0 1024 1024"><path d="M112.64 389.12h520.704v493.056H112.64z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m259.584 717.824H112.64V389.12h520.704v493.056z m12.288-537.6l-228.864 0.512V140.8H880.64l-234.496 203.776z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-youshitu-01" viewBox="0 0 1024 1024"><path d="M916.992 659.456l-239.616 196.096V375.808l239.616-208.896z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-228.864 0.512V140.8H880.64l-234.496 203.776z m270.848 314.88l-239.104 196.096V375.808l239.104-208.896v492.544z" fill="#AAAAAA" ></path></symbol><symbol id="icon-houshitu-01" viewBox="0 0 1024 1024"><path d="M960 118.784V117.76v-1.024-1.024-1.024-0.512-0.512c1.536 7.68-1.024 15.872-6.656 20.992L677.376 373.76v299.52h-43.008V389.12H374.272v254.976l-262.656 211.968L112.64 389.12l261.632-0.512v-42.496h269.824l280.064-243.2c3.072-2.56 6.656-4.096 10.752-5.12H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c-0.512 0.512-0.512 1.024-1.024 2.048 0 0.512 0 0.512-0.512 1.024 0 0.512 0 0.512-0.512 1.024 0 0.512 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V907.264c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024c0 0.512 0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024s0 0.512 0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-242.176 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V658.944v-2.048V118.272c1.536 1.024 1.536 1.024 1.536 0.512zM374.272 164.352v180.736l-225.792 1.024 225.792-181.76z m258.56 717.312l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m44.544-26.112v-177.664H880.64l-203.264 177.664z m281.6-741.376v-0.512-0.512 1.024z" fill="#AAAAAA" ></path><path d="M916.992 634.88h-239.616V375.808l239.616-211.456zM644.096 346.112H417.28V141.824h462.336zM417.28 389.12H634.88v245.76H417.28z" fill="#72B02D" ></path><path d="M958.976 114.176c0 0.512 0.512 0.512 0 0z m-20.48-16.384H945.152l0.512 0.512 0.512 0.512h1.024l0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512 0.512c0 0.512 0.512 0.512 0.512 1.024s0 0.512 0.512 0.512c0 0.512 0.512 1.024 0.512 1.536 0 0.512 0.512 1.024 0.512 1.024-3.072-10.24-13.312-16.896-24.064-14.848h4.608v1.024z" fill="#C1272D" ></path></symbol><symbol id="icon-dingshitu-01" viewBox="0 0 1024 1024"><path d="M880.64 140.8l-234.496 203.776-497.664 1.536 256-206.336z" fill="#72B02D" ></path><path d="M960 117.248v-1.024-1.024-0.512-1.024-0.512c0-0.512-0.512-1.024-0.512-1.536l-0.512-1.536s0-0.512-0.512-0.512-0.512-0.512-0.512-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024l-0.512-0.512-1.024-0.512H393.216c-5.12 0-9.728 1.536-13.312 4.608L72.192 350.72l-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536l0.512 0.512c0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024-0.512 0.512-0.512 1.024 0 0.512-0.512 1.024c0 0.512 0 1.024-0.512 1.536v0.512l-0.512 2.048V907.776c0 0.512 0 1.536 0.512 2.048v1.024c0 0.512 0 0.512 0.512 1.024s0 0.512 0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.536l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512l1.024 1.024 0.512 0.512 1.024 1.024 0.512 0.512 1.536 1.536c0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512 1.024 0.512 0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512l1.024 0.512H655.872c7.68 0 14.848-4.096 18.432-10.752l276.992-241.664 1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.536 0-0.512 0.512-1.024 0.512-1.536v-0.512V660.992v-2.048V117.76c1.024 0 1.024 0 1.024-0.512zM113.152 389.12l261.632-0.512v256l-263.168 211.968 1.536-467.456z m519.68 492.544l-482.304 1.536 252.928-204.8h230.4l-1.024 203.264z m1.024-246.784H417.28V388.096l217.088-0.512-0.512 247.296z m12.288-290.304l-497.664 1.536 256-205.824 476.16 1.024-234.496 203.264z m31.232 510.976v-177.664H880.64l-203.264 177.664z m239.616-220.672h-239.104V375.808l239.104-208.896V634.88z" fill="#AAAAAA" ></path></symbol><symbol id="icon-toushitu-01" viewBox="0 0 1024 1024"><path d="M965.632 114.176V112.64v-1.024-0.512-1.024-0.512s0-0.512-0.512-1.024v-0.512c-0.512-1.024-0.512-2.048-1.024-3.072v-0.512c0-0.512-0.512-0.512-0.512-1.024s0-0.512-0.512-0.512l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512s-0.512-1.024-1.024-1.024l-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512-0.512h-1.024s-0.512 0-0.512-0.512c0 0-0.512 0-0.512-0.512H950.784h-0.512H392.704c-5.12 0-9.728 1.536-13.312 4.608l-312.32 251.392-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024-0.512 0.512-1.024 1.024s0 0.512-0.512 0.512c-0.512 0.512-0.512 1.024-1.024 1.536 0 0 0 0.512-0.512 0.512 0 0.512-0.512 0.512-0.512 1.024s0 0.512-0.512 1.024c0 0.512 0 0.512-0.512 1.024s0 0.512 0 1.024 0 1.024-0.512 1.536v0.512c0 0.512 0 1.024-0.512 1.536V912.896c0 0.512 0 1.024 0.512 2.048v0.512s0 0.512 0.512 1.024l0.512 1.024v1.024s0 0.512 0.512 1.024c0 0.512 0.512 1.024 0.512 1.024l0.512 0.512c0.512 0.512 0.512 1.024 1.024 1.536 0 0 0 0.512 0.512 0.512 0 0.512 0.512 0.512 1.024 1.024l0.512 0.512 1.024 1.024 0.512 0.512c0.512 0.512 1.024 1.024 1.536 1.024 0.512 0.512 1.024 0.512 1.536 1.024l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 0.512 0.512 1.024 0.512l0.512 0.512c0.512 0 1.024 0.512 1.536 0.512h0.512c0.512 0 1.024 0 1.024 0.512h583.168c7.68 0 14.848-4.096 18.432-10.752L957.44 675.84l1.024-1.024 1.024-1.024 0.512-0.512 1.024-1.024 1.024-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024v-0.512c0-0.512 0.512-0.512 0.512-1.024v-0.512c0-0.512 0.512-1.024 0.512-1.024 0-0.512 0.512-1.024 0.512-1.536v-0.512V661.504v-1.536V658.432l1.024-544.256zM372.736 343.04l-229.888 0.512L372.736 158.72v184.32z m43.008 43.008l220.672-0.512-0.512 251.392h-220.16v-250.88z m-43.008 0v260.096l-267.264 215.552 1.536-474.624 265.728-1.024z m-227.84 502.272l257.024-208.384h233.984l-0.512 206.848-490.496 1.536z m503.296-545.792l-172.544 0.512H415.232V135.68h471.04l-238.08 206.848z m31.232 337.408h207.36l-207.36 181.248v-181.248z m0-43.008V373.76l243.2-212.48v475.648h-243.2z" fill="#AAAAAA" ></path></symbol><symbol id="icon-a-jixiebi3" viewBox="0 0 1024 1024"><path d="M483.386004 821.695719H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M483.386004 776.399147H164.779715l29.075502 22.648286h260.455285l29.075502-22.648286z" fill="#7A807D" ></path><path d="M483.386004 776.399147H164.779715l29.075502-22.648285h260.455285l29.075502 22.648285z" fill="#3F3F3F" ></path><path d="M483.386004 730.796518H164.779715l29.075502 22.954344h260.455285l29.075502-22.954344zM483.386004 685.499947H164.779715l29.075502 22.648285h260.455285l29.075502-22.648285z" fill="#7A807D" ></path><path d="M483.386004 730.796518H164.779715l29.075502-22.648286h260.455285l29.075502 22.648286z" fill="#3F3F3F" ></path><path d="M150.701051 623.064132h339.418227v62.435815H150.701051z" fill="#F7A53F" ></path><path d="M150.701051 821.695719h339.418227v31.217907H150.701051z" fill="#FFFFFF" ></path><path d="M607.951575 339.654504a74.984189 74.984189 0 0 1-23.872517 103.447575 75.290247 75.290247 0 0 1-103.753633-23.872518L293.324039 120.823095A75.290247 75.290247 0 0 1 317.196557 17.069462a75.290247 75.290247 0 0 1 103.753633 23.872517zM441.762128 517.474152v105.58998H198.752144v-105.58998a122.423166 122.423166 0 1 1 244.846331 0z" fill="#FFC200" ></path><path d="M627.233224 377.605685a103.141517 103.141517 0 0 1-52.948019 82.635637l-165.88339 118.750471-2.448463 1.836347a112.93537 112.93537 0 1 1-112.017197-194.346775l195.571007-84.471985a132.523077 132.523077 0 0 1 48.357151-12.854432A89.062853 89.062853 0 0 1 627.233224 377.605685z" fill="#FFE610" ></path><path d="M401.056425 493.601635a71.005436 71.005436 0 1 1-71.005436-71.311494 71.005436 71.005436 0 0 1 71.005436 71.311494z" fill="#FFFFFF" ></path><path d="M375.34756 493.601635a45.296571 45.296571 0 1 1-45.296571-45.60263 45.296571 45.296571 0 0 1 45.296571 45.60263z" fill="#48B8BF" ></path><path d="M592.342622 376.381453a49.88744 49.88744 0 1 1-49.581382-49.88744 49.88744 49.88744 0 0 1 49.581382 49.88744z" fill="#FFFFFF" ></path><path d="M574.285205 376.381453a30.605791 30.605791 0 1 1-30.605792-30.605791 30.605791 30.605791 0 0 1 30.605792 30.605791z" fill="#48B8BF" ></path><path d="M731.048068 230.789704l165.975207-62.099151 18.883774 50.46895-165.975207 62.068545z" fill="#FFE610" ></path><path d="M734.047436 202.785404l145.836596-54.294674 9.426584 25.31099-145.867202 54.294674z" fill="#F7A53F" ></path><path d="M808.419509 259.161272l23.872517 63.353988 31.523966 35.808776-19.893765 18.057417-48.051092-38.257239-27.851271-63.660046 40.399645-15.302896zM854.940312 242.022029l23.56646 63.04793-0.306058 47.745035 26.627038 0.612116 11.324143-60.293409-20.811938-66.414568-40.399645 15.302896zM716.173654 94.379691l102.345766-38.257239 37.216643 99.468822-102.345767 38.257239z" fill="#7A807D" ></path><path d="M841.473764 83.790087a66.108509 66.108509 0 0 1-65.802452 66.10851l-407.669142 15.608953a67.944857 67.944857 0 0 1-11.324142 0 82.635637 82.635637 0 0 1 0-165.271273 67.944857 67.944857 0 0 1 11.324142 0l407.669142 17.445301A66.108509 66.108509 0 0 1 841.473764 83.790087z" fill="#FFE610" ></path><path d="M402.892773 83.790087a46.520803 46.520803 0 1 1-46.520803-46.214745A46.520803 46.520803 0 0 1 402.892773 83.790087z" fill="#FFFFFF" ></path><path d="M386.059587 83.790087a30.605791 30.605791 0 1 1-30.605791-30.605791 30.605791 30.605791 0 0 1 30.605791 30.605791z" fill="#48B8BF" ></path><path d="M810.867972 83.790087a38.257239 38.257239 0 1 1-39.787528-38.257239A38.257239 38.257239 0 0 1 810.867972 83.790087z" fill="#FFFFFF" ></path><path d="M795.565077 83.790087a24.484633 24.484633 0 1 1-24.484633-24.484633 24.484633 24.484633 0 0 1 24.484633 24.484633z" fill="#48B8BF" ></path><path d="M106.93477 852.913626h639.66104v171.086374H106.93477z" fill="#FFE610" ></path><path d="M383.305066 709.678522h337.275822v207.201208H383.305066z" fill="#4D4D4D" ></path><path d="M407.177584 732.02075h291.061076v161.904636H407.177584z" fill="#FFFFFF" ></path><path d="M429.825869 755.893267h159.150116v16.22107h-159.150116zM429.825869 784.356653h131.604903v16.22107h-131.604903zM429.825869 812.820039h199.855818v16.22107h-199.855818zM429.825869 841.283425h146.601741v16.22107h-146.601741z" fill="#92D5D2" ></path><path d="M507.564579 732.326808l-31.830023 161.904636H407.177584v-161.904636h100.386995z" fill="#F5F5F5" opacity=".5" ></path><path d="M474.816383 916.87973h155.783478v31.830023h-155.783478z" fill="#7A807D" ></path><path d="M106.93477 977.173139h639.66104v46.826861H106.93477z" fill="#F7A53F" ></path><path d="M252.006221 899.740487h66.414567v48.969266H252.006221z" fill="#7A807D" ></path><path d="M319.64502 817.716966l-3.672695 11.324143-21.730112 70.699378h-21.730112l23.872518-76.820537 3.366637-11.324143 19.893764 6.121159z" fill="#999999" ></path><path d="M341.069074 809.147344A28.463386 28.463386 0 1 1 321.17531 773.950684a28.463386 28.463386 0 0 1 19.893764 35.19666z" fill="#48B8BF" ></path><path d="M322.705599 793.538391a13.16049 13.16049 0 1 1-26.014923 0 13.16049 13.16049 0 0 1 26.014923 0z" fill="#FFFFFF" ></path><path d="M165.085773 899.740487h66.414568v49.275324H165.085773z" fill="#7A807D" ></path><path d="M163.861542 817.716966l3.366637 11.324143 22.03617 70.699378h21.730111l-23.872517-76.820537-3.672695-11.324143-19.587706 6.121159z" fill="#999999" ></path><path d="M142.437488 809.147344a28.157328 28.157328 0 1 0 18.669532-35.19666 28.157328 28.157328 0 0 0-18.669532 35.19666z" fill="#F7A53F" ></path><path d="M160.800963 793.538391a13.16049 13.16049 0 1 0 12.854432-12.854433 12.854432 12.854432 0 0 0-12.854432 12.854433z" fill="#FFFFFF" ></path></symbol><symbol id="icon-jixiebi2" viewBox="0 0 1164 1024"><path d="M848.55632 485.108049h233.370249v430.146938h-233.370249z" fill="#FFE610" ></path><path d="M974.217224 605.245396h154.314351v64.211341h-154.314351zM974.217224 689.82485h154.314351v64.211341h-154.314351zM974.217224 774.749527h154.314351v64.211341h-154.314351z" fill="#54D9D9" ></path><path d="M306.557369 245.869021l99.078789 31.760448 69.389675 22.094225 145.683794 46.259783 69.734897 22.094225 119.101681 37.974449 66.627896 21.058558 1.035667-2.761778 21.749003-69.044453 23.129891-72.151453-22.784669-7.249667-79.746343-25.201225-20.368113-6.559223-337.972595-107.364124-21.40378-6.904445-87.686455-27.617781-45.224116 142.576794-0.345222 1.035667z" fill="#FFE610" ></path><path d="M412.33347 357.755556l10.70189-33.555604 441.470229 140.401894-10.667368 33.555604z" fill="#A3A3A3" ></path><path d="M380.331366 357.686512l25.408359-79.953476 69.424197 22.094225-25.408359 79.918953zM595.508402 425.626253l25.408359-79.953476 69.389674 22.059703-25.373836 79.953476z" fill="#3F3F3F" ></path><path d="M809.200982 411.575707a144.302906 144.302906 0 0 0 4.833112 37.284004 138.088905 138.088905 0 0 0 18.987224 43.152783 144.302906 144.302906 0 0 0 15.535002 19.677669 146.719461 146.719461 0 0 0 256.154919-100.114456 144.648128 144.648128 0 0 0-34.522226-94.5909 180.206021 180.206021 0 0 0-15.880224-16.570668 146.719461 146.719461 0 0 0-96.317012-34.522227 148.445573 148.445573 0 0 0-58.687784 10.356668 146.719461 146.719461 0 0 0-89.757788 129.803571 34.522226 34.522226 0 0 0-0.345223 5.523556z" fill="#FFC200" ></path><path d="M876.174101 411.575707A80.091565 80.091565 0 1 0 956.265666 331.484142a80.091565 80.091565 0 0 0-80.091565 80.091565z" fill="#FFFFFF" ></path><path d="M904.827549 411.575707a51.438117 51.438117 0 1 0 51.438117-51.092895 51.438117 51.438117 0 0 0-51.438117 51.092895z" fill="#54D9D9" ></path><path d="M218.076903 216.594173l37.007826-117.202958 88.894733 28.06657L306.902591 244.660743zM86.512699 119.345062l92.450522-16.467102 19.401491 108.745013-92.450522 16.467102z" fill="#8A8A8A" ></path><path d="M0 65.317778l45.224116 254.083585 21.058558-3.797445 31.415226-5.523556 22.094225-4.142667-13.808891-77.675009-19.332446-109.090235-12.082779-67.318341-14.499335 2.761778-21.403781 3.797445-38.664893 6.904445z" fill="#292929" ></path><path d="M95.626567 436.43171l16.570668-3.107-14.499335-123.244348-31.415226 5.523556 29.343893 120.827792z" fill="#7A807D" ></path><path d="M138.088905 153.349455a80.782009 80.782009 0 0 0 31.070003 63.520896 79.40112 79.40112 0 0 0 49.021562 16.915891 75.258453 75.258453 0 0 0 32.10567-6.904445 80.091565 80.091565 0 0 0 48.331117-73.532342 78.710676 78.710676 0 0 0-13.808891-44.18845 76.984564 76.984564 0 0 0-31.760448-27.617781l-7.59489-3.452222a83.543787 83.543787 0 0 0-12.428001-3.452223H217.835247A80.091565 80.091565 0 0 0 138.088905 153.349455z" fill="#FFC200" ></path><path d="M167.087575 153.694677A51.092895 51.092895 0 1 0 217.835247 103.637449a50.747673 50.747673 0 0 0-50.747672 50.057228z" fill="#FFFFFF" ></path><path d="M185.384355 153.694677a32.450893 32.450893 0 1 0 32.450892-34.522226 32.450893 32.450893 0 0 0-32.450892 34.522226z" fill="#54D9D9" ></path><path d="M38.664893 58.413333l21.403781-3.797445C66.627897 19.74844 108.745013 11.117883 141.88635 14.915328a89.757788 89.757788 0 0 1 81.472454 58.687784h9.321001a83.543787 83.543787 0 0 1 12.428001 3.452223l7.59489 3.452223c53.854673-42.807561 165.016241-17.951558 187.110466 48.331116l21.40378 6.904446C439.813162 59.449 307.593036 24.581551 241.655583 69.115223a113.923346 113.923346 0 0 0-108.745012-69.044452C90.793455 0.070771 41.081449 10.772661 38.664893 58.413333zM799.189537 244.14291l20.368113 6.559223a345.222262 345.222262 0 0 0 89.412566-34.522226c48.331117-22.784669 133.601015-34.522226 144.99335 34.522226a114.613791 114.613791 0 0 1 0 48.676339 180.206021 180.206021 0 0 1 15.880224 16.570668c15.880224-50.057228 3.797445-107.364124-54.545117-124.280014-83.198565-22.439447-141.541127 45.569339-216.109136 52.473784z" fill="#3F3F3F" ></path><path d="M44.18845 731.251522a105.638012 105.638012 0 0 0 105.638012 105.638012h698.729858v-31.415226H149.826462a74.222786 74.222786 0 0 1 0-148.445573h698.729858v-31.415225H149.826462a105.638012 105.638012 0 0 0-105.638012 105.638012z" fill="#8A8A8A" ></path><path d="M75.603675 731.251522a74.222786 74.222786 0 0 0 74.222787 74.222786h698.729858V655.993069H149.826462a74.222786 74.222786 0 0 0-74.222787 75.258453z" fill="#FFE610" ></path><path d="M103.566679 731.251522a51.092895 51.092895 0 1 0 50.747672-50.747673A50.747673 50.747673 0 0 0 103.566679 731.251522z" fill="#FFFFFF" ></path><path d="M121.863459 731.251522a32.450893 32.450893 0 1 0 32.450892-32.450893 32.450893 32.450893 0 0 0-32.450892 32.450893zM290.331922 731.251522a34.522226 34.522226 0 0 0 34.522227 34.522226h414.266714a34.522226 34.522226 0 0 0 34.522226-34.522226 34.522226 34.522226 0 0 0-34.522226-34.522226h-414.266714a34.522226 34.522226 0 0 0-34.522227 34.522226z" fill="#54D9D9" ></path><path d="M827.15254 877.625761h276.523032v61.794785h-276.523032z" fill="#F7A53F" ></path><path d="M839.925764 939.765768h250.976584v31.070004h-250.976584z" fill="#707070" ></path><path d="M747.75142 657.028735v148.445573h43.152783v31.415226h57.652117v-211.276024h-57.652117v31.415225h-43.152783z" fill="#B3B3B3" opacity=".76" ></path><path d="M14.499335 970.490549h1149.590133v53.509451H14.499335z" fill="#B86805" ></path><path d="M154.314351 836.889534H272.725587v133.601015H154.314351zM614.150404 836.889534h118.411236v133.601015h-118.411236z" fill="#F7A53F" ></path><path d="M614.150404 836.889534h118.411236v78.365453h-118.411236zM154.314351 836.889534H272.725587v78.365453H154.314351z" fill="#B3B3B3" opacity=".76" ></path></symbol><symbol id="icon-jixiebi4" viewBox="0 0 1123 1024"><path d="M502.569098 505.335276h543.234824v85.15391H502.569098z" fill="#FFE610" ></path><path d="M483.047648 203.089382a81.451566 81.451566 0 0 1-41.06236 73.373725l-302.919047 173.33701a82.124719 82.124719 0 0 1-81.788143-143.045105l302.919047-173.33701a82.124719 82.124719 0 0 1 83.807603 0 79.768682 79.768682 0 0 1 27.935868 28.945597A77.412645 77.412645 0 0 1 483.047648 203.089382z" fill="#FFC200" ></path><path d="M39.776109 803.542249h1082.094151v220.121174H39.776109z" fill="#FFE610" ></path><path d="M39.776109 971.830609h1082.094151v52.169391H39.776109zM466.218812 723.43699v146.747449H219.844654v-146.747449a123.187079 123.187079 0 0 1 246.374158 0z" fill="#FFC200" ></path><path d="M396.210854 790.415757a100.973016 100.973016 0 0 1-141.698798-23.896947l-235.603704-331.864645a100.973016 100.973016 0 0 1 23.896947-141.362222 100.973016 100.973016 0 0 1 141.698799 23.896947l235.603703 331.528068a100.973016 100.973016 0 0 1-24.233523 141.698799z" fill="#FFE610" ></path><path d="M146.470929 451.146424a86.16364 86.16364 0 1 1 29.282174-118.138428 86.16364 86.16364 0 0 1-29.282174 118.138428z" fill="#B8B8B8" ></path><path d="M131.661553 424.556864a56.881466 56.881466 0 1 1 19.52145-78.085799 56.544889 56.544889 0 0 1-19.52145 78.085799z" fill="#B8B8B8" ></path><path d="M120.554522 405.035414a35.677132 35.677132 0 0 1-36.686863-60.920386A35.677132 35.677132 0 1 1 120.554522 405.035414z" fill="#FFFFFF" ></path><path d="M370.9676 757.767815a56.881466 56.881466 0 1 1 19.184873-78.085798 56.881466 56.881466 0 0 1-19.184873 78.085798z" fill="#B8B8B8" ></path><path d="M358.850839 739.592672a35.677132 35.677132 0 1 1 12.116761-48.803624 35.677132 35.677132 0 0 1-12.116761 48.803624z" fill="#FFFFFF" ></path><path d="M423.136992 384.167657l-112.416624 66.305614-32.984519-55.871735 112.753201-65.969037 9.760725 16.492259 13.463069 22.887217 9.424148 16.155682z" fill="#8A8A8A" ></path><path d="M400.18246 345.023785l70.512822-41.398937 13.463069 22.887217-70.512823 41.432594z" fill="#C4C4C4" ></path><path d="M489.442606 313.823123a21.877487 21.877487 0 0 1-11.780186 27.935868 21.54091 21.54091 0 0 1-27.935867-12.116762l-29.955328-73.373725a21.54091 21.54091 0 0 1 12.116762-27.935868 21.204333 21.204333 0 0 1 27.599291 11.780186z" fill="#F7A53F" ></path><path d="M482.037918 318.19862a12.453339 12.453339 0 0 1-9.424148 14.809376 12.789915 12.789915 0 0 1-14.809376-9.424148 12.789915 12.789915 0 0 1 9.424148-14.809376 12.453339 12.453339 0 0 1 14.809376 9.424148z" fill="#707070" ></path><path d="M303.652257 388.543155a24.5701 24.5701 0 0 0-7.404688 8.077841l-24.906677 45.10128 32.311365 44.764704 36.350285-65.63246a24.906677 24.906677 0 0 0-36.013709-33.657672z m12.453338 6.394957a14.472799 14.472799 0 0 1 16.155683 12.116762 14.136222 14.136222 0 0 1-12.116762 16.155683 13.799645 13.799645 0 0 1-16.155683-11.780185 14.136222 14.136222 0 0 1 13.463069-16.49226z" fill="#B86805" ></path><path d="M305.33514 411.430372a13.799645 13.799645 0 0 0 16.155683 11.780185 14.136222 14.136222 0 0 0 12.116762-16.155683 14.472799 14.472799 0 0 0-16.155683-12.116762 14.136222 14.136222 0 0 0-12.116762 16.49226z" fill="#5E5E5E" ></path><path d="M625.4196 163.709906l-19.858026 12.116762-37.360016 22.55064-19.858027 12.116762-20.867756-34.667402-40.389207-66.64219-19.184872-31.301635 9.424148-5.721804 58.227772-35.340556 9.424148-5.385227 80.441836 132.27465z" fill="#8A8A8A" ></path><path d="M568.066927 198.276335l37.124412-22.516982 36.484917 60.14626-37.15807 22.55064z" fill="#4D4D4D" ></path><path d="M931.031261 336.373763l-85.15391 217.765137h-128.572307l-46.447587-118.811581-30.965058-79.768683-7.404688-19.184873 46.111011-46.447587h205.648375l46.784164 46.447587z" fill="#AEBABD" ></path><path d="M744.668732 483.861681l105.954351-43.182793 2.423352 5.890093-105.988009 43.182793zM840.8287 361.953594l-120.157889-26.252984 1.682884-6.058381 119.821312 26.252984-1.346307 6.058381zM683.916634 363.838423l6.125696-1.851172 32.984518 109.252803-6.159353 1.851172z" fill="#6A5060" ></path><path d="M880.544753 403.015954a49.813354 49.813354 0 1 1-49.813354-49.813355 50.149931 50.149931 0 0 1 49.813354 49.813355zM746.923796 359.597557a33.657672 33.657672 0 1 1-33.657672-33.657672 33.657672 33.657672 0 0 1 33.657672 33.657672zM767.454975 465.282647a26.589561 26.589561 0 0 1-26.58956 26.252984A26.252984 26.252984 0 0 1 741.201991 438.693086a26.589561 26.589561 0 0 1 26.252984 26.589561z" fill="#FFFFFF" ></path><path d="M846.887081 403.015954a16.155683 16.155683 0 1 1-16.155682-16.155683 16.155683 16.155683 0 0 1 16.155682 16.155683zM724.709732 359.597557a10.097302 10.097302 0 0 1-10.097302 9.760725 9.760725 9.760725 0 1 1 0-19.52145 10.097302 10.097302 0 0 1 10.097302 9.760725zM748.943256 465.282647A7.741265 7.741265 0 0 1 741.201991 472.350758a8.077841 8.077841 0 0 1-8.077841-8.077842 8.077841 8.077841 0 0 1 8.077841-8.077841 8.077841 8.077841 0 0 1 7.741265 9.087572z" fill="#788B90" opacity=".37" ></path><path d="M698.456748 219.581642h166.268899v46.11101h-166.268899z" fill="#F7A53F" ></path><path d="M702.159092 223.620562h5.048651v38.03317h-5.048651zM711.246663 223.620562h5.048651v38.03317h-5.048651zM720.334235 223.620562h5.048651v38.03317h-5.048651zM729.421806 223.620562h5.048651v38.03317h-5.048651zM738.509378 223.620562h5.04865v38.03317h-5.04865zM747.596949 223.620562h5.048651v38.03317h-5.048651zM756.68452 223.620562h5.048651v38.03317h-5.048651zM765.772092 223.620562h5.048651v38.03317h-5.048651zM774.859663 223.620562h5.048651v38.03317H774.859663zM783.610658 223.620562h5.048651v38.03317h-5.048651zM792.698229 223.620562h5.048651v38.03317h-5.048651zM801.785801 223.620562h5.04865v38.03317h-5.04865zM810.873372 223.620562h5.048651v38.03317h-5.048651zM819.960944 223.620562h5.04865v38.03317h-5.04865zM829.048515 223.620562h5.048651v38.03317h-5.048651zM838.136086 223.620562h5.048651v38.03317h-5.048651zM847.223658 223.620562h5.048651v38.03317h-5.048651zM856.311229 223.620562h5.048651v38.03317h-5.048651z" fill="#788B90" opacity=".38" ></path><path d="M738.845954 265.692652h85.490487v23.896947h-85.490487z" fill="#707070" ></path><path d="M735.816764 288.916446h-1.682884L640.228976 355.558636l-39.0429 26.926138-4.712074 3.365767-16.492259-23.896947a25.916407 25.916407 0 0 1 6.731534-36.013709l97.270672-67.315344a25.916407 25.916407 0 0 1 36.013709 6.731534z" fill="#58BFD2" ></path><path d="M670.857457 435.327319h-33.657672a12.116762 12.116762 0 0 1-10.433878-8.414418l-24.906677-44.428127 39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M827.365631 288.916446h1.682884l94.241481 65.63246 39.0429 26.926138 4.712074 3.365767 16.492259-23.896947a25.916407 25.916407 0 0 0-6.731534-35.003979l-97.270672-67.315344a25.916407 25.916407 0 0 0-36.013709 6.731534z" fill="#58BFD2" ></path><path d="M892.324938 435.327319h33.657672a12.116762 12.116762 0 0 0 10.433878-8.414418l24.906677-44.428127-39.042899-26.926138z" fill="#8A8A8A" ></path><path d="M738.845954 265.692652h85.490487v12.116762h-85.490487zM922.95342 355.558636l-31.301635 79.768683-46.447588 118.811581 49.140201-194.541343-70.007957-69.671381h4.038921l94.578058 65.63246z" fill="#848484" opacity=".25" ></path><path d="M661.433309 321.900964l-48.467048-67.988497 21.204334-12.789915 38.033169 74.383455-10.770455 6.394957z" fill="#7A807D" ></path><path d="M535.553616 36.820483l-58.227772 33.657672-11.780186-19.184873A33.657672 33.657672 0 0 1 502.905674 1.143351a33.657672 33.657672 0 0 1 21.204334 15.482529z" fill="#F7A53F" ></path><path d="M527.475775 175.826668L483.047648 203.089382A77.412645 77.412645 0 0 0 471.940616 164.046483a79.768682 79.768682 0 0 0-27.599291-28.272444l42.745243-25.916408zM527.475775 175.826668l-40.389207-66.64219 40.389207 66.64219z" fill="#C4C4C4" ></path><path d="M956.274515 854.028757H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M650.999431 304.062398l-70.007958 14.809376 69.671381 8.414418-4.712074 38.033169 25.243254-25.243254 22.887217 25.243254-3.702344-36.350286 35.003979-1.682883-31.974789-19.52145 14.809376-35.677132-33.657672 24.906677-26.252984-43.754973 2.692614 50.823084z" fill="#FFFFFF" ></path><path d="M956.274515 803.542249H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 803.542249H600.512923l32.311365-25.579831h290.802285l32.647942 25.579831z" fill="#999999" ></path><path d="M956.274515 752.719165H600.512923l32.311365 25.243253h290.802285l32.647942-25.243253zM956.274515 702.232657H600.512923l32.311365 25.243254h290.802285l32.647942-25.243254z" fill="#7A807D" ></path><path d="M956.274515 752.719165H600.512923l32.311365-25.243254h290.802285l32.647942 25.243254z" fill="#999999" ></path><path d="M584.693817 632.561276h378.985386v69.671381H584.693817zM584.693817 854.028757h378.985386v34.667402H584.693817z" fill="#FFC200" ></path><path d="M502.569098 590.489186h543.234824v42.07209H502.569098z" fill="#F7A53F" ></path><path d="M273.696929 882.637778h80.441836v59.574079H273.696929z" fill="#7A807D" ></path><path d="M355.821648 783.011069l-4.375497 13.799646-26.589561 85.827063h-26.252984l28.945598-93.231751 4.375497-13.799646 23.896947 7.404688z" fill="#999999" ></path><path d="M381.738055 772.913768a33.657672 33.657672 0 1 1-22.55064-43.08182 33.657672 33.657672 0 0 1 22.55064 43.08182z" fill="#F7A53F" ></path><path d="M359.523992 753.728895a15.819106 15.819106 0 1 1-15.819106-15.819106 15.819106 15.819106 0 0 1 15.819106 15.819106z" fill="#FFFFFF" ></path><path d="M168.348416 882.637778h80.441835v59.574079H168.348416z" fill="#7A807D" ></path><path d="M166.665532 783.011069l4.375497 13.799646 26.589561 85.827063h26.252984l-28.945598-93.231751-4.03892-13.799646-24.233524 7.404688z" fill="#999999" ></path><path d="M140.749125 772.913768a33.657672 33.657672 0 1 0 67.315343-20.53118 33.657672 33.657672 0 0 0-43.08182-22.55064 33.657672 33.657672 0 0 0-24.233523 43.08182z" fill="#68FF4B" ></path><path d="M162.963188 753.728895a15.819106 15.819106 0 1 0 15.819106-15.819106 15.819106 15.819106 0 0 0-15.819106 15.819106z" fill="#FFFFFF" ></path></symbol></svg>',(s=>{var e=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var n,i,r,o,a,l=function(m,u){u.parentNode.insertBefore(m,u)};if(e&&!s.__iconfont__svg__cssinject__){s.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(m){console&&console.log(m)}}n=function(){var m,u=document.createElement("div");u.innerHTML=s._iconfont_svg_string_4634042,(u=u.getElementsByTagName("svg")[0])&&(u.setAttribute("aria-hidden","true"),u.style.position="absolute",u.style.width=0,u.style.height=0,u.style.overflow="hidden",u=u,(m=document.body).firstChild?l(u,m.firstChild):m.appendChild(u))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(r=n,o=s.document,a=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,c())})}function c(){a||(a=!0,r())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}c()}})(window);const gu=Oe.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(s){this.selectArray=s},setSelectString(s){this.selectString=s}}}),B6={class:"calculator-content"},O6={class:"calculator-child"},k6={class:"calculator-child"},V6=y.defineComponent({__name:"calculator",setup(s){const e=y.ref(),t=y.ref();return y.onMounted(()=>{e.value=[{type:"Upload",label:"输入",name:"input"}],t.value=[{type:"Upload",label:"输出",name:"output"}]}),(n,i)=>(y.openBlock(),y.createElementBlock("div",B6,[y.createElementVNode("div",O6,[y.createVNode(On.ssForm,{rowContents:e.value,isRowFlex:!0},null,8,["rowContents"])]),y.createElementVNode("div",k6,[y.createVNode(On.ssForm,{rowContents:t.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),H6=Pi._export_sfc(V6,[["__scopeId","data-v-73db0fe7"]]),_u=Oe.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(s){this.selectIndex=s},setSelectMenu(s){this.selectMenu=s},setSelectTitle(s){this.selectTitle=s}}}),vu=(s,e)=>{let t=s,n=e;return Array.isArray(t)&&(t=t==null?void 0:t.map((i,r)=>{if(Array.isArray(i)){let o={};return i=i==null?void 0:i.forEach((a,l)=>{var c;(c=n==null?void 0:n[l])!=null&&c.prop?o[n[l].prop]=a:Array.isArray(a)&&(o.children=vu(a,n))}),Object.assign(o,{id:r})}else return i})),t},yu=(s,e,t)=>{let n=s,i=e;return n=n==null?void 0:n.map((r,o)=>{var a,l;return!Array.isArray(r)||!((a=i==null?void 0:i[o])!=null&&a.label)&&!t||(r.unshift(((l=i==null?void 0:i[o])==null?void 0:l.label)??""),r.some(c=>Array.isArray(c))&&(r=r==null?void 0:r.map(c=>{var d;return Array.isArray(c)&&(c=yu(c,(d=i==null?void 0:i[o])==null?void 0:d.children,t)),c}))),r}),n},G6=(s,e,t)=>{if(e==="")return s==null?void 0:s.filter(n=>(n==null?void 0:n.id)!==t);{const n=e.split("-");return W6(s,n,t)}},W6=(s,e,t)=>{let n=s,i=e;return(i==null?void 0:i.length)===0?n=n==null?void 0:n.filter(r=>r.id!==t):n=n==null?void 0:n.map(r=>(r.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),r=xu(r,i,t)),r)),n},xu=(s,e,t)=>{var r,o;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=(r=n.children)==null?void 0:r.filter(a=>a.id!==t):n.children=(o=n.children)==null?void 0:o.map(a=>(a.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),a=xu(a,i,t)),a)),n},X6=(s,e,t)=>{if(e==="")return t;{const n=e.split("-");return j6(s,n,t)}},j6=(s,e,t)=>{let n=s,i=e;return(i==null?void 0:i.length)===0?n=t:n=n==null?void 0:n.map(r=>(r.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),r=Mu(r,i,t)),r)),n},Mu=(s,e,t)=>{var r;let n=s,i=e;return(i==null?void 0:i.length)===0?n.children=t:n.children=(r=n.children)==null?void 0:r.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Mu(o,i,t)),o)),n},bu=Oe.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:""}),actions:{setTableIndex(s){this.tableIndex=s},setTableShowThree(s){this.tableShowThree=s}}}),Su=Oe.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(s){this.objUrl=s},setBlobUrls(s){this.blobUrls=s}}}),kl=async s=>{var r,o,a,l,c,d,m;let e=(o=(r=Oe.cloneDeep(s))==null?void 0:r.optionUrl)==null?void 0:o.menuSelect,t=[];e==null||e.forEach(u=>{});let n="";const i=await rn.menuToParent(e);if(i==null||i.forEach(u=>{var h,g,_,p;(u==null?void 0:u.name)===(((p=(_=(g=(h=Oe.cloneDeep(s))==null?void 0:h.optionUrl)==null?void 0:g.groupSelect)==null?void 0:_[0])==null?void 0:p.replaceAll("'",""))??"")&&(n=u==null?void 0:u.id)}),n!==""){const u=(a=i==null?void 0:i[0])==null?void 0:a.compData;let h=(c=(l=u==null?void 0:u.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:l.contents)==null?void 0:c.map(_=>_==null?void 0:_.label),g=(m=(d=u==null?void 0:u.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:m.map(_=>(_=_==null?void 0:_.filter(p=>!(p!=null&&p.id)),_));g==null||g.forEach(_=>{t.push(rn.getValueToObjectValue(_,h))})}return t},q6={class:"table-content"},$6={class:"menu-config-wrap"},Y6=["onClick"],J6={key:0,class:"viewport-wrap"},K6=["onClick"],Z6={title:"选择显示列信息"},Q6={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","max-height":"300px",width:"300px",overflow:"auto"}},e5={class:"pop-view"},t5={class:"pop-wrapper"},n5={class:"file-list-pop"},i5=["title","onClick"],s5=["onClick"],r5={class:"form-content"},a5={key:0,class:"dialog-footer"},o5={class:"dialog-footer"},l5={__name:"index",props:{compName:{type:String,default:"",required:!1},operatingForm:{type:Object,default:()=>{}},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0}},emits:["change","contentChange","onButtonClick","contentClick","pageChange","rowClick"],setup(s,{emit:e}){const t=y.ref([]),n=Su(Oe.pinia),i=y.ref(null),r=s,o=e,a=y.ref([]),l=y.ref([]),c=y.ref(!1),d=y.ref([]),m=y.ref(!1),u=y.ref(),h=Oe.useMenuState(),{activeMenuPath:g}=Oe.storeToRefs(h),_=bu(Oe.pinia),p=Oe.useModelComp(Oe.pinia),{extraContents:f}=Oe.storeToRefs(p),v=y.ref([]);y.ref(!1);const b=y.ref("");y.ref();const S=y.ref(!0),F=y.ref(0),C=y.ref(!1),R=y.ref(""),P=y.ref(!1),A=y.ref({label:"查看三维模型"}),E=y.ref(!1),L=y.ref(),B=y.ref([]),H=y.ref([]),Q=y.ref(!1),ae=y.ref(),G=y.ref([]),le=y.ref([]),Z=y.ref([]),ve=y.ref(),Ee=y.ref(),be=gu(Oe.pinia),ge=y.ref(),se=_u(Oe.pinia),{selectIndex:j,selectMenu:q,selectTitle:ne}=Oe.storeToRefs(se),{selectString:ee}=Oe.storeToRefs(be),ue=wu.useLoginState(Oe.pinia),{loginUserInfo:$}=Oe.storeToRefs(ue),pe=y.ref(720),Ce=y.ref(!1),Ke=y.ref([]),He=y.ref(),O=y.ref(!0),_t=y.ref(null),dt=Y=>{Ke.value=Y},at=(Y,W)=>{He.value===W?O.value=!1:O.value=!0,He.value=W==null?void 0:W.changeProp},Fe=y.computed(()=>{var Y;return(Y=a.value)==null?void 0:Y.filter(W=>(W==null?void 0:W.label)!=="操作")}),tt=()=>{P.value=!1},Le=Y=>{o("clickTrigger",Y)},ot=async Y=>{var de,_e,me,Be,Te,Re,qe,te,Ve,Xe;const W=Y==null?void 0:Y.row;if((de=W==null?void 0:W.toString())!=null&&de.includes(".urdf")){ae.value=W,c.value=!0;return}let ce=[];if((_e=W==null?void 0:W.toString())!=null&&_e.includes(".stl")||(me=W==null?void 0:W.toString())!=null&&me.includes(".STL")||(Be=W==null?void 0:W.toString())!=null&&Be.includes(".obj")||(Te=W==null?void 0:W.toString())!=null&&Te.includes(".mtl")){let ft,w=[],V={};if(Array.isArray(W)?ft=W:ft=W==null?void 0:W.split(","),ft==null||ft.forEach(X=>{X.includes(".mtl")?w.push(X):V.blob=V.blob?V.blob+","+X:X}),(w==null?void 0:w.length)>0&&(V.mtlBlobs=w),(qe=(Re=Object.values(V))==null?void 0:Re[0])!=null&&qe.includes("http:"))ce.push(V);else{const X=new Blob([V.blob],{type:"application/octet-stream;charset=UTF-8"});let J=URL.createObjectURL(X),z="";(te=W==null?void 0:W.split("/"))==null||te.forEach((fe,ie)=>{var Ae;ie===((Ae=W==null?void 0:W.split("/"))==null?void 0:Ae.length)-1&&(z=fe)}),(Ve=V.blob)!=null&&Ve.includes(".stl")&&(z=(z==null?void 0:z.replaceAll(">",""))+".urdf"),u.value=[{name:z,blobUrl:J}],m.value=!0}}else{const ft=await axios.get(W,{responseType:"blob",headers:{"Content-Type":"application/json"}}),w=new Blob([ft.data],{type:"application/octet-stream;charset=UTF-8"});let V=URL.createObjectURL(w),X="";(Xe=W==null?void 0:W.split("/"))==null||Xe.forEach((J,z)=>{var fe;z===((fe=W==null?void 0:W.split("/"))==null?void 0:fe.length)-1&&(X=J)}),u.value=[{name:X,blobUrl:V}],m.value=!0}(ce==null?void 0:ce.length)>0&&n.setBlobUrls(ce)},jt=Y=>{var de,_e,me,Be;const W=(Be=(de=Y==null?void 0:Y.url)==null?void 0:de.split("."))==null?void 0:Be[((me=(_e=Y==null?void 0:Y.url)==null?void 0:_e.split("."))==null?void 0:me.length)-1];return(Y==null?void 0:Y.name)+"."+W},k=async Y=>{const W=await On.downloadAvatarApi({url:Y==null?void 0:Y.url}),ce=URL.createObjectURL(W.data),_e={name:jt(Y),blobUrl:ce};u.value=[_e],m.value=!0},T=async Y=>{const W=await On.downloadAvatarApi({url:Y==null?void 0:Y.url}),ce=URL.createObjectURL(W.data),_e={name:jt(Y),blobUrl:ce},me=document.createElement("a");me.href=_e.blobUrl,me.download=_e.name,me.style.display="none",document.body.appendChild(me),me.click(),setTimeout(()=>{document.body.removeChild(me)},100)},oe=(Y,W)=>{if(Object.values(W).length!==0)return Object.values(W).find(ce=>{var de,_e,me;return((de=ce==null?void 0:ce.toString())==null?void 0:de.includes(".txt"))||((_e=ce==null?void 0:ce.toString())==null?void 0:_e.includes(".cpt"))||((me=ce==null?void 0:ce.toString())==null?void 0:me.includes(".obj"))})?[...Y,A.value]:Y},Se=Y=>{var _e;ee.value===""?Y==null||Y[0]:(Y==null?void 0:Y.find(me=>(me==null?void 0:me.selectLabel)==="("+ee.value+")"))??(Y==null||Y.find(me=>!(me!=null&&me.selectLabel)));let W=Y;(_e=a.value)!=null&&_e.find(me=>me.prop==="index");let ce=ve.value;const de=[];return W==null||W.forEach((me,Be)=>{var Re;let Te={};if(Array.isArray(me)){let qe=[];me==null||me.filter(te=>!(te!=null&&te.id)).forEach((te,Ve)=>{var Xe,ft,w,V,X;if((Xe=ce==null?void 0:ce[Ve])!=null&&Xe.prop&&!Array.isArray(te)){let J={};J[ce[Ve].column]=te,f!=null&&f.value&&((ft=f==null?void 0:f.value)==null?void 0:ft.length)>0&&((w=f==null?void 0:f.value)!=null&&w.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify(J)))&&(qe=(V=f==null?void 0:f.value)==null?void 0:V.find(z=>JSON.stringify(z==null?void 0:z[0])===JSON.stringify(J))),qe&&qe.length>0?Te[ce[Ve].prop]=qe!=null&&qe.find(z=>{var fe;return((fe=Object.keys(z))==null?void 0:fe[0])===ce[Ve].column})?(X=qe==null?void 0:qe.find(z=>{var fe;return((fe=Object.keys(z))==null?void 0:fe[0])===ce[Ve].column}))==null?void 0:X[ce[Ve].column]:te:Te[ce[Ve].prop]=te}})}else Te=me;Array.isArray(me)&&me.some(qe=>qe==null?void 0:qe.id)?de.push(Object.assign(Te,{id:(Re=me==null?void 0:me.find(qe=>qe.id))==null?void 0:Re.id})):Te.id?de.push(Te):de.push(Object.assign(Te,{id:Be}))}),de},De=async Y=>{var _e,me,Be,Te,Re;let W={};for(let qe in Y)Y[qe]!==""&&(W["tableData."+qe]=Y[qe]);const ce=await rn.filterContents({type:"data",tableId:r==null?void 0:r.index,systemKey:sessionStorage.getItem("systemKey"),pageKey:g.value},W),de=(Be=(me=(_e=Oe.cloneDeep(ce))==null?void 0:_e.data)==null?void 0:me.result)==null?void 0:Be.map(qe=>{var Ve;let te=[];return te.push({id:qe.id}),te.push((Ve=qe==null?void 0:qe.value)==null?void 0:Ve.tableData),te});v.value=Se(rn.getTableContents(de,(Re=(Te=Oe.cloneDeep(a.value))==null?void 0:Te.map(qe=>qe.label))==null?void 0:Re.filter(qe=>qe!=="操作")))},ye=async Y=>{var de,_e,me,Be,Te,Re,qe,te,Ve,Xe,ft,w,V,X;const W=(de=Oe.cloneDeep(a.value))==null?void 0:de.filter(J=>J==null?void 0:J.isRoute);if((W==null?void 0:W.length)>0){let J=(_e=W==null?void 0:W[0])==null?void 0:_e.prop,z=Oe.cloneDeep(g).value+"/"+(Y==null?void 0:Y[J]),fe=Oe.cloneDeep(g).value,ie=await rn.getItemData(z,sessionStorage.getItem("systemKey"),"");if((ie==null?void 0:ie.length)>0)await rn.loadingConstruct(z,z+`/updateLoading${(me=$.value)==null?void 0:me.account}`),p.setRouteToChildPath(fe),h.setActiveMenuPath(z+`/updateLoading${(Be=$.value)==null?void 0:Be.account}`);else{let Ae=(Te=W==null?void 0:W[0])==null?void 0:Te.prop,re=Oe.cloneDeep(g).value+"/"+(Y==null?void 0:Y[Ae]),Ge=Oe.cloneDeep(g).value;await rn.getItemData(Ge+"/",sessionStorage.getItem("systemKey"),""),await rn.loadingConstruct(Ge+"/",re),await rn.loadingConstruct(re,re+`/updateLoading${(Re=$.value)==null?void 0:Re.account}`),p.setRouteToChildPath(Ge),h.setActiveMenuPath(re+`/updateLoading${(qe=$.value)==null?void 0:qe.account}`)}}let ce=await rn.getItemData(g.value,sessionStorage.getItem("systemKey"),Y.id);if(ce=ce==null?void 0:ce.filter(J=>J.comp!=="methodButton"),ce&&ce.length>0){const J=!Array.isArray(ne.value)&&((te=ne.value)==null?void 0:te.key)!=="main"?[]:ne.value;J.push({key:q.value===""?(Ve=Y==null?void 0:Y.id)==null?void 0:Ve.toString():q.value+"-"+((Xe=Y==null?void 0:Y.id)==null?void 0:Xe.toString()),value:Y[(ft=Object.keys(Y))==null?void 0:ft.filter(z=>z!=="index"&&z!=="id")[0]]}),se.setSelectMenu(q.value===""?(w=Y==null?void 0:Y.id)==null?void 0:w.toString():q.value+"-"+((V=Y==null?void 0:Y.id)==null?void 0:V.toString())),se.setSelectTitle(J),se.setSelectIndex((X=Y==null?void 0:Y.id)==null?void 0:X.toString()),o("pageChange",ce)}},vt=Y=>{var W;(W=Oe.cloneDeep(r.itemData))==null||W.map(ce=>((ce==null?void 0:ce.key)==="tableContents"&&(ce.contents=Y),ce))},Ze=async(Y,W,ce,de)=>{var me,Be,Te,Re,qe,te,Ve;if((de==null?void 0:de.data)==="查看"&&(Y!=null&&Y.every(Xe=>(Xe==null?void 0:Xe.url)&&(Xe==null?void 0:Xe.name)))){let Xe=Oe.cloneDeep(Y);Xe=await((me=Oe.cloneDeep(Xe))==null?void 0:me.map(async w=>{var J,z,fe,ie;const V=await On.downloadAvatarApi({url:w==null?void 0:w.url});let X=URL.createObjectURL(V.data);return{name:(w==null?void 0:w.name)+"."+((ie=(J=w==null?void 0:w.url)==null?void 0:J.split("."))==null?void 0:ie[((fe=(z=w==null?void 0:w.url)==null?void 0:z.split("."))==null?void 0:fe.length)-1]),blobUrl:X}}));let ft=await Promise.all(Xe);u.value=ft,m.value=!0}o("contentClick",Y,W,ce,{id:r==null?void 0:r.index,type:"table"});const _e=Oe.cloneDeep(a.value);if((de==null?void 0:de.isMainKey)===!0&&(_e==null?void 0:_e.length)>0){(Be=_e==null?void 0:_e[0])==null||Be.prop;let Xe=Oe.cloneDeep(g).value+"/"+(de==null?void 0:de.data),ft=Oe.cloneDeep(g).value,w=await rn.getItemData(Xe,sessionStorage.getItem("systemKey"),"");if((w==null?void 0:w.length)>0)await rn.loadingConstruct(Xe,Xe+`/updateLoading${(Te=$.value)==null?void 0:Te.account}`),p.setRouteToChildPath(ft),h.setActiveMenuPath(Xe+`/updateLoading${(Re=$.value)==null?void 0:Re.account}`);else{(qe=_e==null?void 0:_e[0])==null||qe.prop;let V=Oe.cloneDeep(g).value+"/"+(de==null?void 0:de.data),X=Oe.cloneDeep(g).value;await rn.getItemData(X+"/",sessionStorage.getItem("systemKey"),""),await rn.loadingConstruct(X+"/",V),await rn.loadingConstruct(V,V+`/updateLoading${(te=$.value)==null?void 0:te.account}`),p.setRouteToChildPath(X),h.setActiveMenuPath(V+`/updateLoading${(Ve=$.value)==null?void 0:Ve.account}`)}}},mt=()=>{m.value=!1},yt=Y=>{o("rowClick",Y)};y.watch(()=>r.changedContent,()=>{var ce,de;if(!r.changedContent)return;let Y=(ce=v.value)==null?void 0:ce.map(_e=>{var me;return _e.id===((me=r.changedContent)==null?void 0:me.id)&&(_e={...r.changedContent,id:r.changedContent.newId?r.changedContent.newId:r.changedContent.id},delete _e.newId),_e});const W=(de=r.itemData)==null?void 0:de.map(_e=>((_e==null?void 0:_e.key)==="tableContents"&&(_e.contents=Y),_e));v.value=Y,o("contentChange",{contents:W,index:r.index}),o("change",{content:Y,index:r==null?void 0:r.index,buttonName:"",id:r==null?void 0:r.index})},{deep:!0,immediate:!0});const Ue=()=>{},st=(Y,W,ce)=>{var de,_e,me,Be,Te,Re,qe,te;if(b.value="",Q.value=!0,S.value=!0,o("onButtonClick",Y,W),Y==="删除"){v.value=(de=Oe.cloneDeep(v.value))==null?void 0:de.filter(Xe=>(Xe==null?void 0:Xe.id)!==(W==null?void 0:W.id));const Ve=G6(ge.value,q.value,W==null?void 0:W.id);vt(Ve),o("change",{content:v.value,singleContent:W,index:r==null?void 0:r.index,type:"delete",buttonName:Y,column:a.value})}else if(Y==="批量删除"){if(((_e=Ke.value)==null?void 0:_e.length)===0)return Pn.ElMessage.warning("请先勾选操作的数据");o("change",{content:v.value,singleContent:null,selectItems:Ke.value,index:r==null?void 0:r.index,type:"batchDelete",buttonName:Y,column:a.value})}else if(Y==="复制新增"){R.value="新增";const Ve=Oe.cloneDeep(W),Xe=(me=a.value)==null?void 0:me.find(V=>V==null?void 0:V.isMainKey),ft=Xe||((Be=a.value)==null?void 0:Be[0]),w=(Te=le.value)==null?void 0:Te.find(V=>(V==null?void 0:V.label)==="新建");Lt(!0,w,{data:Ve,firstCol:ft})}else if(Y==="新增")R.value="新增",$e(""),P.value=!0;else if(Y==="编辑")R.value="编辑",$e(W),P.value=!0;else if(Y==="查看")R.value="查看",$e(W),Q.value=!1,S.value=!1,P.value=!0;else if(Y==="查看三维模型"){const Ve={};for(let ft in W)ft!=="id"&&(Ve[ft]=W[ft]);let Xe=(Re=Object.values(Ve))==null?void 0:Re[1];_.setTableShowThree(Xe)}else if(((qe=ce==null?void 0:ce.extra)==null?void 0:qe.type)==="modelExample")R.value=Y,E.value=!0;else if(Y==="新建"){const Ve=(te=le.value)==null?void 0:te.find(Xe=>(Xe==null?void 0:Xe.label)==="新建");Lt(!1,Ve)}else if(Y==="修改模板"){let Ve=Oe.cloneDeep(g).value;p.setRouteToChildPath(Ve),h.setActiveMenuPath(Ve+"/")}},Rt=async Y=>{var ce,de,_e,me,Be,Te;const W=await Pn.getInsofDataApi({key:{pageKey:Y,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((ce=W==null?void 0:W.data)==null?void 0:ce.code)===200)return Array.isArray((de=W==null?void 0:W.data)==null?void 0:de.result)&&((me=(_e=W==null?void 0:W.data)==null?void 0:_e.result)==null?void 0:me.length)>0?(Te=(Be=W==null?void 0:W.data)==null?void 0:Be.result)==null?void 0:Te.map(Re=>{var qe;return{id:Re==null?void 0:Re.id,...(qe=Re==null?void 0:Re.value)==null?void 0:qe.pageData}}):[]},At=(Y,W,ce,de)=>{var _e;o("contentChange",{contents:(_e=Y==null?void 0:Y.compData)==null?void 0:_e.map(me=>{var Be;return(me==null?void 0:me.key)==="formContent"?{...me,contents:(Be=me==null?void 0:me.contents)==null?void 0:Be.map(Te=>(Te==null?void 0:Te.key)===W?{...Te,value:ce}:Te)}:me}),index:Y==null?void 0:Y.id}),h.setActiveMenuPath(""),h.setActiveMenuPath(de)},Ye=(Y,W)=>{let ce=Y==null?void 0:Y[W==null?void 0:W.prop],de=1;if(v.value.some(_e=>(_e==null?void 0:_e[W==null?void 0:W.prop])===ce)){const _e=ce;for(;v.value.some(me=>(me==null?void 0:me[W==null?void 0:W.prop])===`${_e}(${de})`);)de++;ce=`${_e}(${de})`}return ce},Lt=async(Y,W,ce)=>{var Be,Te,Re,qe,te;let de,_e;const me=Ye(ce==null?void 0:ce.data,ce==null?void 0:ce.firstCol);if(Y?(de=Oe.cloneDeep(g).value+"/"+((Re=ce==null?void 0:ce.data)==null?void 0:Re[(Te=ce==null?void 0:ce.firstCol)==null?void 0:Te.prop]),_e=Oe.cloneDeep(g).value+"/"+me):(de=Oe.cloneDeep(g).value+"/",_e=Oe.cloneDeep(de)+`loading${(Be=$.value)==null?void 0:Be.account}`),W){const Ve=await rn.getItemData(_e,sessionStorage.getItem("systemKey"),"");if((Ve==null?void 0:Ve.length)>0)if(Y){const Xe=Ve==null?void 0:Ve.find(ft=>{var w;return((w=ft==null?void 0:ft.comp)==null?void 0:w.toUpperCase())==="FORM"});Xe&&At(Xe,(qe=ce==null?void 0:ce.firstCol)==null?void 0:qe.label,me,g.value)}else p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(_e);else if(await rn.loadingConstruct(de,_e),Y){const Xe=await Rt(_e);if((Xe==null?void 0:Xe.length)>0){const ft=Xe==null?void 0:Xe.find(w=>{var V;return((V=w==null?void 0:w.comp)==null?void 0:V.toUpperCase())==="FORM"});ft&&At(ft,(te=ce==null?void 0:ce.firstCol)==null?void 0:te.label,me,g.value)}}else p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(_e)}else Y?(b.value="",Ee.value=ce==null?void 0:ce.data,ze(!0,ce==null?void 0:ce.firstCol,me)):(p.setRouteToChildPath(Oe.cloneDeep(g).value),h.setActiveMenuPath(_e))},K=()=>{c.value=!1,ae.value=null},$e=Y=>{var _e,me,Be,Te,Re,qe;const W=[];let ce=[];for(let te in Y)Array.isArray(Y==null?void 0:Y[te])&&ce.push(te);l.value=Oe.cloneDeep(a.value),(me=rn.getColumnChild((_e=Oe.cloneDeep(a.value))==null?void 0:_e.filter(te=>(te==null?void 0:te.label)!=="操作")))==null||me.forEach((te,Ve)=>{var Xe;ce.find(ft=>ft===(te==null?void 0:te.prop))||(te!=null&&te.formType&&((Xe=te==null?void 0:te.formType)==null?void 0:Xe.toUpperCase())==="SELECT"?W.push({label:(te==null?void 0:te.label)??"",name:(te==null?void 0:te.prop)??"t"+Ve,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:(Y==null?void 0:Y[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??Ve,contents:(te==null?void 0:te.options)??[],width:1,isFormColHidden:te==null?void 0:te.isFormColHidden,optionUrl:{groupSelect:te==null?void 0:te.groupSelect,menuSelect:te==null?void 0:te.formMenuSelect,type:"Select",selectRelateType:te==null?void 0:te.selectRelateType}}):W.push({label:(te==null?void 0:te.label)??"",name:(te==null?void 0:te.prop)??"t"+Ve,type:!(te!=null&&te.formType)||(te==null?void 0:te.formType)===""?"Input":te==null?void 0:te.formType,value:(Y==null?void 0:Y[te==null?void 0:te.prop])??(te==null?void 0:te.value)??"",id:(te==null?void 0:te.id)??Ve,contents:(te==null?void 0:te.options)??[],width:1,isFormColHidden:te==null?void 0:te.isFormColHidden}))}),Y===""||!Y||(b.value=(Y==null?void 0:Y.id)??"");let de=rn.getColumnChild((Be=Oe.cloneDeep(a.value))==null?void 0:Be.filter(te=>(te==null?void 0:te.label)!=="操作"));B.value&&((Te=B.value)==null?void 0:Te.length)>0&&(B.value=(Re=Oe.cloneDeep(B).value)==null?void 0:Re.map(te=>{var Xe;let Ve=(Xe=de==null?void 0:de.find(ft=>(ft==null?void 0:ft.label)===(te==null?void 0:te.label)))==null?void 0:Xe.prop;return Ve&&(te.value=Y[Ve]),te})),Z.value=B.value&&((qe=B.value)==null?void 0:qe.length)>0?rn.getTableFormToForm(B.value):W},Ie=async()=>{var W;await y.nextTick();const Y=(W=i.value)==null?void 0:W.$el;Y&&rn.Sortable.create(Y,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ce=>{var Be;const{oldIndex:de,newIndex:_e}=ce;if(de===_e)return;const me=Fe.value.splice(de,1)[0];Fe.value.splice(_e,0,me),a.value=(Be=a.value)==null?void 0:Be.slice().sort((Te,Re)=>{var qe,te;return Te.label==="操作"?1:Re.label==="操作"?-1:((qe=Fe.value)==null?void 0:qe.indexOf(Te))-((te=Fe.value)==null?void 0:te.indexOf(Re))})}})};y.onMounted(()=>{L.value=window.innerWidth-240*2});const ut=()=>{y.nextTick(()=>{Ie()})},ze=(Y=!0,W,ce)=>{var Be;console.log(456,Y,Ee.value,b.value);let de=rn.getColumnChild((Be=Oe.cloneDeep(a.value))==null?void 0:Be.filter(Te=>(Te==null?void 0:Te.label)!=="操作")),_e,me=Oe.cloneDeep(v.value);if(!Ee.value){P.value=!1;return}if(b.value===""){F.value++;let Te;W&&ce?Te={id:F.value,[W==null?void 0:W.prop]:ce}:Te={id:F.value},me.push(Object.assign(Ee.value,Te)),_e=Object.assign(Ee.value,Te)}else me=me==null?void 0:me.map(Te=>{var Re,qe;if((Te==null?void 0:Te.id)===b.value){let te={};for(let Ve in Te){let Xe=(Re=de==null?void 0:de.find(ft=>(ft==null?void 0:ft.prop)===Ve))==null?void 0:Re.label;Xe?te[Ve]=(qe=Ee.value)==null?void 0:qe[Xe]:te[Ve]=Te[Ve]}Te=Object.assign(te,Ee.value),_e=Te}return Te});if(v.value=me,Y){const Te=X6(ge.value,q.value,me);vt(Te),P.value=!1,Ee.value=void 0,p.setCacheUpdatingData({content:Te,singleContent:_e,index:r==null?void 0:r.index,buttonName:R.value,column:a.value}),_t.value={content:Te,singleContent:_e,index:r==null?void 0:r.index,buttonName:R.value,column:a.value},o("change",_t.value)}},we=async(Y,W,ce)=>{var qe,te,Ve,Xe,ft,w,V,X,J,z,fe;He.value=ce==null?void 0:ce.prop;const de=Oe.cloneDeep(r.itemData),_e=de==null?void 0:de.map(ie=>{var Ae;return(ie==null?void 0:ie.key)==="header"&&((Ae=ie.contents)==null||Ae.map((re,Ge)=>{var Me,Pe,it,Mt,Ct,bt,St,Qe,Wt,Nt,nn,Bt,cn,We,Pt,Ot,Jt,sn,Kt;return re.type=re!=null&&re.type?re.type:(Mt=(it=(Pe=(Me=re==null?void 0:re.key)==null?void 0:Me.split("$"))==null?void 0:Pe[1])==null?void 0:it.split("("))!=null&&Mt[0]?(bt=(Ct=rn.FormType)==null?void 0:Ct.find(rt=>{var ke,ht,xn,x;return(rt==null?void 0:rt.key)===((x=(xn=(ht=(ke=re==null?void 0:re.key)==null?void 0:ke.split("$"))==null?void 0:ht[1])==null?void 0:xn.split("("))==null?void 0:x[0])}))==null?void 0:bt.value:"Input",re.options=re!=null&&re.options?re.options:((Wt=(Qe=(St=re==null?void 0:re.key)==null?void 0:St.split("$"))==null?void 0:Qe[1])==null?void 0:Wt.length)>0?(cn=(Bt=Ho((nn=(Nt=re==null?void 0:re.key)==null?void 0:Nt.split("$"))==null?void 0:nn[1]))==null?void 0:Bt.split(","))==null?void 0:cn.map(rt=>({label:rt,value:rt})):[],(We=re==null?void 0:re.key)!=null&&We.includes("$")&&(re.key=(Ot=(Pt=re==null?void 0:re.key)==null?void 0:Pt.split("$"))==null?void 0:Ot[0]),re.value=(Jt=Object.values(W))==null?void 0:Jt[Ge],re.optionUrl=re!=null&&re.formMenuSelect&&((sn=re==null?void 0:re.formMenuSelect)==null?void 0:sn.length)>0?{groupSelect:(Kt=re==null?void 0:re.groupSelect)==null?void 0:Kt.split(/[::]/).map(rt=>rt.trim()),menuSelect:re==null?void 0:re.formMenuSelect,selectRelateType:"",type:(re==null?void 0:re.formType)??(re!=null&&re.groupSelect?"Select":"")}:null,re})),ie});let me=Oe.cloneDeep(Z.value),Be=(te=(qe=Oe.cloneDeep(_e))==null?void 0:qe.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:te.contents;me=me==null?void 0:me.map(ie=>{var Ae;return ie.value=(Ae=Be==null?void 0:Be.find((re,Ge)=>Ge===(ie==null?void 0:ie.id)))==null?void 0:Ae.value,ie});let Te="",Re=(ft=(Xe=(Ve=Oe.cloneDeep(_e))==null?void 0:Ve.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Xe.contents)==null?void 0:ft.find((ie,Ae)=>{var re,Ge,Me;return(ie==null?void 0:ie.label)===He.value||(Ae==null?void 0:Ae.toString())===((Me=(Ge=(re=He.value)==null?void 0:re.split("a"))==null?void 0:Ge[1])==null?void 0:Me.toString())});if((X=(V=(w=Oe.cloneDeep(_e))==null?void 0:w.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:V.contents)==null||X.forEach(ie=>{var Ae,re,Ge,Me,Pe;Te===""&&((Ge=(re=(Ae=ie==null?void 0:ie.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:re[1])!=null&&Ge.includes("["))&&(Te=(Pe=(Me=ie==null?void 0:ie.optionUrl)==null?void 0:Me.groupSelect)==null?void 0:Pe[1])}),(J=Re==null?void 0:Re.optionUrl)!=null&&J.menuSelect){let ie=await kl(Re),Ae;if(ie==null||ie.forEach(re=>{var Ge,Me,Pe,it,Mt,Ct,bt,St,Qe,Wt;Te===((Me=(Ge=Re==null?void 0:Re.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Me[1])&&((Mt=(it=(Pe=Re==null?void 0:Re.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])!=null&&Mt.includes("["))&&((Wt=Oe.cloneDeep(re))==null?void 0:Wt[(Qe=(St=(bt=(Ct=Re==null?void 0:Re.optionUrl)==null?void 0:Ct.groupSelect)==null?void 0:bt[1])==null?void 0:St.replaceAll("[",""))==null?void 0:Qe.replaceAll("]","")])===(Re==null?void 0:Re.value)&&(Ae=re)}),Ae){let re=Oe.cloneDeep(me);re=re==null?void 0:re.map(Me=>{var Pe,it,Mt,Ct,bt,St,Qe,Wt,Nt,nn,Bt;return(Ae!=null&&Ae[Me==null?void 0:Me.label]||Ae!=null&&Ae[(Ct=(Mt=(it=(Pe=Me==null?void 0:Me.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])==null?void 0:Mt.replaceAll("[",""))==null?void 0:Ct.replaceAll("]","")])&&((Qe=(St=(bt=Me==null?void 0:Me.optionUrl)==null?void 0:bt.groupSelect)==null?void 0:St[1])!=null&&Qe.includes("["))&&(Me.value=(Ae==null?void 0:Ae[Me==null?void 0:Me.label])||(Ae==null?void 0:Ae[(Bt=(nn=(Nt=(Wt=Me==null?void 0:Me.optionUrl)==null?void 0:Wt.groupSelect)==null?void 0:Nt[1])==null?void 0:nn.replaceAll("[",""))==null?void 0:Bt.replaceAll("]","")])),Me}),v.value=(z=Oe.cloneDeep(v.value))==null?void 0:z.map(Me=>{if((Me==null?void 0:Me.id)===(W==null?void 0:W.id)){const Pe={};return re==null||re.forEach(it=>{Pe[it.name]=it.value}),Pe.id=Me==null?void 0:Me.id,Pe}return Me});let Ge=Oe.cloneDeep(re);Ge=Ge==null?void 0:Ge.map(Me=>{var Pe,it,Mt,Ct;return(it=(Pe=Me==null?void 0:Me.optionUrl)==null?void 0:Pe.menuSelect)!=null&&it.some(bt=>bt==null?void 0:bt.includes)&&(Me.optionUrl.menuSelect=(Ct=(Mt=Me==null?void 0:Me.optionUrl)==null?void 0:Mt.menuSelect)==null?void 0:Ct.map(bt=>{var St,Qe,Wt,Nt;if(bt!=null&&bt.includes("[")){let nn=(Qe=(St=bt==null?void 0:bt.replaceAll("[","").replaceAll("]",""))==null?void 0:St.split(":"))==null?void 0:Qe[1];bt=(Nt=(Wt=Oe.cloneDeep(re))==null?void 0:Wt.find(Bt=>(Bt==null?void 0:Bt.label)===nn))==null?void 0:Nt.value}return bt})),Me}),v.value=(fe=Oe.cloneDeep(v.value))==null?void 0:fe.map(Me=>{if((Me==null?void 0:Me.id)===(W==null?void 0:W.id)){const Pe={};return Ge==null||Ge.forEach(it=>{Pe[it.name]=it.value}),Pe.id=Me==null?void 0:Me.id,Pe}return Me})}}},pt=async Y=>{var Te,Re,qe,te,Ve,Xe,ft,w,V;if(!Y)return;Ee.value=Y,o("onFormChange",Y);const W=Oe.cloneDeep(r.itemData),ce=W==null?void 0:W.map(X=>{var J;return(X==null?void 0:X.key)==="header"&&((J=X.contents)==null||J.map((z,fe)=>{var ie,Ae,re,Ge,Me,Pe,it,Mt,Ct,bt,St,Qe,Wt,Nt,nn,Bt,cn,We,Pt;return z.type=z!=null&&z.type?z.type:(Ge=(re=(Ae=(ie=z==null?void 0:z.key)==null?void 0:ie.split("$"))==null?void 0:Ae[1])==null?void 0:re.split("("))!=null&&Ge[0]?(Pe=(Me=rn.FormType)==null?void 0:Me.find(Ot=>{var Jt,sn,Kt,rt;return(Ot==null?void 0:Ot.key)===((rt=(Kt=(sn=(Jt=z==null?void 0:z.key)==null?void 0:Jt.split("$"))==null?void 0:sn[1])==null?void 0:Kt.split("("))==null?void 0:rt[0])}))==null?void 0:Pe.value:"Input",z.options=z!=null&&z.options?z.options:((Ct=(Mt=(it=z==null?void 0:z.key)==null?void 0:it.split("$"))==null?void 0:Mt[1])==null?void 0:Ct.length)>0?(Wt=(Qe=Ho((St=(bt=z==null?void 0:z.key)==null?void 0:bt.split("$"))==null?void 0:St[1]))==null?void 0:Qe.split(","))==null?void 0:Wt.map(Ot=>({label:Ot,value:Ot})):[],(Nt=z==null?void 0:z.key)!=null&&Nt.includes("$")&&(z.key=(Bt=(nn=z==null?void 0:z.key)==null?void 0:nn.split("$"))==null?void 0:Bt[0]),z.value=(cn=Object.values(Y))==null?void 0:cn[fe],z.optionUrl=z!=null&&z.formMenuSelect&&((We=z==null?void 0:z.formMenuSelect)==null?void 0:We.length)>0?{groupSelect:(Pt=z==null?void 0:z.groupSelect)==null?void 0:Pt.split(/[::]/).map(Ot=>Ot.trim()),menuSelect:z==null?void 0:z.formMenuSelect,selectRelateType:"",type:(z==null?void 0:z.formType)??(z!=null&&z.groupSelect?"Select":"")}:null,z})),X});let de=Oe.cloneDeep(Z.value),_e=(Re=(Te=Oe.cloneDeep(ce))==null?void 0:Te.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Re.contents;if(de=de==null?void 0:de.map(X=>{var J;return X.value=(J=_e==null?void 0:_e.find((z,fe)=>fe===(X==null?void 0:X.id)))==null?void 0:J.value,X}),!O.value)return;let me="",Be=(Ve=(te=(qe=Oe.cloneDeep(ce))==null?void 0:qe.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:te.contents)==null?void 0:Ve.find((X,J)=>{var z,fe;return(X==null?void 0:X.label)===He.value||(J==null?void 0:J.toString())===((fe=(z=He.value)==null?void 0:z.split("a"))==null?void 0:fe[1].toString())});if((w=(ft=(Xe=Oe.cloneDeep(ce))==null?void 0:Xe.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:ft.contents)==null||w.forEach(X=>{var J,z,fe,ie,Ae;me===""&&((fe=(z=(J=X==null?void 0:X.optionUrl)==null?void 0:J.groupSelect)==null?void 0:z[1])!=null&&fe.includes("["))&&(me=(Ae=(ie=X==null?void 0:X.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:Ae[1])}),(V=Be==null?void 0:Be.optionUrl)!=null&&V.menuSelect&&O.value){let X=await kl(Be),J;if(X==null||X.forEach(z=>{var fe,ie,Ae,re,Ge,Me,Pe,it,Mt,Ct;me===((ie=(fe=Be==null?void 0:Be.optionUrl)==null?void 0:fe.groupSelect)==null?void 0:ie[1])&&((Ge=(re=(Ae=Be==null?void 0:Be.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:re[1])!=null&&Ge.includes("["))&&((Ct=Oe.cloneDeep(z))==null?void 0:Ct[(Mt=(it=(Pe=(Me=Be==null?void 0:Be.optionUrl)==null?void 0:Me.groupSelect)==null?void 0:Pe[1])==null?void 0:it.replaceAll("[",""))==null?void 0:Mt.replaceAll("]","")])===(Be==null?void 0:Be.value)&&(J=z)}),J){let z=Oe.cloneDeep(de);z=z==null?void 0:z.map(ie=>{var Ae,re,Ge,Me,Pe,it,Mt,Ct,bt,St,Qe;return(J!=null&&J[ie==null?void 0:ie.label]||J!=null&&J[(Me=(Ge=(re=(Ae=ie==null?void 0:ie.optionUrl)==null?void 0:Ae.groupSelect)==null?void 0:re[1])==null?void 0:Ge.replaceAll("[",""))==null?void 0:Me.replaceAll("]","")])&&((Mt=(it=(Pe=ie==null?void 0:ie.optionUrl)==null?void 0:Pe.groupSelect)==null?void 0:it[1])!=null&&Mt.includes("["))&&(ie.value=(J==null?void 0:J[ie==null?void 0:ie.label])||(J==null?void 0:J[(Qe=(St=(bt=(Ct=ie==null?void 0:ie.optionUrl)==null?void 0:Ct.groupSelect)==null?void 0:bt[1])==null?void 0:St.replaceAll("[",""))==null?void 0:Qe.replaceAll("]","")])),ie}),Z.value=z;let fe=Oe.cloneDeep(z);fe=fe==null?void 0:fe.map(ie=>{var Ae,re,Ge,Me;return(re=(Ae=ie==null?void 0:ie.optionUrl)==null?void 0:Ae.menuSelect)!=null&&re.some(Pe=>Pe==null?void 0:Pe.includes)&&(ie.optionUrl.menuSelect=(Me=(Ge=ie==null?void 0:ie.optionUrl)==null?void 0:Ge.menuSelect)==null?void 0:Me.map(Pe=>{var it,Mt,Ct,bt;if(Pe!=null&&Pe.includes("[")){let St=(Mt=(it=Pe==null?void 0:Pe.replaceAll("[","").replaceAll("]",""))==null?void 0:it.split(":"))==null?void 0:Mt[1];Pe=(bt=(Ct=Oe.cloneDeep(z))==null?void 0:Ct.find(Qe=>(Qe==null?void 0:Qe.label)===St))==null?void 0:bt.value}return Pe})),ie}),Z.value=fe}}O.value=!1},Ft=Y=>Y?(Y==null?void 0:Y.toUpperCase())==="INPUT"?"TEXTAREA":Y:"TEXTAREA",Qt=Y=>{var me,Be;const W=(Be=(me=B.value)==null?void 0:me.find(Te=>(Te==null?void 0:Te.label)===(Y==null?void 0:Y.label)))==null?void 0:Be.multiple,ce=Y==null?void 0:Y.prop;if((Y==null?void 0:Y.formType)!="Select")return;v.value.forEach(Te=>{const Re=Te==null?void 0:Te[ce];W&&Vo(Re)&&(Te[ce]=[Re]),!W&&!Vo(Re)&&(Te[ce]="")})},Ut=Y=>{var ce,de,_e,me,Be,Te;$e("");const W=(ce=Z.value)==null?void 0:ce.reduce((Re,qe)=>(Re[qe.name]=qe.value,Re),{});((de=Object.keys(W))==null?void 0:de.length)>0&&(Ee.value=W,b.value="",F.value=(_e=v.value)==null?void 0:_e.length,G.value=(me=le.value)==null?void 0:me.filter(Re=>(Re==null?void 0:Re.label)!=="新增"),a.value=(Te=(Be=l.value)==null?void 0:Be.filter(Re=>(Re==null?void 0:Re.label)!=="操作"))==null?void 0:Te.map(Re=>{var te,Ve,Xe;const qe=(Ve=(te=B.value)==null?void 0:te.find(ft=>(ft==null?void 0:ft.label)===(Re==null?void 0:Re.label)))==null?void 0:Ve.multiple;return Qt(Re),{...Re,type:"edit",optionUrl:Re!=null&&Re.formMenuSelect&&((Xe=Re==null?void 0:Re.formMenuSelect)==null?void 0:Xe.length)>0?{groupSelect:Re==null?void 0:Re.groupSelect,menuSelect:Re==null?void 0:Re.formMenuSelect,selectRelateType:"",type:Re==null?void 0:Re.formType,multiple:qe}:null,columnType:Ft(Re==null?void 0:Re.formType)}}),Y==="createClick"&&ze(!1))};y.watch(()=>[r.itemData,ee.value,j.value,q.value,f==null?void 0:f.value],()=>{var Re,qe,te,Ve,Xe,ft,w,V,X,J,z,fe,ie,Ae,re,Ge,Me,Pe,it,Mt,Ct,bt,St,Qe,Wt,Nt,nn,Bt,cn;const Y=(Re=Oe.cloneDeep(r.itemData))==null?void 0:Re.filter(We=>(We==null?void 0:We.key)==="header");(qe=Oe.cloneDeep(r.itemData))==null||qe.filter(We=>(We==null?void 0:We.key)==="tableIndexColumn")[0];const W=(te=Oe.cloneDeep(r.itemData))==null?void 0:te.find(We=>(We==null?void 0:We.key)==="page"),ce=(Ve=Oe.cloneDeep(r.itemData))==null?void 0:Ve.find(We=>(We==null?void 0:We.key)==="rowButton"),de=(Xe=Oe.cloneDeep(r.itemData))==null?void 0:Xe.find(We=>(We==null?void 0:We.key)==="extraButton"),_e=(ft=Oe.cloneDeep(r.itemData))==null?void 0:ft.filter(We=>(We==null?void 0:We.key)==="tableContents"),me=(w=Oe.cloneDeep(r.itemData))==null?void 0:w.filter(We=>(We==null?void 0:We.key)==="tableIndex");B.value=(J=(X=(V=Oe.cloneDeep(r.itemData))==null?void 0:V.filter(We=>(We==null?void 0:We.key)==="tableToForm"))==null?void 0:X[0])==null?void 0:J.contents,C.value=(W==null?void 0:W.contents)??!1;let Be=[];ee.value===""?Be=Y==null?void 0:Y[0]:Be=(Y==null?void 0:Y.find(We=>(We==null?void 0:We.selectLabel)==="("+ee.value+")"))??(Y==null?void 0:Y.find(We=>!(We!=null&&We.selectLabel)));let Te=[];if(ee.value===""?Te=me==null?void 0:me[0]:Te=(me==null?void 0:me.find(We=>(We==null?void 0:We.selectLabel)==="("+ee.value+")"))??(me==null?void 0:me.find(We=>!(We!=null&&We.selectLabel))),((z=Be==null?void 0:Be.contents)==null?void 0:z.length)>0){let We=[];if(Be!=null&&Be.contents.some(rt=>Array.isArray(rt)&&(rt==null?void 0:rt.find(ke=>ke.children))))q.value===""?We=(ie=(fe=rn.getGradeColumns(Oe.cloneDeep(Be==null?void 0:Be.contents)))==null?void 0:fe[0])==null?void 0:ie.filter(rt=>!Array.isArray(rt)):(q.value.split("-"),We=(Ae=rn.getGradeColumns(Oe.cloneDeep(Be==null?void 0:Be.contents)))==null?void 0:Ae[0]);else{const rt=Be!=null&&Be.contents.some(ke=>Array.isArray(ke))?(re=Be==null?void 0:Be.contents)==null?void 0:re[0]:Be==null?void 0:Be.contents;rt==null||rt.forEach((ke,ht)=>{var xn;We.push({label:(ke==null?void 0:ke.label)??"",prop:(ke==null?void 0:ke.label)==="操作"?"operate":(ke==null?void 0:ke.prop)??"a"+ht,width:ke!=null&&ke.width?parseInt(ke.width):"",fixed:(ke==null?void 0:ke.fixed)??void 0,sortable:(ke==null?void 0:ke.sortable)??!1,align:(ke==null?void 0:ke.align)??"left",showOverflowTooltip:(ke==null?void 0:ke.showOverflowTooltip)??!0,isNotDrag:(ke==null?void 0:ke.isNotDrag)??!1,isEditCol:(ke==null?void 0:ke.isEditCol)??!1,isOperate:(ke==null?void 0:ke.isOperate)??!1,id:(ke==null?void 0:ke.id)??ht,type:(ke==null?void 0:ke.label)==="操作"?"operate":void 0,formType:(ke==null?void 0:ke.formType)??(ke!=null&&ke.groupSelect?"Select":""),isTableColHidden:ke==null?void 0:ke.isTableColHidden,isFormColHidden:ke==null?void 0:ke.isFormColHidden,options:(ke==null?void 0:ke.options)??[],value:(ke==null?void 0:ke.value)??"",formMenuSelect:(ke==null?void 0:ke.formMenuSelect)??[],isRoute:(ke==null?void 0:ke.isRoute)??!1,groupSelect:ke!=null&&ke.groupSelect?(xn=ke==null?void 0:ke.groupSelect)==null?void 0:xn.replaceAll('"',"").split(":"):[],isMainKey:ke==null?void 0:ke.isMainKey})})}a.value=We,d.value=We,t.value=(Ge=a.value)==null?void 0:Ge.map(rt=>rt==null?void 0:rt.label);let Pt=(Pe=(Me=rn.getAllLeafNodes(Oe.cloneDeep(a.value)))==null?void 0:Me.filter(rt=>(rt==null?void 0:rt.type)!=="operate"))==null?void 0:Pe.map((rt,ke)=>({prop:(rt==null?void 0:rt.prop)??"a"+ke,column:rt.label}));ve.value=Pt;let Ot=[];ee.value===""?Ot=_e==null?void 0:_e[0]:Ot=(_e==null?void 0:_e.find(rt=>(rt==null?void 0:rt.selectLabel)==="("+ee.value+")"))??(_e==null?void 0:_e.find(rt=>!(rt!=null&&rt.selectLabel)));let Jt=Array.isArray((it=Ot==null?void 0:Ot.contents)==null?void 0:it[0])&&((Mt=Ot==null?void 0:Ot.contents)!=null&&Mt[0].every(rt=>Array.isArray(rt)))?(Ct=Oe.cloneDeep(Ot==null?void 0:Ot.contents))==null?void 0:Ct[0]:Oe.cloneDeep(Ot==null?void 0:Ot.contents);Te!=null&&Te.contents&&((bt=Te==null?void 0:Te.contents)==null?void 0:bt.length)!==0&&(Jt=(St=Oe.cloneDeep(Jt))==null?void 0:St.map((rt,ke)=>{if(!Array.isArray(rt)){let ht={};for(let xn in rt)xn!=="id"&&xn!=="index"&&(ht[xn]=rt[xn]);rt=Object.values(ht)}return rt}));const sn=!!((Qe=a.value)!=null&&Qe.find(rt=>rt.prop==="index"));Jt=yu(Oe.cloneDeep(Jt),Te==null?void 0:Te.contents,sn);const Kt=[];Jt==null||Jt.forEach((rt,ke)=>{var xn;let ht={};if(Array.isArray(rt)){let x=[];rt==null||rt.filter(M=>!(M!=null&&M.id)).forEach((M,N)=>{var D,U,he,xe,lt,je;if((D=Pt==null?void 0:Pt[N])!=null&&D.prop&&!Array.isArray(M)){let nt={};nt[Pt[N].column]=M,f!=null&&f.value&&((U=f==null?void 0:f.value)==null?void 0:U.length)>0&&((he=f==null?void 0:f.value)!=null&&he.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(nt)))&&(x=(xe=f==null?void 0:f.value)==null?void 0:xe.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(nt))),x&&x.length>0?ht[Pt[N].prop]=x!=null&&x.find(ct=>{var Ne;return((Ne=Object.keys(ct))==null?void 0:Ne[0])===Pt[N].column})?(lt=x==null?void 0:x.find(ct=>{var Ne;return((Ne=Object.keys(ct))==null?void 0:Ne[0])===Pt[N].column}))==null?void 0:lt[Pt[N].column]:M:ht[Pt[N].prop]=M}else Array.isArray(M)&&((je=Pt[N])!=null&&je.prop?ht[Pt[N].prop]=M:ht.children=vu(M,Pt))})}else ht=rt;Array.isArray(rt)&&rt.some(x=>x==null?void 0:x.id)?Kt.push(Object.assign(ht,{id:(xn=rt==null?void 0:rt.find(x=>x.id))==null?void 0:xn.id})):ht.id?Kt.push(ht):Kt.push(Object.assign(ht,{id:ke.toString()}))}),v.value=Kt}else a.value=[],l.value=[],v.value=[];((Wt=ce==null?void 0:ce.contents)==null?void 0:Wt.length)>0?H.value=ce==null?void 0:ce.contents:H.value=[],((Nt=de==null?void 0:de.contents)==null?void 0:Nt.length)>0?(G.value=de==null?void 0:de.contents,le.value=de==null?void 0:de.contents):(G.value=[],le.value=[]),F.value=((nn=v==null?void 0:v.value)==null?void 0:nn.length)??0,ge.value=v.value,Ce.value&&(a.value=(cn=(Bt=l.value)==null?void 0:Bt.filter(We=>(We==null?void 0:We.label)!=="操作"))==null?void 0:cn.map(We=>{var Pt;return{...We,type:"edit",optionUrl:We!=null&&We.formMenuSelect&&((Pt=We==null?void 0:We.formMenuSelect)==null?void 0:Pt.length)>0?{groupSelect:We==null?void 0:We.groupSelect,menuSelect:We==null?void 0:We.formMenuSelect,selectRelateType:"",type:We==null?void 0:We.formType}:null}}),Ut())},{deep:!0,immediate:!0}),y.watch(()=>r==null?void 0:r.operatingForm,Y=>{Y!=null&&Y.form&&($e(Y==null?void 0:Y.form),R.value=Y==null?void 0:Y.dialogTitle,Q.value=!0,P.value=!0)},{immediate:!0,deep:!0});const Cn=()=>{Ce.value=!Ce.value,Ce.value?(Ut("viewChange"),p.setCacheUpdatingData(null),_t.value=null):(G.value=le.value,a.value=d.value,_t.value&&o("change",_t.value))};y.ref(!1);const Hn=Y=>{Ut("createClick")},fs=(Y,W,ce)=>{var de,_e;Ee.value=Oe.cloneDeep(Y),b.value=Y==null?void 0:Y.id,F.value=(de=v.value)==null?void 0:de.length,R.value=(Y==null?void 0:Y.id)===((_e=v.value)==null?void 0:_e.length)?"新增":"编辑",ze(!0)},Yi=Y=>{var Re,qe,te,Ve,Xe,ft,w,V,X,J;const{row:W,column:ce,item:de,slotData:_e}=Y;let me=W!=null&&W[ce==null?void 0:ce.prop]?((qe=(Re=W==null?void 0:W[ce==null?void 0:ce.prop])==null?void 0:Re[0])==null?void 0:qe.contents)??(W==null?void 0:W[ce==null?void 0:ce.prop]):((Ve=(te=W==null?void 0:W[de==null?void 0:de.prop])==null?void 0:te[0])==null?void 0:Ve.contents)??(W==null?void 0:W[de==null?void 0:de.prop])??((ft=(Xe=_e==null?void 0:_e[de==null?void 0:de.prop])==null?void 0:Xe[0])==null?void 0:ft.contents)??(_e==null?void 0:_e[de==null?void 0:de.prop])??((X=(V=W==null?void 0:W[(w=de==null?void 0:de.child)==null?void 0:w.prop])==null?void 0:V[0])==null?void 0:X.contents)??(W==null?void 0:W[(J=de==null?void 0:de.child)==null?void 0:J.prop]),Te=Array.isArray(me)&&!(me!=null&&me.every(z=>typeof z=="string"||typeof z=="number"))?"查看":me;return Te=Array.isArray(Te)?Te.join(","):Te,Te},ei=Y=>{var qe,te,Ve,Xe,ft,w,V,X,J,z;const{row:W,column:ce,item:de,slotData:_e}=Y;let me=W!=null&&W[ce==null?void 0:ce.prop]?((te=(qe=W==null?void 0:W[ce==null?void 0:ce.prop])==null?void 0:qe[0])==null?void 0:te.contents)??(W==null?void 0:W[ce==null?void 0:ce.prop]):((Xe=(Ve=W==null?void 0:W[de==null?void 0:de.prop])==null?void 0:Ve[0])==null?void 0:Xe.contents)??(W==null?void 0:W[de==null?void 0:de.prop])??((w=(ft=_e==null?void 0:_e[de==null?void 0:de.prop])==null?void 0:ft[0])==null?void 0:w.contents)??(_e==null?void 0:_e[de==null?void 0:de.prop])??((J=(X=W==null?void 0:W[(V=de==null?void 0:de.child)==null?void 0:V.prop])==null?void 0:X[0])==null?void 0:J.contents)??(W==null?void 0:W[(z=de==null?void 0:de.child)==null?void 0:z.prop]);const Te=Array.isArray(me)&&!(me!=null&&me.every(fe=>typeof fe=="string"||typeof fe=="number")),Re=Array.isArray(me)&&(me==null?void 0:me.find(fe=>fe==null?void 0:fe.url));return Te&&Re};return(Y,W)=>{var Re,qe;const ce=y.resolveComponent("el-icon"),de=y.resolveComponent("el-popover"),_e=y.resolveComponent("svg-icon"),me=y.resolveComponent("el-checkbox"),Be=y.resolveComponent("el-checkbox-group"),Te=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",q6,[(y.openBlock(),y.createBlock(On.ssTable,{columns:a.value,checkedColumns:t.value,key:a.value,tableData:v.value,isEditViewport:Ce.value,isShowPagination:C.value,isShowEdit:!1,isShowDelete:!1,onDbClickRow:ye,extraButton:G.value,onContentClick:Ze,onRowClick:yt,onSelectChange:dt,onCellChange:fs,onChange:we,onPreview:ot},y.createSlots({headerButton:y.withCtx(te=>[s.showHeader?(y.openBlock(),y.createBlock(F6,{key:0,compName:s.compName,buttons:te.buttons,onButtonClick:W[0]||(W[0]=Ve=>st(Ve,"",{})),columns:a.value,onFilter:De},null,8,["compName","buttons","columns"])):y.createCommentVNode("",!0)]),viewport:y.withCtx(()=>{var te;return[((te=v.value)==null?void 0:te.length)>0?(y.openBlock(),y.createElementBlock("div",J6,[y.createElementVNode("span",{title:"编辑视图",onClick:Cn},[y.createVNode(_e,{name:"editTable",class:"view-icon"})])])):y.createCommentVNode("",!0)]}),rowCreate:y.withCtx(({row:te})=>[y.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:Ve=>Hn()},[y.createVNode(_e,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,K6)]),operateCol:y.withCtx(()=>[y.createVNode(de,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"click",onShow:ut},{reference:y.withCtx(()=>[y.createElementVNode("span",Z6,[y.createVNode(_e,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:y.withCtx(()=>[y.createElementVNode("div",Q6,[y.createVNode(Be,{modelValue:t.value,"onUpdate:modelValue":W[2]||(W[2]=te=>t.value=te),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:y.withCtx(()=>[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(Fe.value,te=>(y.openBlock(),y.createBlock(me,{key:te.label,label:te.label,value:te.label,style:{width:"100%",marginRight:0}},{default:y.withCtx(()=>[y.createElementVNode("span",null,y.toDisplayString(te.label),1),y.createVNode(_e,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px",cursor:"move",color:"grey",position:"absolute",right:"5px"}})]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:y.withCtx(te=>[ei(te)?(y.openBlock(),y.createBlock(de,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:y.withCtx(()=>[y.createElementVNode("span",e5,y.toDisplayString(Yi(te)),1)]),default:y.withCtx(()=>{var Ve;return[y.createElementVNode("div",t5,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(te==null?void 0:te.row[(Ve=te==null?void 0:te.column)==null?void 0:Ve.prop],Xe=>(y.openBlock(),y.createElementBlock("div",n5,[y.createElementVNode("div",{class:"prop-url",title:jt(Xe),onClick:ft=>k(Xe)},y.toDisplayString(jt(Xe)),9,i5),y.createElementVNode("div",{class:"prop-download",onClick:ft=>T(Xe)}," 下载 ",8,s5)]))),256))])]}),_:2},1024)):(y.openBlock(),y.createElementBlock(y.Fragment,{key:1},[y.createTextVNode(y.toDisplayString(Yi(te)),1)],64))]),_:2},[((Re=H.value)==null?void 0:Re.length)>0?{name:"actions",fn:y.withCtx(({item:te})=>[y.createVNode(de,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:y.withCtx(()=>[y.createVNode(ce,null,{default:y.withCtx(()=>[y.createVNode(y.unref(Pn.more_filled_default))]),_:1})]),default:y.withCtx(()=>[y.createElementVNode("div",$6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(oe(H.value,te),(Ve,Xe)=>(y.openBlock(),y.createElementBlock("div",{class:"menu-config-item",key:Xe,onClick:ft=>st(Ve==null?void 0:Ve.label,te,{extra:Ve})},[y.createElementVNode("div",{style:y.normalizeStyle({color:Ve==null?void 0:Ve.textColor}),class:"extra-button-label"},y.toDisplayString(Ve==null?void 0:Ve.label),5)],8,Y6))),128))])]),_:2},1024)]),key:"0"}:void 0,((qe=v.value)==null?void 0:qe.length)>0?{name:"batchButton",fn:y.withCtx(te=>[y.createVNode(U6,{buttons:te.buttons,onButtonClick:W[1]||(W[1]=Ve=>st(Ve,"",{}))},null,8,["buttons"])]),key:"1"}:void 0]),1032,["columns","checkedColumns","tableData","isEditViewport","isShowPagination","extraButton"])),y.createVNode(On.ssDialog,{title:R.value,visible:P.value,width:pe.value,onBeforeDestroy:tt},{default:y.withCtx(()=>[y.createElementVNode("div",r5,[y.createVNode(On.ssForm,{rowContents:Z.value,isEnableWrap:!1,onChange:pt,onClickTrigger:Le,isEdit:S.value,onBlurChange:at},null,8,["rowContents","isEdit"])])]),footer:y.withCtx(()=>[Q.value?(y.openBlock(),y.createElementBlock("div",a5,[y.createVNode(Te,{onClick:W[3]||(W[3]=te=>P.value=!1),id:"themeBorderButton"},{default:y.withCtx(()=>W[7]||(W[7]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[7]}),y.createVNode(Te,{class:"ok-button",onClick:W[4]||(W[4]=te=>ze(!0)),id:"themeButton"},{default:y.withCtx(()=>W[8]||(W[8]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[8]})])):y.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),y.createVNode(On.ssDialog,{title:R.value,visible:E.value,width:L.value,onBeforeDestroy:W[6]||(W[6]=te=>E.value=!1)},{default:y.withCtx(()=>[y.createVNode(H6)]),footer:y.withCtx(()=>[y.createElementVNode("div",o5,[y.createVNode(Te,{onClick:W[5]||(W[5]=te=>E.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:y.withCtx(()=>W[9]||(W[9]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[9]}),y.createVNode(Te,{class:"ok-button",onClick:Ue,id:"themeButton"},{default:y.withCtx(()=>W[10]||(W[10]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["title","visible","width"]),m.value?(y.openBlock(),y.createBlock(On.ssFilePreview,{key:0,fileDataList:u.value,onDestroy:mt},null,8,["fileDataList"])):y.createCommentVNode("",!0),c.value?(y.openBlock(),y.createBlock(On.ssDialog,{key:1,visible:c.value,onBeforeDestroy:K,style:{height:"700px",width:"1000px"}},{default:y.withCtx(()=>[c.value?(y.openBlock(),y.createBlock(mu,{key:0,"urdf-url":ae.value},null,8,["urdf-url"])):y.createCommentVNode("",!0)]),_:1},8,["visible"])):y.createCommentVNode("",!0)])}}},Eu=Pi._export_sfc(l5,[["__scopeId","data-v-d11a7613"]]);exports.ACESFilmicToneMapping=Gl;exports.AmbientLight=cc;exports.Box3=Fn;exports.CatmullRomCurve3=rc;exports.Color=Tt;exports.DirectionalLight=gr;exports.DoubleSide=pn;exports.Euler=Sn;exports.GridHelper=K0;exports.HemisphereLight=J0;exports.MOUSE=Ti;exports.MathUtils=Ei;exports.Matrix4=Et;exports.Mesh=zt;exports.MeshPhongMaterial=fn;exports.OrbitControls=ru;exports.PCFSoftShadowMap=Hl;exports.PerspectiveCamera=bn;exports.Plane=Jn;exports.PlaneGeometry=Di;exports.PointLight=Pa;exports.SRGBColorSpace=qt;exports.Scene=Ia;exports.ShadowMaterial=X0;exports.TubeGeometry=ka;exports.Vector3=I;exports.WebGLRenderer=iu;exports.Xe=uu;exports.formGetOptions=Ho;exports.getSelectRow=kl;exports.isString=Vo;exports.ssTable=Eu;exports.threeView=mu;exports.useFormComp=Su;exports.useFormToTableComp=gu;exports.useModelLoader=z6;exports.useTableComp=bu;exports.useUnit=_u;
|