ss-component-new 1.1.273 → 1.1.276
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.
- package/dist/{array-BSIVd5lx.js → array-C6rEG4Rb.js} +2 -2
- package/dist/{array-BVXimQhd.cjs → array-UAGwFyj8.cjs} +1 -1
- package/dist/{cloneDeep-CZPFJadU.cjs → cloneDeep-HxwOhruj.cjs} +1 -1
- package/dist/{cloneDeep-ClY1j-C6.js → cloneDeep-RWEDux0J.js} +1 -1
- package/dist/index-1XQYhZ6y.cjs +6 -0
- package/dist/{index-DdHXQGnF.cjs → index-3H45R5SZ.cjs} +1 -1
- package/dist/{index-CCDAYSnH.cjs → index-5NmM1Nuy.cjs} +1 -1
- package/dist/{index-7MBKrCAM.js → index-5OzMnBD5.js} +4 -4
- package/dist/{index-D28BTnfW.cjs → index-B1o3qEui.cjs} +1 -1
- package/dist/{index-B0ZC2-WQ.js → index-B6mqIcYI.js} +9 -9
- package/dist/{index-Ds0Heaxo.cjs → index-B8wj0gMl.cjs} +1 -1
- package/dist/{index-DfXKHu2S.cjs → index-BASrL7Oa.cjs} +1 -1
- package/dist/{index-COCmmiH0.js → index-BDlxHOPf.js} +1 -1
- package/dist/{index-8DII3SD7.cjs → index-BEWoUIGg.cjs} +1 -1
- package/dist/{index-DnW5J9BW.js → index-BWH_MQ-2.js} +28 -28
- package/dist/{index-CE8KLYGZ.cjs → index-BdTUFtmG.cjs} +1 -1
- package/dist/{index-Rdw9AKBd.js → index-BhvTC8og.js} +48 -48
- package/dist/{index-BgSNaDWZ.js → index-Blw1eoEv.js} +4 -4
- package/dist/{index-DGckfGHT.js → index-BpJ8fsQC.js} +1 -1
- package/dist/{index-Dew6_PDZ.cjs → index-BtwIyg-g.cjs} +1 -1
- package/dist/{index-Pj-aZ5ai.js → index-BuQz3hlt.js} +6 -6
- package/dist/{index-BOEFY-rC.js → index-C69IeqI4.js} +6 -6
- package/dist/{index-6pusbvOW.cjs → index-C91R5HsG.cjs} +1 -1
- package/dist/index-CDY9OZVm.cjs +1 -0
- package/dist/{index-nOthK_vE.js → index-CNCq7XE2.js} +5 -5
- package/dist/{index-DYygR8aB.js → index-CQ4qsm5p.js} +3 -3
- package/dist/{index-BQxDKJHD.cjs → index-CR4b_bGt.cjs} +1 -1
- package/dist/{index-CVgIgbfg.cjs → index-CU0bvjUC.cjs} +1 -1
- package/dist/{index-BOjdtu5g.js → index-CVdNqFXQ.js} +26 -20
- package/dist/{index-DhApfo1h.js → index-CfjXFyxG.js} +5481 -7006
- package/dist/{index-CoarsSvg.cjs → index-Cfw0PGCR.cjs} +1 -1
- package/dist/{index-Cv5l4ZS6.cjs → index-CjS1s4BC.cjs} +1 -1
- package/dist/{index-DmtHG8i3.js → index-CmAXb3_h.js} +3 -3
- package/dist/index-CmT4MQuJ.cjs +1 -0
- package/dist/{index-BO4fr6qW.cjs → index-CuP7upXK.cjs} +1 -1
- package/dist/{index-CU51vpFM.js → index-CvMUSKKJ.js} +5 -5
- package/dist/{index-Co7sldl_.js → index-Cwa_oTrt.js} +180 -189
- package/dist/{index-rSPe7X_P.cjs → index-Cye4OPBs.cjs} +1 -1
- package/dist/{index-eVT5LOb9.js → index-D4Ff19qt.js} +9 -9
- package/dist/{index-BNoZEAh-.cjs → index-DAD1ohhu.cjs} +1 -1
- package/dist/{index-DjFluGYz.cjs → index-DJheOEvF.cjs} +1 -1
- package/dist/{index-Bn7_aJ3Y.js → index-DOty_Ebh.js} +8 -8
- package/dist/{index-Bd02Cewv.cjs → index-DVCvoRAP.cjs} +1 -1
- package/dist/{index-BX-TDbKx.cjs → index-DWyA686B.cjs} +1 -1
- package/dist/{index-Co2C0Hlo.js → index-D_gWyQ7R.js} +3 -3
- package/dist/{index-kqrzfJrx.cjs → index-De7vDkns.cjs} +3 -3
- package/dist/{index-D-6auHOF.js → index-Diy1Rbpw.js} +41 -41
- package/dist/{index-DI477aEp.js → index-Dqy8pZy4.js} +3 -3
- package/dist/index-OTVwIo7L.js +2518 -0
- package/dist/{index-2EaY1v2E.cjs → index-PnCjnJx9.cjs} +1 -1
- package/dist/index-QFn59i_g.js +257 -0
- package/dist/{index-Tvi4r9Wq.cjs → index-Td2THkCc.cjs} +1 -1
- package/dist/{index-C5O-9wyZ.js → index-_ETtXL2g.js} +1 -1
- package/dist/index-cLsBtq39.cjs +4197 -0
- package/dist/{index-B5VDjItJ.js → index-gMvZerNv.js} +6 -6
- package/dist/{index-BbEhLyrn.js → index-nGL8qjTK.js} +9 -9
- package/dist/{index-BWez9wHx.cjs → index-wjqqdbZo.cjs} +1 -1
- package/dist/{index-jBD_OUEb.js → index-z1aV9_LT.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BMhqErYj.js → index.vue_vue_type_script_setup_true_lang-DLRqR5c6.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CfsOuKYn.cjs → index.vue_vue_type_script_setup_true_lang-dBJnzcd9.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_486b9e58_lang-BNNxWAtd.js → index.vue_vue_type_style_index_0_scoped_486b9e58_lang-B67GWEi5.js} +104 -104
- package/dist/{index.vue_vue_type_style_index_0_scoped_486b9e58_lang-CSXUU5sh.cjs → index.vue_vue_type_style_index_0_scoped_486b9e58_lang-ChoS1ank.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-BSFSOtwn.cjs → index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-Cm8S9EKm.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-DuY023qP.js → index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-DogTcHnl.js} +8 -8
- package/dist/{login-B6cQJ8vr.js → login-CUTCN1XO.js} +2 -2
- package/dist/{login-BQpFXzTH.cjs → login-DaGuqQ8_.cjs} +1 -1
- package/dist/{main-CYXLdO61.js → main-CkQsdakj.js} +7 -7
- package/dist/{main-DaHVr46E.cjs → main-oXPQBWfD.cjs} +1 -1
- package/dist/{menu-BD0SK00j.cjs → menu-K4rgfR_3.cjs} +1 -1
- package/dist/{menu-Do5I6pzv.js → menu-Z1jdyQxJ.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +12 -12
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/dist/index-BFTDyLLk.cjs +0 -1
- package/dist/index-C3QvBlWS.cjs +0 -1
- package/dist/index-CYyLpCQr.js +0 -860
- package/dist/index-CtchSugA.js +0 -31
- package/dist/index-DETmIjYD.cjs +0 -4202
- package/dist/index-DHdlcgua.cjs +0 -1
- package/dist/index-kIJO3xjW.js +0 -231
- package/dist/index-oHoB5lQw.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as Q } from "vue";
|
|
2
|
-
import { c as o } from "./cloneDeep-
|
|
3
|
-
import {
|
|
2
|
+
import { c as o } from "./cloneDeep-RWEDux0J.js";
|
|
3
|
+
import { O as z } from "./index-CfjXFyxG.js";
|
|
4
4
|
const J = [
|
|
5
5
|
{
|
|
6
6
|
key: "FormName",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const Q=require("vue"),o=require("./cloneDeep-CZPFJadU.cjs"),z=require("./index-DETmIjYD.cjs"),E=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],N=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],M=Q.ref(0),Pe=l=>{const[t,s]=l.split(/=(.+)/),e=t.replace(/['"]/g,"").trim(),r=s.replace(/^['"]|['"]$/g,"");return{key:e,value:r}},V=l=>{try{return JSON.parse(l),!0}catch{return!1}},Be=l=>l.includes("$")&&l.trim().endsWith("(")?l+")":l,Ge=l=>{let t=l;const s=[];let e="";for(const r of t)r.includes("{")||e.includes("{")||r.includes("[")||e.includes("[")||r.includes("【")||e.includes("【")||r.includes("(")||e.includes("(")||r.includes("(")||e.includes("(")||r.includes("/*")||e.includes("/*")?(e+=r.trim(),o.cloneDeep(e).split("{").length-1===o.cloneDeep(e).split("}").length-1&&o.cloneDeep(e).split("【").length-1===o.cloneDeep(e).split("】").length-1&&o.cloneDeep(e).split("[").length-1===o.cloneDeep(e).split("]").length-1&&o.cloneDeep(e).split("(").length-1===o.cloneDeep(e).split(")").length-1&&o.cloneDeep(e).split("(").length-1===o.cloneDeep(e).split(")").length-1&&o.cloneDeep(e).split("/*").length-1===o.cloneDeep(e).split("*/").length-1&&(s.push(e),e="")):s.push(r.trim());return s==null?void 0:s.filter(r=>r.includes("{"))},We=l=>{var s;let t=[];return(s=Ge(l.slice(1,-1)))==null||s.forEach(e=>{var n,c,a,f;let r=((c=(n=e.slice(1,-1))==null?void 0:n.split(","))==null?void 0:c.length)??1;(f=(a=e.slice(1,-1))==null?void 0:a.split(","))==null||f.forEach(p=>{var A,h,j,b,$,i,y,m,g,T,F,I,P;let u=p==null?void 0:p.split(":"),d=u!=null&&u[0]?(u==null?void 0:u[1].split("$").length)-1===1?((A=u==null?void 0:u[0])==null?void 0:A.replace(/^"(.*)"$/,"$1"))+((h=u==null?void 0:u[1])==null?void 0:h.replace(/^"(.*)"$/,"$1")):Array.isArray((b=(j=u==null?void 0:u[1])==null?void 0:j.replace(/^"(.*)"$/,"$1"))==null?void 0:b.split("("))&&((y=(i=($=u==null?void 0:u[1])==null?void 0:$.replace(/^"(.*)"$/,"$1"))==null?void 0:i.split("("))==null?void 0:y.length)>1?((m=u==null?void 0:u[0])==null?void 0:m.replace(/^"(.*)"$/,"$1"))+((F=(T=(g=u==null?void 0:u[1])==null?void 0:g.replace(/^"(.*)"$/,"$1"))==null?void 0:T.split("("))==null?void 0:F[0])+"()":(I=u==null?void 0:u[0])==null?void 0:I.replace(/^"(.*)"$/,"$1"):"",k=(u==null?void 0:u[1].split("$").length)-1===0?(P=u==null?void 0:u[1])==null?void 0:P.replace(/^"(.*)"$/,"$1"):"";M.value++,t.push({id:M.value,key:d,value:k,width:r,extraContent:u==null?void 0:u[1]})})}),t},De=l=>{var t,s;try{const e=l.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(o.cloneDeep(e).split("{").length-1>1){let r=o.cloneDeep(e).replace(/^\{(.*)\}$/,"[$1]");if(V(r)&&!r.includes("$")||(r=r.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),V(r)){const n=JSON.parse(r);let c=[];return n==null||n.forEach(a=>{var f;(f=Object.entries(o.cloneDeep(a)))==null||f.forEach(p=>{M.value++,c.push({id:M.value,key:(p==null?void 0:p[0])??"",value:(p==null?void 0:p[1])===""?"":p==null?void 0:p[1],width:Object.keys(o.cloneDeep(a)).length})})}),c}else return e.trim().startsWith("{{")?We(e.trim()):se(r)}else if(V(e)){const r=JSON.parse(e);return Object.entries(r).map(([n,c])=>(M.value++,{id:M.value,key:n,value:c===""?"":c,width:1}))}else return((t=se(e))==null?void 0:t.length)===0?e:(s=se(e))==null?void 0:s.map(r=>({label:r.label,method:Be(r.method)}))}catch(e){return console.error("转换失败:",e),[]}},se=l=>{l=l.trim().replace(/^\{|\}$/g,"").trim();const t=[];let s=0;for(;s<l.length;){const e=l.slice(s).match(/^\s*"([^"]+)"\s*:\s*/);if(!e)break;const r=e[1];s+=e[0].length;let n="",c=0,a=!1,f="";for(let p=s;p<l.length;p++){const u=l[p];if((u==='"'||u==="'")&&!a?(a=!0,f=u):u===f&&a&&(a=!1,f=""),!a&&((u==="{"||u==="("||u==="[")&&c++,(u==="}"||u===")"||u==="]")&&c--,u===","&&c===0||p===l.length-1)){n=l.slice(s,p+1).trim(),s=p+1;break}}t.push({label:r,method:n})}return t},Le=(l,t)=>{try{if(E!=null&&E.find(s=>(s==null?void 0:s.key)===t))return l.replace(/['"]/g,"").trim();if(o.cloneDeep(l).split("[").length-1>1){const s=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else{const s=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(V(s)){const e=JSON.parse(s);return Array.isArray(e)?e.map(r=>({label:r})):e}else return De(o.cloneDeep(l))}}catch(s){return console.error("解析失败:",s),l}},_e=l=>({[l==null?void 0:l.key]:Le(l==null?void 0:l.value,l==null?void 0:l.key)}),ze=l=>{try{if(o.cloneDeep(l).split("[").length-1>1){const t=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(s=>({label:s}))}catch(t){return console.error("解析失败:",t),l}},Ze=l=>{const t=l.match(/\(([^)]+)\)/);return t?t[1]:""},He=l=>{const t=l.match(/^([^(]+)\s*\(/);return t?t[1].trim():l},me=l=>l.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(t=>t.trim()).filter(t=>t).join("/"),qe=l=>{var c,a;let t=[],s=[];const e=(c=o.cloneDeep(l))==null?void 0:c.map(f=>f==null?void 0:f.key),r=[...new Set((a=o.cloneDeep(e))==null?void 0:a.map(f=>Ze(f)))];r==null||r.forEach(f=>{let p=l==null?void 0:l.filter(k=>k.key.includes(f));p==null||p.forEach(k=>{k!=null&&k.key.includes("Menus")&&(t.push({key:"GroupName",value:me(k==null?void 0:k.value)}),s.push(me(k==null?void 0:k.value)))});let u=l==null?void 0:l.filter(k=>k.key.includes(f)&&!(k!=null&&k.key.includes("Menus")));u=u==null?void 0:u.map(k=>(k.key=He(k.key),k));const d={key:"GroupContents",value:u};t.push(d)});const n={key:"Menus",value:s};return t.unshift(n),t},Ce=l=>{var t,s;if(Array.isArray(Object.keys(l))&&((t=Object.keys(l))==null?void 0:t.length)>0){let e=[];return(s=Object.entries(l))==null||s.forEach(([r,n])=>{var a,f;let c=[];if(c.push(r),((a=Object.keys(n))==null?void 0:a.length)>0){let p=[];(f=Ce(n))==null||f.forEach(u=>{p.push(u)}),p==null||p.forEach(u=>{c.push(u)})}e.push(c)}),e}},Me=(l,t)=>{var e;let s=t;return Array.isArray(Object.keys(l))&&((e=Object.entries(l))==null||e.forEach(([r,n])=>{let c=[r];if(typeof n=="object"&&n!==null){let a=Ce(n);a==null||a.forEach(f=>{c.push(f)})}s.push(c)})),s},Qe=l=>{const t={};return l.forEach(e=>{const r=e.split("/");let n=t;r.forEach(c=>{n[c]||(n[c]={}),n=n[c]})}),Me(t,[])},ce=l=>Qe(l),Re=l=>{var t,s,e,r,n,c,a,f;try{const p=ee((s=(t=o.cloneDeep(l))==null?void 0:t.replace("(","("))==null?void 0:s.replace(")",")")),u=(r=(e=o.cloneDeep(p))==null?void 0:e.filter(h=>!h.includes("/*")))==null?void 0:r.map(h=>Pe(h)),d=qe(u),k=[];if(((n=d==null?void 0:d.find(h=>(h==null?void 0:h.key)==="Menus"))==null?void 0:n.value.length)===0)return!1;(c=o.cloneDeep(d))==null||c.forEach(h=>{var j,b,$,i,y;E!=null&&E.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())})?k.push({comp:((j=E==null?void 0:E.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())}))==null?void 0:j.value)??"",name:(b=h==null?void 0:h.value)==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]}):N!=null&&N.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())})&&((k==null?void 0:k.length)===0&&($=h.key)!=null&&$.includes("Menus")&&k.push({comp:"Menu",name:"",compData:[]}),(i=k==null?void 0:k[(k==null?void 0:k.length)-1])!=null&&i.compData&&k[(k==null?void 0:k.length)-1].compData.push({key:(y=N==null?void 0:N.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())}))==null?void 0:y.value,contents:h==null?void 0:h.value}))});let A=(a=o.cloneDeep(k))==null?void 0:a.map(h=>{var j;return h!=null&&h.compData&&(h.compData=(j=h==null?void 0:h.compData)==null?void 0:j.map(b=>{var $,i,y,m,g,T,F,I,P,G,W;if((b==null?void 0:b.key)==="formFlex")b.contents=((i=($=b.contents)==null?void 0:$.replace(/[’]|[‘]|[']/g,""))==null?void 0:i.toUpperCase())!=="Vertical".toUpperCase();else if((b==null?void 0:b.key)==="groupContents")b.contents=(y=o.cloneDeep(b.contents))==null?void 0:y.map(L=>_e(o.cloneDeep(L)));else if(Array.isArray(b==null?void 0:b.contents))b.contents=ce(b.contents);else if(((g=(m=b==null?void 0:b.contents)==null?void 0:m.trim())!=null&&g.startsWith("[")||(F=(T=b.contents)==null?void 0:T.trim())!=null&&F.startsWith("【"))&&((P=(I=b.contents)==null?void 0:I.trim())!=null&&P.endsWith("]")||(W=(G=b.contents)==null?void 0:G.trim())!=null&&W.endsWith("】")))b.contents=ze(o.cloneDeep(b.contents));else{if(!b.contents)return;b.contents=De(o.cloneDeep(b.contents))}return b})),h});return A=(f=o.cloneDeep(A))==null?void 0:f.map(h=>{var j;return(h==null?void 0:h.comp)==="Group"&&(h.compData=(j=h.compData)==null?void 0:j.map(b=>{var i;let $=[];return(i=b.contents)==null||i.forEach(y=>{var m,g,T,F,I,P,G,W,L,x,O,C;if(E!=null&&E.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))$.push({comp:(m=E==null?void 0:E.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))==null?void 0:m.value,name:(T=(g=Object.values(y))==null?void 0:g[0])==null?void 0:T.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(N!=null&&N.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())})){if(($==null?void 0:$.length)===0)return;(F=$==null?void 0:$[($==null?void 0:$.length)-1])!=null&&F.compData&&$[($==null?void 0:$.length)-1].compData.push({key:(I=N==null?void 0:N.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))==null?void 0:I.value,contents:(P=Object.values(y))==null?void 0:P[0]})}else if((W=(G=Object.keys(y))==null?void 0:G[0])!=null&&W.includes("$")){const D=(x=(L=Object.keys(o.cloneDeep(y)))==null?void 0:L[0])==null?void 0:x.split("$");$[($==null?void 0:$.length)-1].compData.push({key:(O=N==null?void 0:N.find(J=>{var U,S;return((U=J==null?void 0:J.key)==null?void 0:U.toUpperCase())===((S=D==null?void 0:D[0])==null?void 0:S.toUpperCase())}))==null?void 0:O.value,contents:(C=Object.values(y))==null?void 0:C[0],selectLabel:D==null?void 0:D[1]})}return y}),b.contents=$,b})),h}),A}catch{return!1}},de=Q.ref(0),Oe=l=>{const t=[];let s=null;for(let e=0;e<l.length;e++){const r=l[e];if(Array.isArray(r))s&&(s.children=Oe(r));else{const n={label:r};t.push(n),s=n}}return t},Te=l=>{let t=0;for(const s of l)t++,s.children&&(t+=Te(s.children));return t},xe=(l,t,s=[])=>{let e=0;for(const r of t){if(e>=l.length)break;const n=[...l[e]];if(s.push(n),e++,r.children&&r.children.length>0){const c=[];xe(l.slice(e),r.children,c),c.length>0&&(n.push(c),e+=Te(r.children))}}return s},Xe=(l,t)=>{let s=[];return l==null||l.forEach(r=>{r.some(n=>Array.isArray(n))?s.push(...r):s.push(r)}),xe(s,t)},ne=l=>{const t={label:l[0].trim()};if(l.length>1){const s=l.slice(1);s.length===1&&Array.isArray(s[0])?t.children=s[0].map(e=>Array.isArray(e)?ne(e):{label:e.trim()}):t.children=s.map(e=>Array.isArray(e)?ne(e):{label:e.trim()})}return t},ke=l=>{let t=l.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return t=t.replace(/:}(?=,|]|}|$)/g,':""}'),t=t.replace(/:,(?=\s*")/g,':"",'),t=t.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(s,e,r)=>`"${e}://${r}"`),t=t.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),t},Ye=l=>{var s;return l.some(e=>!Array.isArray(e))?l:(s=o.cloneDeep(l))==null?void 0:s.map(e=>{let r=[];return e.some(n=>Array.isArray(n))?e==null||e.forEach(n=>{Array.isArray(n)&&r.push(ne(n))}):e.some(n=>n.includes("["))?r.push(e):r=e.map(n=>({label:n.trim()})),r})},Je=(l,t,s)=>{let e=l,r=s,n=t;return n.children&&(Array.isArray(r[r.length-1])?r[r.length-1].push(e[0]):r.push(e[0]),e.shift(),n=n.children),Array.isArray(n)&&n.forEach(c=>{if(c.children){const a=Je(e,c,r);r=a[0],e=a[1]}}),[r,e]},Ke=(l,t)=>{let s=l,e=[];return t.length>0?t==null||t.forEach(r=>{let n=s==null?void 0:s[0];s.shift();const c=Je(o.cloneDeep(s),r,n);n=c[0],s=c[1],e.push(n)}):e=s,e},ae=(l,t)=>{const s=Ye(o.cloneDeep(l));return Ke(s,t)},Ve=l=>{const t=[];let s=0;const e=l.length;for(;s<e;){const r=l[s];r.key==="tableColumns"&&s+1<e&&l[s+1].key==="tableContents"?(t.push({comp:"Table",compData:[r,l[s+1]],name:""}),s+=2):(t.push(r),s+=1)}return t},Ne=l=>ae([l],[]),v=l=>{const t=[];return l==null||l.forEach(s=>s==null?void 0:s.forEach(r=>{var n,c;de.value++,t.push({id:de.value,key:(n=Object.keys(r))==null?void 0:n[0],value:(c=Object.values(r))==null?void 0:c[0],width:s.length})})),t},ge=l=>{let t=Ve(l);return t=t==null?void 0:t.map(s=>{var e,r,n,c;if(s.comp==="Table")(e=s.compData)!=null&&e.find(a=>(a==null?void 0:a.key)==="header")||(s.compData=(r=s.compData)==null?void 0:r.map(a=>(a.key==="tableColumns"?a={key:"header",contents:ae(a.value,[])}:a={key:a.key,contents:a.value},a)),s.compData.push({key:"extraButton",contents:[{label:"新增"}]}),s.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(s.key==="form"){const a=(n=s==null?void 0:s.value)==null?void 0:n.map(f=>(Array.isArray(f)||(f=[f]),f));s={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:v(a)}],name:""}}else if(s.key==="formTop"){const a=(c=s==null?void 0:s.value)==null?void 0:c.map(f=>(Array.isArray(f)||(f=[f]),f));s={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:v(a)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return s}),t},we=(l,t)=>{var a,f,p,u,d,k;const s=[],e=Oe((f=(a=l==null?void 0:l.find(A=>A.key==="tableIndex"))==null?void 0:a.value)==null?void 0:f[0]);s.push({key:"tableIndexColumn",contents:t}),s.push({key:"tableIndex",contents:e});let r=[];const n=(p=l==null?void 0:l.find(A=>A.key==="tableColumns"))==null?void 0:p.value;n.length===1&&!(n!=null&&n[0].some(A=>Array.isArray(A)))?r=(u=n==null?void 0:n[0])==null?void 0:u.map(A=>({label:A})):r=ae((d=l==null?void 0:l.find(A=>A.key==="tableColumns"))==null?void 0:d.value,e),s.push({key:"header",contents:r});const c=Xe((k=l==null?void 0:l.find(A=>A.key==="tableContents"))==null?void 0:k.value,e);return s.push({key:"tableContents",contents:c}),s.push({key:"extraButton",contents:[{label:"新增"}]}),s.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),s},Ee=l=>l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(t,s,e)=>{const r=Ee(e);return`"${s}",${r}`}),Y=l=>{const t=l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Ee(t).replace(/^"(.*)"$/,"$1")},ve=l=>{const t=new Set;return l.filter(s=>{const e=JSON.stringify(s);return t.has(e)?!1:t.add(e)})},be=l=>{var s;let t=[];return(s=o.cloneDeep(l))==null||s.forEach(e=>{var r;(r=e.contents)==null||r.forEach(n=>{t.push(n)})}),t=ve(t),t.push({label:"操作"}),[t]},el=(l,t)=>l.reduce((s,e,r)=>{const n=Math.floor(r/t);return s[n]||(s[n]=[]),s[n].push(e),s},[]),je=l=>l.reduce((t,s)=>s.children&&s.children.length>0?t+je(s.children):t+1,0),ll=(l,t)=>{var e;let s=[];return(e=el(l,je(t==null?void 0:t[0])-1))==null||e.forEach(r=>{let n=[];r.forEach(c=>{var a;Array.isArray(c.contents)?(a=c.contents)==null||a.forEach(f=>{n.push(f)}):n.push(c.contents)}),s.push(n)}),[s]},sl=["方法体","输入","输出"],$e=Q.ref(1),ee=l=>{let t;l.replaceAll(" ",`\r
|
|
1
|
+
"use strict";const Q=require("vue"),o=require("./cloneDeep-HxwOhruj.cjs"),z=require("./index-cLsBtq39.cjs"),E=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],N=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],M=Q.ref(0),Pe=l=>{const[t,s]=l.split(/=(.+)/),e=t.replace(/['"]/g,"").trim(),r=s.replace(/^['"]|['"]$/g,"");return{key:e,value:r}},V=l=>{try{return JSON.parse(l),!0}catch{return!1}},Be=l=>l.includes("$")&&l.trim().endsWith("(")?l+")":l,Ge=l=>{let t=l;const s=[];let e="";for(const r of t)r.includes("{")||e.includes("{")||r.includes("[")||e.includes("[")||r.includes("【")||e.includes("【")||r.includes("(")||e.includes("(")||r.includes("(")||e.includes("(")||r.includes("/*")||e.includes("/*")?(e+=r.trim(),o.cloneDeep(e).split("{").length-1===o.cloneDeep(e).split("}").length-1&&o.cloneDeep(e).split("【").length-1===o.cloneDeep(e).split("】").length-1&&o.cloneDeep(e).split("[").length-1===o.cloneDeep(e).split("]").length-1&&o.cloneDeep(e).split("(").length-1===o.cloneDeep(e).split(")").length-1&&o.cloneDeep(e).split("(").length-1===o.cloneDeep(e).split(")").length-1&&o.cloneDeep(e).split("/*").length-1===o.cloneDeep(e).split("*/").length-1&&(s.push(e),e="")):s.push(r.trim());return s==null?void 0:s.filter(r=>r.includes("{"))},We=l=>{var s;let t=[];return(s=Ge(l.slice(1,-1)))==null||s.forEach(e=>{var n,c,a,f;let r=((c=(n=e.slice(1,-1))==null?void 0:n.split(","))==null?void 0:c.length)??1;(f=(a=e.slice(1,-1))==null?void 0:a.split(","))==null||f.forEach(p=>{var A,h,j,b,$,i,y,m,g,T,F,I,P;let u=p==null?void 0:p.split(":"),d=u!=null&&u[0]?(u==null?void 0:u[1].split("$").length)-1===1?((A=u==null?void 0:u[0])==null?void 0:A.replace(/^"(.*)"$/,"$1"))+((h=u==null?void 0:u[1])==null?void 0:h.replace(/^"(.*)"$/,"$1")):Array.isArray((b=(j=u==null?void 0:u[1])==null?void 0:j.replace(/^"(.*)"$/,"$1"))==null?void 0:b.split("("))&&((y=(i=($=u==null?void 0:u[1])==null?void 0:$.replace(/^"(.*)"$/,"$1"))==null?void 0:i.split("("))==null?void 0:y.length)>1?((m=u==null?void 0:u[0])==null?void 0:m.replace(/^"(.*)"$/,"$1"))+((F=(T=(g=u==null?void 0:u[1])==null?void 0:g.replace(/^"(.*)"$/,"$1"))==null?void 0:T.split("("))==null?void 0:F[0])+"()":(I=u==null?void 0:u[0])==null?void 0:I.replace(/^"(.*)"$/,"$1"):"",k=(u==null?void 0:u[1].split("$").length)-1===0?(P=u==null?void 0:u[1])==null?void 0:P.replace(/^"(.*)"$/,"$1"):"";M.value++,t.push({id:M.value,key:d,value:k,width:r,extraContent:u==null?void 0:u[1]})})}),t},De=l=>{var t,s;try{const e=l.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(o.cloneDeep(e).split("{").length-1>1){let r=o.cloneDeep(e).replace(/^\{(.*)\}$/,"[$1]");if(V(r)&&!r.includes("$")||(r=r.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),V(r)){const n=JSON.parse(r);let c=[];return n==null||n.forEach(a=>{var f;(f=Object.entries(o.cloneDeep(a)))==null||f.forEach(p=>{M.value++,c.push({id:M.value,key:(p==null?void 0:p[0])??"",value:(p==null?void 0:p[1])===""?"":p==null?void 0:p[1],width:Object.keys(o.cloneDeep(a)).length})})}),c}else return e.trim().startsWith("{{")?We(e.trim()):se(r)}else if(V(e)){const r=JSON.parse(e);return Object.entries(r).map(([n,c])=>(M.value++,{id:M.value,key:n,value:c===""?"":c,width:1}))}else return((t=se(e))==null?void 0:t.length)===0?e:(s=se(e))==null?void 0:s.map(r=>({label:r.label,method:Be(r.method)}))}catch(e){return console.error("转换失败:",e),[]}},se=l=>{l=l.trim().replace(/^\{|\}$/g,"").trim();const t=[];let s=0;for(;s<l.length;){const e=l.slice(s).match(/^\s*"([^"]+)"\s*:\s*/);if(!e)break;const r=e[1];s+=e[0].length;let n="",c=0,a=!1,f="";for(let p=s;p<l.length;p++){const u=l[p];if((u==='"'||u==="'")&&!a?(a=!0,f=u):u===f&&a&&(a=!1,f=""),!a&&((u==="{"||u==="("||u==="[")&&c++,(u==="}"||u===")"||u==="]")&&c--,u===","&&c===0||p===l.length-1)){n=l.slice(s,p+1).trim(),s=p+1;break}}t.push({label:r,method:n})}return t},Le=(l,t)=>{try{if(E!=null&&E.find(s=>(s==null?void 0:s.key)===t))return l.replace(/['"]/g,"").trim();if(o.cloneDeep(l).split("[").length-1>1){const s=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else{const s=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(V(s)){const e=JSON.parse(s);return Array.isArray(e)?e.map(r=>({label:r})):e}else return De(o.cloneDeep(l))}}catch(s){return console.error("解析失败:",s),l}},_e=l=>({[l==null?void 0:l.key]:Le(l==null?void 0:l.value,l==null?void 0:l.key)}),ze=l=>{try{if(o.cloneDeep(l).split("[").length-1>1){const t=o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(o.cloneDeep(l).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(s=>({label:s}))}catch(t){return console.error("解析失败:",t),l}},Ze=l=>{const t=l.match(/\(([^)]+)\)/);return t?t[1]:""},He=l=>{const t=l.match(/^([^(]+)\s*\(/);return t?t[1].trim():l},me=l=>l.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(t=>t.trim()).filter(t=>t).join("/"),qe=l=>{var c,a;let t=[],s=[];const e=(c=o.cloneDeep(l))==null?void 0:c.map(f=>f==null?void 0:f.key),r=[...new Set((a=o.cloneDeep(e))==null?void 0:a.map(f=>Ze(f)))];r==null||r.forEach(f=>{let p=l==null?void 0:l.filter(k=>k.key.includes(f));p==null||p.forEach(k=>{k!=null&&k.key.includes("Menus")&&(t.push({key:"GroupName",value:me(k==null?void 0:k.value)}),s.push(me(k==null?void 0:k.value)))});let u=l==null?void 0:l.filter(k=>k.key.includes(f)&&!(k!=null&&k.key.includes("Menus")));u=u==null?void 0:u.map(k=>(k.key=He(k.key),k));const d={key:"GroupContents",value:u};t.push(d)});const n={key:"Menus",value:s};return t.unshift(n),t},Ce=l=>{var t,s;if(Array.isArray(Object.keys(l))&&((t=Object.keys(l))==null?void 0:t.length)>0){let e=[];return(s=Object.entries(l))==null||s.forEach(([r,n])=>{var a,f;let c=[];if(c.push(r),((a=Object.keys(n))==null?void 0:a.length)>0){let p=[];(f=Ce(n))==null||f.forEach(u=>{p.push(u)}),p==null||p.forEach(u=>{c.push(u)})}e.push(c)}),e}},Me=(l,t)=>{var e;let s=t;return Array.isArray(Object.keys(l))&&((e=Object.entries(l))==null||e.forEach(([r,n])=>{let c=[r];if(typeof n=="object"&&n!==null){let a=Ce(n);a==null||a.forEach(f=>{c.push(f)})}s.push(c)})),s},Qe=l=>{const t={};return l.forEach(e=>{const r=e.split("/");let n=t;r.forEach(c=>{n[c]||(n[c]={}),n=n[c]})}),Me(t,[])},ce=l=>Qe(l),Re=l=>{var t,s,e,r,n,c,a,f;try{const p=ee((s=(t=o.cloneDeep(l))==null?void 0:t.replace("(","("))==null?void 0:s.replace(")",")")),u=(r=(e=o.cloneDeep(p))==null?void 0:e.filter(h=>!h.includes("/*")))==null?void 0:r.map(h=>Pe(h)),d=qe(u),k=[];if(((n=d==null?void 0:d.find(h=>(h==null?void 0:h.key)==="Menus"))==null?void 0:n.value.length)===0)return!1;(c=o.cloneDeep(d))==null||c.forEach(h=>{var j,b,$,i,y;E!=null&&E.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())})?k.push({comp:((j=E==null?void 0:E.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())}))==null?void 0:j.value)??"",name:(b=h==null?void 0:h.value)==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]}):N!=null&&N.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())})&&((k==null?void 0:k.length)===0&&($=h.key)!=null&&$.includes("Menus")&&k.push({comp:"Menu",name:"",compData:[]}),(i=k==null?void 0:k[(k==null?void 0:k.length)-1])!=null&&i.compData&&k[(k==null?void 0:k.length)-1].compData.push({key:(y=N==null?void 0:N.find(m=>{var g,T;return((g=m==null?void 0:m.key)==null?void 0:g.toUpperCase())===((T=h==null?void 0:h.key)==null?void 0:T.toUpperCase())}))==null?void 0:y.value,contents:h==null?void 0:h.value}))});let A=(a=o.cloneDeep(k))==null?void 0:a.map(h=>{var j;return h!=null&&h.compData&&(h.compData=(j=h==null?void 0:h.compData)==null?void 0:j.map(b=>{var $,i,y,m,g,T,F,I,P,G,W;if((b==null?void 0:b.key)==="formFlex")b.contents=((i=($=b.contents)==null?void 0:$.replace(/[’]|[‘]|[']/g,""))==null?void 0:i.toUpperCase())!=="Vertical".toUpperCase();else if((b==null?void 0:b.key)==="groupContents")b.contents=(y=o.cloneDeep(b.contents))==null?void 0:y.map(L=>_e(o.cloneDeep(L)));else if(Array.isArray(b==null?void 0:b.contents))b.contents=ce(b.contents);else if(((g=(m=b==null?void 0:b.contents)==null?void 0:m.trim())!=null&&g.startsWith("[")||(F=(T=b.contents)==null?void 0:T.trim())!=null&&F.startsWith("【"))&&((P=(I=b.contents)==null?void 0:I.trim())!=null&&P.endsWith("]")||(W=(G=b.contents)==null?void 0:G.trim())!=null&&W.endsWith("】")))b.contents=ze(o.cloneDeep(b.contents));else{if(!b.contents)return;b.contents=De(o.cloneDeep(b.contents))}return b})),h});return A=(f=o.cloneDeep(A))==null?void 0:f.map(h=>{var j;return(h==null?void 0:h.comp)==="Group"&&(h.compData=(j=h.compData)==null?void 0:j.map(b=>{var i;let $=[];return(i=b.contents)==null||i.forEach(y=>{var m,g,T,F,I,P,G,W,L,x,O,C;if(E!=null&&E.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))$.push({comp:(m=E==null?void 0:E.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))==null?void 0:m.value,name:(T=(g=Object.values(y))==null?void 0:g[0])==null?void 0:T.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(N!=null&&N.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())})){if(($==null?void 0:$.length)===0)return;(F=$==null?void 0:$[($==null?void 0:$.length)-1])!=null&&F.compData&&$[($==null?void 0:$.length)-1].compData.push({key:(I=N==null?void 0:N.find(D=>{var J,U,S;return((J=D==null?void 0:D.key)==null?void 0:J.toUpperCase())===((S=(U=Object.keys(y))==null?void 0:U[0])==null?void 0:S.toUpperCase())}))==null?void 0:I.value,contents:(P=Object.values(y))==null?void 0:P[0]})}else if((W=(G=Object.keys(y))==null?void 0:G[0])!=null&&W.includes("$")){const D=(x=(L=Object.keys(o.cloneDeep(y)))==null?void 0:L[0])==null?void 0:x.split("$");$[($==null?void 0:$.length)-1].compData.push({key:(O=N==null?void 0:N.find(J=>{var U,S;return((U=J==null?void 0:J.key)==null?void 0:U.toUpperCase())===((S=D==null?void 0:D[0])==null?void 0:S.toUpperCase())}))==null?void 0:O.value,contents:(C=Object.values(y))==null?void 0:C[0],selectLabel:D==null?void 0:D[1]})}return y}),b.contents=$,b})),h}),A}catch{return!1}},de=Q.ref(0),Oe=l=>{const t=[];let s=null;for(let e=0;e<l.length;e++){const r=l[e];if(Array.isArray(r))s&&(s.children=Oe(r));else{const n={label:r};t.push(n),s=n}}return t},Te=l=>{let t=0;for(const s of l)t++,s.children&&(t+=Te(s.children));return t},xe=(l,t,s=[])=>{let e=0;for(const r of t){if(e>=l.length)break;const n=[...l[e]];if(s.push(n),e++,r.children&&r.children.length>0){const c=[];xe(l.slice(e),r.children,c),c.length>0&&(n.push(c),e+=Te(r.children))}}return s},Xe=(l,t)=>{let s=[];return l==null||l.forEach(r=>{r.some(n=>Array.isArray(n))?s.push(...r):s.push(r)}),xe(s,t)},ne=l=>{const t={label:l[0].trim()};if(l.length>1){const s=l.slice(1);s.length===1&&Array.isArray(s[0])?t.children=s[0].map(e=>Array.isArray(e)?ne(e):{label:e.trim()}):t.children=s.map(e=>Array.isArray(e)?ne(e):{label:e.trim()})}return t},ke=l=>{let t=l.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return t=t.replace(/:}(?=,|]|}|$)/g,':""}'),t=t.replace(/:,(?=\s*")/g,':"",'),t=t.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(s,e,r)=>`"${e}://${r}"`),t=t.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),t},Ye=l=>{var s;return l.some(e=>!Array.isArray(e))?l:(s=o.cloneDeep(l))==null?void 0:s.map(e=>{let r=[];return e.some(n=>Array.isArray(n))?e==null||e.forEach(n=>{Array.isArray(n)&&r.push(ne(n))}):e.some(n=>n.includes("["))?r.push(e):r=e.map(n=>({label:n.trim()})),r})},Je=(l,t,s)=>{let e=l,r=s,n=t;return n.children&&(Array.isArray(r[r.length-1])?r[r.length-1].push(e[0]):r.push(e[0]),e.shift(),n=n.children),Array.isArray(n)&&n.forEach(c=>{if(c.children){const a=Je(e,c,r);r=a[0],e=a[1]}}),[r,e]},Ke=(l,t)=>{let s=l,e=[];return t.length>0?t==null||t.forEach(r=>{let n=s==null?void 0:s[0];s.shift();const c=Je(o.cloneDeep(s),r,n);n=c[0],s=c[1],e.push(n)}):e=s,e},ae=(l,t)=>{const s=Ye(o.cloneDeep(l));return Ke(s,t)},Ve=l=>{const t=[];let s=0;const e=l.length;for(;s<e;){const r=l[s];r.key==="tableColumns"&&s+1<e&&l[s+1].key==="tableContents"?(t.push({comp:"Table",compData:[r,l[s+1]],name:""}),s+=2):(t.push(r),s+=1)}return t},Ne=l=>ae([l],[]),v=l=>{const t=[];return l==null||l.forEach(s=>s==null?void 0:s.forEach(r=>{var n,c;de.value++,t.push({id:de.value,key:(n=Object.keys(r))==null?void 0:n[0],value:(c=Object.values(r))==null?void 0:c[0],width:s.length})})),t},ge=l=>{let t=Ve(l);return t=t==null?void 0:t.map(s=>{var e,r,n,c;if(s.comp==="Table")(e=s.compData)!=null&&e.find(a=>(a==null?void 0:a.key)==="header")||(s.compData=(r=s.compData)==null?void 0:r.map(a=>(a.key==="tableColumns"?a={key:"header",contents:ae(a.value,[])}:a={key:a.key,contents:a.value},a)),s.compData.push({key:"extraButton",contents:[{label:"新增"}]}),s.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(s.key==="form"){const a=(n=s==null?void 0:s.value)==null?void 0:n.map(f=>(Array.isArray(f)||(f=[f]),f));s={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:v(a)}],name:""}}else if(s.key==="formTop"){const a=(c=s==null?void 0:s.value)==null?void 0:c.map(f=>(Array.isArray(f)||(f=[f]),f));s={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:v(a)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return s}),t},we=(l,t)=>{var a,f,p,u,d,k;const s=[],e=Oe((f=(a=l==null?void 0:l.find(A=>A.key==="tableIndex"))==null?void 0:a.value)==null?void 0:f[0]);s.push({key:"tableIndexColumn",contents:t}),s.push({key:"tableIndex",contents:e});let r=[];const n=(p=l==null?void 0:l.find(A=>A.key==="tableColumns"))==null?void 0:p.value;n.length===1&&!(n!=null&&n[0].some(A=>Array.isArray(A)))?r=(u=n==null?void 0:n[0])==null?void 0:u.map(A=>({label:A})):r=ae((d=l==null?void 0:l.find(A=>A.key==="tableColumns"))==null?void 0:d.value,e),s.push({key:"header",contents:r});const c=Xe((k=l==null?void 0:l.find(A=>A.key==="tableContents"))==null?void 0:k.value,e);return s.push({key:"tableContents",contents:c}),s.push({key:"extraButton",contents:[{label:"新增"}]}),s.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),s},Ee=l=>l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(t,s,e)=>{const r=Ee(e);return`"${s}",${r}`}),Y=l=>{const t=l.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Ee(t).replace(/^"(.*)"$/,"$1")},ve=l=>{const t=new Set;return l.filter(s=>{const e=JSON.stringify(s);return t.has(e)?!1:t.add(e)})},be=l=>{var s;let t=[];return(s=o.cloneDeep(l))==null||s.forEach(e=>{var r;(r=e.contents)==null||r.forEach(n=>{t.push(n)})}),t=ve(t),t.push({label:"操作"}),[t]},el=(l,t)=>l.reduce((s,e,r)=>{const n=Math.floor(r/t);return s[n]||(s[n]=[]),s[n].push(e),s},[]),je=l=>l.reduce((t,s)=>s.children&&s.children.length>0?t+je(s.children):t+1,0),ll=(l,t)=>{var e;let s=[];return(e=el(l,je(t==null?void 0:t[0])-1))==null||e.forEach(r=>{let n=[];r.forEach(c=>{var a;Array.isArray(c.contents)?(a=c.contents)==null||a.forEach(f=>{n.push(f)}):n.push(c.contents)}),s.push(n)}),[s]},sl=["方法体","输入","输出"],$e=Q.ref(1),ee=l=>{let t;l.replaceAll(" ",`\r
|
|
2
2
|
`).includes(`\r
|
|
3
3
|
`)?t=l.replaceAll(" ",`\r
|
|
4
4
|
`).split(`\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./index-
|
|
1
|
+
"use strict";const n=require("./index-5NmM1Nuy.cjs");var A=n.getNative(n.root,"WeakMap"),x=Object.create,ge=function(){function e(){}return function(t){if(!n.isObject(t))return{};if(x)return x(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),h=function(){try{var e=n.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}}();function be(e,t){for(var r=-1,a=e==null?0:e.length;++r<a&&t(e[r],r,e)!==!1;);return e}var pe=9007199254740991,ye=/^(?:0|[1-9]\d*)$/;function Y(e,t){var r=typeof e;return t=t??pe,!!t&&(r=="number"||r!="symbol"&&ye.test(e))&&e>-1&&e%1==0&&e<t}function Te(e,t,r){t=="__proto__"&&h?h(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var le=Object.prototype,je=le.hasOwnProperty;function H(e,t,r){var a=e[t];(!(je.call(e,t)&&n.eq(a,r))||r===void 0&&!(t in e))&&Te(e,t,r)}var de=9007199254740991;function _(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=de}function $e(e){return e!=null&&_(e.length)&&!n.isFunction$1(e)}var Ae=Object.prototype;function Z(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ae;return e===r}function he(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var ve="[object Arguments]";function C(e){return n.isObjectLike(e)&&n.baseGetTag(e)==ve}var J=Object.prototype,we=J.hasOwnProperty,me=J.propertyIsEnumerable,Q=C(function(){return arguments}())?C:function(e){return n.isObjectLike(e)&&we.call(e,"callee")&&!me.call(e,"callee")};function Oe(){return!1}var ee=typeof exports=="object"&&exports&&!exports.nodeType&&exports,B=ee&&typeof module=="object"&&module&&!module.nodeType&&module,_e=B&&B.exports===ee,L=_e?n.root.Buffer:void 0,Se=L?L.isBuffer:void 0,S=Se||Oe,Pe="[object Arguments]",Ee="[object Array]",Ie="[object Boolean]",Me="[object Date]",xe="[object Error]",Ce="[object Function]",Be="[object Map]",Le="[object Number]",Ue="[object Object]",De="[object RegExp]",Fe="[object Set]",Ge="[object String]",Ne="[object WeakMap]",Ve="[object ArrayBuffer]",Re="[object DataView]",ze="[object Float32Array]",Ke="[object Float64Array]",We="[object Int8Array]",qe="[object Int16Array]",ke="[object Int32Array]",Xe="[object Uint8Array]",Ye="[object Uint8ClampedArray]",He="[object Uint16Array]",Ze="[object Uint32Array]",i={};i[ze]=i[Ke]=i[We]=i[qe]=i[ke]=i[Xe]=i[Ye]=i[He]=i[Ze]=!0;i[Pe]=i[Ee]=i[Ve]=i[Ie]=i[Re]=i[Me]=i[xe]=i[Ce]=i[Be]=i[Le]=i[Ue]=i[De]=i[Fe]=i[Ge]=i[Ne]=!1;function Je(e){return n.isObjectLike(e)&&_(e.length)&&!!i[n.baseGetTag(e)]}function P(e){return function(t){return e(t)}}var te=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j=te&&typeof module=="object"&&module&&!module.nodeType&&module,Qe=j&&j.exports===te,$=Qe&&n.freeGlobal.process,l=function(){try{var e=j&&j.require&&j.require("util").types;return e||$&&$.binding&&$.binding("util")}catch{}}(),U=l&&l.isTypedArray,re=U?P(U):Je,et=Object.prototype,tt=et.hasOwnProperty;function rt(e,t){var r=n.isArray(e),a=!r&&Q(e),f=!r&&!a&&S(e),s=!r&&!a&&!f&&re(e),c=r||a||f||s,T=c?he(e.length,String):[],g=T.length;for(var u in e)tt.call(e,u)&&!(c&&(u=="length"||f&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Y(u,g)))&&T.push(u);return T}function ne(e,t){return function(r){return e(t(r))}}var nt=ne(Object.keys,Object),at=Object.prototype,ot=at.hasOwnProperty;function it(e){if(!Z(e))return nt(e);var t=[];for(var r in Object(e))ot.call(e,r)&&r!="constructor"&&t.push(r);return t}function ct(e){return $e(e)?rt(e):it(e)}function ae(e,t){for(var r=-1,a=t.length,f=e.length;++r<a;)e[f+r]=t[r];return e}var st=ne(Object.getPrototypeOf,Object);function ut(){this.__data__=new n.ListCache,this.size=0}function ft(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function gt(e){return this.__data__.get(e)}function bt(e){return this.__data__.has(e)}var pt=200;function yt(e,t){var r=this.__data__;if(r instanceof n.ListCache){var a=r.__data__;if(!n.Map||a.length<pt-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new n.MapCache(a)}return r.set(e,t),this.size=r.size,this}function y(e){var t=this.__data__=new n.ListCache(e);this.size=t.size}y.prototype.clear=ut;y.prototype.delete=ft;y.prototype.get=gt;y.prototype.has=bt;y.prototype.set=yt;var oe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D=oe&&typeof module=="object"&&module&&!module.nodeType&&module,Tt=D&&D.exports===oe,F=Tt?n.root.Buffer:void 0;F&&F.allocUnsafe;function lt(e,t){return e.slice()}function jt(e,t){for(var r=-1,a=e==null?0:e.length,f=0,s=[];++r<a;){var c=e[r];t(c,r,e)&&(s[f++]=c)}return s}function dt(){return[]}var $t=Object.prototype,At=$t.propertyIsEnumerable,G=Object.getOwnPropertySymbols,ht=G?function(e){return e==null?[]:(e=Object(e),jt(G(e),function(t){return At.call(e,t)}))}:dt;function vt(e,t,r){var a=t(e);return n.isArray(e)?a:ae(a,r(e))}function ie(e){return vt(e,ct,ht)}var v=n.getNative(n.root,"DataView"),w=n.getNative(n.root,"Promise"),m=n.getNative(n.root,"Set"),N="[object Map]",wt="[object Object]",V="[object Promise]",R="[object Set]",z="[object WeakMap]",K="[object DataView]",mt=n.toSource(v),Ot=n.toSource(n.Map),_t=n.toSource(w),St=n.toSource(m),Pt=n.toSource(A);exports.getTag=n.baseGetTag;(v&&exports.getTag(new v(new ArrayBuffer(1)))!=K||n.Map&&exports.getTag(new n.Map)!=N||w&&exports.getTag(w.resolve())!=V||m&&exports.getTag(new m)!=R||A&&exports.getTag(new A)!=z)&&(exports.getTag=function(e){var t=n.baseGetTag(e),r=t==wt?e.constructor:void 0,a=r?n.toSource(r):"";if(a)switch(a){case mt:return K;case Ot:return N;case _t:return V;case St:return R;case Pt:return z}return t});var Et=Object.prototype,It=Et.hasOwnProperty;function Mt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&It.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var O=n.root.Uint8Array;function E(e){var t=new e.constructor(e.byteLength);return new O(t).set(new O(e)),t}function xt(e,t){var r=E(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Ct=/\w*$/;function Bt(e){var t=new e.constructor(e.source,Ct.exec(e));return t.lastIndex=e.lastIndex,t}var W=n.Symbol?n.Symbol.prototype:void 0,q=W?W.valueOf:void 0;function Lt(e){return q?Object(q.call(e)):{}}function Ut(e,t){var r=E(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var Dt="[object Boolean]",Ft="[object Date]",Gt="[object Map]",Nt="[object Number]",Vt="[object RegExp]",Rt="[object Set]",zt="[object String]",Kt="[object Symbol]",Wt="[object ArrayBuffer]",qt="[object DataView]",kt="[object Float32Array]",Xt="[object Float64Array]",Yt="[object Int8Array]",Ht="[object Int16Array]",Zt="[object Int32Array]",Jt="[object Uint8Array]",Qt="[object Uint8ClampedArray]",er="[object Uint16Array]",tr="[object Uint32Array]";function rr(e,t,r){var a=e.constructor;switch(t){case Wt:return E(e);case Dt:case Ft:return new a(+e);case qt:return xt(e);case kt:case Xt:case Yt:case Ht:case Zt:case Jt:case Qt:case er:case tr:return Ut(e);case Gt:return new a;case Nt:case zt:return new a(e);case Vt:return Bt(e);case Rt:return new a;case Kt:return Lt(e)}}function nr(e){return typeof e.constructor=="function"&&!Z(e)?ge(st(e)):{}}var ar="[object Map]";function or(e){return n.isObjectLike(e)&&exports.getTag(e)==ar}var k=l&&l.isMap,ir=k?P(k):or,cr="[object Set]";function sr(e){return n.isObjectLike(e)&&exports.getTag(e)==cr}var X=l&&l.isSet,ur=X?P(X):sr,ce="[object Arguments]",fr="[object Array]",gr="[object Boolean]",br="[object Date]",pr="[object Error]",se="[object Function]",yr="[object GeneratorFunction]",Tr="[object Map]",lr="[object Number]",ue="[object Object]",jr="[object RegExp]",dr="[object Set]",$r="[object String]",Ar="[object Symbol]",hr="[object WeakMap]",vr="[object ArrayBuffer]",wr="[object DataView]",mr="[object Float32Array]",Or="[object Float64Array]",_r="[object Int8Array]",Sr="[object Int16Array]",Pr="[object Int32Array]",Er="[object Uint8Array]",Ir="[object Uint8ClampedArray]",Mr="[object Uint16Array]",xr="[object Uint32Array]",o={};o[ce]=o[fr]=o[vr]=o[wr]=o[gr]=o[br]=o[mr]=o[Or]=o[_r]=o[Sr]=o[Pr]=o[Tr]=o[lr]=o[ue]=o[jr]=o[dr]=o[$r]=o[Ar]=o[Er]=o[Ir]=o[Mr]=o[xr]=!0;o[pr]=o[se]=o[hr]=!1;function d(e,t,r,a,f,s){var c;if(c!==void 0)return c;if(!n.isObject(e))return e;var T=n.isArray(e);if(T)c=Mt(e);else{var g=exports.getTag(e),u=g==se||g==yr;if(S(e))return lt(e);if(g==ue||g==ce||u&&!f)c=u?{}:nr(e);else{if(!o[g])return f?e:{};c=rr(e,g)}}s||(s=new y);var I=s.get(e);if(I)return I;s.set(e,c),ur(e)?e.forEach(function(b){c.add(d(b,t,r,b,e,s))}):ir(e)&&e.forEach(function(b,p){c.set(p,d(b,t,r,p,e,s))});var fe=ie,M=T?void 0:fe(e);return be(M||e,function(b,p){M&&(p=b,b=e[p]),H(c,p,d(b,t,r,p,e,s))}),c}var Cr=1,Br=4;function Lr(e){return d(e,Cr|Br)}exports.Stack=y;exports.Uint8Array=O;exports.arrayPush=ae;exports.assignValue=H;exports.cloneDeep=Lr;exports.defineProperty=h;exports.getAllKeys=ie;exports.isArguments=Q;exports.isBuffer=S;exports.isIndex=Y;exports.isLength=_;exports.isTypedArray=re;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as A, a7 as l, f as re, a3 as ye, a8 as de, a4 as h, a9 as w, aa as Te, i as I, ab as P, ac as v, a2 as je, ad as T, S as D } from "./index-
|
|
1
|
+
import { a6 as A, a7 as l, f as re, a3 as ye, a8 as de, a4 as h, a9 as w, aa as Te, i as I, ab as P, ac as v, a2 as je, ad as T, S as D } from "./index-D4Ff19qt.js";
|
|
2
2
|
var O = A(l, "WeakMap"), F = Object.create, $e = /* @__PURE__ */ function() {
|
|
3
3
|
function e() {
|
|
4
4
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./index-C91R5HsG.cjs"),De=require("./index-BdTUFtmG.cjs"),K=require("./index-DAD1ohhu.cjs"),a=require("./index-cLsBtq39.cjs"),F=require("./menu-K4rgfR_3.cjs"),Re=require("./index-CmT4MQuJ.cjs"),me=require("./index.vue_vue_type_style_index_0_scoped_486b9e58_lang-ChoS1ank.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),oe=require("./array-UAGwFyj8.cjs"),Ne=require("./login-DaGuqQ8_.cjs"),W=require("./index-BpPyaNFa.cjs"),A=require("./index-Cye4OPBs.cjs"),Fe=require("./index-5NmM1Nuy.cjs"),ie=require("./cloneDeep-HxwOhruj.cjs"),je=require("./index-CDY9OZVm.cjs"),Oe=require("./index-De7vDkns.cjs"),xe={type:"change"},fe={type:"start"},Te={type:"end"},le=new a.Ray,Ee=new a.Plane,Ie=Math.cos(70*a.MathUtils.DEG2RAD),j=new a.Vector3,U=2*Math.PI,L={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ue=1e-6;class ze extends a.Controls{constructor(t,o=null){super(t,o),this.state=L.NONE,this.target=new a.Vector3,this.cursor=new a.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:a.MOUSE.ROTATE,MIDDLE:a.MOUSE.DOLLY,RIGHT:a.MOUSE.PAN},this.touches={ONE:a.TOUCH.ROTATE,TWO:a.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new a.Vector3,this._lastQuaternion=new a.Quaternion,this._lastTargetPosition=new a.Vector3,this._quat=new a.Quaternion().setFromUnitVectors(t.up,new a.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new a.Spherical,this._sphericalDelta=new a.Spherical,this._scale=1,this._panOffset=new a.Vector3,this._rotateStart=new a.Vector2,this._rotateEnd=new a.Vector2,this._rotateDelta=new a.Vector2,this._panStart=new a.Vector2,this._panEnd=new a.Vector2,this._panDelta=new a.Vector2,this._dollyStart=new a.Vector2,this._dollyEnd=new a.Vector2,this._dollyDelta=new a.Vector2,this._dollyDirection=new a.Vector3,this._mouse=new a.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=$e.bind(this),this._onPointerDown=Ue.bind(this),this._onPointerUp=He.bind(this),this._onContextMenu=Xe.bind(this),this._onMouseWheel=Ze.bind(this),this._onKeyDown=Ke.bind(this),this._onTouchStart=Ge.bind(this),this._onTouchMove=We.bind(this),this._onMouseDown=Ye.bind(this),this._onMouseMove=qe.bind(this),this._interceptControlDown=Je.bind(this),this._interceptControlUp=Qe.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(xe),this.update(),this.state=L.NONE}update(t=null){const o=this.object.position;j.copy(o).sub(this.target),j.applyQuaternion(this._quat),this._spherical.setFromVector3(j),this.autoRotate&&this.state===L.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let s=this.minAzimuthAngle,n=this.maxAzimuthAngle;isFinite(s)&&isFinite(n)&&(s<-Math.PI?s+=U:s>Math.PI&&(s-=U),n<-Math.PI?n+=U:n>Math.PI&&(n-=U),s<=n?this._spherical.theta=Math.max(s,Math.min(n,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(s+n)/2?Math.max(s,this._spherical.theta):Math.min(n,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let i=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const l=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),i=l!=this._spherical.radius}if(j.setFromSpherical(this._spherical),j.applyQuaternion(this._quatInverse),o.copy(this.target).add(j),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let l=null;if(this.object.isPerspectiveCamera){const r=j.length();l=this._clampDistance(r*this._scale);const h=r-l;this.object.position.addScaledVector(this._dollyDirection,h),this.object.updateMatrixWorld(),i=!!h}else if(this.object.isOrthographicCamera){const r=new a.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const h=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),i=h!==this.object.zoom;const f=new a.Vector3(this._mouse.x,this._mouse.y,0);f.unproject(this.object),this.object.position.sub(f).add(r),this.object.updateMatrixWorld(),l=j.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;l!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(l).add(this.object.position):(le.origin.copy(this.object.position),le.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(le.direction))<Ie?this.object.lookAt(this.target):(Ee.setFromNormalAndCoplanarPoint(this.object.up,this.target),le.intersectPlane(Ee,this.target))))}else if(this.object.isOrthographicCamera){const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),l!==this.object.zoom&&(this.object.updateProjectionMatrix(),i=!0)}return this._scale=1,this._performCursorZoom=!1,i||this._lastPosition.distanceToSquared(this.object.position)>ue||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ue||this._lastTargetPosition.distanceToSquared(this.target)>ue?(this.dispatchEvent(xe),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?U/60*this.autoRotateSpeed*t:U/60/60*this.autoRotateSpeed}_getZoomScale(t){const o=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*o)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,o){j.setFromMatrixColumn(o,0),j.multiplyScalar(-t),this._panOffset.add(j)}_panUp(t,o){this.screenSpacePanning===!0?j.setFromMatrixColumn(o,1):(j.setFromMatrixColumn(o,0),j.crossVectors(this.object.up,j)),j.multiplyScalar(t),this._panOffset.add(j)}_pan(t,o){const s=this.domElement;if(this.object.isPerspectiveCamera){const n=this.object.position;j.copy(n).sub(this.target);let i=j.length();i*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*i/s.clientHeight,this.object.matrix),this._panUp(2*o*i/s.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/s.clientWidth,this.object.matrix),this._panUp(o*(this.object.top-this.object.bottom)/this.object.zoom/s.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,o){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const s=this.domElement.getBoundingClientRect(),n=t-s.left,i=o-s.top,l=s.width,r=s.height;this._mouse.x=n/l*2-1,this._mouse.y=-(i/r)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(U*this._rotateDelta.x/o.clientHeight),this._rotateUp(U*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let o=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(U*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),o=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-U*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),o=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(U*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),o=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-U*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),o=!0;break}o&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),s=.5*(t.pageX+o.x),n=.5*(t.pageY+o.y);this._rotateStart.set(s,n)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),s=.5*(t.pageX+o.x),n=.5*(t.pageY+o.y);this._panStart.set(s,n)}}_handleTouchStartDolly(t){const o=this._getSecondPointerPosition(t),s=t.pageX-o.x,n=t.pageY-o.y,i=Math.sqrt(s*s+n*n);this._dollyStart.set(0,i)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const s=this._getSecondPointerPosition(t),n=.5*(t.pageX+s.x),i=.5*(t.pageY+s.y);this._rotateEnd.set(n,i)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(U*this._rotateDelta.x/o.clientHeight),this._rotateUp(U*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),s=.5*(t.pageX+o.x),n=.5*(t.pageY+o.y);this._panEnd.set(s,n)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const o=this._getSecondPointerPosition(t),s=t.pageX-o.x,n=t.pageY-o.y,i=Math.sqrt(s*s+n*n);this._dollyEnd.set(0,i),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const l=(t.pageX+o.x)*.5,r=(t.pageY+o.y)*.5;this._updateZoomParameters(l,r)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId){this._pointers.splice(o,1);return}}_isTrackingPointer(t){for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId)return!0;return!1}_trackPointer(t){let o=this._pointerPositions[t.pointerId];o===void 0&&(o=new a.Vector2,this._pointerPositions[t.pointerId]=o),o.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const o=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[o]}_customWheelEvent(t){const o=t.deltaMode,s={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(o){case 1:s.deltaY*=16;break;case 2:s.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(s.deltaY*=10),s}}function Ue(u){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(u.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(u)&&(this._addPointer(u),u.pointerType==="touch"?this._onTouchStart(u):this._onMouseDown(u)))}function $e(u){this.enabled!==!1&&(u.pointerType==="touch"?this._onTouchMove(u):this._onMouseMove(u))}function He(u){switch(this._removePointer(u),this._pointers.length){case 0:this.domElement.releasePointerCapture(u.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(Te),this.state=L.NONE;break;case 1:const t=this._pointers[0],o=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:o.x,pageY:o.y});break}}function Ye(u){let t;switch(u.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case a.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(u),this.state=L.DOLLY;break;case a.MOUSE.ROTATE:if(u.ctrlKey||u.metaKey||u.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(u),this.state=L.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(u),this.state=L.ROTATE}break;case a.MOUSE.PAN:if(u.ctrlKey||u.metaKey||u.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(u),this.state=L.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(u),this.state=L.PAN}break;default:this.state=L.NONE}this.state!==L.NONE&&this.dispatchEvent(fe)}function qe(u){switch(this.state){case L.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(u);break;case L.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(u);break;case L.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(u);break}}function Ze(u){this.enabled===!1||this.enableZoom===!1||this.state!==L.NONE||(u.preventDefault(),this.dispatchEvent(fe),this._handleMouseWheel(this._customWheelEvent(u)),this.dispatchEvent(Te))}function Ke(u){this.enabled!==!1&&this._handleKeyDown(u)}function Ge(u){switch(this._trackPointer(u),this._pointers.length){case 1:switch(this.touches.ONE){case a.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(u),this.state=L.TOUCH_ROTATE;break;case a.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(u),this.state=L.TOUCH_PAN;break;default:this.state=L.NONE}break;case 2:switch(this.touches.TWO){case a.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(u),this.state=L.TOUCH_DOLLY_PAN;break;case a.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(u),this.state=L.TOUCH_DOLLY_ROTATE;break;default:this.state=L.NONE}break;default:this.state=L.NONE}this.state!==L.NONE&&this.dispatchEvent(fe)}function We(u){switch(this._trackPointer(u),this.state){case L.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(u),this.update();break;case L.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(u),this.update();break;case L.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(u),this.update();break;case L.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(u),this.update();break;default:this.state=L.NONE}}function Xe(u){this.enabled!==!1&&u.preventDefault()}function Je(u){u.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Qe(u){u.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function et(u){let t=null,o=null,s=null,n=null,i=null,l=null;const r=e.ref([]),h=e.ref(new a.Vector3),f=e.ref(new a.Vector3),C=()=>{if(!u.value)return;t=new a.Scene,t.background=new a.Color(16777215);const m=u.value;o=new a.PerspectiveCamera(75,m.clientWidth/m.clientHeight,.1,1e3),s=new a.WebGLRenderer({antialias:!0,alpha:!0}),s.setSize(m.clientWidth,m.clientHeight),s.localClippingEnabled=!0,s.shadowMap.enabled=!0,s.shadowMap.type=a.PCFSoftShadowMap,s.toneMapping=a.ACESFilmicToneMapping,s.toneMappingExposure=1,s.outputColorSpace=a.SRGBColorSpace,m.appendChild(s.domElement),n=new ze(o,s.domElement),n.enableDamping=!0,n.dampingFactor=.05,i=new a.Xe(o,s,{container:m,type:"cube",placement:"bottom-left",offset:{left:22,bottom:22},background:{color:"#D1D1D1"}}),i.attachControls(n),p(),_()},p=()=>{const m=new a.AmbientLight(4210752,.6);t.add(m);const g=new a.DirectionalLight(16777215,2);g.position.set(10,10,8),g.castShadow=!0,g.shadow.mapSize.width=2048,g.shadow.mapSize.height=2048,g.shadow.camera.near=.5,g.shadow.camera.far=50,t.add(g);const E=new a.DirectionalLight(16777215,.8);E.position.set(-8,-8,6),t.add(E);const P=new a.DirectionalLight(16777215,.6);P.position.set(0,-15,2),t.add(P);const k=new a.HemisphereLight(16777215,4473924,.8);t.add(k);const c=new a.PointLight(16777215,1,50);c.position.set(15,15,15),t.add(c);const b=new a.PointLight(16777215,.5,50);b.position.set(-15,-15,15),t.add(b)},_=()=>{l=requestAnimationFrame(_),n&&n.update(),s&&t&&o&&s.render(t,o),i&&i.render()};return{currentModels:r,initialCameraPosition:h,initialTargetPosition:f,initThreeJS:C,handleResize:()=>{if(!u.value||!o||!s||!i)return;const m=u.value,g=m.clientWidth,E=m.clientHeight;o.aspect=g/E,o.updateProjectionMatrix(),s.setSize(g,E),i.update()},fitCameraToAllModels:()=>{if(!o||!n||r.value.length===0)return;const m=new a.Box3;r.value.forEach(b=>{m.expandByObject(b)});const g=m.getSize(new a.Vector3),E=m.getCenter(new a.Vector3),k=Math.max(g.x,g.y,g.z)*.6,c=new a.Vector3(E.x+k,E.y+k,E.z+k);o.position.copy(c),o.lookAt(E),n.target.copy(E),n.update(),h.value.copy(c),f.value.copy(E)},getThreeJSObjects:()=>({scene:t,camera:o,renderer:s,controls:n,gizmo:i}),cleanup:()=>{l&&cancelAnimationFrame(l),s&&s.dispose(),n&&n.dispose(),i&&i.dispose()}}}function tt(u,t){const o=e.ref(!1);let s=null,n=12700,i=new a.Vector3,l=new a.Vector3,r=new a.Vector3,h=0,f=null;const C=d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2,p=d=>{const m=new a.Vector3,g=h*1.2,E=new a.Vector3(r.x+g,r.y,r.z),P=new a.Vector3(r.x,r.y+g,r.z),k=new a.Vector3(r.x,r.y-g,r.z);if(d<=.567){const b=d/.567*Math.PI*2;m.x=r.x+Math.cos(b)*g,m.z=r.z+Math.sin(b)*g,m.y=r.y}else if(d<=.724){const c=(d-.567)/.157,b=C(c);m.lerpVectors(E,P,b)}else if(d<=.881){const c=(d-.724)/.157,M=C(c)*Math.PI;m.x=r.x+Math.sin(M)*g,m.y=r.y+Math.cos(M)*g,m.z=r.z}else{const c=(d-.881)/.119,b=C(c);m.lerpVectors(k,i,b)}return m},_=()=>{const{camera:d,controls:m}=u();if(!d||!m)return;s||(s=Date.now());const g=Date.now()-s,E=Math.min(g/n,1);if(E>=1){x();return}const P=p(E);d.position.copy(P),d.lookAt(r),m.target.copy(r),f=requestAnimationFrame(_)},y=()=>{if(t.value.length===0)return;const{camera:d,controls:m}=u();if(!d||!m)return;i.copy(d.position),l.copy(m.target);const g=new a.Box3;t.value.forEach(S=>{g.expandByObject(S)});const E=g.getSize(new a.Vector3);r=g.getCenter(new a.Vector3),h=Math.max(E.x,E.y,E.z)*1.2;const P=new a.Vector3(r.x+h*1.2,r.y,r.z);m.enabled=!1;const k=d.position.clone(),c=1e3,b=Date.now(),M=()=>{const S=Date.now()-b,R=Math.min(S/c,1),D=C(R);d.position.lerpVectors(k,P,D),d.lookAt(r),m.target.copy(r),R<1?requestAnimationFrame(M):(o.value=!0,s=null,_())};M()},x=()=>{o.value=!1,s=null,f&&(cancelAnimationFrame(f),f=null);const{controls:d}=u();d&&(d.enabled=!0,d.target.copy(l))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,s=null,f&&(cancelAnimationFrame(f),f=null);const{camera:d,controls:m}=u();if(!d||!m)return;m.enabled=!0;const g=d.position.clone(),E=m.target.clone(),P=1500,k=Date.now(),c=()=>{const b=Date.now()-k,M=Math.min(b/P,1),S=C(M);d.position.lerpVectors(g,i,S),m.target.lerpVectors(E,l,S),M<1&&requestAnimationFrame(c)};c()}else y()},startAnimation:y,stopAnimation:x}}function ot(u,t){const o=e.ref(!1),s=e.ref("none");let n=[],i=[],l=new a.Box3,r=new a.Vector3;const h=()=>{n=[new a.Plane(new a.Vector3(1,0,0),0),new a.Plane(new a.Vector3(0,1,0),0),new a.Plane(new a.Vector3(0,0,1),0)]},f=()=>{l.makeEmpty(),t.value.forEach(v=>{l.expandByObject(v)}),r=l.getCenter(new a.Vector3)},C=v=>{const d=l.getSize(new a.Vector3);let m,g,E;v==="x"?(m=new a.PlaneGeometry(d.z*1.2,d.y*1.2),g=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(0,Math.PI/2,0)):v==="y"?(m=new a.PlaneGeometry(d.x*1.2,d.z*1.2),g=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(Math.PI/2,0,0)):v==="z"&&(m=new a.PlaneGeometry(d.x*1.2,d.y*1.2),g=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(0,0,0));const P=new a.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:a.DoubleSide,depthWrite:!1}),k=new a.Mesh(m,P);return k.position.copy(g),k.rotation.copy(E),k},p=()=>{if(_(),y(),s.value==="none")return;f();let v=null;if(s.value==="x"?(n[0].constant=-r.x,v=n[0]):s.value==="y"?(n[1].constant=-r.y,v=n[1]):s.value==="z"&&(n[2].constant=-r.z,v=n[2]),v){t.value.forEach(m=>{m.traverse(g=>{g.isMesh&&g.material&&(Array.isArray(g.material)?g.material.forEach(E=>{E.clippingPlanes=[v]}):g.material.clippingPlanes=[v])})});const{scene:d}=u();if(d){const m=C(s.value);d.add(m),i.push(m)}}},_=()=>{t.value.forEach(v=>{v.traverse(d=>{d.isMesh&&d.material&&(Array.isArray(d.material)?d.material.forEach(m=>{m.clippingPlanes=[]}):d.material.clippingPlanes=[])})})},y=()=>{const{scene:v}=u();v&&i.forEach(d=>{v.remove(d),d.geometry.dispose(),d.material.dispose()}),i=[]};return{isClipping:o,activeClippingAxis:s,toggleClipping:()=>{o.value=!o.value,o.value?(h(),t.value.length>0&&f()):(s.value="none",_(),y())},updateClippingPlanes:p,clearClippingPlanes:_,clearClippingMeshes:y}}const nt=/^[og]\s*(.+)?/,st=/^mtllib /,it=/^usemtl /,at=/^usemap /,Me=/\s+/,Pe=new a.Vector3,pe=new a.Vector3,Ve=new a.Vector3,Se=new a.Vector3,Z=new a.Vector3,ce=new a.Color;function rt(){const u={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,o){if(this.object&&this.object.fromDeclaration===!1){this.object.name=t,this.object.fromDeclaration=o!==!1;return}const s=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:o!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(n,i){const l=this._finalize(!1);l&&(l.inherited||l.groupCount<=0)&&this.materials.splice(l.index,1);const r={index:this.materials.length,name:n||"",mtllib:Array.isArray(i)&&i.length>0?i[i.length-1]:"",smooth:l!==void 0?l.smooth:this.smooth,groupStart:l!==void 0?l.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(h){const f={index:typeof h=="number"?h:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return f.clone=this.clone.bind(f),f}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(n){const i=this.currentMaterial();if(i&&i.groupEnd===-1&&(i.groupEnd=this.geometry.vertices.length/3,i.groupCount=i.groupEnd-i.groupStart,i.inherited=!1),n&&this.materials.length>1)for(let l=this.materials.length-1;l>=0;l--)this.materials[l].groupCount<=0&&this.materials.splice(l,1);return n&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),i}},s&&s.name&&typeof s.clone=="function"){const n=s.clone(0);n.inherited=!0,this.object.materials.push(n)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(t,o){const s=parseInt(t,10);return(s>=0?s-1:s+o/3)*3},parseNormalIndex:function(t,o){const s=parseInt(t,10);return(s>=0?s-1:s+o/3)*3},parseUVIndex:function(t,o){const s=parseInt(t,10);return(s>=0?s-1:s+o/2)*2},addVertex:function(t,o,s){const n=this.vertices,i=this.object.geometry.vertices;i.push(n[t+0],n[t+1],n[t+2]),i.push(n[o+0],n[o+1],n[o+2]),i.push(n[s+0],n[s+1],n[s+2])},addVertexPoint:function(t){const o=this.vertices;this.object.geometry.vertices.push(o[t+0],o[t+1],o[t+2])},addVertexLine:function(t){const o=this.vertices;this.object.geometry.vertices.push(o[t+0],o[t+1],o[t+2])},addNormal:function(t,o,s){const n=this.normals,i=this.object.geometry.normals;i.push(n[t+0],n[t+1],n[t+2]),i.push(n[o+0],n[o+1],n[o+2]),i.push(n[s+0],n[s+1],n[s+2])},addFaceNormal:function(t,o,s){const n=this.vertices,i=this.object.geometry.normals;Pe.fromArray(n,t),pe.fromArray(n,o),Ve.fromArray(n,s),Z.subVectors(Ve,pe),Se.subVectors(Pe,pe),Z.cross(Se),Z.normalize(),i.push(Z.x,Z.y,Z.z),i.push(Z.x,Z.y,Z.z),i.push(Z.x,Z.y,Z.z)},addColor:function(t,o,s){const n=this.colors,i=this.object.geometry.colors;n[t]!==void 0&&i.push(n[t+0],n[t+1],n[t+2]),n[o]!==void 0&&i.push(n[o+0],n[o+1],n[o+2]),n[s]!==void 0&&i.push(n[s+0],n[s+1],n[s+2])},addUV:function(t,o,s){const n=this.uvs,i=this.object.geometry.uvs;i.push(n[t+0],n[t+1]),i.push(n[o+0],n[o+1]),i.push(n[s+0],n[s+1])},addDefaultUV:function(){const t=this.object.geometry.uvs;t.push(0,0),t.push(0,0),t.push(0,0)},addUVLine:function(t){const o=this.uvs;this.object.geometry.uvs.push(o[t+0],o[t+1])},addFace:function(t,o,s,n,i,l,r,h,f){const C=this.vertices.length;let p=this.parseVertexIndex(t,C),_=this.parseVertexIndex(o,C),y=this.parseVertexIndex(s,C);if(this.addVertex(p,_,y),this.addColor(p,_,y),r!==void 0&&r!==""){const x=this.normals.length;p=this.parseNormalIndex(r,x),_=this.parseNormalIndex(h,x),y=this.parseNormalIndex(f,x),this.addNormal(p,_,y)}else this.addFaceNormal(p,_,y);if(n!==void 0&&n!==""){const x=this.uvs.length;p=this.parseUVIndex(n,x),_=this.parseUVIndex(i,x),y=this.parseUVIndex(l,x),this.addUV(p,_,y),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";const o=this.vertices.length;for(let s=0,n=t.length;s<n;s++){const i=this.parseVertexIndex(t[s],o);this.addVertexPoint(i),this.addColor(i)}},addLineGeometry:function(t,o){this.object.geometry.type="Line";const s=this.vertices.length,n=this.uvs.length;for(let i=0,l=t.length;i<l;i++)this.addVertexLine(this.parseVertexIndex(t[i],s));for(let i=0,l=o.length;i<l;i++)this.addUVLine(this.parseUVIndex(o[i],n))}};return u.startObject("",!1),u}class lt extends a.Loader{constructor(t){super(t),this.materials=null}load(t,o,s,n){const i=this,l=new a.FileLoader(this.manager);l.setPath(this.path),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,function(r){try{o(i.parse(r))}catch(h){n?n(h):console.error(h),i.manager.itemError(t)}},s,n)}setMaterials(t){return this.materials=t,this}parse(t){const o=new rt;t.indexOf(`\r
|
|
2
|
+
`)!==-1&&(t=t.replace(/\r\n/g,`
|
|
3
|
+
`)),t.indexOf(`\\
|
|
4
|
+
`)!==-1&&(t=t.replace(/\\\n/g,""));const s=t.split(`
|
|
5
|
+
`);let n=[];for(let r=0,h=s.length;r<h;r++){const f=s[r].trimStart();if(f.length===0)continue;const C=f.charAt(0);if(C!=="#")if(C==="v"){const p=f.split(Me);switch(p[0]){case"v":o.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),p.length>=7?(ce.setRGB(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]),a.SRGBColorSpace),o.colors.push(ce.r,ce.g,ce.b)):o.colors.push(void 0,void 0,void 0);break;case"vn":o.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":o.uvs.push(parseFloat(p[1]),parseFloat(p[2]));break}}else if(C==="f"){const _=f.slice(1).trim().split(Me),y=[];for(let v=0,d=_.length;v<d;v++){const m=_[v];if(m.length>0){const g=m.split("/");y.push(g)}}const x=y[0];for(let v=1,d=y.length-1;v<d;v++){const m=y[v],g=y[v+1];o.addFace(x[0],m[0],g[0],x[1],m[1],g[1],x[2],m[2],g[2])}}else if(C==="l"){const p=f.substring(1).trim().split(" ");let _=[];const y=[];if(f.indexOf("/")===-1)_=p;else for(let x=0,v=p.length;x<v;x++){const d=p[x].split("/");d[0]!==""&&_.push(d[0]),d[1]!==""&&y.push(d[1])}o.addLineGeometry(_,y)}else if(C==="p"){const _=f.slice(1).trim().split(" ");o.addPointGeometry(_)}else if((n=nt.exec(f))!==null){const p=(" "+n[0].slice(1).trim()).slice(1);o.startObject(p)}else if(it.test(f))o.object.startMaterial(f.substring(7).trim(),o.materialLibraries);else if(st.test(f))o.materialLibraries.push(f.substring(7).trim());else if(at.test(f))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(C==="s"){if(n=f.split(" "),n.length>1){const _=n[1].trim().toLowerCase();o.object.smooth=_!=="0"&&_!=="off"}else o.object.smooth=!0;const p=o.object.currentMaterial();p&&(p.smooth=o.object.smooth)}else{if(f==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+f+'"')}}o.finalize();const i=new a.Group;if(i.materialLibraries=[].concat(o.materialLibraries),!(o.objects.length===1&&o.objects[0].geometry.vertices.length===0)===!0)for(let r=0,h=o.objects.length;r<h;r++){const f=o.objects[r],C=f.geometry,p=f.materials,_=C.type==="Line",y=C.type==="Points";let x=!1;if(C.vertices.length===0)continue;const v=new a.BufferGeometry;v.setAttribute("position",new a.Float32BufferAttribute(C.vertices,3)),C.normals.length>0&&v.setAttribute("normal",new a.Float32BufferAttribute(C.normals,3)),C.colors.length>0&&(x=!0,v.setAttribute("color",new a.Float32BufferAttribute(C.colors,3))),C.hasUVIndices===!0&&v.setAttribute("uv",new a.Float32BufferAttribute(C.uvs,2));const d=[];for(let g=0,E=p.length;g<E;g++){const P=p[g],k=P.name+"_"+P.smooth+"_"+x;let c=o.materials[k];if(this.materials!==null){if(c=this.materials.create(P.name),_&&c&&!(c instanceof a.LineBasicMaterial)){const b=new a.LineBasicMaterial;a.Material.prototype.copy.call(b,c),b.color.copy(c.color),c=b}else if(y&&c&&!(c instanceof a.PointsMaterial)){const b=new a.PointsMaterial({size:10,sizeAttenuation:!1});a.Material.prototype.copy.call(b,c),b.color.copy(c.color),b.map=c.map,c=b}}c===void 0&&(_?c=new a.LineBasicMaterial:y?c=new a.PointsMaterial({size:1,sizeAttenuation:!1}):c=new a.MeshPhongMaterial,c.name=P.name,c.flatShading=!P.smooth,c.vertexColors=x,o.materials[k]=c),d.push(c)}let m;if(d.length>1){for(let g=0,E=p.length;g<E;g++){const P=p[g];v.addGroup(P.groupStart,P.groupCount,g)}_?m=new a.LineSegments(v,d):y?m=new a.Points(v,d):m=new a.Mesh(v,d)}else _?m=new a.LineSegments(v,d[0]):y?m=new a.Points(v,d[0]):m=new a.Mesh(v,d[0]);m.name=f.name,i.add(m)}else if(o.vertices.length>0){const r=new a.PointsMaterial({size:1,sizeAttenuation:!1}),h=new a.BufferGeometry;h.setAttribute("position",new a.Float32BufferAttribute(o.vertices,3)),o.colors.length>0&&o.colors[0]!==void 0&&(h.setAttribute("color",new a.Float32BufferAttribute(o.colors,3)),r.vertexColors=!0);const f=new a.Points(h,r);i.add(f)}return i}}class ct extends a.Loader{constructor(t){super(t)}load(t,o,s,n){const i=this,l=this.path===""?a.LoaderUtils.extractUrlBase(t):this.path,r=new a.FileLoader(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(t,function(h){try{o(i.parse(h,l))}catch(f){n?n(f):console.error(f),i.manager.itemError(t)}},s,n)}setMaterialOptions(t){return this.materialOptions=t,this}parse(t,o){const s=t.split(`
|
|
6
|
+
`);let n={};const i=/\s+/,l={};for(let h=0;h<s.length;h++){let f=s[h];if(f=f.trim(),f.length===0||f.charAt(0)==="#")continue;const C=f.indexOf(" ");let p=C>=0?f.substring(0,C):f;p=p.toLowerCase();let _=C>=0?f.substring(C+1):"";if(_=_.trim(),p==="newmtl")n={name:_},l[_]=n;else if(p==="ka"||p==="kd"||p==="ks"||p==="ke"){const y=_.split(i,3);n[p]=[parseFloat(y[0]),parseFloat(y[1]),parseFloat(y[2])]}else n[p]=_}const r=new ht(this.resourcePath||o,this.materialOptions);return r.setCrossOrigin(this.crossOrigin),r.setManager(this.manager),r.setMaterials(l),r}}class ht{constructor(t="",o={}){this.baseUrl=t,this.options=o,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:a.FrontSide,this.wrap=this.options.wrap!==void 0?this.options.wrap:a.RepeatWrapping}setCrossOrigin(t){return this.crossOrigin=t,this}setManager(t){this.manager=t}setMaterials(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(t){if(!this.options)return t;const o={};for(const s in t){const n=t[s],i={};o[s]=i;for(const l in n){let r=!0,h=n[l];const f=l.toLowerCase();switch(f){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(h=[h[0]/255,h[1]/255,h[2]/255]),this.options&&this.options.ignoreZeroRGBs&&h[0]===0&&h[1]===0&&h[2]===0&&(r=!1);break}r&&(i[f]=h)}}return o}preload(){for(const t in this.materialsInfo)this.create(t)}getIndex(t){return this.nameLookup[t]}getAsArray(){let t=0;for(const o in this.materialsInfo)this.materialsArray[t]=this.create(o),this.nameLookup[o]=t,t++;return this.materialsArray}create(t){return this.materials[t]===void 0&&this.createMaterial_(t),this.materials[t]}createMaterial_(t){const o=this,s=this.materialsInfo[t],n={name:t,side:this.side};function i(r,h){return typeof h!="string"||h===""?"":/^https?:\/\//i.test(h)?h:r+h}function l(r,h){if(n[r])return;const f=o.getTextureParams(h,n),C=o.loadTexture(i(o.baseUrl,f.url));C.repeat.copy(f.scale),C.offset.copy(f.offset),C.wrapS=o.wrap,C.wrapT=o.wrap,(r==="map"||r==="emissiveMap")&&(C.colorSpace=a.SRGBColorSpace),n[r]=C}for(const r in s){const h=s[r];let f;if(h!=="")switch(r.toLowerCase()){case"kd":n.color=a.ColorManagement.colorSpaceToWorking(new a.Color().fromArray(h),a.SRGBColorSpace);break;case"ks":n.specular=a.ColorManagement.colorSpaceToWorking(new a.Color().fromArray(h),a.SRGBColorSpace);break;case"ke":n.emissive=a.ColorManagement.colorSpaceToWorking(new a.Color().fromArray(h),a.SRGBColorSpace);break;case"map_kd":l("map",h);break;case"map_ks":l("specularMap",h);break;case"map_ke":l("emissiveMap",h);break;case"norm":l("normalMap",h);break;case"map_bump":case"bump":l("bumpMap",h);break;case"disp":l("displacementMap",h);break;case"map_d":l("alphaMap",h),n.transparent=!0;break;case"ns":n.shininess=parseFloat(h);break;case"d":f=parseFloat(h),f<1&&(n.opacity=f,n.transparent=!0);break;case"tr":f=parseFloat(h),this.options&&this.options.invertTrProperty&&(f=1-f),f>0&&(n.opacity=1-f,n.transparent=!0);break}}return this.materials[t]=new a.MeshPhongMaterial(n),this.materials[t]}getTextureParams(t,o){const s={scale:new a.Vector2(1,1),offset:new a.Vector2(0,0)},n=t.split(/\s+/);let i;return i=n.indexOf("-bm"),i>=0&&(o.bumpScale=parseFloat(n[i+1]),n.splice(i,2)),i=n.indexOf("-mm"),i>=0&&(o.displacementBias=parseFloat(n[i+1]),o.displacementScale=parseFloat(n[i+2]),n.splice(i,3)),i=n.indexOf("-s"),i>=0&&(s.scale.set(parseFloat(n[i+1]),parseFloat(n[i+2])),n.splice(i,4)),i=n.indexOf("-o"),i>=0&&(s.offset.set(parseFloat(n[i+1]),parseFloat(n[i+2])),n.splice(i,4)),s.url=n.join(" ").trim(),s}loadTexture(t,o,s,n,i){const l=this.manager!==void 0?this.manager:a.DefaultLoadingManager;let r=l.getHandler(t);r===null&&(r=new a.TextureLoader(l)),r.setCrossOrigin&&r.setCrossOrigin(this.crossOrigin);const h=r.load(t,s,n,i);return o!==void 0&&(h.mapping=o),h}}function dt(u,t,o,s){const n=async p=>{try{const _=await je.downloadAvatarApi({url:p});if(_.status!==200)throw new Error(`下载失败: ${_.status}`);return _.data}catch(_){throw console.error("addModelFromUrl失败:",_),_}},i=()=>{const{scene:p}=u();p&&(t.value.forEach(_=>{p.remove(_),_.traverse(y=>{y.isMesh&&(y.geometry&&y.geometry.dispose(),y.material&&(Array.isArray(y.material)?y.material.forEach(x=>{l(x)}):l(y.material)))})}),t.value=[])},l=p=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(y=>{p[y]&&p[y].dispose&&p[y].dispose()}),p.dispose&&p.dispose()},r=p=>new Promise((_,y)=>{const x=new FileReader;x.onload=v=>{try{const d=v.target.result,g=new ct().parse(d);g.preload(),_(g)}catch(d){y(d)}},x.onerror=()=>{y(new Error("MTL文件读取失败"))},x.readAsText(p)}),h=async p=>{const _={materials:{},create:function(y){return this.materials[y]?this.materials[y]:(console.warn(`Material '${y}' not found, using default material`),new a.MeshPhongMaterial({color:8947848,side:a.DoubleSide}))},getAsArray:function(){const y=[];for(const x in this.materials)y.push(this.materials[x]);return y},preload:function(){for(const y in this.materials)this.materials[y].map&&(this.materials[y].map.needsUpdate=!0)}};for(const y of p){const x=await r(y);Object.assign(_.materials,x.materials)}return _.preload(),_},f=async(p,_=[])=>new Promise((y,x)=>{const v=new FileReader;v.onload=async d=>{try{const m=d.target.result;let g=null;_&&_.length>0&&(_.length===1?g=await r(_[0]):g=await h(_));const E=new lt;g&&E.setMaterials(g);const P=E.parse(m);g||P.traverse(k=>{k.isMesh&&(k.material=new a.MeshPhongMaterial({color:8947848,side:a.DoubleSide}))}),y(P)}catch(m){x(m)}},v.onerror=()=>{x(new Error("OBJ文件读取失败"))},v.readAsText(p)});return{addModelsFromUrls:async p=>{var _;console.log(p);try{o.value=!0;const{scene:y}=u();if(!y)throw new Error("Scene not initialized");i();const x=[];for(let v=0;v<p.length;v++){const d=p[v];s.value=`正在加载模型 ${v+1}/${p.length}...`;const m=await n(d.objUrl),g=((_=d.objUrl)==null?void 0:_.split("/").pop())||`model_${v}.obj`,E=new File([m],g,{type:m.type});let P=[];if(d.mtlUrls){const c=Array.isArray(d.mtlUrls)?d.mtlUrls:[d.mtlUrls];for(let b=0;b<c.length;b++){const M=c[b],S=await n(M),R=(M==null?void 0:M.split("/").pop())||`material_${v}_${b}.mtl`,D=new File([S],R,{type:S.type});P.push(D)}}const k=await f(E,P);y.add(k),t.value.push(k),x.push(k)}return o.value=!1,x}catch(y){throw console.error("加载模型失败:",y),o.value=!1,y}},clearPreviousModels:i}}const ut={class:"obj-viewer-container"},pt={class:"floating-controls"},mt=["disabled"],ft={class:"btn-icon"},gt={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},_t={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},yt=["disabled"],wt=["disabled"],vt={class:"btn-icon"},bt={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ct={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},kt={key:0,class:"clipping-panel"},xt={class:"panel-content"},Et={class:"radio-group"},Mt={class:"radio-label"},Pt={class:"radio-label"},Vt={class:"radio-label"},St={class:"radio-label"},Dt={key:1,class:"loading-overlay"},Nt={__name:"threeModel",setup(u,{expose:t}){const o=e.ref(null),s=e.ref(!1),n=e.ref(""),i=e.ref(!1),l=e.ref(!1),{currentModels:r,initialCameraPosition:h,initialTargetPosition:f,initThreeJS:C,handleResize:p,fitCameraToAllModels:_,getThreeJSObjects:y,cleanup:x}=et(o),{isAnimating:v,toggleAnimation:d,startAnimation:m,stopAnimation:g}=tt(y,r),{isClipping:E,activeClippingAxis:P,toggleClipping:k,updateClippingPlanes:c}=ot(y,r),{addModelsFromUrls:b}=dt(y,r,s,n),M=()=>{if(l.value||r.value.length===0)return;l.value=!0,v.value&&g();const{camera:T,controls:w}=y();if(!T||!w)return;w.enabled=!0;const N=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,V=T.position.clone(),I=w.target.clone(),$=1500,B=Date.now(),Y=()=>{const H=Date.now()-B,te=Math.min(H/$,1),ae=N(te);T.position.lerpVectors(V,h.value,ae),w.target.lerpVectors(I,f.value,ae),te<1?requestAnimationFrame(Y):l.value=!1};Y()},S=()=>{document.fullscreenElement?document.exitFullscreen().then(()=>{i.value=!1,e.nextTick(()=>{p()})}).catch(T=>{console.error("无法退出全屏:",T)}):o.value.requestFullscreen().then(()=>{i.value=!0,e.nextTick(()=>{p()})}).catch(T=>{console.error("无法进入全屏:",T)})},R=()=>{i.value=!!document.fullscreenElement,i.value||e.nextTick(()=>{p()})},D=async T=>{try{v.value&&g(),E.value&&k();const w=await b(T);return _(),w}catch(w){throw console.error("加载模型失败:",w),w}};return e.onMounted(async()=>{await e.nextTick(),C(),window.addEventListener("resize",p),document.addEventListener("fullscreenchange",R)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",p),document.removeEventListener("fullscreenchange",R),v.value&&g(),x()}),t({addModelsFromUrls:D,toggleAnimation:d,startAnimation:m,stopAnimation:g,resetView:M,toggleFullscreen:S,toggleClipping:k}),(T,w)=>(e.openBlock(),e.createElementBlock("div",ut,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),e.createElementVNode("div",pt,[e.createElementVNode("button",{onClick:w[0]||(w[0]=(...N)=>e.unref(d)&&e.unref(d)(...N)),class:e.normalizeClass(["control-btn","animation-btn",{active:e.unref(v)}]),disabled:s.value||e.unref(r).length===0},[e.createElementVNode("div",ft,[e.unref(v)?(e.openBlock(),e.createElementBlock("svg",_t,w[11]||(w[11]=[e.createElementVNode("rect",{x:"6",y:"4",width:"4",height:"16"},null,-1),e.createElementVNode("rect",{x:"14",y:"4",width:"4",height:"16"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",gt,w[10]||(w[10]=[e.createElementVNode("polygon",{points:"5,3 19,12 5,21"},null,-1)])))]),e.createElementVNode("span",null,e.toDisplayString(e.unref(v)?"停止动画":"动画视图"),1)],10,mt),e.createElementVNode("button",{onClick:w[1]||(w[1]=(...N)=>e.unref(k)&&e.unref(k)(...N)),class:e.normalizeClass(["control-btn","clipping-btn",{active:e.unref(E)}]),disabled:s.value||e.unref(r).length===0},w[12]||(w[12]=[e.createElementVNode("div",{class:"btn-icon"},[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("rect",{x:"4",y:"8",width:"16",height:"8"}),e.createElementVNode("line",{x1:"2",y1:"12",x2:"22",y2:"12","stroke-width":"3",opacity:"0.7"})])],-1),e.createElementVNode("span",null,"剖面视图",-1)]),10,yt),e.createElementVNode("button",{onClick:M,class:e.normalizeClass(["control-btn","reset-btn"]),disabled:s.value||e.unref(r).length===0||l.value},w[13]||(w[13]=[e.createStaticVNode('<div class="btn-icon" data-v-fb0a68e9><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-fb0a68e9><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-fb0a68e9></path><path d="M21 3v5h-5" data-v-fb0a68e9></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-fb0a68e9></path><path d="M3 21v-5h5" data-v-fb0a68e9></path></svg></div><span data-v-fb0a68e9>重置</span>',2)]),8,wt),e.createElementVNode("button",{onClick:S,class:e.normalizeClass(["control-btn","fullscreen-btn"])},[e.createElementVNode("div",vt,[i.value?(e.openBlock(),e.createElementBlock("svg",Ct,w[15]||(w[15]=[e.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",bt,w[14]||(w[14]=[e.createElementVNode("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},null,-1)])))]),e.createElementVNode("span",null,e.toDisplayString(i.value?"退出全屏":"全屏"),1)])]),e.unref(E)?(e.openBlock(),e.createElementBlock("div",kt,[e.createElementVNode("div",xt,[e.createElementVNode("div",Et,[e.createElementVNode("label",Mt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":w[2]||(w[2]=N=>e.isRef(P)?P.value=N:null),onChange:w[3]||(w[3]=(...N)=>e.unref(c)&&e.unref(c)(...N))},null,544),[[e.vModelRadio,e.unref(P)]]),w[16]||(w[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",Pt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":w[4]||(w[4]=N=>e.isRef(P)?P.value=N:null),onChange:w[5]||(w[5]=(...N)=>e.unref(c)&&e.unref(c)(...N))},null,544),[[e.vModelRadio,e.unref(P)]]),w[17]||(w[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",Vt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":w[6]||(w[6]=N=>e.isRef(P)?P.value=N:null),onChange:w[7]||(w[7]=(...N)=>e.unref(c)&&e.unref(c)(...N))},null,544),[[e.vModelRadio,e.unref(P)]]),w[18]||(w[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",St,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":w[8]||(w[8]=N=>e.isRef(P)?P.value=N:null),onChange:w[9]||(w[9]=(...N)=>e.unref(c)&&e.unref(c)(...N))},null,544),[[e.vModelRadio,e.unref(P)]]),w[19]||(w[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",Dt,[w[20]||(w[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(n.value),1)])):e.createCommentVNode("",!0)]))}},Tt=ne._export_sfc(Nt,[["__scopeId","data-v-fb0a68e9"]]),At={class:"bread-content"},Bt=["onClick"],Lt={key:0,class:"split-title"},Rt={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(u,{emit:t}){const o=u,s=e.ref([]),n=t;e.onMounted(()=>{s.value=o==null?void 0:o.breadArray}),e.watch(()=>o==null?void 0:o.breadArray,()=>{s.value=o==null?void 0:o.breadArray},{deep:!0,immediate:!0});const i=l=>{n("click",l)};return(l,r)=>(e.openBlock(),e.createElementBlock("div",At,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(h,f)=>{var C;return e.openBlock(),e.createElementBlock("div",{key:f,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:p=>i(h),style:e.normalizeStyle({opacity:((C=s.value)==null?void 0:C.length)-1===f?"0.7":"1"})},e.toDisplayString(h.value),13,Bt),f!==s.value.length-1&&Array.isArray(s.value)?(e.openBlock(),e.createElementBlock("div",Lt,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},Ae=ne._export_sfc(Rt,[["__scopeId","data-v-ded7e2bd"]]),Ft={class:"item-menu-content"},jt={class:"item-left-content"},Ot={key:0,class:"page-icon"},It={class:"avatar"},zt={style:{display:"flex"}},Ut={class:"select-icon"},$t={key:0,class:"model-operate",style:{width:"0px"}},Ht={class:"model-select"},Yt={class:"model-fill"},qt={key:1,class:"show-main-content"},Zt={class:"show-content"},Kt={class:"item-view-group"},Gt={class:"show-item-content"},Wt={class:"item-view-group"},Xt={key:2,class:"show-main-content"},Jt={__name:"browser",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(u,{emit:t}){const o=Ne.useLoginState(),{loginUserInfo:s,cryptoInfo:n}=F.storeToRefs(o);e.onMounted(()=>{Fe.ElNotification({title:"温馨提示:",type:"success",message:"欢迎使用系统",duration:1e3})});const i=a.useModelComp(K.pinia);a.useFormToTableComp(K.pinia),e.ref(!0);const l=F.useMenuState();e.ref(!0);const{itemData:r,isEdit:h,isRefreshCurStructure:f,curStructureCompIds:C}=F.storeToRefs(i),p=a.useUnit(K.pinia),{activeMenuPath:_,menus:y,importLoading:x}=F.storeToRefs(l),{selectIndex:v,selectTitle:d}=F.storeToRefs(p);return e.ref([]),e.ref(!1),(m,g)=>{const E=e.resolveComponent("el-aside"),P=e.resolveComponent("el-button"),k=e.resolveComponent("el-avatar"),c=e.resolveComponent("el-header"),b=e.resolveComponent("router-view"),M=e.resolveComponent("el-main"),S=e.resolveComponent("el-container"),R=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(S,{"element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.unref(h)==="view"?(e.openBlock(),e.createBlock(E,{key:0,width:"250px"},{default:e.withCtx(()=>[e.createVNode(De.default,{mode:"vertical"})]),_:1})):e.createCommentVNode("",!0),e.createVNode(S,null,{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>{var D;return[e.createElementVNode("div",Ft,[e.createElementVNode("div",jt,[e.unref(h)==="edit"?(e.openBlock(),e.createElementBlock("div",Ot,[e.createVNode(P,{text:"",onClick:e.unref(A.onBack)},{default:e.withCtx(()=>g[2]||(g[2]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[2]},8,["onClick"]),e.createVNode(P,{text:"",onClick:g[0]||(g[0]=T=>{var w,N;return e.unref(A.clickSavePage)((N=(w=e.unref(d))==null?void 0:w.map(V=>V.value))==null?void 0:N.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(W.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[g[3]||(g[3]=e.createTextVNode(" 保存页面 "))]),_:1,__:[3]})])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(Ae,{key:e.unref(d),breadArray:e.unref(d),onClick:e.unref(A.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",It,[e.unref(h)==="view"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-icon",onClick:g[1]||(g[1]=(...T)=>e.unref(A.onSelectFixContent)&&e.unref(A.onSelectFixContent)(...T))},[e.createElementVNode("div",zt,[e.createVNode(W.SvgIcon,{name:"write",style:{width:"clamp(12px, 0.9375rem, 15px)",height:"clamp(12px, 0.9375rem, 15px)"}})]),g[4]||(g[4]=e.createElementVNode("div",{class:"layout-trigger"},e.toDisplayString("修改布局"),-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",Ut,[e.renderSlot(m.$slots,"default",{},void 0,!0)]),e.createVNode(k,{size:35,src:(D=e.unref(s))==null?void 0:D.avatarUrl},{default:e.withCtx(()=>{var T;return[e.createTextVNode(e.toDisplayString(((T=e.unref(s))==null?void 0:T.account)??"未知"),1)]}),_:1},8,["src"])])])]}),_:3}),e.createVNode(M,null,{default:e.withCtx(()=>{var D,T,w,N;return[e.unref(h)==="edit"?(e.openBlock(),e.createElementBlock("div",$t,[e.createElementVNode("div",Ht,[e.createVNode(ee.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:m.innerWidth},[e.createVNode(ee.modelShow)])),e.createElementVNode("div",Yt,[e.createVNode(ee.modelFill)])])):m.$route.path==="/"&&((D=e.unref(A.showItems))==null?void 0:D.length)>0&&e.unref(h)==="view"?(e.openBlock(),e.createElementBlock("div",qt,[e.createElementVNode("div",Zt,[(T=e.unref(ie.cloneDeep)(e.unref(A.showItems)))!=null&&T.find(V=>V.comp==="FormTop")?(e.openBlock(),e.createElementBlock("div",{class:"show-header",key:m.index},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((w=e.unref(ie.cloneDeep)(e.unref(A.showItems)))==null?void 0:w.filter(V=>V.comp==="FormTop"),(V,I)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:I},[e.createElementVNode("div",Kt,e.toDisplayString(V.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(A.getComponents)(V.comp)),{itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:(V==null?void 0:V.id)??I,onChange:e.unref(A.onChange),index:(V==null?void 0:V.id)??I,onContentChange:e.unref(A.onContentChange),onPageChange:e.unref(A.onPageChange)},null,40,["itemData","childItemData","onChange","index","onContentChange","onPageChange"]))]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((N=e.unref(ie.cloneDeep)(e.unref(A.showItems)))==null?void 0:N.filter(V=>V.comp!=="FormTop"),(V,I)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:I},[e.createElementVNode("div",Wt,e.toDisplayString(V.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(A.getComponents)(V.comp)),{itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:(V==null?void 0:V.id)??I,onChange:e.unref(A.onChange),index:(V==null?void 0:V.id)??I,onContentChange:e.unref(A.onContentChange),onPageChange:e.unref(A.onPageChange)},null,40,["itemData","childItemData","onChange","index","onContentChange","onPageChange"]))]))),128))])])])):e.unref(h)==="view"?(e.openBlock(),e.createElementBlock("div",Xt,[e.createVNode(b)])):e.createCommentVNode("",!0)]}),_:1})]),_:3})]),_:3})),[[R,e.unref(x)]])}}},Qt=ne._export_sfc(Jt,[["__scopeId","data-v-d2611062"]]);function eo(u,t,o,s,n,i){const l=e.resolveComponent("svg-icon"),r=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(r,{mode:u.mode,menuList:u.renderMenuList,onClickMenu:u.clickMenu,onOpenMenu:u.openMenu,onCloseMenu:u.closeMenu},{title:e.withCtx(({menu:h})=>[e.createVNode(l,{name:h.icon??"Fold",class:"menu-icon"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(h.title??""),1)]),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"])}const to=ne._export_sfc(me._sfc_main,[["render",eo],["__scopeId","data-v-8c86ef59"]]),Q=[{key:"FitCurve_Eleven",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"},{key:"MakeShape",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"},{key:"FillEmpty",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"},{key:"ToolPathFakeFast",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"},{key:"FiveAxisCalculator",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"},{key:"DetectionAlgorithm",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",download:""},{key:"FeatureSelectionAlgorithm_FFS",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"},{key:"AIParameterOptimization",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"}],oo={class:"structure-buttons"},no={class:"structure-paths"},so={class:"client-header-user"},io={class:"select-icon"},ao={class:"model-select"},ro={class:"model-show"},lo={class:"model-fill"},co={class:"client-header-logo"},ho={class:"client-header-menu"},uo={class:"client-header-user"},po={style:{display:"flex"}},mo={class:"select-icon"},fo={class:"client-main-content"},go={class:"item-view-group"},_o={key:0,class:"calculator"},yo=e.defineComponent({__name:"client",props:{windowConfig:{type:Object,default:()=>{}}},setup(u){const t=a.useUnit(K.pinia),o=e.ref(!1),{selectTitle:s}=F.storeToRefs(t),n=e.ref(!1),i=a.useTableComp(K.pinia),{tableShowThree:l}=F.storeToRefs(i),r=Ne.useLoginState(),{loginUserInfo:h}=F.storeToRefs(r),f=a.useModelComp(K.pinia),{isEdit:C}=F.storeToRefs(f),p=F.useMenuState(K.pinia),_=Re.useFormComp(K.pinia),{objUrl:y}=F.storeToRefs(_),x=e.ref(null),v=e.ref(!0),{importLoading:d,activeMenuPath:m}=F.storeToRefs(p),g=e.ref(!1);e.watch(()=>m.value,async k=>{k&&(g.value=!0)},{immediate:!0});const E=async k=>{var M,S,R,D,T,w,N;const c=(M=k==null?void 0:k.split("/"))==null?void 0:M[0],b=await F.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:c}});return((S=b==null?void 0:b.data)==null?void 0:S.type)==="success"?((N=(w=(T=(D=(R=b==null?void 0:b.data)==null?void 0:R.result)==null?void 0:D[0])==null?void 0:T.value)==null?void 0:w.tableData)==null?void 0:N.隐藏三维显示)!==!0:!0};e.watch(()=>A.showItems.value,()=>{var k,c,b;((k=A.showItems.value)==null?void 0:k.length)===2&&((c=A.showItems.value)!=null&&c.find(M=>(M==null?void 0:M.name)==="输入"))&&((b=A.showItems.value)!=null&&b.find(M=>(M==null?void 0:M.name)==="输出"))?n.value=!0:n.value=!1},{deep:!0,immediate:!0}),e.watch(()=>m.value,async()=>{m.value&&(v.value=await E(m.value))},{deep:!0,immediate:!0}),e.watch(()=>[y.value,x.value],()=>{var k;((k=y.value)==null?void 0:k.length)>0&&x.value&&x.value.addModelsFromUrls(y.value)},{immediate:!0,deep:!0}),e.watch(()=>l.value,async()=>{var c,b;if(l.value!==""&&l.value){let M=(c=m.value)==null?void 0:c.split("/"),S=M[(M==null?void 0:M.length)-2];const D=(((b=Q==null?void 0:Q.find(N=>(N==null?void 0:N.key)===S))==null?void 0:b.download)??"")+"/"+l.value,T=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),w=await F.axios.post(D,null,{responseType:"blob",headers:{Authorization:T,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var k=new Blob([w.data],{type:"application/octet-stream;charset=UTF-8"});x.value.loadModelByDefaultPath(k)}},{deep:!0,immediate:!0});const P=async()=>{var T,w,N,V,I,$,B,Y,H,te,ae,ge,_e,ye,we,ve,be;o.value=!0;let k=(T=m.value)==null?void 0:T.split("/"),c=k[(k==null?void 0:k.length)-2];const b=((w=Q==null?void 0:Q.find(X=>(X==null?void 0:X.key)===c))==null?void 0:w.value)??"";let M="";const S=await F.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});((N=S==null?void 0:S.data)==null?void 0:N.code)===200&&(M=`Bearer ${(I=(V=S.data)==null?void 0:V.result)==null?void 0:I.accessToken}`,sessionStorage.setItem("magicToken",M));const R=M===""?"123456":M,D=await F.axios.post(b,null,{headers:{Authorization:R,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if((($=D==null?void 0:D.data)==null?void 0:$.type)==="success"&&a.IsJson((Y=(B=D==null?void 0:D.data)==null?void 0:B.result)==null?void 0:Y.result)){const X=(_e=(ge=(ae=JSON.parse((te=(H=D==null?void 0:D.data)==null?void 0:H.result)==null?void 0:te.result))==null?void 0:ae.lines_file_paths)==null?void 0:ge[0])==null?void 0:_e.split("\\"),Be=(((ye=Q==null?void 0:Q.find(G=>(G==null?void 0:G.key)===c))==null?void 0:ye.resources)??"")+"/"+((X==null?void 0:X[(X==null?void 0:X.length)-2])??"outputResources"),se=await F.axios.post(Be,null,{headers:{Authorization:R,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((we=se==null?void 0:se.data)==null?void 0:we.type)==="success"){const G=(ve=se==null?void 0:se.data)==null?void 0:ve.result,Le=A.showItems.value;A.showItems.value=(be=ie.cloneDeep(Le))==null?void 0:be.map(O=>{var Ce,ke;if((O==null?void 0:O.name)==="输出"){if((O==null?void 0:O.comp)==="Table")O.compData=(Ce=O==null?void 0:O.compData)==null?void 0:Ce.map(z=>{var q,re;return(z==null?void 0:z.key)==="tableContents"&&(z.contents=(re=(q=z==null?void 0:z.contents)==null?void 0:q.map((J,he)=>(J=J==null?void 0:J.map(de=>(typeof de=="string"&&(de=G[he]),de)),J)))==null?void 0:re.filter((J,he)=>he<=(G==null?void 0:G.length)-1)),z});else if((O==null?void 0:O.comp)==="Form"){let z="";G==null||G.forEach(q=>{z=z===""?z+q:z+","+q}),O.compData=(ke=O==null?void 0:O.compData)==null?void 0:ke.map(q=>{var re;return(q==null?void 0:q.key)==="formContent"&&(q.contents=(re=q.contents)==null?void 0:re.map(J=>(J.value=z,J))),q})}}return O})}}o.value=!1};return(k,c)=>{const b=e.resolveComponent("el-button"),M=e.resolveComponent("el-avatar"),S=e.resolveComponent("el-header"),R=e.resolveComponent("el-container"),D=e.resolveComponent("el-aside"),T=e.resolveComponent("el-splitter-panel"),w=e.resolveComponent("el-splitter"),N=e.resolveComponent("el-main"),V=e.resolveComponent("router-view"),I=e.resolveDirective("loading");return e.unref(C)==="edit"?(e.openBlock(),e.createBlock(R,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(S,{class:"client-structure-header"},{default:e.withCtx(()=>{var $;return[e.createElementVNode("div",oo,[e.createVNode(b,{class:"select-icon",onClick:e.unref(A.onBack)},{default:e.withCtx(()=>c[3]||(c[3]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[3]},8,["onClick"]),e.createVNode(b,{class:"select-icon",onClick:c[0]||(c[0]=B=>{var Y,H;return e.unref(A.clickSavePage)((H=(Y=e.unref(s))==null?void 0:Y.map(te=>te.value))==null?void 0:H.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(W.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[c[4]||(c[4]=e.createTextVNode(" 保存页面 "))]),_:1,__:[4]})]),e.createElementVNode("div",no,[(e.openBlock(),e.createBlock(Ae,{key:e.unref(s),breadArray:e.unref(s),onClick:e.unref(A.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",so,[e.createElementVNode("div",io,[e.renderSlot(k.$slots,"default",{},void 0,!0)]),e.createVNode(M,{size:35,src:($=e.unref(h))==null?void 0:$.avatarUrl},{default:e.withCtx(()=>{var B;return[e.createTextVNode(e.toDisplayString(((B=e.unref(h))==null?void 0:B.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(C)==="edit"?(e.openBlock(),e.createBlock(R,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",ao,[e.createVNode(ee.modelSelect)]),e.createElementVNode("div",ro,[e.createVNode(ee.modelShow)]),e.createElementVNode("div",lo,[e.createVNode(ee.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(R,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(S,{class:"client-header"},{default:e.withCtx(()=>{var $;return[e.createElementVNode("div",co,[e.createVNode(W.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),c[5]||(c[5]=e.createTextVNode(" CPMPIP "))]),e.createElementVNode("div",ho,[e.createVNode(to,{mode:"horizontal"})]),e.createElementVNode("div",uo,[e.unref(C)==="view"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-icon",onClick:c[1]||(c[1]=(...B)=>e.unref(A.onSelectFixContent)&&e.unref(A.onSelectFixContent)(...B))},[e.createElementVNode("div",po,[e.createVNode(W.SvgIcon,{name:"write",style:{width:"clamp(12px, 0.9375rem, 15px)",height:"clamp(12px, 0.9375rem, 15px)"}})]),c[6]||(c[6]=e.createElementVNode("div",{class:"layout-trigger"},e.toDisplayString("修改布局"),-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",mo,[e.renderSlot(k.$slots,"default",{},void 0,!0)]),e.createVNode(M,{size:35,src:($=e.unref(h))==null?void 0:$.avatarUrl},{default:e.withCtx(()=>{var B;return[e.createTextVNode(e.toDisplayString(((B=e.unref(h))==null?void 0:B.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(R,{class:"client-body"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(T,{collapsible:"",resizable:!1,max:300,size:300},{"start-collapsible":e.withCtx(()=>[e.createVNode(W.SvgIcon,{name:"Left"})]),"end-collapsible":e.withCtx(()=>[e.createVNode(W.SvgIcon,{name:"Right"})]),default:e.withCtx(()=>[e.createVNode(D,{class:"client-aside",width:"300px"},{default:e.withCtx(()=>[e.createVNode(De.default,{mode:"vertical"})]),_:1})]),_:1}),e.createVNode(T,{collapsible:""},{default:e.withCtx(()=>[k.$route.path==="/"?(e.openBlock(),e.createBlock(N,{key:0,class:"client-main"},{default:e.withCtx(()=>[e.createElementVNode("div",fo,[e.createVNode(Tt,{isShow:g.value,windowConfig:u.windowConfig,ref_key:"threeModelRef",ref:x},null,8,["isShow","windowConfig"])]),e.createVNode(w,{class:"main-splitter"},{default:e.withCtx(()=>[e.createVNode(T,{collapsible:"",resizable:!1},{"start-collapsible":e.withCtx(()=>[e.createVNode(W.SvgIcon,{name:"Left"})]),"end-collapsible":e.withCtx(()=>[e.createVNode(W.SvgIcon,{name:"Right"})]),default:e.withCtx(()=>[c[7]||(c[7]=e.createElementVNode("div",{class:"empty-wrap"},null,-1))]),_:1,__:[7]}),e.createVNode(T,{collapsible:"",resizable:!0,size:400,style:{"border-radius":"8px"}},{"start-collapsible":e.withCtx(()=>[e.createVNode(W.SvgIcon,{name:"Left"})]),"end-collapsible":e.withCtx(()=>[e.createVNode(W.SvgIcon,{name:"Right"})]),default:e.withCtx(()=>{var $;return[(e.openBlock(),e.createElementBlock("div",{class:"client-main-operate",key:e.unref(A.showItems)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(($=e.unref(ie.cloneDeep)(e.unref(A.showItems)))==null?void 0:$.filter(B=>B.comp!=="FormTop"),(B,Y)=>(e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:Y},[e.createElementVNode("div",go,e.toDisplayString(B.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(A.getComponents)(B.comp)),{itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,key:(B==null?void 0:B.id)??Y,onChange:e.unref(A.onChange),index:(B==null?void 0:B.id)??Y,onContentChange:e.unref(A.onContentChange),onPageChange:e.unref(A.onPageChange)},null,40,["itemData","childItemData","onChange","index","onContentChange","onPageChange"]))]))),128)),n.value?(e.openBlock(),e.createElementBlock("div",_o,[e.createVNode(Oe._sfc_main,{class:"calculator-content",onClickTrigger:c[2]||(c[2]=B=>P()),loading:o.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0)]))]}),_:1})]),_:1})]),_:1})):(e.openBlock(),e.createBlock(N,{key:1,class:"client-router"},{default:e.withCtx(()=>[e.createVNode(V)]),_:1}))]),_:1})]),_:1})]),_:1})]),_:3})),[[I,e.unref(d)]])}}}),wo=ne._export_sfc(yo,[["__scopeId","data-v-8edc052f"]]),vo={class:"system-wrap"},bo={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},platform:{type:String,default:"browser"},content:String,jsonContents:Array},setup(u){const t=a.useModelComp(K.pinia),o=a.useUnit(K.pinia),s=F.useMenuState();e.ref(!1);const n=e.ref(!0),i=u;return e.onMounted(()=>{}),e.watch(()=>[i==null?void 0:i.content,i==null?void 0:i.jsonContents],async()=>{var h,f,C,p;if(((h=i==null?void 0:i.jsonContents)==null?void 0:h.length)>0){t.setOriginalData(i==null?void 0:i.jsonContents);return}if(!(i!=null&&i.content)||((f=i==null?void 0:i.content)==null?void 0:f.length)===0)return;n.value=!0,s.setImportLoading(!0);let l=[],r=[];o.setSelectTitle([]),o.setSelectIndex(""),o.setSelectMenu(""),(p=(C=i==null?void 0:i.content)==null?void 0:C.filter(_=>_!==""))==null||p.forEach(_=>{oe.isExpandStringToJson(_)?r.push(oe.expandStringToJson(_)):oe.expandNewStringToJson(_)?r.push(oe.expandNewStringToJson(_)):oe.expandContentStringToJson(_)?r.push(oe.expandContentStringToJson(_)):r.push(me.expandToNewContents(_))}),l=r==null?void 0:r[0],await me.savePageDataAsync(l),await a.loadingSystemType(),t.setOriginalData(l),s.setImportLoading(!1)},{deep:!0,immediate:!0}),(l,r)=>(e.openBlock(),e.createElementBlock("div",vo,[u.platform==="browser"?(e.openBlock(),e.createBlock(Qt,{key:0},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3})):(e.openBlock(),e.createBlock(wo,{key:1,windowConfig:u.windowConfig},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},8,["windowConfig"]))]))}},Co=ne._export_sfc(bo,[["__scopeId","data-v-65a44ad9"]]),ko={class:"add-model-content"},xo={key:0,class:"model-operate"},Eo={class:"model-select"},Mo={class:"model-fill"},Po={key:1,class:"model-view"},Vo={key:0,class:"model-import-data"},So={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(u,{emit:t}){const o=u,s=t,n=e.ref([]),i=e.ref([]),l=e.ref([]),r=e.ref(0),h=a.useModelComp(K.pinia),f=F.useMenuState(K.pinia),{itemData:C,originalData:p}=F.storeToRefs(h),{activeMenuPath:_,platform:y}=F.storeToRefs(f),x=e.ref(null),v=e.ref(0),d=e.ref([]);e.ref("");const m=e.ref(0),g=c=>{s("contentChange",c)},E=c=>{var M;const b=(M=ie.cloneDeep(c==null?void 0:c.wholeValue))==null?void 0:M.map(S=>{var R;return(S==null?void 0:S.comp)==="Form"&&(S.compData=(R=S.compData)==null?void 0:R.map(D=>((D==null?void 0:D.key)==="formContent"&&(D.contents=oe.arrayToNumberArray(D==null?void 0:D.contents)),D))),S});s("change",{originalContents:p.value,currentContents:c==null?void 0:c.wholeValue,editContent:c==null?void 0:c.editValue,arrayToContents:b})};e.watch(()=>i.value,()=>{m.value===i.value.length&&i.value.length!==0&&(n.value=i.value)},{deep:!0,immediate:!0});const P=()=>{x.value.click()},k=async c=>{const b=c.target.files;if(!b)return;new FileReader,n.value=[],i.value=[],m.value=b.length;const M=Array.from(b).map(async S=>await new Promise(R=>{const D=new FileReader;D.onload=T=>{try{i.value.push(T.target.result),v.value++}catch(w){console.error("解析失败:",w);return}},D.onerror=()=>R(`读取 ${S.name} 失败`),D.readAsText(S),c.target.value="",x.value=null}));await Promise.all(M)};return e.watch(()=>[o==null?void 0:o.content,o==null?void 0:o.jsonContents],async()=>{await a.loadingSystemType(),n.value=o.content,l.value=o==null?void 0:o.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>v.value,()=>{var c;((c=d.value)==null?void 0:c.length)!==0&&(h.setOriginalData(d.value),h.setItemData(d.value))},{deep:!0,immediate:!0}),(c,b)=>{const M=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ko,[(o==null?void 0:o.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",xo,[e.createElementVNode("div",Eo,[e.createVNode(ee.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:r.value},[e.createVNode(ee.modelShow)])),e.createElementVNode("div",Mo,[e.createVNode(ee.modelFill)])])):e.createCommentVNode("",!0),(o==null?void 0:o.mode)==="view"?(e.openBlock(),e.createElementBlock("div",Po,[(e.openBlock(),e.createBlock(Co,{platform:e.unref(y),content:n.value,onChange:E,jsonContents:l.value,onContentChange:g,key:r.value},{default:e.withCtx(()=>{var S;return[((S=o==null?void 0:o.jsonContents)==null?void 0:S.length)===0&&(o!=null&&o.showButton)?(e.openBlock(),e.createElementBlock("div",Vo,[e.createElementVNode("div",{class:"import-button",onClick:P},[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:x,accept:".txt, .inm",onChange:k,style:{display:"none"},multiple:""},null,544),e.createVNode(M,{name:"import",style:{width:"clamp(12px, 0.9375rem, 15px)",height:"clamp(12px, 0.9375rem, 15px)"}}),b[0]||(b[0]=e.createElementVNode("div",{class:"import-trigger"},e.toDisplayString("导入模型"),-1))])])):e.createCommentVNode("",!0)]}),_:1},8,["platform","content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},Do=ne._export_sfc(So,[["__scopeId","data-v-486b9e58"]]);exports.default=Do;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.vue_vue_type_script_setup_true_lang-dBJnzcd9.cjs");exports.default=e._sfc_main;
|