ss-component-new 1.3.502 → 1.3.504
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/package.json +1 -1
- package/dist/JSEncrypt-IYbV4kRj.cjs +0 -26
- package/dist/MTLLoader-DqJ6tn_v.cjs +0 -6
- package/dist/OrbitControls-C_zQw6pc.cjs +0 -1
- package/dist/URDFLoader-CnIz461N.cjs +0 -4
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
- package/dist/animationData-DrgkOf1t.cjs +0 -1
- package/dist/array-DvMnFzsV.cjs +0 -1
- package/dist/clone-C9CqV0vm.cjs +0 -1
- package/dist/eleIcon-Dr0KcGoI.cjs +0 -1
- package/dist/iconfont-CohEwWgL.cjs +0 -1
- package/dist/index-B-pflqKE.cjs +0 -1
- package/dist/index-B0Bo4XRV.cjs +0 -1
- package/dist/index-B1FeUhQ3.cjs +0 -1
- package/dist/index-B2BAJXIH.cjs +0 -1
- package/dist/index-BLeo9xms.cjs +0 -2
- package/dist/index-BVaHwt5f.cjs +0 -1
- package/dist/index-BXZ5rAo2.cjs +0 -1
- package/dist/index-BmbAwtJ4.cjs +0 -15
- package/dist/index-BpPyaNFa.cjs +0 -1
- package/dist/index-BsnW2PbW.cjs +0 -1
- package/dist/index-BuZHI6xx.cjs +0 -115
- package/dist/index-CAcprKxu.cjs +0 -1
- package/dist/index-CI_-JPAM.cjs +0 -1
- package/dist/index-CMUsYepp.cjs +0 -18
- package/dist/index-CMYBCRbb.cjs +0 -1
- package/dist/index-CNQWedk2.cjs +0 -1
- package/dist/index-CPTra5LJ.cjs +0 -1
- package/dist/index-CWEUTGiD.cjs +0 -1
- package/dist/index-CfEN4VZm.cjs +0 -1
- package/dist/index-ClhL7VZf.cjs +0 -1
- package/dist/index-CnihUuSz.cjs +0 -1
- package/dist/index-CrixckXS.cjs +0 -1
- package/dist/index-CxzsJ99n.cjs +0 -1
- package/dist/index-D9F2Jtze.cjs +0 -1
- package/dist/index-DDdB29yy.cjs +0 -1
- package/dist/index-DKh4EyHV.cjs +0 -1
- package/dist/index-DPIg2S6M.cjs +0 -1
- package/dist/index-DXsGi7zj.cjs +0 -39
- package/dist/index-DeLmH_fB.cjs +0 -1
- package/dist/index-DkTHtURJ.cjs +0 -1
- package/dist/index-DmwxzDGW.cjs +0 -1
- package/dist/index-DoopASUC.cjs +0 -1
- package/dist/index-DwVrxTC1.cjs +0 -1
- package/dist/index-R8iX3F_2.cjs +0 -1
- package/dist/index-RUo1KNEz.cjs +0 -1
- package/dist/index-aYsnw0xY.cjs +0 -1
- package/dist/index-kWZiX5VW.cjs +0 -1
- package/dist/index-q9A2lsc4.cjs +0 -1
- package/dist/index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_07c75c98_lang-J7Knzs4U.cjs +0 -5677
- package/dist/isString-CGrvcmBw.cjs +0 -1
- package/dist/localIcon-DXgf3rK5.cjs +0 -1
- package/dist/main-Dju73RDx.cjs +0 -11
- package/dist/menuIndex-CBqMx085.cjs +0 -1
- package/dist/request-Dl8yi2iS.cjs +0 -11
- package/dist/ss-component.cjs +0 -1
- package/dist/ss-component2.cjs +0 -1
- package/dist/ss-component3.cjs +0 -1
- package/dist/svgIcon-CDPAgQbj.cjs +0 -1
- package/dist/threeModel-BM0x7hDF.cjs +0 -1
- package/dist/threePreview-C8lrHQgH.cjs +0 -1
- package/dist/threeSceneView-DWw1it0G.cjs +0 -5
- package/dist/threeSceneViewForCPMPIP-CpZHZ008.cjs +0 -5
- package/dist/threeTrackPathView-CWhbRVRP.cjs +0 -1
- package/dist/threeViewerHost-Bw5fsbCC.cjs +0 -1
- package/dist/urdfTree-DyyHQ8gM.cjs +0 -1
- package/dist/workpieceTreePanel-mOBEzvC-.cjs +0 -1
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";var Et="0123456789abcdefghijklmnopqrstuvwxyz";function A(r){return Et.charAt(r)}function Dt(r,t){return r&t}function Z(r,t){return r|t}function ut(r,t){return r^t}function at(r,t){return r&~t}function xt(r){if(r==0)return-1;var t=0;return(r&65535)==0&&(r>>=16,t+=16),(r&255)==0&&(r>>=8,t+=8),(r&15)==0&&(r>>=4,t+=4),(r&3)==0&&(r>>=2,t+=2),(r&1)==0&&++t,t}function Rt(r){for(var t=0;r!=0;)r&=r-1,++t;return t}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tt="=";function W(r){var t,e,i="";for(t=0;t+3<=r.length;t+=3)e=parseInt(r.substring(t,t+3),16),i+=_.charAt(e>>6)+_.charAt(e&63);for(t+1==r.length?(e=parseInt(r.substring(t,t+1),16),i+=_.charAt(e<<2)):t+2==r.length&&(e=parseInt(r.substring(t,t+2),16),i+=_.charAt(e>>2)+_.charAt((e&3)<<4));(i.length&3)>0;)i+=Tt;return i}function lt(r){var t="",e,i=0,n=0;for(e=0;e<r.length&&r.charAt(e)!=Tt;++e){var s=_.indexOf(r.charAt(e));s<0||(i==0?(t+=A(s>>2),n=s&3,i=1):i==1?(t+=A(n<<2|s>>4),n=s&15,i=2):i==2?(t+=A(n),t+=A(s>>2),n=s&3,i=3):(t+=A(n<<2|s>>4),t+=A(s&15),i=0))}return i==1&&(t+=A(n<<2)),t}var H,Bt={decode:function(r){var t;if(H===void 0){var e="0123456789ABCDEF",i=` \f
|
|
2
|
-
\r \u2028\u2029`;for(H={},t=0;t<16;++t)H[e.charAt(t)]=t;for(e=e.toLowerCase(),t=10;t<16;++t)H[e.charAt(t)]=t;for(t=0;t<i.length;++t)H[i.charAt(t)]=-1}var n=[],s=0,h=0;for(t=0;t<r.length;++t){var o=r.charAt(t);if(o=="=")break;if(o=H[o],o!=-1){if(o===void 0)throw new Error("Illegal character at offset "+t);s|=o,++h>=2?(n[n.length]=s,s=0,h=0):s<<=4}}if(h)throw new Error("Hex encoding incomplete: 4 bits missing");return n}},P,st={decode:function(r){var t;if(P===void 0){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=`= \f
|
|
3
|
-
\r \u2028\u2029`;for(P=Object.create(null),t=0;t<64;++t)P[e.charAt(t)]=t;for(P["-"]=62,P._=63,t=0;t<i.length;++t)P[i.charAt(t)]=-1}var n=[],s=0,h=0;for(t=0;t<r.length;++t){var o=r.charAt(t);if(o=="=")break;if(o=P[o],o!=-1){if(o===void 0)throw new Error("Illegal character at offset "+t);s|=o,++h>=4?(n[n.length]=s>>16,n[n.length]=s>>8&255,n[n.length]=s&255,s=0,h=0):s<<=6}}switch(h){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=s>>10;break;case 3:n[n.length]=s>>16,n[n.length]=s>>8&255;break}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(r){var t=st.re.exec(r);if(t)if(t[1])r=t[1];else if(t[2])r=t[2];else throw new Error("RegExp out of sync");return st.decode(r)}},C=1e13,j=function(){function r(t){this.buf=[+t||0]}return r.prototype.mulAdd=function(t,e){var i=this.buf,n=i.length,s,h;for(s=0;s<n;++s)h=i[s]*t+e,h<C?e=0:(e=0|h/C,h-=e*C),i[s]=h;e>0&&(i[s]=e)},r.prototype.sub=function(t){var e=this.buf,i=e.length,n,s;for(n=0;n<i;++n)s=e[n]-t,s<0?(s+=C,t=1):t=0,e[n]=s;for(;e[e.length-1]===0;)e.pop()},r.prototype.toString=function(t){if((t||10)!=10)throw new Error("only base 10 is supported");for(var e=this.buf,i=e[e.length-1].toString(),n=e.length-2;n>=0;--n)i+=(C+e[n]).toString().substring(1);return i},r.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;i>=0;--i)e=e*C+t[i];return e},r.prototype.simplify=function(){var t=this.buf;return t.length==1?t[0]:this},r}(),mt="…",At=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,Ot=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function F(r,t){return r.length>t&&(r=r.substring(0,t)+mt),r}var it=function(){function r(t,e){this.hexDigits="0123456789ABCDEF",t instanceof r?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=e)}return r.prototype.get=function(t){if(t===void 0&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(t):this.enc[t]},r.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(t&15)},r.prototype.hexDump=function(t,e,i){for(var n="",s=t;s<e;++s)if(n+=this.hexByte(this.get(s)),i!==!0)switch(s&15){case 7:n+=" ";break;case 15:n+=`
|
|
4
|
-
`;break;default:n+=" "}return n},r.prototype.isASCII=function(t,e){for(var i=t;i<e;++i){var n=this.get(i);if(n<32||n>176)return!1}return!0},r.prototype.parseStringISO=function(t,e){for(var i="",n=t;n<e;++n)i+=String.fromCharCode(this.get(n));return i},r.prototype.parseStringUTF=function(t,e){for(var i="",n=t;n<e;){var s=this.get(n++);s<128?i+=String.fromCharCode(s):s>191&&s<224?i+=String.fromCharCode((s&31)<<6|this.get(n++)&63):i+=String.fromCharCode((s&15)<<12|(this.get(n++)&63)<<6|this.get(n++)&63)}return i},r.prototype.parseStringBMP=function(t,e){for(var i="",n,s,h=t;h<e;)n=this.get(h++),s=this.get(h++),i+=String.fromCharCode(n<<8|s);return i},r.prototype.parseTime=function(t,e,i){var n=this.parseStringISO(t,e),s=(i?At:Ot).exec(n);return s?(i&&(s[1]=+s[1],s[1]+=+s[1]<70?2e3:1900),n=s[1]+"-"+s[2]+"-"+s[3]+" "+s[4],s[5]&&(n+=":"+s[5],s[6]&&(n+=":"+s[6],s[7]&&(n+="."+s[7]))),s[8]&&(n+=" UTC",s[8]!="Z"&&(n+=s[8],s[9]&&(n+=":"+s[9]))),n):"Unrecognized time: "+n},r.prototype.parseInteger=function(t,e){for(var i=this.get(t),n=i>127,s=n?255:0,h,o="";i==s&&++t<e;)i=this.get(t);if(h=e-t,h===0)return n?-1:0;if(h>4){for(o=i,h<<=3;((+o^s)&128)==0;)o=+o<<1,--h;o="("+h+` bit)
|
|
5
|
-
`}n&&(i=i-256);for(var f=new j(i),a=t+1;a<e;++a)f.mulAdd(256,this.get(a));return o+f.toString()},r.prototype.parseBitString=function(t,e,i){for(var n=this.get(t),s=(e-t-1<<3)-n,h="("+s+` bit)
|
|
6
|
-
`,o="",f=t+1;f<e;++f){for(var a=this.get(f),l=f==e-1?n:0,g=7;g>=l;--g)o+=a>>g&1?"1":"0";if(o.length>i)return h+F(o,i)}return h+o},r.prototype.parseOctetString=function(t,e,i){if(this.isASCII(t,e))return F(this.parseStringISO(t,e),i);var n=e-t,s="("+n+` byte)
|
|
7
|
-
`;i/=2,n>i&&(e=t+i);for(var h=t;h<e;++h)s+=this.hexByte(this.get(h));return n>i&&(s+=mt),s},r.prototype.parseOID=function(t,e,i){for(var n="",s=new j,h=0,o=t;o<e;++o){var f=this.get(o);if(s.mulAdd(128,f&127),h+=7,!(f&128)){if(n==="")if(s=s.simplify(),s instanceof j)s.sub(80),n="2."+s.toString();else{var a=s<80?s<40?0:1:2;n=a+"."+(s-a*40)}else n+="."+s.toString();if(n.length>i)return F(n,i);s=new j,h=0}}return h>0&&(n+=".incomplete"),n},r}(),Vt=function(){function r(t,e,i,n,s){if(!(n instanceof ct))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=i,this.tag=n,this.sub=s}return r.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},r.prototype.content=function(t){if(this.tag===void 0)return null;t===void 0&&(t=1/0);var e=this.posContent(),i=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);switch(this.tag.tagNumber){case 1:return this.stream.get(e)===0?"false":"true";case 2:return this.stream.parseInteger(e,e+i);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+i,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);case 6:return this.stream.parseOID(e,e+i,t);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return F(this.stream.parseStringUTF(e,e+i),t);case 18:case 19:case 20:case 21:case 22:case 26:return F(this.stream.parseStringISO(e,e+i),t);case 30:return F(this.stream.parseStringBMP(e,e+i),t);case 23:case 24:return this.stream.parseTime(e,e+i,this.tag.tagNumber==23)}return null},r.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},r.prototype.toPrettyString=function(t){t===void 0&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(e+=" (encapsulates)"),e+=`
|
|
8
|
-
`,this.sub!==null){t+=" ";for(var i=0,n=this.sub.length;i<n;++i)e+=this.sub[i].toPrettyString(t)}return e},r.prototype.posStart=function(){return this.stream.pos},r.prototype.posContent=function(){return this.stream.pos+this.header},r.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},r.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},r.decodeLength=function(t){var e=t.get(),i=e&127;if(i==e)return i;if(i>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(i===0)return null;e=0;for(var n=0;n<i;++n)e=e*256+t.get();return e},r.prototype.getHexStringValue=function(){var t=this.toHexString(),e=this.header*2,i=this.length*2;return t.substr(e,i)},r.decode=function(t){var e;t instanceof it?e=t:e=new it(t,0);var i=new it(e),n=new ct(e),s=r.decodeLength(e),h=e.pos,o=h-i.pos,f=null,a=function(){var g=[];if(s!==null){for(var d=h+s;e.pos<d;)g[g.length]=r.decode(e);if(e.pos!=d)throw new Error("Content size is not correct for container starting at offset "+h)}else try{for(;;){var y=r.decode(e);if(y.tag.isEOC())break;g[g.length]=y}s=h-e.pos}catch(T){throw new Error("Exception while decoding undefined length content: "+T)}return g};if(n.tagConstructed)f=a();else if(n.isUniversal()&&(n.tagNumber==3||n.tagNumber==4))try{if(n.tagNumber==3&&e.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");f=a();for(var l=0;l<f.length;++l)if(f[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{f=null}if(f===null){if(s===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+h);e.pos=h+Math.abs(s)}return new r(i,o,s,n,f)},r}(),ct=function(){function r(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=(e&32)!==0,this.tagNumber=e&31,this.tagNumber==31){var i=new j;do e=t.get(),i.mulAdd(128,e&127);while(e&128);this.tagNumber=i.simplify()}}return r.prototype.isUniversal=function(){return this.tagClass===0},r.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},r}(),I,It=0xdeadbeefcafe,pt=(It&16777215)==15715070,w=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Nt=(1<<26)/w[w.length-1],c=function(){function r(t,e,i){t!=null&&(typeof t=="number"?this.fromNumber(t,e,i):e==null&&typeof t!="string"?this.fromString(t,256):this.fromString(t,e))}return r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else return this.toRadix(t);var i=(1<<e)-1,n,s=!1,h="",o=this.t,f=this.DB-o*this.DB%e;if(o-- >0)for(f<this.DB&&(n=this[o]>>f)>0&&(s=!0,h=A(n));o>=0;)f<e?(n=(this[o]&(1<<f)-1)<<e-f,n|=this[--o]>>(f+=this.DB-e)):(n=this[o]>>(f-=e)&i,f<=0&&(f+=this.DB,--o)),n>0&&(s=!0),s&&(h+=A(n));return s?h:"0"},r.prototype.negate=function(){var t=p();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(e!=0)return e;var i=this.t;if(e=i-t.t,e!=0)return this.s<0?-e:e;for(;--i>=0;)if((e=this[i]-t[i])!=0)return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+G(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=p();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var i;return t<256||e.isEven()?i=new gt(e):i=new vt(e),this.exp(t,i)},r.prototype.clone=function(){var t=p();return this.copyTo(t),t},r.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},r.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},r.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i=this.DB-t*this.DB%8,n,s=0;if(t-- >0)for(i<this.DB&&(n=this[t]>>i)!=(this.s&this.DM)>>i&&(e[s++]=n|this.s<<this.DB-i);t>=0;)i<8?(n=(this[t]&(1<<i)-1)<<8-i,n|=this[--t]>>(i+=this.DB-8)):(n=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),(n&128)!=0&&(n|=-256),s==0&&(this.s&128)!=(n&128)&&++s,(s>0||n!=this.s)&&(e[s++]=n);return e},r.prototype.equals=function(t){return this.compareTo(t)==0},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=p();return this.bitwiseTo(t,Dt,e),e},r.prototype.or=function(t){var e=p();return this.bitwiseTo(t,Z,e),e},r.prototype.xor=function(t){var e=p();return this.bitwiseTo(t,ut,e),e},r.prototype.andNot=function(t){var e=p();return this.bitwiseTo(t,at,e),e},r.prototype.not=function(){for(var t=p(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},r.prototype.shiftLeft=function(t){var e=p();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},r.prototype.shiftRight=function(t){var e=p();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},r.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(this[t]!=0)return t*this.DB+xt(this[t]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=Rt(this[i]^e);return t},r.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?this.s!=0:(this[e]&1<<t%this.DB)!=0},r.prototype.setBit=function(t){return this.changeBit(t,Z)},r.prototype.clearBit=function(t){return this.changeBit(t,at)},r.prototype.flipBit=function(t){return this.changeBit(t,ut)},r.prototype.add=function(t){var e=p();return this.addTo(t,e),e},r.prototype.subtract=function(t){var e=p();return this.subTo(t,e),e},r.prototype.multiply=function(t){var e=p();return this.multiplyTo(t,e),e},r.prototype.divide=function(t){var e=p();return this.divRemTo(t,e,null),e},r.prototype.remainder=function(t){var e=p();return this.divRemTo(t,null,e),e},r.prototype.divideAndRemainder=function(t){var e=p(),i=p();return this.divRemTo(t,e,i),[e,i]},r.prototype.modPow=function(t,e){var i=t.bitLength(),n,s=O(1),h;if(i<=0)return s;i<18?n=1:i<48?n=3:i<144?n=4:i<768?n=5:n=6,i<8?h=new gt(e):e.isEven()?h=new Mt(e):h=new vt(e);var o=[],f=3,a=n-1,l=(1<<n)-1;if(o[1]=h.convert(this),n>1){var g=p();for(h.sqrTo(o[1],g);f<=l;)o[f]=p(),h.mulTo(g,o[f-2],o[f]),f+=2}var d=t.t-1,y,T=!0,b=p(),E;for(i=G(t[d])-1;d>=0;){for(i>=a?y=t[d]>>i-a&l:(y=(t[d]&(1<<i+1)-1)<<a-i,d>0&&(y|=t[d-1]>>this.DB+i-a)),f=n;(y&1)==0;)y>>=1,--f;if((i-=f)<0&&(i+=this.DB,--d),T)o[y].copyTo(s),T=!1;else{for(;f>1;)h.sqrTo(s,b),h.sqrTo(b,s),f-=2;f>0?h.sqrTo(s,b):(E=s,s=b,b=E),h.mulTo(b,o[y],s)}for(;d>=0&&(t[d]&1<<i)==0;)h.sqrTo(s,b),E=s,s=b,b=E,--i<0&&(i=this.DB-1,--d)}return h.revert(s)},r.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||t.signum()==0)return r.ZERO;for(var i=t.clone(),n=this.clone(),s=O(1),h=O(0),o=O(0),f=O(1);i.signum()!=0;){for(;i.isEven();)i.rShiftTo(1,i),e?((!s.isEven()||!h.isEven())&&(s.addTo(this,s),h.subTo(t,h)),s.rShiftTo(1,s)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);for(;n.isEven();)n.rShiftTo(1,n),e?((!o.isEven()||!f.isEven())&&(o.addTo(this,o),f.subTo(t,f)),o.rShiftTo(1,o)):f.isEven()||f.subTo(t,f),f.rShiftTo(1,f);i.compareTo(n)>=0?(i.subTo(n,i),e&&s.subTo(o,s),h.subTo(f,h)):(n.subTo(i,n),e&&o.subTo(s,o),f.subTo(h,f))}if(n.compareTo(r.ONE)!=0)return r.ZERO;if(f.compareTo(t)>=0)return f.subtract(t);if(f.signum()<0)f.addTo(t,f);else return f;return f.signum()<0?f.add(t):f},r.prototype.pow=function(t){return this.exp(t,new Pt)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var n=e;e=i,i=n}var s=e.getLowestSetBit(),h=i.getLowestSetBit();if(h<0)return e;for(s<h&&(h=s),h>0&&(e.rShiftTo(h,e),i.rShiftTo(h,i));e.signum()>0;)(s=e.getLowestSetBit())>0&&e.rShiftTo(s,e),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return h>0&&i.lShiftTo(h,i),i},r.prototype.isProbablePrime=function(t){var e,i=this.abs();if(i.t==1&&i[0]<=w[w.length-1]){for(e=0;e<w.length;++e)if(i[0]==w[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<w.length;){for(var n=w[e],s=e+1;s<w.length&&n<Nt;)n*=w[s++];for(n=i.modInt(n);e<s;)if(n%w[e++]==0)return!1}return i.millerRabin(t)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var i;if(e==16)i=4;else if(e==8)i=3;else if(e==256)i=8;else if(e==2)i=1;else if(e==32)i=5;else if(e==4)i=2;else{this.fromRadix(t,e);return}this.t=0,this.s=0;for(var n=t.length,s=!1,h=0;--n>=0;){var o=i==8?+t[n]&255:yt(t,n);if(o<0){t.charAt(n)=="-"&&(s=!0);continue}s=!1,h==0?this[this.t++]=o:h+i>this.DB?(this[this.t-1]|=(o&(1<<this.DB-h)-1)<<h,this[this.t++]=o>>this.DB-h):this[this.t-1]|=o<<h,h+=i,h>=this.DB&&(h-=this.DB)}i==8&&(+t[0]&128)!=0&&(this.s=-1,h>0&&(this[this.t-1]|=(1<<this.DB-h)-1<<h)),this.clamp(),s&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},r.prototype.lShiftTo=function(t,e){for(var i=t%this.DB,n=this.DB-i,s=(1<<n)-1,h=Math.floor(t/this.DB),o=this.s<<i&this.DM,f=this.t-1;f>=0;--f)e[f+h+1]=this[f]>>n|o,o=(this[f]&s)<<i;for(var f=h-1;f>=0;--f)e[f]=0;e[h]=o,e.t=this.t+h+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t){e.t=0;return}var n=t%this.DB,s=this.DB-n,h=(1<<n)-1;e[0]=this[i]>>n;for(var o=i+1;o<this.t;++o)e[o-i-1]|=(this[o]&h)<<s,e[o-i]=this[o]>>n;n>0&&(e[this.t-i-1]|=(this.s&h)<<s),e.t=this.t-i,e.clamp()},r.prototype.subTo=function(t,e){for(var i=0,n=0,s=Math.min(t.t,this.t);i<s;)n+=this[i]-t[i],e[i++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;i<this.t;)n+=this[i],e[i++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;i<t.t;)n-=t[i],e[i++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[i++]=this.DV+n:n>0&&(e[i++]=n),e.t=i,e.clamp()},r.prototype.multiplyTo=function(t,e){var i=this.abs(),n=t.abs(),s=i.t;for(e.t=s+n.t;--s>=0;)e[s]=0;for(s=0;s<n.t;++s)e[s+i.t]=i.am(0,n[s],e,s,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&r.ZERO.subTo(e,e)},r.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;--i>=0;)t[i]=0;for(i=0;i<e.t-1;++i){var n=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,n,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,i){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){e!=null&&e.fromInt(0),i!=null&&this.copyTo(i);return}i==null&&(i=p());var h=p(),o=this.s,f=t.s,a=this.DB-G(n[n.t-1]);a>0?(n.lShiftTo(a,h),s.lShiftTo(a,i)):(n.copyTo(h),s.copyTo(i));var l=h.t,g=h[l-1];if(g!=0){var d=g*(1<<this.F1)+(l>1?h[l-2]>>this.F2:0),y=this.FV/d,T=(1<<this.F1)/d,b=1<<this.F2,E=i.t,M=E-l,B=e??p();for(h.dlShiftTo(M,B),i.compareTo(B)>=0&&(i[i.t++]=1,i.subTo(B,i)),r.ONE.dlShiftTo(l,B),B.subTo(h,h);h.t<l;)h[h.t++]=0;for(;--M>=0;){var q=i[--E]==g?this.DM:Math.floor(i[E]*y+(i[E-1]+b)*T);if((i[E]+=h.am(0,q,i,M,0,l))<q)for(h.dlShiftTo(M,B),i.subTo(B,i);i[E]<--q;)i.subTo(B,i)}e!=null&&(i.drShiftTo(l,e),o!=f&&r.ZERO.subTo(e,e)),i.t=l,i.clamp(),a>0&&i.rShiftTo(a,i),o<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if((t&1)==0)return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e},r.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var i=p(),n=p(),s=e.convert(this),h=G(t)-1;for(s.copyTo(i);--h>=0;)if(e.sqrTo(i,n),(t&1<<h)>0)e.mulTo(n,s,i);else{var o=i;i=n,n=o}return e.revert(i)},r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(t==null&&(t=10),this.signum()==0||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),n=O(i),s=p(),h=p(),o="";for(this.divRemTo(n,s,h);s.signum()>0;)o=(i+h.intValue()).toString(t).substr(1)+o,s.divRemTo(n,s,h);return h.intValue().toString(t)+o},r.prototype.fromRadix=function(t,e){this.fromInt(0),e==null&&(e=10);for(var i=this.chunkSize(e),n=Math.pow(e,i),s=!1,h=0,o=0,f=0;f<t.length;++f){var a=yt(t,f);if(a<0){t.charAt(f)=="-"&&this.signum()==0&&(s=!0);continue}o=e*o+a,++h>=i&&(this.dMultiply(n),this.dAddOffset(o,0),h=0,o=0)}h>0&&(this.dMultiply(Math.pow(e,h)),this.dAddOffset(o,0)),s&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,i){if(typeof e=="number")if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),Z,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var n=[],s=t&7;n.length=(t>>3)+1,e.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}},r.prototype.bitwiseTo=function(t,e,i){var n,s,h=Math.min(t.t,this.t);for(n=0;n<h;++n)i[n]=e(this[n],t[n]);if(t.t<this.t){for(s=t.s&this.DM,n=h;n<this.t;++n)i[n]=e(this[n],s);i.t=this.t}else{for(s=this.s&this.DM,n=h;n<t.t;++n)i[n]=e(s,t[n]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},r.prototype.changeBit=function(t,e){var i=r.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},r.prototype.addTo=function(t,e){for(var i=0,n=0,s=Math.min(t.t,this.t);i<s;)n+=this[i]+t[i],e[i++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;i<this.t;)n+=this[i],e[i++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;i<t.t;)n+=t[i],e[i++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[i++]=n:n<-1&&(e[i++]=this.DV+n),e.t=i,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(t!=0){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,i){var n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(var s=i.t-this.t;n<s;++n)i[n+this.t]=this.am(0,t[n],i,n,0,this.t);for(var s=Math.min(t.t,e);n<s;++n)this.am(0,t[n],i,n,0,e-n);i.clamp()},r.prototype.multiplyUpperTo=function(t,e,i){--e;var n=i.t=this.t+t.t-e;for(i.s=0;--n>=0;)i[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)i[this.t+n-e]=this.am(e-n,t[n],i,0,0,this.t+n-e);i.clamp(),i.drShiftTo(1,i)},r.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(this.t>0)if(e==0)i=this[0]%t;else for(var n=this.t-1;n>=0;--n)i=(e*i+this[n])%t;return i},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var n=e.shiftRight(i);t=t+1>>1,t>w.length&&(t=w.length);for(var s=p(),h=0;h<t;++h){s.fromInt(w[Math.floor(Math.random()*w.length)]);var o=s.modPow(n,this);if(o.compareTo(r.ONE)!=0&&o.compareTo(e)!=0){for(var f=1;f++<i&&o.compareTo(e)!=0;)if(o=o.modPowInt(2,this),o.compareTo(r.ONE)==0)return!1;if(o.compareTo(e)!=0)return!1}}return!0},r.prototype.square=function(){var t=p();return this.squareTo(t),t},r.prototype.gcda=function(t,e){var i=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(i.compareTo(n)<0){var s=i;i=n,n=s}var h=i.getLowestSetBit(),o=n.getLowestSetBit();if(o<0){e(i);return}h<o&&(o=h),o>0&&(i.rShiftTo(o,i),n.rShiftTo(o,n));var f=function(){(h=i.getLowestSetBit())>0&&i.rShiftTo(h,i),(h=n.getLowestSetBit())>0&&n.rShiftTo(h,n),i.compareTo(n)>=0?(i.subTo(n,i),i.rShiftTo(1,i)):(n.subTo(i,n),n.rShiftTo(1,n)),i.signum()>0?setTimeout(f,0):(o>0&&n.lShiftTo(o,n),setTimeout(function(){e(n)},0))};setTimeout(f,10)},r.prototype.fromNumberAsync=function(t,e,i,n){if(typeof e=="number")if(t<2)this.fromInt(1);else{this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),Z,this),this.isEven()&&this.dAddOffset(1,0);var s=this,h=function(){s.dAddOffset(2,0),s.bitLength()>t&&s.subTo(r.ONE.shiftLeft(t-1),s),s.isProbablePrime(e)?setTimeout(function(){n()},0):setTimeout(h,0)};setTimeout(h,0)}else{var o=[],f=t&7;o.length=(t>>3)+1,e.nextBytes(o),f>0?o[0]&=(1<<f)-1:o[0]=0,this.fromString(o,256)}},r}(),Pt=function(){function r(){}return r.prototype.convert=function(t){return t},r.prototype.revert=function(t){return t},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},r.prototype.sqrTo=function(t,e){t.squareTo(e)},r}(),gt=function(){function r(t){this.m=t}return r.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},r.prototype.revert=function(t){return t},r.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}(),vt=function(){function r(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return r.prototype.convert=function(t){var e=p();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(c.ZERO)>0&&this.m.subTo(e,e),e},r.prototype.revert=function(t){var e=p();return t.copyTo(e),this.reduce(e),e},r.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=t[e]&32767,n=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(i=e+this.m.t,t[i]+=this.m.am(0,n,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}(),Mt=function(){function r(t){this.m=t,this.r2=p(),this.q3=p(),c.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return r.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=p();return t.copyTo(e),this.reduce(e),e},r.prototype.revert=function(t){return t},r.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}();function p(){return new c(null)}function S(r,t){return new c(r,t)}var dt=typeof navigator<"u";dt&&pt&&navigator.appName=="Microsoft Internet Explorer"?(c.prototype.am=function(t,e,i,n,s,h){for(var o=e&32767,f=e>>15;--h>=0;){var a=this[t]&32767,l=this[t++]>>15,g=f*a+l*o;a=o*a+((g&32767)<<15)+i[n]+(s&1073741823),s=(a>>>30)+(g>>>15)+f*l+(s>>>30),i[n++]=a&1073741823}return s},I=30):dt&&pt&&navigator.appName!="Netscape"?(c.prototype.am=function(t,e,i,n,s,h){for(;--h>=0;){var o=e*this[t++]+i[n]+s;s=Math.floor(o/67108864),i[n++]=o&67108863}return s},I=26):(c.prototype.am=function(t,e,i,n,s,h){for(var o=e&16383,f=e>>14;--h>=0;){var a=this[t]&16383,l=this[t++]>>14,g=f*a+l*o;a=o*a+((g&16383)<<14)+i[n]+s,s=(a>>28)+(g>>14)+f*l,i[n++]=a&268435455}return s},I=28);c.prototype.DB=I;c.prototype.DM=(1<<I)-1;c.prototype.DV=1<<I;var ht=52;c.prototype.FV=Math.pow(2,ht);c.prototype.F1=ht-I;c.prototype.F2=2*I-ht;var tt=[],L,D;L=48;for(D=0;D<=9;++D)tt[L++]=D;L=97;for(D=10;D<36;++D)tt[L++]=D;L=65;for(D=10;D<36;++D)tt[L++]=D;function yt(r,t){var e=tt[r.charCodeAt(t)];return e??-1}function O(r){var t=p();return t.fromInt(r),t}function G(r){var t=1,e;return(e=r>>>16)!=0&&(r=e,t+=16),(e=r>>8)!=0&&(r=e,t+=8),(e=r>>4)!=0&&(r=e,t+=4),(e=r>>2)!=0&&(r=e,t+=2),(e=r>>1)!=0&&(r=e,t+=1),t}c.ZERO=O(0);c.ONE=O(1);var qt=function(){function r(){this.i=0,this.j=0,this.S=[]}return r.prototype.init=function(t){var e,i,n;for(e=0;e<256;++e)this.S[e]=e;for(i=0,e=0;e<256;++e)i=i+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[i],this.S[i]=n;this.i=0,this.j=0},r.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},r}();function Ht(){return new qt}var bt=256,$,V=null,R;if(V==null){V=[],R=0;var J=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var rt=new Uint32Array(256);for(window.crypto.getRandomValues(rt),J=0;J<rt.length;++J)V[R++]=rt[J]&255}var Y=0,X=function(r){if(Y=Y||0,Y>=256||R>=bt){window.removeEventListener?window.removeEventListener("mousemove",X,!1):window.detachEvent&&window.detachEvent("onmousemove",X);return}try{var t=r.x+r.y;V[R++]=t&255,Y+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",X,!1):window.attachEvent&&window.attachEvent("onmousemove",X))}function Ct(){if($==null){for($=Ht();R<bt;){var r=Math.floor(65536*Math.random());V[R++]=r&255}for($.init(V),R=0;R<V.length;++R)V[R]=0;R=0}return $.next()}var ot=function(){function r(){}return r.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Ct()},r}();function _t(r,t){if(t<r.length+22)return console.error("Message too long for RSA"),null;for(var e=t-r.length-6,i="",n=0;n<e;n+=2)i+="ff";var s="0001"+i+"00"+r;return S(s,16)}function Ft(r,t){if(t<r.length+11)return console.error("Message too long for RSA"),null;for(var e=[],i=r.length-1;i>=0&&t>0;){var n=r.charCodeAt(i--);n<128?e[--t]=n:n>127&&n<2048?(e[--t]=n&63|128,e[--t]=n>>6|192):(e[--t]=n&63|128,e[--t]=n>>6&63|128,e[--t]=n>>12|224)}e[--t]=0;for(var s=new ot,h=[];t>2;){for(h[0]=0;h[0]==0;)s.nextBytes(h);e[--t]=h[0]}return e[--t]=2,e[--t]=0,new c(e)}var Lt=function(){function r(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return r.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},r.prototype.doPrivate=function(t){if(this.p==null||this.q==null)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(i)<0;)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)},r.prototype.setPublic=function(t,e){t!=null&&e!=null&&t.length>0&&e.length>0?(this.n=S(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},r.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,i=Ft(t,e);if(i==null)return null;var n=this.doPublic(i);if(n==null)return null;for(var s=n.toString(16),h=s.length,o=0;o<e*2-h;o++)s="0"+s;return s},r.prototype.setPrivate=function(t,e,i){t!=null&&e!=null&&t.length>0&&e.length>0?(this.n=S(t,16),this.e=parseInt(e,16),this.d=S(i,16)):console.error("Invalid RSA private key")},r.prototype.setPrivateEx=function(t,e,i,n,s,h,o,f){t!=null&&e!=null&&t.length>0&&e.length>0?(this.n=S(t,16),this.e=parseInt(e,16),this.d=S(i,16),this.p=S(n,16),this.q=S(s,16),this.dmp1=S(h,16),this.dmq1=S(o,16),this.coeff=S(f,16)):console.error("Invalid RSA private key")},r.prototype.generate=function(t,e){var i=new ot,n=t>>1;this.e=parseInt(e,16);for(var s=new c(e,16);;){for(;this.p=new c(t-n,1,i),!(this.p.subtract(c.ONE).gcd(s).compareTo(c.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new c(n,1,i),!(this.q.subtract(c.ONE).gcd(s).compareTo(c.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var h=this.p;this.p=this.q,this.q=h}var o=this.p.subtract(c.ONE),f=this.q.subtract(c.ONE),a=o.multiply(f);if(a.gcd(s).compareTo(c.ONE)==0){this.n=this.p.multiply(this.q),this.d=s.modInverse(a),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(f),this.coeff=this.q.modInverse(this.p);break}}},r.prototype.decrypt=function(t){var e=S(t,16),i=this.doPrivate(e);return i==null?null:Kt(i,this.n.bitLength()+7>>3)},r.prototype.generateAsync=function(t,e,i){var n=new ot,s=t>>1;this.e=parseInt(e,16);var h=new c(e,16),o=this,f=function(){var a=function(){if(o.p.compareTo(o.q)<=0){var d=o.p;o.p=o.q,o.q=d}var y=o.p.subtract(c.ONE),T=o.q.subtract(c.ONE),b=y.multiply(T);b.gcd(h).compareTo(c.ONE)==0?(o.n=o.p.multiply(o.q),o.d=h.modInverse(b),o.dmp1=o.d.mod(y),o.dmq1=o.d.mod(T),o.coeff=o.q.modInverse(o.p),setTimeout(function(){i()},0)):setTimeout(f,0)},l=function(){o.q=p(),o.q.fromNumberAsync(s,1,n,function(){o.q.subtract(c.ONE).gcda(h,function(d){d.compareTo(c.ONE)==0&&o.q.isProbablePrime(10)?setTimeout(a,0):setTimeout(l,0)})})},g=function(){o.p=p(),o.p.fromNumberAsync(t-s,1,n,function(){o.p.subtract(c.ONE).gcda(h,function(d){d.compareTo(c.ONE)==0&&o.p.isProbablePrime(10)?setTimeout(l,0):setTimeout(g,0)})})};setTimeout(g,0)};setTimeout(f,0)},r.prototype.sign=function(t,e,i){var n=Ut(i),s=n+e(t).toString(),h=_t(s,this.n.bitLength()/4);if(h==null)return null;var o=this.doPrivate(h);if(o==null)return null;var f=o.toString(16);return(f.length&1)==0?f:"0"+f},r.prototype.verify=function(t,e,i){var n=S(e,16),s=this.doPublic(n);if(s==null)return null;var h=s.toString(16).replace(/^1f+00/,""),o=jt(h);return o==i(t).toString()},r}();function Kt(r,t){for(var e=r.toByteArray(),i=0;i<e.length&&e[i]==0;)++i;if(e.length-i!=t-1||e[i]!=2)return null;for(++i;e[i]!=0;)if(++i>=e.length)return null;for(var n="";++i<e.length;){var s=e[i]&255;s<128?n+=String.fromCharCode(s):s>191&&s<224?(n+=String.fromCharCode((s&31)<<6|e[i+1]&63),++i):(n+=String.fromCharCode((s&15)<<12|(e[i+1]&63)<<6|e[i+2]&63),i+=2)}return n}var Q={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function Ut(r){return Q[r]||""}function jt(r){for(var t in Q)if(Q.hasOwnProperty(t)){var e=Q[t],i=e.length;if(r.substr(0,i)==e)return r.substr(i)}return r}/*!
|
|
9
|
-
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
10
|
-
Code licensed under the BSD License:
|
|
11
|
-
http://developer.yahoo.com/yui/license.html
|
|
12
|
-
version: 2.9.0
|
|
13
|
-
*/var m={};m.lang={extend:function(r,t,e){if(!t||!r)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=t.prototype,r.prototype=new i,r.prototype.constructor=r,r.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),e){var n;for(n in e)r.prototype[n]=e[n];var s=function(){},h=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(s=function(o,f){for(n=0;n<h.length;n=n+1){var a=h[n],l=f[a];typeof l=="function"&&l!=Object.prototype[a]&&(o[a]=l)}})}catch{}s(r.prototype,e)}}};/**
|
|
14
|
-
* @fileOverview
|
|
15
|
-
* @name asn1-1.0.js
|
|
16
|
-
* @author Kenji Urushima kenji.urushima@gmail.com
|
|
17
|
-
* @version asn1 1.0.13 (2017-Jun-02)
|
|
18
|
-
* @since jsrsasign 2.1
|
|
19
|
-
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
20
|
-
*/var u={};(typeof u.asn1>"u"||!u.asn1)&&(u.asn1={});u.asn1.ASN1Util=new function(){this.integerToByteHex=function(r){var t=r.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(r){var t=r.toString(16);if(t.substr(0,1)!="-")t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var e=t.substr(1),i=e.length;i%2==1?i+=1:t.match(/^[0-7]/)||(i+=2);for(var n="",s=0;s<i;s++)n+="f";var h=new c(n,16),o=h.xor(r).add(c.ONE);t=o.toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(r,t){return hextopem(r,t)},this.newObject=function(r){var t=u,e=t.asn1,i=e.DERBoolean,n=e.DERInteger,s=e.DERBitString,h=e.DEROctetString,o=e.DERNull,f=e.DERObjectIdentifier,a=e.DEREnumerated,l=e.DERUTF8String,g=e.DERNumericString,d=e.DERPrintableString,y=e.DERTeletexString,T=e.DERIA5String,b=e.DERUTCTime,E=e.DERGeneralizedTime,M=e.DERSequence,B=e.DERSet,q=e.DERTaggedObject,k=e.ASN1Util.newObject,ft=Object.keys(r);if(ft.length!=1)throw"key of param shall be only one.";var v=ft[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+v+":")==-1)throw"undefined key: "+v;if(v=="bool")return new i(r[v]);if(v=="int")return new n(r[v]);if(v=="bitstr")return new s(r[v]);if(v=="octstr")return new h(r[v]);if(v=="null")return new o(r[v]);if(v=="oid")return new f(r[v]);if(v=="enum")return new a(r[v]);if(v=="utf8str")return new l(r[v]);if(v=="numstr")return new g(r[v]);if(v=="prnstr")return new d(r[v]);if(v=="telstr")return new y(r[v]);if(v=="ia5str")return new T(r[v]);if(v=="utctime")return new b(r[v]);if(v=="gentime")return new E(r[v]);if(v=="seq"){for(var K=r[v],U=[],N=0;N<K.length;N++){var et=k(K[N]);U.push(et)}return new M({array:U})}if(v=="set"){for(var K=r[v],U=[],N=0;N<K.length;N++){var et=k(K[N]);U.push(et)}return new B({array:U})}if(v=="tag"){var x=r[v];if(Object.prototype.toString.call(x)==="[object Array]"&&x.length==3){var wt=k(x[2]);return new q({tag:x[0],explicit:x[1],obj:wt})}else{var z={};if(x.explicit!==void 0&&(z.explicit=x.explicit),x.tag!==void 0&&(z.tag=x.tag),x.obj===void 0)throw"obj shall be specified for 'tag'.";return z.obj=k(x.obj),new q(z)}}},this.jsonToASN1HEX=function(r){var t=this.newObject(r);return t.getEncodedHex()}};u.asn1.ASN1Util.oidHexToInt=function(r){for(var n="",t=parseInt(r.substr(0,2),16),e=Math.floor(t/40),i=t%40,n=e+"."+i,s="",h=2;h<r.length;h+=2){var o=parseInt(r.substr(h,2),16),f=("00000000"+o.toString(2)).slice(-8);if(s=s+f.substr(1,7),f.substr(0,1)=="0"){var a=new c(s,2);n=n+"."+a.toString(10),s=""}}return n};u.asn1.ASN1Util.oidIntToHex=function(r){var t=function(o){var f=o.toString(16);return f.length==1&&(f="0"+f),f},e=function(o){var f="",a=new c(o,10),l=a.toString(2),g=7-l.length%7;g==7&&(g=0);for(var d="",y=0;y<g;y++)d+="0";l=d+l;for(var y=0;y<l.length-1;y+=7){var T=l.substr(y,7);y!=l.length-7&&(T="1"+T),f+=t(parseInt(T,2))}return f};if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var i="",n=r.split("."),s=parseInt(n[0])*40+parseInt(n[1]);i+=t(s),n.splice(0,2);for(var h=0;h<n.length;h++)i+=e(n[h]);return i};u.asn1.ASN1Object=function(){var r="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+r.length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var i=e.length/2;if(i>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);var n=128+i;return n.toString(16)+e},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};u.asn1.DERAbstractString=function(r){u.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},typeof r<"u"&&(typeof r=="string"?this.setString(r):typeof r.str<"u"?this.setString(r.str):typeof r.hex<"u"&&this.setStringHex(r.hex))};m.lang.extend(u.asn1.DERAbstractString,u.asn1.ASN1Object);u.asn1.DERAbstractTime=function(r){u.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){utc=t.getTime()+t.getTimezoneOffset()*6e4;var e=new Date(utc);return e},this.formatDate=function(t,e,i){var n=this.zeroPadding,s=this.localDateToUTC(t),h=String(s.getFullYear());e=="utc"&&(h=h.substr(2,2));var o=n(String(s.getMonth()+1),2),f=n(String(s.getDate()),2),a=n(String(s.getHours()),2),l=n(String(s.getMinutes()),2),g=n(String(s.getSeconds()),2),d=h+o+f+a+l+g;if(i===!0){var y=s.getMilliseconds();if(y!=0){var T=n(String(y),3);T=T.replace(/[0]+$/,""),d=d+"."+T}}return d+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,i,n,s,h){var o=new Date(Date.UTC(t,e-1,i,n,s,h,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}};m.lang.extend(u.asn1.DERAbstractTime,u.asn1.ASN1Object);u.asn1.DERAbstractStructured=function(r){u.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,typeof r<"u"&&typeof r.array<"u"&&(this.asn1Array=r.array)};m.lang.extend(u.asn1.DERAbstractStructured,u.asn1.ASN1Object);u.asn1.DERBoolean=function(){u.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};m.lang.extend(u.asn1.DERBoolean,u.asn1.ASN1Object);u.asn1.DERInteger=function(r){u.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=u.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new c(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},typeof r<"u"&&(typeof r.bigint<"u"?this.setByBigInteger(r.bigint):typeof r.int<"u"?this.setByInteger(r.int):typeof r=="number"?this.setByInteger(r):typeof r.hex<"u"&&this.setValueHex(r.hex))};m.lang.extend(u.asn1.DERInteger,u.asn1.ASN1Object);u.asn1.DERBitString=function(r){if(r!==void 0&&typeof r.obj<"u"){var t=u.asn1.ASN1Util.newObject(r.obj);r.hex="00"+t.getEncodedHex()}u.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,i){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+i},this.setByBinaryString=function(e){e=e.replace(/0+$/,"");var i=8-e.length%8;i==8&&(i=0);for(var n=0;n<=i;n++)e+="0";for(var s="",n=0;n<e.length-1;n+=8){var h=e.substr(n,8),o=parseInt(h,2).toString(16);o.length==1&&(o="0"+o),s+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+i+s},this.setByBooleanArray=function(e){for(var i="",n=0;n<e.length;n++)e[n]==!0?i+="1":i+="0";this.setByBinaryString(i)},this.newFalseArray=function(e){for(var i=new Array(e),n=0;n<e;n++)i[n]=!1;return i},this.getFreshValueHex=function(){return this.hV},typeof r<"u"&&(typeof r=="string"&&r.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(r):typeof r.hex<"u"?this.setHexValueIncludingUnusedBits(r.hex):typeof r.bin<"u"?this.setByBinaryString(r.bin):typeof r.array<"u"&&this.setByBooleanArray(r.array))};m.lang.extend(u.asn1.DERBitString,u.asn1.ASN1Object);u.asn1.DEROctetString=function(r){if(r!==void 0&&typeof r.obj<"u"){var t=u.asn1.ASN1Util.newObject(r.obj);r.hex=t.getEncodedHex()}u.asn1.DEROctetString.superclass.constructor.call(this,r),this.hT="04"};m.lang.extend(u.asn1.DEROctetString,u.asn1.DERAbstractString);u.asn1.DERNull=function(){u.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};m.lang.extend(u.asn1.DERNull,u.asn1.ASN1Object);u.asn1.DERObjectIdentifier=function(r){var t=function(i){var n=i.toString(16);return n.length==1&&(n="0"+n),n},e=function(i){var n="",s=new c(i,10),h=s.toString(2),o=7-h.length%7;o==7&&(o=0);for(var f="",a=0;a<o;a++)f+="0";h=f+h;for(var a=0;a<h.length-1;a+=7){var l=h.substr(a,7);a!=h.length-7&&(l="1"+l),n+=t(parseInt(l,2))}return n};u.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(i){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueOidString=function(i){if(!i.match(/^[0-9.]+$/))throw"malformed oid string: "+i;var n="",s=i.split("."),h=parseInt(s[0])*40+parseInt(s[1]);n+=t(h),s.splice(0,2);for(var o=0;o<s.length;o++)n+=e(s[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueName=function(i){var n=u.asn1.x509.OID.name2oid(i);if(n!=="")this.setValueOidString(n);else throw"DERObjectIdentifier oidName undefined: "+i},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(typeof r=="string"?r.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(r):this.setValueName(r):r.oid!==void 0?this.setValueOidString(r.oid):r.hex!==void 0?this.setValueHex(r.hex):r.name!==void 0&&this.setValueName(r.name))};m.lang.extend(u.asn1.DERObjectIdentifier,u.asn1.ASN1Object);u.asn1.DEREnumerated=function(r){u.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=u.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new c(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},typeof r<"u"&&(typeof r.int<"u"?this.setByInteger(r.int):typeof r=="number"?this.setByInteger(r):typeof r.hex<"u"&&this.setValueHex(r.hex))};m.lang.extend(u.asn1.DEREnumerated,u.asn1.ASN1Object);u.asn1.DERUTF8String=function(r){u.asn1.DERUTF8String.superclass.constructor.call(this,r),this.hT="0c"};m.lang.extend(u.asn1.DERUTF8String,u.asn1.DERAbstractString);u.asn1.DERNumericString=function(r){u.asn1.DERNumericString.superclass.constructor.call(this,r),this.hT="12"};m.lang.extend(u.asn1.DERNumericString,u.asn1.DERAbstractString);u.asn1.DERPrintableString=function(r){u.asn1.DERPrintableString.superclass.constructor.call(this,r),this.hT="13"};m.lang.extend(u.asn1.DERPrintableString,u.asn1.DERAbstractString);u.asn1.DERTeletexString=function(r){u.asn1.DERTeletexString.superclass.constructor.call(this,r),this.hT="14"};m.lang.extend(u.asn1.DERTeletexString,u.asn1.DERAbstractString);u.asn1.DERIA5String=function(r){u.asn1.DERIA5String.superclass.constructor.call(this,r),this.hT="16"};m.lang.extend(u.asn1.DERIA5String,u.asn1.DERAbstractString);u.asn1.DERUTCTime=function(r){u.asn1.DERUTCTime.superclass.constructor.call(this,r),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},r!==void 0&&(r.str!==void 0?this.setString(r.str):typeof r=="string"&&r.match(/^[0-9]{12}Z$/)?this.setString(r):r.hex!==void 0?this.setStringHex(r.hex):r.date!==void 0&&this.setByDate(r.date))};m.lang.extend(u.asn1.DERUTCTime,u.asn1.DERAbstractTime);u.asn1.DERGeneralizedTime=function(r){u.asn1.DERGeneralizedTime.superclass.constructor.call(this,r),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},r!==void 0&&(r.str!==void 0?this.setString(r.str):typeof r=="string"&&r.match(/^[0-9]{14}Z$/)?this.setString(r):r.hex!==void 0?this.setStringHex(r.hex):r.date!==void 0&&this.setByDate(r.date),r.millis===!0&&(this.withMillis=!0))};m.lang.extend(u.asn1.DERGeneralizedTime,u.asn1.DERAbstractTime);u.asn1.DERSequence=function(r){u.asn1.DERSequence.superclass.constructor.call(this,r),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){var i=this.asn1Array[e];t+=i.getEncodedHex()}return this.hV=t,this.hV}};m.lang.extend(u.asn1.DERSequence,u.asn1.DERAbstractStructured);u.asn1.DERSet=function(r){u.asn1.DERSet.superclass.constructor.call(this,r),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var i=this.asn1Array[e];t.push(i.getEncodedHex())}return this.sortFlag==!0&&t.sort(),this.hV=t.join(""),this.hV},typeof r<"u"&&typeof r.sortflag<"u"&&r.sortflag==!1&&(this.sortFlag=!1)};m.lang.extend(u.asn1.DERSet,u.asn1.DERAbstractStructured);u.asn1.DERTaggedObject=function(r){u.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,i){this.hT=e,this.isExplicit=t,this.asn1Object=i,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=i.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof r<"u"&&(typeof r.tag<"u"&&(this.hT=r.tag),typeof r.explicit<"u"&&(this.isExplicit=r.explicit),typeof r.obj<"u"&&(this.asn1Object=r.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))};m.lang.extend(u.asn1.DERTaggedObject,u.asn1.ASN1Object);var kt=function(){var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");r(t,e);function i(){this.constructor=t}t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),St=function(r){kt(t,r);function t(e){var i=r.call(this)||this;return e&&(typeof e=="string"?i.parseKey(e):(t.hasPrivateKeyProperty(e)||t.hasPublicKeyProperty(e))&&i.parsePropertiesFrom(e)),i}return t.prototype.parseKey=function(e){try{var i=0,n=0,s=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,h=s.test(e)?Bt.decode(e):st.unarmor(e),o=Vt.decode(h);if(o.sub.length===3&&(o=o.sub[2].sub[0]),o.sub.length===9){i=o.sub[1].getHexStringValue(),this.n=S(i,16),n=o.sub[2].getHexStringValue(),this.e=parseInt(n,16);var f=o.sub[3].getHexStringValue();this.d=S(f,16);var a=o.sub[4].getHexStringValue();this.p=S(a,16);var l=o.sub[5].getHexStringValue();this.q=S(l,16);var g=o.sub[6].getHexStringValue();this.dmp1=S(g,16);var d=o.sub[7].getHexStringValue();this.dmq1=S(d,16);var y=o.sub[8].getHexStringValue();this.coeff=S(y,16)}else if(o.sub.length===2)if(o.sub[0].sub){var T=o.sub[1],b=T.sub[0];i=b.sub[0].getHexStringValue(),this.n=S(i,16),n=b.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else i=o.sub[0].getHexStringValue(),this.n=S(i,16),n=o.sub[1].getHexStringValue(),this.e=parseInt(n,16);else return!1;return!0}catch{return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new u.asn1.DERInteger({int:0}),new u.asn1.DERInteger({bigint:this.n}),new u.asn1.DERInteger({int:this.e}),new u.asn1.DERInteger({bigint:this.d}),new u.asn1.DERInteger({bigint:this.p}),new u.asn1.DERInteger({bigint:this.q}),new u.asn1.DERInteger({bigint:this.dmp1}),new u.asn1.DERInteger({bigint:this.dmq1}),new u.asn1.DERInteger({bigint:this.coeff})]},i=new u.asn1.DERSequence(e);return i.getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return W(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new u.asn1.DERSequence({array:[new u.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new u.asn1.DERNull]}),i=new u.asn1.DERSequence({array:[new u.asn1.DERInteger({bigint:this.n}),new u.asn1.DERInteger({int:this.e})]}),n=new u.asn1.DERBitString({hex:"00"+i.getEncodedHex()}),s=new u.asn1.DERSequence({array:[e,n]});return s.getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return W(this.getPublicBaseKey())},t.wordwrap=function(e,i){if(i=i||64,!e)return e;var n="(.{1,"+i+`})( +|$
|
|
21
|
-
?)|(.{1,`+i+"})";return e.match(RegExp(n,"g")).join(`
|
|
22
|
-
`)},t.prototype.getPrivateKey=function(){var e=`-----BEGIN RSA PRIVATE KEY-----
|
|
23
|
-
`;return e+=t.wordwrap(this.getPrivateBaseKeyB64())+`
|
|
24
|
-
`,e+="-----END RSA PRIVATE KEY-----",e},t.prototype.getPublicKey=function(){var e=`-----BEGIN PUBLIC KEY-----
|
|
25
|
-
`;return e+=t.wordwrap(this.getPublicBaseKeyB64())+`
|
|
26
|
-
`,e+="-----END PUBLIC KEY-----",e},t.hasPublicKeyProperty=function(e){return e=e||{},e.hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return e=e||{},e.hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(Lt),nt,zt=typeof process<"u"?(nt=process.env)===null||nt===void 0?void 0:nt.npm_package_version:void 0,Zt=function(){function r(t){t===void 0&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return r.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new St(t)},r.prototype.setPrivateKey=function(t){this.setKey(t)},r.prototype.setPublicKey=function(t){this.setKey(t)},r.prototype.decrypt=function(t){try{return this.getKey().decrypt(lt(t))}catch{return!1}},r.prototype.encrypt=function(t){try{return W(this.getKey().encrypt(t))}catch{return!1}},r.prototype.sign=function(t,e,i){try{return W(this.getKey().sign(t,e,i))}catch{return!1}},r.prototype.verify=function(t,e,i){try{return this.getKey().verify(t,lt(e),i)}catch{return!1}},r.prototype.getKey=function(t){if(!this.key){if(this.key=new St,t&&{}.toString.call(t)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},r.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},r.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},r.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},r.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},r.version=zt,r}();exports.JSEncrypt=Zt;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-J7Knzs4U.cjs");class H extends o.Loader{constructor(t){super(t)}load(t,s,i,e){const r=this,u=new o.FileLoader(this.manager);u.setPath(this.path),u.setResponseType("arraybuffer"),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){try{s(r.parse(h))}catch(c){e?e(c):console.error(c),r.manager.itemError(t)}},i,e)}parse(t){function s(n){const a=new DataView(n),l=32/8*3+32/8*3*3+16/8,f=a.getUint32(80,!0);if(80+32/8+f*l===a.byteLength)return!0;const g=[115,111,108,105,100];for(let p=0;p<5;p++)if(i(g,a,p))return!1;return!0}function i(n,a,l){for(let f=0,m=n.length;f<m;f++)if(n[f]!==a.getUint8(l+f))return!1;return!0}function e(n){const a=new DataView(n),l=a.getUint32(80,!0);let f,m,g,p=!1,b,x,w,j,F;for(let v=0;v<70;v++)a.getUint32(v,!1)==1129270351&&a.getUint8(v+4)==82&&a.getUint8(v+5)==61&&(p=!0,b=new Float32Array(l*3*3),x=a.getUint8(v+6)/255,w=a.getUint8(v+7)/255,j=a.getUint8(v+8)/255,F=a.getUint8(v+9)/255);const M=84,d=12*4+2,y=new o.BufferGeometry,A=new Float32Array(l*3*3),V=new Float32Array(l*3*3),S=new o.Color;for(let v=0;v<l;v++){const k=M+v*d,O=a.getFloat32(k,!0),U=a.getFloat32(k+4,!0),P=a.getFloat32(k+8,!0);if(p){const L=a.getUint16(k+48,!0);(L&32768)===0?(f=(L&31)/31,m=(L>>5&31)/31,g=(L>>10&31)/31):(f=x,m=w,g=j)}for(let L=1;L<=3;L++){const R=k+L*12,_=v*3*3+(L-1)*3;A[_]=a.getFloat32(R,!0),A[_+1]=a.getFloat32(R+4,!0),A[_+2]=a.getFloat32(R+8,!0),V[_]=O,V[_+1]=U,V[_+2]=P,p&&(S.setRGB(f,m,g,o.SRGBColorSpace),b[_]=S.r,b[_+1]=S.g,b[_+2]=S.b)}}return y.setAttribute("position",new o.BufferAttribute(A,3)),y.setAttribute("normal",new o.BufferAttribute(V,3)),p&&(y.setAttribute("color",new o.BufferAttribute(b,3)),y.hasColors=!0,y.alpha=F),y}function r(n){const a=new o.BufferGeometry,l=/solid([\s\S]*?)endsolid/g,f=/facet([\s\S]*?)endfacet/g,m=/solid\s(.+)/;let g=0;const p=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,b=new RegExp("vertex"+p+p+p,"g"),x=new RegExp("normal"+p+p+p,"g"),w=[],j=[],F=[],M=new o.Vector3;let d,y=0,A=0,V=0;for(;(d=l.exec(n))!==null;){A=V;const S=d[0],v=(d=m.exec(S))!==null?d[1]:"";for(F.push(v);(d=f.exec(S))!==null;){let U=0,P=0;const L=d[0];for(;(d=x.exec(L))!==null;)M.x=parseFloat(d[1]),M.y=parseFloat(d[2]),M.z=parseFloat(d[3]),P++;for(;(d=b.exec(L))!==null;)w.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),j.push(M.x,M.y,M.z),U++,V++;P!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),U!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const k=A,O=V-A;a.userData.groupNames=F,a.addGroup(k,O,y),y++}return a.setAttribute("position",new o.Float32BufferAttribute(w,3)),a.setAttribute("normal",new o.Float32BufferAttribute(j,3)),a}function u(n){return typeof n!="string"?new TextDecoder().decode(n):n}function h(n){if(typeof n=="string"){const a=new Uint8Array(n.length);for(let l=0;l<n.length;l++)a[l]=n.charCodeAt(l)&255;return a.buffer||a}else return n}const c=h(t);return s(c)?e(c):r(u(t))}}const N=/^[og]\s*(.+)?/,W=/^mtllib /,q=/^usemtl /,J=/^usemap /,G=/\s+/,T=new o.Vector3,z=new o.Vector3,D=new o.Vector3,E=new o.Vector3,C=new o.Vector3,I=new o.Color;function Z(){const B={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,s){if(this.object&&this.object.fromDeclaration===!1){this.object.name=t,this.object.fromDeclaration=s!==!1;return}const i=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:s!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,r){const u=this._finalize(!1);u&&(u.inherited||u.groupCount<=0)&&this.materials.splice(u.index,1);const h={index:this.materials.length,name:e||"",mtllib:Array.isArray(r)&&r.length>0?r[r.length-1]:"",smooth:u!==void 0?u.smooth:this.smooth,groupStart:u!==void 0?u.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(c){const n={index:typeof c=="number"?c:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return n.clone=this.clone.bind(n),n}};return this.materials.push(h),h},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const r=this.currentMaterial();if(r&&r.groupEnd===-1&&(r.groupEnd=this.geometry.vertices.length/3,r.groupCount=r.groupEnd-r.groupStart,r.inherited=!1),e&&this.materials.length>1)for(let u=this.materials.length-1;u>=0;u--)this.materials[u].groupCount<=0&&this.materials.splice(u,1);return e&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),r}},i&&i.name&&typeof i.clone=="function"){const e=i.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseNormalIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseUVIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/2)*2},addVertex:function(t,s,i){const e=this.vertices,r=this.object.geometry.vertices;r.push(e[t+0],e[t+1],e[t+2]),r.push(e[s+0],e[s+1],e[s+2]),r.push(e[i+0],e[i+1],e[i+2])},addVertexPoint:function(t){const s=this.vertices;this.object.geometry.vertices.push(s[t+0],s[t+1],s[t+2])},addVertexLine:function(t){const s=this.vertices;this.object.geometry.vertices.push(s[t+0],s[t+1],s[t+2])},addNormal:function(t,s,i){const e=this.normals,r=this.object.geometry.normals;r.push(e[t+0],e[t+1],e[t+2]),r.push(e[s+0],e[s+1],e[s+2]),r.push(e[i+0],e[i+1],e[i+2])},addFaceNormal:function(t,s,i){const e=this.vertices,r=this.object.geometry.normals;T.fromArray(e,t),z.fromArray(e,s),D.fromArray(e,i),C.subVectors(D,z),E.subVectors(T,z),C.cross(E),C.normalize(),r.push(C.x,C.y,C.z),r.push(C.x,C.y,C.z),r.push(C.x,C.y,C.z)},addColor:function(t,s,i){const e=this.colors,r=this.object.geometry.colors;e[t]!==void 0&&r.push(e[t+0],e[t+1],e[t+2]),e[s]!==void 0&&r.push(e[s+0],e[s+1],e[s+2]),e[i]!==void 0&&r.push(e[i+0],e[i+1],e[i+2])},addUV:function(t,s,i){const e=this.uvs,r=this.object.geometry.uvs;r.push(e[t+0],e[t+1]),r.push(e[s+0],e[s+1]),r.push(e[i+0],e[i+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 s=this.uvs;this.object.geometry.uvs.push(s[t+0],s[t+1])},addFace:function(t,s,i,e,r,u,h,c,n){const a=this.vertices.length;let l=this.parseVertexIndex(t,a),f=this.parseVertexIndex(s,a),m=this.parseVertexIndex(i,a);if(this.addVertex(l,f,m),this.addColor(l,f,m),h!==void 0&&h!==""){const g=this.normals.length;l=this.parseNormalIndex(h,g),f=this.parseNormalIndex(c,g),m=this.parseNormalIndex(n,g),this.addNormal(l,f,m)}else this.addFaceNormal(l,f,m);if(e!==void 0&&e!==""){const g=this.uvs.length;l=this.parseUVIndex(e,g),f=this.parseUVIndex(r,g),m=this.parseUVIndex(u,g),this.addUV(l,f,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";const s=this.vertices.length;for(let i=0,e=t.length;i<e;i++){const r=this.parseVertexIndex(t[i],s);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(t,s){this.object.geometry.type="Line";const i=this.vertices.length,e=this.uvs.length;for(let r=0,u=t.length;r<u;r++)this.addVertexLine(this.parseVertexIndex(t[r],i));for(let r=0,u=s.length;r<u;r++)this.addUVLine(this.parseUVIndex(s[r],e))}};return B.startObject("",!1),B}class X extends o.Loader{constructor(t){super(t),this.materials=null}load(t,s,i,e){const r=this,u=new o.FileLoader(this.manager);u.setPath(this.path),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){try{s(r.parse(h))}catch(c){e?e(c):console.error(c),r.manager.itemError(t)}},i,e)}setMaterials(t){return this.materials=t,this}parse(t){const s=new Z;t.indexOf(`\r
|
|
2
|
-
`)!==-1&&(t=t.replace(/\r\n/g,`
|
|
3
|
-
`)),t.indexOf(`\\
|
|
4
|
-
`)!==-1&&(t=t.replace(/\\\n/g,""));const i=t.split(`
|
|
5
|
-
`);let e=[];for(let h=0,c=i.length;h<c;h++){const n=i[h].trimStart();if(n.length===0)continue;const a=n.charAt(0);if(a!=="#")if(a==="v"){const l=n.split(G);switch(l[0]){case"v":s.vertices.push(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])),l.length>=7?(I.setRGB(parseFloat(l[4]),parseFloat(l[5]),parseFloat(l[6]),o.SRGBColorSpace),s.colors.push(I.r,I.g,I.b)):s.colors.push(void 0,void 0,void 0);break;case"vn":s.normals.push(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]));break;case"vt":s.uvs.push(parseFloat(l[1]),parseFloat(l[2]));break}}else if(a==="f"){const f=n.slice(1).trim().split(G),m=[];for(let p=0,b=f.length;p<b;p++){const x=f[p];if(x.length>0){const w=x.split("/");m.push(w)}}const g=m[0];for(let p=1,b=m.length-1;p<b;p++){const x=m[p],w=m[p+1];s.addFace(g[0],x[0],w[0],g[1],x[1],w[1],g[2],x[2],w[2])}}else if(a==="l"){const l=n.substring(1).trim().split(" ");let f=[];const m=[];if(n.indexOf("/")===-1)f=l;else for(let g=0,p=l.length;g<p;g++){const b=l[g].split("/");b[0]!==""&&f.push(b[0]),b[1]!==""&&m.push(b[1])}s.addLineGeometry(f,m)}else if(a==="p"){const f=n.slice(1).trim().split(" ");s.addPointGeometry(f)}else if((e=N.exec(n))!==null){const l=(" "+e[0].slice(1).trim()).slice(1);s.startObject(l)}else if(q.test(n))s.object.startMaterial(n.substring(7).trim(),s.materialLibraries);else if(W.test(n))s.materialLibraries.push(n.substring(7).trim());else if(J.test(n))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(a==="s"){if(e=n.split(" "),e.length>1){const f=e[1].trim().toLowerCase();s.object.smooth=f!=="0"&&f!=="off"}else s.object.smooth=!0;const l=s.object.currentMaterial();l&&(l.smooth=s.object.smooth)}else{if(n==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+n+'"')}}s.finalize();const r=new o.Group;if(r.materialLibraries=[].concat(s.materialLibraries),!(s.objects.length===1&&s.objects[0].geometry.vertices.length===0)===!0)for(let h=0,c=s.objects.length;h<c;h++){const n=s.objects[h],a=n.geometry,l=n.materials,f=a.type==="Line",m=a.type==="Points";let g=!1;if(a.vertices.length===0)continue;const p=new o.BufferGeometry;p.setAttribute("position",new o.Float32BufferAttribute(a.vertices,3)),a.normals.length>0&&p.setAttribute("normal",new o.Float32BufferAttribute(a.normals,3)),a.colors.length>0&&(g=!0,p.setAttribute("color",new o.Float32BufferAttribute(a.colors,3))),a.hasUVIndices===!0&&p.setAttribute("uv",new o.Float32BufferAttribute(a.uvs,2));const b=[];for(let w=0,j=l.length;w<j;w++){const F=l[w],M=F.name+"_"+F.smooth+"_"+g;let d=s.materials[M];if(this.materials!==null){if(d=this.materials.create(F.name),f&&d&&!(d instanceof o.LineBasicMaterial)){const y=new o.LineBasicMaterial;o.Material.prototype.copy.call(y,d),y.color.copy(d.color),d=y}else if(m&&d&&!(d instanceof o.PointsMaterial)){const y=new o.PointsMaterial({size:10,sizeAttenuation:!1});o.Material.prototype.copy.call(y,d),y.color.copy(d.color),y.map=d.map,d=y}}d===void 0&&(f?d=new o.LineBasicMaterial:m?d=new o.PointsMaterial({size:1,sizeAttenuation:!1}):d=new o.MeshPhongMaterial,d.name=F.name,d.flatShading=!F.smooth,d.vertexColors=g,s.materials[M]=d),b.push(d)}let x;if(b.length>1){for(let w=0,j=l.length;w<j;w++){const F=l[w];p.addGroup(F.groupStart,F.groupCount,w)}f?x=new o.LineSegments(p,b):m?x=new o.Points(p,b):x=new o.Mesh(p,b)}else f?x=new o.LineSegments(p,b[0]):m?x=new o.Points(p,b[0]):x=new o.Mesh(p,b[0]);x.name=n.name,r.add(x)}else if(s.vertices.length>0){const h=new o.PointsMaterial({size:1,sizeAttenuation:!1}),c=new o.BufferGeometry;c.setAttribute("position",new o.Float32BufferAttribute(s.vertices,3)),s.colors.length>0&&s.colors[0]!==void 0&&(c.setAttribute("color",new o.Float32BufferAttribute(s.colors,3)),h.vertexColors=!0);const n=new o.Points(c,h);r.add(n)}return r}}class Y extends o.Loader{constructor(t){super(t)}load(t,s,i,e){const r=this,u=this.path===""?o.LoaderUtils.extractUrlBase(t):this.path,h=new o.FileLoader(this.manager);h.setPath(this.path),h.setRequestHeader(this.requestHeader),h.setWithCredentials(this.withCredentials),h.load(t,function(c){try{s(r.parse(c,u))}catch(n){e?e(n):console.error(n),r.manager.itemError(t)}},i,e)}setMaterialOptions(t){return this.materialOptions=t,this}parse(t,s){const i=t.split(`
|
|
6
|
-
`);let e={};const r=/\s+/,u={};for(let c=0;c<i.length;c++){let n=i[c];if(n=n.trim(),n.length===0||n.charAt(0)==="#")continue;const a=n.indexOf(" ");let l=a>=0?n.substring(0,a):n;l=l.toLowerCase();let f=a>=0?n.substring(a+1):"";if(f=f.trim(),l==="newmtl")e={name:f},u[f]=e;else if(l==="ka"||l==="kd"||l==="ks"||l==="ke"){const m=f.split(r,3);e[l]=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])]}else e[l]=f}const h=new K(this.resourcePath||s,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(u),h}}class K{constructor(t="",s={}){this.baseUrl=t,this.options=s,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:o.FrontSide,this.wrap=this.options.wrap!==void 0?this.options.wrap:o.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 s={};for(const i in t){const e=t[i],r={};s[i]=r;for(const u in e){let h=!0,c=e[u];const n=u.toLowerCase();switch(n){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(c=[c[0]/255,c[1]/255,c[2]/255]),this.options&&this.options.ignoreZeroRGBs&&c[0]===0&&c[1]===0&&c[2]===0&&(h=!1);break}h&&(r[n]=c)}}return s}preload(){for(const t in this.materialsInfo)this.create(t)}getIndex(t){return this.nameLookup[t]}getAsArray(){let t=0;for(const s in this.materialsInfo)this.materialsArray[t]=this.create(s),this.nameLookup[s]=t,t++;return this.materialsArray}create(t){return this.materials[t]===void 0&&this.createMaterial_(t),this.materials[t]}createMaterial_(t){const s=this,i=this.materialsInfo[t],e={name:t,side:this.side};function r(h,c){return typeof c!="string"||c===""?"":/^https?:\/\//i.test(c)?c:h+c}function u(h,c){if(e[h])return;const n=s.getTextureParams(c,e),a=s.loadTexture(r(s.baseUrl,n.url));a.repeat.copy(n.scale),a.offset.copy(n.offset),a.wrapS=s.wrap,a.wrapT=s.wrap,(h==="map"||h==="emissiveMap")&&(a.colorSpace=o.SRGBColorSpace),e[h]=a}for(const h in i){const c=i[h];let n;if(c!=="")switch(h.toLowerCase()){case"kd":e.color=o.ColorManagement.colorSpaceToWorking(new o.Color().fromArray(c),o.SRGBColorSpace);break;case"ks":e.specular=o.ColorManagement.colorSpaceToWorking(new o.Color().fromArray(c),o.SRGBColorSpace);break;case"ke":e.emissive=o.ColorManagement.colorSpaceToWorking(new o.Color().fromArray(c),o.SRGBColorSpace);break;case"map_kd":u("map",c);break;case"map_ks":u("specularMap",c);break;case"map_ke":u("emissiveMap",c);break;case"norm":u("normalMap",c);break;case"map_bump":case"bump":u("bumpMap",c);break;case"disp":u("displacementMap",c);break;case"map_d":u("alphaMap",c),e.transparent=!0;break;case"ns":e.shininess=parseFloat(c);break;case"d":n=parseFloat(c),n<1&&(e.opacity=n,e.transparent=!0);break;case"tr":n=parseFloat(c),this.options&&this.options.invertTrProperty&&(n=1-n),n>0&&(e.opacity=1-n,e.transparent=!0);break}}return this.materials[t]=new o.MeshPhongMaterial(e),this.materials[t]}getTextureParams(t,s){const i={scale:new o.Vector2(1,1),offset:new o.Vector2(0,0)},e=t.split(/\s+/);let r;return r=e.indexOf("-bm"),r>=0&&(s.bumpScale=parseFloat(e[r+1]),e.splice(r,2)),r=e.indexOf("-mm"),r>=0&&(s.displacementBias=parseFloat(e[r+1]),s.displacementScale=parseFloat(e[r+2]),e.splice(r,3)),r=e.indexOf("-s"),r>=0&&(i.scale.set(parseFloat(e[r+1]),parseFloat(e[r+2])),e.splice(r,4)),r=e.indexOf("-o"),r>=0&&(i.offset.set(parseFloat(e[r+1]),parseFloat(e[r+2])),e.splice(r,4)),i.url=e.join(" ").trim(),i}loadTexture(t,s,i,e,r){const u=this.manager!==void 0?this.manager:o.DefaultLoadingManager;let h=u.getHandler(t);h===null&&(h=new o.TextureLoader(u)),h.setCrossOrigin&&h.setCrossOrigin(this.crossOrigin);const c=h.load(t,i,e,r);return s!==void 0&&(c.mapping=s),c}}exports.MTLLoader=Y;exports.OBJLoader=X;exports.STLLoader=H;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-J7Knzs4U.cjs"),y={type:"change"},m={type:"start"},g={type:"end"},_=new s.Ray,b=new s.Plane,E=Math.cos(70*s.MathUtils.DEG2RAD),h=new s.Vector3,l=2*Math.PI,a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},u=1e-6;class P extends s.Controls{constructor(t,e=null){super(t,e),this.state=a.NONE,this.target=new s.Vector3,this.cursor=new s.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:s.MOUSE.ROTATE,MIDDLE:s.MOUSE.DOLLY,RIGHT:s.MOUSE.PAN},this.touches={ONE:s.TOUCH.ROTATE,TWO:s.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 s.Vector3,this._lastQuaternion=new s.Quaternion,this._lastTargetPosition=new s.Vector3,this._quat=new s.Quaternion().setFromUnitVectors(t.up,new s.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new s.Spherical,this._sphericalDelta=new s.Spherical,this._scale=1,this._panOffset=new s.Vector3,this._rotateStart=new s.Vector2,this._rotateEnd=new s.Vector2,this._rotateDelta=new s.Vector2,this._panStart=new s.Vector2,this._panEnd=new s.Vector2,this._panDelta=new s.Vector2,this._dollyStart=new s.Vector2,this._dollyEnd=new s.Vector2,this._dollyDelta=new s.Vector2,this._dollyDirection=new s.Vector3,this._mouse=new s.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=D.bind(this),this._onPointerDown=T.bind(this),this._onPointerUp=M.bind(this),this._onContextMenu=L.bind(this),this._onMouseWheel=w.bind(this),this._onKeyDown=R.bind(this),this._onTouchStart=j.bind(this),this._onTouchMove=A.bind(this),this._onMouseDown=S.bind(this),this._onMouseMove=O.bind(this),this._interceptControlDown=C.bind(this),this._interceptControlUp=x.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(y),this.update(),this.state=a.NONE}update(t=null){const e=this.object.position;h.copy(e).sub(this.target),h.applyQuaternion(this._quat),this._spherical.setFromVector3(h),this.autoRotate&&this.state===a.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 o=this.minAzimuthAngle,n=this.maxAzimuthAngle;isFinite(o)&&isFinite(n)&&(o<-Math.PI?o+=l:o>Math.PI&&(o-=l),n<-Math.PI?n+=l:n>Math.PI&&(n-=l),o<=n?this._spherical.theta=Math.max(o,Math.min(n,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(o+n)/2?Math.max(o,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 r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const c=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=c!=this._spherical.radius}if(h.setFromSpherical(this._spherical),h.applyQuaternion(this._quatInverse),e.copy(this.target).add(h),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 c=null;if(this.object.isPerspectiveCamera){const p=h.length();c=this._clampDistance(p*this._scale);const d=p-c;this.object.position.addScaledVector(this._dollyDirection,d),this.object.updateMatrixWorld(),r=!!d}else if(this.object.isOrthographicCamera){const p=new s.Vector3(this._mouse.x,this._mouse.y,0);p.unproject(this.object);const d=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=d!==this.object.zoom;const f=new s.Vector3(this._mouse.x,this._mouse.y,0);f.unproject(this.object),this.object.position.sub(f).add(p),this.object.updateMatrixWorld(),c=h.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;c!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(c).add(this.object.position):(_.origin.copy(this.object.position),_.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(_.direction))<E?this.object.lookAt(this.target):(b.setFromNormalAndCoplanarPoint(this.object.up,this.target),_.intersectPlane(b,this.target))))}else if(this.object.isOrthographicCamera){const c=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),c!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>u||8*(1-this._lastQuaternion.dot(this.object.quaternion))>u||this._lastTargetPosition.distanceToSquared(this.target)>u?(this.dispatchEvent(y),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?l/60*this.autoRotateSpeed*t:l/60/60*this.autoRotateSpeed}_getZoomScale(t){const e=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*e)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,e){h.setFromMatrixColumn(e,0),h.multiplyScalar(-t),this._panOffset.add(h)}_panUp(t,e){this.screenSpacePanning===!0?h.setFromMatrixColumn(e,1):(h.setFromMatrixColumn(e,0),h.crossVectors(this.object.up,h)),h.multiplyScalar(t),this._panOffset.add(h)}_pan(t,e){const o=this.domElement;if(this.object.isPerspectiveCamera){const n=this.object.position;h.copy(n).sub(this.target);let r=h.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*r/o.clientHeight,this.object.matrix),this._panUp(2*e*r/o.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/o.clientWidth,this.object.matrix),this._panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/o.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,e){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const o=this.domElement.getBoundingClientRect(),n=t-o.left,r=e-o.top,c=o.width,p=o.height;this._mouse.x=n/c*2-1,this._mouse.y=-(r/p)*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 e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.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 e=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),e=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),e=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),e=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),e=!0;break}e&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._rotateStart.set(o,n)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panStart.set(o,n)}}_handleTouchStartDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);this._dollyStart.set(0,r)}_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 o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),r=.5*(t.pageY+o.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panEnd.set(o,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 e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);this._dollyEnd.set(0,r),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 c=(t.pageX+e.x)*.5,p=(t.pageY+e.y)*.5;this._updateZoomParameters(c,p)}_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 e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId){this._pointers.splice(e,1);return}}_isTrackingPointer(t){for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return!0;return!1}_trackPointer(t){let e=this._pointerPositions[t.pointerId];e===void 0&&(e=new s.Vector2,this._pointerPositions[t.pointerId]=e),e.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const e=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[e]}_customWheelEvent(t){const e=t.deltaMode,o={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(e){case 1:o.deltaY*=16;break;case 2:o.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(o.deltaY*=10),o}}function T(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function D(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function M(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(g),this.state=a.NONE;break;case 1:const t=this._pointers[0],e=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:e.x,pageY:e.y});break}}function S(i){let t;switch(i.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 s.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=a.DOLLY;break;case s.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}break;case s.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function O(i){switch(this.state){case a.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case a.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case a.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function w(i){this.enabled===!1||this.enableZoom===!1||this.state!==a.NONE||(i.preventDefault(),this.dispatchEvent(m),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(g))}function R(i){this.enabled!==!1&&this._handleKeyDown(i)}function j(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case s.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=a.TOUCH_ROTATE;break;case s.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=a.TOUCH_PAN;break;default:this.state=a.NONE}break;case 2:switch(this.touches.TWO){case s.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=a.TOUCH_DOLLY_PAN;break;case s.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=a.TOUCH_DOLLY_ROTATE;break;default:this.state=a.NONE}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function A(i){switch(this._trackPointer(i),this.state){case a.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case a.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case a.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case a.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=a.NONE}}function L(i){this.enabled!==!1&&i.preventDefault()}function C(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function x(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}exports.OrbitControls=P;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const an=require("./MTLLoader-DqJ6tn_v.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-J7Knzs4U.cjs");class tt extends a.DataTextureLoader{constructor(O){super(O)}parse(O){function ee(f){switch(f.image_type){case ye:case te:if(f.colormap_length>256||f.colormap_size!==24||f.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case Z:case se:case pe:case me:if(f.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case be:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+f.image_type)}if(f.width<=0||f.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(f.pixel_size!==8&&f.pixel_size!==16&&f.pixel_size!==24&&f.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+f.pixel_size)}function v(f,Y,z,D,$){let j,V;const _=z.pixel_size>>3,C=z.width*z.height*_;if(Y&&(V=$.subarray(D,D+=z.colormap_length*(z.colormap_size>>3))),f){j=new Uint8Array(C);let A,h,T,J=0;const de=new Uint8Array(_);for(;J<C;)if(A=$[D++],h=(A&127)+1,A&128){for(T=0;T<_;++T)de[T]=$[D++];for(T=0;T<h;++T)j.set(de,J+T*_);J+=_*h}else{for(h*=_,T=0;T<h;++T)j[J+T]=$[D++];J+=h}}else j=$.subarray(D,D+=Y?z.width*z.height:C);return{pixel_data:j,palettes:V}}function oe(f,Y,z,D,$,j,V,_,C){const A=C;let h,T=0,J,de;const we=L.width;for(de=Y;de!==D;de+=z)for(J=$;J!==V;J+=j,T++)h=_[T],f[(J+we*de)*4+3]=255,f[(J+we*de)*4+2]=A[h*3+0],f[(J+we*de)*4+1]=A[h*3+1],f[(J+we*de)*4+0]=A[h*3+2];return f}function R(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A+=2)C=_[A+0]+(_[A+1]<<8),f[(h+J*T)*4+0]=(C&31744)>>7,f[(h+J*T)*4+1]=(C&992)>>2,f[(h+J*T)*4+2]=(C&31)<<3,f[(h+J*T)*4+3]=C&32768?0:255;return f}function re(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=3)f[(A+T*h)*4+3]=255,f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2];return f}function S(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=4)f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2],f[(A+T*h)*4+3]=_[C+3];return f}function X(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A++)C=_[A],f[(h+J*T)*4+0]=C,f[(h+J*T)*4+1]=C,f[(h+J*T)*4+2]=C,f[(h+J*T)*4+3]=255;return f}function ie(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=2)f[(A+T*h)*4+0]=_[C+0],f[(A+T*h)*4+1]=_[C+0],f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+3]=_[C+1];return f}function ge(f,Y,z,D,$){let j,V,_,C,A,h;switch((L.flags&I)>>U){default:case W:j=0,_=1,A=Y,V=0,C=1,h=z;break;case B:j=0,_=1,A=Y,V=z-1,C=-1,h=-1;break;case G:j=Y-1,_=-1,A=-1,V=0,C=1,h=z;break;case x:j=Y-1,_=-1,A=-1,V=z-1,C=-1,h=-1;break}if(q)switch(L.pixel_size){case 8:X(f,V,C,h,j,_,A,D);break;case 16:ie(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(L.pixel_size){case 8:oe(f,V,C,h,j,_,A,D,$);break;case 16:R(f,V,C,h,j,_,A,D);break;case 24:re(f,V,C,h,j,_,A,D);break;case 32:S(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return f}const be=0,ye=1,Z=2,se=3,te=9,pe=10,me=11,I=48,U=4,B=0,x=1,W=2,G=3;if(O.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let g=0;const p=new Uint8Array(O),L={id_length:p[g++],colormap_type:p[g++],image_type:p[g++],colormap_index:p[g++]|p[g++]<<8,colormap_length:p[g++]|p[g++]<<8,colormap_size:p[g++],origin:[p[g++]|p[g++]<<8,p[g++]|p[g++]<<8],width:p[g++]|p[g++]<<8,height:p[g++]|p[g++]<<8,pixel_size:p[g++],flags:p[g++]};if(ee(L),L.id_length+g>O.length)throw new Error("THREE.TGALoader: No data.");g+=L.id_length;let M=!1,N=!1,q=!1;switch(L.image_type){case te:M=!0,N=!0;break;case ye:N=!0;break;case pe:M=!0;break;case Z:break;case me:M=!0,q=!0;break;case se:q=!0;break}const ce=new Uint8Array(L.width*L.height*4),ne=v(M,N,L,g,p);return ge(ce,L.width,L.height,ne.pixel_data,ne.palettes),{data:ce,width:L.width,height:L.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class cn extends a.Loader{load(O,ee,v,oe){const R=this,re=R.path===""?a.LoaderUtils.extractUrlBase(O):R.path,S=new a.FileLoader(R.manager);S.setPath(R.path),S.setRequestHeader(R.requestHeader),S.setWithCredentials(R.withCredentials),S.load(O,function(X){try{ee(R.parse(X,re))}catch(ie){oe?oe(ie):console.error(ie),R.manager.itemError(O)}},v,oe)}parse(O,ee){function v(t,e){const i=[],n=t.childNodes;for(let s=0,o=n.length;s<o;s++){const r=n[s];r.nodeName===e&&i.push(r)}return i}function oe(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function R(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function re(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function S(t){return t.substring(1)}function X(){return"three_default_"+on++}function ie(t){return Object.keys(t).length===0}function ge(t){return{unit:be(v(t,"unit")[0]),upAxis:ye(v(t,"up_axis")[0])}}function be(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function ye(t){return t!==void 0?t.textContent:"Y_UP"}function Z(t,e,i,n){const s=v(t,e)[0];if(s!==void 0){const o=v(s,i);for(let r=0;r<o.length;r++)n(o[r])}}function se(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function te(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function pe(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType!==1)continue;let r;switch(o.nodeName){case"source":r=o.getAttribute("id"),e.sources[r]=_e(o);break;case"sampler":r=o.getAttribute("id"),e.samplers[r]=me(o);break;case"channel":r=o.getAttribute("target"),e.channels[r]=I(o);break;case"animation":pe(o),i=!0;break;default:console.log(o)}}i===!1&&(E.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function me(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic");e.inputs[r]=o;break}}return e}function I(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let o=n.shift();const r=o.indexOf("(")!==-1,u=o.indexOf(".")!==-1;if(u)n=o.split("."),o=n.shift(),e.member=n.shift();else if(r){const l=o.split("(");o=l.shift();for(let d=0;d<l.length;d++)l[d]=parseInt(l[d].replace(/\)/,""));e.indices=l}return e.id=s,e.sid=o,e.arraySyntax=r,e.memberSyntax=u,e.sampler=S(t.getAttribute("source")),e}function U(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const o in i)if(i.hasOwnProperty(o)){const r=i[o],u=n[r.sampler],l=u.inputs.INPUT,d=u.inputs.OUTPUT,y=s[l],c=s[d],b=x(r,y,c);L(b,e)}return e}function B(t){return te(E.animations[t],U)}function x(t,e,i){const n=E.nodes[t.id],s=Ne(n.id),o=n.transforms[t.sid],r=n.matrix.clone().transpose();let u,l,d,y,c,b;const m={};switch(o){case"matrix":for(d=0,y=e.array.length;d<y;d++)if(u=e.array[d],l=d*i.stride,m[u]===void 0&&(m[u]={}),t.arraySyntax===!0){const K=i.array[l],H=t.indices[0]+4*t.indices[1];m[u][H]=K}else for(c=0,b=i.stride;c<b;c++)m[u][c]=i.array[l+c];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break}const k=W(m,r);return{name:s.uuid,keyframes:k}}function W(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)M(i,s,e.elements[s]);return i;function n(s,o){return s.time-o.time}}const G=new a.Vector3,g=new a.Vector3,p=new a.Quaternion;function L(t,e){const i=t.keyframes,n=t.name,s=[],o=[],r=[],u=[];for(let l=0,d=i.length;l<d;l++){const y=i[l],c=y.time,b=y.value;le.fromArray(b).transpose(),le.decompose(G,p,g),s.push(c),o.push(G.x,G.y,G.z),r.push(p.x,p.y,p.z,p.w),u.push(g.x,g.y,g.z)}return o.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,o)),r.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,r)),u.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,u)),e}function M(t,e,i){let n,s=!0,o,r;for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]=i;else N(t,e)}function N(t,e){let i,n;for(let s=0,o=t.length;s<o;s++){const r=t[s];if(r.value[e]===null){if(i=q(t,s,e),n=ce(t,s,e),i===null){r.value[e]=n.value[e];continue}if(n===null){r.value[e]=i.value[e];continue}ne(r,i,n,e)}}}function q(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function ce(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function ne(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function f(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(S(s.getAttribute("url")));break}}E.clips[t.getAttribute("id")]=e}function Y(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let o=0,r=s.length;o<r;o++){const u=B(s[o]);for(let l=0,d=u.length;l<d;l++)e.push(u[l])}return new a.AnimationClip(i,n,e)}function z(t){return te(E.clips[t],Y)}function D(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=S(s.getAttribute("source")),e.skin=$(s);break;case"morph":e.id=S(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}E.controllers[t.getAttribute("id")]=e}function $(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=R(s.textContent);break;case"source":const o=s.getAttribute("id");e.sources[o]=_e(s);break;case"joints":e.joints=j(s);break;case"vertex_weights":e.vertexWeights=V(s);break}}return e}function j(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source"));e.inputs[o]=r;break}}return e}function V(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source")),u=parseInt(s.getAttribute("offset"));e.inputs[o]={id:r,offset:u};break;case"vcount":e.vcount=re(s.textContent);break;case"v":e.v=re(s.textContent);break}}return e}function _(t){const e={id:t.id},i=E.geometries[e.id];return t.skin!==void 0&&(e.skin=C(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function C(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,o=s.vcount,r=s.v,u=s.inputs.JOINT.offset,l=s.inputs.WEIGHT.offset,d=t.sources[t.joints.inputs.JOINT],y=t.sources[t.joints.inputs.INV_BIND_MATRIX],c=n[s.inputs.WEIGHT.id].array;let b=0,m,k,w;for(m=0,w=o.length;m<w;m++){const H=o[m],F=[];for(k=0;k<H;k++){const P=r[b+u],he=r[b+l],ae=c[he];F.push({index:P,weight:ae}),b+=2}for(F.sort(K),k=0;k<4;k++){const P=F[k];P!==void 0?(i.indices.array.push(P.index),i.weights.array.push(P.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),m=0,w=d.array.length;m<w;m++){const H=d.array[m],F=new a.Matrix4().fromArray(y.array,m*y.stride).transpose();i.joints.push({name:H,boneInverse:F})}return i;function K(H,F){return F.weight-H.weight}}function A(t){return te(E.controllers[t],_)}function h(t){const e={init_from:v(t,"init_from")[0].textContent};E.images[t.getAttribute("id")]=e}function T(t){return t.build!==void 0?t.build:t.init_from}function J(t){const e=E.images[t];return e!==void 0?te(e,T):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function de(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=we(s);break}}E.effects[t.getAttribute("id")]=e}function we(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":st(s,e);break;case"technique":e.technique=at(s);break;case"extra":e.extra=Ge(s);break}}return e}function st(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType===1)switch(o.nodeName){case"surface":e.surfaces[i]=ot(o);break;case"sampler2D":e.samplers[i]=rt(o);break}}}function ot(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function rt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function at(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=ct(s);break;case"extra":e.extra=Ge(s);break}}return e}function ct(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=Se(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:Se(s)};break}}return e}function Se(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=R(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:Ie(s)};break}}return e}function Ie(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":lt(s,e);break}}return e}function lt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":dt(s,e);break}}}function dt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}}function Ge(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=ut(s);break}}return e}function ut(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}return e}function Oe(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:Ie(s)};break}}return e}function Fe(t){return t}function ft(t){return te(E.effects[t],Fe)}function ht(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=S(s.getAttribute("url"));break}}E.materials[t.getAttribute("id")]=e}function pt(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=Re;break;default:e=Ze}return e}function Pe(t){const e=ft(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(l,d=null){const y=e.profile.samplers[l.id];let c=null;if(y!==void 0){const b=e.profile.surfaces[y.source];c=J(b.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),c=J(l.id);if(c!==null){const b=pt(c);if(b!==void 0){const m=b.load(c),k=l.extra;if(k!==void 0&&k.technique!==void 0&&ie(k.technique)===!1){const w=k.technique;m.wrapS=w.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,m.wrapT=w.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,m.offset.set(w.offsetU||0,w.offsetV||0),m.repeat.set(w.repeatU||1,w.repeatV||1)}else m.wrapS=a.RepeatWrapping,m.wrapT=a.RepeatWrapping;return d!==null&&(m.colorSpace=d),m}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",c),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",l.id),null}const o=i.parameters;for(const l in o){const d=o[l];switch(l){case"diffuse":d.color&&n.color.fromArray(d.color),d.texture&&(n.map=s(d.texture,a.SRGBColorSpace));break;case"specular":d.color&&n.specular&&n.specular.fromArray(d.color),d.texture&&(n.specularMap=s(d.texture));break;case"bump":d.texture&&(n.normalMap=s(d.texture));break;case"ambient":d.texture&&(n.lightMap=s(d.texture,a.SRGBColorSpace));break;case"shininess":d.float&&n.shininess&&(n.shininess=d.float);break;case"emission":d.color&&n.emissive&&n.emissive.fromArray(d.color),d.texture&&(n.emissiveMap=s(d.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let r=o.transparent,u=o.transparency;if(u===void 0&&r&&(u={float:1}),r===void 0&&u&&(r={opaque:"A_ONE",data:{color:[1,1,1,1]}}),r&&u)if(r.data.texture)n.transparent=!0;else{const l=r.data.color;switch(r.opaque){case"A_ONE":n.opacity=l[3]*u.float;break;case"RGB_ZERO":n.opacity=1-l[0]*u.float;break;case"A_ZERO":n.opacity=1-l[3]*u.float;break;case"RGB_ONE":n.opacity=l[0]*u.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',r.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const l=i.extra.technique;for(const d in l){const y=l[d];switch(d){case"double_sided":n.side=y===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(y.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function mt(t){return te(E.materials[t],Pe)}function gt(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=bt(s);break}}E.cameras[t.getAttribute("id")]=e}function bt(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return yt(i)}}return{}}function yt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=wt(n);break}}return e}function wt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function Ue(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function kt(t){const e=E.cameras[t];return e!==void 0?te(e,Ue):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function Nt(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=At(s);break}}E.lights[t.getAttribute("id")]=e}function At(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=Tt(s)}}return e}function Tt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const o=R(s.textContent);e.color=new a.Color().fromArray(o),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const r=parseFloat(s.textContent);e.distance=r?Math.sqrt(1/r):0;break}}return e}function qe(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function Et(t){const e=E.lights[t];return e!==void 0?te(e,qe):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function xt(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=v(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const o=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[o]=_e(s);break;case"vertices":e.vertices=Ct(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(_t(s));break;default:console.log(s)}}E.geometries[t.getAttribute("id")]=e}}function _e(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=R(n.textContent);break;case"Name_array":e.array=oe(n.textContent);break;case"technique_common":const s=v(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function Ct(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=S(n.getAttribute("source")))}return e}function _t(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic"),u=parseInt(s.getAttribute("offset")),l=parseInt(s.getAttribute("set")),d=l>0?r+l:r;e.inputs[d]={id:o,offset:u},e.stride=Math.max(e.stride,u+1),r==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=re(s.textContent);break;case"p":e.p=re(s.textContent);break}}return e}function Lt(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function Mt(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function je(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const o=Lt(s);for(const r in o){const u=o[r];Mt(u),e[r]=Rt(u,i,n)}return e}function Rt(t,e,i){const n={},s={array:[],stride:0},o={array:[],stride:0},r={array:[],stride:0},u={array:[],stride:0},l={array:[],stride:0},d={array:[],stride:4},y={array:[],stride:4},c=new a.BufferGeometry,b=[];let m=0;for(let k=0;k<t.length;k++){const w=t[k],K=w.inputs;let H=0;switch(w.type){case"lines":case"linestrips":H=w.count*2;break;case"triangles":H=w.count*3;break;case"polylist":for(let F=0;F<w.count;F++){const P=w.vcount[F];switch(P){case 3:H+=3;break;case 4:H+=6;break;default:H+=(P-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",w.type)}c.addGroup(m,H,k),m+=H,w.material&&b.push(w.material);for(const F in K){const P=K[F];switch(F){case"VERTEX":for(const he in i){const ae=i[he];switch(he){case"POSITION":const Ae=s.array.length;if(ue(w,e[ae],P.offset,s.array),s.stride=e[ae].stride,e.skinWeights&&e.skinIndices&&(ue(w,e.skinIndices,P.offset,d.array),ue(w,e.skinWeights,P.offset,y.array)),w.hasUV===!1&&t.uvsNeedsFix===!0){const rn=(s.array.length-Ae)/s.stride;for(let et=0;et<rn;et++)r.array.push(0,0)}break;case"NORMAL":ue(w,e[ae],P.offset,o.array),o.stride=e[ae].stride;break;case"COLOR":ue(w,e[ae],P.offset,l.array),l.stride=e[ae].stride;break;case"TEXCOORD":ue(w,e[ae],P.offset,r.array),r.stride=e[ae].stride;break;case"TEXCOORD1":ue(w,e[ae],P.offset,u.array),r.stride=e[ae].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',he)}}break;case"NORMAL":ue(w,e[P.id],P.offset,o.array),o.stride=e[P.id].stride;break;case"COLOR":ue(w,e[P.id],P.offset,l.array,!0),l.stride=e[P.id].stride;break;case"TEXCOORD":ue(w,e[P.id],P.offset,r.array),r.stride=e[P.id].stride;break;case"TEXCOORD1":ue(w,e[P.id],P.offset,u.array),u.stride=e[P.id].stride;break}}}return s.array.length>0&&c.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),o.array.length>0&&c.setAttribute("normal",new a.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&c.setAttribute("color",new a.Float32BufferAttribute(l.array,l.stride)),r.array.length>0&&c.setAttribute("uv",new a.Float32BufferAttribute(r.array,r.stride)),u.array.length>0&&c.setAttribute("uv1",new a.Float32BufferAttribute(u.array,u.stride)),d.array.length>0&&c.setAttribute("skinIndex",new a.Float32BufferAttribute(d.array,d.stride)),y.array.length>0&&c.setAttribute("skinWeight",new a.Float32BufferAttribute(y.array,y.stride)),n.data=c,n.type=t[0].type,n.materialKeys=b,n}function ue(t,e,i,n,s=!1){const o=t.p,r=t.stride,u=t.vcount;function l(c){let b=o[c+i]*y;const m=b+y;for(;b<m;b++)n.push(d[b]);if(s){const k=n.length-y-1;Ee.setRGB(n[k+0],n[k+1],n[k+2],a.SRGBColorSpace),n[k+0]=Ee.r,n[k+1]=Ee.g,n[k+2]=Ee.b}}const d=e.array,y=e.stride;if(t.vcount!==void 0){let c=0;for(let b=0,m=u.length;b<m;b++){const k=u[b];if(k===4){const w=c+r*0,K=c+r*1,H=c+r*2,F=c+r*3;l(w),l(K),l(F),l(K),l(H),l(F)}else if(k===3){const w=c+r*0,K=c+r*1,H=c+r*2;l(w),l(K),l(H)}else if(k>4)for(let w=1,K=k-2;w<=K;w++){const H=c+r*0,F=c+r*w,P=c+r*(w+1);l(H),l(F),l(P)}c+=r*k}}else for(let c=0,b=o.length;c<b;c+=r)l(c)}function Be(t){return te(E.geometries[t],je)}function vt(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":Gt(n,e);break}}E.kinematicsModels[t.getAttribute("id")]=e}function St(t){return t.build!==void 0?t.build:t}function It(t){return te(E.kinematicsModels[t],St)}function Gt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=Ot(n);break;case"link":e.links.push(He(n));break}}}function Ot(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=Ft(n);break}}return e}function Ft(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=R(n.textContent);e.axis.fromArray(s);break;case"limits":const o=n.getElementsByTagName("max")[0],r=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(o.textContent),e.limits.min=parseFloat(r.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function He(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(Pt(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function Pt(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(He(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function De(t){const e={type:t.nodeName},i=R(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function Ut(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},qt(n,e.rigidBodies[n.getAttribute("name")]);break}}E.physicsModels[t.getAttribute("id")]=e}function qt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":jt(n,e);break}}}function jt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=R(n.textContent);break;case"mass":e.mass=R(n.textContent)[0];break}}}function Bt(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(Ht(n));break}}E.kinematicsScenes[S(t.getAttribute("url"))]=e}function Ht(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const o=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=o.substring(0,o.length-1);break}}return e}function Dt(t){return t.build!==void 0?t.build:t}function Vt(t){return te(E.kinematicsScenes[t],Dt)}function zt(){const t=Object.keys(E.kinematicsModels)[0],e=Object.keys(E.kinematicsScenes)[0],i=Object.keys(E.visualScenes)[0];if(t===void 0||e===void 0)return;const n=It(t),s=Vt(e),o=Ye(i),r=s.bindJointAxis,u={};for(let y=0,c=r.length;y<c;y++){const b=r[y],m=Q.querySelector('[sid="'+b.target+'"]');if(m){const k=m.parentElement;l(b.jointIndex,k)}}function l(y,c){const b=c.getAttribute("name"),m=n.joints[y];o.traverse(function(k){k.name===b&&(u[y]={object:k,transforms:Jt(c),joint:m,position:m.zeroPosition})})}const d=new a.Matrix4;Qe={joints:n&&n.joints,getJointValue:function(y){const c=u[y];if(c)return c.position;console.warn("THREE.ColladaLoader: Joint "+y+" doesn't exist.")},setJointValue:function(y,c){const b=u[y];if(b){const m=b.joint;if(c>m.limits.max||c<m.limits.min)console.warn("THREE.ColladaLoader: Joint "+y+" value "+c+" outside of limits (min: "+m.limits.min+", max: "+m.limits.max+").");else if(m.static)console.warn("THREE.ColladaLoader: Joint "+y+" is static.");else{const k=b.object,w=m.axis,K=b.transforms;le.identity();for(let H=0;H<K.length;H++){const F=K[H];if(F.sid&&F.sid.indexOf(y)!==-1)switch(m.type){case"revolute":le.multiply(d.makeRotationAxis(w,a.MathUtils.degToRad(c)));break;case"prismatic":le.multiply(d.makeTranslation(w.x*c,w.y*c,w.z*c));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+m.type);break}else switch(F.type){case"matrix":le.multiply(F.obj);break;case"translate":le.multiply(d.makeTranslation(F.obj.x,F.obj.y,F.obj.z));break;case"scale":le.scale(F.obj);break;case"rotate":le.multiply(d.makeRotationAxis(F.obj,F.angle));break}}k.matrix.copy(le),k.matrix.decompose(k.position,k.quaternion,k.scale),u[y].position=c}}else console.log("THREE.ColladaLoader: "+y+" does not exist.")}}}function Jt(t){const e=[],i=Q.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let o,r;switch(s.nodeName){case"matrix":o=R(s.textContent);const u=new a.Matrix4().fromArray(o).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:u});break;case"translate":case"scale":o=R(s.textContent),r=new a.Vector3().fromArray(o),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r});break;case"rotate":o=R(s.textContent),r=new a.Vector3().fromArray(o);const l=a.MathUtils.degToRad(o[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r,angle:l});break}}return e}function Wt(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const le=new a.Matrix4,ke=new a.Vector3;function Le(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),Le(n);break;case"instance_camera":e.instanceCameras.push(S(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(Ve(n));break;case"instance_light":e.instanceLights.push(S(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(Ve(n));break;case"instance_node":e.instanceNodes.push(S(n.getAttribute("url")));break;case"matrix":s=R(n.textContent),e.matrix.multiply(le.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=R(n.textContent),ke.fromArray(s),e.matrix.multiply(le.makeTranslation(ke.x,ke.y,ke.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=R(n.textContent);const o=a.MathUtils.degToRad(s[3]);e.matrix.multiply(le.makeRotationAxis(ke.fromArray(s),o)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=R(n.textContent),e.matrix.scale(ke.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return We(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):E.nodes[e.id]=e,e}function Ve(t){const e={id:S(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let o=0;o<s.length;o++){const r=s[o],u=r.getAttribute("symbol"),l=r.getAttribute("target");e.materials[u]=S(l)}break;case"skeleton":e.skeletons.push(S(n.textContent));break}}return e}function Kt(t,e){const i=[],n=[];let s,o,r;for(s=0;s<t.length;s++){const d=t[s];let y;if(We(d))y=Ne(d),ze(y,e,i);else if(Qt(d)){const b=E.visualScenes[d].children;for(let m=0;m<b.length;m++){const k=b[m];if(k.type==="JOINT"){const w=Ne(k.id);ze(w,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",d)}for(s=0;s<e.length;s++)for(o=0;o<i.length;o++)if(r=i[o],r.bone.name===e[s].name){n[s]=r,r.processed=!0;break}for(s=0;s<i.length;s++)r=i[s],r.processed===!1&&(n.push(r),r.processed=!0);const u=[],l=[];for(s=0;s<n.length;s++)r=n[s],u.push(r.bone),l.push(r.boneInverse);return new a.Skeleton(u,l)}function ze(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let o=0;o<e.length;o++){const r=e[o];if(r.name===n.name){s=r.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function Yt(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,o=t.instanceCameras,r=t.instanceControllers,u=t.instanceLights,l=t.instanceGeometries,d=t.instanceNodes;for(let c=0,b=n.length;c<b;c++)e.push(Ne(n[c]));for(let c=0,b=o.length;c<b;c++){const m=kt(o[c]);m!==null&&e.push(m.clone())}for(let c=0,b=r.length;c<b;c++){const m=r[c],k=A(m.id),w=Be(k.id),K=Je(w,m.materials),H=m.skeletons,F=k.skin.joints,P=Kt(H,F);for(let he=0,ae=K.length;he<ae;he++){const Ae=K[he];Ae.isSkinnedMesh&&(Ae.bind(P,k.skin.bindMatrix),Ae.normalizeSkinWeights()),e.push(Ae)}}for(let c=0,b=u.length;c<b;c++){const m=Et(u[c]);m!==null&&e.push(m.clone())}for(let c=0,b=l.length;c<b;c++){const m=l[c],k=Be(m.id),w=Je(k,m.materials);for(let K=0,H=w.length;K<H;K++)e.push(w[K])}for(let c=0,b=d.length;c<b;c++)e.push(Ne(d[c]).clone());let y;if(n.length===0&&e.length===1)y=e[0];else{y=s==="JOINT"?new a.Bone:new a.Group;for(let c=0;c<e.length;c++)y.add(e[c])}return y.name=s==="JOINT"?t.sid:t.name,y.matrix.copy(i),y.matrix.decompose(y.position,y.quaternion,y.scale),y}const Xt=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function $t(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const o=e[t[n]];o===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(Xt)):i.push(mt(o))}return i}function Je(t,e){const i=[];for(const n in t){const s=t[n],o=$t(s.materialKeys,e);if(o.length===0&&(n==="lines"||n==="linestrips"?o.push(new a.LineBasicMaterial):o.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let d=0,y=o.length;d<y;d++){const c=o[d];if(c.isMeshPhongMaterial===!0||c.isMeshLambertMaterial===!0){const b=new a.LineBasicMaterial;b.color.copy(c.color),b.opacity=c.opacity,b.transparent=c.transparent,o[d]=b}}const r=s.data.attributes.skinIndex!==void 0,u=o.length===1?o[0]:o;let l;switch(n){case"lines":l=new a.LineSegments(s.data,u);break;case"linestrips":l=new a.Line(s.data,u);break;case"triangles":case"polylist":r?l=new a.SkinnedMesh(s.data,u):l=new a.Mesh(s.data,u);break}i.push(l)}return i}function We(t){return E.nodes[t]!==void 0}function Ne(t){return te(E.nodes[t],Yt)}function Zt(t){const e={name:t.getAttribute("name"),children:[]};Wt(t);const i=v(t,"node");for(let n=0;n<i.length;n++)e.children.push(Le(i[n]));E.visualScenes[t.getAttribute("id")]=e}function Ke(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(Ne(s.id))}return e}function Qt(t){return E.visualScenes[t]!==void 0}function Ye(t){return te(E.visualScenes[t],Ke)}function en(t){const e=v(t,"instance_visual_scene")[0];return Ye(S(e.getAttribute("url")))}function tn(){const t=E.clips;if(ie(t)===!0){if(ie(E.animations)===!1){const e=[];for(const i in E.animations){const n=B(i);for(let s=0,o=n.length;s<o;s++)e.push(n[s])}xe.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)xe.push(z(e))}function nn(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
|
|
2
|
-
`,i.push(...n.childNodes))}return e.trim()}if(O.length===0)return{scene:new a.Scene};const Xe=new DOMParser().parseFromString(O,"application/xml"),Q=v(Xe,"COLLADA")[0],Me=Xe.getElementsByTagName("parsererror")[0];if(Me!==void 0){const t=v(Me,"div")[0];let e;return t?e=t.textContent:e=nn(Me),console.error(`THREE.ColladaLoader: Failed to parse collada file.
|
|
3
|
-
`,e),null}const sn=Q.getAttribute("version");console.debug("THREE.ColladaLoader: File version",sn);const $e=ge(v(Q,"asset")[0]),Ze=new a.TextureLoader(this.manager);Ze.setPath(this.resourcePath||ee).setCrossOrigin(this.crossOrigin);let Re;tt&&(Re=new tt(this.manager),Re.setPath(this.resourcePath||ee));const Ee=new a.Color,xe=[];let Qe={},on=0;const E={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};Z(Q,"library_animations","animation",pe),Z(Q,"library_animation_clips","animation_clip",f),Z(Q,"library_controllers","controller",D),Z(Q,"library_images","image",h),Z(Q,"library_effects","effect",de),Z(Q,"library_materials","material",ht),Z(Q,"library_cameras","camera",gt),Z(Q,"library_lights","light",Nt),Z(Q,"library_geometries","geometry",xt),Z(Q,"library_nodes","node",Le),Z(Q,"library_visual_scenes","visual_scene",Zt),Z(Q,"library_kinematics_models","kinematics_model",vt),Z(Q,"library_physics_models","physics_model",Ut),Z(Q,"scene","instance_kinematics_scene",Bt),se(E.animations,U),se(E.clips,Y),se(E.controllers,_),se(E.images,T),se(E.effects,Fe),se(E.materials,Pe),se(E.cameras,Ue),se(E.lights,qe),se(E.geometries,je),se(E.visualScenes,Ke),tn(),zt();const Ce=en(v(Q,"scene")[0]);return Ce.animations=xe,$e.upAxis==="Z_UP"&&(console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."),Ce.rotation.set(-Math.PI/2,0,0)),Ce.scale.multiplyScalar($e.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),xe},kinematics:Qe,library:E,scene:Ce}}}const ve=new a.Quaternion,nt=new a.Euler;function Te(fe){return fe?fe.trim().split(/\s+/g).map(O=>parseFloat(O)):[0,0,0]}function it(fe,O,ee=!1){ee||fe.rotation.set(0,0,0),nt.set(O[0],O[1],O[2],"ZYX"),ve.setFromEuler(nt),ve.multiply(fe.quaternion),fe.quaternion.copy(ve)}class ln{constructor(O){this.manager=O||a.DefaultLoadingManager,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(O){return new Promise((ee,v)=>{this.load(O,ee,null,v)})}load(O,ee,v,oe){const R=this.manager,re=a.LoaderUtils.extractUrlBase(O),S=this.manager.resolveURL(O);R.itemStart(S),fetch(S,this.fetchOptions).then(X=>{if(X.ok)return v&&v(null),X.text();throw new Error(`URDFLoader: Failed to load url '${S}' with error code ${X.status} : ${X.statusText}.`)}).then(X=>{const ie=this.parse(X,this.workingPath||re);ee(ie),R.itemEnd(S)}).catch(X=>{oe?oe(X):console.error("URDFLoader: Error loading file.",X),R.itemError(S),R.itemEnd(S)})}parse(O,ee=this.workingPath){const v=this.packages,oe=this.loadMeshCb,R=this.parseVisual,re=this.parseCollision,S=this.manager,X={},ie={},ge={};function be(I){if(!/^package:\/\//.test(I))return ee?ee+I:I;const[U,B]=I.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof v=="string")return v.endsWith(U)?v+"/"+B:v+"/"+U+"/"+B;if(v instanceof Function)return v(U)+"/"+B;if(typeof v=="object")return U in v?v[U]+"/"+B:(console.error(`URDFLoader : ${U} not found in provided package list.`),null)}function ye(I){let U;I instanceof Document?U=[...I.children]:I instanceof Element?U=[I]:U=[...new DOMParser().parseFromString(I,"text/xml").children];const B=U.filter(x=>x.nodeName==="robot").pop();return Z(B)}function Z(I){const U=[...I.children],B=U.filter(M=>M.nodeName.toLowerCase()==="link"),x=U.filter(M=>M.nodeName.toLowerCase()==="joint"),W=U.filter(M=>M.nodeName.toLowerCase()==="material"),G=new a.URDFRobot;G.robotName=I.getAttribute("name"),G.urdfRobotNode=I,W.forEach(M=>{const N=M.getAttribute("name");ge[N]=pe(M)});const g={},p={};B.forEach(M=>{const N=M.getAttribute("name"),q=I.querySelector(`child[link="${N}"]`)===null;X[N]=te(M,g,p,q?G:null)}),x.forEach(M=>{const N=M.getAttribute("name");ie[N]=se(M)}),G.joints=ie,G.links=X,G.colliders=p,G.visual=g;const L=Object.values(ie);return L.forEach(M=>{M instanceof a.URDFMimicJoint&&ie[M.mimicJoint].mimicJoints.push(M)}),L.forEach(M=>{const N=new Set,q=ce=>{if(N.has(ce))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");N.add(ce),ce.mimicJoints.forEach(ne=>{q(ne)})};q(M)}),G.frames={...p,...g,...X,...ie},G}function se(I){const U=[...I.children],B=I.getAttribute("type");let x;const W=U.find(N=>N.nodeName.toLowerCase()==="mimic");W?(x=new a.URDFMimicJoint,x.mimicJoint=W.getAttribute("joint"),x.multiplier=parseFloat(W.getAttribute("multiplier")||1),x.offset=parseFloat(W.getAttribute("offset")||0)):x=new a.URDFJoint,x.urdfNode=I,x.name=I.getAttribute("name"),x.urdfName=x.name,x.jointType=B;let G=null,g=null,p=[0,0,0],L=[0,0,0];U.forEach(N=>{const q=N.nodeName.toLowerCase();q==="origin"?(p=Te(N.getAttribute("xyz")),L=Te(N.getAttribute("rpy"))):q==="child"?g=X[N.getAttribute("link")]:q==="parent"?G=X[N.getAttribute("link")]:q==="limit"&&(x.limit.lower=parseFloat(N.getAttribute("lower")||x.limit.lower),x.limit.upper=parseFloat(N.getAttribute("upper")||x.limit.upper))}),G.add(x),x.add(g),it(x,L),x.position.set(p[0],p[1],p[2]);const M=U.filter(N=>N.nodeName.toLowerCase()==="axis")[0];if(M){const N=M.getAttribute("xyz").split(/\s+/g).map(q=>parseFloat(q));x.axis=new a.Vector3(N[0],N[1],N[2]),x.axis.normalize()}return x}function te(I,U,B,x=null){x===null&&(x=new a.URDFLink);const W=[...I.children];return x.name=I.getAttribute("name"),x.urdfName=x.name,x.urdfNode=I,R&&W.filter(g=>g.nodeName.toLowerCase()==="visual").forEach(g=>{const p=me(g,ge);if(x.add(p),g.hasAttribute("name")){const L=g.getAttribute("name");p.name=L,p.urdfName=L,U[L]=p}}),re&&W.filter(g=>g.nodeName.toLowerCase()==="collision").forEach(g=>{const p=me(g);if(x.add(p),g.hasAttribute("name")){const L=g.getAttribute("name");p.name=L,p.urdfName=L,B[L]=p}}),x}function pe(I){const U=[...I.children],B=new a.MeshPhongMaterial;return B.name=I.getAttribute("name")||"",U.forEach(x=>{const W=x.nodeName.toLowerCase();if(W==="color"){const G=x.getAttribute("rgba").split(/\s/g).map(g=>parseFloat(g));B.color.setRGB(G[0],G[1],G[2]),B.opacity=G[3],B.transparent=G[3]<1,B.depthWrite=!B.transparent}else if(W==="texture"){const G=x.getAttribute("filename");if(G){const g=new a.TextureLoader(S),p=be(G);B.map=g.load(p),B.map.colorSpace=a.SRGBColorSpace}}}),B}function me(I,U={}){const B=I.nodeName.toLowerCase()==="collision",x=[...I.children];let W=null;const G=x.filter(p=>p.nodeName.toLowerCase()==="material")[0];if(G){const p=G.getAttribute("name");p&&p in U?W=U[p]:W=pe(G)}else W=new a.MeshPhongMaterial;const g=B?new a.URDFCollider:new a.URDFVisual;return g.urdfNode=I,x.forEach(p=>{const L=p.nodeName.toLowerCase();if(L==="geometry"){const M=p.children[0].nodeName.toLowerCase();if(M==="mesh"){const N=p.children[0].getAttribute("filename"),q=be(N);if(q!==null){const ce=p.children[0].getAttribute("scale");if(ce){const ne=Te(ce);g.scale.set(ne[0],ne[1],ne[2])}oe(q,S,(ne,f)=>{f?console.error("URDFLoader: Error loading mesh.",f):ne&&(ne instanceof a.Mesh&&(ne.material=W),ne.position.set(0,0,0),ne.quaternion.identity(),g.add(ne))})}}else if(M==="box"){const N=new a.Mesh;N.geometry=new a.BoxGeometry(1,1,1),N.material=W;const q=Te(p.children[0].getAttribute("size"));N.scale.set(q[0],q[1],q[2]),g.add(N)}else if(M==="sphere"){const N=new a.Mesh;N.geometry=new a.SphereGeometry(1,30,30),N.material=W;const q=parseFloat(p.children[0].getAttribute("radius"))||0;N.scale.set(q,q,q),g.add(N)}else if(M==="cylinder"){const N=new a.Mesh;N.geometry=new a.CylinderGeometry(1,1,1,30),N.material=W;const q=parseFloat(p.children[0].getAttribute("radius"))||0,ce=parseFloat(p.children[0].getAttribute("length"))||0;N.scale.set(q,ce,q),N.rotation.set(Math.PI/2,0,0),g.add(N)}}else if(L==="origin"){const M=Te(p.getAttribute("xyz")),N=Te(p.getAttribute("rpy"));g.position.set(M[0],M[1],M[2]),g.rotation.set(0,0,0),it(g,N)}}),g}return ye(O)}defaultMeshLoader(O,ee,v){/\.stl$/i.test(O)?new an.STLLoader(ee).load(O,R=>{const re=new a.Mesh(R,new a.MeshPhongMaterial);v(re)}):/\.dae$/i.test(O)?new cn(ee).load(O,R=>v(R.scene)):console.warn(`URDFLoader: Could not load model at ${O}.
|
|
4
|
-
No loader available`)}}exports.URDFLoader=ln;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=(t,o)=>{const c=t.__vccOpts||t;for(const[r,s]of o)c[r]=s;return c};exports._export_sfc=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const g=require("./index-BuZHI6xx.cjs"),k=require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-J7Knzs4U.cjs"),E=require("./index-CMUsYepp.cjs"),D=async n=>{const a=n.join("/"),c=sessionStorage.getItem("systemKey");return await g.getItemData(a,c,"")},T=n=>{var s;const a=n==null?void 0:n.compData,c=(s=a==null?void 0:a.find(i=>{const{key:r}=i;return r==="formContent"}))==null?void 0:s.contents,p={};return c==null||c.forEach(i=>{const{prop:r,value:b}=i;p[r]=b}),p},j=async()=>{let n={};const c=await D(["弯管仿真加工分析","模具筛选安装"]),p=g.getTargetGroup("输入(加工件)",c),s=T(p),i=s.管长||0,r=s.外径||0;console.log("管长",i,"外径",r,s);const b=i,_=r/2,G=await D(["弯管仿真加工分析","加工位姿生成"]),R=g.getTargetGroup("输入",G),d=T(R),P=d.夹持长度||0;console.log("夹持长度",P,d);const x=Number(P),l={},u=await D(["弯管仿真加工分析","仿真动画生成"]);u==null||u.forEach(e=>{var y,M,f,w,F,L;if((e==null?void 0:e.comp)==="Table"){let C=[],m=(f=(M=(y=e==null?void 0:e.compData)==null?void 0:y.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:M.contents)==null?void 0:f.map(t=>t==null?void 0:t.label),h=(L=(F=(w=e==null?void 0:e.compData)==null?void 0:w.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(o=>!(o!=null&&o.id)),t));h==null||h.forEach(t=>{C.push(g.getValueToObjectValue(t,m==null?void 0:m.filter(o=>o!=="操作")))}),l[e.name]=C,l[e.name+"Content"]=e}});const A=E.cloneDeep(l)||[];return n={initialPipeLength:b,pipeRadius:_,clampLength:x,animationData:A},n},q=async()=>{let n={};const c=await D(["双弯管仿真加工分析","模具筛选安装"]),p=g.getTargetGroup("输入(加工件)",c),s=T(p),i=s.管长||0,r=s.外径||0;console.log("管长",i,"外径",r,s);const b=i,_=r/2,G=await D(["双弯管仿真加工分析","加工工艺生成"]),R=g.getTargetGroup("输入",G),d=T(R),P=d.夹持位置||0;console.log("夹持长度",P,d);const x=Number(P),l={},u=await D(["双弯管仿真加工分析","仿真动画生成"]);u==null||u.forEach(e=>{var y,M,f,w,F,L;if((e==null?void 0:e.comp)==="Table"){let C=[],m=(f=(M=(y=e==null?void 0:e.compData)==null?void 0:y.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:M.contents)==null?void 0:f.map(t=>t==null?void 0:t.label),h=(L=(F=(w=e==null?void 0:e.compData)==null?void 0:w.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(o=>!(o!=null&&o.id)),t));h==null||h.forEach(t=>{C.push(g.getValueToObjectValue(t,m==null?void 0:m.filter(o=>o!=="操作")))}),l[e.name]=C,l[e.name+"Content"]=e}});const A=E.cloneDeep(l)||[];return n={initialPipeLength:b,pipeRadius:_,clampLength:x,animationData:A},n},B=async n=>await k.downloadFile(n),S=async n=>await k.readCsv(n),X=async n=>{const a=await B(n);return await S(a)};exports.fetchDoubleRobotAnimationData=q;exports.fetchSingleRobotAnimationData=j;exports.getFormData=T;exports.getMenuData=D;exports.initXYZBCList=X;
|
package/dist/array-DvMnFzsV.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),K=require("./index-DXsGi7zj.cjs"),v=require("./index-CMUsYepp.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=require("./index-BVaHwt5f.cjs"),Ie=require("./index-BmbAwtJ4.cjs"),Re=require("./index-B-pflqKE.cjs"),Le=require("./request-Dl8yi2iS.cjs"),Me={class:"type-select"},$e={class:"group-label"},Fe={class:"group-items"},He=["onDragstart"],Oe={__name:"index",props:{compContainerRef:Object},emits:[""],setup(l,{emit:n}){const d=v.useModelComp(v.pinia),{itemData:r,activeItemIndex:y}=v.storeToRefs(d),c=n,w=e.ref(null),h=e.computed(()=>{var P,O,$;const I={label:"布局",items:["TABS","LAYOUT"]},E={label:"常用",items:["FORM","TABLE"]},S={label:"高级",items:["STEP","TIMELINE","CHART","SIGNATURE","AVATAR","FOLD"]},b=(P=K.slotContent.value)==null?void 0:P.filter(R=>{var i,o;return(o=I==null?void 0:I.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())}),j=(O=K.slotContent.value)==null?void 0:O.filter(R=>{var i,o;return(o=E==null?void 0:E.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())}),N=($=K.slotContent.value)==null?void 0:$.filter(R=>{var i,o;return(o=S==null?void 0:S.items)==null?void 0:o.includes((i=R==null?void 0:R.type)==null?void 0:i.toUpperCase())});return[{...I,items:b},{...E,items:j},{...S,items:N}]}),V=(I,E)=>{try{I.dataTransfer.clearData();const S={...E,timestamp:Date.now()};I.dataTransfer.setData("application/json",JSON.stringify(S)),I.dataTransfer.effectAllowed="copyMove",I.target.classList.add("dragging"),c("handleDragStart",E)}catch(S){console.error("Drag start error:",S)}};return(I,E)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,b=>(e.openBlock(),e.createElementBlock("div",{class:"group-item",key:b==null?void 0:b.label},[e.createElementVNode("div",$e,e.toDisplayString(b==null?void 0:b.label),1),e.createElementVNode("div",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b==null?void 0:b.items,(j,N)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",title:"鼠标拖动",ref_for:!0,ref_key:"dragItem",ref:w,key:N,draggable:!0,onDragstart:P=>V(P,j)},[e.createVNode(S,{name:j.icon,style:{width:"15px",height:"15px"}},null,8,["name"]),e.createElementVNode("div",null,e.toDisplayString(j.name),1)],40,He))),128))])]))),128))])}}},Ae=oe._export_sfc(Oe,[["__scopeId","data-v-d9fa1a24"]]),le=v.useModelComp(v.pinia),{pageMapState:Ue}=v.storeToRefs(le),qe=v.useMenuState(),{activeMenuPath:Z}=v.storeToRefs(qe),q=e.ref([]),W=e.ref([]),ze=e.computed(()=>[{label:"任务配置",name:"任务配置",component:{comp:"Table",name:"任务配置",isShow:!0,compData:[{key:"header",contents:[{prop:"任务名称",align:"center",isRun:!1,label:"任务名称",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"任务关键词",align:"center",isRun:!1,label:"任务关键词",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"执行任务",align:"center",isRun:!1,label:"执行任务",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"执行交互",align:"center",isRun:!1,label:"执行交互",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"任务状态",align:"center",isRun:!1,label:"任务状态",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"创建时间",align:"center",isRun:!1,label:"创建时间",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{label:"操作"}]},{key:"rowButton",contents:[{label:"访问"},{label:"删除"}]},{key:"extraButton",contents:[{label:"创建"},{label:"批量删除"}]},{key:"tableFilter",contents:[]},{key:"tableContents",contents:q.value}]}},{label:"任务关联",name:"任务关联",component:{comp:"Table",name:"任务关联",isShow:!0,compData:[{key:"header",contents:[{prop:"关联名称",align:"center",isRun:!1,label:"关联名称",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"关联形式",align:"center",isRun:!1,label:"关联形式",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{prop:"关联任务集合",align:"center",isRun:!1,label:"关联任务集合",isRoute:!1,isTableColHidden:!0,isFormColHidden:!1},{prop:"关联状态",align:"center",isRun:!1,label:"关联状态",isRoute:!1,isTableColHidden:!1,isFormColHidden:!1},{label:"操作"}]},{key:"rowButton",contents:[{label:"访问"},{label:"删除"}]},{key:"extraButton",contents:[{label:"创建"},{label:"批量删除"}]},{key:"tableFilter",contents:[]},{key:"tableContents",contents:W.value}]}}]),M=e.ref([]),Ve=e.computed(()=>{var l;return(l=M.value)==null?void 0:l.map((n,d)=>({value:n==null?void 0:n.id,label:n==null?void 0:n.name}))}),te=e.ref("data"),Y=e.ref("任务配置"),Q=e.ref({}),z=e.ref(null),A=e.reactive({width:"30%",title:"任务配置",type:"创建",show:!1}),Ge=()=>{A.show=!1},Ke=(l,n)=>{var r,y,c,w,h,V,I,E,S;if(Q.value=v.cloneDeep(n),l==="删除")return Y.value==="任务配置"?q.value=(r=q.value)==null?void 0:r.filter(b=>(b==null?void 0:b.id)!==(n==null?void 0:n.id)):Y.value==="任务关联"&&(W.value=(y=W.value)==null?void 0:y.filter(b=>(b==null?void 0:b.id)!==(n==null?void 0:n.id))),le.setItemExtendData({任务配置:{pageKey:Z.value,compId:(c=z.value)==null?void 0:c.id,results:q.value},任务关联:{pageKey:Z.value,compId:(w=z.value)==null?void 0:w.id,results:W.value}});const d=n?(h=Object.keys(n))==null?void 0:h[1]:"";Y.value==="任务配置"?A.title=`当前配置:${(V=z.value)==null?void 0:V.name}>任务配置>【${(n==null?void 0:n[d])||l}】`:Y.value==="任务关联"&&(A.title=`当前配置:${(I=z.value)==null?void 0:I.name}>任务关联>【${(n==null?void 0:n[d])||l}】`),A.type=typeof((E=Q.value)==null?void 0:E.id)=="string"||!((S=Q.value)!=null&&S.id)?"创建":"编辑",A.show=l==="创建"||l==="访问"},je=l=>{var n;typeof l=="number"&&(z.value=(n=M.value)==null?void 0:n[l],Je()),te.value="data"},Pe=l=>{},We=l=>{var n,d;switch(Y.value){case"任务配置":A.type==="创建"?q.value.push(l==null?void 0:l.data):q.value=(n=q.value)==null?void 0:n.map(r=>{var y;return(r==null?void 0:r.id)===((y=l==null?void 0:l.data)==null?void 0:y.id)?{...r,...l==null?void 0:l.data}:r});break;case"任务关联":A.type==="创建"?W.value.push(l==null?void 0:l.data):W.value=(d=W.value)==null?void 0:d.map(r=>{var y;return(r==null?void 0:r.id)===((y=l==null?void 0:l.data)==null?void 0:y.id)?{...r,...l==null?void 0:l.data}:r});break}console.log("handleTableData:",q.value,l,A.type),le.setItemExtendData({任务配置:{pageKey:Z.value,compId:l==null?void 0:l.compId,results:q.value},任务关联:{pageKey:Z.value,compId:l==null?void 0:l.compId,results:W.value}}),A.show=!1},Ye=l=>{var n,d;if((l==null?void 0:l.buttonName)==="取消")A.show=!1;else if((l==null?void 0:l.buttonName)==="保存"){const r={compId:(n=z.value)==null?void 0:n.id,data:{...l==null?void 0:l.content,id:(d=Q.value)==null?void 0:d.id}};We(r)}},Ne=(l,n)=>{var c,w;const{target:d,styleConfigs:r}=l;if(!r)return;const y=r==null?void 0:r.reduce((h,V)=>(h[V.prop]=V.value,h),{});n?M.value=(w=M.value)==null?void 0:w.map(h=>(h==null?void 0:h.id)===(n==null?void 0:n.id)?{...h,...y}:h):M.value=(c=M.value)==null?void 0:c.map(h=>({...h,...y})),le.setItemData(M.value)},Te=l=>{},Ee=(l,n)=>{var d;return(d=l==null?void 0:l.filter(r=>{var y,c,w,h,V;return((c=(y=r==null?void 0:r.key)==null?void 0:y.relatedInfo)==null?void 0:c.target)===n&&((h=(w=r==null?void 0:r.key)==null?void 0:w.relatedInfo)==null?void 0:h.compId)===((V=z.value)==null?void 0:V.id)}))==null?void 0:d.map(r=>{var y;return{...(y=r==null?void 0:r.value)==null?void 0:y.tableData,id:r==null?void 0:r.id}})},Je=()=>{var n,d;const l=(d=(n=Ue.value)==null?void 0:n[Z.value])==null?void 0:d.filter(r=>{var y;return((y=r==null?void 0:r.key)==null?void 0:y.type)==="extend"});(l==null?void 0:l.length)!==0&&(q.value=Ee(l,"任务配置"),W.value=Ee(l,"任务关联"))},Xe={class:"fill-content"},Qe={class:"overall-config-wrapper"},Ze={class:"operate-content"},et=["onClick"],tt={class:"collapse-title-item",title:"编辑"},lt={key:1},at=["onClick"],ot={class:"icon-content"},nt={key:0,class:"edit-content"},st=["onClick"],rt={title:"设置"},ct=["onClick"],ut={class:"parent-main"},it={style:{display:"flex","justify-content":"space-between"}},dt={title:"样式"},pt={title:"交互"},vt={title:"扩展"},ft={style:{width:"100%","max-height":"500px",overflow:"auto"}},ht={__name:"index",setup(l){const n=v.useModelComp(v.pinia),{itemData:d,originalData:r}=v.storeToRefs(n),y=v.useMenuState(),{activeMenuPath:c}=v.storeToRefs(y);e.ref([]);const w=e.ref([]),h=e.ref([]),V=e.ref([]),I=e.computed(()=>{var i,o,g,f;return((i=M.value)==null?void 0:i.length)>0&&(o=M.value)!=null&&o.every(m=>{var L,F;return(m==null?void 0:m.comp)===((F=(L=M.value)==null?void 0:L[0])==null?void 0:F.comp)})?(f=(g=M.value)==null?void 0:g[0])==null?void 0:f.comp:null}),E=i=>{var g;let o=(g=v.cloneDeep(h.value))==null?void 0:g.map((f,m)=>(i===m&&(f.content=!0),f));h.value=o},S=i=>{var g;let o=(g=v.cloneDeep(h.value))==null?void 0:g.map((f,m)=>(i===m&&(f.content=!1),f));h.value=o,M.value=v.cloneDeep(d.value)},b=(i,o)=>{var L;let g=(L=v.cloneDeep(h.value))==null?void 0:L.map((F,u)=>(i===u&&(F.content=!1),F));h.value=g;const f=v.cloneDeep(d.value),m=f==null?void 0:f.filter((F,u)=>(u===i&&(F.name=o),F));n.setOriginalData(m),n.setItemData(m)},j=i=>{const o=v.cloneDeep(d.value),g=o==null?void 0:o.map((f,m)=>((f==null?void 0:f.name)===(i==null?void 0:i.name)?f.isShow=!(i!=null&&i.isShow):f.isShow=f.isShow,f));d.value=g};e.watch(()=>d.value,()=>{var i,o,g,f;!d.value||((i=d.value)==null?void 0:i.length)===0?M.value=[]:M.value=(o=d.value)==null?void 0:o.filter(m=>(m==null?void 0:m.comp)!=="methodButton"),w.value=M.value,h.value=(g=v.cloneDeep(w.value))==null?void 0:g.map((m,L)=>({id:L,content:!1})),V.value=(f=v.cloneDeep(w.value))==null?void 0:f.map((m,L)=>({id:L,isShow:m==null?void 0:m.isShow}))},{deep:!0,immediate:!0});const N=i=>K.getComponent(i),P=(i,o,g,f)=>{var L,F;if(!i)return;let m=v.cloneDeep(d.value);m=(L=m==null?void 0:m.map((u,_)=>{if(f&&_===g){const{compData:p,itemChildData:U}=i;return u.compData=p,u.itemChildData=U,u}return _===g&&(u.compData=i),u}))==null?void 0:L.filter(u=>(u==null?void 0:u.comp)!=="methodButton"),h.value=(F=v.cloneDeep(m))==null?void 0:F.map((u,_)=>({id:_,content:!1})),n.setOriginalData(m),n.setItemData(m)},O=e.ref(null),$=(i,o)=>{if(!o){n.setActiveItemIndex(i);return}n.setActiveItemIndex(-1)},R=i=>{v.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const o=v.cloneDeep(d.value),g=o==null?void 0:o.filter((f,m)=>m!==i);n.setOriginalData(g),n.setItemData(g),n.setActiveItemIndex(-1),Le.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(i,o)=>{var F;const g=e.resolveComponent("svg-icon"),f=e.resolveComponent("el-tab-pane"),m=e.resolveComponent("el-card"),L=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",Xe,[o[10]||(o[10]=e.createElementVNode("div",{class:"fill-operate"},"操作栏",-1)),e.createElementVNode("div",Qe,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(I.value+"style")),{target:"overall",optionItems:e.unref(Ve),compType:I.value,comp:(F=e.unref(M))==null?void 0:F[0],onChange:e.unref(Ne)},null,40,["optionItems","compType","comp","onChange"]))]),e.createElementVNode("div",Ze,[e.createVNode(Se.default,{class:"collapse-content",collapseContents:e.unref(M),accordion:!0,onChange:e.unref(je),ref_key:"ssCollapseRef",ref:O},{title:e.withCtx(({item:u,index:_,isActive:p})=>{var U,T,H,a,s,C,D,k,G,J;return[e.createElementVNode("div",{class:"collapse-title-content",onClick:x=>$(_,p)},[e.createElementVNode("div",tt,[(T=(U=h.value)==null?void 0:U.find(x=>x.id===_))!=null&&T.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:u.name&&u.name!==""?"8px":"0px"})},e.toDisplayString(u.name),5)),(a=(H=h.value)==null?void 0:H.find(x=>x.id===_))!=null&&a.content?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(Ie.ssInput,{modelValue:u.name,"onUpdate:modelValue":x=>u.name=x,onClick:o[0]||(o[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(C=(s=h.value)==null?void 0:s.find(x=>x.id===_))!=null&&C.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(x=>E(_),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Edit",style:{width:"13px",height:"13px"}})],8,at))]),e.createElementVNode("div",ot,[(k=(D=h.value)==null?void 0:D.find(x=>x.id===_))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(g,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(x=>S(_),["stop"])},null,8,["onClick"]),e.createVNode(g,{name:"Save",onClick:e.withModifiers(x=>b(_,u.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(J=(G=h.value)==null?void 0:G.find(x=>x.id===_))!=null&&J.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(x=>R(_),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,st))])],8,et)]}),content:e.withCtx(({item:u,index:_})=>[e.createVNode(L,{modelValue:e.unref(te),"onUpdate:modelValue":o[2]||(o[2]=p=>e.isRef(te)?te.value=p:null),class:"config-tabs",onTabClick:$},{default:e.withCtx(()=>[e.createVNode(f,{label:"设置",name:"data"},{label:e.withCtx(()=>[e.createElementVNode("span",rt,[e.createVNode(g,{name:"LowCodeSetting",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[3]||(o[3]=e.createTextVNode("设置"))])]),default:e.withCtx(()=>{var p,U;return[e.createElementVNode("div",{class:"comp-child",onClick:T=>$(_)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(u.comp+"Operate")),{itemContents:u==null?void 0:u.compData,originalItemContents:(U=(p=w.value)==null?void 0:p.find((T,H)=>H===_))==null?void 0:U.compData,itemChildData:u==null?void 0:u.itemChildData,onChange:(T,H)=>P(T,u,_,H)},null,40,["itemContents","originalItemContents","itemChildData","onChange"]))],8,ct),e.createElementVNode("div",ut,[o[5]||(o[5]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("显隐控制"))],-1)),e.createElementVNode("div",it,[o[4]||(o[4]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否显示"),-1)),e.createVNode(Ie._sfc_main$1,{value:V.value.find(T=>T.id===_).isShow,"onUpdate:value":T=>V.value.find(H=>H.id===_).isShow=T,onClick:T=>j(u)},null,8,["value","onUpdate:value","onClick"])])])]}),_:2},1024),e.createVNode(f,{label:"样式",name:"style"},{label:e.withCtx(()=>[e.createElementVNode("span",dt,[e.createVNode(g,{name:"LowCodeStyle",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[6]||(o[6]=e.createTextVNode("样式"))])]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N((u==null?void 0:u.comp)+"style")),{target:"alone",compType:u==null?void 0:u.comp,comp:u,optionItems:e.unref(Ve),onChange:p=>e.unref(Ne)(p,u)},null,40,["compType","comp","optionItems","onChange"]))]),_:2},1024),e.createVNode(f,{label:"交互",name:"event"},{label:e.withCtx(()=>[e.createElementVNode("span",pt,[e.createVNode(g,{name:"LowCodeEvent",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[7]||(o[7]=e.createTextVNode("交互"))])]),default:e.withCtx(()=>[o[8]||(o[8]=e.createTextVNode(" 交互 "))]),_:1,__:[8]}),e.createVNode(f,{label:"扩展",name:"extend"},{label:e.withCtx(()=>[e.createElementVNode("span",vt,[e.createVNode(g,{name:"LowCodeExtend",style:{width:"15px",height:"15px","margin-right":"5px"}}),o[9]||(o[9]=e.createTextVNode("扩展"))])]),default:e.withCtx(()=>[e.createVNode(L,{"tab-position":"left",modelValue:e.unref(Y),"onUpdate:modelValue":o[1]||(o[1]=p=>e.isRef(Y)?Y.value=p:null),class:"extend-tabs",onTabChange:e.unref(Pe)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ze),(p,U)=>(e.openBlock(),e.createBlock(f,{key:p==null?void 0:p.name,label:p==null?void 0:p.label,name:p==null?void 0:p.name},{default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>{var T,H,a;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N((T=p==null?void 0:p.component)==null?void 0:T.comp)),{compItem:p==null?void 0:p.component,itemData:(H=p==null?void 0:p.component)==null?void 0:H.compData,childItemData:(a=p==null?void 0:p.component)==null?void 0:a.itemChildData,key:U,level:1,onChange:e.unref(Te),onOnButtonClick:e.unref(Ke)},null,40,["compItem","itemData","childItemData","onChange","onOnButtonClick"]))]}),_:2},1024)]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue","onTabChange"])]),_:1})]),_:2},1032,["modelValue"])]),_:1},8,["collapseContents","onChange"])]),e.createVNode(Re.ssDialog,{class:"task-dialog-wrapper",visible:e.unref(A).show,title:e.unref(A).title,dialogWidth:e.unref(A).width,onBeforeDestroy:e.unref(Ge)},{default:e.withCtx(()=>{var u,_;return[e.createElementVNode("div",ft,[e.unref(z)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(((u=e.unref(z))==null?void 0:u.comp)+"extend")),{key:0,target:"alone",comp:e.unref(z),extendItem:e.unref(Q),compType:(_=e.unref(z))==null?void 0:_.comp,activeTabName:e.unref(Y),relatedData:e.unref(q),onChange:e.unref(Te),onOnButtonClick:e.unref(Ye)},null,40,["comp","extendItem","compType","activeTabName","relatedData","onChange","onOnButtonClick"])):e.createCommentVNode("",!0)])]}),_:1},8,["visible","title","dialogWidth","onBeforeDestroy"])])}}},mt=oe._export_sfc(ht,[["__scopeId","data-v-2ea026b9"]]),gt={style:{display:"flex"}},Ct={style:{display:"flex"}},kt={key:2},yt={key:4,style:{"margin-top":"30px"}},_t={__name:"index",setup(l){const n=v.useModelComp(v.pinia),{itemData:d,activeItemIndex:r,pageMapState:y}=v.storeToRefs(n),c=e.ref([]),w=e.ref(0),h=e.ref(""),V=v.useMenuState(v.pinia),{activeMenuPath:I}=v.storeToRefs(V),E=e.ref(null),S=e.ref(null),b=e.ref(24),j=e.ref(2),N=e.ref([]),P=e.ref([]),O=e.computed(()=>{var a,s,C;return{default:!i.value&&!R.value&&$.value==="vertical"&&((a=c.value)==null?void 0:a.length)>0,grid:i.value&&!R.value&&$.value==="vertical",tab:$.value==="horizontal"&&((s=c.value)==null?void 0:s.length)>0,step:R.value&&$.value==="vertical"&&((C=c.value)==null?void 0:C.length)>0}}),$=e.computed(()=>{var a,s,C,D;return((a=c.value)==null?void 0:a.length)>0&&((s=c.value)!=null&&s.every(k=>k==null?void 0:k.layout))?(D=(C=c.value)==null?void 0:C[0])==null?void 0:D.layout:"vertical"}),R=e.computed(()=>{var a,s;return(s=(a=c.value)==null?void 0:a[0])==null?void 0:s.isStepLayout}),i=e.computed(()=>{var a,s;return(s=(a=c.value)==null?void 0:a[0])==null?void 0:s.isGridLayout}),o=e.ref(null),g=e.computed(()=>{var a,s,C;return((a=c.value)==null?void 0:a.length)>0&&$.value==="horizontal"?(C=(s=c.value)==null?void 0:s[0])==null?void 0:C.name:""}),f=(a,s)=>{w.value=s,o.value=a},m=a=>{var k;if(!a)return;let s=null;const C=v.cloneDeep(c.value);if(r.value>=0&&(s=C==null?void 0:C[r.value]),s&&s.comp==="Layout"){const{compData:G=[]}=s;((k=G==null?void 0:G.find(x=>{const{key:ee}=x;return ee==="children"}))==null?void 0:k.contents).push({comp:a.comp,name:a.name,compData:[]}),n.setItemData(C);return}const D=v.cloneDeep(c.value);D.push({comp:a.comp,name:a.name,compData:[]}),n.setItemData(D),T(D)},L=a=>{a.preventDefault(),a.dataTransfer.dropEffect="copy"},F=async a=>{try{const s=a.dataTransfer.getData("application/json");if(!s)return;const C=JSON.parse(s),D=await u(a),k=_(C,D);await e.nextTick(),p(k),m(JSON.parse(s||"")),console.log("drop"),U()}catch(s){console.error("Drop error:",s),U()}},u=async a=>E.value?new Promise(s=>{requestAnimationFrame(()=>{const C=E.value.getBoundingClientRect(),D=a.clientX-C.left,k=a.clientY,G=Math.floor(D/(C.width/b.value)),J=Math.floor(k/(C.width/b.value));s({x:Math.max(0,G),y:Math.max(0,J),w:b.value,h:j.value})})}):{x:0,y:0},_=(a,s)=>{var D,k;const C=`item_${Date.now()}_${(k=(D=Math.random())==null?void 0:D.toString(36))==null?void 0:k.substring(2,9)}`;return{i:C,id:C,x:s.x,y:s.y,w:s.w,h:s.h,component:a,minW:2,minH:2}},p=a=>{T([...N.value,a],!0)},U=()=>{document.querySelectorAll(".dragging").forEach(a=>{a.classList.remove("dragging")})},T=(a,s)=>{N.value=s?a:K.generateLayouts(a),n.setItemGridData({pageKey:I.value,results:N.value}),V.setContentLoading(!1)};e.watch(()=>O.value.step,a=>{var s;a&&f((s=c.value)==null?void 0:s[0],1)},{immediate:!0}),e.watch(()=>O.value.grid,a=>{var s,C;!a&&((s=N.value)==null?void 0:s.length)>0&&n.setItemGridData({pageKey:I.value,results:(C=N.value)==null?void 0:C.map(D=>D==null?void 0:D.id),isDelete:!0})},{immediate:!0}),e.watch(()=>d.value,a=>{var s,C,D;V.setContentLoading(!0),c.value=!a||(a==null?void 0:a.length)===0?[]:(s=v.cloneDeep(a))==null?void 0:s.filter(k=>!(k!=null&&k.affix)||(k==null?void 0:k.affix)==="default"),P.value=!a||(a==null?void 0:a.length)===0?[]:(C=v.cloneDeep(a))==null?void 0:C.filter(k=>(k==null?void 0:k.affix)&&(k==null?void 0:k.affix)!=="default"),(D=O.value)!=null&&D.grid&&T(c.value)},{deep:!0,immediate:!0});const H=a=>K.getComponent(a);return(a,s)=>{var J,x,ee,ne,se,re,ce,ue,ie,de,pe,ve;const C=e.resolveComponent("el-tab-pane"),D=e.resolveComponent("el-tabs"),k=e.resolveComponent("el-step"),G=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:E,class:"low-code-wrapper",onDragover:L,onDrop:F},[(J=O.value)!=null&&J.default?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(c.value,(t,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",gt,e.toDisplayString(t.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(t.comp)),{itemData:t==null?void 0:t.compData,childItemData:t==null?void 0:t.itemChildData,key:B,config:{showIndex:t==null?void 0:t.showIndex,allowMove:t==null?void 0:t.allowMove,viewport:t==null?void 0:t.viewport},pageLayout:$.value,parentTableId:t==null?void 0:t.tableId,children:t==null?void 0:t.children,level:1},null,8,["itemData","childItemData","config","pageLayout","parentTableId","children"]))]))),128)):e.createCommentVNode("",!0),(x=O.value)!=null&&x.grid?(e.openBlock(),e.createBlock(e.unref(K.De),{key:1,ref_key:"gridLayoutRef",ref:S,layout:N.value,"onUpdate:layout":s[0]||(s[0]=t=>N.value=t),"prevent-collision":!1,"is-draggable":!0,"is-resizable":!0,responsive:!1,"col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(t,B)=>{var ae,fe;return e.openBlock(),e.createBlock(e.unref(K.st),{key:t.i,x:t.x,y:t.y,"min-h":t.minH,"max-h":t.maxH,"min-w":t.minW,w:t.w,h:e.unref(K.verifyButton)((ae=c.value[B])==null?void 0:ae.comp)?0:t.h,i:t.i,class:e.normalizeClass(e.unref(K.verifyButton)((fe=c.value[B])==null?void 0:fe.comp)?"grid-method-button":"")},{default:e.withCtx(()=>{var he,me,ge,Ce,ke,ye,_e,be,De,we,xe,Be;return[e.createElementVNode("div",{class:e.normalizeClass((me=P.value)!=null&&me.includes((he=t==null?void 0:t.component)==null?void 0:he.id)?"comp-wrapper affix-content":"comp-wrapper")},[e.createElementVNode("div",Ct,e.toDisplayString((ge=c.value[B])==null?void 0:ge.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H((Ce=c.value[B])==null?void 0:Ce.comp)),{pageLayout:$.value,itemData:(ke=c.value[B])==null?void 0:ke.compData,childItemData:(ye=c.value[B])==null?void 0:ye.itemChildData,index:((_e=c.value[B])==null?void 0:_e.id)??B,parentTableId:(be=c.value[B])==null?void 0:be.tableId,children:(De=c.value[B])==null?void 0:De.children,level:1,config:{showIndex:(we=c.value[B])==null?void 0:we.showIndex,allowMove:(xe=c.value[B])==null?void 0:xe.allowMove,viewport:(Be=c.value[B])==null?void 0:Be.viewport}},null,8,["pageLayout","itemData","childItemData","index","parentTableId","children","config"]))],2)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i","class"])}),128))]),_:1},8,["layout"])):e.createCommentVNode("",!0),(ee=O.value)!=null&&ee.tab?(e.openBlock(),e.createElementBlock("div",kt,[e.createVNode(D,{modelValue:g.value,"onUpdate:modelValue":s[1]||(s[1]=t=>g.value=t),type:"card",class:"display-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,B)=>(e.openBlock(),e.createBlock(C,{key:t.i,label:t==null?void 0:t.name,name:t==null?void 0:t.name},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(t==null?void 0:t.comp)),{pageLayout:$.value,itemData:t==null?void 0:t.compData,childItemData:t==null?void 0:t.itemChildData,key:B,config:{showIndex:t==null?void 0:t.showIndex,allowMove:t==null?void 0:t.allowMove,viewport:t==null?void 0:t.viewport}},null,8,["pageLayout","itemData","childItemData","config"]))]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),(ne=O.value)!=null&&ne.step?(e.openBlock(),e.createBlock(G,{key:3,direction:"horizontal",active:w.value,"align-center":!0,class:"display-steps"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,B)=>(e.openBlock(),e.createBlock(k,{key:B,class:"step-item",status:h.value,onClick:ae=>f(t,B+1)},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t==null?void 0:t.name),1)]),_:2},1032,["status","onClick"]))),128))]),_:1},8,["active"])):e.createCommentVNode("",!0),(se=O.value)!=null&&se.step?(e.openBlock(),e.createElementBlock("div",yt,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H((re=o.value)==null?void 0:re.comp)),{pageLayout:$.value,itemData:(ce=o.value)==null?void 0:ce.compData,childItemData:(ue=o.value)==null?void 0:ue.itemChildData,key:(ie=o.value)==null?void 0:ie.id,config:{showIndex:(de=o.value)==null?void 0:de.showIndex,allowMove:(pe=o.value)==null?void 0:pe.allowMove,viewport:(ve=o.value)==null?void 0:ve.viewport}},null,8,["pageLayout","itemData","childItemData","config"]))])):e.createCommentVNode("",!0)],544)}}},bt=oe._export_sfc(_t,[["__scopeId","data-v-1a8ba107"]]),X=e.ref(0),Dt=l=>l.reduce((d,r)=>{var c,w;const y=Object.values(d);return(((c=Object.keys(d))==null?void 0:c.length)===0||y[y.length-1].length>=(r==null?void 0:r.width))&&(d[X.value]=[],X.value++),d[X.value-1].push(r),((w=Object.keys(d))==null?void 0:w.length)===(r==null?void 0:r.width)&&(d[X.value]=[],X.value++),d},{});exports.arrayToNumberArray=Dt;exports.modelFill=mt;exports.modelSelect=Ae;exports.modelShow=bt;
|
package/dist/clone-C9CqV0vm.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./index-CMUsYepp.cjs");var r=4;function c(e){return n.baseClone(e,r)}exports.clone=c;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./request-Dl8yi2iS.cjs"),l=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),a={class:"icon-selector-warp-item"},i={__name:"eleIcon",props:{name:{type:String,required:!0}},setup(t){const n=t,r=e.computed(()=>o.Icons[n.name]||o.question_filled_default);return(c,p)=>{const s=e.resolveComponent("el-icon");return e.openBlock(),e.createElementBlock("div",a,[e.createVNode(s,e.normalizeProps(e.guardReactiveProps(c.$attrs)),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value)))]),_:1},16)])}}},u=l._export_sfc(i,[["__scopeId","data-v-6dd0bfd5"]]);exports.default=u;
|