@galacean/cli 2.0.0-alpha.23 → 2.0.0-alpha.24

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.
Files changed (89) hide show
  1. package/dist/cli.bundle.cjs +74 -12
  2. package/dist/preview-client/_static/{Accordion-75b7b34e.js → Accordion-f938dadf.js} +1 -1
  3. package/dist/preview-client/_static/{AmbientLightAsset-02786385.js → AmbientLightAsset-e34de607.js} +1 -1
  4. package/dist/preview-client/_static/{AnimationClipAsset-f96e0e56.js → AnimationClipAsset-b084da2a.js} +1 -1
  5. package/dist/preview-client/_static/{AnimatorControllerAsset-23cceb12.js → AnimatorControllerAsset-6cc04274.js} +1 -1
  6. package/dist/preview-client/_static/{AnimatorStore-48d2c14c.js → AnimatorStore-0bc90c37.js} +1 -1
  7. package/dist/preview-client/_static/{AssetViewer-1073ddb5.js → AssetViewer-d2c63b00.js} +1 -1
  8. package/dist/preview-client/_static/{AudioAsset-6218f2bb.js → AudioAsset-9c715952.js} +1 -1
  9. package/dist/preview-client/_static/{AudioComponent-16766db8.js → AudioComponent-80d06ef4.js} +1 -1
  10. package/dist/preview-client/_static/{Callout-312ada1c.js → Callout-48e71f13.js} +1 -1
  11. package/dist/preview-client/_static/{CameraComponent-c919c2dd.js → CameraComponent-9c9db3fb.js} +1 -1
  12. package/dist/preview-client/_static/{Component-6d1e73e5.js → Component-b95aa2af.js} +1 -1
  13. package/dist/preview-client/_static/{DirectLight-166a628d.js → DirectLight-b0490ef7.js} +1 -1
  14. package/dist/preview-client/_static/{FontAsset-8367aad9.js → FontAsset-6e9c0549.js} +1 -1
  15. package/dist/preview-client/_static/{FormItemArray-53c58844.js → FormItemArray-b2a3d249.js} +1 -1
  16. package/dist/preview-client/_static/{GlTFAsset-5c8e7813.js → GlTFAsset-83e8190e.js} +1 -1
  17. package/dist/preview-client/_static/{IconPlus-5fbc029e.js → IconPlus-172c6c17.js} +1 -1
  18. package/dist/preview-client/_static/{IconPointFilled-dbf63b5c.js → IconPointFilled-bad94cf1.js} +1 -1
  19. package/dist/preview-client/_static/{LightBaseComponent-545c5ee8.js → LightBaseComponent-b4854e8a.js} +1 -1
  20. package/dist/preview-client/_static/{LottieAnimationComponent-4db5a6c2.js → LottieAnimationComponent-efd5da2b.js} +1 -1
  21. package/dist/preview-client/_static/{MarkdownAsset-58491579.js → MarkdownAsset-b42846c0.js} +1 -1
  22. package/dist/preview-client/_static/{MaterialAsset-c83c7d3d.js → MaterialAsset-0b9d7eba.js} +1 -1
  23. package/dist/preview-client/_static/{MaterialInspector-237b6a5e.js → MaterialInspector-23ea0240.js} +1 -1
  24. package/dist/preview-client/_static/{Menu-a427d272.js → Menu-05c1f0a4.js} +1 -1
  25. package/dist/preview-client/_static/{MeshAsset-1c11d7ab.js → MeshAsset-85e99837.js} +1 -1
  26. package/dist/preview-client/_static/{MeshRendererBaseComponent-8fd1f0df.js → MeshRendererBaseComponent-5621d663.js} +1 -1
  27. package/dist/preview-client/_static/{MeshRendererComponent-082c1a1a.js → MeshRendererComponent-c3c3c683.js} +1 -1
  28. package/dist/preview-client/_static/{MeshThumbnail-d8ee2674.js → MeshThumbnail-b1283749.js} +1 -1
  29. package/dist/preview-client/_static/{ParticleRendererComponent-ff12cdb1.js → ParticleRendererComponent-94656239.js} +1 -1
  30. package/dist/preview-client/_static/{PhysicsMaterialAsset-7e86c718.js → PhysicsMaterialAsset-cb9afb6e.js} +1 -1
  31. package/dist/preview-client/_static/{PhysicsStore-66a9a461.js → PhysicsStore-0a751fa0.js} +1 -1
  32. package/dist/preview-client/_static/{PointLight-a9992e50.js → PointLight-a2bfed75.js} +1 -1
  33. package/dist/preview-client/_static/{PostProcessComponent-c17ac553.js → PostProcessComponent-040cf521.js} +1 -1
  34. package/dist/preview-client/_static/{PrefabAsset-a6750aec.js → PrefabAsset-265f6f48.js} +1 -1
  35. package/dist/preview-client/_static/{PrimitiveMesh-388f3f36.js → PrimitiveMesh-70c93e7e.js} +1 -1
  36. package/dist/preview-client/_static/{ReferencedMaterial-f7ea80fb.js → ReferencedMaterial-831d0583.js} +1 -1
  37. package/dist/preview-client/_static/{RenderTargetAsset-c48990a4.js → RenderTargetAsset-b810caf3.js} +1 -1
  38. package/dist/preview-client/_static/{SceneAsset-1e802e29.js → SceneAsset-d05b1a79.js} +1 -1
  39. package/dist/preview-client/_static/{ShaderAsset-256afb00.js → ShaderAsset-370b6f1c.js} +1 -1
  40. package/dist/preview-client/_static/{ShaderChunkAsset-a42443fc.js → ShaderChunkAsset-e3487bd1.js} +1 -1
  41. package/dist/preview-client/_static/{ShaderUIScriptAsset-5acb02f5.js → ShaderUIScriptAsset-ebf57ceb.js} +1 -1
  42. package/dist/preview-client/_static/{SkinnedMeshRendererComponent-934c055b.js → SkinnedMeshRendererComponent-ee33da25.js} +1 -1
  43. package/dist/preview-client/_static/{SpineAnimationComponent-b04ba1ee.js → SpineAnimationComponent-12e694e8.js} +1 -1
  44. package/dist/preview-client/_static/{SpineSkeletonDataAsset-fff17383.js → SpineSkeletonDataAsset-0dffbb4d.js} +1 -1
  45. package/dist/preview-client/_static/{SpotLight-617d8957.js → SpotLight-ada565f2.js} +1 -1
  46. package/dist/preview-client/_static/{SpriteBaseComponent-062cb4f8.js → SpriteBaseComponent-3156cb3b.js} +1 -1
  47. package/dist/preview-client/_static/{SpriteMaskComponent-43ae2b1f.js → SpriteMaskComponent-a32024e1.js} +1 -1
  48. package/dist/preview-client/_static/{SpriteRendererComponent-4f52910c.js → SpriteRendererComponent-489486e0.js} +1 -1
  49. package/dist/preview-client/_static/{TextBaseComponent-bd7ed8ee.js → TextBaseComponent-520dea39.js} +1 -1
  50. package/dist/preview-client/_static/{TextRendererComponent-8db74598.js → TextRendererComponent-6be5f80c.js} +1 -1
  51. package/dist/preview-client/_static/{TextureAsset-d88af413.js → TextureAsset-9cd94531.js} +1 -1
  52. package/dist/preview-client/_static/{Tooltip-3bc02b10.js → Tooltip-71e5a4e7.js} +1 -1
  53. package/dist/preview-client/_static/{TrailRendererComponent-42a58f1d.js → TrailRendererComponent-74bf88c0.js} +1 -1
  54. package/dist/preview-client/_static/{TransformBaseComponent-77478ccb.js → TransformBaseComponent-0d241199.js} +1 -1
  55. package/dist/preview-client/_static/{TransformComponent-0f395b08.js → TransformComponent-49d279f5.js} +1 -1
  56. package/dist/preview-client/_static/{XRReferenceImageAsset-d6d8e59c.js → XRReferenceImageAsset-79e78558.js} +1 -1
  57. package/dist/preview-client/_static/{audio-d14900e2.js → audio-5d0ddf55.js} +1 -1
  58. package/dist/preview-client/_static/{createOnModelChange-c010a049.js → createOnModelChange-e65da908.js} +1 -1
  59. package/dist/preview-client/_static/{createReactComponent-d9f8b1af.js → createReactComponent-cb70ea50.js} +1 -1
  60. package/dist/preview-client/_static/index-0fef73f8.js +1 -0
  61. package/dist/preview-client/_static/index-1e036622.js +1 -0
  62. package/dist/preview-client/_static/index-1fd4207a.js +1 -0
  63. package/dist/preview-client/_static/{index-9feced3c.js → index-46c87b46.js} +1 -1
  64. package/dist/preview-client/_static/index-6649d404.js +1 -0
  65. package/dist/preview-client/_static/{index-f165015e.js → index-788e8750.js} +1 -1
  66. package/dist/preview-client/_static/{index-75e7d483.js → index-7e414715.js} +1 -1
  67. package/dist/preview-client/_static/index-87ef1c72.js +1 -0
  68. package/dist/preview-client/_static/{index-f4d91eb4.js → index-b13216a9.js} +1 -1
  69. package/dist/preview-client/_static/{index-4e7bb453.js → index-b4bde36a.js} +1 -1
  70. package/dist/preview-client/_static/{index-071c0532.js → index-d00c8bc3.js} +1 -1
  71. package/dist/preview-client/_static/index-d9ee84ce.js +1 -0
  72. package/dist/preview-client/_static/{index-365736f7.js → index-debbe073.js} +1 -1
  73. package/dist/preview-client/_static/{index-3660a664.js → index-e44b357e.js} +4 -4
  74. package/dist/preview-client/_static/{index-eb74362c.js → index-ea7fe254.js} +1 -1
  75. package/dist/preview-client/_static/{index-8e169cc2.js → index-f7bd6fef.js} +1 -1
  76. package/dist/preview-client/_static/{ktx2-encoder-e9b1c83a.js → ktx2-encoder-522fc017.js} +1 -1
  77. package/dist/preview-client/_static/{module-4a37a616.js → module-5547be1c.js} +1 -1
  78. package/dist/preview-client/_static/{module-81a206c0.js → module-57b6e417.js} +1 -1
  79. package/dist/preview-client/_static/{module-1c91b4e1.js → module-5906e0d4.js} +1 -1
  80. package/dist/preview-client/_static/{postmen-c7605b45.js → postmen-443b3e5f.js} +1 -1
  81. package/dist/preview-client/_static/{shader-data-utils-6ef12596.js → shader-data-utils-000170ae.js} +1 -1
  82. package/dist/preview-client/index.html +1 -1
  83. package/package.json +1 -1
  84. package/dist/preview-client/_static/index-1c260f88.js +0 -1
  85. package/dist/preview-client/_static/index-44137d7e.js +0 -1
  86. package/dist/preview-client/_static/index-5ae70b23.js +0 -1
  87. package/dist/preview-client/_static/index-be42fc1e.js +0 -1
  88. package/dist/preview-client/_static/index-cfa0dccc.js +0 -1
  89. package/dist/preview-client/_static/index-f3d42be3.js +0 -1
@@ -1 +1 @@
1
- var F=Object.defineProperty;var S=(e,i,n)=>i in e?F(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n;var a=(e,i,n)=>(S(e,typeof i!="symbol"?i+"":i,n),n);import{S as v,a as B}from"./module-81a206c0.js";import{aJ as h,bk as b,e as y,E as N,bl as O,x as g,p as l,C as f,s as m}from"./index-3660a664.js";import{u as k}from"./index-365736f7.js";import{c as P}from"./Component-6d1e73e5.js";import"./postmen-c7605b45.js";const R=h(function(e){const{model:i}=e,{inspectorFacade:n}=k();return b({label:y("spine.animation.label"),value:i.animationName,options:i.animationForm,onChange(t){n.componentChange(i.id,"animationName",t)}})}),T=h(function(e){const{model:i}=e,{inspectorFacade:n}=k();return b({label:y("spine.skin.label"),value:i.skinName,options:i.skinForm,onChange(t){n.componentChange(i.id,"skinName",t)}})});var _=Object.defineProperty,j=Object.getOwnPropertyDescriptor,p=(e,i,n,t)=>{for(var o=t>1?void 0:t?j(i,n):i,c=e.length-1,u;c>=0;c--)(u=e[c])&&(o=(t?u(i,n,o):u(o))||o);return t&&o&&_(i,n,o),o};let s=class extends N{constructor(i,n){super(i,n);a(this,"animationForm",[]);a(this,"skinForm",[]);a(this,"hasInit",!1);a(this,"resource",null);a(this,"loop",!1);a(this,"animationName","none");a(this,"skinName","default");a(this,"priority",0);a(this,"premultipliedAlpha",!1);a(this,"tintBlack",!1)}deserialize(i){const{props:n}=i;if(this._enabled=(n==null?void 0:n.enabled)??!0,n){this.priority=n.priority,this.resource=n.resource,this.premultipliedAlpha=n.premultipliedAlpha,this.tintBlack=n.tintBlack??!1;const{animationName:t,skinName:o,loop:c}=n.defaultConfig;this.animationName=t||"none",this.skinName=o,this.loop=c}super.deserialize(i)}toJSON(){const i=this.animationName==="none"?null:this.animationName;return{type:this.type,props:O({enabled:this.enabled,priority:this.priority,resource:this.resource,premultipliedAlpha:this.premultipliedAlpha,tintBlack:this.tintBlack,defaultConfig:{animationName:i,skinName:this.skinName,loop:this.loop}})}}};p([g],s.prototype,"animationForm",2);p([g],s.prototype,"skinForm",2);p([l({label:"spine.resource.label",info:"spine.resource.info",type:f.AssetPicker,assetType:"SpineSkeletonData",onChange:async(e,i,n)=>{const t=e.engineObject;if(n){t.enabled=!0;const{skeletonData:o}=n;if(!o)return;const u=o.animations.map(r=>r.name).map(r=>({label:r,value:r}));u.unshift({label:"none",value:"none"}),e.animationForm=u,e.skinForm=o.skins.map(r=>({label:r.name,value:r.name})),e.hasInit?(e.animationName="none",e.skinName="default"):e.hasInit=!0;const{loop:d,skinName:C}=e,A=e.animationName==="none"?null:e.animationName;t.defaultConfig.animationName=A,t.defaultConfig.skinName=C,t.defaultConfig.loop=d,t.resource=new v(t.engine,o)}else t.enabled=!1,e.animationName="none",e.animationForm.length=0,e.skinForm.length=0,e.premultipliedAlpha=!1,e.tintBlack=!1}}),m()],s.prototype,"resource",2);p([l({label:"spine.loop.label",info:"spine.loop.info",type:f.Toggle,onChange(e,i,n){const{state:t}=e.engineObject;if(t){const o=t.getCurrent(0);o&&(o.loop=n)}}}),m()],s.prototype,"loop",2);p([l({info:"spine.animation.info",customComponent:R,onChange(e,i,n){const{state:t}=e.engineObject;t&&(n==="none"?t.setEmptyAnimation(0,0):t.setAnimation(0,n,e.loop))}}),m()],s.prototype,"animationName",2);p([l({info:"spine.skin.info",customComponent:T,onChange(e,i,n){const{engineObject:{skeleton:t}}=e;t&&n&&(t.setSkinByName(n),t.setSlotsToSetupPose())}}),m()],s.prototype,"skinName",2);p([l({label:"spine.priority.label",info:"spine.priority.info",type:f.Number,bindPath:"priority"}),m()],s.prototype,"priority",2);p([l({label:"spine.premultiplied-alpha.label",info:"spine.premultiplied-alpha.info",type:f.Toggle,bindPath:"premultipliedAlpha"}),m()],s.prototype,"premultipliedAlpha",2);p([l({label:"spine.tint-black.label",info:"spine.tint-black.info",type:f.Toggle,bindPath:"tintBlack"}),m()],s.prototype,"tintBlack",2);s=p([P({type:"SpineAnimationRenderer",componentsMenu:{group:"2D",label:"component.spine-animation.title"}})],s);N.registerCustomEngineComponent("SpineAnimationRenderer",B);export{s as SpineAnimationComponent};
1
+ var F=Object.defineProperty;var S=(e,i,n)=>i in e?F(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n;var a=(e,i,n)=>(S(e,typeof i!="symbol"?i+"":i,n),n);import{S as v,a as B}from"./module-57b6e417.js";import{aJ as h,bk as b,e as y,E as N,bl as O,x as g,p as l,C as f,s as m}from"./index-e44b357e.js";import{u as k}from"./index-debbe073.js";import{c as P}from"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";const R=h(function(e){const{model:i}=e,{inspectorFacade:n}=k();return b({label:y("spine.animation.label"),value:i.animationName,options:i.animationForm,onChange(t){n.componentChange(i.id,"animationName",t)}})}),T=h(function(e){const{model:i}=e,{inspectorFacade:n}=k();return b({label:y("spine.skin.label"),value:i.skinName,options:i.skinForm,onChange(t){n.componentChange(i.id,"skinName",t)}})});var _=Object.defineProperty,j=Object.getOwnPropertyDescriptor,p=(e,i,n,t)=>{for(var o=t>1?void 0:t?j(i,n):i,c=e.length-1,u;c>=0;c--)(u=e[c])&&(o=(t?u(i,n,o):u(o))||o);return t&&o&&_(i,n,o),o};let s=class extends N{constructor(i,n){super(i,n);a(this,"animationForm",[]);a(this,"skinForm",[]);a(this,"hasInit",!1);a(this,"resource",null);a(this,"loop",!1);a(this,"animationName","none");a(this,"skinName","default");a(this,"priority",0);a(this,"premultipliedAlpha",!1);a(this,"tintBlack",!1)}deserialize(i){const{props:n}=i;if(this._enabled=(n==null?void 0:n.enabled)??!0,n){this.priority=n.priority,this.resource=n.resource,this.premultipliedAlpha=n.premultipliedAlpha,this.tintBlack=n.tintBlack??!1;const{animationName:t,skinName:o,loop:c}=n.defaultConfig;this.animationName=t||"none",this.skinName=o,this.loop=c}super.deserialize(i)}toJSON(){const i=this.animationName==="none"?null:this.animationName;return{type:this.type,props:O({enabled:this.enabled,priority:this.priority,resource:this.resource,premultipliedAlpha:this.premultipliedAlpha,tintBlack:this.tintBlack,defaultConfig:{animationName:i,skinName:this.skinName,loop:this.loop}})}}};p([g],s.prototype,"animationForm",2);p([g],s.prototype,"skinForm",2);p([l({label:"spine.resource.label",info:"spine.resource.info",type:f.AssetPicker,assetType:"SpineSkeletonData",onChange:async(e,i,n)=>{const t=e.engineObject;if(n){t.enabled=!0;const{skeletonData:o}=n;if(!o)return;const u=o.animations.map(r=>r.name).map(r=>({label:r,value:r}));u.unshift({label:"none",value:"none"}),e.animationForm=u,e.skinForm=o.skins.map(r=>({label:r.name,value:r.name})),e.hasInit?(e.animationName="none",e.skinName="default"):e.hasInit=!0;const{loop:d,skinName:C}=e,A=e.animationName==="none"?null:e.animationName;t.defaultConfig.animationName=A,t.defaultConfig.skinName=C,t.defaultConfig.loop=d,t.resource=new v(t.engine,o)}else t.enabled=!1,e.animationName="none",e.animationForm.length=0,e.skinForm.length=0,e.premultipliedAlpha=!1,e.tintBlack=!1}}),m()],s.prototype,"resource",2);p([l({label:"spine.loop.label",info:"spine.loop.info",type:f.Toggle,onChange(e,i,n){const{state:t}=e.engineObject;if(t){const o=t.getCurrent(0);o&&(o.loop=n)}}}),m()],s.prototype,"loop",2);p([l({info:"spine.animation.info",customComponent:R,onChange(e,i,n){const{state:t}=e.engineObject;t&&(n==="none"?t.setEmptyAnimation(0,0):t.setAnimation(0,n,e.loop))}}),m()],s.prototype,"animationName",2);p([l({info:"spine.skin.info",customComponent:T,onChange(e,i,n){const{engineObject:{skeleton:t}}=e;t&&n&&(t.setSkinByName(n),t.setSlotsToSetupPose())}}),m()],s.prototype,"skinName",2);p([l({label:"spine.priority.label",info:"spine.priority.info",type:f.Number,bindPath:"priority"}),m()],s.prototype,"priority",2);p([l({label:"spine.premultiplied-alpha.label",info:"spine.premultiplied-alpha.info",type:f.Toggle,bindPath:"premultipliedAlpha"}),m()],s.prototype,"premultipliedAlpha",2);p([l({label:"spine.tint-black.label",info:"spine.tint-black.info",type:f.Toggle,bindPath:"tintBlack"}),m()],s.prototype,"tintBlack",2);s=p([P({type:"SpineAnimationRenderer",componentsMenu:{group:"2D",label:"component.spine-animation.title"}})],s);N.registerCustomEngineComponent("SpineAnimationRenderer",B);export{s as SpineAnimationComponent};
@@ -1 +1 @@
1
- var I=Object.defineProperty;var j=(t,s,e)=>s in t?I(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var c=(t,s,e)=>(j(t,typeof s!="symbol"?s+"":s,e),e);import{bR as b,e as w,aH as B,u as $,S as U,aJ as q,aM as C,av as A,bS as z,x as g,aC as k,bT as V,bU as M,j as J,K,bV as W,p as L,C as X,aT as Y,m as H,n as G,q as Q,o as Z,bW as ee,bX as te}from"./index-3660a664.js";import{b as ne,c as se,T as ie,d as ae,R as oe,M as re,B as le,P as pe,e as ce,C as ue,f as me,a as v,S as T,L as he}from"./module-81a206c0.js";import"./index-365736f7.js";import"./postmen-c7605b45.js";import{A as de}from"./AssetViewer-1073ddb5.js";const x=new Map;function fe(t){return t??""}function ge(t){return`${t.name}|${t.size}|${t.lastModified}|${t.type}`}function ye(t,s){const{uploadAssetFile:e,assetType:n,parentFolderId:i,assetMeta:a}=s,o=i??t.currentFolderId??"",r=b(e.main,"upload.bin"),u=ge(r),l=fe(a);return`${o}|${n}|${u}|${l}`}function N(t,s){const e=ye(t,s),n=x.get(e);if(n)return n;const i=t.createAssetByUpload(s).finally(()=>{x.get(e)===i&&x.delete(e)});return x.set(e,i),i}var O=(t=>(t.region="region",t.boundingbox="boundingbox",t.mesh="mesh",t.linkedmesh="linkedmesh",t.path="path",t.point="point",t.clipping="clipping",t.sequence="sequence",t))(O||{});const Ae=["region","linkedmesh","mesh"];async function we(t,s){const e={uploadFiles:[],usedFiles:[],errors:[]},{atlasRawFiles:n,atlasFound:i}=await ke(t,e),a=await Promise.all(n.map(l=>N(s.root.assetFacade,{uploadAssetFile:l,assetType:"SpineAtlas"})));e.usedFiles.push(...n.flatMap(l=>[b(l.main,"spine.atlas"),...Object.values(l.subFiles)]));const o=await Se(t,e);o.length>0&&!i&&e.errors.push(w("spine.error.no-atlas-file"));const r=o.map(l=>(e.usedFiles.push(l.spineFile),xe(l,a,e)));let u=await Promise.all(r);return u=u.filter(l=>l!==null),e.uploadFiles.push(...u),e}async function ke(t,s){const e=[];let n=!1;for(const i in t){const a=t[i];if(a.name.endsWith(".atlas")){n=!0;const r=await Pe(t,a);if(r.length>0){const u={};r.forEach(l=>u[l.name]=l),e.push({main:a,subFiles:u})}else s.errors.push(w("spine.error.missing-images"))}}return{atlasRawFiles:e,atlasFound:n}}async function Se(t,s){const e=[];for(const n in t){const i=t[n],a=i.name,o=a.split(".")[0];if(a.endsWith(".json"))try{const r=await i.text(),u=JSON.parse(r);u.skeleton&&u.skeleton.spine&&e.push({spineFile:i,spineName:o,isBinary:!1})}catch(r){s.errors.push(P(a,r))}else a.endsWith(".skel")&&e.push({spineFile:i,spineName:o,isBinary:!0})}return e}async function xe(t,s,e){const{spineFile:n}=t,i={type:"SpineSkeletonData",atlas:{refId:null}},a={main:n,meta:null};let o;try{o=await De(t,s,e)}catch(r){return e.errors.push(r instanceof Error?r.message:P(n.name,r)),null}return s.length===0?null:o?(i.atlas.refId=o.id,a.meta=JSON.stringify(i),a):(e.errors.push(w("spine.error.missing-attachments")),null)}async function De(t,s,e){const n=await _e(t);return await Re(s,n)}async function _e(t){const{spineFile:s,isBinary:e}=t,n=new Set;if(e){const r=await s.arrayBuffer();return Fe(r,n),Array.from(n)}const i=await s.text();let a;try{a=JSON.parse(i)}catch(r){throw new Error(P(s.name,r))}return!a||!a.skins?[]:(a.skins.forEach(r=>{if(r.attachments)for(const u in r.attachments){const l=r.attachments[u];for(const y in l){const p=l[y];if(p.type){let h;const f=p.type;try{h=O[f]}catch(F){throw console.warn(w("spine.error.incompatible-version",f)),F}if(!Ae.includes(h))continue}if(p.path)n.add(p.path);else if(p.name)n.add(p.name);else if(p.sequence){const h=new ne(null).readSequence(p.sequence);if(h)for(let f=0;f<h.regions.length;++f)n.add(h.getPath(y,f));else n.add(y)}else n.add(y)}}}),Array.from(n))}function Fe(t,s){new se(new D(s)).readSkeletonData(new Uint8Array(t))}class D{constructor(s){c(this,"requiredPaths");this.requiredPaths=s}static assignDummyRegion(s){s.region=new ie(new ae("dummy"),"")}newRegionAttachment(s,e,n,i){const a=new oe(e,"");return i?this.loadSequence(n,i):(this.requiredPaths.add(n),D.assignDummyRegion(a)),a}newMeshAttachment(s,e,n,i){const a=new re(e,"");return i?this.loadSequence(n,i):(this.requiredPaths.add(n),D.assignDummyRegion(a)),a}newBoundingBoxAttachment(s,e){return new le(e)}newPathAttachment(s,e){return new pe(e)}newPointAttachment(s,e){return new ce(e)}newClippingAttachment(s,e){return new ue(e)}loadSequence(s,e){const n=e.regions;for(let i=0,a=n.length;i<a;i++){const o=e.getPath(s,i);this.requiredPaths.add(o)}}}async function Re(t,s){for(let e=0;e<t.length;e+=1){const n=t[e];if(Te(n.textureAtlas,s))return n}return null}async function Te(t,s){for(let e=0;e<s.length;e+=1){const n=s[e];if(!be(t,n))return!1}return!0}function P(t,s){const e=s instanceof Error?s.message:String(s);return`Failed to parse spine JSON "${t}": ${e}`}function be(t,s){const e=t.findRegion(s);if(e)return e;const n=s.length;for(const i of t.regions){const a=i.name;if(a.startsWith(s)&&a.substring(n).split("").every(r=>r>="0"&&r<="9"))return i}return null}async function Pe(t,s){const e=await s.text(),n=new me(e),i=[];return n.pages.forEach(a=>{const o=a.name,r=t[o];if(r)i.push(r);else return null}),i}async function Me(t,s,e){const n=b(t.main,"spine.atlas"),i=await Ce(t,e);return{main:n,meta:JSON.stringify({textures:i,type:"SpineAtlas"})}}async function Ce(t,s){const e=[];for(const p in t.subFiles){const h=t.subFiles[p];h.name.endsWith(".atlas")||e.push({main:h,type:"Texture"})}const n=[];let i=[],a;const o=s.getAssetFromCurrentFolder();(o==null?void 0:o.length)>0&&(a=o.filter(p=>p.meta.type==="Texture")),a?e.forEach(p=>{const h=a.find(f=>f.name===p.main.name);h?n.push(h.getCurrentRef()):i.push(p)}):i=e;const r=[];i.forEach(p=>{r.push(N(s.root.assetFacade,{uploadAssetFile:p,assetType:"Texture"}))});const l=(await Promise.all(r)).map(p=>p.getCurrentRef());return n.concat(l)}var ve=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,d=(t,s,e,n)=>{for(var i=n>1?void 0:n?Ne(s,e):s,a=t.length-1,o;a>=0;a--)(o=t[a])&&(i=(n?o(s,e,i):o(i))||i);return n&&i&&ve(s,e,i),i};const Oe=B("div",{position:"absolute",top:8,left:8,display:"grid",gap:"$1",marginTop:"$1 $2",variants:{hasClips:{true:{gridTemplateColumns:"150px 18px 1fr"},false:{gridTemplateColumns:"$4_5 1fr"}}}});class m extends de{constructor(){super();c(this,"_spineAnimationRenderer");c(this,"_animationTrack");c(this,"_updateComponent");c(this,"playing",!1);c(this,"frameTime",0);c(this,"duration",0);c(this,"animationNames",[]);c(this,"skinNames",[]);c(this,"animationIndex",0);c(this,"skinIndex",0);c(this,"_size",{w:0,h:0});c(this,"overridePreviewer",q(({asset:e,viewer:n})=>{const i=e.getViewerRootEntity();return C.useEffect(()=>{this.skinIndex=0},[e]),C.useEffect(()=>{this._spineAnimationRenderer?this.updateViewAsset(e,i):this.setViewAsset(e,i)},[e.skeletonData]),A.jsxs(A.Fragment,{children:[A.jsx(z,{asset:e,viewer:n}),A.jsx(Ee,{selectedKey:this.skinIndex,clips:this.skinNames,onSelectClip:a=>{this.skinIndex=a,this.changeSkin(this.skinNames[a])}})]})}));$(this)}setViewAsset(e,n){if(!e.skeletonData){this.stopViewAsset();return}this.animationIndex=0,this.duration=0;const i=n.engine,a=e.skeletonData,o=n.createChild("spine-entity"),r=o.addComponent(v);this.animationNames=a.animations.map(R=>R.name),this.animationNames.unshift("none"),this.skinNames=a.skins.map(R=>R.name),this._entity=o,this._spineAnimationRenderer=r,r.resource=new T(i,a);const{width:u,height:l,x:y,y:p}=a;this._size={w:u,h:l};const h=y+u/2,f=p+l/2;o.transform.setPosition(-h/100,-f/100,0);const F=this;this._updateComponent=this._entity.addComponent(class extends U{onUpdate(){F._onUpdate()}})}updateViewAsset(e,n){if(!e.skeletonData){this.stopViewAsset();return}const i=n.engine,a=e.skeletonData;this.animationNames=a.animations.map(o=>o.name),this.animationNames.unshift("none"),this.skinNames=a.skins.map(o=>o.name),this._spineAnimationRenderer.resource=new T(i,a)}getSize(){return{width:this._size.w/100,height:this._size.h/100}}stopViewAsset(){var e;super.stopViewAsset(),this.playing=!1,this.frameTime=0,this.duration=0,this.animationNames=[],this.skinNames=[],this.animationIndex=0,this.skinIndex=0,this._spineAnimationRenderer&&(this._spineAnimationRenderer.enabled=!1),this._spineAnimationRenderer=null,(e=this._updateComponent)==null||e.destroy()}changeSkin(e){const{skeleton:n,state:i}=this._spineAnimationRenderer;n.setSkinByName(e),n.setSlotsToSetupPose(),i.apply(n)}selectAnimation(e){this.animationIndex=e;const n=this.animationNames[e];this.play(n)}play(e){let n;const{state:i}=this._spineAnimationRenderer;e==="none"?n=i.setEmptyAnimation(0,0):n=i.setAnimation(0,e,!0),this._animationTrack=n,this._spineAnimationRenderer.state.timeScale=1,this.playing=!0,this.duration=n.animationEnd}pauseAnimation(){this.pause()}playAnimation(){this._spineAnimationRenderer.state.timeScale=1}pause(){this._spineAnimationRenderer.state.timeScale=0,this.playing=!1}_onUpdate(){if(!this.playing)return;const e=this._animationTrack.trackTime%this.duration;this.frameTime=isNaN(e)?0:e}}d([g],m.prototype,"playing",2);d([g],m.prototype,"frameTime",2);d([g],m.prototype,"duration",2);d([g],m.prototype,"animationNames",2);d([g],m.prototype,"skinNames",2);d([g],m.prototype,"animationIndex",2);d([g],m.prototype,"skinIndex",2);d([k],m.prototype,"changeSkin",1);d([k],m.prototype,"selectAnimation",1);d([k],m.prototype,"play",1);d([k],m.prototype,"pauseAnimation",1);d([k],m.prototype,"playAnimation",1);d([k],m.prototype,"pause",1);d([k],m.prototype,"_onUpdate",1);function Ee({onSelectClip:t,clips:s,selectedKey:e}){return A.jsx(Oe,{hasClips:!!s.length,children:s.length>0&&A.jsx(V,{value:e,onValueChange:t,valueType:"number",size:"xs",sideOffset:8,children:s.map((n,i)=>n?A.jsx(M,{value:i,children:n},i):null)})})}var Ie=Object.defineProperty,je=Object.getOwnPropertyDescriptor,_=(t,s,e,n)=>{for(var i=n>1?void 0:n?je(s,e):s,a=t.length-1,o;a>=0;a--)(o=t[a])&&(i=(n?o(s,e,i):o(i))||i);return n&&i&&Ie(s,e,i),i};let S=class extends J{constructor(s){super(s);c(this,"_delOnSkeletonDel");c(this,"_delOnAtlasDel");c(this,"_hasInit",!1);c(this,"atlas",null);c(this,"skeletonRawData","");c(this,"skeletonData")}async initByMain(s){const e=await s.text();try{JSON.parse(e),this.skeletonRawData=e}catch{this.skeletonRawData=await s.arrayBuffer()}const n=this.meta,{atlas:i}=n;this.atlas=i;const a=await this.root.assetStore.getAssetByRef(i),o=E(this.skeletonRawData,a,!0);o&&this.createDragTempEntity(o)}createDragTempEntity(s){this.skeletonData=s;const e=new K(this.engine),n=e.addComponent(v);n.resource=new T(this.engine,this.skeletonData),this.setDragTempEntity(e)}instantiate(){if(!this.skeletonData)return;const s=this.root.sceneStore.createEntity(),e=this.getDragTempEntity(),{position:n,rotation:i}=e.transform,a={components:[{class:"SpineAnimationRenderer",id:W(),props:{resource:this.getCurrentRef(),priority:0,defaultConfig:{loop:!1,animationName:"none",skinName:"default"}}}],id:s.id,isActive:!0,isClone:!1,name:this.name?this.name:"spine",position:{x:n.x,y:n.y,z:n.z},rotation:{x:i.x,y:i.y,z:i.z},scale:{x:1,y:1,z:1}};return s.initByFile(a),s}};_([L({assetType:"SpineAtlas",label:w("asset.spine-atlas.title"),type:X.AssetPicker,onChange:async(t,s,e)=>{if(t._delOnAtlasDel&&(t._delOnAtlasDel(),t._delOnAtlasDel=null),e){let n=!0;t._hasInit?n=!1:t._hasInit=!0,t.skeletonData=E(t.skeletonRawData,e,n),t.skeletonData&&t.createDragTempEntity(t.skeletonData);const i=()=>{t._delOnSkeletonDel&&t._delOnSkeletonDel(),t._delOnSkeletonDel=null,t.skeletonData=null};e.on("delete",i),t._delOnSkeletonDel=()=>{e.off("delete",i)}}else t.skeletonData=null}}),Y()],S.prototype,"atlas",2);_([H()],S.prototype,"skeletonRawData",2);_([g.ref],S.prototype,"skeletonData",2);S=_([G({type:"SpineSkeletonData",label:w("asset.spine-skeleton-data.title"),loaderType:"Spine",viewer:m,dragLayer:Q.SpineSkeletonData,dragType:"2d",filterUploadFiles:we,importMenuConfig:{type:Z.Upload,accept:".json,.atlas,.skel,.png,.jpg,.jpeg,.webp",multiple:!0},bundle(t){return t.dependencies=ee(t.meta,["atlas"]),{content:t.content}}})],S);function E(t,s,e){if(!s)return null;try{return he.createSkeletonData(t,s.textureAtlas,.01)}catch{return!e&&te.error(w("spine.error.generate-skeleton-data")),null}}const Je=Object.freeze(Object.defineProperty({__proto__:null,get SpineSkeletonDataAsset(){return S}},Symbol.toStringTag,{value:"Module"}));export{S,Je as a,Me as s};
1
+ var I=Object.defineProperty;var j=(t,s,e)=>s in t?I(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var c=(t,s,e)=>(j(t,typeof s!="symbol"?s+"":s,e),e);import{bR as b,e as w,aH as B,u as $,S as U,aJ as q,aM as C,av as A,bS as z,x as g,aC as k,bT as V,bU as M,j as J,K,bV as W,p as L,C as X,aT as Y,m as H,n as G,q as Q,o as Z,bW as ee,bX as te}from"./index-e44b357e.js";import{b as ne,c as se,T as ie,d as ae,R as oe,M as re,B as le,P as pe,e as ce,C as ue,f as me,a as v,S as T,L as he}from"./module-57b6e417.js";import"./index-debbe073.js";import"./postmen-443b3e5f.js";import{A as de}from"./AssetViewer-d2c63b00.js";const x=new Map;function fe(t){return t??""}function ge(t){return`${t.name}|${t.size}|${t.lastModified}|${t.type}`}function ye(t,s){const{uploadAssetFile:e,assetType:n,parentFolderId:i,assetMeta:a}=s,o=i??t.currentFolderId??"",r=b(e.main,"upload.bin"),u=ge(r),l=fe(a);return`${o}|${n}|${u}|${l}`}function N(t,s){const e=ye(t,s),n=x.get(e);if(n)return n;const i=t.createAssetByUpload(s).finally(()=>{x.get(e)===i&&x.delete(e)});return x.set(e,i),i}var O=(t=>(t.region="region",t.boundingbox="boundingbox",t.mesh="mesh",t.linkedmesh="linkedmesh",t.path="path",t.point="point",t.clipping="clipping",t.sequence="sequence",t))(O||{});const Ae=["region","linkedmesh","mesh"];async function we(t,s){const e={uploadFiles:[],usedFiles:[],errors:[]},{atlasRawFiles:n,atlasFound:i}=await ke(t,e),a=await Promise.all(n.map(l=>N(s.root.assetFacade,{uploadAssetFile:l,assetType:"SpineAtlas"})));e.usedFiles.push(...n.flatMap(l=>[b(l.main,"spine.atlas"),...Object.values(l.subFiles)]));const o=await Se(t,e);o.length>0&&!i&&e.errors.push(w("spine.error.no-atlas-file"));const r=o.map(l=>(e.usedFiles.push(l.spineFile),xe(l,a,e)));let u=await Promise.all(r);return u=u.filter(l=>l!==null),e.uploadFiles.push(...u),e}async function ke(t,s){const e=[];let n=!1;for(const i in t){const a=t[i];if(a.name.endsWith(".atlas")){n=!0;const r=await Pe(t,a);if(r.length>0){const u={};r.forEach(l=>u[l.name]=l),e.push({main:a,subFiles:u})}else s.errors.push(w("spine.error.missing-images"))}}return{atlasRawFiles:e,atlasFound:n}}async function Se(t,s){const e=[];for(const n in t){const i=t[n],a=i.name,o=a.split(".")[0];if(a.endsWith(".json"))try{const r=await i.text(),u=JSON.parse(r);u.skeleton&&u.skeleton.spine&&e.push({spineFile:i,spineName:o,isBinary:!1})}catch(r){s.errors.push(P(a,r))}else a.endsWith(".skel")&&e.push({spineFile:i,spineName:o,isBinary:!0})}return e}async function xe(t,s,e){const{spineFile:n}=t,i={type:"SpineSkeletonData",atlas:{refId:null}},a={main:n,meta:null};let o;try{o=await De(t,s,e)}catch(r){return e.errors.push(r instanceof Error?r.message:P(n.name,r)),null}return s.length===0?null:o?(i.atlas.refId=o.id,a.meta=JSON.stringify(i),a):(e.errors.push(w("spine.error.missing-attachments")),null)}async function De(t,s,e){const n=await _e(t);return await Re(s,n)}async function _e(t){const{spineFile:s,isBinary:e}=t,n=new Set;if(e){const r=await s.arrayBuffer();return Fe(r,n),Array.from(n)}const i=await s.text();let a;try{a=JSON.parse(i)}catch(r){throw new Error(P(s.name,r))}return!a||!a.skins?[]:(a.skins.forEach(r=>{if(r.attachments)for(const u in r.attachments){const l=r.attachments[u];for(const y in l){const p=l[y];if(p.type){let h;const f=p.type;try{h=O[f]}catch(F){throw console.warn(w("spine.error.incompatible-version",f)),F}if(!Ae.includes(h))continue}if(p.path)n.add(p.path);else if(p.name)n.add(p.name);else if(p.sequence){const h=new ne(null).readSequence(p.sequence);if(h)for(let f=0;f<h.regions.length;++f)n.add(h.getPath(y,f));else n.add(y)}else n.add(y)}}}),Array.from(n))}function Fe(t,s){new se(new D(s)).readSkeletonData(new Uint8Array(t))}class D{constructor(s){c(this,"requiredPaths");this.requiredPaths=s}static assignDummyRegion(s){s.region=new ie(new ae("dummy"),"")}newRegionAttachment(s,e,n,i){const a=new oe(e,"");return i?this.loadSequence(n,i):(this.requiredPaths.add(n),D.assignDummyRegion(a)),a}newMeshAttachment(s,e,n,i){const a=new re(e,"");return i?this.loadSequence(n,i):(this.requiredPaths.add(n),D.assignDummyRegion(a)),a}newBoundingBoxAttachment(s,e){return new le(e)}newPathAttachment(s,e){return new pe(e)}newPointAttachment(s,e){return new ce(e)}newClippingAttachment(s,e){return new ue(e)}loadSequence(s,e){const n=e.regions;for(let i=0,a=n.length;i<a;i++){const o=e.getPath(s,i);this.requiredPaths.add(o)}}}async function Re(t,s){for(let e=0;e<t.length;e+=1){const n=t[e];if(Te(n.textureAtlas,s))return n}return null}async function Te(t,s){for(let e=0;e<s.length;e+=1){const n=s[e];if(!be(t,n))return!1}return!0}function P(t,s){const e=s instanceof Error?s.message:String(s);return`Failed to parse spine JSON "${t}": ${e}`}function be(t,s){const e=t.findRegion(s);if(e)return e;const n=s.length;for(const i of t.regions){const a=i.name;if(a.startsWith(s)&&a.substring(n).split("").every(r=>r>="0"&&r<="9"))return i}return null}async function Pe(t,s){const e=await s.text(),n=new me(e),i=[];return n.pages.forEach(a=>{const o=a.name,r=t[o];if(r)i.push(r);else return null}),i}async function Me(t,s,e){const n=b(t.main,"spine.atlas"),i=await Ce(t,e);return{main:n,meta:JSON.stringify({textures:i,type:"SpineAtlas"})}}async function Ce(t,s){const e=[];for(const p in t.subFiles){const h=t.subFiles[p];h.name.endsWith(".atlas")||e.push({main:h,type:"Texture"})}const n=[];let i=[],a;const o=s.getAssetFromCurrentFolder();(o==null?void 0:o.length)>0&&(a=o.filter(p=>p.meta.type==="Texture")),a?e.forEach(p=>{const h=a.find(f=>f.name===p.main.name);h?n.push(h.getCurrentRef()):i.push(p)}):i=e;const r=[];i.forEach(p=>{r.push(N(s.root.assetFacade,{uploadAssetFile:p,assetType:"Texture"}))});const l=(await Promise.all(r)).map(p=>p.getCurrentRef());return n.concat(l)}var ve=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,d=(t,s,e,n)=>{for(var i=n>1?void 0:n?Ne(s,e):s,a=t.length-1,o;a>=0;a--)(o=t[a])&&(i=(n?o(s,e,i):o(i))||i);return n&&i&&ve(s,e,i),i};const Oe=B("div",{position:"absolute",top:8,left:8,display:"grid",gap:"$1",marginTop:"$1 $2",variants:{hasClips:{true:{gridTemplateColumns:"150px 18px 1fr"},false:{gridTemplateColumns:"$4_5 1fr"}}}});class m extends de{constructor(){super();c(this,"_spineAnimationRenderer");c(this,"_animationTrack");c(this,"_updateComponent");c(this,"playing",!1);c(this,"frameTime",0);c(this,"duration",0);c(this,"animationNames",[]);c(this,"skinNames",[]);c(this,"animationIndex",0);c(this,"skinIndex",0);c(this,"_size",{w:0,h:0});c(this,"overridePreviewer",q(({asset:e,viewer:n})=>{const i=e.getViewerRootEntity();return C.useEffect(()=>{this.skinIndex=0},[e]),C.useEffect(()=>{this._spineAnimationRenderer?this.updateViewAsset(e,i):this.setViewAsset(e,i)},[e.skeletonData]),A.jsxs(A.Fragment,{children:[A.jsx(z,{asset:e,viewer:n}),A.jsx(Ee,{selectedKey:this.skinIndex,clips:this.skinNames,onSelectClip:a=>{this.skinIndex=a,this.changeSkin(this.skinNames[a])}})]})}));$(this)}setViewAsset(e,n){if(!e.skeletonData){this.stopViewAsset();return}this.animationIndex=0,this.duration=0;const i=n.engine,a=e.skeletonData,o=n.createChild("spine-entity"),r=o.addComponent(v);this.animationNames=a.animations.map(R=>R.name),this.animationNames.unshift("none"),this.skinNames=a.skins.map(R=>R.name),this._entity=o,this._spineAnimationRenderer=r,r.resource=new T(i,a);const{width:u,height:l,x:y,y:p}=a;this._size={w:u,h:l};const h=y+u/2,f=p+l/2;o.transform.setPosition(-h/100,-f/100,0);const F=this;this._updateComponent=this._entity.addComponent(class extends U{onUpdate(){F._onUpdate()}})}updateViewAsset(e,n){if(!e.skeletonData){this.stopViewAsset();return}const i=n.engine,a=e.skeletonData;this.animationNames=a.animations.map(o=>o.name),this.animationNames.unshift("none"),this.skinNames=a.skins.map(o=>o.name),this._spineAnimationRenderer.resource=new T(i,a)}getSize(){return{width:this._size.w/100,height:this._size.h/100}}stopViewAsset(){var e;super.stopViewAsset(),this.playing=!1,this.frameTime=0,this.duration=0,this.animationNames=[],this.skinNames=[],this.animationIndex=0,this.skinIndex=0,this._spineAnimationRenderer&&(this._spineAnimationRenderer.enabled=!1),this._spineAnimationRenderer=null,(e=this._updateComponent)==null||e.destroy()}changeSkin(e){const{skeleton:n,state:i}=this._spineAnimationRenderer;n.setSkinByName(e),n.setSlotsToSetupPose(),i.apply(n)}selectAnimation(e){this.animationIndex=e;const n=this.animationNames[e];this.play(n)}play(e){let n;const{state:i}=this._spineAnimationRenderer;e==="none"?n=i.setEmptyAnimation(0,0):n=i.setAnimation(0,e,!0),this._animationTrack=n,this._spineAnimationRenderer.state.timeScale=1,this.playing=!0,this.duration=n.animationEnd}pauseAnimation(){this.pause()}playAnimation(){this._spineAnimationRenderer.state.timeScale=1}pause(){this._spineAnimationRenderer.state.timeScale=0,this.playing=!1}_onUpdate(){if(!this.playing)return;const e=this._animationTrack.trackTime%this.duration;this.frameTime=isNaN(e)?0:e}}d([g],m.prototype,"playing",2);d([g],m.prototype,"frameTime",2);d([g],m.prototype,"duration",2);d([g],m.prototype,"animationNames",2);d([g],m.prototype,"skinNames",2);d([g],m.prototype,"animationIndex",2);d([g],m.prototype,"skinIndex",2);d([k],m.prototype,"changeSkin",1);d([k],m.prototype,"selectAnimation",1);d([k],m.prototype,"play",1);d([k],m.prototype,"pauseAnimation",1);d([k],m.prototype,"playAnimation",1);d([k],m.prototype,"pause",1);d([k],m.prototype,"_onUpdate",1);function Ee({onSelectClip:t,clips:s,selectedKey:e}){return A.jsx(Oe,{hasClips:!!s.length,children:s.length>0&&A.jsx(V,{value:e,onValueChange:t,valueType:"number",size:"xs",sideOffset:8,children:s.map((n,i)=>n?A.jsx(M,{value:i,children:n},i):null)})})}var Ie=Object.defineProperty,je=Object.getOwnPropertyDescriptor,_=(t,s,e,n)=>{for(var i=n>1?void 0:n?je(s,e):s,a=t.length-1,o;a>=0;a--)(o=t[a])&&(i=(n?o(s,e,i):o(i))||i);return n&&i&&Ie(s,e,i),i};let S=class extends J{constructor(s){super(s);c(this,"_delOnSkeletonDel");c(this,"_delOnAtlasDel");c(this,"_hasInit",!1);c(this,"atlas",null);c(this,"skeletonRawData","");c(this,"skeletonData")}async initByMain(s){const e=await s.text();try{JSON.parse(e),this.skeletonRawData=e}catch{this.skeletonRawData=await s.arrayBuffer()}const n=this.meta,{atlas:i}=n;this.atlas=i;const a=await this.root.assetStore.getAssetByRef(i),o=E(this.skeletonRawData,a,!0);o&&this.createDragTempEntity(o)}createDragTempEntity(s){this.skeletonData=s;const e=new K(this.engine),n=e.addComponent(v);n.resource=new T(this.engine,this.skeletonData),this.setDragTempEntity(e)}instantiate(){if(!this.skeletonData)return;const s=this.root.sceneStore.createEntity(),e=this.getDragTempEntity(),{position:n,rotation:i}=e.transform,a={components:[{class:"SpineAnimationRenderer",id:W(),props:{resource:this.getCurrentRef(),priority:0,defaultConfig:{loop:!1,animationName:"none",skinName:"default"}}}],id:s.id,isActive:!0,isClone:!1,name:this.name?this.name:"spine",position:{x:n.x,y:n.y,z:n.z},rotation:{x:i.x,y:i.y,z:i.z},scale:{x:1,y:1,z:1}};return s.initByFile(a),s}};_([L({assetType:"SpineAtlas",label:w("asset.spine-atlas.title"),type:X.AssetPicker,onChange:async(t,s,e)=>{if(t._delOnAtlasDel&&(t._delOnAtlasDel(),t._delOnAtlasDel=null),e){let n=!0;t._hasInit?n=!1:t._hasInit=!0,t.skeletonData=E(t.skeletonRawData,e,n),t.skeletonData&&t.createDragTempEntity(t.skeletonData);const i=()=>{t._delOnSkeletonDel&&t._delOnSkeletonDel(),t._delOnSkeletonDel=null,t.skeletonData=null};e.on("delete",i),t._delOnSkeletonDel=()=>{e.off("delete",i)}}else t.skeletonData=null}}),Y()],S.prototype,"atlas",2);_([H()],S.prototype,"skeletonRawData",2);_([g.ref],S.prototype,"skeletonData",2);S=_([G({type:"SpineSkeletonData",label:w("asset.spine-skeleton-data.title"),loaderType:"Spine",viewer:m,dragLayer:Q.SpineSkeletonData,dragType:"2d",filterUploadFiles:we,importMenuConfig:{type:Z.Upload,accept:".json,.atlas,.skel,.png,.jpg,.jpeg,.webp",multiple:!0},bundle(t){return t.dependencies=ee(t.meta,["atlas"]),{content:t.content}}})],S);function E(t,s,e){if(!s)return null;try{return he.createSkeletonData(t,s.textureAtlas,.01)}catch{return!e&&te.error(w("spine.error.generate-skeleton-data")),null}}const Je=Object.freeze(Object.defineProperty({__proto__:null,get SpineSkeletonDataAsset(){return S}},Symbol.toStringTag,{value:"Module"}));export{S,Je as a,Me as s};
@@ -1 +1 @@
1
- var f=Object.defineProperty;var c=(t,e,o)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var r=(t,e,o)=>(c(t,typeof e!="symbol"?e+"":e,o),o);import{s as m,az as h,p as g,C as b,f as u}from"./index-3660a664.js";import"./index-365736f7.js";import{c as d}from"./Component-6d1e73e5.js";import"./postmen-c7605b45.js";import{L as P}from"./LightBaseComponent-545c5ee8.js";var y=Object.defineProperty,v=Object.getOwnPropertyDescriptor,i=(t,e,o,n)=>{for(var p=n>1?void 0:n?v(e,o):e,l=t.length-1,s;l>=0;l--)(s=t[l])&&(p=(n?s(e,o,p):s(p))||p);return n&&p&&y(e,o,p),p};let a=class extends P{constructor(e,o){super(e,o);r(this,"angle",20);r(this,"distance",60);r(this,"penumbra",60)}};i([m(h()),g({type:b.Slider,min:1,max:179,bindPath:"angle",label:"light.spot.angle.label",info:"light.spot.angle.info"}),u({getPath:"angle",getEditorValue:t=>t*180/Math.PI})],a.prototype,"angle",2);i([m(),g({type:b.Number,bindPath:"distance",label:"light.spot.distance.label",info:"light.spot.distance.info"})],a.prototype,"distance",2);i([m(h()),g({type:b.Slider,min:1,max:179,bindPath:"penumbra",label:"light.spot.penumbra.label",info:"light.spot.penumbra.info"}),u({getPath:"penumbra",getEditorValue:t=>t*180/Math.PI})],a.prototype,"penumbra",2);a=i([d({type:"SpotLight",componentsMenu:{group:"light",label:"component.light.spot.title"}})],a);export{a as SpotLightComponent};
1
+ var f=Object.defineProperty;var c=(t,e,o)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var r=(t,e,o)=>(c(t,typeof e!="symbol"?e+"":e,o),o);import{s as m,az as h,p as g,C as b,f as u}from"./index-e44b357e.js";import"./index-debbe073.js";import{c as d}from"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";import{L as P}from"./LightBaseComponent-b4854e8a.js";var y=Object.defineProperty,v=Object.getOwnPropertyDescriptor,i=(t,e,o,n)=>{for(var p=n>1?void 0:n?v(e,o):e,l=t.length-1,s;l>=0;l--)(s=t[l])&&(p=(n?s(e,o,p):s(p))||p);return n&&p&&y(e,o,p),p};let a=class extends P{constructor(e,o){super(e,o);r(this,"angle",20);r(this,"distance",60);r(this,"penumbra",60)}};i([m(h()),g({type:b.Slider,min:1,max:179,bindPath:"angle",label:"light.spot.angle.label",info:"light.spot.angle.info"}),u({getPath:"angle",getEditorValue:t=>t*180/Math.PI})],a.prototype,"angle",2);i([m(),g({type:b.Number,bindPath:"distance",label:"light.spot.distance.label",info:"light.spot.distance.info"})],a.prototype,"distance",2);i([m(h()),g({type:b.Slider,min:1,max:179,bindPath:"penumbra",label:"light.spot.penumbra.label",info:"light.spot.penumbra.info"}),u({getPath:"penumbra",getEditorValue:t=>t*180/Math.PI})],a.prototype,"penumbra",2);a=i([d({type:"SpotLight",componentsMenu:{group:"light",label:"component.light.spot.title"}})],a);export{a as SpotLightComponent};
@@ -1 +1 @@
1
- var f=Object.defineProperty;var y=(e,r,p)=>r in e?f(e,r,{enumerable:!0,configurable:!0,writable:!0,value:p}):e[r]=p;var s=(e,r,p)=>(y(e,typeof r!="symbol"?r+"":r,p),p);import{p as d,C as a,s as c,aF as o,E as w}from"./index-3660a664.js";import"./index-365736f7.js";import"./postmen-c7605b45.js";var C=Object.defineProperty,P=Object.getOwnPropertyDescriptor,b=(e,r,p,i)=>{for(var t=i>1?void 0:i?P(r,p):r,l=e.length-1,n;l>=0;l--)(n=e[l])&&(t=(i?n(r,p,t):n(t))||t);return i&&t&&C(r,p,t),t};class m extends w{constructor(){super(...arguments);s(this,"sprite",null);s(this,"color",{r:1,g:1,b:1,a:1});s(this,"drawMode",o.Simple)}}b([d({label:"sprite.renderer.sprite.label",info:"sprite.renderer.sprite.info",type:a.AssetPicker,assetType:"sprite",onChange:async(e,r,p)=>{e.sprite=p?p.getCurrentRef():null,await e.applyBoundPathChange("sprite",a.AssetPicker,e.sprite),e.emit("propertychange","sprite",p)}}),c()],m.prototype,"sprite",2);b([d({bindPath:"color",label:"sprite.renderer.color.label",info:"sprite.renderer.color.info",type:a.Color}),c()],m.prototype,"color",2);b([d({label:"sprite.renderer.draw-mode.label",info:"sprite.renderer.draw-mode.info",type:a.Select,bindPath:"drawMode",value:o.Simple,options:[{label:"sprite.renderer.draw-mode.simple",value:o.Simple},{label:"sprite.renderer.draw-mode.sliced",value:o.Sliced},{label:"sprite.renderer.draw-mode.tiled",value:o.Tiled}]}),c()],m.prototype,"drawMode",2);export{m as S};
1
+ var f=Object.defineProperty;var y=(e,r,p)=>r in e?f(e,r,{enumerable:!0,configurable:!0,writable:!0,value:p}):e[r]=p;var s=(e,r,p)=>(y(e,typeof r!="symbol"?r+"":r,p),p);import{p as d,C as a,s as c,aF as o,E as w}from"./index-e44b357e.js";import"./index-debbe073.js";import"./postmen-443b3e5f.js";var C=Object.defineProperty,P=Object.getOwnPropertyDescriptor,b=(e,r,p,i)=>{for(var t=i>1?void 0:i?P(r,p):r,l=e.length-1,n;l>=0;l--)(n=e[l])&&(t=(i?n(r,p,t):n(t))||t);return i&&t&&C(r,p,t),t};class m extends w{constructor(){super(...arguments);s(this,"sprite",null);s(this,"color",{r:1,g:1,b:1,a:1});s(this,"drawMode",o.Simple)}}b([d({label:"sprite.renderer.sprite.label",info:"sprite.renderer.sprite.info",type:a.AssetPicker,assetType:"sprite",onChange:async(e,r,p)=>{e.sprite=p?p.getCurrentRef():null,await e.applyBoundPathChange("sprite",a.AssetPicker,e.sprite),e.emit("propertychange","sprite",p)}}),c()],m.prototype,"sprite",2);b([d({bindPath:"color",label:"sprite.renderer.color.label",info:"sprite.renderer.color.info",type:a.Color}),c()],m.prototype,"color",2);b([d({label:"sprite.renderer.draw-mode.label",info:"sprite.renderer.draw-mode.info",type:a.Select,bindPath:"drawMode",value:o.Simple,options:[{label:"sprite.renderer.draw-mode.simple",value:o.Simple},{label:"sprite.renderer.draw-mode.sliced",value:o.Sliced},{label:"sprite.renderer.draw-mode.tiled",value:o.Tiled}]}),c()],m.prototype,"drawMode",2);export{m as S};
@@ -1 +1 @@
1
- var u=Object.defineProperty;var b=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var i=(r,e,t)=>(b(r,typeof e!="symbol"?e+"":e,t),t);import{E as h,aA as f,p as m,C as y,s as c,l as v,g as C}from"./index-3660a664.js";import"./index-365736f7.js";import{c as P}from"./Component-6d1e73e5.js";import"./postmen-c7605b45.js";var g=Object.defineProperty,S=Object.getOwnPropertyDescriptor,o=(r,e,t,s)=>{for(var p=s>1?void 0:s?S(e,t):e,l=r.length-1,n;l>=0;l--)(n=r[l])&&(p=(s?n(e,t,p):n(p))||p);return s&&p&&g(e,t,p),p};let a=class extends h{constructor(e,t){super(e,t);i(this,"sprite",null);i(this,"alphaCutoff",.5);i(this,"influenceLayers",[f.Everything])}};o([m({label:"sprite.mask.sprite.label",info:"sprite.mask.sprite.info",type:y.AssetPicker,assetType:"sprite",bindPath:"sprite"}),c()],a.prototype,"sprite",2);o([m({label:"sprite.mask.alpha-cutoff.label",info:"sprite.mask.alpha-cutoff.info",dragStep:.01,min:0,max:1,type:y.Slider,bindPath:"alphaCutoff"}),c()],a.prototype,"alphaCutoff",2);o([c(v()),m({label:"sprite.mask.influence-layers.label",info:"sprite.mask.influence-layers.info",type:y.Select,...C([f.Nothing,f.Everything]),bindPath:"influenceLayers"})],a.prototype,"influenceLayers",2);a=o([P({type:"SpriteMask",componentsMenu:{group:"2D",label:"component.sprite-mask.title"}})],a);export{a as SpriteMaskComponent};
1
+ var u=Object.defineProperty;var b=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var i=(r,e,t)=>(b(r,typeof e!="symbol"?e+"":e,t),t);import{E as h,aA as f,p as m,C as y,s as c,l as v,g as C}from"./index-e44b357e.js";import"./index-debbe073.js";import{c as P}from"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";var g=Object.defineProperty,S=Object.getOwnPropertyDescriptor,o=(r,e,t,s)=>{for(var p=s>1?void 0:s?S(e,t):e,l=r.length-1,n;l>=0;l--)(n=r[l])&&(p=(s?n(e,t,p):n(p))||p);return s&&p&&g(e,t,p),p};let a=class extends h{constructor(e,t){super(e,t);i(this,"sprite",null);i(this,"alphaCutoff",.5);i(this,"influenceLayers",[f.Everything])}};o([m({label:"sprite.mask.sprite.label",info:"sprite.mask.sprite.info",type:y.AssetPicker,assetType:"sprite",bindPath:"sprite"}),c()],a.prototype,"sprite",2);o([m({label:"sprite.mask.alpha-cutoff.label",info:"sprite.mask.alpha-cutoff.info",dragStep:.01,min:0,max:1,type:y.Slider,bindPath:"alphaCutoff"}),c()],a.prototype,"alphaCutoff",2);o([c(v()),m({label:"sprite.mask.influence-layers.label",info:"sprite.mask.influence-layers.info",type:y.Select,...C([f.Nothing,f.Everything]),bindPath:"influenceLayers"})],a.prototype,"influenceLayers",2);a=o([P({type:"SpriteMask",componentsMenu:{group:"2D",label:"component.sprite-mask.title"}})],a);export{a as SpriteMaskComponent};
@@ -1 +1 @@
1
- var x=Object.defineProperty;var M=(i,t,e)=>t in i?x(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var l=(i,t,e)=>(M(i,typeof t!="symbol"?t+"":t,e),e);import{aH as _,aI as C,aJ as N,aK as w,av as p,bj as P,aM as g,aO as y,aN as v,aB as u,aA as m,C as o,p as f,s as h,l as O,g as I,f as j}from"./index-3660a664.js";import{u as R}from"./index-365736f7.js";import{c as B}from"./Component-6d1e73e5.js";import"./postmen-c7605b45.js";import{c as b}from"./createOnModelChange-c010a049.js";import{S as H}from"./SpriteBaseComponent-062cb4f8.js";const k=_("div",{marginLeft:"5px"}),E=_(C,{border:"1px solid $gray6",borderRadius:"$2",padding:"$0_5",color:"$gray11",cursor:"pointer"}),X=N(function(i){const t=i.data,{t:e}=w();return p.jsxs(E,{align:"v",children:[t.loadingStatus==="loading"&&p.jsx(P,{size:"xs"}),t.loadingStatus==="success"&&p.jsx("img",{src:t.thumbnailUrl,alt:e("sprite.inspector.thumbnail"),width:"20px",height:"20px"}),p.jsxs(k,{children:[e("sprite.inspector.title"),"(",t.name,")"]})]})}),Y=N(function(i){const[t,e]=g.useState(null),r=i.data,{assetStore:s,inspectorFacade:n}=R();return g.useEffect(()=>{s.getAssetByRef(r.sprite).then(c=>{e(c)})},[r.sprite]),p.jsxs(p.Fragment,{children:[p.jsx(y.List,{model:r,configs:r.formSchema.items,onModelChange:b("component",r.id,n,r)}),t?p.jsx(v,{nesting:!0,title:p.jsx(X,{data:t}),defaultOpen:!1,children:p.jsx(y.List,{model:t,configs:t.formSchema.items,onModelChange:b("asset",t.id,n,t)})}):null]})});var S=Object.defineProperty,L=Object.getOwnPropertyDescriptor,W=(i,t,e)=>t in i?S(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,d=(i,t,e,r)=>{for(var s=r>1?void 0:r?L(t,e):t,n=i.length-1,c;n>=0;n--)(c=i[n])&&(s=(r?c(t,e,s):c(s))||s);return r&&s&&S(t,e,s),s},z=(i,t,e)=>(W(i,typeof t!="symbol"?t+"":t,e),e);let a=class extends H{constructor(t,e){super(t,e);l(this,"width",0);l(this,"height",0);l(this,"flip",[]);l(this,"maskInteraction",u.None);l(this,"maskLayer",[m.Everything]);l(this,"material",{refId:a._internalSpriteMaterialRefId});l(this,"priority",0);l(this,"_customWidth");l(this,"_customHeight");this.on("propertychange",(r,s)=>{if(r==="sprite"){const n=this.engineObject;isNaN(this._customWidth)?this.width=n.width:(this.width=this._customWidth,this.applyBoundPathChange("width",o.Number,this._customWidth)),isNaN(this._customHeight)?this.height=n.height:(this.height=this._customHeight,this.applyBoundPathChange("height",o.Number,this._customHeight))}})}async applyBoundPathChange(t,e,r){if(t==="flip"){const s=Array.isArray(r)?r:[];await super.applyBoundPathChange("flipX",o.Toggle,s.includes("flipX")),await super.applyBoundPathChange("flipY",o.Toggle,s.includes("flipY"));return}await super.applyBoundPathChange(t,e,r)}deserializeByEngineObject(t){var r;super.deserializeByEngineObject(t);const e=[];t.flipX&&e.push("flipX"),t.flipY&&e.push("flipY"),this.flip=e,(r=this._originValueMap)==null||r.set("flip",[...e])}deserialize(t){super.deserialize(t);const{props:e}=t;e!=null&&e.flipX&&this.flip.push("flipX"),e!=null&&e.flipY&&this.flip.push("flipY"),isNaN(e==null?void 0:e.width)||(this._customWidth=e.width),isNaN(e==null?void 0:e.height)||(this._customHeight=e.height)}toJSON(){const t=super.toJSON(),e=this.flip;return e&&(t.props.flipX=e.indexOf("flipX")!==-1,t.props.flipY=e.indexOf("flipY")!==-1),isNaN(this._customWidth)||(t.props.width=this._customWidth),isNaN(this._customHeight)||(t.props.height=this._customHeight),t}};z(a,"_internalSpriteMaterialRefId","0000203");d([f({label:"sprite.renderer.width.label",info:"sprite.renderer.width.info",type:o.Number,bindPath:"width",triggerAfterInit:!1,onChange(i,t,e){isNaN(e)||(i._customWidth=e)}}),h()],a.prototype,"width",2);d([f({label:"sprite.renderer.height.label",info:"sprite.renderer.height.info",type:o.Number,bindPath:"height",triggerAfterInit:!1,onChange(i,t,e){isNaN(e)||(i._customHeight=e)}}),h()],a.prototype,"height",2);d([f({label:"sprite.renderer.flip.label",info:"sprite.renderer.flip.info",type:o.ToggleGroup,bindPath:"flip",multiple:!0,options:[{label:"sprite.renderer.flip.x",value:"flipX"},{label:"sprite.renderer.flip.y",value:"flipY"}]}),h()],a.prototype,"flip",2);d([f({label:"sprite.renderer.mask-interaction.label",info:"sprite.renderer.mask-interaction.info",type:o.Select,bindPath:"maskInteraction",value:u.None,options:[{label:"sprite.renderer.mask-interaction.none",value:u.None},{label:"sprite.renderer.mask-interaction.visible-inside",value:u.VisibleInsideMask},{label:"sprite.renderer.mask-interaction.visible-outside",value:u.VisibleOutsideMask}]}),h()],a.prototype,"maskInteraction",2);d([h(O()),f({label:"sprite.renderer.mask-layer.label",info:"sprite.renderer.mask-layer.info",type:o.Select,...I([m.Nothing,m.Everything]),bindPath:"maskLayer"}),h()],a.prototype,"maskLayer",2);d([f({label:"sprite.renderer.material.label",info:"sprite.renderer.material.info",type:o.AssetPicker,assetType:"Material",customFilter:i=>{var t;return((t=i.engineObject.shader)==null?void 0:t.name)!=="Effect/Particle"},onChange:async(i,t,e)=>{const{material:r}=i,s=i.engineObject;if(!r){s.setMaterial(null);return}const{refId:n}=r;n===a._internalSpriteMaterialRefId?s.setMaterial(s.engine._basicResources.spriteDefaultMaterial):e?i.engineObject.setMaterial(e.engineObject):console.error(`Material asset not found: ${r.refId}`)}}),j({engineKey:"setMaterial",getEngineValue:i=>i.getMaterial()}),h()],a.prototype,"material",2);d([f({label:"sprite.renderer.priority.label",info:"sprite.renderer.priority.info",type:o.Number,bindPath:"priority"}),h()],a.prototype,"priority",2);a=d([B({type:"SpriteRenderer",componentsMenu:{group:"2D",label:"component.renderer.sprite.title"},customInspector:Y})],a);export{a as SpriteRendererComponent};
1
+ var x=Object.defineProperty;var M=(i,t,e)=>t in i?x(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var l=(i,t,e)=>(M(i,typeof t!="symbol"?t+"":t,e),e);import{aH as _,aI as C,aJ as N,aK as w,av as p,bj as P,aM as g,aO as y,aN as v,aB as u,aA as m,C as o,p as f,s as h,l as O,g as I,f as j}from"./index-e44b357e.js";import{u as R}from"./index-debbe073.js";import{c as B}from"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";import{c as b}from"./createOnModelChange-e65da908.js";import{S as H}from"./SpriteBaseComponent-3156cb3b.js";const k=_("div",{marginLeft:"5px"}),E=_(C,{border:"1px solid $gray6",borderRadius:"$2",padding:"$0_5",color:"$gray11",cursor:"pointer"}),X=N(function(i){const t=i.data,{t:e}=w();return p.jsxs(E,{align:"v",children:[t.loadingStatus==="loading"&&p.jsx(P,{size:"xs"}),t.loadingStatus==="success"&&p.jsx("img",{src:t.thumbnailUrl,alt:e("sprite.inspector.thumbnail"),width:"20px",height:"20px"}),p.jsxs(k,{children:[e("sprite.inspector.title"),"(",t.name,")"]})]})}),Y=N(function(i){const[t,e]=g.useState(null),r=i.data,{assetStore:s,inspectorFacade:n}=R();return g.useEffect(()=>{s.getAssetByRef(r.sprite).then(c=>{e(c)})},[r.sprite]),p.jsxs(p.Fragment,{children:[p.jsx(y.List,{model:r,configs:r.formSchema.items,onModelChange:b("component",r.id,n,r)}),t?p.jsx(v,{nesting:!0,title:p.jsx(X,{data:t}),defaultOpen:!1,children:p.jsx(y.List,{model:t,configs:t.formSchema.items,onModelChange:b("asset",t.id,n,t)})}):null]})});var S=Object.defineProperty,L=Object.getOwnPropertyDescriptor,W=(i,t,e)=>t in i?S(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,d=(i,t,e,r)=>{for(var s=r>1?void 0:r?L(t,e):t,n=i.length-1,c;n>=0;n--)(c=i[n])&&(s=(r?c(t,e,s):c(s))||s);return r&&s&&S(t,e,s),s},z=(i,t,e)=>(W(i,typeof t!="symbol"?t+"":t,e),e);let a=class extends H{constructor(t,e){super(t,e);l(this,"width",0);l(this,"height",0);l(this,"flip",[]);l(this,"maskInteraction",u.None);l(this,"maskLayer",[m.Everything]);l(this,"material",{refId:a._internalSpriteMaterialRefId});l(this,"priority",0);l(this,"_customWidth");l(this,"_customHeight");this.on("propertychange",(r,s)=>{if(r==="sprite"){const n=this.engineObject;isNaN(this._customWidth)?this.width=n.width:(this.width=this._customWidth,this.applyBoundPathChange("width",o.Number,this._customWidth)),isNaN(this._customHeight)?this.height=n.height:(this.height=this._customHeight,this.applyBoundPathChange("height",o.Number,this._customHeight))}})}async applyBoundPathChange(t,e,r){if(t==="flip"){const s=Array.isArray(r)?r:[];await super.applyBoundPathChange("flipX",o.Toggle,s.includes("flipX")),await super.applyBoundPathChange("flipY",o.Toggle,s.includes("flipY"));return}await super.applyBoundPathChange(t,e,r)}deserializeByEngineObject(t){var r;super.deserializeByEngineObject(t);const e=[];t.flipX&&e.push("flipX"),t.flipY&&e.push("flipY"),this.flip=e,(r=this._originValueMap)==null||r.set("flip",[...e])}deserialize(t){super.deserialize(t);const{props:e}=t;e!=null&&e.flipX&&this.flip.push("flipX"),e!=null&&e.flipY&&this.flip.push("flipY"),isNaN(e==null?void 0:e.width)||(this._customWidth=e.width),isNaN(e==null?void 0:e.height)||(this._customHeight=e.height)}toJSON(){const t=super.toJSON(),e=this.flip;return e&&(t.props.flipX=e.indexOf("flipX")!==-1,t.props.flipY=e.indexOf("flipY")!==-1),isNaN(this._customWidth)||(t.props.width=this._customWidth),isNaN(this._customHeight)||(t.props.height=this._customHeight),t}};z(a,"_internalSpriteMaterialRefId","0000203");d([f({label:"sprite.renderer.width.label",info:"sprite.renderer.width.info",type:o.Number,bindPath:"width",triggerAfterInit:!1,onChange(i,t,e){isNaN(e)||(i._customWidth=e)}}),h()],a.prototype,"width",2);d([f({label:"sprite.renderer.height.label",info:"sprite.renderer.height.info",type:o.Number,bindPath:"height",triggerAfterInit:!1,onChange(i,t,e){isNaN(e)||(i._customHeight=e)}}),h()],a.prototype,"height",2);d([f({label:"sprite.renderer.flip.label",info:"sprite.renderer.flip.info",type:o.ToggleGroup,bindPath:"flip",multiple:!0,options:[{label:"sprite.renderer.flip.x",value:"flipX"},{label:"sprite.renderer.flip.y",value:"flipY"}]}),h()],a.prototype,"flip",2);d([f({label:"sprite.renderer.mask-interaction.label",info:"sprite.renderer.mask-interaction.info",type:o.Select,bindPath:"maskInteraction",value:u.None,options:[{label:"sprite.renderer.mask-interaction.none",value:u.None},{label:"sprite.renderer.mask-interaction.visible-inside",value:u.VisibleInsideMask},{label:"sprite.renderer.mask-interaction.visible-outside",value:u.VisibleOutsideMask}]}),h()],a.prototype,"maskInteraction",2);d([h(O()),f({label:"sprite.renderer.mask-layer.label",info:"sprite.renderer.mask-layer.info",type:o.Select,...I([m.Nothing,m.Everything]),bindPath:"maskLayer"}),h()],a.prototype,"maskLayer",2);d([f({label:"sprite.renderer.material.label",info:"sprite.renderer.material.info",type:o.AssetPicker,assetType:"Material",customFilter:i=>{var t;return((t=i.engineObject.shader)==null?void 0:t.name)!=="Effect/Particle"},onChange:async(i,t,e)=>{const{material:r}=i,s=i.engineObject;if(!r){s.setMaterial(null);return}const{refId:n}=r;n===a._internalSpriteMaterialRefId?s.setMaterial(s.engine._basicResources.spriteDefaultMaterial):e?i.engineObject.setMaterial(e.engineObject):console.error(`Material asset not found: ${r.refId}`)}}),j({engineKey:"setMaterial",getEngineValue:i=>i.getMaterial()}),h()],a.prototype,"material",2);d([f({label:"sprite.renderer.priority.label",info:"sprite.renderer.priority.info",type:o.Number,bindPath:"priority"}),h()],a.prototype,"priority",2);a=d([B({type:"SpriteRenderer",componentsMenu:{group:"2D",label:"component.renderer.sprite.title"},customInspector:Y})],a);export{a as SpriteRendererComponent};
@@ -1,4 +1,4 @@
1
- var m=Object.defineProperty;var w=(e,n,t)=>n in e?m(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var l=(e,n,t)=>(w(e,typeof n!="symbol"?n+"":n,t),t);import{ch as h,av as o,ci as g,p as c,C as i,s as f,cj as s,f as v,aE as y,bL as b,ck as d,e as C,E as A}from"./index-3660a664.js";import"./index-365736f7.js";import"./postmen-c7605b45.js";import{c as u}from"./createReactComponent-d9f8b1af.js";/**
1
+ var m=Object.defineProperty;var w=(e,n,t)=>n in e?m(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var l=(e,n,t)=>(w(e,typeof n!="symbol"?n+"":n,t),t);import{ch as h,av as o,ci as g,p as c,C as i,s as f,cj as s,f as v,aE as y,bL as b,ck as d,e as C,E as A}from"./index-e44b357e.js";import"./index-debbe073.js";import"./postmen-443b3e5f.js";import{c as u}from"./createReactComponent-cb70ea50.js";/**
2
2
  * @license @tabler/icons-react v3.24.0 - MIT
3
3
  *
4
4
  * This source code is licensed under the MIT license.
@@ -1 +1 @@
1
- var c=Object.defineProperty;var x=(r,e,t)=>e in r?c(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var a=(r,e,t)=>(x(r,typeof e!="symbol"?e+"":e,t),t);import{aB as l,aA as h,p,C as s,s as m,g as f,l as u}from"./index-3660a664.js";import"./index-365736f7.js";import{c as v}from"./Component-6d1e73e5.js";import"./postmen-c7605b45.js";import{T as k}from"./TextBaseComponent-bd7ed8ee.js";import"./createReactComponent-d9f8b1af.js";var g=Object.defineProperty,P=Object.getOwnPropertyDescriptor,o=(r,e,t,d)=>{for(var i=d>1?void 0:d?P(e,t):e,b=r.length-1,y;b>=0;b--)(y=r[b])&&(i=(d?y(e,t,i):y(i))||i);return d&&i&&g(e,t,i),i};let n=class extends k{constructor(e,t){super(e,t);a(this,"width",0);a(this,"height",0);a(this,"maskInteraction",l.None);a(this,"maskLayer",[h.Layer0]);a(this,"priority",0)}};o([p({label:"text-renderer.width.label",info:"text-renderer.width.info",type:s.Number,bindPath:"width"}),m()],n.prototype,"width",2);o([p({label:"text-renderer.height.label",info:"text-renderer.height.info",type:s.Number,bindPath:"height"}),m()],n.prototype,"height",2);o([p({label:"text-renderer.mask-interaction.label",info:"text-renderer.mask-interaction.info",type:s.Select,bindPath:"maskInteraction",value:l.None,options:[{label:"text-renderer.mask-interaction.none",value:l.None},{label:"text-renderer.mask-interaction.visible-inside",value:l.VisibleInsideMask},{label:"text-renderer.mask-interaction.visible-outside",value:l.VisibleOutsideMask}]}),m()],n.prototype,"maskInteraction",2);o([p({label:"text-renderer.mask-layer.label",info:"text-renderer.mask-layer.info",type:s.Select,bindPath:"maskLayer",...f([h.Nothing,h.Everything])}),m(u())],n.prototype,"maskLayer",2);o([p({label:"text-renderer.priority.label",info:"text-renderer.priority.info",type:s.Number,bindPath:"priority"}),m()],n.prototype,"priority",2);n=o([v({type:"TextRenderer",componentsMenu:{group:"2D",label:"component.text-renderer.title"}})],n);export{n as TextRendererComponent};
1
+ var c=Object.defineProperty;var x=(r,e,t)=>e in r?c(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var a=(r,e,t)=>(x(r,typeof e!="symbol"?e+"":e,t),t);import{aB as l,aA as h,p,C as s,s as m,g as f,l as u}from"./index-e44b357e.js";import"./index-debbe073.js";import{c as v}from"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";import{T as k}from"./TextBaseComponent-520dea39.js";import"./createReactComponent-cb70ea50.js";var g=Object.defineProperty,P=Object.getOwnPropertyDescriptor,o=(r,e,t,d)=>{for(var i=d>1?void 0:d?P(e,t):e,b=r.length-1,y;b>=0;b--)(y=r[b])&&(i=(d?y(e,t,i):y(i))||i);return d&&i&&g(e,t,i),i};let n=class extends k{constructor(e,t){super(e,t);a(this,"width",0);a(this,"height",0);a(this,"maskInteraction",l.None);a(this,"maskLayer",[h.Layer0]);a(this,"priority",0)}};o([p({label:"text-renderer.width.label",info:"text-renderer.width.info",type:s.Number,bindPath:"width"}),m()],n.prototype,"width",2);o([p({label:"text-renderer.height.label",info:"text-renderer.height.info",type:s.Number,bindPath:"height"}),m()],n.prototype,"height",2);o([p({label:"text-renderer.mask-interaction.label",info:"text-renderer.mask-interaction.info",type:s.Select,bindPath:"maskInteraction",value:l.None,options:[{label:"text-renderer.mask-interaction.none",value:l.None},{label:"text-renderer.mask-interaction.visible-inside",value:l.VisibleInsideMask},{label:"text-renderer.mask-interaction.visible-outside",value:l.VisibleOutsideMask}]}),m()],n.prototype,"maskInteraction",2);o([p({label:"text-renderer.mask-layer.label",info:"text-renderer.mask-layer.info",type:s.Select,bindPath:"maskLayer",...f([h.Nothing,h.Everything])}),m(u())],n.prototype,"maskLayer",2);o([p({label:"text-renderer.priority.label",info:"text-renderer.priority.info",type:s.Number,bindPath:"priority"}),m()],n.prototype,"priority",2);n=o([v({type:"TextRenderer",componentsMenu:{group:"2D",label:"component.text-renderer.title"}})],n);export{n as TextRendererComponent};
@@ -1,4 +1,4 @@
1
- var me=Object.defineProperty;var fe=(n,e,t)=>e in n?me(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var v=(n,e,t)=>(fe(n,typeof e!="symbol"?e+"":e,t),t);import{ae as V,b1 as Y,N as J,$ as Z,y as Q,bD as ee,ah as te,aJ as q,aK as be,av as w,bk as ne,aI as N,ay as H,bz as ye,cm as ge,aN as we,e as P,dr as xe,aM as ve,aO as Me,K as Se,j as Ce,ad as I,T as S,p as A,C as j,aT as T,x as _e,n as Re,o as Te,bR as De,b3 as Oe,q as Be,a_ as K,a$ as ie,ey as Ae,ez as ae,eA as je}from"./index-3660a664.js";import{k,H as re}from"./ktx2-encoder-e9b1c83a.js";import{u as Ee}from"./index-365736f7.js";import"./postmen-c7605b45.js";import{e as se}from"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import{T as Ie}from"./Tooltip-3bc02b10.js";import{c as Ue}from"./createReactComponent-d9f8b1af.js";import{A as Pe}from"./AssetViewer-1073ddb5.js";const X=function(n,e,t){return n>=t?t:n<=e?e:n};function Le(n,e,t,i,a){const r=new Uint8Array(n);i=X(i,0,255),a=X(a,0,255);const s=(d,p)=>(p*e+d)*4,c=[[-1,0],[1,0],[0,-1],[0,1]],o=[];for(let d=0;d<t;d++)for(let p=0;p<e;p++)if(r[s(p,d)+3]!==0)for(const[y,b]of c){const h=p+y,m=d+b;if(h>=0&&h<e&&m>=0&&m<t&&r[s(h,m)+3]===0){o.push([p,d]);break}}const l=new Set,u=[];for(;o.length>0;){const d=[];for(const[p,y]of o)for(const[b,h]of c){const m=p+b,f=y+h;if(m<0||m>=e||f<0||f>=t)continue;const x=s(m,f);if(r[x+3]>i)continue;const g=f*e+m;if(l.has(g))continue;l.add(g);const C=s(p,y);r[x]=r[C],r[x+1]=r[C+1],r[x+2]=r[C+2],r[x+3]=255,d.push([m,f]),u.push(x)}o.length=0;for(let p=0;p<d.length;p++)o.push(d[p])}for(const d of u)r[d+3]=a;return r}function L(n){const e=n instanceof Uint8Array?n:new Uint8Array(n);return e[0]===35&&e[1]===63}function z(n,e){const t=new Float32Array(1),i=new Uint32Array(t.buffer);for(let a=0;a<n.length;a++){t[0]=n[a];const r=i[0],s=r>>16&32768,c=(r>>23&255)-127+15,o=r&8388607;c<=0?e[a]=s:c>=31?e[a]=s|31744:e[a]=s|c<<10|o>>13}}function F(n){const e=Ge(n),{width:t,height:i,dataPosition:a}=e,r=He(n.subarray(a),t,i),s=Fe(r,t,i);return{width:t,height:i,pixels:s}}function Fe(n,e,t){const i=e*t,a=new Float32Array(i*4);for(let r=0;r<i;r++){const s=r*4,c=r*4,o=Math.pow(2,n[s+3]-128-8);a[c]=Math.min(n[s]*o,65504),a[c+1]=Math.min(n[s+1]*o,65504),a[c+2]=Math.min(n[s+2]*o,65504),a[c+3]=1}return a}function Ge(n){let e=$(n,0);if(e[0]!=="#"||e[1]!=="?")throw new Error("HDR: invalid header");let t=0,i=!1,a=!1;do t+=e.length+1,e=$(n,t),e==="FORMAT=32-bit_rle_rgbe"?i=!0:e.length===0&&(a=!0);while(!a);if(!i)throw new Error("HDR: unsupported format");t+=e.length+1,e=$(n,t);const r=/^\-Y (.*) \+X (.*)$/g.exec(e);if(!r||r.length<3)throw new Error("HDR: missing size");return{width:parseInt(r[2]),height:parseInt(r[1]),dataPosition:t+e.length+1}}function He(n,e,t){const i=n.byteLength,a=new Uint8Array(4*e*t);let r=0,s=0;const c=4*e,o=new Uint8Array(c);let l=t;for(;l>0&&s<i;){const u=n[s++],d=n[s++],p=n[s++],y=n[s++];if(u!==2||d!==2||p&128||e<8||e>32767)return n;if((p<<8|y)!==e)throw new Error("HDR: wrong scanline width");let b=0;for(;b<c&&s<i;){let h=n[s++];const m=h>128;if(m&&(h-=128),h===0||b+h>c)throw new Error("HDR: bad scanline");if(m){const f=n[s++];for(let x=0;x<h;x++)o[b++]=f}else o.set(n.subarray(s,s+h),b),b+=h,s+=h}for(let h=0;h<e;h++,r+=4)a[r]=o[h],a[r+1]=o[h+e],a[r+2]=o[h+e*2],a[r+3]=o[h+e*3];l--}return a}function $(n,e){let t="";for(let i=e;i<n.length;i++){const a=String.fromCharCode(n[i]);if(a===`
1
+ var me=Object.defineProperty;var fe=(n,e,t)=>e in n?me(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var v=(n,e,t)=>(fe(n,typeof e!="symbol"?e+"":e,t),t);import{ae as V,b1 as Y,N as J,$ as Z,y as Q,bD as ee,ah as te,aJ as q,aK as be,av as w,bk as ne,aI as N,ay as H,bz as ye,cm as ge,aN as we,e as P,dr as xe,aM as ve,aO as Me,K as Se,j as Ce,ad as I,T as S,p as A,C as j,aT as T,x as _e,n as Re,o as Te,bR as De,b3 as Oe,q as Be,a_ as K,a$ as ie,ey as Ae,ez as ae,eA as je}from"./index-e44b357e.js";import{k,H as re}from"./ktx2-encoder-522fc017.js";import{u as Ee}from"./index-debbe073.js";import"./postmen-443b3e5f.js";import{e as se}from"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import{T as Ie}from"./Tooltip-71e5a4e7.js";import{c as Ue}from"./createReactComponent-cb70ea50.js";import{A as Pe}from"./AssetViewer-d2c63b00.js";const X=function(n,e,t){return n>=t?t:n<=e?e:n};function Le(n,e,t,i,a){const r=new Uint8Array(n);i=X(i,0,255),a=X(a,0,255);const s=(d,p)=>(p*e+d)*4,c=[[-1,0],[1,0],[0,-1],[0,1]],o=[];for(let d=0;d<t;d++)for(let p=0;p<e;p++)if(r[s(p,d)+3]!==0)for(const[y,b]of c){const h=p+y,m=d+b;if(h>=0&&h<e&&m>=0&&m<t&&r[s(h,m)+3]===0){o.push([p,d]);break}}const l=new Set,u=[];for(;o.length>0;){const d=[];for(const[p,y]of o)for(const[b,h]of c){const m=p+b,f=y+h;if(m<0||m>=e||f<0||f>=t)continue;const x=s(m,f);if(r[x+3]>i)continue;const g=f*e+m;if(l.has(g))continue;l.add(g);const C=s(p,y);r[x]=r[C],r[x+1]=r[C+1],r[x+2]=r[C+2],r[x+3]=255,d.push([m,f]),u.push(x)}o.length=0;for(let p=0;p<d.length;p++)o.push(d[p])}for(const d of u)r[d+3]=a;return r}function L(n){const e=n instanceof Uint8Array?n:new Uint8Array(n);return e[0]===35&&e[1]===63}function z(n,e){const t=new Float32Array(1),i=new Uint32Array(t.buffer);for(let a=0;a<n.length;a++){t[0]=n[a];const r=i[0],s=r>>16&32768,c=(r>>23&255)-127+15,o=r&8388607;c<=0?e[a]=s:c>=31?e[a]=s|31744:e[a]=s|c<<10|o>>13}}function F(n){const e=Ge(n),{width:t,height:i,dataPosition:a}=e,r=He(n.subarray(a),t,i),s=Fe(r,t,i);return{width:t,height:i,pixels:s}}function Fe(n,e,t){const i=e*t,a=new Float32Array(i*4);for(let r=0;r<i;r++){const s=r*4,c=r*4,o=Math.pow(2,n[s+3]-128-8);a[c]=Math.min(n[s]*o,65504),a[c+1]=Math.min(n[s+1]*o,65504),a[c+2]=Math.min(n[s+2]*o,65504),a[c+3]=1}return a}function Ge(n){let e=$(n,0);if(e[0]!=="#"||e[1]!=="?")throw new Error("HDR: invalid header");let t=0,i=!1,a=!1;do t+=e.length+1,e=$(n,t),e==="FORMAT=32-bit_rle_rgbe"?i=!0:e.length===0&&(a=!0);while(!a);if(!i)throw new Error("HDR: unsupported format");t+=e.length+1,e=$(n,t);const r=/^\-Y (.*) \+X (.*)$/g.exec(e);if(!r||r.length<3)throw new Error("HDR: missing size");return{width:parseInt(r[2]),height:parseInt(r[1]),dataPosition:t+e.length+1}}function He(n,e,t){const i=n.byteLength,a=new Uint8Array(4*e*t);let r=0,s=0;const c=4*e,o=new Uint8Array(c);let l=t;for(;l>0&&s<i;){const u=n[s++],d=n[s++],p=n[s++],y=n[s++];if(u!==2||d!==2||p&128||e<8||e>32767)return n;if((p<<8|y)!==e)throw new Error("HDR: wrong scanline width");let b=0;for(;b<c&&s<i;){let h=n[s++];const m=h>128;if(m&&(h-=128),h===0||b+h>c)throw new Error("HDR: bad scanline");if(m){const f=n[s++];for(let x=0;x<h;x++)o[b++]=f}else o.set(n.subarray(s,s+h),b),b+=h,s+=h}for(let h=0;h<e;h++,r+=4)a[r]=o[h],a[r+1]=o[h+e],a[r+2]=o[h+e*2],a[r+3]=o[h+e*3];l--}return a}function $(n,e){let t="";for(let i=e;i<n.length;i++){const a=String.fromCharCode(n[i]);if(a===`
2
2
  `)break;t+=a}return t}function Ve(n,e,t){if(n.length!==e*t*4)throw new Error(`HDREncoder: pixel count mismatch (expected ${e*t*4}, got ${n.length})`);const i=ke(e,t),a=ze(n,e,t),r=new Uint8Array(i.length+a.length);return r.set(i,0),r.set(a,i.length),r.buffer}function ke(n,e){const t=`#?RADIANCE
3
3
  # Written by Galacean HDREncoder
4
4
  FORMAT=32-bit_rle_rgbe
@@ -1 +1 @@
1
- import{aM as s,b9 as _,d2 as le,av as f,bc as D,bb as g,d3 as G,d4 as ce,d5 as ue,d6 as de,d7 as fe,b5 as pe,d8 as Y,d9 as ve,da as z,db as he,dc as ye,bd as xe,b8 as Ee,dd as be,bh as me,aH as Ce}from"./index-3660a664.js";var ge="DismissableLayer",I="dismissableLayer.update",Te="dismissableLayer.pointerDownOutside",Pe="dismissableLayer.focusOutside",V,X=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),q=s.forwardRef((e,n)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:u,...c}=e,d=s.useContext(X),[l,h]=s.useState(null),v=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=s.useState({}),x=_(n,p=>h(p)),E=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=E.indexOf(b),m=l?E.indexOf(l):-1,P=d.layersWithOutsidePointerEventsDisabled.size>0,T=m>=C,w=Oe(p=>{const A=p.target,$=[...d.branches].some(k=>k.contains(A));!T||$||(o==null||o(p),i==null||i(p),p.defaultPrevented||u==null||u())},v),O=De(p=>{const A=p.target;[...d.branches].some(k=>k.contains(A))||(a==null||a(p),i==null||i(p),p.defaultPrevented||u==null||u())},v);return le(p=>{m===d.layers.size-1&&(r==null||r(p),!p.defaultPrevented&&u&&(p.preventDefault(),u()))},v),s.useEffect(()=>{if(l)return t&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(V=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),U(),()=>{t&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=V)}},[l,v,t,d]),s.useEffect(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),U())},[l,d]),s.useEffect(()=>{const p=()=>y({});return document.addEventListener(I,p),()=>document.removeEventListener(I,p)},[]),f.jsx(D.div,{...c,ref:x,style:{pointerEvents:P?T?"auto":"none":void 0,...e.style},onFocusCapture:g(e.onFocusCapture,O.onFocusCapture),onBlurCapture:g(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:g(e.onPointerDownCapture,w.onPointerDownCapture)})});q.displayName=ge;var we="DismissableLayerBranch",Re=s.forwardRef((e,n)=>{const t=s.useContext(X),r=s.useRef(null),o=_(n,r);return s.useEffect(()=>{const a=r.current;if(a)return t.branches.add(a),()=>{t.branches.delete(a)}},[t.branches]),f.jsx(D.div,{...e,ref:o})});Re.displayName=we;function Oe(e,n=globalThis==null?void 0:globalThis.document){const t=G(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let c=function(){K(Te,t,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=c,n.addEventListener("click",o.current,{once:!0})):c()}else n.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),n.removeEventListener("pointerdown",a),n.removeEventListener("click",o.current)}},[n,t]),{onPointerDownCapture:()=>r.current=!0}}function De(e,n=globalThis==null?void 0:globalThis.document){const t=G(e),r=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!r.current&&K(Pe,t,{originalEvent:a},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function U(){const e=new CustomEvent(I);document.dispatchEvent(e)}function K(e,n,t,{discrete:r}){const o=t.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),r?ce(o,a):o.dispatchEvent(a)}var Le="Portal",Z=s.forwardRef((e,n)=>{var u;const{container:t,...r}=e,[o,a]=s.useState(!1);ue(()=>a(!0),[]);const i=t||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return i?de.createPortal(f.jsx(D.div,{...r,ref:n}),i):null});Z.displayName=Le;var Ae=s.forwardRef((e,n)=>{const{children:t,...r}=e,o=s.Children.toArray(t),a=o.find(_e);if(a){const i=a.props.children,u=o.map(c=>c===a?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:c);return f.jsx(M,{...r,ref:n,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return f.jsx(M,{...r,ref:n,children:t})});Ae.displayName="Slot";var M=s.forwardRef((e,n)=>{const{children:t,...r}=e;if(s.isValidElement(t)){const o=Se(t);return s.cloneElement(t,{...je(r,t.props),ref:n?fe(n,o):o})}return s.Children.count(t)>1?s.Children.only(null):null});M.displayName="SlotClone";var J=({children:e})=>f.jsx(f.Fragment,{children:e});function _e(e){return s.isValidElement(e)&&e.type===J}function je(e,n){const t={...n};for(const r in n){const o=e[r],a=n[r];/^on[A-Z]/.test(r)?o&&a?t[r]=(...u)=>{a(...u),o(...u)}:o&&(t[r]=o):r==="style"?t[r]={...o,...a}:r==="className"&&(t[r]=[o,a].filter(Boolean).join(" "))}return{...e,...t}}function Se(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var Ne="VisuallyHidden",Q=s.forwardRef((e,n)=>f.jsx(D.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Q.displayName=Ne;var ke=Q,[j,ot]=pe("Tooltip",[Y]),S=Y(),ee="TooltipProvider",Ie=700,H="tooltip.open",[Me,W]=j(ee),te=e=>{const{__scopeTooltip:n,delayDuration:t=Ie,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,u]=s.useState(!0),c=s.useRef(!1),d=s.useRef(0);return s.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),f.jsx(Me,{scope:n,isOpenDelayed:i,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(d.current),u(!1)},[]),onClose:s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(l=>{c.current=l},[]),disableHoverableContent:o,children:a})};te.displayName=ee;var N="Tooltip",[He,L]=j(N),ne=e=>{const{__scopeTooltip:n,children:t,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:u}=e,c=W(N,e.__scopeTooltip),d=S(n),[l,h]=s.useState(null),v=xe(),y=s.useRef(0),x=i??c.disableHoverableContent,E=u??c.delayDuration,b=s.useRef(!1),[C=!1,m]=Ee({prop:r,defaultProp:o,onChange:p=>{p?(c.onOpen(),document.dispatchEvent(new CustomEvent(H))):c.onClose(),a==null||a(p)}}),P=s.useMemo(()=>C?b.current?"delayed-open":"instant-open":"closed",[C]),T=s.useCallback(()=>{window.clearTimeout(y.current),b.current=!1,m(!0)},[m]),w=s.useCallback(()=>{window.clearTimeout(y.current),m(!1)},[m]),O=s.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,m(!0)},E)},[E,m]);return s.useEffect(()=>()=>window.clearTimeout(y.current),[]),f.jsx(be,{...d,children:f.jsx(He,{scope:n,contentId:v,open:C,stateAttribute:P,trigger:l,onTriggerChange:h,onTriggerEnter:s.useCallback(()=>{c.isOpenDelayed?O():T()},[c.isOpenDelayed,O,T]),onTriggerLeave:s.useCallback(()=>{x?w():window.clearTimeout(y.current)},[w,x]),onOpen:T,onClose:w,disableHoverableContent:x,children:t})})};ne.displayName=N;var B="TooltipTrigger",re=s.forwardRef((e,n)=>{const{__scopeTooltip:t,...r}=e,o=L(B,t),a=W(B,t),i=S(t),u=s.useRef(null),c=_(n,u,o.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),h=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),f.jsx(ve,{asChild:!0,...i,children:f.jsx(D.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:g(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:g(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:g(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:g(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:g(e.onBlur,o.onClose),onClick:g(e.onClick,o.onClose)})})});re.displayName=B;var F="TooltipPortal",[Be,We]=j(F,{forceMount:void 0}),oe=e=>{const{__scopeTooltip:n,forceMount:t,children:r,container:o}=e,a=L(F,n);return f.jsx(Be,{scope:n,forceMount:t,children:f.jsx(z,{present:t||a.open,children:f.jsx(Z,{asChild:!0,container:o,children:r})})})};oe.displayName=F;var R="TooltipContent",se=s.forwardRef((e,n)=>{const t=We(R,e.__scopeTooltip),{forceMount:r=t.forceMount,side:o="top",...a}=e,i=L(R,e.__scopeTooltip);return f.jsx(z,{present:r||i.open,children:i.disableHoverableContent?f.jsx(ae,{side:o,...a,ref:n}):f.jsx(Fe,{side:o,...a,ref:n})})}),Fe=s.forwardRef((e,n)=>{const t=L(R,e.__scopeTooltip),r=W(R,e.__scopeTooltip),o=s.useRef(null),a=_(n,o),[i,u]=s.useState(null),{trigger:c,onClose:d}=t,l=o.current,{onPointerInTransitChange:h}=r,v=s.useCallback(()=>{u(null),h(!1)},[h]),y=s.useCallback((x,E)=>{const b=x.currentTarget,C={x:x.clientX,y:x.clientY},m=Ge(C,b.getBoundingClientRect()),P=Ye(C,m),T=ze(E.getBoundingClientRect()),w=qe([...P,...T]);u(w),h(!0)},[h]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(c&&l){const x=b=>y(b,l),E=b=>y(b,c);return c.addEventListener("pointerleave",x),l.addEventListener("pointerleave",E),()=>{c.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",E)}}},[c,l,y,v]),s.useEffect(()=>{if(i){const x=E=>{const b=E.target,C={x:E.clientX,y:E.clientY},m=(c==null?void 0:c.contains(b))||(l==null?void 0:l.contains(b)),P=!Xe(C,i);m?v():P&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,l,i,d,v]),f.jsx(ae,{...e,ref:a})}),[$e,Ve]=j(N,{isInside:!1}),ae=s.forwardRef((e,n)=>{const{__scopeTooltip:t,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...u}=e,c=L(R,t),d=S(t),{onClose:l}=c;return s.useEffect(()=>(document.addEventListener(H,l),()=>document.removeEventListener(H,l)),[l]),s.useEffect(()=>{if(c.trigger){const h=v=>{const y=v.target;y!=null&&y.contains(c.trigger)&&l()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,l]),f.jsx(q,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:l,children:f.jsxs(he,{"data-state":c.stateAttribute,...d,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(J,{children:r}),f.jsx($e,{scope:t,isInside:!0,children:f.jsx(ke,{id:c.contentId,role:"tooltip",children:o||r})})]})})});se.displayName=R;var ie="TooltipArrow",Ue=s.forwardRef((e,n)=>{const{__scopeTooltip:t,...r}=e,o=S(t);return Ve(ie,t).isInside?null:f.jsx(ye,{...o,...r,ref:n})});Ue.displayName=ie;function Ge(e,n){const t=Math.abs(n.top-e.y),r=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),a=Math.abs(n.left-e.x);switch(Math.min(t,r,o,a)){case a:return"left";case o:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ye(e,n,t=5){const r=[];switch(n){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function ze(e){const{top:n,right:t,bottom:r,left:o}=e;return[{x:o,y:n},{x:t,y:n},{x:t,y:r},{x:o,y:r}]}function Xe(e,n){const{x:t,y:r}=e;let o=!1;for(let a=0,i=n.length-1;a<n.length;i=a++){const u=n[a].x,c=n[a].y,d=n[i].x,l=n[i].y;c>r!=l>r&&t<(d-u)*(r-c)/(l-c)+u&&(o=!o)}return o}function qe(e){const n=e.slice();return n.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ke(n)}function Ke(e){if(e.length<=1)return e.slice();const n=[];for(let r=0;r<e.length;r++){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}n.pop();const t=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var Ze=ne,Je=re,Qe=oe,et=se;const tt=me({"0%":{opacity:0,transform:"scale(0) translateY(-4px)"},"100%":{opacity:1,transform:"scale(1) translateY(0px)"}}),nt=Ce(et,{display:"flex",alignItems:"center",fontSize:"13px",padding:"$2 $3",backgroundColor:"$gray2",borderRadius:"$4",color:"$gray12",boxShadow:"inset 0 0 0 1px $colors$grayA4",transformOrigin:"var(--radix-tooltip-content-transform-origin)",animation:`${tt} 0.2s ease forwards`});function st(e){const{children:n,content:t,side:r="bottom",sideOffset:o=6,delayDuration:a=0,...i}=e;return f.jsx(te,{children:f.jsxs(Ze,{delayDuration:a,...i,children:[f.jsx(Je,{asChild:!0,children:n}),f.jsx(Qe,{children:f.jsx(nt,{sideOffset:o,side:r,children:t})})]})})}export{st as T};
1
+ import{aM as s,b9 as _,d2 as le,av as f,bc as D,bb as g,d3 as G,d4 as ce,d5 as ue,d6 as de,d7 as fe,b5 as pe,d8 as Y,d9 as ve,da as z,db as he,dc as ye,bd as xe,b8 as Ee,dd as be,bh as me,aH as Ce}from"./index-e44b357e.js";var ge="DismissableLayer",I="dismissableLayer.update",Te="dismissableLayer.pointerDownOutside",Pe="dismissableLayer.focusOutside",V,X=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),q=s.forwardRef((e,n)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:u,...c}=e,d=s.useContext(X),[l,h]=s.useState(null),v=(l==null?void 0:l.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=s.useState({}),x=_(n,p=>h(p)),E=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),C=E.indexOf(b),m=l?E.indexOf(l):-1,P=d.layersWithOutsidePointerEventsDisabled.size>0,T=m>=C,w=Oe(p=>{const A=p.target,$=[...d.branches].some(k=>k.contains(A));!T||$||(o==null||o(p),i==null||i(p),p.defaultPrevented||u==null||u())},v),O=De(p=>{const A=p.target;[...d.branches].some(k=>k.contains(A))||(a==null||a(p),i==null||i(p),p.defaultPrevented||u==null||u())},v);return le(p=>{m===d.layers.size-1&&(r==null||r(p),!p.defaultPrevented&&u&&(p.preventDefault(),u()))},v),s.useEffect(()=>{if(l)return t&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(V=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),U(),()=>{t&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=V)}},[l,v,t,d]),s.useEffect(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),U())},[l,d]),s.useEffect(()=>{const p=()=>y({});return document.addEventListener(I,p),()=>document.removeEventListener(I,p)},[]),f.jsx(D.div,{...c,ref:x,style:{pointerEvents:P?T?"auto":"none":void 0,...e.style},onFocusCapture:g(e.onFocusCapture,O.onFocusCapture),onBlurCapture:g(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:g(e.onPointerDownCapture,w.onPointerDownCapture)})});q.displayName=ge;var we="DismissableLayerBranch",Re=s.forwardRef((e,n)=>{const t=s.useContext(X),r=s.useRef(null),o=_(n,r);return s.useEffect(()=>{const a=r.current;if(a)return t.branches.add(a),()=>{t.branches.delete(a)}},[t.branches]),f.jsx(D.div,{...e,ref:o})});Re.displayName=we;function Oe(e,n=globalThis==null?void 0:globalThis.document){const t=G(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let c=function(){K(Te,t,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=c,n.addEventListener("click",o.current,{once:!0})):c()}else n.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),n.removeEventListener("pointerdown",a),n.removeEventListener("click",o.current)}},[n,t]),{onPointerDownCapture:()=>r.current=!0}}function De(e,n=globalThis==null?void 0:globalThis.document){const t=G(e),r=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!r.current&&K(Pe,t,{originalEvent:a},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function U(){const e=new CustomEvent(I);document.dispatchEvent(e)}function K(e,n,t,{discrete:r}){const o=t.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),r?ce(o,a):o.dispatchEvent(a)}var Le="Portal",Z=s.forwardRef((e,n)=>{var u;const{container:t,...r}=e,[o,a]=s.useState(!1);ue(()=>a(!0),[]);const i=t||o&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return i?de.createPortal(f.jsx(D.div,{...r,ref:n}),i):null});Z.displayName=Le;var Ae=s.forwardRef((e,n)=>{const{children:t,...r}=e,o=s.Children.toArray(t),a=o.find(_e);if(a){const i=a.props.children,u=o.map(c=>c===a?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:c);return f.jsx(M,{...r,ref:n,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return f.jsx(M,{...r,ref:n,children:t})});Ae.displayName="Slot";var M=s.forwardRef((e,n)=>{const{children:t,...r}=e;if(s.isValidElement(t)){const o=Se(t);return s.cloneElement(t,{...je(r,t.props),ref:n?fe(n,o):o})}return s.Children.count(t)>1?s.Children.only(null):null});M.displayName="SlotClone";var J=({children:e})=>f.jsx(f.Fragment,{children:e});function _e(e){return s.isValidElement(e)&&e.type===J}function je(e,n){const t={...n};for(const r in n){const o=e[r],a=n[r];/^on[A-Z]/.test(r)?o&&a?t[r]=(...u)=>{a(...u),o(...u)}:o&&(t[r]=o):r==="style"?t[r]={...o,...a}:r==="className"&&(t[r]=[o,a].filter(Boolean).join(" "))}return{...e,...t}}function Se(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var Ne="VisuallyHidden",Q=s.forwardRef((e,n)=>f.jsx(D.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Q.displayName=Ne;var ke=Q,[j,ot]=pe("Tooltip",[Y]),S=Y(),ee="TooltipProvider",Ie=700,H="tooltip.open",[Me,W]=j(ee),te=e=>{const{__scopeTooltip:n,delayDuration:t=Ie,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,u]=s.useState(!0),c=s.useRef(!1),d=s.useRef(0);return s.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),f.jsx(Me,{scope:n,isOpenDelayed:i,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(d.current),u(!1)},[]),onClose:s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(l=>{c.current=l},[]),disableHoverableContent:o,children:a})};te.displayName=ee;var N="Tooltip",[He,L]=j(N),ne=e=>{const{__scopeTooltip:n,children:t,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:u}=e,c=W(N,e.__scopeTooltip),d=S(n),[l,h]=s.useState(null),v=xe(),y=s.useRef(0),x=i??c.disableHoverableContent,E=u??c.delayDuration,b=s.useRef(!1),[C=!1,m]=Ee({prop:r,defaultProp:o,onChange:p=>{p?(c.onOpen(),document.dispatchEvent(new CustomEvent(H))):c.onClose(),a==null||a(p)}}),P=s.useMemo(()=>C?b.current?"delayed-open":"instant-open":"closed",[C]),T=s.useCallback(()=>{window.clearTimeout(y.current),b.current=!1,m(!0)},[m]),w=s.useCallback(()=>{window.clearTimeout(y.current),m(!1)},[m]),O=s.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,m(!0)},E)},[E,m]);return s.useEffect(()=>()=>window.clearTimeout(y.current),[]),f.jsx(be,{...d,children:f.jsx(He,{scope:n,contentId:v,open:C,stateAttribute:P,trigger:l,onTriggerChange:h,onTriggerEnter:s.useCallback(()=>{c.isOpenDelayed?O():T()},[c.isOpenDelayed,O,T]),onTriggerLeave:s.useCallback(()=>{x?w():window.clearTimeout(y.current)},[w,x]),onOpen:T,onClose:w,disableHoverableContent:x,children:t})})};ne.displayName=N;var B="TooltipTrigger",re=s.forwardRef((e,n)=>{const{__scopeTooltip:t,...r}=e,o=L(B,t),a=W(B,t),i=S(t),u=s.useRef(null),c=_(n,u,o.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),h=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),f.jsx(ve,{asChild:!0,...i,children:f.jsx(D.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:g(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:g(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:g(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:g(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:g(e.onBlur,o.onClose),onClick:g(e.onClick,o.onClose)})})});re.displayName=B;var F="TooltipPortal",[Be,We]=j(F,{forceMount:void 0}),oe=e=>{const{__scopeTooltip:n,forceMount:t,children:r,container:o}=e,a=L(F,n);return f.jsx(Be,{scope:n,forceMount:t,children:f.jsx(z,{present:t||a.open,children:f.jsx(Z,{asChild:!0,container:o,children:r})})})};oe.displayName=F;var R="TooltipContent",se=s.forwardRef((e,n)=>{const t=We(R,e.__scopeTooltip),{forceMount:r=t.forceMount,side:o="top",...a}=e,i=L(R,e.__scopeTooltip);return f.jsx(z,{present:r||i.open,children:i.disableHoverableContent?f.jsx(ae,{side:o,...a,ref:n}):f.jsx(Fe,{side:o,...a,ref:n})})}),Fe=s.forwardRef((e,n)=>{const t=L(R,e.__scopeTooltip),r=W(R,e.__scopeTooltip),o=s.useRef(null),a=_(n,o),[i,u]=s.useState(null),{trigger:c,onClose:d}=t,l=o.current,{onPointerInTransitChange:h}=r,v=s.useCallback(()=>{u(null),h(!1)},[h]),y=s.useCallback((x,E)=>{const b=x.currentTarget,C={x:x.clientX,y:x.clientY},m=Ge(C,b.getBoundingClientRect()),P=Ye(C,m),T=ze(E.getBoundingClientRect()),w=qe([...P,...T]);u(w),h(!0)},[h]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(c&&l){const x=b=>y(b,l),E=b=>y(b,c);return c.addEventListener("pointerleave",x),l.addEventListener("pointerleave",E),()=>{c.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",E)}}},[c,l,y,v]),s.useEffect(()=>{if(i){const x=E=>{const b=E.target,C={x:E.clientX,y:E.clientY},m=(c==null?void 0:c.contains(b))||(l==null?void 0:l.contains(b)),P=!Xe(C,i);m?v():P&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,l,i,d,v]),f.jsx(ae,{...e,ref:a})}),[$e,Ve]=j(N,{isInside:!1}),ae=s.forwardRef((e,n)=>{const{__scopeTooltip:t,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...u}=e,c=L(R,t),d=S(t),{onClose:l}=c;return s.useEffect(()=>(document.addEventListener(H,l),()=>document.removeEventListener(H,l)),[l]),s.useEffect(()=>{if(c.trigger){const h=v=>{const y=v.target;y!=null&&y.contains(c.trigger)&&l()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,l]),f.jsx(q,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:l,children:f.jsxs(he,{"data-state":c.stateAttribute,...d,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(J,{children:r}),f.jsx($e,{scope:t,isInside:!0,children:f.jsx(ke,{id:c.contentId,role:"tooltip",children:o||r})})]})})});se.displayName=R;var ie="TooltipArrow",Ue=s.forwardRef((e,n)=>{const{__scopeTooltip:t,...r}=e,o=S(t);return Ve(ie,t).isInside?null:f.jsx(ye,{...o,...r,ref:n})});Ue.displayName=ie;function Ge(e,n){const t=Math.abs(n.top-e.y),r=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),a=Math.abs(n.left-e.x);switch(Math.min(t,r,o,a)){case a:return"left";case o:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ye(e,n,t=5){const r=[];switch(n){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function ze(e){const{top:n,right:t,bottom:r,left:o}=e;return[{x:o,y:n},{x:t,y:n},{x:t,y:r},{x:o,y:r}]}function Xe(e,n){const{x:t,y:r}=e;let o=!1;for(let a=0,i=n.length-1;a<n.length;i=a++){const u=n[a].x,c=n[a].y,d=n[i].x,l=n[i].y;c>r!=l>r&&t<(d-u)*(r-c)/(l-c)+u&&(o=!o)}return o}function qe(e){const n=e.slice();return n.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ke(n)}function Ke(e){if(e.length<=1)return e.slice();const n=[];for(let r=0;r<e.length;r++){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}n.pop();const t=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var Ze=ne,Je=re,Qe=oe,et=se;const tt=me({"0%":{opacity:0,transform:"scale(0) translateY(-4px)"},"100%":{opacity:1,transform:"scale(1) translateY(0px)"}}),nt=Ce(et,{display:"flex",alignItems:"center",fontSize:"13px",padding:"$2 $3",backgroundColor:"$gray2",borderRadius:"$4",color:"$gray12",boxShadow:"inset 0 0 0 1px $colors$grayA4",transformOrigin:"var(--radix-tooltip-content-transform-origin)",animation:`${tt} 0.2s ease forwards`});function st(e){const{children:n,content:t,side:r="bottom",sideOffset:o=6,delayDuration:a=0,...i}=e;return f.jsx(te,{children:f.jsxs(Ze,{delayDuration:a,...i,children:[f.jsx(Je,{asChild:!0,children:n}),f.jsx(Qe,{children:f.jsx(nt,{sideOffset:o,side:r,children:t})})]})})}export{st as T};
@@ -1 +1 @@
1
- var j=Object.defineProperty;var F=(t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var u=(t,e,r)=>(F(t,typeof e!="symbol"?e+"":e,r),r);import{aJ as O,aK as I,aM as S,av as p,aw as A,c8 as L,c9 as K,ca as Y,cb as z,cc as N,cd as B,ce as M,b3 as U,cf as H,aO as J,E as W,cg as D,p as P,C as f,s as h,f as E,t as $,e as q,aE as Q}from"./index-3660a664.js";import{u as X}from"./index-365736f7.js";import{c as Z}from"./Component-6d1e73e5.js";import"./postmen-c7605b45.js";import{B as k}from"./index-8e169cc2.js";import{c as tt}from"./createOnModelChange-c010a049.js";import{R as et}from"./ReferencedMaterial-f7ea80fb.js";import"./Menu-a427d272.js";import"./MaterialInspector-237b6a5e.js";import"./IconPointFilled-dbf63b5c.js";import"./createReactComponent-d9f8b1af.js";const v=(t=[[0,1],[1,1]])=>({class:"ParticleCurve",constructParams:t.map(([e,r])=>({class:"CurveKey",constructParams:[e,r]}))}),w=t=>({class:"ParticleCurve",constructParams:t.constructParams.map(e=>({class:"CurveKey",constructParams:[e.constructParams[0],e.constructParams[1]]})),editorYTickScale:t.editorYTickScale}),G=(t,e=v())=>{var r;return(r=t==null?void 0:t.constructParams)!=null&&r.length?w(t):w(e)},rt=(t,e=v())=>{const r=new L;return G(t,e).constructParams.forEach(a=>{r.addKey(new K(a.constructParams[0],a.constructParams[1]))}),r},at=(t,e=v())=>(r,i,a)=>{const c=G(a,e);t(r,rt(c,e)),r[i]=c},it=O(({model:t,inspectorConfig:e,onModelChange:r})=>{const{t:i}=I(),a=e.property,c=e.defaultCurve??v(),n=G(t[a],c),b=n.editorYTickScale??e.yTickScale??1;S.useEffect(()=>{t[a]||(n.editorYTickScale=b,t[a]=n)},[]);const T=s=>{const l=t[a],V=s/b;t[a]={...l,constructParams:l.constructParams.map(x=>({...x,constructParams:[x.constructParams[0],x.constructParams[1]*V]})),editorYTickScale:s},r==null||r(a)},o=s=>{!s||s.length>4||(t[a]={class:"ParticleCurve",constructParams:s.map(l=>({class:"CurveKey",constructParams:[l.x,l.y*b]})),editorYTickScale:b},r==null||r(a))};return p.jsx(A,{label:i(e.label||a),info:i(e.info),children:p.jsx(k,{algo:"linear",yRangeMode:e.yRangeMode,yTickScale:b,yTickScaleMin:e.yTickScaleMin,yTickScaleMax:e.yTickScaleMax,onYTickScaleChange:T,onYTickScaleCommit:()=>r==null?void 0:r(a),value:n.constructParams.map(s=>({x:s.constructParams[0],y:s.constructParams[1]/b})),onChange:o})})}),g=(t=[{time:0,color:{r:1,g:1,b:1,a:1}},{time:1,color:{r:1,g:1,b:1,a:1}}],e=[{time:0,alpha:1},{time:1,alpha:1}])=>({class:"ParticleGradient",constructParams:[t.map(r=>({time:r.time,color:{r:r.color.r,g:r.color.g,b:r.color.b,a:r.color.a}})),e.map(r=>({time:r.time,alpha:r.alpha}))]}),_=t=>g(t.constructParams[0],t.constructParams[1]),R=(t,e=g())=>{var r,i,a;return!((i=(r=t==null?void 0:t.constructParams)==null?void 0:r[0])!=null&&i.length)||!((a=t.constructParams[1])!=null&&a.length)?_(e):_(t)},ct=(t,e=g())=>{const r=R(t,e);return new B(r.constructParams[0].map(i=>new M(i.time,new U(i.color.r,i.color.g,i.color.b,i.color.a))),r.constructParams[1].map(i=>new H(i.time,i.alpha)))},nt=(t,e=g())=>(r,i,a)=>{const c=R(a,e);t(r,ct(c,e)),r[i]=c},ot=O(({model:t,inspectorConfig:e,onModelChange:r})=>{const{t:i}=I(),a=e.property,c=e.defaultGradient??g(),n=R(t[a],c);S.useEffect(()=>{t[a]||(t[a]=n)},[]);const b={color:n.constructParams[0].map(o=>({value:Y(o.color),position:o.time})),alpha:n.constructParams[1].map(o=>({value:{r:255,g:255,b:255,a:o.alpha},position:o.time}))},T=o=>{if(!o||o.color.length>4||o.alpha.length>4)return;const s={class:"ParticleGradient",constructParams:[o.color.map(l=>({time:l.position,color:N(l.value)})),o.alpha.map(l=>({time:l.position,alpha:l.value.a}))]};t[a]=s,r==null||r(a)};return p.jsx(A,{label:i(e.label||a),info:i(e.info),children:p.jsx(z,{fullsize:!0,mode:"particle",value:b,onValueChange:T})})}),st=O(function(t){const[e,r]=S.useState(null),i=t.data,{assetStore:a,inspectorFacade:c}=X();return S.useEffect(()=>{a.getAssetByRef(i.material).then(n=>{r(n)})},[i.material]),p.jsxs(p.Fragment,{children:[p.jsx(J.List,{model:i,configs:i.formSchema.items,onModelChange:tt("component",i.id,c,i)}),e&&p.jsx(p.Fragment,{children:p.jsx(et,{materialAsset:e})})]})});var lt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,d=(t,e,r,i)=>{for(var a=i>1?void 0:i?mt(e,r):e,c=t.length-1,n;c>=0;c--)(n=t[c])&&(a=(i?n(e,r,a):n(a))||a);return i&&a&&lt(e,r,a),a};const ut="0000205",y=v([[0,1],[1,1]]),C=g([{time:0,color:{r:1,g:1,b:1,a:1}},{time:1,color:{r:1,g:1,b:1,a:1}}],[{time:0,alpha:1},{time:1,alpha:1}]);let m=class extends W{constructor(){super(...arguments);u(this,"emitting",!0);u(this,"time",5);u(this,"minVertexDistance",.1);u(this,"widthCurve",y);u(this,"colorGradient",C);u(this,"textureMode",D.Stretch);u(this,"textureScale",{x:1,y:1});u(this,"material",{refId:ut});u(this,"priority",0)}};d([P({type:f.Toggle,bindPath:"emitting",label:"trail.emitting.label",info:"trail.emitting.info"}),h()],m.prototype,"emitting",2);d([P({type:f.Number,bindPath:"time",min:0,dragStep:.1,label:"trail.time.label",info:"trail.time.info"}),h()],m.prototype,"time",2);d([P({type:f.Number,bindPath:"minVertexDistance",min:0,dragStep:.01,label:"trail.min-vertex-distance.label",info:"trail.min-vertex-distance.info"}),h()],m.prototype,"minVertexDistance",2);d([E({getPath:"widthCurve",setPath:"widthCurve"}),P({customComponent:it,label:"trail.width-curve.label",info:"trail.width-curve.info",defaultCurve:y,yRangeMode:"positive",onChange:at((t,e)=>{t.setBoundPathValue("widthCurve",f.Input,e)},y)}),h()],m.prototype,"widthCurve",2);d([E({getPath:"colorGradient",setPath:"colorGradient"}),P({customComponent:ot,label:"trail.color-gradient.label",info:"trail.color-gradient.info",defaultGradient:C,onChange:nt((t,e)=>{t.setBoundPathValue("colorGradient",f.Input,e)},C)}),h()],m.prototype,"colorGradient",2);d([P({type:f.Select,bindPath:"textureMode",label:"trail.texture-mode.label",info:"trail.texture-mode.info",options:$(D,void 0,t=>q(`trail.texture-mode.${t.toLowerCase()}`))}),h()],m.prototype,"textureMode",2);d([P({type:f.Vector2,bindPath:"textureScale",min:.01,dragStep:.1,label:"trail.texture-scale.label",info:"trail.texture-scale.info"}),h()],m.prototype,"textureScale",2);d([E({engineKey:"setMaterial",setPath:"setMaterial()",getPath:"getMaterial()",valueType:Q.ReferResource,getEngineValue:t=>t.getMaterial()}),P({type:f.AssetPicker,assetType:"Material",label:"trail.material.label",info:"trail.material.info",customFilter:t=>{var e;return((e=t.engineObject.shader)==null?void 0:e.name)==="Effect/Trail"}}),h()],m.prototype,"material",2);d([P({type:f.Number,bindPath:"priority",min:0,dragStep:1,label:"trail.priority.label",info:"trail.priority.info"}),h()],m.prototype,"priority",2);m=d([Z({type:"TrailRenderer",customInspector:st,componentsMenu:{group:"effects",label:"component.trail-renderer.title"}})],m);export{m as TrailRendererComponent};
1
+ var j=Object.defineProperty;var F=(t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var u=(t,e,r)=>(F(t,typeof e!="symbol"?e+"":e,r),r);import{aJ as O,aK as I,aM as S,av as p,aw as A,c8 as L,c9 as K,ca as Y,cb as z,cc as N,cd as B,ce as M,b3 as U,cf as H,aO as J,E as W,cg as D,p as P,C as f,s as h,f as E,t as $,e as q,aE as Q}from"./index-e44b357e.js";import{u as X}from"./index-debbe073.js";import{c as Z}from"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";import{B as k}from"./index-f7bd6fef.js";import{c as tt}from"./createOnModelChange-e65da908.js";import{R as et}from"./ReferencedMaterial-831d0583.js";import"./Menu-05c1f0a4.js";import"./MaterialInspector-23ea0240.js";import"./IconPointFilled-bad94cf1.js";import"./createReactComponent-cb70ea50.js";const v=(t=[[0,1],[1,1]])=>({class:"ParticleCurve",constructParams:t.map(([e,r])=>({class:"CurveKey",constructParams:[e,r]}))}),w=t=>({class:"ParticleCurve",constructParams:t.constructParams.map(e=>({class:"CurveKey",constructParams:[e.constructParams[0],e.constructParams[1]]})),editorYTickScale:t.editorYTickScale}),G=(t,e=v())=>{var r;return(r=t==null?void 0:t.constructParams)!=null&&r.length?w(t):w(e)},rt=(t,e=v())=>{const r=new L;return G(t,e).constructParams.forEach(a=>{r.addKey(new K(a.constructParams[0],a.constructParams[1]))}),r},at=(t,e=v())=>(r,i,a)=>{const c=G(a,e);t(r,rt(c,e)),r[i]=c},it=O(({model:t,inspectorConfig:e,onModelChange:r})=>{const{t:i}=I(),a=e.property,c=e.defaultCurve??v(),n=G(t[a],c),b=n.editorYTickScale??e.yTickScale??1;S.useEffect(()=>{t[a]||(n.editorYTickScale=b,t[a]=n)},[]);const T=s=>{const l=t[a],V=s/b;t[a]={...l,constructParams:l.constructParams.map(x=>({...x,constructParams:[x.constructParams[0],x.constructParams[1]*V]})),editorYTickScale:s},r==null||r(a)},o=s=>{!s||s.length>4||(t[a]={class:"ParticleCurve",constructParams:s.map(l=>({class:"CurveKey",constructParams:[l.x,l.y*b]})),editorYTickScale:b},r==null||r(a))};return p.jsx(A,{label:i(e.label||a),info:i(e.info),children:p.jsx(k,{algo:"linear",yRangeMode:e.yRangeMode,yTickScale:b,yTickScaleMin:e.yTickScaleMin,yTickScaleMax:e.yTickScaleMax,onYTickScaleChange:T,onYTickScaleCommit:()=>r==null?void 0:r(a),value:n.constructParams.map(s=>({x:s.constructParams[0],y:s.constructParams[1]/b})),onChange:o})})}),g=(t=[{time:0,color:{r:1,g:1,b:1,a:1}},{time:1,color:{r:1,g:1,b:1,a:1}}],e=[{time:0,alpha:1},{time:1,alpha:1}])=>({class:"ParticleGradient",constructParams:[t.map(r=>({time:r.time,color:{r:r.color.r,g:r.color.g,b:r.color.b,a:r.color.a}})),e.map(r=>({time:r.time,alpha:r.alpha}))]}),_=t=>g(t.constructParams[0],t.constructParams[1]),R=(t,e=g())=>{var r,i,a;return!((i=(r=t==null?void 0:t.constructParams)==null?void 0:r[0])!=null&&i.length)||!((a=t.constructParams[1])!=null&&a.length)?_(e):_(t)},ct=(t,e=g())=>{const r=R(t,e);return new B(r.constructParams[0].map(i=>new M(i.time,new U(i.color.r,i.color.g,i.color.b,i.color.a))),r.constructParams[1].map(i=>new H(i.time,i.alpha)))},nt=(t,e=g())=>(r,i,a)=>{const c=R(a,e);t(r,ct(c,e)),r[i]=c},ot=O(({model:t,inspectorConfig:e,onModelChange:r})=>{const{t:i}=I(),a=e.property,c=e.defaultGradient??g(),n=R(t[a],c);S.useEffect(()=>{t[a]||(t[a]=n)},[]);const b={color:n.constructParams[0].map(o=>({value:Y(o.color),position:o.time})),alpha:n.constructParams[1].map(o=>({value:{r:255,g:255,b:255,a:o.alpha},position:o.time}))},T=o=>{if(!o||o.color.length>4||o.alpha.length>4)return;const s={class:"ParticleGradient",constructParams:[o.color.map(l=>({time:l.position,color:N(l.value)})),o.alpha.map(l=>({time:l.position,alpha:l.value.a}))]};t[a]=s,r==null||r(a)};return p.jsx(A,{label:i(e.label||a),info:i(e.info),children:p.jsx(z,{fullsize:!0,mode:"particle",value:b,onValueChange:T})})}),st=O(function(t){const[e,r]=S.useState(null),i=t.data,{assetStore:a,inspectorFacade:c}=X();return S.useEffect(()=>{a.getAssetByRef(i.material).then(n=>{r(n)})},[i.material]),p.jsxs(p.Fragment,{children:[p.jsx(J.List,{model:i,configs:i.formSchema.items,onModelChange:tt("component",i.id,c,i)}),e&&p.jsx(p.Fragment,{children:p.jsx(et,{materialAsset:e})})]})});var lt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,d=(t,e,r,i)=>{for(var a=i>1?void 0:i?mt(e,r):e,c=t.length-1,n;c>=0;c--)(n=t[c])&&(a=(i?n(e,r,a):n(a))||a);return i&&a&&lt(e,r,a),a};const ut="0000205",y=v([[0,1],[1,1]]),C=g([{time:0,color:{r:1,g:1,b:1,a:1}},{time:1,color:{r:1,g:1,b:1,a:1}}],[{time:0,alpha:1},{time:1,alpha:1}]);let m=class extends W{constructor(){super(...arguments);u(this,"emitting",!0);u(this,"time",5);u(this,"minVertexDistance",.1);u(this,"widthCurve",y);u(this,"colorGradient",C);u(this,"textureMode",D.Stretch);u(this,"textureScale",{x:1,y:1});u(this,"material",{refId:ut});u(this,"priority",0)}};d([P({type:f.Toggle,bindPath:"emitting",label:"trail.emitting.label",info:"trail.emitting.info"}),h()],m.prototype,"emitting",2);d([P({type:f.Number,bindPath:"time",min:0,dragStep:.1,label:"trail.time.label",info:"trail.time.info"}),h()],m.prototype,"time",2);d([P({type:f.Number,bindPath:"minVertexDistance",min:0,dragStep:.01,label:"trail.min-vertex-distance.label",info:"trail.min-vertex-distance.info"}),h()],m.prototype,"minVertexDistance",2);d([E({getPath:"widthCurve",setPath:"widthCurve"}),P({customComponent:it,label:"trail.width-curve.label",info:"trail.width-curve.info",defaultCurve:y,yRangeMode:"positive",onChange:at((t,e)=>{t.setBoundPathValue("widthCurve",f.Input,e)},y)}),h()],m.prototype,"widthCurve",2);d([E({getPath:"colorGradient",setPath:"colorGradient"}),P({customComponent:ot,label:"trail.color-gradient.label",info:"trail.color-gradient.info",defaultGradient:C,onChange:nt((t,e)=>{t.setBoundPathValue("colorGradient",f.Input,e)},C)}),h()],m.prototype,"colorGradient",2);d([P({type:f.Select,bindPath:"textureMode",label:"trail.texture-mode.label",info:"trail.texture-mode.info",options:$(D,void 0,t=>q(`trail.texture-mode.${t.toLowerCase()}`))}),h()],m.prototype,"textureMode",2);d([P({type:f.Vector2,bindPath:"textureScale",min:.01,dragStep:.1,label:"trail.texture-scale.label",info:"trail.texture-scale.info"}),h()],m.prototype,"textureScale",2);d([E({engineKey:"setMaterial",setPath:"setMaterial()",getPath:"getMaterial()",valueType:Q.ReferResource,getEngineValue:t=>t.getMaterial()}),P({type:f.AssetPicker,assetType:"Material",label:"trail.material.label",info:"trail.material.info",customFilter:t=>{var e;return((e=t.engineObject.shader)==null?void 0:e.name)==="Effect/Trail"}}),h()],m.prototype,"material",2);d([P({type:f.Number,bindPath:"priority",min:0,dragStep:1,label:"trail.priority.label",info:"trail.priority.info"}),h()],m.prototype,"priority",2);m=d([Z({type:"TrailRenderer",customInspector:st,componentsMenu:{group:"effects",label:"component.trail-renderer.title"}})],m);export{m as TrailRendererComponent};
@@ -1 +1 @@
1
- var w=Object.defineProperty;var C=(n,e,t)=>e in n?w(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var c=(n,e,t)=>(C(n,typeof e!="symbol"?e+"":e,t),t);import{aJ as V,bm as P,aK as D,av as l,bn as O,aL as A,bo as B,p as f,e as p,C as T,s as u,E as M}from"./index-3660a664.js";import"./index-365736f7.js";import"./postmen-c7605b45.js";function F(n){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",...n,children:l.jsx("path",{fill:"currentColor",d:"M3 9a1 1 0 0 0 1-1V5a1 1 0 0 1 1-1h3a1 1 0 0 0 0-2H5a3 3 0 0 0-3 3v3a1 1 0 0 0 1 1m5 11H5a1 1 0 0 1-1-1v-3a1 1 0 0 0-2 0v3a3 3 0 0 0 3 3h3a1 1 0 0 0 0-2m9-7a1 1 0 0 0 0-2h-1.14A4 4 0 0 0 13 8.14V7a1 1 0 0 0-2 0v1.14A4 4 0 0 0 8.14 11H7a1 1 0 0 0 0 2h1.14A4 4 0 0 0 11 15.86V17a1 1 0 0 0 2 0v-1.14A4 4 0 0 0 15.86 13Zm-5 1a2 2 0 1 1 2-2a2 2 0 0 1-2 2m9 1a1 1 0 0 0-1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 0 0 2h3a3 3 0 0 0 3-3v-3a1 1 0 0 0-1-1M19 2h-3a1 1 0 0 0 0 2h3a1 1 0 0 1 1 1v3a1 1 0 0 0 2 0V5a3 3 0 0 0-3-3"})})}const I=V(P),S=V(({inspectorConfig:n,models:e,onModelChange:t,model:o})=>{const{label:r,property:a,disabled:h}=n,{t:v}=D(),g=!o;e=e||[o];const d=e[0],E=o.root.sceneStore.rootEntity.children,z=e.map(i=>i.id);function _(i){const b=d.engineObject,y=o.root.sceneStore.getEntityModel(i);if(!y)return;const j=y.engineObject.getComponent(B);b.lookAt(j.worldPosition),d.syncRotation()}return l.jsx(I,{disabled:h,label:v(r),value:g?{x:null,y:null,z:null}:o[a],onChange:(i,b)=>{e.forEach(y=>y[a]=i),t&&t(a,i)},formEndSlot:l.jsx(O,{trigger:l.jsx(A,{variant:"subtle",corner:!0,children:l.jsx(F,{style:{width:"13px",height:"13px"}})}),disabledEntities:z,entities:E,label:r,onSelect:_})})});var H=Object.defineProperty,R=Object.getOwnPropertyDescriptor,x=(n,e,t,o)=>{for(var r=o>1?void 0:o?R(e,t):e,a=n.length-1,h;a>=0;a--)(h=n[a])&&(r=(o?h(e,t,r):h(r))||r);return o&&r&&H(e,t,r),r},s;const m=(s=class extends M{constructor(){super(...arguments);c(this,"position",{x:0,y:0,z:0});c(this,"rotation",{x:0,y:0,z:0});c(this,"scale",{x:1,y:1,z:1})}static equalVector3(t,o){return t.x===o.x&&t.y===o.y&&t.z===o.z}static roundToThreeDecimal(t){return Math.round(t*1e3)/1e3}static roundVector2(t,o){return o.x=this.roundToThreeDecimal(t.x),o.y=this.roundToThreeDecimal(t.y),o}static copyVector2(t,o){o.x=t.x,o.y=t.y}static roundVector3(t,o){return o.x=this.roundToThreeDecimal(t.x),o.y=this.roundToThreeDecimal(t.y),o.z=this.roundToThreeDecimal(t.z),o}static copyVector3(t,o){o.x=t.x,o.y=t.y,o.z=t.z}syncTransformToEditor(t){this._syncTransformToEditor("position",t.position),this._syncTransformToEditor("rotation",t.rotation),this._syncTransformToEditor("scale",t.scale)}_syncTransformToEditor(t,o){const r=this[t],a=s.roundVector3(o,s._tempVector3);s.equalVector3(a,r)||(s.copyVector3(a,r),this.notifyPropertyChange(t,!1))}},c(s,"_tempVector2",{x:0,y:0}),c(s,"_tempVector3",{x:0,y:0,z:0}),s);x([f({label:p("transform.position.title"),info:p("transform.position.info"),type:T.Vector3,bindPath:"position"}),u()],m.prototype,"position",2);x([f({label:p("transform.rotation.title"),info:p("transform.rotation.info"),customComponent:S,type:T.Vector3,bindPath:"rotation"}),u()],m.prototype,"rotation",2);x([f({label:p("transform.scale.title"),info:p("transform.scale.info"),type:T.Vector3,constrainable:!0,bindPath:"scale"}),u()],m.prototype,"scale",2);let Z=m;export{Z as T};
1
+ var w=Object.defineProperty;var C=(n,e,t)=>e in n?w(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var c=(n,e,t)=>(C(n,typeof e!="symbol"?e+"":e,t),t);import{aJ as V,bm as P,aK as D,av as l,bn as O,aL as A,bo as B,p as f,e as p,C as T,s as u,E as M}from"./index-e44b357e.js";import"./index-debbe073.js";import"./postmen-443b3e5f.js";function F(n){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",...n,children:l.jsx("path",{fill:"currentColor",d:"M3 9a1 1 0 0 0 1-1V5a1 1 0 0 1 1-1h3a1 1 0 0 0 0-2H5a3 3 0 0 0-3 3v3a1 1 0 0 0 1 1m5 11H5a1 1 0 0 1-1-1v-3a1 1 0 0 0-2 0v3a3 3 0 0 0 3 3h3a1 1 0 0 0 0-2m9-7a1 1 0 0 0 0-2h-1.14A4 4 0 0 0 13 8.14V7a1 1 0 0 0-2 0v1.14A4 4 0 0 0 8.14 11H7a1 1 0 0 0 0 2h1.14A4 4 0 0 0 11 15.86V17a1 1 0 0 0 2 0v-1.14A4 4 0 0 0 15.86 13Zm-5 1a2 2 0 1 1 2-2a2 2 0 0 1-2 2m9 1a1 1 0 0 0-1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 0 0 2h3a3 3 0 0 0 3-3v-3a1 1 0 0 0-1-1M19 2h-3a1 1 0 0 0 0 2h3a1 1 0 0 1 1 1v3a1 1 0 0 0 2 0V5a3 3 0 0 0-3-3"})})}const I=V(P),S=V(({inspectorConfig:n,models:e,onModelChange:t,model:o})=>{const{label:r,property:a,disabled:h}=n,{t:v}=D(),g=!o;e=e||[o];const d=e[0],E=o.root.sceneStore.rootEntity.children,z=e.map(i=>i.id);function _(i){const b=d.engineObject,y=o.root.sceneStore.getEntityModel(i);if(!y)return;const j=y.engineObject.getComponent(B);b.lookAt(j.worldPosition),d.syncRotation()}return l.jsx(I,{disabled:h,label:v(r),value:g?{x:null,y:null,z:null}:o[a],onChange:(i,b)=>{e.forEach(y=>y[a]=i),t&&t(a,i)},formEndSlot:l.jsx(O,{trigger:l.jsx(A,{variant:"subtle",corner:!0,children:l.jsx(F,{style:{width:"13px",height:"13px"}})}),disabledEntities:z,entities:E,label:r,onSelect:_})})});var H=Object.defineProperty,R=Object.getOwnPropertyDescriptor,x=(n,e,t,o)=>{for(var r=o>1?void 0:o?R(e,t):e,a=n.length-1,h;a>=0;a--)(h=n[a])&&(r=(o?h(e,t,r):h(r))||r);return o&&r&&H(e,t,r),r},s;const m=(s=class extends M{constructor(){super(...arguments);c(this,"position",{x:0,y:0,z:0});c(this,"rotation",{x:0,y:0,z:0});c(this,"scale",{x:1,y:1,z:1})}static equalVector3(t,o){return t.x===o.x&&t.y===o.y&&t.z===o.z}static roundToThreeDecimal(t){return Math.round(t*1e3)/1e3}static roundVector2(t,o){return o.x=this.roundToThreeDecimal(t.x),o.y=this.roundToThreeDecimal(t.y),o}static copyVector2(t,o){o.x=t.x,o.y=t.y}static roundVector3(t,o){return o.x=this.roundToThreeDecimal(t.x),o.y=this.roundToThreeDecimal(t.y),o.z=this.roundToThreeDecimal(t.z),o}static copyVector3(t,o){o.x=t.x,o.y=t.y,o.z=t.z}syncTransformToEditor(t){this._syncTransformToEditor("position",t.position),this._syncTransformToEditor("rotation",t.rotation),this._syncTransformToEditor("scale",t.scale)}_syncTransformToEditor(t,o){const r=this[t],a=s.roundVector3(o,s._tempVector3);s.equalVector3(a,r)||(s.copyVector3(a,r),this.notifyPropertyChange(t,!1))}},c(s,"_tempVector2",{x:0,y:0}),c(s,"_tempVector3",{x:0,y:0,z:0}),s);x([f({label:p("transform.position.title"),info:p("transform.position.info"),type:T.Vector3,bindPath:"position"}),u()],m.prototype,"position",2);x([f({label:p("transform.rotation.title"),info:p("transform.rotation.info"),customComponent:S,type:T.Vector3,bindPath:"rotation"}),u()],m.prototype,"rotation",2);x([f({label:p("transform.scale.title"),info:p("transform.scale.info"),type:T.Vector3,constrainable:!0,bindPath:"scale"}),u()],m.prototype,"scale",2);let Z=m;export{Z as T};
@@ -1 +1 @@
1
- var p=Object.defineProperty;var h=(r,t,n)=>t in r?p(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var m=(r,t,n)=>(h(r,typeof t!="symbol"?t+"":t,n),n);import{aC as l,e as s}from"./index-3660a664.js";import"./index-365736f7.js";import{c as u}from"./Component-6d1e73e5.js";import"./postmen-c7605b45.js";import{T}from"./TransformBaseComponent-77478ccb.js";var d=Object.defineProperty,g=Object.getOwnPropertyDescriptor,f=(r,t,n,o)=>{for(var e=o>1?void 0:o?g(t,n):t,i=r.length-1,a;i>=0;i--)(a=r[i])&&(e=(o?a(t,n,e):a(e))||e);return o&&e&&d(t,n,e),e};let c=class extends T{constructor(t,n){super(t,n);m(this,"syncEngineToEditor",l(()=>{const{position:t,rotation:n,scale:o}=this.engineObject;this._syncTransformToEditor("position",t),this._syncTransformToEditor("rotation",n),this._syncTransformToEditor("scale",o)}))}syncRotation(){this._syncTransformToEditor("rotation",this.engineObject.rotation)}checkCanDisable(){return{code:1,msg:s("transform.error.cant-disable")}}checkCanDeletable(){return{code:1,msg:s("transform.error.cant-delete")}}get ignoreToJSON(){return!0}onAddToEntity(t){for(let n=0;n<t.components.length;n++){const o=t.components[n];(o.type==="Transform"||o.type==="UITransform")&&o!==this&&t.removeComponent(o)}t.setComponentIndex(this,0)}getAnimatableProperties(){let t=[];const n=o=>{if(!(o!=null&&o.length))return t;o.filter(e=>!e.when||e.when(this)).forEach(e=>{e.type==="Group"?n(e.children):t.push({property:e.property,label:s(e.label),type:e.type})})};return n(this.formSchema.items),t=t.concat(this._additionAnimatableProperties),t}};f([l],c.prototype,"syncRotation",1);c=f([u({type:"Transform",componentsMenu:{hide:!0,label:s("component.transform.title")}})],c);export{c as TransformComponent};
1
+ var p=Object.defineProperty;var h=(r,t,n)=>t in r?p(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var m=(r,t,n)=>(h(r,typeof t!="symbol"?t+"":t,n),n);import{aC as l,e as s}from"./index-e44b357e.js";import"./index-debbe073.js";import{c as u}from"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";import{T}from"./TransformBaseComponent-0d241199.js";var d=Object.defineProperty,g=Object.getOwnPropertyDescriptor,f=(r,t,n,o)=>{for(var e=o>1?void 0:o?g(t,n):t,i=r.length-1,a;i>=0;i--)(a=r[i])&&(e=(o?a(t,n,e):a(e))||e);return o&&e&&d(t,n,e),e};let c=class extends T{constructor(t,n){super(t,n);m(this,"syncEngineToEditor",l(()=>{const{position:t,rotation:n,scale:o}=this.engineObject;this._syncTransformToEditor("position",t),this._syncTransformToEditor("rotation",n),this._syncTransformToEditor("scale",o)}))}syncRotation(){this._syncTransformToEditor("rotation",this.engineObject.rotation)}checkCanDisable(){return{code:1,msg:s("transform.error.cant-disable")}}checkCanDeletable(){return{code:1,msg:s("transform.error.cant-delete")}}get ignoreToJSON(){return!0}onAddToEntity(t){for(let n=0;n<t.components.length;n++){const o=t.components[n];(o.type==="Transform"||o.type==="UITransform")&&o!==this&&t.removeComponent(o)}t.setComponentIndex(this,0)}getAnimatableProperties(){let t=[];const n=o=>{if(!(o!=null&&o.length))return t;o.filter(e=>!e.when||e.when(this)).forEach(e=>{e.type==="Group"?n(e.children):t.push({property:e.property,label:s(e.label),type:e.type})})};return n(this.formSchema.items),t=t.concat(this._additionAnimatableProperties),t}};f([l],c.prototype,"syncRotation",1);c=f([u({type:"Transform",componentsMenu:{hide:!0,label:s("component.transform.title")}})],c);export{c as TransformComponent};
@@ -1 +1 @@
1
- var f=Object.defineProperty;var d=(s,e,t)=>e in s?f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var p=(s,e,t)=>(d(s,typeof e!="symbol"?e+"":e,t),t);import{N as y,j as R,$ as u,a_ as w,a$ as b,aT as U,p as _,e as c,C as j,n as x,o as I}from"./index-3660a664.js";import{X as O}from"./module-1c91b4e1.js";import"./index-365736f7.js";import"./postmen-c7605b45.js";import{A as v}from"./AssetViewer-1073ddb5.js";import{e as W}from"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";class X extends v{constructor(){super()}setViewAsset(e,t){const a=t.createChild("sprite_entity"),r=a.addComponent(y);r.sprite=e._sprite,this._entity=a}}var A=Object.defineProperty,B=Object.getOwnPropertyDescriptor,g=(s,e,t,a)=>{for(var r=a>1?void 0:a?B(e,t):e,i=s.length-1,n;i>=0;i--)(n=s[i])&&(r=(a?n(e,t,r):n(r))||r);return a&&r&&A(e,t,r),r};let h=class extends R{constructor(e){super(e);p(this,"imgUrl");p(this,"_sprite");p(this,"physicalWidth",.1);this._sprite=new u(this.engine)}async initByMain(e){this.imgUrl&&(URL.revokeObjectURL(this.imgUrl),this.imgUrl=""),await new Promise((t,a)=>{const{_sprite:r}=this,i=new Image;i.crossOrigin="*";const n=URL.createObjectURL(e),m=()=>{URL.revokeObjectURL(n),this.imgUrl===n&&(this.imgUrl="")};this.imgUrl=i.src=n,i.onload=()=>{try{const o=new O("reference",i,i.width/100),l=new w(this.engine,i.width,i.height,b.R8G8B8A8,!1);l.setImageSource(i),r.texture=l,r.width=i.width/100,r.height=i.height/100,this.physicalWidth=o.physicalWidth=this.meta.physicalWidth,this.bindEngineObject(o),t(this)}catch(o){a(o)}finally{m()}},i.onerror=o=>{m(),a(o)}})}initByEngineObject(e){this.bindEngineObject(e),this.physicalWidth=e.physicalWidth}};g([U(),_({label:c("xr.image.width.label"),info:c("xr.image.width.info"),type:j.Number})],h.prototype,"physicalWidth",2);h=g([x({type:"XRReferenceImage",label:c("asset.xr-reference-image.title"),loaderType:"XRReferenceImage",importMenuConfig:{type:I.Upload,tooltip:"支持多选",accept:".png,.jpg,.jpeg,.webp",multiple:!0},viewer:X,defaultName:"ReferenceImage",extname:"bin",async bundle({content:s,meta:e,name:t}){const a=await s.arrayBuffer();return{type:"XRReferenceImage",content:new Blob([W([a],{type:"XRReferenceImage",name:t,physicalWidth:e.physicalWidth})])}}})],h);export{h as XRReferenceImageAsset};
1
+ var f=Object.defineProperty;var d=(s,e,t)=>e in s?f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var p=(s,e,t)=>(d(s,typeof e!="symbol"?e+"":e,t),t);import{N as y,j as R,$ as u,a_ as w,a$ as b,aT as U,p as _,e as c,C as j,n as x,o as I}from"./index-e44b357e.js";import{X as O}from"./module-5906e0d4.js";import"./index-debbe073.js";import"./postmen-443b3e5f.js";import{A as v}from"./AssetViewer-d2c63b00.js";import{e as W}from"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";class X extends v{constructor(){super()}setViewAsset(e,t){const a=t.createChild("sprite_entity"),r=a.addComponent(y);r.sprite=e._sprite,this._entity=a}}var A=Object.defineProperty,B=Object.getOwnPropertyDescriptor,g=(s,e,t,a)=>{for(var r=a>1?void 0:a?B(e,t):e,i=s.length-1,n;i>=0;i--)(n=s[i])&&(r=(a?n(e,t,r):n(r))||r);return a&&r&&A(e,t,r),r};let h=class extends R{constructor(e){super(e);p(this,"imgUrl");p(this,"_sprite");p(this,"physicalWidth",.1);this._sprite=new u(this.engine)}async initByMain(e){this.imgUrl&&(URL.revokeObjectURL(this.imgUrl),this.imgUrl=""),await new Promise((t,a)=>{const{_sprite:r}=this,i=new Image;i.crossOrigin="*";const n=URL.createObjectURL(e),m=()=>{URL.revokeObjectURL(n),this.imgUrl===n&&(this.imgUrl="")};this.imgUrl=i.src=n,i.onload=()=>{try{const o=new O("reference",i,i.width/100),l=new w(this.engine,i.width,i.height,b.R8G8B8A8,!1);l.setImageSource(i),r.texture=l,r.width=i.width/100,r.height=i.height/100,this.physicalWidth=o.physicalWidth=this.meta.physicalWidth,this.bindEngineObject(o),t(this)}catch(o){a(o)}finally{m()}},i.onerror=o=>{m(),a(o)}})}initByEngineObject(e){this.bindEngineObject(e),this.physicalWidth=e.physicalWidth}};g([U(),_({label:c("xr.image.width.label"),info:c("xr.image.width.info"),type:j.Number})],h.prototype,"physicalWidth",2);h=g([x({type:"XRReferenceImage",label:c("asset.xr-reference-image.title"),loaderType:"XRReferenceImage",importMenuConfig:{type:I.Upload,tooltip:"支持多选",accept:".png,.jpg,.jpeg,.webp",multiple:!0},viewer:X,defaultName:"ReferenceImage",extname:"bin",async bundle({content:s,meta:e,name:t}){const a=await s.arrayBuffer();return{type:"XRReferenceImage",content:new Blob([W([a],{type:"XRReferenceImage",name:t,physicalWidth:e.physicalWidth})])}}})],h);export{h as XRReferenceImageAsset};
@@ -1 +1 @@
1
- var l=Object.defineProperty;var u=(r,e,o)=>e in r?l(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o;var n=(r,e,o)=>(u(r,typeof e!="symbol"?e+"":e,o),o);import{E as c,s as v,p as d,C as f}from"./index-3660a664.js";import"./index-365736f7.js";import{c as _}from"./Component-6d1e73e5.js";import"./postmen-c7605b45.js";var y=Object.defineProperty,C=Object.getOwnPropertyDescriptor,a=(r,e,o,t)=>{for(var p=t>1?void 0:t?C(e,o):e,s=r.length-1,m;s>=0;s--)(m=r[s])&&(p=(t?m(e,o,p):m(p))||p);return t&&p&&y(e,o,p),p};let i=class extends c{constructor(e,o){super(e,o);n(this,"volume",0)}};a([v(),d({type:f.Slider,min:0,max:10,dragStep:.01,bindPath:"volume"})],i.prototype,"volume",2);i=a([_({type:"Audio",class:"AudioSource"})],i);export{i as AudioComponent};
1
+ var l=Object.defineProperty;var u=(r,e,o)=>e in r?l(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o;var n=(r,e,o)=>(u(r,typeof e!="symbol"?e+"":e,o),o);import{E as c,s as v,p as d,C as f}from"./index-e44b357e.js";import"./index-debbe073.js";import{c as _}from"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";var y=Object.defineProperty,C=Object.getOwnPropertyDescriptor,a=(r,e,o,t)=>{for(var p=t>1?void 0:t?C(e,o):e,s=r.length-1,m;s>=0;s--)(m=r[s])&&(p=(t?m(e,o,p):m(p))||p);return t&&p&&y(e,o,p),p};let i=class extends c{constructor(e,o){super(e,o);n(this,"volume",0)}};a([v(),d({type:f.Slider,min:0,max:10,dragStep:.01,bindPath:"volume"})],i.prototype,"volume",2);i=a([_({type:"Audio",class:"AudioSource"})],i);export{i as AudioComponent};
@@ -1 +1 @@
1
- import{aG as g}from"./index-3660a664.js";function C(h,c,a,t,o){return(n,s)=>{switch(h){case"scene":{const e=g(t,n,s);a.sceneChange(e.path,e.value);break}case"entity":{const e=s===void 0?t[n]:s;a.entityChange(c,n,e);break}case"component":{const e=s===void 0?t[n]:s;a.componentChange(c,n,e);break}case"asset":{const e=s===void 0?t[n]:s;a.assetChange(c,n,e,o);break}}}}export{C as c};
1
+ import{aG as g}from"./index-e44b357e.js";function C(h,c,a,t,o){return(n,s)=>{switch(h){case"scene":{const e=g(t,n,s);a.sceneChange(e.path,e.value);break}case"entity":{const e=s===void 0?t[n]:s;a.entityChange(c,n,e);break}case"component":{const e=s===void 0?t[n]:s;a.componentChange(c,n,e);break}case"asset":{const e=s===void 0?t[n]:s;a.assetChange(c,n,e,o);break}}}}export{C as c};
@@ -1,4 +1,4 @@
1
- import{aM as e}from"./index-3660a664.js";/**
1
+ import{aM as e}from"./index-e44b357e.js";/**
2
2
  * @license @tabler/icons-react v3.24.0 - MIT
3
3
  *
4
4
  * This source code is licensed under the MIT license.
@@ -0,0 +1 @@
1
+ import{K as E,b as w,T as I,a as R}from"./TextureAsset-9cd94531.js";import{G as F,a as G}from"./GlTFAsset-83e8190e.js";import{M as U,a as V}from"./MaterialAsset-0b9d7eba.js";import{MeshAsset as X}from"./MeshAsset-85e99837.js";import{AnimatorControllerAsset as D}from"./AnimatorControllerAsset-6cc04274.js";import{A as j,a as q,b as z}from"./AnimationClipAsset-b084da2a.js";import{L as H,c as J,b as N,S as Q,a as W}from"./ShaderChunkAsset-e3487bd1.js";import{AmbientLightAsset as Z}from"./AmbientLightAsset-e34de607.js";import{S as $}from"./SpineSkeletonDataAsset-0dffbb4d.js";import{FontAsset as te}from"./FontAsset-6e9c0549.js";import{SceneAsset as se}from"./SceneAsset-d05b1a79.js";import{E as pe,c as ae,b as ie,a as me,S as Ae}from"./ShaderAsset-370b6f1c.js";import{E as fe,a as ne,S as xe,b as he,t as le}from"./ShaderUIScriptAsset-ebf57ceb.js";import{PrimitiveMesh as ce}from"./PrimitiveMesh-70c93e7e.js";import{XRReferenceImageAsset as ye}from"./XRReferenceImageAsset-79e78558.js";import{PrefabAsset as Me}from"./PrefabAsset-265f6f48.js";import{PhysicsMaterialAsset as Ce}from"./PhysicsMaterialAsset-cb9afb6e.js";import{RenderTargetAsset as ge}from"./RenderTargetAsset-b810caf3.js";import{AudioAsset as we}from"./AudioAsset-9c715952.js";import{StateMachineScript as Re}from"./index-ea7fe254.js";import{MarkdownAsset as Fe}from"./MarkdownAsset-b42846c0.js";import"./index-e44b357e.js";import"./ktx2-encoder-522fc017.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./index-debbe073.js";import"./postmen-443b3e5f.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./Tooltip-71e5a4e7.js";import"./createReactComponent-cb70ea50.js";import"./AssetViewer-d2c63b00.js";import"./glTFIO-45ff9a17.js";import"./MaterialInspector-23ea0240.js";import"./IconPointFilled-bad94cf1.js";import"./shader-data-utils-000170ae.js";import"./index-7e414715.js";import"./MeshThumbnail-b1283749.js";import"./bundlers-9b0d37fc.js";import"./module-5547be1c.js";import"./module-57b6e417.js";import"./IconPlus-172c6c17.js";import"./FormItemArray-b2a3d249.js";import"./Accordion-f938dadf.js";import"./module-5906e0d4.js";export{Z as AmbientLightAsset,j as AnimationClipAsset,q as AnimationClipInspector,z as AnimationClipViewer,D as AnimatorControllerAsset,we as AudioAsset,fe as EScriptSubType,pe as EShaderPropertyType,te as FontAsset,F as GlTFAsset,G as GlTFViewer,E as KTX2Options,H as LottieAsset,Fe as MarkdownAsset,U as MaterialAsset,V as MaterialViewer,X as MeshAsset,Ce as PhysicsMaterialAsset,Me as PrefabAsset,ce as PrimitiveMesh,ge as RenderTargetAsset,se as SceneAsset,ne as ScriptAsset,ae as ShaderAsset,J as ShaderChunkAsset,ie as ShaderPropertyEnumType,me as ShaderPropertyRangeType,Ae as ShaderTemplateConfigs,xe as ShaderUIScript,he as ShaderUIScriptAsset,N as SpineAtlasAsset,$ as SpineSkeletonDataAsset,Q as SpriteAsset,W as SpriteAtlasAsset,Re as StateMachineScript,w as TextureAsset,I as TextureShape,R as TextureUseType,ye as XRReferenceImageAsset,le as scriptTemplates};
@@ -0,0 +1 @@
1
+ import{P as a}from"./PostProcessComponent-040cf521.js";import"./index-e44b357e.js";import"./index-debbe073.js";import"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";import"./IconPlus-172c6c17.js";import"./createReactComponent-cb70ea50.js";import"./Menu-05c1f0a4.js";import"./Accordion-f938dadf.js";export{a as PostProcessComponent};
@@ -0,0 +1 @@
1
+ import{A as a,a as n}from"./AnimatorStore-0bc90c37.js";import"./index-e44b357e.js";import"./index-debbe073.js";import"./Component-b95aa2af.js";import"./postmen-443b3e5f.js";export{a as AnimatorComponent,n as AnimatorStore};