ss-component-new 1.3.474 → 1.3.475

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 (85) hide show
  1. package/dist/{OrbitControls-X8Tx1hPt.js → OrbitControls-CcniPNk7.js} +1 -1
  2. package/dist/{OrbitControls-DvnUitVd.cjs → OrbitControls-kK6BBpL4.cjs} +1 -1
  3. package/dist/{PCDLoader-BG-ZSu84.js → PCDLoader-B0_dKUxm.js} +1 -1
  4. package/dist/{PCDLoader-Dy4BlpG3.cjs → PCDLoader-BhWhU7AF.cjs} +1 -1
  5. package/dist/{animationData-Bln0M7cD.js → animationData-_k7oY6dT.js} +1 -1
  6. package/dist/{animationData-BsfHPO-P.cjs → animationData-u3PDQuOQ.cjs} +1 -1
  7. package/dist/{iconfont-D9hgzLCg.cjs → iconfont-BYcEzhNe.cjs} +1 -1
  8. package/dist/{iconfont-BQBCgO1O.js → iconfont-DiGd__OT.js} +2 -2
  9. package/dist/{index-BTghn1W2.cjs → index-4sRonvwO.cjs} +1 -1
  10. package/dist/{index-BWUv92s4.cjs → index-BER-9cea.cjs} +1 -1
  11. package/dist/{index-BQCj3fMV.js → index-BEmcYHbr.js} +13 -13
  12. package/dist/{index-CD5uCiH9.js → index-BG20WI0G.js} +1 -1
  13. package/dist/{index-BOb1nNwq.js → index-BWlbMCvF.js} +3 -3
  14. package/dist/{index-DlMQigjS.js → index-B_hltucu.js} +1 -1
  15. package/dist/{index-8dhcui8A.js → index-BeRXwYS6.js} +1 -1
  16. package/dist/{index-BQOERy34.cjs → index-BrmJTI0B.cjs} +1 -1
  17. package/dist/{index-BKIacUel.cjs → index-Bu78K7ZG.cjs} +1 -1
  18. package/dist/{index-CNbYtIV_.cjs → index-BvHQ4rgD.cjs} +1 -1
  19. package/dist/{index-Dq4Lwm9O.cjs → index-C-B1N90Y.cjs} +1 -1
  20. package/dist/{index-DJL-eKIo.js → index-C35tMkD-.js} +2 -2
  21. package/dist/{index-sVdFHyjl.cjs → index-C89mMUM5.cjs} +1 -1
  22. package/dist/{index-CHIWRNqT.cjs → index-C8G1ik6O.cjs} +1 -1
  23. package/dist/{index-BWxZZ5t2.js → index-C8howWAV.js} +6 -6
  24. package/dist/{index-BW7PEvq0.js → index-CFp-3Ii5.js} +1 -1
  25. package/dist/{index-BAC9zNh7.js → index-CV1On3aP.js} +3 -3
  26. package/dist/{index-DFfIPpCG.js → index-CZU4FRVk.js} +3 -3
  27. package/dist/{index-D_Xo-WAP.cjs → index-Ca7EraIq.cjs} +1 -1
  28. package/dist/{index-DyeuJeIz.js → index-Cjax9TjT.js} +2 -2
  29. package/dist/{index-Djzfu6It.js → index-CnERmJxh.js} +3 -3
  30. package/dist/{index-CJIlx0kh.cjs → index-CoDkK5hg.cjs} +1 -1
  31. package/dist/{index-DOoRG-By.cjs → index-CsdTTuj7.cjs} +1 -1
  32. package/dist/{index-CmDV_HX-.cjs → index-Cvv5GKOV.cjs} +1 -1
  33. package/dist/{index-TGKm3MXI.js → index-Cx8gP3xA.js} +6 -6
  34. package/dist/{index-0JtF10qC.cjs → index-CxNA05bD.cjs} +1 -1
  35. package/dist/{index-CMiciReg.js → index-D04ebGoA.js} +1 -1
  36. package/dist/{index-FrPdQKQq.js → index-D54GltRD.js} +1 -1
  37. package/dist/{index-B1cEBcBv.cjs → index-D8agmBOg.cjs} +1 -1
  38. package/dist/{index-CZ01Uey-.js → index-DBZg952W.js} +4 -4
  39. package/dist/{index-cAtiRq0m.js → index-DHHOxu2C.js} +2 -2
  40. package/dist/{index-iDpB4RnF.cjs → index-DHotzRf6.cjs} +1 -1
  41. package/dist/{index-C6xyzF3E.cjs → index-DiH9I8Qd.cjs} +1 -1
  42. package/dist/{index-B74gcS36.cjs → index-DmN5XL7c.cjs} +1 -1
  43. package/dist/{index-CyjcMwPq.js → index-DoOEAJe9.js} +1 -1
  44. package/dist/{index-CdNXBIFC.cjs → index-DpDOUFmB.cjs} +1 -1
  45. package/dist/{index-B8MP6uHs.cjs → index-DqcKRmzN.cjs} +1 -1
  46. package/dist/{index-CbjEUSvK.cjs → index-LkiYEgcl.cjs} +1 -1
  47. package/dist/{index-CJfoKnFP.js → index-ThbaNcbe.js} +1 -1
  48. package/dist/{index-CeuUur0J.js → index-_qmANZPg.js} +1 -1
  49. package/dist/{index-BdB_acmm.cjs → index-eGw5gJGa.cjs} +1 -1
  50. package/dist/{index-ChCxwtv1.js → index-oXfFN0Pr.js} +1 -1
  51. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DCLueP3M.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Cws68h8h.cjs} +1 -1
  52. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BRGuwIGi.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-tsnXyC8a.js} +6 -6
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CYXAbj2a.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B3RSoHQA.js} +4379 -4379
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DpGu0pGu.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BkkUVCLE.cjs} +73 -73
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CbAt1Sgy.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BzTbm05u.js} +3 -3
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CzixMCTz.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-ChLyboIT.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_1_lang-bvR0uxez.js → index.vue_vue_type_style_index_1_lang-Cwuh77RJ.js} +3 -3
  58. package/dist/{index.vue_vue_type_style_index_1_lang-DiCmmZWZ.cjs → index.vue_vue_type_style_index_1_lang-D_Jkk1jj.cjs} +1 -1
  59. package/dist/{main-DBuDKx9k.js → main-CQ5P45HO.js} +2 -2
  60. package/dist/{main-BAdh_eGu.cjs → main-CdLPmV9p.cjs} +1 -1
  61. package/dist/{pointTrack-C3DjtFZp.cjs → pointTrack-BlTNQUei.cjs} +1 -1
  62. package/dist/{pointTrack-DINaUvcX.js → pointTrack-o_VVFlmw.js} +1 -1
  63. package/dist/{robotUtil-BeynP2xM.js → robotUtil-BIMs6Vbb.js} +1 -1
  64. package/dist/{robotUtil-CI-r19FW.cjs → robotUtil-CHCt1RuS.cjs} +1 -1
  65. package/dist/ss-component.cjs +1 -1
  66. package/dist/ss-component.js +9 -9
  67. package/dist/ss-component2.cjs +1 -1
  68. package/dist/ss-component2.js +10 -10
  69. package/dist/{threeModel-CEX82wRN.cjs → threeModel-DP_7xQQL.cjs} +1 -1
  70. package/dist/{threeModel-DT3NAfO0.js → threeModel-OAebCYSS.js} +5 -5
  71. package/dist/{threePreview-D3TXuSzk.cjs → threePreview-BNlZnB3i.cjs} +1 -1
  72. package/dist/{threePreview-BDS4HbKS.js → threePreview-RzBngWrN.js} +3 -3
  73. package/dist/{threeSceneView-Cl6V_agq.cjs → threeSceneView-C1o5iNCO.cjs} +1 -1
  74. package/dist/{threeSceneView-DN0ThqUj.js → threeSceneView-C8vlDAO-.js} +7 -7
  75. package/dist/{threeSceneViewForCPMPIP-Bln3jqsZ.cjs → threeSceneViewForCPMPIP-ByuSeCFK.cjs} +1 -1
  76. package/dist/{threeSceneViewForCPMPIP-6wdyEUgw.js → threeSceneViewForCPMPIP-CdhbgviA.js} +10 -10
  77. package/dist/{threeTrackPathView-C8VR9-qO.cjs → threeTrackPathView-BqI0D7OI.cjs} +1 -1
  78. package/dist/{threeTrackPathView-B1oaH-Qc.js → threeTrackPathView-DyGh44hI.js} +5 -5
  79. package/dist/{threeViewerHost-BaGBR8jd.js → threeViewerHost-CTUpfC_Y.js} +2 -2
  80. package/dist/{threeViewerHost-pVmmGFpg.cjs → threeViewerHost-Czjy_lsO.cjs} +2 -2
  81. package/dist/{urdfTree-BU2M7_8q.cjs → urdfTree-CE1RFgO5.cjs} +1 -1
  82. package/dist/{urdfTree-BhqPlNff.js → urdfTree-Du-nKROV.js} +1 -1
  83. package/dist/{workpieceTreePanel-DiVmUGRy.js → workpieceTreePanel-BCaK6cMT.js} +5 -5
  84. package/dist/{workpieceTreePanel-2XzE7ufi.cjs → workpieceTreePanel-XnZWnUpu.cjs} +1 -1
  85. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-CbjEUSvK.cjs"),i=require("./index-CEwxrYB-.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-PBh9haH2.cjs"),Z=require("./index-BdB_acmm.cjs"),G=require("./array-dpfqMCSa.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=T.useModelComp(i.pinia),{itemData:_}=i.storeToRefs(h),p=e.ref([]),C=e.ref([]),I=c=>{j("change",{wholeValue:p.value,editValue:c})},S=c=>{const g=i.cloneDeep(p.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));p.value=B};e.watch(()=>_.value,()=>{var c;!_.value||((c=_.value)==null?void 0:c.length)===0||(C.value=_.value,p.value=_.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=e.ref(""),_=e.ref([]),p=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{p.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});j("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,_.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:_.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-LkiYEgcl.cjs"),i=require("./index-CEwxrYB-.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-PBh9haH2.cjs"),Z=require("./index-eGw5gJGa.cjs"),G=require("./array-dpfqMCSa.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=T.useModelComp(i.pinia),{itemData:_}=i.storeToRefs(h),p=e.ref([]),C=e.ref([]),I=c=>{j("change",{wholeValue:p.value,editValue:c})},S=c=>{const g=i.cloneDeep(p.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));p.value=B};e.watch(()=>_.value,()=>{var c;!_.value||((c=_.value)==null?void 0:c.length)===0||(C.value=_.value,p.value=_.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=e.ref(""),_=e.ref([]),p=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{p.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});j("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,_.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:_.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("vue"),S=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DpGu0pGu.cjs");function Q(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var i=e.indexOf("Trident/");if(i>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var r=e.indexOf("Edge/");return r>0?parseInt(e.substring(r+5,e.indexOf(".",r)),10):-1}let P;function R(){R.init||(R.init=!0,P=Q()!==-1)}var L={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){R(),c.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",P&&this.$el.appendChild(e),e.data="about:blank",P||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!P&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const ee=c.withScopeId("data-v-b329ee4c");c.pushScopeId("data-v-b329ee4c");const te={class:"resize-observer",tabindex:"-1"};c.popScopeId();const ie=ee((e,t,i,n,r,s)=>(c.openBlock(),c.createBlock("div",te)));L.render=ie;L.__scopeId="data-v-b329ee4c";L.__file="src/components/ResizeObserver.vue";function A(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(t){return typeof t}:A=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(e)}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function se(e,t,i){return t&&re(e.prototype,t),e}function j(e){return oe(e)||le(e)||ae(e)||ce()}function oe(e){if(Array.isArray(e))return N(e)}function le(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ae(e,t){if(e){if(typeof e=="string")return N(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return N(e,t)}}function N(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function ce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1
+ "use strict";const c=require("vue"),S=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BkkUVCLE.cjs");function Q(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var i=e.indexOf("Trident/");if(i>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var r=e.indexOf("Edge/");return r>0?parseInt(e.substring(r+5,e.indexOf(".",r)),10):-1}let P;function R(){R.init||(R.init=!0,P=Q()!==-1)}var L={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){R(),c.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",P&&this.$el.appendChild(e),e.data="about:blank",P||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!P&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const ee=c.withScopeId("data-v-b329ee4c");c.pushScopeId("data-v-b329ee4c");const te={class:"resize-observer",tabindex:"-1"};c.popScopeId();const ie=ee((e,t,i,n,r,s)=>(c.openBlock(),c.createBlock("div",te)));L.render=ie;L.__scopeId="data-v-b329ee4c";L.__file="src/components/ResizeObserver.vue";function A(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(t){return typeof t}:A=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(e)}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function se(e,t,i){return t&&re(e.prototype,t),e}function j(e){return oe(e)||le(e)||ae(e)||ce()}function oe(e){if(Array.isArray(e))return N(e)}function le(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ae(e,t){if(e){if(typeof e=="string")return N(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return N(e,t)}}function N(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function ce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ue(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function de(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n,r,s,o=function(a){for(var u=arguments.length,d=new Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];if(s=d,!(n&&a===r)){var v=i.leading;typeof v=="function"&&(v=v(a,r)),(!n||a!==r)&&v&&e.apply(void 0,[a].concat(j(s))),r=a,clearTimeout(n),n=setTimeout(function(){e.apply(void 0,[a].concat(j(s))),n=0},t)}};return o._clear=function(){clearTimeout(n),n=null},o}function q(e,t){if(e===t)return!0;if(A(e)==="object"){for(var i in e)if(!q(e[i],t[i]))return!1;return!0}return!1}var fe=function(){function e(t,i,n){ne(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(i,n)}return se(e,[{key:"createObserver",value:function(i,n){var r=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=ue(i),this.callback=function(l,a){r.options.callback(l,a),l&&r.options.once&&(r.frozen=!0,r.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},o=s.leading;this.callback=de(this.callback,this.options.throttle,{leading:function(a){return o==="both"||o==="visible"&&a||o==="hidden"&&!a}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(l){var a=l[0];if(l.length>1){var u=l.find(function(p){return p.isIntersecting});u&&(a=u)}if(r.callback){var d=a.isIntersecting&&a.intersectionRatio>=r.threshold;if(d===r.oldResult)return;r.oldResult=d,r.callback(d,a)}},this.options.intersection),c.nextTick(function(){r.observer&&r.observer.observe(r.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function W(e,t,i){var n=t.value;if(n)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var r=new fe(e,n,i);e._vue_visibilityState=r}}function he(e,t,i){var n=t.value,r=t.oldValue;if(!q(n,r)){var s=e._vue_visibilityState;if(!n){K(e);return}s?s.createObserver(n,i):W(e,{value:n},i)}}function K(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var me={beforeMount:W,updated:he,unmounted:K},pe={itemsLimit:1e3},ye=/(auto|scroll)/;function G(e,t){return e.parentNode===null?t:G(e.parentNode,t.concat([e]))}var B=function(t,i){return getComputedStyle(t,null).getPropertyValue(i)},ve=function(t){return B(t,"overflow")+B(t,"overflow-y")+B(t,"overflow-x")},ge=function(t){return ye.test(ve(t))};function Z(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=G(e.parentNode,[]),i=0;i<t.length;i+=1)if(ge(t[i]))return t[i];return document.scrollingElement||document.documentElement}}function F(e){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(e)}var be={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function we(){return this.items.length&&F(this.items[0])!=="object"}var H=!1;if(typeof window<"u"){H=!1;try{var ze=Object.defineProperty({},"passive",{get:function(){H=!0}});window.addEventListener("test",null,ze)}catch{}}let _e=0;var U={name:"RecycleScroller",components:{ResizeObserver:L},directives:{ObserveVisibility:me},props:{...be,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,i=this.sizeField,n=this.minItemSize;let r=1e4,s=0,o;for(let l=0,a=t.length;l<a;l++)o=t[l][i]||n,o<r&&(r=o),s+=o,e[l]={accumulator:s,size:o};return this.$_computedMinItemSize=r,e}return[]},simpleArray:we,itemIndexByKey(){const{keyField:e,items:t}=this,i={};for(let n=0,r=t.length;n<r;n++)i[t[n][e]]=n;return i}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,i,n,r){const s=c.markRaw({id:_e++,index:t,used:!0,key:n,type:r}),o=c.shallowReactive({item:i,position:0,nr:s});return e.push(o),o},unuseView(e,t=!1){const i=this.$_unusedViews,n=e.nr.type;let r=i.get(n);r||(r=[],i.set(n,r)),r.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:i}=this.updateVisibleItems(!1,!0);i||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const i=this.itemSize,n=this.gridItems||1,r=this.itemSecondarySize||i,s=this.$_computedMinItemSize,o=this.typeField,l=this.simpleArray?null:this.keyField,a=this.items,u=a.length,d=this.sizes,p=this.$_views,v=this.$_unusedViews,g=this.pool,x=this.itemIndexByKey;let y,m,T,z,_;if(!u)y=m=z=_=T=0;else if(this.$_prerender)y=z=0,m=_=Math.min(this.prerender,a.length),T=null;else{const f=this.getScroll();if(t){let w=f.start-this.$_lastUpdateScrollPosition;if(w<0&&(w=-w),i===null&&w<s||w<i)return{continuous:!0}}this.$_lastUpdateScrollPosition=f.start;const I=this.buffer;f.start-=I,f.end+=I;let b=0;if(this.$refs.before&&(b=this.$refs.before.scrollHeight,f.start-=b),this.$refs.after){const w=this.$refs.after.scrollHeight;f.end+=w}if(i===null){let w,O=0,D=u-1,$=~~(u/2),X;do X=$,w=d[$].accumulator,w<f.start?O=$:$<u-1&&d[$+1].accumulator>f.start&&(D=$),$=~~((O+D)/2);while($!==X);for($<0&&($=0),y=$,T=d[u-1].accumulator,m=$;m<u&&d[m].accumulator<f.end;m++);for(m===-1?m=a.length-1:(m++,m>u&&(m=u)),z=y;z<u&&b+d[z].accumulator<f.start;z++);for(_=z;_<u&&b+d[_].accumulator<f.end;_++);}else{y=~~(f.start/i*n);const w=y%n;y-=w,m=Math.ceil(f.end/i*n),z=Math.max(0,Math.floor((f.start-b)/i*n)),_=Math.floor((f.end-b)/i*n),y<0&&(y=0),m>u&&(m=u),z<0&&(z=0),_>u&&(_=u),T=Math.ceil(u/n)*i}}m-y>pe.itemsLimit&&this.itemsLimitError(),this.totalSize=T;let h;const V=y<=this.$_endIndex&&m>=this.$_startIndex;if(V)for(let f=0,I=g.length;f<I;f++)h=g[f],h.nr.used&&(e&&(h.nr.index=x[h.item[l]]),(h.nr.index==null||h.nr.index<y||h.nr.index>=m)&&this.unuseView(h));const Y=V?null:new Map;let C,k,M;for(let f=y;f<m;f++){C=a[f];const I=l?C[l]:C;if(I==null)throw new Error(`Key is ${I} on item (keyField is '${l}')`);if(h=p.get(I),!i&&!d[f].size){h&&this.unuseView(h);continue}k=C[o];let b=v.get(k),w=!1;if(!h)V?b&&b.length?h=b.pop():h=this.addView(g,f,C,I,k):(M=Y.get(k)||0,(!b||M>=b.length)&&(h=this.addView(g,f,C,I,k),this.unuseView(h,!0),b=v.get(k)),h=b[M],Y.set(k,M+1)),p.delete(h.nr.key),h.nr.used=!0,h.nr.index=f,h.nr.key=I,h.nr.type=k,p.set(I,h),w=!0;else if(!h.nr.used&&(h.nr.used=!0,w=!0,b)){const O=b.indexOf(h);O!==-1&&b.splice(O,1)}h.item=C,w&&(f===a.length-1&&this.$emit("scroll-end"),f===0&&this.$emit("scroll-start")),i===null?(h.position=d[f-1].accumulator,h.offset=0):(h.position=Math.floor(f/n)*i,h.offset=f%n*r)}return this.$_startIndex=y,this.$_endIndex=m,this.emitUpdate&&this.$emit("update",y,m,z,_),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:V}},getListenerTarget(){let e=Z(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,i=t==="vertical";let n;if(this.pageMode){const r=e.getBoundingClientRect(),s=i?r.height:r.width;let o=-(i?r.top:r.left),l=i?window.innerHeight:window.innerWidth;o<0&&(l+=o,o=0),o+l>s&&(l=s-o),n={start:o,end:o+l}}else i?n={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:n={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return n},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,H?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const i=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/i)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let i,n,r;if(this.pageMode){const s=Z(this.$el),o=s.tagName==="HTML"?0:s[t.scroll],l=s.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-l[t.start];i=s,n=t.scroll,r=e+o+u}else i=this.$el,n=t.scroll,r=e;i[n]=r},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const Se={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Ie={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function $e(e,t,i,n,r,s){const o=c.resolveComponent("ResizeObserver"),l=c.resolveDirective("observe-visibility");return c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["vue-recycle-scroller",{ready:r.ready,"page-mode":i.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...a)=>s.handleScroll&&s.handleScroll(...a))},[e.$slots.before?(c.openBlock(),c.createElementBlock("div",Se,[c.renderSlot(e.$slots,"before")],512)):c.createCommentVNode("v-if",!0),(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.listTag),{ref:"wrapper",style:c.normalizeStyle({[e.direction==="vertical"?"minHeight":"minWidth"]:r.totalSize+"px"}),class:c.normalizeClass(["vue-recycle-scroller__item-wrapper",i.listClass])},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.pool,a=>(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i.itemTag),c.mergeProps({key:a.nr.id,style:r.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${a.position}px) translate${e.direction==="vertical"?"X":"Y"}(${a.offset}px)`,width:i.gridItems?`${e.direction==="vertical"&&i.itemSecondarySize||i.itemSize}px`:void 0,height:i.gridItems?`${e.direction==="horizontal"&&i.itemSecondarySize||i.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[i.itemClass,{hover:!i.skipHover&&r.hoverKey===a.nr.key}]]},c.toHandlers(i.skipHover?{}:{mouseenter:()=>{r.hoverKey=a.nr.key},mouseleave:()=>{r.hoverKey=null}})),{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default",{item:a.item,index:a.nr.index,active:a.nr.used})]),_:2},1040,["style","class"]))),128)),c.renderSlot(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(c.openBlock(),c.createElementBlock("div",Ie,[c.renderSlot(e.$slots,"after")],512)):c.createCommentVNode("v-if",!0),c.createVNode(o,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[l,s.handleVisibilityChange]])}U.render=$e;U.__file="src/components/RecycleScroller.vue";function xe(e){const t=[];return e.forEach(i=>{if(i.includes("X")||i.includes("Y")||i.includes("Z"))return;const[n,r,s]=i.trim().split(/\s+/);t.push(+n,+r,+s)}),t}function E(e,t,i){const n=+i||0;switch(e){case"X":t.x=n;break;case"Y":t.y=n;break;case"Z":t.z=n;break}}function Te(e){const t=[],i=["X","Y","Z"];let n=0,r=0,s=0;return e.forEach(o=>{const l={x:n,y:r,z:s},a=o.trim();if(!a)return;let u=null,d="";for(let p=0;p<(a==null?void 0:a.length);p++){const v=a[p],g=i.find(x=>x===v);if(g){u&&E(u,l,d),d="",u=g;continue}d=d+v}u&&E(u,l,d),t.push(l.x,l.y,l.z),n=l.x,r=l.y,s=l.z}),t}const ke=e=>e==null?void 0:e.filter(i=>i.includes("=")),Ce=e=>e.replace(/,/g,""),Oe=e=>e==null?void 0:e.map(i=>Ce(i)),Ve=e=>{const t=ke(e);return Oe(t)};function Me(e){const t=Ve(e),i=[];return t.forEach(n=>{var p,v,g,x,y,m;let[r,s,o,l]=n.trim().split(/\s+/);s=(p=s==null?void 0:s.trim)==null?void 0:p.call(s),o=(v=o==null?void 0:o.trim)==null?void 0:v.call(o),l=(g=l==null?void 0:l.trim)==null?void 0:g.call(l);const[,a]=(x=s==null?void 0:s.split)==null?void 0:x.call(s,"="),[,u]=(y=o==null?void 0:o.split)==null?void 0:y.call(o,"="),[,d]=(m=l==null?void 0:l.split)==null?void 0:m.call(l,"=");i.push(+a,+u,+d)}),i}const Pe=e=>e>="0"&&e<="9",Ae=e=>e==="+"||e==="-",Ee=e=>e===".";function Le(e){return Pe(e)||Ae(e)||Ee(e)}function Be(e){const t=[],i=new Set(["X","Y","Z"]);let n=0,r=0,s=0;return e.forEach(o=>{const l={x:n,y:r,z:s},a=o.trim();if(!a)return;let u=!1,d=null,p="";for(let v=0;v<(a==null?void 0:a.length);v++){const g=a[v];if(g==="T")break;const x=i.has(g)?g:null,y=Le(g);if(x||!y){d&&(E(d,l,p),u=!0),d=x,p="";continue}p=p+g}d&&(E(d,l,p),u=!0),u&&(t.push(l.x,l.y,l.z),n=l.x,r=l.y,s=l.z)}),t}function Re(e){return e==null?void 0:e.includes("=")}async function Ne(e){var r,s;const t=(r=e==null?void 0:e.trim())==null?void 0:r.split(/\r?\n/);if(Re(e))return Me(t);const i=t==null?void 0:t[0],n=(s=i==null?void 0:i.trim())==null?void 0:s.split(/\s+/);if((n==null?void 0:n.length)>=3)return xe(t);if((n==null?void 0:n.length)===1)return Te(t)}async function Fe(e){const t=e.trim().split(/\r?\n/),i=[];return t.forEach(n=>{const r=n.trim().split(/\s+/);if(r.length!=3)return;const[s,o,l]=r;i.push(+s,+o,+l)}),i}async function He(e){const t=e.trim().split(/\r?\n/),i=[];return t.forEach(n=>{const r=n.trim().split(/\s+/);if(r.length!=3)return;const[s,o,l]=r;i.push(+s,+o,+l)}),i}async function Ue(e){let t=e.trim().split(/\r?\n/);return t=t.filter(n=>{const r=n.startsWith("X")||n.startsWith("Y")||n.startsWith("Z"),s=n.startsWith("G")&&(n.includes("X")||n.includes("Y")||n.includes("Z")),o=n.startsWith("N")&&(n.includes("X")||n.includes("Y")||n.includes("Z"));return r||s||o}),Be(t)}async function Ye(e,t){const{isCyd:i,isUv:n,isCpt:r,isNc:s}=t;return n?Ne(e):i?He(e):r?Fe(e):s?Ue(e):[]}function De(e){const t=[];for(let i=0;i<e.length;i+=3)t.push(new S.Vector3(e[i],e[i+1],e[i+2]));return t}function Xe(e){const t=new S.BufferGeometry,i=new Float32Array(e.length),n=new S.Color(2003455);for(let o=0;o<i.length;o+=3)i[o]=n.r,i[o+1]=n.g,i[o+2]=n.b;t.setAttribute("position",new S.Float32BufferAttribute(e,3)),t.setAttribute("color",new S.Float32BufferAttribute(i,3));const r=new S.LineBasicMaterial({vertexColors:!0,linewidth:3});return new S.Line(t,r)}function je(e,t){if(!t||t.length<3)return;const{scene:i,camera:n,renderer:r,controls:s}=e();if(!i||!n||!r||!s)return;const o=Xe(t);return o.name="轨迹路径",i.add(o),o}function Ze(e,t,i,n=4,r=50){let s=1/0,o=-1/0,l=1/0,a=-1/0,u=1/0,d=-1/0;for(let m=0;m<e.length;m+=3){const T=e[m],z=e[m+1],_=e[m+2];s=Math.min(s,T),o=Math.max(o,T),l=Math.min(l,z),a=Math.max(a,z),u=Math.min(u,_),d=Math.max(d,_)}const v=Math.sqrt((o-s)**2+(a-l)**2+(d-u)**2)*.05,g=S.MathUtils.degToRad(t.fov),x=2*Math.tan(g/2)*r,y=v/x*i.domElement.height*(n/4);return Math.min(.4,y)}function J(e){if(e.length%3!==0)return console.error("points array length is not a multiple of 3:",e),null;const t=new S.BufferGeometry;t.setAttribute("position",new S.Float32BufferAttribute(e,3));const i=new Float32Array(e.length);for(let s=0;s<e.length;s+=3)i[s]=.118,i[s+1]=.569,i[s+2]=1;t.setAttribute("color",new S.BufferAttribute(i,3));const n=new S.PointsMaterial({vertexColors:!0,size:.4,sizeAttenuation:!0}),r=new S.Points(t,n);return n.needsUpdate=!0,r}function qe(e,t){if(!t)return;const{scene:i,camera:n,renderer:r,controls:s}=e();if(!i||!n||!r||!s)return;const o=J(t);if(!o)return;o.name="轨迹路径",i.add(o);const l=Ze(t,n,r,.1,50);return o.material.size=l,o}exports.convertPointsToVector3=De;exports.drawLine=je;exports.drawPoints=qe;exports.getPointGeometry=J;exports.getPoints=Ye;exports.script$2=U;
@@ -1,5 +1,5 @@
1
1
  import { nextTick as ee, pushScopeId as le, popScopeId as ae, withScopeId as ce, createBlock as H, openBlock as C, markRaw as ue, shallowReactive as fe, resolveComponent as de, resolveDirective as he, withDirectives as me, createElementBlock as k, normalizeClass as W, createCommentVNode as q, createVNode as ye, renderSlot as A, resolveDynamicComponent as K, normalizeStyle as pe, withCtx as G, Fragment as ve, renderList as ge, mergeProps as be, toHandlers as we } from "vue";
2
- import { V as ze, J as te, C as _e, aZ as B, al as Ie, N as Se, a8 as $e, aj as xe, ar as Te, y as Ce } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CYXAbj2a.js";
2
+ import { V as ze, J as te, C as _e, aZ as B, al as Ie, N as Se, a8 as $e, aj as xe, ar as Te, y as Ce } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B3RSoHQA.js";
3
3
  function Oe() {
4
4
  var e = window.navigator.userAgent, t = e.indexOf("MSIE ");
5
5
  if (t > 0)
@@ -1,4 +1,4 @@
1
- import { r as i } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CYXAbj2a.js";
1
+ import { r as i } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B3RSoHQA.js";
2
2
  const c = 1e-3, o = (n, t) => {
3
3
  if (!t)
4
4
  return null;
@@ -1 +1 @@
1
- "use strict";const s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DpGu0pGu.cjs"),g=.001,o=(n,t)=>{if(!t)return null;const e=n.joints[t];return e||null},c=(n,t)=>{if(!t)return null;const e=o(n,t);if(!e)return null;let r=null;return e.traverse(i=>{i instanceof s.Mesh&&!r&&(r=i)}),r},l=(n,t)=>{if(!t)return null;const e=n.links[t];return e||null},a=(n,t)=>{if(!t)return null;const e=l(n,t);if(!e)return null;let r=null;return e.traverse(i=>{i instanceof s.Mesh&&!r&&(r=i)}),r},u=n=>{const t=n.joints;return Object.values(t)},f=n=>u(n).filter(r=>r.jointType!=="fixed"),J=n=>{const t=n.links;return Object.keys(t)},m=(n,t)=>{if(!n)return null;let e=null;return n.traverse(r=>{r.name===t&&(e=r.matrixWorld.clone())}),e};exports.getAllLinkName=J;exports.getJoints=u;exports.getMeshFromJoint=c;exports.getMeshFromLink=a;exports.getNonFixedJoints=f;exports.getObjectWorldMatrix=m;exports.getTargetJoint=o;exports.getTargetLink=l;exports.mm2m=g;
1
+ "use strict";const s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BkkUVCLE.cjs"),g=.001,o=(n,t)=>{if(!t)return null;const e=n.joints[t];return e||null},c=(n,t)=>{if(!t)return null;const e=o(n,t);if(!e)return null;let r=null;return e.traverse(i=>{i instanceof s.Mesh&&!r&&(r=i)}),r},l=(n,t)=>{if(!t)return null;const e=n.links[t];return e||null},a=(n,t)=>{if(!t)return null;const e=l(n,t);if(!e)return null;let r=null;return e.traverse(i=>{i instanceof s.Mesh&&!r&&(r=i)}),r},u=n=>{const t=n.joints;return Object.values(t)},f=n=>u(n).filter(r=>r.jointType!=="fixed"),J=n=>{const t=n.links;return Object.keys(t)},m=(n,t)=>{if(!n)return null;let e=null;return n.traverse(r=>{r.name===t&&(e=r.matrixWorld.clone())}),e};exports.getAllLinkName=J;exports.getJoints=u;exports.getMeshFromJoint=c;exports.getMeshFromLink=a;exports.getNonFixedJoints=f;exports.getObjectWorldMatrix=m;exports.getTargetJoint=o;exports.getTargetLink=l;exports.mm2m=g;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),v=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DpGu0pGu.cjs");const C=require("./index.vue_vue_type_style_index_1_lang-PBh9haH2.cjs");require("./index-CEwxrYB-.cjs");const s=require("./ss-component2.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-BAdh_eGu.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BQOERy34.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-B1cEBcBv.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-B8MP6uHs.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CJIlx0kh.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BVaHwt5f.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BWUv92s4.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-CEX82wRN.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-pVmmGFpg.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=C.useMenuState(),P=[r,i,c,l,m,u,a,h,f],q=e=>{P.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=v.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),v=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BkkUVCLE.cjs");const C=require("./index.vue_vue_type_style_index_1_lang-PBh9haH2.cjs");require("./index-CEwxrYB-.cjs");const s=require("./ss-component2.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-CdLPmV9p.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BrmJTI0B.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-D8agmBOg.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DqcKRmzN.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CoDkK5hg.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BVaHwt5f.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BER-9cea.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-DP_7xQQL.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-Czjy_lsO.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=C.useMenuState(),P=[r,i,c,l,m,u,a,h,f],q=e=>{P.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=v.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;
@@ -1,27 +1,27 @@
1
1
  import { defineAsyncComponent as o } from "vue";
2
2
  import { S as $ } from "./index-BHtNKL1L.js";
3
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CYXAbj2a.js";
3
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B3RSoHQA.js";
4
4
  import { u as C } from "./index.vue_vue_type_style_index_1_lang-B7HH0PCt.js";
5
5
  import "./index-CA0SFykF.js";
6
6
  import u from "./ss-component2.js";
7
7
  import { t as g, c as T, b as P } from "./index-CAPx0_D4.js";
8
- const n = o(() => import("./main-DBuDKx9k.js"));
8
+ const n = o(() => import("./main-CQ5P45HO.js"));
9
9
  n.install = (t) => {
10
10
  t.component("ssComponent", n);
11
11
  };
12
- const s = o(() => import("./index-Djzfu6It.js").then((t) => t.l));
12
+ const s = o(() => import("./index-CnERmJxh.js").then((t) => t.l));
13
13
  s.install = (t) => {
14
14
  t.component("ssTab", s);
15
15
  };
16
- const r = o(() => import("./index-DyeuJeIz.js"));
16
+ const r = o(() => import("./index-Cjax9TjT.js"));
17
17
  r.install = (t) => {
18
18
  t.component("ssMenu", r);
19
19
  };
20
- const m = o(() => import("./index-TGKm3MXI.js"));
20
+ const m = o(() => import("./index-Cx8gP3xA.js"));
21
21
  m.install = (t) => {
22
22
  t.component("ssMenuComponent", m);
23
23
  };
24
- const i = o(() => import("./index-CMiciReg.js"));
24
+ const i = o(() => import("./index-D04ebGoA.js"));
25
25
  i.install = (t) => {
26
26
  t.component("ssCanvas", i);
27
27
  };
@@ -29,15 +29,15 @@ const c = o(() => import("./index-rlStojTL.js"));
29
29
  c.install = (t) => {
30
30
  t.component("ssFold", c);
31
31
  };
32
- const l = o(() => import("./index-CJfoKnFP.js").then((t) => t.i));
32
+ const l = o(() => import("./index-ThbaNcbe.js").then((t) => t.i));
33
33
  l.install = (t) => {
34
34
  t.component("ssAvatar", l);
35
35
  };
36
- const a = o(() => import("./threeModel-DT3NAfO0.js"));
36
+ const a = o(() => import("./threeModel-OAebCYSS.js"));
37
37
  a.install = (t) => {
38
38
  t.component("ssThree", a);
39
39
  };
40
- const p = o(() => import("./threeViewerHost-BaGBR8jd.js").then((t) => t.t));
40
+ const p = o(() => import("./threeViewerHost-CTUpfC_Y.js").then((t) => t.t));
41
41
  p.install = (t) => {
42
42
  t.component("threeViewerHost", p);
43
43
  };
@@ -1 +1 @@
1
- "use strict";const n=require("vue-router"),t=[{path:"/tenant",name:"Tenant",component:async()=>Promise.resolve().then(()=>require("./index-A1rieWA1.cjs"))},{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-wUrDJFT1.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-D_Xo-WAP.cjs")),children:[{path:"系统配置/站内信",name:"Message",component:async()=>Promise.resolve().then(()=>require("./index-DPIg2S6M.cjs"))},{path:"系统配置/自动生成",name:"Automatic",component:async()=>Promise.resolve().then(()=>require("./index-B2BAJXIH.cjs"))},{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-Dq4Lwm9O.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-BKIacUel.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-BTghn1W2.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-0JtF10qC.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-CHIWRNqT.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-DOoRG-By.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-CNbYtIV_.cjs"))},{path:"系统维护/登录日志",name:"LoginLog",component:async()=>Promise.resolve().then(()=>require("./index-CdNXBIFC.cjs"))},{path:"系统维护/操作日志",name:"OperateLog",component:async()=>Promise.resolve().then(()=>require("./index-iDpB4RnF.cjs"))}]}],o=n.createRouter({history:n.createWebHashHistory(),routes:t});o.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=o;
1
+ "use strict";const n=require("vue-router"),t=[{path:"/tenant",name:"Tenant",component:async()=>Promise.resolve().then(()=>require("./index-A1rieWA1.cjs"))},{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-wUrDJFT1.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-Ca7EraIq.cjs")),children:[{path:"系统配置/站内信",name:"Message",component:async()=>Promise.resolve().then(()=>require("./index-DPIg2S6M.cjs"))},{path:"系统配置/自动生成",name:"Automatic",component:async()=>Promise.resolve().then(()=>require("./index-B2BAJXIH.cjs"))},{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-C-B1N90Y.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-Bu78K7ZG.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-4sRonvwO.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-CxNA05bD.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-C8G1ik6O.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-CsdTTuj7.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-BvHQ4rgD.cjs"))},{path:"系统维护/登录日志",name:"LoginLog",component:async()=>Promise.resolve().then(()=>require("./index-DpDOUFmB.cjs"))},{path:"系统维护/操作日志",name:"OperateLog",component:async()=>Promise.resolve().then(()=>require("./index-DHotzRf6.cjs"))}]}],o=n.createRouter({history:n.createWebHashHistory(),routes:t});o.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=o;
@@ -13,7 +13,7 @@ const a = [
13
13
  {
14
14
  path: "/",
15
15
  name: "Model",
16
- component: async () => import("./index-BQCj3fMV.js"),
16
+ component: async () => import("./index-BEmcYHbr.js"),
17
17
  // component: async ()=>import('@/components/views/model/component/main.vue'),
18
18
  // component: async ()=>import('@/components/views/canvas/index.vue'),
19
19
  // component: async ()=>import('@/components/views/test/index.vue'),
@@ -31,47 +31,47 @@ const a = [
31
31
  {
32
32
  path: "平台管理/菜单管理",
33
33
  name: "Menu",
34
- component: async () => import("./index-BAC9zNh7.js")
34
+ component: async () => import("./index-CV1On3aP.js")
35
35
  },
36
36
  {
37
37
  path: "平台管理/主菜单管理",
38
38
  name: "MainMenu",
39
- component: async () => import("./index-ChCxwtv1.js")
39
+ component: async () => import("./index-oXfFN0Pr.js")
40
40
  },
41
41
  {
42
42
  path: "系统管理/个人中心",
43
43
  name: "PersonalCenter",
44
- component: async () => import("./index-BOb1nNwq.js")
44
+ component: async () => import("./index-BWlbMCvF.js")
45
45
  },
46
46
  {
47
47
  path: "系统管理/职位管理",
48
48
  name: "Post",
49
- component: async () => import("./index-CeuUur0J.js")
49
+ component: async () => import("./index-_qmANZPg.js")
50
50
  },
51
51
  {
52
52
  path: "系统管理/用户管理",
53
53
  name: "User",
54
- component: async () => import("./index-BW7PEvq0.js")
54
+ component: async () => import("./index-CFp-3Ii5.js")
55
55
  },
56
56
  {
57
57
  path: "系统管理/角色管理",
58
58
  name: "Role",
59
- component: async () => import("./index-8dhcui8A.js")
59
+ component: async () => import("./index-BeRXwYS6.js")
60
60
  },
61
61
  {
62
62
  path: "系统管理/部门管理",
63
63
  name: "Dept",
64
- component: async () => import("./index-cAtiRq0m.js")
64
+ component: async () => import("./index-DHHOxu2C.js")
65
65
  },
66
66
  {
67
67
  path: "系统维护/登录日志",
68
68
  name: "LoginLog",
69
- component: async () => import("./index-FrPdQKQq.js")
69
+ component: async () => import("./index-D54GltRD.js")
70
70
  },
71
71
  {
72
72
  path: "系统维护/操作日志",
73
73
  name: "OperateLog",
74
- component: async () => import("./index-DlMQigjS.js")
74
+ component: async () => import("./index-B_hltucu.js")
75
75
  }
76
76
  // {
77
77
  // path: 'priority',
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DpGu0pGu.cjs"),pe=require("./OrbitControls-DvnUitVd.cjs"),me=require("./index-sVdFHyjl.cjs"),fe=require("./index.vue_vue_type_style_index_1_lang-DiCmmZWZ.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=require("./index-CEwxrYB-.cjs"),ae=require("./robotUtil-CI-r19FW.cjs");function ve(z){let g=null,u=null,d=null,h=null,x=null,P=null,c=null,C=null;const D=1e3/30;let S=0;const b=e.ref([]),r=e.ref(new n.Vector3),k=e.ref(new n.Vector3),y=()=>{if(!z.value)return;g=new n.Scene,g.background=new n.Color(15790320);const f=z.value;u=new n.PerspectiveCamera(75,f.clientWidth/f.clientHeight,.1,1e4),u.position.set(8,-8,6),u.up.set(0,0,1),u.lookAt(0,0,0),d=new n.WebGLRenderer({antialias:!0,alpha:!0}),d.setSize(f.clientWidth,f.clientHeight),d.localClippingEnabled=!0,d.shadowMap.enabled=!0,d.shadowMap.type=n.PCFSoftShadowMap,d.toneMapping=n.ACESFilmicToneMapping,d.toneMappingExposure=1,d.outputColorSpace=n.SRGBColorSpace,f.appendChild(d.domElement),h=new pe.OrbitControls(u,d.domElement),h.enableDamping=!0,h.dampingFactor=.05,h.mouseButtons={LEFT:null,MIDDLE:n.MOUSE.PAN,RIGHT:n.MOUSE.ROTATE},h.panSpeed=.7,x=new n.Xe(u,d,{container:f,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),x.attachControls(h),m(),_()},t=(f,l)=>{c&&(g.remove(c),c.dispose()),C&&(g.remove(C),C.geometry.dispose(),C.material.dispose());const E=Math.min(Math.max(Math.floor(f/20),30),40);c=new n.GridHelper(f,E,13421772,14540253),c.rotateX(Math.PI/2),c.position.copy(l),g.add(c);const B=new n.PlaneGeometry(f,f),O=new n.ShadowMaterial({opacity:.3,color:0});C=new n.Mesh(B,O),C.position.copy(l),C.position.z-=.01,C.receiveShadow=!0,g.add(C)},p=()=>{if(b.value.length===0)return;const f=new n.Box3;let l=!1;if(b.value.forEach(X=>{if(X.userData.boundingBox)f.union(X.userData.boundingBox),l=!0;else if(X.userData.modelId&&modelBoundingBoxes.has(X.userData.modelId)){const Z=modelBoundingBoxes.get(X.userData.modelId);f.union(Z.box),l=!0}else f.expandByObject(X),l=!0}),!l){console.warn("无法计算包围盒,网格更新失败");return}const E=f.getSize(new n.Vector3),B=f.getCenter(new n.Vector3),O=Math.max(E.x,E.y,E.z),j=Math.max(O*8,50),q=new n.Vector3(B.x,B.y,f.min.z);t(j,q)},m=()=>{const f=new n.AmbientLight(4210752,.6);g.add(f);const l=new n.DirectionalLight(16777215,2);l.position.set(10,10,8),l.castShadow=!0,l.shadow.mapSize.width=4096,l.shadow.mapSize.height=4096,l.shadow.camera.near=.5,l.shadow.camera.far=50,l.shadow.camera.left=-50,l.shadow.camera.right=50,l.shadow.camera.top=50,l.shadow.camera.bottom=-50,g.add(l);const E=new n.DirectionalLight(16777215,.8);E.position.set(-8,-8,6),g.add(E);const B=new n.DirectionalLight(16777215,.6);B.position.set(0,-15,2),g.add(B);const O=new n.HemisphereLight(16777215,4473924,.8);g.add(O);const j=new n.PointLight(16777215,1,50);j.position.set(15,15,15),g.add(j);const q=new n.PointLight(16777215,.5,50);q.position.set(-15,-15,15),g.add(q)},_=()=>{P=requestAnimationFrame(_),h&&h.update();const f=performance.now(),l=f-S;l<D||(S=f-l%D,d&&g&&u&&d.render(g,u),x&&x.render())},I=f=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(E=>{f[E]&&f[E].dispose&&f[E].dispose()}),f.dispose&&f.dispose()},A=f=>{f==null||f.traverse(l=>{l.geometry&&l.geometry.dispose(),l.material&&(Array.isArray(l.material)?l.material.forEach(E=>{I(E)}):I(l.material))})};return{currentModels:b,initialCameraPosition:r,initialTargetPosition:k,initThreeJS:y,handleResize:()=>{if(!z.value||!u||!d||!x)return;const f=z.value,l=f.clientWidth,E=f.clientHeight;u.aspect=l/E,u.updateProjectionMatrix(),d.setSize(l,E),x.update()},fitCameraToAllModels:f=>{if(!u||!h||b.value.length===0)return;const l=new n.Box3;let E=!1;if(b.value.forEach(Z=>{if(Z.userData.boundingBox)l.union(Z.userData.boundingBox),E=!0;else if(Z.userData.modelId&&f.has(Z.userData.modelId)){const ee=f.get(Z.userData.modelId);l.union(ee.box),E=!0}else l.expandByObject(Z),E=!0}),!E){console.warn("无法计算包围盒");return}const B=l.getSize(new n.Vector3),O=l.getCenter(new n.Vector3),q=Math.max(B.x,B.y,B.z)*.8,X=new n.Vector3(O.x+q,O.y-q,O.z+q);u.position.copy(X),u.lookAt(O),h.target.copy(O),h.update(),r.value.copy(X),k.value.copy(O),p()},getThreeJSObjects:()=>({scene:g,camera:u,renderer:d,controls:h,gizmo:x}),clearAllModels:()=>{if(!g)return;b.value.forEach(l=>{g.remove(l),A(l)});const f=[];g.children.forEach(l=>{!l.isLight&&!l.isCamera&&l.type!=="GridHelper"&&l!==C&&f.push(l)}),f.forEach(l=>{g.remove(l),A(l)}),b.value=[],p()},cleanup:()=>{P&&cancelAnimationFrame(P),c&&c.dispose(),C&&(C.geometry.dispose(),C.material.dispose()),d&&d.dispose(),h&&h.dispose(),x&&x.dispose()},updateGridForModels:p}}function ge(z,g){const u=e.ref(!1);let d=null,h=12700,x=new n.Vector3,P=new n.Vector3,c=new n.Vector3,C=0,F=null;const D=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,S=t=>{const p=new n.Vector3,m=C*1.2,_=new n.Vector3(c.x+m,c.y,c.z),I=new n.Vector3(c.x,c.y+m,c.z),A=new n.Vector3(c.x,c.y-m,c.z);if(t<=.567){const $=t/.567*Math.PI*2;p.x=c.x+Math.cos($)*m,p.z=c.z+Math.sin($)*m,p.y=c.y}else if(t<=.724){const L=(t-.567)/.157,$=D(L);p.lerpVectors(_,I,$)}else if(t<=.881){const L=(t-.724)/.157,J=D(L)*Math.PI;p.x=c.x+Math.sin(J)*m,p.y=c.y+Math.cos(J)*m,p.z=c.z}else{const L=(t-.881)/.119,$=D(L);p.lerpVectors(A,x,$)}return p},b=()=>{const{camera:t,controls:p}=z();if(!t||!p)return;d||(d=Date.now());const m=Date.now()-d,_=Math.min(m/h,1);if(_>=1){k();return}const I=S(_);t.position.copy(I),t.lookAt(c),p.target.copy(c),F=requestAnimationFrame(b)},r=()=>{if(g.value.length===0)return;const{camera:t,controls:p}=z();if(!t||!p)return;x.copy(t.position),P.copy(p.target);const m=new n.Box3;g.value.forEach(G=>{m.expandByObject(G)});const _=m.getSize(new n.Vector3);c=m.getCenter(new n.Vector3),C=Math.max(_.x,_.y,_.z)*1.2;const I=new n.Vector3(c.x+C*1.2,c.y,c.z);p.enabled=!1;const A=t.position.clone(),L=1e3,$=Date.now(),J=()=>{const G=Date.now()-$,Y=Math.min(G/L,1),f=D(Y);t.position.lerpVectors(A,I,f),t.lookAt(c),p.target.copy(c),Y<1?requestAnimationFrame(J):(u.value=!0,d=null,b())};J()},k=()=>{u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{controls:t}=z();t&&(t.enabled=!0,t.target.copy(P))};return{isAnimating:u,toggleAnimation:()=>{if(u.value){u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{camera:t,controls:p}=z();if(!t||!p)return;p.enabled=!0;const m=t.position.clone(),_=p.target.clone(),I=1500,A=Date.now(),L=()=>{const $=Date.now()-A,J=Math.min($/I,1),G=D(J);t.position.lerpVectors(m,x,G),p.target.lerpVectors(_,P,G),J<1&&requestAnimationFrame(L)};L()}else r()},startAnimation:r,stopAnimation:k}}function he(z,g){const u=e.ref(!1),d=e.ref("none");let h=[],x=[],P=new n.Box3,c=new n.Vector3;const C=()=>{h=[new n.Plane(new n.Vector3(1,0,0),0),new n.Plane(new n.Vector3(0,1,0),0),new n.Plane(new n.Vector3(0,0,1),0)]},F=()=>{P.makeEmpty(),g.value.forEach(y=>{P.expandByObject(y)}),c=P.getCenter(new n.Vector3)},D=y=>{const t=P.getSize(new n.Vector3);let p,m,_;y==="x"?(p=new n.PlaneGeometry(t.z*1.2,t.y*1.2),m=new n.Vector3(c.x,c.y,c.z),_=new n.Euler(0,Math.PI/2,0)):y==="y"?(p=new n.PlaneGeometry(t.x*1.2,t.z*1.2),m=new n.Vector3(c.x,c.y,c.z),_=new n.Euler(Math.PI/2,0,0)):y==="z"&&(p=new n.PlaneGeometry(t.x*1.2,t.y*1.2),m=new n.Vector3(c.x,c.y,c.z),_=new n.Euler(0,0,0));const I=new n.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:n.DoubleSide,depthWrite:!1}),A=new n.Mesh(p,I);return A.position.copy(m),A.rotation.copy(_),A},S=()=>{if(b(),r(),d.value==="none")return;F();let y=null;if(d.value==="x"?(h[0].constant=-c.x,y=h[0]):d.value==="y"?(h[1].constant=-c.y,y=h[1]):d.value==="z"&&(h[2].constant=-c.z,y=h[2]),y){g.value.forEach(p=>{p.traverse(m=>{(m.isMesh&&m.material||m.isLine&&m.material||m.isPoints&&m.material)&&(Array.isArray(m.material)?m.material.forEach(_=>{_.clippingPlanes=[y]}):m.material.clippingPlanes=[y])})});const{scene:t}=z();if(t){const p=D(d.value);t.add(p),x.push(p)}}},b=()=>{g.value.forEach(y=>{y.traverse(t=>{(t.isMesh&&t.material||t.isLine&&t.material||t.isPoints&&t.material)&&(Array.isArray(t.material)?t.material.forEach(p=>{p.clippingPlanes=[]}):t.material.clippingPlanes=[])})})},r=()=>{const{scene:y}=z();y&&x.forEach(t=>{y.remove(t),t.geometry.dispose(),t.material.dispose()}),x=[]};return{isClipping:u,activeClippingAxis:d,toggleClipping:()=>{u.value=!u.value,u.value?(C(),g.value.length>0&&F()):(d.value="none",b(),r())},updateClippingPlanes:S,clearClippingPlanes:b,clearClippingMeshes:r}}const ye={class:"panel-content"},we={__name:"animationPanel",props:{animationData:Object,model:Object},setup(z){const g=z;e.ref();const u=e.ref();return e.watch(()=>[g==null?void 0:g.animationData],()=>{var h;let d=((h=re.cloneDeep(g==null?void 0:g.animationData))==null?void 0:h["输出(动画数据)Content"])??[];d&&(u.value=d)},{deep:!0,immediate:!0}),(d,h)=>{var x,P,c;return e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(me.ssTable,{itemData:(x=u.value)==null?void 0:x.compData,key:(P=u.value)==null?void 0:P.id,index:(c=u.value)==null?void 0:c.id,showHeader:!1},null,8,["itemData","index"]))])}}},xe=oe._export_sfc(we,[["__scopeId","data-v-2387536e"]]),Ve={class:"panel-content"},Me={key:0,class:"joints-list"},ke={class:"joint-info-row"},Pe={class:"joint-left"},_e={class:"joint-name"},Ce={class:"joint-range"},be={class:"joint-type"},Ee={key:0,class:"joint-control-row"},ze={class:"slider-container"},De=["min","max","value","onInput","disabled"],Ne={class:"value-display"},Se={class:"joint-value"},Be={class:"unit"},Ae={key:1,class:"empty-state"},Re=1e3,ue=60,Fe={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(z,{expose:g}){const u=z;e.ref(!0);const d=e.ref([]),h=e.ref(null),x=e.ref(null),P=e.ref(12.5),c=e.ref(),C=e.ref(1302),F=e.ref(30),D=e.ref(!1),S=e.ref(!1),b=e.ref(0),r=e.ref(0),k=e.ref(null),y=n.MathUtils.degToRad,t=e.ref(1),p=()=>Re/ue/t.value;let m=[];e.watch(()=>u.animationData,o=>{var i;C.value=o.extra.管长,P.value=o.extra.外径/2;let v=((i=re.cloneDeep(o))==null?void 0:i["输出(动画数据)"])??[];v&&v.length>0&&(m=v)},{deep:!0}),e.computed(()=>m.length>0);const _=(o,v=!1)=>o==="revolute"?v?Math.PI:-Math.PI:o==="prismatic"?v?1:-1:0,I=()=>{if(!h.value)return re.ElMessage.error("未加载 URDF"),!1;let o=null;return h.value.traverse(v=>{o||v.name==="Pipe_Link"&&v.traverse(i=>{i instanceof n.Mesh&&!o&&(o=i)})}),o?(o.position.y-=F.value*ae.mm2m,c.value=o,o.material=new n.MeshPhongMaterial({color:11184810,shininess:80,side:n.DoubleSide}),!0):(re.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},A=o=>{if(!o||!o.joints)return console.warn("URDF模型没有关节信息"),[];let v=null;if(o.traverse(V=>{V.name==="Pipe_Link"&&!v&&(v=V)}),v)c.value=v;else return console.warn("未找到管子模型"),[];const i=[];return Object.keys(o.joints).forEach(V=>{const s=o.joints[V];if(s._jointType==="fixed")return;const a=s.limit?{lower:s.limit.lower??_(s._jointType,!1),upper:s.limit.upper??_(s._jointType,!0)}:{lower:_(s._jointType,!1),upper:_(s._jointType,!0)};i.push({name:V,type:s._jointType||"unknown",limit:a,currentValue:s.angle||0,urdfJoint:s})}),i.sort((V,s)=>V.name.localeCompare(s.name))},L=(o,v)=>{const i=d.value.find(s=>s.name===o);if(!i)return;const V=parseFloat(v);if(i.limit){const s=Math.max(i.limit.lower,Math.min(i.limit.upper,V));i.currentValue=s}else i.currentValue=V;u.model&&u.model.setJointValue?u.model.setJointValue(o,i.currentValue):i.urdfJoint&&i.urdfJoint.setJointValue(i.currentValue)},$=o=>o.reduce((v,i)=>{let V=0;const s=i.Y??0,a=i.C??0,w=i.R??0;return s>0&&(V+=s),a>0&&w>0&&(V+=w*y(a)),v+V},0),J=o=>{const v=[],i=o.Y??0,V=o.B??0,s=o.C??0,a=o.R??0,w={pos:new n.Vector3(0,0,0),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};if(!i&&!s)return v;if(v.push(w.pos.clone()),V!==0){const U=new n.Matrix4().makeRotationAxis(w.localY,y(V));w.localX.applyMatrix4(U),w.localZ.applyMatrix4(U)}if(i>0&&(w.pos.add(w.localY.clone().multiplyScalar(i*ae.mm2m)),v.push(w.pos.clone())),s>0&&a>0){const U=y(s),T=a*ae.mm2m,W=w.pos.clone().add(w.localX.clone().multiplyScalar(-T)),R=Math.max(16,Math.ceil(s/5));for(let M=1;M<=R;M++){const H=U*M/R,K=new n.Matrix4().makeRotationAxis(w.localZ,H),se=w.localX.clone().multiplyScalar(T).applyMatrix4(K),ie=W.clone().add(se);v.push(ie)}}return v},G=(o,v=0)=>{let i=m.slice(0,o+1);const V=m[o+1];if(V&&v>0){const R={...V,B:(V.B??0)*v,C:(V.C??0)*v};i.push(R)}const s=$(i),a=Math.max(0,C.value-s),w=[];w.push(new n.Vector3(0,0,0));const U=new n.Vector3(0,a*ae.mm2m,0);a>0&&w.push(U);let T={pos:U.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const W=[];for(let R=i.length-1;R>=0;R--){const M=i[R],H=J(M);if(H.length>0){const K=H.map(Q=>{const ne=Q.clone(),de=new n.Matrix4;return de.makeBasis(T.localX,T.localY,T.localZ),ne.applyMatrix4(de),ne.add(T.pos)});W.push(K);const te=K[K.length-1];T.pos=te.clone();const se=M.B??0,ie=M.C??0;if(se!==0){const Q=new n.Matrix4().makeRotationAxis(T.localY,y(se));T.localX.applyMatrix4(Q),T.localZ.applyMatrix4(Q)}if(ie>0){const Q=y(ie),ne=new n.Matrix4().makeRotationAxis(T.localZ,Q);T.localY.applyMatrix4(ne),T.localX.applyMatrix4(ne)}}}for(const R of W)R.length>1&&w.push(...R.slice(1));w.length<2&&w.push(new n.Vector3(0,.001,0));try{const R=new n.CatmullRomCurve3(w,!1,"catmullrom",.01),M=new n.TubeGeometry(R,Math.max(2,w.length*4),P.value*ae.mm2m,18,!1);c.value.geometry.dispose(),c.value.geometry=M}catch(R){console.error("管件更新失败",R)}},Y=(o,v,i=1)=>{o&&(Object.keys(o).forEach(V=>{const s=o[V],a=d.value.find(w=>w.name===V);a&&(a.currentValue=s,u.model&&u.model.setJointValue?u.model.setJointValue(V,s):a.urdfJoint&&a.urdfJoint.setJointValue(s))}),G(v,i))},f=(o,v,i)=>o+(v-o)*i,l=(o,v,i)=>{if(!o||!v)return o||v;const V={};return Object.keys(o).forEach(s=>{const a=o[s],w=v[s];V[s]=f(a,w||a,i)}),V},E=()=>{if(m.length===0){console.warn("没有动画数据");return}I(),D.value=!0,S.value=!1,b.value=0,r.value=0,B()},B=()=>{if(!D.value||S.value)return;const o=b.value;if(o>=m.length-1){const s=m[m.length-1];Y(s,m.length-1,1),j();return}const v=r.value/ue,i=m[o],V=m[o+1];if(V){const s=l(i,V,v);Y(s,o,v)}else Y(i,o);r.value++,r.value>ue&&(r.value=0,b.value++),k.value=setTimeout(B,p())},O=()=>{S.value=!0,k.value&&(clearTimeout(k.value),k.value=null)},j=()=>{D.value=!1,S.value=!1,t.value=1,k.value&&(clearTimeout(k.value),k.value=null)};g({startAnimation:E,pauseAnimation:O,stopAnimation:j,resetAll:()=>{j(),b.value=0,r.value=0,d.value.forEach(o=>{(o.type==="revolute"||o.type==="prismatic")&&L(o.name,0)}),G(-1,0)},fastForward:()=>{t.value<4&&(t.value=Math.min(4,t.value*2))},fastBackward:()=>{t.value>.25&&(t.value=Math.max(.25,t.value/2))}}),e.watch(()=>u.model,o=>{o?(h.value=o,d.value=A(o)):d.value=[]},{immediate:!0});const ee=()=>{!u.model||D.value&&!S.value||d.value.forEach(o=>{o.urdfJoint&&o.urdfJoint.angle!==void 0&&(o.currentValue=o.urdfJoint.angle)})},le=()=>{const o=()=>{ee(),x.value=requestAnimationFrame(o)};o()},ce=()=>{x.value&&(cancelAnimationFrame(x.value),x.value=null)};return e.onMounted(()=>{le()}),e.onUnmounted(()=>{ce(),j()}),(o,v)=>(e.openBlock(),e.createElementBlock("div",Ve,[d.value.length>0?(e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,i=>{var V,s,a,w;return e.openBlock(),e.createElementBlock("div",{key:i.name,class:"joint-item"},[e.createElementVNode("div",ke,[e.createElementVNode("div",Pe,[e.createElementVNode("span",_e,e.toDisplayString(i.name),1),e.createElementVNode("span",Ce," ["+e.toDisplayString(((V=i.limit)==null?void 0:V.lower.toFixed(2))??(i.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((s=i.limit)==null?void 0:s.upper.toFixed(2))??(i.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",be,e.toDisplayString(i.type),1)]),i.type==="revolute"||i.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",ze,[e.createElementVNode("input",{type:"range",min:((a=i.limit)==null?void 0:a.lower)??(i.type==="revolute"?-Math.PI:-1),max:((w=i.limit)==null?void 0:w.upper)??(i.type==="revolute"?Math.PI:1),step:.01,value:i.currentValue,onInput:U=>L(i.name,U.target.value),class:"joint-slider",disabled:D.value&&!S.value},null,40,De)]),e.createElementVNode("div",Ne,[e.createElementVNode("span",Se,e.toDisplayString(i.currentValue?Number(i.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",Be,e.toDisplayString(i.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",Ae,v[0]||(v[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},Te=oe._export_sfc(Fe,[["__scopeId","data-v-d48ad0d8"]]),Le={class:"panel-content"},Ie="id",$e={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:z=>["breadth","firstLevel"].includes(z)}},emits:["nodeClick"],setup(z,{emit:g}){const u=z,d=g,h=e.ref([]),x={children:"children",label:"label"},P=r=>{d("nodeClick",r)},c=(r,k=0)=>{const y=[];return Array.isArray(r)&&(r==null?void 0:r.length)>0&&r.forEach(t=>{if(!(t!=null&&t.isMesh)&&((t==null?void 0:t.type)==="URDFJoint"||(t==null?void 0:t.type)==="URDFLink")){const p={name:t==null?void 0:t.name,label:t==null?void 0:t.name,show:!0,level:k+1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:c(t==null?void 0:t.children,k+1),path:t==null?void 0:t.name};y.push(p)}}),y},C=r=>r?[{name:r==null?void 0:r.name,label:r==null?void 0:r.name,show:!0,level:1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:c(r==null?void 0:r.children,1),path:r==null?void 0:r.name}]:[],F=(r,k)=>{const y=[],t=[...r];for(;t.length>0&&y.length<k;){const p=t.shift();p.children&&p.children.length>0&&(y.push(p.id),t.push(...p.children))}return y},D=(r,k)=>{const y=[];return r.forEach(t=>{if(t.children&&t.children.length>0){y.push(t.id);const p=t.children.filter(m=>m.children&&m.children.length>0).slice(0,k).map(m=>m.id);y.push(...p)}}),y.slice(0,k+1)},S=e.computed(()=>!h.value||h.value.length===0?[]:u.expandStrategy==="firstLevel"?D(h.value,u.maxExpandCount):F(h.value,u.maxExpandCount)),b=e.computed(()=>u!=null&&u.model?C(u.model):[]);return e.watch(b,r=>{h.value=JSON.parse(JSON.stringify(r))},{immediate:!0}),(r,k)=>{const y=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(y,{data:h.value,props:x,"default-expanded-keys":S.value,"node-key":Ie,onNodeClick:P},null,8,["data","default-expanded-keys"])])}}},Je=oe._export_sfc($e,[["__scopeId","data-v-290ff4e1"]]),Oe=["xlink:href"],Ue=e.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(z){const g=z,u=e.computed(()=>({backgroundColor:g.backgroundColor})),d=e.computed(()=>`#${g.prefix}-${g.name}`),h=e.computed(()=>{const{size:x}=g;let P=`${x}`;return P=`${P.replace("px","")}px`,{width:P,height:P}});return(x,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:x.active}]),style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[x.$attrs.class,x.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(h.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":d.value},null,8,Oe)],6))],6))}}),N=oe._export_sfc(Ue,[["__scopeId","data-v-6b1132f4"]]),Ge={class:"obj-viewer-container"},je={class:"buttonGroup-top"},qe={class:"buttonGroup-topLeft"},Xe={class:"buttonGroup-left"},He={class:"buttonGroup-right"},Ye={class:"buttonGroup-bottom"},Ze={class:"left-panel"},We={class:"panel-header"},Ke={key:1,class:"clipping-content"},Qe={class:"radio-group"},et={class:"radio-label"},tt={class:"radio-label"},nt={class:"radio-label"},at={class:"radio-label"},ot={class:"right-panel"},lt={class:"panel-header"},st={key:0,class:"loading-overlay"},it={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(z,{expose:g,emit:u}){const d=u;let h=null,x=!1;const P=e.ref(null),c=e.ref(!1),C=e.ref("");e.ref(!1);const F=e.ref(!1),D=e.ref(!1),S=e.ref(""),b=e.ref(!1),r=e.ref(""),k=e.ref(),{currentModels:y,initialCameraPosition:t,initialTargetPosition:p,initThreeJS:m,handleResize:_,fitCameraToAllModels:I,getThreeJSObjects:A,clearAllModels:L,cleanup:$}=ve(P),{isAnimating:J,toggleAnimation:G,stopAnimation:Y}=ge(A,y),{isClipping:f,activeClippingAxis:l,toggleClipping:E,updateClippingPlanes:B}=he(A,y),{addModelsFromUrls:O,loadModelByDefaultPath:j,urdfModel:q,modelBoundingBoxes:X}=fe.useModelLoader(A,y,c,C,L),Z=()=>{if(F.value||y.value.length===0)return;F.value=!0,J.value&&Y();const{camera:s,controls:a}=A();if(!s||!a)return;a.enabled=!0;const w=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,U=s.position.clone(),T=a.target.clone(),W=1500,R=Date.now(),M=()=>{const H=Date.now()-R,K=Math.min(H/W,1),te=w(K);s.position.lerpVectors(U,t.value,te),a.target.lerpVectors(T,p.value,te),K<1?requestAnimationFrame(M):F.value=!1};M()},ee=async()=>x?Promise.resolve():new Promise(s=>{const a=()=>{x?s():requestAnimationFrame(a)};a()}),le=async(s,a)=>{try{await ee(),J.value&&Y(),f.value&&E();const w=await a(s);return I(X),w}catch(w){throw console.error("加载模型失败:",w),w}},ce=async s=>le(s,O),o=async s=>le(s,j),v=s=>{D.value=!0,S.value=s,s==="剖面视图"&&!f.value&&E()},i=s=>{b.value=!0,r.value=s,s==="动画仿真"&&d("getAnimationData")},V=()=>{e.nextTick(()=>{var s;(s=k.value)==null||s.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{m(),h=A().scene,x=!0,window.addEventListener("resize",_)}catch(s){console.error("Three.js初始化失败:",s)}}),e.onBeforeUnmount(()=>{x=!1,S.value="",r.value="",window.removeEventListener("resize",_),J.value&&Y(),$()}),g({addModelsFromUrls:ce,loadModelByDefaultPath:o}),(s,a)=>{var U,T,W,R;const w=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Ge,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:P,class:"threejs-container"},null,512),e.createElementVNode("div",je,[e.createVNode(N,{name:"guanjianjiexi",size:"34"}),e.createVNode(N,{name:"guanjiekongzhi",size:"34"}),e.createVNode(N,{name:"gongyishengcheng",size:"34"}),e.createVNode(N,{name:"buchangshezhi",size:"34"}),e.createVNode(N,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",qe,[e.createVNode(N,{name:"viewReset",size:"24",onClick:Z,title:"重置"}),e.createVNode(N,{name:"fangda",size:"24",title:"放大"}),e.createVNode(N,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(N,{name:"lookAround",size:"24",onClick:e.unref(G),title:e.unref(J)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",Xe,[e.createVNode(N,{name:"jiegoushu",size:"24",onClick:a[0]||(a[0]=M=>v("场景树")),active:D.value&&S.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(N,{name:"clipping",size:"24",onClick:a[1]||(a[1]=M=>v("剖面视图")),active:D.value&&S.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[2]||(a[2]=M=>v("场景树3"))}),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[3]||(a[3]=M=>v("场景4"))})]),e.createElementVNode("div",He,[e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"guanjiekongzhi",size:"24",onClick:a[4]||(a[4]=M=>i("关节控制")),active:b.value&&r.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:a[5]||(a[5]=M=>i("动画仿真")),active:b.value&&r.value==="动画仿真"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",Ye,[e.createVNode(N,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(U=k.value)==null?void 0:U.fastBackward},null,8,["onClick"]),e.createVNode(N,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:V}),e.createVNode(N,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(T=k.value)==null?void 0:T.fastForward},null,8,["onClick"]),e.createVNode(N,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(W=k.value)==null?void 0:W.pauseAnimation},null,8,["onClick"]),e.createVNode(N,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(R=k.value)==null?void 0:R.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",Ze,[e.createElementVNode("div",We,[e.createElementVNode("span",null,e.toDisplayString(S.value),1),e.createElementVNode("span",{class:"close",onClick:a[6]||(a[6]=M=>D.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[S.value==="场景树"?(e.openBlock(),e.createBlock(Je,{key:0,model:e.unref(q)},null,8,["model"])):e.createCommentVNode("",!0),S.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",Qe,[e.createElementVNode("label",et,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":a[7]||(a[7]=M=>e.isRef(l)?l.value=M:null),onChange:a[8]||(a[8]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[16]||(a[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",tt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":a[9]||(a[9]=M=>e.isRef(l)?l.value=M:null),onChange:a[10]||(a[10]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[17]||(a[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",nt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":a[11]||(a[11]=M=>e.isRef(l)?l.value=M:null),onChange:a[12]||(a[12]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[18]||(a[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",at,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":a[13]||(a[13]=M=>e.isRef(l)?l.value=M:null),onChange:a[14]||(a[14]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[19]||(a[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,D.value]]),e.withDirectives(e.createElementVNode("div",ot,[e.createElementVNode("div",lt,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:a[15]||(a[15]=M=>b.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Te,{ref_key:"jointRef",ref:k,model:e.unref(q),scene:e.unref(h),animationData:z.animationData},null,8,["model","scene","animationData"]),[[e.vShow,r.value==="关节控制"]]),e.withDirectives(e.createVNode(xe,{animationData:z.animationData},null,8,["animationData"]),[[e.vShow,r.value==="动画仿真"]])]),_:1})],512),[[e.vShow,b.value]]),c.value?(e.openBlock(),e.createElementBlock("div",st,[a[20]||(a[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(C.value),1)])):e.createCommentVNode("",!0)])}}},rt=oe._export_sfc(it,[["__scopeId","data-v-7bc47bb3"]]);exports.default=rt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BkkUVCLE.cjs"),pe=require("./OrbitControls-kK6BBpL4.cjs"),me=require("./index-C89mMUM5.cjs"),fe=require("./index.vue_vue_type_style_index_1_lang-D_Jkk1jj.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=require("./index-CEwxrYB-.cjs"),ae=require("./robotUtil-CHCt1RuS.cjs");function ve(z){let g=null,u=null,d=null,h=null,x=null,P=null,c=null,C=null;const D=1e3/30;let S=0;const b=e.ref([]),r=e.ref(new n.Vector3),k=e.ref(new n.Vector3),y=()=>{if(!z.value)return;g=new n.Scene,g.background=new n.Color(15790320);const f=z.value;u=new n.PerspectiveCamera(75,f.clientWidth/f.clientHeight,.1,1e4),u.position.set(8,-8,6),u.up.set(0,0,1),u.lookAt(0,0,0),d=new n.WebGLRenderer({antialias:!0,alpha:!0}),d.setSize(f.clientWidth,f.clientHeight),d.localClippingEnabled=!0,d.shadowMap.enabled=!0,d.shadowMap.type=n.PCFSoftShadowMap,d.toneMapping=n.ACESFilmicToneMapping,d.toneMappingExposure=1,d.outputColorSpace=n.SRGBColorSpace,f.appendChild(d.domElement),h=new pe.OrbitControls(u,d.domElement),h.enableDamping=!0,h.dampingFactor=.05,h.mouseButtons={LEFT:null,MIDDLE:n.MOUSE.PAN,RIGHT:n.MOUSE.ROTATE},h.panSpeed=.7,x=new n.Xe(u,d,{container:f,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),x.attachControls(h),m(),_()},t=(f,l)=>{c&&(g.remove(c),c.dispose()),C&&(g.remove(C),C.geometry.dispose(),C.material.dispose());const E=Math.min(Math.max(Math.floor(f/20),30),40);c=new n.GridHelper(f,E,13421772,14540253),c.rotateX(Math.PI/2),c.position.copy(l),g.add(c);const B=new n.PlaneGeometry(f,f),O=new n.ShadowMaterial({opacity:.3,color:0});C=new n.Mesh(B,O),C.position.copy(l),C.position.z-=.01,C.receiveShadow=!0,g.add(C)},p=()=>{if(b.value.length===0)return;const f=new n.Box3;let l=!1;if(b.value.forEach(X=>{if(X.userData.boundingBox)f.union(X.userData.boundingBox),l=!0;else if(X.userData.modelId&&modelBoundingBoxes.has(X.userData.modelId)){const Z=modelBoundingBoxes.get(X.userData.modelId);f.union(Z.box),l=!0}else f.expandByObject(X),l=!0}),!l){console.warn("无法计算包围盒,网格更新失败");return}const E=f.getSize(new n.Vector3),B=f.getCenter(new n.Vector3),O=Math.max(E.x,E.y,E.z),j=Math.max(O*8,50),q=new n.Vector3(B.x,B.y,f.min.z);t(j,q)},m=()=>{const f=new n.AmbientLight(4210752,.6);g.add(f);const l=new n.DirectionalLight(16777215,2);l.position.set(10,10,8),l.castShadow=!0,l.shadow.mapSize.width=4096,l.shadow.mapSize.height=4096,l.shadow.camera.near=.5,l.shadow.camera.far=50,l.shadow.camera.left=-50,l.shadow.camera.right=50,l.shadow.camera.top=50,l.shadow.camera.bottom=-50,g.add(l);const E=new n.DirectionalLight(16777215,.8);E.position.set(-8,-8,6),g.add(E);const B=new n.DirectionalLight(16777215,.6);B.position.set(0,-15,2),g.add(B);const O=new n.HemisphereLight(16777215,4473924,.8);g.add(O);const j=new n.PointLight(16777215,1,50);j.position.set(15,15,15),g.add(j);const q=new n.PointLight(16777215,.5,50);q.position.set(-15,-15,15),g.add(q)},_=()=>{P=requestAnimationFrame(_),h&&h.update();const f=performance.now(),l=f-S;l<D||(S=f-l%D,d&&g&&u&&d.render(g,u),x&&x.render())},I=f=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(E=>{f[E]&&f[E].dispose&&f[E].dispose()}),f.dispose&&f.dispose()},A=f=>{f==null||f.traverse(l=>{l.geometry&&l.geometry.dispose(),l.material&&(Array.isArray(l.material)?l.material.forEach(E=>{I(E)}):I(l.material))})};return{currentModels:b,initialCameraPosition:r,initialTargetPosition:k,initThreeJS:y,handleResize:()=>{if(!z.value||!u||!d||!x)return;const f=z.value,l=f.clientWidth,E=f.clientHeight;u.aspect=l/E,u.updateProjectionMatrix(),d.setSize(l,E),x.update()},fitCameraToAllModels:f=>{if(!u||!h||b.value.length===0)return;const l=new n.Box3;let E=!1;if(b.value.forEach(Z=>{if(Z.userData.boundingBox)l.union(Z.userData.boundingBox),E=!0;else if(Z.userData.modelId&&f.has(Z.userData.modelId)){const ee=f.get(Z.userData.modelId);l.union(ee.box),E=!0}else l.expandByObject(Z),E=!0}),!E){console.warn("无法计算包围盒");return}const B=l.getSize(new n.Vector3),O=l.getCenter(new n.Vector3),q=Math.max(B.x,B.y,B.z)*.8,X=new n.Vector3(O.x+q,O.y-q,O.z+q);u.position.copy(X),u.lookAt(O),h.target.copy(O),h.update(),r.value.copy(X),k.value.copy(O),p()},getThreeJSObjects:()=>({scene:g,camera:u,renderer:d,controls:h,gizmo:x}),clearAllModels:()=>{if(!g)return;b.value.forEach(l=>{g.remove(l),A(l)});const f=[];g.children.forEach(l=>{!l.isLight&&!l.isCamera&&l.type!=="GridHelper"&&l!==C&&f.push(l)}),f.forEach(l=>{g.remove(l),A(l)}),b.value=[],p()},cleanup:()=>{P&&cancelAnimationFrame(P),c&&c.dispose(),C&&(C.geometry.dispose(),C.material.dispose()),d&&d.dispose(),h&&h.dispose(),x&&x.dispose()},updateGridForModels:p}}function ge(z,g){const u=e.ref(!1);let d=null,h=12700,x=new n.Vector3,P=new n.Vector3,c=new n.Vector3,C=0,F=null;const D=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,S=t=>{const p=new n.Vector3,m=C*1.2,_=new n.Vector3(c.x+m,c.y,c.z),I=new n.Vector3(c.x,c.y+m,c.z),A=new n.Vector3(c.x,c.y-m,c.z);if(t<=.567){const $=t/.567*Math.PI*2;p.x=c.x+Math.cos($)*m,p.z=c.z+Math.sin($)*m,p.y=c.y}else if(t<=.724){const L=(t-.567)/.157,$=D(L);p.lerpVectors(_,I,$)}else if(t<=.881){const L=(t-.724)/.157,J=D(L)*Math.PI;p.x=c.x+Math.sin(J)*m,p.y=c.y+Math.cos(J)*m,p.z=c.z}else{const L=(t-.881)/.119,$=D(L);p.lerpVectors(A,x,$)}return p},b=()=>{const{camera:t,controls:p}=z();if(!t||!p)return;d||(d=Date.now());const m=Date.now()-d,_=Math.min(m/h,1);if(_>=1){k();return}const I=S(_);t.position.copy(I),t.lookAt(c),p.target.copy(c),F=requestAnimationFrame(b)},r=()=>{if(g.value.length===0)return;const{camera:t,controls:p}=z();if(!t||!p)return;x.copy(t.position),P.copy(p.target);const m=new n.Box3;g.value.forEach(G=>{m.expandByObject(G)});const _=m.getSize(new n.Vector3);c=m.getCenter(new n.Vector3),C=Math.max(_.x,_.y,_.z)*1.2;const I=new n.Vector3(c.x+C*1.2,c.y,c.z);p.enabled=!1;const A=t.position.clone(),L=1e3,$=Date.now(),J=()=>{const G=Date.now()-$,Y=Math.min(G/L,1),f=D(Y);t.position.lerpVectors(A,I,f),t.lookAt(c),p.target.copy(c),Y<1?requestAnimationFrame(J):(u.value=!0,d=null,b())};J()},k=()=>{u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{controls:t}=z();t&&(t.enabled=!0,t.target.copy(P))};return{isAnimating:u,toggleAnimation:()=>{if(u.value){u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{camera:t,controls:p}=z();if(!t||!p)return;p.enabled=!0;const m=t.position.clone(),_=p.target.clone(),I=1500,A=Date.now(),L=()=>{const $=Date.now()-A,J=Math.min($/I,1),G=D(J);t.position.lerpVectors(m,x,G),p.target.lerpVectors(_,P,G),J<1&&requestAnimationFrame(L)};L()}else r()},startAnimation:r,stopAnimation:k}}function he(z,g){const u=e.ref(!1),d=e.ref("none");let h=[],x=[],P=new n.Box3,c=new n.Vector3;const C=()=>{h=[new n.Plane(new n.Vector3(1,0,0),0),new n.Plane(new n.Vector3(0,1,0),0),new n.Plane(new n.Vector3(0,0,1),0)]},F=()=>{P.makeEmpty(),g.value.forEach(y=>{P.expandByObject(y)}),c=P.getCenter(new n.Vector3)},D=y=>{const t=P.getSize(new n.Vector3);let p,m,_;y==="x"?(p=new n.PlaneGeometry(t.z*1.2,t.y*1.2),m=new n.Vector3(c.x,c.y,c.z),_=new n.Euler(0,Math.PI/2,0)):y==="y"?(p=new n.PlaneGeometry(t.x*1.2,t.z*1.2),m=new n.Vector3(c.x,c.y,c.z),_=new n.Euler(Math.PI/2,0,0)):y==="z"&&(p=new n.PlaneGeometry(t.x*1.2,t.y*1.2),m=new n.Vector3(c.x,c.y,c.z),_=new n.Euler(0,0,0));const I=new n.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:n.DoubleSide,depthWrite:!1}),A=new n.Mesh(p,I);return A.position.copy(m),A.rotation.copy(_),A},S=()=>{if(b(),r(),d.value==="none")return;F();let y=null;if(d.value==="x"?(h[0].constant=-c.x,y=h[0]):d.value==="y"?(h[1].constant=-c.y,y=h[1]):d.value==="z"&&(h[2].constant=-c.z,y=h[2]),y){g.value.forEach(p=>{p.traverse(m=>{(m.isMesh&&m.material||m.isLine&&m.material||m.isPoints&&m.material)&&(Array.isArray(m.material)?m.material.forEach(_=>{_.clippingPlanes=[y]}):m.material.clippingPlanes=[y])})});const{scene:t}=z();if(t){const p=D(d.value);t.add(p),x.push(p)}}},b=()=>{g.value.forEach(y=>{y.traverse(t=>{(t.isMesh&&t.material||t.isLine&&t.material||t.isPoints&&t.material)&&(Array.isArray(t.material)?t.material.forEach(p=>{p.clippingPlanes=[]}):t.material.clippingPlanes=[])})})},r=()=>{const{scene:y}=z();y&&x.forEach(t=>{y.remove(t),t.geometry.dispose(),t.material.dispose()}),x=[]};return{isClipping:u,activeClippingAxis:d,toggleClipping:()=>{u.value=!u.value,u.value?(C(),g.value.length>0&&F()):(d.value="none",b(),r())},updateClippingPlanes:S,clearClippingPlanes:b,clearClippingMeshes:r}}const ye={class:"panel-content"},we={__name:"animationPanel",props:{animationData:Object,model:Object},setup(z){const g=z;e.ref();const u=e.ref();return e.watch(()=>[g==null?void 0:g.animationData],()=>{var h;let d=((h=re.cloneDeep(g==null?void 0:g.animationData))==null?void 0:h["输出(动画数据)Content"])??[];d&&(u.value=d)},{deep:!0,immediate:!0}),(d,h)=>{var x,P,c;return e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(me.ssTable,{itemData:(x=u.value)==null?void 0:x.compData,key:(P=u.value)==null?void 0:P.id,index:(c=u.value)==null?void 0:c.id,showHeader:!1},null,8,["itemData","index"]))])}}},xe=oe._export_sfc(we,[["__scopeId","data-v-2387536e"]]),Ve={class:"panel-content"},Me={key:0,class:"joints-list"},ke={class:"joint-info-row"},Pe={class:"joint-left"},_e={class:"joint-name"},Ce={class:"joint-range"},be={class:"joint-type"},Ee={key:0,class:"joint-control-row"},ze={class:"slider-container"},De=["min","max","value","onInput","disabled"],Ne={class:"value-display"},Se={class:"joint-value"},Be={class:"unit"},Ae={key:1,class:"empty-state"},Re=1e3,ue=60,Fe={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(z,{expose:g}){const u=z;e.ref(!0);const d=e.ref([]),h=e.ref(null),x=e.ref(null),P=e.ref(12.5),c=e.ref(),C=e.ref(1302),F=e.ref(30),D=e.ref(!1),S=e.ref(!1),b=e.ref(0),r=e.ref(0),k=e.ref(null),y=n.MathUtils.degToRad,t=e.ref(1),p=()=>Re/ue/t.value;let m=[];e.watch(()=>u.animationData,o=>{var i;C.value=o.extra.管长,P.value=o.extra.外径/2;let v=((i=re.cloneDeep(o))==null?void 0:i["输出(动画数据)"])??[];v&&v.length>0&&(m=v)},{deep:!0}),e.computed(()=>m.length>0);const _=(o,v=!1)=>o==="revolute"?v?Math.PI:-Math.PI:o==="prismatic"?v?1:-1:0,I=()=>{if(!h.value)return re.ElMessage.error("未加载 URDF"),!1;let o=null;return h.value.traverse(v=>{o||v.name==="Pipe_Link"&&v.traverse(i=>{i instanceof n.Mesh&&!o&&(o=i)})}),o?(o.position.y-=F.value*ae.mm2m,c.value=o,o.material=new n.MeshPhongMaterial({color:11184810,shininess:80,side:n.DoubleSide}),!0):(re.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},A=o=>{if(!o||!o.joints)return console.warn("URDF模型没有关节信息"),[];let v=null;if(o.traverse(V=>{V.name==="Pipe_Link"&&!v&&(v=V)}),v)c.value=v;else return console.warn("未找到管子模型"),[];const i=[];return Object.keys(o.joints).forEach(V=>{const s=o.joints[V];if(s._jointType==="fixed")return;const a=s.limit?{lower:s.limit.lower??_(s._jointType,!1),upper:s.limit.upper??_(s._jointType,!0)}:{lower:_(s._jointType,!1),upper:_(s._jointType,!0)};i.push({name:V,type:s._jointType||"unknown",limit:a,currentValue:s.angle||0,urdfJoint:s})}),i.sort((V,s)=>V.name.localeCompare(s.name))},L=(o,v)=>{const i=d.value.find(s=>s.name===o);if(!i)return;const V=parseFloat(v);if(i.limit){const s=Math.max(i.limit.lower,Math.min(i.limit.upper,V));i.currentValue=s}else i.currentValue=V;u.model&&u.model.setJointValue?u.model.setJointValue(o,i.currentValue):i.urdfJoint&&i.urdfJoint.setJointValue(i.currentValue)},$=o=>o.reduce((v,i)=>{let V=0;const s=i.Y??0,a=i.C??0,w=i.R??0;return s>0&&(V+=s),a>0&&w>0&&(V+=w*y(a)),v+V},0),J=o=>{const v=[],i=o.Y??0,V=o.B??0,s=o.C??0,a=o.R??0,w={pos:new n.Vector3(0,0,0),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};if(!i&&!s)return v;if(v.push(w.pos.clone()),V!==0){const U=new n.Matrix4().makeRotationAxis(w.localY,y(V));w.localX.applyMatrix4(U),w.localZ.applyMatrix4(U)}if(i>0&&(w.pos.add(w.localY.clone().multiplyScalar(i*ae.mm2m)),v.push(w.pos.clone())),s>0&&a>0){const U=y(s),T=a*ae.mm2m,W=w.pos.clone().add(w.localX.clone().multiplyScalar(-T)),R=Math.max(16,Math.ceil(s/5));for(let M=1;M<=R;M++){const H=U*M/R,K=new n.Matrix4().makeRotationAxis(w.localZ,H),se=w.localX.clone().multiplyScalar(T).applyMatrix4(K),ie=W.clone().add(se);v.push(ie)}}return v},G=(o,v=0)=>{let i=m.slice(0,o+1);const V=m[o+1];if(V&&v>0){const R={...V,B:(V.B??0)*v,C:(V.C??0)*v};i.push(R)}const s=$(i),a=Math.max(0,C.value-s),w=[];w.push(new n.Vector3(0,0,0));const U=new n.Vector3(0,a*ae.mm2m,0);a>0&&w.push(U);let T={pos:U.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const W=[];for(let R=i.length-1;R>=0;R--){const M=i[R],H=J(M);if(H.length>0){const K=H.map(Q=>{const ne=Q.clone(),de=new n.Matrix4;return de.makeBasis(T.localX,T.localY,T.localZ),ne.applyMatrix4(de),ne.add(T.pos)});W.push(K);const te=K[K.length-1];T.pos=te.clone();const se=M.B??0,ie=M.C??0;if(se!==0){const Q=new n.Matrix4().makeRotationAxis(T.localY,y(se));T.localX.applyMatrix4(Q),T.localZ.applyMatrix4(Q)}if(ie>0){const Q=y(ie),ne=new n.Matrix4().makeRotationAxis(T.localZ,Q);T.localY.applyMatrix4(ne),T.localX.applyMatrix4(ne)}}}for(const R of W)R.length>1&&w.push(...R.slice(1));w.length<2&&w.push(new n.Vector3(0,.001,0));try{const R=new n.CatmullRomCurve3(w,!1,"catmullrom",.01),M=new n.TubeGeometry(R,Math.max(2,w.length*4),P.value*ae.mm2m,18,!1);c.value.geometry.dispose(),c.value.geometry=M}catch(R){console.error("管件更新失败",R)}},Y=(o,v,i=1)=>{o&&(Object.keys(o).forEach(V=>{const s=o[V],a=d.value.find(w=>w.name===V);a&&(a.currentValue=s,u.model&&u.model.setJointValue?u.model.setJointValue(V,s):a.urdfJoint&&a.urdfJoint.setJointValue(s))}),G(v,i))},f=(o,v,i)=>o+(v-o)*i,l=(o,v,i)=>{if(!o||!v)return o||v;const V={};return Object.keys(o).forEach(s=>{const a=o[s],w=v[s];V[s]=f(a,w||a,i)}),V},E=()=>{if(m.length===0){console.warn("没有动画数据");return}I(),D.value=!0,S.value=!1,b.value=0,r.value=0,B()},B=()=>{if(!D.value||S.value)return;const o=b.value;if(o>=m.length-1){const s=m[m.length-1];Y(s,m.length-1,1),j();return}const v=r.value/ue,i=m[o],V=m[o+1];if(V){const s=l(i,V,v);Y(s,o,v)}else Y(i,o);r.value++,r.value>ue&&(r.value=0,b.value++),k.value=setTimeout(B,p())},O=()=>{S.value=!0,k.value&&(clearTimeout(k.value),k.value=null)},j=()=>{D.value=!1,S.value=!1,t.value=1,k.value&&(clearTimeout(k.value),k.value=null)};g({startAnimation:E,pauseAnimation:O,stopAnimation:j,resetAll:()=>{j(),b.value=0,r.value=0,d.value.forEach(o=>{(o.type==="revolute"||o.type==="prismatic")&&L(o.name,0)}),G(-1,0)},fastForward:()=>{t.value<4&&(t.value=Math.min(4,t.value*2))},fastBackward:()=>{t.value>.25&&(t.value=Math.max(.25,t.value/2))}}),e.watch(()=>u.model,o=>{o?(h.value=o,d.value=A(o)):d.value=[]},{immediate:!0});const ee=()=>{!u.model||D.value&&!S.value||d.value.forEach(o=>{o.urdfJoint&&o.urdfJoint.angle!==void 0&&(o.currentValue=o.urdfJoint.angle)})},le=()=>{const o=()=>{ee(),x.value=requestAnimationFrame(o)};o()},ce=()=>{x.value&&(cancelAnimationFrame(x.value),x.value=null)};return e.onMounted(()=>{le()}),e.onUnmounted(()=>{ce(),j()}),(o,v)=>(e.openBlock(),e.createElementBlock("div",Ve,[d.value.length>0?(e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,i=>{var V,s,a,w;return e.openBlock(),e.createElementBlock("div",{key:i.name,class:"joint-item"},[e.createElementVNode("div",ke,[e.createElementVNode("div",Pe,[e.createElementVNode("span",_e,e.toDisplayString(i.name),1),e.createElementVNode("span",Ce," ["+e.toDisplayString(((V=i.limit)==null?void 0:V.lower.toFixed(2))??(i.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((s=i.limit)==null?void 0:s.upper.toFixed(2))??(i.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",be,e.toDisplayString(i.type),1)]),i.type==="revolute"||i.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",ze,[e.createElementVNode("input",{type:"range",min:((a=i.limit)==null?void 0:a.lower)??(i.type==="revolute"?-Math.PI:-1),max:((w=i.limit)==null?void 0:w.upper)??(i.type==="revolute"?Math.PI:1),step:.01,value:i.currentValue,onInput:U=>L(i.name,U.target.value),class:"joint-slider",disabled:D.value&&!S.value},null,40,De)]),e.createElementVNode("div",Ne,[e.createElementVNode("span",Se,e.toDisplayString(i.currentValue?Number(i.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",Be,e.toDisplayString(i.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",Ae,v[0]||(v[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},Te=oe._export_sfc(Fe,[["__scopeId","data-v-d48ad0d8"]]),Le={class:"panel-content"},Ie="id",$e={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:z=>["breadth","firstLevel"].includes(z)}},emits:["nodeClick"],setup(z,{emit:g}){const u=z,d=g,h=e.ref([]),x={children:"children",label:"label"},P=r=>{d("nodeClick",r)},c=(r,k=0)=>{const y=[];return Array.isArray(r)&&(r==null?void 0:r.length)>0&&r.forEach(t=>{if(!(t!=null&&t.isMesh)&&((t==null?void 0:t.type)==="URDFJoint"||(t==null?void 0:t.type)==="URDFLink")){const p={name:t==null?void 0:t.name,label:t==null?void 0:t.name,show:!0,level:k+1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:c(t==null?void 0:t.children,k+1),path:t==null?void 0:t.name};y.push(p)}}),y},C=r=>r?[{name:r==null?void 0:r.name,label:r==null?void 0:r.name,show:!0,level:1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:c(r==null?void 0:r.children,1),path:r==null?void 0:r.name}]:[],F=(r,k)=>{const y=[],t=[...r];for(;t.length>0&&y.length<k;){const p=t.shift();p.children&&p.children.length>0&&(y.push(p.id),t.push(...p.children))}return y},D=(r,k)=>{const y=[];return r.forEach(t=>{if(t.children&&t.children.length>0){y.push(t.id);const p=t.children.filter(m=>m.children&&m.children.length>0).slice(0,k).map(m=>m.id);y.push(...p)}}),y.slice(0,k+1)},S=e.computed(()=>!h.value||h.value.length===0?[]:u.expandStrategy==="firstLevel"?D(h.value,u.maxExpandCount):F(h.value,u.maxExpandCount)),b=e.computed(()=>u!=null&&u.model?C(u.model):[]);return e.watch(b,r=>{h.value=JSON.parse(JSON.stringify(r))},{immediate:!0}),(r,k)=>{const y=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(y,{data:h.value,props:x,"default-expanded-keys":S.value,"node-key":Ie,onNodeClick:P},null,8,["data","default-expanded-keys"])])}}},Je=oe._export_sfc($e,[["__scopeId","data-v-290ff4e1"]]),Oe=["xlink:href"],Ue=e.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(z){const g=z,u=e.computed(()=>({backgroundColor:g.backgroundColor})),d=e.computed(()=>`#${g.prefix}-${g.name}`),h=e.computed(()=>{const{size:x}=g;let P=`${x}`;return P=`${P.replace("px","")}px`,{width:P,height:P}});return(x,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:x.active}]),style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[x.$attrs.class,x.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(h.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":d.value},null,8,Oe)],6))],6))}}),N=oe._export_sfc(Ue,[["__scopeId","data-v-6b1132f4"]]),Ge={class:"obj-viewer-container"},je={class:"buttonGroup-top"},qe={class:"buttonGroup-topLeft"},Xe={class:"buttonGroup-left"},He={class:"buttonGroup-right"},Ye={class:"buttonGroup-bottom"},Ze={class:"left-panel"},We={class:"panel-header"},Ke={key:1,class:"clipping-content"},Qe={class:"radio-group"},et={class:"radio-label"},tt={class:"radio-label"},nt={class:"radio-label"},at={class:"radio-label"},ot={class:"right-panel"},lt={class:"panel-header"},st={key:0,class:"loading-overlay"},it={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(z,{expose:g,emit:u}){const d=u;let h=null,x=!1;const P=e.ref(null),c=e.ref(!1),C=e.ref("");e.ref(!1);const F=e.ref(!1),D=e.ref(!1),S=e.ref(""),b=e.ref(!1),r=e.ref(""),k=e.ref(),{currentModels:y,initialCameraPosition:t,initialTargetPosition:p,initThreeJS:m,handleResize:_,fitCameraToAllModels:I,getThreeJSObjects:A,clearAllModels:L,cleanup:$}=ve(P),{isAnimating:J,toggleAnimation:G,stopAnimation:Y}=ge(A,y),{isClipping:f,activeClippingAxis:l,toggleClipping:E,updateClippingPlanes:B}=he(A,y),{addModelsFromUrls:O,loadModelByDefaultPath:j,urdfModel:q,modelBoundingBoxes:X}=fe.useModelLoader(A,y,c,C,L),Z=()=>{if(F.value||y.value.length===0)return;F.value=!0,J.value&&Y();const{camera:s,controls:a}=A();if(!s||!a)return;a.enabled=!0;const w=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,U=s.position.clone(),T=a.target.clone(),W=1500,R=Date.now(),M=()=>{const H=Date.now()-R,K=Math.min(H/W,1),te=w(K);s.position.lerpVectors(U,t.value,te),a.target.lerpVectors(T,p.value,te),K<1?requestAnimationFrame(M):F.value=!1};M()},ee=async()=>x?Promise.resolve():new Promise(s=>{const a=()=>{x?s():requestAnimationFrame(a)};a()}),le=async(s,a)=>{try{await ee(),J.value&&Y(),f.value&&E();const w=await a(s);return I(X),w}catch(w){throw console.error("加载模型失败:",w),w}},ce=async s=>le(s,O),o=async s=>le(s,j),v=s=>{D.value=!0,S.value=s,s==="剖面视图"&&!f.value&&E()},i=s=>{b.value=!0,r.value=s,s==="动画仿真"&&d("getAnimationData")},V=()=>{e.nextTick(()=>{var s;(s=k.value)==null||s.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{m(),h=A().scene,x=!0,window.addEventListener("resize",_)}catch(s){console.error("Three.js初始化失败:",s)}}),e.onBeforeUnmount(()=>{x=!1,S.value="",r.value="",window.removeEventListener("resize",_),J.value&&Y(),$()}),g({addModelsFromUrls:ce,loadModelByDefaultPath:o}),(s,a)=>{var U,T,W,R;const w=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Ge,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:P,class:"threejs-container"},null,512),e.createElementVNode("div",je,[e.createVNode(N,{name:"guanjianjiexi",size:"34"}),e.createVNode(N,{name:"guanjiekongzhi",size:"34"}),e.createVNode(N,{name:"gongyishengcheng",size:"34"}),e.createVNode(N,{name:"buchangshezhi",size:"34"}),e.createVNode(N,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",qe,[e.createVNode(N,{name:"viewReset",size:"24",onClick:Z,title:"重置"}),e.createVNode(N,{name:"fangda",size:"24",title:"放大"}),e.createVNode(N,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(N,{name:"lookAround",size:"24",onClick:e.unref(G),title:e.unref(J)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",Xe,[e.createVNode(N,{name:"jiegoushu",size:"24",onClick:a[0]||(a[0]=M=>v("场景树")),active:D.value&&S.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(N,{name:"clipping",size:"24",onClick:a[1]||(a[1]=M=>v("剖面视图")),active:D.value&&S.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[2]||(a[2]=M=>v("场景树3"))}),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[3]||(a[3]=M=>v("场景4"))})]),e.createElementVNode("div",He,[e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"guanjiekongzhi",size:"24",onClick:a[4]||(a[4]=M=>i("关节控制")),active:b.value&&r.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:a[5]||(a[5]=M=>i("动画仿真")),active:b.value&&r.value==="动画仿真"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",Ye,[e.createVNode(N,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(U=k.value)==null?void 0:U.fastBackward},null,8,["onClick"]),e.createVNode(N,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:V}),e.createVNode(N,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(T=k.value)==null?void 0:T.fastForward},null,8,["onClick"]),e.createVNode(N,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(W=k.value)==null?void 0:W.pauseAnimation},null,8,["onClick"]),e.createVNode(N,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(R=k.value)==null?void 0:R.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",Ze,[e.createElementVNode("div",We,[e.createElementVNode("span",null,e.toDisplayString(S.value),1),e.createElementVNode("span",{class:"close",onClick:a[6]||(a[6]=M=>D.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[S.value==="场景树"?(e.openBlock(),e.createBlock(Je,{key:0,model:e.unref(q)},null,8,["model"])):e.createCommentVNode("",!0),S.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",Qe,[e.createElementVNode("label",et,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":a[7]||(a[7]=M=>e.isRef(l)?l.value=M:null),onChange:a[8]||(a[8]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[16]||(a[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",tt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":a[9]||(a[9]=M=>e.isRef(l)?l.value=M:null),onChange:a[10]||(a[10]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[17]||(a[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",nt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":a[11]||(a[11]=M=>e.isRef(l)?l.value=M:null),onChange:a[12]||(a[12]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[18]||(a[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",at,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":a[13]||(a[13]=M=>e.isRef(l)?l.value=M:null),onChange:a[14]||(a[14]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[19]||(a[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,D.value]]),e.withDirectives(e.createElementVNode("div",ot,[e.createElementVNode("div",lt,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:a[15]||(a[15]=M=>b.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Te,{ref_key:"jointRef",ref:k,model:e.unref(q),scene:e.unref(h),animationData:z.animationData},null,8,["model","scene","animationData"]),[[e.vShow,r.value==="关节控制"]]),e.withDirectives(e.createVNode(xe,{animationData:z.animationData},null,8,["animationData"]),[[e.vShow,r.value==="动画仿真"]])]),_:1})],512),[[e.vShow,b.value]]),c.value?(e.openBlock(),e.createElementBlock("div",st,[a[20]||(a[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(C.value),1)])):e.createCommentVNode("",!0)])}}},rt=oe._export_sfc(it,[["__scopeId","data-v-7bc47bb3"]]);exports.default=rt;
@@ -1,11 +1,11 @@
1
1
  import { ref as b, watch as Pe, createElementBlock as q, openBlock as H, createBlock as Ie, computed as le, onMounted as $e, onUnmounted as je, Fragment as Xe, renderList as He, createElementVNode as h, createCommentVNode as xe, toDisplayString as ae, resolveComponent as Je, createVNode as k, defineComponent as Ye, normalizeStyle as Ee, normalizeClass as Fe, nextTick as Be, onBeforeUnmount as qe, withDirectives as se, unref as O, withCtx as Te, isRef as he, vModelRadio as ye, vShow as we } from "vue";
2
- import { V as M, B as be, S as Ze, C as We, P as Ke, W as Ne, n as Qe, A as et, o as tt, M as Le, X as nt, G as at, p as Me, q as ot, r as De, s as st, D as ze, H as it, t as Re, u as Oe, v as Ue, w as ke, E as _e, x as pe, y as lt, z as rt, T as ct } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CYXAbj2a.js";
3
- import { O as ut } from "./OrbitControls-X8Tx1hPt.js";
4
- import { s as pt } from "./index-CZ01Uey-.js";
5
- import { u as dt } from "./index.vue_vue_type_style_index_1_lang-bvR0uxez.js";
2
+ import { V as M, B as be, S as Ze, C as We, P as Ke, W as Ne, n as Qe, A as et, o as tt, M as Le, X as nt, G as at, p as Me, q as ot, r as De, s as st, D as ze, H as it, t as Re, u as Oe, v as Ue, w as ke, E as _e, x as pe, y as lt, z as rt, T as ct } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B3RSoHQA.js";
3
+ import { O as ut } from "./OrbitControls-CcniPNk7.js";
4
+ import { s as pt } from "./index-DBZg952W.js";
5
+ import { u as dt } from "./index.vue_vue_type_style_index_1_lang-Cwuh77RJ.js";
6
6
  import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  import { c as Ge, E as Ve } from "./index-CA0SFykF.js";
8
- import { m as de } from "./robotUtil-BeynP2xM.js";
8
+ import { m as de } from "./robotUtil-BIMs6Vbb.js";
9
9
  function mt(E) {
10
10
  let f = null, r = null, c = null, v = null, w = null, z = null, l = null, A = null;
11
11
  const F = 1e3 / 30;