PageSourceSearch

https://sunra.ai/_next/static/chunks/0-13smz57.919.js?dpl=dpl_J4BzYExe6nabgNNe1zu1S3bLw4TM

js sunra.ai collected 2026-10-05 16:10:04 UTC 40,926 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,156713,e=>{"use strict";let t={sunIntensity:3,sunColor:"#fff7ee",ambientIntensity:1,ambientColor:"#ffffff"},n=/^#[0-9a-fA-F]{6}$/,r={duration:5,fps:30};e.s(["ASPECT_RATIOS",0,{"21:9":21/9,"16:9":16/9,"9:16":9/16,"1:1":1,"4:3":4/3,"3:4":3/4,"2.39:1":2.39},"CAMERA_ASPECTS",0,["21:9","16:9","9:16","1:1","4:3","3:4","2.39:1"],"DEFAULT_SCENE_LIGHTING",0,t,"DEFAULT_TIMELINE",0,r,"FRAME_RATIOS",0,["auto","21:9","16:9","4:3","1:1","3:4","9:16"],"KEYFRAME_EASES",0,["linear","easeIn","easeOut","easeInOut","hold"],"MAX_TIMELINE_DURATION",0,60,"PROP_SHAPES",0,["cube","sphere","cylinder","torus","cone","pyramid"],"SCENE_DOC_VERSION",0,2,"TRACK_KEYS",0,["transform.position","transform.rotation","transform.scale","pose.joints","camera.fov","camera.lookAt"],"createEmptySceneDoc",0,function(){return{version:2,settings:{skyColor:"#c2c8ce",gridSnap:!1,showLabels:!0,frameRatio:"auto",timeline:{...r}},objects:[],activeCameraId:null,tracks:{}}},"lightingOf",0,function(e){let r=e.lighting,o=(e,t,n)=>"number"==typeof e&&Number.isFinite(e)?Math.min(n,Math.max(0,e)):t,i=(e,t)=>"string"==typeof e&&n.test(e)?e:t;return{sunIntensity:o(r?.sunIntensity,t.sunIntensity,8),sunColor:i(r?.sunColor,t.sunColor),ambientIntensity:o(r?.ambientIntensity,t.ambientIntensity,2),ambientColor:i(r?.ambientColor,t.ambientColor)}},"timelineOf",0,function(e){return e.settings.timeline??r}])},59846,966329,306121,569180,292892,640635,641095,e=>{"use strict";var t=e.i(190072);let n={male:{headH:.23,headShape:[.4,.5,.44],neckLen:.07,neckR:.042,torsoLen:.42,chestR:.16,waistR:.115,torsoDepth:.74,shoulderW:.185,hipW:.095,pelvisH:.16,upperArmLen:.28,foreArmLen:.25,handLen:.1,armR:.041,thighLen:.42,shinLen:.4,thighR:.06,footLen:.22,footH:.055},female:{headH:.22,headShape:[.39,.5,.43],neckLen:.075,neckR:.035,torsoLen:.4,chestR:.14,waistR:.09,torsoDepth:.72,
1shoulderW:.155,hipW:.105,pelvisH:.16,upperArmLen:.26,foreArmLen:.24,handLen:.09,armR:.034,thighLen:.43,shinLen:.4,thighR:.056,footLen:.2,footH:.05},broad:{headH:.235,headShape:[.42,.5,.45],neckLen:.055,neckR:.055,torsoLen:.44,chestR:.2,waistR:.16,torsoDepth:.8,shoulderW:.23,hipW:.115,pelvisH:.17,upperArmLen:.28,foreArmLen:.25,handLen:.105,armR:.052,thighLen:.41,shinLen:.37,thighR:.075,footLen:.24,footH:.06},muscular:{headH:.23,headShape:[.4,.5,.44],neckLen:.055,neckR:.052,torsoLen:.43,chestR:.185,waistR:.12,torsoDepth:.78,shoulderW:.215,hipW:.1,pelvisH:.165,upperArmLen:.28,foreArmLen:.25,handLen:.1,armR:.054,thighLen:.42,shinLen:.39,thighR:.072,footLen:.23,footH:.055},slim:{headH:.215,headShape:[.38,.5,.42],neckLen:.08,neckR:.032,torsoLen:.41,chestR:.13,waistR:.095,torsoDepth:.68,shoulderW:.155,hipW:.085,pelvisH:.15,upperArmLen:.28,foreArmLen:.26,handLen:.095,armR:.03,thighLen:.45,shinLen:.43,thighR:.048,footLen:.21,footH:.05},youth:{headH:.225,headShape:[.41,.5,.44],neckLen:.06,neckR:.035,torsoLen:.36,chestR:.13,waistR:.095,torsoDepth:.7,shoulderW:.145,hipW:.085,pelvisH:.14,upperArmLen:.23,foreArmLen:.21,handLen:.085,armR:.032,thighLen:.35,shinLen:.33,thighR:.05,footLen:.2,footH:.05},child:{headH:.21,headShape:[.44,.5,.46],neckLen:.04,neckR:.032,torsoLen:.26,chestR:.105,waistR:.09,torsoDepth:.76,shoulderW:.11,hipW:.07,pelvisH:.11,upperArmLen:.15,foreArmLen:.14,handLen:.065,armR:.028,thighLen:.21,shinLen:.2,thighR:.042,footLen:.15,footH:.045},chibi:{headH:.36,headShape:[.47,.5,.48],neckLen:.015,neckR:.035,torsoLen:.13,chestR:.075,waistR:.065,torsoDepth:.85,shoulderW:.075,hipW:.05,pelvisH:.07,upperArmLen:.07,foreArmLen:.065,handLen:.04,armR:.022,thighLen:.075,shinLen:.07,thighR:.032,footLen:.09,footH:.035}};e.s(["BODY_PARAMS",0,n,"BODY_TYPES",0,["male","female","broad","muscular","slim","youth","child","chibi"]],966329);let r=Math.PI/180,o={body:"YXZ",torso:"YXZ",head:"YXZ",shoulderL:"ZXY",shoulderR:"ZXY",hipL:"ZXY",hipR:"ZXY"};function i(e,n){let[i,a,s]=n??[0,0,0];return new t.Euler(i*r,a*r,s*r,o[e]??"XYZ")}function a(e){return{hipY:-(.42*e.pelvisH),waistY:.55*e.pelvisH,shoulderY:.94*e.torsoLen,neckBaseY:e.torsoLen,headPivotY:e.torsoLen+.9*e.neckLen}}function s(e){return{shoulder:1.4*e.armR,elbow:1.18*e.armR,wrist:.95*e.armR,hip:1.05*e.thighR,knee:.95*e.thighR,ankle:.72*e.thighR,waist:.62*e.waistR}}let l=new t.Vector3,h=new t.Matrix4;function c(e,t,n,r){e.multiply(h.makeTranslation(t,n,r))}function d(e,t,n){e.multiply(h.makeRotationFromEuler(i(t,n[t])))}function u(e,n){let r=a(e),o=s(e),h=1/0,u=new t.Matrix4().makeRotationFromEuler(i("body",n.body));for(let t of["L","R"]){let i="L"===t?1:-1,a=u.clone();c(a,i*e.hipW,r.hipY,0),d(a,`hip${t}`,n),c(a,0,-e.thighLen,0),d(a,`knee${t}`,n),l.set(0,0,0).applyMatrix4(a),h=Math.min(h,l.y-o.knee),c(a,0,-e.shinLen,0),d(a,`ankle${t}`,n),l.set(0,-e.footH,-.3*e.footLen).applyMatrix4(a),h=Math.min(h,l.y),l.set(0,-e.footH,.7*e.footLen).applyMatrix4(a),h=Math.min(h,l.y)}return-h}var m=e.i(843476),p=e.i(271645);let f={stand:{label:{en:"Stand",zh:"站立"},joints:{shoulderL:[0,0,5],shoulderR:[0,0,-5],elbowL:[-8,0,0],elbowR:[-8,0,0],hipL:[0,0,3],hipR:[0,0,-3]}},"t-pose":{label:{en:"T-Pose",zh:"T型"},joints:{shoulderL:[0,0,90],shoulderR:[0,0,-90],hipL:[0,0,4],hipR:[0,0,-4]}},walk:{label:{en:"Walk",zh:"行走"},joints:{torso:[2,6,0],shoulderL:[-33,0,4],shoulderR:[26,0,-4],elbowL:[-32,0,0],elbowR:[-14,0,0],hipL:[22,0,2],hipR:[-28,0,-2],kneeL:[35,0,0],kneeR:[8,0,0],ankleL:[30,0,0],ankleR:[-10,0,0]}},run:{label:{en:"Run",zh:"跑步"},joints:{body:[12,0,0],torso:[6,-8,0],head:[-8,0,0],shoulderL:[-55,0,9],shoulderR:[40,0,-9],elbowL:[-90,0,0],elbowR:[-95,0,0],hipL:[30,0,2],hipR:[-55,0,-2],kneeL:[100,0,0],kneeR:[45,0,0],ankleL:[35,0,0],ankleR:[15,0,0]}},sit:{label:{en:"Sit",zh:"坐姿"},joints:{torso:[-4,0,0],shoulderL:[-48,0,4],shoulderR:[-48,0,-4],elbowL:[-18,0,0],elbowR:[-18,0,0],hipL:[-85,0,4],hipR:[-85,0,-4],kneeL:[85,0,0],kneeR:[85,0,0]}},squat:{label:{en:"Squat",zh:"蹲下"},joints:{torso:[30,0,0],head:[-18,0,0],shoulderL:[-58,0,6],shoulderR:[-58,0,-6],elbowL:[-28,0,0],elbowR:[-28,0,0],hipL:[-100,0,24],hi
1pR:[-100,0,-24],kneeL:[130,0,0],kneeR:[130,0,0],ankleL:[-28,0,0],ankleR:[-28,0,0]}},"kneel-one":{label:{en:"Kneel (one knee)",zh:"单膝跪"},joints:{torso:[5,0,0],shoulderL:[-25,0,3],shoulderR:[5,0,-4],elbowL:[-75,0,0],elbowR:[-10,0,0],hipL:[-85,0,4],hipR:[10,0,-4],kneeL:[85,0,0],kneeR:[95,0,0],ankleL:[0,0,0],ankleR:[40,0,0]}},"kneel-both":{label:{en:"Kneel (both knees)",zh:"双膝跪"},joints:{shoulderL:[0,0,4],shoulderR:[0,0,-4],elbowL:[-10,0,0],elbowR:[-10,0,0],hipL:[5,0,4],hipR:[5,0,-4],kneeL:[100,0,0],kneeR:[100,0,0],ankleL:[45,0,0],ankleR:[45,0,0]}},"hands-on-hips":{label:{en:"Hands on hips",zh:"叉腰"},joints:{shoulderL:[0,-90,34],shoulderR:[0,90,-34],elbowL:[-68,0,0],elbowR:[-68,0,0],hipL:[0,0,5],hipR:[0,0,-5]}},lean:{label:{en:"Lean",zh:"倚靠"},joints:{body:[0,0,13],head:[0,0,-10],shoulderL:[-25,-85,8],shoulderR:[-30,85,-8],elbowL:[-110,0,0],elbowR:[-115,0,0],hipL:[-12,0,-8],hipR:[0,0,-12],kneeL:[18,0,0],ankleL:[25,0,0]}},bow:{label:{en:"Bow",zh:"鞠躬"},joints:{body:[5,0,0],torso:[45,0,0],head:[20,0,0],shoulderL:[-10,0,3],shoulderR:[-10,0,-3],elbowL:[-5,0,0],elbowR:[-5,0,0]}},think:{label:{en:"Think",zh:"思考"},joints:{torso:[5,0,0],head:[14,-8,10],shoulderL:[-15,-80,5],shoulderR:[-42,30,-8],elbowL:[-85,0,0],elbowR:[-146,0,0],hipL:[0,0,3],hipR:[0,0,-3]}},fight:{label:{en:"Fight",zh:"格斗"},joints:{body:[5,30,0],torso:[4,10,0],head:[8,-15,0],shoulderL:[-55,-30,15],shoulderR:[-45,30,-12],elbowL:[-125,0,0],elbowR:[-130,0,0],hipL:[-18,0,10],hipR:[12,0,-8],kneeL:[25,0,0],kneeR:[30,0,0],ankleR:[18,0,0]}},kick:{label:{en:"Kick",zh:"踢球"},joints:{body:[-8,0,0],torso:[-8,-12,0],head:[5,0,0],shoulderL:[-45,0,10],shoulderR:[40,0,-25],elbowL:[-20,0,0],elbowR:[-30,0,0],hipL:[8,0,3],hipR:[-75,0,-4],kneeL:[12,0,0],kneeR:[15,0,0],ankleL:[-5,0,0],ankleR:[35,0,0]}},throw:{label:{en:"Throw",zh:"投掷"},joints:{body:[0,15,0],torso:[0,25,0],head:[0,-20,0],shoulderL:[-70,0,8],shoulderR:[20,-40,-115],elbowL:[-30,0,0],elbowR:[-110,0,0],hipL:[-35,0,4],hipR:[15,0,-6],kneeL:[20,0,0],kneeR:[25,0,0],ankleR:[25,0,0]}},push:{label:{en:"Push",zh:"推进"},joints:{body:[8,0,0],torso:[14,0,0],head:[-6,0,0],shoulderL:[-88,0,4],shoulderR:[-88,0,-4],elbowL:[-10,0,0],elbowR:[-10,0,0],hipL:[-26,0,3],hipR:[28,0,-3],kneeL:[22,0,0],kneeR:[6,0,0],ankleL:[-8,0,0],ankleR:[32,0,0]}},wave:{label:{en:"Wave",zh:"招手"},joints:{head:[0,0,-8],shoulderL:[0,0,5],shoulderR:[0,0,-135],elbowL:[-8,0,0],elbowR:[-35,0,0],wristR:[0,0,25],hipL:[0,0,3],hipR:[0,0,-3]}},reach:{label:{en:"Reach",zh:"伸手"},joints:{torso:[6,-12,0],head:[-8,0,0],shoulderL:[15,0,4],shoulderR:[-110,0,-4],elbowL:[-8,0,0],elbowR:[-8,0,0],hipL:[8,0,3],hipR:[-8,0,-3],ankleL:[12,0,0]}},"reach-up":{label:{en:"Reach up",zh:"向上伸手"},joints:{torso:[-3,-8,0],head:[-18,0,0],shoulderL:[12,0,4],shoulderR:[-165,0,-6],elbowL:[-10,0,0],elbowR:[-10,0,0],hipL:[2,0,3],hipR:[-2,0,-3]}},"arms-crossed":{label:{en:"Arms crossed",zh:"抱臂"},joints:{shoulderL:[-24,-82,-14],shoulderR:[-16,82,14],elbowL:[-92,0,0],elbowR:[-98,0,0],hipL:[0,0,4],hipR:[0,0,-4]}},"look-at-phone":{label:{en:"Look at phone",zh:"看手机"},joints:{torso:[8,0,0],head:[30,0,0],shoulderL:[-15,-60,4],shoulderR:[-24,55,-4],elbowL:[-95,0,0],elbowR:[-108,0,0],wristR:[-20,0,0],hipL:[0,0,3],hipR:[0,0,-3]}}},b=Object.keys(f);function g(e){let t=f[e];return t?Object.fromEntries(Object.entries(t.joints).map(([e,t])=>[e,[...t]])):{}}function L(e){let t=g(e?.preset??"stand");if(e?.joints)for(let[n,r]of Object.entries(e.joints))t[n]=[...r];return t}function R(e){let n=new t.SphereGeometry(1,32,24),r=e.torsoLen,o=[new t.Vector2(.001,0),new t.Vector2(.86*e.waistR,.005),new t.Vector2(e.waistR,.09*r),new t.Vector2(.9*e.chestR,.4*r),new t.Vector2(e.chestR,.62*r),new t.Vector2(.96*e.chestR,.78*r),new t.Vector2(.78*e.chestR,.9*r),new t.Vector2(.5*e.chestR,.98*r),new t.Vector2(.001,r)],i=new t.LatheGeometry(o,40),a=(e,n,r)=>{let o=new t.CylinderGeometry(e,n,r,24,1);return o.translate(0,-r/2,0),o};return{unitSphere:n,torso:i,neck:new t.CylinderGeometry(e.neckR,1.15*e.neckR,1.9*e.neckLen,20),upperArm:a(e.armR,.78*e.armR,e.upperArmLen),foreArm:a(.82*e.armR,.58*e.armR,e.foreArmLen),thigh:a(e.thighR,.72*e.thighR,e.thighLen),shin:a(.75*e.thighR,.5*e.thighR,e.shinLen)}}function k({rig:e,radius:t,position:n}){return(0,m.jsx)("mesh",{geometry:e.geo.unitSphere,material:e.jointMat,position:n,scale:t})}function w({rig:e,side:t}){let{p:n,off:r,r:o,geo:a,bodyMat:s,joints:l}=e;return(0,m.jsxs)("group",{position:[("L"===t?1:-1)*n.shoulderW,r.shoulderY,0],rotation:i(`shoulder${t}`,l[`shoulder${t}`]),children:[(0,m.jsx)(k,{rig:e,radius:o.shoulder,position:[0,0,0]}),(0,m.jsx)("mesh",{geometry:a.upperArm,material:s}),(0,m.jsxs)("group",{position:[0,-n.upperArmLen,0],rotation:i(`elbow${t}`,l[`elbow${t}`]),children:[(0,m.jsx)(k,{rig:e,radius:o.elbow,position:[0,0,0]}),(0,m.jsx)("mesh",{geometry:a.foreArm,material:s}),(0,m.jsxs)("group",{position:[0,-n.foreArmLen,0],rotation:i(`wrist${t}`,l[`wrist${t}`]),children:[(0,m.jsx)(k,{rig:e,radius:o.wrist,position:[0,0,0]}),(0,m.jsx)("mesh",{geometry:a.unitSphere,material:s,position:[0,-(.55*n.handLen),.004],scale:[1.05*n.armR,.62*n.handLen,.62*n.armR]})]})]})]})}function y({rig:e,side:t}){let{p:n,off:r,r:o,geo:a,bodyMat:s,joints:l}=e;return(0,m.jsxs)("group",{position:[("L"===t?1:-1)*n.hipW,r.hipY,0],rotation:i(`hip${t}`,l[`hip${t}`]),children:[(0,m.jsx)(k,{rig:e,radius:o.hip,position:[0,0,0]}),(0,m.jsx)("mesh",{geometry:a.thigh,material:s}),(0,m.jsxs)("group",{position:[0,-n.thighLen,0],rotation:i(`knee${t}`,l[`knee${t}`]),children:[(0,m.jsx)(k,{rig:e,radius:o.knee,position:[0,0,0]}),(0,m.jsx)("mesh",{geometry:a.shin,material:s}),(0,m.jsxs)("group",{position:[0,-n.shinLen,0],rotation:i(`ankle${t}`,l[`ankle${t}`]),children:[(0,m.jsx)(k,{rig:e,radius:o.ankle,position:[0,0,0]}),(0,m.jsx)("mesh",{geometry:a.unitSphere,material:s,position:[0,-(.5*n.footH),.2*n.footLen],scale:[.19*n.footLen,.5*n.footH,.5*n.footLen]})]})]})]})}function j({bodyType:e="male",pose:r,color:o="#d8cbb6",...l}){let h=n[e],c=(0,p.useMemo)(()=>L(r),[r]),d=(0,p.useMemo)(()=>R(h),[h]),{bodyMat:f,jointMat:b}=(0,p.useMemo)(()=>{let e=new t.Color(o);return{bodyMat:new t.MeshStandardMaterial({color:e,roughness:.82,metalness:.02}
1),jointMat:new t.MeshStandardMaterial({color:e.clone().multiplyScalar(.72),roughness:.7,metalness:.02})}},[o]);(0,p.useEffect)(()=>()=>{for(let e of Object.values(d))e.dispose()},[d]),(0,p.useEffect)(()=>()=>{f.dispose(),b.dispose()},[f,b]);let g=(0,p.useMemo)(()=>a(h),[h]),M=(0,p.useMemo)(()=>s(h),[h]),v=(0,p.useMemo)(()=>u(h,c),[h,c]),S={p:h,off:g,r:M,geo:d,bodyMat:f,jointMat:b,joints:c},A=h.headShape[1]*h.headH;return(0,m.jsx)("group",{...l,children:(0,m.jsxs)("group",{position:[0,v,0],rotation:i("body",c.body),children:[(0,m.jsx)("mesh",{geometry:d.unitSphere,material:f,position:[0,-(.1*h.pelvisH),0],scale:[1.45*h.hipW,.62*h.pelvisH,1.45*h.hipW*h.torsoDepth]}),(0,m.jsx)(y,{rig:S,side:"L"}),(0,m.jsx)(y,{rig:S,side:"R"}),(0,m.jsxs)("group",{position:[0,g.waistY,0],rotation:i("torso",c.torso),children:[(0,m.jsx)(k,{rig:S,radius:M.waist,position:[0,0,0]}),(0,m.jsx)("mesh",{geometry:d.torso,material:f,scale:[1,1,h.torsoDepth]}),(0,m.jsx)("mesh",{geometry:d.neck,material:b,position:[0,g.neckBaseY+.4*h.neckLen,0]}),(0,m.jsx)(w,{rig:S,side:"L"}),(0,m.jsx)(w,{rig:S,side:"R"}),(0,m.jsx)("group",{position:[0,g.headPivotY,0],rotation:i("head",c.head),children:(0,m.jsx)("mesh",{geometry:d.unitSphere,material:f,position:[0,.82*A,0],scale:[h.headShape[0]*h.headH,A,h.headShape[2]*h.headH]})})]})]})})}function M(e,n){return new t.Mesh(e,n)}function v(e,t,n=[0,0,0]){let r=M(e.geo.unitSphere,e.joint);return r.position.set(...n),r.scale.setScalar(t),r}function S(e,t,n){return e.rotation.copy(i(t,n[t])),e}function A(e,n){let{p:r,joints:o,geo:i,body:l}=e,h=s(r),c=a(r),d=new t.Group;d.position.set(("L"===n?1:-1)*r.shoulderW,c.shoulderY,0),S(d,`shoulder${n}`,o),d.add(v(e,h.shoulder),M(i.upperArm,l));let u=new t.Group;u.position.set(0,-r.upperArmLen,0),S(u,`elbow${n}`,o),u.add(v(e,h.elbow),M(i.foreArm,l));let m=new t.Group;m.position.set(0,-r.foreArmLen,0),S(m,`wrist${n}`,o);let p=M(i.unitSphere,l);return p.position.set(0,-(.55*r.handLen),.004),p.scale.set(1.05*r.armR,.62*r.handLen,.62*r.armR),m.add(v(e,h.wrist),p),u.add(m),d.add(u),d}function x(e,n){let{p:r,joints:o,geo:i,body:l}=e,h=s(r),c=a(r),d=new t.Group;d.position.set(("L"===n?1:-1)*r.hipW,c.hipY,0),S(d,`hip${n}`,o),d.add(v(e,h.hip),M(i.thigh,l));let u=new t.Group;u.position.set(0,-r.thighLen,0),S(u,`knee${n}`,o),u.add(v(e,h.knee),M(i.shin,l));let m=new t.Group;m.position.set(0,-r.shinLen,0),S(m,`ankle${n}`,o);let p=M(i.unitSphere,l);return p.position.set(0,-(.5*r.footH),.2*r.footLen),p.scale.set(.19*r.footLen,.5*r.footH,.5*r.footLen),m.add(v(e,h.ankle),p),u.add(m),d.add(u),d}e.s(["POSE_PRESETS",0,f,"POSE_PRESET_IDS",0,b,"getPoseJoints",0,g,"resolvePoseJoints",0,L],306121),e.s(["Mannequin",0,j,"buildGeometries",0,R],569180),e.s(["buildFigureObject",0,function(e,r,o,i={preset:"stand"}){let l=n[e],h=R(l),c=L(i),d={geo:h,body:r,joint:o,joints:c,p:l},m=a(l),p=u(l,c),f=l.headShape[1]*l.headH,b=new t.Group,g=new t.Group;g.position.set(0,p,0),S(g,"body",c);let k=M(h.unitSphere,r);k.position.set(0,-(.1*l.pelvisH),0),k.scale.set(1.45*l.hipW,.62*l.pelvisH,1.45*l.hipW*l.torsoDepth),g.add(k,x(d,"L"),x(d,"R"));let w=new t.Group;w.position.set(0,m.waistY,0),S(w,"torso",c),w.add(v(d,s(l).waist));let y=M(h.torso,r);y.scale.set(1,1,l.torsoDepth);let j=M(h.neck,o);j.position.set(0,m.neckBaseY+.4*l.neckLen,0),w.add(y,j,A(d,"L"),A(d,"R"));let E=new t.Group;E.position.set(0,m.headPivotY,0),S(E,"head",c);let I=M(h.unitSphere,r);return I.position.set(0,.82*f,0),I.scale.set(l.headShape[0]*l.headH,f,l.headShape[2]*l.headH),E.add(I),w.add(E),g.add(w),b.add(g),{object:b,dispose:()=>{for(let e of Object.values(h))e.dispose()}}}],292892);let E=(e,t,n,r,o)=>({axis:e,min:t,max:n,label:{en:r,zh:o}}),I=[{id:"body",label:{en:"Body",zh:"身体"},joints:[{id:"body",label:{en:"Body (root)",zh:"身体"},axes:[E("x",-60,60,"Lean","前倾"),E("y",-180,180,"Turn","转身"),E("z",-45,45,"Tilt","侧倾")]}]},{id:"torso",label:{en:"Torso",zh:"躯干"},joints:[{id:"torso",label:{en:"Torso",zh:"躯干"},axes:[E("x",-45,70,"Lean","前倾"),E("y",-60,60,"Twist","扭转"),E("z",-40,40,"Tilt","侧倾")]}]},{id:"head",label:{en:"Head",zh:"头部"},joints:[{id:"head",label:{en:"Head",zh:"头部"},axes:[E("x",-40,50,"Nod","点头"),E("y",-80,80,"Turn","转头"),E("z",-40,40,"Tilt","歪头")]}]},{id:"armL",label:{en:"Left arm",zh:"左臂"},joints:[{id:"shoulderL",label:{en:"L shoulder",zh:"左肩"},axes:[E("x",-170,60,"Swing","前后摆"),E("y",-90,90,"Twist","旋转"),E("z",-30,180,"Raise","抬臂")]},{id:"elbowL",label:{en:"L elbow",zh:"左肘"},axes:[E("x",-150,0,"Bend","弯曲"),E("y",-95,95,"Twist","旋转")]},{id:"wristL",label:{en:"L wrist",zh:"左腕"},axes:[E("x",-80,80,"Bend","弯曲"),E("z",-45,45,"Wave","摆动")]}]},{id:"armR",label:{en:"Right arm",zh:"右臂"},joints:[{id:"shoulderR",label:{en:"R shoulder",zh:"右肩"},axes:[E("x",-170,60,"Swing","前后摆"),E("y",-90,90,"Twist","旋转"),E("z",-180,30,"Raise","抬臂")]},{id:"elbowR",label:{en:"R elbow",zh:"右肘"},axes:[E("x",-150,0,"Bend","弯曲"),E("y",-95,95,"Twist","旋转")]},{id:"wristR",label:{en:"R wrist",zh:"右腕"},axes:[E("x",-80,80,"Bend","弯曲"),E("z",-45,45,"Wave","摆动")]}]},{id:"legL",label:{en:"Left leg",zh:"左腿"},joints:[{id:"hipL",label:{en:"L hip",zh:"左髋"},axes:[E("x",-130,45,"Swing","前后摆"),E("y",-45,45,"Twist","旋转"),E("z",-30,85,"Spread","外展")]},{id:"kneeL",label:{en:"L knee",zh:"左膝"},axes:[E("x",0,150,"Bend","弯曲")]},{id:"ankleL",label:{en:"L ankle",zh:"左踝"},axes:[E("x",-35,50,"Bend","弯曲"),E("z",-25,25,"Tilt","侧倾")]}]},{id:"legR",label:{en:"Right leg",zh:"右腿"},joints:[{id:"hipR",label:{en:"R hip",zh:"右髋"},axes:[E("x",-130,45,"Swing","前后摆"),E("y",-45,45,"Twist","旋转"),E("z",-85,30,"Spread","外展")]},{id:"kneeR",label:{en:"R knee",zh:"右膝"},axes:[E("x",0,150,"Bend","弯曲")]},{id:"ankleR",label:{en:"R ankle",zh:"右踝"},axes:[E("x",-35,50,"Bend","弯曲"),E("z",-25,25,"Tilt","侧倾")]}]}];Object.fromEntries(I.flatMap(e=>e.joints.map(e=>[e.id,e]))),I.flatMap(e=>e.joints.map(e=>e.id)),e.s(["JOINT_SCHEMA",0,I],640635),e.s(["MannequinCrowd",0,function({rows:e=3,cols:t=3,spacing:n=.9,bodyType:r="male",color:o,...i}){let a=[];for(let i=0;i<e;i++)for(let s=0;s<t;s++)a.push((0,m.jsx)(j,{bodyType:r,color:o,pose:{preset:"stand"},position:[(s-(t-1)/2)*n,0,(i-(e-1)/2)*n]},`${i}-${s}`));return(0,m.jsx)("group",{...i,children:a})}],641095),e.s([],59846)},539869,653580,e=>{"use strict";var t=e.i(190072),n=e.i(156713);let r=Math.PI/180,o=180/Math.PI;function i(e,t){return!Number.isFinite(t)||t<=0?e:Math.round(e/t)*t}function a(e){return Math.max(...e.map(Math.abs))}function s(e){return[e[0]*r,e[1]*r,e[2]*r]}function l(e,t,n){if(e<=0||t<=0||!(n>0))return{width:0,height:0};let r=e,o=e/n;return o>t&&(o=t,r=t*n),{width:Math.max(1,Math.round(r)),height:Math.max(1,Math.round(o))}}function h(e){let t=e.objects.filter(e=>"camera"!==e.kind);if(0===t.length)return{center:[0,.9,0],radius:4};let n=1/0,r=1/0,o=1/0,i=-1/0,a=-1/0,l=-1/0;for(let e of t){let[t,h,c]=e.transform.position,[d,u,m]=e.transform.scale;if("prop"===e.kind&&(e.kit||e.asset||e.recipe)){let[p,f,b]=s(e.transform.rotation);for(let e of[-.5,.5])for(let s of[0,1])for(let g of[-.5,.5]){let L=e*d,R=s*u,k=g*m,w=L*Math.cos(b)-R*Math.sin(b),y=L*Math.sin(b)+R*Math.cos(b),j=w*Math.cos(f)+k*Math.sin(f),M=-w*Math.sin(f)+k*Math.cos(f),v=t+j,S=h+y*Math.cos(p)-M*Math.sin(p),A=c+y*Math.sin(p)+M*Math.cos(p);n=Math.min(n,v),i=Math.max(i,v),r=Math.min(r,S),a=Math.max(a,S),o=Math.min(o,A),l=Math.max(l,A)}continue}let p=(e.kind,.6*Math.abs(d)),f="figure"===e.kind?1.9*Math.abs(u):.6*Math.abs(u),b=.6*Math.abs(m);n=Math.min(n,t-p),i=Math.max(i,t+p),r=Math.min(r,h-("figure"===e.kind?0:f)),a=Math.max(a,h+f),o=Math.min(o,c-b),l=Math.max(l,c+b)}let h=[(n+i)/2,(r+a)/2,(o+l)/2],c=i-n,d=a-r,u=l-o;return{center:h,radius:Math.max(2,Math.sqrt(c*c+d*d+u*u)/2)}}let c=0;e.s(["DEG2RAD",0,r,"RAD2DEG",0,o,"SNAP_STEPS",0,{translate:.5,rotate:15,scale:.25},"createStageId",0,function(e){c+=1;let t="u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10);return`${e}_${Date.now().toString(36)}_${c.toString(36)}${t}`},"degToRadVec3",0,s,"fitAspectRect",0,function(e,t,r){return l(e,t,n.ASPECT_RATIOS[r])},"fitRatioRect",0,l,"initialSceneFramingBounds",0,function(e){let t=e.objects.filter(e=>{if("camera"===e.kind)return!1;if("prop"!==e.kind)return!0;let[t,n,o]=e.transform.scale.map(Math.abs),[i,,a]=e.transform.rotation;return!(.05>Math.abs(Math.sin(i*r))&&.05>Math.abs(Math.sin(a*r))&&Math.min(t,o)>=20&&n<=.03*Math.min(t,o))});return h(t.length?{objects:t}:e)},"nextObjectName",0,function(e,t){let n=new Set(t.map(e=>e.name));for(let t=1;t<1e3;t+=1){let r=`${e} ${t}`;if(!n.has(r))return r}return`${e} ${t.length+1}`},"radToDegVec3",0,function(e){return[e[0]*o,e[1]*o,e[2]*o]},"rescaleProportionally",0,function(e,t){let n=a(e);return!Number.isFinite(t)||t<=0?[...e]:n<1e-8?[t,t,t]:e.map(e=>e*t/n)},"resolveLookAtPoint",0,function(e,t){let n=e.lookAt;if(Array.isArray(n))return n;let r=t.find(e=>e.id===n.targetId);if(!r)return[0,1,0];let[o,i,a]=r.transform.position;return[o,i+("figure"===r.kind?1.1*r.transform.scale[1]:"prop"===r.kind&&(r.kit||r.asset||r.recipe)?.5*r.transform.scale[1]:0),a]},"sceneBounds",0,h,"sceneCameraFar",0,function(e,t){return Math.max(500,Math.hypot(...e.map((e,n)=>e-t.center[n]))+1.2*t.radius)},"sceneFitDistance",0,function(e,t,n){let o=t*r/2,i=Math.atan(Math.tan(o)*Math.max(.01,n));return Math.max(2,e/Math.sin(Math.min(o,i))*1.15)},"snapVec3",0,function(e,t){return[i(e[0],t),i(e[1],t),i(e[2],t)]},"uniformScaleValue",0,a],653580);let d="__sampled__",u={linear:e=>e,easeIn:e=>e**3,easeOut:e=>1-(1-e)**3,easeInOut:e=>e<.5?4*e**3:1-(-2*e+2)**3/2,hold:()=>0};function m(e,t){let n=t<0?0:t>1?1:t,r=u[e];return r?r(n):n}function p(e,t,n){var r,o,i;return[(r=e[0],r+(t[0]-r)*n),(o=e[1],o+(t[1]-o)*n),(i=e[2],i+(t[2]-i)*n)]}let f=[0,0,0];function b(e,t,n){let r;return e+((r=(t-e)%360)>180?r-360:r<=-180?r+360:r)*n}let g={"transform.position":p,"transform.rotation":function(e,n,i){if(i<=0)return e;if(i>=1)return n;let a=new t.Quaternion().setFromEuler(new t.Euler(e[0]*r,e[1]*r,e[2]*r,"XYZ")),s=new t.Quaternion().setFromEuler(new t.Euler(n[0]*r,n[1]*r,n[2]*r,"XYZ"));a.slerp(s,i);let l=new t.Euler().setFromQuaternion(a,"XYZ");return[l.x*o,l.y*o,l.z*o]},"transform.scale":p,"pose.joints":function(e,t,n){if(n<=0)return e;if(n>=1)return t;let r={};for(let a of new Set([...Object.keys(e.joints),...Object.keys(t.joints)])){var o,i;r[a]=(o=e.joints[a]??f,i=t.joints[a]??f,[b(o[0],i[0],n),b(o[1],i[1],n),b(o[2],i[2],n)])}return{preset:d,joints:r}},"camera.fov":function(e,t,n){return e+(t-e)*n},"camera.lookAt":function(e,t,n){return n<=0?e:n>=1?t:Array.isArray(e)&&Array.isArray(t)?p(e,t,n):e}};function L(e,t,n){if(!e||0===e.length)return;let r=e[0];if(t<=r.t)return r.value;let o=e[e.length-1];if(t>=o.t)return o.value;let i=0;for(;i+1<e.length&&e[i+1].t<=t;)i+=1;let a=e[i],s=e[i+1];if(!s||1e-4>=Math.abs(t-a.t)||"hold"===a.ease)return a.value;let l=s.t-a.t;if(l<=1e-4)return s.value;let h=m(a.ease,(t-a.t)/l);return n(a.value,s.value,h)}function R(e,t,n){return L(e[t],n,g[t])}function k(e){return!!e&&Object.values(e).some(e=>Array.isArray(e)&&e.length>0)}function w(e){return!!e.tracks&&Object.values(e.tracks).some(k)}function y(e,t,n){if(!t||!k(t))return e;let r=R(t,"transform.position",n),o=R(t,"transform.rotation",n),i=R(t,"transform.scale",n),a={...e,transform:{position:r??e.transform.position,rotation:o??e.transform.rotation,scale:i??e.transform.scale}};if("figure"===a.kind){let e=R(t,"pose.joints",n);e&&(a={...a,pose:{preset:e.preset,joints:e.joints}})}else if("camera"===a.kind){let e=R(t,"camera.fov",n),r=R(t,"camera.lookAt",n
1);(void 0!==e||void 0!==r)&&(a={...a,fov:e??a.fov,lookAt:r??a.lookAt})}return a}function j(e,t){if(!w(e))return e.objects;let n=e.tracks??{};return e.objects.map(e=>y(e,n[e.id],t))}let M=null;e.s(["KEYFRAME_EPS",0,1e-4,"SAMPLED_POSE_PRESET",0,d,"applyEase",0,m,"docHasKeyframes",0,w,"getSampledObjects",0,function(e,t){if(M&&M.doc===e&&M.t===t)return M.result;let n=j(e,t);return M={doc:e,t,result:n},n},"sampleObjectAtTime",0,y,"sampleSceneAtTime",0,j,"sampleTrack",0,L],539869)},773447,e=>{"use strict";var t=e.i(653580),n=e.i(539869);let r=["orbit","dolly","tracking","crane","flythrough"],o=(e,t)=>e.map((e,n)=>e+t[n]),i=(e,t)=>e.map((e,n)=>e-t[n]),a=(e,t)=>e.map(e=>e*t),s=e=>Math.hypot(...e);e.s(["CAMERA_MOVES",0,r,"bakeCameraMove",0,function(e,l,h){let c=e.objects.find(e=>"camera"===e.kind&&e.id===l);if(!c)throw Error("Select a camera first.");if(!r.includes(h.kind)||!Number.isFinite(h.duration)||h.duration<.25||h.duration>60)throw Error("Choose a camera move lasting 0.25–60 seconds.");for(let[e,t]of Object.entries(h))if(["angle","distance","height"].includes(e)&&("number"!=typeof t||!Number.isFinite(t)||Math.abs(t)>1e3))throw Error("Invalid camera movement amount.");let d=c.transform.position,u=(0,t.resolveLookAtPoint)(c,e.objects),m=i(d,u),p=a(i(u,d),1/Math.max(s(m),.001)),f=[-p[2],0,p[0]],b=s(f),g=b>.001?a(f,1/b):[1,0,0];if("dolly"===h.kind&&(h.distance??.4*s(m))>=s(m)-.05)throw Error("The camera crosses its look-at point. Shorten the move.");let L=[],R=[0];if("flythrough"===h.kind){let e=h.waypoints;if(!e||e.length<2||e.length>12||e.some(e=>!Array.isArray(e)||3!==e.length||e.some(e=>!Number.isFinite(e)||Math.abs(e)>1e4)))throw Error("A flythrough needs 2–12 waypoint positions.");let t=[d,...e];L=Array.from({length:257},(e,n)=>(function(e,t){let n=Math.min(e.length-2,Math.floor(t*(e.length-1))),r=t*(e.length-1)-n,[o,i,a,s]=[e[Math.max(0,n-1)],e[n],e[n+1],e[Math.min(e.length-1,n+2)]];return i.map((e,t)=>.5*(2*e+(-o[t]+a[t])*r+(2*o[t]-5*e+4*a[t]-s[t])*r*r+(-o[t]+3*e-3*a[t]+s[t])*r*r*r))})(t,n/256));for(let e=1;e<L.length;e++)R.push(R[e-1]+s(i(L[e],L[e-1])))}let k=[],w=[];for(let r=0;r<=64;r++){let l=r/64,f=!1===h.smooth?l:l*l*l*(l*(6*l-15)+10),b=(0,t.resolveLookAtPoint)(c,(0,n.getSampledObjects)(e,l*h.duration)),y=d,j=b;switch(h.kind){case"orbit":{let e=(h.angle??90)*Math.PI/180*f;y=o(b,[m[0]*Math.cos(e)+m[2]*Math.sin(e),m[1]+(h.height??0)*f,-m[0]*Math.sin(e)+m[2]*Math.cos(e)]);break}case"dolly":y=o(d,a(p,(h.distance??.4*s(m))*f));break;case"tracking":{let e=a(g,(h.distance??5)*f);y=o(o(d,i(b,u)),e),j=b;break}case"crane":y=o(d,o(a(p,(h.distance??0)*f),[0,(h.height??5)*f,0]));break;case"flythrough":{let e=R[R.length-1]*f,t=1;for(;t<R.length-1&&R[t]<e;)t++;let n=(e-R[t-1])/Math.max(1e-6,R[t]-R[t-1]);y=o(L[t-1],a(i(L[t],L[t-1]),n))}}if(.05>s(i(y,j)))throw Error("The camera crosses its look-at point. Shorten the move or change its aim.");k.push({t:l*h.duration,value:y,ease:"linear"}),w.push({t:l*h.duration,value:j,ease:"linear"})}return{...e,settings:{...e.settings,timeline:{fps:e.settings.timeline?.fps??30,duration:Math.max(e.settings.timeline?.duration??5,h.duration)}},tracks:{...e.tracks,[l]:{...e.tracks?.[l],"transform.position":k,"camera.lookAt":w}}}}])},488174,e=>{"use strict";e.i(59846),e.s(["BODY_TYPES",0,[{id:"male",label:{en:"Male",zh:"男性素体"}},{id:"female",label:{en:"Female",zh:"女性素体"}},{id:"broad",label:{en:"Broad",zh:"宽厚素体"}},{id:"muscular",label:{en:"Muscular",zh:"健壮素体"}},{id:"slim",label:{en:"Slim",zh:"纤细素体"}},{id:"youth",label:{en:"Youth",zh:"少年素体"}},{id:"child",label:{en:"Child",zh:"儿童素体"}},{id:"chibi",label:{en:"Chibi (2-head)",zh:"二头身"}}]])},943606,217741,427681,e=>{"use strict";var t=e.i(773447),n=e.i(768834),r=e.i(539869);e.i(488174);var o=e.i(306121),i=e.i(156713);let a="easeInOut";function s(e,t){return Math.abs(e-t)<=r.KEYFRAME_EPS}function l(e,t){let{duration:n}=(0,i.timelineOf)(e);return Math.min(Math.max(0,t),n)}function h(e,t,n,r){if(!e.objects.some(e=>e.id===t))return e;let o=e.tracks??{},i=o[t]??{},a=i[n]??[],s=r(a);if(null===s||s===a)return e;let l={...i};0===s.length?delete l[n]:l[n]=s;let h={...o};return 0===Object.keys(l).length?delete h[t]:h[t]=l,{...e,tracks:h}}function c(e,t,n,r){let o=l(e,r.t);return h(e,t,n,e=>{let t=e.findIndex(e=>s(e.t,o)),n=e.slice();if(t>=0){let o=e[t];n[t]={t:o.t,value:r.value,ease:r.ease??o.ease}}else n.push({t:o,value:r.value,ease:r.ease??a}),n.sort((e,t)=>
1e.t-t.t);return n})}function d(e,t,n,r){return h(e,t,n,e=>{let t=e.filter(e=>!s(e.t,r));return t.length===e.length?null:t})}function u(e,t,n,r,o){let i=l(e,o);return h(e,t,n,e=>{let t=e.findIndex(e=>s(e.t,r));if(-1===t||s(e[t].t,i))return null;let n={...e[t],t:i},o=e.filter((e,n)=>n!==t).filter(e=>!s(e.t,i));return o.push(n),o.sort((e,t)=>e.t-t.t),o})}function m(e,t,n,r,o){return h(e,t,n,e=>{let t=e.findIndex(e=>s(e.t,r));if(-1===t||e[t].ease===o)return null;let n=e.slice();return n[t]={...n[t],ease:o},n})}function p(e,t,n,r){return h(e,t,n,e=>0===e.length||e.every(e=>e.ease===r)?null:e.map(e=>e.ease===r?e:{...e,ease:r}))}function f(e,t){if(!e.tracks||!(t in e.tracks))return e;let n={...e.tracks};return delete n[t],{...e,tracks:n}}function b(e,t,n){let r=e.tracks?.[t];return r&&0!==Object.keys(r).length?{...e,tracks:{...e.tracks,[n]:structuredClone(r)}}:e}function g(e){switch(e.kind){case"figure":return["transform.position","transform.rotation","transform.scale","pose.joints"];case"prop":return["transform.position","transform.rotation","transform.scale"];case"camera":return["transform.position","transform.rotation","camera.fov","camera.lookAt"]}}function L(e,t){switch(t){case"transform.position":return[...e.transform.position];case"transform.rotation":return[...e.transform.rotation];case"transform.scale":return[...e.transform.scale];case"pose.joints":if("figure"!==e.kind)return null;return{preset:e.pose.preset,joints:(0,o.resolvePoseJoints)(e.pose)};case"camera.fov":return"camera"===e.kind?e.fov:null;case"camera.lookAt":return"camera"===e.kind?structuredClone(e.lookAt):null}}e.s(["DEFAULT_KEYFRAME_EASE",0,a,"clampTime",0,l,"copyObjectTracks",0,b,"findKeyframe",0,function(e,t,n,r){let o=e.tracks?.[t]?.[n];return o?.find(e=>s(e.t,r))??null},"keyframeValueFromObject",0,L,"moveKeyframe",0,u,"relevantTrackKeys",0,g,"removeKeyframe",0,d,"removeObjectTracks",0,f,"setKeyframeEase",0,m,"setTrackEase",0,p,"upsertKeyframe",0,c],217741);var R=e.i(653580);function k(e,t){let n=e.objects.find(e=>e.id===t&&"figure"===e.kind)??e.objects.find(e=>"figure"===e.kind);return n?{position:[...n.transform.position],yawDeg:n.transform.rotation[1],scaleY:n.transform.scale[1]}:{position:[0,0,0],yawDeg:0,scaleY:1}}let w={"front-medium":{distance:3.2,height:1.45,orbitDeg:0,fov:40,aimHeight:1.25},"front-closeup":{distance:1.5,height:1.55,orbitDeg:0,fov:35,aimHeight:1.5},"front-wide":{distance:7.5,height:1.7,orbitDeg:0,fov:55,aimHeight:1},"side-tracking":{distance:4,height:1.5,orbitDeg:90,fov:45,aimHeight:1.2},"side-close":{distance:2,height:1.5,orbitDeg:90,fov:40,aimHeight:1.35}};function y(e,t,n="16:9"){let r=w[e],o=Math.max(.2,t.scaleY),i=(t.yawDeg+r.orbitDeg)*R.DEG2RAD,a=Math.sin(i)*r.distance*o,s=Math.cos(i)*r.distance*o;return{position:[t.position[0]+a,t.position[1]+r.height*o,t.position[2]+s],lookAt:[t.position[0],t.position[1]+r.aimHeight*o,t.position[2]],fov:r.fov,aspect:n}}function j(e,t,n,r="16:9"){return{position:[...e],lookAt:[...t],fov:n,aspect:r}}e.s(["CAMERA_PRESETS",0,[{id:"current-view",labelKey:"presetCurrentView"},{id:"front-medium",labelKey:"presetFrontMedium"},{id:"front-closeup",labelKey:"presetFrontCloseup"},{id:"front-wide",labelKey:"presetFrontWide"},{id:"side-tracking",labelKey:"presetSideTracking"},{id:"side-close",labelKey:"presetSideClose"}],"computeCameraPreset",0,y,"computeCurrentViewPreset",0,j,"presetAnchorFromScene",0,k],427681);let M={figure:"Figure",prop:"Prop",camera:"Camera"};function v(e){let t=e.filter(e=>"camera"!==e.kind).map(e=>e.transform.position),n=(e,n)=>t.every(t=>(t[0]-e)**2+(t[2]-n)**2>.81);if(n(0,0))return[0,0,0];for(let e=1;e<=6;e+=1){let t=1.2*e,r=6*e;for(let e=0;e<r;e+=1){let o=e/r*Math.PI*2,i=Math.round(Math.sin(o)*t*4)/4,a=Math.round(Math.cos(o)*t*4)/4;if(n(i,a))return[i,0,a]}}return[6*Math.random()-3,0,6*Math.random()-3]}function S(e=[0,0,0]){return{position:e,rotation:[0,0,0],scale:[1,1,1]}}function A(e,t){let n=(0,R.createStageId)(e),r=(0,R.nextObjectName)(M[e],t.objects);switch(e){case"figure":return{id:n,kind:e,name:r,transform:S(v(t.objects)),bodyType:"male",color:"#c9c2b8",pose:{preset:"stand"}};case"prop":return{id:n,kind:e,name:r,transform:S(v(t.objects)),shape:"cube",color:"#7aa2c4"};case"camera":{let o=y("front-medium",k(t,null));return{id:n,kind:e,name:r,transform:S(o.position),fov:o.fov,lookAt:o.lookAt,aspect:"16:9"}}}}function x(e){return e.autoKeyOverride??(0,r.docHasKeyframes)(e.doc)}let E=(0,n.create)()((e,n)=>{function a(t,r){let{doc:o,past:i,docRevision:a}=n(),s=t(o);s===o||e({doc:s,docRevision:a+1,...r?.history!==!1?{past:[...i.slice(-49),o],future:[]}:null})}function s(e,t,n){a(n=>{let r=n.objects.findIndex(t=>t.id===e);if(-1===r)return n;let o=t(n.objects[r]);if(o===n.objects[r])return n;let i=n.objects.slice();return i[r]=o,{...n,objects:i}},n)}function h(e,t,r){let o=n();if(0===t.length||!x(o))return!1;let i=l(o.doc,o.currentTime);return a(n=>{let r=n;for(let[n,o]of t)r=c(r,e,n,{t:i,value:o});return r},r),!0}return{doc:(0,i.createEmptySceneDoc)(),docRevision:0,selectedId:null,viewMode:"director",gizmoMode:"translate",fitViewNonce:0,initialFramingPending:!1,viewInteractionNonce:0,currentTime:0,playing:!1,loop:!0,autoKeyOverride:null,timelineOpen:!1,selectedKeyframe:null,past:[],future:[],loadDoc:t=>e(e=>({doc:t,docRevision:e.docRevision+1,past:[],future:[],selectedId:null,viewMode:t.activeCameraId?e.viewMode:"director",currentTime:0,playing:!1,selectedKeyframe:null,autoKeyOverride:null,timelineOpen:e.timelineOpen||(0,r.docHasKeyframes)(t)})),getDoc:()=>n().doc,replaceScene:t=>{a(()=>
1t),e({selectedId:null,selectedKeyframe:null,currentTime:0,playing:!1,autoKeyOverride:null,viewMode:t.activeCameraId?"camera":"director",timelineOpen:!1})},addObject:(t,r)=>{let o={...A(t,n().doc),...r};return a(e=>({...e,objects:[...e.objects,o],activeCameraId:"camera"===o.kind&&null===e.activeCameraId?o.id:e.activeCameraId})),e({selectedId:o.id}),o.id},addObjectsBatch:t=>{if(0===t.length)return[];let n=[];a(e=>{let r=e;for(let e of t){let t={...A(e.kind,r),...e.overrides};n.push(t.id),r={...r,objects:[...r.objects,t],activeCameraId:"camera"===t.kind&&null===r.activeCameraId?t.id:r.activeCameraId}}return r});let r=n[n.length-1];return r&&e({selectedId:r}),n},removeObject:t=>{a(e=>{if(!e.objects.find(e=>e.id===t))return e;let n=e.objects.filter(e=>e.id!==t),r=e.activeCameraId;return r===t&&(r=n.find(e=>"camera"===e.kind)?.id??null),f({...e,objects:n,activeCameraId:r},t)});let{doc:r,selectedId:o,viewMode:i,selectedKeyframe:s}=n(),l={};o===t&&(l.selectedId=null),s?.objectId===t&&(l.selectedKeyframe=null),"camera"===i&&null===r.activeCameraId&&(l.viewMode="director"),Object.keys(l).length>0&&e(l)},duplicateObject:t=>{let r=n().doc.objects.find(e=>e.id===t);if(!r)return null;let o=structuredClone(r);return o.id=(0,R.createStageId)(r.kind),o.name=(0,R.nextObjectName)(r.name.replace(/ \d+$/,""),n().doc.objects),o.transform.position=[o.transform.position[0]+.75,o.transform.position[1],o.transform.position[2]+.25],a(e=>b({...e,objects:[...e.objects,o]},t,o.id)),e({selectedId:o.id}),o.id},renameObject:(e,t)=>{let n=t.trim();n&&s(e,e=>e.name===n?e:{...e,name:n})},updateTransform:(e,t,r)=>{let o=r?.snap??n().doc.settings.gridSnap,i=t.position?o?(0,R.snapVec3)(t.position,R.SNAP_STEPS.translate):t.position:void 0,a=t.rotation?o?(0,R.snapVec3)(t.rotation,R.SNAP_STEPS.rotate):t.rotation:void 0,l=t.scale?o?(0,R.snapVec3)(t.scale,R.SNAP_STEPS.scale):t.scale:void 0,c=[];i&&c.push(["transform.position",i]),a&&c.push(["transform.rotation",a]),l&&c.push(["transform.scale",l]),h(e,c,r)||s(e,e=>{let t={...e.transform};return i&&(t.position=i),a&&(t.rotation=a),l&&(t.scale=l),{...e,transform:t}},{history:r?.history})},beginTransformSession:()=>{let{doc:t,past:r}=n();e({past:[...r.slice(-49),t],future:[]})},updateFigure:(e,t,r)=>{let{pose:i,...a}=t;if(i&&x(n())){if(h(e,[["pose.joints",{preset:i.preset,joints:(0,o.resolvePoseJoints)(i)}]],r),0===Object.keys(a).length)return;s(e,e=>"figure"===e.kind?{...e,...a}:e,r);return}s(e,e=>"figure"===e.kind?{...e,...t}:e,r)},updateProp:(e,t,n)=>s(e,e=>"prop"===e.kind?{...e,...t}:e,n),updateCamera:(e,t,n)=>{let{fov:r,lookAt:o,...i}=t,a=[];if(void 0!==r&&a.push(["camera.fov",r]),void 0!==o&&a.push(["camera.lookAt",o]),h(e,a,n)){if(0===Object.keys(i).length)return;s(e,e=>"camera"===e.kind?{...e,...i}:e,n);return}s(e,e=>"camera"===e.kind?{...e,...t}:e,n)},updateSettings:(e,t)=>a(t=>({...t,settings:{...t.settings,...e}}),t),setActiveCamera:e=>a(t=>null===e||t.objects.some(t=>t.id===e&&"camera"===t.kind)?t.activeCameraId===e?t:{...t,activeCameraId:e}:t),select:t=>{if(e({selectedId:t}),t){let e=n().doc.objects.find(e=>e.id===t);e?.kind==="camera"&&n().doc.activeCameraId!==t&&a(e=>({...e,activeCameraId:t}),{history:!1})}},setViewMode:t=>{if("camera"===t){let{doc:e}=n(),t=e.activeCameraId??e.objects.find(e=>"camera"===e.kind)?.id??null;if(!t)return;t!==e.activeCameraId&&a(e=>({...e,activeCameraId:t}),{history:!1})}e(e=>({viewMode:t,initialFramingPending:!1,viewInteractionNonce:e.viewInteractionNonce+1}))},setGizmoMode:t=>e({gizmoMode:t}),requestFitView:()=>e(e=>({fitViewNonce:e.fitViewNonce+1,initialFramingPending:!1,viewInteractionNonce:e.viewInteractionNonce+1})),noteViewInteraction:()=>e(e=>({initialFramingPending:!1,viewInteractionNonce:e.viewInteractionNonce+1})),applyCameraMove:(n,r)=>{a(e=>(0,t.bakeCameraMove)(e,n,r)),e({currentTime:0,timelineOpen:!0,playing:!1})},addCameraFromPreset:e=>{let{doc:t,selectedId:r,addObject:o}=n(),i=y(e,k(t,r)),a=o("camera",{transform:S(i.position),fov:i.fov,lookAt:i.lookAt,aspect:i.aspect});return n().setActiveCamera(a),a},addCameraFromCurrentView:(e,t,r=40)=>{let o=j(e,t,r),i=n().addObject("camera",{transform:S(o.position),fov:o.fov,lookAt:o.lookAt,aspect:o.aspect});return n().setActiveCamera(i),i},setCurrentTime:t=>{let{duration:r}=(0,i.timelineOf)(n().doc);e({currentTime:Math.min(Math.max(0,t),r)})},setPlaying:t=>{if(!t)return void e({playing:!1});let{currentTime:o,doc:a}=n(),{duration:s}=(0,i.timelineOf)(a);e({playing:!0,currentTime:o>=s-r.KEYFRAME_EPS?0:o})},toggleLoop:()=>e(e=>({loop:!e.loop})),setAutoKey:t=>e({autoKeyOverride:t}),setTimelineOpen:t=>e({timelineOpen:t}),selectKeyframe:t=>e({selectedKeyframe:t}),updateTimeline:t=>{a(e=>{let n=(0,i.timelineOf)(e),r=Math.min(Math.max(.5,t.duration??n.duration),i.MAX_TIMELINE_DURATION),o=Math.min(Math.max(1,Math.round(t.fps??n.fps)),60);return r===n.duration&&o===n.fps&&e.settings.timeline?e:{...e,settings:{...e.settings,timeline:{duration:r,fps:o}}}});let{currentTime:r,doc:o}=n(),{duration:s}=(0,i.timelineOf)(o);r>s&&e({currentTime:s})},addKeyframesAtPlayhead:t=>{let o=n(),i=(0,r.getSampledObjects)(o.doc,o.currentTime).find(e=>e.id===t);if(!i)return;let s=l(o.doc,o.currentTime);a(e=>{let n=e;for(let e of g(i)){let r=L(i,e);null!==r&&(n=c(n,t,e,{t:s,value:r}))}return n}),e({timelineOpen:!0})},upsertKeyframe:(e,t,n,r)=>a(r=>c(r,e,t,n),r),removeKeyframe:(t,o,i)=>{a(e=>d(e,t,o,i));let s=n().selectedKeyframe;s&&s.objectId===t&&s.trackKey===o&&Math.abs(s.t-i)<=r.KEYFRAME_EPS&&e({selectedKeyframe:null})},moveKeyframe:(t,o,i,s,h)=>{let c=n().doc;
1if(a(e=>u(e,t,o,i,s),h),n().doc===c)return;let d=n().selectedKeyframe;d&&d.objectId===t&&d.trackKey===o&&Math.abs(d.t-i)<=r.KEYFRAME_EPS&&e({selectedKeyframe:{objectId:t,trackKey:o,t:l(n().doc,s)}})},setKeyframeEase:(e,t,n,r)=>a(o=>m(o,e,t,n,r)),setTrackEase:(e,t,n)=>a(r=>p(r,e,t,n)),undo:()=>{let{past:t,future:r,doc:o,docRevision:i,selectedId:a}=n();if(0===t.length)return;let s=t[t.length-1];e({doc:s,docRevision:i+1,past:t.slice(0,-1),future:[o,...r].slice(0,50),selectedId:s.objects.some(e=>e.id===a)?a:null})},redo:()=>{let{past:t,future:r,doc:o,docRevision:i,selectedId:a}=n();if(0===r.length)return;let[s,...l]=r;e({doc:s,docRevision:i+1,past:[...t.slice(-49),o],future:l,selectedId:s.objects.some(e=>e.id===a)?a:null})}}});e.s(["HISTORY_LIMIT",0,50,"selectActiveCamera",0,function(e){let{doc:t}=e;if(!t.activeCameraId)return null;let n=t.objects.find(e=>e.id===t.activeCameraId);return n?.kind==="camera"?n:null},"selectEffectiveAutoKey",0,x,"selectSampledActiveCamera",0,function(e){let t=e.doc.activeCameraId;if(!t)return null;let n=(0,r.getSampledObjects)(e.doc,e.currentTime).find(e=>e.id===t);return n?.kind==="camera"?n:null},"selectSampledSelectedObject",0,function(e){return e.selectedId?(0,r.getSampledObjects)(e.doc,e.currentTime).find(t=>t.id===e.selectedId)??null:null},"selectSelectedObject",0,function(e){return e.doc.objects.find(t=>t.id===e.selectedId)??null},"useStage3dStore",0,E],943606)}]);

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