import{aasM}from"./chunk-DKG6YEMN.js";import{aasW}from"./chunk-FG3CL3AH.js";import"./chunk-VMXXQ6B4.js";import"./chunk-XCRMBS5M.js";import{aasx,basI,casj}from"./chunk-VMIASSRO.js";import"./chunk-AKRPIQPN.js";import"./chunk-NHNM56MI.js";import{aasg}from"./chunk-6VK5R74O.js";import"./chunk-P73YILG6.js";import"./chunk-VYMAIP2A.js";import{aas$,basV}from"./chunk-ZMGESOEZ.js";import{aasZ}from"./chunk-OKWGJEQO.js";import"./chunk-ZBEWS6NN.js";import"./chunk-V7XARCCV.js";import"./chunk-SACP225T.js";import{aasX}from"./chunk-YFQNY2YN.js";import{aasQ}from"./chunk-NT26NNVH.js";import{basY,casz,dasU}from"./chunk-NW2YE576.js";import{dasK}from"./chunk-2NIQ5ECB.js";import"./chunk-7YEOLR2L.js";import{aasB}from"./chunk-QHHYYTCM.js";import{aasT,casC,dasf}from"./chunk-RH3GFHG2.js";import{aasJ}from"./chunk-FRWNWNYJ.js";import"./chunk-UKWFHLUK.js";import"./chunk-UAWOHN7R.js";import{aask}from"./chunk-TA3RE4KQ.js";import{aasD}from"./chunk-RTY3VPG6.js";import{eas_}from"./chunk-LRNH5AEO.js";functionoe(t,e,n,o){letl=newQ;o.position&&(l.position=newU({componentDatatype:B.DOUBLE,componentsPerAttribute:3,values:t}));leti=e.length,u=t.length/3,L=(u-i*2)/(i*2),E=V.triangulate(e),q=(L-1)*i*6+E.length*2,r=X.createTypedArray(u,q),m,s,d,b,A,F,G=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,F=d+G,b=d+1,A=b+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F;d=i*2-2+m*i*2,b=d+1,A=b+G,F=d+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F}if(o.st||o.tangent||o.bitangent){letc=newFloat32Array(u*2),O=1/(L-1),w=1/n.height,S=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*O,a=w*(e[0].y+S),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+S),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+S),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*O,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;l.st=newU({componentDatatype:B.FLOAT,componentsPerAttribute:2,values:newFloat32Array(c)})}letN=u-i*2;for(m=0;m<E.length;m+=3){letc=E[m]+N,O=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=O,r[p++]=w,r[p++]=w+i,r[p++]=O+i,r[p++]=c+i}letP=newz({attributes:l,indices:r,boundingSphere:K.fromVertices(t),primitiveType:Y.TRIANGLES});if(o.normal&&(P=W.computeNormal(P)),o.tangent||o.bitangent){try{P=W.computeTangentAndBitangent(P)}catch{I("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(P.attributes.tangent=void0),o.bitangent||(P.attributes.bitangent=void0),o.st||(P.attributes.st=void0)}returnP}functionR(t){t=k(t,k.EMPTY_OBJECT);lete=t.polylinePositions,n=t.shapePositions;if(!_(e))thrownewD("options.polylinePositions is required.");if(!_(n))thrownewD("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(k(t.ellipsoid,f.default)),this._cornerType=k(t.cornerType,x.ROUNDED),this._vertexFormat=g.clone(k(t.vertexFormat,g.DEFAULT)),this._granularity=k(t.granularity,J.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";leto=1+e.length*T.packedLength;o+=1+n.length*C.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}R.pack=function(t,e,n){if(!_(t))thrownewD("value is required");if(!_(e))thrownewD("array is required");n=k(n,0);leto,l=t._positions,i=l.length;for(e[n++]=i,o=0;o<i;++o,n+=T.packedLength)T.pack(l[o],e,n);letu=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=C.packedLength)C.pack(u[o],e,n);returnf.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};varee=f.clone(f.UNIT_SPHERE),te=newg,v={polylinePositions:void0,shapePositions:void0,ellipsoid:ee,vertexFormat:te,cornerType:void0,granularity:void0};R.unpack=function(t,e,n){if(!_(t))thrownewD("array is required");e=k(e,0);leto,l=t[e++],i=newArray(l);for(o=0;o<l;++o,e+=T.packedLength)i[o]=T.unpack(t,e);l=t[e++];letu=newArray(l);for(o=0;o<l;++o,e+=C.packedLength)u[o]=C.unpack(t,e);letL=f.unpack(t,e,ee);e+=f.packedLength;letE=g.unpack(t,e,te);e+=g.packedLength;letq=t[e++],r=t[e];return_(n)?(n._positions=i,n._