@galacean/cli 2.0.0-alpha.26 → 2.0.0-alpha.28

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 (97) hide show
  1. package/dist/cli.bundle.cjs +55252 -18754
  2. package/dist/preview-client/_static/{Accordion-2cd014f1.js → Accordion-6f002a96.js} +1 -1
  3. package/dist/preview-client/_static/{AmbientLightAsset-be9e872c.js → AmbientLightAsset-57a59fc2.js} +2 -2
  4. package/dist/preview-client/_static/{AnimationClipAsset-d7b37af0.js → AnimationClipAsset-0a1f63eb.js} +1 -1
  5. package/dist/preview-client/_static/{AnimatorControllerAsset-2716497a.js → AnimatorControllerAsset-9192e596.js} +1 -1
  6. package/dist/preview-client/_static/{AnimatorStore-883a28ad.js → AnimatorStore-484b10cf.js} +1 -1
  7. package/dist/preview-client/_static/{AssetViewer-3847c058.js → AssetViewer-9f395efb.js} +1 -1
  8. package/dist/preview-client/_static/{AudioAsset-c28f33ab.js → AudioAsset-0ea4ba7b.js} +1 -1
  9. package/dist/preview-client/_static/{AudioComponent-3d6c73ce.js → AudioComponent-9bf5944c.js} +1 -1
  10. package/dist/preview-client/_static/{Callout-e2a89f6f.js → Callout-45631a14.js} +1 -1
  11. package/dist/preview-client/_static/{CameraComponent-3dc63451.js → CameraComponent-039457d1.js} +1 -1
  12. package/dist/preview-client/_static/{Component-0f881fc1.js → Component-c3c0c167.js} +1 -1
  13. package/dist/preview-client/_static/{DirectLight-96dbba47.js → DirectLight-7b1f4b9f.js} +1 -1
  14. package/dist/preview-client/_static/{FontAsset-d34b5378.js → FontAsset-10273d05.js} +2 -2
  15. package/dist/preview-client/_static/{FormItemArray-b8cda1d2.js → FormItemArray-9d4196d8.js} +2 -2
  16. package/dist/preview-client/_static/{GlTFAsset-5970e707.js → GlTFAsset-917bf1ee.js} +5 -5
  17. package/dist/preview-client/_static/{IconPlus-def01e2b.js → IconPlus-2bfc60da.js} +1 -1
  18. package/dist/preview-client/_static/{IconPointFilled-62d3c3b2.js → IconPointFilled-192e99c9.js} +1 -1
  19. package/dist/preview-client/_static/{LightBaseComponent-d651a276.js → LightBaseComponent-948d3192.js} +1 -1
  20. package/dist/preview-client/_static/{LottieAnimationComponent-f10dc558.js → LottieAnimationComponent-da226765.js} +1 -1
  21. package/dist/preview-client/_static/{MarkdownAsset-b2a3fad5.js → MarkdownAsset-602f93bf.js} +1 -1
  22. package/dist/preview-client/_static/MaterialAsset-aa93db51.js +1 -0
  23. package/dist/preview-client/_static/{MaterialInspector-8d466d59.js → MaterialInspector-45e208c7.js} +1 -1
  24. package/dist/preview-client/_static/Menu-beacc39d.js +17 -0
  25. package/dist/preview-client/_static/MeshAsset-585f4b18.js +1 -0
  26. package/dist/preview-client/_static/{MeshRendererBaseComponent-fde6b6a5.js → MeshRendererBaseComponent-0bc9f5b3.js} +1 -1
  27. package/dist/preview-client/_static/{MeshRendererComponent-430774ef.js → MeshRendererComponent-84208d23.js} +1 -1
  28. package/dist/preview-client/_static/{MeshThumbnail-07ffa076.js → MeshThumbnail-9bbe01dc.js} +1 -1
  29. package/dist/preview-client/_static/ParticleRendererComponent-f3ac8d1b.js +26 -0
  30. package/dist/preview-client/_static/{PhysicsMaterialAsset-a2f73b5c.js → PhysicsMaterialAsset-2dd013f8.js} +1 -1
  31. package/dist/preview-client/_static/{PhysicsStore-818c2f61.js → PhysicsStore-fcb01282.js} +1 -1
  32. package/dist/preview-client/_static/{PointLight-add790ea.js → PointLight-d9ace100.js} +1 -1
  33. package/dist/preview-client/_static/{PostProcessComponent-af270a77.js → PostProcessComponent-2b5255d9.js} +3 -3
  34. package/dist/preview-client/_static/PrefabAsset-8c923465.js +1 -0
  35. package/dist/preview-client/_static/{PrimitiveMesh-075dda8a.js → PrimitiveMesh-fde624a6.js} +1 -1
  36. package/dist/preview-client/_static/{ReferencedMaterial-d11151b5.js → ReferencedMaterial-890492a2.js} +1 -1
  37. package/dist/preview-client/_static/{RenderTargetAsset-b3cd1c49.js → RenderTargetAsset-bf38a725.js} +1 -1
  38. package/dist/preview-client/_static/SceneAsset-7a9dbdd8.js +1 -0
  39. package/dist/preview-client/_static/{ShaderAsset-a9d667f5.js → ShaderAsset-2f2c1e95.js} +12 -12
  40. package/dist/preview-client/_static/{ShaderChunkAsset-e43dde8a.js → ShaderChunkAsset-a3ff3959.js} +2 -2
  41. package/dist/preview-client/_static/{ShaderUIScriptAsset-e1cd0b8b.js → ShaderUIScriptAsset-d3a2d680.js} +1 -1
  42. package/dist/preview-client/_static/{SkinnedMeshRendererComponent-9756bd5f.js → SkinnedMeshRendererComponent-96740600.js} +1 -1
  43. package/dist/preview-client/_static/{SpineAnimationComponent-f3e0ff44.js → SpineAnimationComponent-3d4eec48.js} +1 -1
  44. package/dist/preview-client/_static/{SpineSkeletonDataAsset-43b731f1.js → SpineSkeletonDataAsset-a8598103.js} +1 -1
  45. package/dist/preview-client/_static/{SpotLight-649b0e21.js → SpotLight-680a6e17.js} +1 -1
  46. package/dist/preview-client/_static/{SpriteBaseComponent-d2a7ab4c.js → SpriteBaseComponent-96a500d7.js} +1 -1
  47. package/dist/preview-client/_static/{SpriteMaskComponent-2c1cef5e.js → SpriteMaskComponent-58c35ea2.js} +1 -1
  48. package/dist/preview-client/_static/{SpriteRendererComponent-33b71997.js → SpriteRendererComponent-5c89f7dd.js} +1 -1
  49. package/dist/preview-client/_static/{TextBaseComponent-9310e0c6.js → TextBaseComponent-248ea222.js} +3 -3
  50. package/dist/preview-client/_static/{TextRendererComponent-8dc0d7fb.js → TextRendererComponent-78458825.js} +1 -1
  51. package/dist/preview-client/_static/{TextureAsset-a7ff39b1.js → TextureAsset-bf69040b.js} +4 -4
  52. package/dist/preview-client/_static/Tooltip-0268ffac.js +1 -0
  53. package/dist/preview-client/_static/{TrailRendererComponent-c4635fab.js → TrailRendererComponent-838e0118.js} +1 -1
  54. package/dist/preview-client/_static/{TransformBaseComponent-1473deaa.js → TransformBaseComponent-c92aa259.js} +1 -1
  55. package/dist/preview-client/_static/{TransformComponent-e544f7ac.js → TransformComponent-d28b4035.js} +1 -1
  56. package/dist/preview-client/_static/{XRReferenceImageAsset-96f516ba.js → XRReferenceImageAsset-16071f5c.js} +1 -1
  57. package/dist/preview-client/_static/{audio-b5fbde34.js → audio-1d573775.js} +1 -1
  58. package/dist/preview-client/_static/{createOnModelChange-370b83da.js → createOnModelChange-38471bb6.js} +1 -1
  59. package/dist/preview-client/_static/{createReactComponent-58d9f0dd.js → createReactComponent-3e49f864.js} +1 -1
  60. package/dist/preview-client/_static/index-0a57ae09.js +1 -0
  61. package/dist/preview-client/_static/{index-74bcfad9.js → index-1d0ae2e4.js} +1 -1
  62. package/dist/preview-client/_static/{index-dd0763bf.js → index-1fa3ba70.js} +1 -1
  63. package/dist/preview-client/_static/index-2c567b8d.js +1 -0
  64. package/dist/preview-client/_static/{index-da16047f.js → index-2f54d4c9.js} +1 -1
  65. package/dist/preview-client/_static/{index-0dd5bb36.js → index-4084db44.js} +1 -1
  66. package/dist/preview-client/_static/index-5c27dafa.js +1 -0
  67. package/dist/preview-client/_static/{index-88650db7.js → index-65c6af4a.js} +3 -3
  68. package/dist/preview-client/_static/{index-05b76766.js → index-68806c86.js} +1 -1
  69. package/dist/preview-client/_static/{index-cdbb2f4d.js → index-8a22fe59.js} +1 -1
  70. package/dist/preview-client/_static/index-9e3daa94.js +1 -0
  71. package/dist/preview-client/_static/index-bdda02cf.js +1 -0
  72. package/dist/preview-client/_static/index-c88f78ce.js +1 -0
  73. package/dist/preview-client/_static/{index-ab8556cb.js → index-ce381b62.js} +3 -3
  74. package/dist/preview-client/_static/{index-c3dec278.js → index-d497fb6d.js} +214 -175
  75. package/dist/preview-client/_static/index-e4fb05d8.js +1 -0
  76. package/dist/preview-client/_static/{ktx2-encoder-db93524f.js → ktx2-encoder-772f6c33.js} +1 -1
  77. package/dist/preview-client/_static/{module-ec094ef6.js → module-136992e3.js} +1 -1
  78. package/dist/preview-client/_static/{module-ada3dced.js → module-1470d524.js} +1 -1
  79. package/dist/preview-client/_static/{module-de7ee724.js → module-77c2ea8c.js} +1 -1
  80. package/dist/preview-client/_static/{postmen-2853c0e6.js → postmen-0413c689.js} +2 -2
  81. package/dist/preview-client/_static/{shader-data-utils-f0e4f5a3.js → shader-data-utils-e38a959d.js} +1 -1
  82. package/dist/preview-client/index.html +1 -1
  83. package/package.json +29 -24
  84. package/dist/preview-client/_static/MaterialAsset-5353c4cb.js +0 -1
  85. package/dist/preview-client/_static/Menu-c8e6194b.js +0 -17
  86. package/dist/preview-client/_static/MeshAsset-c2bf60c5.js +0 -1
  87. package/dist/preview-client/_static/ParticleRendererComponent-e106bd8c.js +0 -26
  88. package/dist/preview-client/_static/PrefabAsset-59743dbb.js +0 -1
  89. package/dist/preview-client/_static/SceneAsset-08752701.js +0 -1
  90. package/dist/preview-client/_static/Tooltip-b5be390f.js +0 -1
  91. package/dist/preview-client/_static/index-29c59aff.js +0 -1
  92. package/dist/preview-client/_static/index-3680d0e0.js +0 -1
  93. package/dist/preview-client/_static/index-42aa3a49.js +0 -1
  94. package/dist/preview-client/_static/index-496f331d.js +0 -1
  95. package/dist/preview-client/_static/index-9f0122f0.js +0 -1
  96. package/dist/preview-client/_static/index-c6b7045c.js +0 -1
  97. package/dist/preview-client/_static/index-dddcae01.js +0 -1
@@ -1 +1 @@
1
- var K=Object.defineProperty;var Q=(n,t,e)=>t in n?K(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var X=(n,t,e)=>(Q(n,typeof t!="symbol"?t+"":t,e),e);import{aJ as x,av as f,aO as $,E as b,bM as Y,c5 as A,c6 as Z,x as ee,p as re,e as p,co as O,S as j,et as te,er as ne,aK as w,bm as oe,dh as ae,aH as D,bA as ie,q as se,cm as ce,eu as q,bX as pe,C as m,t as U}from"./index-c3dec278.js";import{a as d,b as S,c as E,d as z,e as L,f as V,g as J}from"./module-de7ee724.js";import{r as le}from"./index-cdbb2f4d.js";import"./postmen-2853c0e6.js";import{F as W}from"./FormItemArray-b8cda1d2.js";import{c as ue}from"./create-script-property-context-model-0fe0258f.js";const fe=x(function(t){const{model:e}=t,o=ue(e.properties,e.root);return f.jsx($.List,{fullWidth:!0,model:o,configs:e.propertiesConfig,onModelChange:(r,a)=>{a!==void 0&&le.inspectorFacade.componentChange(e.id,r,a)}})});var ge=Object.defineProperty,me=Object.getOwnPropertyDescriptor,H=(n,t,e,o)=>{for(var r=o>1?void 0:o?me(t,e):t,a=n.length-1,i;a>=0;a--)(i=n[a])&&(r=(o?i(t,e,r):i(r))||r);return o&&r&&ge(t,e,r),r};class h extends b{constructor(e,o){super(e,o);X(this,"propertiesConfig",[]);X(this,"properties",{})}onInitComplete(){this._attachImportScriptBridge()}_attachImportScriptBridge(){const e=b.getRegisteredImportComponentProperty(this.type),{engineObject:o}=this,r={},a=[];for(let s=0;s<e.length;s++){const l=e[s];r[l.property]=o[l.property],a.push(l)}this.propertiesConfig=a;const{properties:i}=this;for(const[s,l]of Object.entries(r))i[s]=i[s]??l;Object.keys(i).forEach(s=>{Y(this,s,{getActualEditorValue:()=>A(i[s]),setActualEditorValue:(l,c,u)=>{l.properties[c]=u}})})}rebindEngineObject(e){super.rebindEngineObject(e),this._attachImportScriptBridge()}deserialize(e){if(super.deserialize(e),e.props)for(const[o,r]of Object.entries(e.props))o!=="enabled"&&(this.properties[o]=r)}toJSON(){const e=super.toJSON();if(delete e.props.script,this.properties){const o=A(this.properties),r=e.props||{};for(const[a,i]of Object.entries(o)){if(a==="root")continue;const s=Z(i);s!==void 0&&(r[a]=s)}e.props=r}return e}}H([ee.ref],h.prototype,"propertiesConfig",2);H([re({label:p("component.script.properties-label"),customComponent:fe})],h.prototype,"properties",2);function P(n,t){return P=Object.setPrototypeOf||function(o,r){return o.__proto__=r,o},P(n,t)}function y(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&P(n,t)}var de=function(n){y(t,n);function t(){var o;return o=n.apply(this,arguments)||this,o.mode=d.AR,o}var e=t.prototype;return e.onEnable=function(){var r=this.engine.xrManager;if(r)switch(this.mode){case d.AR:var a;r.origin=this.origin;var i=(a=this.camera)==null?void 0:a.getComponent(O);if(i)r.cameraManager.attachCamera(S.Camera,i);else throw new Error("XROrigin: The Camera is not included on the Camera Entity");break;case d.VR:var s,l;r.origin=this.origin;var c=(s=this.leftCamera)==null?void 0:s.getComponent(O);if(c)r.cameraManager.attachCamera(S.LeftCamera,c);else throw new Error("XROrigin: The Camera is not included on the Left Camera Entity");var u=(l=this.rightCamera)==null?void 0:l.getComponent(O);if(u)r.cameraManager.attachCamera(S.RightCamera,u);else throw new Error("XROrigin: The Camera is not included on the Right Camera Entity");break}},t}(j);function B(n,t){for(var e=0;e<t.length;e++){var o=t[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}function he(n,t,e){return t&&B(n.prototype,t),e&&B(n,e),n}var ye=function(n){y(t,n);function t(){var e;return e=n.apply(this,arguments)||this,e._destroyedOnRemoval=!0,e}return he(t,[{key:"data",get:function(){return this._data},set:function(o){this._data=o}},{key:"destroyedOnRemoval",get:function(){return this._destroyedOnRemoval},set:function(o){this._destroyedOnRemoval=o}}]),t}(j);function N(n,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t}var M=function(n){y(t,n);function t(o,r){var a;return a=n.call(this,o)||this,a._trackIdToIndex=[],a._trackedComponents=[],a._feature=r,a._onTrackedChanged=a._onTrackedChanged.bind(a),a._onSessionChanged=a._onSessionChanged.bind(a),a}var e=t.prototype;return e.getTrackedComponentByTrackId=function(r){var a=this._trackIdToIndex[r];return a!==void 0?this._trackedComponents[a]:void 0},e.onEnable=function(){var r;(r=this.engine.xrManager)==null||r.sessionManager.addStateChangedListener(this._onSessionChanged)},e.onDisable=function(){var r,a=this.engine.xrManager;a&&((r=a.getFeature(this._feature))==null||r.removeChangedListener(this._onTrackedChanged),a.sessionManager.removeStateChangedListener(this._onSessionChanged))},e._onSessionChanged=function(r){switch(r){case E.Initializing:this._initXRFeature();break;case E.Initialized:var a=this._engine.xrManager.getFeature(this._feature);a?a.addChangedListener(this._onTrackedChanged):console.error("XRTrackedObjectManager: Feature ",this._feature.name," not found");break}},e._onTrackedChanged=function(r,a,i){if(r.length>0)for(var s=0,l=r.length;s<l;s++)this._createOrUpdateTrackedComponents(r[s]);if(a.length>0)for(var c=0,u=a.length;c<u;c++)this._createOrUpdateTrackedComponents(a[c]);if(i.length>0)for(var g=this,I=g._trackIdToIndex,v=g._trackedComponents,k=0,G=i.length;k<G;k++){var F=i[k].id,C=I[F];if(C!==void 0){var T=v[C];v.splice(C,1),delete I[F],T.destroyedOnRemoval?T.entity.destroy():T.entity.parent=null}}},e._createOrUpdateTrackedComponents=function(r){var a=this.getTrackedComponentByTrackId(r.id);if(!a){var i=this,s=i._trackIdToIndex,l=i._trackedComponents;a=this._createTrackedComponents(r),s[r.id]=l.length,l.push(a)}a.data=r;var c=a.entity.transform,u=r.pose;return c.position=u.position,c.rotationQuaternion=u.rotation,a},e._createTrackedComponents=function(r){var a=this._engine.xrManager.origin,i=this.prefab,s;return i?(N(i,te)?s=i.instantiateSceneRoot():N(i,ne)?s=i.instantiate():s=i.clone(),s.name="TrackedImage"+r.id,a.addChild(s)):s=a.createChild("TrackedImage"+r.id),s.addComponent(ye)},t}(j),be=function(n){y(t,n);function t(o){var r;return r=n.call(this,o,z)||this,r.anchors=[],r}var e=t.prototype;return e._initXRFeature=function(){var r=this.anchors,a=this.engine.xrManager;try{for(var i=a.addFeature(z),s=0,l=r.length;s<l;s++){var c=r[s];i.addAnchor(c.position,c.rotation)}}catch(u){console.error("Anchor Tracking is not supported.",u)}},t}(M),xe=function(n){y(t,n);function t(o){var r;return r=n.call(this,o,L)||this,r.trackingImages=[],r}var e=t.prototype;return e._initXRFeature=function(){try{this.engine.xrManager.addFeature(L,this.trackingImages)}catch(r){console.error("Image Tracking is not supported.",r)}},t}(M),ve=function(n){y(t,n);function t(o){var r;return r=n.call(this,o,V)||this,r.detectionMode=J.EveryThing,r}var e=t.prototype;return e._initXRFeature=function(){try{this.engine.xrManager.addFeature(V,this.detectionMode)}catch(r){console.error("Plane Tracking is not supported.",r)}},t}(M);const _e=x(({model:n,inspectorConfig:t,onModelChange:e})=>{const o=t.property||"anchors",r=n[o]||[],{t:a}=w();return f.jsx(f.Fragment,{children:f.jsx(W,{defaultValue:[],label:a("xr.anchor.list.label"),items:r.map((i,s)=>({removable:!0,children:f.jsx(Re,{item:i,onChange:l=>{const c=r.map((u,g)=>g!==s?u:l);e==null||e(o,c)}}),id:String(s),name:a("xr.anchor.item",{index:s})})),addable:!0,onAdd:()=>{const i=r.concat({position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0,w:1}});e==null||e(o,i)},onDelete:i=>{const s=Number(i.id),l=r.filter((c,u)=>u!==s);e==null||e(o,l)}})})}),Re=x(({item:n,onChange:t})=>{const{t:e}=w(),{position:o,rotation:r}=n;return f.jsxs(f.Fragment,{children:[f.jsx(oe,{label:e("xr.anchor.position"),info:e("xr.anchor.position"),value:{x:o.x,y:o.y,z:o.z},onChange:(a,i)=>{const s={...o,[i]:a[i]};t({...n,position:s})}}),f.jsx(ae,{label:e("xr.anchor.rotation"),info:e("xr.anchor.rotation"),value:{x:r.x,y:r.y,z:r.z,w:r.w},onChange:(a,i)=>{const s={...r,[i]:a[i]};t({...n,rotation:s})}})]})}),Ie=D("div",{textAlign:"center"}),ke=D("img",{maxHeight:"200px",maxWidth:"100%",height:"auto",width:"auto"}),Ce=x(({model:n,inspectorConfig:t,onModelChange:e})=>{const o=t.property||"trackingImages",r=n[o]||[],{assets:a}=n.root.assetStore,{t:i}=w(),s=r.map((c,u)=>{const g=a[c.refId];return g?{removable:!0,children:f.jsx(Te,{item:g,model:n}),id:String(u),arrow:!1,name:Xe(g.name)}:null}).filter(Boolean),l=[];return Object.values(a).forEach(c=>{const{type:u}=c.getMetaConfig();u==="XRReferenceImage"&&!r.find(g=>g.refId===c.id)&&l.push(c)}),f.jsxs(f.Fragment,{children:[f.jsx(W,{defaultValue:[],label:i("xr.image.list.label"),info:i("xr.image.list.info"),items:s,onDelete:async c=>{const u=Number(c.id),g=r.filter((I,v)=>v!==u);e==null||e(o,g)}}),f.jsx(ie,{assets:l,dropLayer:se.XRReferenceImage,onSelect:c=>{const u=r.concat(c.getCurrentRef());e==null||e(o,u)},placeholder:i("xr.image.select"),label:i("xr.image.add"),value:null,asset:null})]})}),Te=x(({item:n,model:t})=>f.jsxs(f.Fragment,{children:[f.jsx(Ie,{children:f.jsx(ke,{src:n.imgUrl})}),f.jsx(ce,{label:p("xr.image.width.label"),value:n.physicalWidth,onChange:e=>{t.root.inspectorFacade.assetChange(n.id,"physicalWidth",e,"asset-meta")}})]}));function Xe(n,t=30){return n.length>t?n.slice(0,t-3)+"...":n}function R(n,t,e,o){b.registerComponent(n,e),b.registerCustomEngineComponent(n,t),b.registerImportComponentProperty(n,o)}const _={};q.on("ComponentAddToScene",n=>{const{type:t}=n;if(t)switch(t){case"XR Origin":case"XR Anchor Manager":case"XR Image Manager":case"XR Plane Manager":(_[t]=(_[t]||0)+1)>1&&pe(p("xr.toast.only-one-effect"));break}});q.on("ComponentDestroyInScene",n=>{const{type:t}=n;!t||!_[t]||(_[t]-=1)});R("XR Origin",de,{class:h,componentsMenu:{label:p("xr.origin.title"),group:"XR"},type:"XR Origin",refMap:new Set,external:!1,unique:!0},[{type:m.SegmentControl,property:"mode",label:p("xr.origin.mode.label"),info:p("xr.origin.mode.info"),options:U(d,void 0,n=>p(`xr.origin.mode.${n.toLowerCase()}`))},{type:m.EntityPicker,property:"origin",label:p("xr.origin.origin.label"),info:p("xr.origin.origin.info"),when:n=>n.mode!==d.None},{type:m.EntityPicker,property:"camera",label:p("xr.origin.camera.label"),info:p("xr.origin.camera.info"),when:n=>n.mode===d.AR},{type:m.EntityPicker,property:"leftCamera",label:p("xr.origin.left-camera.label"),info:p("xr.origin.left-camera.info"),when:n=>n.mode===d.VR},{type:m.EntityPicker,property:"rightCamera",label:p("xr.origin.right-camera.label"),info:p("xr.origin.right-camera.info"),when:n=>n.mode===d.VR}]);R("XR Anchor Manager",be,{class:h,componentsMenu:{label:p("xr.anchor.title"),group:"XR"},type:"XR Anchor Manager",refMap:new Set,external:!1,unique:!0},[{customComponent:_e,property:"anchors",label:p("xr.anchor.list.label"),info:p("xr.anchor.list.info")},{type:m.AssetPicker,assetType:"Prefab",property:"prefab",label:"Prefab",info:p("xr.prefab")}]);R("XR Image Manager",xe,{class:h,componentsMenu:{label:p("xr.image.title"),group:"XR"},type:"XR Image Manager",refMap:new Set,external:!1,unique:!0},[{customComponent:Ce,property:"trackingImages",label:p("xr.image.list.label"),info:p("xr.image.list.info")},{type:m.AssetPicker,assetType:"Prefab",property:"prefab",label:"Prefab",info:p("xr.prefab")}]);R("XR Plane Manager",ve,{class:h,componentsMenu:{label:p("xr.plane.title"),group:"XR"},type:"XR Plane Manager",refMap:new Set,external:!1,unique:!0},[{type:m.Select,property:"detectionMode",label:p("xr.plane.detection-mode.label"),info:p("xr.plane.detection-mode.info"),options:U(J)},{type:m.AssetPicker,assetType:"Prefab",property:"prefab",label:"Prefab",info:p("xr.prefab")}]);const Ae=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{h as I,Ae as i};
1
+ var K=Object.defineProperty;var Q=(n,t,e)=>t in n?K(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var X=(n,t,e)=>(Q(n,typeof t!="symbol"?t+"":t,e),e);import{aJ as x,aL as f,aP as $,E as b,bP as Y,c9 as A,ca as Z,x as ee,p as re,e as p,cs as S,S as j,ex as te,ev as ne,aK as w,bn as oe,dj as ae,aH as q,bC as ie,q as se,cq as ce,ey as D,b_ as pe,C as m,t as U}from"./index-d497fb6d.js";import{a as d,b as O,c as E,d as z,e as L,f as V,g as J}from"./module-77c2ea8c.js";import{r as le}from"./index-8a22fe59.js";import"./postmen-0413c689.js";import{F as W}from"./FormItemArray-9d4196d8.js";import{c as ue}from"./create-script-property-context-model-0fe0258f.js";const fe=x(function(t){const{model:e}=t,o=ue(e.properties,e.root);return f.jsx($.List,{fullWidth:!0,model:o,configs:e.propertiesConfig,onModelChange:(r,a)=>{a!==void 0&&le.inspectorFacade.componentChange(e.id,r,a)}})});var ge=Object.defineProperty,me=Object.getOwnPropertyDescriptor,H=(n,t,e,o)=>{for(var r=o>1?void 0:o?me(t,e):t,a=n.length-1,i;a>=0;a--)(i=n[a])&&(r=(o?i(t,e,r):i(r))||r);return o&&r&&ge(t,e,r),r};class h extends b{constructor(e,o){super(e,o);X(this,"propertiesConfig",[]);X(this,"properties",{})}onInitComplete(){this._attachImportScriptBridge()}_attachImportScriptBridge(){const e=b.getRegisteredImportComponentProperty(this.type),{engineObject:o}=this,r={},a=[];for(let s=0;s<e.length;s++){const l=e[s];r[l.property]=o[l.property],a.push(l)}this.propertiesConfig=a;const{properties:i}=this;for(const[s,l]of Object.entries(r))i[s]=i[s]??l;Object.keys(i).forEach(s=>{Y(this,s,{getActualEditorValue:()=>A(i[s]),setActualEditorValue:(l,c,u)=>{l.properties[c]=u}})})}rebindEngineObject(e){super.rebindEngineObject(e),this._attachImportScriptBridge()}deserialize(e){if(super.deserialize(e),e.props)for(const[o,r]of Object.entries(e.props))o!=="enabled"&&(this.properties[o]=r)}toJSON(){const e=super.toJSON();if(delete e.props.script,this.properties){const o=A(this.properties),r=e.props||{};for(const[a,i]of Object.entries(o)){if(a==="root")continue;const s=Z(i);s!==void 0&&(r[a]=s)}e.props=r}return e}}H([ee.ref],h.prototype,"propertiesConfig",2);H([re({label:p("component.script.properties-label"),customComponent:fe})],h.prototype,"properties",2);function P(n,t){return P=Object.setPrototypeOf||function(o,r){return o.__proto__=r,o},P(n,t)}function y(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&P(n,t)}var de=function(n){y(t,n);function t(){var o;return o=n.apply(this,arguments)||this,o.mode=d.AR,o}var e=t.prototype;return e.onEnable=function(){var r=this.engine.xrManager;if(r)switch(this.mode){case d.AR:var a;r.origin=this.origin;var i=(a=this.camera)==null?void 0:a.getComponent(S);if(i)r.cameraManager.attachCamera(O.Camera,i);else throw new Error("XROrigin: The Camera is not included on the Camera Entity");break;case d.VR:var s,l;r.origin=this.origin;var c=(s=this.leftCamera)==null?void 0:s.getComponent(S);if(c)r.cameraManager.attachCamera(O.LeftCamera,c);else throw new Error("XROrigin: The Camera is not included on the Left Camera Entity");var u=(l=this.rightCamera)==null?void 0:l.getComponent(S);if(u)r.cameraManager.attachCamera(O.RightCamera,u);else throw new Error("XROrigin: The Camera is not included on the Right Camera Entity");break}},t}(j);function B(n,t){for(var e=0;e<t.length;e++){var o=t[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}function he(n,t,e){return t&&B(n.prototype,t),e&&B(n,e),n}var ye=function(n){y(t,n);function t(){var e;return e=n.apply(this,arguments)||this,e._destroyedOnRemoval=!0,e}return he(t,[{key:"data",get:function(){return this._data},set:function(o){this._data=o}},{key:"destroyedOnRemoval",get:function(){return this._destroyedOnRemoval},set:function(o){this._destroyedOnRemoval=o}}]),t}(j);function N(n,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t}var F=function(n){y(t,n);function t(o,r){var a;return a=n.call(this,o)||this,a._trackIdToIndex=[],a._trackedComponents=[],a._feature=r,a._onTrackedChanged=a._onTrackedChanged.bind(a),a._onSessionChanged=a._onSessionChanged.bind(a),a}var e=t.prototype;return e.getTrackedComponentByTrackId=function(r){var a=this._trackIdToIndex[r];return a!==void 0?this._trackedComponents[a]:void 0},e.onEnable=function(){var r;(r=this.engine.xrManager)==null||r.sessionManager.addStateChangedListener(this._onSessionChanged)},e.onDisable=function(){var r,a=this.engine.xrManager;a&&((r=a.getFeature(this._feature))==null||r.removeChangedListener(this._onTrackedChanged),a.sessionManager.removeStateChangedListener(this._onSessionChanged))},e._onSessionChanged=function(r){switch(r){case E.Initializing:this._initXRFeature();break;case E.Initialized:var a=this._engine.xrManager.getFeature(this._feature);a?a.addChangedListener(this._onTrackedChanged):console.error("XRTrackedObjectManager: Feature ",this._feature.name," not found");break}},e._onTrackedChanged=function(r,a,i){if(r.length>0)for(var s=0,l=r.length;s<l;s++)this._createOrUpdateTrackedComponents(r[s]);if(a.length>0)for(var c=0,u=a.length;c<u;c++)this._createOrUpdateTrackedComponents(a[c]);if(i.length>0)for(var g=this,I=g._trackIdToIndex,v=g._trackedComponents,k=0,G=i.length;k<G;k++){var M=i[k].id,C=I[M];if(C!==void 0){var T=v[C];v.splice(C,1),delete I[M],T.destroyedOnRemoval?T.entity.destroy():T.entity.parent=null}}},e._createOrUpdateTrackedComponents=function(r){var a=this.getTrackedComponentByTrackId(r.id);if(!a){var i=this,s=i._trackIdToIndex,l=i._trackedComponents;a=this._createTrackedComponents(r),s[r.id]=l.length,l.push(a)}a.data=r;var c=a.entity.transform,u=r.pose;return c.position=u.position,c.rotationQuaternion=u.rotation,a},e._createTrackedComponents=function(r){var a=this._engine.xrManager.origin,i=this.prefab,s;return i?(N(i,te)?s=i.instantiateSceneRoot():N(i,ne)?s=i.instantiate():s=i.clone(),s.name="TrackedImage"+r.id,a.addChild(s)):s=a.createChild("TrackedImage"+r.id),s.addComponent(ye)},t}(j),be=function(n){y(t,n);function t(o){var r;return r=n.call(this,o,z)||this,r.anchors=[],r}var e=t.prototype;return e._initXRFeature=function(){var r=this.anchors,a=this.engine.xrManager;try{for(var i=a.addFeature(z),s=0,l=r.length;s<l;s++){var c=r[s];i.addAnchor(c.position,c.rotation)}}catch(u){console.error("Anchor Tracking is not supported.",u)}},t}(F),xe=function(n){y(t,n);function t(o){var r;return r=n.call(this,o,L)||this,r.trackingImages=[],r}var e=t.prototype;return e._initXRFeature=function(){try{this.engine.xrManager.addFeature(L,this.trackingImages)}catch(r){console.error("Image Tracking is not supported.",r)}},t}(F),ve=function(n){y(t,n);function t(o){var r;return r=n.call(this,o,V)||this,r.detectionMode=J.EveryThing,r}var e=t.prototype;return e._initXRFeature=function(){try{this.engine.xrManager.addFeature(V,this.detectionMode)}catch(r){console.error("Plane Tracking is not supported.",r)}},t}(F);const _e=x(({model:n,inspectorConfig:t,onModelChange:e})=>{const o=t.property||"anchors",r=n[o]||[],{t:a}=w();return f.jsx(f.Fragment,{children:f.jsx(W,{defaultValue:[],label:a("xr.anchor.list.label"),items:r.map((i,s)=>({removable:!0,children:f.jsx(Re,{item:i,onChange:l=>{const c=r.map((u,g)=>g!==s?u:l);e==null||e(o,c)}}),id:String(s),name:a("xr.anchor.item",{index:s})})),addable:!0,onAdd:()=>{const i=r.concat({position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0,w:1}});e==null||e(o,i)},onDelete:i=>{const s=Number(i.id),l=r.filter((c,u)=>u!==s);e==null||e(o,l)}})})}),Re=x(({item:n,onChange:t})=>{const{t:e}=w(),{position:o,rotation:r}=n;return f.jsxs(f.Fragment,{children:[f.jsx(oe,{label:e("xr.anchor.position"),info:e("xr.anchor.position"),value:{x:o.x,y:o.y,z:o.z},onChange:(a,i)=>{const s={...o,[i]:a[i]};t({...n,position:s})}}),f.jsx(ae,{label:e("xr.anchor.rotation"),info:e("xr.anchor.rotation"),value:{x:r.x,y:r.y,z:r.z,w:r.w},onChange:(a,i)=>{const s={...r,[i]:a[i]};t({...n,rotation:s})}})]})}),Ie=q("div",{textAlign:"center"}),ke=q("img",{maxHeight:"200px",maxWidth:"100%",height:"auto",width:"auto"}),Ce=x(({model:n,inspectorConfig:t,onModelChange:e})=>{const o=t.property||"trackingImages",r=n[o]||[],{assets:a}=n.root.assetStore,{t:i}=w(),s=r.map((c,u)=>{const g=a[c.refId];return g?{removable:!0,children:f.jsx(Te,{item:g,model:n}),id:String(u),arrow:!1,name:Xe(g.name)}:null}).filter(Boolean),l=[];return Object.values(a).forEach(c=>{const{type:u}=c.getMetaConfig();u==="XRReferenceImage"&&!r.find(g=>g.refId===c.id)&&l.push(c)}),f.jsxs(f.Fragment,{children:[f.jsx(W,{defaultValue:[],label:i("xr.image.list.label"),info:i("xr.image.list.info"),items:s,onDelete:async c=>{const u=Number(c.id),g=r.filter((I,v)=>v!==u);e==null||e(o,g)}}),f.jsx(ie,{assets:l,dropLayer:se.XRReferenceImage,onSelect:c=>{const u=r.concat(c.getCurrentRef());e==null||e(o,u)},placeholder:i("xr.image.select"),label:i("xr.image.add"),value:null,asset:null})]})}),Te=x(({item:n,model:t})=>f.jsxs(f.Fragment,{children:[f.jsx(Ie,{children:f.jsx(ke,{src:n.imgUrl})}),f.jsx(ce,{label:p("xr.image.width.label"),value:n.physicalWidth,onChange:e=>{t.root.inspectorFacade.assetChange(n.id,"physicalWidth",e,"asset-meta")}})]}));function Xe(n,t=30){return n.length>t?n.slice(0,t-3)+"...":n}function R(n,t,e,o){b.registerComponent(n,e),b.registerCustomEngineComponent(n,t),b.registerImportComponentProperty(n,o)}const _={};D.on("ComponentAddToScene",n=>{const{type:t}=n;if(t)switch(t){case"XR Origin":case"XR Anchor Manager":case"XR Image Manager":case"XR Plane Manager":(_[t]=(_[t]||0)+1)>1&&pe(p("xr.toast.only-one-effect"));break}});D.on("ComponentDestroyInScene",n=>{const{type:t}=n;!t||!_[t]||(_[t]-=1)});R("XR Origin",de,{class:h,componentsMenu:{label:p("xr.origin.title"),group:"XR"},type:"XR Origin",refMap:new Set,external:!1,unique:!0},[{type:m.SegmentControl,property:"mode",label:p("xr.origin.mode.label"),info:p("xr.origin.mode.info"),options:U(d,void 0,n=>p(`xr.origin.mode.${n.toLowerCase()}`))},{type:m.EntityPicker,property:"origin",label:p("xr.origin.origin.label"),info:p("xr.origin.origin.info"),when:n=>n.mode!==d.None},{type:m.EntityPicker,property:"camera",label:p("xr.origin.camera.label"),info:p("xr.origin.camera.info"),when:n=>n.mode===d.AR},{type:m.EntityPicker,property:"leftCamera",label:p("xr.origin.left-camera.label"),info:p("xr.origin.left-camera.info"),when:n=>n.mode===d.VR},{type:m.EntityPicker,property:"rightCamera",label:p("xr.origin.right-camera.label"),info:p("xr.origin.right-camera.info"),when:n=>n.mode===d.VR}]);R("XR Anchor Manager",be,{class:h,componentsMenu:{label:p("xr.anchor.title"),group:"XR"},type:"XR Anchor Manager",refMap:new Set,external:!1,unique:!0},[{customComponent:_e,property:"anchors",label:p("xr.anchor.list.label"),info:p("xr.anchor.list.info")},{type:m.AssetPicker,assetType:"Prefab",property:"prefab",label:"Prefab",info:p("xr.prefab")}]);R("XR Image Manager",xe,{class:h,componentsMenu:{label:p("xr.image.title"),group:"XR"},type:"XR Image Manager",refMap:new Set,external:!1,unique:!0},[{customComponent:Ce,property:"trackingImages",label:p("xr.image.list.label"),info:p("xr.image.list.info")},{type:m.AssetPicker,assetType:"Prefab",property:"prefab",label:"Prefab",info:p("xr.prefab")}]);R("XR Plane Manager",ve,{class:h,componentsMenu:{label:p("xr.plane.title"),group:"XR"},type:"XR Plane Manager",refMap:new Set,external:!1,unique:!0},[{type:m.Select,property:"detectionMode",label:p("xr.plane.detection-mode.label"),info:p("xr.plane.detection-mode.info"),options:U(J)},{type:m.AssetPicker,assetType:"Prefab",property:"prefab",label:"Prefab",info:p("xr.prefab")}]);const Ae=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{h as I,Ae as i};
@@ -0,0 +1 @@
1
+ import{K as E,b as w,T as I,a as R}from"./TextureAsset-bf69040b.js";import{G as F,a as G}from"./GlTFAsset-917bf1ee.js";import{M as U,a as V}from"./MaterialAsset-aa93db51.js";import{MeshAsset as X}from"./MeshAsset-585f4b18.js";import{AnimatorControllerAsset as D}from"./AnimatorControllerAsset-9192e596.js";import{A as j,a as q,b as z}from"./AnimationClipAsset-0a1f63eb.js";import{L as H,c as J,b as N,S as Q,a as W}from"./ShaderChunkAsset-a3ff3959.js";import{AmbientLightAsset as Z}from"./AmbientLightAsset-57a59fc2.js";import{S as $}from"./SpineSkeletonDataAsset-a8598103.js";import{FontAsset as te}from"./FontAsset-10273d05.js";import{SceneAsset as se}from"./SceneAsset-7a9dbdd8.js";import{E as pe,c as ae,b as ie,a as me,S as Ae}from"./ShaderAsset-2f2c1e95.js";import{E as fe,a as ne,S as xe,b as he,t as le}from"./ShaderUIScriptAsset-d3a2d680.js";import{PrimitiveMesh as ce}from"./PrimitiveMesh-fde624a6.js";import{XRReferenceImageAsset as ye}from"./XRReferenceImageAsset-16071f5c.js";import{PrefabAsset as Me}from"./PrefabAsset-8c923465.js";import{PhysicsMaterialAsset as Ce}from"./PhysicsMaterialAsset-2dd013f8.js";import{RenderTargetAsset as ge}from"./RenderTargetAsset-bf38a725.js";import{AudioAsset as we}from"./AudioAsset-0ea4ba7b.js";import{StateMachineScript as Re}from"./index-2f54d4c9.js";import{MarkdownAsset as Fe}from"./MarkdownAsset-602f93bf.js";import"./index-d497fb6d.js";import"./ktx2-encoder-772f6c33.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./index-8a22fe59.js";import"./postmen-0413c689.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./Tooltip-0268ffac.js";import"./createReactComponent-3e49f864.js";import"./AssetViewer-9f395efb.js";import"./glTFIO-45ff9a17.js";import"./MaterialInspector-45e208c7.js";import"./IconPointFilled-192e99c9.js";import"./shader-data-utils-e38a959d.js";import"./index-68806c86.js";import"./MeshThumbnail-9bbe01dc.js";import"./bundlers-9b0d37fc.js";import"./module-136992e3.js";import"./module-1470d524.js";import"./IconPlus-2bfc60da.js";import"./FormItemArray-9d4196d8.js";import"./Accordion-6f002a96.js";import"./module-77c2ea8c.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};
@@ -1,4 +1,4 @@
1
- var Cn=Object.defineProperty;var En=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var x=(e,t,n)=>(En(e,typeof t!="symbol"?t+"":t,n),n);import{CameraComponent as Di}from"./CameraComponent-3dc63451.js";import{DirectLightComponent as Pi}from"./DirectLight-96dbba47.js";import{PointLightComponent as Ai}from"./PointLight-add790ea.js";import{SpotLightComponent as Ii}from"./SpotLight-649b0e21.js";import{MeshRendererComponent as Li}from"./MeshRendererComponent-430774ef.js";import{SkinnedMeshRendererComponent as ki}from"./SkinnedMeshRendererComponent-9756bd5f.js";import{A as Ni,a as zi}from"./AnimatorStore-883a28ad.js";import{SpriteRendererComponent as Fi}from"./SpriteRendererComponent-33b71997.js";import{SpriteMaskComponent as Ui}from"./SpriteMaskComponent-2c1cef5e.js";import{C as Wi,D as Yi,F as Hi,H as Ki,P as Vi,a as Ji,S as qi}from"./PhysicsStore-818c2f61.js";import{ScriptComponent as Zi}from"./index-29c59aff.js";import{TextRendererComponent as es}from"./TextRendererComponent-8dc0d7fb.js";import{LottieAnimationComponent as ns}from"./LottieAnimationComponent-f10dc558.js";import{SpineAnimationComponent as os}from"./SpineAnimationComponent-f3e0ff44.js";import{ParticleRendererComponent as ss}from"./ParticleRendererComponent-e106bd8c.js";import{TrailRendererComponent as ls}from"./TrailRendererComponent-c4635fab.js";import{aM as l,b7 as X,ev as pe,aH as ut,aI as $e,aJ as Dn,aK as Rn,av as E,aL as qe,ew as Pn,bk as Mn,dr as An,bq as _n,ai as In,B as jt,y as On,ex as Ge,L as Ln,bE as De,e2 as Ft,u as Tn,bs as kn,x as le,c2 as Bn,aC as ve,bt as Nn}from"./index-c3dec278.js";import{u as zn}from"./index-cdbb2f4d.js";import"./postmen-2853c0e6.js";import{c as _e}from"./createReactComponent-58d9f0dd.js";import{T as Ze}from"./Tooltip-b5be390f.js";import{I as us}from"./index-0dd5bb36.js";import{P as fs}from"./PostProcessComponent-af270a77.js";import{AudioComponent as ps}from"./AudioComponent-3d6c73ce.js";import{TransformComponent as vs}from"./TransformComponent-e544f7ac.js";import{ButtonComponent as bs,ImageComponent as ys,TextComponent as xs,UICanvasComponent as ws,UIGroupComponent as Ss,UITransformComponent as Cs}from"./index-74bcfad9.js";import"./Component-0f881fc1.js";import"./LightBaseComponent-d651a276.js";import"./createOnModelChange-370b83da.js";import"./ReferencedMaterial-d11151b5.js";import"./MaterialInspector-8d466d59.js";import"./IconPointFilled-62d3c3b2.js";import"./MeshRendererBaseComponent-fde6b6a5.js";import"./SpriteBaseComponent-d2a7ab4c.js";import"./FormItemArray-b8cda1d2.js";import"./Accordion-2cd014f1.js";import"./create-script-property-context-model-0fe0258f.js";import"./TextureAsset-a7ff39b1.js";import"./ktx2-encoder-db93524f.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./AssetViewer-3847c058.js";import"./GlTFAsset-5970e707.js";import"./glTFIO-45ff9a17.js";import"./MaterialAsset-5353c4cb.js";import"./shader-data-utils-f0e4f5a3.js";import"./MeshAsset-c2bf60c5.js";import"./index-05b76766.js";import"./MeshThumbnail-07ffa076.js";import"./AnimatorControllerAsset-2716497a.js";import"./bundlers-9b0d37fc.js";import"./AnimationClipAsset-d7b37af0.js";import"./module-ec094ef6.js";import"./module-ada3dced.js";import"./ShaderChunkAsset-e43dde8a.js";import"./IconPlus-def01e2b.js";import"./AmbientLightAsset-be9e872c.js";import"./SpineSkeletonDataAsset-43b731f1.js";import"./FontAsset-d34b5378.js";import"./SceneAsset-08752701.js";import"./ShaderAsset-a9d667f5.js";import"./ShaderUIScriptAsset-e1cd0b8b.js";import"./PrimitiveMesh-075dda8a.js";import"./XRReferenceImageAsset-96f516ba.js";import"./module-de7ee724.js";import"./PrefabAsset-59743dbb.js";import"./PhysicsMaterialAsset-a2f73b5c.js";import"./RenderTargetAsset-b3cd1c49.js";import"./AudioAsset-c28f33ab.js";import"./index-da16047f.js";import"./MarkdownAsset-b2a3fad5.js";import"./TextBaseComponent-9310e0c6.js";import"./index-dd0763bf.js";import"./Menu-c8e6194b.js";import"./TransformBaseComponent-1473deaa.js";import"./Callout-e2a89f6f.js";/**
1
+ var Cn=Object.defineProperty;var En=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var x=(e,t,n)=>(En(e,typeof t!="symbol"?t+"":t,n),n);import{CameraComponent as Di}from"./CameraComponent-039457d1.js";import{DirectLightComponent as Pi}from"./DirectLight-7b1f4b9f.js";import{PointLightComponent as Ai}from"./PointLight-d9ace100.js";import{SpotLightComponent as Ii}from"./SpotLight-680a6e17.js";import{MeshRendererComponent as Li}from"./MeshRendererComponent-84208d23.js";import{SkinnedMeshRendererComponent as Bi}from"./SkinnedMeshRendererComponent-96740600.js";import{A as Ni,a as zi}from"./AnimatorStore-484b10cf.js";import{SpriteRendererComponent as Fi}from"./SpriteRendererComponent-5c89f7dd.js";import{SpriteMaskComponent as Ui}from"./SpriteMaskComponent-58c35ea2.js";import{C as Hi,D as Wi,F as Yi,H as Ki,P as Vi,a as Ji,S as qi}from"./PhysicsStore-fcb01282.js";import{ScriptComponent as Zi}from"./index-9e3daa94.js";import{TextRendererComponent as es}from"./TextRendererComponent-78458825.js";import{LottieAnimationComponent as ns}from"./LottieAnimationComponent-da226765.js";import{SpineAnimationComponent as os}from"./SpineAnimationComponent-3d4eec48.js";import{ParticleRendererComponent as ss}from"./ParticleRendererComponent-f3ac8d1b.js";import{TrailRendererComponent as ls}from"./TrailRendererComponent-838e0118.js";import{aN as l,bA as X,ez as pe,aH as ut,aI as $e,aJ as Dn,aK as Rn,aL as E,aM as qe,eA as Pn,bl as Mn,dt as An,br as _n,ai as In,B as jt,y as On,eB as Ge,L as Ln,bH as De,e4 as Ft,u as Tn,bt as Bn,x as le,c5 as kn,aC as ve,bu as Nn}from"./index-d497fb6d.js";import{u as zn}from"./index-8a22fe59.js";import"./postmen-0413c689.js";import{c as _e}from"./createReactComponent-3e49f864.js";import{T as Ze}from"./Tooltip-0268ffac.js";import{I as us}from"./index-4084db44.js";import{P as fs}from"./PostProcessComponent-2b5255d9.js";import{AudioComponent as ps}from"./AudioComponent-9bf5944c.js";import{TransformComponent as vs}from"./TransformComponent-d28b4035.js";import{ButtonComponent as bs,ImageComponent as ys,TextComponent as xs,UICanvasComponent as ws,UIGroupComponent as Ss,UITransformComponent as Cs}from"./index-1d0ae2e4.js";import"./Component-c3c0c167.js";import"./LightBaseComponent-948d3192.js";import"./createOnModelChange-38471bb6.js";import"./ReferencedMaterial-890492a2.js";import"./MaterialInspector-45e208c7.js";import"./IconPointFilled-192e99c9.js";import"./MeshRendererBaseComponent-0bc9f5b3.js";import"./SpriteBaseComponent-96a500d7.js";import"./FormItemArray-9d4196d8.js";import"./Accordion-6f002a96.js";import"./create-script-property-context-model-0fe0258f.js";import"./TextureAsset-bf69040b.js";import"./ktx2-encoder-772f6c33.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./AssetViewer-9f395efb.js";import"./GlTFAsset-917bf1ee.js";import"./glTFIO-45ff9a17.js";import"./MaterialAsset-aa93db51.js";import"./shader-data-utils-e38a959d.js";import"./MeshAsset-585f4b18.js";import"./index-68806c86.js";import"./MeshThumbnail-9bbe01dc.js";import"./AnimatorControllerAsset-9192e596.js";import"./bundlers-9b0d37fc.js";import"./AnimationClipAsset-0a1f63eb.js";import"./module-136992e3.js";import"./module-1470d524.js";import"./ShaderChunkAsset-a3ff3959.js";import"./IconPlus-2bfc60da.js";import"./AmbientLightAsset-57a59fc2.js";import"./SpineSkeletonDataAsset-a8598103.js";import"./FontAsset-10273d05.js";import"./SceneAsset-7a9dbdd8.js";import"./ShaderAsset-2f2c1e95.js";import"./ShaderUIScriptAsset-d3a2d680.js";import"./PrimitiveMesh-fde624a6.js";import"./XRReferenceImageAsset-16071f5c.js";import"./module-77c2ea8c.js";import"./PrefabAsset-8c923465.js";import"./PhysicsMaterialAsset-2dd013f8.js";import"./RenderTargetAsset-bf38a725.js";import"./AudioAsset-0ea4ba7b.js";import"./index-2f54d4c9.js";import"./MarkdownAsset-602f93bf.js";import"./TextBaseComponent-248ea222.js";import"./index-1fa3ba70.js";import"./Menu-beacc39d.js";import"./TransformBaseComponent-c92aa259.js";import"./Callout-45631a14.js";/**
2
2
  * @license @tabler/icons-react v3.24.0 - MIT
3
3
  *
4
4
  * This source code is licensed under the MIT license.
@@ -23,8 +23,8 @@ var Cn=Object.defineProperty;var En=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,config
23
23
  *
24
24
  * This source code is licensed under the MIT license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */var Xn=_e("filled","player-stop-filled","IconPlayerStopFilled",[["path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",key:"svg-0"}]]);const Ye=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function dt(e){return"nodeType"in e}function N(e){var t,n;return e?me(e)?e:dt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function ft(e){const{Document:t}=N(e);return e instanceof t}function Ie(e){return me(e)?!1:e instanceof N(e).HTMLElement}function Gt(e){return e instanceof N(e).SVGElement}function be(e){return e?me(e)?e.document:dt(e)?ft(e)?e:Ie(e)||Gt(e)?e.ownerDocument:document:document:document}const oe=Ye?l.useLayoutEffect:l.useEffect;function ht(e){const t=l.useRef(e);return oe(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Wn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function pt(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return oe(()=>{n.current!==e&&(n.current=e)},t),n}function Oe(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ot(e){const t=ht(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function it(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Qe={};function gt(e,t){return l.useMemo(()=>{if(t)return t;const n=Qe[e]==null?0:Qe[e]+1;return Qe[e]=n,e+"-"+n},[e,t])}function Zt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=i[c];d!=null&&(i[c]=d+e*u)}return i},{...t})}}const ge=Zt(1),Ue=Zt(-1);function Yn(e){return"clientX"in e&&"clientY"in e}function Qt(e){if(!e)return!1;const{KeyboardEvent:t}=N(e.target);return t&&e instanceof t}function Hn(e){if(!e)return!1;const{TouchEvent:t}=N(e.target);return t&&e instanceof t}function st(e){if(Hn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Yn(e)?{x:e.clientX,y:e.clientY}:null}const $t="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Kn(e){return e.matches($t)?e:e.querySelector($t)}const Vn={display:"none"};function Jn(e){let{id:t,value:n}=e;return X.createElement("div",{id:t,style:Vn},n)}function qn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return X.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Gn(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const en=l.createContext(null);function Zn(e){const t=l.useContext(en);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Qn(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const er={draggable:`
26
+ */var Xn=_e("filled","player-stop-filled","IconPlayerStopFilled",[["path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",key:"svg-0"}]]);const We=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function dt(e){return"nodeType"in e}function N(e){var t,n;return e?me(e)?e:dt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function ft(e){const{Document:t}=N(e);return e instanceof t}function Ie(e){return me(e)?!1:e instanceof N(e).HTMLElement}function Gt(e){return e instanceof N(e).SVGElement}function be(e){return e?me(e)?e.document:dt(e)?ft(e)?e:Ie(e)||Gt(e)?e.ownerDocument:document:document:document}const oe=We?l.useLayoutEffect:l.useEffect;function ht(e){const t=l.useRef(e);return oe(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Hn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function pt(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return oe(()=>{n.current!==e&&(n.current=e)},t),n}function Oe(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ot(e){const t=ht(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function it(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Qe={};function gt(e,t){return l.useMemo(()=>{if(t)return t;const n=Qe[e]==null?0:Qe[e]+1;return Qe[e]=n,e+"-"+n},[e,t])}function Zt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=i[c];d!=null&&(i[c]=d+e*u)}return i},{...t})}}const ge=Zt(1),Ue=Zt(-1);function Wn(e){return"clientX"in e&&"clientY"in e}function Qt(e){if(!e)return!1;const{KeyboardEvent:t}=N(e.target);return t&&e instanceof t}function Yn(e){if(!e)return!1;const{TouchEvent:t}=N(e.target);return t&&e instanceof t}function st(e){if(Yn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Wn(e)?{x:e.clientX,y:e.clientY}:null}const $t="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Kn(e){return e.matches($t)?e:e.querySelector($t)}const Vn={display:"none"};function Jn(e){let{id:t,value:n}=e;return X.createElement("div",{id:t,style:Vn},n)}function qn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return X.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Gn(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const en=l.createContext(null);function Zn(e){const t=l.useContext(en);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Qn(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const er={draggable:`
27
27
  To pick up a draggable item, press the space bar.
28
28
  While dragging, use the arrow keys to move the item.
29
29
  Press space again to drop the item in its new position, or press escape to cancel.
30
- `},tr={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function nr(e){let{announcements:t=tr,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=er}=e;const{announce:i,announcement:a}=Gn(),s=gt("DndLiveRegion"),[c,u]=l.useState(!1);if(l.useEffect(()=>{u(!0)},[]),Zn(l.useMemo(()=>({onDragStart(f){let{active:g}=f;i(t.onDragStart({active:g}))},onDragMove(f){let{active:g,over:h}=f;t.onDragMove&&i(t.onDragMove({active:g,over:h}))},onDragOver(f){let{active:g,over:h}=f;i(t.onDragOver({active:g,over:h}))},onDragEnd(f){let{active:g,over:h}=f;i(t.onDragEnd({active:g,over:h}))},onDragCancel(f){let{active:g,over:h}=f;i(t.onDragCancel({active:g,over:h}))}}),[i,t])),!c)return null;const d=X.createElement(X.Fragment,null,X.createElement(Jn,{id:r,value:o.draggable}),X.createElement(qn,{id:s,announcement:a}));return n?pe.createPortal(d,n):d}var I;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(I||(I={}));function Xe(){}const V=Object.freeze({x:0,y:0});function rr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function or(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function ir(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(c+u-d);return Number(f.toFixed(4))}return 0}const sr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:a}=i,s=n.get(a);if(s){const c=ir(s,t);c>0&&o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(rr)};function ar(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function tn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:V}function lr(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const cr=lr(1);function ur(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function dr(e,t,n){const r=ur(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,c=e.left-a-(1-o)*parseFloat(n),u=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c}}const fr={ignoreTransform:!1};function Le(e,t){t===void 0&&(t=fr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=N(e).getComputedStyle(e);u&&(n=dr(n,u,d))}const{top:r,left:o,width:i,height:a,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:c}}function Ut(e){return Le(e,{ignoreTransform:!0})}function hr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function pr(e,t){return t===void 0&&(t=N(e).getComputedStyle(e)),t.position==="fixed"}function gr(e,t){t===void 0&&(t=N(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function vt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(ft(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ie(o)||Gt(o)||n.includes(o))return n;const i=N(e).getComputedStyle(o);return o!==e&&gr(o,i)&&n.push(o),pr(o,i)?n:r(o.parentNode)}return e?r(e):n}function nn(e){const[t]=vt(e,1);return t??null}function et(e){return!Ye||!e?null:me(e)?e:dt(e)?ft(e)||e===be(e).scrollingElement?window:Ie(e)?e:null:null}function rn(e){return me(e)?e.scrollX:e.scrollLeft}function on(e){return me(e)?e.scrollY:e.scrollTop}function at(e){return{x:rn(e),y:on(e)}}var M;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(M||(M={}));function sn(e){return!Ye||!e?!1:e===document.scrollingElement}function an(e){const t={x:0,y:0},n=sn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const vr={x:.2,y:.2};function mr(e,t,n,r,o){let{top:i,left:a,right:s,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=vr);const{isTop:u,isBottom:d,isLeft:f,isRight:g}=an(e),h={x:0,y:0},S={x:0,y:0},p={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+p.height?(h.y=M.Backward,S.y=r*Math.abs((t.top+p.height-i)/p.height)):!d&&c>=t.bottom-p.height&&(h.y=M.Forward,S.y=r*Math.abs((t.bottom-p.height-c)/p.height)),!g&&s>=t.right-p.width?(h.x=M.Forward,S.x=r*Math.abs((t.right-p.width-s)/p.width)):!f&&a<=t.left+p.width&&(h.x=M.Backward,S.x=r*Math.abs((t.left+p.width-a)/p.width)),{direction:h,speed:S}}function br(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ln(e){return e.reduce((t,n)=>ge(t,at(n)),V)}function yr(e){return e.reduce((t,n)=>t+rn(n),0)}function xr(e){return e.reduce((t,n)=>t+on(n),0)}function wr(e,t){if(t===void 0&&(t=Le),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);nn(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Sr=[["x",["left","right"],yr],["y",["top","bottom"],xr]];class mt{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=vt(n),o=ln(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,s]of Sr)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(r),d=o[i]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Re{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Cr(e){const{EventTarget:t}=N(e);return e instanceof t?e:be(e)}function tt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var U;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(U||(U={}));function Xt(e){e.preventDefault()}function Er(e){e.stopPropagation()}var b;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(b||(b={}));const cn={start:[b.Space,b.Enter],cancel:[b.Esc],end:[b.Space,b.Enter]},Dr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case b.Right:return{...n,x:n.x+25};case b.Left:return{...n,x:n.x-25};case b.Down:return{...n,y:n.y+25};case b.Up:return{...n,y:n.y-25}}};class un{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Re(be(n)),this.windowListeners=new Re(N(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(U.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&wr(r),n(V)}handleKeyDown(t){if(Qt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=cn,coordinateGetter:a=Dr,scrollBehavior:s="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:V;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const g=Ue(f,d),h={x:0,y:0},{scrollableAncestors:S}=r.current;for(const p of S){const v=t.code,{isTop:w,isRight:C,isLeft:D,isBottom:B,maxScroll:A,minScroll:R}=an(p),m=br(p),y={x:Math.min(v===b.Right?m.right-m.width/2:m.right,Math.max(v===b.Right?m.left:m.left+m.width/2,f.x)),y:Math.min(v===b.Down?m.bottom-m.height/2:m.bottom,Math.max(v===b.Down?m.top:m.top+m.height/2,f.y))},L=v===b.Right&&!C||v===b.Left&&!D,T=v===b.Down&&!B||v===b.Up&&!w;if(L&&y.x!==f.x){const P=p.scrollLeft+g.x,q=v===b.Right&&P<=A.x||v===b.Left&&P>=R.x;if(q&&!g.y){p.scrollTo({left:P,behavior:s});return}q?h.x=p.scrollLeft-P:h.x=v===b.Right?p.scrollLeft-A.x:p.scrollLeft-R.x,h.x&&p.scrollBy({left:-h.x,behavior:s});break}else if(T&&y.y!==f.y){const P=p.scrollTop+g.y,q=v===b.Down&&P<=A.y||v===b.Up&&P>=R.y;if(q&&!g.x){p.scrollTo({top:P,behavior:s});return}q?h.y=p.scrollTop-P:h.y=v===b.Down?p.scrollTop-A.y:p.scrollTop-R.y,h.y&&p.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,ge(Ue(f,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}un.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=cn,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=i.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Wt(e){return!!(e&&"distance"in e)}function Yt(e){return!!(e&&"delay"in e)}class bt{constructor(t,n,r){var o;r===void 0&&(r=Cr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:a}=i;this.props=t,this.events=n,this.document=be(a),this.documentListeners=new Re(this.document),this.listeners=new Re(r),this.windowListeners=new Re(N(a)),this.initialCoordinates=(o=st(i))!=null?o:V,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.DragStart,Xt),this.windowListeners.add(U.VisibilityChange,this.handleCancel),this.windowListeners.add(U.ContextMenu,Xt),this.documentListeners.add(U.Keydown,this.handleKeydown),n){if(Wt(n))return;if(Yt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(U.Click,Er,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(U.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!o)return;const c=(n=st(t))!=null?n:V,u=Ue(o,c);if(!r&&s){if(Yt(s))return tt(u,s.tolerance)?this.handleCancel():void 0;if(Wt(s))return s.tolerance!=null&&tt(u,s.tolerance)?this.handleCancel():tt(u,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===b.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Rr={move:{name:"pointermove"},end:{name:"pointerup"}};class dn extends bt{constructor(t){const{event:n}=t,r=be(n.target);super(t,Rr,r)}}dn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const Pr={move:{name:"mousemove"},end:{name:"mouseup"}};var lt;(function(e){e[e.RightClick=2]="RightClick"})(lt||(lt={}));class Mr extends bt{constructor(t){super(t,Pr,be(t.event.target))}}Mr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===lt.RightClick?!1:(r==null||r({event:n}),!0)}}];const nt={move:{name:"touchmove"},end:{name:"touchend"}};class Ar extends bt{constructor(t){super(t,nt)}static setup(){return window.addEventListener(nt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(nt.move.name,t)};function t(){}}}Ar.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Pe;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Pe||(Pe={}));var We;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(We||(We={}));function _r(e){let{acceleration:t,activator:n=Pe.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=We.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:g}=e;const h=Or({delta:f,disabled:!i}),[S,p]=Wn(),v=l.useRef({x:0,y:0}),w=l.useRef({x:0,y:0}),C=l.useMemo(()=>{switch(n){case Pe.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Pe.DraggableRect:return o}},[n,o,c]),D=l.useRef(null),B=l.useCallback(()=>{const R=D.current;if(!R)return;const m=v.current.x*w.current.x,y=v.current.y*w.current.y;R.scrollBy(m,y)},[]),A=l.useMemo(()=>s===We.TreeOrder?[...u].reverse():u,[s,u]);l.useEffect(()=>{if(!i||!u.length||!C){p();return}for(const R of A){if((r==null?void 0:r(R))===!1)continue;const m=u.indexOf(R),y=d[m];if(!y)continue;const{direction:L,speed:T}=mr(R,y,C,t,g);for(const P of["x","y"])h[P][L[P]]||(T[P]=0,L[P]=0);if(T.x>0||T.y>0){p(),D.current=R,S(B,a),v.current=T,w.current=L;return}}v.current={x:0,y:0},w.current={x:0,y:0},p()},[t,B,r,p,i,a,JSON.stringify(C),JSON.stringify(h),S,u,A,d,JSON.stringify(g)])}const Ir={x:{[M.Backward]:!1,[M.Forward]:!1},y:{[M.Backward]:!1,[M.Forward]:!1}};function Or(e){let{delta:t,disabled:n}=e;const r=it(t);return Oe(o=>{if(n||!r||!o)return Ir;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[M.Backward]:o.x[M.Backward]||i.x===-1,[M.Forward]:o.x[M.Forward]||i.x===1},y:{[M.Backward]:o.y[M.Backward]||i.y===-1,[M.Forward]:o.y[M.Forward]||i.y===1}}},[n,t,r])}function Lr(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Oe(o=>{var i;return t===null?null:(i=r??o)!=null?i:null},[r,t])}function Tr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...i]},[]),[e,t])}var Ae;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ae||(Ae={}));var ct;(function(e){e.Optimized="optimized"})(ct||(ct={}));const Ht=new Map;function kr(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=l.useState(null),{frequency:s,measure:c,strategy:u}=o,d=l.useRef(e),f=v(),g=pt(f),h=l.useCallback(function(w){w===void 0&&(w=[]),!g.current&&a(C=>C===null?w:C.concat(w.filter(D=>!C.includes(D))))},[g]),S=l.useRef(null),p=Oe(w=>{if(f&&!n)return Ht;if(!w||w===Ht||d.current!==e||i!=null){const C=new Map;for(let D of e){if(!D)continue;if(i&&i.length>0&&!i.includes(D.id)&&D.rect.current){C.set(D.id,D.rect.current);continue}const B=D.node.current,A=B?new mt(c(B),B):null;D.rect.current=A,A&&C.set(D.id,A)}return C}return w},[e,i,n,f,c]);return l.useEffect(()=>{d.current=e},[e]),l.useEffect(()=>{f||h()},[n,f]),l.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),l.useEffect(()=>{f||typeof s!="number"||S.current!==null||(S.current=setTimeout(()=>{h(),S.current=null},s))},[s,f,h,...r]),{droppableRects:p,measureDroppableContainers:h,measuringScheduled:i!=null};function v(){switch(u){case Ae.Always:return!1;case Ae.BeforeDragging:return n;default:return!n}}}function fn(e,t){return Oe(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Br(e,t){return fn(e,t)}function Nr(e){let{callback:t,disabled:n}=e;const r=ht(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return l.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function yt(e){let{callback:t,disabled:n}=e;const r=ht(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return l.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function zr(e){return new mt(Le(e),e)}function Kt(e,t,n){t===void 0&&(t=zr);const[r,o]=l.useReducer(s,null),i=Nr({callback(c){if(e)for(const u of c){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=yt({callback:o});return oe(()=>{o(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r;function s(c){if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d}}function jr(e){const t=fn(e);return tn(e,t)}const Vt=[];function Fr(e){const t=l.useRef(e),n=Oe(r=>e?r&&r!==Vt&&e&&t.current&&e.parentNode===t.current.parentNode?r:vt(e):Vt,[e]);return l.useEffect(()=>{t.current=e},[e]),n}function $r(e){const[t,n]=l.useState(null),r=l.useRef(e),o=l.useCallback(i=>{const a=et(i.target);a&&n(s=>s?(s.set(a,at(a)),new Map(s)):null)},[]);return l.useEffect(()=>{const i=r.current;if(e!==i){a(i);const s=e.map(c=>{const u=et(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,at(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(i)};function a(s){s.forEach(c=>{const u=et(c);u==null||u.removeEventListener("scroll",o)})}},[o,e]),l.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>ge(i,a),V):ln(e):V,[e,t])}function Jt(e,t){t===void 0&&(t=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},t),l.useEffect(()=>{const r=e!==V;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ue(e,n.current):V}function Ur(e){l.useEffect(()=>{if(!Ye)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Xr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=a=>{i(a,t)},n},{}),[e,t])}function hn(e){return l.useMemo(()=>e?hr(e):null,[e])}const rt=[];function Wr(e,t){t===void 0&&(t=Le);const[n]=e,r=hn(n?N(n):null),[o,i]=l.useReducer(s,rt),a=yt({callback:i});return e.length>0&&o===rt&&i(),oe(()=>{e.length?e.forEach(c=>a==null?void 0:a.observe(c)):(a==null||a.disconnect(),i())},[e]),o;function s(){return e.length?e.map(c=>sn(c)?r:new mt(t(c),c)):rt}}function Yr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ie(t)?t:e}function Hr(e){let{measure:t}=e;const[n,r]=l.useState(null),o=l.useCallback(u=>{for(const{target:d}of u)if(Ie(d)){r(f=>{const g=t(d);return f?{...f,width:g.width,height:g.height}:g});break}},[t]),i=yt({callback:o}),a=l.useCallback(u=>{const d=Yr(u);i==null||i.disconnect(),d&&(i==null||i.observe(d)),r(d?t(d):null)},[t,i]),[s,c]=ot(a);return l.useMemo(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const Kr=[{sensor:dn,options:{}},{sensor:un,options:{}}],Vr={current:{}},Fe={draggable:{measure:Ut},droppable:{measure:Ut,strategy:Ae.WhileDragging,frequency:ct.Optimized},dragOverlay:{measure:Le}};class Me extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Jr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Me,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Xe},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Fe,measureDroppableContainers:Xe,windowRect:null,measuringScheduled:!1},qr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Xe,draggableNodes:new Map,over:null,measureDroppableContainers:Xe},xt=l.createContext(qr),Gr=l.createContext(Jr);function Zr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Me}}}function Qr(e,t){switch(t.type){case I.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case I.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case I.DragEnd:case I.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case I.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Me(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case I.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Me(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case I.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Me(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function eo(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=l.useContext(xt),i=it(r),a=it(n==null?void 0:n.id);return l.useEffect(()=>{if(!t&&!r&&i&&a!=null){if(!Qt(i)||document.activeElement===i.target)return;const s=o.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const f=Kn(d);if(f){f.focus();break}}})}},[r,t,o,a,i]),null}function to(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function no(e){return l.useMemo(()=>({draggable:{...Fe.draggable,...e==null?void 0:e.draggable},droppable:{...Fe.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Fe.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function ro(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l.useRef(!1),{x:a,y:s}=typeof o=="boolean"?{x:o,y:o}:o;oe(()=>{if(!a&&!s||!t){i.current=!1;return}if(i.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=tn(d,r);if(a||(f.x=0),s||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const g=nn(u);g&&g.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const pn=l.createContext({...V,scaleX:1,scaleY:1});var re;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(re||(re={}));const oo=l.memo(function(t){var n,r,o,i;let{id:a,accessibility:s,autoScroll:c=!0,children:u,sensors:d=Kr,collisionDetection:f=sr,measuring:g,modifiers:h,...S}=t;const p=l.useReducer(Qr,void 0,Zr),[v,w]=p,[C,D]=Qn(),[B,A]=l.useState(re.Uninitialized),R=B===re.Initialized,{draggable:{active:m,nodes:y,translate:L},droppable:{containers:T}}=v,P=m?y.get(m):null,q=l.useRef({initial:null,translated:null}),G=l.useMemo(()=>{var _;return m!=null?{id:m,data:(_=P==null?void 0:P.data)!=null?_:Vr,rect:q}:null},[m,P]),Q=l.useRef(null),[wt,St]=l.useState(null),[Z,Ct]=l.useState(null),ye=pt(S,Object.values(S)),He=gt("DndDescribedBy",a),Et=l.useMemo(()=>T.getEnabled(),[T]),ie=no(g),{droppableRects:ce,measureDroppableContainers:Te,measuringScheduled:Dt}=kr(Et,{dragging:R,dependencies:[L.x,L.y],config:ie.droppable}),W=Lr(y,m),Rt=l.useMemo(()=>Z?st(Z):null,[Z]),Pt=Sn(),Mt=Br(W,ie.draggable.measure);ro({activeNode:m?y.get(m):null,config:Pt.layoutShiftCompensation,initialRect:Mt,measure:ie.draggable.measure});const Y=Kt(W,ie.draggable.measure,Mt),Ke=Kt(W?W.parentElement:null),se=l.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:ce,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),At=T.getNodeFor((n=se.current.over)==null?void 0:n.id),ae=Hr({measure:ie.dragOverlay.measure}),ke=(r=ae.nodeRef.current)!=null?r:W,ue=R?(o=ae.rect)!=null?o:Y:null,_t=!!(ae.nodeRef.current&&ae.rect),It=jr(_t?null:Y),Ve=hn(ke?N(ke):null),ee=Fr(R?At??W:null),Be=Wr(ee),Ne=to(h,{transform:{x:L.x-It.x,y:L.y-It.y,scaleX:1,scaleY:1},activatorEvent:Z,active:G,activeNodeRect:Y,containerNodeRect:Ke,draggingNodeRect:ue,over:se.current.over,overlayNodeRect:ae.rect,scrollableAncestors:ee,scrollableAncestorRects:Be,windowRect:Ve}),Ot=Rt?ge(Rt,L):null,Lt=$r(ee),gn=Jt(Lt),vn=Jt(Lt,[Y]),de=ge(Ne,gn),fe=ue?cr(ue,Ne):null,xe=G&&fe?f({active:G,collisionRect:fe,droppableRects:ce,droppableContainers:Et,pointerCoordinates:Ot}):null,Tt=or(xe,"id"),[te,kt]=l.useState(null),mn=_t?Ne:ge(Ne,vn),bn=ar(mn,(i=te==null?void 0:te.rect)!=null?i:null,Y),Bt=l.useCallback((_,z)=>{let{sensor:j,options:ne}=z;if(Q.current==null)return;const $=y.get(Q.current);if(!$)return;const H=_.nativeEvent,J=new j({active:Q.current,activeNode:$,event:H,options:ne,context:se,onStart(K){const we=Q.current;if(we==null)return;const Se=y.get(we);if(!Se)return;const{onDragStart:ze}=ye.current,je={active:{id:we,data:Se.data,rect:q}};pe.unstable_batchedUpdates(()=>{ze==null||ze(je),A(re.Initializing),w({type:I.DragStart,initialCoordinates:K,active:we}),C({type:"onDragStart",event:je})})},onMove(K){w({type:I.DragMove,coordinates:K})},onEnd:he(I.DragEnd),onCancel:he(I.DragCancel)});pe.unstable_batchedUpdates(()=>{St(J),Ct(_.nativeEvent)});function he(K){return async function(){const{active:Se,collisions:ze,over:je,scrollAdjustedTranslate:zt}=se.current;let Ce=null;if(Se&&zt){const{cancelDrop:Ee}=ye.current;Ce={activatorEvent:H,active:Se,collisions:ze,delta:zt,over:je},K===I.DragEnd&&typeof Ee=="function"&&await Promise.resolve(Ee(Ce))&&(K=I.DragCancel)}Q.current=null,pe.unstable_batchedUpdates(()=>{w({type:K}),A(re.Uninitialized),kt(null),St(null),Ct(null);const Ee=K===I.DragEnd?"onDragEnd":"onDragCancel";if(Ce){const Je=ye.current[Ee];Je==null||Je(Ce),C({type:Ee,event:Ce})}})}}},[y]),yn=l.useCallback((_,z)=>(j,ne)=>{const $=j.nativeEvent,H=y.get(ne);if(Q.current!==null||!H||$.dndKit||$.defaultPrevented)return;const J={active:H};_(j,z.options,J)===!0&&($.dndKit={capturedBy:z.sensor},Q.current=ne,Bt(j,z))},[y,Bt]),Nt=Tr(d,yn);Ur(d),oe(()=>{Y&&B===re.Initializing&&A(re.Initialized)},[Y,B]),l.useEffect(()=>{const{onDragMove:_}=ye.current,{active:z,activatorEvent:j,collisions:ne,over:$}=se.current;if(!z||!j)return;const H={active:z,activatorEvent:j,collisions:ne,delta:{x:de.x,y:de.y},over:$};pe.unstable_batchedUpdates(()=>{_==null||_(H),C({type:"onDragMove",event:H})})},[de.x,de.y]),l.useEffect(()=>{const{active:_,activatorEvent:z,collisions:j,droppableContainers:ne,scrollAdjustedTranslate:$}=se.current;if(!_||Q.current==null||!z||!$)return;const{onDragOver:H}=ye.current,J=ne.get(Tt),he=J&&J.rect.current?{id:J.id,rect:J.rect.current,data:J.data,disabled:J.disabled}:null,K={active:_,activatorEvent:z,collisions:j,delta:{x:$.x,y:$.y},over:he};pe.unstable_batchedUpdates(()=>{kt(he),H==null||H(K),C({type:"onDragOver",event:K})})},[Tt]),oe(()=>{se.current={activatorEvent:Z,active:G,activeNode:W,collisionRect:fe,collisions:xe,droppableRects:ce,draggableNodes:y,draggingNode:ke,draggingNodeRect:ue,droppableContainers:T,over:te,scrollableAncestors:ee,scrollAdjustedTranslate:de},q.current={initial:ue,translated:fe}},[G,W,xe,fe,y,ke,ue,ce,T,te,ee,de]),_r({...Pt,delta:L,draggingRect:fe,pointerCoordinates:Ot,scrollableAncestors:ee,scrollableAncestorRects:Be});const xn=l.useMemo(()=>({active:G,activeNode:W,activeNodeRect:Y,activatorEvent:Z,collisions:xe,containerNodeRect:Ke,dragOverlay:ae,draggableNodes:y,droppableContainers:T,droppableRects:ce,over:te,measureDroppableContainers:Te,scrollableAncestors:ee,scrollableAncestorRects:Be,measuringConfiguration:ie,measuringScheduled:Dt,windowRect:Ve}),[G,W,Y,Z,xe,Ke,ae,y,T,ce,te,Te,ee,Be,ie,Dt,Ve]),wn=l.useMemo(()=>({activatorEvent:Z,activators:Nt,active:G,activeNodeRect:Y,ariaDescribedById:{draggable:He},dispatch:w,draggableNodes:y,over:te,measureDroppableContainers:Te}),[Z,Nt,G,Y,w,He,y,te,Te]);return X.createElement(en.Provider,{value:D},X.createElement(xt.Provider,{value:wn},X.createElement(Gr.Provider,{value:xn},X.createElement(pn.Provider,{value:bn},u)),X.createElement(eo,{disabled:(s==null?void 0:s.restoreFocus)===!1})),X.createElement(nr,{...s,hiddenTextDescribedById:He}));function Sn(){const _=(wt==null?void 0:wt.autoScrollEnabled)===!1,z=typeof c=="object"?c.enabled===!1:c===!1,j=R&&!_&&!z;return typeof c=="object"?{...c,enabled:j}:{enabled:j}}}),io=l.createContext(null),qt="button",so="Droppable";function ao(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=gt(so),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:g}=l.useContext(xt),{role:h=qt,roleDescription:S="draggable",tabIndex:p=0}=o??{},v=(c==null?void 0:c.id)===t,w=l.useContext(v?pn:io),[C,D]=ot(),[B,A]=ot(),R=Xr(a,t),m=pt(n);oe(()=>(f.set(t,{id:t,key:i,node:C,activatorNode:B,data:m}),()=>{const L=f.get(t);L&&L.key===i&&f.delete(t)}),[f,t]);const y=l.useMemo(()=>({role:h,tabIndex:p,"aria-disabled":r,"aria-pressed":v&&h===qt?!0:void 0,"aria-roledescription":S,"aria-describedby":d.draggable}),[r,h,p,v,S,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:y,isDragging:v,listeners:r?void 0:R,node:C,over:g,setNodeRef:D,setActivatorNodeRef:A,transform:w}}function lo(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const co=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return!n||!t?r:lo(r,n,t)};var F=(e=>(e[e.Selected=0]="Selected",e[e.Everything=1]="Everything",e))(F||{});const uo=ut("div",{display:"flex",position:"absolute",flexDirection:"column",width:"260px",border:"1px solid $gray6",borderRadius:"$2",backgroundColor:"$panelBg",overflow:"hidden",userSelect:"none"}),fo=ut($e,{height:"$6",width:"100%",padding:"0 $1",backgroundColor:"$panelTitleBg",color:"$gray11",flexShrink:0,fontSize:"$sm"}),ho=ut($e,{padding:"$1"});function po(){const[{bottom:e,left:t},n]=l.useState({left:4,bottom:4}),r=l.useCallback(o=>{n(({bottom:i,left:a})=>{const{delta:s}=o;return{left:a+s.x,bottom:i+-s.y}})},[]);return E.jsx(oo,{modifiers:[co],onDragEnd:r,children:E.jsx(go,{left:t,bottom:e})})}const go=Dn(function(t){const{attributes:n,listeners:r,setNodeRef:o,transform:i}=ao({id:"ParticlePanel"}),{viewportStore:a}=zn(),s=a.particleStore,{t:c}=Rn(),u={bottom:`${t.bottom}px`,left:`${t.left}px`,transform:i?`translate3d(${i.x}px, ${i.y}px, 0)`:"none"};return s.isPanelOn?E.jsxs(uo,{ref:o,style:u,...n,children:[E.jsxs(fo,{align:"v",justifyContent:"between",children:[E.jsxs($e,{gap:"xxs",children:[E.jsx(jn,{size:"12px",...r}),c("effects.particle.title")]}),E.jsxs($e,{gap:"xxs",align:"v",children:[E.jsx(Ze,{content:c("effects.particle.restart"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.play(),children:E.jsx(Fn,{size:"12px"})})}),E.jsx(Ze,{content:s.isPlaying?c("effects.particle.pause"):c("effects.particle.play"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.togglePauseResume(),children:s.isPlaying?E.jsx($n,{size:"12px"}):E.jsx(Un,{size:"12px"})})}),E.jsx(Ze,{content:c("effects.particle.stop"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.stop(s.mode),disabled:s.isStopped,children:E.jsx(Xn,{size:"12px"})})})]})]}),E.jsxs(ho,{children:[E.jsx(Pn,{label:c("effects.particle.speed"),value:s.speed,min:0,max:5,step:.1,dragStep:.1,onChange:d=>s.onSpeedChange(d)}),E.jsx(Mn,{label:c("effects.particle.scope.label"),value:s.mode,onChange:d=>{s.switchPlayMode(d),s.onBoundingChange(s.mode===F.Selected),s.stop(F.Everything),s.play()},options:[{value:F.Selected,label:c("effects.particle.scope.selected")},{value:F.Everything,label:c("effects.particle.scope.everything")}]}),E.jsx(An,{label:c("effects.particle.bounding"),disabled:s.mode===F.Everything,value:s.isBoundingEnabled,onChange:d=>s.onBoundingChange(d)})]})]}):null});class vo extends _n{constructor(){super(...arguments);x(this,"isBoundingEnabled",!1);x(this,"onScriptReset");x(this,"_onScriptStop");x(this,"_onScriptPlay");x(this,"_onScriptPause");x(this,"_hasLastSelectedEntity");x(this,"_selectedParticles",[]);x(this,"_allParticles",[]);x(this,"_mode",F.Selected);x(this,"_speed",1);x(this,"_isSelected",!1);x(this,"_componentArray",[]);x(this,"_center",new In);x(this,"_tempBoundingBox",new jt)}set mode(n){this._mode=n}get mode(){return this._mode}set speed(n){this._getParticles(this.mode).forEach(r=>{r.generator.main.simulationSpeed=n}),this._speed=n}get speed(){return this._speed}init(n){this.onScriptReset=n.onScriptReset,this._onScriptPlay=n.onScriptPlay,this._onScriptPause=n.onScriptPause,this._onScriptStop=n.onScriptStop,this._hasLastSelectedEntity=n.hasLastSelectedEntity}onStart(){const n=this.entity.parent.parent.createChild("particle_bounds_drawer");n.addComponent(On),n.addComponent(Ge),n.layer=Ln.Outline}onSelectEntity(n){if(this.onScriptReset&&this.onScriptReset(),this._componentArray.length=0,this._isSelected=!1,n){for(const r of n){const o=[];r.getComponentsIncludeChildren(De,o),this._componentArray.push(...o)}this._isSelected=this._componentArray.length>0}this._updateArrayAndPlay()}onAddComponent(n){if(n instanceof De){if(this.mode===F.Selected&&this._hasLastSelectedEntity&&!this._hasLastSelectedEntity())return;this._componentArray.push(n),this._updateArrayAndPlay()}}onRemoveComponent(n){if(n instanceof De)if(this.mode===F.Selected&&this._hasLastSelectedEntity&&!this._hasLastSelectedEntity()){const r=this._allParticles.findIndex(o=>o.instanceId===n.instanceId);r>-1&&this._allParticles.splice(r,1)}else{const r=this._componentArray.findIndex(o=>o.instanceId===n.instanceId);r>-1&&this._componentArray.splice(r,1),this._updateArrayAndPlay()}}onPlay(n){this._updateAllParticles(),n?this.play(F.Everything):this.stop(F.Everything)}onUpdate(){if(this._isSelected&&this.isBoundingEnabled){this._tempBoundingBox.copyFrom(this._selectedParticles[0].bounds);for(let h=1,S=this._selectedParticles.length;h<S;h++)jt.merge(this._tempBoundingBox,this._selectedParticles[h].bounds,this._tempBoundingBox);const{min:n,max:r}=this._tempBoundingBox,{x:o,y:i,z:a}=n,{x:s,y:c,z:u}=r,d=s-o,f=c-i,g=u-a;this._center.set(s+o,c+i,u+a).scale(.5),Ge.flush(),Ge.drawCuboid(d,f,g,this._center)}}_getParticles(n){return n===F.Selected?this._selectedParticles:this._allParticles}play(n=this.mode){this._getParticles(n).forEach(r=>{r.generator.stop(!1,Ft.StopEmittingAndClear),r.generator.main.simulationSpeed=this._speed,r.generator.play()}),this._onScriptPlay&&this._onScriptPlay(n)}pause(n=!1){this._getParticles(this.mode).forEach(r=>{r.generator.main.simulationSpeed=0}),this._onScriptPause&&this._onScriptPause(n)}stop(n){this._getParticles(n).forEach(r=>{r.generator.stop(!1,Ft.StopEmittingAndClear)}),this._onScriptStop&&this._onScriptStop(n)}resume(){this._getParticles(this.mode).forEach(n=>{n.generator.main.simulationSpeed=this._speed,n.generator.play()})}_updateAllParticles(){this._allParticles.length=0;const n=new Set;this.engine.sceneManager.scenes[0].rootEntities.forEach(o=>{const i=[];o.getComponentsIncludeChildren(De,i);for(const a of i)n.has(a.instanceId)||(n.add(a.instanceId),this._allParticles.push(a))})}_updateSelectedParticles(){this._selectedParticles.length=0;const n=new Set;for(const r of this._componentArray){const o=[];r.entity.getComponentsIncludeChildren(De,o);for(const i of o)n.has(i.instanceId)||(n.add(i.instanceId),this._selectedParticles.push(i))}}_updateArrayAndPlay(){const n=this._componentArray.length;this.pause(n!==0),n>0&&(this._updateSelectedParticles(),this._updateAllParticles(),this.play())}}var mo=Object.defineProperty,bo=Object.getOwnPropertyDescriptor,k=(e,t,n,r)=>{for(var o=r>1?void 0:r?bo(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&mo(t,n,o),o};let O=class{constructor(e){x(this,"isPanelOn",!1);x(this,"speed",1);x(this,"isPlaying",!1);x(this,"isStopped",!1);x(this,"_mode",F.Everything);x(this,"isModeChanged",!1);x(this,"isBoundingEnabled",!1);x(this,"script");x(this,"root");Tn(this),this.root=e.projectStore}get mode(){return this._mode}init(){this.script=kn.addScript(vo),this.speed=this.script.speed,this.isBoundingEnabled=this.script.isBoundingEnabled,this.script.init({onScriptReset:()=>{this.isPanelOn=!1},onScriptPlay:()=>{this.isStopped=!1,this.isPlaying=!0},onScriptPause:e=>{this.isPanelOn=e},onScriptStop:e=>{this.isStopped=!0,this.isPlaying=!1},hasLastSelectedEntity:()=>{const e=this.root.currentScene.sceneUIStore.lastSelectedId;return e&&!!this.root.currentScene.entities.get(e)}}),this._mode=this.script.mode}play(e=this.mode){this.isStopped=!1,this.isPlaying=!0,this.script.play(e)}togglePauseResume(){this.isStopped=!1,this.isPlaying?(this.isPlaying=!1,this.script.pause()):(this.isPlaying=!0,this.script.resume())}stop(e){this.isStopped=!0,this.isPlaying=!1,this.script.stop(e)}onSpeedChange(e){this.speed=e,this.script.speed=e}onBoundingChange(e){this.isBoundingEnabled=e,this.script.isBoundingEnabled=e}switchPlayMode(e){this._mode=e,this.script.mode=e}};k([le],O.prototype,"isPanelOn",2);k([le],O.prototype,"speed",2);k([le],O.prototype,"isPlaying",2);k([le],O.prototype,"isStopped",2);k([le],O.prototype,"_mode",2);k([Bn],O.prototype,"mode",1);k([le],O.prototype,"isModeChanged",2);k([le],O.prototype,"isBoundingEnabled",2);k([ve],O.prototype,"play",1);k([ve],O.prototype,"togglePauseResume",1);k([ve],O.prototype,"stop",1);k([ve],O.prototype,"onSpeedChange",1);k([ve],O.prototype,"onBoundingChange",1);k([ve],O.prototype,"switchPlayMode",1);O=k([Nn({type:"particleStore",Panel:po})],O);export{Ni as AnimatorComponent,zi as AnimatorStore,ps as AudioComponent,bs as ButtonComponent,Di as CameraComponent,Wi as CharacterControllerComponent,Pi as DirectLightComponent,Yi as DynamicColliderComponent,Hi as FixedJointComponent,Ki as HingeJointComponent,ys as ImageComponent,us as ImportScriptComponent,ns as LottieAnimationComponent,Li as MeshRendererComponent,ss as ParticleRendererComponent,O as ParticleStore,Vi as PhysicsStore,Ai as PointLightComponent,fs as PostProcessComponent,Zi as ScriptComponent,ki as SkinnedMeshRendererComponent,os as SpineAnimationComponent,Ii as SpotLightComponent,Ji as SpringJointComponent,Ui as SpriteMaskComponent,Fi as SpriteRendererComponent,qi as StaticColliderComponent,xs as TextComponent,es as TextRendererComponent,ls as TrailRendererComponent,vs as TransformComponent,ws as UICanvasComponent,Ss as UIGroupComponent,Cs as UITransformComponent};
30
+ `},tr={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function nr(e){let{announcements:t=tr,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=er}=e;const{announce:i,announcement:a}=Gn(),s=gt("DndLiveRegion"),[c,u]=l.useState(!1);if(l.useEffect(()=>{u(!0)},[]),Zn(l.useMemo(()=>({onDragStart(f){let{active:g}=f;i(t.onDragStart({active:g}))},onDragMove(f){let{active:g,over:h}=f;t.onDragMove&&i(t.onDragMove({active:g,over:h}))},onDragOver(f){let{active:g,over:h}=f;i(t.onDragOver({active:g,over:h}))},onDragEnd(f){let{active:g,over:h}=f;i(t.onDragEnd({active:g,over:h}))},onDragCancel(f){let{active:g,over:h}=f;i(t.onDragCancel({active:g,over:h}))}}),[i,t])),!c)return null;const d=X.createElement(X.Fragment,null,X.createElement(Jn,{id:r,value:o.draggable}),X.createElement(qn,{id:s,announcement:a}));return n?pe.createPortal(d,n):d}var I;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(I||(I={}));function Xe(){}const V=Object.freeze({x:0,y:0});function rr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function or(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function ir(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(c+u-d);return Number(f.toFixed(4))}return 0}const sr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:a}=i,s=n.get(a);if(s){const c=ir(s,t);c>0&&o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(rr)};function ar(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function tn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:V}function lr(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const cr=lr(1);function ur(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function dr(e,t,n){const r=ur(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,c=e.left-a-(1-o)*parseFloat(n),u=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c}}const fr={ignoreTransform:!1};function Le(e,t){t===void 0&&(t=fr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=N(e).getComputedStyle(e);u&&(n=dr(n,u,d))}const{top:r,left:o,width:i,height:a,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:c}}function Ut(e){return Le(e,{ignoreTransform:!0})}function hr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function pr(e,t){return t===void 0&&(t=N(e).getComputedStyle(e)),t.position==="fixed"}function gr(e,t){t===void 0&&(t=N(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function vt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(ft(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ie(o)||Gt(o)||n.includes(o))return n;const i=N(e).getComputedStyle(o);return o!==e&&gr(o,i)&&n.push(o),pr(o,i)?n:r(o.parentNode)}return e?r(e):n}function nn(e){const[t]=vt(e,1);return t??null}function et(e){return!We||!e?null:me(e)?e:dt(e)?ft(e)||e===be(e).scrollingElement?window:Ie(e)?e:null:null}function rn(e){return me(e)?e.scrollX:e.scrollLeft}function on(e){return me(e)?e.scrollY:e.scrollTop}function at(e){return{x:rn(e),y:on(e)}}var M;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(M||(M={}));function sn(e){return!We||!e?!1:e===document.scrollingElement}function an(e){const t={x:0,y:0},n=sn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const vr={x:.2,y:.2};function mr(e,t,n,r,o){let{top:i,left:a,right:s,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=vr);const{isTop:u,isBottom:d,isLeft:f,isRight:g}=an(e),h={x:0,y:0},S={x:0,y:0},p={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+p.height?(h.y=M.Backward,S.y=r*Math.abs((t.top+p.height-i)/p.height)):!d&&c>=t.bottom-p.height&&(h.y=M.Forward,S.y=r*Math.abs((t.bottom-p.height-c)/p.height)),!g&&s>=t.right-p.width?(h.x=M.Forward,S.x=r*Math.abs((t.right-p.width-s)/p.width)):!f&&a<=t.left+p.width&&(h.x=M.Backward,S.x=r*Math.abs((t.left+p.width-a)/p.width)),{direction:h,speed:S}}function br(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ln(e){return e.reduce((t,n)=>ge(t,at(n)),V)}function yr(e){return e.reduce((t,n)=>t+rn(n),0)}function xr(e){return e.reduce((t,n)=>t+on(n),0)}function wr(e,t){if(t===void 0&&(t=Le),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);nn(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Sr=[["x",["left","right"],yr],["y",["top","bottom"],xr]];class mt{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=vt(n),o=ln(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,s]of Sr)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(r),d=o[i]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Re{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Cr(e){const{EventTarget:t}=N(e);return e instanceof t?e:be(e)}function tt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var U;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(U||(U={}));function Xt(e){e.preventDefault()}function Er(e){e.stopPropagation()}var b;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(b||(b={}));const cn={start:[b.Space,b.Enter],cancel:[b.Esc],end:[b.Space,b.Enter]},Dr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case b.Right:return{...n,x:n.x+25};case b.Left:return{...n,x:n.x-25};case b.Down:return{...n,y:n.y+25};case b.Up:return{...n,y:n.y-25}}};class un{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Re(be(n)),this.windowListeners=new Re(N(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(U.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&wr(r),n(V)}handleKeyDown(t){if(Qt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=cn,coordinateGetter:a=Dr,scrollBehavior:s="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:V;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const g=Ue(f,d),h={x:0,y:0},{scrollableAncestors:S}=r.current;for(const p of S){const v=t.code,{isTop:w,isRight:C,isLeft:D,isBottom:k,maxScroll:A,minScroll:R}=an(p),m=br(p),y={x:Math.min(v===b.Right?m.right-m.width/2:m.right,Math.max(v===b.Right?m.left:m.left+m.width/2,f.x)),y:Math.min(v===b.Down?m.bottom-m.height/2:m.bottom,Math.max(v===b.Down?m.top:m.top+m.height/2,f.y))},L=v===b.Right&&!C||v===b.Left&&!D,T=v===b.Down&&!k||v===b.Up&&!w;if(L&&y.x!==f.x){const P=p.scrollLeft+g.x,q=v===b.Right&&P<=A.x||v===b.Left&&P>=R.x;if(q&&!g.y){p.scrollTo({left:P,behavior:s});return}q?h.x=p.scrollLeft-P:h.x=v===b.Right?p.scrollLeft-A.x:p.scrollLeft-R.x,h.x&&p.scrollBy({left:-h.x,behavior:s});break}else if(T&&y.y!==f.y){const P=p.scrollTop+g.y,q=v===b.Down&&P<=A.y||v===b.Up&&P>=R.y;if(q&&!g.x){p.scrollTo({top:P,behavior:s});return}q?h.y=p.scrollTop-P:h.y=v===b.Down?p.scrollTop-A.y:p.scrollTop-R.y,h.y&&p.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,ge(Ue(f,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}un.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=cn,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=i.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Ht(e){return!!(e&&"distance"in e)}function Wt(e){return!!(e&&"delay"in e)}class bt{constructor(t,n,r){var o;r===void 0&&(r=Cr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:a}=i;this.props=t,this.events=n,this.document=be(a),this.documentListeners=new Re(this.document),this.listeners=new Re(r),this.windowListeners=new Re(N(a)),this.initialCoordinates=(o=st(i))!=null?o:V,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.DragStart,Xt),this.windowListeners.add(U.VisibilityChange,this.handleCancel),this.windowListeners.add(U.ContextMenu,Xt),this.documentListeners.add(U.Keydown,this.handleKeydown),n){if(Ht(n))return;if(Wt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(U.Click,Er,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(U.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!o)return;const c=(n=st(t))!=null?n:V,u=Ue(o,c);if(!r&&s){if(Wt(s))return tt(u,s.tolerance)?this.handleCancel():void 0;if(Ht(s))return s.tolerance!=null&&tt(u,s.tolerance)?this.handleCancel():tt(u,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===b.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Rr={move:{name:"pointermove"},end:{name:"pointerup"}};class dn extends bt{constructor(t){const{event:n}=t,r=be(n.target);super(t,Rr,r)}}dn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const Pr={move:{name:"mousemove"},end:{name:"mouseup"}};var lt;(function(e){e[e.RightClick=2]="RightClick"})(lt||(lt={}));class Mr extends bt{constructor(t){super(t,Pr,be(t.event.target))}}Mr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===lt.RightClick?!1:(r==null||r({event:n}),!0)}}];const nt={move:{name:"touchmove"},end:{name:"touchend"}};class Ar extends bt{constructor(t){super(t,nt)}static setup(){return window.addEventListener(nt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(nt.move.name,t)};function t(){}}}Ar.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Pe;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Pe||(Pe={}));var He;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(He||(He={}));function _r(e){let{acceleration:t,activator:n=Pe.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=He.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:g}=e;const h=Or({delta:f,disabled:!i}),[S,p]=Hn(),v=l.useRef({x:0,y:0}),w=l.useRef({x:0,y:0}),C=l.useMemo(()=>{switch(n){case Pe.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Pe.DraggableRect:return o}},[n,o,c]),D=l.useRef(null),k=l.useCallback(()=>{const R=D.current;if(!R)return;const m=v.current.x*w.current.x,y=v.current.y*w.current.y;R.scrollBy(m,y)},[]),A=l.useMemo(()=>s===He.TreeOrder?[...u].reverse():u,[s,u]);l.useEffect(()=>{if(!i||!u.length||!C){p();return}for(const R of A){if((r==null?void 0:r(R))===!1)continue;const m=u.indexOf(R),y=d[m];if(!y)continue;const{direction:L,speed:T}=mr(R,y,C,t,g);for(const P of["x","y"])h[P][L[P]]||(T[P]=0,L[P]=0);if(T.x>0||T.y>0){p(),D.current=R,S(k,a),v.current=T,w.current=L;return}}v.current={x:0,y:0},w.current={x:0,y:0},p()},[t,k,r,p,i,a,JSON.stringify(C),JSON.stringify(h),S,u,A,d,JSON.stringify(g)])}const Ir={x:{[M.Backward]:!1,[M.Forward]:!1},y:{[M.Backward]:!1,[M.Forward]:!1}};function Or(e){let{delta:t,disabled:n}=e;const r=it(t);return Oe(o=>{if(n||!r||!o)return Ir;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[M.Backward]:o.x[M.Backward]||i.x===-1,[M.Forward]:o.x[M.Forward]||i.x===1},y:{[M.Backward]:o.y[M.Backward]||i.y===-1,[M.Forward]:o.y[M.Forward]||i.y===1}}},[n,t,r])}function Lr(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Oe(o=>{var i;return t===null?null:(i=r??o)!=null?i:null},[r,t])}function Tr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...i]},[]),[e,t])}var Ae;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ae||(Ae={}));var ct;(function(e){e.Optimized="optimized"})(ct||(ct={}));const Yt=new Map;function Br(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=l.useState(null),{frequency:s,measure:c,strategy:u}=o,d=l.useRef(e),f=v(),g=pt(f),h=l.useCallback(function(w){w===void 0&&(w=[]),!g.current&&a(C=>C===null?w:C.concat(w.filter(D=>!C.includes(D))))},[g]),S=l.useRef(null),p=Oe(w=>{if(f&&!n)return Yt;if(!w||w===Yt||d.current!==e||i!=null){const C=new Map;for(let D of e){if(!D)continue;if(i&&i.length>0&&!i.includes(D.id)&&D.rect.current){C.set(D.id,D.rect.current);continue}const k=D.node.current,A=k?new mt(c(k),k):null;D.rect.current=A,A&&C.set(D.id,A)}return C}return w},[e,i,n,f,c]);return l.useEffect(()=>{d.current=e},[e]),l.useEffect(()=>{f||h()},[n,f]),l.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),l.useEffect(()=>{f||typeof s!="number"||S.current!==null||(S.current=setTimeout(()=>{h(),S.current=null},s))},[s,f,h,...r]),{droppableRects:p,measureDroppableContainers:h,measuringScheduled:i!=null};function v(){switch(u){case Ae.Always:return!1;case Ae.BeforeDragging:return n;default:return!n}}}function fn(e,t){return Oe(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function kr(e,t){return fn(e,t)}function Nr(e){let{callback:t,disabled:n}=e;const r=ht(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return l.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function yt(e){let{callback:t,disabled:n}=e;const r=ht(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return l.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function zr(e){return new mt(Le(e),e)}function Kt(e,t,n){t===void 0&&(t=zr);const[r,o]=l.useReducer(s,null),i=Nr({callback(c){if(e)for(const u of c){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=yt({callback:o});return oe(()=>{o(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r;function s(c){if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d}}function jr(e){const t=fn(e);return tn(e,t)}const Vt=[];function Fr(e){const t=l.useRef(e),n=Oe(r=>e?r&&r!==Vt&&e&&t.current&&e.parentNode===t.current.parentNode?r:vt(e):Vt,[e]);return l.useEffect(()=>{t.current=e},[e]),n}function $r(e){const[t,n]=l.useState(null),r=l.useRef(e),o=l.useCallback(i=>{const a=et(i.target);a&&n(s=>s?(s.set(a,at(a)),new Map(s)):null)},[]);return l.useEffect(()=>{const i=r.current;if(e!==i){a(i);const s=e.map(c=>{const u=et(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,at(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(i)};function a(s){s.forEach(c=>{const u=et(c);u==null||u.removeEventListener("scroll",o)})}},[o,e]),l.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>ge(i,a),V):ln(e):V,[e,t])}function Jt(e,t){t===void 0&&(t=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},t),l.useEffect(()=>{const r=e!==V;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ue(e,n.current):V}function Ur(e){l.useEffect(()=>{if(!We)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Xr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=a=>{i(a,t)},n},{}),[e,t])}function hn(e){return l.useMemo(()=>e?hr(e):null,[e])}const rt=[];function Hr(e,t){t===void 0&&(t=Le);const[n]=e,r=hn(n?N(n):null),[o,i]=l.useReducer(s,rt),a=yt({callback:i});return e.length>0&&o===rt&&i(),oe(()=>{e.length?e.forEach(c=>a==null?void 0:a.observe(c)):(a==null||a.disconnect(),i())},[e]),o;function s(){return e.length?e.map(c=>sn(c)?r:new mt(t(c),c)):rt}}function Wr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ie(t)?t:e}function Yr(e){let{measure:t}=e;const[n,r]=l.useState(null),o=l.useCallback(u=>{for(const{target:d}of u)if(Ie(d)){r(f=>{const g=t(d);return f?{...f,width:g.width,height:g.height}:g});break}},[t]),i=yt({callback:o}),a=l.useCallback(u=>{const d=Wr(u);i==null||i.disconnect(),d&&(i==null||i.observe(d)),r(d?t(d):null)},[t,i]),[s,c]=ot(a);return l.useMemo(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const Kr=[{sensor:dn,options:{}},{sensor:un,options:{}}],Vr={current:{}},Fe={draggable:{measure:Ut},droppable:{measure:Ut,strategy:Ae.WhileDragging,frequency:ct.Optimized},dragOverlay:{measure:Le}};class Me extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Jr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Me,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Xe},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Fe,measureDroppableContainers:Xe,windowRect:null,measuringScheduled:!1},qr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Xe,draggableNodes:new Map,over:null,measureDroppableContainers:Xe},xt=l.createContext(qr),Gr=l.createContext(Jr);function Zr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Me}}}function Qr(e,t){switch(t.type){case I.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case I.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case I.DragEnd:case I.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case I.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Me(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case I.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Me(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case I.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Me(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function eo(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=l.useContext(xt),i=it(r),a=it(n==null?void 0:n.id);return l.useEffect(()=>{if(!t&&!r&&i&&a!=null){if(!Qt(i)||document.activeElement===i.target)return;const s=o.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const f=Kn(d);if(f){f.focus();break}}})}},[r,t,o,a,i]),null}function to(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function no(e){return l.useMemo(()=>({draggable:{...Fe.draggable,...e==null?void 0:e.draggable},droppable:{...Fe.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Fe.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function ro(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l.useRef(!1),{x:a,y:s}=typeof o=="boolean"?{x:o,y:o}:o;oe(()=>{if(!a&&!s||!t){i.current=!1;return}if(i.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=tn(d,r);if(a||(f.x=0),s||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const g=nn(u);g&&g.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const pn=l.createContext({...V,scaleX:1,scaleY:1});var re;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(re||(re={}));const oo=l.memo(function(t){var n,r,o,i;let{id:a,accessibility:s,autoScroll:c=!0,children:u,sensors:d=Kr,collisionDetection:f=sr,measuring:g,modifiers:h,...S}=t;const p=l.useReducer(Qr,void 0,Zr),[v,w]=p,[C,D]=Qn(),[k,A]=l.useState(re.Uninitialized),R=k===re.Initialized,{draggable:{active:m,nodes:y,translate:L},droppable:{containers:T}}=v,P=m?y.get(m):null,q=l.useRef({initial:null,translated:null}),G=l.useMemo(()=>{var _;return m!=null?{id:m,data:(_=P==null?void 0:P.data)!=null?_:Vr,rect:q}:null},[m,P]),Q=l.useRef(null),[wt,St]=l.useState(null),[Z,Ct]=l.useState(null),ye=pt(S,Object.values(S)),Ye=gt("DndDescribedBy",a),Et=l.useMemo(()=>T.getEnabled(),[T]),ie=no(g),{droppableRects:ce,measureDroppableContainers:Te,measuringScheduled:Dt}=Br(Et,{dragging:R,dependencies:[L.x,L.y],config:ie.droppable}),H=Lr(y,m),Rt=l.useMemo(()=>Z?st(Z):null,[Z]),Pt=Sn(),Mt=kr(H,ie.draggable.measure);ro({activeNode:m?y.get(m):null,config:Pt.layoutShiftCompensation,initialRect:Mt,measure:ie.draggable.measure});const W=Kt(H,ie.draggable.measure,Mt),Ke=Kt(H?H.parentElement:null),se=l.useRef({activatorEvent:null,active:null,activeNode:H,collisionRect:null,collisions:null,droppableRects:ce,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),At=T.getNodeFor((n=se.current.over)==null?void 0:n.id),ae=Yr({measure:ie.dragOverlay.measure}),Be=(r=ae.nodeRef.current)!=null?r:H,ue=R?(o=ae.rect)!=null?o:W:null,_t=!!(ae.nodeRef.current&&ae.rect),It=jr(_t?null:W),Ve=hn(Be?N(Be):null),ee=Fr(R?At??H:null),ke=Hr(ee),Ne=to(h,{transform:{x:L.x-It.x,y:L.y-It.y,scaleX:1,scaleY:1},activatorEvent:Z,active:G,activeNodeRect:W,containerNodeRect:Ke,draggingNodeRect:ue,over:se.current.over,overlayNodeRect:ae.rect,scrollableAncestors:ee,scrollableAncestorRects:ke,windowRect:Ve}),Ot=Rt?ge(Rt,L):null,Lt=$r(ee),gn=Jt(Lt),vn=Jt(Lt,[W]),de=ge(Ne,gn),fe=ue?cr(ue,Ne):null,xe=G&&fe?f({active:G,collisionRect:fe,droppableRects:ce,droppableContainers:Et,pointerCoordinates:Ot}):null,Tt=or(xe,"id"),[te,Bt]=l.useState(null),mn=_t?Ne:ge(Ne,vn),bn=ar(mn,(i=te==null?void 0:te.rect)!=null?i:null,W),kt=l.useCallback((_,z)=>{let{sensor:j,options:ne}=z;if(Q.current==null)return;const $=y.get(Q.current);if(!$)return;const Y=_.nativeEvent,J=new j({active:Q.current,activeNode:$,event:Y,options:ne,context:se,onStart(K){const we=Q.current;if(we==null)return;const Se=y.get(we);if(!Se)return;const{onDragStart:ze}=ye.current,je={active:{id:we,data:Se.data,rect:q}};pe.unstable_batchedUpdates(()=>{ze==null||ze(je),A(re.Initializing),w({type:I.DragStart,initialCoordinates:K,active:we}),C({type:"onDragStart",event:je})})},onMove(K){w({type:I.DragMove,coordinates:K})},onEnd:he(I.DragEnd),onCancel:he(I.DragCancel)});pe.unstable_batchedUpdates(()=>{St(J),Ct(_.nativeEvent)});function he(K){return async function(){const{active:Se,collisions:ze,over:je,scrollAdjustedTranslate:zt}=se.current;let Ce=null;if(Se&&zt){const{cancelDrop:Ee}=ye.current;Ce={activatorEvent:Y,active:Se,collisions:ze,delta:zt,over:je},K===I.DragEnd&&typeof Ee=="function"&&await Promise.resolve(Ee(Ce))&&(K=I.DragCancel)}Q.current=null,pe.unstable_batchedUpdates(()=>{w({type:K}),A(re.Uninitialized),Bt(null),St(null),Ct(null);const Ee=K===I.DragEnd?"onDragEnd":"onDragCancel";if(Ce){const Je=ye.current[Ee];Je==null||Je(Ce),C({type:Ee,event:Ce})}})}}},[y]),yn=l.useCallback((_,z)=>(j,ne)=>{const $=j.nativeEvent,Y=y.get(ne);if(Q.current!==null||!Y||$.dndKit||$.defaultPrevented)return;const J={active:Y};_(j,z.options,J)===!0&&($.dndKit={capturedBy:z.sensor},Q.current=ne,kt(j,z))},[y,kt]),Nt=Tr(d,yn);Ur(d),oe(()=>{W&&k===re.Initializing&&A(re.Initialized)},[W,k]),l.useEffect(()=>{const{onDragMove:_}=ye.current,{active:z,activatorEvent:j,collisions:ne,over:$}=se.current;if(!z||!j)return;const Y={active:z,activatorEvent:j,collisions:ne,delta:{x:de.x,y:de.y},over:$};pe.unstable_batchedUpdates(()=>{_==null||_(Y),C({type:"onDragMove",event:Y})})},[de.x,de.y]),l.useEffect(()=>{const{active:_,activatorEvent:z,collisions:j,droppableContainers:ne,scrollAdjustedTranslate:$}=se.current;if(!_||Q.current==null||!z||!$)return;const{onDragOver:Y}=ye.current,J=ne.get(Tt),he=J&&J.rect.current?{id:J.id,rect:J.rect.current,data:J.data,disabled:J.disabled}:null,K={active:_,activatorEvent:z,collisions:j,delta:{x:$.x,y:$.y},over:he};pe.unstable_batchedUpdates(()=>{Bt(he),Y==null||Y(K),C({type:"onDragOver",event:K})})},[Tt]),oe(()=>{se.current={activatorEvent:Z,active:G,activeNode:H,collisionRect:fe,collisions:xe,droppableRects:ce,draggableNodes:y,draggingNode:Be,draggingNodeRect:ue,droppableContainers:T,over:te,scrollableAncestors:ee,scrollAdjustedTranslate:de},q.current={initial:ue,translated:fe}},[G,H,xe,fe,y,Be,ue,ce,T,te,ee,de]),_r({...Pt,delta:L,draggingRect:fe,pointerCoordinates:Ot,scrollableAncestors:ee,scrollableAncestorRects:ke});const xn=l.useMemo(()=>({active:G,activeNode:H,activeNodeRect:W,activatorEvent:Z,collisions:xe,containerNodeRect:Ke,dragOverlay:ae,draggableNodes:y,droppableContainers:T,droppableRects:ce,over:te,measureDroppableContainers:Te,scrollableAncestors:ee,scrollableAncestorRects:ke,measuringConfiguration:ie,measuringScheduled:Dt,windowRect:Ve}),[G,H,W,Z,xe,Ke,ae,y,T,ce,te,Te,ee,ke,ie,Dt,Ve]),wn=l.useMemo(()=>({activatorEvent:Z,activators:Nt,active:G,activeNodeRect:W,ariaDescribedById:{draggable:Ye},dispatch:w,draggableNodes:y,over:te,measureDroppableContainers:Te}),[Z,Nt,G,W,w,Ye,y,te,Te]);return X.createElement(en.Provider,{value:D},X.createElement(xt.Provider,{value:wn},X.createElement(Gr.Provider,{value:xn},X.createElement(pn.Provider,{value:bn},u)),X.createElement(eo,{disabled:(s==null?void 0:s.restoreFocus)===!1})),X.createElement(nr,{...s,hiddenTextDescribedById:Ye}));function Sn(){const _=(wt==null?void 0:wt.autoScrollEnabled)===!1,z=typeof c=="object"?c.enabled===!1:c===!1,j=R&&!_&&!z;return typeof c=="object"?{...c,enabled:j}:{enabled:j}}}),io=l.createContext(null),qt="button",so="Droppable";function ao(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=gt(so),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:g}=l.useContext(xt),{role:h=qt,roleDescription:S="draggable",tabIndex:p=0}=o??{},v=(c==null?void 0:c.id)===t,w=l.useContext(v?pn:io),[C,D]=ot(),[k,A]=ot(),R=Xr(a,t),m=pt(n);oe(()=>(f.set(t,{id:t,key:i,node:C,activatorNode:k,data:m}),()=>{const L=f.get(t);L&&L.key===i&&f.delete(t)}),[f,t]);const y=l.useMemo(()=>({role:h,tabIndex:p,"aria-disabled":r,"aria-pressed":v&&h===qt?!0:void 0,"aria-roledescription":S,"aria-describedby":d.draggable}),[r,h,p,v,S,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:y,isDragging:v,listeners:r?void 0:R,node:C,over:g,setNodeRef:D,setActivatorNodeRef:A,transform:w}}function lo(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const co=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return!n||!t?r:lo(r,n,t)};var F=(e=>(e[e.Selected=0]="Selected",e[e.Everything=1]="Everything",e))(F||{});const uo=ut("div",{display:"flex",position:"absolute",flexDirection:"column",width:"260px",border:"1px solid $gray6",borderRadius:"$2",backgroundColor:"$panelBg",overflow:"hidden",userSelect:"none"}),fo=ut($e,{height:"$6",width:"100%",padding:"0 $1",backgroundColor:"$panelTitleBg",color:"$gray11",flexShrink:0,fontSize:"$sm"}),ho=ut($e,{padding:"$1"});function po(){const[{bottom:e,left:t},n]=l.useState({left:4,bottom:4}),r=l.useCallback(o=>{n(({bottom:i,left:a})=>{const{delta:s}=o;return{left:a+s.x,bottom:i+-s.y}})},[]);return E.jsx(oo,{modifiers:[co],onDragEnd:r,children:E.jsx(go,{left:t,bottom:e})})}const go=Dn(function(t){const{attributes:n,listeners:r,setNodeRef:o,transform:i}=ao({id:"ParticlePanel"}),{viewportStore:a}=zn(),s=a.particleStore,{t:c}=Rn(),u={bottom:`${t.bottom}px`,left:`${t.left}px`,transform:i?`translate3d(${i.x}px, ${i.y}px, 0)`:"none"};return s.isPanelOn?E.jsxs(uo,{ref:o,style:u,...n,children:[E.jsxs(fo,{align:"v",justifyContent:"between",children:[E.jsxs($e,{gap:"xxs",children:[E.jsx(jn,{size:"12px",...r}),c("effects.particle.title")]}),E.jsxs($e,{gap:"xxs",align:"v",children:[E.jsx(Ze,{content:c("effects.particle.restart"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.play(),children:E.jsx(Fn,{size:"12px"})})}),E.jsx(Ze,{content:s.isPlaying?c("effects.particle.pause"):c("effects.particle.play"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.togglePauseResume(),children:s.isPlaying?E.jsx($n,{size:"12px"}):E.jsx(Un,{size:"12px"})})}),E.jsx(Ze,{content:c("effects.particle.stop"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.stop(s.mode),disabled:s.isStopped,children:E.jsx(Xn,{size:"12px"})})})]})]}),E.jsxs(ho,{children:[E.jsx(Pn,{label:c("effects.particle.speed"),value:s.speed,min:0,max:5,step:.1,dragStep:.1,onChange:d=>s.onSpeedChange(d)}),E.jsx(Mn,{label:c("effects.particle.scope.label"),value:s.mode,onChange:d=>{s.switchPlayMode(d),s.onBoundingChange(s.mode===F.Selected),s.stop(F.Everything),s.play()},options:[{value:F.Selected,label:c("effects.particle.scope.selected")},{value:F.Everything,label:c("effects.particle.scope.everything")}]}),E.jsx(An,{label:c("effects.particle.bounding"),disabled:s.mode===F.Everything,value:s.isBoundingEnabled,onChange:d=>s.onBoundingChange(d)})]})]}):null});class vo extends _n{constructor(){super(...arguments);x(this,"isBoundingEnabled",!1);x(this,"onScriptReset");x(this,"_onScriptStop");x(this,"_onScriptPlay");x(this,"_onScriptPause");x(this,"_hasLastSelectedEntity");x(this,"_selectedParticles",[]);x(this,"_allParticles",[]);x(this,"_mode",F.Selected);x(this,"_speed",1);x(this,"_isSelected",!1);x(this,"_componentArray",[]);x(this,"_center",new In);x(this,"_tempBoundingBox",new jt)}set mode(n){this._mode=n}get mode(){return this._mode}set speed(n){this._getParticles(this.mode).forEach(r=>{r.generator.main.simulationSpeed=n}),this._speed=n}get speed(){return this._speed}init(n){this.onScriptReset=n.onScriptReset,this._onScriptPlay=n.onScriptPlay,this._onScriptPause=n.onScriptPause,this._onScriptStop=n.onScriptStop,this._hasLastSelectedEntity=n.hasLastSelectedEntity}onStart(){const n=this.entity.parent.parent.createChild("particle_bounds_drawer");n.addComponent(On),n.addComponent(Ge),n.layer=Ln.Outline}onSelectEntity(n){if(this.onScriptReset&&this.onScriptReset(),this._componentArray.length=0,this._isSelected=!1,n){for(const r of n){const o=[];r.getComponentsIncludeChildren(De,o),this._componentArray.push(...o)}this._isSelected=this._componentArray.length>0}this._updateArrayAndPlay()}onAddComponent(n){if(n instanceof De){if(this.mode===F.Selected&&this._hasLastSelectedEntity&&!this._hasLastSelectedEntity())return;this._componentArray.push(n),this._updateArrayAndPlay()}}onRemoveComponent(n){if(n instanceof De)if(this.mode===F.Selected&&this._hasLastSelectedEntity&&!this._hasLastSelectedEntity()){const r=this._allParticles.findIndex(o=>o.instanceId===n.instanceId);r>-1&&this._allParticles.splice(r,1)}else{const r=this._componentArray.findIndex(o=>o.instanceId===n.instanceId);r>-1&&this._componentArray.splice(r,1),this._updateArrayAndPlay()}}onPlay(n){this._updateAllParticles(),n?this.play(F.Everything):this.stop(F.Everything)}onUpdate(){if(this._isSelected&&this.isBoundingEnabled){this._tempBoundingBox.copyFrom(this._selectedParticles[0].bounds);for(let h=1,S=this._selectedParticles.length;h<S;h++)jt.merge(this._tempBoundingBox,this._selectedParticles[h].bounds,this._tempBoundingBox);const{min:n,max:r}=this._tempBoundingBox,{x:o,y:i,z:a}=n,{x:s,y:c,z:u}=r,d=s-o,f=c-i,g=u-a;this._center.set(s+o,c+i,u+a).scale(.5),Ge.flush(),Ge.drawCuboid(d,f,g,this._center)}}_getParticles(n){return n===F.Selected?this._selectedParticles:this._allParticles}play(n=this.mode){this._getParticles(n).forEach(r=>{r.generator.stop(!1,Ft.StopEmittingAndClear),r.generator.main.simulationSpeed=this._speed,r.generator.play()}),this._onScriptPlay&&this._onScriptPlay(n)}pause(n=!1){this._getParticles(this.mode).forEach(r=>{r.generator.main.simulationSpeed=0}),this._onScriptPause&&this._onScriptPause(n)}stop(n){this._getParticles(n).forEach(r=>{r.generator.stop(!1,Ft.StopEmittingAndClear)}),this._onScriptStop&&this._onScriptStop(n)}resume(){this._getParticles(this.mode).forEach(n=>{n.generator.main.simulationSpeed=this._speed,n.generator.play()})}_updateAllParticles(){this._allParticles.length=0;const n=new Set;this.engine.sceneManager.scenes[0].rootEntities.forEach(o=>{const i=[];o.getComponentsIncludeChildren(De,i);for(const a of i)n.has(a.instanceId)||(n.add(a.instanceId),this._allParticles.push(a))})}_updateSelectedParticles(){this._selectedParticles.length=0;const n=new Set;for(const r of this._componentArray){const o=[];r.entity.getComponentsIncludeChildren(De,o);for(const i of o)n.has(i.instanceId)||(n.add(i.instanceId),this._selectedParticles.push(i))}}_updateArrayAndPlay(){const n=this._componentArray.length;this.pause(n!==0),n>0&&(this._updateSelectedParticles(),this._updateAllParticles(),this.play())}}var mo=Object.defineProperty,bo=Object.getOwnPropertyDescriptor,B=(e,t,n,r)=>{for(var o=r>1?void 0:r?bo(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&mo(t,n,o),o};let O=class{constructor(e){x(this,"isPanelOn",!1);x(this,"speed",1);x(this,"isPlaying",!1);x(this,"isStopped",!1);x(this,"_mode",F.Everything);x(this,"isModeChanged",!1);x(this,"isBoundingEnabled",!1);x(this,"script");x(this,"root");Tn(this),this.root=e.projectStore}get mode(){return this._mode}init(){this.script=Bn.addScript(vo),this.speed=this.script.speed,this.isBoundingEnabled=this.script.isBoundingEnabled,this.script.init({onScriptReset:()=>{this.isPanelOn=!1},onScriptPlay:()=>{this.isStopped=!1,this.isPlaying=!0},onScriptPause:e=>{this.isPanelOn=e},onScriptStop:e=>{this.isStopped=!0,this.isPlaying=!1},hasLastSelectedEntity:()=>{const e=this.root.currentScene.sceneUIStore.lastSelectedId;return e&&!!this.root.currentScene.entities.get(e)}}),this._mode=this.script.mode}play(e=this.mode){this.isStopped=!1,this.isPlaying=!0,this.script.play(e)}togglePauseResume(){this.isStopped=!1,this.isPlaying?(this.isPlaying=!1,this.script.pause()):(this.isPlaying=!0,this.script.resume())}stop(e){this.isStopped=!0,this.isPlaying=!1,this.script.stop(e)}onSpeedChange(e){this.speed=e,this.script.speed=e}onBoundingChange(e){this.isBoundingEnabled=e,this.script.isBoundingEnabled=e}switchPlayMode(e){this._mode=e,this.script.mode=e}};B([le],O.prototype,"isPanelOn",2);B([le],O.prototype,"speed",2);B([le],O.prototype,"isPlaying",2);B([le],O.prototype,"isStopped",2);B([le],O.prototype,"_mode",2);B([kn],O.prototype,"mode",1);B([le],O.prototype,"isModeChanged",2);B([le],O.prototype,"isBoundingEnabled",2);B([ve],O.prototype,"play",1);B([ve],O.prototype,"togglePauseResume",1);B([ve],O.prototype,"stop",1);B([ve],O.prototype,"onSpeedChange",1);B([ve],O.prototype,"onBoundingChange",1);B([ve],O.prototype,"switchPlayMode",1);O=B([Nn({type:"particleStore",Panel:po})],O);export{Ni as AnimatorComponent,zi as AnimatorStore,ps as AudioComponent,bs as ButtonComponent,Di as CameraComponent,Hi as CharacterControllerComponent,Pi as DirectLightComponent,Wi as DynamicColliderComponent,Yi as FixedJointComponent,Ki as HingeJointComponent,ys as ImageComponent,us as ImportScriptComponent,ns as LottieAnimationComponent,Li as MeshRendererComponent,ss as ParticleRendererComponent,O as ParticleStore,Vi as PhysicsStore,Ai as PointLightComponent,fs as PostProcessComponent,Zi as ScriptComponent,Bi as SkinnedMeshRendererComponent,os as SpineAnimationComponent,Ii as SpotLightComponent,Ji as SpringJointComponent,Ui as SpriteMaskComponent,Fi as SpriteRendererComponent,qi as StaticColliderComponent,xs as TextComponent,es as TextRendererComponent,ls as TrailRendererComponent,vs as TransformComponent,ws as UICanvasComponent,Ss as UIGroupComponent,Cs as UITransformComponent};
@@ -1 +1 @@
1
- import{av as e,aw as m,ax as i,ay as l}from"./index-c3dec278.js";function c(t){const{label:r,info:o,value:s,displayType:a="text"}=t;return e.jsxs(m,{...i(t),children:[a==="text"&&e.jsx(l,{size:"sm",selectable:!0,code:!0,children:s}),a==="image"&&e.jsx("img",{src:s,alt:r})]})}export{c as F};
1
+ import{av as e,aw as m,ax as i,ay as l}from"./index-d497fb6d.js";function c(t){const{label:r,info:o,value:s,displayType:a="text"}=t;return e.jsxs(m,{...i(t),children:[a==="text"&&e.jsx(l,{size:"sm",selectable:!0,code:!0,children:s}),a==="image"&&e.jsx("img",{src:s,alt:r})]})}export{c as F};
@@ -1 +1 @@
1
- var v=Object.defineProperty;var x=(r,s,t)=>s in r?v(r,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[s]=t;var c=(r,s,t)=>(x(r,typeof s!="symbol"?s+"":s,t),t);import{b$ as D,n as w,e as B,q as _,o as F,j as b,c0 as y,u as A,c1 as m,x as R,c2 as O,aC as T,ai as C,B as P,S as k,c3 as z,aM as g}from"./index-c3dec278.js";let I=null;function h(){return I??(I=new D),I}const j=new Proxy({},{get(r,s,t){const e=h(),n=Reflect.get(e,s,e);return typeof n=="function"?n.bind(e):n},set(r,s,t,e){return Reflect.set(h(),s,t),!0},has(r,s){return Reflect.has(h(),s)},ownKeys(){return Reflect.ownKeys(h())},getOwnPropertyDescriptor(r,s){const t=Reflect.getOwnPropertyDescriptor(h(),s);return t||{configurable:!0,enumerable:!0,writable:!0,value:h()[s]}}});var M=Object.defineProperty,L=Object.getOwnPropertyDescriptor,f=(r,s,t,e)=>{for(var n=e>1?void 0:e?L(s,t):s,o=r.length-1,i;o>=0;o--)(i=r[o])&&(n=(e?i(s,t,n):i(n))||n);return e&&n&&M(s,t,n),n};let p=class extends b{constructor(s){super(s);c(this,"isRoot",!1);c(this,"isFolder",!0);c(this,"hidden",!1);c(this,"extname","");c(this,"childrenId",[]);c(this,"acceptDragLayer",_.MainAsset);A(this)}get thumbnailUrl(){return this.locked?y.FolderLocked:y.Folder}get children(){const s=[];return this.childrenId.forEach(t=>{const e=this.root.assetStore.assets[t];e&&s.push(e)}),s}afterDelete(){const s=this.root.assetStore.assets;for(;this.childrenId.length;){const t=this.childrenId[0],e=s[t];e.loadingStatus==="success"&&e.beforeDelete&&e.beforeDelete(),this.childrenId.splice(0,1),delete this.root.assetStore.assets[t],e.loadingStatus==="success"&&e.afterDelete&&e.afterDelete()}}async initByMeta(s){super.initByMeta(s),this.isRoot=!!s.isRoot,s.hidden!=null&&(this.hidden=s.hidden),this.initObjectProperties()}async initByMain(s){}initByCreation(s,t,e){return Promise.resolve(null)}onDoubleClick(){this.root.assetStore.openFolder(this.id)}saveMain(){return null}recursive(s,t=!1){const e=this.children,n=[];for(let o=0;o<e.length;o++){const i=e[o];i.isFolder?(n.push(i),t&&s(i)):s(i)}return n.forEach(o=>o.recursive(s,t))}async asyncRecursive(s,t=!1){const e=this.children,n=[];for(let o=0;o<e.length;o++){const i=e[o];i.isFolder?(n.push(i),t&&await s(i)):await s(i)}for(let o=0;o<n.length;o++)await n[o].asyncRecursive(s,t)}_onDrop(s,t){if(!t||this.id===t.id)return;const{assetStore:e,assetUIStore:n,assetFacade:o}=this.root;if(this.dropping=!1,n.pickedAssets.includes(t.id)){if(n.pickedAssets.includes(this.id))return;for(let i=0;i<n.pickedAssets.length;i++)try{const a=n.pickedAssets[i];if(!e.assets[a])continue;o.moveAsset(a,this.id)}catch(a){m(a instanceof Error?a.message:String(a))}}else try{o.moveAsset(t.id,this.id)}catch(i){m(i instanceof Error?i.message:String(i))}}};f([R],p.prototype,"childrenId",2);f([O],p.prototype,"children",1);f([T],p.prototype,"_onDrop",1);p=f([w({type:"Folder",label:B("asset.folder.title"),dragLayer:_.Folder,importMenuConfig:{type:F.Add}})],p);const l=class l extends b{constructor(){super(...arguments);c(this,"isTemplate",!0);c(this,"_clonedEntities",[]);c(this,"_rootKey","");c(this,"_tempSize",0)}_buildInstanceLink(){const t=this.getMetaConfig().type;if(t!=="Prefab"&&t!=="glTF")return null;const e=t;return{assetId:this.id,bindingId:"",assetKind:e,role:"root",...this._rootKey&&{sourceEntityId:this._rootKey}}}instantiateEngineObject(){const t=this._instantiateEngineObject();this._clonedEntities.push(t);const e=this._clonedEntities;return t.addComponent(class extends k{onDestroy(){const n=e.indexOf(this.entity);n>=0&&e.splice(n,1)}}),t}addInstance(t,e){var d;const n=t.instanceAssetId;if(n){const u=this.root.assetStore.getAsset(n);u.isTemplate&&u.removeInstance(t)}const i=t.root.domainStore.getNormalizedState().entities[t.id],a=this._buildInstanceLink();i&&a?(d=i.instance)!=null&&d.bindingId||t.root.entityFacade.updateEntity(t.id,{instance:a}):a&&(t.pendingInstance=a)}removeInstance(t){var n;((n=t.root.domainStore.getNormalizedState().entities[t.id])==null?void 0:n.instance)!==void 0?t.root.entityFacade.updateEntity(t.id,{instance:null}):t.pendingInstance=null}_queryInstanceEntityIdsFromDomain(){var n,o;const t=this.root.domainStore.state.entities,e=[];for(const i of Object.keys(t))((o=(n=t[i])==null?void 0:n.instance)==null?void 0:o.assetId)===this.id&&e.push(i);return e}get instanceCount(){return this._queryInstanceEntityIdsFromDomain().length}static resolveInstanceEntityIds(t,e){const n=new Set;for(let o=0;o<t.length;o++){const i=t[o],a=e[i];a&&n.add(a.parentId===null?i:a.parentId)}return Array.from(n)}getInstanceEntityIds(){return l.resolveInstanceEntityIds(this._queryInstanceEntityIdsFromDomain(),this.root.domainStore.state.entities)}unpackAllInstances(){var o,i,a;const t=(o=this.root.domainStore.state.prefab)==null?void 0:o.bindings;t&&Object.values(t).some(d=>(d==null?void 0:d.assetId)===this.id)&&this.root.prefabFacade.unpackByAsset(this.id);const n=this._queryInstanceEntityIdsFromDomain();for(const d of n){const u=(i=this.root.domainStore.state.entities)==null?void 0:i[d];((a=u==null?void 0:u.instance)==null?void 0:a.assetId)===this.id&&this.root.entityFacade.updateEntity(d,{instance:null})}}afterDelete(){this.unpackAllInstances(),this.root.sceneStore.selectEntity(null),this._clonedEntities.forEach(e=>e.destroy());const t=this.getDragTempEntity();t&&(t.destroy(),this.setDragTempEntity(null))}_updateDragTempEntity(){try{const t=this.instantiateEngineObject();this.setDragTempEntity(t),this._tempSize=this._getSize(t)}catch(t){console.warn(`[InstanceEditorAsset] Failed to create drag temp entity for asset ${this.id}:`,t)}}async updateThumbnail(){this._tempSize?super.updateThumbnail():super.updateThumbnail(!0)}_getSize(t){z(t,l._tempBoundingBox),l._tempBoundingBox.getExtent(l._tempExtend);const e=l._tempExtend.length();return e===1/0?0:e}};c(l,"_tempExtend",new C),c(l,"_tempBoundingBox",new P);let E=l;const S=g.createContext(j);function U(){const r=g.useContext(S);if(!r)throw new Error("useRootStore must be used within a RootProvider");return r}const N=r=>g.useContext(S)[r];export{p as F,E as I,N as a,j as r,U as u};
1
+ var v=Object.defineProperty;var x=(r,s,t)=>s in r?v(r,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[s]=t;var c=(r,s,t)=>(x(r,typeof s!="symbol"?s+"":s,t),t);import{c2 as D,n as w,e as B,q as _,o as F,j as S,c3 as y,u as A,c4 as m,x as R,c5 as O,aC as T,ai as C,B as P,S as z,c6 as j,aN as g}from"./index-d497fb6d.js";let I=null;function h(){return I??(I=new D),I}const k=new Proxy({},{get(r,s,t){const e=h(),n=Reflect.get(e,s,e);return typeof n=="function"?n.bind(e):n},set(r,s,t,e){return Reflect.set(h(),s,t),!0},has(r,s){return Reflect.has(h(),s)},ownKeys(){return Reflect.ownKeys(h())},getOwnPropertyDescriptor(r,s){const t=Reflect.getOwnPropertyDescriptor(h(),s);return t||{configurable:!0,enumerable:!0,writable:!0,value:h()[s]}}});var M=Object.defineProperty,L=Object.getOwnPropertyDescriptor,f=(r,s,t,e)=>{for(var n=e>1?void 0:e?L(s,t):s,o=r.length-1,i;o>=0;o--)(i=r[o])&&(n=(e?i(s,t,n):i(n))||n);return e&&n&&M(s,t,n),n};let p=class extends S{constructor(s){super(s);c(this,"isRoot",!1);c(this,"isFolder",!0);c(this,"hidden",!1);c(this,"extname","");c(this,"childrenId",[]);c(this,"acceptDragLayer",_.MainAsset);A(this)}get thumbnailUrl(){return this.locked?y.FolderLocked:y.Folder}get children(){const s=[];return this.childrenId.forEach(t=>{const e=this.root.assetStore.assets[t];e&&s.push(e)}),s}afterDelete(){const s=this.root.assetStore.assets;for(;this.childrenId.length;){const t=this.childrenId[0],e=s[t];e.loadingStatus==="success"&&e.beforeDelete&&e.beforeDelete(),this.childrenId.splice(0,1),delete this.root.assetStore.assets[t],e.loadingStatus==="success"&&e.afterDelete&&e.afterDelete()}}async initByMeta(s){super.initByMeta(s),this.isRoot=!!s.isRoot,s.hidden!=null&&(this.hidden=s.hidden),this.initObjectProperties()}async initByMain(s){}initByCreation(s,t,e){return Promise.resolve(null)}onDoubleClick(){this.root.assetStore.openFolder(this.id)}saveMain(){return null}recursive(s,t=!1){const e=this.children,n=[];for(let o=0;o<e.length;o++){const i=e[o];i.isFolder?(n.push(i),t&&s(i)):s(i)}return n.forEach(o=>o.recursive(s,t))}async asyncRecursive(s,t=!1){const e=this.children,n=[];for(let o=0;o<e.length;o++){const i=e[o];i.isFolder?(n.push(i),t&&await s(i)):await s(i)}for(let o=0;o<n.length;o++)await n[o].asyncRecursive(s,t)}_onDrop(s,t){if(!t||this.id===t.id)return;const{assetStore:e,assetUIStore:n,assetFacade:o}=this.root;if(this.dropping=!1,n.pickedAssets.includes(t.id)){if(n.pickedAssets.includes(this.id))return;for(let i=0;i<n.pickedAssets.length;i++)try{const a=n.pickedAssets[i];if(!e.assets[a])continue;o.moveAsset(a,this.id)}catch(a){m(a instanceof Error?a.message:String(a))}}else try{o.moveAsset(t.id,this.id)}catch(i){m(i instanceof Error?i.message:String(i))}}};f([R],p.prototype,"childrenId",2);f([O],p.prototype,"children",1);f([T],p.prototype,"_onDrop",1);p=f([w({type:"Folder",label:B("asset.folder.title"),dragLayer:_.Folder,importMenuConfig:{type:F.Add}})],p);const l=class l extends S{constructor(){super(...arguments);c(this,"isTemplate",!0);c(this,"_clonedEntities",[]);c(this,"_rootKey","");c(this,"_tempSize",0)}_buildInstanceLink(){const t=this.getMetaConfig().type;if(t!=="Prefab"&&t!=="glTF")return null;const e=t;return{assetId:this.id,bindingId:"",assetKind:e,role:"root",...this._rootKey&&{sourceEntityId:this._rootKey}}}instantiateEngineObject(){const t=this._instantiateEngineObject();this._clonedEntities.push(t);const e=this._clonedEntities;return t.addComponent(class extends z{onDestroy(){const n=e.indexOf(this.entity);n>=0&&e.splice(n,1)}}),t}addInstance(t,e){var d;const n=t.instanceAssetId;if(n){const u=this.root.assetStore.getAsset(n);u.isTemplate&&u.removeInstance(t)}const i=t.root.domainStore.getNormalizedState().entities[t.id],a=this._buildInstanceLink();i&&a?(d=i.instance)!=null&&d.bindingId||t.root.entityFacade.updateEntity(t.id,{instance:a}):a&&(t.pendingInstance=a)}removeInstance(t){var n;((n=t.root.domainStore.getNormalizedState().entities[t.id])==null?void 0:n.instance)!==void 0?t.root.entityFacade.updateEntity(t.id,{instance:null}):t.pendingInstance=null}_queryInstanceEntityIdsFromDomain(){var n,o;const t=this.root.domainStore.state.entities,e=[];for(const i of Object.keys(t))((o=(n=t[i])==null?void 0:n.instance)==null?void 0:o.assetId)===this.id&&e.push(i);return e}get instanceCount(){return this._queryInstanceEntityIdsFromDomain().length}static resolveInstanceEntityIds(t,e){const n=new Set;for(let o=0;o<t.length;o++){const i=t[o],a=e[i];a&&n.add(a.parentId===null?i:a.parentId)}return Array.from(n)}getInstanceEntityIds(){return l.resolveInstanceEntityIds(this._queryInstanceEntityIdsFromDomain(),this.root.domainStore.state.entities)}unpackAllInstances(){var o,i,a;const t=(o=this.root.domainStore.state.prefab)==null?void 0:o.bindings;t&&Object.values(t).some(d=>(d==null?void 0:d.assetId)===this.id)&&this.root.prefabFacade.unpackByAsset(this.id);const n=this._queryInstanceEntityIdsFromDomain();for(const d of n){const u=(i=this.root.domainStore.state.entities)==null?void 0:i[d];((a=u==null?void 0:u.instance)==null?void 0:a.assetId)===this.id&&this.root.entityFacade.updateEntity(d,{instance:null})}}afterDelete(){this.root.sceneStore.selectEntity(null),this._clonedEntities.forEach(e=>e.destroy());const t=this.getDragTempEntity();t&&(t.destroy(),this.setDragTempEntity(null))}_updateDragTempEntity(){try{const t=this.instantiateEngineObject();this.setDragTempEntity(t),this._tempSize=this._getSize(t)}catch(t){console.warn(`[InstanceEditorAsset] Failed to create drag temp entity for asset ${this.id}:`,t)}}async updateThumbnail(){this._tempSize?super.updateThumbnail():super.updateThumbnail(!0)}_getSize(t){j(t,l._tempBoundingBox),l._tempBoundingBox.getExtent(l._tempExtend);const e=l._tempExtend.length();return e===1/0?0:e}};c(l,"_tempExtend",new C),c(l,"_tempBoundingBox",new P);let E=l;const b=g.createContext(k);function N(){const r=g.useContext(b);if(!r)throw new Error("useRootStore must be used within a RootProvider");return r}const U=r=>g.useContext(b)[r];export{p as F,E as I,U as a,k as r,N as u};
@@ -0,0 +1 @@
1
+ var E=Object.defineProperty;var O=(r,t,e)=>t in r?E(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var m=(r,t,e)=>(O(r,typeof t!="symbol"?t+"":t,e),e);import{c7 as C,aJ as v,aK as _,aN as j,aL as y,c8 as I,aP as B,E as R,C as h,c9 as S,ca as T,x as b,p as w,e as P,bP as V,cb as A}from"./index-d497fb6d.js";import{r as g}from"./index-8a22fe59.js";import{c as F}from"./Component-c3c0c167.js";import"./postmen-0413c689.js";import{c as k}from"./create-script-property-context-model-0fe0258f.js";import"./TextureAsset-bf69040b.js";import"./GlTFAsset-917bf1ee.js";import"./MaterialAsset-aa93db51.js";import"./MeshAsset-585f4b18.js";import"./AnimatorControllerAsset-9192e596.js";import"./AnimationClipAsset-0a1f63eb.js";import"./ShaderChunkAsset-a3ff3959.js";import"./AmbientLightAsset-57a59fc2.js";import"./SpineSkeletonDataAsset-a8598103.js";import"./FontAsset-10273d05.js";import"./SceneAsset-7a9dbdd8.js";import"./ShaderAsset-2f2c1e95.js";import"./PrimitiveMesh-fde624a6.js";import"./XRReferenceImageAsset-16071f5c.js";import"./PrefabAsset-8c923465.js";import"./PhysicsMaterialAsset-2dd013f8.js";import"./RenderTargetAsset-bf38a725.js";import"./AudioAsset-0ea4ba7b.js";import"./index-2f54d4c9.js";import"./MarkdownAsset-602f93bf.js";import{E as N}from"./ShaderUIScriptAsset-d3a2d680.js";import"./ktx2-encoder-772f6c33.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./Tooltip-0268ffac.js";import"./createReactComponent-3e49f864.js";import"./AssetViewer-9f395efb.js";import"./glTFIO-45ff9a17.js";import"./MaterialInspector-45e208c7.js";import"./IconPointFilled-192e99c9.js";import"./shader-data-utils-e38a959d.js";import"./index-68806c86.js";import"./MeshThumbnail-9bbe01dc.js";import"./bundlers-9b0d37fc.js";import"./module-136992e3.js";import"./module-1470d524.js";import"./IconPlus-2bfc60da.js";import"./FormItemArray-9d4196d8.js";import"./Accordion-6f002a96.js";import"./module-77c2ea8c.js";const $=["Input","Boolean","Switch","Toggle","Slider","Number","Vector2","Vector3","Vector4","Rect","Color","Select","AssetPicker","Textarea","SegmentControl"];function J(r){r=r.replace(/\/\/.*$/gm,"").replace(/,\s*}/gm,"}");const t=/@inspect\(['"](\w+)['"],?\s?(\{[\s\S]*?\})?\)\s*(?:public|private|static)?\s*(\w+)[:\s\w]+?\s*=\s*(?:['"]([^'"]*?)['"]|(-?[\w.]+));?/g,e=[];let p;for(;(p=t.exec(r))!==null;){let[,o,s,i,a,c]=p,l=a??c;if($.indexOf(o)===-1){console.warn(`Unsupported property type: ${o}`);continue}let n={property:i.toString(),label:i.toString(),type:o};if(s){s=s.trim().replace(/\s+/g," ").replace(/'/g,'"').replace(/(\w+):/g,'"$1":');try{n=JSON.parse(s),n.type=o,n.label=n.label||i,n.property=n.property||i}catch{console.warn(`Failed to parse property options: ${s}`)}}["Number","Slider"].includes(o)&&(l=parseFloat(l)),e.push({propertyType:o,propertyOptions:n,propertyName:i,propertyValue:l})}return e}async function x(r){const t=J(r.code),e={success:!1,model:{},config:[]};for(let p=0;p<t.length;p++){const o=t[p];e.model[o.propertyName]=o.propertyValue,e.config.push(o.propertyOptions)}return e.success=!0,e}function D(r){return r!=null&&r.$ref?(C(r.$ref,"script component"),{refId:r.$ref,...r.key?{key:r.key}:{}}):null}function M(r){if(r)return C(r.refId,"script component"),{$ref:r.refId,...r.key?{key:r.key}:{}}}var z=Object.defineProperty,L=Object.getOwnPropertyDescriptor,u=(r,t,e,p)=>{for(var o=p>1?void 0:p?L(t,e):t,s=r.length-1,i;s>=0;s--)(i=r[s])&&(o=(p?i(t,e,o):i(o))||o);return p&&o&&z(t,e,o),o};const q=new BroadcastChannel("Galacean_Editor_Channel"),G=v(function(t){const{model:e}=t,{t:p}=_(),o=k(e.properties,e.root),s=a=>{Object.keys(a.properties).forEach(c=>{V(a,c,{getActualEditorValue:()=>S(a.properties[c]),setActualEditorValue:(l,n,d)=>{l.properties[n]=d}})})};async function i(){e.parsed=!1;const a=e.root.assetStore.getAsset(e.script.refId),c=await A.assets.getAssetInfo(a.serverId),l=await fetch(c.data.url).then(d=>d.text());await g.assetFacade.applyRemoteCodeChange(a.id,l,c.data.url);const n=await x(a);n.success&&(e.parsed=!0,e.propertiesConfig=n.config,e.properties=n.model,s(e))}return j.useEffect(()=>{e!=null&&e.properties&&s(e)},[e.properties]),e.script?y.jsxs(y.Fragment,{children:[y.jsx(I,{label:" ",async:i,children:p("component.script.parse-properties")}),e.parsed&&e.properties&&y.jsx(B.List,{model:o,configs:e.propertiesConfig,onModelChange:(a,c)=>{q.postMessage({type:"script-inspector-value-change",payload:{instanceId:e.id,property:a,value:c}}),g.inspectorFacade.componentChange(e.id,a,c)}})]}):null});let f=class extends R{constructor(){super(...arguments);m(this,"parsed",!1);m(this,"propertiesConfig",[]);m(this,"isScript",!0);m(this,"script",null);m(this,"properties",{})}onInitComplete(){this._attachEditorScriptBridge()}async _attachEditorScriptBridge(){if(this.script)try{const t=await this.root.assetStore.getAssetByRef(this.script);if(!t)throw new Error(`Cannot find file ${JSON.stringify(this.script)}`);await this.applyBoundPathChange("_scriptRef",h.AssetPicker,this.script);const e=await x(t);this.propertiesConfig=e.config;for(const[p,o]of Object.entries(e.model))this.properties[p]=this.properties[p]??o;this.parsed=!0}catch(t){console.warn(t)}}rebindEngineObject(t){super.rebindEngineObject(t),this._attachEditorScriptBridge()}async applyBoundPathChange(t,e,p){if(t==="_scriptRef"){this.setBoundPathValue(t,h.Input,p);return}await super.applyBoundPathChange(t,e,p)}deserialize(t){if(super.deserialize(t),this.script=D(t.script),t.props)for(const[e,p]of Object.entries(t.props))e!=="enabled"&&(this.properties[e]=p)}toJSON(){const t=super.toJSON();if(delete t.props.script,this.properties){const p=S(this.properties);for(const[o,s]of Object.entries(p)){if(o==="root")continue;const i=T(s);i!==void 0&&(t.props[o]=i)}}const e=M(this.script);return e&&(t.script=e),t}};u([b],f.prototype,"parsed",2);u([b.ref],f.prototype,"propertiesConfig",2);u([w({label:P("component.script.script-label"),type:h.AssetPicker,assetType:"script",bindPath:"_scriptRef",customFilter:r=>r.subType===N.Default,onLocate:r=>{r.onDoubleClick()}})],f.prototype,"script",2);u([w({label:P("component.script.properties-label"),customComponent:G})],f.prototype,"properties",2);f=u([F({type:"Script",componentsMenu:{label:"component.script.title"}})],f);export{f as ScriptComponent};
@@ -0,0 +1 @@
1
+ import{C as a,D as C,F as s,H as l,P as c,a as S,S as d}from"./PhysicsStore-fcb01282.js";import"./index-d497fb6d.js";import"./index-8a22fe59.js";import"./Component-c3c0c167.js";import"./postmen-0413c689.js";import"./FormItemArray-9d4196d8.js";import"./Accordion-6f002a96.js";export{a as CharacterControllerComponent,C as DynamicColliderComponent,s as FixedJointComponent,l as HingeJointComponent,c as PhysicsStore,S as SpringJointComponent,d as StaticColliderComponent};
@@ -0,0 +1 @@
1
+ import{E as d,c as h,b as y,a as T,S as f}from"./ShaderAsset-2f2c1e95.js";import{S as E}from"./ShaderUIScriptAsset-d3a2d680.js";import"./index-d497fb6d.js";import"./index-8a22fe59.js";import"./postmen-0413c689.js";import"./meshopt_simplifier.module-cd99529d.js";import"./shader-data-utils-e38a959d.js";import"./IconPointFilled-192e99c9.js";import"./createReactComponent-3e49f864.js";import"./index-68806c86.js";export{d as EShaderPropertyType,h as ShaderAsset,y as ShaderPropertyEnumType,T as ShaderPropertyRangeType,f as ShaderTemplateConfigs,E as ShaderUIScript};