ss-component-new 1.1.708 → 1.1.711
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-ChoJA9-j.cjs → index--bv1sDHX.cjs} +28 -28
- package/dist/{index-BTiKUORz.js → index-9WMPYp3i.js} +2 -2
- package/dist/{index-Chz6JgEi.cjs → index-B-2kZaOf.cjs} +1 -1
- package/dist/index-B8KHQE8o.js +4823 -0
- package/dist/{index-sH_FoGx7.cjs → index-BAabFQMm.cjs} +1 -1
- package/dist/{index-C0jLgnJF.js → index-BJL4rzyr.js} +2 -2
- package/dist/{index-JmOAbrwO.cjs → index-BJuJt6qG.cjs} +1 -1
- package/dist/{index-BUkhaqd8.cjs → index-BK66FTPD.cjs} +1 -1
- package/dist/{index-DAMRPbhU.js → index-BMx2dBDp.js} +5 -5
- package/dist/{index-Dr7Fdc81.js → index-BjAcP--p.js} +1 -1
- package/dist/{index-Dm9remQj.js → index-Bt-jwNCY.js} +5020 -4973
- package/dist/{index-CJX26tPy.cjs → index-C5ZqW_r-.cjs} +1 -1
- package/dist/{index-Bz_C5jjT.js → index-C7JvOUv2.js} +2 -2
- package/dist/index-CJSAizoe.cjs +1 -0
- package/dist/{index-lVXpDd-x.cjs → index-CKr5PRcD.cjs} +1 -1
- package/dist/{index-CdYqA8UG.cjs → index-CT3wMwRX.cjs} +1 -1
- package/dist/{index-D-tQ0jb6.js → index-C_CZDDE1.js} +10 -10
- package/dist/{index-DSNNd0ZH.js → index-CevoeHBh.js} +1 -1
- package/dist/{index-cn2PPpBp.cjs → index-CnmRQ9CL.cjs} +1 -1
- package/dist/{index-DGJWUlc0.cjs → index-D9x06-zf.cjs} +1 -1
- package/dist/{index-BNkTi_Un.cjs → index-DCaCF28N.cjs} +1 -1
- package/dist/{index-D1fd5HJJ.cjs → index-DGtDddyd.cjs} +1 -1
- package/dist/{index-BvRLbvq4.js → index-DQ_8oUmc.js} +2 -2
- package/dist/{index-CZTZmXUb.js → index-DSLnTyVX.js} +2 -2
- package/dist/{index-Dl7UsRXv.cjs → index-DWIuZjVT.cjs} +1 -1
- package/dist/{index-PKvWYrg9.cjs → index-DZDa3NV9.cjs} +1 -1
- package/dist/{index-CAoCSEXG.js → index-DbrKIy2F.js} +1 -1
- package/dist/{index-d_ANkYaS.cjs → index-Dohv8QcW.cjs} +1 -1
- package/dist/{index-C5iB-Jqa.js → index-Dpq2t0uy.js} +1 -1
- package/dist/{index-DAXBDVD_.js → index-Du6-UwQn.js} +1 -1
- package/dist/{index-CZcYAuy-.js → index-DuGe1Hyh.js} +1 -1
- package/dist/{index-Dc2D3OrH.js → index-DzviavC7.js} +2 -2
- package/dist/{index-CuB10mRD.js → index-G9_BNddF.js} +3 -3
- package/dist/{index-Bz3Cezt5.js → index-L6ztFz-U.js} +1 -1
- package/dist/{index-CLNkIjl-.cjs → index-LVUM3FsY.cjs} +1 -1
- package/dist/{index-ISxzVDVL.cjs → index-VkWZf-DO.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CsnYhrp-.js → index.vue_vue_type_script_setup_true_lang-DInccyUf.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-oueibXbB.cjs → index.vue_vue_type_script_setup_true_lang-Dy1EUdcV.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BrQQ9PKj.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BVVTwNur.js} +1723 -1714
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dc6lRgBQ.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CWcYWTKs.cjs} +57 -57
- package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-BiGhmLqK.js → index.vue_vue_type_style_index_0_scoped_8606206c_lang-BvhiWDh4.js} +3277 -3281
- package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-DAqIbp0A.cjs → index.vue_vue_type_style_index_0_scoped_8606206c_lang-DtkRwcZE.cjs} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-qJpParw9.js → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Bn8cGP2Y.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Do7w7r05.cjs → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-D9fBLa0w.cjs} +1 -1
- package/dist/{main-ZNwRxRST.js → main-CG1Hb-t2.js} +2 -2
- package/dist/{main-8orFqQ9f.cjs → main-CHIZjrj7.cjs} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +8 -8
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-B8u76uPb.cjs → threeModel-DkwdD9tt.cjs} +1 -1
- package/dist/{threeModel-Dx_dcQrK.js → threeModel-jrajAmgk.js} +1 -1
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-B2ZJJoT9.js +0 -4762
- package/dist/index-CRQxupO9.cjs +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const y=require("vue"),
|
|
1
|
+
"use strict";const y=require("vue"),He=require("./menu-vml_xHJD.cjs"),Fn=require("./index-B-2kZaOf.cjs"),on=require("./index-2p69g4HY.cjs"),en=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CWcYWTKs.cjs"),Ci=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),wu=require("./login-CCz_BcJe.cjs");var Tu="[object String]";function Vo(s){return typeof s=="string"||!on.isArray(s)&&on.isObjectLike(s)&&on.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",Si={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,yi=3,Yn=0,Dn=1,cn=2,ki=0,Bs=1,yc=2,xc=3,Mc=4,Lu=5,is=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,Ko=6,Jo=7,Fa=0,Yu=1,Ku=2,Vi=0,Ju=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,oi=1e3,ei=1001,el=1002,Vn=1003,s2=1004,wr=1005,kn=1006,Xa=1007,Mi=1008,hi=1009,x0=1010,M0=1011,_r=1012,Wl=1013,ls=1014,li=1015,Sr=1016,Xl=1017,jl=1018,vr=1020,b0=35902,S0=1021,E0=1022,$n=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,Bi="",Vt="srgb",Xs="srgb-linear",Aa="linear",tn="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",bi=2e3,wa=2001;class hs{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 Sn=["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 ti(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Sn[s&255]+Sn[s>>8&255]+Sn[s>>16&255]+Sn[s>>24&255]+"-"+Sn[e&255]+Sn[e>>8&255]+"-"+Sn[e>>16&15|64]+Sn[e>>24&255]+"-"+Sn[t&63|128]+Sn[t>>8&255]+"-"+Sn[t>>16&255]+Sn[t>>24&255]+Sn[n&255]+Sn[n>>8&255]+Sn[n>>16&255]+Sn[n>>24&255]).toLowerCase()}function It(s,e,t){return Math.max(e,Math.min(t,s))}function Kl(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(Kl(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 Qn(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 en(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 xi={DEG2RAD:dr,RAD2DEG:js,generateUUID:ti,clamp:It,euclideanModulo:Kl,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:en,denormalize:Qn};class Je{constructor(e=0,t=0){Je.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=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(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(It(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 Un{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 f=1-a;const p=l*u+c*h+d*g+m*_,x=p>=0?1:-1,M=1-p*p;if(M>Number.EPSILON){const N=Math.sqrt(M),L=Math.atan2(N,p*x);f=Math.sin(f*L)/N,a=Math.sin(a*L)/N}const b=a*x;if(l=l*f+u*b,c=c*f+h*b,d=d*f+g*b,m=m*f+_*b,f===1-a){const N=1/Math.sqrt(l*l+c*c+d*d+m*m);l*=N,c*=N,d*=N,m*=N}}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(It(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 z{constructor(e=0,t=0,n=0){z.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=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this.z=It(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this.z=It(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(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(It(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 z,Rc=new Un;class Ut{constructor(e,t,n,i,r,o,a,l,c){Ut.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],f=i[3],p=i[6],x=i[1],M=i[4],b=i[7],N=i[2],L=i[5],P=i[8];return r[0]=o*_+a*x+l*N,r[3]=o*f+a*M+l*L,r[6]=o*p+a*b+l*P,r[1]=c*_+d*x+m*N,r[4]=c*f+d*M+m*L,r[7]=c*p+d*b+m*P,r[2]=u*_+h*x+g*N,r[5]=u*f+h*M+g*L,r[8]=u*p+h*b+g*P,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 Ut;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 Ut().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Pc=new Ut().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===tn&&(i.r=Ei(i.r),i.g=Ei(i.g),i.b=Ei(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===tn&&(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===Bi?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:Vt},outputColorSpaceConfig:{drawingBufferColorSpace:Vt}},[Vt]:{primaries:e,whitePoint:n,transfer:tn,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Vt}}}),s}const Bt=I2();function Ei(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]=Ei(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(Ei(t[n]/255)*255):t[n]=Ei(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 Jl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:B2++}),this.uuid=ti(),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 Ka=new z;class Mn extends hs{constructor(e=Mn.DEFAULT_IMAGE,t=Mn.DEFAULT_MAPPING,n=ei,i=ei,r=kn,o=Mi,a=$n,l=hi,c=Mn.DEFAULT_ANISOTROPY,d=Bi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:O2++}),this.uuid=ti(),this.name="",this.source=new Jl(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 Je(0,0),this.repeat=new Je(1,1),this.center=new Je(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ut,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(Ka).x}get height(){return this.source.getSize(Ka).y}get depth(){return this.source.getSize(Ka).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 oi:e.x=e.x-Math.floor(e.x);break;case ei: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 oi:e.y=e.y-Math.floor(e.y);break;case ei: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++}}Mn.DEFAULT_IMAGE=null;Mn.DEFAULT_MAPPING=y0;Mn.DEFAULT_ANISOTROPY=1;class Ot{constructor(e=0,t=0,n=0,i=1){Ot.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],f=l[6],p=l[10];if(Math.abs(d-u)<.01&&Math.abs(m-_)<.01&&Math.abs(g-f)<.01){if(Math.abs(d+u)<.1&&Math.abs(m+_)<.1&&Math.abs(g+f)<.1&&Math.abs(c+h+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const M=(c+1)/2,b=(h+1)/2,N=(p+1)/2,L=(d+u)/4,P=(m+_)/4,I=(g+f)/4;return M>b&&M>N?M<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(M),i=L/n,r=P/n):b>N?b<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(b),n=L/i,r=I/i):N<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(N),n=P/r,i=I/r),this.set(n,i,r,t),this}let x=Math.sqrt((f-g)*(f-g)+(m-_)*(m-_)+(u-d)*(u-d));return Math.abs(x)<.001&&(x=1),this.x=(f-g)/x,this.y=(m-_)/x,this.z=(u-d)/x,this.w=Math.acos((c+h+p-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=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this.z=It(this.z,e.z,t.z),this.w=It(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this.z=It(this.z,e,t),this.w=It(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(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 hs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:kn,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 Ot(0,0,e,t),this.scissorTest=!1,this.viewport=new Ot(0,0,e,t);const i={width:e,height:t,depth:n.depth},r=new Mn(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:kn,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 Jl(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 cs extends k2{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class D0 extends Mn{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=Vn,this.minFilter=Vn,this.wrapR=ei,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 Mn{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=Vn,this.minFilter=Vn,this.wrapR=ei,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Tn{constructor(e=new z(1/0,1/0,1/0),t=new z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Kn.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Kn.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=Kn.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,Kn):Kn.fromBufferAttribute(r,o),Kn.applyMatrix4(e.matrixWorld),this.expandByPoint(Kn);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,Kn),Kn.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),Li.subVectors(vs,_s),Pi.subVectors(ys,vs),$i.subVectors(_s,ys);let t=[0,-Li.z,Li.y,0,-Pi.z,Pi.y,0,-$i.z,$i.y,Li.z,0,-Li.x,Pi.z,0,-Pi.x,$i.z,0,-$i.x,-Li.y,Li.x,0,-Pi.y,Pi.x,0,-$i.y,$i.x,0];return!Ja(t,_s,vs,ys,Cr)||(t=[1,0,0,0,1,0,0,0,1],!Ja(t,_s,vs,ys,Cr))?!1:(Rr.crossVectors(Li,Pi),t=[Rr.x,Rr.y,Rr.z],Ja(t,_s,vs,ys,Cr))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Kn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Kn).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:(fi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fi),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 fi=[new z,new z,new z,new z,new z,new z,new z,new z],Kn=new z,Tr=new Tn,_s=new z,vs=new z,ys=new z,Li=new z,Pi=new z,$i=new z,er=new z,Cr=new z,Rr=new z,Yi=new z;function Ja(s,e,t,n,i){for(let r=0,o=s.length-3;r<=o;r+=3){Yi.fromArray(s,r);const a=i.x*Math.abs(Yi.x)+i.y*Math.abs(Yi.y)+i.z*Math.abs(Yi.z),l=e.dot(Yi),c=t.dot(Yi),d=n.dot(Yi);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const H2=new Tn,tr=new z,Za=new z;class Ri{constructor(e=new z,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const 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 pi=new z,Qa=new z,Dr=new z,Fi=new z,eo=new z,Lr=new z,to=new z;class Ys{constructor(e=new z,t=new z(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,pi)),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=pi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(pi.copy(this.origin).addScaledVector(this.direction,t),pi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Qa.copy(e).add(t).multiplyScalar(.5),Dr.copy(t).sub(e).normalize(),Fi.copy(this.origin).sub(Qa);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Dr),a=Fi.dot(this.direction),l=-Fi.dot(Dr),c=Fi.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){pi.subVectors(e.center,this.origin);const n=pi.dot(this.direction),i=pi.dot(pi)-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,pi)!==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;Fi.subVectors(this.origin,e);const l=a*this.direction.dot(Lr.crossVectors(Fi,Lr));if(l<0)return null;const c=a*this.direction.dot(eo.cross(Fi));if(c<0||l+c>o)return null;const d=-a*Fi.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 Mt{constructor(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,f){Mt.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,_,f)}set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,f){const p=this.elements;return p[0]=e,p[4]=t,p[8]=n,p[12]=i,p[1]=r,p[5]=o,p[9]=a,p[13]=l,p[2]=c,p[6]=d,p[10]=m,p[14]=u,p[3]=h,p[7]=g,p[11]=_,p[15]=f,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 Mt().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 Bn.subVectors(e,t),Bn.lengthSq()===0&&(Bn.z=1),Bn.normalize(),Ni.crossVectors(n,Bn),Ni.lengthSq()===0&&(Math.abs(n.z)===1?Bn.x+=1e-4:Bn.z+=1e-4,Bn.normalize(),Ni.crossVectors(n,Bn)),Ni.normalize(),Pr.crossVectors(Bn,Ni),i[0]=Ni.x,i[4]=Pr.x,i[8]=Bn.x,i[1]=Ni.y,i[5]=Pr.y,i[9]=Bn.y,i[2]=Ni.z,i[6]=Pr.z,i[10]=Bn.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],f=n[10],p=n[14],x=n[3],M=n[7],b=n[11],N=n[15],L=i[0],P=i[4],I=i[8],A=i[12],E=i[1],F=i[5],B=i[9],X=i[13],Z=i[2],se=i[6],W=i[10],he=i[14],Q=i[3],xe=i[7],De=i[11],Ae=i[15];return r[0]=o*L+a*E+l*Z+c*Q,r[4]=o*P+a*F+l*se+c*xe,r[8]=o*I+a*B+l*W+c*De,r[12]=o*A+a*X+l*he+c*Ae,r[1]=d*L+m*E+u*Z+h*Q,r[5]=d*P+m*F+u*se+h*xe,r[9]=d*I+m*B+u*W+h*De,r[13]=d*A+m*X+u*he+h*Ae,r[2]=g*L+_*E+f*Z+p*Q,r[6]=g*P+_*F+f*se+p*xe,r[10]=g*I+_*B+f*W+p*De,r[14]=g*A+_*X+f*he+p*Ae,r[3]=x*L+M*E+b*Z+N*Q,r[7]=x*P+M*F+b*se+N*xe,r[11]=x*I+M*B+b*W+N*De,r[15]=x*A+M*X+b*he+N*Ae,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],f=e[11],p=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)+f*(+t*c*m-t*a*h-r*o*m+n*o*h+r*a*d-n*c*d)+p*(-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],f=e[14],p=e[15],x=m*f*c-_*u*c+_*l*h-a*f*h-m*l*p+a*u*p,M=g*u*c-d*f*c-g*l*h+o*f*h+d*l*p-o*u*p,b=d*_*c-g*m*c+g*a*h-o*_*h-d*a*p+o*m*p,N=g*m*l-d*_*l-g*a*u+o*_*u+d*a*f-o*m*f,L=t*x+n*M+i*b+r*N;if(L===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/L;return e[0]=x*P,e[1]=(_*u*r-m*f*r-_*i*h+n*f*h+m*i*p-n*u*p)*P,e[2]=(a*f*r-_*l*r+_*i*c-n*f*c-a*i*p+n*l*p)*P,e[3]=(m*l*r-a*u*r-m*i*c+n*u*c+a*i*h-n*l*h)*P,e[4]=M*P,e[5]=(d*f*r-g*u*r+g*i*h-t*f*h-d*i*p+t*u*p)*P,e[6]=(g*l*r-o*f*r-g*i*c+t*f*c+o*i*p-t*l*p)*P,e[7]=(o*u*r-d*l*r+d*i*c-t*u*c-o*i*h+t*l*h)*P,e[8]=b*P,e[9]=(g*m*r-d*_*r-g*n*h+t*_*h+d*n*p-t*m*p)*P,e[10]=(o*_*r-g*a*r+g*n*c-t*_*c-o*n*p+t*a*p)*P,e[11]=(d*a*r-o*m*r-d*n*c+t*m*c+o*n*h-t*a*h)*P,e[12]=N*P,e[13]=(d*_*i-g*m*i+g*n*u-t*_*u-d*n*f+t*m*f)*P,e[14]=(g*a*i-o*_*i-g*n*l+t*_*l+o*n*f-t*a*f)*P,e[15]=(o*m*i-d*a*i+d*n*l-t*m*l-o*n*u+t*a*u)*P,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,f=o*m,p=a*m,x=l*c,M=l*d,b=l*m,N=n.x,L=n.y,P=n.z;return i[0]=(1-(_+p))*N,i[1]=(h+b)*N,i[2]=(g-M)*N,i[3]=0,i[4]=(h-b)*L,i[5]=(1-(u+p))*L,i[6]=(f+x)*L,i[7]=0,i[8]=(g+M)*P,i[9]=(f-x)*P,i[10]=(1-(u+_))*P,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],Jn.copy(this);const c=1/r,d=1/o,m=1/a;return Jn.elements[0]*=c,Jn.elements[1]*=c,Jn.elements[2]*=c,Jn.elements[4]*=d,Jn.elements[5]*=d,Jn.elements[6]*=d,Jn.elements[8]*=m,Jn.elements[9]*=m,Jn.elements[10]*=m,t.setFromRotationMatrix(Jn),n.x=r,n.y=o,n.z=a,this}makePerspective(e,t,n,i,r,o,a=bi){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===bi)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=bi){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===bi)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 z,Jn=new Mt,G2=new z(0,0,0),W2=new z(1,1,1),Ni=new z,Pr=new z,Bn=new z,Fc=new Mt,Nc=new Un;class _n{constructor(e=0,t=0,n=0,i=_n.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(It(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(-It(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(It(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(-It(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(It(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(-It(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}}_n.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 z,Ms=new Un,mi=new Mt,Fr=new z,nr=new z,j2=new z,q2=new Un,Ic=new z(1,0,0),zc=new z(0,1,0),Bc=new z(0,0,1),Oc={type:"added"},$2={type:"removed"},bs={type:"childadded",child:null},no={type:"childremoved",child:null};class sn extends hs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:X2++}),this.uuid=ti(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=sn.DEFAULT_UP.clone();const e=new z,t=new _n,n=new Un,i=new z(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 Mt},normalMatrix:{value:new Ut}}),this.matrix=new Mt,this.matrixWorld=new Mt,this.matrixAutoUpdate=sn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=sn.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(mi.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?mi.lookAt(nr,Fr,this.up):mi.lookAt(Fr,nr,this.up),this.quaternion.setFromRotationMatrix(mi),i&&(mi.extractRotation(i.matrixWorld),Ms.setFromRotationMatrix(mi),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),mi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),mi.multiply(e.parent.matrixWorld)),e.applyMatrix4(mi),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}}sn.DEFAULT_UP=new z(0,1,0);sn.DEFAULT_MATRIX_AUTO_UPDATE=!0;sn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Zn=new z,gi=new z,io=new z,_i=new z,Ss=new z,Es=new z,kc=new z,so=new z,ro=new z,ao=new z,oo=new Ot,lo=new Ot,co=new Ot;class qn{constructor(e=new z,t=new z,n=new z){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),Zn.subVectors(e,t),i.cross(Zn);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){Zn.subVectors(i,t),gi.subVectors(n,t),io.subVectors(e,t);const o=Zn.dot(Zn),a=Zn.dot(gi),l=Zn.dot(io),c=gi.dot(gi),d=gi.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,_i)===null?!1:_i.x>=0&&_i.y>=0&&_i.x+_i.y<=1}static getInterpolation(e,t,n,i,r,o,a,l){return this.getBarycoord(e,t,n,i,_i)===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,_i.x),l.addScaledVector(o,_i.y),l.addScaledVector(a,_i.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 Zn.subVectors(n,t),gi.subVectors(e,t),Zn.cross(gi).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 Zn.subVectors(this.c,this.b),gi.subVectors(this.a,this.b),Zn.cross(gi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return qn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return qn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return qn.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return qn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return qn.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 f=d*g-h*m;if(f<=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 p=1/(f+_+u);return o=_*p,a=u*p,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},Ui={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 bt{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=Vt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Bt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Bt.workingColorSpace){if(e=Kl(e,1),t=It(t,0,1),n=It(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 Bt.colorSpaceToWorking(this,i),this}setStyle(e,t=Vt){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=Vt){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=Ei(e.r),this.g=Ei(e.g),this.b=Ei(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=Vt){return Bt.workingToColorSpace(En.copy(this),e),Math.round(It(En.r*255,0,255))*65536+Math.round(It(En.g*255,0,255))*256+Math.round(It(En.b*255,0,255))}getHexString(e=Vt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.workingToColorSpace(En.copy(this),t);const n=En.r,i=En.g,r=En.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=Bt.workingColorSpace){return Bt.workingToColorSpace(En.copy(this),t),e.r=En.r,e.g=En.g,e.b=En.b,e}getStyle(e=Vt){Bt.workingToColorSpace(En.copy(this),e);const t=En.r,n=En.g,i=En.b;return e!==Vt?`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(Ui),this.setHSL(Ui.h+e,Ui.s+t,Ui.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(Ui),e.getHSL(Nr);const n=fr(Ui.h,Nr.h,t),i=fr(Ui.s,Nr.s,t),r=fr(Ui.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 En=new bt;bt.NAMES=L0;let Y2=0;class Hn extends hs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Y2++}),this.uuid=ti(),this.name="",this.type="Material",this.blending=Bs,this.side=Yn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Go,this.blendDst=Wo,this.blendEquation=is,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new bt(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!==Yn&&(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!==is&&(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 Gi extends Hn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new bt(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 _n,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 un=new z,Ur=new Je;let K2=0;class hn{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:K2++}),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=li,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++)un.fromBufferAttribute(this,t),un.applyMatrix3(e),this.setXYZ(t,un.x,un.y,un.z);return this}applyMatrix4(e){for(let t=0,n=this.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}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=Qn(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=en(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Qn(t,this.array)),t}setX(e,t){return this.normalized&&(t=en(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Qn(t,this.array)),t}setY(e,t){return this.normalized&&(t=en(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=Qn(t,this.array)),t}setZ(e,t){return this.normalized&&(t=en(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=Qn(t,this.array)),t}setW(e,t){return this.normalized&&(t=en(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=en(t,this.array),n=en(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=en(t,this.array),n=en(n,this.array),i=en(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=en(t,this.array),n=en(n,this.array),i=en(i,this.array),r=en(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 hn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class J2 extends hn{constructor(e,t,n){super(new Int32Array(e),t,n)}}class F0 extends hn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Lt extends hn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Z2=0;const Wn=new Mt,uo=new sn,As=new z,On=new Tn,ir=new Tn,mn=new z;class rn extends hs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Z2++}),this.uuid=ti(),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 Ut().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 Wn.makeRotationFromQuaternion(e),this.applyMatrix4(Wn),this}rotateX(e){return Wn.makeRotationX(e),this.applyMatrix4(Wn),this}rotateY(e){return Wn.makeRotationY(e),this.applyMatrix4(Wn),this}rotateZ(e){return Wn.makeRotationZ(e),this.applyMatrix4(Wn),this}translate(e,t,n){return Wn.makeTranslation(e,t,n),this.applyMatrix4(Wn),this}scale(e,t,n){return Wn.makeScale(e,t,n),this.applyMatrix4(Wn),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 Lt(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 Tn);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 z(-1/0,-1/0,-1/0),new z(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];On.setFromBufferAttribute(r),this.morphTargetsRelative?(mn.addVectors(this.boundingBox.min,On.min),this.boundingBox.expandByPoint(mn),mn.addVectors(this.boundingBox.max,On.max),this.boundingBox.expandByPoint(mn)):(this.boundingBox.expandByPoint(On.min),this.boundingBox.expandByPoint(On.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 Ri);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 z,1/0);return}if(e){const n=this.boundingSphere.center;if(On.setFromBufferAttribute(e),t)for(let r=0,o=t.length;r<o;r++){const a=t[r];ir.setFromBufferAttribute(a),this.morphTargetsRelative?(mn.addVectors(On.min,ir.min),On.expandByPoint(mn),mn.addVectors(On.max,ir.max),On.expandByPoint(mn)):(On.expandByPoint(ir.min),On.expandByPoint(ir.max))}On.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 hn(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let I=0;I<n.count;I++)a[I]=new z,l[I]=new z;const c=new z,d=new z,m=new z,u=new Je,h=new Je,g=new Je,_=new z,f=new z;function p(I,A,E){c.fromBufferAttribute(n,I),d.fromBufferAttribute(n,A),m.fromBufferAttribute(n,E),u.fromBufferAttribute(r,I),h.fromBufferAttribute(r,A),g.fromBufferAttribute(r,E),d.sub(c),m.sub(c),h.sub(u),g.sub(u);const F=1/(h.x*g.y-g.x*h.y);isFinite(F)&&(_.copy(d).multiplyScalar(g.y).addScaledVector(m,-h.y).multiplyScalar(F),f.copy(m).multiplyScalar(h.x).addScaledVector(d,-g.x).multiplyScalar(F),a[I].add(_),a[A].add(_),a[E].add(_),l[I].add(f),l[A].add(f),l[E].add(f))}let x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let I=0,A=x.length;I<A;++I){const E=x[I],F=E.start,B=E.count;for(let X=F,Z=F+B;X<Z;X+=3)p(e.getX(X+0),e.getX(X+1),e.getX(X+2))}const M=new z,b=new z,N=new z,L=new z;function P(I){N.fromBufferAttribute(i,I),L.copy(N);const A=a[I];M.copy(A),M.sub(N.multiplyScalar(N.dot(A))).normalize(),b.crossVectors(L,A);const F=b.dot(l[I])<0?-1:1;o.setXYZW(I,M.x,M.y,M.z,F)}for(let I=0,A=x.length;I<A;++I){const E=x[I],F=E.start,B=E.count;for(let X=F,Z=F+B;X<Z;X+=3)P(e.getX(X+0)),P(e.getX(X+1)),P(e.getX(X+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 hn(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 z,r=new z,o=new z,a=new z,l=new z,c=new z,d=new z,m=new z;if(e)for(let u=0,h=e.count;u<h;u+=3){const g=e.getX(u+0),_=e.getX(u+1),f=e.getX(u+2);i.fromBufferAttribute(t,g),r.fromBufferAttribute(t,_),o.fromBufferAttribute(t,f),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),a.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),c.fromBufferAttribute(n,f),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(f,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,f=l.length;_<f;_++){a.isInterleavedBufferAttribute?h=l[_]*a.data.stride+a.offset:h=l[_]*d;for(let p=0;p<d;p++)u[g++]=c[h++]}return new hn(u,d,m)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new rn,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 Mt,Ki=new Ys,Ir=new Ri,Hc=new z,zr=new z,Br=new z,Or=new z,fo=new z,kr=new z,Gc=new z,Vr=new z;class Pt extends sn{constructor(e=new rn,t=new Gi){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),Ki.copy(e.ray).recast(e.near),!(Ir.containsPoint(Ki.origin)===!1&&(Ki.intersectSphere(Ir,Hc)===null||Ki.origin.distanceToSquared(Hc)>(e.far-e.near)**2))&&(Vc.copy(r).invert(),Ki.copy(e.ray).applyMatrix4(Vc),!(n.boundingBox!==null&&Ki.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Ki)))}_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 f=u[g],p=o[f.materialIndex],x=Math.max(f.start,h.start),M=Math.min(a.count,Math.min(f.start+f.count,h.start+h.count));for(let b=x,N=M;b<N;b+=3){const L=a.getX(b),P=a.getX(b+1),I=a.getX(b+2);i=Hr(this,p,e,n,c,d,m,L,P,I),i&&(i.faceIndex=Math.floor(b/3),i.face.materialIndex=f.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(a.count,h.start+h.count);for(let f=g,p=_;f<p;f+=3){const x=a.getX(f),M=a.getX(f+1),b=a.getX(f+2);i=Hr(this,o,e,n,c,d,m,x,M,b),i&&(i.faceIndex=Math.floor(f/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const f=u[g],p=o[f.materialIndex],x=Math.max(f.start,h.start),M=Math.min(l.count,Math.min(f.start+f.count,h.start+h.count));for(let b=x,N=M;b<N;b+=3){const L=b,P=b+1,I=b+2;i=Hr(this,p,e,n,c,d,m,L,P,I),i&&(i.faceIndex=Math.floor(b/3),i.face.materialIndex=f.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(l.count,h.start+h.count);for(let f=g,p=_;f<p;f+=3){const x=f,M=f+1,b=f+2;i=Hr(this,o,e,n,c,d,m,x,M,b),i&&(i.faceIndex=Math.floor(f/3),t.push(i))}}}}function Q2(s,e,t,n,i,r,o,a){let l;if(e.side===Dn?l=n.intersectTriangle(o,r,i,!0,a):l=n.intersectTriangle(i,r,o,e.side===Yn,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 z;qn.getBarycoord(Gc,zr,Br,Or,m),i&&(d.uv=qn.getInterpolatedAttribute(i,a,l,c,m,new Je)),r&&(d.uv1=qn.getInterpolatedAttribute(r,a,l,c,m,new Je)),o&&(d.normal=qn.getInterpolatedAttribute(o,a,l,c,m,new z),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const u={a,b:l,c,normal:new z,materialIndex:0};qn.getNormal(zr,Br,Or,u.normal),d.face=u,d.barycoord=m}return d}class Wi extends rn{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 Lt(c,3)),this.setAttribute("normal",new Lt(d,3)),this.setAttribute("uv",new Lt(m,2));function g(_,f,p,x,M,b,N,L,P,I,A){const E=b/P,F=N/I,B=b/2,X=N/2,Z=L/2,se=P+1,W=I+1;let he=0,Q=0;const xe=new z;for(let De=0;De<W;De++){const Ae=De*F-X;for(let pe=0;pe<se;pe++){const re=pe*E-B;xe[_]=re*x,xe[f]=Ae*M,xe[p]=Z,c.push(xe.x,xe.y,xe.z),xe[_]=0,xe[f]=0,xe[p]=L>0?1:-1,d.push(xe.x,xe.y,xe.z),m.push(pe/P),m.push(1-De/I),he+=1}}for(let De=0;De<I;De++)for(let Ae=0;Ae<P;Ae++){const pe=u+Ae+se*De,re=u+Ae+se*(De+1),q=u+(Ae+1)+se*(De+1),K=u+(Ae+1)+se*De;l.push(pe,re,K),l.push(re,q,K),Q+=6}a.addGroup(h,Q,A),h+=Q,u+=he}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Wi(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 Rn(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:Bt.workingColorSpace}const Ql={clone:qs,merge:Rn};var t1=`void main() {
|
|
5
|
+
*/const Vl="177",Si={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,yi=3,Yn=0,Dn=1,hn=2,ki=0,Bs=1,yc=2,xc=3,Mc=4,Lu=5,is=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,Ko=6,Jo=7,Fa=0,Yu=1,Ku=2,Vi=0,Ju=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,oi=1e3,ei=1001,el=1002,Vn=1003,s2=1004,wr=1005,kn=1006,Xa=1007,Mi=1008,hi=1009,x0=1010,M0=1011,_r=1012,Wl=1013,ls=1014,li=1015,Sr=1016,Xl=1017,jl=1018,vr=1020,b0=35902,S0=1021,A0=1022,$n=1023,yr=1026,xr=1027,E0=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,Al=36284,El=36285,wl=36286,Aa=2300,Tl=2301,ja=2302,Sc=2400,Ac=2401,Ec=2402,r2=2500,a2=3200,o2=3201,Ua=0,l2=1,Bi="",Vt="srgb",Xs="srgb-linear",Ea="linear",nn="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",bi=2e3,wa=2001;class hs{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 An=["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 ti(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(An[s&255]+An[s>>8&255]+An[s>>16&255]+An[s>>24&255]+"-"+An[e&255]+An[e>>8&255]+"-"+An[e>>16&15|64]+An[e>>24&255]+"-"+An[t&63|128]+An[t>>8&255]+"-"+An[t>>16&255]+An[t>>24&255]+An[n&255]+An[n>>8&255]+An[n>>16&255]+An[n>>24&255]).toLowerCase()}function It(s,e,t){return Math.max(e,Math.min(t,s))}function Kl(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(Kl(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 A2(s){return s*(.5-Math.random())}function E2(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 Qn(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 xi={DEG2RAD:dr,RAD2DEG:js,generateUUID:ti,clamp:It,euclideanModulo:Kl,mapLinear:g2,inverseLerp:_2,lerp:fr,damp:v2,pingpong:y2,smoothstep:x2,smootherstep:M2,randInt:b2,randFloat:S2,randFloatSpread:A2,seededRandom:E2,degToRad:w2,radToDeg:T2,isPowerOfTwo:C2,ceilPowerOfTwo:R2,floorPowerOfTwo:D2,setQuaternionFromProperEuler:L2,normalize:tn,denormalize:Qn};class Je{constructor(e=0,t=0){Je.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=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(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(It(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 Un{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 f=1-a;const p=l*u+c*h+d*g+m*_,x=p>=0?1:-1,M=1-p*p;if(M>Number.EPSILON){const N=Math.sqrt(M),L=Math.atan2(N,p*x);f=Math.sin(f*L)/N,a=Math.sin(a*L)/N}const b=a*x;if(l=l*f+u*b,c=c*f+h*b,d=d*f+g*b,m=m*f+_*b,f===1-a){const N=1/Math.sqrt(l*l+c*c+d*d+m*m);l*=N,c*=N,d*=N,m*=N}}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(It(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 z{constructor(e=0,t=0,n=0){z.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=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this.z=It(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this.z=It(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(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(It(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 z,Rc=new Un;class Ut{constructor(e,t,n,i,r,o,a,l,c){Ut.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],f=i[3],p=i[6],x=i[1],M=i[4],b=i[7],N=i[2],L=i[5],P=i[8];return r[0]=o*_+a*x+l*N,r[3]=o*f+a*M+l*L,r[6]=o*p+a*b+l*P,r[1]=c*_+d*x+m*N,r[4]=c*f+d*M+m*L,r[7]=c*p+d*b+m*P,r[2]=u*_+h*x+g*N,r[5]=u*f+h*M+g*L,r[8]=u*p+h*b+g*P,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 Ut;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 Ut().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Pc=new Ut().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===nn&&(i.r=Ai(i.r),i.g=Ai(i.g),i.b=Ai(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===nn&&(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===Bi?Ea: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:Ea,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Vt},outputColorSpaceConfig:{drawingBufferColorSpace:Vt}},[Vt]:{primaries:e,whitePoint:n,transfer:nn,toXYZ:Lc,fromXYZ:Pc,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Vt}}}),s}const Bt=I2();function Ai(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]=Ai(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(Ai(t[n]/255)*255):t[n]=Ai(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 Jl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:B2++}),this.uuid=ti(),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 Ka=new z;class bn extends hs{constructor(e=bn.DEFAULT_IMAGE,t=bn.DEFAULT_MAPPING,n=ei,i=ei,r=kn,o=Mi,a=$n,l=hi,c=bn.DEFAULT_ANISOTROPY,d=Bi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:O2++}),this.uuid=ti(),this.name="",this.source=new Jl(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 Je(0,0),this.repeat=new Je(1,1),this.center=new Je(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ut,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(Ka).x}get height(){return this.source.getSize(Ka).y}get depth(){return this.source.getSize(Ka).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 oi:e.x=e.x-Math.floor(e.x);break;case ei: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 oi:e.y=e.y-Math.floor(e.y);break;case ei: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++}}bn.DEFAULT_IMAGE=null;bn.DEFAULT_MAPPING=y0;bn.DEFAULT_ANISOTROPY=1;class Ot{constructor(e=0,t=0,n=0,i=1){Ot.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],f=l[6],p=l[10];if(Math.abs(d-u)<.01&&Math.abs(m-_)<.01&&Math.abs(g-f)<.01){if(Math.abs(d+u)<.1&&Math.abs(m+_)<.1&&Math.abs(g+f)<.1&&Math.abs(c+h+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const M=(c+1)/2,b=(h+1)/2,N=(p+1)/2,L=(d+u)/4,P=(m+_)/4,I=(g+f)/4;return M>b&&M>N?M<.01?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(M),i=L/n,r=P/n):b>N?b<.01?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(b),n=L/i,r=I/i):N<.01?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(N),n=P/r,i=I/r),this.set(n,i,r,t),this}let x=Math.sqrt((f-g)*(f-g)+(m-_)*(m-_)+(u-d)*(u-d));return Math.abs(x)<.001&&(x=1),this.x=(f-g)/x,this.y=(m-_)/x,this.z=(u-d)/x,this.w=Math.acos((c+h+p-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=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this.z=It(this.z,e.z,t.z),this.w=It(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this.z=It(this.z,e,t),this.w=It(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(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 hs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:kn,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 Ot(0,0,e,t),this.scissorTest=!1,this.viewport=new Ot(0,0,e,t);const i={width:e,height:t,depth:n.depth},r=new bn(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:kn,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 Jl(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 cs extends k2{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class D0 extends bn{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=Vn,this.minFilter=Vn,this.wrapR=ei,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 bn{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=Vn,this.minFilter=Vn,this.wrapR=ei,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Tn{constructor(e=new z(1/0,1/0,1/0),t=new z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Kn.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Kn.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=Kn.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,Kn):Kn.fromBufferAttribute(r,o),Kn.applyMatrix4(e.matrixWorld),this.expandByPoint(Kn);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,Kn),Kn.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),Li.subVectors(vs,_s),Pi.subVectors(ys,vs),$i.subVectors(_s,ys);let t=[0,-Li.z,Li.y,0,-Pi.z,Pi.y,0,-$i.z,$i.y,Li.z,0,-Li.x,Pi.z,0,-Pi.x,$i.z,0,-$i.x,-Li.y,Li.x,0,-Pi.y,Pi.x,0,-$i.y,$i.x,0];return!Ja(t,_s,vs,ys,Cr)||(t=[1,0,0,0,1,0,0,0,1],!Ja(t,_s,vs,ys,Cr))?!1:(Rr.crossVectors(Li,Pi),t=[Rr.x,Rr.y,Rr.z],Ja(t,_s,vs,ys,Cr))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Kn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Kn).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:(fi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fi),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 fi=[new z,new z,new z,new z,new z,new z,new z,new z],Kn=new z,Tr=new Tn,_s=new z,vs=new z,ys=new z,Li=new z,Pi=new z,$i=new z,er=new z,Cr=new z,Rr=new z,Yi=new z;function Ja(s,e,t,n,i){for(let r=0,o=s.length-3;r<=o;r+=3){Yi.fromArray(s,r);const a=i.x*Math.abs(Yi.x)+i.y*Math.abs(Yi.y)+i.z*Math.abs(Yi.z),l=e.dot(Yi),c=t.dot(Yi),d=n.dot(Yi);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}const H2=new Tn,tr=new z,Za=new z;class Ri{constructor(e=new z,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const 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 pi=new z,Qa=new z,Dr=new z,Fi=new z,eo=new z,Lr=new z,to=new z;class Ys{constructor(e=new z,t=new z(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,pi)),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=pi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(pi.copy(this.origin).addScaledVector(this.direction,t),pi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Qa.copy(e).add(t).multiplyScalar(.5),Dr.copy(t).sub(e).normalize(),Fi.copy(this.origin).sub(Qa);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Dr),a=Fi.dot(this.direction),l=-Fi.dot(Dr),c=Fi.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){pi.subVectors(e.center,this.origin);const n=pi.dot(this.direction),i=pi.dot(pi)-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,pi)!==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;Fi.subVectors(this.origin,e);const l=a*this.direction.dot(Lr.crossVectors(Fi,Lr));if(l<0)return null;const c=a*this.direction.dot(eo.cross(Fi));if(c<0||l+c>o)return null;const d=-a*Fi.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 St{constructor(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,f){St.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,_,f)}set(e,t,n,i,r,o,a,l,c,d,m,u,h,g,_,f){const p=this.elements;return p[0]=e,p[4]=t,p[8]=n,p[12]=i,p[1]=r,p[5]=o,p[9]=a,p[13]=l,p[2]=c,p[6]=d,p[10]=m,p[14]=u,p[3]=h,p[7]=g,p[11]=_,p[15]=f,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 St().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 Bn.subVectors(e,t),Bn.lengthSq()===0&&(Bn.z=1),Bn.normalize(),Ni.crossVectors(n,Bn),Ni.lengthSq()===0&&(Math.abs(n.z)===1?Bn.x+=1e-4:Bn.z+=1e-4,Bn.normalize(),Ni.crossVectors(n,Bn)),Ni.normalize(),Pr.crossVectors(Bn,Ni),i[0]=Ni.x,i[4]=Pr.x,i[8]=Bn.x,i[1]=Ni.y,i[5]=Pr.y,i[9]=Bn.y,i[2]=Ni.z,i[6]=Pr.z,i[10]=Bn.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],f=n[10],p=n[14],x=n[3],M=n[7],b=n[11],N=n[15],L=i[0],P=i[4],I=i[8],E=i[12],A=i[1],F=i[5],B=i[9],X=i[13],Z=i[2],se=i[6],G=i[10],de=i[14],Q=i[3],xe=i[7],Pe=i[11],Te=i[15];return r[0]=o*L+a*A+l*Z+c*Q,r[4]=o*P+a*F+l*se+c*xe,r[8]=o*I+a*B+l*G+c*Pe,r[12]=o*E+a*X+l*de+c*Te,r[1]=d*L+m*A+u*Z+h*Q,r[5]=d*P+m*F+u*se+h*xe,r[9]=d*I+m*B+u*G+h*Pe,r[13]=d*E+m*X+u*de+h*Te,r[2]=g*L+_*A+f*Z+p*Q,r[6]=g*P+_*F+f*se+p*xe,r[10]=g*I+_*B+f*G+p*Pe,r[14]=g*E+_*X+f*de+p*Te,r[3]=x*L+M*A+b*Z+N*Q,r[7]=x*P+M*F+b*se+N*xe,r[11]=x*I+M*B+b*G+N*Pe,r[15]=x*E+M*X+b*de+N*Te,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],f=e[11],p=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)+f*(+t*c*m-t*a*h-r*o*m+n*o*h+r*a*d-n*c*d)+p*(-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],f=e[14],p=e[15],x=m*f*c-_*u*c+_*l*h-a*f*h-m*l*p+a*u*p,M=g*u*c-d*f*c-g*l*h+o*f*h+d*l*p-o*u*p,b=d*_*c-g*m*c+g*a*h-o*_*h-d*a*p+o*m*p,N=g*m*l-d*_*l-g*a*u+o*_*u+d*a*f-o*m*f,L=t*x+n*M+i*b+r*N;if(L===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/L;return e[0]=x*P,e[1]=(_*u*r-m*f*r-_*i*h+n*f*h+m*i*p-n*u*p)*P,e[2]=(a*f*r-_*l*r+_*i*c-n*f*c-a*i*p+n*l*p)*P,e[3]=(m*l*r-a*u*r-m*i*c+n*u*c+a*i*h-n*l*h)*P,e[4]=M*P,e[5]=(d*f*r-g*u*r+g*i*h-t*f*h-d*i*p+t*u*p)*P,e[6]=(g*l*r-o*f*r-g*i*c+t*f*c+o*i*p-t*l*p)*P,e[7]=(o*u*r-d*l*r+d*i*c-t*u*c-o*i*h+t*l*h)*P,e[8]=b*P,e[9]=(g*m*r-d*_*r-g*n*h+t*_*h+d*n*p-t*m*p)*P,e[10]=(o*_*r-g*a*r+g*n*c-t*_*c-o*n*p+t*a*p)*P,e[11]=(d*a*r-o*m*r-d*n*c+t*m*c+o*n*h-t*a*h)*P,e[12]=N*P,e[13]=(d*_*i-g*m*i+g*n*u-t*_*u-d*n*f+t*m*f)*P,e[14]=(g*a*i-o*_*i-g*n*l+t*_*l+o*n*f-t*a*f)*P,e[15]=(o*m*i-d*a*i+d*n*l-t*m*l-o*n*u+t*a*u)*P,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,f=o*m,p=a*m,x=l*c,M=l*d,b=l*m,N=n.x,L=n.y,P=n.z;return i[0]=(1-(_+p))*N,i[1]=(h+b)*N,i[2]=(g-M)*N,i[3]=0,i[4]=(h-b)*L,i[5]=(1-(u+p))*L,i[6]=(f+x)*L,i[7]=0,i[8]=(g+M)*P,i[9]=(f-x)*P,i[10]=(1-(u+_))*P,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],Jn.copy(this);const c=1/r,d=1/o,m=1/a;return Jn.elements[0]*=c,Jn.elements[1]*=c,Jn.elements[2]*=c,Jn.elements[4]*=d,Jn.elements[5]*=d,Jn.elements[6]*=d,Jn.elements[8]*=m,Jn.elements[9]*=m,Jn.elements[10]*=m,t.setFromRotationMatrix(Jn),n.x=r,n.y=o,n.z=a,this}makePerspective(e,t,n,i,r,o,a=bi){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===bi)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=bi){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===bi)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 z,Jn=new St,G2=new z(0,0,0),W2=new z(1,1,1),Ni=new z,Pr=new z,Bn=new z,Fc=new St,Nc=new Un;class vn{constructor(e=0,t=0,n=0,i=vn.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(It(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(-It(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(It(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(-It(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(It(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(-It(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}}vn.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 z,Ms=new Un,mi=new St,Fr=new z,nr=new z,j2=new z,q2=new Un,Ic=new z(1,0,0),zc=new z(0,1,0),Bc=new z(0,0,1),Oc={type:"added"},$2={type:"removed"},bs={type:"childadded",child:null},no={type:"childremoved",child:null};class rn extends hs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:X2++}),this.uuid=ti(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=rn.DEFAULT_UP.clone();const e=new z,t=new vn,n=new Un,i=new z(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 St},normalMatrix:{value:new Ut}}),this.matrix=new St,this.matrixWorld=new St,this.matrixAutoUpdate=rn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=rn.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(mi.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?mi.lookAt(nr,Fr,this.up):mi.lookAt(Fr,nr,this.up),this.quaternion.setFromRotationMatrix(mi),i&&(mi.extractRotation(i.matrixWorld),Ms.setFromRotationMatrix(mi),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),mi.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),mi.multiply(e.parent.matrixWorld)),e.applyMatrix4(mi),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}}rn.DEFAULT_UP=new z(0,1,0);rn.DEFAULT_MATRIX_AUTO_UPDATE=!0;rn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Zn=new z,gi=new z,io=new z,_i=new z,Ss=new z,As=new z,kc=new z,so=new z,ro=new z,ao=new z,oo=new Ot,lo=new Ot,co=new Ot;class qn{constructor(e=new z,t=new z,n=new z){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),Zn.subVectors(e,t),i.cross(Zn);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){Zn.subVectors(i,t),gi.subVectors(n,t),io.subVectors(e,t);const o=Zn.dot(Zn),a=Zn.dot(gi),l=Zn.dot(io),c=gi.dot(gi),d=gi.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,_i)===null?!1:_i.x>=0&&_i.y>=0&&_i.x+_i.y<=1}static getInterpolation(e,t,n,i,r,o,a,l){return this.getBarycoord(e,t,n,i,_i)===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,_i.x),l.addScaledVector(o,_i.y),l.addScaledVector(a,_i.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 Zn.subVectors(n,t),gi.subVectors(e,t),Zn.cross(gi).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 Zn.subVectors(this.c,this.b),gi.subVectors(this.a,this.b),Zn.cross(gi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return qn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return qn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return qn.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return qn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return qn.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),As.subVectors(r,n),so.subVectors(e,n);const l=Ss.dot(so),c=As.dot(so);if(l<=0&&c<=0)return t.copy(n);ro.subVectors(e,i);const d=Ss.dot(ro),m=As.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=As.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(As,a);const f=d*g-h*m;if(f<=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 p=1/(f+_+u);return o=_*p,a=u*p,t.copy(n).addScaledVector(Ss,o).addScaledVector(As,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},Ui={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 At{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=Vt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Bt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=Bt.workingColorSpace){if(e=Kl(e,1),t=It(t,0,1),n=It(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 Bt.colorSpaceToWorking(this,i),this}setStyle(e,t=Vt){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=Vt){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=Ai(e.r),this.g=Ai(e.g),this.b=Ai(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=Vt){return Bt.workingToColorSpace(En.copy(this),e),Math.round(It(En.r*255,0,255))*65536+Math.round(It(En.g*255,0,255))*256+Math.round(It(En.b*255,0,255))}getHexString(e=Vt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.workingToColorSpace(En.copy(this),t);const n=En.r,i=En.g,r=En.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=Bt.workingColorSpace){return Bt.workingToColorSpace(En.copy(this),t),e.r=En.r,e.g=En.g,e.b=En.b,e}getStyle(e=Vt){Bt.workingToColorSpace(En.copy(this),e);const t=En.r,n=En.g,i=En.b;return e!==Vt?`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(Ui),this.setHSL(Ui.h+e,Ui.s+t,Ui.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(Ui),e.getHSL(Nr);const n=fr(Ui.h,Nr.h,t),i=fr(Ui.s,Nr.s,t),r=fr(Ui.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 En=new At;At.NAMES=L0;let Y2=0;class Hn extends hs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Y2++}),this.uuid=ti(),this.name="",this.type="Material",this.blending=Bs,this.side=Yn,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Go,this.blendDst=Wo,this.blendEquation=is,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new At(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!==Yn&&(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!==is&&(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 Gi extends Hn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new At(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 vn,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 dn=new z,Ur=new Je;let K2=0;class un{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:K2++}),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=li,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++)dn.fromBufferAttribute(this,t),dn.applyMatrix3(e),this.setXYZ(t,dn.x,dn.y,dn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)dn.fromBufferAttribute(this,t),dn.applyMatrix4(e),this.setXYZ(t,dn.x,dn.y,dn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)dn.fromBufferAttribute(this,t),dn.applyNormalMatrix(e),this.setXYZ(t,dn.x,dn.y,dn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)dn.fromBufferAttribute(this,t),dn.transformDirection(e),this.setXYZ(t,dn.x,dn.y,dn.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=Qn(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=Qn(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=Qn(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=Qn(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=Qn(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 un{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class J2 extends un{constructor(e,t,n){super(new Int32Array(e),t,n)}}class F0 extends un{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Ft extends un{constructor(e,t,n){super(new Float32Array(e),t,n)}}let Z2=0;const Wn=new St,uo=new rn,Es=new z,On=new Tn,ir=new Tn,gn=new z;class an extends hs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Z2++}),this.uuid=ti(),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 Ut().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 Wn.makeRotationFromQuaternion(e),this.applyMatrix4(Wn),this}rotateX(e){return Wn.makeRotationX(e),this.applyMatrix4(Wn),this}rotateY(e){return Wn.makeRotationY(e),this.applyMatrix4(Wn),this}rotateZ(e){return Wn.makeRotationZ(e),this.applyMatrix4(Wn),this}translate(e,t,n){return Wn.makeTranslation(e,t,n),this.applyMatrix4(Wn),this}scale(e,t,n){return Wn.makeScale(e,t,n),this.applyMatrix4(Wn),this}lookAt(e){return uo.lookAt(e),uo.updateMatrix(),this.applyMatrix4(uo.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Es).negate(),this.translate(Es.x,Es.y,Es.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 Ft(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 Tn);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 z(-1/0,-1/0,-1/0),new z(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];On.setFromBufferAttribute(r),this.morphTargetsRelative?(gn.addVectors(this.boundingBox.min,On.min),this.boundingBox.expandByPoint(gn),gn.addVectors(this.boundingBox.max,On.max),this.boundingBox.expandByPoint(gn)):(this.boundingBox.expandByPoint(On.min),this.boundingBox.expandByPoint(On.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 Ri);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 z,1/0);return}if(e){const n=this.boundingSphere.center;if(On.setFromBufferAttribute(e),t)for(let r=0,o=t.length;r<o;r++){const a=t[r];ir.setFromBufferAttribute(a),this.morphTargetsRelative?(gn.addVectors(On.min,ir.min),On.expandByPoint(gn),gn.addVectors(On.max,ir.max),On.expandByPoint(gn)):(On.expandByPoint(ir.min),On.expandByPoint(ir.max))}On.getCenter(n);let i=0;for(let r=0,o=e.count;r<o;r++)gn.fromBufferAttribute(e,r),i=Math.max(i,n.distanceToSquared(gn));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++)gn.fromBufferAttribute(a,c),l&&(Es.fromBufferAttribute(e,c),gn.add(Es)),i=Math.max(i,n.distanceToSquared(gn))}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 un(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let I=0;I<n.count;I++)a[I]=new z,l[I]=new z;const c=new z,d=new z,m=new z,u=new Je,h=new Je,g=new Je,_=new z,f=new z;function p(I,E,A){c.fromBufferAttribute(n,I),d.fromBufferAttribute(n,E),m.fromBufferAttribute(n,A),u.fromBufferAttribute(r,I),h.fromBufferAttribute(r,E),g.fromBufferAttribute(r,A),d.sub(c),m.sub(c),h.sub(u),g.sub(u);const F=1/(h.x*g.y-g.x*h.y);isFinite(F)&&(_.copy(d).multiplyScalar(g.y).addScaledVector(m,-h.y).multiplyScalar(F),f.copy(m).multiplyScalar(h.x).addScaledVector(d,-g.x).multiplyScalar(F),a[I].add(_),a[E].add(_),a[A].add(_),l[I].add(f),l[E].add(f),l[A].add(f))}let x=this.groups;x.length===0&&(x=[{start:0,count:e.count}]);for(let I=0,E=x.length;I<E;++I){const A=x[I],F=A.start,B=A.count;for(let X=F,Z=F+B;X<Z;X+=3)p(e.getX(X+0),e.getX(X+1),e.getX(X+2))}const M=new z,b=new z,N=new z,L=new z;function P(I){N.fromBufferAttribute(i,I),L.copy(N);const E=a[I];M.copy(E),M.sub(N.multiplyScalar(N.dot(E))).normalize(),b.crossVectors(L,E);const F=b.dot(l[I])<0?-1:1;o.setXYZW(I,M.x,M.y,M.z,F)}for(let I=0,E=x.length;I<E;++I){const A=x[I],F=A.start,B=A.count;for(let X=F,Z=F+B;X<Z;X+=3)P(e.getX(X+0)),P(e.getX(X+1)),P(e.getX(X+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 un(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 z,r=new z,o=new z,a=new z,l=new z,c=new z,d=new z,m=new z;if(e)for(let u=0,h=e.count;u<h;u+=3){const g=e.getX(u+0),_=e.getX(u+1),f=e.getX(u+2);i.fromBufferAttribute(t,g),r.fromBufferAttribute(t,_),o.fromBufferAttribute(t,f),d.subVectors(o,r),m.subVectors(i,r),d.cross(m),a.fromBufferAttribute(n,g),l.fromBufferAttribute(n,_),c.fromBufferAttribute(n,f),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(f,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++)gn.fromBufferAttribute(e,t),gn.normalize(),e.setXYZ(t,gn.x,gn.y,gn.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,f=l.length;_<f;_++){a.isInterleavedBufferAttribute?h=l[_]*a.data.stride+a.offset:h=l[_]*d;for(let p=0;p<d;p++)u[g++]=c[h++]}return new un(u,d,m)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new an,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 St,Ki=new Ys,Ir=new Ri,Hc=new z,zr=new z,Br=new z,Or=new z,fo=new z,kr=new z,Gc=new z,Vr=new z;class Nt extends rn{constructor(e=new an,t=new Gi){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),Ki.copy(e.ray).recast(e.near),!(Ir.containsPoint(Ki.origin)===!1&&(Ki.intersectSphere(Ir,Hc)===null||Ki.origin.distanceToSquared(Hc)>(e.far-e.near)**2))&&(Vc.copy(r).invert(),Ki.copy(e.ray).applyMatrix4(Vc),!(n.boundingBox!==null&&Ki.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Ki)))}_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 f=u[g],p=o[f.materialIndex],x=Math.max(f.start,h.start),M=Math.min(a.count,Math.min(f.start+f.count,h.start+h.count));for(let b=x,N=M;b<N;b+=3){const L=a.getX(b),P=a.getX(b+1),I=a.getX(b+2);i=Hr(this,p,e,n,c,d,m,L,P,I),i&&(i.faceIndex=Math.floor(b/3),i.face.materialIndex=f.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(a.count,h.start+h.count);for(let f=g,p=_;f<p;f+=3){const x=a.getX(f),M=a.getX(f+1),b=a.getX(f+2);i=Hr(this,o,e,n,c,d,m,x,M,b),i&&(i.faceIndex=Math.floor(f/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let g=0,_=u.length;g<_;g++){const f=u[g],p=o[f.materialIndex],x=Math.max(f.start,h.start),M=Math.min(l.count,Math.min(f.start+f.count,h.start+h.count));for(let b=x,N=M;b<N;b+=3){const L=b,P=b+1,I=b+2;i=Hr(this,p,e,n,c,d,m,L,P,I),i&&(i.faceIndex=Math.floor(b/3),i.face.materialIndex=f.materialIndex,t.push(i))}}else{const g=Math.max(0,h.start),_=Math.min(l.count,h.start+h.count);for(let f=g,p=_;f<p;f+=3){const x=f,M=f+1,b=f+2;i=Hr(this,o,e,n,c,d,m,x,M,b),i&&(i.faceIndex=Math.floor(f/3),t.push(i))}}}}function Q2(s,e,t,n,i,r,o,a){let l;if(e.side===Dn?l=n.intersectTriangle(o,r,i,!0,a):l=n.intersectTriangle(i,r,o,e.side===Yn,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 z;qn.getBarycoord(Gc,zr,Br,Or,m),i&&(d.uv=qn.getInterpolatedAttribute(i,a,l,c,m,new Je)),r&&(d.uv1=qn.getInterpolatedAttribute(r,a,l,c,m,new Je)),o&&(d.normal=qn.getInterpolatedAttribute(o,a,l,c,m,new z),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const u={a,b:l,c,normal:new z,materialIndex:0};qn.getNormal(zr,Br,Or,u.normal),d.face=u,d.barycoord=m}return d}class Wi extends an{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 Ft(c,3)),this.setAttribute("normal",new Ft(d,3)),this.setAttribute("uv",new Ft(m,2));function g(_,f,p,x,M,b,N,L,P,I,E){const A=b/P,F=N/I,B=b/2,X=N/2,Z=L/2,se=P+1,G=I+1;let de=0,Q=0;const xe=new z;for(let Pe=0;Pe<G;Pe++){const Te=Pe*F-X;for(let me=0;me<se;me++){const ae=me*A-B;xe[_]=ae*x,xe[f]=Te*M,xe[p]=Z,c.push(xe.x,xe.y,xe.z),xe[_]=0,xe[f]=0,xe[p]=L>0?1:-1,d.push(xe.x,xe.y,xe.z),m.push(me/P),m.push(1-Pe/I),de+=1}}for(let Pe=0;Pe<I;Pe++)for(let Te=0;Te<P;Te++){const me=u+Te+se*Pe,ae=u+Te+se*(Pe+1),j=u+(Te+1)+se*(Pe+1),K=u+(Te+1)+se*Pe;l.push(me,ae,K),l.push(ae,j,K),Q+=6}a.addGroup(h,Q,E),h+=Q,u+=de}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Wi(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 Rn(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:Bt.workingColorSpace}const Ql={clone:qs,merge:Rn};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 Ti extends Hn{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
|
|
9
|
+
}`;class Ti extends Hn{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 rn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new St,this.projectionMatrix=new St,this.projectionMatrixInverse=new St,this.coordinateSystem=bi}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 Ii=new z,Wc=new Je,Xc=new Je;class _n 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){Ii.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Ii.x,Ii.y).multiplyScalar(-e/Ii.z),Ii.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Ii.x,Ii.y).multiplyScalar(-e/Ii.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 rn{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new _n(ws,Ts,e,t);i.layers=this.layers,this.add(i);const r=new _n(ws,Ts,e,t);r.layers=this.layers,this.add(r);const o=new _n(ws,Ts,e,t);o.layers=this.layers,this.add(o);const a=new _n(ws,Ts,e,t);a.layers=this.layers,this.add(a);const l=new _n(ws,Ts,e,t);l.layers=this.layers,this.add(l);const c=new _n(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===bi)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 bn{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 cs{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 Wi(5,5,5),r=new Ti({name:"CubemapFromEquirect",uniforms:qs(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Dn,blending:ki});r.uniforms.tEquirect.value=t;const o=new Pt(i,r),a=t.minFilter;return t.minFilter===Mi&&(t.minFilter=kn),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 An extends sn{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 An,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 An,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new An,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new z),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const 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 f=t.getJointPose(_,n),p=this._getHandJoint(c,_);f!==null&&(p.matrix.fromArray(f.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=f.radius),p.visible=f!==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 An;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ia extends sn{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 _n,this.environmentIntensity=1,this.environmentRotation=new _n,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=ti()}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=ti()),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=ti()),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 Cn=new z;class ci{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++)Cn.fromBufferAttribute(this,t),Cn.applyMatrix4(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Cn.fromBufferAttribute(this,t),Cn.applyNormalMatrix(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Cn.fromBufferAttribute(this,t),Cn.transformDirection(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=Qn(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=en(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=en(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=en(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=en(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=en(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=Qn(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Qn(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Qn(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Qn(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=en(t,this.array),n=en(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=en(t,this.array),n=en(n,this.array),i=en(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=en(t,this.array),n=en(n,this.array),i=en(i,this.array),r=en(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 hn(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 ci(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 Hn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new bt(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 z,Rs=new z,Ds=new z,Ls=new Je,rr=new Je,B0=new Mt,Gr=new z,ar=new z,Wr=new z,jc=new Je,mo=new Je,qc=new Je;class ec extends sn{constructor(e=new za){if(super(),this.isSprite=!0,this.type="Sprite",Cs===void 0){Cs=new rn;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 ci(n,3,0,!1)),Cs.setAttribute("uv",new ci(n,2,3,!1))}this.geometry=Cs,this.material=e,this.center=new Je(.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:qn.getInterpolation(sr,Gr,ar,Wr,jc,mo,qc,new Je),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 z,$c=new z;class O0 extends sn{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 z,Kc=new Ot,Jc=new Ot,a1=new z,Zc=new Mt,qr=new z,go=new Ri,Qc=new Mt,_o=new Ys;class o1 extends Pt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=bc,this.bindMatrix=new Mt,this.bindMatrixInverse=new Mt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Tn),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 Ri),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 Ot,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;Kc.fromBufferAttribute(i.attributes.skinIndex,e),Jc.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=Jc.getComponent(r);if(o!==0){const a=Kc.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 sn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class V0 extends Mn{constructor(e=null,t=1,n=1,i,r,o,a,l,c=Vn,d=Vn,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 Mt,l1=new Mt;class tc{constructor(e=[],t=[]){this.uuid=ti(),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 Mt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new Mt;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,$n,li);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 Mt().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 z,c1=new z,h1=new Ut;class jn{constructor(e=new z(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 Ji=new Ri,$r=new z;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=bi){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],f=i[11],p=i[12],x=i[13],M=i[14],b=i[15];if(n[0].setComponents(l-r,u-c,f-h,b-p).normalize(),n[1].setComponents(l+r,u+c,f+h,b+p).normalize(),n[2].setComponents(l+o,u+d,f+g,b+x).normalize(),n[3].setComponents(l-o,u-d,f-g,b-x).normalize(),n[4].setComponents(l-a,u-m,f-_,b-M).normalize(),t===bi)n[5].setComponents(l+a,u+m,f+_,b+M).normalize();else if(t===wa)n[5].setComponents(a,m,_,M).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ji.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ji.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ji)}intersectsSprite(e){return Ji.center.set(0,0,0),Ji.radius=.7071067811865476,Ji.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ji)}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 Ai extends Hn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new bt(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 z,Ca=new z,th=new Mt,or=new Ys,Yr=new Ri,yo=new z,nh=new z;class Ba extends sn{constructor(e=new rn,t=new Ai){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 Lt(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,f=g-1;_<f;_+=c){const p=d.getX(_),x=d.getX(_+1),M=Kr(this,e,or,l,p,x,_);M&&t.push(M)}if(this.isLineLoop){const _=d.getX(g-1),f=d.getX(h),p=Kr(this,e,or,l,_,f,g-1);p&&t.push(p)}}else{const h=Math.max(0,o.start),g=Math.min(u.count,o.start+o.count);for(let _=h,f=g-1;_<f;_+=c){const p=Kr(this,e,or,l,_,_+1,_);p&&t.push(p)}if(this.isLineLoop){const _=Kr(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 Kr(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 z,sh=new z;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 Lt(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Oi extends Hn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new bt(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 Mt,Rl=new Ys,Jr=new Ri,Zr=new z;class Vs extends sn{constructor(e=new rn,t=new Oi){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(),Jr.copy(n.boundingSphere),Jr.applyMatrix4(i),Jr.radius+=r,e.ray.intersectsSphere(Jr)===!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 f=c.getX(g);Zr.fromBufferAttribute(m,f),ah(Zr,f,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 z;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 Mn{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 Mn{constructor(e,t,n=ls,i,r,o,a=Vn,l=Vn,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 Jl(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 rn{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 _=[],f=n/2;let p=0;x(),o===!1&&(e>0&&M(!0),t>0&&M(!1)),this.setIndex(d),this.setAttribute("position",new Lt(m,3)),this.setAttribute("normal",new Lt(u,3)),this.setAttribute("uv",new Lt(h,2));function x(){const b=new z,N=new z;let L=0;const P=(t-e)/n;for(let I=0;I<=r;I++){const A=[],E=I/r,F=E*(t-e)+e;for(let B=0;B<=i;B++){const X=B/i,Z=X*l+a,se=Math.sin(Z),W=Math.cos(Z);N.x=F*se,N.y=-E*n+f,N.z=F*W,m.push(N.x,N.y,N.z),b.set(se,P,W).normalize(),u.push(b.x,b.y,b.z),h.push(X,1-E),A.push(g++)}_.push(A)}for(let I=0;I<i;I++)for(let A=0;A<r;A++){const E=_[A][I],F=_[A+1][I],B=_[A+1][I+1],X=_[A][I+1];(e>0||A!==0)&&(d.push(E,F,X),L+=3),(t>0||A!==r-1)&&(d.push(F,B,X),L+=3)}c.addGroup(p,L,0),p+=L}function M(b){const N=g,L=new Je,P=new z;let I=0;const A=b===!0?e:t,E=b===!0?1:-1;for(let B=1;B<=i;B++)m.push(0,f*E,0),u.push(0,E,0),h.push(.5,.5),g++;const F=g;for(let B=0;B<=i;B++){const Z=B/i*l+a,se=Math.cos(Z),W=Math.sin(Z);P.x=A*W,P.y=f*E,P.z=A*se,m.push(P.x,P.y,P.z),u.push(0,E,0),L.x=se*.5+.5,L.y=W*.5*E+.5,h.push(L.x,L.y),g++}for(let B=0;B<i;B++){const X=N+B,Z=F+B;b===!0?d.push(Z,Z+1,X):d.push(Z+1,Z,X),I+=3}c.addGroup(p,I,b===!0?1:2),p+=I}}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 Di{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 Je:new z);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 z,i=[],r=[],o=[],a=new z,l=new Mt;for(let h=0;h<=e;h++){const g=h/e;i[h]=this.getTangentAt(g,new z)}r[0]=new z,o[0]=new z;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(It(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(It(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 Di{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 Je){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 z,xo=new sc,Mo=new sc,bo=new sc;class rc extends Di{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 z){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),f=Math.pow(u.distanceToSquared(d),h);_<1e-4&&(_=1),g<1e-4&&(g=_),f<1e-4&&(f=_),xo.initNonuniformCatmullRom(c.x,m.x,u.x,d.x,g,_,f),Mo.initNonuniformCatmullRom(c.y,m.y,u.y,d.y,g,_,f),bo.initNonuniformCatmullRom(c.z,m.z,u.z,d.z,g,_,f)}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 z().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 Di{constructor(e=new Je,t=new Je,n=new Je,i=new Je){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Je){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 Di{constructor(e=new z,t=new z,n=new z,i=new z){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new z){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 Di{constructor(e=new Je,t=new Je){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Je){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 Je){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 Di{constructor(e=new z,t=new z){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new z){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 z){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 Di{constructor(e=new Je,t=new Je,n=new Je){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Je){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 Di{constructor(e=new z,t=new z,n=new z){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new z){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 Di{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Je){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 Je().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 wi extends rn{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=[],_=[],f=[];for(let p=0;p<d;p++){const x=p*u-o;for(let M=0;M<c;M++){const b=M*m-r;g.push(b,-x,0),_.push(0,0,1),f.push(M/a),f.push(1-p/l)}}for(let p=0;p<l;p++)for(let x=0;x<a;x++){const M=x+c*p,b=x+c*(p+1),N=x+1+c*(p+1),L=x+1+c*p;h.push(M,b,L),h.push(b,N,L)}this.setIndex(h),this.setAttribute("position",new Lt(g,3)),this.setAttribute("normal",new Lt(_,3)),this.setAttribute("uv",new Lt(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new wi(e.width,e.height,e.widthSegments,e.heightSegments)}}class Oa extends rn{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 z,u=new z,h=[],g=[],_=[],f=[];for(let p=0;p<=n;p++){const x=[],M=p/n;let b=0;p===0&&o===0?b=.5/t:p===n&&l===Math.PI&&(b=-.5/t);for(let N=0;N<=t;N++){const L=N/t;m.x=-e*Math.cos(i+L*r)*Math.sin(o+M*a),m.y=e*Math.cos(o+M*a),m.z=e*Math.sin(i+L*r)*Math.sin(o+M*a),g.push(m.x,m.y,m.z),u.copy(m).normalize(),_.push(u.x,u.y,u.z),f.push(L+b,1-M),x.push(c++)}d.push(x)}for(let p=0;p<n;p++)for(let x=0;x<t;x++){const M=d[p][x+1],b=d[p][x],N=d[p+1][x],L=d[p+1][x+1];(p!==0||o>0)&&h.push(M,b,L),(p!==n-1||l<Math.PI)&&h.push(b,N,L)}this.setIndex(h),this.setAttribute("position",new Lt(g,3)),this.setAttribute("normal",new Lt(_,3)),this.setAttribute("uv",new Lt(f,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 rn{constructor(e=new W0(new z(-1,-1,0),new z(-1,1,0),new z(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 z,l=new z,c=new Je;let d=new z;const m=[],u=[],h=[],g=[];_(),this.setIndex(g),this.setAttribute("position",new Lt(m,3)),this.setAttribute("normal",new Lt(u,3)),this.setAttribute("uv",new Lt(h,2));function _(){for(let M=0;M<t;M++)f(M);f(r===!1?t:0),x(),p()}function f(M){d=e.getPointAt(M/t,d);const b=o.normals[M],N=o.binormals[M];for(let L=0;L<=i;L++){const P=L/i*Math.PI*2,I=Math.sin(P),A=-Math.cos(P);l.x=A*b.x+I*N.x,l.y=A*b.y+I*N.y,l.z=A*b.z+I*N.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 p(){for(let M=1;M<=t;M++)for(let b=1;b<=i;b++){const N=(i+1)*(M-1)+(b-1),L=(i+1)*M+(b-1),P=(i+1)*M+b,I=(i+1)*(M-1)+b;g.push(N,L,I),g.push(L,P,I)}}function x(){for(let M=0;M<=t;M++)for(let b=0;b<=i;b++)c.x=M/t,c.y=b/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 rn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,i=new z,r=new z;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 f=0;f<3;f++){const p=a.getX(g+f),x=a.getX(g+(f+1)%3);i.fromBufferAttribute(o,p),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 Lt(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 Hn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new bt(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 Hn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new bt(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 bt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(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 _n,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 ln extends Hn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new bt(16777215),this.specular=new bt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new bt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new _n,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 Hn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new bt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new bt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new _n,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 Hn{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 Hn{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,f=_*g,p=-u*f+2*u*_-u*g,x=(1+u)*f+(-1.5-2*u)*_+(-.5+u)*g+1,M=(-1-h)*f+(1.5+h)*_+.5*g,b=h*f-h*_;for(let N=0;N!==a;++N)r[N]=p*o[d+N]+x*o[c+N]+M*o[l+N]+b*o[m+N];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 ii{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}}ii.prototype.ValueTypeName="";ii.prototype.TimeBufferType=Float32Array;ii.prototype.ValueBufferType=Float32Array;ii.prototype.DefaultInterpolation=Tl;class Ks extends ii{constructor(e,t,n){super(e,t,n)}}Ks.prototype.ValueTypeName="bool";Ks.prototype.ValueBufferType=Array;Ks.prototype.DefaultInterpolation=Ea;Ks.prototype.InterpolantFactoryMethodLinear=void 0;Ks.prototype.InterpolantFactoryMethodSmooth=void 0;class $0 extends ii{constructor(e,t,n,i){super(e,t,n,i)}}$0.prototype.ValueTypeName="color";class Da extends ii{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)Un.slerpFlat(r,0,o,c-a,o,c,l);return r}}class Er extends ii{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 Js extends ii{constructor(e,t,n){super(e,t,n)}}Js.prototype.ValueTypeName="string";Js.prototype.ValueBufferType=Array;Js.prototype.DefaultInterpolation=Ea;Js.prototype.InterpolantFactoryMethodLinear=void 0;Js.prototype.InterpolantFactoryMethodSmooth=void 0;class $s extends ii{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=ti(),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(ii.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 f=[],p=[];q0(h,f,p,g),f.length!==0&&_.push(new m(u,f,p))}},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 f=[],p=[];for(let x=0;x!==u[g].morphTargets.length;++x){const M=u[g];f.push(M.time),p.push(M.morphTarget===_?1:0)}i.push(new Da(".morphTargetInfluence["+_+"]",f,p))}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 Ks;case"string":return Js}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 ni{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}}ni.DEFAULT_MATERIAL_NAME="__DEFAULT";const vi={};class O1 extends Error{constructor(e,t){super(e),this.response=t}}class Zs extends ni{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(vi[e]!==void 0){vi[e].push({onLoad:t,onProgress:n,onError:i});return}vi[e]=[],vi[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=vi[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 f=new ReadableStream({start(p){x();function x(){m.read().then(({done:M,value:b})=>{if(M)p.close();else{_+=b.byteLength;const N=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:h});for(let L=0,P=d.length;L<P;L++){const I=d[L];I.onProgress&&I.onProgress(N)}p.enqueue(b),x()}},M=>{p.error(M)})}}});return new Response(f)}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=vi[e];delete vi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onLoad&&h.onLoad(c)}}).catch(c=>{const d=vi[e];if(d===void 0)throw this.manager.itemError(e),c;delete vi[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 ni{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 ni{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:ei,o.wrapT=c.wrapT!==void 0?c.wrapT:ei,o.magFilter=c.magFilter!==void 0?c.magFilter:kn,o.minFilter=c.minFilter!==void 0?c.minFilter:kn,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=Mi),c.mipmapCount===1&&(o.minFilter=kn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},n,i),o}}class oc extends ni{constructor(e){super(e)}load(e,t,n,i){const r=new Mn,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 sn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new bt(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 K0 extends Ar{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(sn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new bt(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const So=new Mt,uh=new z,dh=new z;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 Je(512,512),this.mapType=hi,this.map=null,this.mapPass=null,this.matrix=new Mt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new nc,this._frameExtents=new Je(1,1),this._viewportCount=1,this._viewports=[new Ot(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 gn(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(sn.DEFAULT_UP),this.updateMatrix(),this.target=new sn,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 Mt,lr=new z,Eo=new z;class W1 extends lc{constructor(){super(new gn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Je(4,2),this._viewportCount=6,this._viewports=[new Ot(2,1,1,1),new Ot(0,1,1,1),new Ot(3,1,1,1),new Ot(1,1,1,1),new Ot(3,0,1,1),new Ot(1,0,1,1)],this._cubeDirections=[new z(1,0,0),new z(-1,0,0),new z(0,0,1),new z(0,0,-1),new z(0,1,0),new z(0,-1,0)],this._cubeUps=[new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,0,1),new z(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(sn.DEFAULT_UP),this.updateMatrix(),this.target=new sn,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 rn{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 gn{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 Mt;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=It(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(It(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const _h=new z,ta=new z;class K1{constructor(e=new z,t=new z){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){_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=It(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 J0 extends Ra{constructor(e=10,t=10,n=4473924,i=8947848){n=new bt(n),i=new bt(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 rn;d.setAttribute("position",new Lt(l,3)),d.setAttribute("color",new Lt(c,3));const m=new Ai({vertexColors:!0,toneMapped:!1});super(d,m),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class J1 extends hs{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 $n: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 hi: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 ls:case Wl:case li: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 Wi(5,5,5),r=new Ti({name:"CubemapFromEquirect",uniforms:qs(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Dn,blending:ki});r.uniforms.tEquirect.value=t;const o=new Nt(i,r),a=t.minFilter;return t.minFilter===Mi&&(t.minFilter=kn),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 wn extends rn{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 wn,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 wn,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new wn,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new z),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const 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 f=t.getJointPose(_,n),p=this._getHandJoint(c,_);f!==null&&(p.matrix.fromArray(f.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=f.radius),p.visible=f!==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 wn;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ia extends rn{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 vn,this.environmentIntensity=1,this.environmentRotation=new vn,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=ti()}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=ti()),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=ti()),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 Cn=new z;class ci{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++)Cn.fromBufferAttribute(this,t),Cn.applyMatrix4(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Cn.fromBufferAttribute(this,t),Cn.applyNormalMatrix(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Cn.fromBufferAttribute(this,t),Cn.transformDirection(e),this.setXYZ(t,Cn.x,Cn.y,Cn.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=Qn(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=Qn(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Qn(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Qn(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Qn(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 un(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 ci(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 Hn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new At(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 z,Rs=new z,Ds=new z,Ls=new Je,rr=new Je,B0=new St,Gr=new z,ar=new z,Wr=new z,jc=new Je,mo=new Je,qc=new Je;class ec extends rn{constructor(e=new za){if(super(),this.isSprite=!0,this.type="Sprite",Cs===void 0){Cs=new an;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 ci(n,3,0,!1)),Cs.setAttribute("uv",new ci(n,2,3,!1))}this.geometry=Cs,this.material=e,this.center=new Je(.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:qn.getInterpolation(sr,Gr,ar,Wr,jc,mo,qc,new Je),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 z,$c=new z;class O0 extends rn{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 z,Kc=new Ot,Jc=new Ot,a1=new z,Zc=new St,qr=new z,go=new Ri,Qc=new St,_o=new Ys;class o1 extends Nt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=bc,this.bindMatrix=new St,this.bindMatrixInverse=new St,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Tn),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 Ri),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 Ot,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;Kc.fromBufferAttribute(i.attributes.skinIndex,e),Jc.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=Jc.getComponent(r);if(o!==0){const a=Kc.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 rn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class V0 extends bn{constructor(e=null,t=1,n=1,i,r,o,a,l,c=Vn,d=Vn,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 St,l1=new St;class tc{constructor(e=[],t=[]){this.uuid=ti(),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 St)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new St;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,$n,li);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 St().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 z,c1=new z,h1=new Ut;class jn{constructor(e=new z(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 Ji=new Ri,$r=new z;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=bi){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],f=i[11],p=i[12],x=i[13],M=i[14],b=i[15];if(n[0].setComponents(l-r,u-c,f-h,b-p).normalize(),n[1].setComponents(l+r,u+c,f+h,b+p).normalize(),n[2].setComponents(l+o,u+d,f+g,b+x).normalize(),n[3].setComponents(l-o,u-d,f-g,b-x).normalize(),n[4].setComponents(l-a,u-m,f-_,b-M).normalize(),t===bi)n[5].setComponents(l+a,u+m,f+_,b+M).normalize();else if(t===wa)n[5].setComponents(a,m,_,M).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ji.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ji.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ji)}intersectsSprite(e){return Ji.center.set(0,0,0),Ji.radius=.7071067811865476,Ji.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ji)}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 Ei extends Hn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new At(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 z,Ca=new z,th=new St,or=new Ys,Yr=new Ri,yo=new z,nh=new z;class Ba extends rn{constructor(e=new an,t=new Ei){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 Ft(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,f=g-1;_<f;_+=c){const p=d.getX(_),x=d.getX(_+1),M=Kr(this,e,or,l,p,x,_);M&&t.push(M)}if(this.isLineLoop){const _=d.getX(g-1),f=d.getX(h),p=Kr(this,e,or,l,_,f,g-1);p&&t.push(p)}}else{const h=Math.max(0,o.start),g=Math.min(u.count,o.start+o.count);for(let _=h,f=g-1;_<f;_+=c){const p=Kr(this,e,or,l,_,_+1,_);p&&t.push(p)}if(this.isLineLoop){const _=Kr(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 Kr(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 z,sh=new z;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 Ft(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Oi extends Hn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new At(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 St,Rl=new Ys,Jr=new Ri,Zr=new z;class Vs extends rn{constructor(e=new an,t=new Oi){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(),Jr.copy(n.boundingSphere),Jr.applyMatrix4(i),Jr.radius+=r,e.ray.intersectsSphere(Jr)===!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 f=c.getX(g);Zr.fromBufferAttribute(m,f),ah(Zr,f,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 z;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 bn{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 bn{constructor(e,t,n=ls,i,r,o,a=Vn,l=Vn,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 Jl(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 an{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 _=[],f=n/2;let p=0;x(),o===!1&&(e>0&&M(!0),t>0&&M(!1)),this.setIndex(d),this.setAttribute("position",new Ft(m,3)),this.setAttribute("normal",new Ft(u,3)),this.setAttribute("uv",new Ft(h,2));function x(){const b=new z,N=new z;let L=0;const P=(t-e)/n;for(let I=0;I<=r;I++){const E=[],A=I/r,F=A*(t-e)+e;for(let B=0;B<=i;B++){const X=B/i,Z=X*l+a,se=Math.sin(Z),G=Math.cos(Z);N.x=F*se,N.y=-A*n+f,N.z=F*G,m.push(N.x,N.y,N.z),b.set(se,P,G).normalize(),u.push(b.x,b.y,b.z),h.push(X,1-A),E.push(g++)}_.push(E)}for(let I=0;I<i;I++)for(let E=0;E<r;E++){const A=_[E][I],F=_[E+1][I],B=_[E+1][I+1],X=_[E][I+1];(e>0||E!==0)&&(d.push(A,F,X),L+=3),(t>0||E!==r-1)&&(d.push(F,B,X),L+=3)}c.addGroup(p,L,0),p+=L}function M(b){const N=g,L=new Je,P=new z;let I=0;const E=b===!0?e:t,A=b===!0?1:-1;for(let B=1;B<=i;B++)m.push(0,f*A,0),u.push(0,A,0),h.push(.5,.5),g++;const F=g;for(let B=0;B<=i;B++){const Z=B/i*l+a,se=Math.cos(Z),G=Math.sin(Z);P.x=E*G,P.y=f*A,P.z=E*se,m.push(P.x,P.y,P.z),u.push(0,A,0),L.x=se*.5+.5,L.y=G*.5*A+.5,h.push(L.x,L.y),g++}for(let B=0;B<i;B++){const X=N+B,Z=F+B;b===!0?d.push(Z,Z+1,X):d.push(Z+1,Z,X),I+=3}c.addGroup(p,I,b===!0?1:2),p+=I}}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 Di{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 Je:new z);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 z,i=[],r=[],o=[],a=new z,l=new St;for(let h=0;h<=e;h++){const g=h/e;i[h]=this.getTangentAt(g,new z)}r[0]=new z,o[0]=new z;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(It(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(It(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 Di{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 Je){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 z,xo=new sc,Mo=new sc,bo=new sc;class rc extends Di{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 z){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),f=Math.pow(u.distanceToSquared(d),h);_<1e-4&&(_=1),g<1e-4&&(g=_),f<1e-4&&(f=_),xo.initNonuniformCatmullRom(c.x,m.x,u.x,d.x,g,_,f),Mo.initNonuniformCatmullRom(c.y,m.y,u.y,d.y,g,_,f),bo.initNonuniformCatmullRom(c.z,m.z,u.z,d.z,g,_,f)}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 z().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 Di{constructor(e=new Je,t=new Je,n=new Je,i=new Je){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Je){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 Di{constructor(e=new z,t=new z,n=new z,i=new z){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new z){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 Di{constructor(e=new Je,t=new Je){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Je){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 Je){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 Di{constructor(e=new z,t=new z){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new z){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 z){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 A1 extends Di{constructor(e=new Je,t=new Je,n=new Je){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Je){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 Di{constructor(e=new z,t=new z,n=new z){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new z){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 E1 extends Di{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Je){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 Je().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:A1,QuadraticBezierCurve3:W0,SplineCurve:E1});class wi extends an{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=[],_=[],f=[];for(let p=0;p<d;p++){const x=p*u-o;for(let M=0;M<c;M++){const b=M*m-r;g.push(b,-x,0),_.push(0,0,1),f.push(M/a),f.push(1-p/l)}}for(let p=0;p<l;p++)for(let x=0;x<a;x++){const M=x+c*p,b=x+c*(p+1),N=x+1+c*(p+1),L=x+1+c*p;h.push(M,b,L),h.push(b,N,L)}this.setIndex(h),this.setAttribute("position",new Ft(g,3)),this.setAttribute("normal",new Ft(_,3)),this.setAttribute("uv",new Ft(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new wi(e.width,e.height,e.widthSegments,e.heightSegments)}}class Oa extends an{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 z,u=new z,h=[],g=[],_=[],f=[];for(let p=0;p<=n;p++){const x=[],M=p/n;let b=0;p===0&&o===0?b=.5/t:p===n&&l===Math.PI&&(b=-.5/t);for(let N=0;N<=t;N++){const L=N/t;m.x=-e*Math.cos(i+L*r)*Math.sin(o+M*a),m.y=e*Math.cos(o+M*a),m.z=e*Math.sin(i+L*r)*Math.sin(o+M*a),g.push(m.x,m.y,m.z),u.copy(m).normalize(),_.push(u.x,u.y,u.z),f.push(L+b,1-M),x.push(c++)}d.push(x)}for(let p=0;p<n;p++)for(let x=0;x<t;x++){const M=d[p][x+1],b=d[p][x],N=d[p+1][x],L=d[p+1][x+1];(p!==0||o>0)&&h.push(M,b,L),(p!==n-1||l<Math.PI)&&h.push(b,N,L)}this.setIndex(h),this.setAttribute("position",new Ft(g,3)),this.setAttribute("normal",new Ft(_,3)),this.setAttribute("uv",new Ft(f,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 an{constructor(e=new W0(new z(-1,-1,0),new z(-1,1,0),new z(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 z,l=new z,c=new Je;let d=new z;const m=[],u=[],h=[],g=[];_(),this.setIndex(g),this.setAttribute("position",new Ft(m,3)),this.setAttribute("normal",new Ft(u,3)),this.setAttribute("uv",new Ft(h,2));function _(){for(let M=0;M<t;M++)f(M);f(r===!1?t:0),x(),p()}function f(M){d=e.getPointAt(M/t,d);const b=o.normals[M],N=o.binormals[M];for(let L=0;L<=i;L++){const P=L/i*Math.PI*2,I=Math.sin(P),E=-Math.cos(P);l.x=E*b.x+I*N.x,l.y=E*b.y+I*N.y,l.z=E*b.z+I*N.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 p(){for(let M=1;M<=t;M++)for(let b=1;b<=i;b++){const N=(i+1)*(M-1)+(b-1),L=(i+1)*M+(b-1),P=(i+1)*M+b,I=(i+1)*(M-1)+b;g.push(N,L,I),g.push(L,P,I)}}function x(){for(let M=0;M<=t;M++)for(let b=0;b<=i;b++)c.x=M/t,c.y=b/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 an{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,i=new z,r=new z;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 f=0;f<3;f++){const p=a.getX(g+f),x=a.getX(g+(f+1)%3);i.fromBufferAttribute(o,p),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 Ft(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 Hn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new At(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 Hn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new At(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 At(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(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 vn,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 cn extends Hn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new At(16777215),this.specular=new At(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new At(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new vn,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 Hn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new At(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new At(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ua,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new vn,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 Hn{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 Hn{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 Ac:r=e,a=2*t-n;break;case Ec: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 Ac:o=e,l=2*n-t;break;case Ec: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,f=_*g,p=-u*f+2*u*_-u*g,x=(1+u)*f+(-1.5-2*u)*_+(-.5+u)*g+1,M=(-1-h)*f+(1.5+h)*_+.5*g,b=h*f-h*_;for(let N=0;N!==a;++N)r[N]=p*o[d+N]+x*o[c+N]+M*o[l+N]+b*o[m+N];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 ii{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 Aa: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 Aa;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}}ii.prototype.ValueTypeName="";ii.prototype.TimeBufferType=Float32Array;ii.prototype.ValueBufferType=Float32Array;ii.prototype.DefaultInterpolation=Tl;class Ks extends ii{constructor(e,t,n){super(e,t,n)}}Ks.prototype.ValueTypeName="bool";Ks.prototype.ValueBufferType=Array;Ks.prototype.DefaultInterpolation=Aa;Ks.prototype.InterpolantFactoryMethodLinear=void 0;Ks.prototype.InterpolantFactoryMethodSmooth=void 0;class $0 extends ii{constructor(e,t,n,i){super(e,t,n,i)}}$0.prototype.ValueTypeName="color";class Da extends ii{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)Un.slerpFlat(r,0,o,c-a,o,c,l);return r}}class Ar extends ii{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new I1(this.times,this.values,this.getValueSize(),e)}}Ar.prototype.ValueTypeName="quaternion";Ar.prototype.InterpolantFactoryMethodSmooth=void 0;class Js extends ii{constructor(e,t,n){super(e,t,n)}}Js.prototype.ValueTypeName="string";Js.prototype.ValueBufferType=Array;Js.prototype.DefaultInterpolation=Aa;Js.prototype.InterpolantFactoryMethodLinear=void 0;Js.prototype.InterpolantFactoryMethodSmooth=void 0;class $s extends ii{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=ti(),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(ii.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 f=[],p=[];q0(h,f,p,g),f.length!==0&&_.push(new m(u,f,p))}},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 f=[],p=[];for(let x=0;x!==u[g].morphTargets.length;++x){const M=u[g];f.push(M.time),p.push(M.morphTarget===_?1:0)}i.push(new Da(".morphTargetInfluence["+_+"]",f,p))}l=h.length*o}else{const h=".bones["+t[m].name+"]";n($s,h+".position",u,"pos",i),n(Ar,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 Ar;case"bool":case"boolean":return Ks;case"string":return Js}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 ni{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}}ni.DEFAULT_MATERIAL_NAME="__DEFAULT";const vi={};class O1 extends Error{constructor(e,t){super(e),this.response=t}}class Zs extends ni{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(vi[e]!==void 0){vi[e].push({onLoad:t,onProgress:n,onError:i});return}vi[e]=[],vi[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=vi[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 f=new ReadableStream({start(p){x();function x(){m.read().then(({done:M,value:b})=>{if(M)p.close();else{_+=b.byteLength;const N=new ProgressEvent("progress",{lengthComputable:g,loaded:_,total:h});for(let L=0,P=d.length;L<P;L++){const I=d[L];I.onProgress&&I.onProgress(N)}p.enqueue(b),x()}},M=>{p.error(M)})}}});return new Response(f)}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=vi[e];delete vi[e];for(let m=0,u=d.length;m<u;m++){const h=d[m];h.onLoad&&h.onLoad(c)}}).catch(c=>{const d=vi[e];if(d===void 0)throw this.manager.itemError(e),c;delete vi[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 ni{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 ni{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:ei,o.wrapT=c.wrapT!==void 0?c.wrapT:ei,o.magFilter=c.magFilter!==void 0?c.magFilter:kn,o.minFilter=c.minFilter!==void 0?c.minFilter:kn,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=Mi),c.mipmapCount===1&&(o.minFilter=kn),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},n,i),o}}class oc extends ni{constructor(e){super(e)}load(e,t,n,i){const r=new bn,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 Er extends rn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new At(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 K0 extends Er{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(rn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new At(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const So=new St,uh=new z,dh=new z;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 Je(512,512),this.mapType=hi,this.map=null,this.mapPass=null,this.matrix=new St,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new nc,this._frameExtents=new Je(1,1),this._viewportCount=1,this._viewports=[new Ot(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 _n(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 Er{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(rn.DEFAULT_UP),this.updateMatrix(),this.target=new rn,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 St,lr=new z,Ao=new z;class W1 extends lc{constructor(){super(new _n(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Je(4,2),this._viewportCount=6,this._viewports=[new Ot(2,1,1,1),new Ot(0,1,1,1),new Ot(3,1,1,1),new Ot(1,1,1,1),new Ot(3,0,1,1),new Ot(1,0,1,1)],this._cubeDirections=[new z(1,0,0),new z(-1,0,0),new z(0,0,1),new z(0,0,-1),new z(0,1,0),new z(0,-1,0)],this._cubeUps=[new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,0,1),new z(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),Ao.copy(n.position),Ao.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Ao),n.updateMatrixWorld(),i.makeTranslation(-lr.x,-lr.y,-lr.z),fh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(fh)}}class Pa extends Er{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 Er{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(rn.DEFAULT_UP),this.updateMatrix(),this.target=new rn,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 Er{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 an{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 _n{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 St;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=It(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(It(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const _h=new z,ta=new z;class K1{constructor(e=new z,t=new z){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){_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=It(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 J0 extends Ra{constructor(e=10,t=10,n=4473924,i=8947848){n=new At(n),i=new At(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 an;d.setAttribute("position",new Ft(l,3)),d.setAttribute("color",new Ft(c,3));const m=new Ei({vertexColors:!0,toneMapped:!1});super(d,m),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class J1 extends hs{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 E0: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 A0:return s*e*3/i.components*i.byteLength;case $n: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 Al:return Math.ceil(s/4)*Math.ceil(e/4)*8;case El: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 hi: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 ls:case Wl:case li: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
|
|
@@ -404,7 +404,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
|
|
|
404
404
|
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
|
|
405
405
|
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
|
|
406
406
|
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
|
|
407
|
-
} // validated`,
|
|
407
|
+
} // validated`,Ad=`#ifdef ENVMAP_TYPE_CUBE_UV
|
|
408
408
|
#define cubeUV_minMipLevel 4.0
|
|
409
409
|
#define cubeUV_minTileSize 16.0
|
|
410
410
|
float getFace( vec3 direction ) {
|
|
@@ -497,7 +497,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
|
|
|
497
497
|
return vec4( mix( color0, color1, mipF ), 1.0 );
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
#endif`,
|
|
500
|
+
#endif`,Ed=`vec3 transformedNormal = objectNormal;
|
|
501
501
|
#ifdef USE_TANGENT
|
|
502
502
|
vec3 transformedTangent = objectTangent;
|
|
503
503
|
#endif
|
|
@@ -1571,9 +1571,9 @@ vec3 nonPerturbedNormal = normal;`,yf=`#ifdef USE_NORMALMAP_OBJECTSPACE
|
|
|
1571
1571
|
float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
|
|
1572
1572
|
return mat3( T * scale, B * scale, N );
|
|
1573
1573
|
}
|
|
1574
|
-
#endif`,
|
|
1574
|
+
#endif`,Af=`#ifdef USE_CLEARCOAT
|
|
1575
1575
|
vec3 clearcoatNormal = nonPerturbedNormal;
|
|
1576
|
-
#endif`,
|
|
1576
|
+
#endif`,Ef=`#ifdef USE_CLEARCOAT_NORMALMAP
|
|
1577
1577
|
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
|
|
1578
1578
|
clearcoatMapN.xy *= clearcoatNormalScale;
|
|
1579
1579
|
clearcoatNormal = normalize( tbn2 * clearcoatMapN );
|
|
@@ -3169,7 +3169,7 @@ void main() {
|
|
|
3169
3169
|
#include <fog_fragment>
|
|
3170
3170
|
#include <premultiplied_alpha_fragment>
|
|
3171
3171
|
#include <dithering_fragment>
|
|
3172
|
-
}`,
|
|
3172
|
+
}`,Ap=`#define STANDARD
|
|
3173
3173
|
varying vec3 vViewPosition;
|
|
3174
3174
|
#ifdef USE_TRANSMISSION
|
|
3175
3175
|
varying vec3 vWorldPosition;
|
|
@@ -3212,7 +3212,7 @@ void main() {
|
|
|
3212
3212
|
#ifdef USE_TRANSMISSION
|
|
3213
3213
|
vWorldPosition = worldPosition.xyz;
|
|
3214
3214
|
#endif
|
|
3215
|
-
}`,
|
|
3215
|
+
}`,Ep=`#define STANDARD
|
|
3216
3216
|
#ifdef PHYSICAL
|
|
3217
3217
|
#define IOR
|
|
3218
3218
|
#define USE_SPECULAR
|
|
@@ -3571,7 +3571,7 @@ void main() {
|
|
|
3571
3571
|
#include <tonemapping_fragment>
|
|
3572
3572
|
#include <colorspace_fragment>
|
|
3573
3573
|
#include <fog_fragment>
|
|
3574
|
-
}`,zt={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:Kd,lights_physical_fragment:Jd,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:Kf,uv_pars_vertex:Jf,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},Ye={common:{diffuse:{value:new bt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ut},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ut}},envmap:{envMap:{value:null},envMapRotation:{value:new Ut},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ut}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ut}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ut},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ut},normalScale:{value:new Je(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ut},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ut}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ut}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ut}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new bt(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 bt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0},uvTransform:{value:new Ut}},sprite:{diffuse:{value:new bt(16777215)},opacity:{value:1},center:{value:new Je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ut},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0}}},Nn={basic:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.fog]),vertexShader:zt.meshbasic_vert,fragmentShader:zt.meshbasic_frag},lambert:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,Ye.lights,{emissive:{value:new bt(0)}}]),vertexShader:zt.meshlambert_vert,fragmentShader:zt.meshlambert_frag},phong:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,Ye.lights,{emissive:{value:new bt(0)},specular:{value:new bt(1118481)},shininess:{value:30}}]),vertexShader:zt.meshphong_vert,fragmentShader:zt.meshphong_frag},standard:{uniforms:Rn([Ye.common,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.roughnessmap,Ye.metalnessmap,Ye.fog,Ye.lights,{emissive:{value:new bt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:zt.meshphysical_vert,fragmentShader:zt.meshphysical_frag},toon:{uniforms:Rn([Ye.common,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.gradientmap,Ye.fog,Ye.lights,{emissive:{value:new bt(0)}}]),vertexShader:zt.meshtoon_vert,fragmentShader:zt.meshtoon_frag},matcap:{uniforms:Rn([Ye.common,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,{matcap:{value:null}}]),vertexShader:zt.meshmatcap_vert,fragmentShader:zt.meshmatcap_frag},points:{uniforms:Rn([Ye.points,Ye.fog]),vertexShader:zt.points_vert,fragmentShader:zt.points_frag},dashed:{uniforms:Rn([Ye.common,Ye.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:zt.linedashed_vert,fragmentShader:zt.linedashed_frag},depth:{uniforms:Rn([Ye.common,Ye.displacementmap]),vertexShader:zt.depth_vert,fragmentShader:zt.depth_frag},normal:{uniforms:Rn([Ye.common,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,{opacity:{value:1}}]),vertexShader:zt.meshnormal_vert,fragmentShader:zt.meshnormal_frag},sprite:{uniforms:Rn([Ye.sprite,Ye.fog]),vertexShader:zt.sprite_vert,fragmentShader:zt.sprite_frag},background:{uniforms:{uvTransform:{value:new Ut},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:zt.background_vert,fragmentShader:zt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ut}},vertexShader:zt.backgroundCube_vert,fragmentShader:zt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:zt.cube_vert,fragmentShader:zt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:zt.equirect_vert,fragmentShader:zt.equirect_frag},distanceRGBA:{uniforms:Rn([Ye.common,Ye.displacementmap,{referencePosition:{value:new z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:zt.distanceRGBA_vert,fragmentShader:zt.distanceRGBA_frag},shadow:{uniforms:Rn([Ye.lights,Ye.fog,{color:{value:new bt(0)},opacity:{value:1}}]),vertexShader:zt.shadow_vert,fragmentShader:zt.shadow_frag}};Nn.physical={uniforms:Rn([Nn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ut},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ut},clearcoatNormalScale:{value:new Je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ut},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ut},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ut},sheen:{value:0},sheenColor:{value:new bt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ut},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ut},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ut},transmissionSamplerSize:{value:new Je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ut},attenuationDistance:{value:0},attenuationColor:{value:new bt(0)},specularColor:{value:new bt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ut},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ut},anisotropyVector:{value:new Je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ut}}]),vertexShader:zt.meshphysical_vert,fragmentShader:zt.meshphysical_frag};const na={r:0,b:0,g:0},Zi=new _n,Np=new Mt;function Up(s,e,t,n,i,r,o){const a=new bt(0);let l=r===!0?0:1,c,d,m=null,u=0,h=null;function g(M){let b=M.isScene===!0?M.background:null;return b&&b.isTexture&&(b=(M.backgroundBlurriness>0?t:e).get(b)),b}function _(M){let b=!1;const N=g(M);N===null?p(a,l):N&&N.isColor&&(p(N,1),b=!0);const L=s.xr.getEnvironmentBlendMode();L==="additive"?n.buffers.color.setClear(0,0,0,1,o):L==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(s.autoClear||b)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function f(M,b){const N=g(b);N&&(N.isCubeTexture||N.mapping===Na)?(d===void 0&&(d=new Pt(new Wi(1,1,1),new Ti({name:"BackgroundCubeMaterial",uniforms:qs(Nn.backgroundCube.uniforms),vertexShader:Nn.backgroundCube.vertexShader,fragmentShader:Nn.backgroundCube.fragmentShader,side:Dn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(L,P,I){this.matrixWorld.copyPosition(I.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),Zi.copy(b.backgroundRotation),Zi.x*=-1,Zi.y*=-1,Zi.z*=-1,N.isCubeTexture&&N.isRenderTargetTexture===!1&&(Zi.y*=-1,Zi.z*=-1),d.material.uniforms.envMap.value=N,d.material.uniforms.flipEnvMap.value=N.isCubeTexture&&N.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=b.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Np.makeRotationFromEuler(Zi)),d.material.toneMapped=Bt.getTransfer(N.colorSpace)!==tn,(m!==N||u!==N.version||h!==s.toneMapping)&&(d.material.needsUpdate=!0,m=N,u=N.version,h=s.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):N&&N.isTexture&&(c===void 0&&(c=new Pt(new wi(2,2),new Ti({name:"BackgroundMaterial",uniforms:qs(Nn.background.uniforms),vertexShader:Nn.background.vertexShader,fragmentShader:Nn.background.fragmentShader,side:Yn,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=N,c.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,c.material.toneMapped=Bt.getTransfer(N.colorSpace)!==tn,N.matrixAutoUpdate===!0&&N.updateMatrix(),c.material.uniforms.uvTransform.value.copy(N.matrix),(m!==N||u!==N.version||h!==s.toneMapping)&&(c.material.needsUpdate=!0,m=N,u=N.version,h=s.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}function p(M,b){M.getRGB(na,N0(s)),n.buffers.color.setClear(na.r,na.g,na.b,b,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(M,b=1){a.set(M),l=b,p(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,p(a,l)},render:_,addToRenderList:f,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(E,F,B,X,Z){let se=!1;const W=m(X,B,F);r!==W&&(r=W,c(r.object)),se=h(E,X,B,Z),se&&g(E,X,B,Z),Z!==null&&e.update(Z,s.ELEMENT_ARRAY_BUFFER),(se||o)&&(o=!1,b(E,F,B,X),Z!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(Z).buffer))}function l(){return s.createVertexArray()}function c(E){return s.bindVertexArray(E)}function d(E){return s.deleteVertexArray(E)}function m(E,F,B){const X=B.wireframe===!0;let Z=n[E.id];Z===void 0&&(Z={},n[E.id]=Z);let se=Z[F.id];se===void 0&&(se={},Z[F.id]=se);let W=se[X];return W===void 0&&(W=u(l()),se[X]=W),W}function u(E){const F=[],B=[],X=[];for(let Z=0;Z<t;Z++)F[Z]=0,B[Z]=0,X[Z]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:F,enabledAttributes:B,attributeDivisors:X,object:E,attributes:{},index:null}}function h(E,F,B,X){const Z=r.attributes,se=F.attributes;let W=0;const he=B.getAttributes();for(const Q in he)if(he[Q].location>=0){const De=Z[Q];let Ae=se[Q];if(Ae===void 0&&(Q==="instanceMatrix"&&E.instanceMatrix&&(Ae=E.instanceMatrix),Q==="instanceColor"&&E.instanceColor&&(Ae=E.instanceColor)),De===void 0||De.attribute!==Ae||Ae&&De.data!==Ae.data)return!0;W++}return r.attributesNum!==W||r.index!==X}function g(E,F,B,X){const Z={},se=F.attributes;let W=0;const he=B.getAttributes();for(const Q in he)if(he[Q].location>=0){let De=se[Q];De===void 0&&(Q==="instanceMatrix"&&E.instanceMatrix&&(De=E.instanceMatrix),Q==="instanceColor"&&E.instanceColor&&(De=E.instanceColor));const Ae={};Ae.attribute=De,De&&De.data&&(Ae.data=De.data),Z[Q]=Ae,W++}r.attributes=Z,r.attributesNum=W,r.index=X}function _(){const E=r.newAttributes;for(let F=0,B=E.length;F<B;F++)E[F]=0}function f(E){p(E,0)}function p(E,F){const B=r.newAttributes,X=r.enabledAttributes,Z=r.attributeDivisors;B[E]=1,X[E]===0&&(s.enableVertexAttribArray(E),X[E]=1),Z[E]!==F&&(s.vertexAttribDivisor(E,F),Z[E]=F)}function x(){const E=r.newAttributes,F=r.enabledAttributes;for(let B=0,X=F.length;B<X;B++)F[B]!==E[B]&&(s.disableVertexAttribArray(B),F[B]=0)}function M(E,F,B,X,Z,se,W){W===!0?s.vertexAttribIPointer(E,F,B,Z,se):s.vertexAttribPointer(E,F,B,X,Z,se)}function b(E,F,B,X){_();const Z=X.attributes,se=B.getAttributes(),W=F.defaultAttributeValues;for(const he in se){const Q=se[he];if(Q.location>=0){let xe=Z[he];if(xe===void 0&&(he==="instanceMatrix"&&E.instanceMatrix&&(xe=E.instanceMatrix),he==="instanceColor"&&E.instanceColor&&(xe=E.instanceColor)),xe!==void 0){const De=xe.normalized,Ae=xe.itemSize,pe=e.get(xe);if(pe===void 0)continue;const re=pe.buffer,q=pe.type,K=pe.bytesPerElement,te=q===s.INT||q===s.UNSIGNED_INT||xe.gpuType===Wl;if(xe.isInterleavedBufferAttribute){const ee=xe.data,fe=ee.stride,Y=xe.offset;if(ee.isInstancedInterleavedBuffer){for(let me=0;me<Q.locationSize;me++)p(Q.location+me,ee.meshPerAttribute);E.isInstancedMesh!==!0&&X._maxInstanceCount===void 0&&(X._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let me=0;me<Q.locationSize;me++)f(Q.location+me);s.bindBuffer(s.ARRAY_BUFFER,re);for(let me=0;me<Q.locationSize;me++)M(Q.location+me,Ae/Q.locationSize,q,De,fe*K,(Y+Ae/Q.locationSize*me)*K,te)}else{if(xe.isInstancedBufferAttribute){for(let ee=0;ee<Q.locationSize;ee++)p(Q.location+ee,xe.meshPerAttribute);E.isInstancedMesh!==!0&&X._maxInstanceCount===void 0&&(X._maxInstanceCount=xe.meshPerAttribute*xe.count)}else for(let ee=0;ee<Q.locationSize;ee++)f(Q.location+ee);s.bindBuffer(s.ARRAY_BUFFER,re);for(let ee=0;ee<Q.locationSize;ee++)M(Q.location+ee,Ae/Q.locationSize,q,De,Ae*K,Ae/Q.locationSize*ee*K,te)}}else if(W!==void 0){const De=W[he];if(De!==void 0)switch(De.length){case 2:s.vertexAttrib2fv(Q.location,De);break;case 3:s.vertexAttrib3fv(Q.location,De);break;case 4:s.vertexAttrib4fv(Q.location,De);break;default:s.vertexAttrib1fv(Q.location,De)}}}}x()}function N(){I();for(const E in n){const F=n[E];for(const B in F){const X=F[B];for(const Z in X)d(X[Z].object),delete X[Z];delete F[B]}delete n[E]}}function L(E){if(n[E.id]===void 0)return;const F=n[E.id];for(const B in F){const X=F[B];for(const Z in X)d(X[Z].object),delete X[Z];delete F[B]}delete n[E.id]}function P(E){for(const F in n){const B=n[F];if(B[E.id]===void 0)continue;const X=B[E.id];for(const Z in X)d(X[Z].object),delete X[Z];delete B[E.id]}}function I(){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:I,resetDefaultState:A,dispose:N,releaseStatesOfGeometry:L,releaseStatesOfProgram:P,initAttributes:_,enableAttribute:f,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 P=e.get("EXT_texture_filter_anisotropic");i=s.getParameter(P.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(P){return!(P!==$n&&n.convert(P)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(P){const I=P===Sr&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(P!==hi&&n.convert(P)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&P!==li&&!I)}function l(P){if(P==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";P="mediump"}return P==="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),f=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),p=s.getParameter(s.MAX_VERTEX_ATTRIBS),x=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),M=s.getParameter(s.MAX_VARYING_VECTORS),b=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),N=g>0,L=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:f,maxAttributes:p,maxVertexUniforms:x,maxVaryings:M,maxFragmentUniforms:b,vertexTextures:N,maxSamples:L}}function Op(s){const e=this;let t=null,n=0,i=!1,r=!1;const o=new jn,a=new Ut,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,f=m.clipShadows,p=s.get(m);if(!i||g===null||g.length===0||r&&!f)r?d(null):c();else{const x=r?0:n,M=x*4;let b=p.clippingState||null;l.value=b,b=d(g,u,M,h);for(let N=0;N!==M;++N)b[N]=t[N];p.clippingState=b,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 f=null;if(_!==0){if(f=l.value,g!==!0||f===null){const p=h+_*4,x=u.matrixWorldInverse;a.getNormalMatrix(x),(f===null||f.length<p)&&(f=new Float32Array(p));for(let M=0,b=h;M!==_;++M,b+=4)o.copy(m[M]).applyMatrix4(x,a),o.normal.toArray(f,b),f[b+3]=o.constant}l.value=f,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,f}}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],ss=20,Ao=new Ha,xh=new bt;let wo=null,To=0,Co=0,Ro=!1;const ns=(1+Math.sqrt(5))/2,Ps=1/ns,Mh=[new z(-ns,Ps,0),new z(ns,Ps,0),new z(-Ps,0,ns),new z(Ps,0,ns),new z(0,ns,-Ps),new z(0,ns,Ps),new z(-1,1,-1),new z(1,1,-1),new z(-1,1,1),new z(1,1,1)],Vp=new z;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:kn,minFilter:kn,generateMipmaps:!1,type:Sr,format:$n,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 Pt(this._lodPlanes[0],e);this._renderer.compile(t,Ao)}_sceneToCubeUV(e,t,n,i,r){const l=new gn(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=Vi,m.autoClear=!1;const g=new Gi({name:"PMREM.Background",side:Dn,depthWrite:!1,depthTest:!1}),_=new Pt(new Wi,g);let f=!1;const p=e.background;p?p.isColor&&(g.color.copy(p),e.background=null,f=!0):(g.color.copy(xh),f=!0);for(let x=0;x<6;x++){const M=x%3;M===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)):M===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 b=this._cubeSize;ia(i,M*b,x>2?b:0,b,b),m.setRenderTarget(i),f&&m.render(_,l),m.render(e,l)}_.geometry.dispose(),_.material.dispose(),m.toneMapping=h,m.autoClear=u,e.background=p}_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 Pt(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 Pt(this._lodPlanes[i],c),u=c.uniforms,h=this._sizeLods[n]-1,g=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*ss-1),_=r/g,f=isFinite(r)?1+Math.floor(d*_):ss;f>ss&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${ss}`);const p=[];let x=0;for(let P=0;P<ss;++P){const I=P/_,A=Math.exp(-I*I/2);p.push(A),P===0?x+=A:P<f&&(x+=2*A)}for(let P=0;P<p.length;P++)p[P]=p[P]/x;u.envMap.value=e.texture,u.samples.value=f,u.weights.value=p,u.latitudinal.value=o==="latitudinal",a&&(u.poleAxis.value=a);const{_lodMax:M}=this;u.dTheta.value=g,u.mipInt.value=M-n;const b=this._sizeLods[i],N=3*b*(i>M-zs?i-M+zs:0),L=4*(this._cubeSize-b);ia(t,N,L,3*b,2*b),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,f=2,p=1,x=new Float32Array(_*g*h),M=new Float32Array(f*g*h),b=new Float32Array(p*g*h);for(let L=0;L<h;L++){const P=L%3*2/3-1,I=L>2?0:-1,A=[P,I,0,P+2/3,I,0,P+2/3,I+1,0,P,I,0,P+2/3,I+1,0,P,I+1,0];x.set(A,_*g*L),M.set(u,f*g*L);const E=[L,L,L,L,L,L];b.set(E,p*g*L)}const N=new rn;N.setAttribute("position",new hn(x,_)),N.setAttribute("uv",new hn(M,f)),N.setAttribute("faceIndex",new hn(b,p)),e.push(N),i>zs&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function Sh(s,e,t){const n=new cs(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(ss),i=new z(0,1,0);return new Ti({name:"SphericalGaussianBlur",defines:{n:ss,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
|
+
}`,zt={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:Ad,defaultnormal_vertex:Ed,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:Kd,lights_physical_fragment:Jd,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:Af,clearcoat_normal_fragment_maps:Ef,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:Kf,uv_pars_vertex:Jf,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:Ap,meshphysical_frag:Ep,meshtoon_vert:wp,meshtoon_frag:Tp,points_vert:Cp,points_frag:Rp,shadow_vert:Dp,shadow_frag:Lp,sprite_vert:Pp,sprite_frag:Fp},Ye={common:{diffuse:{value:new At(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ut},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ut}},envmap:{envMap:{value:null},envMapRotation:{value:new Ut},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ut}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ut}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ut},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ut},normalScale:{value:new Je(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ut},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ut}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ut}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ut}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new At(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 At(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0},uvTransform:{value:new Ut}},sprite:{diffuse:{value:new At(16777215)},opacity:{value:1},center:{value:new Je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ut},alphaMap:{value:null},alphaMapTransform:{value:new Ut},alphaTest:{value:0}}},Nn={basic:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.fog]),vertexShader:zt.meshbasic_vert,fragmentShader:zt.meshbasic_frag},lambert:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,Ye.lights,{emissive:{value:new At(0)}}]),vertexShader:zt.meshlambert_vert,fragmentShader:zt.meshlambert_frag},phong:{uniforms:Rn([Ye.common,Ye.specularmap,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,Ye.lights,{emissive:{value:new At(0)},specular:{value:new At(1118481)},shininess:{value:30}}]),vertexShader:zt.meshphong_vert,fragmentShader:zt.meshphong_frag},standard:{uniforms:Rn([Ye.common,Ye.envmap,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.roughnessmap,Ye.metalnessmap,Ye.fog,Ye.lights,{emissive:{value:new At(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:zt.meshphysical_vert,fragmentShader:zt.meshphysical_frag},toon:{uniforms:Rn([Ye.common,Ye.aomap,Ye.lightmap,Ye.emissivemap,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.gradientmap,Ye.fog,Ye.lights,{emissive:{value:new At(0)}}]),vertexShader:zt.meshtoon_vert,fragmentShader:zt.meshtoon_frag},matcap:{uniforms:Rn([Ye.common,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,Ye.fog,{matcap:{value:null}}]),vertexShader:zt.meshmatcap_vert,fragmentShader:zt.meshmatcap_frag},points:{uniforms:Rn([Ye.points,Ye.fog]),vertexShader:zt.points_vert,fragmentShader:zt.points_frag},dashed:{uniforms:Rn([Ye.common,Ye.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:zt.linedashed_vert,fragmentShader:zt.linedashed_frag},depth:{uniforms:Rn([Ye.common,Ye.displacementmap]),vertexShader:zt.depth_vert,fragmentShader:zt.depth_frag},normal:{uniforms:Rn([Ye.common,Ye.bumpmap,Ye.normalmap,Ye.displacementmap,{opacity:{value:1}}]),vertexShader:zt.meshnormal_vert,fragmentShader:zt.meshnormal_frag},sprite:{uniforms:Rn([Ye.sprite,Ye.fog]),vertexShader:zt.sprite_vert,fragmentShader:zt.sprite_frag},background:{uniforms:{uvTransform:{value:new Ut},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:zt.background_vert,fragmentShader:zt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ut}},vertexShader:zt.backgroundCube_vert,fragmentShader:zt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:zt.cube_vert,fragmentShader:zt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:zt.equirect_vert,fragmentShader:zt.equirect_frag},distanceRGBA:{uniforms:Rn([Ye.common,Ye.displacementmap,{referencePosition:{value:new z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:zt.distanceRGBA_vert,fragmentShader:zt.distanceRGBA_frag},shadow:{uniforms:Rn([Ye.lights,Ye.fog,{color:{value:new At(0)},opacity:{value:1}}]),vertexShader:zt.shadow_vert,fragmentShader:zt.shadow_frag}};Nn.physical={uniforms:Rn([Nn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ut},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ut},clearcoatNormalScale:{value:new Je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ut},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ut},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ut},sheen:{value:0},sheenColor:{value:new At(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ut},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ut},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ut},transmissionSamplerSize:{value:new Je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ut},attenuationDistance:{value:0},attenuationColor:{value:new At(0)},specularColor:{value:new At(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ut},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ut},anisotropyVector:{value:new Je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ut}}]),vertexShader:zt.meshphysical_vert,fragmentShader:zt.meshphysical_frag};const na={r:0,b:0,g:0},Zi=new vn,Np=new St;function Up(s,e,t,n,i,r,o){const a=new At(0);let l=r===!0?0:1,c,d,m=null,u=0,h=null;function g(M){let b=M.isScene===!0?M.background:null;return b&&b.isTexture&&(b=(M.backgroundBlurriness>0?t:e).get(b)),b}function _(M){let b=!1;const N=g(M);N===null?p(a,l):N&&N.isColor&&(p(N,1),b=!0);const L=s.xr.getEnvironmentBlendMode();L==="additive"?n.buffers.color.setClear(0,0,0,1,o):L==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(s.autoClear||b)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function f(M,b){const N=g(b);N&&(N.isCubeTexture||N.mapping===Na)?(d===void 0&&(d=new Nt(new Wi(1,1,1),new Ti({name:"BackgroundCubeMaterial",uniforms:qs(Nn.backgroundCube.uniforms),vertexShader:Nn.backgroundCube.vertexShader,fragmentShader:Nn.backgroundCube.fragmentShader,side:Dn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(L,P,I){this.matrixWorld.copyPosition(I.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),Zi.copy(b.backgroundRotation),Zi.x*=-1,Zi.y*=-1,Zi.z*=-1,N.isCubeTexture&&N.isRenderTargetTexture===!1&&(Zi.y*=-1,Zi.z*=-1),d.material.uniforms.envMap.value=N,d.material.uniforms.flipEnvMap.value=N.isCubeTexture&&N.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=b.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(Np.makeRotationFromEuler(Zi)),d.material.toneMapped=Bt.getTransfer(N.colorSpace)!==nn,(m!==N||u!==N.version||h!==s.toneMapping)&&(d.material.needsUpdate=!0,m=N,u=N.version,h=s.toneMapping),d.layers.enableAll(),M.unshift(d,d.geometry,d.material,0,0,null)):N&&N.isTexture&&(c===void 0&&(c=new Nt(new wi(2,2),new Ti({name:"BackgroundMaterial",uniforms:qs(Nn.background.uniforms),vertexShader:Nn.background.vertexShader,fragmentShader:Nn.background.fragmentShader,side:Yn,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=N,c.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,c.material.toneMapped=Bt.getTransfer(N.colorSpace)!==nn,N.matrixAutoUpdate===!0&&N.updateMatrix(),c.material.uniforms.uvTransform.value.copy(N.matrix),(m!==N||u!==N.version||h!==s.toneMapping)&&(c.material.needsUpdate=!0,m=N,u=N.version,h=s.toneMapping),c.layers.enableAll(),M.unshift(c,c.geometry,c.material,0,0,null))}function p(M,b){M.getRGB(na,N0(s)),n.buffers.color.setClear(na.r,na.g,na.b,b,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(M,b=1){a.set(M),l=b,p(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,p(a,l)},render:_,addToRenderList:f,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,F,B,X,Z){let se=!1;const G=m(X,B,F);r!==G&&(r=G,c(r.object)),se=h(A,X,B,Z),se&&g(A,X,B,Z),Z!==null&&e.update(Z,s.ELEMENT_ARRAY_BUFFER),(se||o)&&(o=!1,b(A,F,B,X),Z!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(Z).buffer))}function l(){return s.createVertexArray()}function c(A){return s.bindVertexArray(A)}function d(A){return s.deleteVertexArray(A)}function m(A,F,B){const X=B.wireframe===!0;let Z=n[A.id];Z===void 0&&(Z={},n[A.id]=Z);let se=Z[F.id];se===void 0&&(se={},Z[F.id]=se);let G=se[X];return G===void 0&&(G=u(l()),se[X]=G),G}function u(A){const F=[],B=[],X=[];for(let Z=0;Z<t;Z++)F[Z]=0,B[Z]=0,X[Z]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:F,enabledAttributes:B,attributeDivisors:X,object:A,attributes:{},index:null}}function h(A,F,B,X){const Z=r.attributes,se=F.attributes;let G=0;const de=B.getAttributes();for(const Q in de)if(de[Q].location>=0){const Pe=Z[Q];let Te=se[Q];if(Te===void 0&&(Q==="instanceMatrix"&&A.instanceMatrix&&(Te=A.instanceMatrix),Q==="instanceColor"&&A.instanceColor&&(Te=A.instanceColor)),Pe===void 0||Pe.attribute!==Te||Te&&Pe.data!==Te.data)return!0;G++}return r.attributesNum!==G||r.index!==X}function g(A,F,B,X){const Z={},se=F.attributes;let G=0;const de=B.getAttributes();for(const Q in de)if(de[Q].location>=0){let Pe=se[Q];Pe===void 0&&(Q==="instanceMatrix"&&A.instanceMatrix&&(Pe=A.instanceMatrix),Q==="instanceColor"&&A.instanceColor&&(Pe=A.instanceColor));const Te={};Te.attribute=Pe,Pe&&Pe.data&&(Te.data=Pe.data),Z[Q]=Te,G++}r.attributes=Z,r.attributesNum=G,r.index=X}function _(){const A=r.newAttributes;for(let F=0,B=A.length;F<B;F++)A[F]=0}function f(A){p(A,0)}function p(A,F){const B=r.newAttributes,X=r.enabledAttributes,Z=r.attributeDivisors;B[A]=1,X[A]===0&&(s.enableVertexAttribArray(A),X[A]=1),Z[A]!==F&&(s.vertexAttribDivisor(A,F),Z[A]=F)}function x(){const A=r.newAttributes,F=r.enabledAttributes;for(let B=0,X=F.length;B<X;B++)F[B]!==A[B]&&(s.disableVertexAttribArray(B),F[B]=0)}function M(A,F,B,X,Z,se,G){G===!0?s.vertexAttribIPointer(A,F,B,Z,se):s.vertexAttribPointer(A,F,B,X,Z,se)}function b(A,F,B,X){_();const Z=X.attributes,se=B.getAttributes(),G=F.defaultAttributeValues;for(const de in se){const Q=se[de];if(Q.location>=0){let xe=Z[de];if(xe===void 0&&(de==="instanceMatrix"&&A.instanceMatrix&&(xe=A.instanceMatrix),de==="instanceColor"&&A.instanceColor&&(xe=A.instanceColor)),xe!==void 0){const Pe=xe.normalized,Te=xe.itemSize,me=e.get(xe);if(me===void 0)continue;const ae=me.buffer,j=me.type,K=me.bytesPerElement,te=j===s.INT||j===s.UNSIGNED_INT||xe.gpuType===Wl;if(xe.isInterleavedBufferAttribute){const ee=xe.data,pe=ee.stride,$=xe.offset;if(ee.isInstancedInterleavedBuffer){for(let ge=0;ge<Q.locationSize;ge++)p(Q.location+ge,ee.meshPerAttribute);A.isInstancedMesh!==!0&&X._maxInstanceCount===void 0&&(X._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let ge=0;ge<Q.locationSize;ge++)f(Q.location+ge);s.bindBuffer(s.ARRAY_BUFFER,ae);for(let ge=0;ge<Q.locationSize;ge++)M(Q.location+ge,Te/Q.locationSize,j,Pe,pe*K,($+Te/Q.locationSize*ge)*K,te)}else{if(xe.isInstancedBufferAttribute){for(let ee=0;ee<Q.locationSize;ee++)p(Q.location+ee,xe.meshPerAttribute);A.isInstancedMesh!==!0&&X._maxInstanceCount===void 0&&(X._maxInstanceCount=xe.meshPerAttribute*xe.count)}else for(let ee=0;ee<Q.locationSize;ee++)f(Q.location+ee);s.bindBuffer(s.ARRAY_BUFFER,ae);for(let ee=0;ee<Q.locationSize;ee++)M(Q.location+ee,Te/Q.locationSize,j,Pe,Te*K,Te/Q.locationSize*ee*K,te)}}else if(G!==void 0){const Pe=G[de];if(Pe!==void 0)switch(Pe.length){case 2:s.vertexAttrib2fv(Q.location,Pe);break;case 3:s.vertexAttrib3fv(Q.location,Pe);break;case 4:s.vertexAttrib4fv(Q.location,Pe);break;default:s.vertexAttrib1fv(Q.location,Pe)}}}}x()}function N(){I();for(const A in n){const F=n[A];for(const B in F){const X=F[B];for(const Z in X)d(X[Z].object),delete X[Z];delete F[B]}delete n[A]}}function L(A){if(n[A.id]===void 0)return;const F=n[A.id];for(const B in F){const X=F[B];for(const Z in X)d(X[Z].object),delete X[Z];delete F[B]}delete n[A.id]}function P(A){for(const F in n){const B=n[F];if(B[A.id]===void 0)continue;const X=B[A.id];for(const Z in X)d(X[Z].object),delete X[Z];delete B[A.id]}}function I(){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:I,resetDefaultState:E,dispose:N,releaseStatesOfGeometry:L,releaseStatesOfProgram:P,initAttributes:_,enableAttribute:f,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 P=e.get("EXT_texture_filter_anisotropic");i=s.getParameter(P.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(P){return!(P!==$n&&n.convert(P)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(P){const I=P===Sr&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(P!==hi&&n.convert(P)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&P!==li&&!I)}function l(P){if(P==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";P="mediump"}return P==="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),f=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),p=s.getParameter(s.MAX_VERTEX_ATTRIBS),x=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),M=s.getParameter(s.MAX_VARYING_VECTORS),b=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),N=g>0,L=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:f,maxAttributes:p,maxVertexUniforms:x,maxVaryings:M,maxFragmentUniforms:b,vertexTextures:N,maxSamples:L}}function Op(s){const e=this;let t=null,n=0,i=!1,r=!1;const o=new jn,a=new Ut,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,f=m.clipShadows,p=s.get(m);if(!i||g===null||g.length===0||r&&!f)r?d(null):c();else{const x=r?0:n,M=x*4;let b=p.clippingState||null;l.value=b,b=d(g,u,M,h);for(let N=0;N!==M;++N)b[N]=t[N];p.clippingState=b,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 f=null;if(_!==0){if(f=l.value,g!==!0||f===null){const p=h+_*4,x=u.matrixWorldInverse;a.getNormalMatrix(x),(f===null||f.length<p)&&(f=new Float32Array(p));for(let M=0,b=h;M!==_;++M,b+=4)o.copy(m[M]).applyMatrix4(x,a),o.normal.toArray(f,b),f[b+3]=o.constant}l.value=f,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,f}}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],ss=20,Eo=new Ha,xh=new At;let wo=null,To=0,Co=0,Ro=!1;const ns=(1+Math.sqrt(5))/2,Ps=1/ns,Mh=[new z(-ns,Ps,0),new z(ns,Ps,0),new z(-Ps,0,ns),new z(Ps,0,ns),new z(0,ns,-Ps),new z(0,ns,Ps),new z(-1,1,-1),new z(1,1,-1),new z(-1,1,1),new z(1,1,1)],Vp=new z;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=Eh(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Ah(),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:kn,minFilter:kn,generateMipmaps:!1,type:Sr,format:$n,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 Nt(this._lodPlanes[0],e);this._renderer.compile(t,Eo)}_sceneToCubeUV(e,t,n,i,r){const l=new _n(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=Vi,m.autoClear=!1;const g=new Gi({name:"PMREM.Background",side:Dn,depthWrite:!1,depthTest:!1}),_=new Nt(new Wi,g);let f=!1;const p=e.background;p?p.isColor&&(g.color.copy(p),e.background=null,f=!0):(g.color.copy(xh),f=!0);for(let x=0;x<6;x++){const M=x%3;M===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)):M===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 b=this._cubeSize;ia(i,M*b,x>2?b:0,b,b),m.setRenderTarget(i),f&&m.render(_,l),m.render(e,l)}_.geometry.dispose(),_.material.dispose(),m.toneMapping=h,m.autoClear=u,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===Gs||e.mapping===Ws;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Eh()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Ah());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new Nt(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,Eo)}_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 Nt(this._lodPlanes[i],c),u=c.uniforms,h=this._sizeLods[n]-1,g=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*ss-1),_=r/g,f=isFinite(r)?1+Math.floor(d*_):ss;f>ss&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${ss}`);const p=[];let x=0;for(let P=0;P<ss;++P){const I=P/_,E=Math.exp(-I*I/2);p.push(E),P===0?x+=E:P<f&&(x+=2*E)}for(let P=0;P<p.length;P++)p[P]=p[P]/x;u.envMap.value=e.texture,u.samples.value=f,u.weights.value=p,u.latitudinal.value=o==="latitudinal",a&&(u.poleAxis.value=a);const{_lodMax:M}=this;u.dTheta.value=g,u.mipInt.value=M-n;const b=this._sizeLods[i],N=3*b*(i>M-zs?i-M+zs:0),L=4*(this._cubeSize-b);ia(t,N,L,3*b,2*b),l.setRenderTarget(t),l.render(m,Eo)}}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,f=2,p=1,x=new Float32Array(_*g*h),M=new Float32Array(f*g*h),b=new Float32Array(p*g*h);for(let L=0;L<h;L++){const P=L%3*2/3-1,I=L>2?0:-1,E=[P,I,0,P+2/3,I,0,P+2/3,I+1,0,P,I,0,P+2/3,I+1,0,P,I+1,0];x.set(E,_*g*L),M.set(u,f*g*L);const A=[L,L,L,L,L,L];b.set(A,p*g*L)}const N=new an;N.setAttribute("position",new un(x,_)),N.setAttribute("uv",new un(M,f)),N.setAttribute("faceIndex",new un(b,p)),e.push(N),i>zs&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function Sh(s,e,t){const n=new cs(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(ss),i=new z(0,1,0);return new Ti({name:"SphericalGaussianBlur",defines:{n:ss,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;
|
|
@@ -3631,7 +3631,7 @@ void main() {
|
|
|
3631
3631
|
}
|
|
3632
3632
|
|
|
3633
3633
|
}
|
|
3634
|
-
`,blending:ki,depthTest:!1,depthWrite:!1})}function
|
|
3634
|
+
`,blending:ki,depthTest:!1,depthWrite:!1})}function Ah(){return new Ti({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:uc(),fragmentShader:`
|
|
3635
3635
|
|
|
3636
3636
|
precision mediump float;
|
|
3637
3637
|
precision mediump int;
|
|
@@ -3650,7 +3650,7 @@ void main() {
|
|
|
3650
3650
|
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
|
|
3651
3651
|
|
|
3652
3652
|
}
|
|
3653
|
-
`,blending:ki,depthTest:!1,depthWrite:!1})}function
|
|
3653
|
+
`,blending:ki,depthTest:!1,depthWrite:!1})}function Eh(){return new Ti({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:uc(),fragmentShader:`
|
|
3654
3654
|
|
|
3655
3655
|
precision mediump float;
|
|
3656
3656
|
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 M=0,b=x.length;M<b;M+=3){const N=x[M+0],L=x[M+1],P=x[M+2];u.push(N,L,L,P,P,N)}}else if(g!==void 0){const x=g.array;_=g.version;for(let M=0,b=x.length/3-1;M<b;M+=3){const N=M+0,L=M+1,P=M+2;u.push(N,L,L,P,P,N)}}else return;const f=new(R0(u)?F0:P0)(u,1);f.version=_;const p=r.get(m);p&&e.remove(p),r.set(m,f)}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 f=0;for(let p=0;p<g;p++)f+=h[p];t.update(f,n,1)}function m(u,h,g,_){if(g===0)return;const f=e.get("WEBGL_multi_draw");if(f===null)for(let p=0;p<u.length;p++)c(u[p]/o,h[p],_[p]);else{f.multiDrawElementsInstancedWEBGL(n,h,0,r,u,0,_,0,g);let p=0;for(let x=0;x<g;x++)p+=h[x]*_[x];t.update(p,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 Ot;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(){P.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,f=a.morphAttributes.position||[],p=a.morphAttributes.normal||[],x=a.morphAttributes.color||[];let M=0;h===!0&&(M=1),g===!0&&(M=2),_===!0&&(M=3);let b=a.attributes.position.count*M,N=1;b>e.maxTextureSize&&(N=Math.ceil(b/e.maxTextureSize),b=e.maxTextureSize);const L=new Float32Array(b*N*4*m),P=new D0(L,b,N,m);P.type=li,P.needsUpdate=!0;const I=M*4;for(let E=0;E<m;E++){const F=f[E],B=p[E],X=x[E],Z=b*N*4*E;for(let se=0;se<F.count;se++){const W=se*I;h===!0&&(i.fromBufferAttribute(F,se),L[Z+W+0]=i.x,L[Z+W+1]=i.y,L[Z+W+2]=i.z,L[Z+W+3]=0),g===!0&&(i.fromBufferAttribute(B,se),L[Z+W+4]=i.x,L[Z+W+5]=i.y,L[Z+W+6]=i.z,L[Z+W+7]=0),_===!0&&(i.fromBufferAttribute(X,se),L[Z+W+8]=i.x,L[Z+W+9]=i.y,L[Z+W+10]=i.z,L[Z+W+11]=X.itemSize===4?i.w:1)}}u={count:m,texture:P,size:new Je(b,N)},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 Kp(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 Mn,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 fn(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 pn(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 Jp(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(fn(t,e))return;s.uniform2fv(this.addr,e),pn(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(fn(t,e))return;s.uniform3fv(this.addr,e),pn(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(fn(t,e))return;s.uniform4fv(this.addr,e),pn(t,e)}}function tm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(fn(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),pn(t,e)}else{if(fn(t,n))return;Lh.set(n),s.uniformMatrix2fv(this.addr,!1,Lh),pn(t,n)}}function nm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(fn(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),pn(t,e)}else{if(fn(t,n))return;Dh.set(n),s.uniformMatrix3fv(this.addr,!1,Dh),pn(t,n)}}function im(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(fn(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),pn(t,e)}else{if(fn(t,n))return;Rh.set(n),s.uniformMatrix4fv(this.addr,!1,Rh),pn(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(fn(t,e))return;s.uniform2iv(this.addr,e),pn(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(fn(t,e))return;s.uniform3iv(this.addr,e),pn(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(fn(t,e))return;s.uniform4iv(this.addr,e),pn(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(fn(t,e))return;s.uniform2uiv(this.addr,e),pn(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(fn(t,e))return;s.uniform3uiv(this.addr,e),pn(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(fn(t,e))return;s.uniform4uiv(this.addr,e),pn(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 Jp;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);fn(n,r)||(s.uniform1iv(this.addr,r),pn(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);fn(n,r)||(s.uniform1iv(this.addr,r),pn(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);fn(n,r)||(s.uniform1iv(this.addr,r),pn(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);fn(n,r)||(s.uniform1iv(this.addr,r),pn(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(`
|
|
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 M=0,b=x.length;M<b;M+=3){const N=x[M+0],L=x[M+1],P=x[M+2];u.push(N,L,L,P,P,N)}}else if(g!==void 0){const x=g.array;_=g.version;for(let M=0,b=x.length/3-1;M<b;M+=3){const N=M+0,L=M+1,P=M+2;u.push(N,L,L,P,P,N)}}else return;const f=new(R0(u)?F0:P0)(u,1);f.version=_;const p=r.get(m);p&&e.remove(p),r.set(m,f)}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 f=0;for(let p=0;p<g;p++)f+=h[p];t.update(f,n,1)}function m(u,h,g,_){if(g===0)return;const f=e.get("WEBGL_multi_draw");if(f===null)for(let p=0;p<u.length;p++)c(u[p]/o,h[p],_[p]);else{f.multiDrawElementsInstancedWEBGL(n,h,0,r,u,0,_,0,g);let p=0;for(let x=0;x<g;x++)p+=h[x]*_[x];t.update(p,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 Ot;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(){P.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,f=a.morphAttributes.position||[],p=a.morphAttributes.normal||[],x=a.morphAttributes.color||[];let M=0;h===!0&&(M=1),g===!0&&(M=2),_===!0&&(M=3);let b=a.attributes.position.count*M,N=1;b>e.maxTextureSize&&(N=Math.ceil(b/e.maxTextureSize),b=e.maxTextureSize);const L=new Float32Array(b*N*4*m),P=new D0(L,b,N,m);P.type=li,P.needsUpdate=!0;const I=M*4;for(let A=0;A<m;A++){const F=f[A],B=p[A],X=x[A],Z=b*N*4*A;for(let se=0;se<F.count;se++){const G=se*I;h===!0&&(i.fromBufferAttribute(F,se),L[Z+G+0]=i.x,L[Z+G+1]=i.y,L[Z+G+2]=i.z,L[Z+G+3]=0),g===!0&&(i.fromBufferAttribute(B,se),L[Z+G+4]=i.x,L[Z+G+5]=i.y,L[Z+G+6]=i.z,L[Z+G+7]=0),_===!0&&(i.fromBufferAttribute(X,se),L[Z+G+8]=i.x,L[Z+G+9]=i.y,L[Z+G+10]=i.z,L[Z+G+11]=X.itemSize===4?i.w:1)}}u={count:m,texture:P,size:new Je(b,N)},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 Kp(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 bn,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 pn(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 mn(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 Jp(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(pn(t,e))return;s.uniform2fv(this.addr,e),mn(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(pn(t,e))return;s.uniform3fv(this.addr,e),mn(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(pn(t,e))return;s.uniform4fv(this.addr,e),mn(t,e)}}function tm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(pn(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),mn(t,e)}else{if(pn(t,n))return;Lh.set(n),s.uniformMatrix2fv(this.addr,!1,Lh),mn(t,n)}}function nm(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(pn(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),mn(t,e)}else{if(pn(t,n))return;Dh.set(n),s.uniformMatrix3fv(this.addr,!1,Dh),mn(t,n)}}function im(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(pn(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),mn(t,e)}else{if(pn(t,n))return;Rh.set(n),s.uniformMatrix4fv(this.addr,!1,Rh),mn(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(pn(t,e))return;s.uniform2iv(this.addr,e),mn(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(pn(t,e))return;s.uniform3iv(this.addr,e),mn(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(pn(t,e))return;s.uniform4iv(this.addr,e),mn(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(pn(t,e))return;s.uniform2uiv(this.addr,e),mn(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(pn(t,e))return;s.uniform3uiv(this.addr,e),mn(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(pn(t,e))return;s.uniform4uiv(this.addr,e),mn(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 Jp;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 Am(s,e){s.uniform1iv(this.addr,e)}function Em(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);pn(n,r)||(s.uniform1iv(this.addr,r),mn(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);pn(n,r)||(s.uniform1iv(this.addr,r),mn(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);pn(n,r)||(s.uniform1iv(this.addr,r),mn(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);pn(n,r)||(s.uniform1iv(this.addr,r),mn(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 Am;case 35667:case 35671:return Em;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 Nh=new Ut;function Wm(s){Bt._getMatrix(Nh,Bt.workingColorSpace,s);const e=`mat3( ${Nh.elements.map(t=>t.toFixed(4))} )`;switch(Bt.getTransfer(s)){case
|
|
3726
|
+
`)}const Nh=new Ut;function Wm(s){Bt._getMatrix(Nh,Bt.workingColorSpace,s);const e=`mat3( ${Nh.elements.map(t=>t.toFixed(4))} )`;switch(Bt.getTransfer(s)){case Ea:return[e,"LinearTransferOETF"];case nn: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
|
|
|
@@ -3765,14 +3765,14 @@ void main() {
|
|
|
3765
3765
|
`)+`
|
|
3766
3766
|
`+f,p=["#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
|
-
`+p);const M=x+f+o,b=x+p+a,N=Fh(i,i.VERTEX_SHADER,M),L=Fh(i,i.FRAGMENT_SHADER,b);i.attachShader(_,N),i.attachShader(_,L),t.index0AttributeName!==void 0?i.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_);function P(F){if(s.debug.checkShaderErrors){const B=i.getProgramInfoLog(_).trim(),X=i.getShaderInfoLog(N).trim(),Z=i.getShaderInfoLog(L).trim();let se=!0,
|
|
3768
|
+
`+p);const M=x+f+o,b=x+p+a,N=Fh(i,i.VERTEX_SHADER,M),L=Fh(i,i.FRAGMENT_SHADER,b);i.attachShader(_,N),i.attachShader(_,L),t.index0AttributeName!==void 0?i.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(_,0,"position"),i.linkProgram(_);function P(F){if(s.debug.checkShaderErrors){const B=i.getProgramInfoLog(_).trim(),X=i.getShaderInfoLog(N).trim(),Z=i.getShaderInfoLog(L).trim();let se=!0,G=!0;if(i.getProgramParameter(_,i.LINK_STATUS)===!1)if(se=!1,typeof s.debug.onShaderError=="function")s.debug.onShaderError(i,_,N,L);else{const de=Uh(i,N,"vertex"),Q=Uh(i,L,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(_,i.VALIDATE_STATUS)+`
|
|
3769
3769
|
|
|
3770
3770
|
Material Name: `+F.name+`
|
|
3771
3771
|
Material Type: `+F.type+`
|
|
3772
3772
|
|
|
3773
3773
|
Program Info Log: `+B+`
|
|
3774
|
-
`+
|
|
3775
|
-
`+Q)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(X===""||Z==="")&&(W=!1);W&&(F.diagnostics={runnable:se,programLog:B,vertexShader:{log:X,prefix:f},fragmentShader:{log:Z,prefix:p}})}i.deleteShader(N),i.deleteShader(L),I=new Ma(i,_),A=Km(i,_)}let I;this.getUniforms=function(){return I===void 0&&P(this),I};let A;this.getAttributes=function(){return A===void 0&&P(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=N,this.fragmentShader=L,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 f(A,E,F,B,X){const Z=B.fog,se=X.geometry,W=A.isMeshStandardMaterial?B.environment:null,he=(A.isMeshStandardMaterial?t:e).get(A.envMap||W),Q=he&&he.mapping===Na?he.image.height:null,xe=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 De=se.morphAttributes.position||se.morphAttributes.normal||se.morphAttributes.color,Ae=De!==void 0?De.length:0;let pe=0;se.morphAttributes.position!==void 0&&(pe=1),se.morphAttributes.normal!==void 0&&(pe=2),se.morphAttributes.color!==void 0&&(pe=3);let re,q,K,te;if(xe){const Rt=Nn[xe];re=Rt.vertexShader,q=Rt.fragmentShader}else re=A.vertexShader,q=A.fragmentShader,l.update(A),K=l.getVertexShaderID(A),te=l.getFragmentShaderID(A);const ee=s.getRenderTarget(),fe=s.state.buffers.depth.getReversed(),Y=X.isInstancedMesh===!0,me=X.isBatchedMesh===!0,Te=!!A.map,et=!!A.matcap,We=!!he,O=!!A.aoMap,dt=!!A.lightMap,st=!!A.bumpMap,it=!!A.normalMap,Ie=!!A.displacementMap,Ze=!!A.emissiveMap,Le=!!A.metalnessMap,rt=!!A.roughnessMap,Xt=A.anisotropy>0,k=A.clearcoat>0,R=A.dispersion>0,oe=A.iridescence>0,we=A.sheen>0,Pe=A.transmission>0,be=Xt&&!!A.anisotropyMap,_t=k&&!!A.clearcoatMap,Ke=k&&!!A.clearcoatNormalMap,ft=k&&!!A.clearcoatRoughnessMap,vt=oe&&!!A.iridescenceMap,Fe=oe&&!!A.iridescenceThicknessMap,at=we&&!!A.sheenColorMap,Et=we&&!!A.sheenRoughnessMap,St=!!A.specularMap,$e=!!A.specularColorMap,At=!!A.specularIntensityMap,J=Pe&&!!A.transmissionMap,tt=Pe&&!!A.thicknessMap,Ne=!!A.gradientMap,lt=!!A.alphaMap,ke=A.alphaTest>0,Re=!!A.alphaHash,ot=!!A.extensions;let Tt=Vi;A.toneMapped&&(ee===null||ee.isXRRenderTarget===!0)&&(Tt=s.toneMapping);const qt={shaderID:xe,shaderType:A.type,shaderName:A.name,vertexShader:re,fragmentShader:q,defines:A.defines,customVertexShaderID:K,customFragmentShaderID:te,isRawShaderMaterial:A.isRawShaderMaterial===!0,glslVersion:A.glslVersion,precision:h,batching:me,batchingColor:me&&X._colorsTexture!==null,instancing:Y,instancingColor:Y&&X.instanceColor!==null,instancingMorph:Y&&X.morphTexture!==null,supportsVertexTextures:u,outputColorSpace:ee===null?s.outputColorSpace:ee.isXRRenderTarget===!0?ee.texture.colorSpace:Xs,alphaToCoverage:!!A.alphaToCoverage,map:Te,matcap:et,envMap:We,envMapMode:We&&he.mapping,envMapCubeUVHeight:Q,aoMap:O,lightMap:dt,bumpMap:st,normalMap:it,displacementMap:u&&Ie,emissiveMap:Ze,normalMapObjectSpace:it&&A.normalMapType===l2,normalMapTangentSpace:it&&A.normalMapType===Ua,metalnessMap:Le,roughnessMap:rt,anisotropy:Xt,anisotropyMap:be,clearcoat:k,clearcoatMap:_t,clearcoatNormalMap:Ke,clearcoatRoughnessMap:ft,dispersion:R,iridescence:oe,iridescenceMap:vt,iridescenceThicknessMap:Fe,sheen:we,sheenColorMap:at,sheenRoughnessMap:Et,specularMap:St,specularColorMap:$e,specularIntensityMap:At,transmission:Pe,transmissionMap:J,thicknessMap:tt,gradientMap:Ne,opaque:A.transparent===!1&&A.blending===Bs&&A.alphaToCoverage===!1,alphaMap:lt,alphaTest:ke,alphaHash:Re,combine:A.combine,mapUv:Te&&_(A.map.channel),aoMapUv:O&&_(A.aoMap.channel),lightMapUv:dt&&_(A.lightMap.channel),bumpMapUv:st&&_(A.bumpMap.channel),normalMapUv:it&&_(A.normalMap.channel),displacementMapUv:Ie&&_(A.displacementMap.channel),emissiveMapUv:Ze&&_(A.emissiveMap.channel),metalnessMapUv:Le&&_(A.metalnessMap.channel),roughnessMapUv:rt&&_(A.roughnessMap.channel),anisotropyMapUv:be&&_(A.anisotropyMap.channel),clearcoatMapUv:_t&&_(A.clearcoatMap.channel),clearcoatNormalMapUv:Ke&&_(A.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ft&&_(A.clearcoatRoughnessMap.channel),iridescenceMapUv:vt&&_(A.iridescenceMap.channel),iridescenceThicknessMapUv:Fe&&_(A.iridescenceThicknessMap.channel),sheenColorMapUv:at&&_(A.sheenColorMap.channel),sheenRoughnessMapUv:Et&&_(A.sheenRoughnessMap.channel),specularMapUv:St&&_(A.specularMap.channel),specularColorMapUv:$e&&_(A.specularColorMap.channel),specularIntensityMapUv:At&&_(A.specularIntensityMap.channel),transmissionMapUv:J&&_(A.transmissionMap.channel),thicknessMapUv:tt&&_(A.thicknessMap.channel),alphaMapUv:lt&&_(A.alphaMap.channel),vertexTangents:!!se.attributes.tangent&&(it||Xt),vertexColors:A.vertexColors,vertexAlphas:A.vertexColors===!0&&!!se.attributes.color&&se.attributes.color.itemSize===4,pointsUvs:X.isPoints===!0&&!!se.attributes.uv&&(Te||lt),fog:!!Z,useFog:A.fog===!0,fogExp2:!!Z&&Z.isFogExp2,flatShading:A.flatShading===!0,sizeAttenuation:A.sizeAttenuation===!0,logarithmicDepthBuffer:m,reverseDepthBuffer:fe,skinning:X.isSkinnedMesh===!0,morphTargets:se.morphAttributes.position!==void 0,morphNormals:se.morphAttributes.normal!==void 0,morphColors:se.morphAttributes.color!==void 0,morphTargetsCount:Ae,morphTextureStride:pe,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&&F.length>0,shadowMapType:s.shadowMap.type,toneMapping:Tt,decodeVideoTexture:Te&&A.map.isVideoTexture===!0&&Bt.getTransfer(A.map.colorSpace)===tn,decodeVideoTextureEmissive:Ze&&A.emissiveMap.isVideoTexture===!0&&Bt.getTransfer(A.emissiveMap.colorSpace)===tn,premultipliedAlpha:A.premultipliedAlpha,doubleSided:A.side===cn,flipSided:A.side===Dn,useDepthPacking:A.depthPacking>=0,depthPacking:A.depthPacking||0,index0AttributeName:A.index0AttributeName,extensionClipCullDistance:ot&&A.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ot&&A.extensions.multiDraw===!0||me)&&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 p(A){const E=[];if(A.shaderID?E.push(A.shaderID):(E.push(A.customVertexShaderID),E.push(A.customFragmentShaderID)),A.defines!==void 0)for(const F in A.defines)E.push(F),E.push(A.defines[F]);return A.isRawShaderMaterial===!1&&(x(E,A),M(E,A),E.push(s.outputColorSpace)),E.push(A.customProgramCacheKey),E.join()}function x(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 M(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 b(A){const E=g[A.type];let F;if(E){const B=Nn[E];F=Ql.clone(B.uniforms)}else F=A.uniforms;return F}function N(A,E){let F;for(let B=0,X=d.length;B<X;B++){const Z=d[B];if(Z.cacheKey===E){F=Z,++F.usedTimes;break}}return F===void 0&&(F=new o3(s,E,A,r),d.push(F)),F}function L(A){if(--A.usedTimes===0){const E=d.indexOf(A);d[E]=d[d.length-1],d.pop(),A.destroy()}}function P(A){l.remove(A)}function I(){l.dispose()}return{getParameters:f,getProgramCacheKey:p,getUniforms:b,acquireProgram:N,releaseProgram:L,releaseShaderCache:P,programs:d,dispose:I}}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,_,f){let p=s[e];return p===void 0?(p={id:m.id,object:m,geometry:u,material:h,groupOrder:g,renderOrder:m.renderOrder,z:_,group:f},s[e]=p):(p.id=m.id,p.object=m,p.geometry=u,p.material=h,p.groupOrder=g,p.renderOrder=m.renderOrder,p.z=_,p.group=f),e++,p}function a(m,u,h,g,_,f){const p=o(m,u,h,g,_,f);h.transmission>0?n.push(p):h.transparent===!0?i.push(p):t.push(p)}function l(m,u,h,g,_,f){const p=o(m,u,h,g,_,f);h.transmission>0?n.unshift(p):h.transparent===!0?i.unshift(p):t.unshift(p)}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 z,color:new bt};break;case"SpotLight":t={position:new z,direction:new z,color:new bt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new z,color:new bt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new z,skyColor:new bt,groundColor:new bt};break;case"RectAreaLight":t={color:new bt,position:new z,halfWidth:new z,halfHeight:new z};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 Je};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je,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 z);const i=new z,r=new Mt,o=new Mt;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,f=0,p=0,x=0,M=0,b=0,N=0,L=0,P=0;c.sort(v3);for(let A=0,E=c.length;A<E;A++){const F=c[A],B=F.color,X=F.intensity,Z=F.distance,se=F.shadow&&F.shadow.map?F.shadow.map.texture:null;if(F.isAmbientLight)d+=B.r*X,m+=B.g*X,u+=B.b*X;else if(F.isLightProbe){for(let W=0;W<9;W++)n.probe[W].addScaledVector(F.sh.coefficients[W],X);P++}else if(F.isDirectionalLight){const W=e.get(F);if(W.color.copy(F.color).multiplyScalar(F.intensity),F.castShadow){const he=F.shadow,Q=t.get(F);Q.shadowIntensity=he.intensity,Q.shadowBias=he.bias,Q.shadowNormalBias=he.normalBias,Q.shadowRadius=he.radius,Q.shadowMapSize=he.mapSize,n.directionalShadow[h]=Q,n.directionalShadowMap[h]=se,n.directionalShadowMatrix[h]=F.shadow.matrix,x++}n.directional[h]=W,h++}else if(F.isSpotLight){const W=e.get(F);W.position.setFromMatrixPosition(F.matrixWorld),W.color.copy(B).multiplyScalar(X),W.distance=Z,W.coneCos=Math.cos(F.angle),W.penumbraCos=Math.cos(F.angle*(1-F.penumbra)),W.decay=F.decay,n.spot[_]=W;const he=F.shadow;if(F.map&&(n.spotLightMap[N]=F.map,N++,he.updateMatrices(F),F.castShadow&&L++),n.spotLightMatrix[_]=he.matrix,F.castShadow){const Q=t.get(F);Q.shadowIntensity=he.intensity,Q.shadowBias=he.bias,Q.shadowNormalBias=he.normalBias,Q.shadowRadius=he.radius,Q.shadowMapSize=he.mapSize,n.spotShadow[_]=Q,n.spotShadowMap[_]=se,b++}_++}else if(F.isRectAreaLight){const W=e.get(F);W.color.copy(B).multiplyScalar(X),W.halfWidth.set(F.width*.5,0,0),W.halfHeight.set(0,F.height*.5,0),n.rectArea[f]=W,f++}else if(F.isPointLight){const W=e.get(F);if(W.color.copy(F.color).multiplyScalar(F.intensity),W.distance=F.distance,W.decay=F.decay,F.castShadow){const he=F.shadow,Q=t.get(F);Q.shadowIntensity=he.intensity,Q.shadowBias=he.bias,Q.shadowNormalBias=he.normalBias,Q.shadowRadius=he.radius,Q.shadowMapSize=he.mapSize,Q.shadowCameraNear=he.camera.near,Q.shadowCameraFar=he.camera.far,n.pointShadow[g]=Q,n.pointShadowMap[g]=se,n.pointShadowMatrix[g]=F.shadow.matrix,M++}n.point[g]=W,g++}else if(F.isHemisphereLight){const W=e.get(F);W.skyColor.copy(F.color).multiplyScalar(X),W.groundColor.copy(F.groundColor).multiplyScalar(X),n.hemi[p]=W,p++}}f>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ye.LTC_FLOAT_1,n.rectAreaLTC2=Ye.LTC_FLOAT_2):(n.rectAreaLTC1=Ye.LTC_HALF_1,n.rectAreaLTC2=Ye.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=m,n.ambient[2]=u;const I=n.hash;(I.directionalLength!==h||I.pointLength!==g||I.spotLength!==_||I.rectAreaLength!==f||I.hemiLength!==p||I.numDirectionalShadows!==x||I.numPointShadows!==M||I.numSpotShadows!==b||I.numSpotMaps!==N||I.numLightProbes!==P)&&(n.directional.length=h,n.spot.length=_,n.rectArea.length=f,n.point.length=g,n.hemi.length=p,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=M,n.pointShadowMap.length=M,n.spotShadow.length=b,n.spotShadowMap.length=b,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=M,n.spotLightMatrix.length=b+N-L,n.spotLightMap.length=N,n.numSpotLightShadowsWithMaps=L,n.numLightProbes=P,I.directionalLength=h,I.pointLength=g,I.spotLength=_,I.rectAreaLength=f,I.hemiLength=p,I.numDirectionalShadows=x,I.numPointShadows=M,I.numSpotShadows=b,I.numSpotMaps=N,I.numLightProbes=P,n.version=_3++)}function l(c,d){let m=0,u=0,h=0,g=0,_=0;const f=d.matrixWorldInverse;for(let p=0,x=c.length;p<x;p++){const M=c[p];if(M.isDirectionalLight){const b=n.directional[m];b.direction.setFromMatrixPosition(M.matrixWorld),i.setFromMatrixPosition(M.target.matrixWorld),b.direction.sub(i),b.direction.transformDirection(f),m++}else if(M.isSpotLight){const b=n.spot[h];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),b.direction.setFromMatrixPosition(M.matrixWorld),i.setFromMatrixPosition(M.target.matrixWorld),b.direction.sub(i),b.direction.transformDirection(f),h++}else if(M.isRectAreaLight){const b=n.rectArea[g];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),o.identity(),r.copy(M.matrixWorld),r.premultiply(f),o.extractRotation(r),b.halfWidth.set(M.width*.5,0,0),b.halfHeight.set(0,M.height*.5,0),b.halfWidth.applyMatrix4(o),b.halfHeight.applyMatrix4(o),g++}else if(M.isPointLight){const b=n.point[u];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),u++}else if(M.isHemisphereLight){const b=n.hemi[_];b.direction.setFromMatrixPosition(M.matrixWorld),b.direction.transformDirection(f),_++}}}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() {
|
|
3774
|
+
`+de+`
|
|
3775
|
+
`+Q)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(X===""||Z==="")&&(G=!1);G&&(F.diagnostics={runnable:se,programLog:B,vertexShader:{log:X,prefix:f},fragmentShader:{log:Z,prefix:p}})}i.deleteShader(N),i.deleteShader(L),I=new Ma(i,_),E=Km(i,_)}let I;this.getUniforms=function(){return I===void 0&&P(this),I};let E;this.getAttributes=function(){return E===void 0&&P(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=N,this.fragmentShader=L,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 f(E,A,F,B,X){const Z=B.fog,se=X.geometry,G=E.isMeshStandardMaterial?B.environment:null,de=(E.isMeshStandardMaterial?t:e).get(E.envMap||G),Q=de&&de.mapping===Na?de.image.height:null,xe=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 Pe=se.morphAttributes.position||se.morphAttributes.normal||se.morphAttributes.color,Te=Pe!==void 0?Pe.length:0;let me=0;se.morphAttributes.position!==void 0&&(me=1),se.morphAttributes.normal!==void 0&&(me=2),se.morphAttributes.color!==void 0&&(me=3);let ae,j,K,te;if(xe){const Dt=Nn[xe];ae=Dt.vertexShader,j=Dt.fragmentShader}else ae=E.vertexShader,j=E.fragmentShader,l.update(E),K=l.getVertexShaderID(E),te=l.getFragmentShaderID(E);const ee=s.getRenderTarget(),pe=s.state.buffers.depth.getReversed(),$=X.isInstancedMesh===!0,ge=X.isBatchedMesh===!0,Ae=!!E.map,et=!!E.matcap,je=!!de,O=!!E.aoMap,pt=!!E.lightMap,st=!!E.bumpMap,it=!!E.normalMap,ke=!!E.displacementMap,Ze=!!E.emissiveMap,Fe=!!E.metalnessMap,rt=!!E.roughnessMap,Xt=E.anisotropy>0,k=E.clearcoat>0,R=E.dispersion>0,le=E.iridescence>0,Ce=E.sheen>0,Ue=E.transmission>0,be=Xt&&!!E.anisotropyMap,yt=k&&!!E.clearcoatMap,Ke=k&&!!E.clearcoatNormalMap,mt=k&&!!E.clearcoatRoughnessMap,xt=le&&!!E.iridescenceMap,ze=le&&!!E.iridescenceThicknessMap,ot=Ce&&!!E.sheenColorMap,Tt=Ce&&!!E.sheenRoughnessMap,Et=!!E.specularMap,$e=!!E.specularColorMap,Ct=!!E.specularIntensityMap,J=Ue&&!!E.transmissionMap,tt=Ue&&!!E.thicknessMap,Be=!!E.gradientMap,ut=!!E.alphaMap,Ge=E.alphaTest>0,De=!!E.alphaHash,lt=!!E.extensions;let Rt=Vi;E.toneMapped&&(ee===null||ee.isXRRenderTarget===!0)&&(Rt=s.toneMapping);const $t={shaderID:xe,shaderType:E.type,shaderName:E.name,vertexShader:ae,fragmentShader:j,defines:E.defines,customVertexShaderID:K,customFragmentShaderID:te,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:h,batching:ge,batchingColor:ge&&X._colorsTexture!==null,instancing:$,instancingColor:$&&X.instanceColor!==null,instancingMorph:$&&X.morphTexture!==null,supportsVertexTextures:u,outputColorSpace:ee===null?s.outputColorSpace:ee.isXRRenderTarget===!0?ee.texture.colorSpace:Xs,alphaToCoverage:!!E.alphaToCoverage,map:Ae,matcap:et,envMap:je,envMapMode:je&&de.mapping,envMapCubeUVHeight:Q,aoMap:O,lightMap:pt,bumpMap:st,normalMap:it,displacementMap:u&&ke,emissiveMap:Ze,normalMapObjectSpace:it&&E.normalMapType===l2,normalMapTangentSpace:it&&E.normalMapType===Ua,metalnessMap:Fe,roughnessMap:rt,anisotropy:Xt,anisotropyMap:be,clearcoat:k,clearcoatMap:yt,clearcoatNormalMap:Ke,clearcoatRoughnessMap:mt,dispersion:R,iridescence:le,iridescenceMap:xt,iridescenceThicknessMap:ze,sheen:Ce,sheenColorMap:ot,sheenRoughnessMap:Tt,specularMap:Et,specularColorMap:$e,specularIntensityMap:Ct,transmission:Ue,transmissionMap:J,thicknessMap:tt,gradientMap:Be,opaque:E.transparent===!1&&E.blending===Bs&&E.alphaToCoverage===!1,alphaMap:ut,alphaTest:Ge,alphaHash:De,combine:E.combine,mapUv:Ae&&_(E.map.channel),aoMapUv:O&&_(E.aoMap.channel),lightMapUv:pt&&_(E.lightMap.channel),bumpMapUv:st&&_(E.bumpMap.channel),normalMapUv:it&&_(E.normalMap.channel),displacementMapUv:ke&&_(E.displacementMap.channel),emissiveMapUv:Ze&&_(E.emissiveMap.channel),metalnessMapUv:Fe&&_(E.metalnessMap.channel),roughnessMapUv:rt&&_(E.roughnessMap.channel),anisotropyMapUv:be&&_(E.anisotropyMap.channel),clearcoatMapUv:yt&&_(E.clearcoatMap.channel),clearcoatNormalMapUv:Ke&&_(E.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:mt&&_(E.clearcoatRoughnessMap.channel),iridescenceMapUv:xt&&_(E.iridescenceMap.channel),iridescenceThicknessMapUv:ze&&_(E.iridescenceThicknessMap.channel),sheenColorMapUv:ot&&_(E.sheenColorMap.channel),sheenRoughnessMapUv:Tt&&_(E.sheenRoughnessMap.channel),specularMapUv:Et&&_(E.specularMap.channel),specularColorMapUv:$e&&_(E.specularColorMap.channel),specularIntensityMapUv:Ct&&_(E.specularIntensityMap.channel),transmissionMapUv:J&&_(E.transmissionMap.channel),thicknessMapUv:tt&&_(E.thicknessMap.channel),alphaMapUv:ut&&_(E.alphaMap.channel),vertexTangents:!!se.attributes.tangent&&(it||Xt),vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!se.attributes.color&&se.attributes.color.itemSize===4,pointsUvs:X.isPoints===!0&&!!se.attributes.uv&&(Ae||ut),fog:!!Z,useFog:E.fog===!0,fogExp2:!!Z&&Z.isFogExp2,flatShading:E.flatShading===!0,sizeAttenuation:E.sizeAttenuation===!0,logarithmicDepthBuffer:m,reverseDepthBuffer:pe,skinning:X.isSkinnedMesh===!0,morphTargets:se.morphAttributes.position!==void 0,morphNormals:se.morphAttributes.normal!==void 0,morphColors:se.morphAttributes.color!==void 0,morphTargetsCount:Te,morphTextureStride:me,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&&F.length>0,shadowMapType:s.shadowMap.type,toneMapping:Rt,decodeVideoTexture:Ae&&E.map.isVideoTexture===!0&&Bt.getTransfer(E.map.colorSpace)===nn,decodeVideoTextureEmissive:Ze&&E.emissiveMap.isVideoTexture===!0&&Bt.getTransfer(E.emissiveMap.colorSpace)===nn,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===hn,flipSided:E.side===Dn,useDepthPacking:E.depthPacking>=0,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionClipCullDistance:lt&&E.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(lt&&E.extensions.multiDraw===!0||ge)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:E.customProgramCacheKey()};return $t.vertexUv1s=c.has(1),$t.vertexUv2s=c.has(2),$t.vertexUv3s=c.has(3),c.clear(),$t}function p(E){const A=[];if(E.shaderID?A.push(E.shaderID):(A.push(E.customVertexShaderID),A.push(E.customFragmentShaderID)),E.defines!==void 0)for(const F in E.defines)A.push(F),A.push(E.defines[F]);return E.isRawShaderMaterial===!1&&(x(A,E),M(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 M(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 b(E){const A=g[E.type];let F;if(A){const B=Nn[A];F=Ql.clone(B.uniforms)}else F=E.uniforms;return F}function N(E,A){let F;for(let B=0,X=d.length;B<X;B++){const Z=d[B];if(Z.cacheKey===A){F=Z,++F.usedTimes;break}}return F===void 0&&(F=new o3(s,A,E,r),d.push(F)),F}function L(E){if(--E.usedTimes===0){const A=d.indexOf(E);d[A]=d[d.length-1],d.pop(),E.destroy()}}function P(E){l.remove(E)}function I(){l.dispose()}return{getParameters:f,getProgramCacheKey:p,getUniforms:b,acquireProgram:N,releaseProgram:L,releaseShaderCache:P,programs:d,dispose:I}}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,_,f){let p=s[e];return p===void 0?(p={id:m.id,object:m,geometry:u,material:h,groupOrder:g,renderOrder:m.renderOrder,z:_,group:f},s[e]=p):(p.id=m.id,p.object=m,p.geometry=u,p.material=h,p.groupOrder=g,p.renderOrder=m.renderOrder,p.z=_,p.group=f),e++,p}function a(m,u,h,g,_,f){const p=o(m,u,h,g,_,f);h.transmission>0?n.push(p):h.transparent===!0?i.push(p):t.push(p)}function l(m,u,h,g,_,f){const p=o(m,u,h,g,_,f);h.transmission>0?n.unshift(p):h.transparent===!0?i.unshift(p):t.unshift(p)}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 z,color:new At};break;case"SpotLight":t={position:new z,direction:new z,color:new At,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new z,color:new At,distance:0,decay:0};break;case"HemisphereLight":t={direction:new z,skyColor:new At,groundColor:new At};break;case"RectAreaLight":t={color:new At,position:new z,halfWidth:new z,halfHeight:new z};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 Je};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je,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 z);const i=new z,r=new St,o=new St;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,f=0,p=0,x=0,M=0,b=0,N=0,L=0,P=0;c.sort(v3);for(let E=0,A=c.length;E<A;E++){const F=c[E],B=F.color,X=F.intensity,Z=F.distance,se=F.shadow&&F.shadow.map?F.shadow.map.texture:null;if(F.isAmbientLight)d+=B.r*X,m+=B.g*X,u+=B.b*X;else if(F.isLightProbe){for(let G=0;G<9;G++)n.probe[G].addScaledVector(F.sh.coefficients[G],X);P++}else if(F.isDirectionalLight){const G=e.get(F);if(G.color.copy(F.color).multiplyScalar(F.intensity),F.castShadow){const de=F.shadow,Q=t.get(F);Q.shadowIntensity=de.intensity,Q.shadowBias=de.bias,Q.shadowNormalBias=de.normalBias,Q.shadowRadius=de.radius,Q.shadowMapSize=de.mapSize,n.directionalShadow[h]=Q,n.directionalShadowMap[h]=se,n.directionalShadowMatrix[h]=F.shadow.matrix,x++}n.directional[h]=G,h++}else if(F.isSpotLight){const G=e.get(F);G.position.setFromMatrixPosition(F.matrixWorld),G.color.copy(B).multiplyScalar(X),G.distance=Z,G.coneCos=Math.cos(F.angle),G.penumbraCos=Math.cos(F.angle*(1-F.penumbra)),G.decay=F.decay,n.spot[_]=G;const de=F.shadow;if(F.map&&(n.spotLightMap[N]=F.map,N++,de.updateMatrices(F),F.castShadow&&L++),n.spotLightMatrix[_]=de.matrix,F.castShadow){const Q=t.get(F);Q.shadowIntensity=de.intensity,Q.shadowBias=de.bias,Q.shadowNormalBias=de.normalBias,Q.shadowRadius=de.radius,Q.shadowMapSize=de.mapSize,n.spotShadow[_]=Q,n.spotShadowMap[_]=se,b++}_++}else if(F.isRectAreaLight){const G=e.get(F);G.color.copy(B).multiplyScalar(X),G.halfWidth.set(F.width*.5,0,0),G.halfHeight.set(0,F.height*.5,0),n.rectArea[f]=G,f++}else if(F.isPointLight){const G=e.get(F);if(G.color.copy(F.color).multiplyScalar(F.intensity),G.distance=F.distance,G.decay=F.decay,F.castShadow){const de=F.shadow,Q=t.get(F);Q.shadowIntensity=de.intensity,Q.shadowBias=de.bias,Q.shadowNormalBias=de.normalBias,Q.shadowRadius=de.radius,Q.shadowMapSize=de.mapSize,Q.shadowCameraNear=de.camera.near,Q.shadowCameraFar=de.camera.far,n.pointShadow[g]=Q,n.pointShadowMap[g]=se,n.pointShadowMatrix[g]=F.shadow.matrix,M++}n.point[g]=G,g++}else if(F.isHemisphereLight){const G=e.get(F);G.skyColor.copy(F.color).multiplyScalar(X),G.groundColor.copy(F.groundColor).multiplyScalar(X),n.hemi[p]=G,p++}}f>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ye.LTC_FLOAT_1,n.rectAreaLTC2=Ye.LTC_FLOAT_2):(n.rectAreaLTC1=Ye.LTC_HALF_1,n.rectAreaLTC2=Ye.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=m,n.ambient[2]=u;const I=n.hash;(I.directionalLength!==h||I.pointLength!==g||I.spotLength!==_||I.rectAreaLength!==f||I.hemiLength!==p||I.numDirectionalShadows!==x||I.numPointShadows!==M||I.numSpotShadows!==b||I.numSpotMaps!==N||I.numLightProbes!==P)&&(n.directional.length=h,n.spot.length=_,n.rectArea.length=f,n.point.length=g,n.hemi.length=p,n.directionalShadow.length=x,n.directionalShadowMap.length=x,n.pointShadow.length=M,n.pointShadowMap.length=M,n.spotShadow.length=b,n.spotShadowMap.length=b,n.directionalShadowMatrix.length=x,n.pointShadowMatrix.length=M,n.spotLightMatrix.length=b+N-L,n.spotLightMap.length=N,n.numSpotLightShadowsWithMaps=L,n.numLightProbes=P,I.directionalLength=h,I.pointLength=g,I.spotLength=_,I.rectAreaLength=f,I.hemiLength=p,I.numDirectionalShadows=x,I.numPointShadows=M,I.numSpotShadows=b,I.numSpotMaps=N,I.numLightProbes=P,n.version=_3++)}function l(c,d){let m=0,u=0,h=0,g=0,_=0;const f=d.matrixWorldInverse;for(let p=0,x=c.length;p<x;p++){const M=c[p];if(M.isDirectionalLight){const b=n.directional[m];b.direction.setFromMatrixPosition(M.matrixWorld),i.setFromMatrixPosition(M.target.matrixWorld),b.direction.sub(i),b.direction.transformDirection(f),m++}else if(M.isSpotLight){const b=n.spot[h];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),b.direction.setFromMatrixPosition(M.matrixWorld),i.setFromMatrixPosition(M.target.matrixWorld),b.direction.sub(i),b.direction.transformDirection(f),h++}else if(M.isRectAreaLight){const b=n.rectArea[g];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),o.identity(),r.copy(M.matrixWorld),r.premultiply(f),o.extractRotation(r),b.halfWidth.set(M.width*.5,0,0),b.halfHeight.set(0,M.height*.5,0),b.halfWidth.applyMatrix4(o),b.halfHeight.applyMatrix4(o),g++}else if(M.isPointLight){const b=n.point[u];b.position.setFromMatrixPosition(M.matrixWorld),b.position.applyMatrix4(f),u++}else if(M.isHemisphereLight){const b=n.hemi[_];b.direction.setFromMatrixPosition(M.matrixWorld),b.direction.transformDirection(f),_++}}}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 Je,r=new Je,o=new Ot,a=new R1({depthPacking:o2}),l=new D1,c={},d=t.maxTextureSize,m={[Yn]:Dn,[Dn]:Yn,[cn]:cn},u=new Ti({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Je},radius:{value:4}},vertexShader:M3,fragmentShader:b3}),h=u.clone();h.defines.HORIZONTAL_PASS=1;const g=new rn;g.setAttribute("position",new hn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Pt(g,u),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=v0;let p=this.type;this.render=function(L,P,I){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||L.length===0)return;const A=s.getRenderTarget(),E=s.getActiveCubeFace(),F=s.getActiveMipmapLevel(),B=s.state;B.setBlending(ki),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const X=p!==yi&&this.type===yi,Z=p===yi&&this.type!==yi;for(let se=0,W=L.length;se<W;se++){const he=L[se],Q=he.shadow;if(Q===void 0){console.warn("THREE.WebGLShadowMap:",he,"has no shadow.");continue}if(Q.autoUpdate===!1&&Q.needsUpdate===!1)continue;i.copy(Q.mapSize);const xe=Q.getFrameExtents();if(i.multiply(xe),r.copy(Q.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/xe.x),i.x=r.x*xe.x,Q.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/xe.y),i.y=r.y*xe.y,Q.mapSize.y=r.y)),Q.map===null||X===!0||Z===!0){const Ae=this.type!==yi?{minFilter:Vn,magFilter:Vn}:{};Q.map!==null&&Q.map.dispose(),Q.map=new cs(i.x,i.y,Ae),Q.map.texture.name=he.name+".shadowMap",Q.camera.updateProjectionMatrix()}s.setRenderTarget(Q.map),s.clear();const De=Q.getViewportCount();for(let Ae=0;Ae<De;Ae++){const pe=Q.getViewport(Ae);o.set(r.x*pe.x,r.y*pe.y,r.x*pe.z,r.y*pe.w),B.viewport(o),Q.updateMatrices(he,Ae),n=Q.getFrustum(),b(P,I,Q.camera,he,this.type)}Q.isPointLightShadow!==!0&&this.type===yi&&x(Q,I),Q.needsUpdate=!1}p=this.type,f.needsUpdate=!1,s.setRenderTarget(A,E,F)};function x(L,P){const I=e.update(_);u.defines.VSM_SAMPLES!==L.blurSamples&&(u.defines.VSM_SAMPLES=L.blurSamples,h.defines.VSM_SAMPLES=L.blurSamples,u.needsUpdate=!0,h.needsUpdate=!0),L.mapPass===null&&(L.mapPass=new cs(i.x,i.y)),u.uniforms.shadow_pass.value=L.map.texture,u.uniforms.resolution.value=L.mapSize,u.uniforms.radius.value=L.radius,s.setRenderTarget(L.mapPass),s.clear(),s.renderBufferDirect(P,null,I,u,_,null),h.uniforms.shadow_pass.value=L.mapPass.texture,h.uniforms.resolution.value=L.mapSize,h.uniforms.radius.value=L.radius,s.setRenderTarget(L.map),s.clear(),s.renderBufferDirect(P,null,I,h,_,null)}function M(L,P,I,A){let E=null;const F=I.isPointLight===!0?L.customDistanceMaterial:L.customDepthMaterial;if(F!==void 0)E=F;else if(E=I.isPointLight===!0?l:a,s.localClippingEnabled&&P.clipShadows===!0&&Array.isArray(P.clippingPlanes)&&P.clippingPlanes.length!==0||P.displacementMap&&P.displacementScale!==0||P.alphaMap&&P.alphaTest>0||P.map&&P.alphaTest>0||P.alphaToCoverage===!0){const B=E.uuid,X=P.uuid;let Z=c[B];Z===void 0&&(Z={},c[B]=Z);let se=Z[X];se===void 0&&(se=E.clone(),Z[X]=se,P.addEventListener("dispose",N)),E=se}if(E.visible=P.visible,E.wireframe=P.wireframe,A===yi?E.side=P.shadowSide!==null?P.shadowSide:P.side:E.side=P.shadowSide!==null?P.shadowSide:m[P.side],E.alphaMap=P.alphaMap,E.alphaTest=P.alphaToCoverage===!0?.5:P.alphaTest,E.map=P.map,E.clipShadows=P.clipShadows,E.clippingPlanes=P.clippingPlanes,E.clipIntersection=P.clipIntersection,E.displacementMap=P.displacementMap,E.displacementScale=P.displacementScale,E.displacementBias=P.displacementBias,E.wireframeLinewidth=P.wireframeLinewidth,E.linewidth=P.linewidth,I.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const B=s.properties.get(E);B.light=I}return E}function b(L,P,I,A,E){if(L.visible===!1)return;if(L.layers.test(P.layers)&&(L.isMesh||L.isLine||L.isPoints)&&(L.castShadow||L.receiveShadow&&E===yi)&&(!L.frustumCulled||n.intersectsObject(L))){L.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,L.matrixWorld);const X=e.update(L),Z=L.material;if(Array.isArray(Z)){const se=X.groups;for(let W=0,he=se.length;W<he;W++){const Q=se[W],xe=Z[Q.materialIndex];if(xe&&xe.visible){const De=M(L,xe,A,E);L.onBeforeShadow(s,L,P,I,X,De,Q),s.renderBufferDirect(I,null,X,De,L,Q),L.onAfterShadow(s,L,P,I,X,De,Q)}}}else if(Z.visible){const se=M(L,Z,A,E);L.onBeforeShadow(s,L,P,I,X,se,null),s.renderBufferDirect(I,null,X,se,L,null),L.onAfterShadow(s,L,P,I,X,se,null)}}const B=L.children;for(let X=0,Z=B.length;X<Z;X++)b(B[X],P,I,A,E)}function N(L){L.target.removeEventListener("dispose",N);for(const I in c){const A=c[I],E=L.target.uuid;E in A&&(A[E].dispose(),delete A[E])}}}const E3={[Xo]:jo,[qo]:Ko,[$o]:Jo,[Hs]:Yo,[jo]:Xo,[Ko]:qo,[Jo]:$o,[Yo]:Hs};function A3(s,e){function t(){let J=!1;const tt=new Ot;let Ne=null;const lt=new Ot(0,0,0,0);return{setMask:function(ke){Ne!==ke&&!J&&(s.colorMask(ke,ke,ke,ke),Ne=ke)},setLocked:function(ke){J=ke},setClear:function(ke,Re,ot,Tt,qt){qt===!0&&(ke*=Tt,Re*=Tt,ot*=Tt),tt.set(ke,Re,ot,Tt),lt.equals(tt)===!1&&(s.clearColor(ke,Re,ot,Tt),lt.copy(tt))},reset:function(){J=!1,Ne=null,lt.set(-1,0,0,0)}}}function n(){let J=!1,tt=!1,Ne=null,lt=null,ke=null;return{setReversed:function(Re){if(tt!==Re){const ot=e.get("EXT_clip_control");Re?ot.clipControlEXT(ot.LOWER_LEFT_EXT,ot.ZERO_TO_ONE_EXT):ot.clipControlEXT(ot.LOWER_LEFT_EXT,ot.NEGATIVE_ONE_TO_ONE_EXT),tt=Re;const Tt=ke;ke=null,this.setClear(Tt)}},getReversed:function(){return tt},setTest:function(Re){Re?ee(s.DEPTH_TEST):fe(s.DEPTH_TEST)},setMask:function(Re){Ne!==Re&&!J&&(s.depthMask(Re),Ne=Re)},setFunc:function(Re){if(tt&&(Re=E3[Re]),lt!==Re){switch(Re){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 Ko:s.depthFunc(s.GREATER);break;case Jo:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}lt=Re}},setLocked:function(Re){J=Re},setClear:function(Re){ke!==Re&&(tt&&(Re=1-Re),s.clearDepth(Re),ke=Re)},reset:function(){J=!1,Ne=null,lt=null,ke=null,tt=!1}}}function i(){let J=!1,tt=null,Ne=null,lt=null,ke=null,Re=null,ot=null,Tt=null,qt=null;return{setTest:function(Rt){J||(Rt?ee(s.STENCIL_TEST):fe(s.STENCIL_TEST))},setMask:function(Rt){tt!==Rt&&!J&&(s.stencilMask(Rt),tt=Rt)},setFunc:function(Rt,bn,In){(Ne!==Rt||lt!==bn||ke!==In)&&(s.stencilFunc(Rt,bn,In),Ne=Rt,lt=bn,ke=In)},setOp:function(Rt,bn,In){(Re!==Rt||ot!==bn||Tt!==In)&&(s.stencilOp(Rt,bn,In),Re=Rt,ot=bn,Tt=In)},setLocked:function(Rt){J=Rt},setClear:function(Rt){qt!==Rt&&(s.clearStencil(Rt),qt=Rt)},reset:function(){J=!1,tt=null,Ne=null,lt=null,ke=null,Re=null,ot=null,Tt=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,f=null,p=null,x=null,M=null,b=null,N=null,L=null,P=new bt(0,0,0),I=0,A=!1,E=null,F=null,B=null,X=null,Z=null;const se=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let W=!1,he=0;const Q=s.getParameter(s.VERSION);Q.indexOf("WebGL")!==-1?(he=parseFloat(/^WebGL (\d)/.exec(Q)[1]),W=he>=1):Q.indexOf("OpenGL ES")!==-1&&(he=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),W=he>=2);let xe=null,De={};const Ae=s.getParameter(s.SCISSOR_BOX),pe=s.getParameter(s.VIEWPORT),re=new Ot().fromArray(Ae),q=new Ot().fromArray(pe);function K(J,tt,Ne,lt){const ke=new Uint8Array(4),Re=s.createTexture();s.bindTexture(J,Re),s.texParameteri(J,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(J,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let ot=0;ot<Ne;ot++)J===s.TEXTURE_3D||J===s.TEXTURE_2D_ARRAY?s.texImage3D(tt,0,s.RGBA,1,1,lt,0,s.RGBA,s.UNSIGNED_BYTE,ke):s.texImage2D(tt+ot,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,ke);return Re}const te={};te[s.TEXTURE_2D]=K(s.TEXTURE_2D,s.TEXTURE_2D,1),te[s.TEXTURE_CUBE_MAP]=K(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),te[s.TEXTURE_2D_ARRAY]=K(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),te[s.TEXTURE_3D]=K(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),st(!1),it(vc),ee(s.CULL_FACE),O(ki);function ee(J){d[J]!==!0&&(s.enable(J),d[J]=!0)}function fe(J){d[J]!==!1&&(s.disable(J),d[J]=!1)}function Y(J,tt){return m[J]!==tt?(s.bindFramebuffer(J,tt),m[J]=tt,J===s.DRAW_FRAMEBUFFER&&(m[s.FRAMEBUFFER]=tt),J===s.FRAMEBUFFER&&(m[s.DRAW_FRAMEBUFFER]=tt),!0):!1}function me(J,tt){let Ne=h,lt=!1;if(J){Ne=u.get(tt),Ne===void 0&&(Ne=[],u.set(tt,Ne));const ke=J.textures;if(Ne.length!==ke.length||Ne[0]!==s.COLOR_ATTACHMENT0){for(let Re=0,ot=ke.length;Re<ot;Re++)Ne[Re]=s.COLOR_ATTACHMENT0+Re;Ne.length=ke.length,lt=!0}}else Ne[0]!==s.BACK&&(Ne[0]=s.BACK,lt=!0);lt&&s.drawBuffers(Ne)}function Te(J){return g!==J?(s.useProgram(J),g=J,!0):!1}const et={[is]:s.FUNC_ADD,[Pu]:s.FUNC_SUBTRACT,[Fu]:s.FUNC_REVERSE_SUBTRACT};et[Nu]=s.MIN,et[Uu]=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 O(J,tt,Ne,lt,ke,Re,ot,Tt,qt,Rt){if(J===ki){_===!0&&(fe(s.BLEND),_=!1);return}if(_===!1&&(ee(s.BLEND),_=!0),J!==Lu){if(J!==f||Rt!==A){if((p!==is||b!==is)&&(s.blendEquation(s.FUNC_ADD),p=is,b=is),Rt)switch(J){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: ",J);break}else switch(J){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: ",J);break}x=null,M=null,N=null,L=null,P.set(0,0,0),I=0,f=J,A=Rt}return}ke=ke||tt,Re=Re||Ne,ot=ot||lt,(tt!==p||ke!==b)&&(s.blendEquationSeparate(et[tt],et[ke]),p=tt,b=ke),(Ne!==x||lt!==M||Re!==N||ot!==L)&&(s.blendFuncSeparate(We[Ne],We[lt],We[Re],We[ot]),x=Ne,M=lt,N=Re,L=ot),(Tt.equals(P)===!1||qt!==I)&&(s.blendColor(Tt.r,Tt.g,Tt.b,qt),P.copy(Tt),I=qt),f=J,A=!1}function dt(J,tt){J.side===cn?fe(s.CULL_FACE):ee(s.CULL_FACE);let Ne=J.side===Dn;tt&&(Ne=!Ne),st(Ne),J.blending===Bs&&J.transparent===!1?O(ki):O(J.blending,J.blendEquation,J.blendSrc,J.blendDst,J.blendEquationAlpha,J.blendSrcAlpha,J.blendDstAlpha,J.blendColor,J.blendAlpha,J.premultipliedAlpha),o.setFunc(J.depthFunc),o.setTest(J.depthTest),o.setMask(J.depthWrite),r.setMask(J.colorWrite);const lt=J.stencilWrite;a.setTest(lt),lt&&(a.setMask(J.stencilWriteMask),a.setFunc(J.stencilFunc,J.stencilRef,J.stencilFuncMask),a.setOp(J.stencilFail,J.stencilZFail,J.stencilZPass)),Ze(J.polygonOffset,J.polygonOffsetFactor,J.polygonOffsetUnits),J.alphaToCoverage===!0?ee(s.SAMPLE_ALPHA_TO_COVERAGE):fe(s.SAMPLE_ALPHA_TO_COVERAGE)}function st(J){E!==J&&(J?s.frontFace(s.CW):s.frontFace(s.CCW),E=J)}function it(J){J!==Ru?(ee(s.CULL_FACE),J!==F&&(J===vc?s.cullFace(s.BACK):J===Du?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):fe(s.CULL_FACE),F=J}function Ie(J){J!==B&&(W&&s.lineWidth(J),B=J)}function Ze(J,tt,Ne){J?(ee(s.POLYGON_OFFSET_FILL),(X!==tt||Z!==Ne)&&(s.polygonOffset(tt,Ne),X=tt,Z=Ne)):fe(s.POLYGON_OFFSET_FILL)}function Le(J){J?ee(s.SCISSOR_TEST):fe(s.SCISSOR_TEST)}function rt(J){J===void 0&&(J=s.TEXTURE0+se-1),xe!==J&&(s.activeTexture(J),xe=J)}function Xt(J,tt,Ne){Ne===void 0&&(xe===null?Ne=s.TEXTURE0+se-1:Ne=xe);let lt=De[Ne];lt===void 0&&(lt={type:void 0,texture:void 0},De[Ne]=lt),(lt.type!==J||lt.texture!==tt)&&(xe!==Ne&&(s.activeTexture(Ne),xe=Ne),s.bindTexture(J,tt||te[J]),lt.type=J,lt.texture=tt)}function k(){const J=De[xe];J!==void 0&&J.type!==void 0&&(s.bindTexture(J.type,null),J.type=void 0,J.texture=void 0)}function R(){try{s.compressedTexImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function oe(){try{s.compressedTexImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function we(){try{s.texSubImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Pe(){try{s.texSubImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function be(){try{s.compressedTexSubImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function _t(){try{s.compressedTexSubImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Ke(){try{s.texStorage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function ft(){try{s.texStorage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function vt(){try{s.texImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Fe(){try{s.texImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function at(J){re.equals(J)===!1&&(s.scissor(J.x,J.y,J.z,J.w),re.copy(J))}function Et(J){q.equals(J)===!1&&(s.viewport(J.x,J.y,J.z,J.w),q.copy(J))}function St(J,tt){let Ne=c.get(tt);Ne===void 0&&(Ne=new WeakMap,c.set(tt,Ne));let lt=Ne.get(J);lt===void 0&&(lt=s.getUniformBlockIndex(tt,J.name),Ne.set(J,lt))}function $e(J,tt){const lt=c.get(tt).get(J);l.get(tt)!==lt&&(s.uniformBlockBinding(tt,lt,J.__bindingPointIndex),l.set(tt,lt))}function At(){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={},xe=null,De={},m={},u=new WeakMap,h=[],g=null,_=!1,f=null,p=null,x=null,M=null,b=null,N=null,L=null,P=new bt(0,0,0),I=0,A=!1,E=null,F=null,B=null,X=null,Z=null,re.set(0,0,s.canvas.width,s.canvas.height),q.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:fe,bindFramebuffer:Y,drawBuffers:me,useProgram:Te,setBlending:O,setMaterial:dt,setFlipSided:st,setCullFace:it,setLineWidth:Ie,setPolygonOffset:Ze,setScissorTest:Le,activeTexture:rt,bindTexture:Xt,unbindTexture:k,compressedTexImage2D:R,compressedTexImage3D:oe,texImage2D:vt,texImage3D:Fe,updateUBOMapping:St,uniformBlockBinding:$e,texStorage2D:Ke,texStorage3D:ft,texSubImage2D:we,texSubImage3D:Pe,compressedTexSubImage2D:be,compressedTexSubImage3D:_t,scissor:at,viewport:Et,reset:At}}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 Je,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,R){return h?new OffscreenCanvas(k,R):Mr("canvas")}function _(k,R,oe){let we=1;const Pe=Xt(k);if((Pe.width>oe||Pe.height>oe)&&(we=oe/Math.max(Pe.width,Pe.height)),we<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 be=Math.floor(we*Pe.width),_t=Math.floor(we*Pe.height);m===void 0&&(m=g(be,_t));const Ke=R?g(be,_t):m;return Ke.width=be,Ke.height=_t,Ke.getContext("2d").drawImage(k,0,0,be,_t),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Pe.width+"x"+Pe.height+") to ("+be+"x"+_t+")."),Ke}else return"data"in k&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Pe.width+"x"+Pe.height+")."),k;return k}function f(k){return k.generateMipmaps}function p(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 M(k,R,oe,we,Pe=!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 be=R;if(R===s.RED&&(oe===s.FLOAT&&(be=s.R32F),oe===s.HALF_FLOAT&&(be=s.R16F),oe===s.UNSIGNED_BYTE&&(be=s.R8)),R===s.RED_INTEGER&&(oe===s.UNSIGNED_BYTE&&(be=s.R8UI),oe===s.UNSIGNED_SHORT&&(be=s.R16UI),oe===s.UNSIGNED_INT&&(be=s.R32UI),oe===s.BYTE&&(be=s.R8I),oe===s.SHORT&&(be=s.R16I),oe===s.INT&&(be=s.R32I)),R===s.RG&&(oe===s.FLOAT&&(be=s.RG32F),oe===s.HALF_FLOAT&&(be=s.RG16F),oe===s.UNSIGNED_BYTE&&(be=s.RG8)),R===s.RG_INTEGER&&(oe===s.UNSIGNED_BYTE&&(be=s.RG8UI),oe===s.UNSIGNED_SHORT&&(be=s.RG16UI),oe===s.UNSIGNED_INT&&(be=s.RG32UI),oe===s.BYTE&&(be=s.RG8I),oe===s.SHORT&&(be=s.RG16I),oe===s.INT&&(be=s.RG32I)),R===s.RGB_INTEGER&&(oe===s.UNSIGNED_BYTE&&(be=s.RGB8UI),oe===s.UNSIGNED_SHORT&&(be=s.RGB16UI),oe===s.UNSIGNED_INT&&(be=s.RGB32UI),oe===s.BYTE&&(be=s.RGB8I),oe===s.SHORT&&(be=s.RGB16I),oe===s.INT&&(be=s.RGB32I)),R===s.RGBA_INTEGER&&(oe===s.UNSIGNED_BYTE&&(be=s.RGBA8UI),oe===s.UNSIGNED_SHORT&&(be=s.RGBA16UI),oe===s.UNSIGNED_INT&&(be=s.RGBA32UI),oe===s.BYTE&&(be=s.RGBA8I),oe===s.SHORT&&(be=s.RGBA16I),oe===s.INT&&(be=s.RGBA32I)),R===s.RGB&&oe===s.UNSIGNED_INT_5_9_9_9_REV&&(be=s.RGB9_E5),R===s.RGBA){const _t=Pe?Aa:Bt.getTransfer(we);oe===s.FLOAT&&(be=s.RGBA32F),oe===s.HALF_FLOAT&&(be=s.RGBA16F),oe===s.UNSIGNED_BYTE&&(be=_t===tn?s.SRGB8_ALPHA8:s.RGBA8),oe===s.UNSIGNED_SHORT_4_4_4_4&&(be=s.RGBA4),oe===s.UNSIGNED_SHORT_5_5_5_1&&(be=s.RGB5_A1)}return(be===s.R16F||be===s.R32F||be===s.RG16F||be===s.RG32F||be===s.RGBA16F||be===s.RGBA32F)&&e.get("EXT_color_buffer_float"),be}function b(k,R){let oe;return k?R===null||R===ls||R===vr?oe=s.DEPTH24_STENCIL8:R===li?oe=s.DEPTH32F_STENCIL8:R===_r&&(oe=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):R===null||R===ls||R===vr?oe=s.DEPTH_COMPONENT24:R===li?oe=s.DEPTH_COMPONENT32F:R===_r&&(oe=s.DEPTH_COMPONENT16),oe}function N(k,R){return f(k)===!0||k.isFramebufferTexture&&k.minFilter!==Vn&&k.minFilter!==kn?Math.log2(Math.max(R.width,R.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?R.mipmaps.length:1}function L(k){const R=k.target;R.removeEventListener("dispose",L),I(R),R.isVideoTexture&&d.delete(R)}function P(k){const R=k.target;R.removeEventListener("dispose",P),E(R)}function I(k){const R=n.get(k);if(R.__webglInit===void 0)return;const oe=k.source,we=u.get(oe);if(we){const Pe=we[R.__cacheKey];Pe.usedTimes--,Pe.usedTimes===0&&A(k),Object.keys(we).length===0&&u.delete(oe)}n.remove(k)}function A(k){const R=n.get(k);s.deleteTexture(R.__webglTexture);const oe=k.source,we=u.get(oe);delete we[R.__cacheKey],o.memory.textures--}function E(k){const R=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let we=0;we<6;we++){if(Array.isArray(R.__webglFramebuffer[we]))for(let Pe=0;Pe<R.__webglFramebuffer[we].length;Pe++)s.deleteFramebuffer(R.__webglFramebuffer[we][Pe]);else s.deleteFramebuffer(R.__webglFramebuffer[we]);R.__webglDepthbuffer&&s.deleteRenderbuffer(R.__webglDepthbuffer[we])}else{if(Array.isArray(R.__webglFramebuffer))for(let we=0;we<R.__webglFramebuffer.length;we++)s.deleteFramebuffer(R.__webglFramebuffer[we]);else s.deleteFramebuffer(R.__webglFramebuffer);if(R.__webglDepthbuffer&&s.deleteRenderbuffer(R.__webglDepthbuffer),R.__webglMultisampledFramebuffer&&s.deleteFramebuffer(R.__webglMultisampledFramebuffer),R.__webglColorRenderbuffer)for(let we=0;we<R.__webglColorRenderbuffer.length;we++)R.__webglColorRenderbuffer[we]&&s.deleteRenderbuffer(R.__webglColorRenderbuffer[we]);R.__webglDepthRenderbuffer&&s.deleteRenderbuffer(R.__webglDepthRenderbuffer)}const oe=k.textures;for(let we=0,Pe=oe.length;we<Pe;we++){const be=n.get(oe[we]);be.__webglTexture&&(s.deleteTexture(be.__webglTexture),o.memory.textures--),n.remove(oe[we])}n.remove(k)}let F=0;function B(){F=0}function X(){const k=F;return k>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+i.maxTextures),F+=1,k}function Z(k){const R=[];return R.push(k.wrapS),R.push(k.wrapT),R.push(k.wrapR||0),R.push(k.magFilter),R.push(k.minFilter),R.push(k.anisotropy),R.push(k.internalFormat),R.push(k.format),R.push(k.type),R.push(k.generateMipmaps),R.push(k.premultiplyAlpha),R.push(k.flipY),R.push(k.unpackAlignment),R.push(k.colorSpace),R.join()}function se(k,R){const oe=n.get(k);if(k.isVideoTexture&&Le(k),k.isRenderTargetTexture===!1&&k.version>0&&oe.__version!==k.version){const we=k.image;if(we===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(we.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{te(oe,k,R);return}}t.bindTexture(s.TEXTURE_2D,oe.__webglTexture,s.TEXTURE0+R)}function W(k,R){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){te(oe,k,R);return}t.bindTexture(s.TEXTURE_2D_ARRAY,oe.__webglTexture,s.TEXTURE0+R)}function he(k,R){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){te(oe,k,R);return}t.bindTexture(s.TEXTURE_3D,oe.__webglTexture,s.TEXTURE0+R)}function Q(k,R){const oe=n.get(k);if(k.version>0&&oe.__version!==k.version){ee(oe,k,R);return}t.bindTexture(s.TEXTURE_CUBE_MAP,oe.__webglTexture,s.TEXTURE0+R)}const xe={[oi]:s.REPEAT,[ei]:s.CLAMP_TO_EDGE,[el]:s.MIRRORED_REPEAT},De={[Vn]:s.NEAREST,[s2]:s.NEAREST_MIPMAP_NEAREST,[wr]:s.NEAREST_MIPMAP_LINEAR,[kn]:s.LINEAR,[Xa]:s.LINEAR_MIPMAP_NEAREST,[Mi]:s.LINEAR_MIPMAP_LINEAR},Ae={[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 pe(k,R){if(R.type===li&&e.has("OES_texture_float_linear")===!1&&(R.magFilter===kn||R.magFilter===Xa||R.magFilter===wr||R.magFilter===Mi||R.minFilter===kn||R.minFilter===Xa||R.minFilter===wr||R.minFilter===Mi)&&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,xe[R.wrapS]),s.texParameteri(k,s.TEXTURE_WRAP_T,xe[R.wrapT]),(k===s.TEXTURE_3D||k===s.TEXTURE_2D_ARRAY)&&s.texParameteri(k,s.TEXTURE_WRAP_R,xe[R.wrapR]),s.texParameteri(k,s.TEXTURE_MAG_FILTER,De[R.magFilter]),s.texParameteri(k,s.TEXTURE_MIN_FILTER,De[R.minFilter]),R.compareFunction&&(s.texParameteri(k,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(k,s.TEXTURE_COMPARE_FUNC,Ae[R.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(R.magFilter===Vn||R.minFilter!==wr&&R.minFilter!==Mi||R.type===li&&e.has("OES_texture_float_linear")===!1)return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const oe=e.get("EXT_texture_filter_anisotropic");s.texParameterf(k,oe.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,i.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function re(k,R){let oe=!1;k.__webglInit===void 0&&(k.__webglInit=!0,R.addEventListener("dispose",L));const we=R.source;let Pe=u.get(we);Pe===void 0&&(Pe={},u.set(we,Pe));const be=Z(R);if(be!==k.__cacheKey){Pe[be]===void 0&&(Pe[be]={texture:s.createTexture(),usedTimes:0},o.memory.textures++,oe=!0),Pe[be].usedTimes++;const _t=Pe[k.__cacheKey];_t!==void 0&&(Pe[k.__cacheKey].usedTimes--,_t.usedTimes===0&&A(R)),k.__cacheKey=be,k.__webglTexture=Pe[be].texture}return oe}function q(k,R,oe){return Math.floor(Math.floor(k/oe)/R)}function K(k,R,oe,we){const be=k.updateRanges;if(be.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,R.width,R.height,oe,we,R.data);else{be.sort((Fe,at)=>Fe.start-at.start);let _t=0;for(let Fe=1;Fe<be.length;Fe++){const at=be[_t],Et=be[Fe],St=at.start+at.count,$e=q(Et.start,R.width,4),At=q(at.start,R.width,4);Et.start<=St+1&&$e===At&&q(Et.start+Et.count-1,R.width,4)===$e?at.count=Math.max(at.count,Et.start+Et.count-at.start):(++_t,be[_t]=Et)}be.length=_t+1;const Ke=s.getParameter(s.UNPACK_ROW_LENGTH),ft=s.getParameter(s.UNPACK_SKIP_PIXELS),vt=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,R.width);for(let Fe=0,at=be.length;Fe<at;Fe++){const Et=be[Fe],St=Math.floor(Et.start/4),$e=Math.ceil(Et.count/4),At=St%R.width,J=Math.floor(St/R.width),tt=$e,Ne=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,At),s.pixelStorei(s.UNPACK_SKIP_ROWS,J),t.texSubImage2D(s.TEXTURE_2D,0,At,J,tt,Ne,oe,we,R.data)}k.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,Ke),s.pixelStorei(s.UNPACK_SKIP_PIXELS,ft),s.pixelStorei(s.UNPACK_SKIP_ROWS,vt)}}function te(k,R,oe){let we=s.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(we=s.TEXTURE_2D_ARRAY),R.isData3DTexture&&(we=s.TEXTURE_3D);const Pe=re(k,R),be=R.source;t.bindTexture(we,k.__webglTexture,s.TEXTURE0+oe);const _t=n.get(be);if(be.version!==_t.__version||Pe===!0){t.activeTexture(s.TEXTURE0+oe);const Ke=Bt.getPrimaries(Bt.workingColorSpace),ft=R.colorSpace===Bi?null:Bt.getPrimaries(R.colorSpace),vt=R.colorSpace===Bi||Ke===ft?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,R.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,R.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,vt);let Fe=_(R.image,!1,i.maxTextureSize);Fe=rt(R,Fe);const at=r.convert(R.format,R.colorSpace),Et=r.convert(R.type);let St=M(R.internalFormat,at,Et,R.colorSpace,R.isVideoTexture);pe(we,R);let $e;const At=R.mipmaps,J=R.isVideoTexture!==!0,tt=_t.__version===void 0||Pe===!0,Ne=be.dataReady,lt=N(R,Fe);if(R.isDepthTexture)St=b(R.format===xr,R.type),tt&&(J?t.texStorage2D(s.TEXTURE_2D,1,St,Fe.width,Fe.height):t.texImage2D(s.TEXTURE_2D,0,St,Fe.width,Fe.height,0,at,Et,null));else if(R.isDataTexture)if(At.length>0){J&&tt&&t.texStorage2D(s.TEXTURE_2D,lt,St,At[0].width,At[0].height);for(let ke=0,Re=At.length;ke<Re;ke++)$e=At[ke],J?Ne&&t.texSubImage2D(s.TEXTURE_2D,ke,0,0,$e.width,$e.height,at,Et,$e.data):t.texImage2D(s.TEXTURE_2D,ke,St,$e.width,$e.height,0,at,Et,$e.data);R.generateMipmaps=!1}else J?(tt&&t.texStorage2D(s.TEXTURE_2D,lt,St,Fe.width,Fe.height),Ne&&K(R,Fe,at,Et)):t.texImage2D(s.TEXTURE_2D,0,St,Fe.width,Fe.height,0,at,Et,Fe.data);else if(R.isCompressedTexture)if(R.isCompressedArrayTexture){J&&tt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,lt,St,At[0].width,At[0].height,Fe.depth);for(let ke=0,Re=At.length;ke<Re;ke++)if($e=At[ke],R.format!==$n)if(at!==null)if(J){if(Ne)if(R.layerUpdates.size>0){const ot=vh($e.width,$e.height,R.format,R.type);for(const Tt of R.layerUpdates){const qt=$e.data.subarray(Tt*ot/$e.data.BYTES_PER_ELEMENT,(Tt+1)*ot/$e.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ke,0,0,Tt,$e.width,$e.height,1,at,qt)}R.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,ke,0,0,0,$e.width,$e.height,Fe.depth,at,$e.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,ke,St,$e.width,$e.height,Fe.depth,0,$e.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else J?Ne&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,ke,0,0,0,$e.width,$e.height,Fe.depth,at,Et,$e.data):t.texImage3D(s.TEXTURE_2D_ARRAY,ke,St,$e.width,$e.height,Fe.depth,0,at,Et,$e.data)}else{J&&tt&&t.texStorage2D(s.TEXTURE_2D,lt,St,At[0].width,At[0].height);for(let ke=0,Re=At.length;ke<Re;ke++)$e=At[ke],R.format!==$n?at!==null?J?Ne&&t.compressedTexSubImage2D(s.TEXTURE_2D,ke,0,0,$e.width,$e.height,at,$e.data):t.compressedTexImage2D(s.TEXTURE_2D,ke,St,$e.width,$e.height,0,$e.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):J?Ne&&t.texSubImage2D(s.TEXTURE_2D,ke,0,0,$e.width,$e.height,at,Et,$e.data):t.texImage2D(s.TEXTURE_2D,ke,St,$e.width,$e.height,0,at,Et,$e.data)}else if(R.isDataArrayTexture)if(J){if(tt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,lt,St,Fe.width,Fe.height,Fe.depth),Ne)if(R.layerUpdates.size>0){const ke=vh(Fe.width,Fe.height,R.format,R.type);for(const Re of R.layerUpdates){const ot=Fe.data.subarray(Re*ke/Fe.data.BYTES_PER_ELEMENT,(Re+1)*ke/Fe.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,Re,Fe.width,Fe.height,1,at,Et,ot)}R.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,Fe.width,Fe.height,Fe.depth,at,Et,Fe.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,St,Fe.width,Fe.height,Fe.depth,0,at,Et,Fe.data);else if(R.isData3DTexture)J?(tt&&t.texStorage3D(s.TEXTURE_3D,lt,St,Fe.width,Fe.height,Fe.depth),Ne&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,Fe.width,Fe.height,Fe.depth,at,Et,Fe.data)):t.texImage3D(s.TEXTURE_3D,0,St,Fe.width,Fe.height,Fe.depth,0,at,Et,Fe.data);else if(R.isFramebufferTexture){if(tt)if(J)t.texStorage2D(s.TEXTURE_2D,lt,St,Fe.width,Fe.height);else{let ke=Fe.width,Re=Fe.height;for(let ot=0;ot<lt;ot++)t.texImage2D(s.TEXTURE_2D,ot,St,ke,Re,0,at,Et,null),ke>>=1,Re>>=1}}else if(At.length>0){if(J&&tt){const ke=Xt(At[0]);t.texStorage2D(s.TEXTURE_2D,lt,St,ke.width,ke.height)}for(let ke=0,Re=At.length;ke<Re;ke++)$e=At[ke],J?Ne&&t.texSubImage2D(s.TEXTURE_2D,ke,0,0,at,Et,$e):t.texImage2D(s.TEXTURE_2D,ke,St,at,Et,$e);R.generateMipmaps=!1}else if(J){if(tt){const ke=Xt(Fe);t.texStorage2D(s.TEXTURE_2D,lt,St,ke.width,ke.height)}Ne&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,at,Et,Fe)}else t.texImage2D(s.TEXTURE_2D,0,St,at,Et,Fe);f(R)&&p(we),_t.__version=be.version,R.onUpdate&&R.onUpdate(R)}k.__version=R.version}function ee(k,R,oe){if(R.image.length!==6)return;const we=re(k,R),Pe=R.source;t.bindTexture(s.TEXTURE_CUBE_MAP,k.__webglTexture,s.TEXTURE0+oe);const be=n.get(Pe);if(Pe.version!==be.__version||we===!0){t.activeTexture(s.TEXTURE0+oe);const _t=Bt.getPrimaries(Bt.workingColorSpace),Ke=R.colorSpace===Bi?null:Bt.getPrimaries(R.colorSpace),ft=R.colorSpace===Bi||_t===Ke?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,R.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,R.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,ft);const vt=R.isCompressedTexture||R.image[0].isCompressedTexture,Fe=R.image[0]&&R.image[0].isDataTexture,at=[];for(let Re=0;Re<6;Re++)!vt&&!Fe?at[Re]=_(R.image[Re],!0,i.maxCubemapSize):at[Re]=Fe?R.image[Re].image:R.image[Re],at[Re]=rt(R,at[Re]);const Et=at[0],St=r.convert(R.format,R.colorSpace),$e=r.convert(R.type),At=M(R.internalFormat,St,$e,R.colorSpace),J=R.isVideoTexture!==!0,tt=be.__version===void 0||we===!0,Ne=Pe.dataReady;let lt=N(R,Et);pe(s.TEXTURE_CUBE_MAP,R);let ke;if(vt){J&&tt&&t.texStorage2D(s.TEXTURE_CUBE_MAP,lt,At,Et.width,Et.height);for(let Re=0;Re<6;Re++){ke=at[Re].mipmaps;for(let ot=0;ot<ke.length;ot++){const Tt=ke[ot];R.format!==$n?St!==null?J?Ne&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot,0,0,Tt.width,Tt.height,St,Tt.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot,At,Tt.width,Tt.height,0,Tt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot,0,0,Tt.width,Tt.height,St,$e,Tt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot,At,Tt.width,Tt.height,0,St,$e,Tt.data)}}}else{if(ke=R.mipmaps,J&&tt){ke.length>0&<++;const Re=Xt(at[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,lt,At,Re.width,Re.height)}for(let Re=0;Re<6;Re++)if(Fe){J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,0,0,at[Re].width,at[Re].height,St,$e,at[Re].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,At,at[Re].width,at[Re].height,0,St,$e,at[Re].data);for(let ot=0;ot<ke.length;ot++){const qt=ke[ot].image[Re].image;J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot+1,0,0,qt.width,qt.height,St,$e,qt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot+1,At,qt.width,qt.height,0,St,$e,qt.data)}}else{J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,0,0,St,$e,at[Re]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,At,St,$e,at[Re]);for(let ot=0;ot<ke.length;ot++){const Tt=ke[ot];J?Ne&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot+1,0,0,St,$e,Tt.image[Re]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+Re,ot+1,At,St,$e,Tt.image[Re])}}}f(R)&&p(s.TEXTURE_CUBE_MAP),be.__version=Pe.version,R.onUpdate&&R.onUpdate(R)}k.__version=R.version}function fe(k,R,oe,we,Pe,be){const _t=r.convert(oe.format,oe.colorSpace),Ke=r.convert(oe.type),ft=M(oe.internalFormat,_t,Ke,oe.colorSpace),vt=n.get(R),Fe=n.get(oe);if(Fe.__renderTarget=R,!vt.__hasExternalTextures){const at=Math.max(1,R.width>>be),Et=Math.max(1,R.height>>be);Pe===s.TEXTURE_3D||Pe===s.TEXTURE_2D_ARRAY?t.texImage3D(Pe,be,ft,at,Et,R.depth,0,_t,Ke,null):t.texImage2D(Pe,be,ft,at,Et,0,_t,Ke,null)}t.bindFramebuffer(s.FRAMEBUFFER,k),Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,we,Pe,Fe.__webglTexture,0,Ie(R)):(Pe===s.TEXTURE_2D||Pe>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Pe<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,we,Pe,Fe.__webglTexture,be),t.bindFramebuffer(s.FRAMEBUFFER,null)}function Y(k,R,oe){if(s.bindRenderbuffer(s.RENDERBUFFER,k),R.depthBuffer){const we=R.depthTexture,Pe=we&&we.isDepthTexture?we.type:null,be=b(R.stencilBuffer,Pe),_t=R.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ke=Ie(R);Ze(R)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Ke,be,R.width,R.height):oe?s.renderbufferStorageMultisample(s.RENDERBUFFER,Ke,be,R.width,R.height):s.renderbufferStorage(s.RENDERBUFFER,be,R.width,R.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,_t,s.RENDERBUFFER,k)}else{const we=R.textures;for(let Pe=0;Pe<we.length;Pe++){const be=we[Pe],_t=r.convert(be.format,be.colorSpace),Ke=r.convert(be.type),ft=M(be.internalFormat,_t,Ke,be.colorSpace),vt=Ie(R);oe&&Ze(R)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,vt,ft,R.width,R.height):Ze(R)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,vt,ft,R.width,R.height):s.renderbufferStorage(s.RENDERBUFFER,ft,R.width,R.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function me(k,R){if(R&&R.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(s.FRAMEBUFFER,k),!(R.depthTexture&&R.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const we=n.get(R.depthTexture);we.__renderTarget=R,(!we.__webglTexture||R.depthTexture.image.width!==R.width||R.depthTexture.image.height!==R.height)&&(R.depthTexture.image.width=R.width,R.depthTexture.image.height=R.height,R.depthTexture.needsUpdate=!0),se(R.depthTexture,0);const Pe=we.__webglTexture,be=Ie(R);if(R.depthTexture.format===yr)Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Pe,0,be):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Pe,0);else if(R.depthTexture.format===xr)Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Pe,0,be):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Pe,0);else throw new Error("Unknown depthTexture format")}function Te(k){const R=n.get(k),oe=k.isWebGLCubeRenderTarget===!0;if(R.__boundDepthTexture!==k.depthTexture){const we=k.depthTexture;if(R.__depthDisposeCallback&&R.__depthDisposeCallback(),we){const Pe=()=>{delete R.__boundDepthTexture,delete R.__depthDisposeCallback,we.removeEventListener("dispose",Pe)};we.addEventListener("dispose",Pe),R.__depthDisposeCallback=Pe}R.__boundDepthTexture=we}if(k.depthTexture&&!R.__autoAllocateDepthBuffer){if(oe)throw new Error("target.depthTexture not supported in Cube render targets");const we=k.texture.mipmaps;we&&we.length>0?me(R.__webglFramebuffer[0],k):me(R.__webglFramebuffer,k)}else if(oe){R.__webglDepthbuffer=[];for(let we=0;we<6;we++)if(t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer[we]),R.__webglDepthbuffer[we]===void 0)R.__webglDepthbuffer[we]=s.createRenderbuffer(),Y(R.__webglDepthbuffer[we],k,!1);else{const Pe=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,be=R.__webglDepthbuffer[we];s.bindRenderbuffer(s.RENDERBUFFER,be),s.framebufferRenderbuffer(s.FRAMEBUFFER,Pe,s.RENDERBUFFER,be)}}else{const we=k.texture.mipmaps;if(we&&we.length>0?t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer),R.__webglDepthbuffer===void 0)R.__webglDepthbuffer=s.createRenderbuffer(),Y(R.__webglDepthbuffer,k,!1);else{const Pe=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,be=R.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,be),s.framebufferRenderbuffer(s.FRAMEBUFFER,Pe,s.RENDERBUFFER,be)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function et(k,R,oe){const we=n.get(k);R!==void 0&&fe(we.__webglFramebuffer,k,k.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),oe!==void 0&&Te(k)}function We(k){const R=k.texture,oe=n.get(k),we=n.get(R);k.addEventListener("dispose",P);const Pe=k.textures,be=k.isWebGLCubeRenderTarget===!0,_t=Pe.length>1;if(_t||(we.__webglTexture===void 0&&(we.__webglTexture=s.createTexture()),we.__version=R.version,o.memory.textures++),be){oe.__webglFramebuffer=[];for(let Ke=0;Ke<6;Ke++)if(R.mipmaps&&R.mipmaps.length>0){oe.__webglFramebuffer[Ke]=[];for(let ft=0;ft<R.mipmaps.length;ft++)oe.__webglFramebuffer[Ke][ft]=s.createFramebuffer()}else oe.__webglFramebuffer[Ke]=s.createFramebuffer()}else{if(R.mipmaps&&R.mipmaps.length>0){oe.__webglFramebuffer=[];for(let Ke=0;Ke<R.mipmaps.length;Ke++)oe.__webglFramebuffer[Ke]=s.createFramebuffer()}else oe.__webglFramebuffer=s.createFramebuffer();if(_t)for(let Ke=0,ft=Pe.length;Ke<ft;Ke++){const vt=n.get(Pe[Ke]);vt.__webglTexture===void 0&&(vt.__webglTexture=s.createTexture(),o.memory.textures++)}if(k.samples>0&&Ze(k)===!1){oe.__webglMultisampledFramebuffer=s.createFramebuffer(),oe.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,oe.__webglMultisampledFramebuffer);for(let Ke=0;Ke<Pe.length;Ke++){const ft=Pe[Ke];oe.__webglColorRenderbuffer[Ke]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ke]);const vt=r.convert(ft.format,ft.colorSpace),Fe=r.convert(ft.type),at=M(ft.internalFormat,vt,Fe,ft.colorSpace,k.isXRRenderTarget===!0),Et=Ie(k);s.renderbufferStorageMultisample(s.RENDERBUFFER,Et,at,k.width,k.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ke,s.RENDERBUFFER,oe.__webglColorRenderbuffer[Ke])}s.bindRenderbuffer(s.RENDERBUFFER,null),k.depthBuffer&&(oe.__webglDepthRenderbuffer=s.createRenderbuffer(),Y(oe.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(be){t.bindTexture(s.TEXTURE_CUBE_MAP,we.__webglTexture),pe(s.TEXTURE_CUBE_MAP,R);for(let Ke=0;Ke<6;Ke++)if(R.mipmaps&&R.mipmaps.length>0)for(let ft=0;ft<R.mipmaps.length;ft++)fe(oe.__webglFramebuffer[Ke][ft],k,R,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ke,ft);else fe(oe.__webglFramebuffer[Ke],k,R,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ke,0);f(R)&&p(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(_t){for(let Ke=0,ft=Pe.length;Ke<ft;Ke++){const vt=Pe[Ke],Fe=n.get(vt);t.bindTexture(s.TEXTURE_2D,Fe.__webglTexture),pe(s.TEXTURE_2D,vt),fe(oe.__webglFramebuffer,k,vt,s.COLOR_ATTACHMENT0+Ke,s.TEXTURE_2D,0),f(vt)&&p(s.TEXTURE_2D)}t.unbindTexture()}else{let Ke=s.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(Ke=k.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(Ke,we.__webglTexture),pe(Ke,R),R.mipmaps&&R.mipmaps.length>0)for(let ft=0;ft<R.mipmaps.length;ft++)fe(oe.__webglFramebuffer[ft],k,R,s.COLOR_ATTACHMENT0,Ke,ft);else fe(oe.__webglFramebuffer,k,R,s.COLOR_ATTACHMENT0,Ke,0);f(R)&&p(Ke),t.unbindTexture()}k.depthBuffer&&Te(k)}function O(k){const R=k.textures;for(let oe=0,we=R.length;oe<we;oe++){const Pe=R[oe];if(f(Pe)){const be=x(k),_t=n.get(Pe).__webglTexture;t.bindTexture(be,_t),p(be),t.unbindTexture()}}}const dt=[],st=[];function it(k){if(k.samples>0){if(Ze(k)===!1){const R=k.textures,oe=k.width,we=k.height;let Pe=s.COLOR_BUFFER_BIT;const be=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,_t=n.get(k),Ke=R.length>1;if(Ke)for(let vt=0;vt<R.length;vt++)t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,_t.__webglMultisampledFramebuffer);const ft=k.texture.mipmaps;ft&&ft.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglFramebuffer);for(let vt=0;vt<R.length;vt++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(Pe|=s.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(Pe|=s.STENCIL_BUFFER_BIT)),Ke){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,_t.__webglColorRenderbuffer[vt]);const Fe=n.get(R[vt]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Fe,0)}s.blitFramebuffer(0,0,oe,we,0,0,oe,we,Pe,s.NEAREST),l===!0&&(dt.length=0,st.length=0,dt.push(s.COLOR_ATTACHMENT0+vt),k.depthBuffer&&k.resolveDepthBuffer===!1&&(dt.push(be),st.push(be),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,st)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,dt))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),Ke)for(let vt=0;vt<R.length;vt++){t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.RENDERBUFFER,_t.__webglColorRenderbuffer[vt]);const Fe=n.get(R[vt]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,_t.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+vt,s.TEXTURE_2D,Fe,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,_t.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const R=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[R])}}}function Ie(k){return Math.min(i.maxSamples,k.samples)}function Ze(k){const R=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&R.__useRenderToTexture!==!1}function Le(k){const R=o.render.frame;d.get(k)!==R&&(d.set(k,R),k.update())}function rt(k,R){const oe=k.colorSpace,we=k.format,Pe=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||oe!==Xs&&oe!==Bi&&(Bt.getTransfer(oe)===tn?(we!==$n||Pe!==hi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",oe)),R}function Xt(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=X,this.resetTextureUnits=B,this.setTexture2D=se,this.setTexture2DArray=W,this.setTexture3D=he,this.setTextureCube=Q,this.rebindTextures=et,this.setupRenderTarget=We,this.updateRenderTargetMipmap=O,this.updateMultisampleRenderTarget=it,this.setupDepthRenderbuffer=Te,this.setupFrameBufferTexture=fe,this.useMultisampledRTT=Ze}function T3(s,e){function t(n,i=Bi){let r;const o=Bt.getTransfer(i);if(n===hi)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===ls)return s.UNSIGNED_INT;if(n===li)return s.FLOAT;if(n===Sr)return s.HALF_FLOAT;if(n===S0)return s.ALPHA;if(n===E0)return s.RGB;if(n===$n)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===tn)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===tn?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===ol)return o===tn?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===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===cl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ul)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===dl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===fl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===pl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ml)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===gl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_l)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===vl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===yl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xl)return o===tn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ml)return o===tn?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===tn?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 Je,r=new Je,o=new Ot,a=new R1({depthPacking:o2}),l=new D1,c={},d=t.maxTextureSize,m={[Yn]:Dn,[Dn]:Yn,[hn]:hn},u=new Ti({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Je},radius:{value:4}},vertexShader:M3,fragmentShader:b3}),h=u.clone();h.defines.HORIZONTAL_PASS=1;const g=new an;g.setAttribute("position",new un(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Nt(g,u),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=v0;let p=this.type;this.render=function(L,P,I){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||L.length===0)return;const E=s.getRenderTarget(),A=s.getActiveCubeFace(),F=s.getActiveMipmapLevel(),B=s.state;B.setBlending(ki),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const X=p!==yi&&this.type===yi,Z=p===yi&&this.type!==yi;for(let se=0,G=L.length;se<G;se++){const de=L[se],Q=de.shadow;if(Q===void 0){console.warn("THREE.WebGLShadowMap:",de,"has no shadow.");continue}if(Q.autoUpdate===!1&&Q.needsUpdate===!1)continue;i.copy(Q.mapSize);const xe=Q.getFrameExtents();if(i.multiply(xe),r.copy(Q.mapSize),(i.x>d||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/xe.x),i.x=r.x*xe.x,Q.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/xe.y),i.y=r.y*xe.y,Q.mapSize.y=r.y)),Q.map===null||X===!0||Z===!0){const Te=this.type!==yi?{minFilter:Vn,magFilter:Vn}:{};Q.map!==null&&Q.map.dispose(),Q.map=new cs(i.x,i.y,Te),Q.map.texture.name=de.name+".shadowMap",Q.camera.updateProjectionMatrix()}s.setRenderTarget(Q.map),s.clear();const Pe=Q.getViewportCount();for(let Te=0;Te<Pe;Te++){const me=Q.getViewport(Te);o.set(r.x*me.x,r.y*me.y,r.x*me.z,r.y*me.w),B.viewport(o),Q.updateMatrices(de,Te),n=Q.getFrustum(),b(P,I,Q.camera,de,this.type)}Q.isPointLightShadow!==!0&&this.type===yi&&x(Q,I),Q.needsUpdate=!1}p=this.type,f.needsUpdate=!1,s.setRenderTarget(E,A,F)};function x(L,P){const I=e.update(_);u.defines.VSM_SAMPLES!==L.blurSamples&&(u.defines.VSM_SAMPLES=L.blurSamples,h.defines.VSM_SAMPLES=L.blurSamples,u.needsUpdate=!0,h.needsUpdate=!0),L.mapPass===null&&(L.mapPass=new cs(i.x,i.y)),u.uniforms.shadow_pass.value=L.map.texture,u.uniforms.resolution.value=L.mapSize,u.uniforms.radius.value=L.radius,s.setRenderTarget(L.mapPass),s.clear(),s.renderBufferDirect(P,null,I,u,_,null),h.uniforms.shadow_pass.value=L.mapPass.texture,h.uniforms.resolution.value=L.mapSize,h.uniforms.radius.value=L.radius,s.setRenderTarget(L.map),s.clear(),s.renderBufferDirect(P,null,I,h,_,null)}function M(L,P,I,E){let A=null;const F=I.isPointLight===!0?L.customDistanceMaterial:L.customDepthMaterial;if(F!==void 0)A=F;else if(A=I.isPointLight===!0?l:a,s.localClippingEnabled&&P.clipShadows===!0&&Array.isArray(P.clippingPlanes)&&P.clippingPlanes.length!==0||P.displacementMap&&P.displacementScale!==0||P.alphaMap&&P.alphaTest>0||P.map&&P.alphaTest>0||P.alphaToCoverage===!0){const B=A.uuid,X=P.uuid;let Z=c[B];Z===void 0&&(Z={},c[B]=Z);let se=Z[X];se===void 0&&(se=A.clone(),Z[X]=se,P.addEventListener("dispose",N)),A=se}if(A.visible=P.visible,A.wireframe=P.wireframe,E===yi?A.side=P.shadowSide!==null?P.shadowSide:P.side:A.side=P.shadowSide!==null?P.shadowSide:m[P.side],A.alphaMap=P.alphaMap,A.alphaTest=P.alphaToCoverage===!0?.5:P.alphaTest,A.map=P.map,A.clipShadows=P.clipShadows,A.clippingPlanes=P.clippingPlanes,A.clipIntersection=P.clipIntersection,A.displacementMap=P.displacementMap,A.displacementScale=P.displacementScale,A.displacementBias=P.displacementBias,A.wireframeLinewidth=P.wireframeLinewidth,A.linewidth=P.linewidth,I.isPointLight===!0&&A.isMeshDistanceMaterial===!0){const B=s.properties.get(A);B.light=I}return A}function b(L,P,I,E,A){if(L.visible===!1)return;if(L.layers.test(P.layers)&&(L.isMesh||L.isLine||L.isPoints)&&(L.castShadow||L.receiveShadow&&A===yi)&&(!L.frustumCulled||n.intersectsObject(L))){L.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,L.matrixWorld);const X=e.update(L),Z=L.material;if(Array.isArray(Z)){const se=X.groups;for(let G=0,de=se.length;G<de;G++){const Q=se[G],xe=Z[Q.materialIndex];if(xe&&xe.visible){const Pe=M(L,xe,E,A);L.onBeforeShadow(s,L,P,I,X,Pe,Q),s.renderBufferDirect(I,null,X,Pe,L,Q),L.onAfterShadow(s,L,P,I,X,Pe,Q)}}}else if(Z.visible){const se=M(L,Z,E,A);L.onBeforeShadow(s,L,P,I,X,se,null),s.renderBufferDirect(I,null,X,se,L,null),L.onAfterShadow(s,L,P,I,X,se,null)}}const B=L.children;for(let X=0,Z=B.length;X<Z;X++)b(B[X],P,I,E,A)}function N(L){L.target.removeEventListener("dispose",N);for(const I in c){const E=c[I],A=L.target.uuid;A in E&&(E[A].dispose(),delete E[A])}}}const A3={[Xo]:jo,[qo]:Ko,[$o]:Jo,[Hs]:Yo,[jo]:Xo,[Ko]:qo,[Jo]:$o,[Yo]:Hs};function E3(s,e){function t(){let J=!1;const tt=new Ot;let Be=null;const ut=new Ot(0,0,0,0);return{setMask:function(Ge){Be!==Ge&&!J&&(s.colorMask(Ge,Ge,Ge,Ge),Be=Ge)},setLocked:function(Ge){J=Ge},setClear:function(Ge,De,lt,Rt,$t){$t===!0&&(Ge*=Rt,De*=Rt,lt*=Rt),tt.set(Ge,De,lt,Rt),ut.equals(tt)===!1&&(s.clearColor(Ge,De,lt,Rt),ut.copy(tt))},reset:function(){J=!1,Be=null,ut.set(-1,0,0,0)}}}function n(){let J=!1,tt=!1,Be=null,ut=null,Ge=null;return{setReversed:function(De){if(tt!==De){const lt=e.get("EXT_clip_control");De?lt.clipControlEXT(lt.LOWER_LEFT_EXT,lt.ZERO_TO_ONE_EXT):lt.clipControlEXT(lt.LOWER_LEFT_EXT,lt.NEGATIVE_ONE_TO_ONE_EXT),tt=De;const Rt=Ge;Ge=null,this.setClear(Rt)}},getReversed:function(){return tt},setTest:function(De){De?ee(s.DEPTH_TEST):pe(s.DEPTH_TEST)},setMask:function(De){Be!==De&&!J&&(s.depthMask(De),Be=De)},setFunc:function(De){if(tt&&(De=A3[De]),ut!==De){switch(De){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 Ko:s.depthFunc(s.GREATER);break;case Jo:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}ut=De}},setLocked:function(De){J=De},setClear:function(De){Ge!==De&&(tt&&(De=1-De),s.clearDepth(De),Ge=De)},reset:function(){J=!1,Be=null,ut=null,Ge=null,tt=!1}}}function i(){let J=!1,tt=null,Be=null,ut=null,Ge=null,De=null,lt=null,Rt=null,$t=null;return{setTest:function(Dt){J||(Dt?ee(s.STENCIL_TEST):pe(s.STENCIL_TEST))},setMask:function(Dt){tt!==Dt&&!J&&(s.stencilMask(Dt),tt=Dt)},setFunc:function(Dt,Sn,In){(Be!==Dt||ut!==Sn||Ge!==In)&&(s.stencilFunc(Dt,Sn,In),Be=Dt,ut=Sn,Ge=In)},setOp:function(Dt,Sn,In){(De!==Dt||lt!==Sn||Rt!==In)&&(s.stencilOp(Dt,Sn,In),De=Dt,lt=Sn,Rt=In)},setLocked:function(Dt){J=Dt},setClear:function(Dt){$t!==Dt&&(s.clearStencil(Dt),$t=Dt)},reset:function(){J=!1,tt=null,Be=null,ut=null,Ge=null,De=null,lt=null,Rt=null,$t=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,f=null,p=null,x=null,M=null,b=null,N=null,L=null,P=new At(0,0,0),I=0,E=!1,A=null,F=null,B=null,X=null,Z=null;const se=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let G=!1,de=0;const Q=s.getParameter(s.VERSION);Q.indexOf("WebGL")!==-1?(de=parseFloat(/^WebGL (\d)/.exec(Q)[1]),G=de>=1):Q.indexOf("OpenGL ES")!==-1&&(de=parseFloat(/^OpenGL ES (\d)/.exec(Q)[1]),G=de>=2);let xe=null,Pe={};const Te=s.getParameter(s.SCISSOR_BOX),me=s.getParameter(s.VIEWPORT),ae=new Ot().fromArray(Te),j=new Ot().fromArray(me);function K(J,tt,Be,ut){const Ge=new Uint8Array(4),De=s.createTexture();s.bindTexture(J,De),s.texParameteri(J,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(J,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let lt=0;lt<Be;lt++)J===s.TEXTURE_3D||J===s.TEXTURE_2D_ARRAY?s.texImage3D(tt,0,s.RGBA,1,1,ut,0,s.RGBA,s.UNSIGNED_BYTE,Ge):s.texImage2D(tt+lt,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,Ge);return De}const te={};te[s.TEXTURE_2D]=K(s.TEXTURE_2D,s.TEXTURE_2D,1),te[s.TEXTURE_CUBE_MAP]=K(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),te[s.TEXTURE_2D_ARRAY]=K(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),te[s.TEXTURE_3D]=K(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),st(!1),it(vc),ee(s.CULL_FACE),O(ki);function ee(J){d[J]!==!0&&(s.enable(J),d[J]=!0)}function pe(J){d[J]!==!1&&(s.disable(J),d[J]=!1)}function $(J,tt){return m[J]!==tt?(s.bindFramebuffer(J,tt),m[J]=tt,J===s.DRAW_FRAMEBUFFER&&(m[s.FRAMEBUFFER]=tt),J===s.FRAMEBUFFER&&(m[s.DRAW_FRAMEBUFFER]=tt),!0):!1}function ge(J,tt){let Be=h,ut=!1;if(J){Be=u.get(tt),Be===void 0&&(Be=[],u.set(tt,Be));const Ge=J.textures;if(Be.length!==Ge.length||Be[0]!==s.COLOR_ATTACHMENT0){for(let De=0,lt=Ge.length;De<lt;De++)Be[De]=s.COLOR_ATTACHMENT0+De;Be.length=Ge.length,ut=!0}}else Be[0]!==s.BACK&&(Be[0]=s.BACK,ut=!0);ut&&s.drawBuffers(Be)}function Ae(J){return g!==J?(s.useProgram(J),g=J,!0):!1}const et={[is]:s.FUNC_ADD,[Pu]:s.FUNC_SUBTRACT,[Fu]:s.FUNC_REVERSE_SUBTRACT};et[Nu]=s.MIN,et[Uu]=s.MAX;const je={[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(J,tt,Be,ut,Ge,De,lt,Rt,$t,Dt){if(J===ki){_===!0&&(pe(s.BLEND),_=!1);return}if(_===!1&&(ee(s.BLEND),_=!0),J!==Lu){if(J!==f||Dt!==E){if((p!==is||b!==is)&&(s.blendEquation(s.FUNC_ADD),p=is,b=is),Dt)switch(J){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: ",J);break}else switch(J){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: ",J);break}x=null,M=null,N=null,L=null,P.set(0,0,0),I=0,f=J,E=Dt}return}Ge=Ge||tt,De=De||Be,lt=lt||ut,(tt!==p||Ge!==b)&&(s.blendEquationSeparate(et[tt],et[Ge]),p=tt,b=Ge),(Be!==x||ut!==M||De!==N||lt!==L)&&(s.blendFuncSeparate(je[Be],je[ut],je[De],je[lt]),x=Be,M=ut,N=De,L=lt),(Rt.equals(P)===!1||$t!==I)&&(s.blendColor(Rt.r,Rt.g,Rt.b,$t),P.copy(Rt),I=$t),f=J,E=!1}function pt(J,tt){J.side===hn?pe(s.CULL_FACE):ee(s.CULL_FACE);let Be=J.side===Dn;tt&&(Be=!Be),st(Be),J.blending===Bs&&J.transparent===!1?O(ki):O(J.blending,J.blendEquation,J.blendSrc,J.blendDst,J.blendEquationAlpha,J.blendSrcAlpha,J.blendDstAlpha,J.blendColor,J.blendAlpha,J.premultipliedAlpha),o.setFunc(J.depthFunc),o.setTest(J.depthTest),o.setMask(J.depthWrite),r.setMask(J.colorWrite);const ut=J.stencilWrite;a.setTest(ut),ut&&(a.setMask(J.stencilWriteMask),a.setFunc(J.stencilFunc,J.stencilRef,J.stencilFuncMask),a.setOp(J.stencilFail,J.stencilZFail,J.stencilZPass)),Ze(J.polygonOffset,J.polygonOffsetFactor,J.polygonOffsetUnits),J.alphaToCoverage===!0?ee(s.SAMPLE_ALPHA_TO_COVERAGE):pe(s.SAMPLE_ALPHA_TO_COVERAGE)}function st(J){A!==J&&(J?s.frontFace(s.CW):s.frontFace(s.CCW),A=J)}function it(J){J!==Ru?(ee(s.CULL_FACE),J!==F&&(J===vc?s.cullFace(s.BACK):J===Du?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):pe(s.CULL_FACE),F=J}function ke(J){J!==B&&(G&&s.lineWidth(J),B=J)}function Ze(J,tt,Be){J?(ee(s.POLYGON_OFFSET_FILL),(X!==tt||Z!==Be)&&(s.polygonOffset(tt,Be),X=tt,Z=Be)):pe(s.POLYGON_OFFSET_FILL)}function Fe(J){J?ee(s.SCISSOR_TEST):pe(s.SCISSOR_TEST)}function rt(J){J===void 0&&(J=s.TEXTURE0+se-1),xe!==J&&(s.activeTexture(J),xe=J)}function Xt(J,tt,Be){Be===void 0&&(xe===null?Be=s.TEXTURE0+se-1:Be=xe);let ut=Pe[Be];ut===void 0&&(ut={type:void 0,texture:void 0},Pe[Be]=ut),(ut.type!==J||ut.texture!==tt)&&(xe!==Be&&(s.activeTexture(Be),xe=Be),s.bindTexture(J,tt||te[J]),ut.type=J,ut.texture=tt)}function k(){const J=Pe[xe];J!==void 0&&J.type!==void 0&&(s.bindTexture(J.type,null),J.type=void 0,J.texture=void 0)}function R(){try{s.compressedTexImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function le(){try{s.compressedTexImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Ce(){try{s.texSubImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Ue(){try{s.texSubImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function be(){try{s.compressedTexSubImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function yt(){try{s.compressedTexSubImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function Ke(){try{s.texStorage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function mt(){try{s.texStorage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function xt(){try{s.texImage2D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function ze(){try{s.texImage3D(...arguments)}catch(J){console.error("THREE.WebGLState:",J)}}function ot(J){ae.equals(J)===!1&&(s.scissor(J.x,J.y,J.z,J.w),ae.copy(J))}function Tt(J){j.equals(J)===!1&&(s.viewport(J.x,J.y,J.z,J.w),j.copy(J))}function Et(J,tt){let Be=c.get(tt);Be===void 0&&(Be=new WeakMap,c.set(tt,Be));let ut=Be.get(J);ut===void 0&&(ut=s.getUniformBlockIndex(tt,J.name),Be.set(J,ut))}function $e(J,tt){const ut=c.get(tt).get(J);l.get(tt)!==ut&&(s.uniformBlockBinding(tt,ut,J.__bindingPointIndex),l.set(tt,ut))}function Ct(){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={},xe=null,Pe={},m={},u=new WeakMap,h=[],g=null,_=!1,f=null,p=null,x=null,M=null,b=null,N=null,L=null,P=new At(0,0,0),I=0,E=!1,A=null,F=null,B=null,X=null,Z=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:ee,disable:pe,bindFramebuffer:$,drawBuffers:ge,useProgram:Ae,setBlending:O,setMaterial:pt,setFlipSided:st,setCullFace:it,setLineWidth:ke,setPolygonOffset:Ze,setScissorTest:Fe,activeTexture:rt,bindTexture:Xt,unbindTexture:k,compressedTexImage2D:R,compressedTexImage3D:le,texImage2D:xt,texImage3D:ze,updateUBOMapping:Et,uniformBlockBinding:$e,texStorage2D:Ke,texStorage3D:mt,texSubImage2D:Ce,texSubImage3D:Ue,compressedTexSubImage2D:be,compressedTexSubImage3D:yt,scissor:ot,viewport:Tt,reset:Ct}}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 Je,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,R){return h?new OffscreenCanvas(k,R):Mr("canvas")}function _(k,R,le){let Ce=1;const Ue=Xt(k);if((Ue.width>le||Ue.height>le)&&(Ce=le/Math.max(Ue.width,Ue.height)),Ce<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 be=Math.floor(Ce*Ue.width),yt=Math.floor(Ce*Ue.height);m===void 0&&(m=g(be,yt));const Ke=R?g(be,yt):m;return Ke.width=be,Ke.height=yt,Ke.getContext("2d").drawImage(k,0,0,be,yt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Ue.width+"x"+Ue.height+") to ("+be+"x"+yt+")."),Ke}else return"data"in k&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Ue.width+"x"+Ue.height+")."),k;return k}function f(k){return k.generateMipmaps}function p(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 M(k,R,le,Ce,Ue=!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 be=R;if(R===s.RED&&(le===s.FLOAT&&(be=s.R32F),le===s.HALF_FLOAT&&(be=s.R16F),le===s.UNSIGNED_BYTE&&(be=s.R8)),R===s.RED_INTEGER&&(le===s.UNSIGNED_BYTE&&(be=s.R8UI),le===s.UNSIGNED_SHORT&&(be=s.R16UI),le===s.UNSIGNED_INT&&(be=s.R32UI),le===s.BYTE&&(be=s.R8I),le===s.SHORT&&(be=s.R16I),le===s.INT&&(be=s.R32I)),R===s.RG&&(le===s.FLOAT&&(be=s.RG32F),le===s.HALF_FLOAT&&(be=s.RG16F),le===s.UNSIGNED_BYTE&&(be=s.RG8)),R===s.RG_INTEGER&&(le===s.UNSIGNED_BYTE&&(be=s.RG8UI),le===s.UNSIGNED_SHORT&&(be=s.RG16UI),le===s.UNSIGNED_INT&&(be=s.RG32UI),le===s.BYTE&&(be=s.RG8I),le===s.SHORT&&(be=s.RG16I),le===s.INT&&(be=s.RG32I)),R===s.RGB_INTEGER&&(le===s.UNSIGNED_BYTE&&(be=s.RGB8UI),le===s.UNSIGNED_SHORT&&(be=s.RGB16UI),le===s.UNSIGNED_INT&&(be=s.RGB32UI),le===s.BYTE&&(be=s.RGB8I),le===s.SHORT&&(be=s.RGB16I),le===s.INT&&(be=s.RGB32I)),R===s.RGBA_INTEGER&&(le===s.UNSIGNED_BYTE&&(be=s.RGBA8UI),le===s.UNSIGNED_SHORT&&(be=s.RGBA16UI),le===s.UNSIGNED_INT&&(be=s.RGBA32UI),le===s.BYTE&&(be=s.RGBA8I),le===s.SHORT&&(be=s.RGBA16I),le===s.INT&&(be=s.RGBA32I)),R===s.RGB&&le===s.UNSIGNED_INT_5_9_9_9_REV&&(be=s.RGB9_E5),R===s.RGBA){const yt=Ue?Ea:Bt.getTransfer(Ce);le===s.FLOAT&&(be=s.RGBA32F),le===s.HALF_FLOAT&&(be=s.RGBA16F),le===s.UNSIGNED_BYTE&&(be=yt===nn?s.SRGB8_ALPHA8:s.RGBA8),le===s.UNSIGNED_SHORT_4_4_4_4&&(be=s.RGBA4),le===s.UNSIGNED_SHORT_5_5_5_1&&(be=s.RGB5_A1)}return(be===s.R16F||be===s.R32F||be===s.RG16F||be===s.RG32F||be===s.RGBA16F||be===s.RGBA32F)&&e.get("EXT_color_buffer_float"),be}function b(k,R){let le;return k?R===null||R===ls||R===vr?le=s.DEPTH24_STENCIL8:R===li?le=s.DEPTH32F_STENCIL8:R===_r&&(le=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):R===null||R===ls||R===vr?le=s.DEPTH_COMPONENT24:R===li?le=s.DEPTH_COMPONENT32F:R===_r&&(le=s.DEPTH_COMPONENT16),le}function N(k,R){return f(k)===!0||k.isFramebufferTexture&&k.minFilter!==Vn&&k.minFilter!==kn?Math.log2(Math.max(R.width,R.height))+1:k.mipmaps!==void 0&&k.mipmaps.length>0?k.mipmaps.length:k.isCompressedTexture&&Array.isArray(k.image)?R.mipmaps.length:1}function L(k){const R=k.target;R.removeEventListener("dispose",L),I(R),R.isVideoTexture&&d.delete(R)}function P(k){const R=k.target;R.removeEventListener("dispose",P),A(R)}function I(k){const R=n.get(k);if(R.__webglInit===void 0)return;const le=k.source,Ce=u.get(le);if(Ce){const Ue=Ce[R.__cacheKey];Ue.usedTimes--,Ue.usedTimes===0&&E(k),Object.keys(Ce).length===0&&u.delete(le)}n.remove(k)}function E(k){const R=n.get(k);s.deleteTexture(R.__webglTexture);const le=k.source,Ce=u.get(le);delete Ce[R.__cacheKey],o.memory.textures--}function A(k){const R=n.get(k);if(k.depthTexture&&(k.depthTexture.dispose(),n.remove(k.depthTexture)),k.isWebGLCubeRenderTarget)for(let Ce=0;Ce<6;Ce++){if(Array.isArray(R.__webglFramebuffer[Ce]))for(let Ue=0;Ue<R.__webglFramebuffer[Ce].length;Ue++)s.deleteFramebuffer(R.__webglFramebuffer[Ce][Ue]);else s.deleteFramebuffer(R.__webglFramebuffer[Ce]);R.__webglDepthbuffer&&s.deleteRenderbuffer(R.__webglDepthbuffer[Ce])}else{if(Array.isArray(R.__webglFramebuffer))for(let Ce=0;Ce<R.__webglFramebuffer.length;Ce++)s.deleteFramebuffer(R.__webglFramebuffer[Ce]);else s.deleteFramebuffer(R.__webglFramebuffer);if(R.__webglDepthbuffer&&s.deleteRenderbuffer(R.__webglDepthbuffer),R.__webglMultisampledFramebuffer&&s.deleteFramebuffer(R.__webglMultisampledFramebuffer),R.__webglColorRenderbuffer)for(let Ce=0;Ce<R.__webglColorRenderbuffer.length;Ce++)R.__webglColorRenderbuffer[Ce]&&s.deleteRenderbuffer(R.__webglColorRenderbuffer[Ce]);R.__webglDepthRenderbuffer&&s.deleteRenderbuffer(R.__webglDepthRenderbuffer)}const le=k.textures;for(let Ce=0,Ue=le.length;Ce<Ue;Ce++){const be=n.get(le[Ce]);be.__webglTexture&&(s.deleteTexture(be.__webglTexture),o.memory.textures--),n.remove(le[Ce])}n.remove(k)}let F=0;function B(){F=0}function X(){const k=F;return k>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+k+" texture units while this GPU supports only "+i.maxTextures),F+=1,k}function Z(k){const R=[];return R.push(k.wrapS),R.push(k.wrapT),R.push(k.wrapR||0),R.push(k.magFilter),R.push(k.minFilter),R.push(k.anisotropy),R.push(k.internalFormat),R.push(k.format),R.push(k.type),R.push(k.generateMipmaps),R.push(k.premultiplyAlpha),R.push(k.flipY),R.push(k.unpackAlignment),R.push(k.colorSpace),R.join()}function se(k,R){const le=n.get(k);if(k.isVideoTexture&&Fe(k),k.isRenderTargetTexture===!1&&k.version>0&&le.__version!==k.version){const Ce=k.image;if(Ce===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ce.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{te(le,k,R);return}}t.bindTexture(s.TEXTURE_2D,le.__webglTexture,s.TEXTURE0+R)}function G(k,R){const le=n.get(k);if(k.version>0&&le.__version!==k.version){te(le,k,R);return}t.bindTexture(s.TEXTURE_2D_ARRAY,le.__webglTexture,s.TEXTURE0+R)}function de(k,R){const le=n.get(k);if(k.version>0&&le.__version!==k.version){te(le,k,R);return}t.bindTexture(s.TEXTURE_3D,le.__webglTexture,s.TEXTURE0+R)}function Q(k,R){const le=n.get(k);if(k.version>0&&le.__version!==k.version){ee(le,k,R);return}t.bindTexture(s.TEXTURE_CUBE_MAP,le.__webglTexture,s.TEXTURE0+R)}const xe={[oi]:s.REPEAT,[ei]:s.CLAMP_TO_EDGE,[el]:s.MIRRORED_REPEAT},Pe={[Vn]:s.NEAREST,[s2]:s.NEAREST_MIPMAP_NEAREST,[wr]:s.NEAREST_MIPMAP_LINEAR,[kn]:s.LINEAR,[Xa]:s.LINEAR_MIPMAP_NEAREST,[Mi]:s.LINEAR_MIPMAP_LINEAR},Te={[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 me(k,R){if(R.type===li&&e.has("OES_texture_float_linear")===!1&&(R.magFilter===kn||R.magFilter===Xa||R.magFilter===wr||R.magFilter===Mi||R.minFilter===kn||R.minFilter===Xa||R.minFilter===wr||R.minFilter===Mi)&&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,xe[R.wrapS]),s.texParameteri(k,s.TEXTURE_WRAP_T,xe[R.wrapT]),(k===s.TEXTURE_3D||k===s.TEXTURE_2D_ARRAY)&&s.texParameteri(k,s.TEXTURE_WRAP_R,xe[R.wrapR]),s.texParameteri(k,s.TEXTURE_MAG_FILTER,Pe[R.magFilter]),s.texParameteri(k,s.TEXTURE_MIN_FILTER,Pe[R.minFilter]),R.compareFunction&&(s.texParameteri(k,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(k,s.TEXTURE_COMPARE_FUNC,Te[R.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(R.magFilter===Vn||R.minFilter!==wr&&R.minFilter!==Mi||R.type===li&&e.has("OES_texture_float_linear")===!1)return;if(R.anisotropy>1||n.get(R).__currentAnisotropy){const le=e.get("EXT_texture_filter_anisotropic");s.texParameterf(k,le.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(R.anisotropy,i.getMaxAnisotropy())),n.get(R).__currentAnisotropy=R.anisotropy}}}function ae(k,R){let le=!1;k.__webglInit===void 0&&(k.__webglInit=!0,R.addEventListener("dispose",L));const Ce=R.source;let Ue=u.get(Ce);Ue===void 0&&(Ue={},u.set(Ce,Ue));const be=Z(R);if(be!==k.__cacheKey){Ue[be]===void 0&&(Ue[be]={texture:s.createTexture(),usedTimes:0},o.memory.textures++,le=!0),Ue[be].usedTimes++;const yt=Ue[k.__cacheKey];yt!==void 0&&(Ue[k.__cacheKey].usedTimes--,yt.usedTimes===0&&E(R)),k.__cacheKey=be,k.__webglTexture=Ue[be].texture}return le}function j(k,R,le){return Math.floor(Math.floor(k/le)/R)}function K(k,R,le,Ce){const be=k.updateRanges;if(be.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,R.width,R.height,le,Ce,R.data);else{be.sort((ze,ot)=>ze.start-ot.start);let yt=0;for(let ze=1;ze<be.length;ze++){const ot=be[yt],Tt=be[ze],Et=ot.start+ot.count,$e=j(Tt.start,R.width,4),Ct=j(ot.start,R.width,4);Tt.start<=Et+1&&$e===Ct&&j(Tt.start+Tt.count-1,R.width,4)===$e?ot.count=Math.max(ot.count,Tt.start+Tt.count-ot.start):(++yt,be[yt]=Tt)}be.length=yt+1;const Ke=s.getParameter(s.UNPACK_ROW_LENGTH),mt=s.getParameter(s.UNPACK_SKIP_PIXELS),xt=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,R.width);for(let ze=0,ot=be.length;ze<ot;ze++){const Tt=be[ze],Et=Math.floor(Tt.start/4),$e=Math.ceil(Tt.count/4),Ct=Et%R.width,J=Math.floor(Et/R.width),tt=$e,Be=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,Ct),s.pixelStorei(s.UNPACK_SKIP_ROWS,J),t.texSubImage2D(s.TEXTURE_2D,0,Ct,J,tt,Be,le,Ce,R.data)}k.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,Ke),s.pixelStorei(s.UNPACK_SKIP_PIXELS,mt),s.pixelStorei(s.UNPACK_SKIP_ROWS,xt)}}function te(k,R,le){let Ce=s.TEXTURE_2D;(R.isDataArrayTexture||R.isCompressedArrayTexture)&&(Ce=s.TEXTURE_2D_ARRAY),R.isData3DTexture&&(Ce=s.TEXTURE_3D);const Ue=ae(k,R),be=R.source;t.bindTexture(Ce,k.__webglTexture,s.TEXTURE0+le);const yt=n.get(be);if(be.version!==yt.__version||Ue===!0){t.activeTexture(s.TEXTURE0+le);const Ke=Bt.getPrimaries(Bt.workingColorSpace),mt=R.colorSpace===Bi?null:Bt.getPrimaries(R.colorSpace),xt=R.colorSpace===Bi||Ke===mt?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,R.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,R.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,xt);let ze=_(R.image,!1,i.maxTextureSize);ze=rt(R,ze);const ot=r.convert(R.format,R.colorSpace),Tt=r.convert(R.type);let Et=M(R.internalFormat,ot,Tt,R.colorSpace,R.isVideoTexture);me(Ce,R);let $e;const Ct=R.mipmaps,J=R.isVideoTexture!==!0,tt=yt.__version===void 0||Ue===!0,Be=be.dataReady,ut=N(R,ze);if(R.isDepthTexture)Et=b(R.format===xr,R.type),tt&&(J?t.texStorage2D(s.TEXTURE_2D,1,Et,ze.width,ze.height):t.texImage2D(s.TEXTURE_2D,0,Et,ze.width,ze.height,0,ot,Tt,null));else if(R.isDataTexture)if(Ct.length>0){J&&tt&&t.texStorage2D(s.TEXTURE_2D,ut,Et,Ct[0].width,Ct[0].height);for(let Ge=0,De=Ct.length;Ge<De;Ge++)$e=Ct[Ge],J?Be&&t.texSubImage2D(s.TEXTURE_2D,Ge,0,0,$e.width,$e.height,ot,Tt,$e.data):t.texImage2D(s.TEXTURE_2D,Ge,Et,$e.width,$e.height,0,ot,Tt,$e.data);R.generateMipmaps=!1}else J?(tt&&t.texStorage2D(s.TEXTURE_2D,ut,Et,ze.width,ze.height),Be&&K(R,ze,ot,Tt)):t.texImage2D(s.TEXTURE_2D,0,Et,ze.width,ze.height,0,ot,Tt,ze.data);else if(R.isCompressedTexture)if(R.isCompressedArrayTexture){J&&tt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ut,Et,Ct[0].width,Ct[0].height,ze.depth);for(let Ge=0,De=Ct.length;Ge<De;Ge++)if($e=Ct[Ge],R.format!==$n)if(ot!==null)if(J){if(Be)if(R.layerUpdates.size>0){const lt=vh($e.width,$e.height,R.format,R.type);for(const Rt of R.layerUpdates){const $t=$e.data.subarray(Rt*lt/$e.data.BYTES_PER_ELEMENT,(Rt+1)*lt/$e.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,Ge,0,0,Rt,$e.width,$e.height,1,ot,$t)}R.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,Ge,0,0,0,$e.width,$e.height,ze.depth,ot,$e.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,Ge,Et,$e.width,$e.height,ze.depth,0,$e.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else J?Be&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,Ge,0,0,0,$e.width,$e.height,ze.depth,ot,Tt,$e.data):t.texImage3D(s.TEXTURE_2D_ARRAY,Ge,Et,$e.width,$e.height,ze.depth,0,ot,Tt,$e.data)}else{J&&tt&&t.texStorage2D(s.TEXTURE_2D,ut,Et,Ct[0].width,Ct[0].height);for(let Ge=0,De=Ct.length;Ge<De;Ge++)$e=Ct[Ge],R.format!==$n?ot!==null?J?Be&&t.compressedTexSubImage2D(s.TEXTURE_2D,Ge,0,0,$e.width,$e.height,ot,$e.data):t.compressedTexImage2D(s.TEXTURE_2D,Ge,Et,$e.width,$e.height,0,$e.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):J?Be&&t.texSubImage2D(s.TEXTURE_2D,Ge,0,0,$e.width,$e.height,ot,Tt,$e.data):t.texImage2D(s.TEXTURE_2D,Ge,Et,$e.width,$e.height,0,ot,Tt,$e.data)}else if(R.isDataArrayTexture)if(J){if(tt&&t.texStorage3D(s.TEXTURE_2D_ARRAY,ut,Et,ze.width,ze.height,ze.depth),Be)if(R.layerUpdates.size>0){const Ge=vh(ze.width,ze.height,R.format,R.type);for(const De of R.layerUpdates){const lt=ze.data.subarray(De*Ge/ze.data.BYTES_PER_ELEMENT,(De+1)*Ge/ze.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,De,ze.width,ze.height,1,ot,Tt,lt)}R.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,ze.width,ze.height,ze.depth,ot,Tt,ze.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,Et,ze.width,ze.height,ze.depth,0,ot,Tt,ze.data);else if(R.isData3DTexture)J?(tt&&t.texStorage3D(s.TEXTURE_3D,ut,Et,ze.width,ze.height,ze.depth),Be&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,ze.width,ze.height,ze.depth,ot,Tt,ze.data)):t.texImage3D(s.TEXTURE_3D,0,Et,ze.width,ze.height,ze.depth,0,ot,Tt,ze.data);else if(R.isFramebufferTexture){if(tt)if(J)t.texStorage2D(s.TEXTURE_2D,ut,Et,ze.width,ze.height);else{let Ge=ze.width,De=ze.height;for(let lt=0;lt<ut;lt++)t.texImage2D(s.TEXTURE_2D,lt,Et,Ge,De,0,ot,Tt,null),Ge>>=1,De>>=1}}else if(Ct.length>0){if(J&&tt){const Ge=Xt(Ct[0]);t.texStorage2D(s.TEXTURE_2D,ut,Et,Ge.width,Ge.height)}for(let Ge=0,De=Ct.length;Ge<De;Ge++)$e=Ct[Ge],J?Be&&t.texSubImage2D(s.TEXTURE_2D,Ge,0,0,ot,Tt,$e):t.texImage2D(s.TEXTURE_2D,Ge,Et,ot,Tt,$e);R.generateMipmaps=!1}else if(J){if(tt){const Ge=Xt(ze);t.texStorage2D(s.TEXTURE_2D,ut,Et,Ge.width,Ge.height)}Be&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,ot,Tt,ze)}else t.texImage2D(s.TEXTURE_2D,0,Et,ot,Tt,ze);f(R)&&p(Ce),yt.__version=be.version,R.onUpdate&&R.onUpdate(R)}k.__version=R.version}function ee(k,R,le){if(R.image.length!==6)return;const Ce=ae(k,R),Ue=R.source;t.bindTexture(s.TEXTURE_CUBE_MAP,k.__webglTexture,s.TEXTURE0+le);const be=n.get(Ue);if(Ue.version!==be.__version||Ce===!0){t.activeTexture(s.TEXTURE0+le);const yt=Bt.getPrimaries(Bt.workingColorSpace),Ke=R.colorSpace===Bi?null:Bt.getPrimaries(R.colorSpace),mt=R.colorSpace===Bi||yt===Ke?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,R.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,R.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,mt);const xt=R.isCompressedTexture||R.image[0].isCompressedTexture,ze=R.image[0]&&R.image[0].isDataTexture,ot=[];for(let De=0;De<6;De++)!xt&&!ze?ot[De]=_(R.image[De],!0,i.maxCubemapSize):ot[De]=ze?R.image[De].image:R.image[De],ot[De]=rt(R,ot[De]);const Tt=ot[0],Et=r.convert(R.format,R.colorSpace),$e=r.convert(R.type),Ct=M(R.internalFormat,Et,$e,R.colorSpace),J=R.isVideoTexture!==!0,tt=be.__version===void 0||Ce===!0,Be=Ue.dataReady;let ut=N(R,Tt);me(s.TEXTURE_CUBE_MAP,R);let Ge;if(xt){J&&tt&&t.texStorage2D(s.TEXTURE_CUBE_MAP,ut,Ct,Tt.width,Tt.height);for(let De=0;De<6;De++){Ge=ot[De].mipmaps;for(let lt=0;lt<Ge.length;lt++){const Rt=Ge[lt];R.format!==$n?Et!==null?J?Be&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,lt,0,0,Rt.width,Rt.height,Et,Rt.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,lt,Ct,Rt.width,Rt.height,0,Rt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):J?Be&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,lt,0,0,Rt.width,Rt.height,Et,$e,Rt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,lt,Ct,Rt.width,Rt.height,0,Et,$e,Rt.data)}}}else{if(Ge=R.mipmaps,J&&tt){Ge.length>0&&ut++;const De=Xt(ot[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,ut,Ct,De.width,De.height)}for(let De=0;De<6;De++)if(ze){J?Be&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,0,0,0,ot[De].width,ot[De].height,Et,$e,ot[De].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,0,Ct,ot[De].width,ot[De].height,0,Et,$e,ot[De].data);for(let lt=0;lt<Ge.length;lt++){const $t=Ge[lt].image[De].image;J?Be&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,lt+1,0,0,$t.width,$t.height,Et,$e,$t.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,lt+1,Ct,$t.width,$t.height,0,Et,$e,$t.data)}}else{J?Be&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,0,0,0,Et,$e,ot[De]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,0,Ct,Et,$e,ot[De]);for(let lt=0;lt<Ge.length;lt++){const Rt=Ge[lt];J?Be&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,lt+1,0,0,Et,$e,Rt.image[De]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+De,lt+1,Ct,Et,$e,Rt.image[De])}}}f(R)&&p(s.TEXTURE_CUBE_MAP),be.__version=Ue.version,R.onUpdate&&R.onUpdate(R)}k.__version=R.version}function pe(k,R,le,Ce,Ue,be){const yt=r.convert(le.format,le.colorSpace),Ke=r.convert(le.type),mt=M(le.internalFormat,yt,Ke,le.colorSpace),xt=n.get(R),ze=n.get(le);if(ze.__renderTarget=R,!xt.__hasExternalTextures){const ot=Math.max(1,R.width>>be),Tt=Math.max(1,R.height>>be);Ue===s.TEXTURE_3D||Ue===s.TEXTURE_2D_ARRAY?t.texImage3D(Ue,be,mt,ot,Tt,R.depth,0,yt,Ke,null):t.texImage2D(Ue,be,mt,ot,Tt,0,yt,Ke,null)}t.bindFramebuffer(s.FRAMEBUFFER,k),Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,Ce,Ue,ze.__webglTexture,0,ke(R)):(Ue===s.TEXTURE_2D||Ue>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&Ue<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,Ce,Ue,ze.__webglTexture,be),t.bindFramebuffer(s.FRAMEBUFFER,null)}function $(k,R,le){if(s.bindRenderbuffer(s.RENDERBUFFER,k),R.depthBuffer){const Ce=R.depthTexture,Ue=Ce&&Ce.isDepthTexture?Ce.type:null,be=b(R.stencilBuffer,Ue),yt=R.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Ke=ke(R);Ze(R)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Ke,be,R.width,R.height):le?s.renderbufferStorageMultisample(s.RENDERBUFFER,Ke,be,R.width,R.height):s.renderbufferStorage(s.RENDERBUFFER,be,R.width,R.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,yt,s.RENDERBUFFER,k)}else{const Ce=R.textures;for(let Ue=0;Ue<Ce.length;Ue++){const be=Ce[Ue],yt=r.convert(be.format,be.colorSpace),Ke=r.convert(be.type),mt=M(be.internalFormat,yt,Ke,be.colorSpace),xt=ke(R);le&&Ze(R)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,xt,mt,R.width,R.height):Ze(R)?a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,xt,mt,R.width,R.height):s.renderbufferStorage(s.RENDERBUFFER,mt,R.width,R.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function ge(k,R){if(R&&R.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(s.FRAMEBUFFER,k),!(R.depthTexture&&R.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Ce=n.get(R.depthTexture);Ce.__renderTarget=R,(!Ce.__webglTexture||R.depthTexture.image.width!==R.width||R.depthTexture.image.height!==R.height)&&(R.depthTexture.image.width=R.width,R.depthTexture.image.height=R.height,R.depthTexture.needsUpdate=!0),se(R.depthTexture,0);const Ue=Ce.__webglTexture,be=ke(R);if(R.depthTexture.format===yr)Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Ue,0,be):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,Ue,0);else if(R.depthTexture.format===xr)Ze(R)?a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Ue,0,be):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,Ue,0);else throw new Error("Unknown depthTexture format")}function Ae(k){const R=n.get(k),le=k.isWebGLCubeRenderTarget===!0;if(R.__boundDepthTexture!==k.depthTexture){const Ce=k.depthTexture;if(R.__depthDisposeCallback&&R.__depthDisposeCallback(),Ce){const Ue=()=>{delete R.__boundDepthTexture,delete R.__depthDisposeCallback,Ce.removeEventListener("dispose",Ue)};Ce.addEventListener("dispose",Ue),R.__depthDisposeCallback=Ue}R.__boundDepthTexture=Ce}if(k.depthTexture&&!R.__autoAllocateDepthBuffer){if(le)throw new Error("target.depthTexture not supported in Cube render targets");const Ce=k.texture.mipmaps;Ce&&Ce.length>0?ge(R.__webglFramebuffer[0],k):ge(R.__webglFramebuffer,k)}else if(le){R.__webglDepthbuffer=[];for(let Ce=0;Ce<6;Ce++)if(t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer[Ce]),R.__webglDepthbuffer[Ce]===void 0)R.__webglDepthbuffer[Ce]=s.createRenderbuffer(),$(R.__webglDepthbuffer[Ce],k,!1);else{const Ue=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,be=R.__webglDepthbuffer[Ce];s.bindRenderbuffer(s.RENDERBUFFER,be),s.framebufferRenderbuffer(s.FRAMEBUFFER,Ue,s.RENDERBUFFER,be)}}else{const Ce=k.texture.mipmaps;if(Ce&&Ce.length>0?t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,R.__webglFramebuffer),R.__webglDepthbuffer===void 0)R.__webglDepthbuffer=s.createRenderbuffer(),$(R.__webglDepthbuffer,k,!1);else{const Ue=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,be=R.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,be),s.framebufferRenderbuffer(s.FRAMEBUFFER,Ue,s.RENDERBUFFER,be)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function et(k,R,le){const Ce=n.get(k);R!==void 0&&pe(Ce.__webglFramebuffer,k,k.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),le!==void 0&&Ae(k)}function je(k){const R=k.texture,le=n.get(k),Ce=n.get(R);k.addEventListener("dispose",P);const Ue=k.textures,be=k.isWebGLCubeRenderTarget===!0,yt=Ue.length>1;if(yt||(Ce.__webglTexture===void 0&&(Ce.__webglTexture=s.createTexture()),Ce.__version=R.version,o.memory.textures++),be){le.__webglFramebuffer=[];for(let Ke=0;Ke<6;Ke++)if(R.mipmaps&&R.mipmaps.length>0){le.__webglFramebuffer[Ke]=[];for(let mt=0;mt<R.mipmaps.length;mt++)le.__webglFramebuffer[Ke][mt]=s.createFramebuffer()}else le.__webglFramebuffer[Ke]=s.createFramebuffer()}else{if(R.mipmaps&&R.mipmaps.length>0){le.__webglFramebuffer=[];for(let Ke=0;Ke<R.mipmaps.length;Ke++)le.__webglFramebuffer[Ke]=s.createFramebuffer()}else le.__webglFramebuffer=s.createFramebuffer();if(yt)for(let Ke=0,mt=Ue.length;Ke<mt;Ke++){const xt=n.get(Ue[Ke]);xt.__webglTexture===void 0&&(xt.__webglTexture=s.createTexture(),o.memory.textures++)}if(k.samples>0&&Ze(k)===!1){le.__webglMultisampledFramebuffer=s.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,le.__webglMultisampledFramebuffer);for(let Ke=0;Ke<Ue.length;Ke++){const mt=Ue[Ke];le.__webglColorRenderbuffer[Ke]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,le.__webglColorRenderbuffer[Ke]);const xt=r.convert(mt.format,mt.colorSpace),ze=r.convert(mt.type),ot=M(mt.internalFormat,xt,ze,mt.colorSpace,k.isXRRenderTarget===!0),Tt=ke(k);s.renderbufferStorageMultisample(s.RENDERBUFFER,Tt,ot,k.width,k.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ke,s.RENDERBUFFER,le.__webglColorRenderbuffer[Ke])}s.bindRenderbuffer(s.RENDERBUFFER,null),k.depthBuffer&&(le.__webglDepthRenderbuffer=s.createRenderbuffer(),$(le.__webglDepthRenderbuffer,k,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(be){t.bindTexture(s.TEXTURE_CUBE_MAP,Ce.__webglTexture),me(s.TEXTURE_CUBE_MAP,R);for(let Ke=0;Ke<6;Ke++)if(R.mipmaps&&R.mipmaps.length>0)for(let mt=0;mt<R.mipmaps.length;mt++)pe(le.__webglFramebuffer[Ke][mt],k,R,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ke,mt);else pe(le.__webglFramebuffer[Ke],k,R,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+Ke,0);f(R)&&p(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(yt){for(let Ke=0,mt=Ue.length;Ke<mt;Ke++){const xt=Ue[Ke],ze=n.get(xt);t.bindTexture(s.TEXTURE_2D,ze.__webglTexture),me(s.TEXTURE_2D,xt),pe(le.__webglFramebuffer,k,xt,s.COLOR_ATTACHMENT0+Ke,s.TEXTURE_2D,0),f(xt)&&p(s.TEXTURE_2D)}t.unbindTexture()}else{let Ke=s.TEXTURE_2D;if((k.isWebGL3DRenderTarget||k.isWebGLArrayRenderTarget)&&(Ke=k.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(Ke,Ce.__webglTexture),me(Ke,R),R.mipmaps&&R.mipmaps.length>0)for(let mt=0;mt<R.mipmaps.length;mt++)pe(le.__webglFramebuffer[mt],k,R,s.COLOR_ATTACHMENT0,Ke,mt);else pe(le.__webglFramebuffer,k,R,s.COLOR_ATTACHMENT0,Ke,0);f(R)&&p(Ke),t.unbindTexture()}k.depthBuffer&&Ae(k)}function O(k){const R=k.textures;for(let le=0,Ce=R.length;le<Ce;le++){const Ue=R[le];if(f(Ue)){const be=x(k),yt=n.get(Ue).__webglTexture;t.bindTexture(be,yt),p(be),t.unbindTexture()}}}const pt=[],st=[];function it(k){if(k.samples>0){if(Ze(k)===!1){const R=k.textures,le=k.width,Ce=k.height;let Ue=s.COLOR_BUFFER_BIT;const be=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,yt=n.get(k),Ke=R.length>1;if(Ke)for(let xt=0;xt<R.length;xt++)t.bindFramebuffer(s.FRAMEBUFFER,yt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+xt,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,yt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+xt,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,yt.__webglMultisampledFramebuffer);const mt=k.texture.mipmaps;mt&&mt.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,yt.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,yt.__webglFramebuffer);for(let xt=0;xt<R.length;xt++){if(k.resolveDepthBuffer&&(k.depthBuffer&&(Ue|=s.DEPTH_BUFFER_BIT),k.stencilBuffer&&k.resolveStencilBuffer&&(Ue|=s.STENCIL_BUFFER_BIT)),Ke){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,yt.__webglColorRenderbuffer[xt]);const ze=n.get(R[xt]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,ze,0)}s.blitFramebuffer(0,0,le,Ce,0,0,le,Ce,Ue,s.NEAREST),l===!0&&(pt.length=0,st.length=0,pt.push(s.COLOR_ATTACHMENT0+xt),k.depthBuffer&&k.resolveDepthBuffer===!1&&(pt.push(be),st.push(be),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,st)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,pt))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),Ke)for(let xt=0;xt<R.length;xt++){t.bindFramebuffer(s.FRAMEBUFFER,yt.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+xt,s.RENDERBUFFER,yt.__webglColorRenderbuffer[xt]);const ze=n.get(R[xt]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,yt.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+xt,s.TEXTURE_2D,ze,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,yt.__webglMultisampledFramebuffer)}else if(k.depthBuffer&&k.resolveDepthBuffer===!1&&l){const R=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[R])}}}function ke(k){return Math.min(i.maxSamples,k.samples)}function Ze(k){const R=n.get(k);return k.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&R.__useRenderToTexture!==!1}function Fe(k){const R=o.render.frame;d.get(k)!==R&&(d.set(k,R),k.update())}function rt(k,R){const le=k.colorSpace,Ce=k.format,Ue=k.type;return k.isCompressedTexture===!0||k.isVideoTexture===!0||le!==Xs&&le!==Bi&&(Bt.getTransfer(le)===nn?(Ce!==$n||Ue!==hi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",le)),R}function Xt(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=X,this.resetTextureUnits=B,this.setTexture2D=se,this.setTexture2DArray=G,this.setTexture3D=de,this.setTextureCube=Q,this.rebindTextures=et,this.setupRenderTarget=je,this.updateRenderTargetMipmap=O,this.updateMultisampleRenderTarget=it,this.setupDepthRenderbuffer=Ae,this.setupFrameBufferTexture=pe,this.useMultisampledRTT=Ze}function T3(s,e){function t(n,i=Bi){let r;const o=Bt.getTransfer(i);if(n===hi)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===ls)return s.UNSIGNED_INT;if(n===li)return s.FLOAT;if(n===Sr)return s.HALF_FLOAT;if(n===S0)return s.ALPHA;if(n===A0)return s.RGB;if(n===$n)return s.RGBA;if(n===yr)return s.DEPTH_COMPONENT;if(n===xr)return s.DEPTH_STENCIL;if(n===E0)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===nn)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===nn?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(n===ol)return o===nn?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===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===cl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===hl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===ul)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===dl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===fl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===pl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ml)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===gl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===_l)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===vl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===yl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===xl)return o===nn?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Ml)return o===nn?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===nn?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===Al||n===El||n===wl)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(n===xa)return r.COMPRESSED_RED_RGTC1_EXT;if(n===Al)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===El)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 Mn,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 Ti({vertexShader:C3,fragmentShader:R3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Pt(new wi(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class L3 extends hs{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,f=t.getContextAttributes();let p=null,x=null;const M=[],b=[],N=new Je;let L=null;const P=new gn;P.viewport=new Ot;const I=new gn;I.viewport=new Ot;const A=[P,I],E=new q1;let F=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(q){let K=M[q];return K===void 0&&(K=new po,M[q]=K),K.getTargetRaySpace()},this.getControllerGrip=function(q){let K=M[q];return K===void 0&&(K=new po,M[q]=K),K.getGripSpace()},this.getHand=function(q){let K=M[q];return K===void 0&&(K=new po,M[q]=K),K.getHandSpace()};function X(q){const K=b.indexOf(q.inputSource);if(K===-1)return;const te=M[K];te!==void 0&&(te.update(q.inputSource,q.frame,c||o),te.dispatchEvent({type:q.type,data:q.inputSource}))}function Z(){i.removeEventListener("select",X),i.removeEventListener("selectstart",X),i.removeEventListener("selectend",X),i.removeEventListener("squeeze",X),i.removeEventListener("squeezestart",X),i.removeEventListener("squeezeend",X),i.removeEventListener("end",Z),i.removeEventListener("inputsourceschange",se);for(let q=0;q<M.length;q++){const K=b[q];K!==null&&(b[q]=null,M[q].disconnect(K))}F=null,B=null,_.reset(),e.setRenderTarget(p),h=null,u=null,m=null,i=null,x=null,re.stop(),n.isPresenting=!1,e.setPixelRatio(L),e.setSize(N.width,N.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(q){r=q,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(q){a=q,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(q){c=q},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(q){if(i=q,i!==null){if(p=e.getRenderTarget(),i.addEventListener("select",X),i.addEventListener("selectstart",X),i.addEventListener("selectend",X),i.addEventListener("squeeze",X),i.addEventListener("squeezestart",X),i.addEventListener("squeezeend",X),i.addEventListener("end",Z),i.addEventListener("inputsourceschange",se),f.xrCompatible!==!0&&await t.makeXRCompatible(),L=e.getPixelRatio(),e.getSize(N),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let te=null,ee=null,fe=null;f.depth&&(fe=f.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,te=f.stencil?xr:yr,ee=f.stencil?vr:ls);const Y={colorFormat:t.RGBA8,depthFormat:fe,scaleFactor:r};m=new XRWebGLBinding(i,t),u=m.createProjectionLayer(Y),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),x=new cs(u.textureWidth,u.textureHeight,{format:$n,type:hi,depthTexture:new H0(u.textureWidth,u.textureHeight,ee,void 0,void 0,void 0,void 0,void 0,void 0,te),stencilBuffer:f.stencil,colorSpace:e.outputColorSpace,samples:f.antialias?4:0,resolveDepthBuffer:u.ignoreDepthValues===!1,resolveStencilBuffer:u.ignoreDepthValues===!1})}else{const te={antialias:f.antialias,alpha:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,t,te),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),x=new cs(h.framebufferWidth,h.framebufferHeight,{format:$n,type:hi,colorSpace:e.outputColorSpace,stencilBuffer:f.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}x.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await i.requestReferenceSpace(a),re.setContext(i),re.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function se(q){for(let K=0;K<q.removed.length;K++){const te=q.removed[K],ee=b.indexOf(te);ee>=0&&(b[ee]=null,M[ee].disconnect(te))}for(let K=0;K<q.added.length;K++){const te=q.added[K];let ee=b.indexOf(te);if(ee===-1){for(let Y=0;Y<M.length;Y++)if(Y>=b.length){b.push(te),ee=Y;break}else if(b[Y]===null){b[Y]=te,ee=Y;break}if(ee===-1)break}const fe=M[ee];fe&&fe.connect(te)}}const W=new z,he=new z;function Q(q,K,te){W.setFromMatrixPosition(K.matrixWorld),he.setFromMatrixPosition(te.matrixWorld);const ee=W.distanceTo(he),fe=K.projectionMatrix.elements,Y=te.projectionMatrix.elements,me=fe[14]/(fe[10]-1),Te=fe[14]/(fe[10]+1),et=(fe[9]+1)/fe[5],We=(fe[9]-1)/fe[5],O=(fe[8]-1)/fe[0],dt=(Y[8]+1)/Y[0],st=me*O,it=me*dt,Ie=ee/(-O+dt),Ze=Ie*-O;if(K.matrixWorld.decompose(q.position,q.quaternion,q.scale),q.translateX(Ze),q.translateZ(Ie),q.matrixWorld.compose(q.position,q.quaternion,q.scale),q.matrixWorldInverse.copy(q.matrixWorld).invert(),fe[10]===-1)q.projectionMatrix.copy(K.projectionMatrix),q.projectionMatrixInverse.copy(K.projectionMatrixInverse);else{const Le=me+Ie,rt=Te+Ie,Xt=st-Ze,k=it+(ee-Ze),R=et*Te/rt*Le,oe=We*Te/rt*Le;q.projectionMatrix.makePerspective(Xt,k,R,oe,Le,rt),q.projectionMatrixInverse.copy(q.projectionMatrix).invert()}}function xe(q,K){K===null?q.matrixWorld.copy(q.matrix):q.matrixWorld.multiplyMatrices(K.matrixWorld,q.matrix),q.matrixWorldInverse.copy(q.matrixWorld).invert()}this.updateCamera=function(q){if(i===null)return;let K=q.near,te=q.far;_.texture!==null&&(_.depthNear>0&&(K=_.depthNear),_.depthFar>0&&(te=_.depthFar)),E.near=I.near=P.near=K,E.far=I.far=P.far=te,(F!==E.near||B!==E.far)&&(i.updateRenderState({depthNear:E.near,depthFar:E.far}),F=E.near,B=E.far),P.layers.mask=q.layers.mask|2,I.layers.mask=q.layers.mask|4,E.layers.mask=P.layers.mask|I.layers.mask;const ee=q.parent,fe=E.cameras;xe(E,ee);for(let Y=0;Y<fe.length;Y++)xe(fe[Y],ee);fe.length===2?Q(E,P,I):E.projectionMatrix.copy(P.projectionMatrix),De(q,E,ee)};function De(q,K,te){te===null?q.matrix.copy(K.matrixWorld):(q.matrix.copy(te.matrixWorld),q.matrix.invert(),q.matrix.multiply(K.matrixWorld)),q.matrix.decompose(q.position,q.quaternion,q.scale),q.updateMatrixWorld(!0),q.projectionMatrix.copy(K.projectionMatrix),q.projectionMatrixInverse.copy(K.projectionMatrixInverse),q.isPerspectiveCamera&&(q.fov=js*2*Math.atan(1/q.projectionMatrix.elements[5]),q.zoom=1)}this.getCamera=function(){return E},this.getFoveation=function(){if(!(u===null&&h===null))return l},this.setFoveation=function(q){l=q,u!==null&&(u.fixedFoveation=q),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=q)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(E)};let Ae=null;function pe(q,K){if(d=K.getViewerPose(c||o),g=K,d!==null){const te=d.views;h!==null&&(e.setRenderTargetFramebuffer(x,h.framebuffer),e.setRenderTarget(x));let ee=!1;te.length!==E.cameras.length&&(E.cameras.length=0,ee=!0);for(let me=0;me<te.length;me++){const Te=te[me];let et=null;if(h!==null)et=h.getViewport(Te);else{const O=m.getViewSubImage(u,Te);et=O.viewport,me===0&&(e.setRenderTargetTextures(x,O.colorTexture,O.depthStencilTexture),e.setRenderTarget(x))}let We=A[me];We===void 0&&(We=new gn,We.layers.enable(me),We.viewport=new Ot,A[me]=We),We.matrix.fromArray(Te.transform.matrix),We.matrix.decompose(We.position,We.quaternion,We.scale),We.projectionMatrix.fromArray(Te.projectionMatrix),We.projectionMatrixInverse.copy(We.projectionMatrix).invert(),We.viewport.set(et.x,et.y,et.width,et.height),me===0&&(E.matrix.copy(We.matrix),E.matrix.decompose(E.position,E.quaternion,E.scale)),ee===!0&&E.cameras.push(We)}const fe=i.enabledFeatures;if(fe&&fe.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&m){const me=m.getDepthInformation(te[0]);me&&me.isValid&&me.texture&&_.init(e,me,i.renderState)}}for(let te=0;te<M.length;te++){const ee=b[te],fe=M[te];ee!==null&&fe!==void 0&&fe.update(ee,K,c||o)}Ae&&Ae(q,K),K.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:K}),g=null}const re=new Z0;re.setAnimationLoop(pe),this.setAnimationLoop=function(q){Ae=q},this.dispose=function(){}}}const Qi=new _n,P3=new Mt;function F3(s,e){function t(f,p){f.matrixAutoUpdate===!0&&f.updateMatrix(),p.value.copy(f.matrix)}function n(f,p){p.color.getRGB(f.fogColor.value,N0(s)),p.isFog?(f.fogNear.value=p.near,f.fogFar.value=p.far):p.isFogExp2&&(f.fogDensity.value=p.density)}function i(f,p,x,M,b){p.isMeshBasicMaterial||p.isMeshLambertMaterial?r(f,p):p.isMeshToonMaterial?(r(f,p),m(f,p)):p.isMeshPhongMaterial?(r(f,p),d(f,p)):p.isMeshStandardMaterial?(r(f,p),u(f,p),p.isMeshPhysicalMaterial&&h(f,p,b)):p.isMeshMatcapMaterial?(r(f,p),g(f,p)):p.isMeshDepthMaterial?r(f,p):p.isMeshDistanceMaterial?(r(f,p),_(f,p)):p.isMeshNormalMaterial?r(f,p):p.isLineBasicMaterial?(o(f,p),p.isLineDashedMaterial&&a(f,p)):p.isPointsMaterial?l(f,p,x,M):p.isSpriteMaterial?c(f,p):p.isShadowMaterial?(f.color.value.copy(p.color),f.opacity.value=p.opacity):p.isShaderMaterial&&(p.uniformsNeedUpdate=!1)}function r(f,p){f.opacity.value=p.opacity,p.color&&f.diffuse.value.copy(p.color),p.emissive&&f.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity),p.map&&(f.map.value=p.map,t(p.map,f.mapTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.bumpMap&&(f.bumpMap.value=p.bumpMap,t(p.bumpMap,f.bumpMapTransform),f.bumpScale.value=p.bumpScale,p.side===Dn&&(f.bumpScale.value*=-1)),p.normalMap&&(f.normalMap.value=p.normalMap,t(p.normalMap,f.normalMapTransform),f.normalScale.value.copy(p.normalScale),p.side===Dn&&f.normalScale.value.negate()),p.displacementMap&&(f.displacementMap.value=p.displacementMap,t(p.displacementMap,f.displacementMapTransform),f.displacementScale.value=p.displacementScale,f.displacementBias.value=p.displacementBias),p.emissiveMap&&(f.emissiveMap.value=p.emissiveMap,t(p.emissiveMap,f.emissiveMapTransform)),p.specularMap&&(f.specularMap.value=p.specularMap,t(p.specularMap,f.specularMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest);const x=e.get(p),M=x.envMap,b=x.envMapRotation;M&&(f.envMap.value=M,Qi.copy(b),Qi.x*=-1,Qi.y*=-1,Qi.z*=-1,M.isCubeTexture&&M.isRenderTargetTexture===!1&&(Qi.y*=-1,Qi.z*=-1),f.envMapRotation.value.setFromMatrix4(P3.makeRotationFromEuler(Qi)),f.flipEnvMap.value=M.isCubeTexture&&M.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=p.reflectivity,f.ior.value=p.ior,f.refractionRatio.value=p.refractionRatio),p.lightMap&&(f.lightMap.value=p.lightMap,f.lightMapIntensity.value=p.lightMapIntensity,t(p.lightMap,f.lightMapTransform)),p.aoMap&&(f.aoMap.value=p.aoMap,f.aoMapIntensity.value=p.aoMapIntensity,t(p.aoMap,f.aoMapTransform))}function o(f,p){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,p.map&&(f.map.value=p.map,t(p.map,f.mapTransform))}function a(f,p){f.dashSize.value=p.dashSize,f.totalSize.value=p.dashSize+p.gapSize,f.scale.value=p.scale}function l(f,p,x,M){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,f.size.value=p.size*x,f.scale.value=M*.5,p.map&&(f.map.value=p.map,t(p.map,f.uvTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest)}function c(f,p){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,f.rotation.value=p.rotation,p.map&&(f.map.value=p.map,t(p.map,f.mapTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest)}function d(f,p){f.specular.value.copy(p.specular),f.shininess.value=Math.max(p.shininess,1e-4)}function m(f,p){p.gradientMap&&(f.gradientMap.value=p.gradientMap)}function u(f,p){f.metalness.value=p.metalness,p.metalnessMap&&(f.metalnessMap.value=p.metalnessMap,t(p.metalnessMap,f.metalnessMapTransform)),f.roughness.value=p.roughness,p.roughnessMap&&(f.roughnessMap.value=p.roughnessMap,t(p.roughnessMap,f.roughnessMapTransform)),p.envMap&&(f.envMapIntensity.value=p.envMapIntensity)}function h(f,p,x){f.ior.value=p.ior,p.sheen>0&&(f.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),f.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(f.sheenColorMap.value=p.sheenColorMap,t(p.sheenColorMap,f.sheenColorMapTransform)),p.sheenRoughnessMap&&(f.sheenRoughnessMap.value=p.sheenRoughnessMap,t(p.sheenRoughnessMap,f.sheenRoughnessMapTransform))),p.clearcoat>0&&(f.clearcoat.value=p.clearcoat,f.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(f.clearcoatMap.value=p.clearcoatMap,t(p.clearcoatMap,f.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,t(p.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(f.clearcoatNormalMap.value=p.clearcoatNormalMap,t(p.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===Dn&&f.clearcoatNormalScale.value.negate())),p.dispersion>0&&(f.dispersion.value=p.dispersion),p.iridescence>0&&(f.iridescence.value=p.iridescence,f.iridescenceIOR.value=p.iridescenceIOR,f.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(f.iridescenceMap.value=p.iridescenceMap,t(p.iridescenceMap,f.iridescenceMapTransform)),p.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=p.iridescenceThicknessMap,t(p.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),p.transmission>0&&(f.transmission.value=p.transmission,f.transmissionSamplerMap.value=x.texture,f.transmissionSamplerSize.value.set(x.width,x.height),p.transmissionMap&&(f.transmissionMap.value=p.transmissionMap,t(p.transmissionMap,f.transmissionMapTransform)),f.thickness.value=p.thickness,p.thicknessMap&&(f.thicknessMap.value=p.thicknessMap,t(p.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=p.attenuationDistance,f.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(f.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(f.anisotropyMap.value=p.anisotropyMap,t(p.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=p.specularIntensity,f.specularColor.value.copy(p.specularColor),p.specularColorMap&&(f.specularColorMap.value=p.specularColorMap,t(p.specularColorMap,f.specularColorMapTransform)),p.specularIntensityMap&&(f.specularIntensityMap.value=p.specularIntensityMap,t(p.specularIntensityMap,f.specularIntensityMapTransform))}function g(f,p){p.matcap&&(f.matcap.value=p.matcap)}function _(f,p){const x=e.get(p).light;f.referencePosition.value.setFromMatrixPosition(x.matrixWorld),f.nearDistance.value=x.shadow.camera.near,f.farDistance.value=x.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(x,M){const b=M.program;n.uniformBlockBinding(x,b)}function c(x,M){let b=i[x.id];b===void 0&&(g(x),b=d(x),i[x.id]=b,x.addEventListener("dispose",f));const N=M.program;n.updateUBOMapping(x,N);const L=e.render.frame;r[x.id]!==L&&(u(x),r[x.id]=L)}function d(x){const M=m();x.__bindingPointIndex=M;const b=s.createBuffer(),N=x.__size,L=x.usage;return s.bindBuffer(s.UNIFORM_BUFFER,b),s.bufferData(s.UNIFORM_BUFFER,N,L),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,M,b),b}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 M=i[x.id],b=x.uniforms,N=x.__cache;s.bindBuffer(s.UNIFORM_BUFFER,M);for(let L=0,P=b.length;L<P;L++){const I=Array.isArray(b[L])?b[L]:[b[L]];for(let A=0,E=I.length;A<E;A++){const F=I[A];if(h(F,L,A,N)===!0){const B=F.__offset,X=Array.isArray(F.value)?F.value:[F.value];let Z=0;for(let se=0;se<X.length;se++){const W=X[se],he=_(W);typeof W=="number"||typeof W=="boolean"?(F.__data[0]=W,s.bufferSubData(s.UNIFORM_BUFFER,B+Z,F.__data)):W.isMatrix3?(F.__data[0]=W.elements[0],F.__data[1]=W.elements[1],F.__data[2]=W.elements[2],F.__data[3]=0,F.__data[4]=W.elements[3],F.__data[5]=W.elements[4],F.__data[6]=W.elements[5],F.__data[7]=0,F.__data[8]=W.elements[6],F.__data[9]=W.elements[7],F.__data[10]=W.elements[8],F.__data[11]=0):(W.toArray(F.__data,Z),Z+=he.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,B,F.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function h(x,M,b,N){const L=x.value,P=M+"_"+b;if(N[P]===void 0)return typeof L=="number"||typeof L=="boolean"?N[P]=L:N[P]=L.clone(),!0;{const I=N[P];if(typeof L=="number"||typeof L=="boolean"){if(I!==L)return N[P]=L,!0}else if(I.equals(L)===!1)return I.copy(L),!0}return!1}function g(x){const M=x.uniforms;let b=0;const N=16;for(let P=0,I=M.length;P<I;P++){const A=Array.isArray(M[P])?M[P]:[M[P]];for(let E=0,F=A.length;E<F;E++){const B=A[E],X=Array.isArray(B.value)?B.value:[B.value];for(let Z=0,se=X.length;Z<se;Z++){const W=X[Z],he=_(W),Q=b%N,xe=Q%he.boundary,De=Q+xe;b+=xe,De!==0&&N-De<he.storage&&(b+=N-De),B.__data=new Float32Array(he.storage/Float32Array.BYTES_PER_ELEMENT),B.__offset=b,b+=he.storage}}}const L=b%N;return L>0&&(b+=N-L),x.__size=b,x.__cache={},this}function _(x){const M={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(M.boundary=4,M.storage=4):x.isVector2?(M.boundary=8,M.storage=8):x.isVector3||x.isColor?(M.boundary=16,M.storage=12):x.isVector4?(M.boundary=16,M.storage=16):x.isMatrix3?(M.boundary=48,M.storage=48):x.isMatrix4?(M.boundary=64,M.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),M}function f(x){const M=x.target;M.removeEventListener("dispose",f);const b=o.indexOf(M.__bindingPointIndex);o.splice(b,1),s.deleteBuffer(i[M.id]),delete i[M.id],delete r[M.id]}function p(){for(const x in i)s.deleteBuffer(i[x]);o=[],i={},r={}}return{bind:l,update:c,dispose:p}}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 f=null,p=null;const x=[],M=[];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=Vi,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const b=this;let N=!1;this._outputColorSpace=Vt;let L=0,P=0,I=null,A=-1,E=null;const F=new Ot,B=new Ot;let X=null;const Z=new bt(0);let se=0,W=t.width,he=t.height,Q=1,xe=null,De=null;const Ae=new Ot(0,0,W,he),pe=new Ot(0,0,W,he);let re=!1;const q=new nc;let K=!1,te=!1;const ee=new Mt,fe=new Mt,Y=new z,me=new Ot,Te={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let et=!1;function We(){return I===null?Q:1}let O=n;function dt(T,C){return t.getContext(T,C)}try{const T={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",lt,!1),t.addEventListener("webglcontextrestored",ke,!1),t.addEventListener("webglcontextcreationerror",Re,!1),O===null){const C="webgl2";if(O=dt(C,T),O===null)throw dt(C)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(T){throw console.error("THREE.WebGLRenderer: "+T.message),T}let st,it,Ie,Ze,Le,rt,Xt,k,R,oe,we,Pe,be,_t,Ke,ft,vt,Fe,at,Et,St,$e,At,J;function tt(){st=new Xp(O),st.init(),$e=new T3(O,st),it=new Bp(O,st,e,$e),Ie=new A3(O,st),it.reverseDepthBuffer&&u&&Ie.buffers.depth.setReversed(!0),Ze=new $p(O),Le=new d3,rt=new w3(O,st,Ie,Le,it,$e,Ze),Xt=new kp(b),k=new Wp(b),R=new Q1(O),At=new Ip(O,R),oe=new jp(O,R,Ze,At),we=new Kp(O,oe,R,Ze),at=new Yp(O,it,rt),ft=new Op(Le),Pe=new u3(b,Xt,k,st,it,At,ft),be=new F3(b,Le),_t=new p3,Ke=new x3(st),Fe=new Up(b,Xt,k,Ie,we,h,l),vt=new S3(b,we,it),J=new N3(O,Ze,it,Ie),Et=new zp(O,st,Ze),St=new qp(O,st,Ze),Ze.programs=Pe.programs,b.capabilities=it,b.extensions=st,b.properties=Le,b.renderLists=_t,b.shadowMap=vt,b.state=Ie,b.info=Ze}tt();const Ne=new L3(b,O);this.xr=Ne,this.getContext=function(){return O},this.getContextAttributes=function(){return O.getContextAttributes()},this.forceContextLoss=function(){const T=st.get("WEBGL_lose_context");T&&T.loseContext()},this.forceContextRestore=function(){const T=st.get("WEBGL_lose_context");T&&T.restoreContext()},this.getPixelRatio=function(){return Q},this.setPixelRatio=function(T){T!==void 0&&(Q=T,this.setSize(W,he,!1))},this.getSize=function(T){return T.set(W,he)},this.setSize=function(T,C,V=!0){if(Ne.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}W=T,he=C,t.width=Math.floor(T*Q),t.height=Math.floor(C*Q),V===!0&&(t.style.width=T+"px",t.style.height=C+"px"),this.setViewport(0,0,T,C)},this.getDrawingBufferSize=function(T){return T.set(W*Q,he*Q).floor()},this.setDrawingBufferSize=function(T,C,V){W=T,he=C,Q=V,t.width=Math.floor(T*V),t.height=Math.floor(C*V),this.setViewport(0,0,T,C)},this.getCurrentViewport=function(T){return T.copy(F)},this.getViewport=function(T){return T.copy(Ae)},this.setViewport=function(T,C,V,j){T.isVector4?Ae.set(T.x,T.y,T.z,T.w):Ae.set(T,C,V,j),Ie.viewport(F.copy(Ae).multiplyScalar(Q).round())},this.getScissor=function(T){return T.copy(pe)},this.setScissor=function(T,C,V,j){T.isVector4?pe.set(T.x,T.y,T.z,T.w):pe.set(T,C,V,j),Ie.scissor(B.copy(pe).multiplyScalar(Q).round())},this.getScissorTest=function(){return re},this.setScissorTest=function(T){Ie.setScissorTest(re=T)},this.setOpaqueSort=function(T){xe=T},this.setTransparentSort=function(T){De=T},this.getClearColor=function(T){return T.copy(Fe.getClearColor())},this.setClearColor=function(){Fe.setClearColor(...arguments)},this.getClearAlpha=function(){return Fe.getClearAlpha()},this.setClearAlpha=function(){Fe.setClearAlpha(...arguments)},this.clear=function(T=!0,C=!0,V=!0){let j=0;if(T){let G=!1;if(I!==null){const le=I.texture.format;G=le===Yl||le===$l||le===ql}if(G){const le=I.texture.type,Me=le===hi||le===ls||le===_r||le===vr||le===Xl||le===jl,_e=Fe.getClearColor(),ce=Fe.getClearAlpha(),ne=_e.r,Oe=_e.g,de=_e.b;Me?(g[0]=ne,g[1]=Oe,g[2]=de,g[3]=ce,O.clearBufferuiv(O.COLOR,0,g)):(_[0]=ne,_[1]=Oe,_[2]=de,_[3]=ce,O.clearBufferiv(O.COLOR,0,_))}else j|=O.COLOR_BUFFER_BIT}C&&(j|=O.DEPTH_BUFFER_BIT),V&&(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",lt,!1),t.removeEventListener("webglcontextrestored",ke,!1),t.removeEventListener("webglcontextcreationerror",Re,!1),Fe.dispose(),_t.dispose(),Ke.dispose(),Le.dispose(),Xt.dispose(),k.dispose(),we.dispose(),At.dispose(),J.dispose(),Pe.dispose(),Ne.dispose(),Ne.removeEventListener("sessionstart",us),Ne.removeEventListener("sessionend",ds),zn.stop()};function lt(T){T.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),N=!0}function ke(){console.log("THREE.WebGLRenderer: Context Restored."),N=!1;const T=Ze.autoReset,C=vt.enabled,V=vt.autoUpdate,j=vt.needsUpdate,G=vt.type;tt(),Ze.autoReset=T,vt.enabled=C,vt.autoUpdate=V,vt.needsUpdate=j,vt.type=G}function Re(T){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",T.statusMessage)}function ot(T){const C=T.target;C.removeEventListener("dispose",ot),Tt(C)}function Tt(T){qt(T),Le.remove(T)}function qt(T){const C=Le.get(T).programs;C!==void 0&&(C.forEach(function(V){Pe.releaseProgram(V)}),T.isShaderMaterial&&Pe.releaseShaderCache(T))}this.renderBufferDirect=function(T,C,V,j,G,le){C===null&&(C=Te);const Me=G.isMesh&&G.matrixWorld.determinant()<0,_e=ue(T,C,V,j,G);Ie.setMaterial(j,Me);let ce=V.index,ne=1;if(j.wireframe===!0){if(ce=oe.getWireframeAttribute(V),ce===void 0)return;ne=2}const Oe=V.drawRange,de=V.attributes.position;let Ge=Oe.start*ne,Ee=(Oe.start+Oe.count)*ne;le!==null&&(Ge=Math.max(Ge,le.start*ne),Ee=Math.min(Ee,(le.start+le.count)*ne)),ce!==null?(Ge=Math.max(Ge,0),Ee=Math.min(Ee,ce.count)):de!=null&&(Ge=Math.max(Ge,0),Ee=Math.min(Ee,de.count));const ht=Ee-Ge;if(ht<0||ht===1/0)return;At.setup(G,j,_e,V,ce);let He,je=Et;if(ce!==null&&(He=R.get(ce),je=St,je.setIndex(He)),G.isMesh)j.wireframe===!0?(Ie.setLineWidth(j.wireframeLinewidth*We()),je.setMode(O.LINES)):je.setMode(O.TRIANGLES);else if(G.isLine){let Xe=j.linewidth;Xe===void 0&&(Xe=1),Ie.setLineWidth(Xe*We()),G.isLineSegments?je.setMode(O.LINES):G.isLineLoop?je.setMode(O.LINE_LOOP):je.setMode(O.LINE_STRIP)}else G.isPoints?je.setMode(O.POINTS):G.isSprite&&je.setMode(O.TRIANGLES);if(G.isBatchedMesh)if(G._multiDrawInstances!==null)Os("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),je.renderMultiDrawInstances(G._multiDrawStarts,G._multiDrawCounts,G._multiDrawCount,G._multiDrawInstances);else if(st.get("WEBGL_multi_draw"))je.renderMultiDraw(G._multiDrawStarts,G._multiDrawCounts,G._multiDrawCount);else{const Xe=G._multiDrawStarts,Dt=G._multiDrawCounts,yt=G._multiDrawCount,Ct=ce?R.get(ce).bytesPerElement:1,wt=Le.get(j).currentProgram.getUniforms();for(let Ft=0;Ft<yt;Ft++)wt.setValue(O,"_gl_DrawID",Ft),je.render(Xe[Ft]/Ct,Dt[Ft])}else if(G.isInstancedMesh)je.renderInstances(Ge,ht,G.count);else if(V.isInstancedBufferGeometry){const Xe=V._maxInstanceCount!==void 0?V._maxInstanceCount:1/0,Dt=Math.min(V.instanceCount,Xe);je.renderInstances(Ge,ht,Dt)}else je.render(Ge,ht)};function Rt(T,C,V){T.transparent===!0&&T.side===cn&&T.forceSinglePass===!1?(T.side=Dn,T.needsUpdate=!0,$(T,C,V),T.side=Yn,T.needsUpdate=!0,$(T,C,V),T.side=cn):$(T,C,V)}this.compile=function(T,C,V=null){V===null&&(V=T),p=Ke.get(V),p.init(C),M.push(p),V.traverseVisible(function(G){G.isLight&&G.layers.test(C.layers)&&(p.pushLight(G),G.castShadow&&p.pushShadow(G))}),T!==V&&T.traverseVisible(function(G){G.isLight&&G.layers.test(C.layers)&&(p.pushLight(G),G.castShadow&&p.pushShadow(G))}),p.setupLights();const j=new Set;return T.traverse(function(G){if(!(G.isMesh||G.isPoints||G.isLine||G.isSprite))return;const le=G.material;if(le)if(Array.isArray(le))for(let Me=0;Me<le.length;Me++){const _e=le[Me];Rt(_e,V,G),j.add(_e)}else Rt(le,V,G),j.add(le)}),p=M.pop(),j},this.compileAsync=function(T,C,V=null){const j=this.compile(T,C,V);return new Promise(G=>{function le(){if(j.forEach(function(Me){Le.get(Me).currentProgram.isReady()&&j.delete(Me)}),j.size===0){G(T);return}setTimeout(le,10)}st.get("KHR_parallel_shader_compile")!==null?le():setTimeout(le,10)})};let bn=null;function In(T){bn&&bn(T)}function us(){zn.stop()}function ds(){zn.start()}const zn=new Z0;zn.setAnimationLoop(In),typeof self<"u"&&zn.setContext(self),this.setAnimationLoop=function(T){bn=T,Ne.setAnimationLoop(T),T===null?zn.stop():zn.start()},Ne.addEventListener("sessionstart",us),Ne.addEventListener("sessionend",ds),this.render=function(T,C){if(C!==void 0&&C.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(N===!0)return;if(T.matrixWorldAutoUpdate===!0&&T.updateMatrixWorld(),C.parent===null&&C.matrixWorldAutoUpdate===!0&&C.updateMatrixWorld(),Ne.enabled===!0&&Ne.isPresenting===!0&&(Ne.cameraAutoUpdate===!0&&Ne.updateCamera(C),C=Ne.getCamera()),T.isScene===!0&&T.onBeforeRender(b,T,C,I),p=Ke.get(T,M.length),p.init(C),M.push(p),fe.multiplyMatrices(C.projectionMatrix,C.matrixWorldInverse),q.setFromProjectionMatrix(fe),te=this.localClippingEnabled,K=ft.init(this.clippingPlanes,te),f=_t.get(T,x.length),f.init(),x.push(f),Ne.enabled===!0&&Ne.isPresenting===!0){const le=b.xr.getDepthSensingMesh();le!==null&&Xi(le,C,-1/0,b.sortObjects)}Xi(T,C,0,b.sortObjects),f.finish(),b.sortObjects===!0&&f.sort(xe,De),et=Ne.enabled===!1||Ne.isPresenting===!1||Ne.hasDepthSensing()===!1,et&&Fe.addToRenderList(f,T),this.info.render.frame++,K===!0&&ft.beginShadows();const V=p.state.shadowsArray;vt.render(V,T,C),K===!0&&ft.endShadows(),this.info.autoReset===!0&&this.info.reset();const j=f.opaque,G=f.transmissive;if(p.setupLights(),C.isArrayCamera){const le=C.cameras;if(G.length>0)for(let Me=0,_e=le.length;Me<_e;Me++){const ce=le[Me];ji(j,G,T,ce)}et&&Fe.render(T);for(let Me=0,_e=le.length;Me<_e;Me++){const ce=le[Me];fs(f,T,ce,ce.viewport)}}else G.length>0&&ji(j,G,T,C),et&&Fe.render(T),fs(f,T,C);I!==null&&P===0&&(rt.updateMultisampleRenderTarget(I),rt.updateRenderTargetMipmap(I)),T.isScene===!0&&T.onAfterRender(b,T,C),At.resetDefaultState(),A=-1,E=null,M.pop(),M.length>0?(p=M[M.length-1],K===!0&&ft.setGlobalState(b.clippingPlanes,p.state.camera)):p=null,x.pop(),x.length>0?f=x[x.length-1]:f=null};function Xi(T,C,V,j){if(T.visible===!1)return;if(T.layers.test(C.layers)){if(T.isGroup)V=T.renderOrder;else if(T.isLOD)T.autoUpdate===!0&&T.update(C);else if(T.isLight)p.pushLight(T),T.castShadow&&p.pushShadow(T);else if(T.isSprite){if(!T.frustumCulled||q.intersectsSprite(T)){j&&me.setFromMatrixPosition(T.matrixWorld).applyMatrix4(fe);const Me=we.update(T),_e=T.material;_e.visible&&f.push(T,Me,_e,V,me.z,null)}}else if((T.isMesh||T.isLine||T.isPoints)&&(!T.frustumCulled||q.intersectsObject(T))){const Me=we.update(T),_e=T.material;if(j&&(T.boundingSphere!==void 0?(T.boundingSphere===null&&T.computeBoundingSphere(),me.copy(T.boundingSphere.center)):(Me.boundingSphere===null&&Me.computeBoundingSphere(),me.copy(Me.boundingSphere.center)),me.applyMatrix4(T.matrixWorld).applyMatrix4(fe)),Array.isArray(_e)){const ce=Me.groups;for(let ne=0,Oe=ce.length;ne<Oe;ne++){const de=ce[ne],Ge=_e[de.materialIndex];Ge&&Ge.visible&&f.push(T,Me,Ge,V,me.z,de)}}else _e.visible&&f.push(T,Me,_e,V,me.z,null)}}const le=T.children;for(let Me=0,_e=le.length;Me<_e;Me++)Xi(le[Me],C,V,j)}function fs(T,C,V,j){const G=T.opaque,le=T.transmissive,Me=T.transparent;p.setupLightsView(V),K===!0&&ft.setGlobalState(b.clippingPlanes,V),j&&Ie.viewport(F.copy(j)),G.length>0&&ui(G,C,V),le.length>0&&ui(le,C,V),Me.length>0&&ui(Me,C,V),Ie.buffers.depth.setTest(!0),Ie.buffers.depth.setMask(!0),Ie.buffers.color.setMask(!0),Ie.setPolygonOffset(!1)}function ji(T,C,V,j){if((V.isScene===!0?V.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[j.id]===void 0&&(p.state.transmissionRenderTarget[j.id]=new cs(1,1,{generateMipmaps:!0,type:st.has("EXT_color_buffer_half_float")||st.has("EXT_color_buffer_float")?Sr:hi,minFilter:Mi,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Bt.workingColorSpace}));const le=p.state.transmissionRenderTarget[j.id],Me=j.viewport||F;le.setSize(Me.z*b.transmissionResolutionScale,Me.w*b.transmissionResolutionScale);const _e=b.getRenderTarget();b.setRenderTarget(le),b.getClearColor(Z),se=b.getClearAlpha(),se<1&&b.setClearColor(16777215,.5),b.clear(),et&&Fe.render(V);const ce=b.toneMapping;b.toneMapping=Vi;const ne=j.viewport;if(j.viewport!==void 0&&(j.viewport=void 0),p.setupLightsView(j),K===!0&&ft.setGlobalState(b.clippingPlanes,j),ui(T,V,j),rt.updateMultisampleRenderTarget(le),rt.updateRenderTargetMipmap(le),st.has("WEBGL_multisampled_render_to_texture")===!1){let Oe=!1;for(let de=0,Ge=C.length;de<Ge;de++){const Ee=C[de],ht=Ee.object,He=Ee.geometry,je=Ee.material,Xe=Ee.group;if(je.side===cn&&ht.layers.test(j.layers)){const Dt=je.side;je.side=Dn,je.needsUpdate=!0,qi(ht,V,j,He,je,Xe),je.side=Dt,je.needsUpdate=!0,Oe=!0}}Oe===!0&&(rt.updateMultisampleRenderTarget(le),rt.updateRenderTargetMipmap(le))}b.setRenderTarget(_e),b.setClearColor(Z,se),ne!==void 0&&(j.viewport=ne),b.toneMapping=ce}function ui(T,C,V){const j=C.isScene===!0?C.overrideMaterial:null;for(let G=0,le=T.length;G<le;G++){const Me=T[G],_e=Me.object,ce=Me.geometry,ne=Me.group;let Oe=Me.material;Oe.allowOverride===!0&&j!==null&&(Oe=j),_e.layers.test(V.layers)&&qi(_e,C,V,ce,Oe,ne)}}function qi(T,C,V,j,G,le){T.onBeforeRender(b,C,V,j,G,le),T.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,T.matrixWorld),T.normalMatrix.getNormalMatrix(T.modelViewMatrix),G.onBeforeRender(b,C,V,j,T,le),G.transparent===!0&&G.side===cn&&G.forceSinglePass===!1?(G.side=Dn,G.needsUpdate=!0,b.renderBufferDirect(V,C,j,G,T,le),G.side=Yn,G.needsUpdate=!0,b.renderBufferDirect(V,C,j,G,T,le),G.side=cn):b.renderBufferDirect(V,C,j,G,T,le),T.onAfterRender(b,C,V,j,G,le)}function $(T,C,V){C.isScene!==!0&&(C=Te);const j=Le.get(T),G=p.state.lights,le=p.state.shadowsArray,Me=G.state.version,_e=Pe.getParameters(T,G.state,le,C,V),ce=Pe.getProgramCacheKey(_e);let ne=j.programs;j.environment=T.isMeshStandardMaterial?C.environment:null,j.fog=C.fog,j.envMap=(T.isMeshStandardMaterial?k:Xt).get(T.envMap||j.environment),j.envMapRotation=j.environment!==null&&T.envMap===null?C.environmentRotation:T.envMapRotation,ne===void 0&&(T.addEventListener("dispose",ot),ne=new Map,j.programs=ne);let Oe=ne.get(ce);if(Oe!==void 0){if(j.currentProgram===Oe&&j.lightsStateVersion===Me)return ae(T,_e),Oe}else _e.uniforms=Pe.getUniforms(T),T.onBeforeCompile(_e,b),Oe=Pe.acquireProgram(_e,ce),ne.set(ce,Oe),j.uniforms=_e.uniforms;const de=j.uniforms;return(!T.isShaderMaterial&&!T.isRawShaderMaterial||T.clipping===!0)&&(de.clippingPlanes=ft.uniform),ae(T,_e),j.needsLights=ge(T),j.lightsStateVersion=Me,j.needsLights&&(de.ambientLightColor.value=G.state.ambient,de.lightProbe.value=G.state.probe,de.directionalLights.value=G.state.directional,de.directionalLightShadows.value=G.state.directionalShadow,de.spotLights.value=G.state.spot,de.spotLightShadows.value=G.state.spotShadow,de.rectAreaLights.value=G.state.rectArea,de.ltc_1.value=G.state.rectAreaLTC1,de.ltc_2.value=G.state.rectAreaLTC2,de.pointLights.value=G.state.point,de.pointLightShadows.value=G.state.pointShadow,de.hemisphereLights.value=G.state.hemi,de.directionalShadowMap.value=G.state.directionalShadowMap,de.directionalShadowMatrix.value=G.state.directionalShadowMatrix,de.spotShadowMap.value=G.state.spotShadowMap,de.spotLightMatrix.value=G.state.spotLightMatrix,de.spotLightMap.value=G.state.spotLightMap,de.pointShadowMap.value=G.state.pointShadowMap,de.pointShadowMatrix.value=G.state.pointShadowMatrix),j.currentProgram=Oe,j.uniformsList=null,Oe}function H(T){if(T.uniformsList===null){const C=T.currentProgram.getUniforms();T.uniformsList=Ma.seqWithValue(C.seq,T.uniforms)}return T.uniformsList}function ae(T,C){const V=Le.get(T);V.outputColorSpace=C.outputColorSpace,V.batching=C.batching,V.batchingColor=C.batchingColor,V.instancing=C.instancing,V.instancingColor=C.instancingColor,V.instancingMorph=C.instancingMorph,V.skinning=C.skinning,V.morphTargets=C.morphTargets,V.morphNormals=C.morphNormals,V.morphColors=C.morphColors,V.morphTargetsCount=C.morphTargetsCount,V.numClippingPlanes=C.numClippingPlanes,V.numIntersection=C.numClipIntersection,V.vertexAlphas=C.vertexAlphas,V.vertexTangents=C.vertexTangents,V.toneMapping=C.toneMapping}function ue(T,C,V,j,G){C.isScene!==!0&&(C=Te),rt.resetTextureUnits();const le=C.fog,Me=j.isMeshStandardMaterial?C.environment:null,_e=I===null?b.outputColorSpace:I.isXRRenderTarget===!0?I.texture.colorSpace:Xs,ce=(j.isMeshStandardMaterial?k:Xt).get(j.envMap||Me),ne=j.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,Oe=!!V.attributes.tangent&&(!!j.normalMap||j.anisotropy>0),de=!!V.morphAttributes.position,Ge=!!V.morphAttributes.normal,Ee=!!V.morphAttributes.color;let ht=Vi;j.toneMapped&&(I===null||I.isXRRenderTarget===!0)&&(ht=b.toneMapping);const He=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,je=He!==void 0?He.length:0,Xe=Le.get(j),Dt=p.state.lights;if(K===!0&&(te===!0||T!==E)){const Yt=T===E&&j.id===A;ft.setState(j,T,Yt)}let yt=!1;j.version===Xe.__version?(Xe.needsLights&&Xe.lightsStateVersion!==Dt.state.version||Xe.outputColorSpace!==_e||G.isBatchedMesh&&Xe.batching===!1||!G.isBatchedMesh&&Xe.batching===!0||G.isBatchedMesh&&Xe.batchingColor===!0&&G.colorTexture===null||G.isBatchedMesh&&Xe.batchingColor===!1&&G.colorTexture!==null||G.isInstancedMesh&&Xe.instancing===!1||!G.isInstancedMesh&&Xe.instancing===!0||G.isSkinnedMesh&&Xe.skinning===!1||!G.isSkinnedMesh&&Xe.skinning===!0||G.isInstancedMesh&&Xe.instancingColor===!0&&G.instanceColor===null||G.isInstancedMesh&&Xe.instancingColor===!1&&G.instanceColor!==null||G.isInstancedMesh&&Xe.instancingMorph===!0&&G.morphTexture===null||G.isInstancedMesh&&Xe.instancingMorph===!1&&G.morphTexture!==null||Xe.envMap!==ce||j.fog===!0&&Xe.fog!==le||Xe.numClippingPlanes!==void 0&&(Xe.numClippingPlanes!==ft.numPlanes||Xe.numIntersection!==ft.numIntersection)||Xe.vertexAlphas!==ne||Xe.vertexTangents!==Oe||Xe.morphTargets!==de||Xe.morphNormals!==Ge||Xe.morphColors!==Ee||Xe.toneMapping!==ht||Xe.morphTargetsCount!==je)&&(yt=!0):(yt=!0,Xe.__version=j.version);let Ct=Xe.currentProgram;yt===!0&&(Ct=$(j,C,G));let wt=!1,Ft=!1,an=!1;const Nt=Ct.getUniforms(),$t=Xe.uniforms;if(Ie.useProgram(Ct.program)&&(wt=!0,Ft=!0,an=!0),j.id!==A&&(A=j.id,Ft=!0),wt||E!==T){Ie.buffers.depth.getReversed()?(ee.copy(T.projectionMatrix),N2(ee),U2(ee),Nt.setValue(O,"projectionMatrix",ee)):Nt.setValue(O,"projectionMatrix",T.projectionMatrix),Nt.setValue(O,"viewMatrix",T.matrixWorldInverse);const Be=Nt.map.cameraPosition;Be!==void 0&&Be.setValue(O,Y.setFromMatrixPosition(T.matrixWorld)),it.logarithmicDepthBuffer&&Nt.setValue(O,"logDepthBufFC",2/(Math.log(T.far+1)/Math.LN2)),(j.isMeshPhongMaterial||j.isMeshToonMaterial||j.isMeshLambertMaterial||j.isMeshBasicMaterial||j.isMeshStandardMaterial||j.isShaderMaterial)&&Nt.setValue(O,"isOrthographic",T.isOrthographicCamera===!0),E!==T&&(E=T,Ft=!0,an=!0)}if(G.isSkinnedMesh){Nt.setOptional(O,G,"bindMatrix"),Nt.setOptional(O,G,"bindMatrixInverse");const Yt=G.skeleton;Yt&&(Yt.boneTexture===null&&Yt.computeBoneTexture(),Nt.setValue(O,"boneTexture",Yt.boneTexture,rt))}G.isBatchedMesh&&(Nt.setOptional(O,G,"batchingTexture"),Nt.setValue(O,"batchingTexture",G._matricesTexture,rt),Nt.setOptional(O,G,"batchingIdTexture"),Nt.setValue(O,"batchingIdTexture",G._indirectTexture,rt),Nt.setOptional(O,G,"batchingColorTexture"),G._colorsTexture!==null&&Nt.setValue(O,"batchingColorTexture",G._colorsTexture,rt));const Ht=V.morphAttributes;if((Ht.position!==void 0||Ht.normal!==void 0||Ht.color!==void 0)&&at.update(G,V,Ct),(Ft||Xe.receiveShadow!==G.receiveShadow)&&(Xe.receiveShadow=G.receiveShadow,Nt.setValue(O,"receiveShadow",G.receiveShadow)),j.isMeshGouraudMaterial&&j.envMap!==null&&($t.envMap.value=ce,$t.flipEnvMap.value=ce.isCubeTexture&&ce.isRenderTargetTexture===!1?-1:1),j.isMeshStandardMaterial&&j.envMap===null&&C.environment!==null&&($t.envMapIntensity.value=C.environmentIntensity),Ft&&(Nt.setValue(O,"toneMappingExposure",b.toneMappingExposure),Xe.needsLights&&ve($t,an),le&&j.fog===!0&&be.refreshFogUniforms($t,le),be.refreshMaterialUniforms($t,j,Q,he,p.state.transmissionRenderTarget[T.id]),Ma.upload(O,H(Xe),$t,rt)),j.isShaderMaterial&&j.uniformsNeedUpdate===!0&&(Ma.upload(O,H(Xe),$t,rt),j.uniformsNeedUpdate=!1),j.isSpriteMaterial&&Nt.setValue(O,"center",G.center),Nt.setValue(O,"modelViewMatrix",G.modelViewMatrix),Nt.setValue(O,"normalMatrix",G.normalMatrix),Nt.setValue(O,"modelMatrix",G.matrixWorld),j.isShaderMaterial||j.isRawShaderMaterial){const Yt=j.uniformsGroups;for(let Be=0,Kt=Yt.length;Be<Kt;Be++){const kt=Yt[Be];J.update(kt,Ct),J.bind(kt,Ct)}}return Ct}function ve(T,C){T.ambientLightColor.needsUpdate=C,T.lightProbe.needsUpdate=C,T.directionalLights.needsUpdate=C,T.directionalLightShadows.needsUpdate=C,T.pointLights.needsUpdate=C,T.pointLightShadows.needsUpdate=C,T.spotLights.needsUpdate=C,T.spotLightShadows.needsUpdate=C,T.rectAreaLights.needsUpdate=C,T.hemisphereLights.needsUpdate=C}function ge(T){return T.isMeshLambertMaterial||T.isMeshToonMaterial||T.isMeshPhongMaterial||T.isMeshStandardMaterial||T.isShadowMaterial||T.isShaderMaterial&&T.lights===!0}this.getActiveCubeFace=function(){return L},this.getActiveMipmapLevel=function(){return P},this.getRenderTarget=function(){return I},this.setRenderTargetTextures=function(T,C,V){const j=Le.get(T);j.__autoAllocateDepthBuffer=T.resolveDepthBuffer===!1,j.__autoAllocateDepthBuffer===!1&&(j.__useRenderToTexture=!1),Le.get(T.texture).__webglTexture=C,Le.get(T.depthTexture).__webglTexture=j.__autoAllocateDepthBuffer?void 0:V,j.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(T,C){const V=Le.get(T);V.__webglFramebuffer=C,V.__useDefaultFramebuffer=C===void 0};const ze=O.createFramebuffer();this.setRenderTarget=function(T,C=0,V=0){I=T,L=C,P=V;let j=!0,G=null,le=!1,Me=!1;if(T){const ce=Le.get(T);if(ce.__useDefaultFramebuffer!==void 0)Ie.bindFramebuffer(O.FRAMEBUFFER,null),j=!1;else if(ce.__webglFramebuffer===void 0)rt.setupRenderTarget(T);else if(ce.__hasExternalTextures)rt.rebindTextures(T,Le.get(T.texture).__webglTexture,Le.get(T.depthTexture).__webglTexture);else if(T.depthBuffer){const de=T.depthTexture;if(ce.__boundDepthTexture!==de){if(de!==null&&Le.has(de)&&(T.width!==de.image.width||T.height!==de.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");rt.setupDepthRenderbuffer(T)}}const ne=T.texture;(ne.isData3DTexture||ne.isDataArrayTexture||ne.isCompressedArrayTexture)&&(Me=!0);const Oe=Le.get(T).__webglFramebuffer;T.isWebGLCubeRenderTarget?(Array.isArray(Oe[C])?G=Oe[C][V]:G=Oe[C],le=!0):T.samples>0&&rt.useMultisampledRTT(T)===!1?G=Le.get(T).__webglMultisampledFramebuffer:Array.isArray(Oe)?G=Oe[V]:G=Oe,F.copy(T.viewport),B.copy(T.scissor),X=T.scissorTest}else F.copy(Ae).multiplyScalar(Q).floor(),B.copy(pe).multiplyScalar(Q).floor(),X=re;if(V!==0&&(G=ze),Ie.bindFramebuffer(O.FRAMEBUFFER,G)&&j&&Ie.drawBuffers(T,G),Ie.viewport(F),Ie.scissor(B),Ie.setScissorTest(X),le){const ce=Le.get(T.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_CUBE_MAP_POSITIVE_X+C,ce.__webglTexture,V)}else if(Me){const ce=Le.get(T.texture),ne=C;O.framebufferTextureLayer(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,ce.__webglTexture,V,ne)}else if(T!==null&&V!==0){const ce=Le.get(T.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,ce.__webglTexture,V)}A=-1},this.readRenderTargetPixels=function(T,C,V,j,G,le,Me,_e=0){if(!(T&&T.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ce=Le.get(T).__webglFramebuffer;if(T.isWebGLCubeRenderTarget&&Me!==void 0&&(ce=ce[Me]),ce){Ie.bindFramebuffer(O.FRAMEBUFFER,ce);try{const ne=T.textures[_e],Oe=ne.format,de=ne.type;if(!it.textureFormatReadable(Oe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!it.textureTypeReadable(de)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}C>=0&&C<=T.width-j&&V>=0&&V<=T.height-G&&(T.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+_e),O.readPixels(C,V,j,G,$e.convert(Oe),$e.convert(de),le))}finally{const ne=I!==null?Le.get(I).__webglFramebuffer:null;Ie.bindFramebuffer(O.FRAMEBUFFER,ne)}}},this.readRenderTargetPixelsAsync=async function(T,C,V,j,G,le,Me,_e=0){if(!(T&&T.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let ce=Le.get(T).__webglFramebuffer;if(T.isWebGLCubeRenderTarget&&Me!==void 0&&(ce=ce[Me]),ce)if(C>=0&&C<=T.width-j&&V>=0&&V<=T.height-G){Ie.bindFramebuffer(O.FRAMEBUFFER,ce);const ne=T.textures[_e],Oe=ne.format,de=ne.type;if(!it.textureFormatReadable(Oe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(de))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const Ge=O.createBuffer();O.bindBuffer(O.PIXEL_PACK_BUFFER,Ge),O.bufferData(O.PIXEL_PACK_BUFFER,le.byteLength,O.STREAM_READ),T.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+_e),O.readPixels(C,V,j,G,$e.convert(Oe),$e.convert(de),0);const Ee=I!==null?Le.get(I).__webglFramebuffer:null;Ie.bindFramebuffer(O.FRAMEBUFFER,Ee);const ht=O.fenceSync(O.SYNC_GPU_COMMANDS_COMPLETE,0);return O.flush(),await F2(O,ht,4),O.bindBuffer(O.PIXEL_PACK_BUFFER,Ge),O.getBufferSubData(O.PIXEL_PACK_BUFFER,0,le),O.deleteBuffer(Ge),O.deleteSync(ht),le}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(T,C=null,V=0){const j=Math.pow(2,-V),G=Math.floor(T.image.width*j),le=Math.floor(T.image.height*j),Me=C!==null?C.x:0,_e=C!==null?C.y:0;rt.setTexture2D(T,0),O.copyTexSubImage2D(O.TEXTURE_2D,V,0,0,Me,_e,G,le),Ie.unbindTexture()};const Se=O.createFramebuffer(),Ce=O.createFramebuffer();this.copyTextureToTexture=function(T,C,V=null,j=null,G=0,le=null){le===null&&(G!==0?(Os("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),le=G,G=0):le=0);let Me,_e,ce,ne,Oe,de,Ge,Ee,ht;const He=T.isCompressedTexture?T.mipmaps[le]:T.image;if(V!==null)Me=V.max.x-V.min.x,_e=V.max.y-V.min.y,ce=V.isBox3?V.max.z-V.min.z:1,ne=V.min.x,Oe=V.min.y,de=V.isBox3?V.min.z:0;else{const Ht=Math.pow(2,-G);Me=Math.floor(He.width*Ht),_e=Math.floor(He.height*Ht),T.isDataArrayTexture?ce=He.depth:T.isData3DTexture?ce=Math.floor(He.depth*Ht):ce=1,ne=0,Oe=0,de=0}j!==null?(Ge=j.x,Ee=j.y,ht=j.z):(Ge=0,Ee=0,ht=0);const je=$e.convert(C.format),Xe=$e.convert(C.type);let Dt;C.isData3DTexture?(rt.setTexture3D(C,0),Dt=O.TEXTURE_3D):C.isDataArrayTexture||C.isCompressedArrayTexture?(rt.setTexture2DArray(C,0),Dt=O.TEXTURE_2D_ARRAY):(rt.setTexture2D(C,0),Dt=O.TEXTURE_2D),O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,C.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,C.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,C.unpackAlignment);const yt=O.getParameter(O.UNPACK_ROW_LENGTH),Ct=O.getParameter(O.UNPACK_IMAGE_HEIGHT),wt=O.getParameter(O.UNPACK_SKIP_PIXELS),Ft=O.getParameter(O.UNPACK_SKIP_ROWS),an=O.getParameter(O.UNPACK_SKIP_IMAGES);O.pixelStorei(O.UNPACK_ROW_LENGTH,He.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,He.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,ne),O.pixelStorei(O.UNPACK_SKIP_ROWS,Oe),O.pixelStorei(O.UNPACK_SKIP_IMAGES,de);const Nt=T.isDataArrayTexture||T.isData3DTexture,$t=C.isDataArrayTexture||C.isData3DTexture;if(T.isDepthTexture){const Ht=Le.get(T),Yt=Le.get(C),Be=Le.get(Ht.__renderTarget),Kt=Le.get(Yt.__renderTarget);Ie.bindFramebuffer(O.READ_FRAMEBUFFER,Be.__webglFramebuffer),Ie.bindFramebuffer(O.DRAW_FRAMEBUFFER,Kt.__webglFramebuffer);for(let kt=0;kt<ce;kt++)Nt&&(O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Le.get(T).__webglTexture,G,de+kt),O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Le.get(C).__webglTexture,le,ht+kt)),O.blitFramebuffer(ne,Oe,Me,_e,Ge,Ee,Me,_e,O.DEPTH_BUFFER_BIT,O.NEAREST);Ie.bindFramebuffer(O.READ_FRAMEBUFFER,null),Ie.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else if(G!==0||T.isRenderTargetTexture||Le.has(T)){const Ht=Le.get(T),Yt=Le.get(C);Ie.bindFramebuffer(O.READ_FRAMEBUFFER,Se),Ie.bindFramebuffer(O.DRAW_FRAMEBUFFER,Ce);for(let Be=0;Be<ce;Be++)Nt?O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Ht.__webglTexture,G,de+Be):O.framebufferTexture2D(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,Ht.__webglTexture,G),$t?O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Yt.__webglTexture,le,ht+Be):O.framebufferTexture2D(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,Yt.__webglTexture,le),G!==0?O.blitFramebuffer(ne,Oe,Me,_e,Ge,Ee,Me,_e,O.COLOR_BUFFER_BIT,O.NEAREST):$t?O.copyTexSubImage3D(Dt,le,Ge,Ee,ht+Be,ne,Oe,Me,_e):O.copyTexSubImage2D(Dt,le,Ge,Ee,ne,Oe,Me,_e);Ie.bindFramebuffer(O.READ_FRAMEBUFFER,null),Ie.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else $t?T.isDataTexture||T.isData3DTexture?O.texSubImage3D(Dt,le,Ge,Ee,ht,Me,_e,ce,je,Xe,He.data):C.isCompressedArrayTexture?O.compressedTexSubImage3D(Dt,le,Ge,Ee,ht,Me,_e,ce,je,He.data):O.texSubImage3D(Dt,le,Ge,Ee,ht,Me,_e,ce,je,Xe,He):T.isDataTexture?O.texSubImage2D(O.TEXTURE_2D,le,Ge,Ee,Me,_e,je,Xe,He.data):T.isCompressedTexture?O.compressedTexSubImage2D(O.TEXTURE_2D,le,Ge,Ee,He.width,He.height,je,He.data):O.texSubImage2D(O.TEXTURE_2D,le,Ge,Ee,Me,_e,je,Xe,He);O.pixelStorei(O.UNPACK_ROW_LENGTH,yt),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,Ct),O.pixelStorei(O.UNPACK_SKIP_PIXELS,wt),O.pixelStorei(O.UNPACK_SKIP_ROWS,Ft),O.pixelStorei(O.UNPACK_SKIP_IMAGES,an),le===0&&C.generateMipmaps&&O.generateMipmap(Dt),Ie.unbindTexture()},this.copyTextureToTexture3D=function(T,C,V=null,j=null,G=0){return Os('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(T,C,V,j,G)},this.initRenderTarget=function(T){Le.get(T).__webglFramebuffer===void 0&&rt.setupRenderTarget(T)},this.initTexture=function(T){T.isCubeTexture?rt.setTextureCube(T,0):T.isData3DTexture?rt.setTexture3D(T,0):T.isDataArrayTexture||T.isCompressedArrayTexture?rt.setTexture2DArray(T,0):rt.setTexture2D(T,0),Ie.unbindTexture()},this.resetState=function(){L=0,P=0,I=null,Ie.reset(),At.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return bi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Bt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Bt._getUnpackColorSpace()}}const Gh={type:"change"},dc={type:"start"},su={type:"end"},ra=new Ys,Wh=new jn,U3=Math.cos(70*xi.DEG2RAD),dn=new z,Pn=2*Math.PI,nn={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 J1{constructor(e,t=null){super(e,t),this.state=nn.NONE,this.target=new z,this.cursor=new z,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:Si.ROTATE,MIDDLE:Si.DOLLY,RIGHT:Si.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 z,this._lastQuaternion=new Un,this._lastTargetPosition=new z,this._quat=new Un().setFromUnitVectors(e.up,new z(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Pl,this._sphericalDelta=new Pl,this._scale=1,this._panOffset=new z,this._rotateStart=new Je,this._rotateEnd=new Je,this._rotateDelta=new Je,this._panStart=new Je,this._panEnd=new Je,this._panDelta=new Je,this._dollyStart=new Je,this._dollyEnd=new Je,this._dollyDelta=new Je,this._dollyDirection=new z,this._mouse=new Je,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=nn.NONE}update(e=null){const t=this.object.position;dn.copy(t).sub(this.target),dn.applyQuaternion(this._quat),this._spherical.setFromVector3(dn),this.autoRotate&&this.state===nn.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+=Pn:n>Math.PI&&(n-=Pn),i<-Math.PI?i+=Pn:i>Math.PI&&(i-=Pn),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(dn.setFromSpherical(this._spherical),dn.applyQuaternion(this._quatInverse),t.copy(this.target).add(dn),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=dn.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 z(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 z(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=dn.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?Pn/60*this.autoRotateSpeed*e:Pn/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){dn.setFromMatrixColumn(t,0),dn.multiplyScalar(-e),this._panOffset.add(dn)}_panUp(e,t){this.screenSpacePanning===!0?dn.setFromMatrixColumn(t,1):(dn.setFromMatrixColumn(t,0),dn.crossVectors(this.object.up,dn)),dn.multiplyScalar(e),this._panOffset.add(dn)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;dn.copy(i).sub(this.target);let r=dn.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(Pn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Pn*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(Pn*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(-Pn*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(Pn*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(-Pn*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(Pn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Pn*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 Je,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=nn.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 Si.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(s),this.state=nn.DOLLY;break;case Si.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=nn.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=nn.ROTATE}break;case Si.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=nn.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=nn.PAN}break;default:this.state=nn.NONE}this.state!==nn.NONE&&this.dispatchEvent(dc)}function k3(s){switch(this.state){case nn.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(s);break;case nn.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(s);break;case nn.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(s);break}}function V3(s){this.enabled===!1||this.enableZoom===!1||this.state!==nn.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=nn.TOUCH_ROTATE;break;case Is.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(s),this.state=nn.TOUCH_PAN;break;default:this.state=nn.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=nn.TOUCH_DOLLY_PAN;break;case Is.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(s),this.state=nn.TOUCH_DOLLY_ROTATE;break;default:this.state=nn.NONE}break;default:this.state=nn.NONE}this.state!==nn.NONE&&this.dispatchEvent(dc)}function W3(s){switch(this._trackPointer(s),this.state){case nn.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(s),this.update();break;case nn.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(s),this.update();break;case nn.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(s),this.update();break;case nn.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(s),this.update();break;default:this.state=nn.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,jt=(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},K3=({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},J3=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 z;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 Je,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,Kh=(s,e=!0)=>{const{material:t,userData:n}=s,{color:i,opacity:r}=e?n.hover:n;t.color.set(i),t.opacity=r},es=s=>JSON.parse(JSON.stringify(s)),s4=s=>{const e=s.type||"sphere",t=e==="sphere",n=s.resolution||t?64:128,i=sn.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:{...es(c),...t?{label:"X",color:16725587,line:!0}:{label:o?ba:Ul}},y:{...es(c),...t?{label:"Y",color:9100032,line:!0}:{label:r||o?Il:ba}},z:{...es(c),...t?{label:"Z",color:2920447,line:!0}:{label:r?ba:o?Ul:Il}},nx:{...es(d),label:t?"":o?Sa:zl},ny:{...es(d),label:t?"":r||o?Bl:Sa},nz:{...es(d),label:t?"":r?Sa:o?zl:Bl}};return Ol(s,m),ou.forEach(u=>Ol(s[`n${u}`],es(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 bt,n=e*2,{isSphere:i,resolution:r,radius:o,font:a,corners:l,edges:c}=s,d=br.map(P=>({...s[P],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]=N(d,r,a);d.forEach(({radius:P,label:I,color:A,labelColor:E,border:F,hover:{color:B,labelColor:X,border:Z}},se)=>{const W=r*se+se*n+e;b(e,W,e,r,P,I,F,A,E),b(r+e*3,W,e,r,P,I,Z??F,B??A,X??E)});const _=d.length,f=e/(r*2),p=e/(r*6),x=1/_,M=new u1(m);return M.repeat.set(.5-2*f,x-2*p),M.offset.set(f,1-p),Object.assign(M,{colorSpace:Vt,wrapS:oi,wrapT:oi,userData:{offsetX:f,offsetY:p,cellHeight:x}}),M;function b(P,I,A,E,F,B,X,Z,se){if(F=F*(E/2),Z!=null&&Z!==""&&(W(),u.fillStyle=t.set(Z).getStyle(),u.fill()),X&&X.size){const he=X.size*E/2;P+=he,I+=he,E-=X.size*E,F=Math.max(0,F-he),W(),u.strokeStyle=t.set(X.color).getStyle(),u.lineWidth=X.size*E,u.stroke()}B&&L(u,P+E/2,I+(E+A)/2,B,t.set(se).getStyle());function W(){u.beginPath(),u.moveTo(P+F,I),u.lineTo(P+E-F,I),u.arcTo(P+E,I,P+E,I+F,F),u.lineTo(P+E,I+E-F),u.arcTo(P+E,I+E,P+E-F,I+E,F),u.lineTo(P+F,I+E),u.arcTo(P,I+E,P,I+E-F,F),u.lineTo(P,I+F),u.arcTo(P,I,P+F,I,F),u.closePath()}}function N(P,I,A){const E=[...P].sort((De,Ae)=>{var pe,re;return(((pe=De.label)==null?void 0:pe.length)||0)-(((re=Ae.label)==null?void 0:re.length)||0)}).pop().label,{family:F,weight:B}=A,X=i?Math.sqrt(Math.pow(I*.7,2)/2):I;let Z=X,se=0,W=0;do{u.font=`${B} ${Z}px ${F}`;const De=u.measureText(E);se=De.width,W=De.fontBoundingBoxDescent,Z--}while(se>X&&Z>0);const he=X/W,Q=Math.min(X/se,he),xe=Math.floor(Z*Q);return[`${B} ${xe}px ${F}`,he]}function L(P,I,A,E,F){P.font=h,P.textAlign="center",P.textBaseline="middle",P.fillStyle=F,P.fillText(E,I,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(L=>u[L]);let g,_,f,p,x,M,b,N;for(let L=0;L<4;L++){p=L<1||L>2?i:-i,x=L<2?r:-r,M=L<1||L>2?a:o,b=L<2?c:l;for(let P=0;P<=e;P++)g=Math.PI/2*(L+P/e),_=Math.cos(g),f=Math.sin(g),d.push(p+s*_,x+s*f,0),m.push(M+o*_,b+l*f),P<e&&(N=(e+1)*L+P+4,h.push(L,N,N+1))}return new rn().setIndex(new hn(new Uint32Array(h),1)).setAttribute("position",new hn(new Float32Array(d),3)).setAttribute("uv",new hn(new Float32Array(m),2))}const o4=(s,e)=>{const t=new z,{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],f={map:m,opacity:g,transparent:!0},p=n?new ec(new za(f)):new Pt(o,new Gi(f)),x=c?d:d[1];return p.position[x]=(c?1:-1)*(n?lu:1),n||p.lookAt(t.copy(p.position).multiplyScalar(1.7)),p.scale.setScalar(h),p.renderOrder=1,p.visible=u,p.userData={scale:h,opacity:g,hover:_},p})},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 z;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 f=t?new ec(new za(m)):new Pt(d,new Gi(m)),p=_*3;return f.position.set(u[p],u[p+1],u[p+2]),t&&f.position.normalize().multiplyScalar(1.7),f.scale.setScalar(o),f.lookAt(h.copy(f.position).multiplyScalar(2)),f.renderOrder=1,f.userData={color:i,opacity:r,scale:o,hover:c},f})},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(f=>f*.925),g=new z,_=new z(0,1,0);return Array(h.length/3).fill(0).map((f,p)=>{if(n){const b=e.clone();fc(b,t),u.map=b}else u.color=r;const x=n?new ec(new za(u)):new Pt(m,new Gi(u)),M=p*3;return x.position.set(h[M],h[M+1],h[M+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 rn;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=Jh(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=Jh(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 Jh(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 hn(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 Gi({color:i,side:Dn,opacity:r,transparent:!0,depthWrite:!1});if(!n)return null;if(t)a=new Pt(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 Pt(c,l)}return a.userData={color:i,opacity:r,hover:o},a},Zh=new Tn,aa=new z;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 Lt(e,3)),this.setAttribute("uv",new Lt(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 ci(n,3,0)),this.setAttribute("instanceEnd",new ci(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 ci(n,3,0)),this.setAttribute("instanceColorEnd",new ci(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 Tn);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 Ri),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)}}Ye.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new Je(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};Nn.line={uniforms:Ql.merge([Ye.common,Ye.fog,Ye.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 bn,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 Ti({vertexShader:C3,fragmentShader:R3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Nt(new wi(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class L3 extends hs{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,f=t.getContextAttributes();let p=null,x=null;const M=[],b=[],N=new Je;let L=null;const P=new _n;P.viewport=new Ot;const I=new _n;I.viewport=new Ot;const E=[P,I],A=new q1;let F=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(j){let K=M[j];return K===void 0&&(K=new po,M[j]=K),K.getTargetRaySpace()},this.getControllerGrip=function(j){let K=M[j];return K===void 0&&(K=new po,M[j]=K),K.getGripSpace()},this.getHand=function(j){let K=M[j];return K===void 0&&(K=new po,M[j]=K),K.getHandSpace()};function X(j){const K=b.indexOf(j.inputSource);if(K===-1)return;const te=M[K];te!==void 0&&(te.update(j.inputSource,j.frame,c||o),te.dispatchEvent({type:j.type,data:j.inputSource}))}function Z(){i.removeEventListener("select",X),i.removeEventListener("selectstart",X),i.removeEventListener("selectend",X),i.removeEventListener("squeeze",X),i.removeEventListener("squeezestart",X),i.removeEventListener("squeezeend",X),i.removeEventListener("end",Z),i.removeEventListener("inputsourceschange",se);for(let j=0;j<M.length;j++){const K=b[j];K!==null&&(b[j]=null,M[j].disconnect(K))}F=null,B=null,_.reset(),e.setRenderTarget(p),h=null,u=null,m=null,i=null,x=null,ae.stop(),n.isPresenting=!1,e.setPixelRatio(L),e.setSize(N.width,N.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(p=e.getRenderTarget(),i.addEventListener("select",X),i.addEventListener("selectstart",X),i.addEventListener("selectend",X),i.addEventListener("squeeze",X),i.addEventListener("squeezestart",X),i.addEventListener("squeezeend",X),i.addEventListener("end",Z),i.addEventListener("inputsourceschange",se),f.xrCompatible!==!0&&await t.makeXRCompatible(),L=e.getPixelRatio(),e.getSize(N),typeof XRWebGLBinding<"u"&&"createProjectionLayer"in XRWebGLBinding.prototype){let te=null,ee=null,pe=null;f.depth&&(pe=f.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,te=f.stencil?xr:yr,ee=f.stencil?vr:ls);const $={colorFormat:t.RGBA8,depthFormat:pe,scaleFactor:r};m=new XRWebGLBinding(i,t),u=m.createProjectionLayer($),i.updateRenderState({layers:[u]}),e.setPixelRatio(1),e.setSize(u.textureWidth,u.textureHeight,!1),x=new cs(u.textureWidth,u.textureHeight,{format:$n,type:hi,depthTexture:new H0(u.textureWidth,u.textureHeight,ee,void 0,void 0,void 0,void 0,void 0,void 0,te),stencilBuffer:f.stencil,colorSpace:e.outputColorSpace,samples:f.antialias?4:0,resolveDepthBuffer:u.ignoreDepthValues===!1,resolveStencilBuffer:u.ignoreDepthValues===!1})}else{const te={antialias:f.antialias,alpha:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,t,te),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),x=new cs(h.framebufferWidth,h.framebufferHeight,{format:$n,type:hi,colorSpace:e.outputColorSpace,stencilBuffer:f.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 K=0;K<j.removed.length;K++){const te=j.removed[K],ee=b.indexOf(te);ee>=0&&(b[ee]=null,M[ee].disconnect(te))}for(let K=0;K<j.added.length;K++){const te=j.added[K];let ee=b.indexOf(te);if(ee===-1){for(let $=0;$<M.length;$++)if($>=b.length){b.push(te),ee=$;break}else if(b[$]===null){b[$]=te,ee=$;break}if(ee===-1)break}const pe=M[ee];pe&&pe.connect(te)}}const G=new z,de=new z;function Q(j,K,te){G.setFromMatrixPosition(K.matrixWorld),de.setFromMatrixPosition(te.matrixWorld);const ee=G.distanceTo(de),pe=K.projectionMatrix.elements,$=te.projectionMatrix.elements,ge=pe[14]/(pe[10]-1),Ae=pe[14]/(pe[10]+1),et=(pe[9]+1)/pe[5],je=(pe[9]-1)/pe[5],O=(pe[8]-1)/pe[0],pt=($[8]+1)/$[0],st=ge*O,it=ge*pt,ke=ee/(-O+pt),Ze=ke*-O;if(K.matrixWorld.decompose(j.position,j.quaternion,j.scale),j.translateX(Ze),j.translateZ(ke),j.matrixWorld.compose(j.position,j.quaternion,j.scale),j.matrixWorldInverse.copy(j.matrixWorld).invert(),pe[10]===-1)j.projectionMatrix.copy(K.projectionMatrix),j.projectionMatrixInverse.copy(K.projectionMatrixInverse);else{const Fe=ge+ke,rt=Ae+ke,Xt=st-Ze,k=it+(ee-Ze),R=et*Ae/rt*Fe,le=je*Ae/rt*Fe;j.projectionMatrix.makePerspective(Xt,k,R,le,Fe,rt),j.projectionMatrixInverse.copy(j.projectionMatrix).invert()}}function xe(j,K){K===null?j.matrixWorld.copy(j.matrix):j.matrixWorld.multiplyMatrices(K.matrixWorld,j.matrix),j.matrixWorldInverse.copy(j.matrixWorld).invert()}this.updateCamera=function(j){if(i===null)return;let K=j.near,te=j.far;_.texture!==null&&(_.depthNear>0&&(K=_.depthNear),_.depthFar>0&&(te=_.depthFar)),A.near=I.near=P.near=K,A.far=I.far=P.far=te,(F!==A.near||B!==A.far)&&(i.updateRenderState({depthNear:A.near,depthFar:A.far}),F=A.near,B=A.far),P.layers.mask=j.layers.mask|2,I.layers.mask=j.layers.mask|4,A.layers.mask=P.layers.mask|I.layers.mask;const ee=j.parent,pe=A.cameras;xe(A,ee);for(let $=0;$<pe.length;$++)xe(pe[$],ee);pe.length===2?Q(A,P,I):A.projectionMatrix.copy(P.projectionMatrix),Pe(j,A,ee)};function Pe(j,K,te){te===null?j.matrix.copy(K.matrixWorld):(j.matrix.copy(te.matrixWorld),j.matrix.invert(),j.matrix.multiply(K.matrixWorld)),j.matrix.decompose(j.position,j.quaternion,j.scale),j.updateMatrixWorld(!0),j.projectionMatrix.copy(K.projectionMatrix),j.projectionMatrixInverse.copy(K.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 Te=null;function me(j,K){if(d=K.getViewerPose(c||o),g=K,d!==null){const te=d.views;h!==null&&(e.setRenderTargetFramebuffer(x,h.framebuffer),e.setRenderTarget(x));let ee=!1;te.length!==A.cameras.length&&(A.cameras.length=0,ee=!0);for(let ge=0;ge<te.length;ge++){const Ae=te[ge];let et=null;if(h!==null)et=h.getViewport(Ae);else{const O=m.getViewSubImage(u,Ae);et=O.viewport,ge===0&&(e.setRenderTargetTextures(x,O.colorTexture,O.depthStencilTexture),e.setRenderTarget(x))}let je=E[ge];je===void 0&&(je=new _n,je.layers.enable(ge),je.viewport=new Ot,E[ge]=je),je.matrix.fromArray(Ae.transform.matrix),je.matrix.decompose(je.position,je.quaternion,je.scale),je.projectionMatrix.fromArray(Ae.projectionMatrix),je.projectionMatrixInverse.copy(je.projectionMatrix).invert(),je.viewport.set(et.x,et.y,et.width,et.height),ge===0&&(A.matrix.copy(je.matrix),A.matrix.decompose(A.position,A.quaternion,A.scale)),ee===!0&&A.cameras.push(je)}const pe=i.enabledFeatures;if(pe&&pe.includes("depth-sensing")&&i.depthUsage=="gpu-optimized"&&m){const ge=m.getDepthInformation(te[0]);ge&&ge.isValid&&ge.texture&&_.init(e,ge,i.renderState)}}for(let te=0;te<M.length;te++){const ee=b[te],pe=M[te];ee!==null&&pe!==void 0&&pe.update(ee,K,c||o)}Te&&Te(j,K),K.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:K}),g=null}const ae=new Z0;ae.setAnimationLoop(me),this.setAnimationLoop=function(j){Te=j},this.dispose=function(){}}}const Qi=new vn,P3=new St;function F3(s,e){function t(f,p){f.matrixAutoUpdate===!0&&f.updateMatrix(),p.value.copy(f.matrix)}function n(f,p){p.color.getRGB(f.fogColor.value,N0(s)),p.isFog?(f.fogNear.value=p.near,f.fogFar.value=p.far):p.isFogExp2&&(f.fogDensity.value=p.density)}function i(f,p,x,M,b){p.isMeshBasicMaterial||p.isMeshLambertMaterial?r(f,p):p.isMeshToonMaterial?(r(f,p),m(f,p)):p.isMeshPhongMaterial?(r(f,p),d(f,p)):p.isMeshStandardMaterial?(r(f,p),u(f,p),p.isMeshPhysicalMaterial&&h(f,p,b)):p.isMeshMatcapMaterial?(r(f,p),g(f,p)):p.isMeshDepthMaterial?r(f,p):p.isMeshDistanceMaterial?(r(f,p),_(f,p)):p.isMeshNormalMaterial?r(f,p):p.isLineBasicMaterial?(o(f,p),p.isLineDashedMaterial&&a(f,p)):p.isPointsMaterial?l(f,p,x,M):p.isSpriteMaterial?c(f,p):p.isShadowMaterial?(f.color.value.copy(p.color),f.opacity.value=p.opacity):p.isShaderMaterial&&(p.uniformsNeedUpdate=!1)}function r(f,p){f.opacity.value=p.opacity,p.color&&f.diffuse.value.copy(p.color),p.emissive&&f.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity),p.map&&(f.map.value=p.map,t(p.map,f.mapTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.bumpMap&&(f.bumpMap.value=p.bumpMap,t(p.bumpMap,f.bumpMapTransform),f.bumpScale.value=p.bumpScale,p.side===Dn&&(f.bumpScale.value*=-1)),p.normalMap&&(f.normalMap.value=p.normalMap,t(p.normalMap,f.normalMapTransform),f.normalScale.value.copy(p.normalScale),p.side===Dn&&f.normalScale.value.negate()),p.displacementMap&&(f.displacementMap.value=p.displacementMap,t(p.displacementMap,f.displacementMapTransform),f.displacementScale.value=p.displacementScale,f.displacementBias.value=p.displacementBias),p.emissiveMap&&(f.emissiveMap.value=p.emissiveMap,t(p.emissiveMap,f.emissiveMapTransform)),p.specularMap&&(f.specularMap.value=p.specularMap,t(p.specularMap,f.specularMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest);const x=e.get(p),M=x.envMap,b=x.envMapRotation;M&&(f.envMap.value=M,Qi.copy(b),Qi.x*=-1,Qi.y*=-1,Qi.z*=-1,M.isCubeTexture&&M.isRenderTargetTexture===!1&&(Qi.y*=-1,Qi.z*=-1),f.envMapRotation.value.setFromMatrix4(P3.makeRotationFromEuler(Qi)),f.flipEnvMap.value=M.isCubeTexture&&M.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=p.reflectivity,f.ior.value=p.ior,f.refractionRatio.value=p.refractionRatio),p.lightMap&&(f.lightMap.value=p.lightMap,f.lightMapIntensity.value=p.lightMapIntensity,t(p.lightMap,f.lightMapTransform)),p.aoMap&&(f.aoMap.value=p.aoMap,f.aoMapIntensity.value=p.aoMapIntensity,t(p.aoMap,f.aoMapTransform))}function o(f,p){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,p.map&&(f.map.value=p.map,t(p.map,f.mapTransform))}function a(f,p){f.dashSize.value=p.dashSize,f.totalSize.value=p.dashSize+p.gapSize,f.scale.value=p.scale}function l(f,p,x,M){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,f.size.value=p.size*x,f.scale.value=M*.5,p.map&&(f.map.value=p.map,t(p.map,f.uvTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest)}function c(f,p){f.diffuse.value.copy(p.color),f.opacity.value=p.opacity,f.rotation.value=p.rotation,p.map&&(f.map.value=p.map,t(p.map,f.mapTransform)),p.alphaMap&&(f.alphaMap.value=p.alphaMap,t(p.alphaMap,f.alphaMapTransform)),p.alphaTest>0&&(f.alphaTest.value=p.alphaTest)}function d(f,p){f.specular.value.copy(p.specular),f.shininess.value=Math.max(p.shininess,1e-4)}function m(f,p){p.gradientMap&&(f.gradientMap.value=p.gradientMap)}function u(f,p){f.metalness.value=p.metalness,p.metalnessMap&&(f.metalnessMap.value=p.metalnessMap,t(p.metalnessMap,f.metalnessMapTransform)),f.roughness.value=p.roughness,p.roughnessMap&&(f.roughnessMap.value=p.roughnessMap,t(p.roughnessMap,f.roughnessMapTransform)),p.envMap&&(f.envMapIntensity.value=p.envMapIntensity)}function h(f,p,x){f.ior.value=p.ior,p.sheen>0&&(f.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),f.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(f.sheenColorMap.value=p.sheenColorMap,t(p.sheenColorMap,f.sheenColorMapTransform)),p.sheenRoughnessMap&&(f.sheenRoughnessMap.value=p.sheenRoughnessMap,t(p.sheenRoughnessMap,f.sheenRoughnessMapTransform))),p.clearcoat>0&&(f.clearcoat.value=p.clearcoat,f.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(f.clearcoatMap.value=p.clearcoatMap,t(p.clearcoatMap,f.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,t(p.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(f.clearcoatNormalMap.value=p.clearcoatNormalMap,t(p.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===Dn&&f.clearcoatNormalScale.value.negate())),p.dispersion>0&&(f.dispersion.value=p.dispersion),p.iridescence>0&&(f.iridescence.value=p.iridescence,f.iridescenceIOR.value=p.iridescenceIOR,f.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(f.iridescenceMap.value=p.iridescenceMap,t(p.iridescenceMap,f.iridescenceMapTransform)),p.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=p.iridescenceThicknessMap,t(p.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),p.transmission>0&&(f.transmission.value=p.transmission,f.transmissionSamplerMap.value=x.texture,f.transmissionSamplerSize.value.set(x.width,x.height),p.transmissionMap&&(f.transmissionMap.value=p.transmissionMap,t(p.transmissionMap,f.transmissionMapTransform)),f.thickness.value=p.thickness,p.thicknessMap&&(f.thicknessMap.value=p.thicknessMap,t(p.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=p.attenuationDistance,f.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(f.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(f.anisotropyMap.value=p.anisotropyMap,t(p.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=p.specularIntensity,f.specularColor.value.copy(p.specularColor),p.specularColorMap&&(f.specularColorMap.value=p.specularColorMap,t(p.specularColorMap,f.specularColorMapTransform)),p.specularIntensityMap&&(f.specularIntensityMap.value=p.specularIntensityMap,t(p.specularIntensityMap,f.specularIntensityMapTransform))}function g(f,p){p.matcap&&(f.matcap.value=p.matcap)}function _(f,p){const x=e.get(p).light;f.referencePosition.value.setFromMatrixPosition(x.matrixWorld),f.nearDistance.value=x.shadow.camera.near,f.farDistance.value=x.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(x,M){const b=M.program;n.uniformBlockBinding(x,b)}function c(x,M){let b=i[x.id];b===void 0&&(g(x),b=d(x),i[x.id]=b,x.addEventListener("dispose",f));const N=M.program;n.updateUBOMapping(x,N);const L=e.render.frame;r[x.id]!==L&&(u(x),r[x.id]=L)}function d(x){const M=m();x.__bindingPointIndex=M;const b=s.createBuffer(),N=x.__size,L=x.usage;return s.bindBuffer(s.UNIFORM_BUFFER,b),s.bufferData(s.UNIFORM_BUFFER,N,L),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,M,b),b}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 M=i[x.id],b=x.uniforms,N=x.__cache;s.bindBuffer(s.UNIFORM_BUFFER,M);for(let L=0,P=b.length;L<P;L++){const I=Array.isArray(b[L])?b[L]:[b[L]];for(let E=0,A=I.length;E<A;E++){const F=I[E];if(h(F,L,E,N)===!0){const B=F.__offset,X=Array.isArray(F.value)?F.value:[F.value];let Z=0;for(let se=0;se<X.length;se++){const G=X[se],de=_(G);typeof G=="number"||typeof G=="boolean"?(F.__data[0]=G,s.bufferSubData(s.UNIFORM_BUFFER,B+Z,F.__data)):G.isMatrix3?(F.__data[0]=G.elements[0],F.__data[1]=G.elements[1],F.__data[2]=G.elements[2],F.__data[3]=0,F.__data[4]=G.elements[3],F.__data[5]=G.elements[4],F.__data[6]=G.elements[5],F.__data[7]=0,F.__data[8]=G.elements[6],F.__data[9]=G.elements[7],F.__data[10]=G.elements[8],F.__data[11]=0):(G.toArray(F.__data,Z),Z+=de.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,B,F.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function h(x,M,b,N){const L=x.value,P=M+"_"+b;if(N[P]===void 0)return typeof L=="number"||typeof L=="boolean"?N[P]=L:N[P]=L.clone(),!0;{const I=N[P];if(typeof L=="number"||typeof L=="boolean"){if(I!==L)return N[P]=L,!0}else if(I.equals(L)===!1)return I.copy(L),!0}return!1}function g(x){const M=x.uniforms;let b=0;const N=16;for(let P=0,I=M.length;P<I;P++){const E=Array.isArray(M[P])?M[P]:[M[P]];for(let A=0,F=E.length;A<F;A++){const B=E[A],X=Array.isArray(B.value)?B.value:[B.value];for(let Z=0,se=X.length;Z<se;Z++){const G=X[Z],de=_(G),Q=b%N,xe=Q%de.boundary,Pe=Q+xe;b+=xe,Pe!==0&&N-Pe<de.storage&&(b+=N-Pe),B.__data=new Float32Array(de.storage/Float32Array.BYTES_PER_ELEMENT),B.__offset=b,b+=de.storage}}}const L=b%N;return L>0&&(b+=N-L),x.__size=b,x.__cache={},this}function _(x){const M={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(M.boundary=4,M.storage=4):x.isVector2?(M.boundary=8,M.storage=8):x.isVector3||x.isColor?(M.boundary=16,M.storage=12):x.isVector4?(M.boundary=16,M.storage=16):x.isMatrix3?(M.boundary=48,M.storage=48):x.isMatrix4?(M.boundary=64,M.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),M}function f(x){const M=x.target;M.removeEventListener("dispose",f);const b=o.indexOf(M.__bindingPointIndex);o.splice(b,1),s.deleteBuffer(i[M.id]),delete i[M.id],delete r[M.id]}function p(){for(const x in i)s.deleteBuffer(i[x]);o=[],i={},r={}}return{bind:l,update:c,dispose:p}}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 f=null,p=null;const x=[],M=[];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=Vi,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const b=this;let N=!1;this._outputColorSpace=Vt;let L=0,P=0,I=null,E=-1,A=null;const F=new Ot,B=new Ot;let X=null;const Z=new At(0);let se=0,G=t.width,de=t.height,Q=1,xe=null,Pe=null;const Te=new Ot(0,0,G,de),me=new Ot(0,0,G,de);let ae=!1;const j=new nc;let K=!1,te=!1;const ee=new St,pe=new St,$=new z,ge=new Ot,Ae={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let et=!1;function je(){return I===null?Q:1}let O=n;function pt(T,C){return t.getContext(T,C)}try{const T={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",Ge,!1),t.addEventListener("webglcontextcreationerror",De,!1),O===null){const C="webgl2";if(O=pt(C,T),O===null)throw pt(C)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(T){throw console.error("THREE.WebGLRenderer: "+T.message),T}let st,it,ke,Ze,Fe,rt,Xt,k,R,le,Ce,Ue,be,yt,Ke,mt,xt,ze,ot,Tt,Et,$e,Ct,J;function tt(){st=new Xp(O),st.init(),$e=new T3(O,st),it=new Bp(O,st,e,$e),ke=new E3(O,st),it.reverseDepthBuffer&&u&&ke.buffers.depth.setReversed(!0),Ze=new $p(O),Fe=new d3,rt=new w3(O,st,ke,Fe,it,$e,Ze),Xt=new kp(b),k=new Wp(b),R=new Q1(O),Ct=new Ip(O,R),le=new jp(O,R,Ze,Ct),Ce=new Kp(O,le,R,Ze),ot=new Yp(O,it,rt),mt=new Op(Fe),Ue=new u3(b,Xt,k,st,it,Ct,mt),be=new F3(b,Fe),yt=new p3,Ke=new x3(st),ze=new Up(b,Xt,k,ke,Ce,h,l),xt=new S3(b,Ce,it),J=new N3(O,Ze,it,ke),Tt=new zp(O,st,Ze),Et=new qp(O,st,Ze),Ze.programs=Ue.programs,b.capabilities=it,b.extensions=st,b.properties=Fe,b.renderLists=yt,b.shadowMap=xt,b.state=ke,b.info=Ze}tt();const Be=new L3(b,O);this.xr=Be,this.getContext=function(){return O},this.getContextAttributes=function(){return O.getContextAttributes()},this.forceContextLoss=function(){const T=st.get("WEBGL_lose_context");T&&T.loseContext()},this.forceContextRestore=function(){const T=st.get("WEBGL_lose_context");T&&T.restoreContext()},this.getPixelRatio=function(){return Q},this.setPixelRatio=function(T){T!==void 0&&(Q=T,this.setSize(G,de,!1))},this.getSize=function(T){return T.set(G,de)},this.setSize=function(T,C,W=!0){if(Be.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}G=T,de=C,t.width=Math.floor(T*Q),t.height=Math.floor(C*Q),W===!0&&(t.style.width=T+"px",t.style.height=C+"px"),this.setViewport(0,0,T,C)},this.getDrawingBufferSize=function(T){return T.set(G*Q,de*Q).floor()},this.setDrawingBufferSize=function(T,C,W){G=T,de=C,Q=W,t.width=Math.floor(T*W),t.height=Math.floor(C*W),this.setViewport(0,0,T,C)},this.getCurrentViewport=function(T){return T.copy(F)},this.getViewport=function(T){return T.copy(Te)},this.setViewport=function(T,C,W,Y){T.isVector4?Te.set(T.x,T.y,T.z,T.w):Te.set(T,C,W,Y),ke.viewport(F.copy(Te).multiplyScalar(Q).round())},this.getScissor=function(T){return T.copy(me)},this.setScissor=function(T,C,W,Y){T.isVector4?me.set(T.x,T.y,T.z,T.w):me.set(T,C,W,Y),ke.scissor(B.copy(me).multiplyScalar(Q).round())},this.getScissorTest=function(){return ae},this.setScissorTest=function(T){ke.setScissorTest(ae=T)},this.setOpaqueSort=function(T){xe=T},this.setTransparentSort=function(T){Pe=T},this.getClearColor=function(T){return T.copy(ze.getClearColor())},this.setClearColor=function(){ze.setClearColor(...arguments)},this.getClearAlpha=function(){return ze.getClearAlpha()},this.setClearAlpha=function(){ze.setClearAlpha(...arguments)},this.clear=function(T=!0,C=!0,W=!0){let Y=0;if(T){let V=!1;if(I!==null){const ve=I.texture.format;V=ve===Yl||ve===$l||ve===ql}if(V){const ve=I.texture.type,we=ve===hi||ve===ls||ve===_r||ve===vr||ve===Xl||ve===jl,_e=ze.getClearColor(),oe=ze.getClearAlpha(),ne=_e.r,Le=_e.g,ue=_e.b;we?(g[0]=ne,g[1]=Le,g[2]=ue,g[3]=oe,O.clearBufferuiv(O.COLOR,0,g)):(_[0]=ne,_[1]=Le,_[2]=ue,_[3]=oe,O.clearBufferiv(O.COLOR,0,_))}else Y|=O.COLOR_BUFFER_BIT}C&&(Y|=O.DEPTH_BUFFER_BIT),W&&(Y|=O.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),O.clear(Y)},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",Ge,!1),t.removeEventListener("webglcontextcreationerror",De,!1),ze.dispose(),yt.dispose(),Ke.dispose(),Fe.dispose(),Xt.dispose(),k.dispose(),Ce.dispose(),Ct.dispose(),J.dispose(),Ue.dispose(),Be.dispose(),Be.removeEventListener("sessionstart",us),Be.removeEventListener("sessionend",ds),zn.stop()};function ut(T){T.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),N=!0}function Ge(){console.log("THREE.WebGLRenderer: Context Restored."),N=!1;const T=Ze.autoReset,C=xt.enabled,W=xt.autoUpdate,Y=xt.needsUpdate,V=xt.type;tt(),Ze.autoReset=T,xt.enabled=C,xt.autoUpdate=W,xt.needsUpdate=Y,xt.type=V}function De(T){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",T.statusMessage)}function lt(T){const C=T.target;C.removeEventListener("dispose",lt),Rt(C)}function Rt(T){$t(T),Fe.remove(T)}function $t(T){const C=Fe.get(T).programs;C!==void 0&&(C.forEach(function(W){Ue.releaseProgram(W)}),T.isShaderMaterial&&Ue.releaseShaderCache(T))}this.renderBufferDirect=function(T,C,W,Y,V,ve){C===null&&(C=Ae);const we=V.isMesh&&V.matrixWorld.determinant()<0,_e=he(T,C,W,Y,V);ke.setMaterial(Y,we);let oe=W.index,ne=1;if(Y.wireframe===!0){if(oe=le.getWireframeAttribute(W),oe===void 0)return;ne=2}const Le=W.drawRange,ue=W.attributes.position;let Ie=Le.start*ne,re=(Le.start+Le.count)*ne;ve!==null&&(Ie=Math.max(Ie,ve.start*ne),re=Math.min(re,(ve.start+ve.count)*ne)),oe!==null?(Ie=Math.max(Ie,0),re=Math.min(re,oe.count)):ue!=null&&(Ie=Math.max(Ie,0),re=Math.min(re,ue.count));const ct=re-Ie;if(ct<0||ct===1/0)return;Ct.setup(V,Y,_e,W,oe);let Re,Xe=Tt;if(oe!==null&&(Re=R.get(oe),Xe=Et,Xe.setIndex(Re)),V.isMesh)Y.wireframe===!0?(ke.setLineWidth(Y.wireframeLinewidth*je()),Xe.setMode(O.LINES)):Xe.setMode(O.TRIANGLES);else if(V.isLine){let We=Y.linewidth;We===void 0&&(We=1),ke.setLineWidth(We*je()),V.isLineSegments?Xe.setMode(O.LINES):V.isLineLoop?Xe.setMode(O.LINE_LOOP):Xe.setMode(O.LINE_STRIP)}else V.isPoints?Xe.setMode(O.POINTS):V.isSprite&&Xe.setMode(O.TRIANGLES);if(V.isBatchedMesh)if(V._multiDrawInstances!==null)Os("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Xe.renderMultiDrawInstances(V._multiDrawStarts,V._multiDrawCounts,V._multiDrawCount,V._multiDrawInstances);else if(st.get("WEBGL_multi_draw"))Xe.renderMultiDraw(V._multiDrawStarts,V._multiDrawCounts,V._multiDrawCount);else{const We=V._multiDrawStarts,ht=V._multiDrawCounts,at=V._multiDrawCount,wt=oe?R.get(oe).bytesPerElement:1,Mt=Fe.get(Y).currentProgram.getUniforms();for(let Pt=0;Pt<at;Pt++)Mt.setValue(O,"_gl_DrawID",Pt),Xe.render(We[Pt]/wt,ht[Pt])}else if(V.isInstancedMesh)Xe.renderInstances(Ie,ct,V.count);else if(W.isInstancedBufferGeometry){const We=W._maxInstanceCount!==void 0?W._maxInstanceCount:1/0,ht=Math.min(W.instanceCount,We);Xe.renderInstances(Ie,ct,ht)}else Xe.render(Ie,ct)};function Dt(T,C,W){T.transparent===!0&&T.side===hn&&T.forceSinglePass===!1?(T.side=Dn,T.needsUpdate=!0,q(T,C,W),T.side=Yn,T.needsUpdate=!0,q(T,C,W),T.side=hn):q(T,C,W)}this.compile=function(T,C,W=null){W===null&&(W=T),p=Ke.get(W),p.init(C),M.push(p),W.traverseVisible(function(V){V.isLight&&V.layers.test(C.layers)&&(p.pushLight(V),V.castShadow&&p.pushShadow(V))}),T!==W&&T.traverseVisible(function(V){V.isLight&&V.layers.test(C.layers)&&(p.pushLight(V),V.castShadow&&p.pushShadow(V))}),p.setupLights();const Y=new Set;return T.traverse(function(V){if(!(V.isMesh||V.isPoints||V.isLine||V.isSprite))return;const ve=V.material;if(ve)if(Array.isArray(ve))for(let we=0;we<ve.length;we++){const _e=ve[we];Dt(_e,W,V),Y.add(_e)}else Dt(ve,W,V),Y.add(ve)}),p=M.pop(),Y},this.compileAsync=function(T,C,W=null){const Y=this.compile(T,C,W);return new Promise(V=>{function ve(){if(Y.forEach(function(we){Fe.get(we).currentProgram.isReady()&&Y.delete(we)}),Y.size===0){V(T);return}setTimeout(ve,10)}st.get("KHR_parallel_shader_compile")!==null?ve():setTimeout(ve,10)})};let Sn=null;function In(T){Sn&&Sn(T)}function us(){zn.stop()}function ds(){zn.start()}const zn=new Z0;zn.setAnimationLoop(In),typeof self<"u"&&zn.setContext(self),this.setAnimationLoop=function(T){Sn=T,Be.setAnimationLoop(T),T===null?zn.stop():zn.start()},Be.addEventListener("sessionstart",us),Be.addEventListener("sessionend",ds),this.render=function(T,C){if(C!==void 0&&C.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(N===!0)return;if(T.matrixWorldAutoUpdate===!0&&T.updateMatrixWorld(),C.parent===null&&C.matrixWorldAutoUpdate===!0&&C.updateMatrixWorld(),Be.enabled===!0&&Be.isPresenting===!0&&(Be.cameraAutoUpdate===!0&&Be.updateCamera(C),C=Be.getCamera()),T.isScene===!0&&T.onBeforeRender(b,T,C,I),p=Ke.get(T,M.length),p.init(C),M.push(p),pe.multiplyMatrices(C.projectionMatrix,C.matrixWorldInverse),j.setFromProjectionMatrix(pe),te=this.localClippingEnabled,K=mt.init(this.clippingPlanes,te),f=yt.get(T,x.length),f.init(),x.push(f),Be.enabled===!0&&Be.isPresenting===!0){const ve=b.xr.getDepthSensingMesh();ve!==null&&Xi(ve,C,-1/0,b.sortObjects)}Xi(T,C,0,b.sortObjects),f.finish(),b.sortObjects===!0&&f.sort(xe,Pe),et=Be.enabled===!1||Be.isPresenting===!1||Be.hasDepthSensing()===!1,et&&ze.addToRenderList(f,T),this.info.render.frame++,K===!0&&mt.beginShadows();const W=p.state.shadowsArray;xt.render(W,T,C),K===!0&&mt.endShadows(),this.info.autoReset===!0&&this.info.reset();const Y=f.opaque,V=f.transmissive;if(p.setupLights(),C.isArrayCamera){const ve=C.cameras;if(V.length>0)for(let we=0,_e=ve.length;we<_e;we++){const oe=ve[we];ji(Y,V,T,oe)}et&&ze.render(T);for(let we=0,_e=ve.length;we<_e;we++){const oe=ve[we];fs(f,T,oe,oe.viewport)}}else V.length>0&&ji(Y,V,T,C),et&&ze.render(T),fs(f,T,C);I!==null&&P===0&&(rt.updateMultisampleRenderTarget(I),rt.updateRenderTargetMipmap(I)),T.isScene===!0&&T.onAfterRender(b,T,C),Ct.resetDefaultState(),E=-1,A=null,M.pop(),M.length>0?(p=M[M.length-1],K===!0&&mt.setGlobalState(b.clippingPlanes,p.state.camera)):p=null,x.pop(),x.length>0?f=x[x.length-1]:f=null};function Xi(T,C,W,Y){if(T.visible===!1)return;if(T.layers.test(C.layers)){if(T.isGroup)W=T.renderOrder;else if(T.isLOD)T.autoUpdate===!0&&T.update(C);else if(T.isLight)p.pushLight(T),T.castShadow&&p.pushShadow(T);else if(T.isSprite){if(!T.frustumCulled||j.intersectsSprite(T)){Y&&ge.setFromMatrixPosition(T.matrixWorld).applyMatrix4(pe);const we=Ce.update(T),_e=T.material;_e.visible&&f.push(T,we,_e,W,ge.z,null)}}else if((T.isMesh||T.isLine||T.isPoints)&&(!T.frustumCulled||j.intersectsObject(T))){const we=Ce.update(T),_e=T.material;if(Y&&(T.boundingSphere!==void 0?(T.boundingSphere===null&&T.computeBoundingSphere(),ge.copy(T.boundingSphere.center)):(we.boundingSphere===null&&we.computeBoundingSphere(),ge.copy(we.boundingSphere.center)),ge.applyMatrix4(T.matrixWorld).applyMatrix4(pe)),Array.isArray(_e)){const oe=we.groups;for(let ne=0,Le=oe.length;ne<Le;ne++){const ue=oe[ne],Ie=_e[ue.materialIndex];Ie&&Ie.visible&&f.push(T,we,Ie,W,ge.z,ue)}}else _e.visible&&f.push(T,we,_e,W,ge.z,null)}}const ve=T.children;for(let we=0,_e=ve.length;we<_e;we++)Xi(ve[we],C,W,Y)}function fs(T,C,W,Y){const V=T.opaque,ve=T.transmissive,we=T.transparent;p.setupLightsView(W),K===!0&&mt.setGlobalState(b.clippingPlanes,W),Y&&ke.viewport(F.copy(Y)),V.length>0&&ui(V,C,W),ve.length>0&&ui(ve,C,W),we.length>0&&ui(we,C,W),ke.buffers.depth.setTest(!0),ke.buffers.depth.setMask(!0),ke.buffers.color.setMask(!0),ke.setPolygonOffset(!1)}function ji(T,C,W,Y){if((W.isScene===!0?W.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[Y.id]===void 0&&(p.state.transmissionRenderTarget[Y.id]=new cs(1,1,{generateMipmaps:!0,type:st.has("EXT_color_buffer_half_float")||st.has("EXT_color_buffer_float")?Sr:hi,minFilter:Mi,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Bt.workingColorSpace}));const ve=p.state.transmissionRenderTarget[Y.id],we=Y.viewport||F;ve.setSize(we.z*b.transmissionResolutionScale,we.w*b.transmissionResolutionScale);const _e=b.getRenderTarget();b.setRenderTarget(ve),b.getClearColor(Z),se=b.getClearAlpha(),se<1&&b.setClearColor(16777215,.5),b.clear(),et&&ze.render(W);const oe=b.toneMapping;b.toneMapping=Vi;const ne=Y.viewport;if(Y.viewport!==void 0&&(Y.viewport=void 0),p.setupLightsView(Y),K===!0&&mt.setGlobalState(b.clippingPlanes,Y),ui(T,W,Y),rt.updateMultisampleRenderTarget(ve),rt.updateRenderTargetMipmap(ve),st.has("WEBGL_multisampled_render_to_texture")===!1){let Le=!1;for(let ue=0,Ie=C.length;ue<Ie;ue++){const re=C[ue],ct=re.object,Re=re.geometry,Xe=re.material,We=re.group;if(Xe.side===hn&&ct.layers.test(Y.layers)){const ht=Xe.side;Xe.side=Dn,Xe.needsUpdate=!0,qi(ct,W,Y,Re,Xe,We),Xe.side=ht,Xe.needsUpdate=!0,Le=!0}}Le===!0&&(rt.updateMultisampleRenderTarget(ve),rt.updateRenderTargetMipmap(ve))}b.setRenderTarget(_e),b.setClearColor(Z,se),ne!==void 0&&(Y.viewport=ne),b.toneMapping=oe}function ui(T,C,W){const Y=C.isScene===!0?C.overrideMaterial:null;for(let V=0,ve=T.length;V<ve;V++){const we=T[V],_e=we.object,oe=we.geometry,ne=we.group;let Le=we.material;Le.allowOverride===!0&&Y!==null&&(Le=Y),_e.layers.test(W.layers)&&qi(_e,C,W,oe,Le,ne)}}function qi(T,C,W,Y,V,ve){T.onBeforeRender(b,C,W,Y,V,ve),T.modelViewMatrix.multiplyMatrices(W.matrixWorldInverse,T.matrixWorld),T.normalMatrix.getNormalMatrix(T.modelViewMatrix),V.onBeforeRender(b,C,W,Y,T,ve),V.transparent===!0&&V.side===hn&&V.forceSinglePass===!1?(V.side=Dn,V.needsUpdate=!0,b.renderBufferDirect(W,C,Y,V,T,ve),V.side=Yn,V.needsUpdate=!0,b.renderBufferDirect(W,C,Y,V,T,ve),V.side=hn):b.renderBufferDirect(W,C,Y,V,T,ve),T.onAfterRender(b,C,W,Y,V,ve)}function q(T,C,W){C.isScene!==!0&&(C=Ae);const Y=Fe.get(T),V=p.state.lights,ve=p.state.shadowsArray,we=V.state.version,_e=Ue.getParameters(T,V.state,ve,C,W),oe=Ue.getProgramCacheKey(_e);let ne=Y.programs;Y.environment=T.isMeshStandardMaterial?C.environment:null,Y.fog=C.fog,Y.envMap=(T.isMeshStandardMaterial?k:Xt).get(T.envMap||Y.environment),Y.envMapRotation=Y.environment!==null&&T.envMap===null?C.environmentRotation:T.envMapRotation,ne===void 0&&(T.addEventListener("dispose",lt),ne=new Map,Y.programs=ne);let Le=ne.get(oe);if(Le!==void 0){if(Y.currentProgram===Le&&Y.lightsStateVersion===we)return ce(T,_e),Le}else _e.uniforms=Ue.getUniforms(T),T.onBeforeCompile(_e,b),Le=Ue.acquireProgram(_e,oe),ne.set(oe,Le),Y.uniforms=_e.uniforms;const ue=Y.uniforms;return(!T.isShaderMaterial&&!T.isRawShaderMaterial||T.clipping===!0)&&(ue.clippingPlanes=mt.uniform),ce(T,_e),Y.needsLights=fe(T),Y.lightsStateVersion=we,Y.needsLights&&(ue.ambientLightColor.value=V.state.ambient,ue.lightProbe.value=V.state.probe,ue.directionalLights.value=V.state.directional,ue.directionalLightShadows.value=V.state.directionalShadow,ue.spotLights.value=V.state.spot,ue.spotLightShadows.value=V.state.spotShadow,ue.rectAreaLights.value=V.state.rectArea,ue.ltc_1.value=V.state.rectAreaLTC1,ue.ltc_2.value=V.state.rectAreaLTC2,ue.pointLights.value=V.state.point,ue.pointLightShadows.value=V.state.pointShadow,ue.hemisphereLights.value=V.state.hemi,ue.directionalShadowMap.value=V.state.directionalShadowMap,ue.directionalShadowMatrix.value=V.state.directionalShadowMatrix,ue.spotShadowMap.value=V.state.spotShadowMap,ue.spotLightMatrix.value=V.state.spotLightMatrix,ue.spotLightMap.value=V.state.spotLightMap,ue.pointShadowMap.value=V.state.pointShadowMap,ue.pointShadowMatrix.value=V.state.pointShadowMatrix),Y.currentProgram=Le,Y.uniformsList=null,Le}function H(T){if(T.uniformsList===null){const C=T.currentProgram.getUniforms();T.uniformsList=Ma.seqWithValue(C.seq,T.uniforms)}return T.uniformsList}function ce(T,C){const W=Fe.get(T);W.outputColorSpace=C.outputColorSpace,W.batching=C.batching,W.batchingColor=C.batchingColor,W.instancing=C.instancing,W.instancingColor=C.instancingColor,W.instancingMorph=C.instancingMorph,W.skinning=C.skinning,W.morphTargets=C.morphTargets,W.morphNormals=C.morphNormals,W.morphColors=C.morphColors,W.morphTargetsCount=C.morphTargetsCount,W.numClippingPlanes=C.numClippingPlanes,W.numIntersection=C.numClipIntersection,W.vertexAlphas=C.vertexAlphas,W.vertexTangents=C.vertexTangents,W.toneMapping=C.toneMapping}function he(T,C,W,Y,V){C.isScene!==!0&&(C=Ae),rt.resetTextureUnits();const ve=C.fog,we=Y.isMeshStandardMaterial?C.environment:null,_e=I===null?b.outputColorSpace:I.isXRRenderTarget===!0?I.texture.colorSpace:Xs,oe=(Y.isMeshStandardMaterial?k:Xt).get(Y.envMap||we),ne=Y.vertexColors===!0&&!!W.attributes.color&&W.attributes.color.itemSize===4,Le=!!W.attributes.tangent&&(!!Y.normalMap||Y.anisotropy>0),ue=!!W.morphAttributes.position,Ie=!!W.morphAttributes.normal,re=!!W.morphAttributes.color;let ct=Vi;Y.toneMapped&&(I===null||I.isXRRenderTarget===!0)&&(ct=b.toneMapping);const Re=W.morphAttributes.position||W.morphAttributes.normal||W.morphAttributes.color,Xe=Re!==void 0?Re.length:0,We=Fe.get(Y),ht=p.state.lights;if(K===!0&&(te===!0||T!==A)){const Kt=T===A&&Y.id===E;mt.setState(Y,T,Kt)}let at=!1;Y.version===We.__version?(We.needsLights&&We.lightsStateVersion!==ht.state.version||We.outputColorSpace!==_e||V.isBatchedMesh&&We.batching===!1||!V.isBatchedMesh&&We.batching===!0||V.isBatchedMesh&&We.batchingColor===!0&&V.colorTexture===null||V.isBatchedMesh&&We.batchingColor===!1&&V.colorTexture!==null||V.isInstancedMesh&&We.instancing===!1||!V.isInstancedMesh&&We.instancing===!0||V.isSkinnedMesh&&We.skinning===!1||!V.isSkinnedMesh&&We.skinning===!0||V.isInstancedMesh&&We.instancingColor===!0&&V.instanceColor===null||V.isInstancedMesh&&We.instancingColor===!1&&V.instanceColor!==null||V.isInstancedMesh&&We.instancingMorph===!0&&V.morphTexture===null||V.isInstancedMesh&&We.instancingMorph===!1&&V.morphTexture!==null||We.envMap!==oe||Y.fog===!0&&We.fog!==ve||We.numClippingPlanes!==void 0&&(We.numClippingPlanes!==mt.numPlanes||We.numIntersection!==mt.numIntersection)||We.vertexAlphas!==ne||We.vertexTangents!==Le||We.morphTargets!==ue||We.morphNormals!==Ie||We.morphColors!==re||We.toneMapping!==ct||We.morphTargetsCount!==Xe)&&(at=!0):(at=!0,We.__version=Y.version);let wt=We.currentProgram;at===!0&&(wt=q(Y,C,V));let Mt=!1,Pt=!1,jt=!1;const Lt=wt.getUniforms(),Yt=We.uniforms;if(ke.useProgram(wt.program)&&(Mt=!0,Pt=!0,jt=!0),Y.id!==E&&(E=Y.id,Pt=!0),Mt||A!==T){ke.buffers.depth.getReversed()?(ee.copy(T.projectionMatrix),N2(ee),U2(ee),Lt.setValue(O,"projectionMatrix",ee)):Lt.setValue(O,"projectionMatrix",T.projectionMatrix),Lt.setValue(O,"viewMatrix",T.matrixWorldInverse);const Ve=Lt.map.cameraPosition;Ve!==void 0&&Ve.setValue(O,$.setFromMatrixPosition(T.matrixWorld)),it.logarithmicDepthBuffer&&Lt.setValue(O,"logDepthBufFC",2/(Math.log(T.far+1)/Math.LN2)),(Y.isMeshPhongMaterial||Y.isMeshToonMaterial||Y.isMeshLambertMaterial||Y.isMeshBasicMaterial||Y.isMeshStandardMaterial||Y.isShaderMaterial)&&Lt.setValue(O,"isOrthographic",T.isOrthographicCamera===!0),A!==T&&(A=T,Pt=!0,jt=!0)}if(V.isSkinnedMesh){Lt.setOptional(O,V,"bindMatrix"),Lt.setOptional(O,V,"bindMatrixInverse");const Kt=V.skeleton;Kt&&(Kt.boneTexture===null&&Kt.computeBoneTexture(),Lt.setValue(O,"boneTexture",Kt.boneTexture,rt))}V.isBatchedMesh&&(Lt.setOptional(O,V,"batchingTexture"),Lt.setValue(O,"batchingTexture",V._matricesTexture,rt),Lt.setOptional(O,V,"batchingIdTexture"),Lt.setValue(O,"batchingIdTexture",V._indirectTexture,rt),Lt.setOptional(O,V,"batchingColorTexture"),V._colorsTexture!==null&&Lt.setValue(O,"batchingColorTexture",V._colorsTexture,rt));const Ht=W.morphAttributes;if((Ht.position!==void 0||Ht.normal!==void 0||Ht.color!==void 0)&&ot.update(V,W,wt),(Pt||We.receiveShadow!==V.receiveShadow)&&(We.receiveShadow=V.receiveShadow,Lt.setValue(O,"receiveShadow",V.receiveShadow)),Y.isMeshGouraudMaterial&&Y.envMap!==null&&(Yt.envMap.value=oe,Yt.flipEnvMap.value=oe.isCubeTexture&&oe.isRenderTargetTexture===!1?-1:1),Y.isMeshStandardMaterial&&Y.envMap===null&&C.environment!==null&&(Yt.envMapIntensity.value=C.environmentIntensity),Pt&&(Lt.setValue(O,"toneMappingExposure",b.toneMappingExposure),We.needsLights&&Me(Yt,jt),ve&&Y.fog===!0&&be.refreshFogUniforms(Yt,ve),be.refreshMaterialUniforms(Yt,Y,Q,de,p.state.transmissionRenderTarget[T.id]),Ma.upload(O,H(We),Yt,rt)),Y.isShaderMaterial&&Y.uniformsNeedUpdate===!0&&(Ma.upload(O,H(We),Yt,rt),Y.uniformsNeedUpdate=!1),Y.isSpriteMaterial&&Lt.setValue(O,"center",V.center),Lt.setValue(O,"modelViewMatrix",V.modelViewMatrix),Lt.setValue(O,"normalMatrix",V.normalMatrix),Lt.setValue(O,"modelMatrix",V.matrixWorld),Y.isShaderMaterial||Y.isRawShaderMaterial){const Kt=Y.uniformsGroups;for(let Ve=0,Jt=Kt.length;Ve<Jt;Ve++){const kt=Kt[Ve];J.update(kt,wt),J.bind(kt,wt)}}return wt}function Me(T,C){T.ambientLightColor.needsUpdate=C,T.lightProbe.needsUpdate=C,T.directionalLights.needsUpdate=C,T.directionalLightShadows.needsUpdate=C,T.pointLights.needsUpdate=C,T.pointLightShadows.needsUpdate=C,T.spotLights.needsUpdate=C,T.spotLightShadows.needsUpdate=C,T.rectAreaLights.needsUpdate=C,T.hemisphereLights.needsUpdate=C}function fe(T){return T.isMeshLambertMaterial||T.isMeshToonMaterial||T.isMeshPhongMaterial||T.isMeshStandardMaterial||T.isShadowMaterial||T.isShaderMaterial&&T.lights===!0}this.getActiveCubeFace=function(){return L},this.getActiveMipmapLevel=function(){return P},this.getRenderTarget=function(){return I},this.setRenderTargetTextures=function(T,C,W){const Y=Fe.get(T);Y.__autoAllocateDepthBuffer=T.resolveDepthBuffer===!1,Y.__autoAllocateDepthBuffer===!1&&(Y.__useRenderToTexture=!1),Fe.get(T.texture).__webglTexture=C,Fe.get(T.depthTexture).__webglTexture=Y.__autoAllocateDepthBuffer?void 0:W,Y.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(T,C){const W=Fe.get(T);W.__webglFramebuffer=C,W.__useDefaultFramebuffer=C===void 0};const Ne=O.createFramebuffer();this.setRenderTarget=function(T,C=0,W=0){I=T,L=C,P=W;let Y=!0,V=null,ve=!1,we=!1;if(T){const oe=Fe.get(T);if(oe.__useDefaultFramebuffer!==void 0)ke.bindFramebuffer(O.FRAMEBUFFER,null),Y=!1;else if(oe.__webglFramebuffer===void 0)rt.setupRenderTarget(T);else if(oe.__hasExternalTextures)rt.rebindTextures(T,Fe.get(T.texture).__webglTexture,Fe.get(T.depthTexture).__webglTexture);else if(T.depthBuffer){const ue=T.depthTexture;if(oe.__boundDepthTexture!==ue){if(ue!==null&&Fe.has(ue)&&(T.width!==ue.image.width||T.height!==ue.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");rt.setupDepthRenderbuffer(T)}}const ne=T.texture;(ne.isData3DTexture||ne.isDataArrayTexture||ne.isCompressedArrayTexture)&&(we=!0);const Le=Fe.get(T).__webglFramebuffer;T.isWebGLCubeRenderTarget?(Array.isArray(Le[C])?V=Le[C][W]:V=Le[C],ve=!0):T.samples>0&&rt.useMultisampledRTT(T)===!1?V=Fe.get(T).__webglMultisampledFramebuffer:Array.isArray(Le)?V=Le[W]:V=Le,F.copy(T.viewport),B.copy(T.scissor),X=T.scissorTest}else F.copy(Te).multiplyScalar(Q).floor(),B.copy(me).multiplyScalar(Q).floor(),X=ae;if(W!==0&&(V=Ne),ke.bindFramebuffer(O.FRAMEBUFFER,V)&&Y&&ke.drawBuffers(T,V),ke.viewport(F),ke.scissor(B),ke.setScissorTest(X),ve){const oe=Fe.get(T.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_CUBE_MAP_POSITIVE_X+C,oe.__webglTexture,W)}else if(we){const oe=Fe.get(T.texture),ne=C;O.framebufferTextureLayer(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,oe.__webglTexture,W,ne)}else if(T!==null&&W!==0){const oe=Fe.get(T.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,oe.__webglTexture,W)}E=-1},this.readRenderTargetPixels=function(T,C,W,Y,V,ve,we,_e=0){if(!(T&&T.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let oe=Fe.get(T).__webglFramebuffer;if(T.isWebGLCubeRenderTarget&&we!==void 0&&(oe=oe[we]),oe){ke.bindFramebuffer(O.FRAMEBUFFER,oe);try{const ne=T.textures[_e],Le=ne.format,ue=ne.type;if(!it.textureFormatReadable(Le)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!it.textureTypeReadable(ue)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}C>=0&&C<=T.width-Y&&W>=0&&W<=T.height-V&&(T.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+_e),O.readPixels(C,W,Y,V,$e.convert(Le),$e.convert(ue),ve))}finally{const ne=I!==null?Fe.get(I).__webglFramebuffer:null;ke.bindFramebuffer(O.FRAMEBUFFER,ne)}}},this.readRenderTargetPixelsAsync=async function(T,C,W,Y,V,ve,we,_e=0){if(!(T&&T.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let oe=Fe.get(T).__webglFramebuffer;if(T.isWebGLCubeRenderTarget&&we!==void 0&&(oe=oe[we]),oe)if(C>=0&&C<=T.width-Y&&W>=0&&W<=T.height-V){ke.bindFramebuffer(O.FRAMEBUFFER,oe);const ne=T.textures[_e],Le=ne.format,ue=ne.type;if(!it.textureFormatReadable(Le))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!it.textureTypeReadable(ue))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const Ie=O.createBuffer();O.bindBuffer(O.PIXEL_PACK_BUFFER,Ie),O.bufferData(O.PIXEL_PACK_BUFFER,ve.byteLength,O.STREAM_READ),T.textures.length>1&&O.readBuffer(O.COLOR_ATTACHMENT0+_e),O.readPixels(C,W,Y,V,$e.convert(Le),$e.convert(ue),0);const re=I!==null?Fe.get(I).__webglFramebuffer:null;ke.bindFramebuffer(O.FRAMEBUFFER,re);const ct=O.fenceSync(O.SYNC_GPU_COMMANDS_COMPLETE,0);return O.flush(),await F2(O,ct,4),O.bindBuffer(O.PIXEL_PACK_BUFFER,Ie),O.getBufferSubData(O.PIXEL_PACK_BUFFER,0,ve),O.deleteBuffer(Ie),O.deleteSync(ct),ve}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(T,C=null,W=0){const Y=Math.pow(2,-W),V=Math.floor(T.image.width*Y),ve=Math.floor(T.image.height*Y),we=C!==null?C.x:0,_e=C!==null?C.y:0;rt.setTexture2D(T,0),O.copyTexSubImage2D(O.TEXTURE_2D,W,0,0,we,_e,V,ve),ke.unbindTexture()};const Se=O.createFramebuffer(),Ee=O.createFramebuffer();this.copyTextureToTexture=function(T,C,W=null,Y=null,V=0,ve=null){ve===null&&(V!==0?(Os("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),ve=V,V=0):ve=0);let we,_e,oe,ne,Le,ue,Ie,re,ct;const Re=T.isCompressedTexture?T.mipmaps[ve]:T.image;if(W!==null)we=W.max.x-W.min.x,_e=W.max.y-W.min.y,oe=W.isBox3?W.max.z-W.min.z:1,ne=W.min.x,Le=W.min.y,ue=W.isBox3?W.min.z:0;else{const Ht=Math.pow(2,-V);we=Math.floor(Re.width*Ht),_e=Math.floor(Re.height*Ht),T.isDataArrayTexture?oe=Re.depth:T.isData3DTexture?oe=Math.floor(Re.depth*Ht):oe=1,ne=0,Le=0,ue=0}Y!==null?(Ie=Y.x,re=Y.y,ct=Y.z):(Ie=0,re=0,ct=0);const Xe=$e.convert(C.format),We=$e.convert(C.type);let ht;C.isData3DTexture?(rt.setTexture3D(C,0),ht=O.TEXTURE_3D):C.isDataArrayTexture||C.isCompressedArrayTexture?(rt.setTexture2DArray(C,0),ht=O.TEXTURE_2D_ARRAY):(rt.setTexture2D(C,0),ht=O.TEXTURE_2D),O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,C.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,C.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,C.unpackAlignment);const at=O.getParameter(O.UNPACK_ROW_LENGTH),wt=O.getParameter(O.UNPACK_IMAGE_HEIGHT),Mt=O.getParameter(O.UNPACK_SKIP_PIXELS),Pt=O.getParameter(O.UNPACK_SKIP_ROWS),jt=O.getParameter(O.UNPACK_SKIP_IMAGES);O.pixelStorei(O.UNPACK_ROW_LENGTH,Re.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,Re.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,ne),O.pixelStorei(O.UNPACK_SKIP_ROWS,Le),O.pixelStorei(O.UNPACK_SKIP_IMAGES,ue);const Lt=T.isDataArrayTexture||T.isData3DTexture,Yt=C.isDataArrayTexture||C.isData3DTexture;if(T.isDepthTexture){const Ht=Fe.get(T),Kt=Fe.get(C),Ve=Fe.get(Ht.__renderTarget),Jt=Fe.get(Kt.__renderTarget);ke.bindFramebuffer(O.READ_FRAMEBUFFER,Ve.__webglFramebuffer),ke.bindFramebuffer(O.DRAW_FRAMEBUFFER,Jt.__webglFramebuffer);for(let kt=0;kt<oe;kt++)Lt&&(O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Fe.get(T).__webglTexture,V,ue+kt),O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Fe.get(C).__webglTexture,ve,ct+kt)),O.blitFramebuffer(ne,Le,we,_e,Ie,re,we,_e,O.DEPTH_BUFFER_BIT,O.NEAREST);ke.bindFramebuffer(O.READ_FRAMEBUFFER,null),ke.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else if(V!==0||T.isRenderTargetTexture||Fe.has(T)){const Ht=Fe.get(T),Kt=Fe.get(C);ke.bindFramebuffer(O.READ_FRAMEBUFFER,Se),ke.bindFramebuffer(O.DRAW_FRAMEBUFFER,Ee);for(let Ve=0;Ve<oe;Ve++)Lt?O.framebufferTextureLayer(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Ht.__webglTexture,V,ue+Ve):O.framebufferTexture2D(O.READ_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,Ht.__webglTexture,V),Yt?O.framebufferTextureLayer(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,Kt.__webglTexture,ve,ct+Ve):O.framebufferTexture2D(O.DRAW_FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,Kt.__webglTexture,ve),V!==0?O.blitFramebuffer(ne,Le,we,_e,Ie,re,we,_e,O.COLOR_BUFFER_BIT,O.NEAREST):Yt?O.copyTexSubImage3D(ht,ve,Ie,re,ct+Ve,ne,Le,we,_e):O.copyTexSubImage2D(ht,ve,Ie,re,ne,Le,we,_e);ke.bindFramebuffer(O.READ_FRAMEBUFFER,null),ke.bindFramebuffer(O.DRAW_FRAMEBUFFER,null)}else Yt?T.isDataTexture||T.isData3DTexture?O.texSubImage3D(ht,ve,Ie,re,ct,we,_e,oe,Xe,We,Re.data):C.isCompressedArrayTexture?O.compressedTexSubImage3D(ht,ve,Ie,re,ct,we,_e,oe,Xe,Re.data):O.texSubImage3D(ht,ve,Ie,re,ct,we,_e,oe,Xe,We,Re):T.isDataTexture?O.texSubImage2D(O.TEXTURE_2D,ve,Ie,re,we,_e,Xe,We,Re.data):T.isCompressedTexture?O.compressedTexSubImage2D(O.TEXTURE_2D,ve,Ie,re,Re.width,Re.height,Xe,Re.data):O.texSubImage2D(O.TEXTURE_2D,ve,Ie,re,we,_e,Xe,We,Re);O.pixelStorei(O.UNPACK_ROW_LENGTH,at),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,wt),O.pixelStorei(O.UNPACK_SKIP_PIXELS,Mt),O.pixelStorei(O.UNPACK_SKIP_ROWS,Pt),O.pixelStorei(O.UNPACK_SKIP_IMAGES,jt),ve===0&&C.generateMipmaps&&O.generateMipmap(ht),ke.unbindTexture()},this.copyTextureToTexture3D=function(T,C,W=null,Y=null,V=0){return Os('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(T,C,W,Y,V)},this.initRenderTarget=function(T){Fe.get(T).__webglFramebuffer===void 0&&rt.setupRenderTarget(T)},this.initTexture=function(T){T.isCubeTexture?rt.setTextureCube(T,0):T.isData3DTexture?rt.setTexture3D(T,0):T.isDataArrayTexture||T.isCompressedArrayTexture?rt.setTexture2DArray(T,0):rt.setTexture2D(T,0),ke.unbindTexture()},this.resetState=function(){L=0,P=0,I=null,ke.reset(),Ct.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return bi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Bt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Bt._getUnpackColorSpace()}}const Gh={type:"change"},dc={type:"start"},su={type:"end"},ra=new Ys,Wh=new jn,U3=Math.cos(70*xi.DEG2RAD),fn=new z,Pn=2*Math.PI,sn={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 J1{constructor(e,t=null){super(e,t),this.state=sn.NONE,this.target=new z,this.cursor=new z,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:Si.ROTATE,MIDDLE:Si.DOLLY,RIGHT:Si.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 z,this._lastQuaternion=new Un,this._lastTargetPosition=new z,this._quat=new Un().setFromUnitVectors(e.up,new z(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Pl,this._sphericalDelta=new Pl,this._scale=1,this._panOffset=new z,this._rotateStart=new Je,this._rotateEnd=new Je,this._rotateDelta=new Je,this._panStart=new Je,this._panEnd=new Je,this._panDelta=new Je,this._dollyStart=new Je,this._dollyEnd=new Je,this._dollyDelta=new Je,this._dollyDirection=new z,this._mouse=new Je,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=sn.NONE}update(e=null){const t=this.object.position;fn.copy(t).sub(this.target),fn.applyQuaternion(this._quat),this._spherical.setFromVector3(fn),this.autoRotate&&this.state===sn.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+=Pn:n>Math.PI&&(n-=Pn),i<-Math.PI?i+=Pn:i>Math.PI&&(i-=Pn),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(fn.setFromSpherical(this._spherical),fn.applyQuaternion(this._quatInverse),t.copy(this.target).add(fn),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=fn.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 z(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 z(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=fn.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?Pn/60*this.autoRotateSpeed*e:Pn/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){fn.setFromMatrixColumn(t,0),fn.multiplyScalar(-e),this._panOffset.add(fn)}_panUp(e,t){this.screenSpacePanning===!0?fn.setFromMatrixColumn(t,1):(fn.setFromMatrixColumn(t,0),fn.crossVectors(this.object.up,fn)),fn.multiplyScalar(e),this._panOffset.add(fn)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;fn.copy(i).sub(this.target);let r=fn.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(Pn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Pn*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(Pn*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(-Pn*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(Pn*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(-Pn*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(Pn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Pn*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 Je,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=sn.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 Si.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(s),this.state=sn.DOLLY;break;case Si.ROTATE:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=sn.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=sn.ROTATE}break;case Si.PAN:if(s.ctrlKey||s.metaKey||s.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(s),this.state=sn.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(s),this.state=sn.PAN}break;default:this.state=sn.NONE}this.state!==sn.NONE&&this.dispatchEvent(dc)}function k3(s){switch(this.state){case sn.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(s);break;case sn.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(s);break;case sn.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(s);break}}function V3(s){this.enabled===!1||this.enableZoom===!1||this.state!==sn.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=sn.TOUCH_ROTATE;break;case Is.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(s),this.state=sn.TOUCH_PAN;break;default:this.state=sn.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=sn.TOUCH_DOLLY_PAN;break;case Is.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(s),this.state=sn.TOUCH_DOLLY_ROTATE;break;default:this.state=sn.NONE}break;default:this.state=sn.NONE}this.state!==sn.NONE&&this.dispatchEvent(dc)}function W3(s){switch(this._trackPointer(s),this.state){case sn.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(s),this.update();break;case sn.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(s),this.update();break;case sn.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(s),this.update();break;case sn.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(s),this.update();break;default:this.state=sn.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,qt=(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},K3=({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},J3=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 z;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 Je,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,Kh=(s,e=!0)=>{const{material:t,userData:n}=s,{color:i,opacity:r}=e?n.hover:n;t.color.set(i),t.opacity=r},es=s=>JSON.parse(JSON.stringify(s)),s4=s=>{const e=s.type||"sphere",t=e==="sphere",n=s.resolution||t?64:128,i=rn.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:{...es(c),...t?{label:"X",color:16725587,line:!0}:{label:o?ba:Ul}},y:{...es(c),...t?{label:"Y",color:9100032,line:!0}:{label:r||o?Il:ba}},z:{...es(c),...t?{label:"Z",color:2920447,line:!0}:{label:r?ba:o?Ul:Il}},nx:{...es(d),label:t?"":o?Sa:zl},ny:{...es(d),label:t?"":r||o?Bl:Sa},nz:{...es(d),label:t?"":r?Sa:o?zl:Bl}};return Ol(s,m),ou.forEach(u=>Ol(s[`n${u}`],es(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 At,n=e*2,{isSphere:i,resolution:r,radius:o,font:a,corners:l,edges:c}=s,d=br.map(P=>({...s[P],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]=N(d,r,a);d.forEach(({radius:P,label:I,color:E,labelColor:A,border:F,hover:{color:B,labelColor:X,border:Z}},se)=>{const G=r*se+se*n+e;b(e,G,e,r,P,I,F,E,A),b(r+e*3,G,e,r,P,I,Z??F,B??E,X??A)});const _=d.length,f=e/(r*2),p=e/(r*6),x=1/_,M=new u1(m);return M.repeat.set(.5-2*f,x-2*p),M.offset.set(f,1-p),Object.assign(M,{colorSpace:Vt,wrapS:oi,wrapT:oi,userData:{offsetX:f,offsetY:p,cellHeight:x}}),M;function b(P,I,E,A,F,B,X,Z,se){if(F=F*(A/2),Z!=null&&Z!==""&&(G(),u.fillStyle=t.set(Z).getStyle(),u.fill()),X&&X.size){const de=X.size*A/2;P+=de,I+=de,A-=X.size*A,F=Math.max(0,F-de),G(),u.strokeStyle=t.set(X.color).getStyle(),u.lineWidth=X.size*A,u.stroke()}B&&L(u,P+A/2,I+(A+E)/2,B,t.set(se).getStyle());function G(){u.beginPath(),u.moveTo(P+F,I),u.lineTo(P+A-F,I),u.arcTo(P+A,I,P+A,I+F,F),u.lineTo(P+A,I+A-F),u.arcTo(P+A,I+A,P+A-F,I+A,F),u.lineTo(P+F,I+A),u.arcTo(P,I+A,P,I+A-F,F),u.lineTo(P,I+F),u.arcTo(P,I,P+F,I,F),u.closePath()}}function N(P,I,E){const A=[...P].sort((Pe,Te)=>{var me,ae;return(((me=Pe.label)==null?void 0:me.length)||0)-(((ae=Te.label)==null?void 0:ae.length)||0)}).pop().label,{family:F,weight:B}=E,X=i?Math.sqrt(Math.pow(I*.7,2)/2):I;let Z=X,se=0,G=0;do{u.font=`${B} ${Z}px ${F}`;const Pe=u.measureText(A);se=Pe.width,G=Pe.fontBoundingBoxDescent,Z--}while(se>X&&Z>0);const de=X/G,Q=Math.min(X/se,de),xe=Math.floor(Z*Q);return[`${B} ${xe}px ${F}`,de]}function L(P,I,E,A,F){P.font=h,P.textAlign="center",P.textBaseline="middle",P.fillStyle=F,P.fillText(A,I,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(L=>u[L]);let g,_,f,p,x,M,b,N;for(let L=0;L<4;L++){p=L<1||L>2?i:-i,x=L<2?r:-r,M=L<1||L>2?a:o,b=L<2?c:l;for(let P=0;P<=e;P++)g=Math.PI/2*(L+P/e),_=Math.cos(g),f=Math.sin(g),d.push(p+s*_,x+s*f,0),m.push(M+o*_,b+l*f),P<e&&(N=(e+1)*L+P+4,h.push(L,N,N+1))}return new an().setIndex(new un(new Uint32Array(h),1)).setAttribute("position",new un(new Float32Array(d),3)).setAttribute("uv",new un(new Float32Array(m),2))}const o4=(s,e)=>{const t=new z,{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],f={map:m,opacity:g,transparent:!0},p=n?new ec(new za(f)):new Nt(o,new Gi(f)),x=c?d:d[1];return p.position[x]=(c?1:-1)*(n?lu:1),n||p.lookAt(t.copy(p.position).multiplyScalar(1.7)),p.scale.setScalar(h),p.renderOrder=1,p.visible=u,p.userData={scale:h,opacity:g,hover:_},p})},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 z;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 f=t?new ec(new za(m)):new Nt(d,new Gi(m)),p=_*3;return f.position.set(u[p],u[p+1],u[p+2]),t&&f.position.normalize().multiplyScalar(1.7),f.scale.setScalar(o),f.lookAt(h.copy(f.position).multiplyScalar(2)),f.renderOrder=1,f.userData={color:i,opacity:r,scale:o,hover:c},f})},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(f=>f*.925),g=new z,_=new z(0,1,0);return Array(h.length/3).fill(0).map((f,p)=>{if(n){const b=e.clone();fc(b,t),u.map=b}else u.color=r;const x=n?new ec(new za(u)):new Nt(m,new Gi(u)),M=p*3;return x.position.set(h[M],h[M+1],h[M+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 an;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=Jh(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=Jh(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 Jh(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 un(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 Gi({color:i,side:Dn,opacity:r,transparent:!0,depthWrite:!1});if(!n)return null;if(t)a=new Nt(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 Nt(c,l)}return a.userData={color:i,opacity:r,hover:o},a},Zh=new Tn,aa=new z;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 Ft(e,3)),this.setAttribute("uv",new Ft(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 ci(n,3,0)),this.setAttribute("instanceEnd",new ci(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 ci(n,3,0)),this.setAttribute("instanceColorEnd",new ci(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 Tn);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 Ri),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)}}Ye.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new Je(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};Nn.line={uniforms:Ql.merge([Ye.common,Ye.fog,Ye.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 Ti{constructor(e){super({type:"LineMaterial",uniforms:Ql.clone(Nn.line.uniforms),vertexShader:Nn.line.vertexShader,fragmentShader:Nn.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 Ot,Qh=new z,e0=new z,vn=new Ot,yn=new Ot,si=new Ot,No=new z,Uo=new Mt,xn=new K1,t0=new z,oa=new Tn,la=new Ri,ri=new Ot;let ai,rs;function n0(s,e,t){return ri.set(0,0,-e,1).applyMatrix4(s.projectionMatrix),ri.multiplyScalar(1/ri.w),ri.x=rs/t.width,ri.y=rs/t.height,ri.applyMatrix4(s.projectionMatrixInverse),ri.multiplyScalar(1/ri.w),Math.abs(Math.max(ri.x,ri.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++){xn.start.fromBufferAttribute(i,a),xn.end.fromBufferAttribute(r,a),xn.applyMatrix4(t);const c=new z,d=new z;ai.distanceSqToSegment(xn.start,xn.end,d,c),d.distanceTo(c)<rs*.5&&e.push({point:d,pointOnLine:c,distance:ai.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;ai.at(1,si),si.w=1,si.applyMatrix4(e.matrixWorldInverse),si.applyMatrix4(n),si.multiplyScalar(1/si.w),si.x*=i.x/2,si.y*=i.y/2,si.z=0,No.copy(si),Uo.multiplyMatrices(e.matrixWorldInverse,r);for(let m=0,u=c;m<u;m++){if(vn.fromBufferAttribute(a,m),yn.fromBufferAttribute(l,m),vn.w=1,yn.w=1,vn.applyMatrix4(Uo),yn.applyMatrix4(Uo),vn.z>d&&yn.z>d)continue;if(vn.z>d){const p=vn.z-yn.z,x=(vn.z-d)/p;vn.lerp(yn,x)}else if(yn.z>d){const p=yn.z-vn.z,x=(yn.z-d)/p;yn.lerp(vn,x)}vn.applyMatrix4(n),yn.applyMatrix4(n),vn.multiplyScalar(1/vn.w),yn.multiplyScalar(1/yn.w),vn.x*=i.x/2,vn.y*=i.y/2,yn.x*=i.x/2,yn.y*=i.y/2,xn.start.copy(vn),xn.start.z=0,xn.end.copy(yn),xn.end.z=0;const h=xn.closestPointToPointParameter(No,!0);xn.at(h,t0);const g=xi.lerp(vn.z,yn.z,h),_=g>=-1&&g<=1,f=No.distanceTo(t0)<rs*.5;if(_&&f){xn.start.fromBufferAttribute(a,m),xn.end.fromBufferAttribute(l,m),xn.start.applyMatrix4(r),xn.end.applyMatrix4(r);const p=new z,x=new z;ai.distanceSqToSegment(xn.start,xn.end,x,p),t.push({point:x,pointOnLine:p,distance:ai.origin.distanceTo(x),object:s,face:null,faceIndex:m,uv:null,uv1:null})}}}class p4 extends Pt{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 ci(r,1,0)),e.setAttribute("instanceDistanceEnd",new ci(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;ai=e.ray;const o=this.matrixWorld,a=this.geometry,l=this.material;rs=l.linewidth+r,a.boundingSphere===null&&a.computeBoundingSphere(),la.copy(a.boundingSphere).applyMatrix4(o);let c;if(n)c=rs*.5;else{const m=Math.max(i.near,la.distanceToPoint(ai.origin));c=n0(i,m,l.resolution)}if(la.radius+=c,ai.intersectsSphere(la)===!1)return;a.boundingBox===null&&a.computeBoundingBox(),oa.copy(a.boundingBox).applyMatrix4(o);let d;if(n)d=rs*.5;else{const m=Math.max(i.near,oa.distanceToPoint(ai.origin));d=n0(i,m,l.resolution)}oa.expandByScalar(d),ai.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 bt,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 Je(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 Mt,i0=new Pl,v4=new Je,ts=new z,s0=new Ot;class uu extends sn{constructor(e,t,n={}){super(),jt(this,"enabled",!0),jt(this,"camera"),jt(this,"renderer"),jt(this,"options"),jt(this,"target",new z),jt(this,"animated",!0),jt(this,"speed",1),jt(this,"animating",!1),jt(this,"_options"),jt(this,"_intersections"),jt(this,"_background",null),jt(this,"_viewport",[0,0,0,0]),jt(this,"_originalViewport",[0,0,0,0]),jt(this,"_originalScissor",[0,0,0,0]),jt(this,"_scene"),jt(this,"_camera"),jt(this,"_container"),jt(this,"_domElement"),jt(this,"_domRect"),jt(this,"_dragging",!1),jt(this,"_distance",0),jt(this,"_clock",new $1),jt(this,"_targetQuaternion",new Un),jt(this,"_quaternionStart",new Un),jt(this,"_quaternionEnd",new Un),jt(this,"_pointerStart",new Je),jt(this,"_focus",null),jt(this,"_placement"),jt(this,"_controls"),jt(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 gn(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?J3(r):document.body,this._domElement=K3(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 z().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;ts.copy(e).multiplyScalar(this._distance),Fs.setPosition(ts).lookAt(ts,this.position,this.up),this._targetQuaternion.setFromRotationMatrix(Fs),ts.add(n),Fs.lookAt(ts,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(ts.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(ts.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=sn.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&&Kh(this._background,!0),this._handleHover(e))}_onPointerLeave(){!this.enabled||this._dragging||(this._background&&Kh(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 z),g=y.ref(new z),_=()=>{if(!s.value)return;e=new Ia,e.background=new bt(15790320);const F=s.value;t=new gn(75,F.clientWidth/F.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(F.clientWidth,F.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=Hl,n.toneMapping=Gl,n.toneMappingExposure=1,n.outputColorSpace=Vt,F.appendChild(n.domElement),i=new ru(t,n.domElement),i.enableDamping=!0,i.dampingFactor=.05,i.mouseButtons={LEFT:null,MIDDLE:Si.PAN,RIGHT:Si.ROTATE},i.panSpeed=.7,r=new uu(t,n,{container:F,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(),M()},f=(F,B)=>{a&&(e.remove(a),a.dispose()),l&&(e.remove(l),l.geometry.dispose(),l.material.dispose());const X=Math.min(Math.max(Math.floor(F/20),30),40);a=new J0(F,X,13421772,14540253),a.rotateX(Math.PI/2),a.position.copy(B),e.add(a);const Z=new wi(F,F),se=new X0({opacity:.3,color:0});l=new Pt(Z,se),l.position.copy(B),l.position.z-=.01,l.receiveShadow=!0,e.add(l)},p=()=>{if(u.value.length===0)return;const F=new Tn;let B=!1;if(u.value.forEach(Q=>{if(Q.userData.boundingBox)F.union(Q.userData.boundingBox),B=!0;else if(Q.userData.modelId&&modelBoundingBoxes.has(Q.userData.modelId)){const xe=modelBoundingBoxes.get(Q.userData.modelId);F.union(xe.box),B=!0}else F.expandByObject(Q),B=!0}),!B){console.warn("无法计算包围盒,网格更新失败");return}const X=F.getSize(new z),Z=F.getCenter(new z),se=Math.max(X.x,X.y,X.z),W=Math.max(se*8,50),he=new z(Z.x,Z.y,F.min.z);f(W,he)},x=()=>{const F=new cc(4210752,.6);e.add(F);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 X=new gr(16777215,.8);X.position.set(-8,-8,6),e.add(X);const Z=new gr(16777215,.6);Z.position.set(0,-15,2),e.add(Z);const se=new K0(16777215,4473924,.8);e.add(se);const W=new Pa(16777215,1,50);W.position.set(15,15,15),e.add(W);const he=new Pa(16777215,.5,50);he.position.set(-15,-15,15),e.add(he)},M=()=>{o=requestAnimationFrame(M),i&&i.update();const F=performance.now(),B=F-m;B<d||(m=F-B%d,n&&e&&t&&n.render(e,t),r&&r.render())},b=F=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(X=>{F[X]&&F[X].dispose&&F[X].dispose()}),F.dispose&&F.dispose()},N=F=>{F==null||F.traverse(B=>{B.geometry&&B.geometry.dispose(),B.material&&(Array.isArray(B.material)?B.material.forEach(X=>{b(X)}):b(B.material))})};return{currentModels:u,initialCameraPosition:h,initialTargetPosition:g,initThreeJS:_,handleResize:()=>{if(!s.value||!t||!n||!r)return;const F=s.value,B=F.clientWidth,X=F.clientHeight;t.aspect=B/X,t.updateProjectionMatrix(),n.setSize(B,X),r.update()},fitCameraToAllModels:F=>{if(!t||!i||u.value.length===0)return;const B=new Tn;let X=!1;if(u.value.forEach(xe=>{if(xe.userData.boundingBox)B.union(xe.userData.boundingBox),X=!0;else if(xe.userData.modelId&&F.has(xe.userData.modelId)){const De=F.get(xe.userData.modelId);B.union(De.box),X=!0}else B.expandByObject(xe),X=!0}),!X){console.warn("无法计算包围盒");return}const Z=B.getSize(new z),se=B.getCenter(new z),he=Math.max(Z.x,Z.y,Z.z)*.8,Q=new z(se.x+he,se.y-he,se.z+he);t.position.copy(Q),t.lookAt(se),i.target.copy(se),i.update(),h.value.copy(Q),g.value.copy(se),p()},getThreeJSObjects:()=>({scene:e,camera:t,renderer:n,controls:i,gizmo:r}),clearAllModels:()=>{if(!e)return;u.value.forEach(B=>{e.remove(B),N(B)});const F=[];e.children.forEach(B=>{!B.isLight&&!B.isCamera&&B.type!=="GridHelper"&&B!==l&&F.push(B)}),F.forEach(B=>{e.remove(B),N(B)}),u.value=[],p()},cleanup:()=>{o&&cancelAnimationFrame(o),a&&a.dispose(),l&&(l.geometry.dispose(),l.material.dispose()),n&&n.dispose(),i&&i.dispose(),r&&r.dispose()},updateGridForModels:p}}function x4(s,e){const t=y.ref(!1);let n=null,i=12700,r=new z,o=new z,a=new z,l=0,c=null;const d=f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2,m=f=>{const p=new z,x=l*1.2,M=new z(a.x+x,a.y,a.z),b=new z(a.x,a.y+x,a.z),N=new z(a.x,a.y-x,a.z);if(f<=.567){const P=f/.567*Math.PI*2;p.x=a.x+Math.cos(P)*x,p.z=a.z+Math.sin(P)*x,p.y=a.y}else if(f<=.724){const L=(f-.567)/.157,P=d(L);p.lerpVectors(M,b,P)}else if(f<=.881){const L=(f-.724)/.157,I=d(L)*Math.PI;p.x=a.x+Math.sin(I)*x,p.y=a.y+Math.cos(I)*x,p.z=a.z}else{const L=(f-.881)/.119,P=d(L);p.lerpVectors(N,r,P)}return p},u=()=>{const{camera:f,controls:p}=s();if(!f||!p)return;n||(n=Date.now());const x=Date.now()-n,M=Math.min(x/i,1);if(M>=1){g();return}const b=m(M);f.position.copy(b),f.lookAt(a),p.target.copy(a),c=requestAnimationFrame(u)},h=()=>{if(e.value.length===0)return;const{camera:f,controls:p}=s();if(!f||!p)return;r.copy(f.position),o.copy(p.target);const x=new Tn;e.value.forEach(A=>{x.expandByObject(A)});const M=x.getSize(new z);a=x.getCenter(new z),l=Math.max(M.x,M.y,M.z)*1.2;const b=new z(a.x+l*1.2,a.y,a.z);p.enabled=!1;const N=f.position.clone(),L=1e3,P=Date.now(),I=()=>{const A=Date.now()-P,E=Math.min(A/L,1),F=d(E);f.position.lerpVectors(N,b,F),f.lookAt(a),p.target.copy(a),E<1?requestAnimationFrame(I):(t.value=!0,n=null,u())};I()},g=()=>{t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{controls:f}=s();f&&(f.enabled=!0,f.target.copy(o))};return{isAnimating:t,toggleAnimation:()=>{if(t.value){t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{camera:f,controls:p}=s();if(!f||!p)return;p.enabled=!0;const x=f.position.clone(),M=p.target.clone(),b=1500,N=Date.now(),L=()=>{const P=Date.now()-N,I=Math.min(P/b,1),A=d(I);f.position.lerpVectors(x,r,A),p.target.lerpVectors(M,o,A),I<1&&requestAnimationFrame(L)};L()}else h()},startAnimation:h,stopAnimation:g}}function M4(s,e){const t=y.ref(!1),n=y.ref("none");let i=[],r=[],o=new Tn,a=new z;const l=()=>{i=[new jn(new z(1,0,0),0),new jn(new z(0,1,0),0),new jn(new z(0,0,1),0)]},c=()=>{o.makeEmpty(),e.value.forEach(_=>{o.expandByObject(_)}),a=o.getCenter(new z)},d=_=>{const f=o.getSize(new z);let p,x,M;_==="x"?(p=new wi(f.z*1.2,f.y*1.2),x=new z(a.x,a.y,a.z),M=new _n(0,Math.PI/2,0)):_==="y"?(p=new wi(f.x*1.2,f.z*1.2),x=new z(a.x,a.y,a.z),M=new _n(Math.PI/2,0,0)):_==="z"&&(p=new wi(f.x*1.2,f.y*1.2),x=new z(a.x,a.y,a.z),M=new _n(0,0,0));const b=new ln({color:8900331,transparent:!0,opacity:.3,side:cn,depthWrite:!1}),N=new Pt(p,b);return N.position.copy(x),N.rotation.copy(M),N},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(p=>{p.traverse(x=>{x.isMesh&&x.material&&(Array.isArray(x.material)?x.material.forEach(M=>{M.clippingPlanes=[_]}):x.material.clippingPlanes=[_])})});const{scene:f}=s();if(f){const p=d(n.value);f.add(p),r.push(p)}}},u=()=>{e.value.forEach(_=>{_.traverse(f=>{f.isMesh&&f.material&&(Array.isArray(f.material)?f.material.forEach(p=>{p.clippingPlanes=[]}):f.material.clippingPlanes=[])})})},h=()=>{const{scene:_}=s();_&&r.forEach(f=>{_.remove(f),f.geometry.dispose(),f.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 Hi extends ni{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,f,p,x,M,b;for(let F=0;F<70;F++)d.getUint32(F,!1)==1129270351&&d.getUint8(F+4)==82&&d.getUint8(F+5)==61&&(_=!0,f=new Float32Array(m*3*3),p=d.getUint8(F+6)/255,x=d.getUint8(F+7)/255,M=d.getUint8(F+8)/255,b=d.getUint8(F+9)/255);const N=84,L=12*4+2,P=new rn,I=new Float32Array(m*3*3),A=new Float32Array(m*3*3),E=new bt;for(let F=0;F<m;F++){const B=N+F*L,X=d.getFloat32(B,!0),Z=d.getFloat32(B+4,!0),se=d.getFloat32(B+8,!0);if(_){const W=d.getUint16(B+48,!0);(W&32768)===0?(u=(W&31)/31,h=(W>>5&31)/31,g=(W>>10&31)/31):(u=p,h=x,g=M)}for(let W=1;W<=3;W++){const he=B+W*12,Q=F*3*3+(W-1)*3;I[Q]=d.getFloat32(he,!0),I[Q+1]=d.getFloat32(he+4,!0),I[Q+2]=d.getFloat32(he+8,!0),A[Q]=X,A[Q+1]=Z,A[Q+2]=se,_&&(E.setRGB(u,h,g,Vt),f[Q]=E.r,f[Q+1]=E.g,f[Q+2]=E.b)}}return P.setAttribute("position",new hn(I,3)),P.setAttribute("normal",new hn(A,3)),_&&(P.setAttribute("color",new hn(f,3)),P.hasColors=!0,P.alpha=b),P}function r(c){const d=new rn,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,f=new RegExp("vertex"+_+_+_,"g"),p=new RegExp("normal"+_+_+_,"g"),x=[],M=[],b=[],N=new z;let L,P=0,I=0,A=0;for(;(L=m.exec(c))!==null;){I=A;const E=L[0],F=(L=h.exec(E))!==null?L[1]:"";for(b.push(F);(L=u.exec(E))!==null;){let Z=0,se=0;const W=L[0];for(;(L=p.exec(W))!==null;)N.x=parseFloat(L[1]),N.y=parseFloat(L[2]),N.z=parseFloat(L[3]),se++;for(;(L=f.exec(W))!==null;)x.push(parseFloat(L[1]),parseFloat(L[2]),parseFloat(L[3])),M.push(N.x,N.y,N.z),Z++,A++;se!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),Z!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const B=I,X=A-I;d.userData.groupNames=b,d.addGroup(B,X,P),P++}return d.setAttribute("position",new Lt(x,3)),d.setAttribute("normal",new Lt(M,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(W){switch(W.image_type){case u:case _:if(W.colormap_length>256||W.colormap_size!==24||W.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case g:case f:case p:if(W.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 "+W.image_type)}if(W.width<=0||W.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(W.pixel_size!==8&&W.pixel_size!==16&&W.pixel_size!==24&&W.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+W.pixel_size)}function n(W,he,Q,xe,De){let Ae,pe;const re=Q.pixel_size>>3,q=Q.width*Q.height*re;if(he&&(pe=De.subarray(xe,xe+=Q.colormap_length*(Q.colormap_size>>3))),W){Ae=new Uint8Array(q);let K,te,ee,fe=0;const Y=new Uint8Array(re);for(;fe<q;)if(K=De[xe++],te=(K&127)+1,K&128){for(ee=0;ee<re;++ee)Y[ee]=De[xe++];for(ee=0;ee<te;++ee)Ae.set(Y,fe+ee*re);fe+=re*te}else{for(te*=re,ee=0;ee<te;++ee)Ae[fe+ee]=De[xe++];fe+=te}}else Ae=De.subarray(xe,xe+=he?Q.width*Q.height:q);return{pixel_data:Ae,palettes:pe}}function i(W,he,Q,xe,De,Ae,pe,re,q){const K=q;let te,ee=0,fe,Y;const me=E.width;for(Y=he;Y!==xe;Y+=Q)for(fe=De;fe!==pe;fe+=Ae,ee++)te=re[ee],W[(fe+me*Y)*4+3]=255,W[(fe+me*Y)*4+2]=K[te*3+0],W[(fe+me*Y)*4+1]=K[te*3+1],W[(fe+me*Y)*4+0]=K[te*3+2];return W}function r(W,he,Q,xe,De,Ae,pe,re){let q,K=0,te,ee;const fe=E.width;for(ee=he;ee!==xe;ee+=Q)for(te=De;te!==pe;te+=Ae,K+=2)q=re[K+0]+(re[K+1]<<8),W[(te+fe*ee)*4+0]=(q&31744)>>7,W[(te+fe*ee)*4+1]=(q&992)>>2,W[(te+fe*ee)*4+2]=(q&31)<<3,W[(te+fe*ee)*4+3]=q&32768?0:255;return W}function o(W,he,Q,xe,De,Ae,pe,re){let q=0,K,te;const ee=E.width;for(te=he;te!==xe;te+=Q)for(K=De;K!==pe;K+=Ae,q+=3)W[(K+ee*te)*4+3]=255,W[(K+ee*te)*4+2]=re[q+0],W[(K+ee*te)*4+1]=re[q+1],W[(K+ee*te)*4+0]=re[q+2];return W}function a(W,he,Q,xe,De,Ae,pe,re){let q=0,K,te;const ee=E.width;for(te=he;te!==xe;te+=Q)for(K=De;K!==pe;K+=Ae,q+=4)W[(K+ee*te)*4+2]=re[q+0],W[(K+ee*te)*4+1]=re[q+1],W[(K+ee*te)*4+0]=re[q+2],W[(K+ee*te)*4+3]=re[q+3];return W}function l(W,he,Q,xe,De,Ae,pe,re){let q,K=0,te,ee;const fe=E.width;for(ee=he;ee!==xe;ee+=Q)for(te=De;te!==pe;te+=Ae,K++)q=re[K],W[(te+fe*ee)*4+0]=q,W[(te+fe*ee)*4+1]=q,W[(te+fe*ee)*4+2]=q,W[(te+fe*ee)*4+3]=255;return W}function c(W,he,Q,xe,De,Ae,pe,re){let q=0,K,te;const ee=E.width;for(te=he;te!==xe;te+=Q)for(K=De;K!==pe;K+=Ae,q+=2)W[(K+ee*te)*4+0]=re[q+0],W[(K+ee*te)*4+1]=re[q+0],W[(K+ee*te)*4+2]=re[q+0],W[(K+ee*te)*4+3]=re[q+1];return W}function d(W,he,Q,xe,De){let Ae,pe,re,q,K,te;switch((E.flags&x)>>M){default:case L:Ae=0,re=1,K=he,pe=0,q=1,te=Q;break;case b:Ae=0,re=1,K=he,pe=Q-1,q=-1,te=-1;break;case P:Ae=he-1,re=-1,K=-1,pe=0,q=1,te=Q;break;case N:Ae=he-1,re=-1,K=-1,pe=Q-1,q=-1,te=-1;break}if(X)switch(E.pixel_size){case 8:l(W,pe,q,te,Ae,re,K,xe);break;case 16:c(W,pe,q,te,Ae,re,K,xe);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(E.pixel_size){case 8:i(W,pe,q,te,Ae,re,K,xe,De);break;case 16:r(W,pe,q,te,Ae,re,K,xe);break;case 24:o(W,pe,q,te,Ae,re,K,xe);break;case 32:a(W,pe,q,te,Ae,re,K,xe);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return W}const m=0,u=1,h=2,g=3,_=9,f=10,p=11,x=48,M=4,b=0,N=1,L=2,P=3;if(e.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let I=0;const A=new Uint8Array(e),E={id_length:A[I++],colormap_type:A[I++],image_type:A[I++],colormap_index:A[I++]|A[I++]<<8,colormap_length:A[I++]|A[I++]<<8,colormap_size:A[I++],origin:[A[I++]|A[I++]<<8,A[I++]|A[I++]<<8],width:A[I++]|A[I++]<<8,height:A[I++]|A[I++]<<8,pixel_size:A[I++],flags:A[I++]};if(t(E),E.id_length+I>e.length)throw new Error("THREE.TGALoader: No data.");I+=E.id_length;let F=!1,B=!1,X=!1;switch(E.image_type){case _:F=!0,B=!0;break;case u:B=!0;break;case f:F=!0;break;case h:break;case p:F=!0,X=!0;break;case g:X=!0;break}const Z=new Uint8Array(E.width*E.height*4),se=n(F,B,E,I,A);return d(Z,E.width,E.height,se.pixel_data,se.palettes),{data:Z,width:E.width,height:E.height,flipY:!0,generateMipmaps:!0,minFilter:Mi}}}class b4 extends ni{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(S,v){const w=[],D=S.childNodes;for(let U=0,ie=D.length;U<ie;U++){const ye=D[U];ye.nodeName===v&&w.push(ye)}return w}function i(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=v[D];return w}function r(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=parseFloat(v[D]);return w}function o(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=parseInt(v[D]);return w}function a(S){return S.substring(1)}function l(){return"three_default_"+kt++}function c(S){return Object.keys(S).length===0}function d(S){return{unit:m(n(S,"unit")[0]),upAxis:u(n(S,"up_axis")[0])}}function m(S){return S!==void 0&&S.hasAttribute("meter")===!0?parseFloat(S.getAttribute("meter")):1}function u(S){return S!==void 0?S.textContent:"Y_UP"}function h(S,v,w,D){const U=n(S,v)[0];if(U!==void 0){const ie=n(U,w);for(let ye=0;ye<ie.length;ye++)D(ie[ye])}}function g(S,v){for(const w in S){const D=S[w];D.build=v(S[w])}}function _(S,v){return S.build!==void 0||(S.build=v(S)),S.build}function f(S){const v={sources:{},samplers:{},channels:{}};let w=!1;for(let D=0,U=S.childNodes.length;D<U;D++){const ie=S.childNodes[D];if(ie.nodeType!==1)continue;let ye;switch(ie.nodeName){case"source":ye=ie.getAttribute("id"),v.sources[ye]=Ne(ie);break;case"sampler":ye=ie.getAttribute("id"),v.samplers[ye]=p(ie);break;case"channel":ye=ie.getAttribute("target"),v.channels[ye]=x(ie);break;case"animation":f(ie),w=!0;break;default:console.log(ie)}}w===!1&&(pt.animations[S.getAttribute("id")||xi.generateUUID()]=v)}function p(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=a(U.getAttribute("source")),ye=U.getAttribute("semantic");v.inputs[ye]=ie;break}}return v}function x(S){const v={};let D=S.getAttribute("target").split("/");const U=D.shift();let ie=D.shift();const ye=ie.indexOf("(")!==-1,Qe=ie.indexOf(".")!==-1;if(Qe)D=ie.split("."),ie=D.shift(),v.member=D.shift();else if(ye){const qe=ie.split("(");ie=qe.shift();for(let nt=0;nt<qe.length;nt++)qe[nt]=parseInt(qe[nt].replace(/\)/,""));v.indices=qe}return v.id=U,v.sid=ie,v.arraySyntax=ye,v.memberSyntax=Qe,v.sampler=a(S.getAttribute("source")),v}function M(S){const v=[],w=S.channels,D=S.samplers,U=S.sources;for(const ie in w)if(w.hasOwnProperty(ie)){const ye=w[ie],Qe=D[ye.sampler],qe=Qe.inputs.INPUT,nt=Qe.inputs.OUTPUT,gt=U[qe],Ue=U[nt],mt=N(ye,gt,Ue);E(mt,v)}return v}function b(S){return _(pt.animations[S],M)}function N(S,v,w){const D=pt.nodes[S.id],U=Ge(D.id),ie=D.transforms[S.sid],ye=D.matrix.clone().transpose();let Qe,qe,nt,gt,Ue,mt;const ut={};switch(ie){case"matrix":for(nt=0,gt=v.array.length;nt<gt;nt++)if(Qe=v.array[nt],qe=nt*w.stride,ut[Qe]===void 0&&(ut[Qe]={}),S.arraySyntax===!0){const Jt=w.array[qe],Zt=S.indices[0]+4*S.indices[1];ut[Qe][Zt]=Jt}else for(Ue=0,mt=w.stride;Ue<mt;Ue++)ut[Qe][Ue]=w.array[qe+Ue];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break}const xt=L(ut,ye);return{name:U.uuid,keyframes:xt}}function L(S,v){const w=[];for(const U in S)w.push({time:parseFloat(U),value:S[U]});w.sort(D);for(let U=0;U<16;U++)F(w,U,v.elements[U]);return w;function D(U,ie){return U.time-ie.time}}const P=new z,I=new z,A=new Un;function E(S,v){const w=S.keyframes,D=S.name,U=[],ie=[],ye=[],Qe=[];for(let qe=0,nt=w.length;qe<nt;qe++){const gt=w[qe],Ue=gt.time,mt=gt.value;C.fromArray(mt).transpose(),C.decompose(P,A,I),U.push(Ue),ie.push(P.x,P.y,P.z),ye.push(A.x,A.y,A.z,A.w),Qe.push(I.x,I.y,I.z)}return ie.length>0&&v.push(new $s(D+".position",U,ie)),ye.length>0&&v.push(new Er(D+".quaternion",U,ye)),Qe.length>0&&v.push(new $s(D+".scale",U,Qe)),v}function F(S,v,w){let D,U=!0,ie,ye;for(ie=0,ye=S.length;ie<ye;ie++)D=S[ie],D.value[v]===void 0?D.value[v]=null:U=!1;if(U===!0)for(ie=0,ye=S.length;ie<ye;ie++)D=S[ie],D.value[v]=w;else B(S,v)}function B(S,v){let w,D;for(let U=0,ie=S.length;U<ie;U++){const ye=S[U];if(ye.value[v]===null){if(w=X(S,U,v),D=Z(S,U,v),w===null){ye.value[v]=D.value[v];continue}if(D===null){ye.value[v]=w.value[v];continue}se(ye,w,D,v)}}}function X(S,v,w){for(;v>=0;){const D=S[v];if(D.value[w]!==null)return D;v--}return null}function Z(S,v,w){for(;v<S.length;){const D=S[v];if(D.value[w]!==null)return D;v++}return null}function se(S,v,w,D){if(w.time-v.time===0){S.value[D]=v.value[D];return}S.value[D]=(S.time-v.time)*(w.value[D]-v.value[D])/(w.time-v.time)+v.value[D]}function W(S){const v={name:S.getAttribute("id")||"default",start:parseFloat(S.getAttribute("start")||0),end:parseFloat(S.getAttribute("end")||0),animations:[]};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"instance_animation":v.animations.push(a(U.getAttribute("url")));break}}pt.clips[S.getAttribute("id")]=v}function he(S){const v=[],w=S.name,D=S.end-S.start||-1,U=S.animations;for(let ie=0,ye=U.length;ie<ye;ie++){const Qe=b(U[ie]);for(let qe=0,nt=Qe.length;qe<nt;qe++)v.push(Qe[qe])}return new hh(w,D,v)}function Q(S){return _(pt.clips[S],he)}function xe(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"skin":v.id=a(U.getAttribute("source")),v.skin=De(U);break;case"morph":v.id=a(U.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}pt.controllers[S.getAttribute("id")]=v}function De(S){const v={sources:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"bind_shape_matrix":v.bindShapeMatrix=r(U.textContent);break;case"source":const ie=U.getAttribute("id");v.sources[ie]=Ne(U);break;case"joints":v.joints=Ae(U);break;case"vertex_weights":v.vertexWeights=pe(U);break}}return v}function Ae(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=U.getAttribute("semantic"),ye=a(U.getAttribute("source"));v.inputs[ie]=ye;break}}return v}function pe(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=U.getAttribute("semantic"),ye=a(U.getAttribute("source")),Qe=parseInt(U.getAttribute("offset"));v.inputs[ie]={id:ye,offset:Qe};break;case"vcount":v.vcount=o(U.textContent);break;case"v":v.v=o(U.textContent);break}}return v}function re(S){const v={id:S.id},w=pt.geometries[v.id];return S.skin!==void 0&&(v.skin=q(S.skin),w.sources.skinIndices=v.skin.indices,w.sources.skinWeights=v.skin.weights),v}function q(S){const w={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},D=S.sources,U=S.vertexWeights,ie=U.vcount,ye=U.v,Qe=U.inputs.JOINT.offset,qe=U.inputs.WEIGHT.offset,nt=S.sources[S.joints.inputs.JOINT],gt=S.sources[S.joints.inputs.INV_BIND_MATRIX],Ue=D[U.inputs.WEIGHT.id].array;let mt=0,ut,xt,ct;for(ut=0,ct=ie.length;ut<ct;ut++){const Zt=ie[ut],Gt=[];for(xt=0;xt<Zt;xt++){const Wt=ye[mt+Qe],di=ye[mt+qe],Ln=Ue[di];Gt.push({index:Wt,weight:Ln}),mt+=2}for(Gt.sort(Jt),xt=0;xt<4;xt++){const Wt=Gt[xt];Wt!==void 0?(w.indices.array.push(Wt.index),w.weights.array.push(Wt.weight)):(w.indices.array.push(0),w.weights.array.push(0))}}for(S.bindShapeMatrix?w.bindMatrix=new Mt().fromArray(S.bindShapeMatrix).transpose():w.bindMatrix=new Mt().identity(),ut=0,ct=nt.array.length;ut<ct;ut++){const Zt=nt.array[ut],Gt=new Mt().fromArray(gt.array,ut*gt.stride).transpose();w.joints.push({name:Zt,boneInverse:Gt})}return w;function Jt(Zt,Gt){return Gt.weight-Zt.weight}}function K(S){return _(pt.controllers[S],re)}function te(S){const v={init_from:n(S,"init_from")[0].textContent};pt.images[S.getAttribute("id")]=v}function ee(S){return S.build!==void 0?S.build:S.init_from}function fe(S){const v=pt.images[S];return v!==void 0?_(v,ee):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",S),null)}function Y(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"profile_COMMON":v.profile=me(U);break}}pt.effects[S.getAttribute("id")]=v}function me(S){const v={surfaces:{},samplers:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"newparam":Te(U,v);break;case"technique":v.technique=O(U);break;case"extra":v.extra=Le(U);break}}return v}function Te(S,v){const w=S.getAttribute("sid");for(let D=0,U=S.childNodes.length;D<U;D++){const ie=S.childNodes[D];if(ie.nodeType===1)switch(ie.nodeName){case"surface":v.surfaces[w]=et(ie);break;case"sampler2D":v.samplers[w]=We(ie);break}}}function et(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"init_from":v.init_from=U.textContent;break}}return v}function We(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"source":v.source=U.textContent;break}}return v}function O(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"constant":case"lambert":case"blinn":case"phong":v.type=U.nodeName,v.parameters=dt(U);break;case"extra":v.extra=Le(U);break}}return v}function dt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":v[U.nodeName]=st(U);break;case"transparent":v[U.nodeName]={opaque:U.hasAttribute("opaque")?U.getAttribute("opaque"):"A_ONE",data:st(U)};break}}return v}function st(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"color":v[U.nodeName]=r(U.textContent);break;case"float":v[U.nodeName]=parseFloat(U.textContent);break;case"texture":v[U.nodeName]={id:U.getAttribute("texture"),extra:it(U)};break}}return v}function it(S){const v={technique:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"extra":Ie(U,v);break}}return v}function Ie(S,v){for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique":Ze(U,v);break}}}function Ze(S,v){for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":v.technique[U.nodeName]=parseFloat(U.textContent);break;case"wrapU":case"wrapV":U.textContent.toUpperCase()==="TRUE"?v.technique[U.nodeName]=1:U.textContent.toUpperCase()==="FALSE"?v.technique[U.nodeName]=0:v.technique[U.nodeName]=parseInt(U.textContent);break;case"bump":v[U.nodeName]=Xt(U);break}}}function Le(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique":v.technique=rt(U);break}}return v}function rt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"double_sided":v[U.nodeName]=parseInt(U.textContent);break;case"bump":v[U.nodeName]=Xt(U);break}}return v}function Xt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"texture":v[U.nodeName]={id:U.getAttribute("texture"),texcoord:U.getAttribute("texcoord"),extra:it(U)};break}}return v}function k(S){return S}function R(S){return _(pt.effects[S],k)}function oe(S){const v={name:S.getAttribute("name")};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"instance_effect":v.url=a(U.getAttribute("url"));break}}pt.materials[S.getAttribute("id")]=v}function we(S){let v,w=S.slice((S.lastIndexOf(".")-1>>>0)+2);switch(w=w.toLowerCase(),w){case"tga":v=Ht;break;default:v=$t}return v}function Pe(S){const v=R(S.url),w=v.profile.technique;let D;switch(w.type){case"phong":case"blinn":D=new ln;break;case"lambert":D=new C1;break;default:D=new Gi;break}D.name=S.name||"";function U(qe,nt=null){const gt=v.profile.samplers[qe.id];let Ue=null;if(gt!==void 0){const mt=v.profile.surfaces[gt.source];Ue=fe(mt.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),Ue=fe(qe.id);if(Ue!==null){const mt=we(Ue);if(mt!==void 0){const ut=mt.load(Ue),xt=qe.extra;if(xt!==void 0&&xt.technique!==void 0&&c(xt.technique)===!1){const ct=xt.technique;ut.wrapS=ct.wrapU?oi:ei,ut.wrapT=ct.wrapV?oi:ei,ut.offset.set(ct.offsetU||0,ct.offsetV||0),ut.repeat.set(ct.repeatU||1,ct.repeatV||1)}else ut.wrapS=oi,ut.wrapT=oi;return nt!==null&&(ut.colorSpace=nt),ut}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 ie=w.parameters;for(const qe in ie){const nt=ie[qe];switch(qe){case"diffuse":nt.color&&D.color.fromArray(nt.color),nt.texture&&(D.map=U(nt.texture,Vt));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,Vt));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,Vt));break}}Bt.colorSpaceToWorking(D.color,Vt),D.specular&&Bt.colorSpaceToWorking(D.specular,Vt),D.emissive&&Bt.colorSpaceToWorking(D.emissive,Vt);let ye=ie.transparent,Qe=ie.transparency;if(Qe===void 0&&ye&&(Qe={float:1}),ye===void 0&&Qe&&(ye={opaque:"A_ONE",data:{color:[1,1,1,1]}}),ye&&Qe)if(ye.data.texture)D.transparent=!0;else{const qe=ye.data.color;switch(ye.opaque){case"A_ONE":D.opacity=qe[3]*Qe.float;break;case"RGB_ZERO":D.opacity=1-qe[0]*Qe.float;break;case"A_ZERO":D.opacity=1-qe[3]*Qe.float;break;case"RGB_ONE":D.opacity=qe[0]*Qe.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',ye.opaque)}D.opacity<1&&(D.transparent=!0)}if(w.extra!==void 0&&w.extra.technique!==void 0){const qe=w.extra.technique;for(const nt in qe){const gt=qe[nt];switch(nt){case"double_sided":D.side=gt===1?cn:Yn;break;case"bump":D.normalMap=U(gt.texture),D.normalScale=new Je(1,1);break}}}return D}function be(S){return _(pt.materials[S],Pe)}function _t(S){const v={name:S.getAttribute("name")};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"optics":v.optics=Ke(U);break}}pt.cameras[S.getAttribute("id")]=v}function Ke(S){for(let v=0;v<S.childNodes.length;v++){const w=S.childNodes[v];switch(w.nodeName){case"technique_common":return ft(w)}}return{}}function ft(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"perspective":case"orthographic":v.technique=D.nodeName,v.parameters=vt(D);break}}return v}function vt(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":v[D.nodeName]=parseFloat(D.textContent);break}}return v}function Fe(S){let v;switch(S.optics.technique){case"perspective":v=new gn(S.optics.parameters.yfov,S.optics.parameters.aspect_ratio,S.optics.parameters.znear,S.optics.parameters.zfar);break;case"orthographic":let w=S.optics.parameters.ymag,D=S.optics.parameters.xmag;const U=S.optics.parameters.aspect_ratio;D=D===void 0?w*U:D,w=w===void 0?D/U:w,D*=.5,w*=.5,v=new Ha(-D,D,w,-w,S.optics.parameters.znear,S.optics.parameters.zfar);break;default:v=new gn;break}return v.name=S.name||"",v}function at(S){const v=pt.cameras[S];return v!==void 0?_(v,Fe):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",S),null)}function Et(S){let v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique_common":v=St(U);break}}pt.lights[S.getAttribute("id")]=v}function St(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"directional":case"point":case"spot":case"ambient":v.technique=U.nodeName,v.parameters=$e(U)}}return v}function $e(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"color":const ie=r(U.textContent);v.color=new bt().fromArray(ie),Bt.colorSpaceToWorking(v.color,Vt);break;case"falloff_angle":v.falloffAngle=parseFloat(U.textContent);break;case"quadratic_attenuation":const ye=parseFloat(U.textContent);v.distance=ye?Math.sqrt(1/ye):0;break}}return v}function At(S){let v;switch(S.technique){case"directional":v=new gr;break;case"point":v=new Pa;break;case"spot":v=new G1;break;case"ambient":v=new cc;break}return S.parameters.color&&v.color.copy(S.parameters.color),S.parameters.distance&&(v.distance=S.parameters.distance),v}function J(S){const v=pt.lights[S];return v!==void 0?_(v,At):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",S),null)}function tt(S){const v={name:S.getAttribute("name"),sources:{},vertices:{},primitives:[]},w=n(S,"mesh")[0];if(w!==void 0){for(let D=0;D<w.childNodes.length;D++){const U=w.childNodes[D];if(U.nodeType!==1)continue;const ie=U.getAttribute("id");switch(U.nodeName){case"source":v.sources[ie]=Ne(U);break;case"vertices":v.vertices=lt(U);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",U.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":v.primitives.push(ke(U));break;default:console.log(U)}}pt.geometries[S.getAttribute("id")]=v}}function Ne(S){const v={array:[],stride:3};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"float_array":v.array=r(D.textContent);break;case"Name_array":v.array=i(D.textContent);break;case"technique_common":const U=n(D,"accessor")[0];U!==void 0&&(v.stride=parseInt(U.getAttribute("stride")));break}}return v}function lt(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];D.nodeType===1&&(v[D.getAttribute("semantic")]=a(D.getAttribute("source")))}return v}function ke(S){const v={type:S.nodeName,material:S.getAttribute("material"),count:parseInt(S.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=a(U.getAttribute("source")),ye=U.getAttribute("semantic"),Qe=parseInt(U.getAttribute("offset")),qe=parseInt(U.getAttribute("set")),nt=qe>0?ye+qe:ye;v.inputs[nt]={id:ie,offset:Qe},v.stride=Math.max(v.stride,Qe+1),ye==="TEXCOORD"&&(v.hasUV=!0);break;case"vcount":v.vcount=o(U.textContent);break;case"p":v.p=o(U.textContent);break}}return v}function Re(S){const v={};for(let w=0;w<S.length;w++){const D=S[w];v[D.type]===void 0&&(v[D.type]=[]),v[D.type].push(D)}return v}function ot(S){let v=0;for(let w=0,D=S.length;w<D;w++)S[w].hasUV===!0&&v++;v>0&&v<S.length&&(S.uvsNeedsFix=!0)}function Tt(S){const v={},w=S.sources,D=S.vertices,U=S.primitives;if(U.length===0)return{};const ie=Re(U);for(const ye in ie){const Qe=ie[ye];ot(Qe),v[ye]=qt(Qe,w,D)}return v}function qt(S,v,w){const D={},U={array:[],stride:0},ie={array:[],stride:0},ye={array:[],stride:0},Qe={array:[],stride:0},qe={array:[],stride:0},nt={array:[],stride:4},gt={array:[],stride:4},Ue=new rn,mt=[];let ut=0;for(let xt=0;xt<S.length;xt++){const ct=S[xt],Jt=ct.inputs;let Zt=0;switch(ct.type){case"lines":case"linestrips":Zt=ct.count*2;break;case"triangles":Zt=ct.count*3;break;case"polylist":for(let Gt=0;Gt<ct.count;Gt++){const Wt=ct.vcount[Gt];switch(Wt){case 3:Zt+=3;break;case 4:Zt+=6;break;default:Zt+=(Wt-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",ct.type)}Ue.addGroup(ut,Zt,xt),ut+=Zt,ct.material&&mt.push(ct.material);for(const Gt in Jt){const Wt=Jt[Gt];switch(Gt){case"VERTEX":for(const di in w){const Ln=w[di];switch(di){case"POSITION":const ps=U.array.length;if(Rt(ct,v[Ln],Wt.offset,U.array),U.stride=v[Ln].stride,v.skinWeights&&v.skinIndices&&(Rt(ct,v.skinIndices,Wt.offset,nt.array),Rt(ct,v.skinWeights,Wt.offset,gt.array)),ct.hasUV===!1&&S.uvsNeedsFix===!0){const Au=(U.array.length-ps)/U.stride;for(let _c=0;_c<Au;_c++)ye.array.push(0,0)}break;case"NORMAL":Rt(ct,v[Ln],Wt.offset,ie.array),ie.stride=v[Ln].stride;break;case"COLOR":Rt(ct,v[Ln],Wt.offset,qe.array),qe.stride=v[Ln].stride;break;case"TEXCOORD":Rt(ct,v[Ln],Wt.offset,ye.array),ye.stride=v[Ln].stride;break;case"TEXCOORD1":Rt(ct,v[Ln],Wt.offset,Qe.array),ye.stride=v[Ln].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',di)}}break;case"NORMAL":Rt(ct,v[Wt.id],Wt.offset,ie.array),ie.stride=v[Wt.id].stride;break;case"COLOR":Rt(ct,v[Wt.id],Wt.offset,qe.array,!0),qe.stride=v[Wt.id].stride;break;case"TEXCOORD":Rt(ct,v[Wt.id],Wt.offset,ye.array),ye.stride=v[Wt.id].stride;break;case"TEXCOORD1":Rt(ct,v[Wt.id],Wt.offset,Qe.array),Qe.stride=v[Wt.id].stride;break}}}return U.array.length>0&&Ue.setAttribute("position",new Lt(U.array,U.stride)),ie.array.length>0&&Ue.setAttribute("normal",new Lt(ie.array,ie.stride)),qe.array.length>0&&Ue.setAttribute("color",new Lt(qe.array,qe.stride)),ye.array.length>0&&Ue.setAttribute("uv",new Lt(ye.array,ye.stride)),Qe.array.length>0&&Ue.setAttribute("uv1",new Lt(Qe.array,Qe.stride)),nt.array.length>0&&Ue.setAttribute("skinIndex",new Lt(nt.array,nt.stride)),gt.array.length>0&&Ue.setAttribute("skinWeight",new Lt(gt.array,gt.stride)),D.data=Ue,D.type=S[0].type,D.materialKeys=mt,D}function Rt(S,v,w,D,U=!1){const ie=S.p,ye=S.stride,Qe=S.vcount;function qe(Ue){let mt=ie[Ue+w]*gt;const ut=mt+gt;for(;mt<ut;mt++)D.push(nt[mt]);if(U){const xt=D.length-gt-1;Yt.setRGB(D[xt+0],D[xt+1],D[xt+2],Vt),D[xt+0]=Yt.r,D[xt+1]=Yt.g,D[xt+2]=Yt.b}}const nt=v.array,gt=v.stride;if(S.vcount!==void 0){let Ue=0;for(let mt=0,ut=Qe.length;mt<ut;mt++){const xt=Qe[mt];if(xt===4){const ct=Ue+ye*0,Jt=Ue+ye*1,Zt=Ue+ye*2,Gt=Ue+ye*3;qe(ct),qe(Jt),qe(Gt),qe(Jt),qe(Zt),qe(Gt)}else if(xt===3){const ct=Ue+ye*0,Jt=Ue+ye*1,Zt=Ue+ye*2;qe(ct),qe(Jt),qe(Zt)}else if(xt>4)for(let ct=1,Jt=xt-2;ct<=Jt;ct++){const Zt=Ue+ye*0,Gt=Ue+ye*ct,Wt=Ue+ye*(ct+1);qe(Zt),qe(Gt),qe(Wt)}Ue+=ye*xt}}else for(let Ue=0,mt=ie.length;Ue<mt;Ue+=ye)qe(Ue)}function bn(S){return _(pt.geometries[S],Tt)}function In(S){const v={name:S.getAttribute("name")||"",joints:{},links:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"technique_common":zn(D,v);break}}pt.kinematicsModels[S.getAttribute("id")]=v}function us(S){return S.build!==void 0?S.build:S}function ds(S){return _(pt.kinematicsModels[S],us)}function zn(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"joint":v.joints[D.getAttribute("sid")]=Xi(D);break;case"link":v.links.push(ji(D));break}}}function Xi(S){let v;for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"prismatic":case"revolute":v=fs(D);break}}return v}function fs(S){const v={sid:S.getAttribute("sid"),name:S.getAttribute("name")||"",axis:new z,limits:{min:0,max:0},type:S.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=r(D.textContent);v.axis.fromArray(U);break;case"limits":const ie=D.getElementsByTagName("max")[0],ye=D.getElementsByTagName("min")[0];v.limits.max=parseFloat(ie.textContent),v.limits.min=parseFloat(ye.textContent);break}}return v.limits.min>=v.limits.max&&(v.static=!0),v.middlePosition=(v.limits.min+v.limits.max)/2,v}function ji(S){const v={sid:S.getAttribute("sid"),name:S.getAttribute("name")||"",attachments:[],transforms:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"attachment_full":v.attachments.push(ui(D));break;case"matrix":case"translate":case"rotate":v.transforms.push(qi(D));break}}return v}function ui(S){const v={joint:S.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"link":v.links.push(ji(D));break;case"matrix":case"translate":case"rotate":v.transforms.push(qi(D));break}}return v}function qi(S){const v={type:S.nodeName},w=r(S.textContent);switch(v.type){case"matrix":v.obj=new Mt,v.obj.fromArray(w).transpose();break;case"translate":v.obj=new z,v.obj.fromArray(w);break;case"rotate":v.obj=new z,v.obj.fromArray(w),v.angle=xi.degToRad(w[3]);break}return v}function $(S){const v={name:S.getAttribute("name")||"",rigidBodies:{}};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"rigid_body":v.rigidBodies[D.getAttribute("name")]={},H(D,v.rigidBodies[D.getAttribute("name")]);break}}pt.physicsModels[S.getAttribute("id")]=v}function H(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"technique_common":ae(D,v);break}}}function ae(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"inertia":v.inertia=r(D.textContent);break;case"mass":v.mass=r(D.textContent)[0];break}}}function ue(S){const v={bindJointAxis:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"bind_joint_axis":v.bindJointAxis.push(ve(D));break}}pt.kinematicsScenes[a(S.getAttribute("url"))]=v}function ve(S){const v={target:S.getAttribute("target").split("/").pop()};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=D.getElementsByTagName("param")[0];v.axis=U.textContent;const ie=v.axis.split("inst_").pop().split("axis")[0];v.jointIndex=ie.substring(0,ie.length-1);break}}return v}function ge(S){return S.build!==void 0?S.build:S}function ze(S){return _(pt.kinematicsScenes[S],ge)}function Se(){const S=Object.keys(pt.kinematicsModels)[0],v=Object.keys(pt.kinematicsScenes)[0],w=Object.keys(pt.visualScenes)[0];if(S===void 0||v===void 0)return;const D=ds(S),U=ze(v),ie=je(w),ye=U.bindJointAxis,Qe={};for(let gt=0,Ue=ye.length;gt<Ue;gt++){const mt=ye[gt],ut=wt.querySelector('[sid="'+mt.target+'"]');if(ut){const xt=ut.parentElement;qe(mt.jointIndex,xt)}}function qe(gt,Ue){const mt=Ue.getAttribute("name"),ut=D.joints[gt];ie.traverse(function(xt){xt.name===mt&&(Qe[gt]={object:xt,transforms:Ce(Ue),joint:ut,position:ut.zeroPosition})})}const nt=new Mt;Kt={joints:D&&D.joints,getJointValue:function(gt){const Ue=Qe[gt];if(Ue)return Ue.position;console.warn("THREE.ColladaLoader: Joint "+gt+" doesn't exist.")},setJointValue:function(gt,Ue){const mt=Qe[gt];if(mt){const ut=mt.joint;if(Ue>ut.limits.max||Ue<ut.limits.min)console.warn("THREE.ColladaLoader: Joint "+gt+" value "+Ue+" outside of limits (min: "+ut.limits.min+", max: "+ut.limits.max+").");else if(ut.static)console.warn("THREE.ColladaLoader: Joint "+gt+" is static.");else{const xt=mt.object,ct=ut.axis,Jt=mt.transforms;C.identity();for(let Zt=0;Zt<Jt.length;Zt++){const Gt=Jt[Zt];if(Gt.sid&&Gt.sid.indexOf(gt)!==-1)switch(ut.type){case"revolute":C.multiply(nt.makeRotationAxis(ct,xi.degToRad(Ue)));break;case"prismatic":C.multiply(nt.makeTranslation(ct.x*Ue,ct.y*Ue,ct.z*Ue));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+ut.type);break}else switch(Gt.type){case"matrix":C.multiply(Gt.obj);break;case"translate":C.multiply(nt.makeTranslation(Gt.obj.x,Gt.obj.y,Gt.obj.z));break;case"scale":C.scale(Gt.obj);break;case"rotate":C.multiply(nt.makeRotationAxis(Gt.obj,Gt.angle));break}}xt.matrix.copy(C),xt.matrix.decompose(xt.position,xt.quaternion,xt.scale),Qe[gt].position=Ue}}else console.log("THREE.ColladaLoader: "+gt+" does not exist.")}}}function Ce(S){const v=[],w=wt.querySelector('[id="'+S.id+'"]');for(let D=0;D<w.childNodes.length;D++){const U=w.childNodes[D];if(U.nodeType!==1)continue;let ie,ye;switch(U.nodeName){case"matrix":ie=r(U.textContent);const Qe=new Mt().fromArray(ie).transpose();v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:Qe});break;case"translate":case"scale":ie=r(U.textContent),ye=new z().fromArray(ie),v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:ye});break;case"rotate":ie=r(U.textContent),ye=new z().fromArray(ie);const qe=xi.degToRad(ie[3]);v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:ye,angle:qe});break}}return v}function T(S){const v=S.getElementsByTagName("node");for(let w=0;w<v.length;w++){const D=v[w];D.hasAttribute("id")===!1&&D.setAttribute("id",l())}}const C=new Mt,V=new z;function j(S){const v={name:S.getAttribute("name")||"",type:S.getAttribute("type"),id:S.getAttribute("id"),sid:S.getAttribute("sid"),matrix:new Mt,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType!==1)continue;let U;switch(D.nodeName){case"node":v.nodes.push(D.getAttribute("id")),j(D);break;case"instance_camera":v.instanceCameras.push(a(D.getAttribute("url")));break;case"instance_controller":v.instanceControllers.push(G(D));break;case"instance_light":v.instanceLights.push(a(D.getAttribute("url")));break;case"instance_geometry":v.instanceGeometries.push(G(D));break;case"instance_node":v.instanceNodes.push(a(D.getAttribute("url")));break;case"matrix":U=r(D.textContent),v.matrix.multiply(C.fromArray(U).transpose()),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"translate":U=r(D.textContent),V.fromArray(U),v.matrix.multiply(C.makeTranslation(V.x,V.y,V.z)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"rotate":U=r(D.textContent);const ie=xi.degToRad(U[3]);v.matrix.multiply(C.makeRotationAxis(V.fromArray(U),ie)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"scale":U=r(D.textContent),v.matrix.scale(V.fromArray(U)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"extra":break;default:console.log(D)}}return de(v.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",v.id):pt.nodes[v.id]=v,v}function G(S){const v={id:a(S.getAttribute("url")),materials:{},skeletons:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"bind_material":const U=D.getElementsByTagName("instance_material");for(let ie=0;ie<U.length;ie++){const ye=U[ie],Qe=ye.getAttribute("symbol"),qe=ye.getAttribute("target");v.materials[Qe]=a(qe)}break;case"skeleton":v.skeletons.push(a(D.textContent));break}}return v}function le(S,v){const w=[],D=[];let U,ie,ye;for(U=0;U<S.length;U++){const nt=S[U];let gt;if(de(nt))gt=Ge(nt),Me(gt,v,w);else if(He(nt)){const mt=pt.visualScenes[nt].children;for(let ut=0;ut<mt.length;ut++){const xt=mt[ut];if(xt.type==="JOINT"){const ct=Ge(xt.id);Me(ct,v,w)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",nt)}for(U=0;U<v.length;U++)for(ie=0;ie<w.length;ie++)if(ye=w[ie],ye.bone.name===v[U].name){D[U]=ye,ye.processed=!0;break}for(U=0;U<w.length;U++)ye=w[U],ye.processed===!1&&(D.push(ye),ye.processed=!0);const Qe=[],qe=[];for(U=0;U<D.length;U++)ye=D[U],Qe.push(ye.bone),qe.push(ye.boneInverse);return new tc(Qe,qe)}function Me(S,v,w){S.traverse(function(D){if(D.isBone===!0){let U;for(let ie=0;ie<v.length;ie++){const ye=v[ie];if(ye.name===D.name){U=ye.boneInverse;break}}U===void 0&&(U=new Mt),w.push({bone:D,boneInverse:U,processed:!1})}})}function _e(S){const v=[],w=S.matrix,D=S.nodes,U=S.type,ie=S.instanceCameras,ye=S.instanceControllers,Qe=S.instanceLights,qe=S.instanceGeometries,nt=S.instanceNodes;for(let Ue=0,mt=D.length;Ue<mt;Ue++)v.push(Ge(D[Ue]));for(let Ue=0,mt=ie.length;Ue<mt;Ue++){const ut=at(ie[Ue]);ut!==null&&v.push(ut.clone())}for(let Ue=0,mt=ye.length;Ue<mt;Ue++){const ut=ye[Ue],xt=K(ut.id),ct=bn(xt.id),Jt=Oe(ct,ut.materials),Zt=ut.skeletons,Gt=xt.skin.joints,Wt=le(Zt,Gt);for(let di=0,Ln=Jt.length;di<Ln;di++){const ps=Jt[di];ps.isSkinnedMesh&&(ps.bind(Wt,xt.skin.bindMatrix),ps.normalizeSkinWeights()),v.push(ps)}}for(let Ue=0,mt=Qe.length;Ue<mt;Ue++){const ut=J(Qe[Ue]);ut!==null&&v.push(ut.clone())}for(let Ue=0,mt=qe.length;Ue<mt;Ue++){const ut=qe[Ue],xt=bn(ut.id),ct=Oe(xt,ut.materials);for(let Jt=0,Zt=ct.length;Jt<Zt;Jt++)v.push(ct[Jt])}for(let Ue=0,mt=nt.length;Ue<mt;Ue++)v.push(Ge(nt[Ue]).clone());let gt;if(D.length===0&&v.length===1)gt=v[0];else{gt=U==="JOINT"?new k0:new An;for(let Ue=0;Ue<v.length;Ue++)gt.add(v[Ue])}return gt.name=U==="JOINT"?S.sid:S.name,gt.matrix.copy(w),gt.matrix.decompose(gt.position,gt.quaternion,gt.scale),gt}const ce=new Gi({name:ni.DEFAULT_MATERIAL_NAME,color:16711935});function ne(S,v){const w=[];for(let D=0,U=S.length;D<U;D++){const ie=v[S[D]];ie===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",S[D]),w.push(ce)):w.push(be(ie))}return w}function Oe(S,v){const w=[];for(const D in S){const U=S[D],ie=ne(U.materialKeys,v);if(ie.length===0&&(D==="lines"||D==="linestrips"?ie.push(new Ai):ie.push(new ln)),D==="lines"||D==="linestrips")for(let nt=0,gt=ie.length;nt<gt;nt++){const Ue=ie[nt];if(Ue.isMeshPhongMaterial===!0||Ue.isMeshLambertMaterial===!0){const mt=new Ai;mt.color.copy(Ue.color),mt.opacity=Ue.opacity,mt.transparent=Ue.transparent,ie[nt]=mt}}const ye=U.data.attributes.skinIndex!==void 0,Qe=ie.length===1?ie[0]:ie;let qe;switch(D){case"lines":qe=new Ra(U.data,Qe);break;case"linestrips":qe=new Ba(U.data,Qe);break;case"triangles":case"polylist":ye?qe=new o1(U.data,Qe):qe=new Pt(U.data,Qe);break}w.push(qe)}return w}function de(S){return pt.nodes[S]!==void 0}function Ge(S){return _(pt.nodes[S],_e)}function Ee(S){const v={name:S.getAttribute("name"),children:[]};T(S);const w=n(S,"node");for(let D=0;D<w.length;D++)v.children.push(j(w[D]));pt.visualScenes[S.getAttribute("id")]=v}function ht(S){const v=new An;v.name=S.name;const w=S.children;for(let D=0;D<w.length;D++){const U=w[D];v.add(Ge(U.id))}return v}function He(S){return pt.visualScenes[S]!==void 0}function je(S){return _(pt.visualScenes[S],ht)}function Xe(S){const v=n(S,"instance_visual_scene")[0];return je(a(v.getAttribute("url")))}function Dt(){const S=pt.clips;if(c(S)===!0){if(c(pt.animations)===!1){const v=[];for(const w in pt.animations){const D=b(w);for(let U=0,ie=D.length;U<ie;U++)v.push(D[U])}Be.push(new hh("default",-1,v))}}else for(const v in S)Be.push(Q(v))}function yt(S){let v="";const w=[S];for(;w.length;){const D=w.shift();D.nodeType===Node.TEXT_NODE?v+=D.textContent:(v+=`
|
|
4198
|
-
`,w.push(...D.childNodes))}return v.trim()}if(e.length===0)return{scene:new Ia};const
|
|
4199
|
-
`,v),null}const an=wt.getAttribute("version");console.debug("THREE.ColladaLoader: File version",an);const Nt=d(n(wt,"asset")[0]),$t=new oc(this.manager);$t.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);let Ht;r0&&(Ht=new r0(this.manager),Ht.setPath(this.resourcePath||t));const Yt=new bt,Be=[];let Kt={},kt=0;const pt={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(wt,"library_animations","animation",f),h(wt,"library_animation_clips","animation_clip",W),h(wt,"library_controllers","controller",xe),h(wt,"library_images","image",te),h(wt,"library_effects","effect",Y),h(wt,"library_materials","material",oe),h(wt,"library_cameras","camera",_t),h(wt,"library_lights","light",Et),h(wt,"library_geometries","geometry",tt),h(wt,"library_nodes","node",j),h(wt,"library_visual_scenes","visual_scene",Ee),h(wt,"library_kinematics_models","kinematics_model",In),h(wt,"library_physics_models","physics_model",$),h(wt,"scene","instance_kinematics_scene",ue),g(pt.animations,M),g(pt.clips,he),g(pt.controllers,re),g(pt.images,ee),g(pt.effects,k),g(pt.materials,Pe),g(pt.cameras,Fe),g(pt.lights,At),g(pt.geometries,Tt),g(pt.visualScenes,ht),Dt(),Se();const Gn=Xe(n(wt,"scene")[0]);return Gn.animations=Be,Nt.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."),Gn.rotation.set(-Math.PI/2,0,0)),Gn.scale.multiplyScalar(Nt.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),Be},kinematics:Kt,library:pt,scene:Gn}}}const a0=new z,S4=new _n,ca=new Mt,zi=new Mt,ha=new Un,ua=new z(1,1,1),da=new z;class Wa extends sn{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 z(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 z(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],zi.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),zi.premultiply(ca),this.position.setFromMatrixPosition(zi),this.rotation.setFromRotationMatrix(zi),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],zi.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),zi.premultiply(ca),this.position.setFromMatrixPosition(zi),this.rotation.setFromRotationMatrix(zi),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 Un,l0=new _n;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(x){if(!/^package:\/\//.test(x))return t?t+x:x;const[M,b]=x.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof n=="string")return n.endsWith(M)?n+"/"+b:n+"/"+M+"/"+b;if(n instanceof Function)return n(M)+"/"+b;if(typeof n=="object")return M in n?n[M]+"/"+b:(console.error(`URDFLoader : ${M} not found in provided package list.`),null)}function u(x){let M;x instanceof Document?M=[...x.children]:x instanceof Element?M=[x]:M=[...new DOMParser().parseFromString(x,"text/xml").children];const b=M.filter(N=>N.nodeName==="robot").pop();return h(b)}function h(x){const M=[...x.children],b=M.filter(F=>F.nodeName.toLowerCase()==="link"),N=M.filter(F=>F.nodeName.toLowerCase()==="joint"),L=M.filter(F=>F.nodeName.toLowerCase()==="material"),P=new w4;P.robotName=x.getAttribute("name"),P.urdfRobotNode=x,L.forEach(F=>{const B=F.getAttribute("name");d[B]=f(F)});const I={},A={};b.forEach(F=>{const B=F.getAttribute("name"),X=x.querySelector(`child[link="${B}"]`)===null;l[B]=_(F,I,A,X?P:null)}),N.forEach(F=>{const B=F.getAttribute("name");c[B]=g(F)}),P.joints=c,P.links=l,P.colliders=A,P.visual=I;const E=Object.values(c);return E.forEach(F=>{F instanceof o0&&c[F.mimicJoint].mimicJoints.push(F)}),E.forEach(F=>{const B=new Set,X=Z=>{if(B.has(Z))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");B.add(Z),Z.mimicJoints.forEach(se=>{X(se)})};X(F)}),P.frames={...A,...I,...l,...c},P}function g(x){const M=[...x.children],b=x.getAttribute("type");let N;const L=M.find(B=>B.nodeName.toLowerCase()==="mimic");L?(N=new o0,N.mimicJoint=L.getAttribute("joint"),N.multiplier=parseFloat(L.getAttribute("multiplier")||1),N.offset=parseFloat(L.getAttribute("offset")||0)):N=new fu,N.urdfNode=x,N.name=x.getAttribute("name"),N.urdfName=N.name,N.jointType=b;let P=null,I=null,A=[0,0,0],E=[0,0,0];M.forEach(B=>{const X=B.nodeName.toLowerCase();X==="origin"?(A=Ns(B.getAttribute("xyz")),E=Ns(B.getAttribute("rpy"))):X==="child"?I=l[B.getAttribute("link")]:X==="parent"?P=l[B.getAttribute("link")]:X==="limit"&&(N.limit.lower=parseFloat(B.getAttribute("lower")||N.limit.lower),N.limit.upper=parseFloat(B.getAttribute("upper")||N.limit.upper))}),P.add(N),N.add(I),c0(N,E),N.position.set(A[0],A[1],A[2]);const F=M.filter(B=>B.nodeName.toLowerCase()==="axis")[0];if(F){const B=F.getAttribute("xyz").split(/\s+/g).map(X=>parseFloat(X));N.axis=new z(B[0],B[1],B[2]),N.axis.normalize()}return N}function _(x,M,b,N=null){N===null&&(N=new du);const L=[...x.children];return N.name=x.getAttribute("name"),N.urdfName=N.name,N.urdfNode=x,r&&L.filter(I=>I.nodeName.toLowerCase()==="visual").forEach(I=>{const A=p(I,d);if(N.add(A),I.hasAttribute("name")){const E=I.getAttribute("name");A.name=E,A.urdfName=E,M[E]=A}}),o&&L.filter(I=>I.nodeName.toLowerCase()==="collision").forEach(I=>{const A=p(I);if(N.add(A),I.hasAttribute("name")){const E=I.getAttribute("name");A.name=E,A.urdfName=E,b[E]=A}}),N}function f(x){const M=[...x.children],b=new ln;return b.name=x.getAttribute("name")||"",M.forEach(N=>{const L=N.nodeName.toLowerCase();if(L==="color"){const P=N.getAttribute("rgba").split(/\s/g).map(I=>parseFloat(I));b.color.setRGB(P[0],P[1],P[2]),b.opacity=P[3],b.transparent=P[3]<1,b.depthWrite=!b.transparent}else if(L==="texture"){const P=N.getAttribute("filename");if(P){const I=new oc(a),A=m(P);b.map=I.load(A),b.map.colorSpace=Vt}}}),b}function p(x,M={}){const b=x.nodeName.toLowerCase()==="collision",N=[...x.children];let L=null;const P=N.filter(A=>A.nodeName.toLowerCase()==="material")[0];if(P){const A=P.getAttribute("name");A&&A in M?L=M[A]:L=f(P)}else L=new ln;const I=b?new E4:new A4;return I.urdfNode=x,N.forEach(A=>{const E=A.nodeName.toLowerCase();if(E==="geometry"){const F=A.children[0].nodeName.toLowerCase();if(F==="mesh"){const B=A.children[0].getAttribute("filename"),X=m(B);if(X!==null){const Z=A.children[0].getAttribute("scale");if(Z){const se=Ns(Z);I.scale.set(se[0],se[1],se[2])}i(X,a,(se,W)=>{W?console.error("URDFLoader: Error loading mesh.",W):se&&(se instanceof Pt&&(se.material=L),se.position.set(0,0,0),se.quaternion.identity(),I.add(se))})}}else if(F==="box"){const B=new Pt;B.geometry=new Wi(1,1,1),B.material=L;const X=Ns(A.children[0].getAttribute("size"));B.scale.set(X[0],X[1],X[2]),I.add(B)}else if(F==="sphere"){const B=new Pt;B.geometry=new Oa(1,30,30),B.material=L;const X=parseFloat(A.children[0].getAttribute("radius"))||0;B.scale.set(X,X,X),I.add(B)}else if(F==="cylinder"){const B=new Pt;B.geometry=new ic(1,1,1,30),B.material=L;const X=parseFloat(A.children[0].getAttribute("radius"))||0,Z=parseFloat(A.children[0].getAttribute("length"))||0;B.scale.set(X,Z,X),B.rotation.set(Math.PI/2,0,0),I.add(B)}}else if(E==="origin"){const F=Ns(A.getAttribute("xyz")),B=Ns(A.getAttribute("rpy"));I.position.set(F[0],F[1],F[2]),I.rotation.set(0,0,0),c0(I,B)}}),I}return u(e)}defaultMeshLoader(e,t,n){/\.stl$/i.test(e)?new Hi(t).load(e,r=>{const o=new Pt(r,new ln);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
|
-
No loader available`)}}const T4=/^[og]\s*(.+)?/,C4=/^mtllib /,R4=/^usemtl /,D4=/^usemap /,h0=/\s+/,u0=new z,zo=new z,d0=new z,f0=new z,Xn=new z,fa=new
|
|
4197
|
+
`};class mc extends Ti{constructor(e){super({type:"LineMaterial",uniforms:Ql.clone(Nn.line.uniforms),vertexShader:Nn.line.vertexShader,fragmentShader:Nn.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 Ot,Qh=new z,e0=new z,yn=new Ot,xn=new Ot,si=new Ot,No=new z,Uo=new St,Mn=new K1,t0=new z,oa=new Tn,la=new Ri,ri=new Ot;let ai,rs;function n0(s,e,t){return ri.set(0,0,-e,1).applyMatrix4(s.projectionMatrix),ri.multiplyScalar(1/ri.w),ri.x=rs/t.width,ri.y=rs/t.height,ri.applyMatrix4(s.projectionMatrixInverse),ri.multiplyScalar(1/ri.w),Math.abs(Math.max(ri.x,ri.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++){Mn.start.fromBufferAttribute(i,a),Mn.end.fromBufferAttribute(r,a),Mn.applyMatrix4(t);const c=new z,d=new z;ai.distanceSqToSegment(Mn.start,Mn.end,d,c),d.distanceTo(c)<rs*.5&&e.push({point:d,pointOnLine:c,distance:ai.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;ai.at(1,si),si.w=1,si.applyMatrix4(e.matrixWorldInverse),si.applyMatrix4(n),si.multiplyScalar(1/si.w),si.x*=i.x/2,si.y*=i.y/2,si.z=0,No.copy(si),Uo.multiplyMatrices(e.matrixWorldInverse,r);for(let m=0,u=c;m<u;m++){if(yn.fromBufferAttribute(a,m),xn.fromBufferAttribute(l,m),yn.w=1,xn.w=1,yn.applyMatrix4(Uo),xn.applyMatrix4(Uo),yn.z>d&&xn.z>d)continue;if(yn.z>d){const p=yn.z-xn.z,x=(yn.z-d)/p;yn.lerp(xn,x)}else if(xn.z>d){const p=xn.z-yn.z,x=(xn.z-d)/p;xn.lerp(yn,x)}yn.applyMatrix4(n),xn.applyMatrix4(n),yn.multiplyScalar(1/yn.w),xn.multiplyScalar(1/xn.w),yn.x*=i.x/2,yn.y*=i.y/2,xn.x*=i.x/2,xn.y*=i.y/2,Mn.start.copy(yn),Mn.start.z=0,Mn.end.copy(xn),Mn.end.z=0;const h=Mn.closestPointToPointParameter(No,!0);Mn.at(h,t0);const g=xi.lerp(yn.z,xn.z,h),_=g>=-1&&g<=1,f=No.distanceTo(t0)<rs*.5;if(_&&f){Mn.start.fromBufferAttribute(a,m),Mn.end.fromBufferAttribute(l,m),Mn.start.applyMatrix4(r),Mn.end.applyMatrix4(r);const p=new z,x=new z;ai.distanceSqToSegment(Mn.start,Mn.end,x,p),t.push({point:x,pointOnLine:p,distance:ai.origin.distanceTo(x),object:s,face:null,faceIndex:m,uv:null,uv1:null})}}}class p4 extends Nt{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 ci(r,1,0)),e.setAttribute("instanceDistanceEnd",new ci(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;ai=e.ray;const o=this.matrixWorld,a=this.geometry,l=this.material;rs=l.linewidth+r,a.boundingSphere===null&&a.computeBoundingSphere(),la.copy(a.boundingSphere).applyMatrix4(o);let c;if(n)c=rs*.5;else{const m=Math.max(i.near,la.distanceToPoint(ai.origin));c=n0(i,m,l.resolution)}if(la.radius+=c,ai.intersectsSphere(la)===!1)return;a.boundingBox===null&&a.computeBoundingBox(),oa.copy(a.boundingBox).applyMatrix4(o);let d;if(n)d=rs*.5;else{const m=Math.max(i.near,oa.distanceToPoint(ai.origin));d=n0(i,m,l.resolution)}oa.expandByScalar(d),ai.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 At,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 Je(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 St,i0=new Pl,v4=new Je,ts=new z,s0=new Ot;class uu extends rn{constructor(e,t,n={}){super(),qt(this,"enabled",!0),qt(this,"camera"),qt(this,"renderer"),qt(this,"options"),qt(this,"target",new z),qt(this,"animated",!0),qt(this,"speed",1),qt(this,"animating",!1),qt(this,"_options"),qt(this,"_intersections"),qt(this,"_background",null),qt(this,"_viewport",[0,0,0,0]),qt(this,"_originalViewport",[0,0,0,0]),qt(this,"_originalScissor",[0,0,0,0]),qt(this,"_scene"),qt(this,"_camera"),qt(this,"_container"),qt(this,"_domElement"),qt(this,"_domRect"),qt(this,"_dragging",!1),qt(this,"_distance",0),qt(this,"_clock",new $1),qt(this,"_targetQuaternion",new Un),qt(this,"_quaternionStart",new Un),qt(this,"_quaternionEnd",new Un),qt(this,"_pointerStart",new Je),qt(this,"_focus",null),qt(this,"_placement"),qt(this,"_controls"),qt(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 _n(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?J3(r):document.body,this._domElement=K3(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 z().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;ts.copy(e).multiplyScalar(this._distance),Fs.setPosition(ts).lookAt(ts,this.position,this.up),this._targetQuaternion.setFromRotationMatrix(Fs),ts.add(n),Fs.lookAt(ts,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(ts.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(ts.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=rn.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&&Kh(this._background,!0),this._handleHover(e))}_onPointerLeave(){!this.enabled||this._dragging||(this._background&&Kh(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 z),g=y.ref(new z),_=()=>{if(!s.value)return;e=new Ia,e.background=new At(15790320);const F=s.value;t=new _n(75,F.clientWidth/F.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(F.clientWidth,F.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=Hl,n.toneMapping=Gl,n.toneMappingExposure=1,n.outputColorSpace=Vt,F.appendChild(n.domElement),i=new ru(t,n.domElement),i.enableDamping=!0,i.dampingFactor=.05,i.mouseButtons={LEFT:null,MIDDLE:Si.PAN,RIGHT:Si.ROTATE},i.panSpeed=.7,r=new uu(t,n,{container:F,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(),M()},f=(F,B)=>{a&&(e.remove(a),a.dispose()),l&&(e.remove(l),l.geometry.dispose(),l.material.dispose());const X=Math.min(Math.max(Math.floor(F/20),30),40);a=new J0(F,X,13421772,14540253),a.rotateX(Math.PI/2),a.position.copy(B),e.add(a);const Z=new wi(F,F),se=new X0({opacity:.3,color:0});l=new Nt(Z,se),l.position.copy(B),l.position.z-=.01,l.receiveShadow=!0,e.add(l)},p=()=>{if(u.value.length===0)return;const F=new Tn;let B=!1;if(u.value.forEach(Q=>{if(Q.userData.boundingBox)F.union(Q.userData.boundingBox),B=!0;else if(Q.userData.modelId&&modelBoundingBoxes.has(Q.userData.modelId)){const xe=modelBoundingBoxes.get(Q.userData.modelId);F.union(xe.box),B=!0}else F.expandByObject(Q),B=!0}),!B){console.warn("无法计算包围盒,网格更新失败");return}const X=F.getSize(new z),Z=F.getCenter(new z),se=Math.max(X.x,X.y,X.z),G=Math.max(se*8,50),de=new z(Z.x,Z.y,F.min.z);f(G,de)},x=()=>{const F=new cc(4210752,.6);e.add(F);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 X=new gr(16777215,.8);X.position.set(-8,-8,6),e.add(X);const Z=new gr(16777215,.6);Z.position.set(0,-15,2),e.add(Z);const se=new K0(16777215,4473924,.8);e.add(se);const G=new Pa(16777215,1,50);G.position.set(15,15,15),e.add(G);const de=new Pa(16777215,.5,50);de.position.set(-15,-15,15),e.add(de)},M=()=>{o=requestAnimationFrame(M),i&&i.update();const F=performance.now(),B=F-m;B<d||(m=F-B%d,n&&e&&t&&n.render(e,t),r&&r.render())},b=F=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(X=>{F[X]&&F[X].dispose&&F[X].dispose()}),F.dispose&&F.dispose()},N=F=>{F==null||F.traverse(B=>{B.geometry&&B.geometry.dispose(),B.material&&(Array.isArray(B.material)?B.material.forEach(X=>{b(X)}):b(B.material))})};return{currentModels:u,initialCameraPosition:h,initialTargetPosition:g,initThreeJS:_,handleResize:()=>{if(!s.value||!t||!n||!r)return;const F=s.value,B=F.clientWidth,X=F.clientHeight;t.aspect=B/X,t.updateProjectionMatrix(),n.setSize(B,X),r.update()},fitCameraToAllModels:F=>{if(!t||!i||u.value.length===0)return;const B=new Tn;let X=!1;if(u.value.forEach(xe=>{if(xe.userData.boundingBox)B.union(xe.userData.boundingBox),X=!0;else if(xe.userData.modelId&&F.has(xe.userData.modelId)){const Pe=F.get(xe.userData.modelId);B.union(Pe.box),X=!0}else B.expandByObject(xe),X=!0}),!X){console.warn("无法计算包围盒");return}const Z=B.getSize(new z),se=B.getCenter(new z),de=Math.max(Z.x,Z.y,Z.z)*.8,Q=new z(se.x+de,se.y-de,se.z+de);t.position.copy(Q),t.lookAt(se),i.target.copy(se),i.update(),h.value.copy(Q),g.value.copy(se),p()},getThreeJSObjects:()=>({scene:e,camera:t,renderer:n,controls:i,gizmo:r}),clearAllModels:()=>{if(!e)return;u.value.forEach(B=>{e.remove(B),N(B)});const F=[];e.children.forEach(B=>{!B.isLight&&!B.isCamera&&B.type!=="GridHelper"&&B!==l&&F.push(B)}),F.forEach(B=>{e.remove(B),N(B)}),u.value=[],p()},cleanup:()=>{o&&cancelAnimationFrame(o),a&&a.dispose(),l&&(l.geometry.dispose(),l.material.dispose()),n&&n.dispose(),i&&i.dispose(),r&&r.dispose()},updateGridForModels:p}}function x4(s,e){const t=y.ref(!1);let n=null,i=12700,r=new z,o=new z,a=new z,l=0,c=null;const d=f=>f<.5?4*f*f*f:1-Math.pow(-2*f+2,3)/2,m=f=>{const p=new z,x=l*1.2,M=new z(a.x+x,a.y,a.z),b=new z(a.x,a.y+x,a.z),N=new z(a.x,a.y-x,a.z);if(f<=.567){const P=f/.567*Math.PI*2;p.x=a.x+Math.cos(P)*x,p.z=a.z+Math.sin(P)*x,p.y=a.y}else if(f<=.724){const L=(f-.567)/.157,P=d(L);p.lerpVectors(M,b,P)}else if(f<=.881){const L=(f-.724)/.157,I=d(L)*Math.PI;p.x=a.x+Math.sin(I)*x,p.y=a.y+Math.cos(I)*x,p.z=a.z}else{const L=(f-.881)/.119,P=d(L);p.lerpVectors(N,r,P)}return p},u=()=>{const{camera:f,controls:p}=s();if(!f||!p)return;n||(n=Date.now());const x=Date.now()-n,M=Math.min(x/i,1);if(M>=1){g();return}const b=m(M);f.position.copy(b),f.lookAt(a),p.target.copy(a),c=requestAnimationFrame(u)},h=()=>{if(e.value.length===0)return;const{camera:f,controls:p}=s();if(!f||!p)return;r.copy(f.position),o.copy(p.target);const x=new Tn;e.value.forEach(E=>{x.expandByObject(E)});const M=x.getSize(new z);a=x.getCenter(new z),l=Math.max(M.x,M.y,M.z)*1.2;const b=new z(a.x+l*1.2,a.y,a.z);p.enabled=!1;const N=f.position.clone(),L=1e3,P=Date.now(),I=()=>{const E=Date.now()-P,A=Math.min(E/L,1),F=d(A);f.position.lerpVectors(N,b,F),f.lookAt(a),p.target.copy(a),A<1?requestAnimationFrame(I):(t.value=!0,n=null,u())};I()},g=()=>{t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{controls:f}=s();f&&(f.enabled=!0,f.target.copy(o))};return{isAnimating:t,toggleAnimation:()=>{if(t.value){t.value=!1,n=null,c&&(cancelAnimationFrame(c),c=null);const{camera:f,controls:p}=s();if(!f||!p)return;p.enabled=!0;const x=f.position.clone(),M=p.target.clone(),b=1500,N=Date.now(),L=()=>{const P=Date.now()-N,I=Math.min(P/b,1),E=d(I);f.position.lerpVectors(x,r,E),p.target.lerpVectors(M,o,E),I<1&&requestAnimationFrame(L)};L()}else h()},startAnimation:h,stopAnimation:g}}function M4(s,e){const t=y.ref(!1),n=y.ref("none");let i=[],r=[],o=new Tn,a=new z;const l=()=>{i=[new jn(new z(1,0,0),0),new jn(new z(0,1,0),0),new jn(new z(0,0,1),0)]},c=()=>{o.makeEmpty(),e.value.forEach(_=>{o.expandByObject(_)}),a=o.getCenter(new z)},d=_=>{const f=o.getSize(new z);let p,x,M;_==="x"?(p=new wi(f.z*1.2,f.y*1.2),x=new z(a.x,a.y,a.z),M=new vn(0,Math.PI/2,0)):_==="y"?(p=new wi(f.x*1.2,f.z*1.2),x=new z(a.x,a.y,a.z),M=new vn(Math.PI/2,0,0)):_==="z"&&(p=new wi(f.x*1.2,f.y*1.2),x=new z(a.x,a.y,a.z),M=new vn(0,0,0));const b=new cn({color:8900331,transparent:!0,opacity:.3,side:hn,depthWrite:!1}),N=new Nt(p,b);return N.position.copy(x),N.rotation.copy(M),N},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(p=>{p.traverse(x=>{x.isMesh&&x.material&&(Array.isArray(x.material)?x.material.forEach(M=>{M.clippingPlanes=[_]}):x.material.clippingPlanes=[_])})});const{scene:f}=s();if(f){const p=d(n.value);f.add(p),r.push(p)}}},u=()=>{e.value.forEach(_=>{_.traverse(f=>{f.isMesh&&f.material&&(Array.isArray(f.material)?f.material.forEach(p=>{p.clippingPlanes=[]}):f.material.clippingPlanes=[])})})},h=()=>{const{scene:_}=s();_&&r.forEach(f=>{_.remove(f),f.geometry.dispose(),f.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 Hi extends ni{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,f,p,x,M,b;for(let F=0;F<70;F++)d.getUint32(F,!1)==1129270351&&d.getUint8(F+4)==82&&d.getUint8(F+5)==61&&(_=!0,f=new Float32Array(m*3*3),p=d.getUint8(F+6)/255,x=d.getUint8(F+7)/255,M=d.getUint8(F+8)/255,b=d.getUint8(F+9)/255);const N=84,L=12*4+2,P=new an,I=new Float32Array(m*3*3),E=new Float32Array(m*3*3),A=new At;for(let F=0;F<m;F++){const B=N+F*L,X=d.getFloat32(B,!0),Z=d.getFloat32(B+4,!0),se=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=p,h=x,g=M)}for(let G=1;G<=3;G++){const de=B+G*12,Q=F*3*3+(G-1)*3;I[Q]=d.getFloat32(de,!0),I[Q+1]=d.getFloat32(de+4,!0),I[Q+2]=d.getFloat32(de+8,!0),E[Q]=X,E[Q+1]=Z,E[Q+2]=se,_&&(A.setRGB(u,h,g,Vt),f[Q]=A.r,f[Q+1]=A.g,f[Q+2]=A.b)}}return P.setAttribute("position",new un(I,3)),P.setAttribute("normal",new un(E,3)),_&&(P.setAttribute("color",new un(f,3)),P.hasColors=!0,P.alpha=b),P}function r(c){const d=new an,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,f=new RegExp("vertex"+_+_+_,"g"),p=new RegExp("normal"+_+_+_,"g"),x=[],M=[],b=[],N=new z;let L,P=0,I=0,E=0;for(;(L=m.exec(c))!==null;){I=E;const A=L[0],F=(L=h.exec(A))!==null?L[1]:"";for(b.push(F);(L=u.exec(A))!==null;){let Z=0,se=0;const G=L[0];for(;(L=p.exec(G))!==null;)N.x=parseFloat(L[1]),N.y=parseFloat(L[2]),N.z=parseFloat(L[3]),se++;for(;(L=f.exec(G))!==null;)x.push(parseFloat(L[1]),parseFloat(L[2]),parseFloat(L[3])),M.push(N.x,N.y,N.z),Z++,E++;se!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),Z!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const B=I,X=E-I;d.userData.groupNames=b,d.addGroup(B,X,P),P++}return d.setAttribute("position",new Ft(x,3)),d.setAttribute("normal",new Ft(M,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 f:case p: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,de,Q,xe,Pe){let Te,me;const ae=Q.pixel_size>>3,j=Q.width*Q.height*ae;if(de&&(me=Pe.subarray(xe,xe+=Q.colormap_length*(Q.colormap_size>>3))),G){Te=new Uint8Array(j);let K,te,ee,pe=0;const $=new Uint8Array(ae);for(;pe<j;)if(K=Pe[xe++],te=(K&127)+1,K&128){for(ee=0;ee<ae;++ee)$[ee]=Pe[xe++];for(ee=0;ee<te;++ee)Te.set($,pe+ee*ae);pe+=ae*te}else{for(te*=ae,ee=0;ee<te;++ee)Te[pe+ee]=Pe[xe++];pe+=te}}else Te=Pe.subarray(xe,xe+=de?Q.width*Q.height:j);return{pixel_data:Te,palettes:me}}function i(G,de,Q,xe,Pe,Te,me,ae,j){const K=j;let te,ee=0,pe,$;const ge=A.width;for($=de;$!==xe;$+=Q)for(pe=Pe;pe!==me;pe+=Te,ee++)te=ae[ee],G[(pe+ge*$)*4+3]=255,G[(pe+ge*$)*4+2]=K[te*3+0],G[(pe+ge*$)*4+1]=K[te*3+1],G[(pe+ge*$)*4+0]=K[te*3+2];return G}function r(G,de,Q,xe,Pe,Te,me,ae){let j,K=0,te,ee;const pe=A.width;for(ee=de;ee!==xe;ee+=Q)for(te=Pe;te!==me;te+=Te,K+=2)j=ae[K+0]+(ae[K+1]<<8),G[(te+pe*ee)*4+0]=(j&31744)>>7,G[(te+pe*ee)*4+1]=(j&992)>>2,G[(te+pe*ee)*4+2]=(j&31)<<3,G[(te+pe*ee)*4+3]=j&32768?0:255;return G}function o(G,de,Q,xe,Pe,Te,me,ae){let j=0,K,te;const ee=A.width;for(te=de;te!==xe;te+=Q)for(K=Pe;K!==me;K+=Te,j+=3)G[(K+ee*te)*4+3]=255,G[(K+ee*te)*4+2]=ae[j+0],G[(K+ee*te)*4+1]=ae[j+1],G[(K+ee*te)*4+0]=ae[j+2];return G}function a(G,de,Q,xe,Pe,Te,me,ae){let j=0,K,te;const ee=A.width;for(te=de;te!==xe;te+=Q)for(K=Pe;K!==me;K+=Te,j+=4)G[(K+ee*te)*4+2]=ae[j+0],G[(K+ee*te)*4+1]=ae[j+1],G[(K+ee*te)*4+0]=ae[j+2],G[(K+ee*te)*4+3]=ae[j+3];return G}function l(G,de,Q,xe,Pe,Te,me,ae){let j,K=0,te,ee;const pe=A.width;for(ee=de;ee!==xe;ee+=Q)for(te=Pe;te!==me;te+=Te,K++)j=ae[K],G[(te+pe*ee)*4+0]=j,G[(te+pe*ee)*4+1]=j,G[(te+pe*ee)*4+2]=j,G[(te+pe*ee)*4+3]=255;return G}function c(G,de,Q,xe,Pe,Te,me,ae){let j=0,K,te;const ee=A.width;for(te=de;te!==xe;te+=Q)for(K=Pe;K!==me;K+=Te,j+=2)G[(K+ee*te)*4+0]=ae[j+0],G[(K+ee*te)*4+1]=ae[j+0],G[(K+ee*te)*4+2]=ae[j+0],G[(K+ee*te)*4+3]=ae[j+1];return G}function d(G,de,Q,xe,Pe){let Te,me,ae,j,K,te;switch((A.flags&x)>>M){default:case L:Te=0,ae=1,K=de,me=0,j=1,te=Q;break;case b:Te=0,ae=1,K=de,me=Q-1,j=-1,te=-1;break;case P:Te=de-1,ae=-1,K=-1,me=0,j=1,te=Q;break;case N:Te=de-1,ae=-1,K=-1,me=Q-1,j=-1,te=-1;break}if(X)switch(A.pixel_size){case 8:l(G,me,j,te,Te,ae,K,xe);break;case 16:c(G,me,j,te,Te,ae,K,xe);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(A.pixel_size){case 8:i(G,me,j,te,Te,ae,K,xe,Pe);break;case 16:r(G,me,j,te,Te,ae,K,xe);break;case 24:o(G,me,j,te,Te,ae,K,xe);break;case 32:a(G,me,j,te,Te,ae,K,xe);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return G}const m=0,u=1,h=2,g=3,_=9,f=10,p=11,x=48,M=4,b=0,N=1,L=2,P=3;if(e.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let I=0;const E=new Uint8Array(e),A={id_length:E[I++],colormap_type:E[I++],image_type:E[I++],colormap_index:E[I++]|E[I++]<<8,colormap_length:E[I++]|E[I++]<<8,colormap_size:E[I++],origin:[E[I++]|E[I++]<<8,E[I++]|E[I++]<<8],width:E[I++]|E[I++]<<8,height:E[I++]|E[I++]<<8,pixel_size:E[I++],flags:E[I++]};if(t(A),A.id_length+I>e.length)throw new Error("THREE.TGALoader: No data.");I+=A.id_length;let F=!1,B=!1,X=!1;switch(A.image_type){case _:F=!0,B=!0;break;case u:B=!0;break;case f:F=!0;break;case h:break;case p:F=!0,X=!0;break;case g:X=!0;break}const Z=new Uint8Array(A.width*A.height*4),se=n(F,B,A,I,E);return d(Z,A.width,A.height,se.pixel_data,se.palettes),{data:Z,width:A.width,height:A.height,flipY:!0,generateMipmaps:!0,minFilter:Mi}}}class b4 extends ni{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(S,v){const w=[],D=S.childNodes;for(let U=0,ie=D.length;U<ie;U++){const ye=D[U];ye.nodeName===v&&w.push(ye)}return w}function i(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=v[D];return w}function r(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=parseFloat(v[D]);return w}function o(S){if(S.length===0)return[];const v=S.trim().split(/\s+/),w=new Array(v.length);for(let D=0,U=v.length;D<U;D++)w[D]=parseInt(v[D]);return w}function a(S){return S.substring(1)}function l(){return"three_default_"+kt++}function c(S){return Object.keys(S).length===0}function d(S){return{unit:m(n(S,"unit")[0]),upAxis:u(n(S,"up_axis")[0])}}function m(S){return S!==void 0&&S.hasAttribute("meter")===!0?parseFloat(S.getAttribute("meter")):1}function u(S){return S!==void 0?S.textContent:"Y_UP"}function h(S,v,w,D){const U=n(S,v)[0];if(U!==void 0){const ie=n(U,w);for(let ye=0;ye<ie.length;ye++)D(ie[ye])}}function g(S,v){for(const w in S){const D=S[w];D.build=v(S[w])}}function _(S,v){return S.build!==void 0||(S.build=v(S)),S.build}function f(S){const v={sources:{},samplers:{},channels:{}};let w=!1;for(let D=0,U=S.childNodes.length;D<U;D++){const ie=S.childNodes[D];if(ie.nodeType!==1)continue;let ye;switch(ie.nodeName){case"source":ye=ie.getAttribute("id"),v.sources[ye]=Be(ie);break;case"sampler":ye=ie.getAttribute("id"),v.samplers[ye]=p(ie);break;case"channel":ye=ie.getAttribute("target"),v.channels[ye]=x(ie);break;case"animation":f(ie),w=!0;break;default:console.log(ie)}}w===!1&&(gt.animations[S.getAttribute("id")||xi.generateUUID()]=v)}function p(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=a(U.getAttribute("source")),ye=U.getAttribute("semantic");v.inputs[ye]=ie;break}}return v}function x(S){const v={};let D=S.getAttribute("target").split("/");const U=D.shift();let ie=D.shift();const ye=ie.indexOf("(")!==-1,Qe=ie.indexOf(".")!==-1;if(Qe)D=ie.split("."),ie=D.shift(),v.member=D.shift();else if(ye){const qe=ie.split("(");ie=qe.shift();for(let nt=0;nt<qe.length;nt++)qe[nt]=parseInt(qe[nt].replace(/\)/,""));v.indices=qe}return v.id=U,v.sid=ie,v.arraySyntax=ye,v.memberSyntax=Qe,v.sampler=a(S.getAttribute("source")),v}function M(S){const v=[],w=S.channels,D=S.samplers,U=S.sources;for(const ie in w)if(w.hasOwnProperty(ie)){const ye=w[ie],Qe=D[ye.sampler],qe=Qe.inputs.INPUT,nt=Qe.inputs.OUTPUT,vt=U[qe],Oe=U[nt],_t=N(ye,vt,Oe);A(_t,v)}return v}function b(S){return _(gt.animations[S],M)}function N(S,v,w){const D=gt.nodes[S.id],U=Ie(D.id),ie=D.transforms[S.sid],ye=D.matrix.clone().transpose();let Qe,qe,nt,vt,Oe,_t;const ft={};switch(ie){case"matrix":for(nt=0,vt=v.array.length;nt<vt;nt++)if(Qe=v.array[nt],qe=nt*w.stride,ft[Qe]===void 0&&(ft[Qe]={}),S.arraySyntax===!0){const Zt=w.array[qe],Qt=S.indices[0]+4*S.indices[1];ft[Qe][Qt]=Zt}else for(Oe=0,_t=w.stride;Oe<_t;Oe++)ft[Qe][Oe]=w.array[qe+Oe];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',ie);break}const bt=L(ft,ye);return{name:U.uuid,keyframes:bt}}function L(S,v){const w=[];for(const U in S)w.push({time:parseFloat(U),value:S[U]});w.sort(D);for(let U=0;U<16;U++)F(w,U,v.elements[U]);return w;function D(U,ie){return U.time-ie.time}}const P=new z,I=new z,E=new Un;function A(S,v){const w=S.keyframes,D=S.name,U=[],ie=[],ye=[],Qe=[];for(let qe=0,nt=w.length;qe<nt;qe++){const vt=w[qe],Oe=vt.time,_t=vt.value;C.fromArray(_t).transpose(),C.decompose(P,E,I),U.push(Oe),ie.push(P.x,P.y,P.z),ye.push(E.x,E.y,E.z,E.w),Qe.push(I.x,I.y,I.z)}return ie.length>0&&v.push(new $s(D+".position",U,ie)),ye.length>0&&v.push(new Ar(D+".quaternion",U,ye)),Qe.length>0&&v.push(new $s(D+".scale",U,Qe)),v}function F(S,v,w){let D,U=!0,ie,ye;for(ie=0,ye=S.length;ie<ye;ie++)D=S[ie],D.value[v]===void 0?D.value[v]=null:U=!1;if(U===!0)for(ie=0,ye=S.length;ie<ye;ie++)D=S[ie],D.value[v]=w;else B(S,v)}function B(S,v){let w,D;for(let U=0,ie=S.length;U<ie;U++){const ye=S[U];if(ye.value[v]===null){if(w=X(S,U,v),D=Z(S,U,v),w===null){ye.value[v]=D.value[v];continue}if(D===null){ye.value[v]=w.value[v];continue}se(ye,w,D,v)}}}function X(S,v,w){for(;v>=0;){const D=S[v];if(D.value[w]!==null)return D;v--}return null}function Z(S,v,w){for(;v<S.length;){const D=S[v];if(D.value[w]!==null)return D;v++}return null}function se(S,v,w,D){if(w.time-v.time===0){S.value[D]=v.value[D];return}S.value[D]=(S.time-v.time)*(w.value[D]-v.value[D])/(w.time-v.time)+v.value[D]}function G(S){const v={name:S.getAttribute("id")||"default",start:parseFloat(S.getAttribute("start")||0),end:parseFloat(S.getAttribute("end")||0),animations:[]};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"instance_animation":v.animations.push(a(U.getAttribute("url")));break}}gt.clips[S.getAttribute("id")]=v}function de(S){const v=[],w=S.name,D=S.end-S.start||-1,U=S.animations;for(let ie=0,ye=U.length;ie<ye;ie++){const Qe=b(U[ie]);for(let qe=0,nt=Qe.length;qe<nt;qe++)v.push(Qe[qe])}return new hh(w,D,v)}function Q(S){return _(gt.clips[S],de)}function xe(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"skin":v.id=a(U.getAttribute("source")),v.skin=Pe(U);break;case"morph":v.id=a(U.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}gt.controllers[S.getAttribute("id")]=v}function Pe(S){const v={sources:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"bind_shape_matrix":v.bindShapeMatrix=r(U.textContent);break;case"source":const ie=U.getAttribute("id");v.sources[ie]=Be(U);break;case"joints":v.joints=Te(U);break;case"vertex_weights":v.vertexWeights=me(U);break}}return v}function Te(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=U.getAttribute("semantic"),ye=a(U.getAttribute("source"));v.inputs[ie]=ye;break}}return v}function me(S){const v={inputs:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=U.getAttribute("semantic"),ye=a(U.getAttribute("source")),Qe=parseInt(U.getAttribute("offset"));v.inputs[ie]={id:ye,offset:Qe};break;case"vcount":v.vcount=o(U.textContent);break;case"v":v.v=o(U.textContent);break}}return v}function ae(S){const v={id:S.id},w=gt.geometries[v.id];return S.skin!==void 0&&(v.skin=j(S.skin),w.sources.skinIndices=v.skin.indices,w.sources.skinWeights=v.skin.weights),v}function j(S){const w={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},D=S.sources,U=S.vertexWeights,ie=U.vcount,ye=U.v,Qe=U.inputs.JOINT.offset,qe=U.inputs.WEIGHT.offset,nt=S.sources[S.joints.inputs.JOINT],vt=S.sources[S.joints.inputs.INV_BIND_MATRIX],Oe=D[U.inputs.WEIGHT.id].array;let _t=0,ft,bt,dt;for(ft=0,dt=ie.length;ft<dt;ft++){const Qt=ie[ft],Gt=[];for(bt=0;bt<Qt;bt++){const Wt=ye[_t+Qe],di=ye[_t+qe],Ln=Oe[di];Gt.push({index:Wt,weight:Ln}),_t+=2}for(Gt.sort(Zt),bt=0;bt<4;bt++){const Wt=Gt[bt];Wt!==void 0?(w.indices.array.push(Wt.index),w.weights.array.push(Wt.weight)):(w.indices.array.push(0),w.weights.array.push(0))}}for(S.bindShapeMatrix?w.bindMatrix=new St().fromArray(S.bindShapeMatrix).transpose():w.bindMatrix=new St().identity(),ft=0,dt=nt.array.length;ft<dt;ft++){const Qt=nt.array[ft],Gt=new St().fromArray(vt.array,ft*vt.stride).transpose();w.joints.push({name:Qt,boneInverse:Gt})}return w;function Zt(Qt,Gt){return Gt.weight-Qt.weight}}function K(S){return _(gt.controllers[S],ae)}function te(S){const v={init_from:n(S,"init_from")[0].textContent};gt.images[S.getAttribute("id")]=v}function ee(S){return S.build!==void 0?S.build:S.init_from}function pe(S){const v=gt.images[S];return v!==void 0?_(v,ee):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",S),null)}function $(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"profile_COMMON":v.profile=ge(U);break}}gt.effects[S.getAttribute("id")]=v}function ge(S){const v={surfaces:{},samplers:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"newparam":Ae(U,v);break;case"technique":v.technique=O(U);break;case"extra":v.extra=Fe(U);break}}return v}function Ae(S,v){const w=S.getAttribute("sid");for(let D=0,U=S.childNodes.length;D<U;D++){const ie=S.childNodes[D];if(ie.nodeType===1)switch(ie.nodeName){case"surface":v.surfaces[w]=et(ie);break;case"sampler2D":v.samplers[w]=je(ie);break}}}function et(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"init_from":v.init_from=U.textContent;break}}return v}function je(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"source":v.source=U.textContent;break}}return v}function O(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"constant":case"lambert":case"blinn":case"phong":v.type=U.nodeName,v.parameters=pt(U);break;case"extra":v.extra=Fe(U);break}}return v}function pt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":v[U.nodeName]=st(U);break;case"transparent":v[U.nodeName]={opaque:U.hasAttribute("opaque")?U.getAttribute("opaque"):"A_ONE",data:st(U)};break}}return v}function st(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"color":v[U.nodeName]=r(U.textContent);break;case"float":v[U.nodeName]=parseFloat(U.textContent);break;case"texture":v[U.nodeName]={id:U.getAttribute("texture"),extra:it(U)};break}}return v}function it(S){const v={technique:{}};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"extra":ke(U,v);break}}return v}function ke(S,v){for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique":Ze(U,v);break}}}function Ze(S,v){for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":v.technique[U.nodeName]=parseFloat(U.textContent);break;case"wrapU":case"wrapV":U.textContent.toUpperCase()==="TRUE"?v.technique[U.nodeName]=1:U.textContent.toUpperCase()==="FALSE"?v.technique[U.nodeName]=0:v.technique[U.nodeName]=parseInt(U.textContent);break;case"bump":v[U.nodeName]=Xt(U);break}}}function Fe(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique":v.technique=rt(U);break}}return v}function rt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"double_sided":v[U.nodeName]=parseInt(U.textContent);break;case"bump":v[U.nodeName]=Xt(U);break}}return v}function Xt(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"texture":v[U.nodeName]={id:U.getAttribute("texture"),texcoord:U.getAttribute("texcoord"),extra:it(U)};break}}return v}function k(S){return S}function R(S){return _(gt.effects[S],k)}function le(S){const v={name:S.getAttribute("name")};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"instance_effect":v.url=a(U.getAttribute("url"));break}}gt.materials[S.getAttribute("id")]=v}function Ce(S){let v,w=S.slice((S.lastIndexOf(".")-1>>>0)+2);switch(w=w.toLowerCase(),w){case"tga":v=Ht;break;default:v=Yt}return v}function Ue(S){const v=R(S.url),w=v.profile.technique;let D;switch(w.type){case"phong":case"blinn":D=new cn;break;case"lambert":D=new C1;break;default:D=new Gi;break}D.name=S.name||"";function U(qe,nt=null){const vt=v.profile.samplers[qe.id];let Oe=null;if(vt!==void 0){const _t=v.profile.surfaces[vt.source];Oe=pe(_t.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),Oe=pe(qe.id);if(Oe!==null){const _t=Ce(Oe);if(_t!==void 0){const ft=_t.load(Oe),bt=qe.extra;if(bt!==void 0&&bt.technique!==void 0&&c(bt.technique)===!1){const dt=bt.technique;ft.wrapS=dt.wrapU?oi:ei,ft.wrapT=dt.wrapV?oi:ei,ft.offset.set(dt.offsetU||0,dt.offsetV||0),ft.repeat.set(dt.repeatU||1,dt.repeatV||1)}else ft.wrapS=oi,ft.wrapT=oi;return nt!==null&&(ft.colorSpace=nt),ft}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",Oe),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",qe.id),null}const ie=w.parameters;for(const qe in ie){const nt=ie[qe];switch(qe){case"diffuse":nt.color&&D.color.fromArray(nt.color),nt.texture&&(D.map=U(nt.texture,Vt));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,Vt));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,Vt));break}}Bt.colorSpaceToWorking(D.color,Vt),D.specular&&Bt.colorSpaceToWorking(D.specular,Vt),D.emissive&&Bt.colorSpaceToWorking(D.emissive,Vt);let ye=ie.transparent,Qe=ie.transparency;if(Qe===void 0&&ye&&(Qe={float:1}),ye===void 0&&Qe&&(ye={opaque:"A_ONE",data:{color:[1,1,1,1]}}),ye&&Qe)if(ye.data.texture)D.transparent=!0;else{const qe=ye.data.color;switch(ye.opaque){case"A_ONE":D.opacity=qe[3]*Qe.float;break;case"RGB_ZERO":D.opacity=1-qe[0]*Qe.float;break;case"A_ZERO":D.opacity=1-qe[3]*Qe.float;break;case"RGB_ONE":D.opacity=qe[0]*Qe.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',ye.opaque)}D.opacity<1&&(D.transparent=!0)}if(w.extra!==void 0&&w.extra.technique!==void 0){const qe=w.extra.technique;for(const nt in qe){const vt=qe[nt];switch(nt){case"double_sided":D.side=vt===1?hn:Yn;break;case"bump":D.normalMap=U(vt.texture),D.normalScale=new Je(1,1);break}}}return D}function be(S){return _(gt.materials[S],Ue)}function yt(S){const v={name:S.getAttribute("name")};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"optics":v.optics=Ke(U);break}}gt.cameras[S.getAttribute("id")]=v}function Ke(S){for(let v=0;v<S.childNodes.length;v++){const w=S.childNodes[v];switch(w.nodeName){case"technique_common":return mt(w)}}return{}}function mt(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"perspective":case"orthographic":v.technique=D.nodeName,v.parameters=xt(D);break}}return v}function xt(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":v[D.nodeName]=parseFloat(D.textContent);break}}return v}function ze(S){let v;switch(S.optics.technique){case"perspective":v=new _n(S.optics.parameters.yfov,S.optics.parameters.aspect_ratio,S.optics.parameters.znear,S.optics.parameters.zfar);break;case"orthographic":let w=S.optics.parameters.ymag,D=S.optics.parameters.xmag;const U=S.optics.parameters.aspect_ratio;D=D===void 0?w*U:D,w=w===void 0?D/U:w,D*=.5,w*=.5,v=new Ha(-D,D,w,-w,S.optics.parameters.znear,S.optics.parameters.zfar);break;default:v=new _n;break}return v.name=S.name||"",v}function ot(S){const v=gt.cameras[S];return v!==void 0?_(v,ze):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",S),null)}function Tt(S){let v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"technique_common":v=Et(U);break}}gt.lights[S.getAttribute("id")]=v}function Et(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"directional":case"point":case"spot":case"ambient":v.technique=U.nodeName,v.parameters=$e(U)}}return v}function $e(S){const v={};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"color":const ie=r(U.textContent);v.color=new At().fromArray(ie),Bt.colorSpaceToWorking(v.color,Vt);break;case"falloff_angle":v.falloffAngle=parseFloat(U.textContent);break;case"quadratic_attenuation":const ye=parseFloat(U.textContent);v.distance=ye?Math.sqrt(1/ye):0;break}}return v}function Ct(S){let v;switch(S.technique){case"directional":v=new gr;break;case"point":v=new Pa;break;case"spot":v=new G1;break;case"ambient":v=new cc;break}return S.parameters.color&&v.color.copy(S.parameters.color),S.parameters.distance&&(v.distance=S.parameters.distance),v}function J(S){const v=gt.lights[S];return v!==void 0?_(v,Ct):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",S),null)}function tt(S){const v={name:S.getAttribute("name"),sources:{},vertices:{},primitives:[]},w=n(S,"mesh")[0];if(w!==void 0){for(let D=0;D<w.childNodes.length;D++){const U=w.childNodes[D];if(U.nodeType!==1)continue;const ie=U.getAttribute("id");switch(U.nodeName){case"source":v.sources[ie]=Be(U);break;case"vertices":v.vertices=ut(U);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",U.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":v.primitives.push(Ge(U));break;default:console.log(U)}}gt.geometries[S.getAttribute("id")]=v}}function Be(S){const v={array:[],stride:3};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"float_array":v.array=r(D.textContent);break;case"Name_array":v.array=i(D.textContent);break;case"technique_common":const U=n(D,"accessor")[0];U!==void 0&&(v.stride=parseInt(U.getAttribute("stride")));break}}return v}function ut(S){const v={};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];D.nodeType===1&&(v[D.getAttribute("semantic")]=a(D.getAttribute("source")))}return v}function Ge(S){const v={type:S.nodeName,material:S.getAttribute("material"),count:parseInt(S.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let w=0,D=S.childNodes.length;w<D;w++){const U=S.childNodes[w];if(U.nodeType===1)switch(U.nodeName){case"input":const ie=a(U.getAttribute("source")),ye=U.getAttribute("semantic"),Qe=parseInt(U.getAttribute("offset")),qe=parseInt(U.getAttribute("set")),nt=qe>0?ye+qe:ye;v.inputs[nt]={id:ie,offset:Qe},v.stride=Math.max(v.stride,Qe+1),ye==="TEXCOORD"&&(v.hasUV=!0);break;case"vcount":v.vcount=o(U.textContent);break;case"p":v.p=o(U.textContent);break}}return v}function De(S){const v={};for(let w=0;w<S.length;w++){const D=S[w];v[D.type]===void 0&&(v[D.type]=[]),v[D.type].push(D)}return v}function lt(S){let v=0;for(let w=0,D=S.length;w<D;w++)S[w].hasUV===!0&&v++;v>0&&v<S.length&&(S.uvsNeedsFix=!0)}function Rt(S){const v={},w=S.sources,D=S.vertices,U=S.primitives;if(U.length===0)return{};const ie=De(U);for(const ye in ie){const Qe=ie[ye];lt(Qe),v[ye]=$t(Qe,w,D)}return v}function $t(S,v,w){const D={},U={array:[],stride:0},ie={array:[],stride:0},ye={array:[],stride:0},Qe={array:[],stride:0},qe={array:[],stride:0},nt={array:[],stride:4},vt={array:[],stride:4},Oe=new an,_t=[];let ft=0;for(let bt=0;bt<S.length;bt++){const dt=S[bt],Zt=dt.inputs;let Qt=0;switch(dt.type){case"lines":case"linestrips":Qt=dt.count*2;break;case"triangles":Qt=dt.count*3;break;case"polylist":for(let Gt=0;Gt<dt.count;Gt++){const Wt=dt.vcount[Gt];switch(Wt){case 3:Qt+=3;break;case 4:Qt+=6;break;default:Qt+=(Wt-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",dt.type)}Oe.addGroup(ft,Qt,bt),ft+=Qt,dt.material&&_t.push(dt.material);for(const Gt in Zt){const Wt=Zt[Gt];switch(Gt){case"VERTEX":for(const di in w){const Ln=w[di];switch(di){case"POSITION":const ps=U.array.length;if(Dt(dt,v[Ln],Wt.offset,U.array),U.stride=v[Ln].stride,v.skinWeights&&v.skinIndices&&(Dt(dt,v.skinIndices,Wt.offset,nt.array),Dt(dt,v.skinWeights,Wt.offset,vt.array)),dt.hasUV===!1&&S.uvsNeedsFix===!0){const Eu=(U.array.length-ps)/U.stride;for(let _c=0;_c<Eu;_c++)ye.array.push(0,0)}break;case"NORMAL":Dt(dt,v[Ln],Wt.offset,ie.array),ie.stride=v[Ln].stride;break;case"COLOR":Dt(dt,v[Ln],Wt.offset,qe.array),qe.stride=v[Ln].stride;break;case"TEXCOORD":Dt(dt,v[Ln],Wt.offset,ye.array),ye.stride=v[Ln].stride;break;case"TEXCOORD1":Dt(dt,v[Ln],Wt.offset,Qe.array),ye.stride=v[Ln].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',di)}}break;case"NORMAL":Dt(dt,v[Wt.id],Wt.offset,ie.array),ie.stride=v[Wt.id].stride;break;case"COLOR":Dt(dt,v[Wt.id],Wt.offset,qe.array,!0),qe.stride=v[Wt.id].stride;break;case"TEXCOORD":Dt(dt,v[Wt.id],Wt.offset,ye.array),ye.stride=v[Wt.id].stride;break;case"TEXCOORD1":Dt(dt,v[Wt.id],Wt.offset,Qe.array),Qe.stride=v[Wt.id].stride;break}}}return U.array.length>0&&Oe.setAttribute("position",new Ft(U.array,U.stride)),ie.array.length>0&&Oe.setAttribute("normal",new Ft(ie.array,ie.stride)),qe.array.length>0&&Oe.setAttribute("color",new Ft(qe.array,qe.stride)),ye.array.length>0&&Oe.setAttribute("uv",new Ft(ye.array,ye.stride)),Qe.array.length>0&&Oe.setAttribute("uv1",new Ft(Qe.array,Qe.stride)),nt.array.length>0&&Oe.setAttribute("skinIndex",new Ft(nt.array,nt.stride)),vt.array.length>0&&Oe.setAttribute("skinWeight",new Ft(vt.array,vt.stride)),D.data=Oe,D.type=S[0].type,D.materialKeys=_t,D}function Dt(S,v,w,D,U=!1){const ie=S.p,ye=S.stride,Qe=S.vcount;function qe(Oe){let _t=ie[Oe+w]*vt;const ft=_t+vt;for(;_t<ft;_t++)D.push(nt[_t]);if(U){const bt=D.length-vt-1;Kt.setRGB(D[bt+0],D[bt+1],D[bt+2],Vt),D[bt+0]=Kt.r,D[bt+1]=Kt.g,D[bt+2]=Kt.b}}const nt=v.array,vt=v.stride;if(S.vcount!==void 0){let Oe=0;for(let _t=0,ft=Qe.length;_t<ft;_t++){const bt=Qe[_t];if(bt===4){const dt=Oe+ye*0,Zt=Oe+ye*1,Qt=Oe+ye*2,Gt=Oe+ye*3;qe(dt),qe(Zt),qe(Gt),qe(Zt),qe(Qt),qe(Gt)}else if(bt===3){const dt=Oe+ye*0,Zt=Oe+ye*1,Qt=Oe+ye*2;qe(dt),qe(Zt),qe(Qt)}else if(bt>4)for(let dt=1,Zt=bt-2;dt<=Zt;dt++){const Qt=Oe+ye*0,Gt=Oe+ye*dt,Wt=Oe+ye*(dt+1);qe(Qt),qe(Gt),qe(Wt)}Oe+=ye*bt}}else for(let Oe=0,_t=ie.length;Oe<_t;Oe+=ye)qe(Oe)}function Sn(S){return _(gt.geometries[S],Rt)}function In(S){const v={name:S.getAttribute("name")||"",joints:{},links:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"technique_common":zn(D,v);break}}gt.kinematicsModels[S.getAttribute("id")]=v}function us(S){return S.build!==void 0?S.build:S}function ds(S){return _(gt.kinematicsModels[S],us)}function zn(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"joint":v.joints[D.getAttribute("sid")]=Xi(D);break;case"link":v.links.push(ji(D));break}}}function Xi(S){let v;for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"prismatic":case"revolute":v=fs(D);break}}return v}function fs(S){const v={sid:S.getAttribute("sid"),name:S.getAttribute("name")||"",axis:new z,limits:{min:0,max:0},type:S.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=r(D.textContent);v.axis.fromArray(U);break;case"limits":const ie=D.getElementsByTagName("max")[0],ye=D.getElementsByTagName("min")[0];v.limits.max=parseFloat(ie.textContent),v.limits.min=parseFloat(ye.textContent);break}}return v.limits.min>=v.limits.max&&(v.static=!0),v.middlePosition=(v.limits.min+v.limits.max)/2,v}function ji(S){const v={sid:S.getAttribute("sid"),name:S.getAttribute("name")||"",attachments:[],transforms:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"attachment_full":v.attachments.push(ui(D));break;case"matrix":case"translate":case"rotate":v.transforms.push(qi(D));break}}return v}function ui(S){const v={joint:S.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"link":v.links.push(ji(D));break;case"matrix":case"translate":case"rotate":v.transforms.push(qi(D));break}}return v}function qi(S){const v={type:S.nodeName},w=r(S.textContent);switch(v.type){case"matrix":v.obj=new St,v.obj.fromArray(w).transpose();break;case"translate":v.obj=new z,v.obj.fromArray(w);break;case"rotate":v.obj=new z,v.obj.fromArray(w),v.angle=xi.degToRad(w[3]);break}return v}function q(S){const v={name:S.getAttribute("name")||"",rigidBodies:{}};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"rigid_body":v.rigidBodies[D.getAttribute("name")]={},H(D,v.rigidBodies[D.getAttribute("name")]);break}}gt.physicsModels[S.getAttribute("id")]=v}function H(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"technique_common":ce(D,v);break}}}function ce(S,v){for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"inertia":v.inertia=r(D.textContent);break;case"mass":v.mass=r(D.textContent)[0];break}}}function he(S){const v={bindJointAxis:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"bind_joint_axis":v.bindJointAxis.push(Me(D));break}}gt.kinematicsScenes[a(S.getAttribute("url"))]=v}function Me(S){const v={target:S.getAttribute("target").split("/").pop()};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType===1)switch(D.nodeName){case"axis":const U=D.getElementsByTagName("param")[0];v.axis=U.textContent;const ie=v.axis.split("inst_").pop().split("axis")[0];v.jointIndex=ie.substring(0,ie.length-1);break}}return v}function fe(S){return S.build!==void 0?S.build:S}function Ne(S){return _(gt.kinematicsScenes[S],fe)}function Se(){const S=Object.keys(gt.kinematicsModels)[0],v=Object.keys(gt.kinematicsScenes)[0],w=Object.keys(gt.visualScenes)[0];if(S===void 0||v===void 0)return;const D=ds(S),U=Ne(v),ie=Xe(w),ye=U.bindJointAxis,Qe={};for(let vt=0,Oe=ye.length;vt<Oe;vt++){const _t=ye[vt],ft=Mt.querySelector('[sid="'+_t.target+'"]');if(ft){const bt=ft.parentElement;qe(_t.jointIndex,bt)}}function qe(vt,Oe){const _t=Oe.getAttribute("name"),ft=D.joints[vt];ie.traverse(function(bt){bt.name===_t&&(Qe[vt]={object:bt,transforms:Ee(Oe),joint:ft,position:ft.zeroPosition})})}const nt=new St;Jt={joints:D&&D.joints,getJointValue:function(vt){const Oe=Qe[vt];if(Oe)return Oe.position;console.warn("THREE.ColladaLoader: Joint "+vt+" doesn't exist.")},setJointValue:function(vt,Oe){const _t=Qe[vt];if(_t){const ft=_t.joint;if(Oe>ft.limits.max||Oe<ft.limits.min)console.warn("THREE.ColladaLoader: Joint "+vt+" value "+Oe+" outside of limits (min: "+ft.limits.min+", max: "+ft.limits.max+").");else if(ft.static)console.warn("THREE.ColladaLoader: Joint "+vt+" is static.");else{const bt=_t.object,dt=ft.axis,Zt=_t.transforms;C.identity();for(let Qt=0;Qt<Zt.length;Qt++){const Gt=Zt[Qt];if(Gt.sid&&Gt.sid.indexOf(vt)!==-1)switch(ft.type){case"revolute":C.multiply(nt.makeRotationAxis(dt,xi.degToRad(Oe)));break;case"prismatic":C.multiply(nt.makeTranslation(dt.x*Oe,dt.y*Oe,dt.z*Oe));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+ft.type);break}else switch(Gt.type){case"matrix":C.multiply(Gt.obj);break;case"translate":C.multiply(nt.makeTranslation(Gt.obj.x,Gt.obj.y,Gt.obj.z));break;case"scale":C.scale(Gt.obj);break;case"rotate":C.multiply(nt.makeRotationAxis(Gt.obj,Gt.angle));break}}bt.matrix.copy(C),bt.matrix.decompose(bt.position,bt.quaternion,bt.scale),Qe[vt].position=Oe}}else console.log("THREE.ColladaLoader: "+vt+" does not exist.")}}}function Ee(S){const v=[],w=Mt.querySelector('[id="'+S.id+'"]');for(let D=0;D<w.childNodes.length;D++){const U=w.childNodes[D];if(U.nodeType!==1)continue;let ie,ye;switch(U.nodeName){case"matrix":ie=r(U.textContent);const Qe=new St().fromArray(ie).transpose();v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:Qe});break;case"translate":case"scale":ie=r(U.textContent),ye=new z().fromArray(ie),v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:ye});break;case"rotate":ie=r(U.textContent),ye=new z().fromArray(ie);const qe=xi.degToRad(ie[3]);v.push({sid:U.getAttribute("sid"),type:U.nodeName,obj:ye,angle:qe});break}}return v}function T(S){const v=S.getElementsByTagName("node");for(let w=0;w<v.length;w++){const D=v[w];D.hasAttribute("id")===!1&&D.setAttribute("id",l())}}const C=new St,W=new z;function Y(S){const v={name:S.getAttribute("name")||"",type:S.getAttribute("type"),id:S.getAttribute("id"),sid:S.getAttribute("sid"),matrix:new St,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];if(D.nodeType!==1)continue;let U;switch(D.nodeName){case"node":v.nodes.push(D.getAttribute("id")),Y(D);break;case"instance_camera":v.instanceCameras.push(a(D.getAttribute("url")));break;case"instance_controller":v.instanceControllers.push(V(D));break;case"instance_light":v.instanceLights.push(a(D.getAttribute("url")));break;case"instance_geometry":v.instanceGeometries.push(V(D));break;case"instance_node":v.instanceNodes.push(a(D.getAttribute("url")));break;case"matrix":U=r(D.textContent),v.matrix.multiply(C.fromArray(U).transpose()),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"translate":U=r(D.textContent),W.fromArray(U),v.matrix.multiply(C.makeTranslation(W.x,W.y,W.z)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"rotate":U=r(D.textContent);const ie=xi.degToRad(U[3]);v.matrix.multiply(C.makeRotationAxis(W.fromArray(U),ie)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"scale":U=r(D.textContent),v.matrix.scale(W.fromArray(U)),v.transforms[D.getAttribute("sid")]=D.nodeName;break;case"extra":break;default:console.log(D)}}return ue(v.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",v.id):gt.nodes[v.id]=v,v}function V(S){const v={id:a(S.getAttribute("url")),materials:{},skeletons:[]};for(let w=0;w<S.childNodes.length;w++){const D=S.childNodes[w];switch(D.nodeName){case"bind_material":const U=D.getElementsByTagName("instance_material");for(let ie=0;ie<U.length;ie++){const ye=U[ie],Qe=ye.getAttribute("symbol"),qe=ye.getAttribute("target");v.materials[Qe]=a(qe)}break;case"skeleton":v.skeletons.push(a(D.textContent));break}}return v}function ve(S,v){const w=[],D=[];let U,ie,ye;for(U=0;U<S.length;U++){const nt=S[U];let vt;if(ue(nt))vt=Ie(nt),we(vt,v,w);else if(Re(nt)){const _t=gt.visualScenes[nt].children;for(let ft=0;ft<_t.length;ft++){const bt=_t[ft];if(bt.type==="JOINT"){const dt=Ie(bt.id);we(dt,v,w)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",nt)}for(U=0;U<v.length;U++)for(ie=0;ie<w.length;ie++)if(ye=w[ie],ye.bone.name===v[U].name){D[U]=ye,ye.processed=!0;break}for(U=0;U<w.length;U++)ye=w[U],ye.processed===!1&&(D.push(ye),ye.processed=!0);const Qe=[],qe=[];for(U=0;U<D.length;U++)ye=D[U],Qe.push(ye.bone),qe.push(ye.boneInverse);return new tc(Qe,qe)}function we(S,v,w){S.traverse(function(D){if(D.isBone===!0){let U;for(let ie=0;ie<v.length;ie++){const ye=v[ie];if(ye.name===D.name){U=ye.boneInverse;break}}U===void 0&&(U=new St),w.push({bone:D,boneInverse:U,processed:!1})}})}function _e(S){const v=[],w=S.matrix,D=S.nodes,U=S.type,ie=S.instanceCameras,ye=S.instanceControllers,Qe=S.instanceLights,qe=S.instanceGeometries,nt=S.instanceNodes;for(let Oe=0,_t=D.length;Oe<_t;Oe++)v.push(Ie(D[Oe]));for(let Oe=0,_t=ie.length;Oe<_t;Oe++){const ft=ot(ie[Oe]);ft!==null&&v.push(ft.clone())}for(let Oe=0,_t=ye.length;Oe<_t;Oe++){const ft=ye[Oe],bt=K(ft.id),dt=Sn(bt.id),Zt=Le(dt,ft.materials),Qt=ft.skeletons,Gt=bt.skin.joints,Wt=ve(Qt,Gt);for(let di=0,Ln=Zt.length;di<Ln;di++){const ps=Zt[di];ps.isSkinnedMesh&&(ps.bind(Wt,bt.skin.bindMatrix),ps.normalizeSkinWeights()),v.push(ps)}}for(let Oe=0,_t=Qe.length;Oe<_t;Oe++){const ft=J(Qe[Oe]);ft!==null&&v.push(ft.clone())}for(let Oe=0,_t=qe.length;Oe<_t;Oe++){const ft=qe[Oe],bt=Sn(ft.id),dt=Le(bt,ft.materials);for(let Zt=0,Qt=dt.length;Zt<Qt;Zt++)v.push(dt[Zt])}for(let Oe=0,_t=nt.length;Oe<_t;Oe++)v.push(Ie(nt[Oe]).clone());let vt;if(D.length===0&&v.length===1)vt=v[0];else{vt=U==="JOINT"?new k0:new wn;for(let Oe=0;Oe<v.length;Oe++)vt.add(v[Oe])}return vt.name=U==="JOINT"?S.sid:S.name,vt.matrix.copy(w),vt.matrix.decompose(vt.position,vt.quaternion,vt.scale),vt}const oe=new Gi({name:ni.DEFAULT_MATERIAL_NAME,color:16711935});function ne(S,v){const w=[];for(let D=0,U=S.length;D<U;D++){const ie=v[S[D]];ie===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",S[D]),w.push(oe)):w.push(be(ie))}return w}function Le(S,v){const w=[];for(const D in S){const U=S[D],ie=ne(U.materialKeys,v);if(ie.length===0&&(D==="lines"||D==="linestrips"?ie.push(new Ei):ie.push(new cn)),D==="lines"||D==="linestrips")for(let nt=0,vt=ie.length;nt<vt;nt++){const Oe=ie[nt];if(Oe.isMeshPhongMaterial===!0||Oe.isMeshLambertMaterial===!0){const _t=new Ei;_t.color.copy(Oe.color),_t.opacity=Oe.opacity,_t.transparent=Oe.transparent,ie[nt]=_t}}const ye=U.data.attributes.skinIndex!==void 0,Qe=ie.length===1?ie[0]:ie;let qe;switch(D){case"lines":qe=new Ra(U.data,Qe);break;case"linestrips":qe=new Ba(U.data,Qe);break;case"triangles":case"polylist":ye?qe=new o1(U.data,Qe):qe=new Nt(U.data,Qe);break}w.push(qe)}return w}function ue(S){return gt.nodes[S]!==void 0}function Ie(S){return _(gt.nodes[S],_e)}function re(S){const v={name:S.getAttribute("name"),children:[]};T(S);const w=n(S,"node");for(let D=0;D<w.length;D++)v.children.push(Y(w[D]));gt.visualScenes[S.getAttribute("id")]=v}function ct(S){const v=new wn;v.name=S.name;const w=S.children;for(let D=0;D<w.length;D++){const U=w[D];v.add(Ie(U.id))}return v}function Re(S){return gt.visualScenes[S]!==void 0}function Xe(S){return _(gt.visualScenes[S],ct)}function We(S){const v=n(S,"instance_visual_scene")[0];return Xe(a(v.getAttribute("url")))}function ht(){const S=gt.clips;if(c(S)===!0){if(c(gt.animations)===!1){const v=[];for(const w in gt.animations){const D=b(w);for(let U=0,ie=D.length;U<ie;U++)v.push(D[U])}Ve.push(new hh("default",-1,v))}}else for(const v in S)Ve.push(Q(v))}function at(S){let v="";const w=[S];for(;w.length;){const D=w.shift();D.nodeType===Node.TEXT_NODE?v+=D.textContent:(v+=`
|
|
4198
|
+
`,w.push(...D.childNodes))}return v.trim()}if(e.length===0)return{scene:new Ia};const wt=new DOMParser().parseFromString(e,"application/xml"),Mt=n(wt,"COLLADA")[0],Pt=wt.getElementsByTagName("parsererror")[0];if(Pt!==void 0){const S=n(Pt,"div")[0];let v;return S?v=S.textContent:v=at(Pt),console.error(`THREE.ColladaLoader: Failed to parse collada file.
|
|
4199
|
+
`,v),null}const jt=Mt.getAttribute("version");console.debug("THREE.ColladaLoader: File version",jt);const Lt=d(n(Mt,"asset")[0]),Yt=new oc(this.manager);Yt.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);let Ht;r0&&(Ht=new r0(this.manager),Ht.setPath(this.resourcePath||t));const Kt=new At,Ve=[];let Jt={},kt=0;const gt={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(Mt,"library_animations","animation",f),h(Mt,"library_animation_clips","animation_clip",G),h(Mt,"library_controllers","controller",xe),h(Mt,"library_images","image",te),h(Mt,"library_effects","effect",$),h(Mt,"library_materials","material",le),h(Mt,"library_cameras","camera",yt),h(Mt,"library_lights","light",Tt),h(Mt,"library_geometries","geometry",tt),h(Mt,"library_nodes","node",Y),h(Mt,"library_visual_scenes","visual_scene",re),h(Mt,"library_kinematics_models","kinematics_model",In),h(Mt,"library_physics_models","physics_model",q),h(Mt,"scene","instance_kinematics_scene",he),g(gt.animations,M),g(gt.clips,de),g(gt.controllers,ae),g(gt.images,ee),g(gt.effects,k),g(gt.materials,Ue),g(gt.cameras,ze),g(gt.lights,Ct),g(gt.geometries,Rt),g(gt.visualScenes,ct),ht(),Se();const Gn=We(n(Mt,"scene")[0]);return Gn.animations=Ve,Lt.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."),Gn.rotation.set(-Math.PI/2,0,0)),Gn.scale.multiplyScalar(Lt.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),Ve},kinematics:Jt,library:gt,scene:Gn}}}const a0=new z,S4=new vn,ca=new St,zi=new St,ha=new Un,ua=new z(1,1,1),da=new z;class Wa extends rn{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 A4 extends Wa{constructor(...e){super(...e),this.isURDFCollider=!0,this.type="URDFCollider"}}class E4 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 z(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 z(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],zi.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),zi.premultiply(ca),this.position.setFromMatrixPosition(zi),this.rotation.setFromRotationMatrix(zi),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],zi.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),zi.premultiply(ca),this.position.setFromMatrixPosition(zi),this.rotation.setFromRotationMatrix(zi),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 Un,l0=new vn;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(x){if(!/^package:\/\//.test(x))return t?t+x:x;const[M,b]=x.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof n=="string")return n.endsWith(M)?n+"/"+b:n+"/"+M+"/"+b;if(n instanceof Function)return n(M)+"/"+b;if(typeof n=="object")return M in n?n[M]+"/"+b:(console.error(`URDFLoader : ${M} not found in provided package list.`),null)}function u(x){let M;x instanceof Document?M=[...x.children]:x instanceof Element?M=[x]:M=[...new DOMParser().parseFromString(x,"text/xml").children];const b=M.filter(N=>N.nodeName==="robot").pop();return h(b)}function h(x){const M=[...x.children],b=M.filter(F=>F.nodeName.toLowerCase()==="link"),N=M.filter(F=>F.nodeName.toLowerCase()==="joint"),L=M.filter(F=>F.nodeName.toLowerCase()==="material"),P=new w4;P.robotName=x.getAttribute("name"),P.urdfRobotNode=x,L.forEach(F=>{const B=F.getAttribute("name");d[B]=f(F)});const I={},E={};b.forEach(F=>{const B=F.getAttribute("name"),X=x.querySelector(`child[link="${B}"]`)===null;l[B]=_(F,I,E,X?P:null)}),N.forEach(F=>{const B=F.getAttribute("name");c[B]=g(F)}),P.joints=c,P.links=l,P.colliders=E,P.visual=I;const A=Object.values(c);return A.forEach(F=>{F instanceof o0&&c[F.mimicJoint].mimicJoints.push(F)}),A.forEach(F=>{const B=new Set,X=Z=>{if(B.has(Z))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");B.add(Z),Z.mimicJoints.forEach(se=>{X(se)})};X(F)}),P.frames={...E,...I,...l,...c},P}function g(x){const M=[...x.children],b=x.getAttribute("type");let N;const L=M.find(B=>B.nodeName.toLowerCase()==="mimic");L?(N=new o0,N.mimicJoint=L.getAttribute("joint"),N.multiplier=parseFloat(L.getAttribute("multiplier")||1),N.offset=parseFloat(L.getAttribute("offset")||0)):N=new fu,N.urdfNode=x,N.name=x.getAttribute("name"),N.urdfName=N.name,N.jointType=b;let P=null,I=null,E=[0,0,0],A=[0,0,0];M.forEach(B=>{const X=B.nodeName.toLowerCase();X==="origin"?(E=Ns(B.getAttribute("xyz")),A=Ns(B.getAttribute("rpy"))):X==="child"?I=l[B.getAttribute("link")]:X==="parent"?P=l[B.getAttribute("link")]:X==="limit"&&(N.limit.lower=parseFloat(B.getAttribute("lower")||N.limit.lower),N.limit.upper=parseFloat(B.getAttribute("upper")||N.limit.upper))}),P.add(N),N.add(I),c0(N,A),N.position.set(E[0],E[1],E[2]);const F=M.filter(B=>B.nodeName.toLowerCase()==="axis")[0];if(F){const B=F.getAttribute("xyz").split(/\s+/g).map(X=>parseFloat(X));N.axis=new z(B[0],B[1],B[2]),N.axis.normalize()}return N}function _(x,M,b,N=null){N===null&&(N=new du);const L=[...x.children];return N.name=x.getAttribute("name"),N.urdfName=N.name,N.urdfNode=x,r&&L.filter(I=>I.nodeName.toLowerCase()==="visual").forEach(I=>{const E=p(I,d);if(N.add(E),I.hasAttribute("name")){const A=I.getAttribute("name");E.name=A,E.urdfName=A,M[A]=E}}),o&&L.filter(I=>I.nodeName.toLowerCase()==="collision").forEach(I=>{const E=p(I);if(N.add(E),I.hasAttribute("name")){const A=I.getAttribute("name");E.name=A,E.urdfName=A,b[A]=E}}),N}function f(x){const M=[...x.children],b=new cn;return b.name=x.getAttribute("name")||"",M.forEach(N=>{const L=N.nodeName.toLowerCase();if(L==="color"){const P=N.getAttribute("rgba").split(/\s/g).map(I=>parseFloat(I));b.color.setRGB(P[0],P[1],P[2]),b.opacity=P[3],b.transparent=P[3]<1,b.depthWrite=!b.transparent}else if(L==="texture"){const P=N.getAttribute("filename");if(P){const I=new oc(a),E=m(P);b.map=I.load(E),b.map.colorSpace=Vt}}}),b}function p(x,M={}){const b=x.nodeName.toLowerCase()==="collision",N=[...x.children];let L=null;const P=N.filter(E=>E.nodeName.toLowerCase()==="material")[0];if(P){const E=P.getAttribute("name");E&&E in M?L=M[E]:L=f(P)}else L=new cn;const I=b?new A4:new E4;return I.urdfNode=x,N.forEach(E=>{const A=E.nodeName.toLowerCase();if(A==="geometry"){const F=E.children[0].nodeName.toLowerCase();if(F==="mesh"){const B=E.children[0].getAttribute("filename"),X=m(B);if(X!==null){const Z=E.children[0].getAttribute("scale");if(Z){const se=Ns(Z);I.scale.set(se[0],se[1],se[2])}i(X,a,(se,G)=>{G?console.error("URDFLoader: Error loading mesh.",G):se&&(se instanceof Nt&&(se.material=L),se.position.set(0,0,0),se.quaternion.identity(),I.add(se))})}}else if(F==="box"){const B=new Nt;B.geometry=new Wi(1,1,1),B.material=L;const X=Ns(E.children[0].getAttribute("size"));B.scale.set(X[0],X[1],X[2]),I.add(B)}else if(F==="sphere"){const B=new Nt;B.geometry=new Oa(1,30,30),B.material=L;const X=parseFloat(E.children[0].getAttribute("radius"))||0;B.scale.set(X,X,X),I.add(B)}else if(F==="cylinder"){const B=new Nt;B.geometry=new ic(1,1,1,30),B.material=L;const X=parseFloat(E.children[0].getAttribute("radius"))||0,Z=parseFloat(E.children[0].getAttribute("length"))||0;B.scale.set(X,Z,X),B.rotation.set(Math.PI/2,0,0),I.add(B)}}else if(A==="origin"){const F=Ns(E.getAttribute("xyz")),B=Ns(E.getAttribute("rpy"));I.position.set(F[0],F[1],F[2]),I.rotation.set(0,0,0),c0(I,B)}}),I}return u(e)}defaultMeshLoader(e,t,n){/\.stl$/i.test(e)?new Hi(t).load(e,r=>{const o=new Nt(r,new cn);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
|
+
No loader available`)}}const T4=/^[og]\s*(.+)?/,C4=/^mtllib /,R4=/^usemtl /,D4=/^usemap /,h0=/\s+/,u0=new z,zo=new z,d0=new z,f0=new z,Xn=new z,fa=new At;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),Xn.subVectors(d0,zo),f0.subVectors(u0,zo),Xn.cross(f0),Xn.normalize(),r.push(Xn.x,Xn.y,Xn.z),r.push(Xn.x,Xn.y,Xn.z),r.push(Xn.x,Xn.y,Xn.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 as extends ni{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]),Vt),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,f=u.length;_<f;_++){const p=u[_];if(p.length>0){const x=p.split("/");h.push(x)}}const g=h[0];for(let _=1,f=h.length-1;_<f;_++){const p=h[_],x=h[_+1];t.addFace(g[0],p[0],x[0],g[1],p[1],x[1],g[2],p[2],x[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 f=m[g].split("/");f[0]!==""&&u.push(f[0]),f[1]!==""&&h.push(f[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
|
|
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:Yn,this.wrap=this.options.wrap!==void 0?this.options.wrap:oi}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=Vt),i[a]=d}for(const a in n){const l=n[a];let c;if(l!=="")switch(a.toLowerCase()){case"kd":i.color=Bt.colorSpaceToWorking(new
|
|
4206
|
-
`||I==="\r"?(p.trim().toLowerCase().startsWith("data")&&(M=!0),p=""):p+=I,f+=I}const N=f.search(/[\r\n]DATA\s(\S*)\s/i),L=/[\r\n]DATA\s(\S*)\s/i.exec(f.slice(N-1));if(g.data=L[1],g.headerLen=L[0].length+N,g.str=f.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(I){return parseInt(I,10)})),g.count!==null)g.count=g.count[1].split(" ").map(function(I){return parseInt(I,10)});else{g.count=[];for(let I=0,
|
|
4207
|
-
`);for(let p=0,x=f.length;p<x;p++){if(f[p]==="")continue;const M=f[p].split(" ");if(h.x!==void 0&&(r.push(parseFloat(M[h.x])),r.push(parseFloat(M[h.y])),r.push(parseFloat(M[h.z]))),h.rgb!==void 0){const b=i.fields.findIndex(F=>F==="rgb"),N=i.type[b],L=parseFloat(M[h.rgb]);let P=L;if(N==="F"){const F=new Float32Array(1);F[0]=L,P=new Int32Array(F.buffer)[0]}const I=(P>>16&255)/255,A=(P>>8&255)/255,E=(P>>0&255)/255;d.setRGB(I,A,E,Vt),a.push(d.r,d.g,d.b)}h.normal_x!==void 0&&(o.push(parseFloat(M[h.normal_x])),o.push(parseFloat(M[h.normal_y])),o.push(parseFloat(M[h.normal_z]))),h.intensity!==void 0&&l.push(parseFloat(M[h.intensity])),h.label!==void 0&&c.push(parseInt(M[h.label]))}}if(i.data==="binary_compressed"){const h=new Uint32Array(e.slice(i.headerLen,i.headerLen+8)),g=h[0],_=h[1],f=t(new Uint8Array(e,i.headerLen+8,g),_),p=new DataView(f.buffer),x=i.offset;for(let M=0;M<i.points;M++){if(x.x!==void 0){const b=i.fields.indexOf("x"),N=i.fields.indexOf("y"),L=i.fields.indexOf("z");r.push(this._getDataView(p,i.points*x.x+i.size[b]*M,i.type[b],i.size[b])),r.push(this._getDataView(p,i.points*x.y+i.size[N]*M,i.type[N],i.size[N])),r.push(this._getDataView(p,i.points*x.z+i.size[L]*M,i.type[L],i.size[L]))}if(x.rgb!==void 0){const b=i.fields.indexOf("rgb"),N=p.getUint8(i.points*x.rgb+i.size[b]*M+2)/255,L=p.getUint8(i.points*x.rgb+i.size[b]*M+1)/255,P=p.getUint8(i.points*x.rgb+i.size[b]*M+0)/255;d.setRGB(N,L,P,Vt),a.push(d.r,d.g,d.b)}if(x.normal_x!==void 0){const b=i.fields.indexOf("normal_x"),N=i.fields.indexOf("normal_y"),L=i.fields.indexOf("normal_z");o.push(this._getDataView(p,i.points*x.normal_x+i.size[b]*M,i.type[b],i.size[b])),o.push(this._getDataView(p,i.points*x.normal_y+i.size[N]*M,i.type[N],i.size[N])),o.push(this._getDataView(p,i.points*x.normal_z+i.size[L]*M,i.type[L],i.size[L]))}if(x.intensity!==void 0){const b=i.fields.indexOf("intensity");l.push(this._getDataView(p,i.points*x.intensity+i.size[b]*M,i.type[b],i.size[b]))}if(x.label!==void 0){const b=i.fields.indexOf("label");c.push(p.getInt32(i.points*x.label+i.size[b]*M,this.littleEndian))}}}if(i.data==="binary"){const h=new DataView(e,i.headerLen),g=i.offset;for(let _=0,f=0;_<i.points;_++,f+=i.rowSize){if(g.x!==void 0){const p=i.fields.indexOf("x"),x=i.fields.indexOf("y"),M=i.fields.indexOf("z");r.push(this._getDataView(h,f+g.x,i.type[p],i.size[p])),r.push(this._getDataView(h,f+g.y,i.type[x],i.size[x])),r.push(this._getDataView(h,f+g.z,i.type[M],i.size[M]))}if(g.rgb!==void 0){const p=h.getUint8(f+g.rgb+2)/255,x=h.getUint8(f+g.rgb+1)/255,M=h.getUint8(f+g.rgb+0)/255;d.setRGB(p,x,M,Vt),a.push(d.r,d.g,d.b)}if(g.normal_x!==void 0){const p=i.fields.indexOf("normal_x"),x=i.fields.indexOf("normal_y"),M=i.fields.indexOf("normal_z");o.push(this._getDataView(h,f+g.normal_x,i.type[p],i.size[p])),o.push(this._getDataView(h,f+g.normal_y,i.type[x],i.size[x])),o.push(this._getDataView(h,f+g.normal_z,i.type[M],i.size[M]))}if(g.intensity!==void 0){const p=i.fields.indexOf("intensity");l.push(this._getDataView(h,f+g.intensity,i.type[p],i.size[p]))}g.label!==void 0&&c.push(h.getInt32(f+g.label,this.littleEndian))}}const m=new rn;r.length>0&&m.setAttribute("position",new Lt(r,3)),o.length>0&&m.setAttribute("normal",new Lt(o,3)),a.length>0&&m.setAttribute("color",new Lt(a,3)),l.length>0&&m.setAttribute("intensity",new Lt(l,1)),c.length>0&&m.setAttribute("label",new J2(c,1)),m.computeBoundingSphere();const u=new Oi({size:.005});return a.length>0&&(u.vertexColors=!0),new Vs(m,u)}}const N4=Ve.useModelComp(Ve.pinia),{systemPath:p0}=Ve.storeToRefs(N4),pa=y.ref(),m0=new Map;function U4(s,e,t,n,i){const r=async u=>{try{const h=await Fn.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=f=>{try{const p=f.target.result,M=new os().parse(p);M.preload(),h(M)}catch(p){g(p)}},_.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 ln({color:8947848,side:cn}))},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 f=new FileReader;f.onload=async p=>{try{const x=p.target.result;let M=null;h&&h.length>0&&(h.length===1?M=await o(h[0]):M=await a(h));const b=new as;M&&b.setMaterials(M);const N=b.parse(x);M||N.traverse(L=>{L.isMesh&&(L.material=new ln({color:8947848,side:cn}))}),g(N)}catch(x){_(x)}},f.onerror=()=>{_(new Error("OBJ文件读取失败"))},f.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 f=0;f<u.length;f++){const p=u[f];n.value=`正在加载模型 ${f+1}/${u.length}...`;const x=await r(p.objUrl),M=((h=p.objUrl)==null?void 0:h.split("/").pop())||`model_${f}.obj`,b=new File([x],M,{type:x.type});let N=[];if(p.mtlUrls){const P=Array.isArray(p.mtlUrls)?p.mtlUrls:[p.mtlUrls];for(let I=0;I<P.length;I++){const A=P[I],E=await r(A),F=(A==null?void 0:A.split("/").pop())||`material_${f}_${I}.mtl`,B=new File([E],F,{type:E.type});N.push(B)}}const L=await l(b,N);g.add(L),e.value.push(L),_.push(L)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let f;const p=u.toLowerCase();switch(p){case".txt":case".cpt":case".obj":const x=await h.text();if(p===".txt"||p===".cpt"){const Y=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Te=[...x.matchAll(Y)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),et=new rn,We=Te.flatMap(O=>[O.x,O.y,O.z]);if(et.setAttribute("position",new Lt(We,3)),p===".txt"){const O=new Oi({color:"#5B5C99",size:1,sizeAttenuation:!1});f=new Vs(et,O)}else if(p===".cpt"){const O=new Ai({color:"#5B5C99",linewidth:100});f=new Ba(et,O)}}else if(p===".obj"){const Y=new as;if(g&&g.length>0){const me=new os;for(const Te of g){const et=await Te.text(),We=me.parse(et);We.preload(),Y.setMaterials(We);break}}f=Y.parse(x),(!g||g.length===0)&&f.traverse(me=>{me.isMesh&&(me.material=new ln({color:"#B3B3D4"})),me instanceof Pt&&(me.material.side=cn)})}break;case".stl":const M=await h.arrayBuffer(),N=new Hi().parse(M),L=new ln({color:"#B3B3D4",side:cn});f=new Pt(N,L);break;case".nc":const P=["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"],I={"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 An,E=P.map(Y=>new Promise((me,Te)=>{new Hi().load(p0.value===""?`/model/${Y}`:`${p0.value}\\${Y}`,We=>{const O=new ln({color:I[Y]||"#B3B3D4",side:cn}),dt=new Pt(We,O);me(dt)},void 0,Te)}));try{(await Promise.all(E)).forEach(me=>A.add(me)),f=A}catch(Y){throw console.error("加载NC文件对应的STL文件失败:",Y),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const F=new pu,B=new An;try{const Y=await wn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),me=new Blob([Y.data],{type:"application/octet-stream;charset=UTF-8"}),Te=await wn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),et=new Blob([Te.data],{type:"application/octet-stream;charset=UTF-8"}),We=await new Promise((dt,st)=>{const it=URL.createObjectURL(me);F.load(it,Ie=>{const Ze=new Float32Array(Ie.geometry.attributes.position.count*3);for(let Le=0;Le<Ie.geometry.attributes.position.count;Le++)Ze[Le*3]=1,Ze[Le*3+1]=0,Ze[Le*3+2]=0;Ie.geometry.setAttribute("color",new hn(Ze,3)),Ie.material.vertexColors=!0,Ie.scale.set(.3,.3,.3),URL.revokeObjectURL(it),dt(Ie)},void 0,st)}),O=await new Promise((dt,st)=>{const it=URL.createObjectURL(et);F.load(it,Ie=>{const Ze=new Float32Array(Ie.geometry.attributes.position.count*3);for(let Le=0;Le<Ie.geometry.attributes.position.count;Le++)Ze[Le*3]=0,Ze[Le*3+1]=1,Ze[Le*3+2]=0;Ie.geometry.setAttribute("color",new hn(Ze,3)),Ie.material.vertexColors=!0,Ie.scale.set(.3,.3,.3),URL.revokeObjectURL(it),dt(Ie)},void 0,st)});B.add(We),B.add(O),f=B}catch(Y){throw console.error("PCD文件加载失败:",Y),new Error("无法加载PCD文件")}break;case".urdf":const X=URL.createObjectURL(h),Z=new gc,se="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",W={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},he=new Map,Q=new Map,xe=new Map,De=async Y=>{if(he.has(Y))return console.log(`从缓存加载: ${Y}`),he.get(Y);try{const me=await wn.axios.get(`${se}/${Y}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Te=new Blob([me.data],{type:"application/octet-stream;charset=UTF-8"});return W.enableCache&&he.set(Y,Te),Te}catch(me){throw console.error(`加载文件失败: ${Y}`,me),new Error(`无法加载文件: ${Y}`)}},Ae=(Y="default")=>{if(Q.has(Y))return Q.get(Y);const me=new ln({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Yn});return Q.set(Y,me),me},pe=Y=>{try{Y.isBufferGeometry&&Y.mergeVertices&&Y.mergeVertices(),Y.computeVertexNormals&&Y.computeVertexNormals(),Y.computeBoundingSphere&&Y.computeBoundingSphere(),Y.deleteAttribute&&Y.deleteAttribute("uv2")}catch(me){console.warn("几何体优化失败,使用原始几何体:",me)}return Y},re=async(Y,me,Te)=>{const et=`stl_${me}`;if(xe.has(et)){const st=xe.get(et);return new Pt(st,Ae())}const We=await Y.arrayBuffer();let dt=new Hi(Te).parse(We);return dt=pe(dt),xe.set(et,dt),new Pt(dt,Ae())},q=async(Y,me,Te)=>{const et=`obj_${me}`;if(he.has(et))return he.get(et).clone();const We=await Y.text(),O=new as(Te),dt=me.replace(".obj",".mtl");try{const Ie=await(await De(dt)).text(),Le=new os(Te).parse(Ie);Le.preload(),O.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${dt}`)}const st=O.parse(We);return st.traverse(it=>{it.isMesh&&(it.geometry=pe(it.geometry),it.castShadow=!0,it.receiveShadow=!0,it.renderOrder=1)}),he.set(et,st),st},K=(Y,me)=>{const Te=new O0;if(Te.addLevel(Y,0),Y.geometry){const et=Y.geometry.clone(),We=new Pt(et,Y.material);Te.addLevel(We,50)}return Te};let te=0,ee=0;const fe=[];Z.loadMeshCb=async(Y,me,Te,et,We)=>{const O=Y.split("/").pop(),dt=Te||(()=>{});te++;const st=new Promise(async(it,Ie)=>{try{const Ze=await De(O);if(!Ze||Ze.size===0)throw new Error(`文件为空: ${O}`);const Le=O.split(".").pop().toLowerCase();let rt;switch(Le){case"stl":rt=await re(Ze,O,me);break;case"obj":rt=await q(Ze,O,me);break;default:throw new Error(`不支持的文件格式: ${Le}`)}W.enableLOD&&rt.isMesh&&(rt=K(rt,O)),dt(rt),ee++,et&&et({loaded:ee,total:te,progress:ee/te}),it(rt)}catch(Ze){console.error(`mesh文件加载失败: ${O}`,Ze);const Le=new An;dt(Le),it(Le);const rt=new Wi(.1,.1,.1),Xt=new j0({color:16711680,wireframe:!0});return new Pt(rt,Xt)}});fe.push(st)};try{if(!X){pa.value=void 0;break}if(f=await Z.loadAsync(X),console.log(`URDF文件加载完成,等待${te}个mesh文件加载...`),fe.length>0)try{await Promise.allSettled(fe),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${te}`)}catch(Te){console.warn("部分mesh文件加载失败,但继续显示模型",Te)}f.traverse(Te=>{Te.isMesh&&(Te.castShadow=!0,Te.receiveShadow=!0,Te.renderOrder=1,Te.material&&(Te.material.needsUpdate=!0))}),console.time("计算包围盒");const Y=new Tn;Y.expandByObject(f);const me=`urdf_${Date.now()}`;f.userData.boundingBox=Y.clone(),f.userData.modelId=me,m0.set(me,{box:Y.clone(),center:Y.getCenter(new z),size:Y.getSize(new z),maxSize:Math.max(...Y.getSize(new z).toArray())}),pa.value=f,console.log("URDF模型加载完成并优化")}catch(Y){console.error("URDF加载失败:",Y),pa.value=void 0}finally{X&&URL.revokeObjectURL(X)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return f};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 f=u[_],p=await d(f.suffix,f.blob,f.mtlBlobs||[],f.meshFiles||[]);p&&(h.add(p),e.value.push(p),g.push(p))}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=Ve.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=Ci._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"},K4={class:"joint-value"},J4={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),_=xi.degToRad,f=y.ref(1),p=()=>Q4/ko/f.value;let x=[];y.watch(()=>t.animationData,re=>{var K;l.value=re.extra.管长,o.value=re.extra.外径/2;let q=((K=Ve.cloneDeep(re))==null?void 0:K["输出(动画数据)"])??[];q&&q.length>0&&(x=q)},{deep:!0}),y.computed(()=>x.length>0);const M=(re,q=!1)=>re==="revolute"?q?Math.PI:-Math.PI:re==="prismatic"?q?1:-1:0,b=()=>{if(!i.value)return wn.ElMessage.error("未加载 URDF"),!1;let re=null;return i.value.traverse(q=>{re||q.name==="Pipe_Link"&&q.traverse(K=>{K instanceof Pt&&!re&&(re=K)})}),re?(re.position.y-=c.value*hr,a.value=re,re.material=new ln({color:11184810,shininess:80,side:cn}),!0):(wn.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},N=re=>{if(!re||!re.joints)return console.warn("URDF模型没有关节信息"),[];let q=null;if(re.traverse(te=>{te.name==="Pipe_Link"&&!q&&(q=te)}),q)a.value=q;else return console.warn("未找到管子模型"),[];const K=[];return Object.keys(re.joints).forEach(te=>{const ee=re.joints[te];if(ee._jointType==="fixed")return;const fe=ee.limit?{lower:ee.limit.lower??M(ee._jointType,!1),upper:ee.limit.upper??M(ee._jointType,!0)}:{lower:M(ee._jointType,!1),upper:M(ee._jointType,!0)};K.push({name:te,type:ee._jointType||"unknown",limit:fe,currentValue:ee.angle||0,urdfJoint:ee})}),K.sort((te,ee)=>te.name.localeCompare(ee.name))},L=(re,q)=>{const K=n.value.find(ee=>ee.name===re);if(!K)return;const te=parseFloat(q);if(K.limit){const ee=Math.max(K.limit.lower,Math.min(K.limit.upper,te));K.currentValue=ee}else K.currentValue=te;t.model&&t.model.setJointValue?t.model.setJointValue(re,K.currentValue):K.urdfJoint&&K.urdfJoint.setJointValue(K.currentValue)},P=re=>re.reduce((q,K)=>{let te=0;const ee=K.Y??0,fe=K.C??0,Y=K.R??0;return ee>0&&(te+=ee),fe>0&&Y>0&&(te+=Y*_(fe)),q+te},0),I=re=>{const q=[],K=re.Y??0,te=re.B??0,ee=re.C??0,fe=re.R??0,Y={pos:new z(0,0,0),localY:new z(0,1,0),localX:new z(1,0,0),localZ:new z(0,0,1)};if(!K&&!ee)return q;if(q.push(Y.pos.clone()),te!==0){const me=new Mt().makeRotationAxis(Y.localY,_(te));Y.localX.applyMatrix4(me),Y.localZ.applyMatrix4(me)}if(K>0&&(Y.pos.add(Y.localY.clone().multiplyScalar(K*hr)),q.push(Y.pos.clone())),ee>0&&fe>0){const me=_(ee),Te=fe*hr,et=Y.pos.clone().add(Y.localX.clone().multiplyScalar(-Te)),We=Math.max(16,Math.ceil(ee/5));for(let O=1;O<=We;O++){const dt=me*O/We,st=new Mt().makeRotationAxis(Y.localZ,dt),Ie=Y.localX.clone().multiplyScalar(Te).applyMatrix4(st),Ze=et.clone().add(Ie);q.push(Ze)}}return q},A=(re,q=0)=>{let K=x.slice(0,re+1);const te=x[re+1];if(te&&q>0){const We={...te,B:(te.B??0)*q,C:(te.C??0)*q};K.push(We)}const ee=P(K),fe=Math.max(0,l.value-ee),Y=[];Y.push(new z(0,0,0));const me=new z(0,fe*hr,0);fe>0&&Y.push(me);let Te={pos:me.clone(),localY:new z(0,1,0),localX:new z(1,0,0),localZ:new z(0,0,1)};const et=[];for(let We=K.length-1;We>=0;We--){const O=K[We],dt=I(O);if(dt.length>0){const st=dt.map(Le=>{const rt=Le.clone(),Xt=new Mt;return Xt.makeBasis(Te.localX,Te.localY,Te.localZ),rt.applyMatrix4(Xt),rt.add(Te.pos)});et.push(st);const it=st[st.length-1];Te.pos=it.clone();const Ie=O.B??0,Ze=O.C??0;if(Ie!==0){const Le=new Mt().makeRotationAxis(Te.localY,_(Ie));Te.localX.applyMatrix4(Le),Te.localZ.applyMatrix4(Le)}if(Ze>0){const Le=_(Ze),rt=new Mt().makeRotationAxis(Te.localZ,Le);Te.localY.applyMatrix4(rt),Te.localX.applyMatrix4(rt)}}}for(const We of et)We.length>1&&Y.push(...We.slice(1));Y.length<2&&Y.push(new z(0,.001,0));try{const We=new rc(Y,!1,"catmullrom",.01),O=new ka(We,Math.max(2,Y.length*4),o.value*hr,18,!1);a.value.geometry.dispose(),a.value.geometry=O}catch(We){console.error("管件更新失败",We)}},E=(re,q,K=1)=>{re&&(Object.keys(re).forEach(te=>{const ee=re[te],fe=n.value.find(Y=>Y.name===te);fe&&(fe.currentValue=ee,t.model&&t.model.setJointValue?t.model.setJointValue(te,ee):fe.urdfJoint&&fe.urdfJoint.setJointValue(ee))}),A(q,K))},F=(re,q,K)=>re+(q-re)*K,B=(re,q,K)=>{if(!re||!q)return re||q;const te={};return Object.keys(re).forEach(ee=>{const fe=re[ee],Y=q[ee];te[ee]=F(fe,Y||fe,K)}),te},X=()=>{if(x.length===0){console.warn("没有动画数据");return}b(),d.value=!0,m.value=!1,u.value=0,h.value=0,Z()},Z=()=>{if(!d.value||m.value)return;const re=u.value;if(re>=x.length-1){const ee=x[x.length-1];E(ee,x.length-1,1),W();return}const q=h.value/ko,K=x[re],te=x[re+1];if(te){const ee=B(K,te,q);E(ee,re,q)}else E(K,re);h.value++,h.value>ko&&(h.value=0,u.value++),g.value=setTimeout(Z,p())},se=()=>{m.value=!0,g.value&&(clearTimeout(g.value),g.value=null)},W=()=>{d.value=!1,m.value=!1,f.value=1,g.value&&(clearTimeout(g.value),g.value=null)};e({startAnimation:X,pauseAnimation:se,stopAnimation:W,resetAll:()=>{W(),u.value=0,h.value=0,n.value.forEach(re=>{(re.type==="revolute"||re.type==="prismatic")&&L(re.name,0)}),A(-1,0)},fastForward:()=>{f.value<4&&(f.value=Math.min(4,f.value*2))},fastBackward:()=>{f.value>.25&&(f.value=Math.max(.25,f.value/2))}}),y.watch(()=>t.model,re=>{re?(i.value=re,n.value=N(re)):n.value=[]},{immediate:!0});const De=()=>{!t.model||d.value&&!m.value||n.value.forEach(re=>{re.urdfJoint&&re.urdfJoint.angle!==void 0&&(re.currentValue=re.urdfJoint.angle)})},Ae=()=>{const re=()=>{De(),r.value=requestAnimationFrame(re)};re()},pe=()=>{r.value&&(cancelAnimationFrame(r.value),r.value=null)};return y.onMounted(()=>{Ae()}),y.onUnmounted(()=>{pe(),W()}),(re,q)=>(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,K=>{var te,ee,fe,Y;return y.openBlock(),y.createElementBlock("div",{key:K.name,class:"joint-item"},[y.createElementVNode("div",V4,[y.createElementVNode("div",H4,[y.createElementVNode("span",G4,y.toDisplayString(K.name),1),y.createElementVNode("span",W4," ["+y.toDisplayString(((te=K.limit)==null?void 0:te.lower.toFixed(2))??(K.type==="revolute"?"-3.14":"-1.00"))+", "+y.toDisplayString(((ee=K.limit)==null?void 0:ee.upper.toFixed(2))??(K.type==="revolute"?"3.14":"1.00"))+"] ",1)]),y.createElementVNode("span",X4,y.toDisplayString(K.type),1)]),K.type==="revolute"||K.type==="prismatic"?(y.openBlock(),y.createElementBlock("div",j4,[y.createElementVNode("div",q4,[y.createElementVNode("input",{type:"range",min:((fe=K.limit)==null?void 0:fe.lower)??(K.type==="revolute"?-Math.PI:-1),max:((Y=K.limit)==null?void 0:Y.upper)??(K.type==="revolute"?Math.PI:1),step:.01,value:K.currentValue,onInput:me=>L(K.name,me.target.value),class:"joint-slider",disabled:d.value&&!m.value},null,40,$4)]),y.createElementVNode("div",Y4,[y.createElementVNode("span",K4,y.toDisplayString(K.currentValue?Number(K.currentValue).toFixed(3):"0.000"),1),y.createElementVNode("span",J4,y.toDisplayString(K.type==="revolute"?"rad":"m"),1)])])):y.createCommentVNode("",!0)])}),128))])):(y.openBlock(),y.createElementBlock("div",Z4,q[0]||(q[0]=[y.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},t6=Ci._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(f=>{if(!(f!=null&&f.isMesh)&&((f==null?void 0:f.type)==="URDFJoint"||(f==null?void 0:f.type)==="URDFLink")){const p={name:f==null?void 0:f.name,label:f==null?void 0:f.name,show:!0,level:g+1,isPenultimate:!1,type:f==null?void 0:f.type,id:f==null?void 0:f.id,limit:(f==null?void 0:f.limit)??"",children:a(f==null?void 0:f.children,g+1),path:f==null?void 0:f.name};_.push(p)}}),_},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 _=[],f=[...h];for(;f.length>0&&_.length<g;){const p=f.shift();p.children&&p.children.length>0&&(_.push(p.id),f.push(...p.children))}return _},d=(h,g)=>{const _=[];return h.forEach(f=>{if(f.children&&f.children.length>0){_.push(f.id);const p=f.children.filter(x=>x.children&&x.children.length>0).slice(0,g).map(x=>x.id);_.push(...p)}}),_.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=Ci._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))}}),on=Ci._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:f,initialTargetPosition:p,initThreeJS:x,handleResize:M,getThreeJSObjects:b,clearAllModels:N,cleanup:L}=y4(o),{loadUrdfFromUrl:P}=F4(b,_,a,l),{isAnimating:I,toggleAnimation:A,stopAnimation:E}=x4(b,_),{isClipping:F,activeClippingAxis:B,toggleClipping:X,updateClippingPlanes:Z}=M4(b,_),{urdfModel:se}=U4(b,_,a,l,N),W=()=>{if(c.value||_.value.length===0)return;c.value=!0,I.value&&E();const{camera:Ae,controls:pe}=b();if(!Ae||!pe)return;pe.enabled=!0;const re=Y=>Y<.5?4*Y*Y*Y:1-Math.pow(-2*Y+2,3)/2,q=Ae.position.clone(),K=pe.target.clone(),te=1500,ee=Date.now(),fe=()=>{const Y=Date.now()-ee,me=Math.min(Y/te,1),Te=re(me);Ae.position.lerpVectors(q,f.value,Te),pe.target.lerpVectors(K,p.value,Te),me<1?requestAnimationFrame(fe):c.value=!1};fe()},he=async()=>r?Promise.resolve():new Promise(Ae=>{const pe=()=>{r?Ae():requestAnimationFrame(pe)};pe()}),Q=Ae=>{d.value=!0,m.value=Ae,Ae==="剖面视图"&&!F.value&&X()},xe=Ae=>{u.value=!0,h.value=Ae,Ae==="动画仿真"&&t("getAnimationData")},De=()=>{y.nextTick(()=>{var Ae;(Ae=g.value)==null||Ae.startAnimation()})};return y.watch(()=>n.urdfUrl,async(Ae,pe)=>{if(Ae)try{if(await he(),await P(Ae)){const{camera:q}=b();q&&(q.position.set(3,3,4),q.near=.01,q.far=1e4,q.updateProjectionMatrix())}}catch(re){console.error("加载urdf模型失败",re),wn.ElMessage.error("加载urdf模型失败")}},{immediate:!0}),y.onMounted(async()=>{await y.nextTick();try{x(),i=b().scene,r=!0,window.addEventListener("resize",M)}catch(Ae){console.error("Three.js初始化失败:",Ae)}}),y.onBeforeUnmount(()=>{r=!1,m.value="",h.value="",window.removeEventListener("resize",M),I.value&&E(),L()}),(Ae,pe)=>{var q,K,te,ee;const re=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(on,{name:"guanjianjiexi",size:"34"}),y.createVNode(on,{name:"guanjiekongzhi",size:"34"}),y.createVNode(on,{name:"gongyishengcheng",size:"34"}),y.createVNode(on,{name:"buchangshezhi",size:"34"}),y.createVNode(on,{name:"shuchujiagongchengxu",size:"34"})]),y.createElementVNode("div",h6,[y.createVNode(on,{name:"viewReset",size:"24",onClick:W,title:"重置"}),y.createVNode(on,{name:"fangda",size:"24",title:"放大"}),y.createVNode(on,{name:"suoxiao",size:"24",title:"缩小"}),y.createVNode(on,{name:"lookAround",size:"24",onClick:y.unref(A),title:y.unref(I)?"停止动画":"动画视图"},null,8,["onClick","title"])]),y.createElementVNode("div",u6,[y.createVNode(on,{name:"jiegoushu",size:"24",onClick:pe[0]||(pe[0]=fe=>Q("场景树")),active:d.value&&m.value==="场景树",title:"场景树"},null,8,["active"]),y.createVNode(on,{name:"clipping",size:"24",onClick:pe[1]||(pe[1]=fe=>Q("剖面视图")),active:d.value&&m.value==="剖面视图",title:"剖面视图"},null,8,["active"]),y.createVNode(on,{name:"donghuafangzhen",size:"24",onClick:pe[2]||(pe[2]=fe=>Q("场景树3"))}),y.createVNode(on,{name:"donghuafangzhen",size:"24",onClick:pe[3]||(pe[3]=fe=>Q("场景4"))})]),y.createElementVNode("div",d6,[y.createVNode(on,{name:"donghuafangzhen",size:"24"}),y.createVNode(on,{name:"donghuafangzhen",size:"24"}),y.createVNode(on,{name:"guanjiekongzhi",size:"24",onClick:pe[4]||(pe[4]=fe=>xe("关节控制")),active:u.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),y.createVNode(on,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:pe[5]||(pe[5]=fe=>xe("动画仿真")),active:u.value&&h.value==="动画仿真"},null,8,["active"]),y.createVNode(on,{name:"donghuafangzhen",size:"24"}),y.createVNode(on,{name:"donghuafangzhen",size:"24"})]),y.createElementVNode("div",f6,[y.createVNode(on,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(q=g.value)==null?void 0:q.fastBackward},null,8,["onClick"]),y.createVNode(on,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:De}),y.createVNode(on,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(K=g.value)==null?void 0:K.fastForward},null,8,["onClick"]),y.createVNode(on,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(te=g.value)==null?void 0:te.pauseAnimation},null,8,["onClick"]),y.createVNode(on,{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:pe[6]||(pe[6]=fe=>d.value=!1)}," X ")]),y.createVNode(re,{"max-height":"650px"},{default:y.withCtx(()=>[m.value==="场景树"?(y.openBlock(),y.createBlock(r6,{key:0,model:y.unref(se)},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":pe[7]||(pe[7]=fe=>y.isRef(B)?B.value=fe:null),onChange:pe[8]||(pe[8]=(...fe)=>y.unref(Z)&&y.unref(Z)(...fe))},null,544),[[y.vModelRadio,y.unref(B)]]),pe[16]||(pe[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":pe[9]||(pe[9]=fe=>y.isRef(B)?B.value=fe:null),onChange:pe[10]||(pe[10]=(...fe)=>y.unref(Z)&&y.unref(Z)(...fe))},null,544),[[y.vModelRadio,y.unref(B)]]),pe[17]||(pe[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":pe[11]||(pe[11]=fe=>y.isRef(B)?B.value=fe:null),onChange:pe[12]||(pe[12]=(...fe)=>y.unref(Z)&&y.unref(Z)(...fe))},null,544),[[y.vModelRadio,y.unref(B)]]),pe[18]||(pe[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":pe[13]||(pe[13]=fe=>y.isRef(B)?B.value=fe:null),onChange:pe[14]||(pe[14]=(...fe)=>y.unref(Z)&&y.unref(Z)(...fe))},null,544),[[y.vModelRadio,y.unref(B)]]),pe[19]||(pe[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:pe[15]||(pe[15]=fe=>u.value=!1)}," X ")]),y.createVNode(re,{"max-height":"650px"},{default:y.withCtx(()=>[y.withDirectives(y.createVNode(t6,{ref_key:"jointRef",ref:g,model:y.unref(se),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,[pe[20]||(pe[20]=y.createElementVNode("div",{class:"loading-spinner"},null,-1)),y.createElementVNode("p",null,y.toDisplayString(l.value),1)])):y.createCommentVNode("",!0)])}}},mu=Ci._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((_,f,p)=>(p===0?_[f.label]=u:_[f.label]=f.value,_),{});t("filter",h)},c=u=>{t("buttonClick",u)},d=u=>{var h,g;o.value=(g=(h=Qt.getColumnChild(Ve.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=Ve.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 p;const g=y.resolveComponent("svg-icon"),_=y.resolveComponent("el-input"),f=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]=x=>i.value=x),style:{width:"240px"},placeholder:"搜索","prefix-icon":y.unref(wn.search_default),clearable:"",onInput:l},{append:y.withCtx(()=>[y.createElementVNode("span",R6,[y.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:y.withCtx(()=>[y.createElementVNode("div",D6,[(y.openBlock(),y.createBlock(Fn.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&&((p=n==null?void 0:n.buttons)==null?void 0:p.length)>0?(y.openBlock(),y.createElementBlock("div",L6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n==null?void 0:n.buttons,(x,M)=>(y.openBlock(),y.createElementBlock("div",{class:"extra-contents",key:M},[y.createVNode(f,{id:"themeButton",style:y.normalizeStyle({background:(x==null?void 0:x.background)??"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}),onClick:b=>c(x==null?void 0:x.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(x==null?void 0:x.label),1)]),_:2},1032,["style","onClick"])]))),128))])):y.createCommentVNode("",!0)])])}}},F6=Ci._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=Ci._export_sfc(N6,[["__scopeId","data-v-73ec704e"]]),I6=Ve.useModelComp(Ve.pinia),{systemPath:g0}=Ve.storeToRefs(I6),ma=y.ref(),_0=new Map;function z6(s,e,t,n,i){const r=async u=>{try{const h=await Fn.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=f=>{try{const p=f.target.result,M=new os().parse(p);M.preload(),h(M)}catch(p){g(p)}},_.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 ln({color:8947848,side:cn}))},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 f=new FileReader;f.onload=async p=>{try{const x=p.target.result;let M=null;h&&h.length>0&&(h.length===1?M=await o(h[0]):M=await a(h));const b=new as;M&&b.setMaterials(M);const N=b.parse(x);M||N.traverse(L=>{L.isMesh&&(L.material=new ln({color:8947848,side:cn}))}),g(N)}catch(x){_(x)}},f.onerror=()=>{_(new Error("OBJ文件读取失败"))},f.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 f=0;f<u.length;f++){const p=u[f];n.value=`正在加载模型 ${f+1}/${u.length}...`;const x=await r(p.objUrl),M=((h=p.objUrl)==null?void 0:h.split("/").pop())||`model_${f}.obj`,b=new File([x],M,{type:x.type});let N=[];if(p.mtlUrls){const P=Array.isArray(p.mtlUrls)?p.mtlUrls:[p.mtlUrls];for(let I=0;I<P.length;I++){const A=P[I],E=await r(A),F=(A==null?void 0:A.split("/").pop())||`material_${f}_${I}.mtl`,B=new File([E],F,{type:E.type});N.push(B)}}const L=await l(b,N);g.add(L),e.value.push(L),_.push(L)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let f;const p=u.toLowerCase();switch(p){case".txt":case".cpt":case".obj":const x=await h.text();if(p===".txt"||p===".cpt"){const Y=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Te=[...x.matchAll(Y)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),et=new rn,We=Te.flatMap(O=>[O.x,O.y,O.z]);if(et.setAttribute("position",new Lt(We,3)),p===".txt"){const O=new Oi({color:"#5B5C99",size:1,sizeAttenuation:!1});f=new Vs(et,O)}else if(p===".cpt"){const O=new Ai({color:"#5B5C99",linewidth:100});f=new Ba(et,O)}}else if(p===".obj"){const Y=new as;if(g&&g.length>0){const me=new os;for(const Te of g){const et=await Te.text(),We=me.parse(et);We.preload(),Y.setMaterials(We);break}}f=Y.parse(x),(!g||g.length===0)&&f.traverse(me=>{me.isMesh&&(me.material=new ln({color:"#B3B3D4"})),me instanceof Pt&&(me.material.side=cn)})}break;case".stl":const M=await h.arrayBuffer(),N=new Hi().parse(M),L=new ln({color:"#B3B3D4",side:cn});f=new Pt(N,L);break;case".nc":const P=["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"],I={"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 An,E=P.map(Y=>new Promise((me,Te)=>{new Hi().load(g0.value===""?`/model/${Y}`:`${g0.value}\\${Y}`,We=>{const O=new ln({color:I[Y]||"#B3B3D4",side:cn}),dt=new Pt(We,O);me(dt)},void 0,Te)}));try{(await Promise.all(E)).forEach(me=>A.add(me)),f=A}catch(Y){throw console.error("加载NC文件对应的STL文件失败:",Y),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const F=new pu,B=new An;try{const Y=await wn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),me=new Blob([Y.data],{type:"application/octet-stream;charset=UTF-8"}),Te=await wn.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),et=new Blob([Te.data],{type:"application/octet-stream;charset=UTF-8"}),We=await new Promise((dt,st)=>{const it=URL.createObjectURL(me);F.load(it,Ie=>{const Ze=new Float32Array(Ie.geometry.attributes.position.count*3);for(let Le=0;Le<Ie.geometry.attributes.position.count;Le++)Ze[Le*3]=1,Ze[Le*3+1]=0,Ze[Le*3+2]=0;Ie.geometry.setAttribute("color",new hn(Ze,3)),Ie.material.vertexColors=!0,Ie.scale.set(.3,.3,.3),URL.revokeObjectURL(it),dt(Ie)},void 0,st)}),O=await new Promise((dt,st)=>{const it=URL.createObjectURL(et);F.load(it,Ie=>{const Ze=new Float32Array(Ie.geometry.attributes.position.count*3);for(let Le=0;Le<Ie.geometry.attributes.position.count;Le++)Ze[Le*3]=0,Ze[Le*3+1]=1,Ze[Le*3+2]=0;Ie.geometry.setAttribute("color",new hn(Ze,3)),Ie.material.vertexColors=!0,Ie.scale.set(.3,.3,.3),URL.revokeObjectURL(it),dt(Ie)},void 0,st)});B.add(We),B.add(O),f=B}catch(Y){throw console.error("PCD文件加载失败:",Y),new Error("无法加载PCD文件")}break;case".urdf":const X=URL.createObjectURL(h),Z=new gc,se="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",W={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},he=new Map,Q=new Map,xe=new Map,De=async Y=>{if(he.has(Y))return console.log(`从缓存加载: ${Y}`),he.get(Y);try{const me=await wn.axios.get(`${se}/${Y}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Te=new Blob([me.data],{type:"application/octet-stream;charset=UTF-8"});return W.enableCache&&he.set(Y,Te),Te}catch(me){throw console.error(`加载文件失败: ${Y}`,me),new Error(`无法加载文件: ${Y}`)}},Ae=(Y="default")=>{if(Q.has(Y))return Q.get(Y);const me=new ln({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Yn});return Q.set(Y,me),me},pe=Y=>{try{Y.isBufferGeometry&&Y.mergeVertices&&Y.mergeVertices(),Y.computeVertexNormals&&Y.computeVertexNormals(),Y.computeBoundingSphere&&Y.computeBoundingSphere(),Y.deleteAttribute&&Y.deleteAttribute("uv2")}catch(me){console.warn("几何体优化失败,使用原始几何体:",me)}return Y},re=async(Y,me,Te)=>{const et=`stl_${me}`;if(xe.has(et)){const st=xe.get(et);return new Pt(st,Ae())}const We=await Y.arrayBuffer();let dt=new Hi(Te).parse(We);return dt=pe(dt),xe.set(et,dt),new Pt(dt,Ae())},q=async(Y,me,Te)=>{const et=`obj_${me}`;if(he.has(et))return he.get(et).clone();const We=await Y.text(),O=new as(Te),dt=me.replace(".obj",".mtl");try{const Ie=await(await De(dt)).text(),Le=new os(Te).parse(Ie);Le.preload(),O.setMaterials(Le)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${dt}`)}const st=O.parse(We);return st.traverse(it=>{it.isMesh&&(it.geometry=pe(it.geometry),it.castShadow=!0,it.receiveShadow=!0,it.renderOrder=1)}),he.set(et,st),st},K=(Y,me)=>{const Te=new O0;if(Te.addLevel(Y,0),Y.geometry){const et=Y.geometry.clone(),We=new Pt(et,Y.material);Te.addLevel(We,50)}return Te};let te=0,ee=0;const fe=[];Z.loadMeshCb=async(Y,me,Te,et,We)=>{const O=Y.split("/").pop(),dt=Te||(()=>{});te++;const st=new Promise(async(it,Ie)=>{try{const Ze=await De(O);if(!Ze||Ze.size===0)throw new Error(`文件为空: ${O}`);const Le=O.split(".").pop().toLowerCase();let rt;switch(Le){case"stl":rt=await re(Ze,O,me);break;case"obj":rt=await q(Ze,O,me);break;default:throw new Error(`不支持的文件格式: ${Le}`)}W.enableLOD&&rt.isMesh&&(rt=K(rt,O)),dt(rt),ee++,et&&et({loaded:ee,total:te,progress:ee/te}),it(rt)}catch(Ze){console.error(`mesh文件加载失败: ${O}`,Ze);const Le=new An;dt(Le),it(Le);const rt=new Wi(.1,.1,.1),Xt=new j0({color:16711680,wireframe:!0});return new Pt(rt,Xt)}});fe.push(st)};try{if(!X){ma.value=void 0;break}if(f=await Z.loadAsync(X),console.log(`URDF文件加载完成,等待${te}个mesh文件加载...`),fe.length>0)try{await Promise.allSettled(fe),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${te}`)}catch(Te){console.warn("部分mesh文件加载失败,但继续显示模型",Te)}f.traverse(Te=>{Te.isMesh&&(Te.castShadow=!0,Te.receiveShadow=!0,Te.renderOrder=1,Te.material&&(Te.material.needsUpdate=!0))}),console.time("计算包围盒");const Y=new Tn;Y.expandByObject(f);const me=`urdf_${Date.now()}`;f.userData.boundingBox=Y.clone(),f.userData.modelId=me,_0.set(me,{box:Y.clone(),center:Y.getCenter(new z),size:Y.getSize(new z),maxSize:Math.max(...Y.getSize(new z).toArray())}),ma.value=f,console.log("URDF模型加载完成并优化")}catch(Y){console.error("URDF加载失败:",Y),ma.value=void 0}finally{X&&URL.revokeObjectURL(X)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return f};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 f=u[_],p=await d(f.suffix,f.blob,f.mtlBlobs||[],f.meshFiles||[]);p&&(h.add(p),e.value.push(p),g.push(p))}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=Ve.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(Fn.ssForm,{rowContents:e.value,isRowFlex:!0},null,8,["rowContents"])]),y.createElementVNode("div",k6,[y.createVNode(Fn.ssForm,{rowContents:t.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),H6=Ci._export_sfc(V6,[["__scopeId","data-v-73db0fe7"]]),_u=Ve.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=Ve.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:""}),actions:{setTableIndex(s){this.tableIndex=s},setTableShowThree(s){this.tableShowThree=s}}}),Su=Ve.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=Ve.cloneDeep(s))==null?void 0:r.optionUrl)==null?void 0:o.menuSelect,t=[];e==null||e.forEach(u=>{});let n="";const i=await Qt.menuToParent(e);if(i==null||i.forEach(u=>{var h,g,_,f;(u==null?void 0:u.name)===(((f=(_=(g=(h=Ve.cloneDeep(s))==null?void 0:h.optionUrl)==null?void 0:g.groupSelect)==null?void 0:_[0])==null?void 0:f.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(f=>!(f!=null&&f.id)),_));g==null||g.forEach(_=>{t.push(Qt.getValueToObjectValue(_,h))})}return t},q6={class:"table-content"},$6={class:"menu-config-wrap"},Y6=["onClick"],K6={key:0,class:"viewport-wrap"},J6=["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(Ve.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=Ve.useMenuState(),{importLoading:g,activeMenuPath:_,contentLoading:f}=Ve.storeToRefs(h),p=bu(Ve.pinia),x=Ve.useModelComp(Ve.pinia),{extraContents:M}=Ve.storeToRefs(x),b=y.ref([]);y.ref(!1);const N=y.ref("");y.ref();const L=y.ref(!0),P=y.ref(0),I=y.ref(!1),A=y.ref(""),E=y.ref(!1),F=y.ref({label:"查看三维模型"}),B=y.ref(!1),X=y.ref(),Z=y.ref([]),se=y.ref([]),W=y.ref(!1),he=y.ref(),Q=y.ref([]),xe=y.ref([]),De=y.ref([]),Ae=y.ref(),pe=y.ref(),re=gu(Ve.pinia),q=y.ref(),K=_u(Ve.pinia),{selectIndex:te,selectMenu:ee,selectTitle:fe}=Ve.storeToRefs(K),{selectString:Y}=Ve.storeToRefs(re),me=wu.useLoginState(Ve.pinia),{loginUserInfo:Te}=Ve.storeToRefs(me),et=y.ref(720),We=y.ref(!1),O=y.ref([]),dt=y.ref(),st=y.ref(!0),it=y.ref(null),Ie=$=>{O.value=$},Ze=($,H)=>{dt.value===H?st.value=!1:st.value=!0,dt.value=H==null?void 0:H.changeProp},Le=y.computed(()=>{var $;return($=a.value)==null?void 0:$.filter(H=>(H==null?void 0:H.label)!=="操作")}),rt=()=>{E.value=!1},Xt=$=>{o("clickTrigger",$)},k=async $=>{var ue,ve,ge,ze,Se,Ce,T,C,V,j;const H=$==null?void 0:$.row;if((ue=H==null?void 0:H.toString())!=null&&ue.includes(".urdf")){he.value=H,c.value=!0;return}let ae=[];if((ve=H==null?void 0:H.toString())!=null&&ve.includes(".stl")||(ge=H==null?void 0:H.toString())!=null&&ge.includes(".STL")||(ze=H==null?void 0:H.toString())!=null&&ze.includes(".obj")||(Se=H==null?void 0:H.toString())!=null&&Se.includes(".mtl")){let G,le=[],Me={};if(Array.isArray(H)?G=H:G=H==null?void 0:H.split(","),G==null||G.forEach(_e=>{_e.includes(".mtl")?le.push(_e):Me.blob=Me.blob?Me.blob+","+_e:_e}),(le==null?void 0:le.length)>0&&(Me.mtlBlobs=le),(T=(Ce=Object.values(Me))==null?void 0:Ce[0])!=null&&T.includes("http:"))ae.push(Me);else{const _e=new Blob([Me.blob],{type:"application/octet-stream;charset=UTF-8"});let ce=URL.createObjectURL(_e),ne="";(C=H==null?void 0:H.split("/"))==null||C.forEach((Oe,de)=>{var Ge;de===((Ge=H==null?void 0:H.split("/"))==null?void 0:Ge.length)-1&&(ne=Oe)}),(V=Me.blob)!=null&&V.includes(".stl")&&(ne=(ne==null?void 0:ne.replaceAll(">",""))+".urdf"),u.value=[{name:ne,blobUrl:ce}],m.value=!0}}else{const G=await axios.get(H,{responseType:"blob",headers:{"Content-Type":"application/json"}}),le=new Blob([G.data],{type:"application/octet-stream;charset=UTF-8"});let Me=URL.createObjectURL(le),_e="";(j=H==null?void 0:H.split("/"))==null||j.forEach((ce,ne)=>{var Oe;ne===((Oe=H==null?void 0:H.split("/"))==null?void 0:Oe.length)-1&&(_e=ce)}),u.value=[{name:_e,blobUrl:Me}],m.value=!0}(ae==null?void 0:ae.length)>0&&n.setBlobUrls(ae)},R=$=>{var ue,ve,ge,ze;const H=(ze=(ue=$==null?void 0:$.url)==null?void 0:ue.split("."))==null?void 0:ze[((ge=(ve=$==null?void 0:$.url)==null?void 0:ve.split("."))==null?void 0:ge.length)-1];return($==null?void 0:$.name)+"."+H},oe=async $=>{const H=await Fn.downloadAvatarApi({url:$==null?void 0:$.url}),ae=URL.createObjectURL(H.data),ve={name:R($),blobUrl:ae};u.value=[ve],m.value=!0},we=async $=>{const H=await Fn.downloadAvatarApi({url:$==null?void 0:$.url}),ae=URL.createObjectURL(H.data),ve={name:R($),blobUrl:ae},ge=document.createElement("a");ge.href=ve.blobUrl,ge.download=ve.name,ge.style.display="none",document.body.appendChild(ge),ge.click(),setTimeout(()=>{document.body.removeChild(ge)},100)},Pe=($,H)=>{if(Object.values(H).length!==0)return Object.values(H).find(ae=>{var ue,ve,ge;return((ue=ae==null?void 0:ae.toString())==null?void 0:ue.includes(".txt"))||((ve=ae==null?void 0:ae.toString())==null?void 0:ve.includes(".cpt"))||((ge=ae==null?void 0:ae.toString())==null?void 0:ge.includes(".obj"))})?[...$,F.value]:$},be=$=>{var ve;Y.value===""?$==null||$[0]:($==null?void 0:$.find(ge=>(ge==null?void 0:ge.selectLabel)==="("+Y.value+")"))??($==null||$.find(ge=>!(ge!=null&&ge.selectLabel)));let H=$;(ve=a.value)!=null&&ve.find(ge=>ge.prop==="index");let ae=Ae.value;const ue=[];return H==null||H.forEach((ge,ze)=>{var Ce;let Se={};if(Array.isArray(ge)){let T=[];ge==null||ge.filter(C=>!(C!=null&&C.id)).forEach((C,V)=>{var j,G,le,Me,_e;if((j=ae==null?void 0:ae[V])!=null&&j.prop&&!Array.isArray(C)){let ce={};ce[ae[V].column]=C,M!=null&&M.value&&((G=M==null?void 0:M.value)==null?void 0:G.length)>0&&((le=M==null?void 0:M.value)!=null&&le.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(ce)))&&(T=(Me=M==null?void 0:M.value)==null?void 0:Me.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(ce))),T&&T.length>0?Se[ae[V].prop]=T!=null&&T.find(ne=>{var Oe;return((Oe=Object.keys(ne))==null?void 0:Oe[0])===ae[V].column})?(_e=T==null?void 0:T.find(ne=>{var Oe;return((Oe=Object.keys(ne))==null?void 0:Oe[0])===ae[V].column}))==null?void 0:_e[ae[V].column]:C:Se[ae[V].prop]=C}})}else Se=ge;Array.isArray(ge)&&ge.some(T=>T==null?void 0:T.id)?ue.push(Object.assign(Se,{id:(Ce=ge==null?void 0:ge.find(T=>T.id))==null?void 0:Ce.id})):Se.id?ue.push(Se):ue.push(Object.assign(Se,{id:ze}))}),ue},_t=async $=>{var ve,ge,ze,Se,Ce;let H={};for(let T in $)$[T]!==""&&(H["tableData."+T]=$[T]);const ae=await Qt.filterContents({type:"data",tableId:r==null?void 0:r.index,systemKey:sessionStorage.getItem("systemKey"),pageKey:_.value},H),ue=(ze=(ge=(ve=Ve.cloneDeep(ae))==null?void 0:ve.data)==null?void 0:ge.result)==null?void 0:ze.map(T=>{var V;let C=[];return C.push({id:T.id}),C.push((V=T==null?void 0:T.value)==null?void 0:V.tableData),C});b.value=be(Qt.getTableContents(ue,(Ce=(Se=Ve.cloneDeep(a.value))==null?void 0:Se.map(T=>T.label))==null?void 0:Ce.filter(T=>T!=="操作")))},Ke=async $=>{var ue,ve,ge,ze,Se,Ce,T,C,V,j,G,le,Me,_e;const H=(ue=Ve.cloneDeep(a.value))==null?void 0:ue.filter(ce=>ce==null?void 0:ce.isRoute);if((H==null?void 0:H.length)>0){let ce=(ve=H==null?void 0:H[0])==null?void 0:ve.prop,ne=Ve.cloneDeep(_).value+"/"+($==null?void 0:$[ce]),Oe=Ve.cloneDeep(_).value,de=await Qt.getItemData(ne,sessionStorage.getItem("systemKey"),"");if((de==null?void 0:de.length)>0)await Qt.loadingConstruct(ne,ne+`/updateLoading${(ge=Te.value)==null?void 0:ge.account}`),x.setRouteToChildPath(Oe),h.setActiveMenuPath(ne+`/updateLoading${(ze=Te.value)==null?void 0:ze.account}`);else{let Ge=(Se=H==null?void 0:H[0])==null?void 0:Se.prop,Ee=Ve.cloneDeep(_).value+"/"+($==null?void 0:$[Ge]),ht=Ve.cloneDeep(_).value;await Qt.getItemData(ht+"/",sessionStorage.getItem("systemKey"),""),await Qt.loadingConstruct(ht+"/",Ee),await Qt.loadingConstruct(Ee,Ee+`/updateLoading${(Ce=Te.value)==null?void 0:Ce.account}`),x.setRouteToChildPath(ht),h.setActiveMenuPath(Ee+`/updateLoading${(T=Te.value)==null?void 0:T.account}`)}}let ae=await Qt.getItemData(_.value,sessionStorage.getItem("systemKey"),$.id);if(ae=ae==null?void 0:ae.filter(ce=>ce.comp!=="methodButton"),ae&&ae.length>0){const ce=!Array.isArray(fe.value)&&((C=fe.value)==null?void 0:C.key)!=="main"?[]:fe.value;ce.push({key:ee.value===""?(V=$==null?void 0:$.id)==null?void 0:V.toString():ee.value+"-"+((j=$==null?void 0:$.id)==null?void 0:j.toString()),value:$[(G=Object.keys($))==null?void 0:G.filter(ne=>ne!=="index"&&ne!=="id")[0]]}),K.setSelectMenu(ee.value===""?(le=$==null?void 0:$.id)==null?void 0:le.toString():ee.value+"-"+((Me=$==null?void 0:$.id)==null?void 0:Me.toString())),K.setSelectTitle(ce),K.setSelectIndex((_e=$==null?void 0:$.id)==null?void 0:_e.toString()),o("pageChange",ae)}},ft=$=>{var H;(H=Ve.cloneDeep(r.itemData))==null||H.map(ae=>((ae==null?void 0:ae.key)==="tableContents"&&(ae.contents=$),ae))},vt=async($,H,ae,ue)=>{var ge,ze,Se,Ce,T,C,V;if((ue==null?void 0:ue.data)==="查看"&&($!=null&&$.every(j=>(j==null?void 0:j.url)&&(j==null?void 0:j.name)))){let j=Ve.cloneDeep($);j=await((ge=Ve.cloneDeep(j))==null?void 0:ge.map(async le=>{var ce,ne,Oe,de;const Me=await Fn.downloadAvatarApi({url:le==null?void 0:le.url});let _e=URL.createObjectURL(Me.data);return{name:(le==null?void 0:le.name)+"."+((de=(ce=le==null?void 0:le.url)==null?void 0:ce.split("."))==null?void 0:de[((Oe=(ne=le==null?void 0:le.url)==null?void 0:ne.split("."))==null?void 0:Oe.length)-1]),blobUrl:_e}}));let G=await Promise.all(j);u.value=G,m.value=!0}o("contentClick",$,H,ae,{id:r==null?void 0:r.index,type:"table"});const ve=Ve.cloneDeep(a.value);if((ue==null?void 0:ue.isMainKey)===!0&&(ve==null?void 0:ve.length)>0){(ze=ve==null?void 0:ve[0])==null||ze.prop;let j=Ve.cloneDeep(_).value+"/"+(ue==null?void 0:ue.data),G=Ve.cloneDeep(_).value,le=await Qt.getItemData(j,sessionStorage.getItem("systemKey"),"");if((le==null?void 0:le.length)>0)await Qt.loadingConstruct(j,j+`/updateLoading${(Se=Te.value)==null?void 0:Se.account}`),x.setRouteToChildPath(G),h.setActiveMenuPath(j+`/updateLoading${(Ce=Te.value)==null?void 0:Ce.account}`);else{(T=ve==null?void 0:ve[0])==null||T.prop;let Me=Ve.cloneDeep(_).value+"/"+(ue==null?void 0:ue.data),_e=Ve.cloneDeep(_).value;await Qt.getItemData(_e+"/",sessionStorage.getItem("systemKey"),""),await Qt.loadingConstruct(_e+"/",Me),await Qt.loadingConstruct(Me,Me+`/updateLoading${(C=Te.value)==null?void 0:C.account}`),x.setRouteToChildPath(_e),h.setActiveMenuPath(Me+`/updateLoading${(V=Te.value)==null?void 0:V.account}`)}}},Fe=()=>{m.value=!1},at=$=>{o("rowClick",$)};y.watch(()=>r.changedContent,()=>{var ae,ue;if(!r.changedContent)return;let $=(ae=b.value)==null?void 0:ae.map(ve=>{var ge;return ve.id===((ge=r.changedContent)==null?void 0:ge.id)&&(ve={...r.changedContent,id:r.changedContent.newId?r.changedContent.newId:r.changedContent.id},delete ve.newId),ve});const H=(ue=r.itemData)==null?void 0:ue.map(ve=>((ve==null?void 0:ve.key)==="tableContents"&&(ve.contents=$),ve));b.value=$,o("contentChange",{contents:H,index:r.index}),o("change",{content:$,index:r==null?void 0:r.index,buttonName:"",id:r==null?void 0:r.index})},{deep:!0,immediate:!0});const Et=()=>{},St=async()=>{const $=_.value,H=sessionStorage.getItem("systemKey"),ae=await Qt.getItemData($,H,""),ue=ae==null?void 0:ae.find(Se=>(Se==null?void 0:Se.name)==="方法明细"),ve=(ue==null?void 0:ue.compData)||[],ge=ve==null?void 0:ve.find(Se=>(Se==null?void 0:Se.key)==="formContent");return ge==null?void 0:ge.contents},$e=async($,H)=>{const ae=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken");return await axios.post($,{inputData:H},{headers:{Authorization:ae}}).catch(ve=>(h.setImportLoading(!1),Promise.reject(ve)))},At=async($,H,ae)=>{var _e;h.setImportLoading(!0);const ue=await St().catch(ce=>(h.setImportLoading(!1),Promise.reject(ce))),ve=ue==null?void 0:ue.find(ce=>ce==null?void 0:ce.isMain),ge=ve==null?void 0:ve.value;if(!ge){console.log("未搜索到isMain, 缺少算法执行接口"),h.setImportLoading(!1);return}const ze=a.value||[],Se=ze.find(ce=>(ce==null?void 0:ce.label)==="输入数据"),Ce=Se==null?void 0:Se.prop,T=H==null?void 0:H[Ce],C=await $e(ge,T).catch(ce=>(h.setImportLoading(!1),Promise.reject(ce))),V=(_e=C==null?void 0:C.data)==null?void 0:_e.result,j=ze.find(ce=>(ce==null?void 0:ce.label)==="输出数据"),G=j==null?void 0:j.prop,le=b.value,Me=le==null?void 0:le.find((ce,ne)=>(ce==null?void 0:ce.id)==(H==null?void 0:H.id));Me[G]=V,A.value="编辑",pe.value=Me,N.value=H==null?void 0:H.id,Rt(!0),h.setImportLoading(!1)},J=($,H,ae)=>{var ue,ve,ge,ze,Se,Ce,T,C;if(N.value="",W.value=!0,L.value=!0,o("onButtonClick",$,H),$==="删除"){b.value=(ue=Ve.cloneDeep(b.value))==null?void 0:ue.filter(j=>(j==null?void 0:j.id)!==(H==null?void 0:H.id));const V=G6(q.value,ee.value,H==null?void 0:H.id);ft(V),o("change",{content:b.value,singleContent:H,index:r==null?void 0:r.index,type:"delete",buttonName:$,column:a.value})}else if($==="批量删除"){if(((ve=O.value)==null?void 0:ve.length)===0)return wn.ElMessage.warning("请先勾选操作的数据");o("change",{content:b.value,singleContent:null,selectItems:O.value,index:r==null?void 0:r.index,type:"batchDelete",buttonName:$,column:a.value})}else if($==="复制新增"){A.value="新增";const V=Ve.cloneDeep(H),j=(ge=a.value)==null?void 0:ge.find(Me=>Me==null?void 0:Me.isMainKey),G=j||((ze=a.value)==null?void 0:ze[0]),le=(Se=xe.value)==null?void 0:Se.find(Me=>(Me==null?void 0:Me.label)==="新建");ke(!0,le,{data:V,firstCol:G})}else if($==="新增")A.value="新增",ot(""),E.value=!0;else if($==="编辑")A.value="编辑",ot(H),E.value=!0;else if($==="查看")A.value="查看",ot(H),W.value=!1,L.value=!1,E.value=!0;else if($==="查看三维模型"){const V={};for(let G in H)G!=="id"&&(V[G]=H[G]);let j=(Ce=Object.values(V))==null?void 0:Ce[1];p.setTableShowThree(j)}else if(((T=ae==null?void 0:ae.extra)==null?void 0:T.type)==="modelExample")A.value=$,B.value=!0;else if($==="新建"){const V=(C=xe.value)==null?void 0:C.find(j=>(j==null?void 0:j.label)==="新建");ke(!1,V)}else if($==="修改模板"){let V=Ve.cloneDeep(_).value;x.setRouteToChildPath(V),h.setActiveMenuPath(V+"/")}else $==="执行"&&At($,H)},tt=async $=>{var ae,ue,ve,ge,ze,Se;const H=await wn.getInsofDataApi({key:{pageKey:$,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((ae=H==null?void 0:H.data)==null?void 0:ae.code)===200)return Array.isArray((ue=H==null?void 0:H.data)==null?void 0:ue.result)&&((ge=(ve=H==null?void 0:H.data)==null?void 0:ve.result)==null?void 0:ge.length)>0?(Se=(ze=H==null?void 0:H.data)==null?void 0:ze.result)==null?void 0:Se.map(Ce=>{var T;return{id:Ce==null?void 0:Ce.id,...(T=Ce==null?void 0:Ce.value)==null?void 0:T.pageData}}):[]},Ne=($,H,ae,ue)=>{var ve;o("contentChange",{contents:(ve=$==null?void 0:$.compData)==null?void 0:ve.map(ge=>{var ze;return(ge==null?void 0:ge.key)==="formContent"?{...ge,contents:(ze=ge==null?void 0:ge.contents)==null?void 0:ze.map(Se=>(Se==null?void 0:Se.key)===H?{...Se,value:ae}:Se)}:ge}),index:$==null?void 0:$.id}),h.setActiveMenuPath(""),h.setActiveMenuPath(ue)},lt=($,H)=>{let ae=$==null?void 0:$[H==null?void 0:H.prop],ue=1;if(b.value.some(ve=>(ve==null?void 0:ve[H==null?void 0:H.prop])===ae)){const ve=ae;for(;b.value.some(ge=>(ge==null?void 0:ge[H==null?void 0:H.prop])===`${ve}(${ue})`);)ue++;ae=`${ve}(${ue})`}return ae},ke=async($,H,ae)=>{var ze,Se,Ce,T,C;let ue,ve;const ge=lt(ae==null?void 0:ae.data,ae==null?void 0:ae.firstCol);if($?(ue=Ve.cloneDeep(_).value+"/"+((Ce=ae==null?void 0:ae.data)==null?void 0:Ce[(Se=ae==null?void 0:ae.firstCol)==null?void 0:Se.prop]),ve=Ve.cloneDeep(_).value+"/"+ge):(ue=Ve.cloneDeep(_).value+"/",ve=Ve.cloneDeep(ue)+`loading${(ze=Te.value)==null?void 0:ze.account}`),H){const V=await Qt.getItemData(ve,sessionStorage.getItem("systemKey"),"");if((V==null?void 0:V.length)>0)if($){const j=V==null?void 0:V.find(G=>{var le;return((le=G==null?void 0:G.comp)==null?void 0:le.toUpperCase())==="FORM"});j&&Ne(j,(T=ae==null?void 0:ae.firstCol)==null?void 0:T.label,ge,_.value)}else x.setRouteToChildPath(Ve.cloneDeep(_).value),h.setActiveMenuPath(ve);else if(await Qt.loadingConstruct(ue,ve),$){const j=await tt(ve);if((j==null?void 0:j.length)>0){const G=j==null?void 0:j.find(le=>{var Me;return((Me=le==null?void 0:le.comp)==null?void 0:Me.toUpperCase())==="FORM"});G&&Ne(G,(C=ae==null?void 0:ae.firstCol)==null?void 0:C.label,ge,_.value)}}else x.setRouteToChildPath(Ve.cloneDeep(_).value),h.setActiveMenuPath(ve)}else $?(N.value="",pe.value=ae==null?void 0:ae.data,Rt(!0,ae==null?void 0:ae.firstCol,ge)):(x.setRouteToChildPath(Ve.cloneDeep(_).value),h.setActiveMenuPath(ve))},Re=()=>{c.value=!1,he.value=null},ot=$=>{var ve,ge,ze,Se,Ce,T;const H=[];let ae=[];for(let C in $)Array.isArray($==null?void 0:$[C])&&ae.push(C);l.value=Ve.cloneDeep(a.value),(ge=Qt.getColumnChild((ve=Ve.cloneDeep(a.value))==null?void 0:ve.filter(C=>(C==null?void 0:C.label)!=="操作")))==null||ge.forEach((C,V)=>{var j;ae.find(G=>G===(C==null?void 0:C.prop))||(C!=null&&C.formType&&((j=C==null?void 0:C.formType)==null?void 0:j.toUpperCase())==="SELECT"?H.push({label:(C==null?void 0:C.label)??"",name:(C==null?void 0:C.prop)??"t"+V,type:!(C!=null&&C.formType)||(C==null?void 0:C.formType)===""?"Input":C==null?void 0:C.formType,value:($==null?void 0:$[C==null?void 0:C.prop])??(C==null?void 0:C.value)??"",id:(C==null?void 0:C.id)??V,contents:(C==null?void 0:C.options)??[],width:1,isFormColHidden:C==null?void 0:C.isFormColHidden,optionUrl:{groupSelect:C==null?void 0:C.groupSelect,menuSelect:C==null?void 0:C.formMenuSelect,type:"Select",selectRelateType:C==null?void 0:C.selectRelateType}}):H.push({label:(C==null?void 0:C.label)??"",name:(C==null?void 0:C.prop)??"t"+V,type:!(C!=null&&C.formType)||(C==null?void 0:C.formType)===""?"Input":C==null?void 0:C.formType,value:($==null?void 0:$[C==null?void 0:C.prop])??(C==null?void 0:C.value)??"",id:(C==null?void 0:C.id)??V,contents:(C==null?void 0:C.options)??[],width:1,isFormColHidden:C==null?void 0:C.isFormColHidden}))}),$===""||!$||(N.value=($==null?void 0:$.id)??"");let ue=Qt.getColumnChild((ze=Ve.cloneDeep(a.value))==null?void 0:ze.filter(C=>(C==null?void 0:C.label)!=="操作"));Z.value&&((Se=Z.value)==null?void 0:Se.length)>0&&(Z.value=(Ce=Ve.cloneDeep(Z).value)==null?void 0:Ce.map(C=>{var j;let V=(j=ue==null?void 0:ue.find(G=>(G==null?void 0:G.label)===(C==null?void 0:C.label)))==null?void 0:j.prop;return V&&(C.value=$[V]),C})),De.value=Z.value&&((T=Z.value)==null?void 0:T.length)>0?Qt.getTableFormToForm(Z.value):H},Tt=async()=>{var H;await y.nextTick();const $=(H=i.value)==null?void 0:H.$el;$&&Qt.Sortable.create($,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ae=>{var ze;const{oldIndex:ue,newIndex:ve}=ae;if(ue===ve)return;const ge=Le.value.splice(ue,1)[0];Le.value.splice(ve,0,ge),a.value=(ze=a.value)==null?void 0:ze.slice().sort((Se,Ce)=>{var T,C;return Se.label==="操作"?1:Ce.label==="操作"?-1:((T=Le.value)==null?void 0:T.indexOf(Se))-((C=Le.value)==null?void 0:C.indexOf(Ce))})}})};y.onMounted(()=>{X.value=window.innerWidth-240*2});const qt=()=>{y.nextTick(()=>{Tt()})},Rt=($=!0,H,ae)=>{var ze;console.log(456,$,pe.value,N.value);let ue=Qt.getColumnChild((ze=Ve.cloneDeep(a.value))==null?void 0:ze.filter(Se=>(Se==null?void 0:Se.label)!=="操作")),ve,ge=Ve.cloneDeep(b.value);if(!pe.value){E.value=!1;return}if(N.value===""){P.value++;let Se;H&&ae?Se={id:P.value,[H==null?void 0:H.prop]:ae}:Se={id:P.value},ge.push(Object.assign(pe.value,Se)),ve=Object.assign(pe.value,Se)}else ge=ge==null?void 0:ge.map(Se=>{var Ce,T;if((Se==null?void 0:Se.id)===N.value){let C={};for(let V in Se){let j=(Ce=ue==null?void 0:ue.find(G=>(G==null?void 0:G.prop)===V))==null?void 0:Ce.label;j?C[V]=(T=pe.value)==null?void 0:T[j]:C[V]=Se[V]}Se=Object.assign(C,pe.value),ve=Se}return Se});if(b.value=ge,$){const Se=X6(q.value,ee.value,ge);ft(Se),E.value=!1,pe.value=void 0,x.setCacheUpdatingData({content:Se,singleContent:ve,index:r==null?void 0:r.index,buttonName:A.value,column:a.value}),it.value={content:Se,singleContent:ve,index:r==null?void 0:r.index,buttonName:A.value,column:a.value},o("change",it.value)}},bn=async($,H,ae)=>{var T,C,V,j,G,le,Me,_e,ce,ne,Oe;dt.value=ae==null?void 0:ae.prop;const ue=Ve.cloneDeep(r.itemData),ve=ue==null?void 0:ue.map(de=>{var Ge;return(de==null?void 0:de.key)==="header"&&((Ge=de.contents)==null||Ge.map((Ee,ht)=>{var He,je,Xe,Dt,yt,Ct,wt,Ft,an,Nt,$t,Ht,Yt,Be,Kt,kt,pt,Gn,S;return Ee.type=Ee!=null&&Ee.type?Ee.type:(Dt=(Xe=(je=(He=Ee==null?void 0:Ee.key)==null?void 0:He.split("$"))==null?void 0:je[1])==null?void 0:Xe.split("("))!=null&&Dt[0]?(Ct=(yt=Qt.FormType)==null?void 0:yt.find(v=>{var w,D,U,ie;return(v==null?void 0:v.key)===((ie=(U=(D=(w=Ee==null?void 0:Ee.key)==null?void 0:w.split("$"))==null?void 0:D[1])==null?void 0:U.split("("))==null?void 0:ie[0])}))==null?void 0:Ct.value:"Input",Ee.options=Ee!=null&&Ee.options?Ee.options:((an=(Ft=(wt=Ee==null?void 0:Ee.key)==null?void 0:wt.split("$"))==null?void 0:Ft[1])==null?void 0:an.length)>0?(Yt=(Ht=Ho(($t=(Nt=Ee==null?void 0:Ee.key)==null?void 0:Nt.split("$"))==null?void 0:$t[1]))==null?void 0:Ht.split(","))==null?void 0:Yt.map(v=>({label:v,value:v})):[],(Be=Ee==null?void 0:Ee.key)!=null&&Be.includes("$")&&(Ee.key=(kt=(Kt=Ee==null?void 0:Ee.key)==null?void 0:Kt.split("$"))==null?void 0:kt[0]),Ee.value=(pt=Object.values(H))==null?void 0:pt[ht],Ee.optionUrl=Ee!=null&&Ee.formMenuSelect&&((Gn=Ee==null?void 0:Ee.formMenuSelect)==null?void 0:Gn.length)>0?{groupSelect:(S=Ee==null?void 0:Ee.groupSelect)==null?void 0:S.split(/[::]/).map(v=>v.trim()),menuSelect:Ee==null?void 0:Ee.formMenuSelect,selectRelateType:"",type:(Ee==null?void 0:Ee.formType)??(Ee!=null&&Ee.groupSelect?"Select":"")}:null,Ee})),de});let ge=Ve.cloneDeep(De.value),ze=(C=(T=Ve.cloneDeep(ve))==null?void 0:T.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:C.contents;ge=ge==null?void 0:ge.map(de=>{var Ge;return de.value=(Ge=ze==null?void 0:ze.find((Ee,ht)=>ht===(de==null?void 0:de.id)))==null?void 0:Ge.value,de});let Se="",Ce=(G=(j=(V=Ve.cloneDeep(ve))==null?void 0:V.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:j.contents)==null?void 0:G.find((de,Ge)=>{var Ee,ht,He;return(de==null?void 0:de.label)===dt.value||(Ge==null?void 0:Ge.toString())===((He=(ht=(Ee=dt.value)==null?void 0:Ee.split("a"))==null?void 0:ht[1])==null?void 0:He.toString())});if((_e=(Me=(le=Ve.cloneDeep(ve))==null?void 0:le.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:Me.contents)==null||_e.forEach(de=>{var Ge,Ee,ht,He,je;Se===""&&((ht=(Ee=(Ge=de==null?void 0:de.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Ee[1])!=null&&ht.includes("["))&&(Se=(je=(He=de==null?void 0:de.optionUrl)==null?void 0:He.groupSelect)==null?void 0:je[1])}),(ce=Ce==null?void 0:Ce.optionUrl)!=null&&ce.menuSelect){let de=await kl(Ce),Ge;if(de==null||de.forEach(Ee=>{var ht,He,je,Xe,Dt,yt,Ct,wt,Ft,an;Se===((He=(ht=Ce==null?void 0:Ce.optionUrl)==null?void 0:ht.groupSelect)==null?void 0:He[1])&&((Dt=(Xe=(je=Ce==null?void 0:Ce.optionUrl)==null?void 0:je.groupSelect)==null?void 0:Xe[1])!=null&&Dt.includes("["))&&((an=Ve.cloneDeep(Ee))==null?void 0:an[(Ft=(wt=(Ct=(yt=Ce==null?void 0:Ce.optionUrl)==null?void 0:yt.groupSelect)==null?void 0:Ct[1])==null?void 0:wt.replaceAll("[",""))==null?void 0:Ft.replaceAll("]","")])===(Ce==null?void 0:Ce.value)&&(Ge=Ee)}),Ge){let Ee=Ve.cloneDeep(ge);Ee=Ee==null?void 0:Ee.map(He=>{var je,Xe,Dt,yt,Ct,wt,Ft,an,Nt,$t,Ht;return(Ge!=null&&Ge[He==null?void 0:He.label]||Ge!=null&&Ge[(yt=(Dt=(Xe=(je=He==null?void 0:He.optionUrl)==null?void 0:je.groupSelect)==null?void 0:Xe[1])==null?void 0:Dt.replaceAll("[",""))==null?void 0:yt.replaceAll("]","")])&&((Ft=(wt=(Ct=He==null?void 0:He.optionUrl)==null?void 0:Ct.groupSelect)==null?void 0:wt[1])!=null&&Ft.includes("["))&&(He.value=(Ge==null?void 0:Ge[He==null?void 0:He.label])||(Ge==null?void 0:Ge[(Ht=($t=(Nt=(an=He==null?void 0:He.optionUrl)==null?void 0:an.groupSelect)==null?void 0:Nt[1])==null?void 0:$t.replaceAll("[",""))==null?void 0:Ht.replaceAll("]","")])),He}),b.value=(ne=Ve.cloneDeep(b.value))==null?void 0:ne.map(He=>{if((He==null?void 0:He.id)===(H==null?void 0:H.id)){const je={};return Ee==null||Ee.forEach(Xe=>{je[Xe.name]=Xe.value}),je.id=He==null?void 0:He.id,je}return He});let ht=Ve.cloneDeep(Ee);ht=ht==null?void 0:ht.map(He=>{var je,Xe,Dt,yt;return(Xe=(je=He==null?void 0:He.optionUrl)==null?void 0:je.menuSelect)!=null&&Xe.some(Ct=>Ct==null?void 0:Ct.includes)&&(He.optionUrl.menuSelect=(yt=(Dt=He==null?void 0:He.optionUrl)==null?void 0:Dt.menuSelect)==null?void 0:yt.map(Ct=>{var wt,Ft,an,Nt;if(Ct!=null&&Ct.includes("[")){let $t=(Ft=(wt=Ct==null?void 0:Ct.replaceAll("[","").replaceAll("]",""))==null?void 0:wt.split(":"))==null?void 0:Ft[1];Ct=(Nt=(an=Ve.cloneDeep(Ee))==null?void 0:an.find(Ht=>(Ht==null?void 0:Ht.label)===$t))==null?void 0:Nt.value}return Ct})),He}),b.value=(Oe=Ve.cloneDeep(b.value))==null?void 0:Oe.map(He=>{if((He==null?void 0:He.id)===(H==null?void 0:H.id)){const je={};return ht==null||ht.forEach(Xe=>{je[Xe.name]=Xe.value}),je.id=He==null?void 0:He.id,je}return He})}}},In=async $=>{var Se,Ce,T,C,V,j,G,le,Me;if(!$)return;pe.value=$,o("onFormChange",$);const H=Ve.cloneDeep(r.itemData),ae=H==null?void 0:H.map(_e=>{var ce;return(_e==null?void 0:_e.key)==="header"&&((ce=_e.contents)==null||ce.map((ne,Oe)=>{var de,Ge,Ee,ht,He,je,Xe,Dt,yt,Ct,wt,Ft,an,Nt,$t,Ht,Yt,Be,Kt;return ne.type=ne!=null&&ne.type?ne.type:(ht=(Ee=(Ge=(de=ne==null?void 0:ne.key)==null?void 0:de.split("$"))==null?void 0:Ge[1])==null?void 0:Ee.split("("))!=null&&ht[0]?(je=(He=Qt.FormType)==null?void 0:He.find(kt=>{var pt,Gn,S,v;return(kt==null?void 0:kt.key)===((v=(S=(Gn=(pt=ne==null?void 0:ne.key)==null?void 0:pt.split("$"))==null?void 0:Gn[1])==null?void 0:S.split("("))==null?void 0:v[0])}))==null?void 0:je.value:"Input",ne.options=ne!=null&&ne.options?ne.options:((yt=(Dt=(Xe=ne==null?void 0:ne.key)==null?void 0:Xe.split("$"))==null?void 0:Dt[1])==null?void 0:yt.length)>0?(an=(Ft=Ho((wt=(Ct=ne==null?void 0:ne.key)==null?void 0:Ct.split("$"))==null?void 0:wt[1]))==null?void 0:Ft.split(","))==null?void 0:an.map(kt=>({label:kt,value:kt})):[],(Nt=ne==null?void 0:ne.key)!=null&&Nt.includes("$")&&(ne.key=(Ht=($t=ne==null?void 0:ne.key)==null?void 0:$t.split("$"))==null?void 0:Ht[0]),ne.value=(Yt=Object.values($))==null?void 0:Yt[Oe],ne.optionUrl=ne!=null&&ne.formMenuSelect&&((Be=ne==null?void 0:ne.formMenuSelect)==null?void 0:Be.length)>0?{groupSelect:(Kt=ne==null?void 0:ne.groupSelect)==null?void 0:Kt.split(/[::]/).map(kt=>kt.trim()),menuSelect:ne==null?void 0:ne.formMenuSelect,selectRelateType:"",type:(ne==null?void 0:ne.formType)??(ne!=null&&ne.groupSelect?"Select":"")}:null,ne})),_e});let ue=Ve.cloneDeep(De.value),ve=(Ce=(Se=Ve.cloneDeep(ae))==null?void 0:Se.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:Ce.contents;if(ue=ue==null?void 0:ue.map(_e=>{var ce;return _e.value=(ce=ve==null?void 0:ve.find((ne,Oe)=>Oe===(_e==null?void 0:_e.id)))==null?void 0:ce.value,_e}),!st.value)return;let ge="",ze=(V=(C=(T=Ve.cloneDeep(ae))==null?void 0:T.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:C.contents)==null?void 0:V.find((_e,ce)=>{var ne,Oe;return(_e==null?void 0:_e.label)===dt.value||(ce==null?void 0:ce.toString())===((Oe=(ne=dt.value)==null?void 0:ne.split("a"))==null?void 0:Oe[1].toString())});if((le=(G=(j=Ve.cloneDeep(ae))==null?void 0:j.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:G.contents)==null||le.forEach(_e=>{var ce,ne,Oe,de,Ge;ge===""&&((Oe=(ne=(ce=_e==null?void 0:_e.optionUrl)==null?void 0:ce.groupSelect)==null?void 0:ne[1])!=null&&Oe.includes("["))&&(ge=(Ge=(de=_e==null?void 0:_e.optionUrl)==null?void 0:de.groupSelect)==null?void 0:Ge[1])}),(Me=ze==null?void 0:ze.optionUrl)!=null&&Me.menuSelect&&st.value){let _e=await kl(ze),ce;if(_e==null||_e.forEach(ne=>{var Oe,de,Ge,Ee,ht,He,je,Xe,Dt,yt;ge===((de=(Oe=ze==null?void 0:ze.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:de[1])&&((ht=(Ee=(Ge=ze==null?void 0:ze.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Ee[1])!=null&&ht.includes("["))&&((yt=Ve.cloneDeep(ne))==null?void 0:yt[(Dt=(Xe=(je=(He=ze==null?void 0:ze.optionUrl)==null?void 0:He.groupSelect)==null?void 0:je[1])==null?void 0:Xe.replaceAll("[",""))==null?void 0:Dt.replaceAll("]","")])===(ze==null?void 0:ze.value)&&(ce=ne)}),ce){let ne=Ve.cloneDeep(ue);ne=ne==null?void 0:ne.map(de=>{var Ge,Ee,ht,He,je,Xe,Dt,yt,Ct,wt,Ft;return(ce!=null&&ce[de==null?void 0:de.label]||ce!=null&&ce[(He=(ht=(Ee=(Ge=de==null?void 0:de.optionUrl)==null?void 0:Ge.groupSelect)==null?void 0:Ee[1])==null?void 0:ht.replaceAll("[",""))==null?void 0:He.replaceAll("]","")])&&((Dt=(Xe=(je=de==null?void 0:de.optionUrl)==null?void 0:je.groupSelect)==null?void 0:Xe[1])!=null&&Dt.includes("["))&&(de.value=(ce==null?void 0:ce[de==null?void 0:de.label])||(ce==null?void 0:ce[(Ft=(wt=(Ct=(yt=de==null?void 0:de.optionUrl)==null?void 0:yt.groupSelect)==null?void 0:Ct[1])==null?void 0:wt.replaceAll("[",""))==null?void 0:Ft.replaceAll("]","")])),de}),De.value=ne;let Oe=Ve.cloneDeep(ne);Oe=Oe==null?void 0:Oe.map(de=>{var Ge,Ee,ht,He;return(Ee=(Ge=de==null?void 0:de.optionUrl)==null?void 0:Ge.menuSelect)!=null&&Ee.some(je=>je==null?void 0:je.includes)&&(de.optionUrl.menuSelect=(He=(ht=de==null?void 0:de.optionUrl)==null?void 0:ht.menuSelect)==null?void 0:He.map(je=>{var Xe,Dt,yt,Ct;if(je!=null&&je.includes("[")){let wt=(Dt=(Xe=je==null?void 0:je.replaceAll("[","").replaceAll("]",""))==null?void 0:Xe.split(":"))==null?void 0:Dt[1];je=(Ct=(yt=Ve.cloneDeep(ne))==null?void 0:yt.find(Ft=>(Ft==null?void 0:Ft.label)===wt))==null?void 0:Ct.value}return je})),de}),De.value=Oe}}st.value=!1},us=$=>$?($==null?void 0:$.toUpperCase())==="INPUT"?"TEXTAREA":$:"TEXTAREA",ds=$=>{var ge,ze;const H=(ze=(ge=Z.value)==null?void 0:ge.find(Se=>(Se==null?void 0:Se.label)===($==null?void 0:$.label)))==null?void 0:ze.multiple,ae=$==null?void 0:$.prop;if(($==null?void 0:$.formType)!="Select")return;b.value.forEach(Se=>{const Ce=Se==null?void 0:Se[ae];H&&Vo(Ce)&&(Se[ae]=[Ce]),!H&&!Vo(Ce)&&(Se[ae]="")})},zn=$=>{var ae,ue,ve,ge,ze,Se;ot("");const H=(ae=De.value)==null?void 0:ae.reduce((Ce,T)=>(Ce[T.name]=T.value,Ce),{});((ue=Object.keys(H))==null?void 0:ue.length)>0&&(pe.value=H,N.value="",P.value=(ve=b.value)==null?void 0:ve.length,Q.value=(ge=xe.value)==null?void 0:ge.filter(Ce=>(Ce==null?void 0:Ce.label)!=="新增"),a.value=(Se=(ze=l.value)==null?void 0:ze.filter(Ce=>(Ce==null?void 0:Ce.label)!=="操作"))==null?void 0:Se.map(Ce=>{var C,V,j;const T=(V=(C=Z.value)==null?void 0:C.find(G=>(G==null?void 0:G.label)===(Ce==null?void 0:Ce.label)))==null?void 0:V.multiple;return ds(Ce),{...Ce,type:"edit",optionUrl:Ce!=null&&Ce.formMenuSelect&&((j=Ce==null?void 0:Ce.formMenuSelect)==null?void 0:j.length)>0?{groupSelect:Ce==null?void 0:Ce.groupSelect,menuSelect:Ce==null?void 0:Ce.formMenuSelect,selectRelateType:"",type:Ce==null?void 0:Ce.formType,multiple:T}:null,columnType:us(Ce==null?void 0:Ce.formType)}}),$==="createClick"&&Rt(!1))};y.watch(()=>[r.itemData,Y.value,te.value,ee.value,M==null?void 0:M.value],()=>{var Ce,T,C,V,j,G,le,Me,_e,ce,ne,Oe,de,Ge,Ee,ht,He,je,Xe,Dt,yt,Ct,wt,Ft,an,Nt,$t,Ht,Yt;const $=(Ce=Ve.cloneDeep(r.itemData))==null?void 0:Ce.filter(Be=>(Be==null?void 0:Be.key)==="header");(T=Ve.cloneDeep(r.itemData))==null||T.filter(Be=>(Be==null?void 0:Be.key)==="tableIndexColumn")[0];const H=(C=Ve.cloneDeep(r.itemData))==null?void 0:C.find(Be=>(Be==null?void 0:Be.key)==="page"),ae=(V=Ve.cloneDeep(r.itemData))==null?void 0:V.find(Be=>(Be==null?void 0:Be.key)==="rowButton"),ue=(j=Ve.cloneDeep(r.itemData))==null?void 0:j.find(Be=>(Be==null?void 0:Be.key)==="extraButton"),ve=(G=Ve.cloneDeep(r.itemData))==null?void 0:G.filter(Be=>(Be==null?void 0:Be.key)==="tableContents"),ge=(le=Ve.cloneDeep(r.itemData))==null?void 0:le.filter(Be=>(Be==null?void 0:Be.key)==="tableIndex");Z.value=(ce=(_e=(Me=Ve.cloneDeep(r.itemData))==null?void 0:Me.filter(Be=>(Be==null?void 0:Be.key)==="tableToForm"))==null?void 0:_e[0])==null?void 0:ce.contents,I.value=(H==null?void 0:H.contents)??!1;let ze=[];Y.value===""?ze=$==null?void 0:$[0]:ze=($==null?void 0:$.find(Be=>(Be==null?void 0:Be.selectLabel)==="("+Y.value+")"))??($==null?void 0:$.find(Be=>!(Be!=null&&Be.selectLabel)));let Se=[];if(Y.value===""?Se=ge==null?void 0:ge[0]:Se=(ge==null?void 0:ge.find(Be=>(Be==null?void 0:Be.selectLabel)==="("+Y.value+")"))??(ge==null?void 0:ge.find(Be=>!(Be!=null&&Be.selectLabel))),((ne=ze==null?void 0:ze.contents)==null?void 0:ne.length)>0){let Be=[];if(ze!=null&&ze.contents.some(v=>Array.isArray(v)&&(v==null?void 0:v.find(w=>w.children))))ee.value===""?Be=(de=(Oe=Qt.getGradeColumns(Ve.cloneDeep(ze==null?void 0:ze.contents)))==null?void 0:Oe[0])==null?void 0:de.filter(v=>!Array.isArray(v)):(ee.value.split("-"),Be=(Ge=Qt.getGradeColumns(Ve.cloneDeep(ze==null?void 0:ze.contents)))==null?void 0:Ge[0]);else{const v=ze!=null&&ze.contents.some(w=>Array.isArray(w))?(Ee=ze==null?void 0:ze.contents)==null?void 0:Ee[0]:ze==null?void 0:ze.contents;v==null||v.forEach((w,D)=>{var U;Be.push({label:(w==null?void 0:w.label)??"",prop:(w==null?void 0:w.label)==="操作"?"operate":(w==null?void 0:w.prop)??"a"+D,width:w!=null&&w.width?parseInt(w.width):"",fixed:(w==null?void 0:w.fixed)??void 0,sortable:(w==null?void 0:w.sortable)??!1,align:(w==null?void 0:w.align)??"left",showOverflowTooltip:(w==null?void 0:w.showOverflowTooltip)??!0,isNotDrag:(w==null?void 0:w.isNotDrag)??!1,isEditCol:(w==null?void 0:w.isEditCol)??!1,isOperate:(w==null?void 0:w.isOperate)??!1,id:(w==null?void 0:w.id)??D,type:(w==null?void 0:w.label)==="操作"?"operate":void 0,formType:(w==null?void 0:w.formType)??(w!=null&&w.groupSelect?"Select":""),isTableColHidden:w==null?void 0:w.isTableColHidden,isFormColHidden:w==null?void 0:w.isFormColHidden,options:(w==null?void 0:w.options)??[],value:(w==null?void 0:w.value)??"",formMenuSelect:(w==null?void 0:w.formMenuSelect)??[],isRoute:(w==null?void 0:w.isRoute)??!1,groupSelect:w!=null&&w.groupSelect?(U=w==null?void 0:w.groupSelect)==null?void 0:U.replaceAll('"',"").split(":"):[],isMainKey:w==null?void 0:w.isMainKey})})}a.value=Be,d.value=Be,t.value=(ht=a.value)==null?void 0:ht.map(v=>v==null?void 0:v.label);let Kt=(je=(He=Qt.getAllLeafNodes(Ve.cloneDeep(a.value)))==null?void 0:He.filter(v=>(v==null?void 0:v.type)!=="operate"))==null?void 0:je.map((v,w)=>({prop:(v==null?void 0:v.prop)??"a"+w,column:v.label}));Ae.value=Kt;let kt=[];Y.value===""?kt=ve==null?void 0:ve[0]:kt=(ve==null?void 0:ve.find(v=>(v==null?void 0:v.selectLabel)==="("+Y.value+")"))??(ve==null?void 0:ve.find(v=>!(v!=null&&v.selectLabel)));let pt=Array.isArray((Xe=kt==null?void 0:kt.contents)==null?void 0:Xe[0])&&((Dt=kt==null?void 0:kt.contents)!=null&&Dt[0].every(v=>Array.isArray(v)))?(yt=Ve.cloneDeep(kt==null?void 0:kt.contents))==null?void 0:yt[0]:Ve.cloneDeep(kt==null?void 0:kt.contents);Se!=null&&Se.contents&&((Ct=Se==null?void 0:Se.contents)==null?void 0:Ct.length)!==0&&(pt=(wt=Ve.cloneDeep(pt))==null?void 0:wt.map((v,w)=>{if(!Array.isArray(v)){let D={};for(let U in v)U!=="id"&&U!=="index"&&(D[U]=v[U]);v=Object.values(D)}return v}));const Gn=!!((Ft=a.value)!=null&&Ft.find(v=>v.prop==="index"));pt=yu(Ve.cloneDeep(pt),Se==null?void 0:Se.contents,Gn);const S=[];pt==null||pt.forEach((v,w)=>{var U;let D={};if(Array.isArray(v)){let ie=[];v==null||v.filter(ye=>!(ye!=null&&ye.id)).forEach((ye,Qe)=>{var qe,nt,gt,Ue,mt,ut;if((qe=Kt==null?void 0:Kt[Qe])!=null&&qe.prop&&!Array.isArray(ye)){let xt={};xt[Kt[Qe].column]=ye,M!=null&&M.value&&((nt=M==null?void 0:M.value)==null?void 0:nt.length)>0&&((gt=M==null?void 0:M.value)!=null&>.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(xt)))&&(ie=(Ue=M==null?void 0:M.value)==null?void 0:Ue.find(ct=>JSON.stringify(ct==null?void 0:ct[0])===JSON.stringify(xt))),ie&&ie.length>0?D[Kt[Qe].prop]=ie!=null&&ie.find(ct=>{var Jt;return((Jt=Object.keys(ct))==null?void 0:Jt[0])===Kt[Qe].column})?(mt=ie==null?void 0:ie.find(ct=>{var Jt;return((Jt=Object.keys(ct))==null?void 0:Jt[0])===Kt[Qe].column}))==null?void 0:mt[Kt[Qe].column]:ye:D[Kt[Qe].prop]=ye}else Array.isArray(ye)&&((ut=Kt[Qe])!=null&&ut.prop?D[Kt[Qe].prop]=ye:D.children=vu(ye,Kt))})}else D=v;Array.isArray(v)&&v.some(ie=>ie==null?void 0:ie.id)?S.push(Object.assign(D,{id:(U=v==null?void 0:v.find(ie=>ie.id))==null?void 0:U.id})):D.id?S.push(D):S.push(Object.assign(D,{id:w.toString()}))}),b.value=S}else a.value=[],l.value=[],b.value=[];((an=ae==null?void 0:ae.contents)==null?void 0:an.length)>0?se.value=ae==null?void 0:ae.contents:se.value=[],((Nt=ue==null?void 0:ue.contents)==null?void 0:Nt.length)>0?(Q.value=ue==null?void 0:ue.contents,xe.value=ue==null?void 0:ue.contents):(Q.value=[],xe.value=[]),P.value=(($t=b==null?void 0:b.value)==null?void 0:$t.length)??0,q.value=b.value,We.value&&(a.value=(Yt=(Ht=l.value)==null?void 0:Ht.filter(Be=>(Be==null?void 0:Be.label)!=="操作"))==null?void 0:Yt.map(Be=>{var Kt;return{...Be,type:"edit",optionUrl:Be!=null&&Be.formMenuSelect&&((Kt=Be==null?void 0:Be.formMenuSelect)==null?void 0:Kt.length)>0?{groupSelect:Be==null?void 0:Be.groupSelect,menuSelect:Be==null?void 0:Be.formMenuSelect,selectRelateType:"",type:Be==null?void 0:Be.formType}:null}}),zn())},{deep:!0,immediate:!0}),y.watch(()=>r==null?void 0:r.operatingForm,$=>{$!=null&&$.form&&(ot($==null?void 0:$.form),A.value=$==null?void 0:$.dialogTitle,W.value=!0,E.value=!0)},{immediate:!0,deep:!0});const Xi=()=>{We.value=!We.value,We.value?(zn("viewChange"),x.setCacheUpdatingData(null),it.value=null):(Q.value=xe.value,a.value=d.value,it.value&&o("change",it.value))};y.ref(!1);const fs=$=>{zn("createClick")},ji=($,H,ae)=>{var ue,ve;pe.value=Ve.cloneDeep($),N.value=$==null?void 0:$.id,P.value=(ue=b.value)==null?void 0:ue.length,A.value=($==null?void 0:$.id)===((ve=b.value)==null?void 0:ve.length)?"新增":"编辑",Rt(!0)},ui=$=>{var Ce,T,C,V,j,G,le,Me,_e,ce;const{row:H,column:ae,item:ue,slotData:ve}=$;let ge=H!=null&&H[ae==null?void 0:ae.prop]?((T=(Ce=H==null?void 0:H[ae==null?void 0:ae.prop])==null?void 0:Ce[0])==null?void 0:T.contents)??(H==null?void 0:H[ae==null?void 0:ae.prop]):((V=(C=H==null?void 0:H[ue==null?void 0:ue.prop])==null?void 0:C[0])==null?void 0:V.contents)??(H==null?void 0:H[ue==null?void 0:ue.prop])??((G=(j=ve==null?void 0:ve[ue==null?void 0:ue.prop])==null?void 0:j[0])==null?void 0:G.contents)??(ve==null?void 0:ve[ue==null?void 0:ue.prop])??((_e=(Me=H==null?void 0:H[(le=ue==null?void 0:ue.child)==null?void 0:le.prop])==null?void 0:Me[0])==null?void 0:_e.contents)??(H==null?void 0:H[(ce=ue==null?void 0:ue.child)==null?void 0:ce.prop]),Se=Array.isArray(ge)&&!(ge!=null&&ge.every(ne=>typeof ne=="string"||typeof ne=="number"))?"查看":ge;return Se=Array.isArray(Se)?Se.join(","):Se,Se},qi=$=>{var T,C,V,j,G,le,Me,_e,ce,ne;const{row:H,column:ae,item:ue,slotData:ve}=$;let ge=H!=null&&H[ae==null?void 0:ae.prop]?((C=(T=H==null?void 0:H[ae==null?void 0:ae.prop])==null?void 0:T[0])==null?void 0:C.contents)??(H==null?void 0:H[ae==null?void 0:ae.prop]):((j=(V=H==null?void 0:H[ue==null?void 0:ue.prop])==null?void 0:V[0])==null?void 0:j.contents)??(H==null?void 0:H[ue==null?void 0:ue.prop])??((le=(G=ve==null?void 0:ve[ue==null?void 0:ue.prop])==null?void 0:G[0])==null?void 0:le.contents)??(ve==null?void 0:ve[ue==null?void 0:ue.prop])??((ce=(_e=H==null?void 0:H[(Me=ue==null?void 0:ue.child)==null?void 0:Me.prop])==null?void 0:_e[0])==null?void 0:ce.contents)??(H==null?void 0:H[(ne=ue==null?void 0:ue.child)==null?void 0:ne.prop]);const Se=Array.isArray(ge)&&!(ge!=null&&ge.every(Oe=>typeof Oe=="string"||typeof Oe=="number")),Ce=Array.isArray(ge)&&(ge==null?void 0:ge.find(Oe=>Oe==null?void 0:Oe.url));return Se&&Ce};return($,H)=>{var Ce,T;const ae=y.resolveComponent("el-icon"),ue=y.resolveComponent("el-popover"),ve=y.resolveComponent("svg-icon"),ge=y.resolveComponent("el-checkbox"),ze=y.resolveComponent("el-checkbox-group"),Se=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",q6,[(y.openBlock(),y.createBlock(Fn.ssTable,{columns:a.value,checkedColumns:t.value,key:a.value,tableData:b.value,isEditViewport:We.value,isShowPagination:I.value,isShowEdit:!1,isShowDelete:!1,onDbClickRow:Ke,extraButton:Q.value,onContentClick:vt,onRowClick:at,onSelectChange:Ie,onCellChange:ji,onChange:bn,onPreview:k},y.createSlots({headerButton:y.withCtx(C=>[s.showHeader?(y.openBlock(),y.createBlock(F6,{key:0,compName:s.compName,buttons:C.buttons,onButtonClick:H[0]||(H[0]=V=>J(V,"",{})),columns:a.value,onFilter:_t},null,8,["compName","buttons","columns"])):y.createCommentVNode("",!0)]),viewport:y.withCtx(()=>{var C;return[((C=b.value)==null?void 0:C.length)>0?(y.openBlock(),y.createElementBlock("div",K6,[y.createElementVNode("span",{title:"编辑视图",onClick:Xi},[y.createVNode(ve,{name:"editTable",class:"view-icon"})])])):y.createCommentVNode("",!0)]}),rowCreate:y.withCtx(({row:C})=>[y.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:V=>fs()},[y.createVNode(ve,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,J6)]),operateCol:y.withCtx(()=>[y.createVNode(ue,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"click",onShow:qt},{reference:y.withCtx(()=>[y.createElementVNode("span",Z6,[y.createVNode(ve,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:y.withCtx(()=>[y.createElementVNode("div",Q6,[y.createVNode(ze,{modelValue:t.value,"onUpdate:modelValue":H[2]||(H[2]=C=>t.value=C),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:y.withCtx(()=>[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(Le.value,C=>(y.openBlock(),y.createBlock(ge,{key:C.label,label:C.label,value:C.label,style:{width:"100%",marginRight:0}},{default:y.withCtx(()=>[y.createElementVNode("span",null,y.toDisplayString(C.label),1),y.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:y.withCtx(C=>[qi(C)?(y.openBlock(),y.createBlock(ue,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:y.withCtx(()=>[y.createElementVNode("span",e5,y.toDisplayString(ui(C)),1)]),default:y.withCtx(()=>{var V;return[y.createElementVNode("div",t5,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(C==null?void 0:C.row[(V=C==null?void 0:C.column)==null?void 0:V.prop],j=>(y.openBlock(),y.createElementBlock("div",n5,[y.createElementVNode("div",{class:"prop-url",title:R(j),onClick:G=>oe(j)},y.toDisplayString(R(j)),9,i5),y.createElementVNode("div",{class:"prop-download",onClick:G=>we(j)}," 下载 ",8,s5)]))),256))])]}),_:2},1024)):(y.openBlock(),y.createElementBlock(y.Fragment,{key:1},[y.createTextVNode(y.toDisplayString(ui(C)),1)],64))]),_:2},[((Ce=se.value)==null?void 0:Ce.length)>0?{name:"actions",fn:y.withCtx(({item:C})=>[y.createVNode(ue,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:y.withCtx(()=>[y.createVNode(ae,null,{default:y.withCtx(()=>[y.createVNode(y.unref(wn.more_filled_default))]),_:1})]),default:y.withCtx(()=>[y.createElementVNode("div",$6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(Pe(se.value,C),(V,j)=>(y.openBlock(),y.createElementBlock("div",{class:"menu-config-item",key:j,onClick:G=>J(V==null?void 0:V.label,C,{extra:V})},[y.createElementVNode("div",{style:y.normalizeStyle({color:V==null?void 0:V.textColor}),class:"extra-button-label"},y.toDisplayString(V==null?void 0:V.label),5)],8,Y6))),128))])]),_:2},1024)]),key:"0"}:void 0,((T=b.value)==null?void 0:T.length)>0?{name:"batchButton",fn:y.withCtx(C=>[y.createVNode(U6,{buttons:C.buttons,onButtonClick:H[1]||(H[1]=V=>J(V,"",{}))},null,8,["buttons"])]),key:"1"}:void 0]),1032,["columns","checkedColumns","tableData","isEditViewport","isShowPagination","extraButton"])),y.createVNode(Fn.ssDialog,{title:A.value,visible:E.value,width:et.value,onBeforeDestroy:rt},{default:y.withCtx(()=>[y.createElementVNode("div",r5,[y.createVNode(Fn.ssForm,{rowContents:De.value,isEnableWrap:!1,onChange:In,onClickTrigger:Xt,isEdit:L.value,onBlurChange:Ze},null,8,["rowContents","isEdit"])])]),footer:y.withCtx(()=>[W.value?(y.openBlock(),y.createElementBlock("div",a5,[y.createVNode(Se,{onClick:H[3]||(H[3]=C=>E.value=!1),id:"themeBorderButton"},{default:y.withCtx(()=>H[7]||(H[7]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[7]}),y.createVNode(Se,{class:"ok-button",onClick:H[4]||(H[4]=C=>Rt(!0)),id:"themeButton"},{default:y.withCtx(()=>H[8]||(H[8]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[8]})])):y.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),y.createVNode(Fn.ssDialog,{title:A.value,visible:B.value,width:X.value,onBeforeDestroy:H[6]||(H[6]=C=>B.value=!1)},{default:y.withCtx(()=>[y.createVNode(H6)]),footer:y.withCtx(()=>[y.createElementVNode("div",o5,[y.createVNode(Se,{onClick:H[5]||(H[5]=C=>B.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:y.withCtx(()=>H[9]||(H[9]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[9]}),y.createVNode(Se,{class:"ok-button",onClick:Et,id:"themeButton"},{default:y.withCtx(()=>H[10]||(H[10]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["title","visible","width"]),m.value?(y.openBlock(),y.createBlock(Fn.ssFilePreview,{key:0,fileDataList:u.value,onDestroy:Fe},null,8,["fileDataList"])):y.createCommentVNode("",!0),c.value?(y.openBlock(),y.createBlock(Fn.ssDialog,{key:1,visible:c.value,onBeforeDestroy:Re,style:{height:"700px",width:"1000px"}},{default:y.withCtx(()=>[c.value?(y.openBlock(),y.createBlock(mu,{key:0,"urdf-url":he.value},null,8,["urdf-url"])):y.createCommentVNode("",!0)]),_:1},8,["visible"])):y.createCommentVNode("",!0)])}}},Eu=Ci._export_sfc(l5,[["__scopeId","data-v-1c0cdebf"]]);exports.ACESFilmicToneMapping=Gl;exports.AmbientLight=cc;exports.Box3=Tn;exports.CatmullRomCurve3=rc;exports.Color=bt;exports.DirectionalLight=gr;exports.DoubleSide=cn;exports.Euler=_n;exports.GridHelper=J0;exports.HemisphereLight=K0;exports.MOUSE=Si;exports.MathUtils=xi;exports.Matrix4=Mt;exports.Mesh=Pt;exports.MeshPhongMaterial=ln;exports.OrbitControls=ru;exports.PCFSoftShadowMap=Hl;exports.PerspectiveCamera=gn;exports.Plane=jn;exports.PlaneGeometry=wi;exports.PointLight=Pa;exports.SRGBColorSpace=Vt;exports.Scene=Ia;exports.ShadowMaterial=X0;exports.TubeGeometry=ka;exports.Vector3=z;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]),Vt),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,f=u.length;_<f;_++){const p=u[_];if(p.length>0){const x=p.split("/");h.push(x)}}const g=h[0];for(let _=1,f=h.length-1;_<f;_++){const p=h[_],x=h[_+1];t.addFace(g[0],p[0],x[0],g[1],p[1],x[1],g[2],p[2],x[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 f=m[g].split("/");f[0]!==""&&u.push(f[0]),f[1]!==""&&h.push(f[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 wn;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 an;_.setAttribute("position",new Ft(d.vertices,3)),d.normals.length>0&&_.setAttribute("normal",new Ft(d.normals,3)),d.colors.length>0&&(g=!0,_.setAttribute("color",new Ft(d.colors,3))),d.hasUVIndices===!0&&_.setAttribute("uv",new Ft(d.uvs,2));const f=[];for(let x=0,M=m.length;x<M;x++){const b=m[x],N=b.name+"_"+b.smooth+"_"+g;let L=t.materials[N];if(this.materials!==null){if(L=this.materials.create(b.name),u&&L&&!(L instanceof Ei)){const P=new Ei;Hn.prototype.copy.call(P,L),P.color.copy(L.color),L=P}else if(h&&L&&!(L instanceof Oi)){const P=new Oi({size:10,sizeAttenuation:!1});Hn.prototype.copy.call(P,L),P.color.copy(L.color),P.map=L.map,L=P}}L===void 0&&(u?L=new Ei:h?L=new Oi({size:1,sizeAttenuation:!1}):L=new cn,L.name=b.name,L.flatShading=!b.smooth,L.vertexColors=g,t.materials[N]=L),f.push(L)}let p;if(f.length>1){for(let x=0,M=m.length;x<M;x++){const b=m[x];_.addGroup(b.groupStart,b.groupCount,x)}u?p=new Ra(_,f):h?p=new Vs(_,f):p=new Nt(_,f)}else u?p=new Ra(_,f[0]):h?p=new Vs(_,f[0]):p=new Nt(_,f[0]);p.name=c.name,r.add(p)}else if(t.vertices.length>0){const a=new Oi({size:1,sizeAttenuation:!1}),l=new an;l.setAttribute("position",new Ft(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(l.setAttribute("color",new Ft(t.colors,3)),a.vertexColors=!0);const c=new Vs(l,a);r.add(c)}return r}}class os extends ni{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:Yn,this.wrap=this.options.wrap!==void 0?this.options.wrap:oi}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=Vt),i[a]=d}for(const a in n){const l=n[a];let c;if(l!=="")switch(a.toLowerCase()){case"kd":i.color=Bt.colorSpaceToWorking(new At().fromArray(l),Vt);break;case"ks":i.specular=Bt.colorSpaceToWorking(new At().fromArray(l),Vt);break;case"ke":i.emissive=Bt.colorSpaceToWorking(new At().fromArray(l),Vt);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 cn(i),this.materials[e]}getTextureParams(e,t){const n={scale:new Je(1,1),offset:new Je(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),f=Oo(u);g&&g>0?n.value=a?`正在下载第 ${_} / ${a} 个文件: ${f}(${Us(h)} / ${Us(g)})`:`正在下载: ${f}(${Us(h)} / ${Us(g)})`:h&&h>0?n.value=a?`正在下载第 ${_} / ${a} 个文件: ${f}(已下载 ${Us(h)})`:`正在下载: ${f}(已下载 ${Us(h)})`:n.value=a?`正在下载第 ${_} / ${a} 个文件: ${f}`:`正在下载: ${f}`},m=new gc(c);m.packages=u=>`${Bo.endsWith("/")?Bo:Bo+"/"}${u}/`,m.loadMeshCb=(u,h,g)=>{const _=(()=>{const f=u.split("?")[0].split("#")[0],p=f.lastIndexOf(".");return p>=0?f.slice(p+1).toLowerCase():void 0})();switch(_){case"obj":{const f=(()=>{try{return new URL(".",u).toString()}catch{const N=u.lastIndexOf("/");return N>=0?u.slice(0,N+1):u}})(),p=(()=>{var L;return(((L=u.split("/").pop())==null?void 0:L.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),x=`${f}${p}.mtl`,M=N=>{const L=new as(h);N&&L.setMaterials(N),L.load(u,P=>g(P),P=>{d(u,P==null?void 0:P.loaded,P==null?void 0:P.total)},P=>{console.error(`加载 OBJ 失败: ${u}`,P),g(new wn)})},b=new os(h);b.setResourcePath(f),b.load(x,N=>{try{N.preload()}catch{}M(N)},N=>{d(x,N==null?void 0:N.loaded,N==null?void 0:N.total)},N=>{console.warn(`未找到或加载材质失败: ${x}`),M(void 0)});break}case"stl":{new Hi(h).load(u,p=>{const x=new cn({color:12303291,shininess:30}),M=new Nt(p,x);M.castShadow=!0,M.receiveShadow=!0,g(M)},p=>{d(u,p==null?void 0:p.loaded,p==null?void 0:p.total)},p=>{console.error(`加载 STL 失败: ${u}`,p),g(new wn)});break}default:console.error(`不支持的网格格式: .${_} (路径: ${u})`),g(new wn)}};try{const u=r.split("/").pop();n.value=`正在下载 URDF 文件: ${u}`;const h=await new Promise((g,_)=>{m.load(r,f=>g(f),f=>{d(r,f==null?void 0:f.loaded,f==null?void 0:f.total)},f=>_(f))});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 ni{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,f=new Uint8Array(g);let p=0,x=0,M,b,N;do if(M=h[p++],M<32){if(M++,x+M>g)throw new Error("Output buffer is not large enough");if(p+M>_)throw new Error("Invalid compressed data");do f[x++]=h[p++];while(--M)}else{if(b=M>>5,N=x-((M&31)<<8)-1,p>=_)throw new Error("Invalid compressed data");if(b===7&&(b+=h[p++],p>=_))throw new Error("Invalid compressed data");if(N-=h[p++],x+b+2>g)throw new Error("Output buffer is not large enough");if(N<0)throw new Error("Invalid compressed data");if(N>=x)throw new Error("Invalid compressed data");do f[x++]=f[N++];while(--b+2)}while(p<_);return f}function n(h){const g={},_=new Uint8Array(h);let f="",p="",x=0,M=!1;const b=_.length;for(;x<b&&M===!1;){const I=String.fromCharCode(_[x++]);I===`
|
|
4206
|
+
`||I==="\r"?(p.trim().toLowerCase().startsWith("data")&&(M=!0),p=""):p+=I,f+=I}const N=f.search(/[\r\n]DATA\s(\S*)\s/i),L=/[\r\n]DATA\s(\S*)\s/i.exec(f.slice(N-1));if(g.data=L[1],g.headerLen=L[0].length+N,g.str=f.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(I){return parseInt(I,10)})),g.count!==null)g.count=g.count[1].split(" ").map(function(I){return parseInt(I,10)});else{g.count=[];for(let I=0,E=g.fields.length;I<E;I++)g.count.push(1)}g.offset={};let P=0;for(let I=0,E=g.fields.length;I<E;I++)g.data==="ascii"?g.offset[g.fields[I]]=I:(g.offset[g.fields[I]]=P,P+=g.size[I]*g.count[I]);return g.rowSize=P,g}const i=n(e),r=[],o=[],a=[],l=[],c=[],d=new At;if(i.data==="ascii"){const h=i.offset,f=new TextDecoder().decode(e).slice(i.headerLen).split(`
|
|
4207
|
+
`);for(let p=0,x=f.length;p<x;p++){if(f[p]==="")continue;const M=f[p].split(" ");if(h.x!==void 0&&(r.push(parseFloat(M[h.x])),r.push(parseFloat(M[h.y])),r.push(parseFloat(M[h.z]))),h.rgb!==void 0){const b=i.fields.findIndex(F=>F==="rgb"),N=i.type[b],L=parseFloat(M[h.rgb]);let P=L;if(N==="F"){const F=new Float32Array(1);F[0]=L,P=new Int32Array(F.buffer)[0]}const I=(P>>16&255)/255,E=(P>>8&255)/255,A=(P>>0&255)/255;d.setRGB(I,E,A,Vt),a.push(d.r,d.g,d.b)}h.normal_x!==void 0&&(o.push(parseFloat(M[h.normal_x])),o.push(parseFloat(M[h.normal_y])),o.push(parseFloat(M[h.normal_z]))),h.intensity!==void 0&&l.push(parseFloat(M[h.intensity])),h.label!==void 0&&c.push(parseInt(M[h.label]))}}if(i.data==="binary_compressed"){const h=new Uint32Array(e.slice(i.headerLen,i.headerLen+8)),g=h[0],_=h[1],f=t(new Uint8Array(e,i.headerLen+8,g),_),p=new DataView(f.buffer),x=i.offset;for(let M=0;M<i.points;M++){if(x.x!==void 0){const b=i.fields.indexOf("x"),N=i.fields.indexOf("y"),L=i.fields.indexOf("z");r.push(this._getDataView(p,i.points*x.x+i.size[b]*M,i.type[b],i.size[b])),r.push(this._getDataView(p,i.points*x.y+i.size[N]*M,i.type[N],i.size[N])),r.push(this._getDataView(p,i.points*x.z+i.size[L]*M,i.type[L],i.size[L]))}if(x.rgb!==void 0){const b=i.fields.indexOf("rgb"),N=p.getUint8(i.points*x.rgb+i.size[b]*M+2)/255,L=p.getUint8(i.points*x.rgb+i.size[b]*M+1)/255,P=p.getUint8(i.points*x.rgb+i.size[b]*M+0)/255;d.setRGB(N,L,P,Vt),a.push(d.r,d.g,d.b)}if(x.normal_x!==void 0){const b=i.fields.indexOf("normal_x"),N=i.fields.indexOf("normal_y"),L=i.fields.indexOf("normal_z");o.push(this._getDataView(p,i.points*x.normal_x+i.size[b]*M,i.type[b],i.size[b])),o.push(this._getDataView(p,i.points*x.normal_y+i.size[N]*M,i.type[N],i.size[N])),o.push(this._getDataView(p,i.points*x.normal_z+i.size[L]*M,i.type[L],i.size[L]))}if(x.intensity!==void 0){const b=i.fields.indexOf("intensity");l.push(this._getDataView(p,i.points*x.intensity+i.size[b]*M,i.type[b],i.size[b]))}if(x.label!==void 0){const b=i.fields.indexOf("label");c.push(p.getInt32(i.points*x.label+i.size[b]*M,this.littleEndian))}}}if(i.data==="binary"){const h=new DataView(e,i.headerLen),g=i.offset;for(let _=0,f=0;_<i.points;_++,f+=i.rowSize){if(g.x!==void 0){const p=i.fields.indexOf("x"),x=i.fields.indexOf("y"),M=i.fields.indexOf("z");r.push(this._getDataView(h,f+g.x,i.type[p],i.size[p])),r.push(this._getDataView(h,f+g.y,i.type[x],i.size[x])),r.push(this._getDataView(h,f+g.z,i.type[M],i.size[M]))}if(g.rgb!==void 0){const p=h.getUint8(f+g.rgb+2)/255,x=h.getUint8(f+g.rgb+1)/255,M=h.getUint8(f+g.rgb+0)/255;d.setRGB(p,x,M,Vt),a.push(d.r,d.g,d.b)}if(g.normal_x!==void 0){const p=i.fields.indexOf("normal_x"),x=i.fields.indexOf("normal_y"),M=i.fields.indexOf("normal_z");o.push(this._getDataView(h,f+g.normal_x,i.type[p],i.size[p])),o.push(this._getDataView(h,f+g.normal_y,i.type[x],i.size[x])),o.push(this._getDataView(h,f+g.normal_z,i.type[M],i.size[M]))}if(g.intensity!==void 0){const p=i.fields.indexOf("intensity");l.push(this._getDataView(h,f+g.intensity,i.type[p],i.size[p]))}g.label!==void 0&&c.push(h.getInt32(f+g.label,this.littleEndian))}}const m=new an;r.length>0&&m.setAttribute("position",new Ft(r,3)),o.length>0&&m.setAttribute("normal",new Ft(o,3)),a.length>0&&m.setAttribute("color",new Ft(a,3)),l.length>0&&m.setAttribute("intensity",new Ft(l,1)),c.length>0&&m.setAttribute("label",new J2(c,1)),m.computeBoundingSphere();const u=new Oi({size:.005});return a.length>0&&(u.vertexColors=!0),new Vs(m,u)}}const N4=He.useModelComp(He.pinia),{systemPath:p0}=He.storeToRefs(N4),pa=y.ref(),m0=new Map;function U4(s,e,t,n,i){const r=async u=>{try{const h=await Fn.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=f=>{try{const p=f.target.result,M=new os().parse(p);M.preload(),h(M)}catch(p){g(p)}},_.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 cn({color:8947848,side:hn}))},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 f=new FileReader;f.onload=async p=>{try{const x=p.target.result;let M=null;h&&h.length>0&&(h.length===1?M=await o(h[0]):M=await a(h));const b=new as;M&&b.setMaterials(M);const N=b.parse(x);M||N.traverse(L=>{L.isMesh&&(L.material=new cn({color:8947848,side:hn}))}),g(N)}catch(x){_(x)}},f.onerror=()=>{_(new Error("OBJ文件读取失败"))},f.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 f=0;f<u.length;f++){const p=u[f];n.value=`正在加载模型 ${f+1}/${u.length}...`;const x=await r(p.objUrl),M=((h=p.objUrl)==null?void 0:h.split("/").pop())||`model_${f}.obj`,b=new File([x],M,{type:x.type});let N=[];if(p.mtlUrls){const P=Array.isArray(p.mtlUrls)?p.mtlUrls:[p.mtlUrls];for(let I=0;I<P.length;I++){const E=P[I],A=await r(E),F=(E==null?void 0:E.split("/").pop())||`material_${f}_${I}.mtl`,B=new File([A],F,{type:A.type});N.push(B)}}const L=await l(b,N);g.add(L),e.value.push(L),_.push(L)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let f;const p=u.toLowerCase();switch(p){case".txt":case".cpt":case".obj":const x=await h.text();if(p===".txt"||p===".cpt"){const $=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Ae=[...x.matchAll($)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),et=new an,je=Ae.flatMap(O=>[O.x,O.y,O.z]);if(et.setAttribute("position",new Ft(je,3)),p===".txt"){const O=new Oi({color:"#5B5C99",size:1,sizeAttenuation:!1});f=new Vs(et,O)}else if(p===".cpt"){const O=new Ei({color:"#5B5C99",linewidth:100});f=new Ba(et,O)}}else if(p===".obj"){const $=new as;if(g&&g.length>0){const ge=new os;for(const Ae of g){const et=await Ae.text(),je=ge.parse(et);je.preload(),$.setMaterials(je);break}}f=$.parse(x),(!g||g.length===0)&&f.traverse(ge=>{ge.isMesh&&(ge.material=new cn({color:"#B3B3D4"})),ge instanceof Nt&&(ge.material.side=hn)})}break;case".stl":const M=await h.arrayBuffer(),N=new Hi().parse(M),L=new cn({color:"#B3B3D4",side:hn});f=new Nt(N,L);break;case".nc":const P=["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"],I={"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 wn,A=P.map($=>new Promise((ge,Ae)=>{new Hi().load(p0.value===""?`/model/${$}`:`${p0.value}\\${$}`,je=>{const O=new cn({color:I[$]||"#B3B3D4",side:hn}),pt=new Nt(je,O);ge(pt)},void 0,Ae)}));try{(await Promise.all(A)).forEach(ge=>E.add(ge)),f=E}catch($){throw console.error("加载NC文件对应的STL文件失败:",$),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const F=new pu,B=new wn;try{const $=await on.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ge=new Blob([$.data],{type:"application/octet-stream;charset=UTF-8"}),Ae=await on.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),et=new Blob([Ae.data],{type:"application/octet-stream;charset=UTF-8"}),je=await new Promise((pt,st)=>{const it=URL.createObjectURL(ge);F.load(it,ke=>{const Ze=new Float32Array(ke.geometry.attributes.position.count*3);for(let Fe=0;Fe<ke.geometry.attributes.position.count;Fe++)Ze[Fe*3]=1,Ze[Fe*3+1]=0,Ze[Fe*3+2]=0;ke.geometry.setAttribute("color",new un(Ze,3)),ke.material.vertexColors=!0,ke.scale.set(.3,.3,.3),URL.revokeObjectURL(it),pt(ke)},void 0,st)}),O=await new Promise((pt,st)=>{const it=URL.createObjectURL(et);F.load(it,ke=>{const Ze=new Float32Array(ke.geometry.attributes.position.count*3);for(let Fe=0;Fe<ke.geometry.attributes.position.count;Fe++)Ze[Fe*3]=0,Ze[Fe*3+1]=1,Ze[Fe*3+2]=0;ke.geometry.setAttribute("color",new un(Ze,3)),ke.material.vertexColors=!0,ke.scale.set(.3,.3,.3),URL.revokeObjectURL(it),pt(ke)},void 0,st)});B.add(je),B.add(O),f=B}catch($){throw console.error("PCD文件加载失败:",$),new Error("无法加载PCD文件")}break;case".urdf":const X=URL.createObjectURL(h),Z=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},de=new Map,Q=new Map,xe=new Map,Pe=async $=>{if(de.has($))return console.log(`从缓存加载: ${$}`),de.get($);try{const ge=await on.axios.get(`${se}/${$}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Ae=new Blob([ge.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&de.set($,Ae),Ae}catch(ge){throw console.error(`加载文件失败: ${$}`,ge),new Error(`无法加载文件: ${$}`)}},Te=($="default")=>{if(Q.has($))return Q.get($);const ge=new cn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Yn});return Q.set($,ge),ge},me=$=>{try{$.isBufferGeometry&&$.mergeVertices&&$.mergeVertices(),$.computeVertexNormals&&$.computeVertexNormals(),$.computeBoundingSphere&&$.computeBoundingSphere(),$.deleteAttribute&&$.deleteAttribute("uv2")}catch(ge){console.warn("几何体优化失败,使用原始几何体:",ge)}return $},ae=async($,ge,Ae)=>{const et=`stl_${ge}`;if(xe.has(et)){const st=xe.get(et);return new Nt(st,Te())}const je=await $.arrayBuffer();let pt=new Hi(Ae).parse(je);return pt=me(pt),xe.set(et,pt),new Nt(pt,Te())},j=async($,ge,Ae)=>{const et=`obj_${ge}`;if(de.has(et))return de.get(et).clone();const je=await $.text(),O=new as(Ae),pt=ge.replace(".obj",".mtl");try{const ke=await(await Pe(pt)).text(),Fe=new os(Ae).parse(ke);Fe.preload(),O.setMaterials(Fe)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${pt}`)}const st=O.parse(je);return st.traverse(it=>{it.isMesh&&(it.geometry=me(it.geometry),it.castShadow=!0,it.receiveShadow=!0,it.renderOrder=1)}),de.set(et,st),st},K=($,ge)=>{const Ae=new O0;if(Ae.addLevel($,0),$.geometry){const et=$.geometry.clone(),je=new Nt(et,$.material);Ae.addLevel(je,50)}return Ae};let te=0,ee=0;const pe=[];Z.loadMeshCb=async($,ge,Ae,et,je)=>{const O=$.split("/").pop(),pt=Ae||(()=>{});te++;const st=new Promise(async(it,ke)=>{try{const Ze=await Pe(O);if(!Ze||Ze.size===0)throw new Error(`文件为空: ${O}`);const Fe=O.split(".").pop().toLowerCase();let rt;switch(Fe){case"stl":rt=await ae(Ze,O,ge);break;case"obj":rt=await j(Ze,O,ge);break;default:throw new Error(`不支持的文件格式: ${Fe}`)}G.enableLOD&&rt.isMesh&&(rt=K(rt,O)),pt(rt),ee++,et&&et({loaded:ee,total:te,progress:ee/te}),it(rt)}catch(Ze){console.error(`mesh文件加载失败: ${O}`,Ze);const Fe=new wn;pt(Fe),it(Fe);const rt=new Wi(.1,.1,.1),Xt=new j0({color:16711680,wireframe:!0});return new Nt(rt,Xt)}});pe.push(st)};try{if(!X){pa.value=void 0;break}if(f=await Z.loadAsync(X),console.log(`URDF文件加载完成,等待${te}个mesh文件加载...`),pe.length>0)try{await Promise.allSettled(pe),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${te}`)}catch(Ae){console.warn("部分mesh文件加载失败,但继续显示模型",Ae)}f.traverse(Ae=>{Ae.isMesh&&(Ae.castShadow=!0,Ae.receiveShadow=!0,Ae.renderOrder=1,Ae.material&&(Ae.material.needsUpdate=!0))}),console.time("计算包围盒");const $=new Tn;$.expandByObject(f);const ge=`urdf_${Date.now()}`;f.userData.boundingBox=$.clone(),f.userData.modelId=ge,m0.set(ge,{box:$.clone(),center:$.getCenter(new z),size:$.getSize(new z),maxSize:Math.max(...$.getSize(new z).toArray())}),pa.value=f,console.log("URDF模型加载完成并优化")}catch($){console.error("URDF加载失败:",$),pa.value=void 0}finally{X&&URL.revokeObjectURL(X)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return f};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 f=u[_],p=await d(f.suffix,f.blob,f.mtlBlobs||[],f.meshFiles||[]);p&&(h.add(p),e.value.push(p),g.push(p))}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=He.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(Au,{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=Ci._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"},K4={class:"joint-value"},J4={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),_=xi.degToRad,f=y.ref(1),p=()=>Q4/ko/f.value;let x=[];y.watch(()=>t.animationData,ae=>{var K;l.value=ae.extra.管长,o.value=ae.extra.外径/2;let j=((K=He.cloneDeep(ae))==null?void 0:K["输出(动画数据)"])??[];j&&j.length>0&&(x=j)},{deep:!0}),y.computed(()=>x.length>0);const M=(ae,j=!1)=>ae==="revolute"?j?Math.PI:-Math.PI:ae==="prismatic"?j?1:-1:0,b=()=>{if(!i.value)return on.ElMessage.error("未加载 URDF"),!1;let ae=null;return i.value.traverse(j=>{ae||j.name==="Pipe_Link"&&j.traverse(K=>{K instanceof Nt&&!ae&&(ae=K)})}),ae?(ae.position.y-=c.value*hr,a.value=ae,ae.material=new cn({color:11184810,shininess:80,side:hn}),!0):(on.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},N=ae=>{if(!ae||!ae.joints)return console.warn("URDF模型没有关节信息"),[];let j=null;if(ae.traverse(te=>{te.name==="Pipe_Link"&&!j&&(j=te)}),j)a.value=j;else return console.warn("未找到管子模型"),[];const K=[];return Object.keys(ae.joints).forEach(te=>{const ee=ae.joints[te];if(ee._jointType==="fixed")return;const pe=ee.limit?{lower:ee.limit.lower??M(ee._jointType,!1),upper:ee.limit.upper??M(ee._jointType,!0)}:{lower:M(ee._jointType,!1),upper:M(ee._jointType,!0)};K.push({name:te,type:ee._jointType||"unknown",limit:pe,currentValue:ee.angle||0,urdfJoint:ee})}),K.sort((te,ee)=>te.name.localeCompare(ee.name))},L=(ae,j)=>{const K=n.value.find(ee=>ee.name===ae);if(!K)return;const te=parseFloat(j);if(K.limit){const ee=Math.max(K.limit.lower,Math.min(K.limit.upper,te));K.currentValue=ee}else K.currentValue=te;t.model&&t.model.setJointValue?t.model.setJointValue(ae,K.currentValue):K.urdfJoint&&K.urdfJoint.setJointValue(K.currentValue)},P=ae=>ae.reduce((j,K)=>{let te=0;const ee=K.Y??0,pe=K.C??0,$=K.R??0;return ee>0&&(te+=ee),pe>0&&$>0&&(te+=$*_(pe)),j+te},0),I=ae=>{const j=[],K=ae.Y??0,te=ae.B??0,ee=ae.C??0,pe=ae.R??0,$={pos:new z(0,0,0),localY:new z(0,1,0),localX:new z(1,0,0),localZ:new z(0,0,1)};if(!K&&!ee)return j;if(j.push($.pos.clone()),te!==0){const ge=new St().makeRotationAxis($.localY,_(te));$.localX.applyMatrix4(ge),$.localZ.applyMatrix4(ge)}if(K>0&&($.pos.add($.localY.clone().multiplyScalar(K*hr)),j.push($.pos.clone())),ee>0&&pe>0){const ge=_(ee),Ae=pe*hr,et=$.pos.clone().add($.localX.clone().multiplyScalar(-Ae)),je=Math.max(16,Math.ceil(ee/5));for(let O=1;O<=je;O++){const pt=ge*O/je,st=new St().makeRotationAxis($.localZ,pt),ke=$.localX.clone().multiplyScalar(Ae).applyMatrix4(st),Ze=et.clone().add(ke);j.push(Ze)}}return j},E=(ae,j=0)=>{let K=x.slice(0,ae+1);const te=x[ae+1];if(te&&j>0){const je={...te,B:(te.B??0)*j,C:(te.C??0)*j};K.push(je)}const ee=P(K),pe=Math.max(0,l.value-ee),$=[];$.push(new z(0,0,0));const ge=new z(0,pe*hr,0);pe>0&&$.push(ge);let Ae={pos:ge.clone(),localY:new z(0,1,0),localX:new z(1,0,0),localZ:new z(0,0,1)};const et=[];for(let je=K.length-1;je>=0;je--){const O=K[je],pt=I(O);if(pt.length>0){const st=pt.map(Fe=>{const rt=Fe.clone(),Xt=new St;return Xt.makeBasis(Ae.localX,Ae.localY,Ae.localZ),rt.applyMatrix4(Xt),rt.add(Ae.pos)});et.push(st);const it=st[st.length-1];Ae.pos=it.clone();const ke=O.B??0,Ze=O.C??0;if(ke!==0){const Fe=new St().makeRotationAxis(Ae.localY,_(ke));Ae.localX.applyMatrix4(Fe),Ae.localZ.applyMatrix4(Fe)}if(Ze>0){const Fe=_(Ze),rt=new St().makeRotationAxis(Ae.localZ,Fe);Ae.localY.applyMatrix4(rt),Ae.localX.applyMatrix4(rt)}}}for(const je of et)je.length>1&&$.push(...je.slice(1));$.length<2&&$.push(new z(0,.001,0));try{const je=new rc($,!1,"catmullrom",.01),O=new ka(je,Math.max(2,$.length*4),o.value*hr,18,!1);a.value.geometry.dispose(),a.value.geometry=O}catch(je){console.error("管件更新失败",je)}},A=(ae,j,K=1)=>{ae&&(Object.keys(ae).forEach(te=>{const ee=ae[te],pe=n.value.find($=>$.name===te);pe&&(pe.currentValue=ee,t.model&&t.model.setJointValue?t.model.setJointValue(te,ee):pe.urdfJoint&&pe.urdfJoint.setJointValue(ee))}),E(j,K))},F=(ae,j,K)=>ae+(j-ae)*K,B=(ae,j,K)=>{if(!ae||!j)return ae||j;const te={};return Object.keys(ae).forEach(ee=>{const pe=ae[ee],$=j[ee];te[ee]=F(pe,$||pe,K)}),te},X=()=>{if(x.length===0){console.warn("没有动画数据");return}b(),d.value=!0,m.value=!1,u.value=0,h.value=0,Z()},Z=()=>{if(!d.value||m.value)return;const ae=u.value;if(ae>=x.length-1){const ee=x[x.length-1];A(ee,x.length-1,1),G();return}const j=h.value/ko,K=x[ae],te=x[ae+1];if(te){const ee=B(K,te,j);A(ee,ae,j)}else A(K,ae);h.value++,h.value>ko&&(h.value=0,u.value++),g.value=setTimeout(Z,p())},se=()=>{m.value=!0,g.value&&(clearTimeout(g.value),g.value=null)},G=()=>{d.value=!1,m.value=!1,f.value=1,g.value&&(clearTimeout(g.value),g.value=null)};e({startAnimation:X,pauseAnimation:se,stopAnimation:G,resetAll:()=>{G(),u.value=0,h.value=0,n.value.forEach(ae=>{(ae.type==="revolute"||ae.type==="prismatic")&&L(ae.name,0)}),E(-1,0)},fastForward:()=>{f.value<4&&(f.value=Math.min(4,f.value*2))},fastBackward:()=>{f.value>.25&&(f.value=Math.max(.25,f.value/2))}}),y.watch(()=>t.model,ae=>{ae?(i.value=ae,n.value=N(ae)):n.value=[]},{immediate:!0});const Pe=()=>{!t.model||d.value&&!m.value||n.value.forEach(ae=>{ae.urdfJoint&&ae.urdfJoint.angle!==void 0&&(ae.currentValue=ae.urdfJoint.angle)})},Te=()=>{const ae=()=>{Pe(),r.value=requestAnimationFrame(ae)};ae()},me=()=>{r.value&&(cancelAnimationFrame(r.value),r.value=null)};return y.onMounted(()=>{Te()}),y.onUnmounted(()=>{me(),G()}),(ae,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,K=>{var te,ee,pe,$;return y.openBlock(),y.createElementBlock("div",{key:K.name,class:"joint-item"},[y.createElementVNode("div",V4,[y.createElementVNode("div",H4,[y.createElementVNode("span",G4,y.toDisplayString(K.name),1),y.createElementVNode("span",W4," ["+y.toDisplayString(((te=K.limit)==null?void 0:te.lower.toFixed(2))??(K.type==="revolute"?"-3.14":"-1.00"))+", "+y.toDisplayString(((ee=K.limit)==null?void 0:ee.upper.toFixed(2))??(K.type==="revolute"?"3.14":"1.00"))+"] ",1)]),y.createElementVNode("span",X4,y.toDisplayString(K.type),1)]),K.type==="revolute"||K.type==="prismatic"?(y.openBlock(),y.createElementBlock("div",j4,[y.createElementVNode("div",q4,[y.createElementVNode("input",{type:"range",min:((pe=K.limit)==null?void 0:pe.lower)??(K.type==="revolute"?-Math.PI:-1),max:(($=K.limit)==null?void 0:$.upper)??(K.type==="revolute"?Math.PI:1),step:.01,value:K.currentValue,onInput:ge=>L(K.name,ge.target.value),class:"joint-slider",disabled:d.value&&!m.value},null,40,$4)]),y.createElementVNode("div",Y4,[y.createElementVNode("span",K4,y.toDisplayString(K.currentValue?Number(K.currentValue).toFixed(3):"0.000"),1),y.createElementVNode("span",J4,y.toDisplayString(K.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=Ci._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(f=>{if(!(f!=null&&f.isMesh)&&((f==null?void 0:f.type)==="URDFJoint"||(f==null?void 0:f.type)==="URDFLink")){const p={name:f==null?void 0:f.name,label:f==null?void 0:f.name,show:!0,level:g+1,isPenultimate:!1,type:f==null?void 0:f.type,id:f==null?void 0:f.id,limit:(f==null?void 0:f.limit)??"",children:a(f==null?void 0:f.children,g+1),path:f==null?void 0:f.name};_.push(p)}}),_},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 _=[],f=[...h];for(;f.length>0&&_.length<g;){const p=f.shift();p.children&&p.children.length>0&&(_.push(p.id),f.push(...p.children))}return _},d=(h,g)=>{const _=[];return h.forEach(f=>{if(f.children&&f.children.length>0){_.push(f.id);const p=f.children.filter(x=>x.children&&x.children.length>0).slice(0,g).map(x=>x.id);_.push(...p)}}),_.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=Ci._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))}}),ln=Ci._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"},A6={key:0,class:"loading-overlay"},E6={__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:f,initialTargetPosition:p,initThreeJS:x,handleResize:M,getThreeJSObjects:b,clearAllModels:N,cleanup:L}=y4(o),{loadUrdfFromUrl:P}=F4(b,_,a,l),{isAnimating:I,toggleAnimation:E,stopAnimation:A}=x4(b,_),{isClipping:F,activeClippingAxis:B,toggleClipping:X,updateClippingPlanes:Z}=M4(b,_),{urdfModel:se}=U4(b,_,a,l,N),G=()=>{if(c.value||_.value.length===0)return;c.value=!0,I.value&&A();const{camera:Te,controls:me}=b();if(!Te||!me)return;me.enabled=!0;const ae=$=>$<.5?4*$*$*$:1-Math.pow(-2*$+2,3)/2,j=Te.position.clone(),K=me.target.clone(),te=1500,ee=Date.now(),pe=()=>{const $=Date.now()-ee,ge=Math.min($/te,1),Ae=ae(ge);Te.position.lerpVectors(j,f.value,Ae),me.target.lerpVectors(K,p.value,Ae),ge<1?requestAnimationFrame(pe):c.value=!1};pe()},de=async()=>r?Promise.resolve():new Promise(Te=>{const me=()=>{r?Te():requestAnimationFrame(me)};me()}),Q=Te=>{d.value=!0,m.value=Te,Te==="剖面视图"&&!F.value&&X()},xe=Te=>{u.value=!0,h.value=Te,Te==="动画仿真"&&t("getAnimationData")},Pe=()=>{y.nextTick(()=>{var Te;(Te=g.value)==null||Te.startAnimation()})};return y.watch(()=>n.urdfUrl,async(Te,me)=>{if(Te)try{if(await de(),await P(Te)){const{camera:j}=b();j&&(j.position.set(3,3,4),j.near=.01,j.far=1e4,j.updateProjectionMatrix())}}catch(ae){console.error("加载urdf模型失败",ae),on.ElMessage.error("加载urdf模型失败")}},{immediate:!0}),y.onMounted(async()=>{await y.nextTick();try{x(),i=b().scene,r=!0,window.addEventListener("resize",M)}catch(Te){console.error("Three.js初始化失败:",Te)}}),y.onBeforeUnmount(()=>{r=!1,m.value="",h.value="",window.removeEventListener("resize",M),I.value&&A(),L()}),(Te,me)=>{var j,K,te,ee;const ae=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(ln,{name:"guanjianjiexi",size:"34"}),y.createVNode(ln,{name:"guanjiekongzhi",size:"34"}),y.createVNode(ln,{name:"gongyishengcheng",size:"34"}),y.createVNode(ln,{name:"buchangshezhi",size:"34"}),y.createVNode(ln,{name:"shuchujiagongchengxu",size:"34"})]),y.createElementVNode("div",h6,[y.createVNode(ln,{name:"viewReset",size:"24",onClick:G,title:"重置"}),y.createVNode(ln,{name:"fangda",size:"24",title:"放大"}),y.createVNode(ln,{name:"suoxiao",size:"24",title:"缩小"}),y.createVNode(ln,{name:"lookAround",size:"24",onClick:y.unref(E),title:y.unref(I)?"停止动画":"动画视图"},null,8,["onClick","title"])]),y.createElementVNode("div",u6,[y.createVNode(ln,{name:"jiegoushu",size:"24",onClick:me[0]||(me[0]=pe=>Q("场景树")),active:d.value&&m.value==="场景树",title:"场景树"},null,8,["active"]),y.createVNode(ln,{name:"clipping",size:"24",onClick:me[1]||(me[1]=pe=>Q("剖面视图")),active:d.value&&m.value==="剖面视图",title:"剖面视图"},null,8,["active"]),y.createVNode(ln,{name:"donghuafangzhen",size:"24",onClick:me[2]||(me[2]=pe=>Q("场景树3"))}),y.createVNode(ln,{name:"donghuafangzhen",size:"24",onClick:me[3]||(me[3]=pe=>Q("场景4"))})]),y.createElementVNode("div",d6,[y.createVNode(ln,{name:"donghuafangzhen",size:"24"}),y.createVNode(ln,{name:"donghuafangzhen",size:"24"}),y.createVNode(ln,{name:"guanjiekongzhi",size:"24",onClick:me[4]||(me[4]=pe=>xe("关节控制")),active:u.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),y.createVNode(ln,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:me[5]||(me[5]=pe=>xe("动画仿真")),active:u.value&&h.value==="动画仿真"},null,8,["active"]),y.createVNode(ln,{name:"donghuafangzhen",size:"24"}),y.createVNode(ln,{name:"donghuafangzhen",size:"24"})]),y.createElementVNode("div",f6,[y.createVNode(ln,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(j=g.value)==null?void 0:j.fastBackward},null,8,["onClick"]),y.createVNode(ln,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:Pe}),y.createVNode(ln,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(K=g.value)==null?void 0:K.fastForward},null,8,["onClick"]),y.createVNode(ln,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(te=g.value)==null?void 0:te.pauseAnimation},null,8,["onClick"]),y.createVNode(ln,{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:me[6]||(me[6]=pe=>d.value=!1)}," X ")]),y.createVNode(ae,{"max-height":"650px"},{default:y.withCtx(()=>[m.value==="场景树"?(y.openBlock(),y.createBlock(r6,{key:0,model:y.unref(se)},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":me[7]||(me[7]=pe=>y.isRef(B)?B.value=pe:null),onChange:me[8]||(me[8]=(...pe)=>y.unref(Z)&&y.unref(Z)(...pe))},null,544),[[y.vModelRadio,y.unref(B)]]),me[16]||(me[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":me[9]||(me[9]=pe=>y.isRef(B)?B.value=pe:null),onChange:me[10]||(me[10]=(...pe)=>y.unref(Z)&&y.unref(Z)(...pe))},null,544),[[y.vModelRadio,y.unref(B)]]),me[17]||(me[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":me[11]||(me[11]=pe=>y.isRef(B)?B.value=pe:null),onChange:me[12]||(me[12]=(...pe)=>y.unref(Z)&&y.unref(Z)(...pe))},null,544),[[y.vModelRadio,y.unref(B)]]),me[18]||(me[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":me[13]||(me[13]=pe=>y.isRef(B)?B.value=pe:null),onChange:me[14]||(me[14]=(...pe)=>y.unref(Z)&&y.unref(Z)(...pe))},null,544),[[y.vModelRadio,y.unref(B)]]),me[19]||(me[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:me[15]||(me[15]=pe=>u.value=!1)}," X ")]),y.createVNode(ae,{"max-height":"650px"},{default:y.withCtx(()=>[y.withDirectives(y.createVNode(t6,{ref_key:"jointRef",ref:g,model:y.unref(se),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",A6,[me[20]||(me[20]=y.createElementVNode("div",{class:"loading-spinner"},null,-1)),y.createElementVNode("p",null,y.toDisplayString(l.value),1)])):y.createCommentVNode("",!0)])}}},mu=Ci._export_sfc(E6,[["__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((_,f,p)=>(p===0?_[f.label]=u:_[f.label]=f.value,_),{});t("filter",h)},c=u=>{t("buttonClick",u)},d=u=>{var h,g;o.value=(g=(h=en.getColumnChild(He.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=He.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 p;const g=y.resolveComponent("svg-icon"),_=y.resolveComponent("el-input"),f=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]=x=>i.value=x),style:{width:"240px"},placeholder:"搜索","prefix-icon":y.unref(on.search_default),clearable:"",onInput:l},{append:y.withCtx(()=>[y.createElementVNode("span",R6,[y.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:y.withCtx(()=>[y.createElementVNode("div",D6,[(y.openBlock(),y.createBlock(Fn.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&&((p=n==null?void 0:n.buttons)==null?void 0:p.length)>0?(y.openBlock(),y.createElementBlock("div",L6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(n==null?void 0:n.buttons,(x,M)=>(y.openBlock(),y.createElementBlock("div",{class:"extra-contents",key:M},[y.createVNode(f,{id:"themeButton",style:y.normalizeStyle({background:(x==null?void 0:x.background)??"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}),onClick:b=>c(x==null?void 0:x.label)},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(x==null?void 0:x.label),1)]),_:2},1032,["style","onClick"])]))),128))])):y.createCommentVNode("",!0)])])}}},F6=Ci._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=Ci._export_sfc(N6,[["__scopeId","data-v-73ec704e"]]),I6=He.useModelComp(He.pinia),{systemPath:g0}=He.storeToRefs(I6),ma=y.ref(),_0=new Map;function z6(s,e,t,n,i){const r=async u=>{try{const h=await Fn.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=f=>{try{const p=f.target.result,M=new os().parse(p);M.preload(),h(M)}catch(p){g(p)}},_.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 cn({color:8947848,side:hn}))},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 f=new FileReader;f.onload=async p=>{try{const x=p.target.result;let M=null;h&&h.length>0&&(h.length===1?M=await o(h[0]):M=await a(h));const b=new as;M&&b.setMaterials(M);const N=b.parse(x);M||N.traverse(L=>{L.isMesh&&(L.material=new cn({color:8947848,side:hn}))}),g(N)}catch(x){_(x)}},f.onerror=()=>{_(new Error("OBJ文件读取失败"))},f.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 f=0;f<u.length;f++){const p=u[f];n.value=`正在加载模型 ${f+1}/${u.length}...`;const x=await r(p.objUrl),M=((h=p.objUrl)==null?void 0:h.split("/").pop())||`model_${f}.obj`,b=new File([x],M,{type:x.type});let N=[];if(p.mtlUrls){const P=Array.isArray(p.mtlUrls)?p.mtlUrls:[p.mtlUrls];for(let I=0;I<P.length;I++){const E=P[I],A=await r(E),F=(E==null?void 0:E.split("/").pop())||`material_${f}_${I}.mtl`,B=new File([A],F,{type:A.type});N.push(B)}}const L=await l(b,N);g.add(L),e.value.push(L),_.push(L)}return t.value=!1,_}catch(g){throw console.error("加载模型失败:",g),t.value=!1,g}},d=async(u,h,g=[],_=[])=>{let f;const p=u.toLowerCase();switch(p){case".txt":case".cpt":case".obj":const x=await h.text();if(p===".txt"||p===".cpt"){const $=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Ae=[...x.matchAll($)].map(O=>({x:parseFloat(O[1]),y:parseFloat(O[2]),z:parseFloat(O[3])})),et=new an,je=Ae.flatMap(O=>[O.x,O.y,O.z]);if(et.setAttribute("position",new Ft(je,3)),p===".txt"){const O=new Oi({color:"#5B5C99",size:1,sizeAttenuation:!1});f=new Vs(et,O)}else if(p===".cpt"){const O=new Ei({color:"#5B5C99",linewidth:100});f=new Ba(et,O)}}else if(p===".obj"){const $=new as;if(g&&g.length>0){const ge=new os;for(const Ae of g){const et=await Ae.text(),je=ge.parse(et);je.preload(),$.setMaterials(je);break}}f=$.parse(x),(!g||g.length===0)&&f.traverse(ge=>{ge.isMesh&&(ge.material=new cn({color:"#B3B3D4"})),ge instanceof Nt&&(ge.material.side=hn)})}break;case".stl":const M=await h.arrayBuffer(),N=new Hi().parse(M),L=new cn({color:"#B3B3D4",side:hn});f=new Nt(N,L);break;case".nc":const P=["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"],I={"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 wn,A=P.map($=>new Promise((ge,Ae)=>{new Hi().load(g0.value===""?`/model/${$}`:`${g0.value}\\${$}`,je=>{const O=new cn({color:I[$]||"#B3B3D4",side:hn}),pt=new Nt(je,O);ge(pt)},void 0,Ae)}));try{(await Promise.all(A)).forEach(ge=>E.add(ge)),f=E}catch($){throw console.error("加载NC文件对应的STL文件失败:",$),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const F=new pu,B=new wn;try{const $=await on.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ge=new Blob([$.data],{type:"application/octet-stream;charset=UTF-8"}),Ae=await on.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),et=new Blob([Ae.data],{type:"application/octet-stream;charset=UTF-8"}),je=await new Promise((pt,st)=>{const it=URL.createObjectURL(ge);F.load(it,ke=>{const Ze=new Float32Array(ke.geometry.attributes.position.count*3);for(let Fe=0;Fe<ke.geometry.attributes.position.count;Fe++)Ze[Fe*3]=1,Ze[Fe*3+1]=0,Ze[Fe*3+2]=0;ke.geometry.setAttribute("color",new un(Ze,3)),ke.material.vertexColors=!0,ke.scale.set(.3,.3,.3),URL.revokeObjectURL(it),pt(ke)},void 0,st)}),O=await new Promise((pt,st)=>{const it=URL.createObjectURL(et);F.load(it,ke=>{const Ze=new Float32Array(ke.geometry.attributes.position.count*3);for(let Fe=0;Fe<ke.geometry.attributes.position.count;Fe++)Ze[Fe*3]=0,Ze[Fe*3+1]=1,Ze[Fe*3+2]=0;ke.geometry.setAttribute("color",new un(Ze,3)),ke.material.vertexColors=!0,ke.scale.set(.3,.3,.3),URL.revokeObjectURL(it),pt(ke)},void 0,st)});B.add(je),B.add(O),f=B}catch($){throw console.error("PCD文件加载失败:",$),new Error("无法加载PCD文件")}break;case".urdf":const X=URL.createObjectURL(h),Z=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},de=new Map,Q=new Map,xe=new Map,Pe=async $=>{if(de.has($))return console.log(`从缓存加载: ${$}`),de.get($);try{const ge=await on.axios.get(`${se}/${$}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Ae=new Blob([ge.data],{type:"application/octet-stream;charset=UTF-8"});return G.enableCache&&de.set($,Ae),Ae}catch(ge){throw console.error(`加载文件失败: ${$}`,ge),new Error(`无法加载文件: ${$}`)}},Te=($="default")=>{if(Q.has($))return Q.get($);const ge=new cn({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Yn});return Q.set($,ge),ge},me=$=>{try{$.isBufferGeometry&&$.mergeVertices&&$.mergeVertices(),$.computeVertexNormals&&$.computeVertexNormals(),$.computeBoundingSphere&&$.computeBoundingSphere(),$.deleteAttribute&&$.deleteAttribute("uv2")}catch(ge){console.warn("几何体优化失败,使用原始几何体:",ge)}return $},ae=async($,ge,Ae)=>{const et=`stl_${ge}`;if(xe.has(et)){const st=xe.get(et);return new Nt(st,Te())}const je=await $.arrayBuffer();let pt=new Hi(Ae).parse(je);return pt=me(pt),xe.set(et,pt),new Nt(pt,Te())},j=async($,ge,Ae)=>{const et=`obj_${ge}`;if(de.has(et))return de.get(et).clone();const je=await $.text(),O=new as(Ae),pt=ge.replace(".obj",".mtl");try{const ke=await(await Pe(pt)).text(),Fe=new os(Ae).parse(ke);Fe.preload(),O.setMaterials(Fe)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${pt}`)}const st=O.parse(je);return st.traverse(it=>{it.isMesh&&(it.geometry=me(it.geometry),it.castShadow=!0,it.receiveShadow=!0,it.renderOrder=1)}),de.set(et,st),st},K=($,ge)=>{const Ae=new O0;if(Ae.addLevel($,0),$.geometry){const et=$.geometry.clone(),je=new Nt(et,$.material);Ae.addLevel(je,50)}return Ae};let te=0,ee=0;const pe=[];Z.loadMeshCb=async($,ge,Ae,et,je)=>{const O=$.split("/").pop(),pt=Ae||(()=>{});te++;const st=new Promise(async(it,ke)=>{try{const Ze=await Pe(O);if(!Ze||Ze.size===0)throw new Error(`文件为空: ${O}`);const Fe=O.split(".").pop().toLowerCase();let rt;switch(Fe){case"stl":rt=await ae(Ze,O,ge);break;case"obj":rt=await j(Ze,O,ge);break;default:throw new Error(`不支持的文件格式: ${Fe}`)}G.enableLOD&&rt.isMesh&&(rt=K(rt,O)),pt(rt),ee++,et&&et({loaded:ee,total:te,progress:ee/te}),it(rt)}catch(Ze){console.error(`mesh文件加载失败: ${O}`,Ze);const Fe=new wn;pt(Fe),it(Fe);const rt=new Wi(.1,.1,.1),Xt=new j0({color:16711680,wireframe:!0});return new Nt(rt,Xt)}});pe.push(st)};try{if(!X){ma.value=void 0;break}if(f=await Z.loadAsync(X),console.log(`URDF文件加载完成,等待${te}个mesh文件加载...`),pe.length>0)try{await Promise.allSettled(pe),console.log(`所有mesh文件处理完成,成功加载: ${ee}/${te}`)}catch(Ae){console.warn("部分mesh文件加载失败,但继续显示模型",Ae)}f.traverse(Ae=>{Ae.isMesh&&(Ae.castShadow=!0,Ae.receiveShadow=!0,Ae.renderOrder=1,Ae.material&&(Ae.material.needsUpdate=!0))}),console.time("计算包围盒");const $=new Tn;$.expandByObject(f);const ge=`urdf_${Date.now()}`;f.userData.boundingBox=$.clone(),f.userData.modelId=ge,_0.set(ge,{box:$.clone(),center:$.getCenter(new z),size:$.getSize(new z),maxSize:Math.max(...$.getSize(new z).toArray())}),ma.value=f,console.log("URDF模型加载完成并优化")}catch($){console.error("URDF加载失败:",$),ma.value=void 0}finally{X&&URL.revokeObjectURL(X)}break;default:throw new Error(`不支持的文件格式: ${u}`)}return f};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 f=u[_],p=await d(f.suffix,f.blob,f.mtlBlobs||[],f.meshFiles||[]);p&&(h.add(p),e.value.push(p),g.push(p))}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=He.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(Fn.ssForm,{rowContents:e.value,isRowFlex:!0},null,8,["rowContents"])]),y.createElementVNode("div",k6,[y.createVNode(Fn.ssForm,{rowContents:t.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),H6=Ci._export_sfc(V6,[["__scopeId","data-v-73db0fe7"]]),_u=He.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=He.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:""}),actions:{setTableIndex(s){this.tableIndex=s},setTableShowThree(s){this.tableShowThree=s}}}),Su=He.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=He.cloneDeep(s))==null?void 0:r.optionUrl)==null?void 0:o.menuSelect,t=[];e==null||e.forEach(u=>{});let n="";const i=await en.menuToParent(e);if(i==null||i.forEach(u=>{var h,g,_,f;(u==null?void 0:u.name)===(((f=(_=(g=(h=He.cloneDeep(s))==null?void 0:h.optionUrl)==null?void 0:g.groupSelect)==null?void 0:_[0])==null?void 0:f.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(f=>!(f!=null&&f.id)),_));g==null||g.forEach(_=>{t.push(en.getValueToObjectValue(_,h))})}return t},q6={class:"table-content"},$6={class:"menu-config-wrap"},Y6=["onClick"],K6={key:0,class:"viewport-wrap"},J6=["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(He.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=He.useMenuState(),{importLoading:g,activeMenuPath:_,contentLoading:f}=He.storeToRefs(h),p=bu(He.pinia),x=He.useModelComp(He.pinia),{extraContents:M}=He.storeToRefs(x),b=y.ref([]);y.ref(!1);const N=y.ref("");y.ref();const L=y.ref(!0),P=y.ref(0),I=y.ref(!1),E=y.ref(""),A=y.ref(!1),F=y.ref({label:"查看三维模型"}),B=y.ref(!1),X=y.ref(),Z=y.ref([]),se=y.ref([]),G=y.ref(!1),de=y.ref(),Q=y.ref([]),xe=y.ref([]),Pe=y.ref([]),Te=y.ref(),me=y.ref(),ae=gu(He.pinia),j=y.ref(),K=_u(He.pinia),{selectIndex:te,selectMenu:ee,selectTitle:pe}=He.storeToRefs(K),{selectString:$}=He.storeToRefs(ae),ge=wu.useLoginState(He.pinia),{loginUserInfo:Ae}=He.storeToRefs(ge),et=y.ref(720),je=y.ref(!1),O=y.ref([]),pt=y.ref(),st=y.ref(!0),it=y.ref(null),ke=q=>{O.value=q},Ze=(q,H)=>{pt.value===H?st.value=!1:st.value=!0,pt.value=H==null?void 0:H.changeProp},Fe=y.computed(()=>{var q;return(q=a.value)==null?void 0:q.filter(H=>(H==null?void 0:H.label)!=="操作")}),rt=()=>{A.value=!1},Xt=q=>{o("clickTrigger",q)},k=async q=>{var he,Me,fe,Ne,Se,Ee,T,C,W,Y;const H=q==null?void 0:q.row;if((he=H==null?void 0:H.toString())!=null&&he.includes(".urdf")){de.value=H,c.value=!0;return}let ce=[];if((Me=H==null?void 0:H.toString())!=null&&Me.includes(".stl")||(fe=H==null?void 0:H.toString())!=null&&fe.includes(".STL")||(Ne=H==null?void 0:H.toString())!=null&&Ne.includes(".obj")||(Se=H==null?void 0:H.toString())!=null&&Se.includes(".mtl")){let V,ve=[],we={};if(Array.isArray(H)?V=H:V=H==null?void 0:H.split(","),V==null||V.forEach(_e=>{_e.includes(".mtl")?ve.push(_e):we.blob=we.blob?we.blob+","+_e:_e}),(ve==null?void 0:ve.length)>0&&(we.mtlBlobs=ve),(T=(Ee=Object.values(we))==null?void 0:Ee[0])!=null&&T.includes("http:"))ce.push(we);else{const _e=new Blob([we.blob],{type:"application/octet-stream;charset=UTF-8"});let oe=URL.createObjectURL(_e),ne="";(C=H==null?void 0:H.split("/"))==null||C.forEach((Le,ue)=>{var Ie;ue===((Ie=H==null?void 0:H.split("/"))==null?void 0:Ie.length)-1&&(ne=Le)}),(W=we.blob)!=null&&W.includes(".stl")&&(ne=(ne==null?void 0:ne.replaceAll(">",""))+".urdf"),u.value=[{name:ne,blobUrl:oe}],m.value=!0}}else{const V=await axios.get(H,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ve=new Blob([V.data],{type:"application/octet-stream;charset=UTF-8"});let we=URL.createObjectURL(ve),_e="";(Y=H==null?void 0:H.split("/"))==null||Y.forEach((oe,ne)=>{var Le;ne===((Le=H==null?void 0:H.split("/"))==null?void 0:Le.length)-1&&(_e=oe)}),u.value=[{name:_e,blobUrl:we}],m.value=!0}(ce==null?void 0:ce.length)>0&&n.setBlobUrls(ce)},R=q=>{var he,Me,fe,Ne;const H=(Ne=(he=q==null?void 0:q.url)==null?void 0:he.split("."))==null?void 0:Ne[((fe=(Me=q==null?void 0:q.url)==null?void 0:Me.split("."))==null?void 0:fe.length)-1];return(q==null?void 0:q.name)+"."+H},le=async q=>{const H=await Fn.downloadAvatarApi({url:q==null?void 0:q.url}),ce=URL.createObjectURL(H.data),Me={name:R(q),blobUrl:ce};u.value=[Me],m.value=!0},Ce=async q=>{const H=await Fn.downloadAvatarApi({url:q==null?void 0:q.url}),ce=URL.createObjectURL(H.data),Me={name:R(q),blobUrl:ce},fe=document.createElement("a");fe.href=Me.blobUrl,fe.download=Me.name,fe.style.display="none",document.body.appendChild(fe),fe.click(),setTimeout(()=>{document.body.removeChild(fe)},100)},Ue=(q,H)=>{if(Object.values(H).length!==0)return Object.values(H).find(ce=>{var he,Me,fe;return((he=ce==null?void 0:ce.toString())==null?void 0:he.includes(".txt"))||((Me=ce==null?void 0:ce.toString())==null?void 0:Me.includes(".cpt"))||((fe=ce==null?void 0:ce.toString())==null?void 0:fe.includes(".obj"))})?[...q,F.value]:q},be=q=>{var Me;$.value===""?q==null||q[0]:(q==null?void 0:q.find(fe=>(fe==null?void 0:fe.selectLabel)==="("+$.value+")"))??(q==null||q.find(fe=>!(fe!=null&&fe.selectLabel)));let H=q;(Me=a.value)!=null&&Me.find(fe=>fe.prop==="index");let ce=Te.value;const he=[];return H==null||H.forEach((fe,Ne)=>{var Ee;let Se={};if(Array.isArray(fe)){let T=[];fe==null||fe.filter(C=>!(C!=null&&C.id)).forEach((C,W)=>{var Y,V,ve,we,_e;if((Y=ce==null?void 0:ce[W])!=null&&Y.prop&&!Array.isArray(C)){let oe={};oe[ce[W].column]=C,M!=null&&M.value&&((V=M==null?void 0:M.value)==null?void 0:V.length)>0&&((ve=M==null?void 0:M.value)!=null&&ve.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(oe)))&&(T=(we=M==null?void 0:M.value)==null?void 0:we.find(ne=>JSON.stringify(ne==null?void 0:ne[0])===JSON.stringify(oe))),T&&T.length>0?Se[ce[W].prop]=T!=null&&T.find(ne=>{var Le;return((Le=Object.keys(ne))==null?void 0:Le[0])===ce[W].column})?(_e=T==null?void 0:T.find(ne=>{var Le;return((Le=Object.keys(ne))==null?void 0:Le[0])===ce[W].column}))==null?void 0:_e[ce[W].column]:C:Se[ce[W].prop]=C}})}else Se=fe;Array.isArray(fe)&&fe.some(T=>T==null?void 0:T.id)?he.push(Object.assign(Se,{id:(Ee=fe==null?void 0:fe.find(T=>T.id))==null?void 0:Ee.id})):Se.id?he.push(Se):he.push(Object.assign(Se,{id:Ne}))}),he},yt=async q=>{var Me,fe,Ne,Se,Ee;let H={};for(let T in q)q[T]!==""&&(H["tableData."+T]=q[T]);const ce=await en.filterContents({type:"data",tableId:r==null?void 0:r.index,systemKey:sessionStorage.getItem("systemKey"),pageKey:_.value},H),he=(Ne=(fe=(Me=He.cloneDeep(ce))==null?void 0:Me.data)==null?void 0:fe.result)==null?void 0:Ne.map(T=>{var W;let C=[];return C.push({id:T.id}),C.push((W=T==null?void 0:T.value)==null?void 0:W.tableData),C});b.value=be(en.getTableContents(he,(Ee=(Se=He.cloneDeep(a.value))==null?void 0:Se.map(T=>T.label))==null?void 0:Ee.filter(T=>T!=="操作")))},Ke=async q=>{var Se,Ee,T,C,W,Y,V,ve,we,_e,oe,ne,Le,ue,Ie,re,ct,Re,Xe,We;const H=await on.getInsofDataApi({keyLikes:{pageKey:`loading${(Se=Ae.value)==null?void 0:Se.account}`,systemKey:sessionStorage.getItem("systemKey")}}),ce=await on.getInsofDataApi({keyLikes:{pageKey:`updateLoading${(Ee=Ae.value)==null?void 0:Ee.account}`,systemKey:sessionStorage.getItem("systemKey")}});let he=(C=(T=H==null?void 0:H.data)==null?void 0:T.result)==null?void 0:C.map(ht=>ht==null?void 0:ht.id);const Me=(Y=(W=ce==null?void 0:ce.data)==null?void 0:W.result)==null?void 0:Y.map(ht=>ht==null?void 0:ht.id);he=[...He.cloneDeep(he),...Me],(he==null?void 0:he.length)>0&&await on.batchDeleteInsofDataApi({ids:he});const fe=(V=He.cloneDeep(a.value))==null?void 0:V.filter(ht=>ht==null?void 0:ht.isRoute);if((fe==null?void 0:fe.length)>0){let ht=(ve=fe==null?void 0:fe[0])==null?void 0:ve.prop,at=He.cloneDeep(_).value+"/"+(q==null?void 0:q[ht]),wt=He.cloneDeep(_).value,Mt=await en.getItemData(at,sessionStorage.getItem("systemKey"),"");if((Mt==null?void 0:Mt.length)>0)await en.loadingConstruct(at,at+`/updateLoading${(we=Ae.value)==null?void 0:we.account}`),x.setRouteToChildPath(wt),h.setActiveMenuPath(at+`/updateLoading${(_e=Ae.value)==null?void 0:_e.account}`);else{let Pt=(oe=fe==null?void 0:fe[0])==null?void 0:oe.prop,jt=He.cloneDeep(_).value+"/"+(q==null?void 0:q[Pt]),Lt=He.cloneDeep(_).value;await en.getItemData(Lt+"/",sessionStorage.getItem("systemKey"),""),await en.loadingConstruct(Lt+"/",jt),await en.loadingConstruct(jt,jt+`/updateLoading${(ne=Ae.value)==null?void 0:ne.account}`),x.setRouteToChildPath(Lt),h.setActiveMenuPath(jt+`/updateLoading${(Le=Ae.value)==null?void 0:Le.account}`)}}let Ne=await en.getItemData(_.value,sessionStorage.getItem("systemKey"),q.id);if(Ne=Ne==null?void 0:Ne.filter(ht=>ht.comp!=="methodButton"),Ne&&Ne.length>0){const ht=!Array.isArray(pe.value)&&((ue=pe.value)==null?void 0:ue.key)!=="main"?[]:pe.value;ht.push({key:ee.value===""?(Ie=q==null?void 0:q.id)==null?void 0:Ie.toString():ee.value+"-"+((re=q==null?void 0:q.id)==null?void 0:re.toString()),value:q[(ct=Object.keys(q))==null?void 0:ct.filter(at=>at!=="index"&&at!=="id")[0]]}),K.setSelectMenu(ee.value===""?(Re=q==null?void 0:q.id)==null?void 0:Re.toString():ee.value+"-"+((Xe=q==null?void 0:q.id)==null?void 0:Xe.toString())),K.setSelectTitle(ht),K.setSelectIndex((We=q==null?void 0:q.id)==null?void 0:We.toString()),o("pageChange",Ne)}},mt=q=>{var H;(H=He.cloneDeep(r.itemData))==null||H.map(ce=>((ce==null?void 0:ce.key)==="tableContents"&&(ce.contents=q),ce))},xt=async(q,H,ce,he)=>{var T,C,W,Y,V,ve,we,_e,oe,ne,Le,ue,Ie;const Me=await on.getInsofDataApi({keyLikes:{pageKey:`loading${(T=Ae.value)==null?void 0:T.account}`,systemKey:sessionStorage.getItem("systemKey")}}),fe=await on.getInsofDataApi({keyLikes:{pageKey:`updateLoading${(C=Ae.value)==null?void 0:C.account}`,systemKey:sessionStorage.getItem("systemKey")}});let Ne=(Y=(W=Me==null?void 0:Me.data)==null?void 0:W.result)==null?void 0:Y.map(re=>re==null?void 0:re.id);const Se=(ve=(V=fe==null?void 0:fe.data)==null?void 0:V.result)==null?void 0:ve.map(re=>re==null?void 0:re.id);if(Ne=[...He.cloneDeep(Ne),...Se],(Ne==null?void 0:Ne.length)>0&&await on.batchDeleteInsofDataApi({ids:Ne}),(he==null?void 0:he.data)==="查看"&&(q!=null&&q.every(re=>(re==null?void 0:re.url)&&(re==null?void 0:re.name)))){let re=He.cloneDeep(q);re=await((we=He.cloneDeep(re))==null?void 0:we.map(async Re=>{var ht,at,wt,Mt;const Xe=await Fn.downloadAvatarApi({url:Re==null?void 0:Re.url});let We=URL.createObjectURL(Xe.data);return{name:(Re==null?void 0:Re.name)+"."+((Mt=(ht=Re==null?void 0:Re.url)==null?void 0:ht.split("."))==null?void 0:Mt[((wt=(at=Re==null?void 0:Re.url)==null?void 0:at.split("."))==null?void 0:wt.length)-1]),blobUrl:We}}));let ct=await Promise.all(re);u.value=ct,m.value=!0}o("contentClick",q,H,ce,{id:r==null?void 0:r.index,type:"table"});const Ee=He.cloneDeep(a.value);if((he==null?void 0:he.isMainKey)===!0&&(Ee==null?void 0:Ee.length)>0){(_e=Ee==null?void 0:Ee[0])==null||_e.prop;let re=He.cloneDeep(_).value+"/"+(he==null?void 0:he.data),ct=He.cloneDeep(_).value,Re=await en.getItemData(re,sessionStorage.getItem("systemKey"),"");if((Re==null?void 0:Re.length)>0)await en.loadingConstruct(re,re+`/updateLoading${(oe=Ae.value)==null?void 0:oe.account}`),x.setRouteToChildPath(ct),h.setActiveMenuPath(re+`/updateLoading${(ne=Ae.value)==null?void 0:ne.account}`);else{(Le=Ee==null?void 0:Ee[0])==null||Le.prop;let Xe=He.cloneDeep(_).value+"/"+(he==null?void 0:he.data),We=He.cloneDeep(_).value;await en.getItemData(We+"/",sessionStorage.getItem("systemKey"),""),await en.loadingConstruct(We+"/",Xe),await en.loadingConstruct(Xe,Xe+`/updateLoading${(ue=Ae.value)==null?void 0:ue.account}`),x.setRouteToChildPath(We),h.setActiveMenuPath(Xe+`/updateLoading${(Ie=Ae.value)==null?void 0:Ie.account}`)}}},ze=()=>{m.value=!1},ot=q=>{o("rowClick",q)};y.watch(()=>r.changedContent,()=>{var ce,he;if(!r.changedContent)return;let q=(ce=b.value)==null?void 0:ce.map(Me=>{var fe;return Me.id===((fe=r.changedContent)==null?void 0:fe.id)&&(Me={...r.changedContent,id:r.changedContent.newId?r.changedContent.newId:r.changedContent.id},delete Me.newId),Me});const H=(he=r.itemData)==null?void 0:he.map(Me=>((Me==null?void 0:Me.key)==="tableContents"&&(Me.contents=q),Me));b.value=q,o("contentChange",{contents:H,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 Tt=()=>{},Et=async()=>{const q=_.value,H=sessionStorage.getItem("systemKey"),ce=await en.getItemData(q,H,""),he=ce==null?void 0:ce.find(Se=>(Se==null?void 0:Se.name)==="方法明细"),Me=(he==null?void 0:he.compData)||[],fe=Me==null?void 0:Me.find(Se=>(Se==null?void 0:Se.key)==="formContent");return fe==null?void 0:fe.contents},$e=async(q,H)=>{const ce=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken");return await axios.post(q,{inputData:H},{headers:{Authorization:ce}}).catch(Me=>(h.setImportLoading(!1),Promise.reject(Me)))},Ct=async(q,H,ce)=>{var _e;h.setImportLoading(!0);const he=await Et().catch(oe=>(h.setImportLoading(!1),Promise.reject(oe))),Me=he==null?void 0:he.find(oe=>oe==null?void 0:oe.isMain),fe=Me==null?void 0:Me.value;if(!fe){console.log("未搜索到isMain, 缺少算法执行接口"),h.setImportLoading(!1);return}const Ne=a.value||[],Se=Ne.find(oe=>(oe==null?void 0:oe.label)==="输入数据"),Ee=Se==null?void 0:Se.prop,T=H==null?void 0:H[Ee],C=await $e(fe,T).catch(oe=>(h.setImportLoading(!1),Promise.reject(oe))),W=(_e=C==null?void 0:C.data)==null?void 0:_e.result,Y=Ne.find(oe=>(oe==null?void 0:oe.label)==="输出数据"),V=Y==null?void 0:Y.prop,ve=b.value,we=ve==null?void 0:ve.find((oe,ne)=>(oe==null?void 0:oe.id)==(H==null?void 0:H.id));we[V]=W,E.value="编辑",me.value=we,N.value=H==null?void 0:H.id,Dt(!0),h.setImportLoading(!1)},J=async(q,H,ce)=>{var he,Me,fe,Ne,Se,Ee,T,C,W,Y,V,ve,we,_e;if(N.value="",G.value=!0,L.value=!0,o("onButtonClick",q,H),q==="删除"){b.value=(he=He.cloneDeep(b.value))==null?void 0:he.filter(ne=>(ne==null?void 0:ne.id)!==(H==null?void 0:H.id));const oe=G6(j.value,ee.value,H==null?void 0:H.id);mt(oe),o("change",{content:b.value,singleContent:H,index:r==null?void 0:r.index,type:"delete",buttonName:q,column:a.value})}else if(q==="批量删除"){if(((Me=O.value)==null?void 0:Me.length)===0)return on.ElMessage.warning("请先勾选操作的数据");o("change",{content:b.value,singleContent:null,selectItems:O.value,index:r==null?void 0:r.index,type:"batchDelete",buttonName:q,column:a.value})}else if(q==="复制新增"){E.value="新增";const oe=He.cloneDeep(H),ne=(fe=a.value)==null?void 0:fe.find(Ie=>Ie==null?void 0:Ie.isMainKey),Le=ne||((Ne=a.value)==null?void 0:Ne[0]),ue=(Se=xe.value)==null?void 0:Se.find(Ie=>(Ie==null?void 0:Ie.label)==="新建");Ge(!0,ue,{data:oe,firstCol:Le})}else if(q==="新增")E.value="新增",lt(""),A.value=!0;else if(q==="编辑")E.value="编辑",lt(H),A.value=!0;else if(q==="查看")E.value="查看",lt(H),G.value=!1,L.value=!1,A.value=!0;else if(q==="查看三维模型"){const oe={};for(let Le in H)Le!=="id"&&(oe[Le]=H[Le]);let ne=(Ee=Object.values(oe))==null?void 0:Ee[1];p.setTableShowThree(ne)}else if(((T=ce==null?void 0:ce.extra)==null?void 0:T.type)==="modelExample")E.value=q,B.value=!0;else if(q==="新建"){const oe=await on.getInsofDataApi({keyLikes:{pageKey:`loading${(C=Ae.value)==null?void 0:C.account}`,systemKey:sessionStorage.getItem("systemKey")}}),ne=await on.getInsofDataApi({keyLikes:{pageKey:`updateLoading${(W=Ae.value)==null?void 0:W.account}`,systemKey:sessionStorage.getItem("systemKey")}});let Le=(V=(Y=oe==null?void 0:oe.data)==null?void 0:Y.result)==null?void 0:V.map(re=>re==null?void 0:re.id);const ue=(we=(ve=ne==null?void 0:ne.data)==null?void 0:ve.result)==null?void 0:we.map(re=>re==null?void 0:re.id);Le=[...He.cloneDeep(Le),...ue],(Le==null?void 0:Le.length)>0&&await on.batchDeleteInsofDataApi({ids:Le});const Ie=(_e=xe.value)==null?void 0:_e.find(re=>(re==null?void 0:re.label)==="新建");Ge(!1,Ie)}else if(q==="修改模板"){let oe=He.cloneDeep(_).value;x.setRouteToChildPath(oe),h.setActiveMenuPath(oe+"/")}else q==="执行"&&Ct(q,H)},tt=async q=>{var ce,he,Me,fe,Ne,Se;const H=await on.getInsofDataApi({key:{pageKey:q,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((ce=H==null?void 0:H.data)==null?void 0:ce.code)===200)return Array.isArray((he=H==null?void 0:H.data)==null?void 0:he.result)&&((fe=(Me=H==null?void 0:H.data)==null?void 0:Me.result)==null?void 0:fe.length)>0?(Se=(Ne=H==null?void 0:H.data)==null?void 0:Ne.result)==null?void 0:Se.map(Ee=>{var T;return{id:Ee==null?void 0:Ee.id,...(T=Ee==null?void 0:Ee.value)==null?void 0:T.pageData}}):[]},Be=(q,H,ce,he)=>{var Me;o("contentChange",{contents:(Me=q==null?void 0:q.compData)==null?void 0:Me.map(fe=>{var Ne;return(fe==null?void 0:fe.key)==="formContent"?{...fe,contents:(Ne=fe==null?void 0:fe.contents)==null?void 0:Ne.map(Se=>(Se==null?void 0:Se.key)===H?{...Se,value:ce}:Se)}:fe}),index:q==null?void 0:q.id}),h.setActiveMenuPath(""),h.setActiveMenuPath(he)},ut=(q,H)=>{let ce=q==null?void 0:q[H==null?void 0:H.prop],he=1;if(b.value.some(Me=>(Me==null?void 0:Me[H==null?void 0:H.prop])===ce)){const Me=ce;for(;b.value.some(fe=>(fe==null?void 0:fe[H==null?void 0:H.prop])===`${Me}(${he})`);)he++;ce=`${Me}(${he})`}return ce},Ge=async(q,H,ce)=>{var Ne,Se,Ee,T,C;let he,Me;const fe=ut(ce==null?void 0:ce.data,ce==null?void 0:ce.firstCol);if(q?(he=He.cloneDeep(_).value+"/"+((Ee=ce==null?void 0:ce.data)==null?void 0:Ee[(Se=ce==null?void 0:ce.firstCol)==null?void 0:Se.prop]),Me=He.cloneDeep(_).value+"/"+fe):(he=He.cloneDeep(_).value+"/",Me=He.cloneDeep(he)+`loading${(Ne=Ae.value)==null?void 0:Ne.account}`),H){const W=await en.getItemData(Me,sessionStorage.getItem("systemKey"),"");if((W==null?void 0:W.length)>0)if(q){const Y=W==null?void 0:W.find(V=>{var ve;return((ve=V==null?void 0:V.comp)==null?void 0:ve.toUpperCase())==="FORM"});Y&&Be(Y,(T=ce==null?void 0:ce.firstCol)==null?void 0:T.label,fe,_.value)}else x.setRouteToChildPath(He.cloneDeep(_).value),h.setActiveMenuPath(Me);else if(await en.loadingConstruct(he,Me),q){const Y=await tt(Me);if((Y==null?void 0:Y.length)>0){const V=Y==null?void 0:Y.find(ve=>{var we;return((we=ve==null?void 0:ve.comp)==null?void 0:we.toUpperCase())==="FORM"});V&&Be(V,(C=ce==null?void 0:ce.firstCol)==null?void 0:C.label,fe,_.value)}}else x.setRouteToChildPath(He.cloneDeep(_).value),h.setActiveMenuPath(Me)}else q?(N.value="",me.value=ce==null?void 0:ce.data,Dt(!0,ce==null?void 0:ce.firstCol,fe)):(x.setRouteToChildPath(He.cloneDeep(_).value),h.setActiveMenuPath(Me))},De=()=>{c.value=!1,de.value=null},lt=q=>{var Me,fe,Ne,Se,Ee,T;const H=[];let ce=[];for(let C in q)Array.isArray(q==null?void 0:q[C])&&ce.push(C);l.value=He.cloneDeep(a.value),(fe=en.getColumnChild((Me=He.cloneDeep(a.value))==null?void 0:Me.filter(C=>(C==null?void 0:C.label)!=="操作")))==null||fe.forEach((C,W)=>{var Y;ce.find(V=>V===(C==null?void 0:C.prop))||(C!=null&&C.formType&&((Y=C==null?void 0:C.formType)==null?void 0:Y.toUpperCase())==="SELECT"?H.push({label:(C==null?void 0:C.label)??"",name:(C==null?void 0:C.prop)??"t"+W,type:!(C!=null&&C.formType)||(C==null?void 0:C.formType)===""?"Input":C==null?void 0:C.formType,value:(q==null?void 0:q[C==null?void 0:C.prop])??(C==null?void 0:C.value)??"",id:(C==null?void 0:C.id)??W,contents:(C==null?void 0:C.options)??[],width:1,isFormColHidden:C==null?void 0:C.isFormColHidden,optionUrl:{groupSelect:C==null?void 0:C.groupSelect,menuSelect:C==null?void 0:C.formMenuSelect,type:"Select",selectRelateType:C==null?void 0:C.selectRelateType}}):H.push({label:(C==null?void 0:C.label)??"",name:(C==null?void 0:C.prop)??"t"+W,type:!(C!=null&&C.formType)||(C==null?void 0:C.formType)===""?"Input":C==null?void 0:C.formType,value:(q==null?void 0:q[C==null?void 0:C.prop])??(C==null?void 0:C.value)??"",id:(C==null?void 0:C.id)??W,contents:(C==null?void 0:C.options)??[],width:1,isFormColHidden:C==null?void 0:C.isFormColHidden}))}),q===""||!q||(N.value=(q==null?void 0:q.id)??"");let he=en.getColumnChild((Ne=He.cloneDeep(a.value))==null?void 0:Ne.filter(C=>(C==null?void 0:C.label)!=="操作"));Z.value&&((Se=Z.value)==null?void 0:Se.length)>0&&(Z.value=(Ee=He.cloneDeep(Z).value)==null?void 0:Ee.map(C=>{var Y;let W=(Y=he==null?void 0:he.find(V=>(V==null?void 0:V.label)===(C==null?void 0:C.label)))==null?void 0:Y.prop;return W&&(C.value=q[W]),C})),Pe.value=Z.value&&((T=Z.value)==null?void 0:T.length)>0?en.getTableFormToForm(Z.value):H},Rt=async()=>{var H;await y.nextTick();const q=(H=i.value)==null?void 0:H.$el;q&&en.Sortable.create(q,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ce=>{var Ne;const{oldIndex:he,newIndex:Me}=ce;if(he===Me)return;const fe=Fe.value.splice(he,1)[0];Fe.value.splice(Me,0,fe),a.value=(Ne=a.value)==null?void 0:Ne.slice().sort((Se,Ee)=>{var T,C;return Se.label==="操作"?1:Ee.label==="操作"?-1:((T=Fe.value)==null?void 0:T.indexOf(Se))-((C=Fe.value)==null?void 0:C.indexOf(Ee))})}})};y.onMounted(()=>{X.value=window.innerWidth-240*2});const $t=()=>{y.nextTick(()=>{Rt()})},Dt=(q=!0,H,ce)=>{var Ne;console.log(456,q,me.value,N.value);let he=en.getColumnChild((Ne=He.cloneDeep(a.value))==null?void 0:Ne.filter(Se=>(Se==null?void 0:Se.label)!=="操作")),Me,fe=He.cloneDeep(b.value);if(!me.value){A.value=!1;return}if(N.value===""){P.value++;let Se;H&&ce?Se={id:P.value,[H==null?void 0:H.prop]:ce}:Se={id:P.value},fe.push(Object.assign(me.value,Se)),Me=Object.assign(me.value,Se)}else fe=fe==null?void 0:fe.map(Se=>{var Ee,T;if((Se==null?void 0:Se.id)===N.value){let C={};for(let W in Se){let Y=(Ee=he==null?void 0:he.find(V=>(V==null?void 0:V.prop)===W))==null?void 0:Ee.label;Y?C[W]=(T=me.value)==null?void 0:T[Y]:C[W]=Se[W]}Se=Object.assign(C,me.value),Me=Se}return Se});if(b.value=fe,q){const Se=X6(j.value,ee.value,fe);mt(Se),A.value=!1,me.value=void 0,x.setCacheUpdatingData({content:Se,singleContent:Me,index:r==null?void 0:r.index,buttonName:E.value,column:a.value}),it.value={content:Se,singleContent:Me,index:r==null?void 0:r.index,buttonName:E.value,column:a.value},o("change",it.value)}},Sn=async(q,H,ce)=>{var T,C,W,Y,V,ve,we,_e,oe,ne,Le;pt.value=ce==null?void 0:ce.prop;const he=He.cloneDeep(r.itemData),Me=he==null?void 0:he.map(ue=>{var Ie;return(ue==null?void 0:ue.key)==="header"&&((Ie=ue.contents)==null||Ie.map((re,ct)=>{var Re,Xe,We,ht,at,wt,Mt,Pt,jt,Lt,Yt,Ht,Kt,Ve,Jt,kt,gt,Gn,S;return re.type=re!=null&&re.type?re.type:(ht=(We=(Xe=(Re=re==null?void 0:re.key)==null?void 0:Re.split("$"))==null?void 0:Xe[1])==null?void 0:We.split("("))!=null&&ht[0]?(wt=(at=en.FormType)==null?void 0:at.find(v=>{var w,D,U,ie;return(v==null?void 0:v.key)===((ie=(U=(D=(w=re==null?void 0:re.key)==null?void 0:w.split("$"))==null?void 0:D[1])==null?void 0:U.split("("))==null?void 0:ie[0])}))==null?void 0:wt.value:"Input",re.options=re!=null&&re.options?re.options:((jt=(Pt=(Mt=re==null?void 0:re.key)==null?void 0:Mt.split("$"))==null?void 0:Pt[1])==null?void 0:jt.length)>0?(Kt=(Ht=Ho((Yt=(Lt=re==null?void 0:re.key)==null?void 0:Lt.split("$"))==null?void 0:Yt[1]))==null?void 0:Ht.split(","))==null?void 0:Kt.map(v=>({label:v,value:v})):[],(Ve=re==null?void 0:re.key)!=null&&Ve.includes("$")&&(re.key=(kt=(Jt=re==null?void 0:re.key)==null?void 0:Jt.split("$"))==null?void 0:kt[0]),re.value=(gt=Object.values(H))==null?void 0:gt[ct],re.optionUrl=re!=null&&re.formMenuSelect&&((Gn=re==null?void 0:re.formMenuSelect)==null?void 0:Gn.length)>0?{groupSelect:(S=re==null?void 0:re.groupSelect)==null?void 0:S.split(/[::]/).map(v=>v.trim()),menuSelect:re==null?void 0:re.formMenuSelect,selectRelateType:"",type:(re==null?void 0:re.formType)??(re!=null&&re.groupSelect?"Select":"")}:null,re})),ue});let fe=He.cloneDeep(Pe.value),Ne=(C=(T=He.cloneDeep(Me))==null?void 0:T.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:C.contents;fe=fe==null?void 0:fe.map(ue=>{var Ie;return ue.value=(Ie=Ne==null?void 0:Ne.find((re,ct)=>ct===(ue==null?void 0:ue.id)))==null?void 0:Ie.value,ue});let Se="",Ee=(V=(Y=(W=He.cloneDeep(Me))==null?void 0:W.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:Y.contents)==null?void 0:V.find((ue,Ie)=>{var re,ct,Re;return(ue==null?void 0:ue.label)===pt.value||(Ie==null?void 0:Ie.toString())===((Re=(ct=(re=pt.value)==null?void 0:re.split("a"))==null?void 0:ct[1])==null?void 0:Re.toString())});if((_e=(we=(ve=He.cloneDeep(Me))==null?void 0:ve.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:we.contents)==null||_e.forEach(ue=>{var Ie,re,ct,Re,Xe;Se===""&&((ct=(re=(Ie=ue==null?void 0:ue.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:re[1])!=null&&ct.includes("["))&&(Se=(Xe=(Re=ue==null?void 0:ue.optionUrl)==null?void 0:Re.groupSelect)==null?void 0:Xe[1])}),(oe=Ee==null?void 0:Ee.optionUrl)!=null&&oe.menuSelect){let ue=await kl(Ee),Ie;if(ue==null||ue.forEach(re=>{var ct,Re,Xe,We,ht,at,wt,Mt,Pt,jt;Se===((Re=(ct=Ee==null?void 0:Ee.optionUrl)==null?void 0:ct.groupSelect)==null?void 0:Re[1])&&((ht=(We=(Xe=Ee==null?void 0:Ee.optionUrl)==null?void 0:Xe.groupSelect)==null?void 0:We[1])!=null&&ht.includes("["))&&((jt=He.cloneDeep(re))==null?void 0:jt[(Pt=(Mt=(wt=(at=Ee==null?void 0:Ee.optionUrl)==null?void 0:at.groupSelect)==null?void 0:wt[1])==null?void 0:Mt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")])===(Ee==null?void 0:Ee.value)&&(Ie=re)}),Ie){let re=He.cloneDeep(fe);re=re==null?void 0:re.map(Re=>{var Xe,We,ht,at,wt,Mt,Pt,jt,Lt,Yt,Ht;return(Ie!=null&&Ie[Re==null?void 0:Re.label]||Ie!=null&&Ie[(at=(ht=(We=(Xe=Re==null?void 0:Re.optionUrl)==null?void 0:Xe.groupSelect)==null?void 0:We[1])==null?void 0:ht.replaceAll("[",""))==null?void 0:at.replaceAll("]","")])&&((Pt=(Mt=(wt=Re==null?void 0:Re.optionUrl)==null?void 0:wt.groupSelect)==null?void 0:Mt[1])!=null&&Pt.includes("["))&&(Re.value=(Ie==null?void 0:Ie[Re==null?void 0:Re.label])||(Ie==null?void 0:Ie[(Ht=(Yt=(Lt=(jt=Re==null?void 0:Re.optionUrl)==null?void 0:jt.groupSelect)==null?void 0:Lt[1])==null?void 0:Yt.replaceAll("[",""))==null?void 0:Ht.replaceAll("]","")])),Re}),b.value=(ne=He.cloneDeep(b.value))==null?void 0:ne.map(Re=>{if((Re==null?void 0:Re.id)===(H==null?void 0:H.id)){const Xe={};return re==null||re.forEach(We=>{Xe[We.name]=We.value}),Xe.id=Re==null?void 0:Re.id,Xe}return Re});let ct=He.cloneDeep(re);ct=ct==null?void 0:ct.map(Re=>{var Xe,We,ht,at;return(We=(Xe=Re==null?void 0:Re.optionUrl)==null?void 0:Xe.menuSelect)!=null&&We.some(wt=>wt==null?void 0:wt.includes)&&(Re.optionUrl.menuSelect=(at=(ht=Re==null?void 0:Re.optionUrl)==null?void 0:ht.menuSelect)==null?void 0:at.map(wt=>{var Mt,Pt,jt,Lt;if(wt!=null&&wt.includes("[")){let Yt=(Pt=(Mt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Mt.split(":"))==null?void 0:Pt[1];wt=(Lt=(jt=He.cloneDeep(re))==null?void 0:jt.find(Ht=>(Ht==null?void 0:Ht.label)===Yt))==null?void 0:Lt.value}return wt})),Re}),b.value=(Le=He.cloneDeep(b.value))==null?void 0:Le.map(Re=>{if((Re==null?void 0:Re.id)===(H==null?void 0:H.id)){const Xe={};return ct==null||ct.forEach(We=>{Xe[We.name]=We.value}),Xe.id=Re==null?void 0:Re.id,Xe}return Re})}}},In=async q=>{var Se,Ee,T,C,W,Y,V,ve,we;if(!q)return;me.value=q,o("onFormChange",q);const H=He.cloneDeep(r.itemData),ce=H==null?void 0:H.map(_e=>{var oe;return(_e==null?void 0:_e.key)==="header"&&((oe=_e.contents)==null||oe.map((ne,Le)=>{var ue,Ie,re,ct,Re,Xe,We,ht,at,wt,Mt,Pt,jt,Lt,Yt,Ht,Kt,Ve,Jt;return ne.type=ne!=null&&ne.type?ne.type:(ct=(re=(Ie=(ue=ne==null?void 0:ne.key)==null?void 0:ue.split("$"))==null?void 0:Ie[1])==null?void 0:re.split("("))!=null&&ct[0]?(Xe=(Re=en.FormType)==null?void 0:Re.find(kt=>{var gt,Gn,S,v;return(kt==null?void 0:kt.key)===((v=(S=(Gn=(gt=ne==null?void 0:ne.key)==null?void 0:gt.split("$"))==null?void 0:Gn[1])==null?void 0:S.split("("))==null?void 0:v[0])}))==null?void 0:Xe.value:"Input",ne.options=ne!=null&&ne.options?ne.options:((at=(ht=(We=ne==null?void 0:ne.key)==null?void 0:We.split("$"))==null?void 0:ht[1])==null?void 0:at.length)>0?(jt=(Pt=Ho((Mt=(wt=ne==null?void 0:ne.key)==null?void 0:wt.split("$"))==null?void 0:Mt[1]))==null?void 0:Pt.split(","))==null?void 0:jt.map(kt=>({label:kt,value:kt})):[],(Lt=ne==null?void 0:ne.key)!=null&&Lt.includes("$")&&(ne.key=(Ht=(Yt=ne==null?void 0:ne.key)==null?void 0:Yt.split("$"))==null?void 0:Ht[0]),ne.value=(Kt=Object.values(q))==null?void 0:Kt[Le],ne.optionUrl=ne!=null&&ne.formMenuSelect&&((Ve=ne==null?void 0:ne.formMenuSelect)==null?void 0:Ve.length)>0?{groupSelect:(Jt=ne==null?void 0:ne.groupSelect)==null?void 0:Jt.split(/[::]/).map(kt=>kt.trim()),menuSelect:ne==null?void 0:ne.formMenuSelect,selectRelateType:"",type:(ne==null?void 0:ne.formType)??(ne!=null&&ne.groupSelect?"Select":"")}:null,ne})),_e});let he=He.cloneDeep(Pe.value),Me=(Ee=(Se=He.cloneDeep(ce))==null?void 0:Se.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:Ee.contents;if(he=he==null?void 0:he.map(_e=>{var oe;return _e.value=(oe=Me==null?void 0:Me.find((ne,Le)=>Le===(_e==null?void 0:_e.id)))==null?void 0:oe.value,_e}),!st.value)return;let fe="",Ne=(W=(C=(T=He.cloneDeep(ce))==null?void 0:T.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:C.contents)==null?void 0:W.find((_e,oe)=>{var ne,Le;return(_e==null?void 0:_e.label)===pt.value||(oe==null?void 0:oe.toString())===((Le=(ne=pt.value)==null?void 0:ne.split("a"))==null?void 0:Le[1].toString())});if((ve=(V=(Y=He.cloneDeep(ce))==null?void 0:Y.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:V.contents)==null||ve.forEach(_e=>{var oe,ne,Le,ue,Ie;fe===""&&((Le=(ne=(oe=_e==null?void 0:_e.optionUrl)==null?void 0:oe.groupSelect)==null?void 0:ne[1])!=null&&Le.includes("["))&&(fe=(Ie=(ue=_e==null?void 0:_e.optionUrl)==null?void 0:ue.groupSelect)==null?void 0:Ie[1])}),(we=Ne==null?void 0:Ne.optionUrl)!=null&&we.menuSelect&&st.value){let _e=await kl(Ne),oe;if(_e==null||_e.forEach(ne=>{var Le,ue,Ie,re,ct,Re,Xe,We,ht,at;fe===((ue=(Le=Ne==null?void 0:Ne.optionUrl)==null?void 0:Le.groupSelect)==null?void 0:ue[1])&&((ct=(re=(Ie=Ne==null?void 0:Ne.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:re[1])!=null&&ct.includes("["))&&((at=He.cloneDeep(ne))==null?void 0:at[(ht=(We=(Xe=(Re=Ne==null?void 0:Ne.optionUrl)==null?void 0:Re.groupSelect)==null?void 0:Xe[1])==null?void 0:We.replaceAll("[",""))==null?void 0:ht.replaceAll("]","")])===(Ne==null?void 0:Ne.value)&&(oe=ne)}),oe){let ne=He.cloneDeep(he);ne=ne==null?void 0:ne.map(ue=>{var Ie,re,ct,Re,Xe,We,ht,at,wt,Mt,Pt;return(oe!=null&&oe[ue==null?void 0:ue.label]||oe!=null&&oe[(Re=(ct=(re=(Ie=ue==null?void 0:ue.optionUrl)==null?void 0:Ie.groupSelect)==null?void 0:re[1])==null?void 0:ct.replaceAll("[",""))==null?void 0:Re.replaceAll("]","")])&&((ht=(We=(Xe=ue==null?void 0:ue.optionUrl)==null?void 0:Xe.groupSelect)==null?void 0:We[1])!=null&&ht.includes("["))&&(ue.value=(oe==null?void 0:oe[ue==null?void 0:ue.label])||(oe==null?void 0:oe[(Pt=(Mt=(wt=(at=ue==null?void 0:ue.optionUrl)==null?void 0:at.groupSelect)==null?void 0:wt[1])==null?void 0:Mt.replaceAll("[",""))==null?void 0:Pt.replaceAll("]","")])),ue}),Pe.value=ne;let Le=He.cloneDeep(ne);Le=Le==null?void 0:Le.map(ue=>{var Ie,re,ct,Re;return(re=(Ie=ue==null?void 0:ue.optionUrl)==null?void 0:Ie.menuSelect)!=null&&re.some(Xe=>Xe==null?void 0:Xe.includes)&&(ue.optionUrl.menuSelect=(Re=(ct=ue==null?void 0:ue.optionUrl)==null?void 0:ct.menuSelect)==null?void 0:Re.map(Xe=>{var We,ht,at,wt;if(Xe!=null&&Xe.includes("[")){let Mt=(ht=(We=Xe==null?void 0:Xe.replaceAll("[","").replaceAll("]",""))==null?void 0:We.split(":"))==null?void 0:ht[1];Xe=(wt=(at=He.cloneDeep(ne))==null?void 0:at.find(Pt=>(Pt==null?void 0:Pt.label)===Mt))==null?void 0:wt.value}return Xe})),ue}),Pe.value=Le}}st.value=!1},us=q=>q?(q==null?void 0:q.toUpperCase())==="INPUT"?"TEXTAREA":q:"TEXTAREA",ds=q=>{var fe,Ne;const H=(Ne=(fe=Z.value)==null?void 0:fe.find(Se=>(Se==null?void 0:Se.label)===(q==null?void 0:q.label)))==null?void 0:Ne.multiple,ce=q==null?void 0:q.prop;if((q==null?void 0:q.formType)!="Select")return;b.value.forEach(Se=>{const Ee=Se==null?void 0:Se[ce];H&&Vo(Ee)&&(Se[ce]=[Ee]),!H&&!Vo(Ee)&&(Se[ce]="")})},zn=q=>{var ce,he,Me,fe,Ne,Se;lt("");const H=(ce=Pe.value)==null?void 0:ce.reduce((Ee,T)=>(Ee[T.name]=T.value,Ee),{});((he=Object.keys(H))==null?void 0:he.length)>0&&(me.value=H,N.value="",P.value=(Me=b.value)==null?void 0:Me.length,Q.value=(fe=xe.value)==null?void 0:fe.filter(Ee=>(Ee==null?void 0:Ee.label)!=="新增"),a.value=(Se=(Ne=l.value)==null?void 0:Ne.filter(Ee=>(Ee==null?void 0:Ee.label)!=="操作"))==null?void 0:Se.map(Ee=>{var C,W,Y;const T=(W=(C=Z.value)==null?void 0:C.find(V=>(V==null?void 0:V.label)===(Ee==null?void 0:Ee.label)))==null?void 0:W.multiple;return ds(Ee),{...Ee,type:"edit",optionUrl:Ee!=null&&Ee.formMenuSelect&&((Y=Ee==null?void 0:Ee.formMenuSelect)==null?void 0:Y.length)>0?{groupSelect:Ee==null?void 0:Ee.groupSelect,menuSelect:Ee==null?void 0:Ee.formMenuSelect,selectRelateType:"",type:Ee==null?void 0:Ee.formType,multiple:T}:null,columnType:us(Ee==null?void 0:Ee.formType)}}),q==="createClick"&&Dt(!1))};y.watch(()=>[r.itemData,$.value,te.value,ee.value,M==null?void 0:M.value],()=>{var Ee,T,C,W,Y,V,ve,we,_e,oe,ne,Le,ue,Ie,re,ct,Re,Xe,We,ht,at,wt,Mt,Pt,jt,Lt,Yt,Ht,Kt;const q=(Ee=He.cloneDeep(r.itemData))==null?void 0:Ee.filter(Ve=>(Ve==null?void 0:Ve.key)==="header");(T=He.cloneDeep(r.itemData))==null||T.filter(Ve=>(Ve==null?void 0:Ve.key)==="tableIndexColumn")[0];const H=(C=He.cloneDeep(r.itemData))==null?void 0:C.find(Ve=>(Ve==null?void 0:Ve.key)==="page"),ce=(W=He.cloneDeep(r.itemData))==null?void 0:W.find(Ve=>(Ve==null?void 0:Ve.key)==="rowButton"),he=(Y=He.cloneDeep(r.itemData))==null?void 0:Y.find(Ve=>(Ve==null?void 0:Ve.key)==="extraButton"),Me=(V=He.cloneDeep(r.itemData))==null?void 0:V.filter(Ve=>(Ve==null?void 0:Ve.key)==="tableContents"),fe=(ve=He.cloneDeep(r.itemData))==null?void 0:ve.filter(Ve=>(Ve==null?void 0:Ve.key)==="tableIndex");Z.value=(oe=(_e=(we=He.cloneDeep(r.itemData))==null?void 0:we.filter(Ve=>(Ve==null?void 0:Ve.key)==="tableToForm"))==null?void 0:_e[0])==null?void 0:oe.contents,I.value=(H==null?void 0:H.contents)??!1;let Ne=[];$.value===""?Ne=q==null?void 0:q[0]:Ne=(q==null?void 0:q.find(Ve=>(Ve==null?void 0:Ve.selectLabel)==="("+$.value+")"))??(q==null?void 0:q.find(Ve=>!(Ve!=null&&Ve.selectLabel)));let Se=[];if($.value===""?Se=fe==null?void 0:fe[0]:Se=(fe==null?void 0:fe.find(Ve=>(Ve==null?void 0:Ve.selectLabel)==="("+$.value+")"))??(fe==null?void 0:fe.find(Ve=>!(Ve!=null&&Ve.selectLabel))),((ne=Ne==null?void 0:Ne.contents)==null?void 0:ne.length)>0){let Ve=[];if(Ne!=null&&Ne.contents.some(v=>Array.isArray(v)&&(v==null?void 0:v.find(w=>w.children))))ee.value===""?Ve=(ue=(Le=en.getGradeColumns(He.cloneDeep(Ne==null?void 0:Ne.contents)))==null?void 0:Le[0])==null?void 0:ue.filter(v=>!Array.isArray(v)):(ee.value.split("-"),Ve=(Ie=en.getGradeColumns(He.cloneDeep(Ne==null?void 0:Ne.contents)))==null?void 0:Ie[0]);else{const v=Ne!=null&&Ne.contents.some(w=>Array.isArray(w))?(re=Ne==null?void 0:Ne.contents)==null?void 0:re[0]:Ne==null?void 0:Ne.contents;v==null||v.forEach((w,D)=>{var U;Ve.push({label:(w==null?void 0:w.label)??"",prop:(w==null?void 0:w.label)==="操作"?"operate":(w==null?void 0:w.prop)??"a"+D,width:w!=null&&w.width?parseInt(w.width):"",fixed:(w==null?void 0:w.fixed)??void 0,sortable:(w==null?void 0:w.sortable)??!1,align:(w==null?void 0:w.align)??"left",showOverflowTooltip:(w==null?void 0:w.showOverflowTooltip)??!0,isNotDrag:(w==null?void 0:w.isNotDrag)??!1,isEditCol:(w==null?void 0:w.isEditCol)??!1,isOperate:(w==null?void 0:w.isOperate)??!1,id:(w==null?void 0:w.id)??D,type:(w==null?void 0:w.label)==="操作"?"operate":void 0,formType:(w==null?void 0:w.formType)??(w!=null&&w.groupSelect?"Select":""),isTableColHidden:w==null?void 0:w.isTableColHidden,isFormColHidden:w==null?void 0:w.isFormColHidden,options:(w==null?void 0:w.options)??[],value:(w==null?void 0:w.value)??"",formMenuSelect:(w==null?void 0:w.formMenuSelect)??[],isRoute:(w==null?void 0:w.isRoute)??!1,groupSelect:w!=null&&w.groupSelect?(U=w==null?void 0:w.groupSelect)==null?void 0:U.replaceAll('"',"").split(":"):[],isMainKey:w==null?void 0:w.isMainKey})})}a.value=Ve,d.value=Ve,t.value=(ct=a.value)==null?void 0:ct.map(v=>v==null?void 0:v.label);let Jt=(Xe=(Re=en.getAllLeafNodes(He.cloneDeep(a.value)))==null?void 0:Re.filter(v=>(v==null?void 0:v.type)!=="operate"))==null?void 0:Xe.map((v,w)=>({prop:(v==null?void 0:v.prop)??"a"+w,column:v.label}));Te.value=Jt;let kt=[];$.value===""?kt=Me==null?void 0:Me[0]:kt=(Me==null?void 0:Me.find(v=>(v==null?void 0:v.selectLabel)==="("+$.value+")"))??(Me==null?void 0:Me.find(v=>!(v!=null&&v.selectLabel)));let gt=Array.isArray((We=kt==null?void 0:kt.contents)==null?void 0:We[0])&&((ht=kt==null?void 0:kt.contents)!=null&&ht[0].every(v=>Array.isArray(v)))?(at=He.cloneDeep(kt==null?void 0:kt.contents))==null?void 0:at[0]:He.cloneDeep(kt==null?void 0:kt.contents);Se!=null&&Se.contents&&((wt=Se==null?void 0:Se.contents)==null?void 0:wt.length)!==0&&(gt=(Mt=He.cloneDeep(gt))==null?void 0:Mt.map((v,w)=>{if(!Array.isArray(v)){let D={};for(let U in v)U!=="id"&&U!=="index"&&(D[U]=v[U]);v=Object.values(D)}return v}));const Gn=!!((Pt=a.value)!=null&&Pt.find(v=>v.prop==="index"));gt=yu(He.cloneDeep(gt),Se==null?void 0:Se.contents,Gn);const S=[];gt==null||gt.forEach((v,w)=>{var U;let D={};if(Array.isArray(v)){let ie=[];v==null||v.filter(ye=>!(ye!=null&&ye.id)).forEach((ye,Qe)=>{var qe,nt,vt,Oe,_t,ft;if((qe=Jt==null?void 0:Jt[Qe])!=null&&qe.prop&&!Array.isArray(ye)){let bt={};bt[Jt[Qe].column]=ye,M!=null&&M.value&&((nt=M==null?void 0:M.value)==null?void 0:nt.length)>0&&((vt=M==null?void 0:M.value)!=null&&vt.find(dt=>JSON.stringify(dt==null?void 0:dt[0])===JSON.stringify(bt)))&&(ie=(Oe=M==null?void 0:M.value)==null?void 0:Oe.find(dt=>JSON.stringify(dt==null?void 0:dt[0])===JSON.stringify(bt))),ie&&ie.length>0?D[Jt[Qe].prop]=ie!=null&&ie.find(dt=>{var Zt;return((Zt=Object.keys(dt))==null?void 0:Zt[0])===Jt[Qe].column})?(_t=ie==null?void 0:ie.find(dt=>{var Zt;return((Zt=Object.keys(dt))==null?void 0:Zt[0])===Jt[Qe].column}))==null?void 0:_t[Jt[Qe].column]:ye:D[Jt[Qe].prop]=ye}else Array.isArray(ye)&&((ft=Jt[Qe])!=null&&ft.prop?D[Jt[Qe].prop]=ye:D.children=vu(ye,Jt))})}else D=v;Array.isArray(v)&&v.some(ie=>ie==null?void 0:ie.id)?S.push(Object.assign(D,{id:(U=v==null?void 0:v.find(ie=>ie.id))==null?void 0:U.id})):D.id?S.push(D):S.push(Object.assign(D,{id:w.toString()}))}),b.value=S}else a.value=[],l.value=[],b.value=[];((jt=ce==null?void 0:ce.contents)==null?void 0:jt.length)>0?se.value=ce==null?void 0:ce.contents:se.value=[],((Lt=he==null?void 0:he.contents)==null?void 0:Lt.length)>0?(Q.value=he==null?void 0:he.contents,xe.value=he==null?void 0:he.contents):(Q.value=[],xe.value=[]),P.value=((Yt=b==null?void 0:b.value)==null?void 0:Yt.length)??0,j.value=b.value,je.value&&(a.value=(Kt=(Ht=l.value)==null?void 0:Ht.filter(Ve=>(Ve==null?void 0:Ve.label)!=="操作"))==null?void 0:Kt.map(Ve=>{var Jt;return{...Ve,type:"edit",optionUrl:Ve!=null&&Ve.formMenuSelect&&((Jt=Ve==null?void 0:Ve.formMenuSelect)==null?void 0:Jt.length)>0?{groupSelect:Ve==null?void 0:Ve.groupSelect,menuSelect:Ve==null?void 0:Ve.formMenuSelect,selectRelateType:"",type:Ve==null?void 0:Ve.formType}:null}}),zn())},{deep:!0,immediate:!0}),y.watch(()=>r==null?void 0:r.operatingForm,q=>{q!=null&&q.form&&(lt(q==null?void 0:q.form),E.value=q==null?void 0:q.dialogTitle,G.value=!0,A.value=!0)},{immediate:!0,deep:!0});const Xi=()=>{je.value=!je.value,je.value?(zn("viewChange"),x.setCacheUpdatingData(null),it.value=null):(Q.value=xe.value,a.value=d.value,it.value&&o("change",it.value))};y.ref(!1);const fs=q=>{zn("createClick")},ji=(q,H,ce)=>{var he,Me;me.value=He.cloneDeep(q),N.value=q==null?void 0:q.id,P.value=(he=b.value)==null?void 0:he.length,E.value=(q==null?void 0:q.id)===((Me=b.value)==null?void 0:Me.length)?"新增":"编辑",Dt(!0)},ui=q=>{var Ee,T,C,W,Y,V,ve,we,_e,oe;const{row:H,column:ce,item:he,slotData:Me}=q;let fe=H!=null&&H[ce==null?void 0:ce.prop]?((T=(Ee=H==null?void 0:H[ce==null?void 0:ce.prop])==null?void 0:Ee[0])==null?void 0:T.contents)??(H==null?void 0:H[ce==null?void 0:ce.prop]):((W=(C=H==null?void 0:H[he==null?void 0:he.prop])==null?void 0:C[0])==null?void 0:W.contents)??(H==null?void 0:H[he==null?void 0:he.prop])??((V=(Y=Me==null?void 0:Me[he==null?void 0:he.prop])==null?void 0:Y[0])==null?void 0:V.contents)??(Me==null?void 0:Me[he==null?void 0:he.prop])??((_e=(we=H==null?void 0:H[(ve=he==null?void 0:he.child)==null?void 0:ve.prop])==null?void 0:we[0])==null?void 0:_e.contents)??(H==null?void 0:H[(oe=he==null?void 0:he.child)==null?void 0:oe.prop]),Se=Array.isArray(fe)&&!(fe!=null&&fe.every(ne=>typeof ne=="string"||typeof ne=="number"))?"查看":fe;return Se=Array.isArray(Se)?Se.join(","):Se,Se},qi=q=>{var T,C,W,Y,V,ve,we,_e,oe,ne;const{row:H,column:ce,item:he,slotData:Me}=q;let fe=H!=null&&H[ce==null?void 0:ce.prop]?((C=(T=H==null?void 0:H[ce==null?void 0:ce.prop])==null?void 0:T[0])==null?void 0:C.contents)??(H==null?void 0:H[ce==null?void 0:ce.prop]):((Y=(W=H==null?void 0:H[he==null?void 0:he.prop])==null?void 0:W[0])==null?void 0:Y.contents)??(H==null?void 0:H[he==null?void 0:he.prop])??((ve=(V=Me==null?void 0:Me[he==null?void 0:he.prop])==null?void 0:V[0])==null?void 0:ve.contents)??(Me==null?void 0:Me[he==null?void 0:he.prop])??((oe=(_e=H==null?void 0:H[(we=he==null?void 0:he.child)==null?void 0:we.prop])==null?void 0:_e[0])==null?void 0:oe.contents)??(H==null?void 0:H[(ne=he==null?void 0:he.child)==null?void 0:ne.prop]);const Se=Array.isArray(fe)&&!(fe!=null&&fe.every(Le=>typeof Le=="string"||typeof Le=="number")),Ee=Array.isArray(fe)&&(fe==null?void 0:fe.find(Le=>Le==null?void 0:Le.url));return Se&&Ee};return(q,H)=>{var Ee,T;const ce=y.resolveComponent("el-icon"),he=y.resolveComponent("el-popover"),Me=y.resolveComponent("svg-icon"),fe=y.resolveComponent("el-checkbox"),Ne=y.resolveComponent("el-checkbox-group"),Se=y.resolveComponent("el-button");return y.openBlock(),y.createElementBlock("div",q6,[(y.openBlock(),y.createBlock(Fn.ssTable,{columns:a.value,checkedColumns:t.value,key:a.value,tableData:b.value,isEditViewport:je.value,isShowPagination:I.value,isShowEdit:!1,isShowDelete:!1,onDbClickRow:Ke,extraButton:Q.value,onContentClick:xt,onRowClick:ot,onSelectChange:ke,onCellChange:ji,onChange:Sn,onPreview:k},y.createSlots({headerButton:y.withCtx(C=>[s.showHeader?(y.openBlock(),y.createBlock(F6,{key:0,compName:s.compName,buttons:C.buttons,onButtonClick:H[0]||(H[0]=W=>J(W,"",{})),columns:a.value,onFilter:yt},null,8,["compName","buttons","columns"])):y.createCommentVNode("",!0)]),viewport:y.withCtx(()=>{var C;return[((C=b.value)==null?void 0:C.length)>0?(y.openBlock(),y.createElementBlock("div",K6,[y.createElementVNode("span",{title:"编辑视图",onClick:Xi},[y.createVNode(Me,{name:"editTable",class:"view-icon"})])])):y.createCommentVNode("",!0)]}),rowCreate:y.withCtx(({row:C})=>[y.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:W=>fs()},[y.createVNode(Me,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,J6)]),operateCol:y.withCtx(()=>[y.createVNode(he,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"click",onShow:$t},{reference:y.withCtx(()=>[y.createElementVNode("span",Z6,[y.createVNode(Me,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:y.withCtx(()=>[y.createElementVNode("div",Q6,[y.createVNode(Ne,{modelValue:t.value,"onUpdate:modelValue":H[2]||(H[2]=C=>t.value=C),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,C=>(y.openBlock(),y.createBlock(fe,{key:C.label,label:C.label,value:C.label,style:{width:"100%",marginRight:0}},{default:y.withCtx(()=>[y.createElementVNode("span",null,y.toDisplayString(C.label),1),y.createVNode(Me,{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(C=>[qi(C)?(y.openBlock(),y.createBlock(he,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:y.withCtx(()=>[y.createElementVNode("span",e5,y.toDisplayString(ui(C)),1)]),default:y.withCtx(()=>{var W;return[y.createElementVNode("div",t5,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(C==null?void 0:C.row[(W=C==null?void 0:C.column)==null?void 0:W.prop],Y=>(y.openBlock(),y.createElementBlock("div",n5,[y.createElementVNode("div",{class:"prop-url",title:R(Y),onClick:V=>le(Y)},y.toDisplayString(R(Y)),9,i5),y.createElementVNode("div",{class:"prop-download",onClick:V=>Ce(Y)}," 下载 ",8,s5)]))),256))])]}),_:2},1024)):(y.openBlock(),y.createElementBlock(y.Fragment,{key:1},[y.createTextVNode(y.toDisplayString(ui(C)),1)],64))]),_:2},[((Ee=se.value)==null?void 0:Ee.length)>0?{name:"actions",fn:y.withCtx(({item:C})=>[y.createVNode(he,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:y.withCtx(()=>[y.createVNode(ce,null,{default:y.withCtx(()=>[y.createVNode(y.unref(on.more_filled_default))]),_:1})]),default:y.withCtx(()=>[y.createElementVNode("div",$6,[(y.openBlock(!0),y.createElementBlock(y.Fragment,null,y.renderList(Ue(se.value,C),(W,Y)=>(y.openBlock(),y.createElementBlock("div",{class:"menu-config-item",key:Y,onClick:V=>J(W==null?void 0:W.label,C,{extra:W})},[y.createElementVNode("div",{style:y.normalizeStyle({color:W==null?void 0:W.textColor}),class:"extra-button-label"},y.toDisplayString(W==null?void 0:W.label),5)],8,Y6))),128))])]),_:2},1024)]),key:"0"}:void 0,((T=b.value)==null?void 0:T.length)>0?{name:"batchButton",fn:y.withCtx(C=>[y.createVNode(U6,{buttons:C.buttons,onButtonClick:H[1]||(H[1]=W=>J(W,"",{}))},null,8,["buttons"])]),key:"1"}:void 0]),1032,["columns","checkedColumns","tableData","isEditViewport","isShowPagination","extraButton"])),y.createVNode(Fn.ssDialog,{title:E.value,visible:A.value,width:et.value,onBeforeDestroy:rt},{default:y.withCtx(()=>[y.createElementVNode("div",r5,[y.createVNode(Fn.ssForm,{rowContents:Pe.value,isEnableWrap:!1,onChange:In,onClickTrigger:Xt,isEdit:L.value,onBlurChange:Ze},null,8,["rowContents","isEdit"])])]),footer:y.withCtx(()=>[G.value?(y.openBlock(),y.createElementBlock("div",a5,[y.createVNode(Se,{onClick:H[3]||(H[3]=C=>A.value=!1),id:"themeBorderButton"},{default:y.withCtx(()=>H[7]||(H[7]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[7]}),y.createVNode(Se,{class:"ok-button",onClick:H[4]||(H[4]=C=>Dt(!0)),id:"themeButton"},{default:y.withCtx(()=>H[8]||(H[8]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[8]})])):y.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),y.createVNode(Fn.ssDialog,{title:E.value,visible:B.value,width:X.value,onBeforeDestroy:H[6]||(H[6]=C=>B.value=!1)},{default:y.withCtx(()=>[y.createVNode(H6)]),footer:y.withCtx(()=>[y.createElementVNode("div",o5,[y.createVNode(Se,{onClick:H[5]||(H[5]=C=>B.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:y.withCtx(()=>H[9]||(H[9]=[y.createTextVNode(y.toDisplayString("取消"))])),_:1,__:[9]}),y.createVNode(Se,{class:"ok-button",onClick:Tt,id:"themeButton"},{default:y.withCtx(()=>H[10]||(H[10]=[y.createTextVNode(y.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["title","visible","width"]),m.value?(y.openBlock(),y.createBlock(Fn.ssFilePreview,{key:0,fileDataList:u.value,onDestroy:ze},null,8,["fileDataList"])):y.createCommentVNode("",!0),c.value?(y.openBlock(),y.createBlock(Fn.ssDialog,{key:1,visible:c.value,onBeforeDestroy:De,style:{height:"700px",width:"1000px"}},{default:y.withCtx(()=>[c.value?(y.openBlock(),y.createBlock(mu,{key:0,"urdf-url":de.value},null,8,["urdf-url"])):y.createCommentVNode("",!0)]),_:1},8,["visible"])):y.createCommentVNode("",!0)])}}},Au=Ci._export_sfc(l5,[["__scopeId","data-v-54eae7c6"]]);exports.ACESFilmicToneMapping=Gl;exports.AmbientLight=cc;exports.Box3=Tn;exports.CatmullRomCurve3=rc;exports.Color=At;exports.DirectionalLight=gr;exports.DoubleSide=hn;exports.Euler=vn;exports.GridHelper=J0;exports.HemisphereLight=K0;exports.MOUSE=Si;exports.MathUtils=xi;exports.Matrix4=St;exports.Mesh=Nt;exports.MeshPhongMaterial=cn;exports.OrbitControls=ru;exports.PCFSoftShadowMap=Hl;exports.PerspectiveCamera=_n;exports.Plane=jn;exports.PlaneGeometry=wi;exports.PointLight=Pa;exports.SRGBColorSpace=Vt;exports.Scene=Ia;exports.ShadowMaterial=X0;exports.TubeGeometry=ka;exports.Vector3=z;exports.WebGLRenderer=iu;exports.Xe=uu;exports.formGetOptions=Ho;exports.getSelectRow=kl;exports.isString=Vo;exports.ssTable=Au;exports.threeView=mu;exports.useFormComp=Su;exports.useFormToTableComp=gu;exports.useModelLoader=z6;exports.useTableComp=bu;exports.useUnit=_u;
|