ss-component-new 1.2.59 → 1.2.60

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 (93) hide show
  1. package/dist/{MTLLoader-BlLfoBce.cjs → MTLLoader-Bd8gswVO.cjs} +1 -1
  2. package/dist/{MTLLoader-Bl6JMZD-.js → MTLLoader-gdzQR_Hk.js} +1 -1
  3. package/dist/{OrbitControls-BP4_rhtR.cjs → OrbitControls-BDr3JwU7.cjs} +1 -1
  4. package/dist/{OrbitControls-BbhnJ_4u.js → OrbitControls-DrQG0WwG.js} +1 -1
  5. package/dist/{animationData-CEkMmPAJ.js → animationData-BebPFu1o.js} +9 -9
  6. package/dist/{animationData-FLuoH13j.cjs → animationData-DZnytjR7.cjs} +1 -1
  7. package/dist/{array-BLzorBeE.cjs → array-CsVIMexm.cjs} +1 -1
  8. package/dist/{array-BkvrJ2GR.js → array-mkPvdkqz.js} +1 -1
  9. package/dist/{iconfont-ji7A-_XJ.cjs → iconfont-B2jKfn1c.cjs} +1 -1
  10. package/dist/{iconfont-Dp3iGl32.js → iconfont-sA0TqvpZ.js} +2 -2
  11. package/dist/{index-DXGiAs1G.cjs → index-3F5KjCbv.cjs} +1 -1
  12. package/dist/{index-CWG2zhJZ.cjs → index-4M7aervZ.cjs} +1 -1
  13. package/dist/{index-BiwVpb9o.cjs → index-6A1xf0Gs.cjs} +1 -1
  14. package/dist/{index-qDBAJZN2.cjs → index-B-zqezDR.cjs} +1 -1
  15. package/dist/{index-LVKvj2hU.cjs → index-BDOF1BPC.cjs} +1 -1
  16. package/dist/{index-NUzOUiu0.js → index-BIOzO44u.js} +1 -1
  17. package/dist/{index-rPWz6KHn.js → index-BLXYg9Gs.js} +4 -4
  18. package/dist/{index-bcbWOGXs.js → index-BawiQHQM.js} +4 -4
  19. package/dist/{index-BNES2eKm.js → index-BcGarjC7.js} +1 -1
  20. package/dist/{index-FUWILZwY.js → index-BdoWr55z.js} +2 -2
  21. package/dist/{index-CDW8XzWT.cjs → index-BkJkmkcq.cjs} +1 -1
  22. package/dist/{index-DIpWkFjh.cjs → index-BoVvgAUF.cjs} +1 -1
  23. package/dist/{index-YoJfAd5X.js → index-BqPYebkC.js} +1 -1
  24. package/dist/{index-DlClEW8i.js → index-CBHRkOa4.js} +1 -1
  25. package/dist/{index-DLU6Qv3w.cjs → index-CF9id9ro.cjs} +13 -13
  26. package/dist/{index-BiUFu7a_.js → index-CK_bms-m.js} +240 -242
  27. package/dist/{index-gcSJbApQ.cjs → index-CRvxI1hr.cjs} +1 -1
  28. package/dist/{index-B2xsH_Wl.cjs → index-CaubJFHG.cjs} +1 -1
  29. package/dist/index-Ch_Cm24f.cjs +1 -0
  30. package/dist/{index-CHzlphv9.cjs → index-Ck3lmJpc.cjs} +1 -1
  31. package/dist/{index-BFHCLxvz.js → index-ClCw6ykP.js} +1 -1
  32. package/dist/{index-BEfSpHE6.js → index-DA4aTMB5.js} +1 -1
  33. package/dist/{index-ChyicQIl.js → index-DG0upY6_.js} +1 -1
  34. package/dist/{index-u-f2S6H4.cjs → index-DI5DRRI8.cjs} +1 -1
  35. package/dist/{index-DuamAhUi.cjs → index-DLiM284R.cjs} +1 -1
  36. package/dist/{index-BYIlecoJ.cjs → index-DNnfnoYc.cjs} +1 -1
  37. package/dist/{index-95KyZ7PB.js → index-DVNrIedZ.js} +1 -1
  38. package/dist/{index-DvgAOa6m.js → index-DXiQ5JKb.js} +1149 -1127
  39. package/dist/{index-B1U77nyf.cjs → index-DZ3LdxA8.cjs} +1 -1
  40. package/dist/{index-CxMIdKAy.cjs → index-D_FAvCkR.cjs} +1 -1
  41. package/dist/{index-JXXdn01K.cjs → index-DgW_swZz.cjs} +1 -1
  42. package/dist/{index-BxEjroD6.cjs → index-DjQZE_pv.cjs} +1 -1
  43. package/dist/{index-BTwRUubF.js → index-DmLuog-V.js} +3 -3
  44. package/dist/{index-BooTgcW2.js → index-Do_4Y2BA.js} +923 -934
  45. package/dist/{index-DN40xEbb.js → index-Dq9ppmM1.js} +3 -3
  46. package/dist/{index-DZQjq0ZR.js → index-DuXxVHLY.js} +1 -1
  47. package/dist/{index-OLQpbvuS.js → index-Duh5yc_7.js} +8 -8
  48. package/dist/{index-DNs7ujiq.js → index-DunWx7gk.js} +2 -2
  49. package/dist/{index--qwZeW47.js → index-GbPoL1UR.js} +1 -1
  50. package/dist/{index-DkNldOC0.cjs → index-MHgc1J83.cjs} +1 -1
  51. package/dist/{index-BgwYXT31.cjs → index-RhIBaFyU.cjs} +1 -1
  52. package/dist/{index-DZbNXTrw.js → index-YhC-PbE3.js} +1 -1
  53. package/dist/{index-lP-_9Gsb.cjs → index-aTpWvup6.cjs} +1 -1
  54. package/dist/{index-C8IFPtAJ.js → index-ajVsMnUs.js} +7 -7
  55. package/dist/{index-BN4opOSk.cjs → index-fv_bHYEK.cjs} +1 -1
  56. package/dist/{index-DAJoy_Z5.js → index-vPR31-Zk.js} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Bff2sYnQ.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DF-onWE-.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-D6uh0ooh.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DVp62_ZP.js} +8 -8
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BZPnZF-N.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BL1cikD3.js} +1071 -1076
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-fAuSnfOH.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CHavLvPk.cjs} +32 -32
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-Dt5lXvbN.js → index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-B60JZATD.js} +4 -4
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-DlyCfLDJ.cjs → index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-zIOhigw2.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_1_lang-DDYxgdQk.cjs → index.vue_vue_type_style_index_1_lang-B5nfyDvl.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_1_lang-BUhvhTqt.js → index.vue_vue_type_style_index_1_lang-CChX6Zmx.js} +3 -3
  65. package/dist/{main-ChUyYPuq.js → main-CIXVap1M.js} +3 -3
  66. package/dist/{main-D-bdppOV.cjs → main-e1Q2-l7w.cjs} +1 -1
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +2 -2
  69. package/dist/ss-component.js +9 -9
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +10 -10
  72. package/dist/{threeModel-CDFo3As-.cjs → threeModel-UBx8eTMe.cjs} +1 -1
  73. package/dist/{threeModel-DcuAlWjb.js → threeModel-cKQrxO3d.js} +4 -4
  74. package/dist/{threePreview-q4R-oAs6.cjs → threePreview-BAJ00HhJ.cjs} +1 -1
  75. package/dist/{threePreview-DhMkG1np.js → threePreview-D35fdkMP.js} +3 -3
  76. package/dist/{threeSceneView-Dav7AGkH.js → threeSceneView-BZenUkiZ.js} +9 -9
  77. package/dist/{threeSceneView-CAsVH82L.cjs → threeSceneView-OEime_CV.cjs} +1 -1
  78. package/dist/{threeSceneViewForCPMPIP-9__8NGa5.cjs → threeSceneViewForCPMPIP-C044dPvs.cjs} +1 -1
  79. package/dist/{threeSceneViewForCPMPIP-DxFYivgN.js → threeSceneViewForCPMPIP-zeiEQd6_.js} +9 -9
  80. package/dist/{threeTrackPathView-DXCMl3aZ.js → threeTrackPathView-CHosxM5O.js} +4 -4
  81. package/dist/{threeTrackPathView-B7yrSLKq.cjs → threeTrackPathView-DdZ_W87m.cjs} +1 -1
  82. package/dist/{threeViewerHost-D70yS3z2.cjs → threeViewerHost-Ba-SeQ6m.cjs} +36 -36
  83. package/dist/{threeViewerHost-BNnzz6WM.js → threeViewerHost-Co0U6v_d.js} +2126 -2090
  84. package/dist/{urdfTree-3Jd59vvU.js → urdfTree-CtpNr38F.js} +1 -1
  85. package/dist/{urdfTree-CPEMi7wo.cjs → urdfTree-DkWqLWnt.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-KdP9UaVe.cjs → workpieceTreePanel-BPsnvq9b.cjs} +1 -1
  87. package/dist/{workpieceTreePanel-CCbVIIlm.js → workpieceTreePanel-DimwJSXC.js} +5 -5
  88. package/package.json +1 -1
  89. package/dist/index-C9C84gkB.cjs +0 -1
  90. package/dist/obj/model.mtl +0 -42
  91. package/dist/obj/model.obj +0 -26110
  92. package/public/obj/model.mtl +0 -42
  93. package/public/obj/model.obj +0 -26110
@@ -1,13 +1,13 @@
1
1
  import { defineAsyncComponent as Z, computed as g, onMounted as x, resolveComponent as ee, createBlock as P, openBlock as F, withCtx as ne, resolveDynamicComponent as se, defineComponent as te, defineProps as re, ref as c, watch as oe, reactive as le } from "vue";
2
2
  import { S as ae } from "./index-BHtNKL1L.js";
3
3
  import { bO as ce, p as ie, s as ue, bN as pe } from "./index-DsSA-OiE.js";
4
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BZPnZF-N.js";
4
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BL1cikD3.js";
5
5
  import { u as he, a as fe } from "./index-Ce_gZ72y.js";
6
- import { s as me } from "./index-DlClEW8i.js";
6
+ import { s as me } from "./index-CBHRkOa4.js";
7
7
  import { useRouter as de } from "vue-router";
8
8
  import { a as ge, e as Me, f as ve, g as Ce, h as ye } from "./index-CAPx0_D4.js";
9
- import { g as we } from "./index-C8IFPtAJ.js";
10
- const A = Z(() => import("./index-BooTgcW2.js").then((i) => i.j));
9
+ import { g as we } from "./index-ajVsMnUs.js";
10
+ const A = Z(() => import("./index-Do_4Y2BA.js").then((i) => i.j));
11
11
  A.install = (i) => {
12
12
  i.component("ssMenu", A);
13
13
  };
@@ -1 +1 @@
1
- "use strict";const r=require("vue"),ee=require("./index-BpPyaNFa.cjs"),g=require("./index-C8qRkCgn.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-fAuSnfOH.cjs");const F=require("./index-CX2C-kjD.cjs"),ne=require("./index-B2xsH_Wl.cjs"),se=require("vue-router"),M=require("./index-9hspBVrQ.cjs"),te=require("./index-lP-_9Gsb.cjs"),m=r.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DLU6Qv3w.cjs")).then(u=>u.index));m.install=u=>{u.component("ssMenu",m)};const q={__name:"index",props:{name:String},setup(u){const T=u,C=r.computed(()=>g.ElIcons[T.name]);return r.onMounted(()=>{}),(v,y)=>{const l=r.resolveComponent("el-icon");return r.openBlock(),r.createBlock(l,null,{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(C.value)))]),_:1})}}};function b(u="menu"){return{name:u,components:{SvgIcon:ee.SvgIcon,ssMenu:m,DynamicIcon:q,ssDialog:ne.ssDialog},setup(T,{emit:C}){const v=r.defineProps({mode:{type:String,default:"vertical"}}),y=r.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=F.useMenuState(),_=F.useModelComp(g.pinia),w=r.ref(0),h=se.useRouter(),{asideMenus:D,menuTriggerType:R,platform:$}=g.storeToRefs(l),B=r.computed(()=>v==null?void 0:v.mode),k=e=>e==null?void 0:e.map(n=>{var o,t;return!(n!=null&&n.children)||((o=n==null?void 0:n.children)==null?void 0:o.length)===0?n.config=y.value:n!=null&&n.children&&((t=n==null?void 0:n.children)==null?void 0:t.length)>0&&(n.children=k(n.children)),n}),x=r.computed(()=>{let e=[...D.value];if((e==null?void 0:e.length)===0)return h.push("/"),[];const s=H(e,N.value);return s.isFlag||(e=s==null?void 0:s.data),e=e==null?void 0:e.map(n=>{var o,t;return!(n!=null&&n.children)||((o=n==null?void 0:n.children)==null?void 0:o.length)===0?n.config=y.value:n!=null&&n.children&&((t=n==null?void 0:n.children)==null?void 0:t.length)>0&&(n.children=k(n.children)),n}),e}),E=async(e,s)=>{_.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(e==null?void 0:e.path),l.setActiveAsideMenu(e),e.isRouter?h.push(e.path):h.push("/"),C("node-click",e,s)},V=async e=>{const s=g.findNodeByPropInTree(x.value,"path",e);l.setActiveAsideMenu(s),_.setRouteToChildPath(""),R.value==="click"?w.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):l.setActiveMenuPath(e):(l.setMenuTriggerType("click"),l.setActiveMenuPath(e)),e!=null&&e.startsWith("/")?h.push(e):h.push("/"),w.value++},O=e=>{l.setActiveMenuPath(e)},a=e=>{const s=document.documentElement;e==null||e.forEach(n=>{s.style.setProperty(n.name,n.value)})};r.onMounted(()=>{w.value=1});const N=r.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});r.watch(()=>$.value,e=>{e==="browser"?a(M.browserVerticalMenuClasses):e==="client"?(a(M.clientHorizontalMenuClasses),a(M.clientVerticalMenuClasses)):e==="three"&&(a(M.threeHorizontalMenuClasses),a(M.threeVerticalMenuClasses))},{immediate:!0});const z=(e,s)=>{function n(o){o==null||o.forEach(t=>{var d,P;const i=(d=t==null?void 0:t.path)!=null&&d.startsWith("/")?(P=t==null?void 0:t.path)==null?void 0:P.substring(1):t==null?void 0:t.path;t.show=s==null?void 0:s.some(A=>A==null?void 0:A.includes(i)),t.children&&n(t.children)})}return n(e),e},H=(e,s)=>{if(Array.isArray(s)){const n=Array.from(new Set(s==null?void 0:s.map(o=>o.substring(0,o.lastIndexOf("/")))));return{data:z(e,n),isFlag:!1}}else return{isFlag:(s==null?void 0:s.toUpperCase())==="SUPERADMIN"}},c=r.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=e=>te.getComponent(e),W=r.ref({}),J=r.ref([]),f=r.ref({}),p=r.ref({}),K=e=>{switch(e){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},S=r.ref({}),L=e=>{l.setCacheInputMenu({type:c.type,data:e}),l.setIsRefreshMenus(!0)},j=(e,s,n)=>{},G=async(e,s)=>{c.type=K(s==null?void 0:s.operateType),j(s,c.type),p.value=e,S.value=s},Q=()=>{c.show=!1},X=e=>e==null?void 0:e.filter(s=>s.allowInherit),Y=()=>{var n,o,t,i,d;let e;c.type==="create"&&(e=((n=p.value)==null?void 0:n.path)+"/"+f.value[(o=f.value)==null?void 0:o.prop]),c.type==="update"&&(e=(t=p.value)==null?void 0:t.path);const s={...p.value,config:X((i=p.value)==null?void 0:i.config),children:[],childMenus:[],title:f.value[(d=f.value)==null?void 0:d.prop],path:e};console.log("clickSubmitForm",S.value,p.value,s),L(s),c.show=!1},Z=e=>{var n,o;const s=(n=e==null?void 0:e.contents)==null?void 0:n.find(t=>t.key==="formContent");s&&(f.value=(o=s==null?void 0:s.contents)==null?void 0:o.reduce((t,i)=>(t[i.key]=i.value,t.prop=i.key,t),{}))},I=r.ref(!1);return{isCollapse:I,handleMenuCollapse:()=>{I.value=!I.value},handleCompChange:Z,dialogForm:W,dialogRenderComps:J,getComponents:U,clickSubmitForm:Y,dialogInfo:c,beforeDialogDestroy:Q,clickMenuIcon:G,mode:B,renderMenuList:x,clickMenu:E,openMenu:V,closeMenu:O,changeMenuStyle:a}}}}const re=r.defineComponent(b());exports._sfc_main=re;exports._sfc_main$1=q;exports.setComponent=b;exports.ssMenu=m;
1
+ "use strict";const r=require("vue"),ee=require("./index-BpPyaNFa.cjs"),g=require("./index-C8qRkCgn.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CHavLvPk.cjs");const F=require("./index-CX2C-kjD.cjs"),ne=require("./index-CaubJFHG.cjs"),se=require("vue-router"),M=require("./index-9hspBVrQ.cjs"),te=require("./index-aTpWvup6.cjs"),m=r.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CF9id9ro.cjs")).then(u=>u.index));m.install=u=>{u.component("ssMenu",m)};const q={__name:"index",props:{name:String},setup(u){const T=u,C=r.computed(()=>g.ElIcons[T.name]);return r.onMounted(()=>{}),(v,y)=>{const l=r.resolveComponent("el-icon");return r.openBlock(),r.createBlock(l,null,{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(C.value)))]),_:1})}}};function b(u="menu"){return{name:u,components:{SvgIcon:ee.SvgIcon,ssMenu:m,DynamicIcon:q,ssDialog:ne.ssDialog},setup(T,{emit:C}){const v=r.defineProps({mode:{type:String,default:"vertical"}}),y=r.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=F.useMenuState(),_=F.useModelComp(g.pinia),w=r.ref(0),h=se.useRouter(),{asideMenus:D,menuTriggerType:R,platform:$}=g.storeToRefs(l),B=r.computed(()=>v==null?void 0:v.mode),k=e=>e==null?void 0:e.map(n=>{var o,t;return!(n!=null&&n.children)||((o=n==null?void 0:n.children)==null?void 0:o.length)===0?n.config=y.value:n!=null&&n.children&&((t=n==null?void 0:n.children)==null?void 0:t.length)>0&&(n.children=k(n.children)),n}),x=r.computed(()=>{let e=[...D.value];if((e==null?void 0:e.length)===0)return h.push("/"),[];const s=H(e,N.value);return s.isFlag||(e=s==null?void 0:s.data),e=e==null?void 0:e.map(n=>{var o,t;return!(n!=null&&n.children)||((o=n==null?void 0:n.children)==null?void 0:o.length)===0?n.config=y.value:n!=null&&n.children&&((t=n==null?void 0:n.children)==null?void 0:t.length)>0&&(n.children=k(n.children)),n}),e}),E=async(e,s)=>{_.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(e==null?void 0:e.path),l.setActiveAsideMenu(e),e.isRouter?h.push(e.path):h.push("/"),C("node-click",e,s)},V=async e=>{const s=g.findNodeByPropInTree(x.value,"path",e);l.setActiveAsideMenu(s),_.setRouteToChildPath(""),R.value==="click"?w.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):l.setActiveMenuPath(e):(l.setMenuTriggerType("click"),l.setActiveMenuPath(e)),e!=null&&e.startsWith("/")?h.push(e):h.push("/"),w.value++},O=e=>{l.setActiveMenuPath(e)},a=e=>{const s=document.documentElement;e==null||e.forEach(n=>{s.style.setProperty(n.name,n.value)})};r.onMounted(()=>{w.value=1});const N=r.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});r.watch(()=>$.value,e=>{e==="browser"?a(M.browserVerticalMenuClasses):e==="client"?(a(M.clientHorizontalMenuClasses),a(M.clientVerticalMenuClasses)):e==="three"&&(a(M.threeHorizontalMenuClasses),a(M.threeVerticalMenuClasses))},{immediate:!0});const z=(e,s)=>{function n(o){o==null||o.forEach(t=>{var d,P;const i=(d=t==null?void 0:t.path)!=null&&d.startsWith("/")?(P=t==null?void 0:t.path)==null?void 0:P.substring(1):t==null?void 0:t.path;t.show=s==null?void 0:s.some(A=>A==null?void 0:A.includes(i)),t.children&&n(t.children)})}return n(e),e},H=(e,s)=>{if(Array.isArray(s)){const n=Array.from(new Set(s==null?void 0:s.map(o=>o.substring(0,o.lastIndexOf("/")))));return{data:z(e,n),isFlag:!1}}else return{isFlag:(s==null?void 0:s.toUpperCase())==="SUPERADMIN"}},c=r.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=e=>te.getComponent(e),W=r.ref({}),J=r.ref([]),f=r.ref({}),p=r.ref({}),K=e=>{switch(e){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},S=r.ref({}),L=e=>{l.setCacheInputMenu({type:c.type,data:e}),l.setIsRefreshMenus(!0)},j=(e,s,n)=>{},G=async(e,s)=>{c.type=K(s==null?void 0:s.operateType),j(s,c.type),p.value=e,S.value=s},Q=()=>{c.show=!1},X=e=>e==null?void 0:e.filter(s=>s.allowInherit),Y=()=>{var n,o,t,i,d;let e;c.type==="create"&&(e=((n=p.value)==null?void 0:n.path)+"/"+f.value[(o=f.value)==null?void 0:o.prop]),c.type==="update"&&(e=(t=p.value)==null?void 0:t.path);const s={...p.value,config:X((i=p.value)==null?void 0:i.config),children:[],childMenus:[],title:f.value[(d=f.value)==null?void 0:d.prop],path:e};console.log("clickSubmitForm",S.value,p.value,s),L(s),c.show=!1},Z=e=>{var n,o;const s=(n=e==null?void 0:e.contents)==null?void 0:n.find(t=>t.key==="formContent");s&&(f.value=(o=s==null?void 0:s.contents)==null?void 0:o.reduce((t,i)=>(t[i.key]=i.value,t.prop=i.key,t),{}))},I=r.ref(!1);return{isCollapse:I,handleMenuCollapse:()=>{I.value=!I.value},handleCompChange:Z,dialogForm:W,dialogRenderComps:J,getComponents:U,clickSubmitForm:Y,dialogInfo:c,beforeDialogDestroy:Q,clickMenuIcon:G,mode:B,renderMenuList:x,clickMenu:E,openMenu:V,closeMenu:O,changeMenuStyle:a}}}}const re=r.defineComponent(b());exports._sfc_main=re;exports._sfc_main$1=q;exports.setComponent=b;exports.ssMenu=m;
@@ -1,4 +1,4 @@
1
- "use strict";const T3=require("./MTLLoader-BlLfoBce.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-fAuSnfOH.cjs"),u2=require("./threeViewerHost-D70yS3z2.cjs"),q3=require("./index-C8qRkCgn.cjs"),f2=require("vue"),p2=require("./index-CX2C-kjD.cjs");class u1 extends a.DataTextureLoader{constructor(_){super(_)}parse(_){function P(x){switch(x.image_type){case $:case V:if(x.colormap_length>256||x.colormap_size!==24||x.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case o:case z:case y:if(x.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case h3:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+x.image_type)}if(x.width<=0||x.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(x.pixel_size!==8&&x.pixel_size!==16&&x.pixel_size!==24&&x.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+x.pixel_size)}function R(x,o3,i3,Q,u3){let Z,s3;const W=i3.pixel_size>>3,D=i3.width*i3.height*W;if(o3&&(s3=u3.subarray(Q,Q+=i3.colormap_length*(i3.colormap_size>>3))),x){Z=new Uint8Array(D);let S,M,B,a3=0;const v=new Uint8Array(W);for(;a3<D;)if(S=u3[Q++],M=(S&127)+1,S&128){for(B=0;B<W;++B)v[B]=u3[Q++];for(B=0;B<M;++B)Z.set(v,a3+B*W);a3+=W*M}else{for(M*=W,B=0;B<M;++B)Z[a3+B]=u3[Q++];a3+=M}}else Z=u3.subarray(Q,Q+=o3?i3.width*i3.height:D);return{pixel_data:Z,palettes:s3}}function l(x,o3,i3,Q,u3,Z,s3,W,D){const S=D;let M,B=0,a3,v;const K=G.width;for(v=o3;v!==Q;v+=i3)for(a3=u3;a3!==s3;a3+=Z,B++)M=W[B],x[(a3+K*v)*4+3]=255,x[(a3+K*v)*4+2]=S[M*3+0],x[(a3+K*v)*4+1]=S[M*3+1],x[(a3+K*v)*4+0]=S[M*3+2];return x}function N(x,o3,i3,Q,u3,Z,s3,W){let D,S=0,M,B;const a3=G.width;for(B=o3;B!==Q;B+=i3)for(M=u3;M!==s3;M+=Z,S+=2)D=W[S+0]+(W[S+1]<<8),x[(M+a3*B)*4+0]=(D&31744)>>7,x[(M+a3*B)*4+1]=(D&992)>>2,x[(M+a3*B)*4+2]=(D&31)<<3,x[(M+a3*B)*4+3]=D&32768?0:255;return x}function J(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=3)x[(S+B*M)*4+3]=255,x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+1]=W[D+1],x[(S+B*M)*4+0]=W[D+2];return x}function F(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=4)x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+1]=W[D+1],x[(S+B*M)*4+0]=W[D+2],x[(S+B*M)*4+3]=W[D+3];return x}function X(x,o3,i3,Q,u3,Z,s3,W){let D,S=0,M,B;const a3=G.width;for(B=o3;B!==Q;B+=i3)for(M=u3;M!==s3;M+=Z,S++)D=W[S],x[(M+a3*B)*4+0]=D,x[(M+a3*B)*4+1]=D,x[(M+a3*B)*4+2]=D,x[(M+a3*B)*4+3]=255;return x}function l3(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=2)x[(S+B*M)*4+0]=W[D+0],x[(S+B*M)*4+1]=W[D+0],x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+3]=W[D+1];return x}function d3(x,o3,i3,Q,u3){let Z,s3,W,D,S,M;switch((G.flags&p)>>f){default:case I:Z=0,W=1,S=o3,s3=0,D=1,M=i3;break;case L:Z=0,W=1,S=o3,s3=i3-1,D=-1,M=-1;break;case O:Z=o3-1,W=-1,S=-1,s3=0,D=1,M=i3;break;case g:Z=o3-1,W=-1,S=-1,s3=i3-1,D=-1,M=-1;break}if(Y)switch(G.pixel_size){case 8:X(x,s3,D,M,Z,W,S,Q);break;case 16:l3(x,s3,D,M,Z,W,S,Q);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(G.pixel_size){case 8:l(x,s3,D,M,Z,W,S,Q,u3);break;case 16:N(x,s3,D,M,Z,W,S,Q);break;case 24:J(x,s3,D,M,Z,W,S,Q);break;case 32:F(x,s3,D,M,Z,W,S,Q);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return x}const h3=0,$=1,h=2,o=3,V=9,z=10,y=11,p=48,f=4,L=0,g=1,I=2,O=3;if(_.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let u=0;const b=new Uint8Array(_),G={id_length:b[u++],colormap_type:b[u++],image_type:b[u++],colormap_index:b[u++]|b[u++]<<8,colormap_length:b[u++]|b[u++]<<8,colormap_size:b[u++],origin:[b[u++]|b[u++]<<8,b[u++]|b[u++]<<8],width:b[u++]|b[u++]<<8,height:b[u++]|b[u++]<<8,pixel_size:b[u++],flags:b[u++]};if(P(G),G.id_length+u>_.length)throw new Error("THREE.TGALoader: No data.");u+=G.id_length;let U=!1,H=!1,Y=!1;switch(G.image_type){case V:U=!0,H=!0;break;case $:H=!0;break;case z:U=!0;break;case h:break;case y:U=!0,Y=!0;break;case o:Y=!0;break}const A3=new Uint8Array(G.width*G.height*4),g3=R(U,H,G,u,b);return d3(A3,G.width,G.height,g3.pixel_data,g3.palettes),{data:A3,width:G.width,height:G.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class m2 extends a.Loader{load(_,P,R,l){const N=this,J=N.path===""?a.LoaderUtils.extractUrlBase(_):N.path,F=new a.FileLoader(N.manager);F.setPath(N.path),F.setRequestHeader(N.requestHeader),F.setWithCredentials(N.withCredentials),F.load(_,function(X){try{P(N.parse(X,J))}catch(l3){l?l(l3):console.error(l3),N.manager.itemError(_)}},R,l)}parse(_,P){function R(t,e){const i=[],n=t.childNodes;for(let s=0,r=n.length;s<r;s++){const c=n[s];c.nodeName===e&&i.push(c)}return i}function l(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function N(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function J(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function F(t){return t.substring(1)}function X(){return"three_default_"+d2++}function l3(t){return Object.keys(t).length===0}function d3(t){return{unit:h3(R(t,"unit")[0]),upAxis:$(R(t,"up_axis")[0])}}function h3(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function $(t){return t!==void 0?t.textContent:"Y_UP"}function h(t,e,i,n){const s=R(t,e)[0];if(s!==void 0){const r=R(s,i);for(let c=0;c<r.length;c++)n(r[c])}}function o(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function V(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function z(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const r=t.childNodes[n];if(r.nodeType!==1)continue;let c;switch(r.nodeName){case"source":c=r.getAttribute("id"),e.sources[c]=j3(r);break;case"sampler":c=r.getAttribute("id"),e.samplers[c]=y(r);break;case"channel":c=r.getAttribute("target"),e.channels[c]=p(r);break;case"animation":z(r),i=!0;break;default:console.log(r)}}i===!1&&(j.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function y(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=F(s.getAttribute("source")),c=s.getAttribute("semantic");e.inputs[c]=r;break}}return e}function p(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let r=n.shift();const c=r.indexOf("(")!==-1,A=r.indexOf(".")!==-1;if(A)n=r.split("."),r=n.shift(),e.member=n.shift();else if(c){const m=r.split("(");r=m.shift();for(let w=0;w<m.length;w++)m[w]=parseInt(m[w].replace(/\)/,""));e.indices=m}return e.id=s,e.sid=r,e.arraySyntax=c,e.memberSyntax=A,e.sampler=F(t.getAttribute("source")),e}function f(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const r in i)if(i.hasOwnProperty(r)){const c=i[r],A=n[c.sampler],m=A.inputs.INPUT,w=A.inputs.OUTPUT,T=s[m],d=s[w],C=g(c,T,d);G(C,e)}return e}function L(t){return V(j.animations[t],f)}function g(t,e,i){const n=j.nodes[t.id],s=B3(n.id),r=n.transforms[t.sid],c=n.matrix.clone().transpose();let A,m,w,T,d,C;const k={};switch(r){case"matrix":for(w=0,T=e.array.length;w<T;w++)if(A=e.array[w],m=w*i.stride,k[A]===void 0&&(k[A]={}),t.arraySyntax===!0){const m3=i.array[m],c3=t.indices[0]+4*t.indices[1];k[A][c3]=m3}else for(d=0,C=i.stride;d<C;d++)k[A][d]=i.array[m+d];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break}const q=I(k,c);return{name:s.uuid,keyframes:q}}function I(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)U(i,s,e.elements[s]);return i;function n(s,r){return s.time-r.time}}const O=new a.Vector3,u=new a.Vector3,b=new a.Quaternion;function G(t,e){const i=t.keyframes,n=t.name,s=[],r=[],c=[],A=[];for(let m=0,w=i.length;m<w;m++){const T=i[m],d=T.time,C=T.value;N3.fromArray(C).transpose(),N3.decompose(O,b,u),s.push(d),r.push(O.x,O.y,O.z),c.push(b.x,b.y,b.z,b.w),A.push(u.x,u.y,u.z)}return r.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,r)),c.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,c)),A.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,A)),e}function U(t,e,i){let n,s=!0,r,c;for(r=0,c=t.length;r<c;r++)n=t[r],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(r=0,c=t.length;r<c;r++)n=t[r],n.value[e]=i;else H(t,e)}function H(t,e){let i,n;for(let s=0,r=t.length;s<r;s++){const c=t[s];if(c.value[e]===null){if(i=Y(t,s,e),n=A3(t,s,e),i===null){c.value[e]=n.value[e];continue}if(n===null){c.value[e]=i.value[e];continue}g3(c,i,n,e)}}}function Y(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function A3(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function g3(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function x(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(F(s.getAttribute("url")));break}}j.clips[t.getAttribute("id")]=e}function o3(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let r=0,c=s.length;r<c;r++){const A=L(s[r]);for(let m=0,w=A.length;m<w;m++)e.push(A[m])}return new a.AnimationClip(i,n,e)}function i3(t){return V(j.clips[t],o3)}function Q(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=F(s.getAttribute("source")),e.skin=u3(s);break;case"morph":e.id=F(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}j.controllers[t.getAttribute("id")]=e}function u3(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=N(s.textContent);break;case"source":const r=s.getAttribute("id");e.sources[r]=j3(s);break;case"joints":e.joints=Z(s);break;case"vertex_weights":e.vertexWeights=s3(s);break}}return e}function Z(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=s.getAttribute("semantic"),c=F(s.getAttribute("source"));e.inputs[r]=c;break}}return e}function s3(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=s.getAttribute("semantic"),c=F(s.getAttribute("source")),A=parseInt(s.getAttribute("offset"));e.inputs[r]={id:c,offset:A};break;case"vcount":e.vcount=J(s.textContent);break;case"v":e.v=J(s.textContent);break}}return e}function W(t){const e={id:t.id},i=j.geometries[e.id];return t.skin!==void 0&&(e.skin=D(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function D(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,r=s.vcount,c=s.v,A=s.inputs.JOINT.offset,m=s.inputs.WEIGHT.offset,w=t.sources[t.joints.inputs.JOINT],T=t.sources[t.joints.inputs.INV_BIND_MATRIX],d=n[s.inputs.WEIGHT.id].array;let C=0,k,q,E;for(k=0,E=r.length;k<E;k++){const c3=r[k],t3=[];for(q=0;q<c3;q++){const n3=c[C+A],H3=c[C+m],k3=d[H3];t3.push({index:n3,weight:k3}),C+=2}for(t3.sort(m3),q=0;q<4;q++){const n3=t3[q];n3!==void 0?(i.indices.array.push(n3.index),i.weights.array.push(n3.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),k=0,E=w.array.length;k<E;k++){const c3=w.array[k],t3=new a.Matrix4().fromArray(T.array,k*T.stride).transpose();i.joints.push({name:c3,boneInverse:t3})}return i;function m3(c3,t3){return t3.weight-c3.weight}}function S(t){return V(j.controllers[t],W)}function M(t){const e={init_from:R(t,"init_from")[0].textContent};j.images[t.getAttribute("id")]=e}function B(t){return t.build!==void 0?t.build:t.init_from}function a3(t){const e=j.images[t];return e!==void 0?V(e,B):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function v(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=K(s);break}}j.effects[t.getAttribute("id")]=e}function K(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":e3(s,e);break;case"technique":e.technique=r3(s);break;case"extra":e.extra=p3(s);break}}return e}function e3(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const r=t.childNodes[n];if(r.nodeType===1)switch(r.nodeName){case"surface":e.surfaces[i]=f3(r);break;case"sampler2D":e.samplers[i]=x3(r);break}}}function f3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function x3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function r3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=z3(s);break;case"extra":e.extra=p3(s);break}}return e}function z3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=L3(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:L3(s)};break}}return e}function L3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=N(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:b3(s)};break}}return e}function b3(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":M3(s,e);break}}return e}function M3(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":y3(s,e);break}}}function y3(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=R3(s);break}}}function p3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=C3(s);break}}return e}function C3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=R3(s);break}}return e}function R3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:b3(s)};break}}return e}function W3(t){return t}function y1(t){return V(j.effects[t],W3)}function w1(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=F(s.getAttribute("url"));break}}j.materials[t.getAttribute("id")]=e}function v1(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=P3;break;default:e=l1}return e}function J3(t){const e=y1(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(m,w=null){const T=e.profile.samplers[m.id];let d=null;if(T!==void 0){const C=e.profile.surfaces[T.source];d=a3(C.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),d=a3(m.id);if(d!==null){const C=v1(d);if(C!==void 0){const k=C.load(d),q=m.extra;if(q!==void 0&&q.technique!==void 0&&l3(q.technique)===!1){const E=q.technique;k.wrapS=E.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,k.wrapT=E.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,k.offset.set(E.offsetU||0,E.offsetV||0),k.repeat.set(E.repeatU||1,E.repeatV||1)}else k.wrapS=a.RepeatWrapping,k.wrapT=a.RepeatWrapping;return w!==null&&(k.colorSpace=w),k}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",d),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",m.id),null}const r=i.parameters;for(const m in r){const w=r[m];switch(m){case"diffuse":w.color&&n.color.fromArray(w.color),w.texture&&(n.map=s(w.texture,a.SRGBColorSpace));break;case"specular":w.color&&n.specular&&n.specular.fromArray(w.color),w.texture&&(n.specularMap=s(w.texture));break;case"bump":w.texture&&(n.normalMap=s(w.texture));break;case"ambient":w.texture&&(n.lightMap=s(w.texture,a.SRGBColorSpace));break;case"shininess":w.float&&n.shininess&&(n.shininess=w.float);break;case"emission":w.color&&n.emissive&&n.emissive.fromArray(w.color),w.texture&&(n.emissiveMap=s(w.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let c=r.transparent,A=r.transparency;if(A===void 0&&c&&(A={float:1}),c===void 0&&A&&(c={opaque:"A_ONE",data:{color:[1,1,1,1]}}),c&&A)if(c.data.texture)n.transparent=!0;else{const m=c.data.color;switch(c.opaque){case"A_ONE":n.opacity=m[3]*A.float;break;case"RGB_ZERO":n.opacity=1-m[0]*A.float;break;case"A_ZERO":n.opacity=1-m[3]*A.float;break;case"RGB_ONE":n.opacity=m[0]*A.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',c.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const m=i.extra.technique;for(const w in m){const T=m[w];switch(w){case"double_sided":n.side=T===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(T.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function z1(t){return V(j.materials[t],J3)}function M1(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=x1(s);break}}j.cameras[t.getAttribute("id")]=e}function x1(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return A1(i)}}return{}}function A1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=L1(n);break}}return e}function L1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function K3(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function k1(t){const e=j.cameras[t];return e!==void 0?V(e,K3):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function N1(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=C1(s);break}}j.lights[t.getAttribute("id")]=e}function C1(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=_1(s)}}return e}function _1(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const r=N(s.textContent);e.color=new a.Color().fromArray(r),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const c=parseFloat(s.textContent);e.distance=c?Math.sqrt(1/c):0;break}}return e}function Y3(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function T1(t){const e=j.lights[t];return e!==void 0?V(e,Y3):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function H1(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=R(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const r=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[r]=j3(s);break;case"vertices":e.vertices=E1(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(B1(s));break;default:console.log(s)}}j.geometries[t.getAttribute("id")]=e}}function j3(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=N(n.textContent);break;case"Name_array":e.array=l(n.textContent);break;case"technique_common":const s=R(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function E1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=F(n.getAttribute("source")))}return e}function B1(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=F(s.getAttribute("source")),c=s.getAttribute("semantic"),A=parseInt(s.getAttribute("offset")),m=parseInt(s.getAttribute("set")),w=m>0?c+m:c;e.inputs[w]={id:r,offset:A},e.stride=Math.max(e.stride,A+1),c==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=J(s.textContent);break;case"p":e.p=J(s.textContent);break}}return e}function V1(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function S1(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function X3(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const r=V1(s);for(const c in r){const A=r[c];S1(A),e[c]=q1(A,i,n)}return e}function q1(t,e,i){const n={},s={array:[],stride:0},r={array:[],stride:0},c={array:[],stride:0},A={array:[],stride:0},m={array:[],stride:0},w={array:[],stride:4},T={array:[],stride:4},d=new a.BufferGeometry,C=[];let k=0;for(let q=0;q<t.length;q++){const E=t[q],m3=E.inputs;let c3=0;switch(E.type){case"lines":case"linestrips":c3=E.count*2;break;case"triangles":c3=E.count*3;break;case"polylist":for(let t3=0;t3<E.count;t3++){const n3=E.vcount[t3];switch(n3){case 3:c3+=3;break;case 4:c3+=6;break;default:c3+=(n3-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",E.type)}d.addGroup(k,c3,q),k+=c3,E.material&&C.push(E.material);for(const t3 in m3){const n3=m3[t3];switch(t3){case"VERTEX":for(const H3 in i){const k3=i[H3];switch(H3){case"POSITION":const V3=s.array.length;if(_3(E,e[k3],n3.offset,s.array),s.stride=e[k3].stride,e.skinWeights&&e.skinIndices&&(_3(E,e.skinIndices,n3.offset,w.array),_3(E,e.skinWeights,n3.offset,T.array)),E.hasUV===!1&&t.uvsNeedsFix===!0){const h2=(s.array.length-V3)/s.stride;for(let h1=0;h1<h2;h1++)c.array.push(0,0)}break;case"NORMAL":_3(E,e[k3],n3.offset,r.array),r.stride=e[k3].stride;break;case"COLOR":_3(E,e[k3],n3.offset,m.array),m.stride=e[k3].stride;break;case"TEXCOORD":_3(E,e[k3],n3.offset,c.array),c.stride=e[k3].stride;break;case"TEXCOORD1":_3(E,e[k3],n3.offset,A.array),c.stride=e[k3].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',H3)}}break;case"NORMAL":_3(E,e[n3.id],n3.offset,r.array),r.stride=e[n3.id].stride;break;case"COLOR":_3(E,e[n3.id],n3.offset,m.array,!0),m.stride=e[n3.id].stride;break;case"TEXCOORD":_3(E,e[n3.id],n3.offset,c.array),c.stride=e[n3.id].stride;break;case"TEXCOORD1":_3(E,e[n3.id],n3.offset,A.array),A.stride=e[n3.id].stride;break}}}return s.array.length>0&&d.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),r.array.length>0&&d.setAttribute("normal",new a.Float32BufferAttribute(r.array,r.stride)),m.array.length>0&&d.setAttribute("color",new a.Float32BufferAttribute(m.array,m.stride)),c.array.length>0&&d.setAttribute("uv",new a.Float32BufferAttribute(c.array,c.stride)),A.array.length>0&&d.setAttribute("uv1",new a.Float32BufferAttribute(A.array,A.stride)),w.array.length>0&&d.setAttribute("skinIndex",new a.Float32BufferAttribute(w.array,w.stride)),T.array.length>0&&d.setAttribute("skinWeight",new a.Float32BufferAttribute(T.array,T.stride)),n.data=d,n.type=t[0].type,n.materialKeys=C,n}function _3(t,e,i,n,s=!1){const r=t.p,c=t.stride,A=t.vcount;function m(d){let C=r[d+i]*T;const k=C+T;for(;C<k;C++)n.push(w[C]);if(s){const q=n.length-T-1;F3.setRGB(n[q+0],n[q+1],n[q+2],a.SRGBColorSpace),n[q+0]=F3.r,n[q+1]=F3.g,n[q+2]=F3.b}}const w=e.array,T=e.stride;if(t.vcount!==void 0){let d=0;for(let C=0,k=A.length;C<k;C++){const q=A[C];if(q===4){const E=d+c*0,m3=d+c*1,c3=d+c*2,t3=d+c*3;m(E),m(m3),m(t3),m(m3),m(c3),m(t3)}else if(q===3){const E=d+c*0,m3=d+c*1,c3=d+c*2;m(E),m(m3),m(c3)}else if(q>4)for(let E=1,m3=q-2;E<=m3;E++){const c3=d+c*0,t3=d+c*E,n3=d+c*(E+1);m(c3),m(t3),m(n3)}d+=c*q}}else for(let d=0,C=r.length;d<C;d+=c)m(d)}function Z3(t){return V(j.geometries[t],X3)}function R1(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":O1(n,e);break}}j.kinematicsModels[t.getAttribute("id")]=e}function F1(t){return t.build!==void 0?t.build:t}function I1(t){return V(j.kinematicsModels[t],F1)}function O1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=U1(n);break;case"link":e.links.push(Q3(n));break}}}function U1(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=j1(n);break}}return e}function j1(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=N(n.textContent);e.axis.fromArray(s);break;case"limits":const r=n.getElementsByTagName("max")[0],c=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(r.textContent),e.limits.min=parseFloat(c.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function Q3(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(D1(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(e1(n));break}}return e}function D1(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(Q3(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(e1(n));break}}return e}function e1(t){const e={type:t.nodeName},i=N(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function G1(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},P1(n,e.rigidBodies[n.getAttribute("name")]);break}}j.physicsModels[t.getAttribute("id")]=e}function P1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":$1(n,e);break}}}function $1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=N(n.textContent);break;case"mass":e.mass=N(n.textContent)[0];break}}}function W1(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(J1(n));break}}j.kinematicsScenes[F(t.getAttribute("url"))]=e}function J1(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const r=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=r.substring(0,r.length-1);break}}return e}function K1(t){return t.build!==void 0?t.build:t}function Y1(t){return V(j.kinematicsScenes[t],K1)}function X1(){const t=Object.keys(j.kinematicsModels)[0],e=Object.keys(j.kinematicsScenes)[0],i=Object.keys(j.visualScenes)[0];if(t===void 0||e===void 0)return;const n=I1(t),s=Y1(e),r=o1(i),c=s.bindJointAxis,A={};for(let T=0,d=c.length;T<d;T++){const C=c[T],k=w3.querySelector('[sid="'+C.target+'"]');if(k){const q=k.parentElement;m(C.jointIndex,q)}}function m(T,d){const C=d.getAttribute("name"),k=n.joints[T];r.traverse(function(q){q.name===C&&(A[T]={object:q,transforms:Z1(d),joint:k,position:k.zeroPosition})})}const w=new a.Matrix4;d1={joints:n&&n.joints,getJointValue:function(T){const d=A[T];if(d)return d.position;console.warn("THREE.ColladaLoader: Joint "+T+" doesn't exist.")},setJointValue:function(T,d){const C=A[T];if(C){const k=C.joint;if(d>k.limits.max||d<k.limits.min)console.warn("THREE.ColladaLoader: Joint "+T+" value "+d+" outside of limits (min: "+k.limits.min+", max: "+k.limits.max+").");else if(k.static)console.warn("THREE.ColladaLoader: Joint "+T+" is static.");else{const q=C.object,E=k.axis,m3=C.transforms;N3.identity();for(let c3=0;c3<m3.length;c3++){const t3=m3[c3];if(t3.sid&&t3.sid.indexOf(T)!==-1)switch(k.type){case"revolute":N3.multiply(w.makeRotationAxis(E,a.MathUtils.degToRad(d)));break;case"prismatic":N3.multiply(w.makeTranslation(E.x*d,E.y*d,E.z*d));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+k.type);break}else switch(t3.type){case"matrix":N3.multiply(t3.obj);break;case"translate":N3.multiply(w.makeTranslation(t3.obj.x,t3.obj.y,t3.obj.z));break;case"scale":N3.scale(t3.obj);break;case"rotate":N3.multiply(w.makeRotationAxis(t3.obj,t3.angle));break}}q.matrix.copy(N3),q.matrix.decompose(q.position,q.quaternion,q.scale),A[T].position=d}}else console.log("THREE.ColladaLoader: "+T+" does not exist.")}}}function Z1(t){const e=[],i=w3.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let r,c;switch(s.nodeName){case"matrix":r=N(s.textContent);const A=new a.Matrix4().fromArray(r).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:A});break;case"translate":case"scale":r=N(s.textContent),c=new a.Vector3().fromArray(r),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:c});break;case"rotate":r=N(s.textContent),c=new a.Vector3().fromArray(r);const m=a.MathUtils.degToRad(r[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:c,angle:m});break}}return e}function Q1(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const N3=new a.Matrix4,E3=new a.Vector3;function D3(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),D3(n);break;case"instance_camera":e.instanceCameras.push(F(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(t1(n));break;case"instance_light":e.instanceLights.push(F(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(t1(n));break;case"instance_node":e.instanceNodes.push(F(n.getAttribute("url")));break;case"matrix":s=N(n.textContent),e.matrix.multiply(N3.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=N(n.textContent),E3.fromArray(s),e.matrix.multiply(N3.makeTranslation(E3.x,E3.y,E3.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=N(n.textContent);const r=a.MathUtils.degToRad(s[3]);e.matrix.multiply(N3.makeRotationAxis(E3.fromArray(s),r)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=N(n.textContent),e.matrix.scale(E3.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return s1(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):j.nodes[e.id]=e,e}function t1(t){const e={id:F(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let r=0;r<s.length;r++){const c=s[r],A=c.getAttribute("symbol"),m=c.getAttribute("target");e.materials[A]=F(m)}break;case"skeleton":e.skeletons.push(F(n.textContent));break}}return e}function e2(t,e){const i=[],n=[];let s,r,c;for(s=0;s<t.length;s++){const w=t[s];let T;if(s1(w))T=B3(w),n1(T,e,i);else if(a2(w)){const C=j.visualScenes[w].children;for(let k=0;k<C.length;k++){const q=C[k];if(q.type==="JOINT"){const E=B3(q.id);n1(E,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",w)}for(s=0;s<e.length;s++)for(r=0;r<i.length;r++)if(c=i[r],c.bone.name===e[s].name){n[s]=c,c.processed=!0;break}for(s=0;s<i.length;s++)c=i[s],c.processed===!1&&(n.push(c),c.processed=!0);const A=[],m=[];for(s=0;s<n.length;s++)c=n[s],A.push(c.bone),m.push(c.boneInverse);return new a.Skeleton(A,m)}function n1(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let r=0;r<e.length;r++){const c=e[r];if(c.name===n.name){s=c.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function t2(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,r=t.instanceCameras,c=t.instanceControllers,A=t.instanceLights,m=t.instanceGeometries,w=t.instanceNodes;for(let d=0,C=n.length;d<C;d++)e.push(B3(n[d]));for(let d=0,C=r.length;d<C;d++){const k=k1(r[d]);k!==null&&e.push(k.clone())}for(let d=0,C=c.length;d<C;d++){const k=c[d],q=S(k.id),E=Z3(q.id),m3=i1(E,k.materials),c3=k.skeletons,t3=q.skin.joints,n3=e2(c3,t3);for(let H3=0,k3=m3.length;H3<k3;H3++){const V3=m3[H3];V3.isSkinnedMesh&&(V3.bind(n3,q.skin.bindMatrix),V3.normalizeSkinWeights()),e.push(V3)}}for(let d=0,C=A.length;d<C;d++){const k=T1(A[d]);k!==null&&e.push(k.clone())}for(let d=0,C=m.length;d<C;d++){const k=m[d],q=Z3(k.id),E=i1(q,k.materials);for(let m3=0,c3=E.length;m3<c3;m3++)e.push(E[m3])}for(let d=0,C=w.length;d<C;d++)e.push(B3(w[d]).clone());let T;if(n.length===0&&e.length===1)T=e[0];else{T=s==="JOINT"?new a.Bone:new a.Group;for(let d=0;d<e.length;d++)T.add(e[d])}return T.name=s==="JOINT"?t.sid:t.name,T.matrix.copy(i),T.matrix.decompose(T.position,T.quaternion,T.scale),T}const n2=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function i2(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const r=e[t[n]];r===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(n2)):i.push(z1(r))}return i}function i1(t,e){const i=[];for(const n in t){const s=t[n],r=i2(s.materialKeys,e);if(r.length===0&&(n==="lines"||n==="linestrips"?r.push(new a.LineBasicMaterial):r.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let w=0,T=r.length;w<T;w++){const d=r[w];if(d.isMeshPhongMaterial===!0||d.isMeshLambertMaterial===!0){const C=new a.LineBasicMaterial;C.color.copy(d.color),C.opacity=d.opacity,C.transparent=d.transparent,r[w]=C}}const c=s.data.attributes.skinIndex!==void 0,A=r.length===1?r[0]:r;let m;switch(n){case"lines":m=new a.LineSegments(s.data,A);break;case"linestrips":m=new a.Line(s.data,A);break;case"triangles":case"polylist":c?m=new a.SkinnedMesh(s.data,A):m=new a.Mesh(s.data,A);break}i.push(m)}return i}function s1(t){return j.nodes[t]!==void 0}function B3(t){return V(j.nodes[t],t2)}function s2(t){const e={name:t.getAttribute("name"),children:[]};Q1(t);const i=R(t,"node");for(let n=0;n<i.length;n++)e.children.push(D3(i[n]));j.visualScenes[t.getAttribute("id")]=e}function a1(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(B3(s.id))}return e}function a2(t){return j.visualScenes[t]!==void 0}function o1(t){return V(j.visualScenes[t],a1)}function o2(t){const e=R(t,"instance_visual_scene")[0];return o1(F(e.getAttribute("url")))}function r2(){const t=j.clips;if(l3(t)===!0){if(l3(j.animations)===!1){const e=[];for(const i in j.animations){const n=L(i);for(let s=0,r=n.length;s<r;s++)e.push(n[s])}I3.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)I3.push(i3(e))}function c2(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
1
+ "use strict";const T3=require("./MTLLoader-Bd8gswVO.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CHavLvPk.cjs"),u2=require("./threeViewerHost-Ba-SeQ6m.cjs"),q3=require("./index-C8qRkCgn.cjs"),f2=require("vue"),p2=require("./index-CX2C-kjD.cjs");class u1 extends a.DataTextureLoader{constructor(_){super(_)}parse(_){function P(x){switch(x.image_type){case $:case V:if(x.colormap_length>256||x.colormap_size!==24||x.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case h:case o:case z:case y:if(x.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case h3:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+x.image_type)}if(x.width<=0||x.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(x.pixel_size!==8&&x.pixel_size!==16&&x.pixel_size!==24&&x.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+x.pixel_size)}function R(x,o3,i3,Q,u3){let Z,s3;const W=i3.pixel_size>>3,D=i3.width*i3.height*W;if(o3&&(s3=u3.subarray(Q,Q+=i3.colormap_length*(i3.colormap_size>>3))),x){Z=new Uint8Array(D);let S,M,B,a3=0;const v=new Uint8Array(W);for(;a3<D;)if(S=u3[Q++],M=(S&127)+1,S&128){for(B=0;B<W;++B)v[B]=u3[Q++];for(B=0;B<M;++B)Z.set(v,a3+B*W);a3+=W*M}else{for(M*=W,B=0;B<M;++B)Z[a3+B]=u3[Q++];a3+=M}}else Z=u3.subarray(Q,Q+=o3?i3.width*i3.height:D);return{pixel_data:Z,palettes:s3}}function l(x,o3,i3,Q,u3,Z,s3,W,D){const S=D;let M,B=0,a3,v;const K=G.width;for(v=o3;v!==Q;v+=i3)for(a3=u3;a3!==s3;a3+=Z,B++)M=W[B],x[(a3+K*v)*4+3]=255,x[(a3+K*v)*4+2]=S[M*3+0],x[(a3+K*v)*4+1]=S[M*3+1],x[(a3+K*v)*4+0]=S[M*3+2];return x}function N(x,o3,i3,Q,u3,Z,s3,W){let D,S=0,M,B;const a3=G.width;for(B=o3;B!==Q;B+=i3)for(M=u3;M!==s3;M+=Z,S+=2)D=W[S+0]+(W[S+1]<<8),x[(M+a3*B)*4+0]=(D&31744)>>7,x[(M+a3*B)*4+1]=(D&992)>>2,x[(M+a3*B)*4+2]=(D&31)<<3,x[(M+a3*B)*4+3]=D&32768?0:255;return x}function J(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=3)x[(S+B*M)*4+3]=255,x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+1]=W[D+1],x[(S+B*M)*4+0]=W[D+2];return x}function F(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=4)x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+1]=W[D+1],x[(S+B*M)*4+0]=W[D+2],x[(S+B*M)*4+3]=W[D+3];return x}function X(x,o3,i3,Q,u3,Z,s3,W){let D,S=0,M,B;const a3=G.width;for(B=o3;B!==Q;B+=i3)for(M=u3;M!==s3;M+=Z,S++)D=W[S],x[(M+a3*B)*4+0]=D,x[(M+a3*B)*4+1]=D,x[(M+a3*B)*4+2]=D,x[(M+a3*B)*4+3]=255;return x}function l3(x,o3,i3,Q,u3,Z,s3,W){let D=0,S,M;const B=G.width;for(M=o3;M!==Q;M+=i3)for(S=u3;S!==s3;S+=Z,D+=2)x[(S+B*M)*4+0]=W[D+0],x[(S+B*M)*4+1]=W[D+0],x[(S+B*M)*4+2]=W[D+0],x[(S+B*M)*4+3]=W[D+1];return x}function d3(x,o3,i3,Q,u3){let Z,s3,W,D,S,M;switch((G.flags&p)>>f){default:case I:Z=0,W=1,S=o3,s3=0,D=1,M=i3;break;case L:Z=0,W=1,S=o3,s3=i3-1,D=-1,M=-1;break;case O:Z=o3-1,W=-1,S=-1,s3=0,D=1,M=i3;break;case g:Z=o3-1,W=-1,S=-1,s3=i3-1,D=-1,M=-1;break}if(Y)switch(G.pixel_size){case 8:X(x,s3,D,M,Z,W,S,Q);break;case 16:l3(x,s3,D,M,Z,W,S,Q);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(G.pixel_size){case 8:l(x,s3,D,M,Z,W,S,Q,u3);break;case 16:N(x,s3,D,M,Z,W,S,Q);break;case 24:J(x,s3,D,M,Z,W,S,Q);break;case 32:F(x,s3,D,M,Z,W,S,Q);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return x}const h3=0,$=1,h=2,o=3,V=9,z=10,y=11,p=48,f=4,L=0,g=1,I=2,O=3;if(_.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let u=0;const b=new Uint8Array(_),G={id_length:b[u++],colormap_type:b[u++],image_type:b[u++],colormap_index:b[u++]|b[u++]<<8,colormap_length:b[u++]|b[u++]<<8,colormap_size:b[u++],origin:[b[u++]|b[u++]<<8,b[u++]|b[u++]<<8],width:b[u++]|b[u++]<<8,height:b[u++]|b[u++]<<8,pixel_size:b[u++],flags:b[u++]};if(P(G),G.id_length+u>_.length)throw new Error("THREE.TGALoader: No data.");u+=G.id_length;let U=!1,H=!1,Y=!1;switch(G.image_type){case V:U=!0,H=!0;break;case $:H=!0;break;case z:U=!0;break;case h:break;case y:U=!0,Y=!0;break;case o:Y=!0;break}const A3=new Uint8Array(G.width*G.height*4),g3=R(U,H,G,u,b);return d3(A3,G.width,G.height,g3.pixel_data,g3.palettes),{data:A3,width:G.width,height:G.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class m2 extends a.Loader{load(_,P,R,l){const N=this,J=N.path===""?a.LoaderUtils.extractUrlBase(_):N.path,F=new a.FileLoader(N.manager);F.setPath(N.path),F.setRequestHeader(N.requestHeader),F.setWithCredentials(N.withCredentials),F.load(_,function(X){try{P(N.parse(X,J))}catch(l3){l?l(l3):console.error(l3),N.manager.itemError(_)}},R,l)}parse(_,P){function R(t,e){const i=[],n=t.childNodes;for(let s=0,r=n.length;s<r;s++){const c=n[s];c.nodeName===e&&i.push(c)}return i}function l(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function N(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function J(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function F(t){return t.substring(1)}function X(){return"three_default_"+d2++}function l3(t){return Object.keys(t).length===0}function d3(t){return{unit:h3(R(t,"unit")[0]),upAxis:$(R(t,"up_axis")[0])}}function h3(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function $(t){return t!==void 0?t.textContent:"Y_UP"}function h(t,e,i,n){const s=R(t,e)[0];if(s!==void 0){const r=R(s,i);for(let c=0;c<r.length;c++)n(r[c])}}function o(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function V(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function z(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const r=t.childNodes[n];if(r.nodeType!==1)continue;let c;switch(r.nodeName){case"source":c=r.getAttribute("id"),e.sources[c]=j3(r);break;case"sampler":c=r.getAttribute("id"),e.samplers[c]=y(r);break;case"channel":c=r.getAttribute("target"),e.channels[c]=p(r);break;case"animation":z(r),i=!0;break;default:console.log(r)}}i===!1&&(j.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function y(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=F(s.getAttribute("source")),c=s.getAttribute("semantic");e.inputs[c]=r;break}}return e}function p(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let r=n.shift();const c=r.indexOf("(")!==-1,A=r.indexOf(".")!==-1;if(A)n=r.split("."),r=n.shift(),e.member=n.shift();else if(c){const m=r.split("(");r=m.shift();for(let w=0;w<m.length;w++)m[w]=parseInt(m[w].replace(/\)/,""));e.indices=m}return e.id=s,e.sid=r,e.arraySyntax=c,e.memberSyntax=A,e.sampler=F(t.getAttribute("source")),e}function f(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const r in i)if(i.hasOwnProperty(r)){const c=i[r],A=n[c.sampler],m=A.inputs.INPUT,w=A.inputs.OUTPUT,T=s[m],d=s[w],C=g(c,T,d);G(C,e)}return e}function L(t){return V(j.animations[t],f)}function g(t,e,i){const n=j.nodes[t.id],s=B3(n.id),r=n.transforms[t.sid],c=n.matrix.clone().transpose();let A,m,w,T,d,C;const k={};switch(r){case"matrix":for(w=0,T=e.array.length;w<T;w++)if(A=e.array[w],m=w*i.stride,k[A]===void 0&&(k[A]={}),t.arraySyntax===!0){const m3=i.array[m],c3=t.indices[0]+4*t.indices[1];k[A][c3]=m3}else for(d=0,C=i.stride;d<C;d++)k[A][d]=i.array[m+d];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',r);break}const q=I(k,c);return{name:s.uuid,keyframes:q}}function I(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)U(i,s,e.elements[s]);return i;function n(s,r){return s.time-r.time}}const O=new a.Vector3,u=new a.Vector3,b=new a.Quaternion;function G(t,e){const i=t.keyframes,n=t.name,s=[],r=[],c=[],A=[];for(let m=0,w=i.length;m<w;m++){const T=i[m],d=T.time,C=T.value;N3.fromArray(C).transpose(),N3.decompose(O,b,u),s.push(d),r.push(O.x,O.y,O.z),c.push(b.x,b.y,b.z,b.w),A.push(u.x,u.y,u.z)}return r.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,r)),c.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,c)),A.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,A)),e}function U(t,e,i){let n,s=!0,r,c;for(r=0,c=t.length;r<c;r++)n=t[r],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(r=0,c=t.length;r<c;r++)n=t[r],n.value[e]=i;else H(t,e)}function H(t,e){let i,n;for(let s=0,r=t.length;s<r;s++){const c=t[s];if(c.value[e]===null){if(i=Y(t,s,e),n=A3(t,s,e),i===null){c.value[e]=n.value[e];continue}if(n===null){c.value[e]=i.value[e];continue}g3(c,i,n,e)}}}function Y(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function A3(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function g3(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function x(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(F(s.getAttribute("url")));break}}j.clips[t.getAttribute("id")]=e}function o3(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let r=0,c=s.length;r<c;r++){const A=L(s[r]);for(let m=0,w=A.length;m<w;m++)e.push(A[m])}return new a.AnimationClip(i,n,e)}function i3(t){return V(j.clips[t],o3)}function Q(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=F(s.getAttribute("source")),e.skin=u3(s);break;case"morph":e.id=F(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}j.controllers[t.getAttribute("id")]=e}function u3(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=N(s.textContent);break;case"source":const r=s.getAttribute("id");e.sources[r]=j3(s);break;case"joints":e.joints=Z(s);break;case"vertex_weights":e.vertexWeights=s3(s);break}}return e}function Z(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=s.getAttribute("semantic"),c=F(s.getAttribute("source"));e.inputs[r]=c;break}}return e}function s3(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=s.getAttribute("semantic"),c=F(s.getAttribute("source")),A=parseInt(s.getAttribute("offset"));e.inputs[r]={id:c,offset:A};break;case"vcount":e.vcount=J(s.textContent);break;case"v":e.v=J(s.textContent);break}}return e}function W(t){const e={id:t.id},i=j.geometries[e.id];return t.skin!==void 0&&(e.skin=D(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function D(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,r=s.vcount,c=s.v,A=s.inputs.JOINT.offset,m=s.inputs.WEIGHT.offset,w=t.sources[t.joints.inputs.JOINT],T=t.sources[t.joints.inputs.INV_BIND_MATRIX],d=n[s.inputs.WEIGHT.id].array;let C=0,k,q,E;for(k=0,E=r.length;k<E;k++){const c3=r[k],t3=[];for(q=0;q<c3;q++){const n3=c[C+A],H3=c[C+m],k3=d[H3];t3.push({index:n3,weight:k3}),C+=2}for(t3.sort(m3),q=0;q<4;q++){const n3=t3[q];n3!==void 0?(i.indices.array.push(n3.index),i.weights.array.push(n3.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),k=0,E=w.array.length;k<E;k++){const c3=w.array[k],t3=new a.Matrix4().fromArray(T.array,k*T.stride).transpose();i.joints.push({name:c3,boneInverse:t3})}return i;function m3(c3,t3){return t3.weight-c3.weight}}function S(t){return V(j.controllers[t],W)}function M(t){const e={init_from:R(t,"init_from")[0].textContent};j.images[t.getAttribute("id")]=e}function B(t){return t.build!==void 0?t.build:t.init_from}function a3(t){const e=j.images[t];return e!==void 0?V(e,B):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function v(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=K(s);break}}j.effects[t.getAttribute("id")]=e}function K(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":e3(s,e);break;case"technique":e.technique=r3(s);break;case"extra":e.extra=p3(s);break}}return e}function e3(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const r=t.childNodes[n];if(r.nodeType===1)switch(r.nodeName){case"surface":e.surfaces[i]=f3(r);break;case"sampler2D":e.samplers[i]=x3(r);break}}}function f3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function x3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function r3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=z3(s);break;case"extra":e.extra=p3(s);break}}return e}function z3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=L3(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:L3(s)};break}}return e}function L3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=N(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:b3(s)};break}}return e}function b3(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":M3(s,e);break}}return e}function M3(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":y3(s,e);break}}}function y3(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=R3(s);break}}}function p3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=C3(s);break}}return e}function C3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=R3(s);break}}return e}function R3(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:b3(s)};break}}return e}function W3(t){return t}function y1(t){return V(j.effects[t],W3)}function w1(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=F(s.getAttribute("url"));break}}j.materials[t.getAttribute("id")]=e}function v1(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=P3;break;default:e=l1}return e}function J3(t){const e=y1(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(m,w=null){const T=e.profile.samplers[m.id];let d=null;if(T!==void 0){const C=e.profile.surfaces[T.source];d=a3(C.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),d=a3(m.id);if(d!==null){const C=v1(d);if(C!==void 0){const k=C.load(d),q=m.extra;if(q!==void 0&&q.technique!==void 0&&l3(q.technique)===!1){const E=q.technique;k.wrapS=E.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,k.wrapT=E.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,k.offset.set(E.offsetU||0,E.offsetV||0),k.repeat.set(E.repeatU||1,E.repeatV||1)}else k.wrapS=a.RepeatWrapping,k.wrapT=a.RepeatWrapping;return w!==null&&(k.colorSpace=w),k}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",d),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",m.id),null}const r=i.parameters;for(const m in r){const w=r[m];switch(m){case"diffuse":w.color&&n.color.fromArray(w.color),w.texture&&(n.map=s(w.texture,a.SRGBColorSpace));break;case"specular":w.color&&n.specular&&n.specular.fromArray(w.color),w.texture&&(n.specularMap=s(w.texture));break;case"bump":w.texture&&(n.normalMap=s(w.texture));break;case"ambient":w.texture&&(n.lightMap=s(w.texture,a.SRGBColorSpace));break;case"shininess":w.float&&n.shininess&&(n.shininess=w.float);break;case"emission":w.color&&n.emissive&&n.emissive.fromArray(w.color),w.texture&&(n.emissiveMap=s(w.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let c=r.transparent,A=r.transparency;if(A===void 0&&c&&(A={float:1}),c===void 0&&A&&(c={opaque:"A_ONE",data:{color:[1,1,1,1]}}),c&&A)if(c.data.texture)n.transparent=!0;else{const m=c.data.color;switch(c.opaque){case"A_ONE":n.opacity=m[3]*A.float;break;case"RGB_ZERO":n.opacity=1-m[0]*A.float;break;case"A_ZERO":n.opacity=1-m[3]*A.float;break;case"RGB_ONE":n.opacity=m[0]*A.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',c.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const m=i.extra.technique;for(const w in m){const T=m[w];switch(w){case"double_sided":n.side=T===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(T.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function z1(t){return V(j.materials[t],J3)}function M1(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=x1(s);break}}j.cameras[t.getAttribute("id")]=e}function x1(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return A1(i)}}return{}}function A1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=L1(n);break}}return e}function L1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function K3(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function k1(t){const e=j.cameras[t];return e!==void 0?V(e,K3):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function N1(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=C1(s);break}}j.lights[t.getAttribute("id")]=e}function C1(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=_1(s)}}return e}function _1(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const r=N(s.textContent);e.color=new a.Color().fromArray(r),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const c=parseFloat(s.textContent);e.distance=c?Math.sqrt(1/c):0;break}}return e}function Y3(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function T1(t){const e=j.lights[t];return e!==void 0?V(e,Y3):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function H1(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=R(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const r=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[r]=j3(s);break;case"vertices":e.vertices=E1(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(B1(s));break;default:console.log(s)}}j.geometries[t.getAttribute("id")]=e}}function j3(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=N(n.textContent);break;case"Name_array":e.array=l(n.textContent);break;case"technique_common":const s=R(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function E1(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=F(n.getAttribute("source")))}return e}function B1(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const r=F(s.getAttribute("source")),c=s.getAttribute("semantic"),A=parseInt(s.getAttribute("offset")),m=parseInt(s.getAttribute("set")),w=m>0?c+m:c;e.inputs[w]={id:r,offset:A},e.stride=Math.max(e.stride,A+1),c==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=J(s.textContent);break;case"p":e.p=J(s.textContent);break}}return e}function V1(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function S1(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function X3(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const r=V1(s);for(const c in r){const A=r[c];S1(A),e[c]=q1(A,i,n)}return e}function q1(t,e,i){const n={},s={array:[],stride:0},r={array:[],stride:0},c={array:[],stride:0},A={array:[],stride:0},m={array:[],stride:0},w={array:[],stride:4},T={array:[],stride:4},d=new a.BufferGeometry,C=[];let k=0;for(let q=0;q<t.length;q++){const E=t[q],m3=E.inputs;let c3=0;switch(E.type){case"lines":case"linestrips":c3=E.count*2;break;case"triangles":c3=E.count*3;break;case"polylist":for(let t3=0;t3<E.count;t3++){const n3=E.vcount[t3];switch(n3){case 3:c3+=3;break;case 4:c3+=6;break;default:c3+=(n3-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",E.type)}d.addGroup(k,c3,q),k+=c3,E.material&&C.push(E.material);for(const t3 in m3){const n3=m3[t3];switch(t3){case"VERTEX":for(const H3 in i){const k3=i[H3];switch(H3){case"POSITION":const V3=s.array.length;if(_3(E,e[k3],n3.offset,s.array),s.stride=e[k3].stride,e.skinWeights&&e.skinIndices&&(_3(E,e.skinIndices,n3.offset,w.array),_3(E,e.skinWeights,n3.offset,T.array)),E.hasUV===!1&&t.uvsNeedsFix===!0){const h2=(s.array.length-V3)/s.stride;for(let h1=0;h1<h2;h1++)c.array.push(0,0)}break;case"NORMAL":_3(E,e[k3],n3.offset,r.array),r.stride=e[k3].stride;break;case"COLOR":_3(E,e[k3],n3.offset,m.array),m.stride=e[k3].stride;break;case"TEXCOORD":_3(E,e[k3],n3.offset,c.array),c.stride=e[k3].stride;break;case"TEXCOORD1":_3(E,e[k3],n3.offset,A.array),c.stride=e[k3].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',H3)}}break;case"NORMAL":_3(E,e[n3.id],n3.offset,r.array),r.stride=e[n3.id].stride;break;case"COLOR":_3(E,e[n3.id],n3.offset,m.array,!0),m.stride=e[n3.id].stride;break;case"TEXCOORD":_3(E,e[n3.id],n3.offset,c.array),c.stride=e[n3.id].stride;break;case"TEXCOORD1":_3(E,e[n3.id],n3.offset,A.array),A.stride=e[n3.id].stride;break}}}return s.array.length>0&&d.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),r.array.length>0&&d.setAttribute("normal",new a.Float32BufferAttribute(r.array,r.stride)),m.array.length>0&&d.setAttribute("color",new a.Float32BufferAttribute(m.array,m.stride)),c.array.length>0&&d.setAttribute("uv",new a.Float32BufferAttribute(c.array,c.stride)),A.array.length>0&&d.setAttribute("uv1",new a.Float32BufferAttribute(A.array,A.stride)),w.array.length>0&&d.setAttribute("skinIndex",new a.Float32BufferAttribute(w.array,w.stride)),T.array.length>0&&d.setAttribute("skinWeight",new a.Float32BufferAttribute(T.array,T.stride)),n.data=d,n.type=t[0].type,n.materialKeys=C,n}function _3(t,e,i,n,s=!1){const r=t.p,c=t.stride,A=t.vcount;function m(d){let C=r[d+i]*T;const k=C+T;for(;C<k;C++)n.push(w[C]);if(s){const q=n.length-T-1;F3.setRGB(n[q+0],n[q+1],n[q+2],a.SRGBColorSpace),n[q+0]=F3.r,n[q+1]=F3.g,n[q+2]=F3.b}}const w=e.array,T=e.stride;if(t.vcount!==void 0){let d=0;for(let C=0,k=A.length;C<k;C++){const q=A[C];if(q===4){const E=d+c*0,m3=d+c*1,c3=d+c*2,t3=d+c*3;m(E),m(m3),m(t3),m(m3),m(c3),m(t3)}else if(q===3){const E=d+c*0,m3=d+c*1,c3=d+c*2;m(E),m(m3),m(c3)}else if(q>4)for(let E=1,m3=q-2;E<=m3;E++){const c3=d+c*0,t3=d+c*E,n3=d+c*(E+1);m(c3),m(t3),m(n3)}d+=c*q}}else for(let d=0,C=r.length;d<C;d+=c)m(d)}function Z3(t){return V(j.geometries[t],X3)}function R1(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":O1(n,e);break}}j.kinematicsModels[t.getAttribute("id")]=e}function F1(t){return t.build!==void 0?t.build:t}function I1(t){return V(j.kinematicsModels[t],F1)}function O1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=U1(n);break;case"link":e.links.push(Q3(n));break}}}function U1(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=j1(n);break}}return e}function j1(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=N(n.textContent);e.axis.fromArray(s);break;case"limits":const r=n.getElementsByTagName("max")[0],c=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(r.textContent),e.limits.min=parseFloat(c.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function Q3(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(D1(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(e1(n));break}}return e}function D1(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(Q3(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(e1(n));break}}return e}function e1(t){const e={type:t.nodeName},i=N(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function G1(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},P1(n,e.rigidBodies[n.getAttribute("name")]);break}}j.physicsModels[t.getAttribute("id")]=e}function P1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":$1(n,e);break}}}function $1(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=N(n.textContent);break;case"mass":e.mass=N(n.textContent)[0];break}}}function W1(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(J1(n));break}}j.kinematicsScenes[F(t.getAttribute("url"))]=e}function J1(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const r=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=r.substring(0,r.length-1);break}}return e}function K1(t){return t.build!==void 0?t.build:t}function Y1(t){return V(j.kinematicsScenes[t],K1)}function X1(){const t=Object.keys(j.kinematicsModels)[0],e=Object.keys(j.kinematicsScenes)[0],i=Object.keys(j.visualScenes)[0];if(t===void 0||e===void 0)return;const n=I1(t),s=Y1(e),r=o1(i),c=s.bindJointAxis,A={};for(let T=0,d=c.length;T<d;T++){const C=c[T],k=w3.querySelector('[sid="'+C.target+'"]');if(k){const q=k.parentElement;m(C.jointIndex,q)}}function m(T,d){const C=d.getAttribute("name"),k=n.joints[T];r.traverse(function(q){q.name===C&&(A[T]={object:q,transforms:Z1(d),joint:k,position:k.zeroPosition})})}const w=new a.Matrix4;d1={joints:n&&n.joints,getJointValue:function(T){const d=A[T];if(d)return d.position;console.warn("THREE.ColladaLoader: Joint "+T+" doesn't exist.")},setJointValue:function(T,d){const C=A[T];if(C){const k=C.joint;if(d>k.limits.max||d<k.limits.min)console.warn("THREE.ColladaLoader: Joint "+T+" value "+d+" outside of limits (min: "+k.limits.min+", max: "+k.limits.max+").");else if(k.static)console.warn("THREE.ColladaLoader: Joint "+T+" is static.");else{const q=C.object,E=k.axis,m3=C.transforms;N3.identity();for(let c3=0;c3<m3.length;c3++){const t3=m3[c3];if(t3.sid&&t3.sid.indexOf(T)!==-1)switch(k.type){case"revolute":N3.multiply(w.makeRotationAxis(E,a.MathUtils.degToRad(d)));break;case"prismatic":N3.multiply(w.makeTranslation(E.x*d,E.y*d,E.z*d));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+k.type);break}else switch(t3.type){case"matrix":N3.multiply(t3.obj);break;case"translate":N3.multiply(w.makeTranslation(t3.obj.x,t3.obj.y,t3.obj.z));break;case"scale":N3.scale(t3.obj);break;case"rotate":N3.multiply(w.makeRotationAxis(t3.obj,t3.angle));break}}q.matrix.copy(N3),q.matrix.decompose(q.position,q.quaternion,q.scale),A[T].position=d}}else console.log("THREE.ColladaLoader: "+T+" does not exist.")}}}function Z1(t){const e=[],i=w3.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let r,c;switch(s.nodeName){case"matrix":r=N(s.textContent);const A=new a.Matrix4().fromArray(r).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:A});break;case"translate":case"scale":r=N(s.textContent),c=new a.Vector3().fromArray(r),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:c});break;case"rotate":r=N(s.textContent),c=new a.Vector3().fromArray(r);const m=a.MathUtils.degToRad(r[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:c,angle:m});break}}return e}function Q1(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const N3=new a.Matrix4,E3=new a.Vector3;function D3(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),D3(n);break;case"instance_camera":e.instanceCameras.push(F(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(t1(n));break;case"instance_light":e.instanceLights.push(F(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(t1(n));break;case"instance_node":e.instanceNodes.push(F(n.getAttribute("url")));break;case"matrix":s=N(n.textContent),e.matrix.multiply(N3.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=N(n.textContent),E3.fromArray(s),e.matrix.multiply(N3.makeTranslation(E3.x,E3.y,E3.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=N(n.textContent);const r=a.MathUtils.degToRad(s[3]);e.matrix.multiply(N3.makeRotationAxis(E3.fromArray(s),r)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=N(n.textContent),e.matrix.scale(E3.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return s1(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):j.nodes[e.id]=e,e}function t1(t){const e={id:F(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let r=0;r<s.length;r++){const c=s[r],A=c.getAttribute("symbol"),m=c.getAttribute("target");e.materials[A]=F(m)}break;case"skeleton":e.skeletons.push(F(n.textContent));break}}return e}function e2(t,e){const i=[],n=[];let s,r,c;for(s=0;s<t.length;s++){const w=t[s];let T;if(s1(w))T=B3(w),n1(T,e,i);else if(a2(w)){const C=j.visualScenes[w].children;for(let k=0;k<C.length;k++){const q=C[k];if(q.type==="JOINT"){const E=B3(q.id);n1(E,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",w)}for(s=0;s<e.length;s++)for(r=0;r<i.length;r++)if(c=i[r],c.bone.name===e[s].name){n[s]=c,c.processed=!0;break}for(s=0;s<i.length;s++)c=i[s],c.processed===!1&&(n.push(c),c.processed=!0);const A=[],m=[];for(s=0;s<n.length;s++)c=n[s],A.push(c.bone),m.push(c.boneInverse);return new a.Skeleton(A,m)}function n1(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let r=0;r<e.length;r++){const c=e[r];if(c.name===n.name){s=c.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function t2(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,r=t.instanceCameras,c=t.instanceControllers,A=t.instanceLights,m=t.instanceGeometries,w=t.instanceNodes;for(let d=0,C=n.length;d<C;d++)e.push(B3(n[d]));for(let d=0,C=r.length;d<C;d++){const k=k1(r[d]);k!==null&&e.push(k.clone())}for(let d=0,C=c.length;d<C;d++){const k=c[d],q=S(k.id),E=Z3(q.id),m3=i1(E,k.materials),c3=k.skeletons,t3=q.skin.joints,n3=e2(c3,t3);for(let H3=0,k3=m3.length;H3<k3;H3++){const V3=m3[H3];V3.isSkinnedMesh&&(V3.bind(n3,q.skin.bindMatrix),V3.normalizeSkinWeights()),e.push(V3)}}for(let d=0,C=A.length;d<C;d++){const k=T1(A[d]);k!==null&&e.push(k.clone())}for(let d=0,C=m.length;d<C;d++){const k=m[d],q=Z3(k.id),E=i1(q,k.materials);for(let m3=0,c3=E.length;m3<c3;m3++)e.push(E[m3])}for(let d=0,C=w.length;d<C;d++)e.push(B3(w[d]).clone());let T;if(n.length===0&&e.length===1)T=e[0];else{T=s==="JOINT"?new a.Bone:new a.Group;for(let d=0;d<e.length;d++)T.add(e[d])}return T.name=s==="JOINT"?t.sid:t.name,T.matrix.copy(i),T.matrix.decompose(T.position,T.quaternion,T.scale),T}const n2=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function i2(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const r=e[t[n]];r===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(n2)):i.push(z1(r))}return i}function i1(t,e){const i=[];for(const n in t){const s=t[n],r=i2(s.materialKeys,e);if(r.length===0&&(n==="lines"||n==="linestrips"?r.push(new a.LineBasicMaterial):r.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let w=0,T=r.length;w<T;w++){const d=r[w];if(d.isMeshPhongMaterial===!0||d.isMeshLambertMaterial===!0){const C=new a.LineBasicMaterial;C.color.copy(d.color),C.opacity=d.opacity,C.transparent=d.transparent,r[w]=C}}const c=s.data.attributes.skinIndex!==void 0,A=r.length===1?r[0]:r;let m;switch(n){case"lines":m=new a.LineSegments(s.data,A);break;case"linestrips":m=new a.Line(s.data,A);break;case"triangles":case"polylist":c?m=new a.SkinnedMesh(s.data,A):m=new a.Mesh(s.data,A);break}i.push(m)}return i}function s1(t){return j.nodes[t]!==void 0}function B3(t){return V(j.nodes[t],t2)}function s2(t){const e={name:t.getAttribute("name"),children:[]};Q1(t);const i=R(t,"node");for(let n=0;n<i.length;n++)e.children.push(D3(i[n]));j.visualScenes[t.getAttribute("id")]=e}function a1(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(B3(s.id))}return e}function a2(t){return j.visualScenes[t]!==void 0}function o1(t){return V(j.visualScenes[t],a1)}function o2(t){const e=R(t,"instance_visual_scene")[0];return o1(F(e.getAttribute("url")))}function r2(){const t=j.clips;if(l3(t)===!0){if(l3(j.animations)===!1){const e=[];for(const i in j.animations){const n=L(i);for(let s=0,r=n.length;s<r;s++)e.push(n[s])}I3.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)I3.push(i3(e))}function c2(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
2
2
  `,i.push(...n.childNodes))}return e.trim()}if(_.length===0)return{scene:new a.Scene};const r1=new DOMParser().parseFromString(_,"application/xml"),w3=R(r1,"COLLADA")[0],G3=r1.getElementsByTagName("parsererror")[0];if(G3!==void 0){const t=R(G3,"div")[0];let e;return t?e=t.textContent:e=c2(G3),console.error(`THREE.ColladaLoader: Failed to parse collada file.
3
3
  `,e),null}const l2=w3.getAttribute("version");console.debug("THREE.ColladaLoader: File version",l2);const c1=d3(R(w3,"asset")[0]),l1=new a.TextureLoader(this.manager);l1.setPath(this.resourcePath||P).setCrossOrigin(this.crossOrigin);let P3;u1&&(P3=new u1(this.manager),P3.setPath(this.resourcePath||P));const F3=new a.Color,I3=[];let d1={},d2=0;const j={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};h(w3,"library_animations","animation",z),h(w3,"library_animation_clips","animation_clip",x),h(w3,"library_controllers","controller",Q),h(w3,"library_images","image",M),h(w3,"library_effects","effect",v),h(w3,"library_materials","material",w1),h(w3,"library_cameras","camera",M1),h(w3,"library_lights","light",N1),h(w3,"library_geometries","geometry",H1),h(w3,"library_nodes","node",D3),h(w3,"library_visual_scenes","visual_scene",s2),h(w3,"library_kinematics_models","kinematics_model",R1),h(w3,"library_physics_models","physics_model",G1),h(w3,"scene","instance_kinematics_scene",W1),o(j.animations,f),o(j.clips,o3),o(j.controllers,W),o(j.images,B),o(j.effects,W3),o(j.materials,J3),o(j.cameras,K3),o(j.lights,Y3),o(j.geometries,X3),o(j.visualScenes,a1),r2(),X1();const O3=o2(R(w3,"scene")[0]);return O3.animations=I3,c1.upAxis==="Z_UP"&&(console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."),O3.rotation.set(-Math.PI/2,0,0)),O3.scale.multiplyScalar(c1.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),I3},kinematics:d1,library:j,scene:O3}}}const $3=new a.Quaternion,f1=new a.Euler;function S3(v3){return v3?v3.trim().split(/\s+/g).map(_=>parseFloat(_)):[0,0,0]}function p1(v3,_,P=!1){P||v3.rotation.set(0,0,0),f1.set(_[0],_[1],_[2],"ZYX"),$3.setFromEuler(f1),$3.multiply(v3.quaternion),v3.quaternion.copy($3)}class g1{constructor(_){this.manager=_||a.DefaultLoadingManager,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(_){return new Promise((P,R)=>{this.load(_,P,null,R)})}load(_,P,R,l){const N=this.manager,J=a.LoaderUtils.extractUrlBase(_),F=this.manager.resolveURL(_);N.itemStart(F),fetch(F,this.fetchOptions).then(X=>{if(X.ok)return R&&R(null),X.text();throw new Error(`URDFLoader: Failed to load url '${F}' with error code ${X.status} : ${X.statusText}.`)}).then(X=>{const l3=this.parse(X,this.workingPath||J);P(l3),N.itemEnd(F)}).catch(X=>{l?l(X):console.error("URDFLoader: Error loading file.",X),N.itemError(F),N.itemEnd(F)})}parse(_,P=this.workingPath){const R=this.packages,l=this.loadMeshCb,N=this.parseVisual,J=this.parseCollision,F=this.manager,X={},l3={},d3={};function h3(p){if(!/^package:\/\//.test(p))return P?P+p:p;const[f,L]=p.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof R=="string")return R.endsWith(f)?R+"/"+L:R+"/"+f+"/"+L;if(R instanceof Function)return R(f)+"/"+L;if(typeof R=="object")return f in R?R[f]+"/"+L:(console.error(`URDFLoader : ${f} not found in provided package list.`),null)}function $(p){let f;p instanceof Document?f=[...p.children]:p instanceof Element?f=[p]:f=[...new DOMParser().parseFromString(p,"text/xml").children];const L=f.filter(g=>g.nodeName==="robot").pop();return h(L)}function h(p){const f=[...p.children],L=f.filter(U=>U.nodeName.toLowerCase()==="link"),g=f.filter(U=>U.nodeName.toLowerCase()==="joint"),I=f.filter(U=>U.nodeName.toLowerCase()==="material"),O=new a.URDFRobot;O.robotName=p.getAttribute("name"),O.urdfRobotNode=p,I.forEach(U=>{const H=U.getAttribute("name");d3[H]=z(U)});const u={},b={};L.forEach(U=>{const H=U.getAttribute("name"),Y=p.querySelector(`child[link="${H}"]`)===null;X[H]=V(U,u,b,Y?O:null)}),g.forEach(U=>{const H=U.getAttribute("name");l3[H]=o(U)}),O.joints=l3,O.links=X,O.colliders=b,O.visual=u;const G=Object.values(l3);return G.forEach(U=>{U instanceof a.URDFMimicJoint&&l3[U.mimicJoint].mimicJoints.push(U)}),G.forEach(U=>{const H=new Set,Y=A3=>{if(H.has(A3))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");H.add(A3),A3.mimicJoints.forEach(g3=>{Y(g3)})};Y(U)}),O.frames={...b,...u,...X,...l3},O}function o(p){const f=[...p.children],L=p.getAttribute("type");let g;const I=f.find(H=>H.nodeName.toLowerCase()==="mimic");I?(g=new a.URDFMimicJoint,g.mimicJoint=I.getAttribute("joint"),g.multiplier=parseFloat(I.getAttribute("multiplier")||1),g.offset=parseFloat(I.getAttribute("offset")||0)):g=new a.URDFJoint,g.urdfNode=p,g.name=p.getAttribute("name"),g.urdfName=g.name,g.jointType=L;let O=null,u=null,b=[0,0,0],G=[0,0,0];f.forEach(H=>{const Y=H.nodeName.toLowerCase();Y==="origin"?(b=S3(H.getAttribute("xyz")),G=S3(H.getAttribute("rpy"))):Y==="child"?u=X[H.getAttribute("link")]:Y==="parent"?O=X[H.getAttribute("link")]:Y==="limit"&&(g.limit.lower=parseFloat(H.getAttribute("lower")||g.limit.lower),g.limit.upper=parseFloat(H.getAttribute("upper")||g.limit.upper))}),O.add(g),g.add(u),p1(g,G),g.position.set(b[0],b[1],b[2]);const U=f.filter(H=>H.nodeName.toLowerCase()==="axis")[0];if(U){const H=U.getAttribute("xyz").split(/\s+/g).map(Y=>parseFloat(Y));g.axis=new a.Vector3(H[0],H[1],H[2]),g.axis.normalize()}return g}function V(p,f,L,g=null){g===null&&(g=new a.URDFLink);const I=[...p.children];return g.name=p.getAttribute("name"),g.urdfName=g.name,g.urdfNode=p,N&&I.filter(u=>u.nodeName.toLowerCase()==="visual").forEach(u=>{const b=y(u,d3);if(g.add(b),u.hasAttribute("name")){const G=u.getAttribute("name");b.name=G,b.urdfName=G,f[G]=b}}),J&&I.filter(u=>u.nodeName.toLowerCase()==="collision").forEach(u=>{const b=y(u);if(g.add(b),u.hasAttribute("name")){const G=u.getAttribute("name");b.name=G,b.urdfName=G,L[G]=b}}),g}function z(p){const f=[...p.children],L=new a.MeshPhongMaterial;return L.name=p.getAttribute("name")||"",f.forEach(g=>{const I=g.nodeName.toLowerCase();if(I==="color"){const O=g.getAttribute("rgba").split(/\s/g).map(u=>parseFloat(u));L.color.setRGB(O[0],O[1],O[2]),L.opacity=O[3],L.transparent=O[3]<1,L.depthWrite=!L.transparent}else if(I==="texture"){const O=g.getAttribute("filename");if(O){const u=new a.TextureLoader(F),b=h3(O);L.map=u.load(b),L.map.colorSpace=a.SRGBColorSpace}}}),L}function y(p,f={}){const L=p.nodeName.toLowerCase()==="collision",g=[...p.children];let I=null;const O=g.filter(b=>b.nodeName.toLowerCase()==="material")[0];if(O){const b=O.getAttribute("name");b&&b in f?I=f[b]:I=z(O)}else I=new a.MeshPhongMaterial;const u=L?new a.URDFCollider:new a.URDFVisual;return u.urdfNode=p,g.forEach(b=>{const G=b.nodeName.toLowerCase();if(G==="geometry"){const U=b.children[0].nodeName.toLowerCase();if(U==="mesh"){const H=b.children[0].getAttribute("filename"),Y=h3(H);if(Y!==null){const A3=b.children[0].getAttribute("scale");if(A3){const g3=S3(A3);u.scale.set(g3[0],g3[1],g3[2])}l(Y,F,(g3,x)=>{x?console.error("URDFLoader: Error loading mesh.",x):g3&&(g3 instanceof a.Mesh&&(g3.material=I),g3.position.set(0,0,0),g3.quaternion.identity(),u.add(g3))})}}else if(U==="box"){const H=new a.Mesh;H.geometry=new a.BoxGeometry(1,1,1),H.material=I;const Y=S3(b.children[0].getAttribute("size"));H.scale.set(Y[0],Y[1],Y[2]),u.add(H)}else if(U==="sphere"){const H=new a.Mesh;H.geometry=new a.SphereGeometry(1,30,30),H.material=I;const Y=parseFloat(b.children[0].getAttribute("radius"))||0;H.scale.set(Y,Y,Y),u.add(H)}else if(U==="cylinder"){const H=new a.Mesh;H.geometry=new a.CylinderGeometry(1,1,1,30),H.material=I;const Y=parseFloat(b.children[0].getAttribute("radius"))||0,A3=parseFloat(b.children[0].getAttribute("length"))||0;H.scale.set(Y,A3,Y),H.rotation.set(Math.PI/2,0,0),u.add(H)}}else if(G==="origin"){const U=S3(b.getAttribute("xyz")),H=S3(b.getAttribute("rpy"));u.position.set(U[0],U[1],U[2]),u.rotation.set(0,0,0),p1(u,H)}}),u}return $(_)}defaultMeshLoader(_,P,R){/\.stl$/i.test(_)?new T3.STLLoader(P).load(_,N=>{const J=new a.Mesh(N,new a.MeshPhongMaterial);R(J)}):/\.dae$/i.test(_)?new m2(P).load(_,N=>R(N.scene)):console.warn(`URDFLoader: Could not load model at ${_}.
4
4
  No loader available`)}}class b2 extends a.Loader{constructor(_){super(_),this.littleEndian=!0}load(_,P,R,l){const N=this,J=new a.FileLoader(N.manager);J.setPath(N.path),J.setResponseType("arraybuffer"),J.setRequestHeader(N.requestHeader),J.setWithCredentials(N.withCredentials),J.load(_,function(F){try{P(N.parse(F))}catch(X){l?l(X):console.error(X),N.manager.itemError(_)}},R,l)}_getDataView(_,P,R,l){switch(R){case"F":return l===8?_.getFloat64(P,this.littleEndian):_.getFloat32(P,this.littleEndian);case"I":return l===1?_.getInt8(P):l===2?_.getInt16(P,this.littleEndian):_.getInt32(P,this.littleEndian);case"U":return l===1?_.getUint8(P):l===2?_.getUint16(P,this.littleEndian):_.getUint32(P,this.littleEndian)}}parse(_){function P(h,o){const V=h.length,z=new Uint8Array(o);let y=0,p=0,f,L,g;do if(f=h[y++],f<32){if(f++,p+f>o)throw new Error("Output buffer is not large enough");if(y+f>V)throw new Error("Invalid compressed data");do z[p++]=h[y++];while(--f)}else{if(L=f>>5,g=p-((f&31)<<8)-1,y>=V)throw new Error("Invalid compressed data");if(L===7&&(L+=h[y++],y>=V))throw new Error("Invalid compressed data");if(g-=h[y++],p+L+2>o)throw new Error("Output buffer is not large enough");if(g<0)throw new Error("Invalid compressed data");if(g>=p)throw new Error("Invalid compressed data");do z[p++]=z[g++];while(--L+2)}while(y<V);return z}function R(h){const o={},V=new Uint8Array(h);let z="",y="",p=0,f=!1;const L=V.length;for(;p<L&&f===!1;){const u=String.fromCharCode(V[p++]);u===`
@@ -1,6 +1,6 @@
1
- import { S as Y3, O as t1, M as n1 } from "./MTLLoader-Bl6JMZD-.js";
2
- import { bD as D2, am as G2, a7 as a1, a8 as O1, a9 as U1, V as _3, O as q3, ay as _1, S as P2, ai as j1, C as o1, Q as U3, aG as C1, bE as $2, J as V3, aP as J3, w as C3, ab as J2, K as O3, aQ as D1, P as T1, aE as W2, D as K2, ad as Y2, F as X2, E as Z2, U as j3, af as G1, aM as H1, aO as Q2, _ as c1, aU as T3, aH as e6, ax as r1, aA as t6, z as N3, a0 as P1, aB as n6, aF as s6, as as W3, au as E1, bF as i6, bG as a6, bH as V1, bI as o6, bJ as r6, bK as c6, bL as l6, bM as $1, bN as d6, bO as h6, N as u6, bP as f6, av as J1, aD as W1, Y as p6, B as m6, ak as B1, bQ as b6 } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BZPnZF-N.js";
3
- import { d as g6 } from "./threeViewerHost-BNnzz6WM.js";
1
+ import { S as Y3, O as t1, M as n1 } from "./MTLLoader-gdzQR_Hk.js";
2
+ import { bD as D2, am as G2, a7 as a1, a8 as O1, a9 as U1, V as _3, O as q3, ay as _1, S as P2, ai as j1, C as o1, Q as U3, aG as C1, bE as $2, J as V3, aP as J3, w as C3, ab as J2, K as O3, aQ as D1, P as T1, aE as W2, D as K2, ad as Y2, F as X2, E as Z2, U as j3, af as G1, aM as H1, aO as Q2, _ as c1, aU as T3, aH as e6, ax as r1, aA as t6, z as N3, a0 as P1, aB as n6, aF as s6, as as W3, au as E1, bF as i6, bG as a6, bH as V1, bI as o6, bJ as r6, bK as c6, bL as l6, bM as $1, bN as d6, bO as h6, N as u6, bP as f6, av as J1, aD as W1, Y as p6, B as m6, ak as B1, bQ as b6 } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BL1cikD3.js";
3
+ import { d as g6 } from "./threeViewerHost-Co0U6v_d.js";
4
4
  import { b as s1, s as y6, p as w6 } from "./index-DsSA-OiE.js";
5
5
  import { ref as v6 } from "vue";
6
6
  import { a as z6 } from "./index-Ce_gZ72y.js";
@@ -1,9 +1,9 @@
1
1
  import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as f, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, onUnmounted as ie, createVNode as A } from "vue";
2
- import { m as me, a as de, b as ye } from "./index-rPWz6KHn.js";
2
+ import { m as me, a as de, b as ye } from "./index-BLXYg9Gs.js";
3
3
  import { p as E, s as ee, c as k } from "./index-DsSA-OiE.js";
4
4
  import { a as te, u as fe } from "./index-Ce_gZ72y.js";
5
- import { g as ge } from "./index-C8IFPtAJ.js";
6
- import { e as he, a as ke } from "./array-BkvrJ2GR.js";
5
+ import { g as ge } from "./index-ajVsMnUs.js";
6
+ import { e as he, a as ke } from "./array-mkPvdkqz.js";
7
7
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const x = [
9
9
  {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-BgwYXT31.cjs"),i=require("./index-C8qRkCgn.cjs"),T=require("./index-CX2C-kjD.cjs"),Z=require("./index-lP-_9Gsb.cjs"),G=require("./array-BLzorBeE.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(E,{emit:j}){const t=E,x=j,h=T.useModelComp(i.pinia),{itemData:p}=i.storeToRefs(h),_=e.ref([]),C=e.ref([]),I=c=>{x("change",{wholeValue:_.value,editValue:c})},S=c=>{const g=i.cloneDeep(_.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));_.value=B};e.watch(()=>p.value,()=>{var c;!p.value||((c=p.value)==null?void 0:c.length)===0||(C.value=p.value,_.value=p.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(E,{emit:j}){const t=E,x=j,h=e.ref(""),p=e.ref([]),_=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=()=>{_.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});x("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,p.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:_.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:p.value,key:_.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-RhIBaFyU.cjs"),i=require("./index-C8qRkCgn.cjs"),T=require("./index-CX2C-kjD.cjs"),Z=require("./index-aTpWvup6.cjs"),G=require("./array-CsVIMexm.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(E,{emit:j}){const t=E,x=j,h=T.useModelComp(i.pinia),{itemData:p}=i.storeToRefs(h),_=e.ref([]),C=e.ref([]),I=c=>{x("change",{wholeValue:_.value,editValue:c})},S=c=>{const g=i.cloneDeep(_.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));_.value=B};e.watch(()=>p.value,()=>{var c;!p.value||((c=p.value)==null?void 0:c.length)===0||(C.value=p.value,_.value=p.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(E,{emit:j}){const t=E,x=j,h=e.ref(""),p=e.ref([]),_=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=()=>{_.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});x("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,p.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:_.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:p.value,key:_.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),C=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-fAuSnfOH.cjs");require("./index-C8qRkCgn.cjs");const s=require("./ss-component2.cjs"),v=require("./index-CX2C-kjD.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-D-bdppOV.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DLU6Qv3w.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CHzlphv9.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DkNldOC0.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-u-f2S6H4.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-BiwVpb9o.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-CDFo3As-.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-D70yS3z2.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=v.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=C.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"),C=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CHavLvPk.cjs");require("./index-C8qRkCgn.cjs");const s=require("./ss-component2.cjs"),v=require("./index-CX2C-kjD.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-e1Q2-l7w.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CF9id9ro.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Ck3lmJpc.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-MHgc1J83.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DI5DRRI8.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-6A1xf0Gs.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-UBx8eTMe.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-Ba-SeQ6m.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=v.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=C.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;