diff --git a/assets/howler-b6e8b4fe.js b/assets/howler-d5aaf79f.js similarity index 99% rename from assets/howler-b6e8b4fe.js rename to assets/howler-d5aaf79f.js index 44f28d58..4fdf6453 100644 --- a/assets/howler-b6e8b4fe.js +++ b/assets/howler-d5aaf79f.js @@ -1,4 +1,4 @@ -import{g as L,c as S}from"./index-98f215b3.js";function D(b,g){for(var r=0;ru[i]})}}}return Object.freeze(Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}))}var O={};/*! +import{g as L,c as S}from"./index-57218967.js";function D(b,g){for(var r=0;ru[i]})}}}return Object.freeze(Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}))}var O={};/*! * howler.js v2.2.3 * howlerjs.com * diff --git a/assets/index-98f215b3.js b/assets/index-57218967.js similarity index 99% rename from assets/index-98f215b3.js rename to assets/index-57218967.js index c02c03b7..0adfc39b 100644 --- a/assets/index-98f215b3.js +++ b/assets/index-57218967.js @@ -4225,7 +4225,7 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */(function(n,e){(function(t){n.exports=t()})(function(){return function t(r,i,s){function o(A,c){if(!i[A]){if(!r[A]){var u=typeof wy=="function"&&wy;if(!c&&u)return u(A,!0);if(a)return a(A,!0);var h=new Error("Cannot find module '"+A+"'");throw h.code="MODULE_NOT_FOUND",h}var d=i[A]={exports:{}};r[A][0].call(d.exports,function(p){var f=r[A][1][p];return o(f||p)},d,d.exports,t,r,i,s)}return i[A].exports}for(var a=typeof wy=="function"&&wy,l=0;l>2,d=(3&A)<<4|c>>4,p=1>6:64,f=2>4,c=(15&h)<<4|(d=a.indexOf(l.charAt(f++)))>>2,u=(3&d)<<6|(p=a.indexOf(l.charAt(f++))),v[m++]=A,d!==64&&(v[m++]=c),p!==64&&(v[m++]=u);return v}},{"./support":30,"./utils":32}],2:[function(t,r,i){var s=t("./external"),o=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),l=t("./stream/DataLengthProbe");function A(c,u,h,d,p){this.compressedSize=c,this.uncompressedSize=u,this.crc32=h,this.compression=d,this.compressedContent=p}A.prototype={getContentWorker:function(){var c=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),u=this;return c.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),c},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},A.createWorkerFrom=function(c,u,h){return c.pipe(new a).pipe(new l("uncompressedSize")).pipe(u.compressWorker(h)).pipe(new l("compressedSize")).withStreamInfo("compression",u)},r.exports=A},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,r,i){var s=t("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,r,i){var s=t("./utils"),o=function(){for(var a,l=[],A=0;A<256;A++){a=A;for(var c=0;c<8;c++)a=1&a?3988292384^a>>>1:a>>>1;l[A]=a}return l}();r.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?function(A,c,u,h){var d=o,p=h+u;A^=-1;for(var f=h;f>>8^d[255&(A^c[f])];return-1^A}(0|l,a,a.length,0):function(A,c,u,h){var d=o,p=h+u;A^=-1;for(var f=h;f>>8^d[255&(A^c.charCodeAt(f))];return-1^A}(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(t,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(t,r,i){var s=null;s=typeof Promise<"u"?Promise:t("lie"),r.exports={Promise:s}},{lie:37}],7:[function(t,r,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=t("pako"),a=t("./utils"),l=t("./stream/GenericWorker"),A=s?"uint8array":"array";function c(u,h){l.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=h,this.meta={}}i.magic="\b\0",a.inherits(c,l),c.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(A,u.data),!1)},c.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(h){u.push({data:h,meta:u.meta})}},i.compressWorker=function(u){return new c("Deflate",u)},i.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r,i){function s(d,p){var f,m="";for(f=0;f>>=8;return m}function o(d,p,f,m,g,v){var w,B,C=d.file,b=d.compression,F=v!==A.utf8encode,x=a.transformTo("string",v(C.name)),E=a.transformTo("string",A.utf8encode(C.name)),M=C.comment,H=a.transformTo("string",v(M)),O=a.transformTo("string",A.utf8encode(M)),U=E.length!==C.name.length,y=O.length!==M.length,I="",R="",D="",k=C.dir,V=C.date,Z={crc32:0,compressedSize:0,uncompressedSize:0};p&&!f||(Z.crc32=d.crc32,Z.compressedSize=d.compressedSize,Z.uncompressedSize=d.uncompressedSize);var N=0;p&&(N|=8),F||!U&&!y||(N|=2048);var _=0,z=0;k&&(_|=16),g==="UNIX"?(z=798,_|=function(T,q){var ge=T;return T||(ge=q?16893:33204),(65535&ge)<<16}(C.unixPermissions,k)):(z=20,_|=function(T){return 63&(T||0)}(C.dosPermissions)),w=V.getUTCHours(),w<<=6,w|=V.getUTCMinutes(),w<<=5,w|=V.getUTCSeconds()/2,B=V.getUTCFullYear()-1980,B<<=4,B|=V.getUTCMonth()+1,B<<=5,B|=V.getUTCDate(),U&&(R=s(1,1)+s(c(x),4)+E,I+="up"+s(R.length,2)+R),y&&(D=s(1,1)+s(c(H),4)+O,I+="uc"+s(D.length,2)+D);var ie="";return ie+=` -\0`,ie+=s(N,2),ie+=b.magic,ie+=s(w,2),ie+=s(B,2),ie+=s(Z.crc32,4),ie+=s(Z.compressedSize,4),ie+=s(Z.uncompressedSize,4),ie+=s(x.length,2),ie+=s(I.length,2),{fileRecord:u.LOCAL_FILE_HEADER+ie+x+I,dirRecord:u.CENTRAL_FILE_HEADER+s(z,2)+ie+s(H.length,2)+"\0\0\0\0"+s(_,4)+s(m,4)+x+I+H}}var a=t("../utils"),l=t("../stream/GenericWorker"),A=t("../utf8"),c=t("../crc32"),u=t("../signature");function h(d,p,f,m){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=p,this.zipPlatform=f,this.encodeFileName=m,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,l),h.prototype.push=function(d){var p=d.meta.percent||0,f=this.entriesCount,m=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,l.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:f?(p+100*(f-m-1))/f:100}}))},h.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var p=this.streamFiles&&!d.file.dir;if(p){var f=o(d,p,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(d){this.accumulate=!1;var p=this.streamFiles&&!d.file.dir,f=o(d,p,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),p)this.push({data:function(m){return u.DATA_DESCRIPTOR+s(m.crc32,4)+s(m.compressedSize,4)+s(m.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var d=this.bytesWritten,p=0;p=this.index;l--)A=(A<<8)+this.byteAt(l);return this.index+=a,A},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=o},{"../utils":32}],19:[function(t,r,i){var s=t("./Uint8ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,r,i){var s=t("./DataReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,r,i){var s=t("./ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,i){var s=t("../utils"),o=t("../support"),a=t("./ArrayReader"),l=t("./StringReader"),A=t("./NodeBufferReader"),c=t("./Uint8ArrayReader");r.exports=function(u){var h=s.getTypeOf(u);return s.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new A(u):o.uint8array?new c(s.transformTo("uint8array",u)):new a(s.transformTo("array",u)):new l(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,r,i){var s=t("./GenericWorker"),o=t("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,r,i){var s=t("./GenericWorker"),o=t("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,i){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var A=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=A+l.data.length}o.prototype.processChunk.call(this,l)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,i){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataWorker");var A=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(c){A.dataIsReady=!0,A.data=c,A.max=c&&c.length||0,A.type=s.getTypeOf(c),A.isPaused||A._tickAndRepeat()},function(c){A.error(c)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,A=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,A);break;case"uint8array":l=this.data.subarray(this.index,A);break;case"array":case"nodebuffer":l=this.data.slice(this.index,A)}return this.index=A,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,r,i){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l "+o:o}},r.exports=s},{}],29:[function(t,r,i){var s=t("../utils"),o=t("./ConvertWorker"),a=t("./GenericWorker"),l=t("../base64"),A=t("../support"),c=t("../external"),u=null;if(A.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(p,f){return new c.Promise(function(m,g){var v=[],w=p._internalType,B=p._outputType,C=p._mimeType;p.on("data",function(b,F){v.push(b),f&&f(F)}).on("error",function(b){v=[],g(b)}).on("end",function(){try{var b=function(F,x,E){switch(F){case"blob":return s.newBlob(s.transformTo("arraybuffer",x),E);case"base64":return l.encode(x);default:return s.transformTo(F,x)}}(B,function(F,x){var E,M=0,H=null,O=0;for(E=0;E"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(t,r,i){for(var s=t("./utils"),o=t("./support"),a=t("./nodejsUtils"),l=t("./stream/GenericWorker"),A=new Array(256),c=0;c<256;c++)A[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;A[254]=A[254]=1;function u(){l.call(this,"utf-8 decode"),this.leftOver=null}function h(){l.call(this,"utf-8 encode")}i.utf8encode=function(d){return o.nodebuffer?a.newBufferFrom(d,"utf-8"):function(p){var f,m,g,v,w,B=p.length,C=0;for(v=0;v>>6:(m<65536?f[w++]=224|m>>>12:(f[w++]=240|m>>>18,f[w++]=128|m>>>12&63),f[w++]=128|m>>>6&63),f[w++]=128|63&m);return f}(d)},i.utf8decode=function(d){return o.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):function(p){var f,m,g,v,w=p.length,B=new Array(2*w);for(f=m=0;f>10&1023,B[m++]=56320|1023&g)}return B.length!==m&&(B.subarray?B=B.subarray(0,m):B.length=m),s.applyFromCharCode(B)}(d=s.transformTo(o.uint8array?"uint8array":"array",d))},s.inherits(u,l),u.prototype.processChunk=function(d){var p=s.transformTo(o.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var f=p;(p=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),p.set(f,this.leftOver.length)}else p=this.leftOver.concat(p);this.leftOver=null}var m=function(v,w){var B;for((w=w||v.length)>v.length&&(w=v.length),B=w-1;0<=B&&(192&v[B])==128;)B--;return B<0||B===0?w:B+A[v[B]]>w?B:w}(p),g=p;m!==p.length&&(o.uint8array?(g=p.subarray(0,m),this.leftOver=p.subarray(m,p.length)):(g=p.slice(0,m),this.leftOver=p.slice(m,p.length))),this.push({data:i.utf8decode(g),meta:d.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=u,s.inherits(h,l),h.prototype.processChunk=function(d){this.push({data:i.utf8encode(d.data),meta:d.meta})},i.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,i){var s=t("./support"),o=t("./base64"),a=t("./nodejsUtils"),l=t("./external");function A(f){return f}function c(f,m){for(var g=0;g>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var p,f,m,g=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4>>6:(d<65536?h[m++]=224|d>>>12:(h[m++]=240|d>>>18,h[m++]=128|d>>>12&63),h[m++]=128|d>>>6&63),h[m++]=128|63&d);return h},i.buf2binstring=function(u){return c(u,u.length)},i.binstring2buf=function(u){for(var h=new s.Buf8(u.length),d=0,p=h.length;d>10&1023,v[p++]=56320|1023&f)}return c(v,p)},i.utf8border=function(u,h){var d;for((h=h||u.length)>u.length&&(h=u.length),d=h-1;0<=d&&(192&u[d])==128;)d--;return d<0||d===0?h:d+l[u[d]]>h?d:h}},{"./common":41}],43:[function(t,r,i){r.exports=function(s,o,a,l){for(var A=65535&s|0,c=s>>>16&65535|0,u=0;a!==0;){for(a-=u=2e3>>1:o>>>1;a[l]=o}return a}();r.exports=function(o,a,l,A){var c=s,u=A+l;o^=-1;for(var h=A;h>>8^c[255&(o^a[h])];return-1^o}},{}],46:[function(t,r,i){var s,o=t("../utils/common"),a=t("./trees"),l=t("./adler32"),A=t("./crc32"),c=t("./messages"),u=0,h=4,d=0,p=-2,f=-1,m=4,g=2,v=8,w=9,B=286,C=30,b=19,F=2*B+1,x=15,E=3,M=258,H=M+E+1,O=42,U=113,y=1,I=2,R=3,D=4;function k(P,fe){return P.msg=c[fe],fe}function V(P){return(P<<1)-(4P.avail_out&&(de=P.avail_out),de!==0&&(o.arraySet(P.output,fe.pending_buf,fe.pending_out,de,P.next_out),P.next_out+=de,fe.pending_out+=de,P.total_out+=de,P.avail_out-=de,fe.pending-=de,fe.pending===0&&(fe.pending_out=0))}function _(P,fe){a._tr_flush_block(P,0<=P.block_start?P.block_start:-1,P.strstart-P.block_start,fe),P.block_start=P.strstart,N(P.strm)}function z(P,fe){P.pending_buf[P.pending++]=fe}function ie(P,fe){P.pending_buf[P.pending++]=fe>>>8&255,P.pending_buf[P.pending++]=255&fe}function T(P,fe){var de,ee,K=P.max_chain_length,se=P.strstart,ye=P.prev_length,ne=P.nice_match,J=P.strstart>P.w_size-H?P.strstart-(P.w_size-H):0,Y=P.window,ue=P.w_mask,le=P.prev,we=P.strstart+M,G=Y[se+ye-1],Q=Y[se+ye];P.prev_length>=P.good_match&&(K>>=2),ne>P.lookahead&&(ne=P.lookahead);do if(Y[(de=fe)+ye]===Q&&Y[de+ye-1]===G&&Y[de]===Y[se]&&Y[++de]===Y[se+1]){se+=2,de++;do;while(Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&seJ&&--K!=0);return ye<=P.lookahead?ye:P.lookahead}function q(P){var fe,de,ee,K,se,ye,ne,J,Y,ue,le=P.w_size;do{if(K=P.window_size-P.lookahead-P.strstart,P.strstart>=le+(le-H)){for(o.arraySet(P.window,P.window,le,le,0),P.match_start-=le,P.strstart-=le,P.block_start-=le,fe=de=P.hash_size;ee=P.head[--fe],P.head[fe]=le<=ee?ee-le:0,--de;);for(fe=de=le;ee=P.prev[--fe],P.prev[fe]=le<=ee?ee-le:0,--de;);K+=le}if(P.strm.avail_in===0)break;if(ye=P.strm,ne=P.window,J=P.strstart+P.lookahead,Y=K,ue=void 0,ue=ye.avail_in,Y=E)for(se=P.strstart-P.insert,P.ins_h=P.window[se],P.ins_h=(P.ins_h<=E&&(P.ins_h=(P.ins_h<=E)if(ee=a._tr_tally(P,P.strstart-P.match_start,P.match_length-E),P.lookahead-=P.match_length,P.match_length<=P.max_lazy_match&&P.lookahead>=E){for(P.match_length--;P.strstart++,P.ins_h=(P.ins_h<=E&&(P.ins_h=(P.ins_h<=E&&P.match_length<=P.prev_length){for(K=P.strstart+P.lookahead-E,ee=a._tr_tally(P,P.strstart-1-P.prev_match,P.prev_length-E),P.lookahead-=P.prev_length-1,P.prev_length-=2;++P.strstart<=K&&(P.ins_h=(P.ins_h<P.pending_buf_size-5&&(de=P.pending_buf_size-5);;){if(P.lookahead<=1){if(q(P),P.lookahead===0&&fe===u)return y;if(P.lookahead===0)break}P.strstart+=P.lookahead,P.lookahead=0;var ee=P.block_start+de;if((P.strstart===0||P.strstart>=ee)&&(P.lookahead=P.strstart-ee,P.strstart=ee,_(P,!1),P.strm.avail_out===0)||P.strstart-P.block_start>=P.w_size-H&&(_(P,!1),P.strm.avail_out===0))return y}return P.insert=0,fe===h?(_(P,!0),P.strm.avail_out===0?R:D):(P.strstart>P.block_start&&(_(P,!1),P.strm.avail_out),y)}),new Ae(4,4,8,4,ge),new Ae(4,5,16,8,ge),new Ae(4,6,32,32,ge),new Ae(4,4,16,16,he),new Ae(8,16,32,32,he),new Ae(8,16,128,128,he),new Ae(8,32,128,256,he),new Ae(32,128,258,1024,he),new Ae(32,258,258,4096,he)],i.deflateInit=function(P,fe){return _e(P,fe,v,15,8,0)},i.deflateInit2=_e,i.deflateReset=me,i.deflateResetKeep=ce,i.deflateSetHeader=function(P,fe){return P&&P.state?P.state.wrap!==2?p:(P.state.gzhead=fe,d):p},i.deflate=function(P,fe){var de,ee,K,se;if(!P||!P.state||5>8&255),z(ee,ee.gzhead.time>>16&255),z(ee,ee.gzhead.time>>24&255),z(ee,ee.level===9?2:2<=ee.strategy||ee.level<2?4:0),z(ee,255&ee.gzhead.os),ee.gzhead.extra&&ee.gzhead.extra.length&&(z(ee,255&ee.gzhead.extra.length),z(ee,ee.gzhead.extra.length>>8&255)),ee.gzhead.hcrc&&(P.adler=A(P.adler,ee.pending_buf,ee.pending,0)),ee.gzindex=0,ee.status=69):(z(ee,0),z(ee,0),z(ee,0),z(ee,0),z(ee,0),z(ee,ee.level===9?2:2<=ee.strategy||ee.level<2?4:0),z(ee,3),ee.status=U);else{var ye=v+(ee.w_bits-8<<4)<<8;ye|=(2<=ee.strategy||ee.level<2?0:ee.level<6?1:ee.level===6?2:3)<<6,ee.strstart!==0&&(ye|=32),ye+=31-ye%31,ee.status=U,ie(ee,ye),ee.strstart!==0&&(ie(ee,P.adler>>>16),ie(ee,65535&P.adler)),P.adler=1}if(ee.status===69)if(ee.gzhead.extra){for(K=ee.pending;ee.gzindex<(65535&ee.gzhead.extra.length)&&(ee.pending!==ee.pending_buf_size||(ee.gzhead.hcrc&&ee.pending>K&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),N(P),K=ee.pending,ee.pending!==ee.pending_buf_size));)z(ee,255&ee.gzhead.extra[ee.gzindex]),ee.gzindex++;ee.gzhead.hcrc&&ee.pending>K&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),ee.gzindex===ee.gzhead.extra.length&&(ee.gzindex=0,ee.status=73)}else ee.status=73;if(ee.status===73)if(ee.gzhead.name){K=ee.pending;do{if(ee.pending===ee.pending_buf_size&&(ee.gzhead.hcrc&&ee.pending>K&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),N(P),K=ee.pending,ee.pending===ee.pending_buf_size)){se=1;break}se=ee.gzindexK&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),se===0&&(ee.gzindex=0,ee.status=91)}else ee.status=91;if(ee.status===91)if(ee.gzhead.comment){K=ee.pending;do{if(ee.pending===ee.pending_buf_size&&(ee.gzhead.hcrc&&ee.pending>K&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),N(P),K=ee.pending,ee.pending===ee.pending_buf_size)){se=1;break}se=ee.gzindexK&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),se===0&&(ee.status=103)}else ee.status=103;if(ee.status===103&&(ee.gzhead.hcrc?(ee.pending+2>ee.pending_buf_size&&N(P),ee.pending+2<=ee.pending_buf_size&&(z(ee,255&P.adler),z(ee,P.adler>>8&255),P.adler=0,ee.status=U)):ee.status=U),ee.pending!==0){if(N(P),P.avail_out===0)return ee.last_flush=-1,d}else if(P.avail_in===0&&V(fe)<=V(de)&&fe!==h)return k(P,-5);if(ee.status===666&&P.avail_in!==0)return k(P,-5);if(P.avail_in!==0||ee.lookahead!==0||fe!==u&&ee.status!==666){var ne=ee.strategy===2?function(J,Y){for(var ue;;){if(J.lookahead===0&&(q(J),J.lookahead===0)){if(Y===u)return y;break}if(J.match_length=0,ue=a._tr_tally(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++,ue&&(_(J,!1),J.strm.avail_out===0))return y}return J.insert=0,Y===h?(_(J,!0),J.strm.avail_out===0?R:D):J.last_lit&&(_(J,!1),J.strm.avail_out===0)?y:I}(ee,fe):ee.strategy===3?function(J,Y){for(var ue,le,we,G,Q=J.window;;){if(J.lookahead<=M){if(q(J),J.lookahead<=M&&Y===u)return y;if(J.lookahead===0)break}if(J.match_length=0,J.lookahead>=E&&0J.lookahead&&(J.match_length=J.lookahead)}if(J.match_length>=E?(ue=a._tr_tally(J,1,J.match_length-E),J.lookahead-=J.match_length,J.strstart+=J.match_length,J.match_length=0):(ue=a._tr_tally(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++),ue&&(_(J,!1),J.strm.avail_out===0))return y}return J.insert=0,Y===h?(_(J,!0),J.strm.avail_out===0?R:D):J.last_lit&&(_(J,!1),J.strm.avail_out===0)?y:I}(ee,fe):s[ee.level].func(ee,fe);if(ne!==R&&ne!==D||(ee.status=666),ne===y||ne===R)return P.avail_out===0&&(ee.last_flush=-1),d;if(ne===I&&(fe===1?a._tr_align(ee):fe!==5&&(a._tr_stored_block(ee,0,0,!1),fe===3&&(Z(ee.head),ee.lookahead===0&&(ee.strstart=0,ee.block_start=0,ee.insert=0))),N(P),P.avail_out===0))return ee.last_flush=-1,d}return fe!==h?d:ee.wrap<=0?1:(ee.wrap===2?(z(ee,255&P.adler),z(ee,P.adler>>8&255),z(ee,P.adler>>16&255),z(ee,P.adler>>24&255),z(ee,255&P.total_in),z(ee,P.total_in>>8&255),z(ee,P.total_in>>16&255),z(ee,P.total_in>>24&255)):(ie(ee,P.adler>>>16),ie(ee,65535&P.adler)),N(P),0=de.w_size&&(se===0&&(Z(de.head),de.strstart=0,de.block_start=0,de.insert=0),Y=new o.Buf8(de.w_size),o.arraySet(Y,fe,ue-de.w_size,de.w_size,0),fe=Y,ue=de.w_size),ye=P.avail_in,ne=P.next_in,J=P.input,P.avail_in=ue,P.next_in=0,P.input=fe,q(de);de.lookahead>=E;){for(ee=de.strstart,K=de.lookahead-(E-1);de.ins_h=(de.ins_h<>>=E=x>>>24,w-=E,(E=x>>>16&255)===0)I[c++]=65535&x;else{if(!(16&E)){if(!(64&E)){x=B[(65535&x)+(v&(1<>>=E,w-=E),w<15&&(v+=y[l++]<>>=E=x>>>24,w-=E,!(16&(E=x>>>16&255))){if(!(64&E)){x=C[(65535&x)+(v&(1<>>=E,w-=E,(E=c-u)>3,v&=(1<<(w-=M<<3))-1,s.next_in=l,s.next_out=c,s.avail_in=l>>24&255)+(O>>>8&65280)+((65280&O)<<8)+((255&O)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(O){var U;return O&&O.state?(U=O.state,O.total_in=O.total_out=U.total=0,O.msg="",U.wrap&&(O.adler=1&U.wrap),U.mode=p,U.last=0,U.havedict=0,U.dmax=32768,U.head=null,U.hold=0,U.bits=0,U.lencode=U.lendyn=new s.Buf32(f),U.distcode=U.distdyn=new s.Buf32(m),U.sane=1,U.back=-1,h):d}function B(O){var U;return O&&O.state?((U=O.state).wsize=0,U.whave=0,U.wnext=0,w(O)):d}function C(O,U){var y,I;return O&&O.state?(I=O.state,U<0?(y=0,U=-U):(y=1+(U>>4),U<48&&(U&=15)),U&&(U<8||15=D.wsize?(s.arraySet(D.window,U,y-D.wsize,D.wsize,0),D.wnext=0,D.whave=D.wsize):(I<(R=D.wsize-D.wnext)&&(R=I),s.arraySet(D.window,U,y-I,R,D.wnext),(I-=R)?(s.arraySet(D.window,U,y-I,I,0),D.wnext=I,D.whave=D.wsize):(D.wnext+=R,D.wnext===D.wsize&&(D.wnext=0),D.whave>>8&255,y.check=a(y.check,se,2,0),_=N=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&N)<<8)+(N>>8))%31){O.msg="incorrect header check",y.mode=30;break}if((15&N)!=8){O.msg="unknown compression method",y.mode=30;break}if(_-=4,P=8+(15&(N>>>=4)),y.wbits===0)y.wbits=P;else if(P>y.wbits){O.msg="invalid window size",y.mode=30;break}y.dmax=1<>8&1),512&y.flags&&(se[0]=255&N,se[1]=N>>>8&255,y.check=a(y.check,se,2,0)),_=N=0,y.mode=3;case 3:for(;_<32;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}y.head&&(y.head.time=N),512&y.flags&&(se[0]=255&N,se[1]=N>>>8&255,se[2]=N>>>16&255,se[3]=N>>>24&255,y.check=a(y.check,se,4,0)),_=N=0,y.mode=4;case 4:for(;_<16;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}y.head&&(y.head.xflags=255&N,y.head.os=N>>8),512&y.flags&&(se[0]=255&N,se[1]=N>>>8&255,y.check=a(y.check,se,2,0)),_=N=0,y.mode=5;case 5:if(1024&y.flags){for(;_<16;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}y.length=N,y.head&&(y.head.extra_len=N),512&y.flags&&(se[0]=255&N,se[1]=N>>>8&255,y.check=a(y.check,se,2,0)),_=N=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(V<(T=y.length)&&(T=V),T&&(y.head&&(P=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),s.arraySet(y.head.extra,I,D,T,P)),512&y.flags&&(y.check=a(y.check,I,T,D)),V-=T,D+=T,y.length-=T),y.length))break e;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(V===0)break e;for(T=0;P=I[D+T++],y.head&&P&&y.length<65536&&(y.head.name+=String.fromCharCode(P)),P&&T>9&1,y.head.done=!0),O.adler=y.check=0,y.mode=12;break;case 10:for(;_<32;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}O.adler=y.check=g(N),_=N=0,y.mode=11;case 11:if(y.havedict===0)return O.next_out=k,O.avail_out=Z,O.next_in=D,O.avail_in=V,y.hold=N,y.bits=_,2;O.adler=y.check=1,y.mode=12;case 12:if(U===5||U===6)break e;case 13:if(y.last){N>>>=7&_,_-=7&_,y.mode=27;break}for(;_<3;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}switch(y.last=1&N,_-=1,3&(N>>>=1)){case 0:y.mode=14;break;case 1:if(M(y),y.mode=20,U!==6)break;N>>>=2,_-=2;break e;case 2:y.mode=17;break;case 3:O.msg="invalid block type",y.mode=30}N>>>=2,_-=2;break;case 14:for(N>>>=7&_,_-=7&_;_<32;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}if((65535&N)!=(N>>>16^65535)){O.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&N,_=N=0,y.mode=15,U===6)break e;case 15:y.mode=16;case 16:if(T=y.length){if(V>>=5,_-=5,y.ndist=1+(31&N),N>>>=5,_-=5,y.ncode=4+(15&N),N>>>=4,_-=4,286>>=3,_-=3}for(;y.have<19;)y.lens[ye[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,de={bits:y.lenbits},fe=A(0,y.lens,0,19,y.lencode,0,y.work,de),y.lenbits=de.bits,fe){O.msg="invalid code lengths set",y.mode=30;break}y.have=0,y.mode=19;case 19:for(;y.have>>16&255,$=65535&K,!((he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}if($<16)N>>>=he,_-=he,y.lens[y.have++]=$;else{if($===16){for(ee=he+2;_>>=he,_-=he,y.have===0){O.msg="invalid bit length repeat",y.mode=30;break}P=y.lens[y.have-1],T=3+(3&N),N>>>=2,_-=2}else if($===17){for(ee=he+3;_>>=he)),N>>>=3,_-=3}else{for(ee=he+7;_>>=he)),N>>>=7,_-=7}if(y.have+T>y.nlen+y.ndist){O.msg="invalid bit length repeat",y.mode=30;break}for(;T--;)y.lens[y.have++]=P}}if(y.mode===30)break;if(y.lens[256]===0){O.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,de={bits:y.lenbits},fe=A(c,y.lens,0,y.nlen,y.lencode,0,y.work,de),y.lenbits=de.bits,fe){O.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,de={bits:y.distbits},fe=A(u,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,de),y.distbits=de.bits,fe){O.msg="invalid distances set",y.mode=30;break}if(y.mode=20,U===6)break e;case 20:y.mode=21;case 21:if(6<=V&&258<=Z){O.next_out=k,O.avail_out=Z,O.next_in=D,O.avail_in=V,y.hold=N,y.bits=_,l(O,ie),k=O.next_out,R=O.output,Z=O.avail_out,D=O.next_in,I=O.input,V=O.avail_in,N=y.hold,_=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;Ae=(K=y.lencode[N&(1<>>16&255,$=65535&K,!((he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}if(Ae&&!(240&Ae)){for(ce=he,me=Ae,_e=$;Ae=(K=y.lencode[_e+((N&(1<>ce)])>>>16&255,$=65535&K,!(ce+(he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}N>>>=ce,_-=ce,y.back+=ce}if(N>>>=he,_-=he,y.back+=he,y.length=$,Ae===0){y.mode=26;break}if(32&Ae){y.back=-1,y.mode=12;break}if(64&Ae){O.msg="invalid literal/length code",y.mode=30;break}y.extra=15&Ae,y.mode=22;case 22:if(y.extra){for(ee=y.extra;_>>=y.extra,_-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;Ae=(K=y.distcode[N&(1<>>16&255,$=65535&K,!((he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}if(!(240&Ae)){for(ce=he,me=Ae,_e=$;Ae=(K=y.distcode[_e+((N&(1<>ce)])>>>16&255,$=65535&K,!(ce+(he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}N>>>=ce,_-=ce,y.back+=ce}if(N>>>=he,_-=he,y.back+=he,64&Ae){O.msg="invalid distance code",y.mode=30;break}y.offset=$,y.extra=15&Ae,y.mode=24;case 24:if(y.extra){for(ee=y.extra;_>>=y.extra,_-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){O.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(Z===0)break e;if(T=ie-Z,y.offset>T){if((T=y.offset-T)>y.whave&&y.sane){O.msg="invalid distance too far back",y.mode=30;break}q=T>y.wnext?(T-=y.wnext,y.wsize-T):y.wnext-T,T>y.length&&(T=y.length),ge=y.window}else ge=R,q=k-y.offset,T=y.length;for(ZF?(E=q[ge+m[U]],_[z+m[U]]):(E=96,0),v=1<>k)+(w-=v)]=x<<24|E<<16|M|0,w!==0;);for(v=1<>=1;if(v!==0?(N&=v-1,N+=v):N=0,U++,--ie[O]==0){if(O===I)break;O=u[h+m[U]]}if(R>>7)]}function z(K,se){K.pending_buf[K.pending++]=255&se,K.pending_buf[K.pending++]=se>>>8&255}function ie(K,se,ye){K.bi_valid>g-ye?(K.bi_buf|=se<>g-K.bi_valid,K.bi_valid+=ye-g):(K.bi_buf|=se<>>=1,ye<<=1,0<--se;);return ye>>>1}function ge(K,se,ye){var ne,J,Y=new Array(m+1),ue=0;for(ne=1;ne<=m;ne++)Y[ne]=ue=ue+ye[ne-1]<<1;for(J=0;J<=se;J++){var le=K[2*J+1];le!==0&&(K[2*J]=q(Y[le]++,le))}}function he(K){var se;for(se=0;se>1;1<=ye;ye--)ce(K,Y,ye);for(J=we;ye=K.heap[1],K.heap[1]=K.heap[K.heap_len--],ce(K,Y,1),ne=K.heap[1],K.heap[--K.heap_max]=ye,K.heap[--K.heap_max]=ne,Y[2*J]=Y[2*ye]+Y[2*ne],K.depth[J]=(K.depth[ye]>=K.depth[ne]?K.depth[ye]:K.depth[ne])+1,Y[2*ye+1]=Y[2*ne+1]=J,K.heap[1]=J++,ce(K,Y,1),2<=K.heap_len;);K.heap[--K.heap_max]=K.heap[1],function(Q,S){var W,te,oe,ae,Se,Ee,Me=S.dyn_tree,Le=S.max_code,ke=S.stat_desc.static_tree,pe=S.stat_desc.has_stree,Fe=S.stat_desc.extra_bits,Ue=S.stat_desc.extra_base,Te=S.stat_desc.max_length,Ye=0;for(ae=0;ae<=m;ae++)Q.bl_count[ae]=0;for(Me[2*Q.heap[Q.heap_max]+1]=0,W=Q.heap_max+1;W>=7;J>>=1)if(1&G&&le.dyn_ltree[2*we]!==0)return o;if(le.dyn_ltree[18]!==0||le.dyn_ltree[20]!==0||le.dyn_ltree[26]!==0)return a;for(we=32;we>>3,(Y=K.static_len+3+7>>>3)<=J&&(J=Y)):J=Y=ye+5,ye+4<=J&&se!==-1?ee(K,se,ye,ne):K.strategy===4||Y===J?(ie(K,2+(ne?1:0),3),me(K,H,O)):(ie(K,4+(ne?1:0),3),function(le,we,G,Q){var S;for(ie(le,we-257,5),ie(le,G-1,5),ie(le,Q-4,4),S=0;S>>8&255,K.pending_buf[K.d_buf+2*K.last_lit+1]=255&se,K.pending_buf[K.l_buf+K.last_lit]=255&ye,K.last_lit++,se===0?K.dyn_ltree[2*ye]++:(K.matches++,se--,K.dyn_ltree[2*(y[ye]+u+1)]++,K.dyn_dtree[2*_(se)]++),K.last_lit===K.lit_bufsize-1},i._tr_align=function(K){ie(K,2,3),T(K,w,H),function(se){se.bi_valid===16?(z(se,se.bi_buf),se.bi_buf=0,se.bi_valid=0):8<=se.bi_valid&&(se.pending_buf[se.pending++]=255&se.bi_buf,se.bi_buf>>=8,se.bi_valid-=8)}(K)}},{"../utils/common":41}],53:[function(t,r,i){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,r,i){(function(s){(function(o,a){if(!o.setImmediate){var l,A,c,u,h=1,d={},p=!1,f=o.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(o);m=m&&m.setTimeout?m:o,l={}.toString.call(o.process)==="[object process]"?function(B){process.nextTick(function(){v(B)})}:function(){if(o.postMessage&&!o.importScripts){var B=!0,C=o.onmessage;return o.onmessage=function(){B=!1},o.postMessage("","*"),o.onmessage=C,B}}()?(u="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",w,!1):o.attachEvent("onmessage",w),function(B){o.postMessage(u+B,"*")}):o.MessageChannel?((c=new MessageChannel).port1.onmessage=function(B){v(B.data)},function(B){c.port2.postMessage(B)}):f&&"onreadystatechange"in f.createElement("script")?(A=f.documentElement,function(B){var C=f.createElement("script");C.onreadystatechange=function(){v(B),C.onreadystatechange=null,A.removeChild(C),C=null},A.appendChild(C)}):function(B){setTimeout(v,0,B)},m.setImmediate=function(B){typeof B!="function"&&(B=new Function(""+B));for(var C=new Array(arguments.length-1),b=0;b"u"?s===void 0?this:s:self)}).call(this,typeof pa<"u"?pa:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(eH);var Fpe=eH.exports;const _pe=Zl(Fpe);class qf{constructor(){this.zipContainer={}}addData(e,t,r,i=""){i==""&&(i="_"),this.zipContainer[i]==null&&(this.zipContainer[i]=[]),this.zipContainer[i].push({data:e,name:t,extension:r})}saveZip(e,t=!0){const r=this.zipContainer,i=new _pe;for(const s in r)if(s=="_")r[s].forEach((o,a)=>{i.file(o.name+"."+o.extension,o.data,{base64:!0})});else{const o=i.folder(s);r[s].forEach((a,l)=>{const A=a.extension!="txt";o.file(a.name+"."+a.extension,a.data,{base64:A})})}i.generateAsync({type:"blob"}).then(s=>{this._saveZipFile(s,e+".zip")}),t&&(this.zipContainer={})}_saveZipFile(e,t){const r=new Blob([e],{type:"application/zip"});if(typeof window.navigator.msSaveBlob<"u")window.navigator.msSaveBlob(r,t);else{const i=document.createElement("a");typeof i.download=="string"?(document.body.appendChild(i),i.download=t,i.href=URL.createObjectURL(r),i.click(),document.body.removeChild(i)):window.open(e,"_blank").document.write(""+t+"")}}}new j;class Epe{constructor(e){this.characterManager=e,this.screenshotManager=e.screenshotManager,this.blinkManager=e.blinkManager,this.animationManager=this.characterManager.animationManager,this.temptime=0}async createLoraData(e,t=null,r="",i){const s=e.manifest,o=e.name?"loraData/"+e.name:"loraData",a=await this._fetchManifest(s),{assetsLocation:l="",animationsDirectory:A="",backgroundGrayscale:c=1,topFrameOffsetPixels:u=64,bottomFrameOffsetPixels:h=64,backgroundDescription:d="",width:p=512,height:f=512,dataCollection:m}=a,g=l+A+"/";this.screenshotManager.setBackground([c,c,c]),this.blinkManager.enableScreenshot(),await this.screenshotManager.calculateBoneOffsets(.2);let v=0;const w=this;if(Array.isArray(m)){const B=t??new qf;await(async()=>{if(Array.isArray(m))for(let b=0;b{const Z=[];return Ot(R).forEach(_=>{Z.push({id:_})}),Z},k=R==null?v.characterManager.getTraits(F):D();if(k==null){console.log("SKipping Thumbnail Generation for trait group "+F+", its not present in the character manifest.");continue}const V=nQ(x);I?v.screenshotManager.setCameraFrameWithName(I,V):v.screenshotManager.frameShot(E,H,V,M,O);for(let Z=0;Z{const[e,t]=Ce.useState(null),[r,i]=Ce.useState(null),[s,o]=Ce.useState(null),[a,l]=Ce.useState(null),[A,c]=Ce.useState(null),[u,h]=Ce.useState(null),[d,p]=Ce.useState(null),[f,m]=Ce.useState(null),[g,v]=Ce.useState(null),[w,B]=Ce.useState(null),[C,b]=Ce.useState(null),[F,x]=Ce.useState(!1);let E=!1,[M,H]=Ce.useState(!1);Ce.useEffect(()=>{if(E||M)return;H(!0),E=!0;const{scene:I,camera:R,controls:D,characterManager:k,sceneElements:V}=Ipe("editor-scene");v(R),m(I),t(k),c(V),h(k.animationManager),p(k.lookAtManager),B(D),i(new Epe(k)),o(new Spe(k)),l(new Upe(k))},[]);const O=I=>{I==null&&(I=!F),x(I),f.traverse(R=>{R.isMesh&&R.setDebugMode&&R.setDebugMode(I)})};Ce.useEffect(()=>{if(C!=null&&C.defaultAnimations){const I=C.defaultAnimations.map(R=>R.location);u.storeDefaultAnimationPaths(I,"")}},[C]);const U=I=>{I?f.add(A):f.remove(A)},y=I=>{w&&(m_.to(w.target,{x:I.targetX??0,y:I.targetY??0,z:I.targetZ??0,duration:1}),m_.fromTo(w,{maxDistance:w.getDistance(),minDistance:w.getDistance(),minPolarAngle:w.getPolarAngle(),maxPolarAngle:w.getPolarAngle(),minAzimuthAngle:w.getAzimuthalAngle(),maxAzimuthAngle:w.getAzimuthalAngle()},{maxDistance:I.distance,minDistance:I.distance,minPolarAngle:Math.PI/2-.11,maxPolarAngle:Math.PI/2-.11,minAzimuthAngle:-.78,maxAzimuthAngle:-.78,duration:1}).then(()=>{w.minPolarAngle=0,w.maxPolarAngle=3.1415,w.minDistance=.5,w.maxDistance=10,w.minAzimuthAngle=1/0,w.maxAzimuthAngle=1/0}))};return L.jsx(lr.Provider,{value:{manifest:C,setManifest:b,scene:f,characterManager:e,loraDataGenerator:r,spriteAtlasGenerator:s,thumbnailsGenerator:a,showEnvironmentModels:U,debugMode:F,toggleDebugMode:O,animationManager:u,lookAtManager:d,camera:g,moveCamera:y,controls:w,sceneElements:A},children:n.children})},Rpe={NORMAL:"NORMAL",AR:"AR",AR_FRONT:"AR_FRONT",VR:"VR"},at={LANDING:"LANDING",CREATE:"CREATE",CLAIM:"CLAIM",LOAD:"LOAD",APPEARANCE:"APPEARANCE",BATCHDOWNLOAD:"BATCHDOWNLOAD",BIO:"BIO",SAVE:"SAVE",MINT:"MINT",CHAT:"CHAT",OPTIMIZER:"OPTIMIZER",BATCHMANIFEST:"BATCHMANIFEST",WALLET:"WALLET"},Ci=X.createContext(),Mpe=n=>{const[e,t]=X.useState(Rpe.NORMAL),[r,i]=X.useState(at.LANDING),[s,o]=X.useState(!1),[a,l]=X.useState(!1);return L.jsx(Ci.Provider,{value:{viewMode:r,setViewMode:i,isLoading:s,setIsLoading:o,mouseIsOverUI:a,setMouseIsOverUI:l,currentCameraMode:e,setCurrentCameraMode:t},children:n.children})},Tpe="modulepreload",Npe=function(n){return"/CharacterStudio/"+n},PD={},kpe=function(e,t,r){if(!t||t.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(t.map(s=>{if(s=Npe(s),s in PD)return;PD[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const u=i[c];if(u.href===s&&(!o||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const A=document.createElement("link");if(A.rel=o?"stylesheet":Tpe,o||(A.as="script",A.crossOrigin=""),A.href=s,document.head.appendChild(A),o)return new Promise((c,u)=>{A.addEventListener("load",c),A.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function $B(){return $B=Object.assign||function(n){for(var e=1;e=0)&&(t[i]=n[i]);return t}function Lpe(n){Ce.useEffect(n,[])}function Vpe(n,e){e===void 0&&(e={});var t=e,r=t.volume,i=r===void 0?1:r,s=t.playbackRate,o=s===void 0?1:s,a=t.soundEnabled,l=a===void 0?!0:a,A=t.interrupt,c=A===void 0?!1:A,u=t.onload,h=Dpe(t,["id","volume","playbackRate","soundEnabled","interrupt","onload"]),d=X.useRef(null),p=X.useRef(!1),f=X.useState(null),m=f[0],g=f[1],v=X.useState(null),w=v[0],B=v[1],C=function(){typeof u=="function"&&u.call(this),p.current&&g(this.duration()*1e3),B(this)};Lpe(function(){return kpe(()=>import("./howler-b6e8b4fe.js").then(M=>M.h),[]).then(function(M){if(!p.current){var H;d.current=(H=M.Howl)!==null&&H!==void 0?H:M.default.Howl,p.current=!0,new d.current($B({src:Array.isArray(n)?n:[n],volume:i,rate:o,onload:C},h))}}),function(){p.current=!1}}),X.useEffect(function(){d.current&&w&&B(new d.current($B({src:Array.isArray(n)?n:[n],volume:i,onload:C},h)))},[JSON.stringify(n)]),X.useEffect(function(){w&&(w.volume(i),w.rate(o))},[i,o]);var b=X.useCallback(function(M){typeof M>"u"&&(M={}),!(!w||!l&&!M.forceSoundEnabled)&&(c&&w.stop(),M.playbackRate&&w.rate(M.playbackRate),w.play(M.id))},[w,l,c]),F=X.useCallback(function(M){w&&w.stop(M)},[w]),x=X.useCallback(function(M){w&&w.pause(M)},[w]),E=[b,{sound:w,stop:F,pause:x,duration:m}];return E}const Ppe=[{name:"background/cc_bgm.wav",offset:0,duration:123458.58333333334},{name:"background/cc_bgm_balanced.wav",offset:123458.58333333334,duration:123458.60416666666},{name:"effect/character-load.wav",offset:246917.1875,duration:3030},{name:"effect/class-select.wav",offset:249947.1875,duration:2780},{name:"effect/switchingItem.wav",offset:252727.1875,duration:623.75},{name:"ui/back-next-button.wav",offset:253350.9375,duration:155.02083333333334},{name:"ui/class-mouse-over.wav",offset:253505.95833333334,duration:217.52083333333334},{name:"ui/class_click.wav",offset:253723.4791666667,duration:3123.75},{name:"ui/class_pass.wav",offset:256847.2291666667,duration:155},{name:"ui/option_click.wav",offset:257002.2291666667,duration:155.02083333333334},{name:"ui/randomize-button.wav",offset:257157.25000000003,duration:342.5208333333333},{name:"ui/section_click.wav",offset:257499.77083333337,duration:155}],Ope="/CharacterStudio/assets/sounds-3322d50e.mp3",bs=Ce.createContext(),Wpe=n=>{const e=i=>Ppe.find(s=>i.test(s.name)),[t]=Vpe(Ope,{sprite:{switchItem:[e(/switchingItem/).offset,e(/switchingItem/).duration],classSelect:[e(/class-select/).offset,e(/class-select/).duration],characterLoad:[e(/character-load/).offset,e(/character-load/).duration],randomizeButton:[e(/randomize-button/).offset,e(/randomize-button/).duration],classMouseOver:[e(/class-mouse-over/).offset,e(/class-mouse-over/).duration],backNextButton:[e(/back-next-button/).offset,e(/back-next-button/).duration]}}),r=(i,s=0)=>{s===0?t({id:i}):setTimeout(()=>{t({id:i})},s)};return L.jsx(bs.Provider,{value:{playSound:r},children:n.children})};function $s(n){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(n)}function lo(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Zpe(n,e){if($s(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if($s(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function tH(n){var e=Zpe(n,"string");return $s(e)=="symbol"?e:e+""}function OD(n,e){for(var t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=this.index;l--)A=(A<<8)+this.byteAt(l);return this.index+=a,A},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=o},{"../utils":32}],19:[function(t,r,i){var s=t("./Uint8ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,r,i){var s=t("./DataReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,r,i){var s=t("./ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,i){var s=t("../utils"),o=t("../support"),a=t("./ArrayReader"),l=t("./StringReader"),A=t("./NodeBufferReader"),c=t("./Uint8ArrayReader");r.exports=function(u){var h=s.getTypeOf(u);return s.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new A(u):o.uint8array?new c(s.transformTo("uint8array",u)):new a(s.transformTo("array",u)):new l(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,r,i){var s=t("./GenericWorker"),o=t("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,r,i){var s=t("./GenericWorker"),o=t("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,i){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var A=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=A+l.data.length}o.prototype.processChunk.call(this,l)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,i){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataWorker");var A=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(c){A.dataIsReady=!0,A.data=c,A.max=c&&c.length||0,A.type=s.getTypeOf(c),A.isPaused||A._tickAndRepeat()},function(c){A.error(c)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,A=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,A);break;case"uint8array":l=this.data.subarray(this.index,A);break;case"array":case"nodebuffer":l=this.data.slice(this.index,A)}return this.index=A,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,r,i){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l "+o:o}},r.exports=s},{}],29:[function(t,r,i){var s=t("../utils"),o=t("./ConvertWorker"),a=t("./GenericWorker"),l=t("../base64"),A=t("../support"),c=t("../external"),u=null;if(A.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(p,f){return new c.Promise(function(m,g){var v=[],w=p._internalType,B=p._outputType,C=p._mimeType;p.on("data",function(b,F){v.push(b),f&&f(F)}).on("error",function(b){v=[],g(b)}).on("end",function(){try{var b=function(F,x,E){switch(F){case"blob":return s.newBlob(s.transformTo("arraybuffer",x),E);case"base64":return l.encode(x);default:return s.transformTo(F,x)}}(B,function(F,x){var E,M=0,H=null,O=0;for(E=0;E"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!t("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(t,r,i){for(var s=t("./utils"),o=t("./support"),a=t("./nodejsUtils"),l=t("./stream/GenericWorker"),A=new Array(256),c=0;c<256;c++)A[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;A[254]=A[254]=1;function u(){l.call(this,"utf-8 decode"),this.leftOver=null}function h(){l.call(this,"utf-8 encode")}i.utf8encode=function(d){return o.nodebuffer?a.newBufferFrom(d,"utf-8"):function(p){var f,m,g,v,w,B=p.length,C=0;for(v=0;v>>6:(m<65536?f[w++]=224|m>>>12:(f[w++]=240|m>>>18,f[w++]=128|m>>>12&63),f[w++]=128|m>>>6&63),f[w++]=128|63&m);return f}(d)},i.utf8decode=function(d){return o.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):function(p){var f,m,g,v,w=p.length,B=new Array(2*w);for(f=m=0;f>10&1023,B[m++]=56320|1023&g)}return B.length!==m&&(B.subarray?B=B.subarray(0,m):B.length=m),s.applyFromCharCode(B)}(d=s.transformTo(o.uint8array?"uint8array":"array",d))},s.inherits(u,l),u.prototype.processChunk=function(d){var p=s.transformTo(o.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var f=p;(p=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),p.set(f,this.leftOver.length)}else p=this.leftOver.concat(p);this.leftOver=null}var m=function(v,w){var B;for((w=w||v.length)>v.length&&(w=v.length),B=w-1;0<=B&&(192&v[B])==128;)B--;return B<0||B===0?w:B+A[v[B]]>w?B:w}(p),g=p;m!==p.length&&(o.uint8array?(g=p.subarray(0,m),this.leftOver=p.subarray(m,p.length)):(g=p.slice(0,m),this.leftOver=p.slice(m,p.length))),this.push({data:i.utf8decode(g),meta:d.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=u,s.inherits(h,l),h.prototype.processChunk=function(d){this.push({data:i.utf8encode(d.data),meta:d.meta})},i.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,i){var s=t("./support"),o=t("./base64"),a=t("./nodejsUtils"),l=t("./external");function A(f){return f}function c(f,m){for(var g=0;g>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var p,f,m,g=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4>>6:(d<65536?h[m++]=224|d>>>12:(h[m++]=240|d>>>18,h[m++]=128|d>>>12&63),h[m++]=128|d>>>6&63),h[m++]=128|63&d);return h},i.buf2binstring=function(u){return c(u,u.length)},i.binstring2buf=function(u){for(var h=new s.Buf8(u.length),d=0,p=h.length;d>10&1023,v[p++]=56320|1023&f)}return c(v,p)},i.utf8border=function(u,h){var d;for((h=h||u.length)>u.length&&(h=u.length),d=h-1;0<=d&&(192&u[d])==128;)d--;return d<0||d===0?h:d+l[u[d]]>h?d:h}},{"./common":41}],43:[function(t,r,i){r.exports=function(s,o,a,l){for(var A=65535&s|0,c=s>>>16&65535|0,u=0;a!==0;){for(a-=u=2e3>>1:o>>>1;a[l]=o}return a}();r.exports=function(o,a,l,A){var c=s,u=A+l;o^=-1;for(var h=A;h>>8^c[255&(o^a[h])];return-1^o}},{}],46:[function(t,r,i){var s,o=t("../utils/common"),a=t("./trees"),l=t("./adler32"),A=t("./crc32"),c=t("./messages"),u=0,h=4,d=0,p=-2,f=-1,m=4,g=2,v=8,w=9,B=286,C=30,b=19,F=2*B+1,x=15,E=3,M=258,H=M+E+1,O=42,U=113,y=1,I=2,R=3,D=4;function k(P,fe){return P.msg=c[fe],fe}function V(P){return(P<<1)-(4P.avail_out&&(de=P.avail_out),de!==0&&(o.arraySet(P.output,fe.pending_buf,fe.pending_out,de,P.next_out),P.next_out+=de,fe.pending_out+=de,P.total_out+=de,P.avail_out-=de,fe.pending-=de,fe.pending===0&&(fe.pending_out=0))}function _(P,fe){a._tr_flush_block(P,0<=P.block_start?P.block_start:-1,P.strstart-P.block_start,fe),P.block_start=P.strstart,N(P.strm)}function z(P,fe){P.pending_buf[P.pending++]=fe}function ie(P,fe){P.pending_buf[P.pending++]=fe>>>8&255,P.pending_buf[P.pending++]=255&fe}function T(P,fe){var de,ee,K=P.max_chain_length,se=P.strstart,ye=P.prev_length,ne=P.nice_match,J=P.strstart>P.w_size-H?P.strstart-(P.w_size-H):0,Y=P.window,ue=P.w_mask,le=P.prev,we=P.strstart+M,G=Y[se+ye-1],Q=Y[se+ye];P.prev_length>=P.good_match&&(K>>=2),ne>P.lookahead&&(ne=P.lookahead);do if(Y[(de=fe)+ye]===Q&&Y[de+ye-1]===G&&Y[de]===Y[se]&&Y[++de]===Y[se+1]){se+=2,de++;do;while(Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&Y[++se]===Y[++de]&&seJ&&--K!=0);return ye<=P.lookahead?ye:P.lookahead}function q(P){var fe,de,ee,K,se,ye,ne,J,Y,ue,le=P.w_size;do{if(K=P.window_size-P.lookahead-P.strstart,P.strstart>=le+(le-H)){for(o.arraySet(P.window,P.window,le,le,0),P.match_start-=le,P.strstart-=le,P.block_start-=le,fe=de=P.hash_size;ee=P.head[--fe],P.head[fe]=le<=ee?ee-le:0,--de;);for(fe=de=le;ee=P.prev[--fe],P.prev[fe]=le<=ee?ee-le:0,--de;);K+=le}if(P.strm.avail_in===0)break;if(ye=P.strm,ne=P.window,J=P.strstart+P.lookahead,Y=K,ue=void 0,ue=ye.avail_in,Y=E)for(se=P.strstart-P.insert,P.ins_h=P.window[se],P.ins_h=(P.ins_h<=E&&(P.ins_h=(P.ins_h<=E)if(ee=a._tr_tally(P,P.strstart-P.match_start,P.match_length-E),P.lookahead-=P.match_length,P.match_length<=P.max_lazy_match&&P.lookahead>=E){for(P.match_length--;P.strstart++,P.ins_h=(P.ins_h<=E&&(P.ins_h=(P.ins_h<=E&&P.match_length<=P.prev_length){for(K=P.strstart+P.lookahead-E,ee=a._tr_tally(P,P.strstart-1-P.prev_match,P.prev_length-E),P.lookahead-=P.prev_length-1,P.prev_length-=2;++P.strstart<=K&&(P.ins_h=(P.ins_h<P.pending_buf_size-5&&(de=P.pending_buf_size-5);;){if(P.lookahead<=1){if(q(P),P.lookahead===0&&fe===u)return y;if(P.lookahead===0)break}P.strstart+=P.lookahead,P.lookahead=0;var ee=P.block_start+de;if((P.strstart===0||P.strstart>=ee)&&(P.lookahead=P.strstart-ee,P.strstart=ee,_(P,!1),P.strm.avail_out===0)||P.strstart-P.block_start>=P.w_size-H&&(_(P,!1),P.strm.avail_out===0))return y}return P.insert=0,fe===h?(_(P,!0),P.strm.avail_out===0?R:D):(P.strstart>P.block_start&&(_(P,!1),P.strm.avail_out),y)}),new Ae(4,4,8,4,ge),new Ae(4,5,16,8,ge),new Ae(4,6,32,32,ge),new Ae(4,4,16,16,he),new Ae(8,16,32,32,he),new Ae(8,16,128,128,he),new Ae(8,32,128,256,he),new Ae(32,128,258,1024,he),new Ae(32,258,258,4096,he)],i.deflateInit=function(P,fe){return _e(P,fe,v,15,8,0)},i.deflateInit2=_e,i.deflateReset=me,i.deflateResetKeep=ce,i.deflateSetHeader=function(P,fe){return P&&P.state?P.state.wrap!==2?p:(P.state.gzhead=fe,d):p},i.deflate=function(P,fe){var de,ee,K,se;if(!P||!P.state||5>8&255),z(ee,ee.gzhead.time>>16&255),z(ee,ee.gzhead.time>>24&255),z(ee,ee.level===9?2:2<=ee.strategy||ee.level<2?4:0),z(ee,255&ee.gzhead.os),ee.gzhead.extra&&ee.gzhead.extra.length&&(z(ee,255&ee.gzhead.extra.length),z(ee,ee.gzhead.extra.length>>8&255)),ee.gzhead.hcrc&&(P.adler=A(P.adler,ee.pending_buf,ee.pending,0)),ee.gzindex=0,ee.status=69):(z(ee,0),z(ee,0),z(ee,0),z(ee,0),z(ee,0),z(ee,ee.level===9?2:2<=ee.strategy||ee.level<2?4:0),z(ee,3),ee.status=U);else{var ye=v+(ee.w_bits-8<<4)<<8;ye|=(2<=ee.strategy||ee.level<2?0:ee.level<6?1:ee.level===6?2:3)<<6,ee.strstart!==0&&(ye|=32),ye+=31-ye%31,ee.status=U,ie(ee,ye),ee.strstart!==0&&(ie(ee,P.adler>>>16),ie(ee,65535&P.adler)),P.adler=1}if(ee.status===69)if(ee.gzhead.extra){for(K=ee.pending;ee.gzindex<(65535&ee.gzhead.extra.length)&&(ee.pending!==ee.pending_buf_size||(ee.gzhead.hcrc&&ee.pending>K&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),N(P),K=ee.pending,ee.pending!==ee.pending_buf_size));)z(ee,255&ee.gzhead.extra[ee.gzindex]),ee.gzindex++;ee.gzhead.hcrc&&ee.pending>K&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),ee.gzindex===ee.gzhead.extra.length&&(ee.gzindex=0,ee.status=73)}else ee.status=73;if(ee.status===73)if(ee.gzhead.name){K=ee.pending;do{if(ee.pending===ee.pending_buf_size&&(ee.gzhead.hcrc&&ee.pending>K&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),N(P),K=ee.pending,ee.pending===ee.pending_buf_size)){se=1;break}se=ee.gzindexK&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),se===0&&(ee.gzindex=0,ee.status=91)}else ee.status=91;if(ee.status===91)if(ee.gzhead.comment){K=ee.pending;do{if(ee.pending===ee.pending_buf_size&&(ee.gzhead.hcrc&&ee.pending>K&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),N(P),K=ee.pending,ee.pending===ee.pending_buf_size)){se=1;break}se=ee.gzindexK&&(P.adler=A(P.adler,ee.pending_buf,ee.pending-K,K)),se===0&&(ee.status=103)}else ee.status=103;if(ee.status===103&&(ee.gzhead.hcrc?(ee.pending+2>ee.pending_buf_size&&N(P),ee.pending+2<=ee.pending_buf_size&&(z(ee,255&P.adler),z(ee,P.adler>>8&255),P.adler=0,ee.status=U)):ee.status=U),ee.pending!==0){if(N(P),P.avail_out===0)return ee.last_flush=-1,d}else if(P.avail_in===0&&V(fe)<=V(de)&&fe!==h)return k(P,-5);if(ee.status===666&&P.avail_in!==0)return k(P,-5);if(P.avail_in!==0||ee.lookahead!==0||fe!==u&&ee.status!==666){var ne=ee.strategy===2?function(J,Y){for(var ue;;){if(J.lookahead===0&&(q(J),J.lookahead===0)){if(Y===u)return y;break}if(J.match_length=0,ue=a._tr_tally(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++,ue&&(_(J,!1),J.strm.avail_out===0))return y}return J.insert=0,Y===h?(_(J,!0),J.strm.avail_out===0?R:D):J.last_lit&&(_(J,!1),J.strm.avail_out===0)?y:I}(ee,fe):ee.strategy===3?function(J,Y){for(var ue,le,we,G,Q=J.window;;){if(J.lookahead<=M){if(q(J),J.lookahead<=M&&Y===u)return y;if(J.lookahead===0)break}if(J.match_length=0,J.lookahead>=E&&0J.lookahead&&(J.match_length=J.lookahead)}if(J.match_length>=E?(ue=a._tr_tally(J,1,J.match_length-E),J.lookahead-=J.match_length,J.strstart+=J.match_length,J.match_length=0):(ue=a._tr_tally(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++),ue&&(_(J,!1),J.strm.avail_out===0))return y}return J.insert=0,Y===h?(_(J,!0),J.strm.avail_out===0?R:D):J.last_lit&&(_(J,!1),J.strm.avail_out===0)?y:I}(ee,fe):s[ee.level].func(ee,fe);if(ne!==R&&ne!==D||(ee.status=666),ne===y||ne===R)return P.avail_out===0&&(ee.last_flush=-1),d;if(ne===I&&(fe===1?a._tr_align(ee):fe!==5&&(a._tr_stored_block(ee,0,0,!1),fe===3&&(Z(ee.head),ee.lookahead===0&&(ee.strstart=0,ee.block_start=0,ee.insert=0))),N(P),P.avail_out===0))return ee.last_flush=-1,d}return fe!==h?d:ee.wrap<=0?1:(ee.wrap===2?(z(ee,255&P.adler),z(ee,P.adler>>8&255),z(ee,P.adler>>16&255),z(ee,P.adler>>24&255),z(ee,255&P.total_in),z(ee,P.total_in>>8&255),z(ee,P.total_in>>16&255),z(ee,P.total_in>>24&255)):(ie(ee,P.adler>>>16),ie(ee,65535&P.adler)),N(P),0=de.w_size&&(se===0&&(Z(de.head),de.strstart=0,de.block_start=0,de.insert=0),Y=new o.Buf8(de.w_size),o.arraySet(Y,fe,ue-de.w_size,de.w_size,0),fe=Y,ue=de.w_size),ye=P.avail_in,ne=P.next_in,J=P.input,P.avail_in=ue,P.next_in=0,P.input=fe,q(de);de.lookahead>=E;){for(ee=de.strstart,K=de.lookahead-(E-1);de.ins_h=(de.ins_h<>>=E=x>>>24,w-=E,(E=x>>>16&255)===0)I[c++]=65535&x;else{if(!(16&E)){if(!(64&E)){x=B[(65535&x)+(v&(1<>>=E,w-=E),w<15&&(v+=y[l++]<>>=E=x>>>24,w-=E,!(16&(E=x>>>16&255))){if(!(64&E)){x=C[(65535&x)+(v&(1<>>=E,w-=E,(E=c-u)>3,v&=(1<<(w-=M<<3))-1,s.next_in=l,s.next_out=c,s.avail_in=l>>24&255)+(O>>>8&65280)+((65280&O)<<8)+((255&O)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(O){var U;return O&&O.state?(U=O.state,O.total_in=O.total_out=U.total=0,O.msg="",U.wrap&&(O.adler=1&U.wrap),U.mode=p,U.last=0,U.havedict=0,U.dmax=32768,U.head=null,U.hold=0,U.bits=0,U.lencode=U.lendyn=new s.Buf32(f),U.distcode=U.distdyn=new s.Buf32(m),U.sane=1,U.back=-1,h):d}function B(O){var U;return O&&O.state?((U=O.state).wsize=0,U.whave=0,U.wnext=0,w(O)):d}function C(O,U){var y,I;return O&&O.state?(I=O.state,U<0?(y=0,U=-U):(y=1+(U>>4),U<48&&(U&=15)),U&&(U<8||15=D.wsize?(s.arraySet(D.window,U,y-D.wsize,D.wsize,0),D.wnext=0,D.whave=D.wsize):(I<(R=D.wsize-D.wnext)&&(R=I),s.arraySet(D.window,U,y-I,R,D.wnext),(I-=R)?(s.arraySet(D.window,U,y-I,I,0),D.wnext=I,D.whave=D.wsize):(D.wnext+=R,D.wnext===D.wsize&&(D.wnext=0),D.whave>>8&255,y.check=a(y.check,se,2,0),_=N=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&N)<<8)+(N>>8))%31){O.msg="incorrect header check",y.mode=30;break}if((15&N)!=8){O.msg="unknown compression method",y.mode=30;break}if(_-=4,P=8+(15&(N>>>=4)),y.wbits===0)y.wbits=P;else if(P>y.wbits){O.msg="invalid window size",y.mode=30;break}y.dmax=1<>8&1),512&y.flags&&(se[0]=255&N,se[1]=N>>>8&255,y.check=a(y.check,se,2,0)),_=N=0,y.mode=3;case 3:for(;_<32;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}y.head&&(y.head.time=N),512&y.flags&&(se[0]=255&N,se[1]=N>>>8&255,se[2]=N>>>16&255,se[3]=N>>>24&255,y.check=a(y.check,se,4,0)),_=N=0,y.mode=4;case 4:for(;_<16;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}y.head&&(y.head.xflags=255&N,y.head.os=N>>8),512&y.flags&&(se[0]=255&N,se[1]=N>>>8&255,y.check=a(y.check,se,2,0)),_=N=0,y.mode=5;case 5:if(1024&y.flags){for(;_<16;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}y.length=N,y.head&&(y.head.extra_len=N),512&y.flags&&(se[0]=255&N,se[1]=N>>>8&255,y.check=a(y.check,se,2,0)),_=N=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&(V<(T=y.length)&&(T=V),T&&(y.head&&(P=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),s.arraySet(y.head.extra,I,D,T,P)),512&y.flags&&(y.check=a(y.check,I,T,D)),V-=T,D+=T,y.length-=T),y.length))break e;y.length=0,y.mode=7;case 7:if(2048&y.flags){if(V===0)break e;for(T=0;P=I[D+T++],y.head&&P&&y.length<65536&&(y.head.name+=String.fromCharCode(P)),P&&T>9&1,y.head.done=!0),O.adler=y.check=0,y.mode=12;break;case 10:for(;_<32;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}O.adler=y.check=g(N),_=N=0,y.mode=11;case 11:if(y.havedict===0)return O.next_out=k,O.avail_out=Z,O.next_in=D,O.avail_in=V,y.hold=N,y.bits=_,2;O.adler=y.check=1,y.mode=12;case 12:if(U===5||U===6)break e;case 13:if(y.last){N>>>=7&_,_-=7&_,y.mode=27;break}for(;_<3;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}switch(y.last=1&N,_-=1,3&(N>>>=1)){case 0:y.mode=14;break;case 1:if(M(y),y.mode=20,U!==6)break;N>>>=2,_-=2;break e;case 2:y.mode=17;break;case 3:O.msg="invalid block type",y.mode=30}N>>>=2,_-=2;break;case 14:for(N>>>=7&_,_-=7&_;_<32;){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}if((65535&N)!=(N>>>16^65535)){O.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&N,_=N=0,y.mode=15,U===6)break e;case 15:y.mode=16;case 16:if(T=y.length){if(V>>=5,_-=5,y.ndist=1+(31&N),N>>>=5,_-=5,y.ncode=4+(15&N),N>>>=4,_-=4,286>>=3,_-=3}for(;y.have<19;)y.lens[ye[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,de={bits:y.lenbits},fe=A(0,y.lens,0,19,y.lencode,0,y.work,de),y.lenbits=de.bits,fe){O.msg="invalid code lengths set",y.mode=30;break}y.have=0,y.mode=19;case 19:for(;y.have>>16&255,$=65535&K,!((he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}if($<16)N>>>=he,_-=he,y.lens[y.have++]=$;else{if($===16){for(ee=he+2;_>>=he,_-=he,y.have===0){O.msg="invalid bit length repeat",y.mode=30;break}P=y.lens[y.have-1],T=3+(3&N),N>>>=2,_-=2}else if($===17){for(ee=he+3;_>>=he)),N>>>=3,_-=3}else{for(ee=he+7;_>>=he)),N>>>=7,_-=7}if(y.have+T>y.nlen+y.ndist){O.msg="invalid bit length repeat",y.mode=30;break}for(;T--;)y.lens[y.have++]=P}}if(y.mode===30)break;if(y.lens[256]===0){O.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,de={bits:y.lenbits},fe=A(c,y.lens,0,y.nlen,y.lencode,0,y.work,de),y.lenbits=de.bits,fe){O.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,de={bits:y.distbits},fe=A(u,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,de),y.distbits=de.bits,fe){O.msg="invalid distances set",y.mode=30;break}if(y.mode=20,U===6)break e;case 20:y.mode=21;case 21:if(6<=V&&258<=Z){O.next_out=k,O.avail_out=Z,O.next_in=D,O.avail_in=V,y.hold=N,y.bits=_,l(O,ie),k=O.next_out,R=O.output,Z=O.avail_out,D=O.next_in,I=O.input,V=O.avail_in,N=y.hold,_=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;Ae=(K=y.lencode[N&(1<>>16&255,$=65535&K,!((he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}if(Ae&&!(240&Ae)){for(ce=he,me=Ae,_e=$;Ae=(K=y.lencode[_e+((N&(1<>ce)])>>>16&255,$=65535&K,!(ce+(he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}N>>>=ce,_-=ce,y.back+=ce}if(N>>>=he,_-=he,y.back+=he,y.length=$,Ae===0){y.mode=26;break}if(32&Ae){y.back=-1,y.mode=12;break}if(64&Ae){O.msg="invalid literal/length code",y.mode=30;break}y.extra=15&Ae,y.mode=22;case 22:if(y.extra){for(ee=y.extra;_>>=y.extra,_-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;Ae=(K=y.distcode[N&(1<>>16&255,$=65535&K,!((he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}if(!(240&Ae)){for(ce=he,me=Ae,_e=$;Ae=(K=y.distcode[_e+((N&(1<>ce)])>>>16&255,$=65535&K,!(ce+(he=K>>>24)<=_);){if(V===0)break e;V--,N+=I[D++]<<_,_+=8}N>>>=ce,_-=ce,y.back+=ce}if(N>>>=he,_-=he,y.back+=he,64&Ae){O.msg="invalid distance code",y.mode=30;break}y.offset=$,y.extra=15&Ae,y.mode=24;case 24:if(y.extra){for(ee=y.extra;_>>=y.extra,_-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){O.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(Z===0)break e;if(T=ie-Z,y.offset>T){if((T=y.offset-T)>y.whave&&y.sane){O.msg="invalid distance too far back",y.mode=30;break}q=T>y.wnext?(T-=y.wnext,y.wsize-T):y.wnext-T,T>y.length&&(T=y.length),ge=y.window}else ge=R,q=k-y.offset,T=y.length;for(ZF?(E=q[ge+m[U]],_[z+m[U]]):(E=96,0),v=1<>k)+(w-=v)]=x<<24|E<<16|M|0,w!==0;);for(v=1<>=1;if(v!==0?(N&=v-1,N+=v):N=0,U++,--ie[O]==0){if(O===I)break;O=u[h+m[U]]}if(R>>7)]}function z(K,se){K.pending_buf[K.pending++]=255&se,K.pending_buf[K.pending++]=se>>>8&255}function ie(K,se,ye){K.bi_valid>g-ye?(K.bi_buf|=se<>g-K.bi_valid,K.bi_valid+=ye-g):(K.bi_buf|=se<>>=1,ye<<=1,0<--se;);return ye>>>1}function ge(K,se,ye){var ne,J,Y=new Array(m+1),ue=0;for(ne=1;ne<=m;ne++)Y[ne]=ue=ue+ye[ne-1]<<1;for(J=0;J<=se;J++){var le=K[2*J+1];le!==0&&(K[2*J]=q(Y[le]++,le))}}function he(K){var se;for(se=0;se>1;1<=ye;ye--)ce(K,Y,ye);for(J=we;ye=K.heap[1],K.heap[1]=K.heap[K.heap_len--],ce(K,Y,1),ne=K.heap[1],K.heap[--K.heap_max]=ye,K.heap[--K.heap_max]=ne,Y[2*J]=Y[2*ye]+Y[2*ne],K.depth[J]=(K.depth[ye]>=K.depth[ne]?K.depth[ye]:K.depth[ne])+1,Y[2*ye+1]=Y[2*ne+1]=J,K.heap[1]=J++,ce(K,Y,1),2<=K.heap_len;);K.heap[--K.heap_max]=K.heap[1],function(Q,S){var W,te,oe,ae,Se,Ee,Me=S.dyn_tree,Le=S.max_code,ke=S.stat_desc.static_tree,pe=S.stat_desc.has_stree,Fe=S.stat_desc.extra_bits,Ue=S.stat_desc.extra_base,Te=S.stat_desc.max_length,Ye=0;for(ae=0;ae<=m;ae++)Q.bl_count[ae]=0;for(Me[2*Q.heap[Q.heap_max]+1]=0,W=Q.heap_max+1;W>=7;J>>=1)if(1&G&&le.dyn_ltree[2*we]!==0)return o;if(le.dyn_ltree[18]!==0||le.dyn_ltree[20]!==0||le.dyn_ltree[26]!==0)return a;for(we=32;we>>3,(Y=K.static_len+3+7>>>3)<=J&&(J=Y)):J=Y=ye+5,ye+4<=J&&se!==-1?ee(K,se,ye,ne):K.strategy===4||Y===J?(ie(K,2+(ne?1:0),3),me(K,H,O)):(ie(K,4+(ne?1:0),3),function(le,we,G,Q){var S;for(ie(le,we-257,5),ie(le,G-1,5),ie(le,Q-4,4),S=0;S>>8&255,K.pending_buf[K.d_buf+2*K.last_lit+1]=255&se,K.pending_buf[K.l_buf+K.last_lit]=255&ye,K.last_lit++,se===0?K.dyn_ltree[2*ye]++:(K.matches++,se--,K.dyn_ltree[2*(y[ye]+u+1)]++,K.dyn_dtree[2*_(se)]++),K.last_lit===K.lit_bufsize-1},i._tr_align=function(K){ie(K,2,3),T(K,w,H),function(se){se.bi_valid===16?(z(se,se.bi_buf),se.bi_buf=0,se.bi_valid=0):8<=se.bi_valid&&(se.pending_buf[se.pending++]=255&se.bi_buf,se.bi_buf>>=8,se.bi_valid-=8)}(K)}},{"../utils/common":41}],53:[function(t,r,i){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,r,i){(function(s){(function(o,a){if(!o.setImmediate){var l,A,c,u,h=1,d={},p=!1,f=o.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(o);m=m&&m.setTimeout?m:o,l={}.toString.call(o.process)==="[object process]"?function(B){process.nextTick(function(){v(B)})}:function(){if(o.postMessage&&!o.importScripts){var B=!0,C=o.onmessage;return o.onmessage=function(){B=!1},o.postMessage("","*"),o.onmessage=C,B}}()?(u="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",w,!1):o.attachEvent("onmessage",w),function(B){o.postMessage(u+B,"*")}):o.MessageChannel?((c=new MessageChannel).port1.onmessage=function(B){v(B.data)},function(B){c.port2.postMessage(B)}):f&&"onreadystatechange"in f.createElement("script")?(A=f.documentElement,function(B){var C=f.createElement("script");C.onreadystatechange=function(){v(B),C.onreadystatechange=null,A.removeChild(C),C=null},A.appendChild(C)}):function(B){setTimeout(v,0,B)},m.setImmediate=function(B){typeof B!="function"&&(B=new Function(""+B));for(var C=new Array(arguments.length-1),b=0;b"u"?s===void 0?this:s:self)}).call(this,typeof pa<"u"?pa:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(eH);var Fpe=eH.exports;const _pe=Zl(Fpe);class qf{constructor(){this.zipContainer={}}addData(e,t,r,i=""){i==""&&(i="_"),this.zipContainer[i]==null&&(this.zipContainer[i]=[]),this.zipContainer[i].push({data:e,name:t,extension:r})}saveZip(e,t=!0){const r=this.zipContainer,i=new _pe;for(const s in r)if(s=="_")r[s].forEach((o,a)=>{i.file(o.name+"."+o.extension,o.data,{base64:!0})});else{const o=i.folder(s);r[s].forEach((a,l)=>{const A=a.extension!="txt";o.file(a.name+"."+a.extension,a.data,{base64:A})})}i.generateAsync({type:"blob"}).then(s=>{this._saveZipFile(s,e+".zip")}),t&&(this.zipContainer={})}_saveZipFile(e,t){const r=new Blob([e],{type:"application/zip"});if(typeof window.navigator.msSaveBlob<"u")window.navigator.msSaveBlob(r,t);else{const i=document.createElement("a");typeof i.download=="string"?(document.body.appendChild(i),i.download=t,i.href=URL.createObjectURL(r),i.click(),document.body.removeChild(i)):window.open(e,"_blank").document.write(""+t+"")}}}new j;class Epe{constructor(e){this.characterManager=e,this.screenshotManager=e.screenshotManager,this.blinkManager=e.blinkManager,this.animationManager=this.characterManager.animationManager,this.temptime=0}async createLoraData(e,t=null,r="",i){const s=e.manifest,o=e.name?"loraData/"+e.name:"loraData",a=await this._fetchManifest(s),{assetsLocation:l="",animationsDirectory:A="",backgroundGrayscale:c=1,topFrameOffsetPixels:u=64,bottomFrameOffsetPixels:h=64,backgroundDescription:d="",width:p=512,height:f=512,dataCollection:m}=a,g=l+A+"/";this.screenshotManager.setBackground([c,c,c]),this.blinkManager.enableScreenshot(),await this.screenshotManager.calculateBoneOffsets(.2);let v=0;const w=this;if(Array.isArray(m)){const B=t??new qf;await(async()=>{if(Array.isArray(m))for(let b=0;b{const Z=[];return Ot(R).forEach(_=>{Z.push({id:_})}),Z},k=R==null?v.characterManager.getTraits(F):D();if(k==null){console.log("SKipping Thumbnail Generation for trait group "+F+", its not present in the character manifest.");continue}const V=nQ(x);I?v.screenshotManager.setCameraFrameWithName(I,V):v.screenshotManager.frameShot(E,H,V,M,O);for(let Z=0;Z{const[e,t]=Ce.useState(null),[r,i]=Ce.useState(null),[s,o]=Ce.useState(null),[a,l]=Ce.useState(null),[A,c]=Ce.useState(null),[u,h]=Ce.useState(null),[d,p]=Ce.useState(null),[f,m]=Ce.useState(null),[g,v]=Ce.useState(null),[w,B]=Ce.useState(null),[C,b]=Ce.useState(null),[F,x]=Ce.useState(!1);let E=!1,[M,H]=Ce.useState(!1);Ce.useEffect(()=>{if(E||M)return;H(!0),E=!0;const{scene:I,camera:R,controls:D,characterManager:k,sceneElements:V}=Ipe("editor-scene");v(R),m(I),t(k),c(V),h(k.animationManager),p(k.lookAtManager),B(D),i(new Epe(k)),o(new Spe(k)),l(new Upe(k))},[]);const O=I=>{I==null&&(I=!F),x(I),f.traverse(R=>{R.isMesh&&R.setDebugMode&&R.setDebugMode(I)})};Ce.useEffect(()=>{if(C!=null&&C.defaultAnimations){const I=C.defaultAnimations.map(R=>R.location);u.storeDefaultAnimationPaths(I,"")}},[C]);const U=I=>{I?f.add(A):f.remove(A)},y=I=>{w&&(m_.to(w.target,{x:I.targetX??0,y:I.targetY??0,z:I.targetZ??0,duration:1}),m_.fromTo(w,{maxDistance:w.getDistance(),minDistance:w.getDistance(),minPolarAngle:w.getPolarAngle(),maxPolarAngle:w.getPolarAngle(),minAzimuthAngle:w.getAzimuthalAngle(),maxAzimuthAngle:w.getAzimuthalAngle()},{maxDistance:I.distance,minDistance:I.distance,minPolarAngle:Math.PI/2-.11,maxPolarAngle:Math.PI/2-.11,minAzimuthAngle:-.78,maxAzimuthAngle:-.78,duration:1}).then(()=>{w.minPolarAngle=0,w.maxPolarAngle=3.1415,w.minDistance=.5,w.maxDistance=10,w.minAzimuthAngle=1/0,w.maxAzimuthAngle=1/0}))};return L.jsx(lr.Provider,{value:{manifest:C,setManifest:b,scene:f,characterManager:e,loraDataGenerator:r,spriteAtlasGenerator:s,thumbnailsGenerator:a,showEnvironmentModels:U,debugMode:F,toggleDebugMode:O,animationManager:u,lookAtManager:d,camera:g,moveCamera:y,controls:w,sceneElements:A},children:n.children})},Rpe={NORMAL:"NORMAL",AR:"AR",AR_FRONT:"AR_FRONT",VR:"VR"},at={LANDING:"LANDING",CREATE:"CREATE",CLAIM:"CLAIM",LOAD:"LOAD",APPEARANCE:"APPEARANCE",BATCHDOWNLOAD:"BATCHDOWNLOAD",BIO:"BIO",SAVE:"SAVE",MINT:"MINT",CHAT:"CHAT",OPTIMIZER:"OPTIMIZER",BATCHMANIFEST:"BATCHMANIFEST",WALLET:"WALLET"},Ci=X.createContext(),Mpe=n=>{const[e,t]=X.useState(Rpe.NORMAL),[r,i]=X.useState(at.LANDING),[s,o]=X.useState(!1),[a,l]=X.useState(!1);return L.jsx(Ci.Provider,{value:{viewMode:r,setViewMode:i,isLoading:s,setIsLoading:o,mouseIsOverUI:a,setMouseIsOverUI:l,currentCameraMode:e,setCurrentCameraMode:t},children:n.children})},Tpe="modulepreload",Npe=function(n){return"/CharacterStudio/"+n},PD={},kpe=function(e,t,r){if(!t||t.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(t.map(s=>{if(s=Npe(s),s in PD)return;PD[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const u=i[c];if(u.href===s&&(!o||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const A=document.createElement("link");if(A.rel=o?"stylesheet":Tpe,o||(A.as="script",A.crossOrigin=""),A.href=s,document.head.appendChild(A),o)return new Promise((c,u)=>{A.addEventListener("load",c),A.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function $B(){return $B=Object.assign||function(n){for(var e=1;e=0)&&(t[i]=n[i]);return t}function Lpe(n){Ce.useEffect(n,[])}function Vpe(n,e){e===void 0&&(e={});var t=e,r=t.volume,i=r===void 0?1:r,s=t.playbackRate,o=s===void 0?1:s,a=t.soundEnabled,l=a===void 0?!0:a,A=t.interrupt,c=A===void 0?!1:A,u=t.onload,h=Dpe(t,["id","volume","playbackRate","soundEnabled","interrupt","onload"]),d=X.useRef(null),p=X.useRef(!1),f=X.useState(null),m=f[0],g=f[1],v=X.useState(null),w=v[0],B=v[1],C=function(){typeof u=="function"&&u.call(this),p.current&&g(this.duration()*1e3),B(this)};Lpe(function(){return kpe(()=>import("./howler-d5aaf79f.js").then(M=>M.h),[]).then(function(M){if(!p.current){var H;d.current=(H=M.Howl)!==null&&H!==void 0?H:M.default.Howl,p.current=!0,new d.current($B({src:Array.isArray(n)?n:[n],volume:i,rate:o,onload:C},h))}}),function(){p.current=!1}}),X.useEffect(function(){d.current&&w&&B(new d.current($B({src:Array.isArray(n)?n:[n],volume:i,onload:C},h)))},[JSON.stringify(n)]),X.useEffect(function(){w&&(w.volume(i),w.rate(o))},[i,o]);var b=X.useCallback(function(M){typeof M>"u"&&(M={}),!(!w||!l&&!M.forceSoundEnabled)&&(c&&w.stop(),M.playbackRate&&w.rate(M.playbackRate),w.play(M.id))},[w,l,c]),F=X.useCallback(function(M){w&&w.stop(M)},[w]),x=X.useCallback(function(M){w&&w.pause(M)},[w]),E=[b,{sound:w,stop:F,pause:x,duration:m}];return E}const Ppe=[{name:"background/cc_bgm.wav",offset:0,duration:123458.58333333334},{name:"background/cc_bgm_balanced.wav",offset:123458.58333333334,duration:123458.60416666666},{name:"effect/character-load.wav",offset:246917.1875,duration:3030},{name:"effect/class-select.wav",offset:249947.1875,duration:2780},{name:"effect/switchingItem.wav",offset:252727.1875,duration:623.75},{name:"ui/back-next-button.wav",offset:253350.9375,duration:155.02083333333334},{name:"ui/class-mouse-over.wav",offset:253505.95833333334,duration:217.52083333333334},{name:"ui/class_click.wav",offset:253723.4791666667,duration:3123.75},{name:"ui/class_pass.wav",offset:256847.2291666667,duration:155},{name:"ui/option_click.wav",offset:257002.2291666667,duration:155.02083333333334},{name:"ui/randomize-button.wav",offset:257157.25000000003,duration:342.5208333333333},{name:"ui/section_click.wav",offset:257499.77083333337,duration:155}],Ope="/CharacterStudio/assets/sounds-3322d50e.mp3",bs=Ce.createContext(),Wpe=n=>{const e=i=>Ppe.find(s=>i.test(s.name)),[t]=Vpe(Ope,{sprite:{switchItem:[e(/switchingItem/).offset,e(/switchingItem/).duration],classSelect:[e(/class-select/).offset,e(/class-select/).duration],characterLoad:[e(/character-load/).offset,e(/character-load/).duration],randomizeButton:[e(/randomize-button/).offset,e(/randomize-button/).duration],classMouseOver:[e(/class-mouse-over/).offset,e(/class-mouse-over/).duration],backNextButton:[e(/back-next-button/).offset,e(/back-next-button/).duration]}}),r=(i,s=0)=>{s===0?t({id:i}):setTimeout(()=>{t({id:i})},s)};return L.jsx(bs.Provider,{value:{playSound:r},children:n.children})};function $s(n){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(n)}function lo(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Zpe(n,e){if($s(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if($s(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function tH(n){var e=Zpe(n,"string");return $s(e)=="symbol"?e:e+""}function OD(n,e){for(var t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t1&&arguments[1]!==void 0?arguments[1]:{};lo(this,n),this.init(e,t)}return Ao(n,[{key:"init",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||Hpe,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,r=new Array(t),i=0;i1?r-1:0),s=1;s-1?a.replace(/###/g,"."):a}function i(){return!n||typeof n=="string"}for(var s=typeof e!="string"?[].concat(e):e.split(".");s.length>1;){if(i())return{};var o=r(s.shift());!n[o]&&t&&(n[o]=new t),Object.prototype.hasOwnProperty.call(n,o)?n=n[o]:n={}}return i()?{}:{obj:n,k:r(s.shift())}}function HD(n,e,t){var r=aQ(n,e,Object),i=r.obj,s=r.k;i[s]=t}function Xpe(n,e,t,r){var i=aQ(n,e,Object),s=i.obj,o=i.k;s[o]=s[o]||[],r&&(s[o]=s[o].concat(t)),r||s[o].push(t)}function qB(n,e){var t=aQ(n,e),r=t.obj,i=t.k;if(r)return r[i]}function zD(n,e,t){var r=qB(n,t);return r!==void 0?r:qB(e,t)}function sH(n,e,t){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?typeof n[r]=="string"||n[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?t&&(n[r]=e[r]):sH(n[r],e[r],t):n[r]=e[r]);return n}function Sd(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var jpe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Kpe(n){return typeof n=="string"?n.replace(/[&<>"'\/]/g,function(e){return jpe[e]}):n}var vb=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,$pe=[" ",",","?","!",";"];function qpe(n,e,t){e=e||"",t=t||"";var r=$pe.filter(function(a){return e.indexOf(a)<0&&t.indexOf(a)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),s=!i.test(n);if(!s){var o=n.indexOf(t);o>0&&!i.test(n.substring(0,o))&&(s=!0)}return s}function YD(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function By(n){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function oH(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(n){if(n[e])return n[e];for(var r=e.split(t),i=n,s=0;ss+o;)o++,a=r.slice(s,s+o).join(t),l=i[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var A=r.slice(s+o).join(t);return A?oH(l,A,t):void 0}i=i[r[s]]}return i}}var nge=function(n){mb(t,n);var e=ege(t);function t(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return lo(this,t),i=e.call(this),vb&&Ac.call(qA(i)),i.data=r||{},i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Ao(t,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var s=this.options.ns.indexOf(i);s>-1&&this.options.ns.splice(s,1)}},{key:"getResource",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,A=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[i,s];o&&typeof o!="string"&&(c=c.concat(o)),o&&typeof o=="string"&&(c=c.concat(l?o.split(l):o)),i.indexOf(".")>-1&&(c=i.split("."));var u=qB(this.data,c);return u||!A||typeof o!="string"?u:oH(this.data&&this.data[i]&&this.data[i][s],o,l)}},{key:"addResource",value:function(i,s,o,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},A=this.options.keySeparator;A===void 0&&(A=".");var c=[i,s];o&&(c=c.concat(A?o.split(A):o)),i.indexOf(".")>-1&&(c=i.split("."),a=s,s=c[1]),this.addNamespaces(s),HD(this.data,c,a),l.silent||this.emit("added",i,s,o,a)}},{key:"addResources",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in o)(typeof o[l]=="string"||Object.prototype.toString.apply(o[l])==="[object Array]")&&this.addResource(i,s,l,o[l],{silent:!0});a.silent||this.emit("added",i,s,o)}},{key:"addResourceBundle",value:function(i,s,o,a,l){var A=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[i,s];i.indexOf(".")>-1&&(c=i.split("."),a=o,o=s,s=c[1]),this.addNamespaces(s);var u=qB(this.data,c)||{};a?sH(u,o,l):u=By(By({},u),o),HD(this.data,c,u),A.silent||this.emit("added",i,s,o)}},{key:"removeResourceBundle",value:function(i,s){this.hasResourceBundle(i,s)&&delete this.data[i][s],this.removeNamespaces(s),this.emit("removed",i,s)}},{key:"hasResourceBundle",value:function(i,s){return this.getResource(i,s)!==void 0}},{key:"getResourceBundle",value:function(i,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?By(By({},{}),this.getResource(i,s)):this.getResource(i,s)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var s=this.getDataByLanguage(i),o=s&&Object.keys(s)||[];return!!o.find(function(a){return s[a]&&Object.keys(s[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),t}(Ac),aH={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,i,s){var o=this;return e.forEach(function(a){o.processors[a]&&(t=o.processors[a].process(t,r,i,s))}),t}};function XD(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function oi(n){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var jD={},KD=function(n){mb(t,n);var e=rge(t);function t(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return lo(this,t),i=e.call(this),vb&&Ac.call(qA(i)),Ype(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,qA(i)),i.options=s,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=ga.create("translator"),i}return Ao(t,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var o=this.resolve(i,s);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,s){var o=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ns||this.options.defaultNS||[],A=o&&i.indexOf(o)>-1,c=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!qpe(i,o,a);if(A&&!c){var u=i.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:i,namespaces:l};var h=i.split(o);(o!==a||o===a&&this.options.ns.indexOf(h[0])>-1)&&(l=h.shift()),i=h.join(a)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,s,o){var a=this;if($s(s)!=="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),s||(s={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,A=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=this.extractFromKey(i[i.length-1],s),u=c.key,h=c.namespaces,d=h[h.length-1],p=s.lng||this.language,f=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(f){var m=s.nsSeparator||this.options.nsSeparator;return l?{res:"".concat(d).concat(m).concat(u),usedKey:u,exactUsedKey:u,usedLng:p,usedNS:d}:"".concat(d).concat(m).concat(u)}return l?{res:u,usedKey:u,exactUsedKey:u,usedLng:p,usedNS:d}:u}var g=this.resolve(i,s),v=g&&g.res,w=g&&g.usedKey||u,B=g&&g.exactUsedKey||u,C=Object.prototype.toString.apply(v),b=["[object Number]","[object Function]","[object RegExp]"],F=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,E=typeof v!="string"&&typeof v!="boolean"&&typeof v!="number";if(x&&v&&E&&b.indexOf(C)<0&&!(typeof F=="string"&&C==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,v,oi(oi({},s),{},{ns:h})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return l?(g.res=M,g):M}if(A){var H=C==="[object Array]",O=H?[]:{},U=H?B:w;for(var y in v)if(Object.prototype.hasOwnProperty.call(v,y)){var I="".concat(U).concat(A).concat(y);O[y]=this.translate(I,oi(oi({},s),{joinArrays:!1,ns:h})),O[y]===I&&(O[y]=v[y])}v=O}}else if(x&&typeof F=="string"&&C==="[object Array]")v=v.join(F),v&&(v=this.extendTranslation(v,i,s,o));else{var R=!1,D=!1,k=s.count!==void 0&&typeof s.count!="string",V=t.hasDefaultValue(s),Z=k?this.pluralResolver.getSuffix(p,s.count,s):"",N=s["defaultValue".concat(Z)]||s.defaultValue;!this.isValidLookup(v)&&V&&(R=!0,v=N),this.isValidLookup(v)||(D=!0,v=u);var _=s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,z=_&&D?void 0:v,ie=V&&N!==v&&this.options.updateMissing;if(D||R||ie){if(this.logger.log(ie?"updateKey":"missingKey",p,d,u,ie?N:v),A){var T=this.resolve(u,oi(oi({},s),{},{keySeparator:!1}));T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var q=[],ge=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ge&&ge[0])for(var he=0;he1&&arguments[1]!==void 0?arguments[1]:{},a,l,A,c,u;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!s.isValidLookup(a)){var d=s.extractFromKey(h,o),p=d.key;l=p;var f=d.namespaces;s.options.fallbackNS&&(f=f.concat(s.options.fallbackNS));var m=o.count!==void 0&&typeof o.count!="string",g=m&&!o.ordinal&&o.count===0&&s.pluralResolver.shouldUseIntlApi(),v=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",w=o.lngs?o.lngs:s.languageUtils.toResolveHierarchy(o.lng||s.language,o.fallbackLng);f.forEach(function(B){s.isValidLookup(a)||(u=B,!jD["".concat(w[0],"-").concat(B)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(u)&&(jD["".concat(w[0],"-").concat(B)]=!0,s.logger.warn('key "'.concat(l,'" for languages "').concat(w.join(", "),`" won't get resolved as namespace "`).concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(function(C){if(!s.isValidLookup(a)){c=C;var b=[p];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(b,p,C,B,o);else{var F;m&&(F=s.pluralResolver.getSuffix(C,o.count,o));var x="".concat(s.options.pluralSeparator,"zero");if(m&&(b.push(p+F),g&&b.push(p+x)),v){var E="".concat(p).concat(s.options.contextSeparator).concat(o.context);b.push(E),m&&(b.push(E+F),g&&b.push(E+x))}}for(var M;M=b.pop();)s.isValidLookup(a)||(A=M,a=s.getResource(C,B,M,o))}}))})}}),{res:a,usedKey:l,exactUsedKey:A,usedLng:c,usedNS:u}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,s,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,s,o,a):this.resourceStore.getResource(i,s,o,a)}}],[{key:"hasDefaultValue",value:function(i){var s="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&s===o.substring(0,s.length)&&i[o]!==void 0)return!0;return!1}}]),t}(Ac);function II(n){return n.charAt(0).toUpperCase()+n.slice(1)}var $D=function(){function n(e){lo(this,n),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ga.create("languageUtils")}return Ao(n,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=t.split("-");return this.options.lowerCaseLng?i=i.map(function(s){return s.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=II(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=II(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=II(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var r=this;if(!t)return null;var i;return t.forEach(function(s){if(!i){var o=r.formatLanguageCode(s);(!r.options.supportedLngs||r.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&t.forEach(function(s){if(!i){var o=r.getLanguagePartFromCode(s);if(r.isSupportedCode(o))return i=o;i=r.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!r)return t.default||[];var i=t[r];return i||(i=t[this.getScriptPartFromCode(r)]),i||(i=t[this.formatLanguageCode(r)]),i||(i=t[this.getLanguagePartFromCode(r)]),i||(i=t.default),i||[]}},{key:"toResolveHierarchy",value:function(t,r){var i=this,s=this.getFallbackCodes(r||this.options.fallbackLng||[],t),o=[],a=function(A){A&&(i.isSupportedCode(A)?o.push(A):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(A)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),s.forEach(function(l){o.indexOf(l)<0&&a(i.formatLanguageCode(l))}),o}}]),n}(),sge=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],oge={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}},age=["v1","v2","v3"],qD={zero:0,one:1,two:2,few:3,many:4,other:5};function lge(){var n={};return sge.forEach(function(e){e.lngs.forEach(function(t){n[t]={numbers:e.nr,plurals:oge[e.fc]}})}),n}var Age=function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};lo(this,n),this.languageUtils=e,this.options=t,this.logger=ga.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=lge()}return Ao(n,[{key:"addRule",value:function(t,r){this.rules[t]=r}},{key:"getRule",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(t,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,i).map(function(s){return"".concat(r).concat(s)})}},{key:"getSuffixes",value:function(t){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(t,i);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(function(o,a){return qD[o]-qD[a]}).map(function(o){return"".concat(r.options.prepend).concat(o)}):s.numbers.map(function(o){return r.getSuffix(t,o,i)}):[]}},{key:"getSuffix",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(t,i);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(s.select(r)):this.getSuffixRetroCompatible(s,r):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,r){var i=this,s=t.noAbs?t.plurals(r):t.plurals(Math.abs(r)),o=t.numbers[s];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var a=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}},{key:"shouldUseIntlApi",value:function(){return!age.includes(this.options.compatibilityJSON)}}]),n}();function e3(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function wo(n){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{};lo(this,n),this.logger=ga.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return Ao(n,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=r.escape!==void 0?r.escape:Kpe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Sd(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Sd(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Sd(r.nestingPrefix):r.nestingPrefixEscaped||Sd("$t("),this.nestingSuffix=r.nestingSuffix?Sd(r.nestingSuffix):r.nestingSuffixEscaped||Sd(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(t,r,i,s){var o=this,a,l,A,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(m){return m.replace(/\$/g,"$$$$")}var h=function(g){if(g.indexOf(o.formatSeparator)<0){var v=zD(r,c,g);return o.alwaysFormat?o.format(v,void 0,i,wo(wo(wo({},s),r),{},{interpolationkey:g})):v}var w=g.split(o.formatSeparator),B=w.shift().trim(),C=w.join(o.formatSeparator).trim();return o.format(zD(r,c,B),C,i,wo(wo(wo({},s),r),{},{interpolationkey:B}))};this.resetRegExp();var d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,p=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,f=[{regex:this.regexpUnescape,safeValue:function(g){return u(g)}},{regex:this.regexp,safeValue:function(g){return o.escapeValue?u(o.escape(g)):u(g)}}];return f.forEach(function(m){for(A=0;a=m.regex.exec(t);){var g=a[1].trim();if(l=h(g),l===void 0)if(typeof d=="function"){var v=d(t,a,s);l=typeof v=="string"?v:""}else if(s&&Object.prototype.hasOwnProperty.call(s,g))l="";else if(p){l=a[0];continue}else o.logger.warn("missed to pass in variable ".concat(g," for interpolating ").concat(t)),l="";else typeof l!="string"&&!o.useRawValueToEscape&&(l=JD(l));var w=m.safeValue(l);if(t=t.replace(a[0],w),p?(m.regex.lastIndex+=l.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,A++,A>=o.maxReplaces)break}}),t}},{key:"nest",value:function(t,r){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,l;function A(d,p){var f=this.nestingOptionsSeparator;if(d.indexOf(f)<0)return d;var m=d.split(new RegExp("".concat(f,"[ ]*{"))),g="{".concat(m[1]);d=m[0],g=this.interpolate(g,l);var v=g.match(/'/g),w=g.match(/"/g);(v&&v.length%2===0&&!w||w.length%2!==0)&&(g=g.replace(/'/g,'"'));try{l=JSON.parse(g),p&&(l=wo(wo({},p),l))}catch(B){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),B),"".concat(d).concat(f).concat(g)}return delete l.defaultValue,d}for(;o=this.nestingRegexp.exec(t);){var c=[];l=wo({},s),l=l.replace&&typeof l.replace!="string"?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;var u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var h=o[1].split(this.formatSeparator).map(function(d){return d.trim()});o[1]=h.shift(),c=h,u=!0}if(a=r(A.call(this,o[1].trim(),l),l),a&&o[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=JD(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(t)),a=""),u&&(a=c.reduce(function(d,p){return i.format(d,p,s.lng,wo(wo({},s),{},{interpolationkey:o[1].trim()}))},a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}]),n}();function t3(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function rl(n){for(var e=1;e-1){var r=n.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(e==="currency"&&i.indexOf(":")<0)t.currency||(t.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)t.range||(t.range=i.trim());else{var s=i.split(";");s.forEach(function(o){if(o){var a=o.split(":"),l=Jpe(a),A=l[0],c=l.slice(1),u=c.join(":").trim().replace(/^'+|'+$/g,"");t[A.trim()]||(t[A.trim()]=u),u==="false"&&(t[A.trim()]=!1),u==="true"&&(t[A.trim()]=!0),isNaN(u)||(t[A.trim()]=parseInt(u,10))}})}}return{formatName:e,formatOptions:t}}function Ud(n){var e={};return function(r,i,s){var o=i+JSON.stringify(s),a=e[o];return a||(a=n(i,s),e[o]=a),a(r)}}var dge=function(){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lo(this,n),this.logger=ga.create("formatter"),this.options=e,this.formats={number:Ud(function(t,r){var i=new Intl.NumberFormat(t,rl({},r));return function(s){return i.format(s)}}),currency:Ud(function(t,r){var i=new Intl.NumberFormat(t,rl(rl({},r),{},{style:"currency"}));return function(s){return i.format(s)}}),datetime:Ud(function(t,r){var i=new Intl.DateTimeFormat(t,rl({},r));return function(s){return i.format(s)}}),relativetime:Ud(function(t,r){var i=new Intl.RelativeTimeFormat(t,rl({},r));return function(s){return i.format(s,r.range||"day")}}),list:Ud(function(t,r){var i=new Intl.ListFormat(t,rl({},r));return function(s){return i.format(s)}})},this.init(e)}return Ao(n,[{key:"init",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(t,r){this.formats[t.toLowerCase().trim()]=r}},{key:"addCached",value:function(t,r){this.formats[t.toLowerCase().trim()]=Ud(r)}},{key:"format",value:function(t,r,i){var s=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r.split(this.formatSeparator),l=a.reduce(function(A,c){var u=uge(c),h=u.formatName,d=u.formatOptions;if(s.formats[h]){var p=A;try{var f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},m=f.locale||f.lng||o.locale||o.lng||i;p=s.formats[h](A,m,rl(rl(rl({},d),o),f))}catch(g){s.logger.warn(g)}return p}else s.logger.warn("there was no format function for ".concat(h));return A},t);return l}}]),n}();function n3(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function r3(n){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pge(n,e){n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)}var gge=function(n){mb(t,n);var e=hge(t);function t(r,i,s){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return lo(this,t),o=e.call(this),vb&&Ac.call(qA(o)),o.backend=r,o.store=i,o.services=s,o.languageUtils=s.languageUtils,o.options=a,o.logger=ga.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=a.maxParallelReads||10,o.readingCalls=0,o.maxRetries=a.maxRetries>=0?a.maxRetries:5,o.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(s,a.backend,a),o}return Ao(t,[{key:"queueLoad",value:function(i,s,o,a){var l=this,A={},c={},u={},h={};return i.forEach(function(d){var p=!0;s.forEach(function(f){var m="".concat(d,"|").concat(f);!o.reload&&l.store.hasResourceBundle(d,f)?l.state[m]=2:l.state[m]<0||(l.state[m]===1?c[m]===void 0&&(c[m]=!0):(l.state[m]=1,p=!1,c[m]===void 0&&(c[m]=!0),A[m]===void 0&&(A[m]=!0),h[f]===void 0&&(h[f]=!0)))}),p||(u[d]=!0)}),(Object.keys(A).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(A),pending:Object.keys(c),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,s,o){var a=i.split("|"),l=a[0],A=a[1];s&&this.emit("failedLoading",l,A,s),o&&this.store.addResourceBundle(l,A,o),this.state[i]=s?-1:2;var c={};this.queue.forEach(function(u){Xpe(u.loaded,[l],A),pge(u,i),s&&u.errors.push(s),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(function(h){c[h]||(c[h]={});var d=u.loaded[h];d.length&&d.forEach(function(p){c[h][p]===void 0&&(c[h][p]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(u){return!u.done})}},{key:"read",value:function(i,s,o){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,A=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!i.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:s,fcName:o,tried:l,wait:A,callback:c});return}this.readingCalls++;var u=function(f,m){if(a.readingCalls--,a.waitingReads.length>0){var g=a.waitingReads.shift();a.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(f&&m&&l2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof s=="string"&&(s=[s]);var A=this.queueLoad(i,s,a,l);if(!A.toLoad.length)return A.pending.length||l(),null;A.toLoad.forEach(function(c){o.loadOne(c)})}},{key:"load",value:function(i,s,o){this.prepareLoading(i,s,{},o)}},{key:"reload",value:function(i,s,o){this.prepareLoading(i,s,{reload:!0},o)}},{key:"loadOne",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=i.split("|"),l=a[0],A=a[1];this.read(l,A,"read",void 0,void 0,function(c,u){c&&s.logger.warn("".concat(o,"loading namespace ").concat(A," for language ").concat(l," failed"),c),!c&&u&&s.logger.log("".concat(o,"loaded namespace ").concat(A," for language ").concat(l),u),s.loaded(i,c,u)})}},{key:"saveMissing",value:function(i,s,o,a,l){var A=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend&&this.backend.create){var u=r3(r3({},A),{},{isUpdate:l}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var d;h.length===5?d=h(i,s,o,a,u):d=h(i,s,o,a),d&&typeof d.then=="function"?d.then(function(p){return c(null,p)}).catch(c):c(null,d)}catch(p){c(p)}else h(i,s,o,a,c,u)}!i||!i[0]||this.store.addResource(i[0],s,o,a)}}}]),t}(Ac);function i3(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if($s(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),$s(e[2])==="object"||$s(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){t[i]=r[i]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function s3(n){return typeof n.ns=="string"&&(n.ns=[n.ns]),typeof n.fallbackLng=="string"&&(n.fallbackLng=[n.fallbackLng]),typeof n.fallbackNS=="string"&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n}function o3(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function jo(n){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cy(){}function yge(n){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(n));e.forEach(function(t){typeof n[t]=="function"&&(n[t]=n[t].bind(n))})}var eC=function(n){mb(t,n);var e=mge(t);function t(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(lo(this,t),r=e.call(this),vb&&Ac.call(qA(r)),r.options=s3(i),r.services={},r.logger=ga,r.modules={external:[]},yge(qA(r)),s&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,s),C0(r,qA(r));setTimeout(function(){r.init(i,s)},0)}return r}return Ao(t,[{key:"init",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof s=="function"&&(o=s,s={}),!s.defaultNS&&s.defaultNS!==!1&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));var a=i3();this.options=jo(jo(jo({},a),this.options),s3(s)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=jo(jo({},a.interpolation),this.options.interpolation)),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function l(g){return g?typeof g=="function"?new g:g:null}if(!this.options.isClone){this.modules.logger?ga.init(l(this.modules.logger),this.options):ga.init(null,this.options);var A;this.modules.formatter?A=this.modules.formatter:typeof Intl<"u"&&(A=dge);var c=new $D(this.options);this.store=new nge(this.options.resources,this.options);var u=this.services;u.logger=ga,u.resourceStore=this.store,u.languageUtils=c,u.pluralResolver=new Age(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),A&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(u.formatter=l(A),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new cge(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new gge(l(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(g){for(var v=arguments.length,w=new Array(v>1?v-1:0),B=1;B1?v-1:0),B=1;B0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(g){i[g]=function(){var v;return(v=i.store)[g].apply(v,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(g){i[g]=function(){var v;return(v=i.store)[g].apply(v,arguments),i}});var f=Xp(),m=function(){var v=function(B,C){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),f.resolve(C),o(B,C)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return v(null,i.t.bind(i));i.changeLanguage(i.options.lng,v)};return this.options.resources||!this.options.initImmediate?m():setTimeout(m,0),f}},{key:"loadResources",value:function(i){var s=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cy,a=o,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(a=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var A=[],c=function(d){if(d){var p=s.services.languageUtils.toResolveHierarchy(d);p.forEach(function(f){A.indexOf(f)<0&&A.push(f)})}};if(l)c(l);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach(function(h){return c(h)})}this.options.preload&&this.options.preload.forEach(function(h){return c(h)}),this.services.backendConnector.load(A,this.options.ns,function(h){!h&&!s.resolvedLanguage&&s.language&&s.setResolvedLanguage(s.language),a(h)})}else a(null)}},{key:"reloadResources",value:function(i,s,o){var a=Xp();return i||(i=this.languages),s||(s=this.options.ns),o||(o=Cy),this.services.backendConnector.reload(i,s,function(l){a.resolve(),o(l)}),a}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&aH.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var s=0;s-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,s){var o=this;this.isLanguageChangingTo=i;var a=Xp();this.emit("languageChanging",i);var l=function(h){o.language=h,o.languages=o.services.languageUtils.toResolveHierarchy(h),o.resolvedLanguage=void 0,o.setResolvedLanguage(h)},A=function(h,d){d?(l(d),o.translator.changeLanguage(d),o.isLanguageChangingTo=void 0,o.emit("languageChanged",d),o.logger.log("languageChanged",d)):o.isLanguageChangingTo=void 0,a.resolve(function(){return o.t.apply(o,arguments)}),s&&s(h,function(){return o.t.apply(o,arguments)})},c=function(h){!i&&!h&&o.services.languageDetector&&(h=[]);var d=typeof h=="string"?h:o.services.languageUtils.getBestMatchFromCodes(h);d&&(o.language||l(d),o.translator.language||o.translator.changeLanguage(d),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage&&o.services.languageDetector.cacheUserLanguage(d)),o.loadResources(d,function(p){A(p,d)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(i),a}},{key:"getFixedT",value:function(i,s,o){var a=this,l=function A(c,u){var h;if($s(u)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),f=2;f1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,A=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var c=function(d,p){var f=s.services.backendConnector.state["".concat(d,"|").concat(p)];return f===-1||f===2};if(o.precheck){var u=o.precheck(this,c);if(u!==void 0)return u}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(a,i)&&(!l||c(A,i)))}},{key:"loadNamespaces",value:function(i,s){var o=this,a=Xp();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){o.options.ns.indexOf(l)<0&&o.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),s&&s(l)}),a):(s&&s(),Promise.resolve())}},{key:"loadLanguages",value:function(i,s){var o=Xp();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(A){return a.indexOf(A)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(A){o.resolve(),s&&s(A)}),o):(s&&s(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services&&this.services.languageUtils||new $D(i3());return s.indexOf(o.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cy,a=jo(jo(jo({},this.options),s),{isClone:!0}),l=new t(a);(s.debug!==void 0||s.prefix!==void 0)&&(l.logger=l.logger.clone(s));var A=["store","services","language"];return A.forEach(function(c){l[c]=i[c]}),l.services=jo({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new KD(l.services,l.options),l.translator.on("*",function(c){for(var u=arguments.length,h=new Array(u>1?u-1:0),d=1;d0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new eC(n,e)});var ii=eC.createInstance();ii.createInstance=eC.createInstance;ii.createInstance;ii.dir;ii.init;ii.loadResources;ii.reloadResources;ii.use;ii.changeLanguage;ii.getFixedT;ii.t;ii.exists;ii.setDefaultNamespace;ii.hasLoadedNamespace;ii.loadNamespaces;ii.loadLanguages;function wge(){if(console&&console.warn){for(var n,e=arguments.length,t=new Array(e),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,s=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var o=function(l,A){var c=e.services.backendConnector.state["".concat(l,"|").concat(A)];return c===-1||c===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!o(e.isLanguageChangingTo,n)?!1:!!(e.hasResourceBundle(r,n)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||o(r,n)&&(!i||o(s,n)))}function Cge(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return yE("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(n,{precheck:function(s,o){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,n))return!1}}):Bge(n,e,t)}var bge=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,xge={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Ige=function(e){return xge[e]},Fge=function(e){return e.replace(bge,Ige)};function A3(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function c3(n){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:{};wE=c3(c3({},wE),n)}function Ege(){return wE}var lH;function Sge(n){lH=n}function Uge(){return lH}var Qge={type:"3rdParty",init:function(e){_ge(e.options.react),Sge(e)}},Rge=Ce.createContext(),Mge=function(){function n(){lo(this,n),this.usedNamespaces={}}return Ao(n,[{key:"addUsedNamespaces",value:function(t){var r=this;t.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),n}();function Tge(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,s,o,a=[],l=!0,A=!1;try{if(s=(t=t.call(n)).next,e===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=s.call(t)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(c){A=!0,i=c}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(A)throw i}}return a}}function Nge(n,e){return nH(n)||Tge(n,e)||rH(n,e)||iH()}function u3(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function FI(n){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},t=e.i18n,r=Ce.useContext(Rge)||{},i=r.i18n,s=r.defaultNS,o=t||i||Uge();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Mge),!o){yE("You will need to pass in an i18next instance by using initReactI18next");var a=function(E,M){return typeof M=="string"?M:M&&$s(M)==="object"&&typeof M.defaultValue=="string"?M.defaultValue:Array.isArray(E)?E[E.length-1]:E},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}o.options.react&&o.options.react.wait!==void 0&&yE("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var A=FI(FI(FI({},Ege()),o.options.react),e),c=A.useSuspense,u=A.keyPrefix,h=n||s||o.options&&o.options.defaultNS;h=typeof h=="string"?[h]:h||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(h);var d=(o.isInitialized||o.initializedStoreOnce)&&h.every(function(x){return Cge(x,o,A)});function p(){return o.getFixedT(null,A.nsMode==="fallback"?h:h[0],u)}var f=Ce.useState(p),m=Nge(f,2),g=m[0],v=m[1],w=h.join(),B=kge(w),C=Ce.useRef(!0);Ce.useEffect(function(){var x=A.bindI18n,E=A.bindI18nStore;C.current=!0,!d&&!c&&l3(o,h,function(){C.current&&v(p)}),d&&B&&B!==w&&C.current&&v(p);function M(){C.current&&v(p)}return x&&o&&o.on(x,M),E&&o&&o.store.on(E,M),function(){C.current=!1,x&&o&&x.split(" ").forEach(function(H){return o.off(H,M)}),E&&o&&E.split(" ").forEach(function(H){return o.store.off(H,M)})}},[o,w]);var b=Ce.useRef(!0);Ce.useEffect(function(){C.current&&!b.current&&v(p),b.current=!1},[o,u]);var F=[g,o,d];if(F.t=g,F.i18n=o,F.ready=d,d||!d&&!c)return F;throw new Promise(function(x){l3(o,h,function(){x()})})}var AH=[],Lge=AH.forEach,Vge=AH.slice;function Pge(n){return Lge.call(Vge.call(arguments,1),function(e){if(e)for(var t in e)n[t]===void 0&&(n[t]=e[t])}),n}var d3=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Oge=function(e,t,r){var i=r||{};i.path=i.path||"/";var s=encodeURIComponent(t),o="".concat(e,"=").concat(s);if(i.maxAge>0){var a=i.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(a))}if(i.domain){if(!d3.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!d3.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},h3={create:function(e,t,r,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+r*60*1e3)),i&&(s.domain=i),document.cookie=Oge(e,encodeURIComponent(t),s)},read:function(e){for(var t="".concat(e,"="),r=document.cookie.split(";"),i=0;i-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),s=i.split("&"),o=0;o0){var l=s[o].substring(0,a);l===e.lookupQuerystring&&(t=s[o].substring(a+1))}}}return t}},jp=null,f3=function(){if(jp!==null)return jp;try{jp=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{jp=!1}return jp},Gge={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&f3()){var r=window.localStorage.getItem(e.lookupLocalStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&f3()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Kp=null,p3=function(){if(Kp!==null)return Kp;try{Kp=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Kp=!1}return Kp},Jge={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&p3()){var r=window.sessionStorage.getItem(e.lookupSessionStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&p3()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Hge={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?t:void 0}},zge={name:"htmlTag",lookup:function(e){var t,r=e.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(t=r.getAttribute("lang")),t}},Yge={name:"path",lookup:function(e){var t;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof r[e.lookupFromPathIndex]!="string")return;t=r[e.lookupFromPathIndex].replace("/","")}else t=r[0].replace("/","")}return t}},Xge={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[t]}};function jge(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var cH=function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};lo(this,n),this.type="languageDetector",this.detectors={},this.init(e,t)}return Ao(n,[{key:"init",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Pge(r,this.options||{},jge()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Wge),this.addDetector(Zge),this.addDetector(Gge),this.addDetector(Jge),this.addDetector(Hge),this.addDetector(zge),this.addDetector(Yge),this.addDetector(Xge)}},{key:"addDetector",value:function(t){this.detectors[t.name]=t}},{key:"detect",value:function(t){var r=this;t||(t=this.options.order);var i=[];return t.forEach(function(s){if(r.detectors[s]){var o=r.detectors[s].lookup(r.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(t,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(function(s){i.detectors[s]&&i.detectors[s].cacheUserLanguage(t,i.options)}))}}]),n}();cH.type="languageDetector";const Kge={translation:{pageTitles:{chooseClass:"Choose Character Class",chooseAppearance:"Choose Appearance",createBio:"Create Bio",saveCharacter:"Save Your Character",chat:"Chat With Your Character"},classes:{beastPainter:{name:"Beast Painter",description:"Paints beasts"},engineer:{name:"Engineer",description:"Builds things"},dropHunter:{name:"Drop Hunter",description:"Hunts drops"},theDegen:{name:"The Degen",description:"Degens"},neuralHacker:{name:"Neural Hacker",description:"Hacks neural networks"},liskWitch:{name:"Lisk Witch",description:"Witches lisk"},bruiser:{name:"Bruiser",description:"Bruises things"}},callToAction:{next:"Next",back:"Back",randomize:"Randomize",chat:"Chat",send:"Send"},editor:{title:"Appearance",head:"Head",body:"Body",eyes:"Eyes",outer:"Outer",chest:"Chest",legs:"Legs",feet:"Feet",accessories:"Accessories"},labels:{name:"Name",voice:"Voice",favoriteColor:"Favorite Color",preferredGreeting:"Preferred Greeting",bio:"Bio",question:"Question",yourName:"Your Name",conversation:"Conversation"},text:{unoptimized:"Unoptimized",apiUnderMaintnance:"Voice generation API is temporarily disabled for maintenance!"}}},$ge={translation:{pageTitles:{chooseClass:"Выбрать Класс Персонажа",chooseAppearance:"Выбрать Внешность",createBio:"Создать Биографию",saveCharacter:"Сохранить Персонажа",chat:"Общаться Со Своим Персонажем"},classes:{beastPainter:{name:"Анималист",description:"Рисует зверей"},engineer:{name:"Инженер",description:"Строит вещи"},dropHunter:{name:"Охотник за дропами",description:"Охотится на дропы"},theDegen:{name:"Деген",description:"Дегены"},neuralHacker:{name:"Нейронный Хакер",description:"Взламывает нейр. сети"},liskWitch:{name:"Лиск Ведьма",description:"Лиск Ведьмы"},bruiser:{name:"Громила",description:"Громит вещи"}},callToAction:{next:"Далее",back:"Назад",randomize:"Рандомизировать",chat:"Чат",send:"Отправить"},editor:{title:"Внешность",head:"Голова",body:"Тело",eyes:"Глаза",outer:"Внешний",chest:"Грудь",legs:"Ноги",feet:"Стопы",accessories:"Аксессуары"},labels:{name:"Имя",voice:"Голос",favoriteColor:"Любимый Цвет",preferredGreeting:"Предпочитаемое Приветствие",bio:"Биография",question:"Вопрос",yourName:"Ваше Имя",conversation:"Разговор"},text:{unoptimized:"Неоптимизи­рованный",apiUnderMaintnance:"API генерации голоса временно отключен на техническое обслуживание."}}},qge={translation:{pageTitles:{chooseClass:"选择角色类型",chooseAppearance:"选择外观",createBio:"创建简介",saveCharacter:"保存角色",chat:"与你的角色聊天"},classes:{beastPainter:{name:"野兽画家",description:"画野兽"},engineer:{name:"工程师",description:"建造物品"},dropHunter:{name:"投放猎手",description:"猎取投放品"},theDegen:{name:"豪赌家",description:"资深赌徒"},neuralHacker:{name:"神经黑客",description:"侵入神经网络"},liskWitch:{name:"Lisk 巫师",description:"施法于 Lisk"},bruiser:{name:"碾压者",description:"碾碎一切"}},callToAction:{next:"下一步",back:"返回",randomize:"随机",chat:"聊天",send:"发送"},editor:{title:"外观",head:"头部",body:"身体",eyes:"眼睛",outer:"外套",chest:"上身",legs:"腿部",feet:"脚部",accessories:"配件"},labels:{name:"名字",voice:"语音",favoriteColor:"颜色偏好",preferredGreeting:"首选问候语",bio:"简介",question:"问题",yourName:"你的名字",conversation:"对话"},text:{unoptimized:"未优化",apiUnderMaintnance:"语音生成API暂时关闭进行维护!"}}},eme={en:Kge,ru:$ge,zh:qge};ii.use(cH).use(Qge).init({debug:!0,fallbackLng:"en",interpolation:{escapeValue:!1},resources:eme});const xs=Ce.createContext(),tme=n=>{const{t:e}=Dge();return L.jsx(xs.Provider,{value:{t:e},children:n.children})},nme=` uniform vec3 cameraDir; uniform vec3 eye; @@ -5023,4 +5023,4 @@ ${F}:`,max_tokens:250,temperature:.9,top_p:1,frequency_penalty:0,presence_penalt background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0)); background: linear-gradient(to top, #000, rgba(0,0,0,0)); } - `),X.createElement("div",{style:c.white,className:"saturation-white"},X.createElement("div",{style:c.black,className:"saturation-black"}),X.createElement("div",{style:c.pointer},this.props.pointer?X.createElement(this.props.pointer,this.props):X.createElement("div",{style:c.circle}))))}}]),e}(Ce.PureComponent||Ce.Component);function ADe(n,e){for(var t=-1,r=n==null?0:n.length;++t=0,s=!t&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return et(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(UDe,arguments)},brighten:function(){return this._applyModification(QDe,arguments)},darken:function(){return this._applyModification(RDe,arguments)},desaturate:function(){return this._applyModification(_De,arguments)},saturate:function(){return this._applyModification(EDe,arguments)},greyscale:function(){return this._applyModification(SDe,arguments)},spin:function(){return this._applyModification(MDe,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(kDe,arguments)},complement:function(){return this._applyCombination(TDe,arguments)},monochromatic:function(){return this._applyCombination(DDe,arguments)},splitcomplement:function(){return this._applyCombination(NDe,arguments)},triad:function(){return this._applyCombination(nV,[3])},tetrad:function(){return this._applyCombination(nV,[4])}};et.fromRatio=function(n,e){if(mC(n)=="object"){var t={};for(var r in n)n.hasOwnProperty(r)&&(r==="a"?t[r]=n[r]:t[r]=_g(n[r]));n=t}return et(n,e)};function CDe(n){var e={r:0,g:0,b:0},t=1,r=null,i=null,s=null,o=!1,a=!1;return typeof n=="string"&&(n=WDe(n)),mC(n)=="object"&&(il(n.r)&&il(n.g)&&il(n.b)?(e=bDe(n.r,n.g,n.b),o=!0,a=String(n.r).substr(-1)==="%"?"prgb":"rgb"):il(n.h)&&il(n.s)&&il(n.v)?(r=_g(n.s),i=_g(n.v),e=IDe(n.h,r,i),o=!0,a="hsv"):il(n.h)&&il(n.s)&&il(n.l)&&(r=_g(n.s),s=_g(n.l),e=xDe(n.h,r,s),o=!0,a="hsl"),n.hasOwnProperty("a")&&(t=n.a)),t=iz(t),{ok:o,format:n.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function bDe(n,e,t){return{r:Bn(n,255)*255,g:Bn(e,255)*255,b:Bn(t,255)*255}}function $L(n,e,t){n=Bn(n,255),e=Bn(e,255),t=Bn(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),s,o,a=(r+i)/2;if(r==i)s=o=0;else{var l=r-i;switch(o=a>.5?l/(2-r-i):l/(r+i),r){case n:s=(e-t)/l+(e1&&(u-=1),u<1/6?A+(c-A)*6*u:u<1/2?c:u<2/3?A+(c-A)*(2/3-u)*6:A}if(e===0)r=i=s=t;else{var a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=o(l,a,n+1/3),i=o(l,a,n),s=o(l,a,n-1/3)}return{r:r*255,g:i*255,b:s*255}}function qL(n,e,t){n=Bn(n,255),e=Bn(e,255),t=Bn(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),s,o,a=r,l=r-i;if(o=r===0?0:l/r,r==i)s=0;else{switch(r){case n:s=(e-t)/l+(e>1)+720)%360;--e;)r.h=(r.h+i)%360,s.push(et(r));return s}function DDe(n,e){e=e||6;for(var t=et(n).toHsv(),r=t.h,i=t.s,s=t.v,o=[],a=1/e;e--;)o.push(et({h:r,s:i,v:s})),s=(s+a)%1;return o}et.mix=function(n,e,t){t=t===0?0:t||50;var r=et(n).toRgb(),i=et(e).toRgb(),s=t/100,o={r:(i.r-r.r)*s+r.r,g:(i.g-r.g)*s+r.g,b:(i.b-r.b)*s+r.b,a:(i.a-r.a)*s+r.a};return et(o)};et.readability=function(n,e){var t=et(n),r=et(e);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)};et.isReadable=function(n,e,t){var r=et.readability(n,e),i,s;switch(s=!1,i=ZDe(t),i.level+i.size){case"AAsmall":case"AAAlarge":s=r>=4.5;break;case"AAlarge":s=r>=3;break;case"AAAsmall":s=r>=7;break}return s};et.mostReadable=function(n,e,t){var r=null,i=0,s,o,a,l;t=t||{},o=t.includeFallbackColors,a=t.level,l=t.size;for(var A=0;Ai&&(i=s,r=et(e[A]));return et.isReadable(n,r,{level:a,size:l})||!o?r:(t.includeFallbackColors=!1,et.mostReadable(n,["#fff","#000"],t))};var OE=et.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},LDe=et.hexNames=VDe(OE);function VDe(n){var e={};for(var t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function iz(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Bn(n,e){PDe(n)&&(n="100%");var t=ODe(n);return n=Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(n*e,10)/100),Math.abs(n-e)<1e-6?1:n%e/parseFloat(e)}function Zb(n){return Math.min(1,Math.max(0,n))}function Yi(n){return parseInt(n,16)}function PDe(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function ODe(n){return typeof n=="string"&&n.indexOf("%")!=-1}function Qo(n){return n.length==1?"0"+n:""+n}function _g(n){return n<=1&&(n=n*100+"%"),n}function sz(n){return Math.round(parseFloat(n)*255).toString(16)}function rV(n){return Yi(n)/255}var bo=function(){var n="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+n+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function il(n){return!!bo.CSS_UNIT.exec(n)}function WDe(n){n=n.replace(wDe,"").replace(BDe,"").toLowerCase();var e=!1;if(OE[n])n=OE[n],e=!0;else if(n=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=bo.rgb.exec(n))?{r:t[1],g:t[2],b:t[3]}:(t=bo.rgba.exec(n))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=bo.hsl.exec(n))?{h:t[1],s:t[2],l:t[3]}:(t=bo.hsla.exec(n))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=bo.hsv.exec(n))?{h:t[1],s:t[2],v:t[3]}:(t=bo.hsva.exec(n))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=bo.hex8.exec(n))?{r:Yi(t[1]),g:Yi(t[2]),b:Yi(t[3]),a:rV(t[4]),format:e?"name":"hex8"}:(t=bo.hex6.exec(n))?{r:Yi(t[1]),g:Yi(t[2]),b:Yi(t[3]),format:e?"name":"hex"}:(t=bo.hex4.exec(n))?{r:Yi(t[1]+""+t[1]),g:Yi(t[2]+""+t[2]),b:Yi(t[3]+""+t[3]),a:rV(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=bo.hex3.exec(n))?{r:Yi(t[1]+""+t[1]),g:Yi(t[2]+""+t[2]),b:Yi(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function ZDe(n){var e,t;return n=n||{level:"AA",size:"small"},e=(n.level||"AA").toUpperCase(),t=(n.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}var iV=function(e){var t=["r","g","b","a","h","s","l","v"],r=0,i=0;return yDe(t,function(s){if(e[s]&&(r+=1,isNaN(e[s])||(i+=1),s==="s"||s==="l")){var o=/^\d+%$/;o.test(e[s])&&(i+=1)}}),r===i?e:!1},Eg=function(e,t){var r=e.hex?et(e.hex):et(e),i=r.toHsl(),s=r.toHsv(),o=r.toRgb(),a=r.toHex();i.s===0&&(i.h=t||0,s.h=t||0);var l=a==="000000"&&o.a===0;return{hsl:i,hex:l?"transparent":"#"+a,rgb:o,hsv:s,oldHue:e.h||t||i.h,source:e.source}},Bc=function(e){if(e==="transparent")return!0;var t=String(e).charAt(0)==="#"?1:0;return e.length!==4+t&&e.length<7+t&&et(e).isValid()},zQ=function(e){if(!e)return"#fff";var t=Eg(e);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},HI=function(e,t){var r=e.replace("°","");return et(t+" ("+r+")")._ok},rg=Object.assign||function(n){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){KDe(i,r);function i(){var s,o,a,l;jDe(this,i);for(var A=arguments.length,c=Array(A),u=0;ua))return!1;var A=s.get(n),c=s.get(e);if(A&&c)return A==e&&c==n;var u=-1,h=!0,d=t&A3e?new vC:void 0;for(s.set(n,e),s.set(e,n);++u=0||Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}var Ty=24,QLe=pz.default=function(n){var e=n.fill,t=e===void 0?"currentColor":e,r=n.width,i=r===void 0?Ty:r,s=n.height,o=s===void 0?Ty:s,a=n.style,l=a===void 0?{}:a,A=ULe(n,["fill","width","height","style"]);return bV.default.createElement("svg",CV({viewBox:"0 0 "+Ty+" "+Ty,style:CV({fill:t,width:i,height:o},l)},A),bV.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},RLe=function(){function n(e,t){for(var r=0;r1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},s)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(BV(i.s)?r.props.hsl.s:i.s),l:Number(BV(i.l)?r.props.hsl.l:i.l),source:"hsl"},s))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?r.state={view:"rgb"}:r.state={view:t.view},r}return RLe(e,[{key:"render",value:function(){var r=this,i=ht({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),s=void 0;return this.state.view==="hex"?s=X.createElement("div",{style:i.fields,className:"flexbox-fix"},X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?s=X.createElement("div",{style:i.fields,className:"flexbox-fix"},X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),X.createElement("div",{style:i.alpha},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(s=X.createElement("div",{style:i.fields,className:"flexbox-fix"},X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),X.createElement("div",{style:i.alpha},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),X.createElement("div",{style:i.wrap,className:"flexbox-fix"},s,X.createElement("div",{style:i.toggle},X.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(a){return r.icon=a}},X.createElement(QLe,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e}(X.Component);gz.defaultProps={view:"hex"};var xV=function(){var e=ht({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return X.createElement("div",{style:e.picker})},kLe=function(){var e=ht({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return X.createElement("div",{style:e.picker})},qQ=function(e){var t=e.width,r=e.onChange,i=e.disableAlpha,s=e.rgb,o=e.hsl,a=e.hsv,l=e.hex,A=e.renderers,c=e.styles,u=c===void 0?{}:c,h=e.className,d=h===void 0?"":h,p=e.defaultView,f=ht(Oi({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+s.r+", "+s.g+", "+s.b+", "+s.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},u),{disableAlpha:i});return X.createElement("div",{style:f.picker,className:"chrome-picker "+d},X.createElement("div",{style:f.saturation},X.createElement(Wb,{style:f.Saturation,hsl:o,hsv:a,pointer:kLe,onChange:r})),X.createElement("div",{style:f.body},X.createElement("div",{style:f.controls,className:"flexbox-fix"},X.createElement("div",{style:f.color},X.createElement("div",{style:f.swatch},X.createElement("div",{style:f.active}),X.createElement(lp,{renderers:A}))),X.createElement("div",{style:f.toggles},X.createElement("div",{style:f.hue},X.createElement(Ap,{style:f.Hue,hsl:o,pointer:xV,onChange:r})),X.createElement("div",{style:f.alpha},X.createElement(VQ,{style:f.Alpha,rgb:s,hsl:o,pointer:xV,renderers:A,onChange:r})))),X.createElement(gz,{rgb:s,hsl:o,hex:l,view:p,onChange:r,disableAlpha:i})))};qQ.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),disableAlpha:Oe.bool,styles:Oe.object,defaultView:Oe.oneOf(["hex","rgb","hsl"])};qQ.defaultProps={width:225,disableAlpha:!1,styles:{}};const DLe=Wi(qQ);var LLe=function(e){var t=e.color,r=e.onClick,i=r===void 0?function(){}:r,s=e.onSwatchHover,o=e.active,a=ht({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:zQ(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return X.createElement(Hu,{style:a.color,color:t,onClick:i,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},X.createElement("div",{style:a.dot}))},VLe=function(e){var t=e.hex,r=e.rgb,i=e.onChange,s=ht({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(l,A){l.r||l.g||l.b?i({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},A):i({hex:l.hex,source:"hex"},A)};return X.createElement("div",{style:s.fields,className:"flexbox-fix"},X.createElement("div",{style:s.active}),X.createElement(Nt,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"hex",value:t,onChange:o}),X.createElement(Nt,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:r.r,onChange:o}),X.createElement(Nt,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:r.g,onChange:o}),X.createElement(Nt,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:r.b,onChange:o}))},eR=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.colors,s=e.hex,o=e.rgb,a=e.styles,l=a===void 0?{}:a,A=e.className,c=A===void 0?"":A,u=ht(Oi({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),h=function(p,f){p.hex?Bc(p.hex)&&t({hex:p.hex,source:"hex"},f):t(p,f)};return X.createElement(N0,{style:u.Compact,styles:l},X.createElement("div",{style:u.compact,className:"compact-picker "+c},X.createElement("div",null,zu(i,function(d){return X.createElement(LLe,{key:d,color:d,active:d.toLowerCase()===s,onClick:h,onSwatchHover:r})}),X.createElement("div",{style:u.clear})),X.createElement(VLe,{hex:s,rgb:o,onChange:h})))};eR.propTypes={colors:Oe.arrayOf(Oe.string),styles:Oe.object};eR.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Wi(eR);var PLe=function(e){var t=e.hover,r=e.color,i=e.onClick,s=e.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=ht({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:t});return X.createElement("div",{style:a.swatch},X.createElement(Hu,{color:r,onClick:i,onHover:s,focusStyle:o}))};const OLe=LQ(PLe);var tR=function(e){var t=e.width,r=e.colors,i=e.onChange,s=e.onSwatchHover,o=e.triangle,a=e.styles,l=a===void 0?{}:a,A=e.className,c=A===void 0?"":A,u=ht(Oi({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":o==="hide","top-left-triangle":o==="top-left","top-right-triangle":o==="top-right","bottom-left-triangle":o==="bottom-left","bottom-right-triangle":o==="bottom-right"}),h=function(p,f){return i({hex:p,source:"hex"},f)};return X.createElement("div",{style:u.card,className:"github-picker "+c},X.createElement("div",{style:u.triangleShadow}),X.createElement("div",{style:u.triangle}),zu(r,function(d){return X.createElement(OLe,{color:d,key:d,onClick:h,onSwatchHover:s})}))};tR.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),colors:Oe.arrayOf(Oe.string),triangle:Oe.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:Oe.object};tR.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Wi(tR);var WLe=function(e){var t=e.direction,r=ht({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return X.createElement("div",{style:r.picker})},ZLe=Object.assign||function(n){for(var e=1;e.5});return X.createElement("div",{style:r.picker})},zLe=function(){var e=ht({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return X.createElement("div",{style:e.pointer},X.createElement("div",{style:e.left},X.createElement("div",{style:e.leftInside})),X.createElement("div",{style:e.right},X.createElement("div",{style:e.rightInside})))},IV=function(e){var t=e.onClick,r=e.label,i=e.children,s=e.active,o=ht({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:s});return X.createElement("div",{style:o.button,onClick:t},r||i)},YLe=function(e){var t=e.rgb,r=e.currentColor,i=ht({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return X.createElement("div",null,X.createElement("div",{style:i.label},"new"),X.createElement("div",{style:i.swatches},X.createElement("div",{style:i.new}),X.createElement("div",{style:i.current})),X.createElement("div",{style:i.label},"current"))},XLe=function(){function n(e,t){for(var r=0;r100&&(c.a=100),c.a/=100,t({h:i.h,s:i.s,l:i.l,a:c.a,source:"rgb"},u))};return X.createElement("div",{style:a.fields,className:"flexbox-fix"},X.createElement("div",{style:a.double},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"hex",value:s.replace("#",""),onChange:l})),X.createElement("div",{style:a.single},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),X.createElement("div",{style:a.single},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),X.createElement("div",{style:a.single},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),X.createElement("div",{style:a.alpha},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"a",value:Math.round(r.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},eVe=Object.assign||function(n){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}var Ny=24,aVe=vz.default=function(n){var e=n.fill,t=e===void 0?"currentColor":e,r=n.width,i=r===void 0?Ny:r,s=n.height,o=s===void 0?Ny:s,a=n.style,l=a===void 0?{}:a,A=oVe(n,["fill","width","height","style"]);return _V.default.createElement("svg",FV({viewBox:"0 0 "+Ny+" "+Ny,style:FV({fill:t,width:i,height:o},l)},A),_V.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},lVe=function(e){var t=e.color,r=e.onClick,i=r===void 0?function(){}:r,s=e.onSwatchHover,o=e.first,a=e.last,l=e.active,A=ht({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:zQ(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:o,last:a,active:l,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return X.createElement(Hu,{color:t,style:A.color,onClick:i,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},X.createElement("div",{style:A.check},X.createElement(aVe,null)))},AVe=function(e){var t=e.onClick,r=e.onSwatchHover,i=e.group,s=e.active,o=ht({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return X.createElement("div",{style:o.group},zu(i,function(a,l){return X.createElement(lVe,{key:a,color:a,active:a.toLowerCase()===s,first:l===0,last:l===i.length-1,onClick:t,onSwatchHover:r})}))},oR=function(e){var t=e.width,r=e.height,i=e.onChange,s=e.onSwatchHover,o=e.colors,a=e.hex,l=e.styles,A=l===void 0?{}:l,c=e.className,u=c===void 0?"":c,h=ht(Oi({default:{picker:{width:t,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},A)),d=function(f,m){return i({hex:f,source:"hex"},m)};return X.createElement("div",{style:h.picker,className:"swatches-picker "+u},X.createElement(N0,null,X.createElement("div",{style:h.overflow},X.createElement("div",{style:h.body},zu(o,function(p){return X.createElement(AVe,{key:p.toString(),group:p,active:a,onClick:d,onSwatchHover:s})}),X.createElement("div",{style:h.clear})))))};oR.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),height:Oe.oneOfType([Oe.string,Oe.number]),colors:Oe.arrayOf(Oe.arrayOf(Oe.string)),styles:Oe.object};oR.defaultProps={width:320,height:240,colors:[[Od[900],Od[700],Od[500],Od[300],Od[100]],[Wd[900],Wd[700],Wd[500],Wd[300],Wd[100]],[Zd[900],Zd[700],Zd[500],Zd[300],Zd[100]],[Gd[900],Gd[700],Gd[500],Gd[300],Gd[100]],[Jd[900],Jd[700],Jd[500],Jd[300],Jd[100]],[Hd[900],Hd[700],Hd[500],Hd[300],Hd[100]],[zd[900],zd[700],zd[500],zd[300],zd[100]],[Yd[900],Yd[700],Yd[500],Yd[300],Yd[100]],[Xd[900],Xd[700],Xd[500],Xd[300],Xd[100]],["#194D33",Sg[700],Sg[500],Sg[300],Sg[100]],[jd[900],jd[700],jd[500],jd[300],jd[100]],[Kd[900],Kd[700],Kd[500],Kd[300],Kd[100]],[$d[900],$d[700],$d[500],$d[300],$d[100]],[qd[900],qd[700],qd[500],qd[300],qd[100]],[eh[900],eh[700],eh[500],eh[300],eh[100]],[th[900],th[700],th[500],th[300],th[100]],[nh[900],nh[700],nh[500],nh[300],nh[100]],[rh[900],rh[700],rh[500],rh[300],rh[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Wi(oR);var aR=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.hex,s=e.colors,o=e.width,a=e.triangle,l=e.styles,A=l===void 0?{}:l,c=e.className,u=c===void 0?"":c,h=ht(Oi({default:{card:{width:o,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},A),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right"}),d=function(f,m){Bc(f)&&t({hex:f,source:"hex"},m)};return X.createElement("div",{style:h.card,className:"twitter-picker "+u},X.createElement("div",{style:h.triangleShadow}),X.createElement("div",{style:h.triangle}),X.createElement("div",{style:h.body},zu(s,function(p,f){return X.createElement(Hu,{key:f,color:p,hex:p,style:h.swatch,onClick:d,onHover:r,focusStyle:{boxShadow:"0 0 4px "+p}})}),X.createElement("div",{style:h.hash},"#"),X.createElement(Nt,{label:null,style:{input:h.input},value:i.replace("#",""),onChange:d}),X.createElement("div",{style:h.clear})))};aR.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),triangle:Oe.oneOf(["hide","top-left","top-right"]),colors:Oe.arrayOf(Oe.string),styles:Oe.object};aR.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Wi(aR);var lR=function(e){var t=ht({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return X.createElement("div",{style:t.picker})};lR.propTypes={hsl:Oe.shape({h:Oe.number,s:Oe.number,l:Oe.number,a:Oe.number})};lR.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var AR=function(e){var t=ht({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return X.createElement("div",{style:t.picker})};AR.propTypes={hsl:Oe.shape({h:Oe.number,s:Oe.number,l:Oe.number,a:Oe.number})};AR.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var cVe=function(e){var t=e.onChange,r=e.rgb,i=e.hsl,s=e.hex,o=e.hsv,a=function(d,p){if(d.hex)Bc(d.hex)&&t({hex:d.hex,source:"hex"},p);else if(d.rgb){var f=d.rgb.split(",");HI(d.rgb,"rgb")&&t({r:f[0],g:f[1],b:f[2],a:1,source:"rgb"},p)}else if(d.hsv){var m=d.hsv.split(",");HI(d.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),t({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},p))}else if(d.hsl){var g=d.hsl.split(",");HI(d.hsl,"hsl")&&(g[2]=g[2].replace("%",""),g[1]=g[1].replace("%",""),g[0]=g[0].replace("°",""),u[1]==1?u[1]=.01:u[2]==1&&(u[2]=.01),t({h:Number(g[0]),s:Number(g[1]),v:Number(g[2]),source:"hsl"},p))}},l=ht({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),A=r.r+", "+r.g+", "+r.b,c=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",u=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.v*100)+"%";return X.createElement("div",{style:l.wrap,className:"flexbox-fix"},X.createElement("div",{style:l.fields},X.createElement("div",{style:l.double},X.createElement(Nt,{style:{input:l.input,label:l.label},label:"hex",value:s,onChange:a})),X.createElement("div",{style:l.column},X.createElement("div",{style:l.single},X.createElement(Nt,{style:{input:l.input2,label:l.label2},label:"rgb",value:A,onChange:a})),X.createElement("div",{style:l.single},X.createElement(Nt,{style:{input:l.input2,label:l.label2},label:"hsv",value:u,onChange:a})),X.createElement("div",{style:l.single},X.createElement(Nt,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:a})))))},cR=function(e){var t=e.width,r=e.onChange,i=e.rgb,s=e.hsl,o=e.hsv,a=e.hex,l=e.header,A=e.styles,c=A===void 0?{}:A,u=e.className,h=u===void 0?"":u,d=ht(Oi({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+i.r+", "+i.g+", "+i.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return X.createElement("div",{style:d.picker,className:"google-picker "+h},X.createElement("div",{style:d.head},l),X.createElement("div",{style:d.swatch}),X.createElement("div",{style:d.saturation},X.createElement(Wb,{hsl:s,hsv:o,pointer:lR,onChange:r})),X.createElement("div",{style:d.body},X.createElement("div",{style:d.controls,className:"flexbox-fix"},X.createElement("div",{style:d.hue},X.createElement(Ap,{style:d.Hue,hsl:s,radius:"4px",pointer:AR,onChange:r}))),X.createElement(cVe,{rgb:i,hsl:s,hex:a,hsv:o,onChange:r})))};cR.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),styles:Oe.object,header:Oe.string};cR.defaultProps={width:652,styles:{},header:"Color picker"};Wi(cR);const uVe="_InformationContainerPos_1yd4c_2",dVe="_scrollContainer_1yd4c_15",YI={InformationContainerPos:uVe,scrollContainer:dVe,"options-container":"_options-container_1yd4c_24"},hVe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAABE5AAAROQEb2ZNGAAAGiGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDEgNzkuMTQ2Mjg5OSwgMjAyMy8wNi8yNS0yMDowMTo1NSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1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YAgAbgJYinGMSwBwC8A36VyMY+zU5wSAIwCWpeYYx9gsvQKAOwAe7P2eH8MYzX6ChwBwB8DtOE+60PMWxwHgDoCRBMY5AgB3AIzHeQaufgJMAIC/AQDg8beAZQC4A2Argf0AWwBwa0/gc+lIDONr0OdiT6CjxwJyEcaW41iA2wDeS70RxnZBnwMADq8HMOfhXzzEuHpTuG4BAFJaEWQO5IxKp/61f0C/75vHXEvo4A8Aarwm8J00K13WpV9HtYL+bFYfw5pAT5aFb2osC+e8AABkFcBOxADgGIBt6YU0pUfwhqWrh2xYn2NKn3MbAHYDeCId0713ed2RE0d5fc4W6TEA7APwVuqPsgK4ypXC/XpKGQAsAPBB6qrBuLti2EsIgIgAzFk/fTUce5+OAQA1AjCTxsf+Ab8OZgBQGwDmtiynLRj/mQj3OQBABAAv41z1E2H8LToWAKQMwOy3b7Bg/A06FgCkDOCmRbe7uQWA9AGMWgRgFADpAxizCMAYAAAAAAAAgL8BAJAagOsWAbgBgPQBPJWaLBh/k/QMAOkDMIsz7lkw/rsRFooAIIbDweY27avS65Rb1f+bw8EsCgUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCCAoscAigAIg2mPAYQACIPBFC7GZGNmzgMA2L0+z4qHAMycCwDYPf9+0kMAk3He08BZAIqgVVrzaOObuZ6w4bW3AoAiaI9wkqVLmTm22/K62wTA/Cq4kvCNGmvdul5TIA+A/RG0SQspXqwxrYtULurccja95lYB+OOSrd3SvH4ilPR6AC5V0rHP6y1o8za+1lYCIAAQAAgABAACAAGAAEAAIAAQAAgABAACAAGAAEAAIAAQAAgABAACAFXRT5xealqlzx1wAAAAAElFTkSuQmCC",mVe="_InformationContainerPos_1m76y_2",vVe="_scrollContainer_1m76y_15",yVe="_centerAlign_1m76y_25",wVe="_traitInfoTitle_1m76y_28",BVe="_dropdownFlex_1m76y_38",CVe="_checkboxFlex_1m76y_44",bVe="_simpleFlex_1m76y_49",xVe="_traitInfoText_1m76y_55",IVe="_dropdownBase_1m76y_64",FVe="_dropdownControl_1m76y_74",_Ve="_dropdownControlSmall_1m76y_80",EVe="_flexSelect_1m76y_106",SVe="_checked_1m76y_163",UVe="_checkmark_1m76y_167",QVe="_checkboxHolder_1m76y_180",RVe="_actionButton_1m76y_189",MVe="_tabHolder_1m76y_209",TVe="_tabButton_1m76y_215",NVe="_tabButtonSelected_1m76y_235",Ge={InformationContainerPos:mVe,scrollContainer:vVe,centerAlign:yVe,traitInfoTitle:wVe,dropdownFlex:BVe,checkboxFlex:CVe,simpleFlex:bVe,traitInfoText:xVe,dropdownBase:IVe,dropdownControl:FVe,dropdownControlSmall:_Ve,"input-box":"_input-box_1m76y_87",flexSelect:EVe,"arrow-button":"_arrow-button_1m76y_114","left-button":"_left-button_1m76y_130","right-button":"_right-button_1m76y_137","anim-button":"_anim-button_1m76y_144","custom-checkbox":"_custom-checkbox_1m76y_149","checkbox-container":"_checkbox-container_1m76y_154",checked:SVe,checkmark:UVe,checkboxHolder:QVe,actionButton:RVe,tabHolder:MVe,tabButton:TVe,tabButtonSelected:NVe};function kVe({selectedTrait:n,selectedVRM:e}){const{animationManager:t,characterManager:r}=Ce.useContext(lr),[i,s]=Ce.useState(0),[o,a]=Ce.useState(0),[l,A]=Ce.useState(0);Ce.useEffect(()=>{var p,f,m;e!=null&&(A((p=e.data)==null?void 0:p.cullingLayer),s(((f=e.data)==null?void 0:f.cullingDistance[0])||0),a(((m=e.data)==null?void 0:m.cullingDistance[1])||0))},[e]);const c=p=>{s(p.target.value),e!=null&&e.data&&(e.data.cullingDistance[0]=p.target.value)},u=p=>{a(p.target.value),e!=null&&e.data&&(e.data.cullingDistance[1]=p.target.value)},h=p=>{e!=null&&e.data&&(A(p.target.value),e.data.cullingLayer=p.target.value)},d=()=>{r.updateCullHiddenMeshes()};return L.jsx("div",{children:L.jsxs("div",{className:Ge.InformationContainerPos,children:[L.jsx(ka,{title:"Trait Information",width:180,right:20}),L.jsx("div",{className:Ge.scrollContainer,children:n!=null?L.jsxs(L.Fragment,{children:[L.jsx("div",{className:Ge.traitInfoTitle,children:"Trait ID"}),L.jsx("div",{className:Ge.traitInfoText,children:n==null?void 0:n.id}),L.jsx("div",{className:Ge.traitInfoTitle,children:"Trait Name"}),L.jsx("div",{className:Ge.traitInfoText,children:n==null?void 0:n.name}),L.jsx("div",{className:Ge.traitInfoTitle,children:"Description"}),L.jsx("div",{className:Ge.traitInfoText,children:(n==null?void 0:n.description)||"A nice "+(n==null?void 0:n.name)}),L.jsx("div",{className:Ge.traitInfoTitle,children:"Culling Options"}),L.jsx("br",{}),L.jsxs("div",{className:Ge.traitInfoText,children:["Culling Layer",L.jsx("input",{type:"number",min:"0",max:"100",value:l,onChange:h,className:Ge["input-box"],step:1}),L.jsx("br",{}),L.jsx("br",{}),L.jsx(Uh,{title:"Out Distance",value:i,onChange:c,min:0,max:1,step:.001,stepBox:.01}),L.jsx("br",{}),L.jsx(Uh,{title:"In Distance",value:o,onChange:u,min:0,max:1,step:.001,stepBox:.01}),L.jsx("div",{className:Ge.actionButton,onClick:d,children:L.jsx("div",{children:"Update Culling "})})]})]}):L.jsx(L.Fragment,{children:L.jsx("div",{className:Ge.traitInfoTitle,children:"No Trait Selected"})})})]})})}var yz={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=s(Ce),t=r(fH);function r(b){return b&&b.__esModule?b:{default:b}}function i(){if(typeof WeakMap!="function")return null;var b=new WeakMap;return i=function(){return b},b}function s(b){if(b&&b.__esModule)return b;if(b===null||o(b)!=="object"&&typeof b!="function")return{default:b};var F=i();if(F&&F.has(b))return F.get(b);var x={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in b)if(Object.prototype.hasOwnProperty.call(b,M)){var H=E?Object.getOwnPropertyDescriptor(b,M):null;H&&(H.get||H.set)?Object.defineProperty(x,M,H):x[M]=b[M]}return x.default=b,F&&F.set(b,x),x}function o(b){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(x){return typeof x}:o=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},o(b)}function a(){return a=Object.assign||function(b){for(var F=1;F"u"?w:x.placeholder,value:""},isOpen:!1},E.dropdownRef=(0,e.createRef)(),E.mounted=!0,E.handleDocumentClick=E.handleDocumentClick.bind(m(E)),E.fireChangeEvent=E.fireChangeEvent.bind(m(E)),E}return d(F,[{key:"componentDidUpdate",value:function(E){if(this.props.value!==E.value)if(this.props.value){var M=this.parseValue(this.props.value,this.props.options);M!==this.state.selected&&this.setState({selected:M})}else this.setState({selected:{label:typeof this.props.placeholder>"u"?w:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function(E){this.props.onFocus&&typeof this.props.onFocus=="function"&&this.props.onFocus(this.state.isOpen),!(E.type==="mousedown"&&E.button!==0)&&(E.stopPropagation(),E.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function(E,M){var H;if(typeof E=="string")for(var O=0,U=M.length;O"u"&&(H=E.label||E);var O=E.label||E.value||E,U=H===this.state.selected.value||H===this.state.selected,y=(M={},c(M,"".concat(this.props.baseClassName,"-option"),!0),c(M,E.className,!!E.className),c(M,"is-selected",U),M),I=(0,t.default)(y),R=Object.keys(E.data||{}).reduce(function(D,k){return A({},D,c({},"data-".concat(k),E.data[k]))},{});return e.default.createElement("div",a({key:H,className:I,onMouseDown:this.setValue.bind(this,H,O),onClick:this.setValue.bind(this,H,O),role:"option","aria-selected":U?"true":"false"},R),O)}},{key:"buildMenu",value:function(){var E=this,M=this.props,H=M.options,O=M.baseClassName,U=H.map(function(y){if(y.type==="group"){var I=e.default.createElement("div",{className:"".concat(O,"-title")},y.name),R=y.items.map(function(D){return E.renderOption(D)});return e.default.createElement("div",{className:"".concat(O,"-group"),key:y.name,role:"listbox",tabIndex:"-1"},I,R)}else return E.renderOption(y)});return U.length?U:e.default.createElement("div",{className:"".concat(O,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function(E){this.mounted&&(this.dropdownRef.current.contains(E.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function(){return typeof this.state.selected=="string"||this.state.selected.value!==""}},{key:"render",value:function(){var E,M,H,O,U,y=this.props,I=y.baseClassName,R=y.controlClassName,D=y.placeholderClassName,k=y.menuClassName,V=y.arrowClassName,Z=y.arrowClosed,N=y.arrowOpen,_=y.className,z=this.props.disabled?"Dropdown-disabled":"",ie=typeof this.state.selected=="string"?this.state.selected:this.state.selected.label,T=(0,t.default)((E={},c(E,"".concat(I,"-root"),!0),c(E,_,!!_),c(E,"is-open",this.state.isOpen),E)),q=(0,t.default)((M={},c(M,"".concat(I,"-control"),!0),c(M,R,!!R),c(M,z,!!z),M)),ge=(0,t.default)((H={},c(H,"".concat(I,"-placeholder"),!0),c(H,D,!!D),c(H,"is-selected",this.isValueSelected()),H)),he=(0,t.default)((O={},c(O,"".concat(I,"-menu"),!0),c(O,k,!!k),O)),Ae=(0,t.default)((U={},c(U,"".concat(I,"-arrow"),!0),c(U,V,!!V),U)),$=e.default.createElement("div",{className:ge},ie),ce=this.state.isOpen?e.default.createElement("div",{className:he,"aria-expanded":"true"},this.buildMenu()):null;return e.default.createElement("div",{ref:this.dropdownRef,className:T},e.default.createElement("div",{className:q,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},$,e.default.createElement("div",{className:"".concat(I,"-arrow-wrapper")},N&&Z?this.state.isOpen?N:Z:e.default.createElement("span",{className:Ae}))),ce)}}]),F}(e.Component);B.defaultProps={baseClassName:"Dropdown"};var C=B;n.default=C})(yz);const BA=Zl(yz);function DVe({selectedTrait:n,selectedVRM:e}){const{manifest:t,loraDataGenerator:r,sceneElements:i}=X.useContext(lr),[s,o]=Ce.useState([]),[a,l]=Ce.useState(null),A=u=>{(t==null?void 0:t.loras)!=null&&(l(t.loras[u.value]),console.log(t.loras[u.value]))},c=async()=>{const u=i.parent;u.remove(i),await r.createLoraData(a),u.add(i)};return Ce.useEffect(()=>{if((t==null?void 0:t.loras)!=null){const u=t.loras.map((h,d)=>({value:d,label:h.name,description:h.description,manifest:h.manifest}));o(u)}},[t]),L.jsx("div",{children:L.jsxs("div",{className:Ge.InformationContainerPos,children:[L.jsx(ka,{title:"Lora Creation",width:180,right:20}),L.jsxs("div",{className:Ge.scrollContainer,children:[L.jsx("div",{className:Ge.traitInfoTitle,children:"Lora Manifests"}),L.jsx(BA,{className:Ge.dropdownControl,options:s,onChange:A,placeholder:"Select an option"}),";",L.jsx("div",{className:Ge.traitInfoText,children:(a==null?void 0:a.description)||""}),a!=null&&L.jsx("div",{className:Ge.actionButton,onClick:c,children:L.jsx("div",{children:" Create Lora Data "})})]})]})})}function LVe({selectedTrait:n,selectedVRM:e}){const{manifest:t,spriteAtlasGenerator:r,sceneElements:i}=X.useContext(lr),[s,o]=Ce.useState([]),[a,l]=Ce.useState(""),[A,c]=Ce.useState(null),u=d=>{(t==null?void 0:t.sprites)!=null&&(l(t.sprites[d.value].description),c(t.sprites[d.value]))},h=async()=>{const d=i.parent;d.remove(i),await r.createSpriteAtlas(A),d.add(i)};return Ce.useEffect(()=>{if((t==null?void 0:t.sprites)!=null){const d=t.sprites.map((p,f)=>({value:f,label:p.name,description:p.description,manifest:p.manifest}));o(d)}},[t]),L.jsx("div",{children:L.jsxs("div",{className:Ge.InformationContainerPos,children:[L.jsx(ka,{title:"Sprite Creation",width:180,right:20}),L.jsxs("div",{className:Ge.scrollContainer,children:[L.jsx("div",{className:Ge.traitInfoTitle,children:"Sprite Manifests"}),L.jsx(BA,{className:Ge.dropdownControl,options:s,onChange:u,placeholder:"Select an option"}),";",L.jsx("div",{className:Ge.traitInfoText,children:a||""}),A!=null&&L.jsx("div",{className:Ge.actionButton,onClick:h,children:L.jsx("div",{children:" Create Sprite Data "})})]})]})})}const EV=4096;function VVe({selectedTrait:n,traitGroupName:e}){const{manifest:t,thumbnailsGenerator:r,sceneElements:i,characterManager:s}=X.useContext(lr),[o,a]=Ce.useState([]),[l,A]=Ce.useState(""),[c,u]=Ce.useState(""),[h,d]=Ce.useState(""),[p,f]=Ce.useState(!1),[m,g]=Ce.useState(512),[v,w]=Ce.useState(512),[B,C]=Ce.useState(.1),[b,F]=Ce.useState(.1),[x,E]=Ce.useState("center"),[M,H]=Ce.useState("center"),[O,U]=Ce.useState("center"),[y,I]=Ce.useState("head"),[R,D]=Ce.useState("chest"),[k,V]=Ce.useState(!0),[Z,N]=Ce.useState(!1),_=[{label:"center"},{label:"left"},{label:"right"}],z=[{label:"center"},{label:"top"},{label:"bottom"}],ie=[{label:"center"},{label:"front"},{label:"back"}],T=[{label:"head"},{label:"neck"},{label:"chest"},{label:"spine"},{label:"hips"},{label:"upperLeg"},{label:"lowerLeg"},{label:"foot"}],q=de=>{(t==null?void 0:t.thumbnails)!=null&&(A(t.thumbnails[de.value].description),d(t.thumbnails[de.value].manifest),u(t.thumbnails[de.value].name))},ge=(de,ee,K,se)=>isNaN(de)?se:de>K?K:de{const ee=parseInt(de.target.value);g(ge(ee,1,EV,512))},Ae=de=>{const ee=parseInt(de.target.value);w(ge(ee,1,EV,512))},$=de=>{const ee=parseFloat(de.target.value);C(ge(ee,0,1,.1))},ce=de=>{const ee=parseFloat(de.target.value);F(ge(ee,0,1,.1))},me=de=>{f(de)},_e=async()=>{const de=i.parent;de.remove(i),await r.createThumbnails(t.thumbnails[0]),de.add(i)},P=(de=!0)=>({topFrameOffset:b,bottomFrameOffset:B,thumbnailsWidth:m,thumbnailsHeight:v,backgroundColor:[0,0,0,0],thumbnailsCollection:[{traitGroup:e,cameraPosition:M+"-"+O+"-"+x,topBoneName:y==="upperLeg"||y==="lowerLeg"||y==="foot"?"left"+y[0].toUpperCase()+y.slice(1):y,topBoneMaxVertex:k,bottomBoneName:R==="upperLeg"||R==="lowerLeg"||y==="foot"?"left"+R[0].toUpperCase()+R.slice(1):R,bottomBoneMaxVertex:Z,saveOnlyIDs:de?null:n.id}]}),fe=async(de=!1)=>{s.storeCurrentAvatar();const ee=i.parent;ee.remove(i),de?await r.createThumbnailsWithObjectData(P(),!1,null,e+"_thumbnails"):await r.createThumbnailsWithObjectData(P(!1),!1),ee.add(i),s.loadStoredAvatar()};return Ce.useEffect(()=>{if((t==null?void 0:t.thumbnails)!=null){const de=t.thumbnails.map((ee,K)=>({value:K,label:ee.name,description:ee.description,manifest:ee.manifest}));a(de)}},[t]),L.jsx("div",{children:L.jsxs("div",{className:Ge.InformationContainerPos,children:[L.jsx(ka,{title:"Thumbnail Creation",width:180,right:20}),L.jsxs("div",{className:Ge.scrollContainer,children:[L.jsxs("div",{className:Ge.tabHolder,children:[L.jsx("div",{className:Ge.tabButton+(p?"":" "+Ge.tabButtonSelected),onClick:()=>{me(!1)},children:L.jsxs("div",{children:[" ","Custom"," "]})}),L.jsx("div",{className:Ge.tabButton+(p?" "+Ge.tabButtonSelected:""),onClick:()=>{me(!0)},children:L.jsxs("div",{children:[" ","Manifest"," "]})})]}),L.jsx("br",{}),p?L.jsxs(L.Fragment,{children:[L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,children:"Thumbnail Manifests"}),L.jsx(BA,{className:Ge.dropdownControl,options:o,value:c,onChange:q,placeholder:"Select an option"}),";",L.jsx("div",{className:Ge.traitInfoText,children:l||""}),h!=""&&L.jsx("div",{className:Ge.actionButton,onClick:_e,children:L.jsx("div",{children:" Create Thumbnails "})})]}):L.jsxs(L.Fragment,{children:[L.jsxs("div",{className:Ge.traitInfoText,children:[L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,style:{margin:"10px 0px 10px"},children:"Resolution"}),"Width ",L.jsx("input",{value:m,className:Ge["input-box"],step:1,onChange:de=>{g(de.target.value)},onBlur:he}),L.jsx("br",{}),"Height ",L.jsx("input",{value:v,className:Ge["input-box"],step:1,onChange:de=>{w(de.target.value)},onBlur:Ae}),L.jsx("br",{}),"Top Spacing ",L.jsx("input",{value:B,className:Ge["input-box"],step:.1,onChange:de=>{C(de.target.value)},onBlur:$}),L.jsx("br",{}),"Bottom Spacing ",L.jsx("input",{value:b,className:Ge["input-box"],step:.1,onChange:de=>{F(de.target.value)},onBlur:ce}),L.jsx("br",{}),L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,style:{margin:"20px"},children:"Camera Position"})]}),L.jsxs("div",{className:Ge.dropdownFlex,children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"X"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:_,onChange:de=>{H(de.label)},value:M})]}),L.jsxs("div",{className:Ge.dropdownFlex,children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"Y"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:z,onChange:de=>{U(de.label)},value:O})]}),L.jsxs("div",{className:Ge.dropdownFlex,children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"Z"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:ie,onChange:de=>{E(de.label)},value:x})]}),L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,style:{margin:"30px 0px 30px"},children:"Target Bones"}),L.jsxs("div",{className:Ge.dropdownFlex,style:{justifyContent:"space-between"},children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"Top"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:T,onChange:de=>{I(de.label)},value:y})]}),L.jsxs("div",{className:Ge.dropdownFlex,style:{justifyContent:"space-between"},children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"Bottom"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:T,onChange:de=>{D(de.label)},value:R})]}),L.jsxs("div",{style:{textAlign:"left"},children:[L.jsxs("div",{className:Ge.checkboxFlex,style:{marginTop:"20px"},children:[L.jsx("input",{type:"checkbox",checked:k,onChange:de=>{V(de.target.checked)}}),L.jsx("div",{className:Ge.traitInfoText,style:{margin:"0px",fontSize:"12px"},children:`Top bone ${k?"uses Top":"uses Low"} Vertex`})]}),L.jsxs("div",{className:Ge.checkboxFlex,style:{marginTop:"10px"},children:[L.jsx("input",{type:"checkbox",checked:Z,onChange:de=>{N(de.target.checked)}}),L.jsx("div",{className:Ge.traitInfoText,style:{margin:"0px",fontSize:"12px"},children:`Bottom bone ${Z?"uses Top":"uses Low"} Vertex`})]})]}),e==""?L.jsx("div",{className:Ge.traitInfoText+" "+Ge.centerAlign,style:{marginTop:"40px"},children:"Please choose a trait category in the left side menu."}):L.jsxs(L.Fragment,{children:[L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,style:{marginTop:"20px"},children:"Generate"}),L.jsx("div",{className:Ge.traitInfoText+" "+Ge.centerAlign,style:{margin:"0px auto 20px"},children:"( "+e+" )"}),L.jsxs("div",{className:Ge.simpleFlex,style:{marginTop:"0px"},children:[L.jsx("div",{className:Ge.actionButton,style:{margin:"0px"},onClick:()=>{fe(!1)},children:L.jsx("div",{children:" Current "})}),L.jsx("div",{className:Ge.actionButton,style:{margin:"0px"},onClick:()=>{fe(!0)},children:L.jsx("div",{children:" All "})})]})]})]})]})]})})}function PVe({selectedTrait:n,selectedVRM:e,traitGroupName:t}){const[r,i]=X.useState(""),s=o=>{o!=r?i(o):i("")};return L.jsxs("div",{children:[r=="Information"&&L.jsx(kVe,{selectedTrait:n,selectedVRM:e}),r=="LoraCreation"&&L.jsx(DVe,{selectedTrait:n,selectedVRM:e}),r=="SpriteCreation"&&L.jsx(LVe,{selectedTrait:n,selectedVRM:e}),r=="ThumbnailCreation"&&L.jsx(VVe,{selectedTrait:n,traitGroupName:t}),L.jsxs("div",{className:YI.InformationContainerPos,children:[L.jsx(ka,{title:"Tools",width:90,right:0}),L.jsx("div",{className:YI.scrollContainer,children:L.jsxs("div",{className:YI.optionsContainer,children:[L.jsx("div",{onClick:()=>{s("Information")},children:L.jsx(DA,{size:56,icon:hVe,rarity:r=="Information"?"mythic":"none"})},"Information"),L.jsx("div",{onClick:()=>{s("LoraCreation")},children:L.jsx(DA,{size:56,icon:pVe,rarity:r=="LoraCreation"?"mythic":"none"})},"LoraCreation"),L.jsx("div",{onClick:()=>{s("SpriteCreation")},children:L.jsx(DA,{size:56,icon:fVe,rarity:r=="SpriteCreation"?"mythic":"none"})},"SpriteCreation"),L.jsx("div",{onClick:()=>{s("ThumbnailCreation")},children:L.jsx(DA,{size:56,icon:gVe,rarity:r=="ThumbnailCreation"?"mythic":"none"})},"ThumbnailCreation")]})})]})]})}function OVe(){const{isLoading:n,setViewMode:e,setIsLoading:t}=X.useContext(Ci),{toggleDebugMode:r,characterManager:i,animationManager:s,moveCamera:o,loraDataGenerator:a,spriteAtlasGenerator:l,thumbnailsGenerator:A,sceneElements:c}=X.useContext(lr),{playSound:u}=X.useContext(bs),{isMute:h}=X.useContext(Bs),{t:d}=Ce.useContext(xs),p=()=>{!h&&u("backNextButton"),i.removeCurrentCharacter(),i.removeCurrentManifest(),e(at.CREATE),r(!1)},[f,m]=X.useState(null),[g,v]=X.useState(null),[w,B]=X.useState(""),[C,b]=X.useState(null),[F,x]=X.useState(null),[E,M]=X.useState(""),[H,O]=X.useState(!1),[U,y]=X.useState({background:"#ffffff"}),I=()=>{!h&&u("backNextButton"),e(at.SAVE),r(!1)},R=()=>{t(!0),m(null),i.loadRandomTraits().then(()=>{console.log("success"),w!=""&&b(i.getCurrentTraitData(w)),t(!1)}).catch(Ae=>{t(!1),console.error("Error loading random traits:",Ae.message)})},D=Ae=>{y({background:Ae.hex})},k=Ae=>{y({background:Ae.hex}),i.setTraitColor(w,Ae.hex)},V=async Ae=>{const $=Sl(Ae.name),ce=URL.createObjectURL(Ae);await s.loadAnimation(ce,!1,0,!0,"",$),M(s.getCurrentAnimationName())},Z=Ae=>{if(O(!1),w!=""){t(!0);const $=URL.createObjectURL(Ae);i.loadCustomTexture(w,$).then(()=>{t(!1)})}else console.warn("Please select a group trait first.")},N=Ae=>{if(O(!1),w!=""){t(!0);const $=URL.createObjectURL(Ae);i.loadCustomTrait(w,$).then(()=>{t(!1)})}else console.warn("Please select a group trait first.")},_=Ae=>{O(!1),t(!0),i.loadTrait(Ae.traitGroup.trait,Ae.id).then(()=>{t(!1),b(Ae)})},z=Ae=>{O(!1),i.removeTrait(Ae),b(null)},ie=Ae=>{O(!1),t(!0),i.loadRandomTrait(Ae).then(()=>{t(!1),b(i.getCurrentTraitData(Ae))})},T=Ae=>{O(!1);const $=Array.from(Ae),ce=[],me=_e=>new Promise((P,fe)=>{var de;if(_e&&_e.name.toLowerCase().endsWith(".json")){const ee=new FileReader,K=`${(de=i.manifestData)==null?void 0:de.getAssetsDirectory()}/anata/_thumbnails/t_${_e.name.split("_")[0]}.jpg`;console.log(K),ee.onload=function(se){try{const ye=JSON.parse(se.target.result);ye.thumb=K,ce.push(ye),P()}catch(ye){console.error("Error parsing the JSON file:",ye),fe(ye)}},ee.readAsText(_e)}});Promise.all($.map(me)).then(()=>{ce.length>0&&(m(ce),t(!0),i.loadTraitsFromNFTObject(ce[0]).then(()=>{t(!1)}))}).catch(_e=>{console.error("Error processing files:",_e)})},q=async Ae=>{const $=Ae[0];$&&$.name.toLowerCase().endsWith(".fbx")&&V($),$&&($.name.toLowerCase().endsWith(".png")||$.name.toLowerCase().endsWith(".jpg"))&&Z($),$&&$.name.toLowerCase().endsWith(".vrm")&&N($),$&&$.name.toLowerCase().endsWith(".json")&&T(Ae)},ge=Ae=>{!h&&u("optionClick"),O(!1),w!==Ae.trait?(v(i.getTraits(Ae.trait)),B(Ae.trait),b(i.getCurrentTraitData(Ae.trait)),x(i.getCurrentTraitVRM(Ae.trait)),o({targetY:Ae.cameraTarget.height,distance:Ae.cameraTarget.distance})):(v(null),B(""),b(null),o({targetY:.8,distance:3.2}))},he=()=>{O(!1);var Ae=document.createElement("input");Ae.type="file",Ae.accept=".vrm",Ae.onchange=$=>{var ce=$.target.files[0];if(ce.name.endsWith(".vrm")){const me=URL.createObjectURL(ce);t(!0),i.loadCustomTrait(w,me).then(()=>{t(!1)})}},Ae.click()};return L.jsxs("div",{className:Tn.container,children:[L.jsx("div",{className:`loadingIndicator ${n?"active":""}`,children:L.jsx("img",{className:"rotate",src:"ui/loading.svg"})}),L.jsx("div",{className:"sectionTitle",children:d("pageTitles.chooseAppearance")}),L.jsx(I0,{onFilesDrop:q}),L.jsxs("div",{className:Tn.sideMenu,children:[L.jsx(ka,{title:"Appearance",left:20}),L.jsx("div",{className:Tn.bottomLine}),L.jsx("div",{className:Tn.scrollContainer,children:L.jsx("div",{className:Tn["editor-container"],children:i.getGroupTraits().map((Ae,$)=>L.jsxs("div",{className:Tn.editorButton,onClick:()=>{ge(Ae)},children:[L.jsx(DA,{size:56,icon:Ae.fullIconSvg,rarity:w!==Ae.trait?"none":"mythic"}),L.jsx("div",{className:Tn.editorText,children:Ae.name})]},"options_"+$))})})]}),!!g&&L.jsxs("div",{className:Tn.selectorContainerPos,children:[L.jsx(ka,{title:w,width:130,left:20}),C&&L.jsx("div",{className:Tn.selectorColorPickerButton,onClick:()=>{O(!H)},children:L.jsx("img",{className:Tn.selectorColorPickerImg,src:wCe})}),!!H&&L.jsx("div",{draggable:!1,className:Tn.selectorColorPickerUI,children:L.jsx(DLe,{draggable:!1,width:"200px",color:U.background,onChange:D,onChangeComplete:k})}),L.jsx("div",{className:Tn.bottomLine}),L.jsx("div",{className:Tn.scrollContainerOptions,children:L.jsxs("div",{className:Tn["selector-container"],children:[L.jsx("div",{className:`${Tn.selectorButton}`,onClick:()=>{ie(w)},children:L.jsx(DA,{size:56,icon:yCe,rarity:"none"})},"randomize-trait"),i.isTraitGroupRequired(w)?L.jsx(L.Fragment,{}):L.jsx("div",{className:`${Tn.selectorButton}`,icon:H3,onClick:()=>{z(w)},children:L.jsx(DA,{size:56,icon:H3,rarity:C==null?"mythic":"none"})},"no-trait"),g.map(Ae=>{let $=Ae.id===(C==null?void 0:C.id);return L.jsx("div",{className:`${Tn.selectorButton}`,onClick:()=>{_(Ae)},children:L.jsx(DA,{size:56,icon:Ae.fullThumbnail,rarity:$?"mythic":"none"})},Ae.id)})]})}),L.jsx("div",{className:Tn.uploadContainer,children:L.jsx("div",{className:Tn.uploadButton,onClick:he,children:L.jsx("div",{children:"Upload "})})})]}),L.jsx(yQ,{jsonSelectionArray:f}),L.jsx(PVe,{selectedTrait:C,selectedVRM:F,traitGroupName:w}),L.jsx(Eb,{loadedAnimationName:E,randomize:R}),L.jsxs("div",{className:Tn.buttonContainer,children:[L.jsx(sn,{theme:"light",text:d("callToAction.back"),size:14,className:Tn.buttonLeft,onClick:p}),i.canDownload()&&L.jsx(sn,{theme:"light",text:d("callToAction.next"),size:14,className:Tn.buttonRight,onClick:I})]})]})}const WVe="_InformationContainerPos_rgqwy_1",ZVe="_traitInfoTitle_rgqwy_13",GVe="_traitInfoText_rgqwy_21",JVe="_flexSelect_rgqwy_30",HVe="_scrollContainer_rgqwy_65",zVe="_checked_rgqwy_90",YVe="_checkmark_rgqwy_94",XVe="_checkboxHolder_rgqwy_107",jVe="_buttonContainer_rgqwy_114",KVe="_buttonLeft_rgqwy_123",$Ve="_buttonRight_rgqwy_127",qVe="_buttonCenter_rgqwy_131",gi={InformationContainerPos:WVe,traitInfoTitle:ZVe,traitInfoText:GVe,flexSelect:JVe,"arrow-button":"_arrow-button_rgqwy_37","left-button":"_left-button_rgqwy_51","right-button":"_right-button_rgqwy_58",scrollContainer:HVe,"custom-checkbox":"_custom-checkbox_rgqwy_76","checkbox-container":"_checkbox-container_rgqwy_81",checked:zVe,checkmark:YVe,checkboxHolder:XVe,buttonContainer:jVe,buttonLeft:KVe,buttonRight:$Ve,buttonCenter:qVe},ePe="_InformationContainerPos_11mqa_2",tPe="_scrollContainer_11mqa_16",nPe="_traitInfoTitle_11mqa_28",rPe="_traitInfoText_11mqa_38",iPe="_flexSelect_11mqa_66",sPe="_checked_11mqa_124",oPe="_checkmark_11mqa_128",aPe="_checkboxHolder_11mqa_141",Zn={InformationContainerPos:ePe,scrollContainer:tPe,traitInfoTitle:nPe,traitInfoText:rPe,"input-box":"_input-box_11mqa_47",flexSelect:iPe,"arrow-button":"_arrow-button_11mqa_76","left-button":"_left-button_11mqa_91","right-button":"_right-button_11mqa_98","anim-button":"_anim-button_11mqa_105","custom-checkbox":"_custom-checkbox_11mqa_110","checkbox-container":"_checkbox-container_11mqa_115",checked:sPe,checkmark:oPe,checkboxHolder:aPe};function uR({model:n,name:e,files:t,index:r,nextVrm:i,previousVrm:s}){const{characterManager:o}=X.useContext(lr),[a,l]=Ce.useState(0),[A,c]=Ce.useState(0),[u,h]=Ce.useState(0),[d,p]=Ce.useState(0),[f,m]=Ce.useState(0),[g,v]=Ce.useState(0),[w,B]=Ce.useState(0),[C,b]=Ce.useState(0),[F,x]=Ce.useState(0),[E,M]=Ce.useState(0);return Ce.useEffect(()=>{if(n!=null){const H=Ef(n,"Mesh"),O=Ef(n,"SkinnedMesh");l(H.length),c(O.length);const U=H.concat(O),{stdMats:y,stdCutoutpMats:I,stdTranspMats:R,mToonMats:D,mToonCutoutMats:k,mToonTranspMats:V}=dfe(U);h(y.length),p(R.length),m(I.length),v(D.length),B(V.length),b(k.length);const{triangles:Z,bones:N}=o.getBoneTriangleCount();x(Z),M(N)}},[n]),n!=null?L.jsx("div",{children:L.jsxs("div",{className:Zn.InformationContainerPos,children:[L.jsx(ka,{title:"Model Information",width:180,right:20}),L.jsxs("div",{className:Zn.scrollContainer,children:[L.jsxs("div",{className:Zn.flexSelect,children:[(t==null?void 0:t.length)>1?L.jsx("div",{className:`${Zn["arrow-button"]} ${Zn["left-button"]}`,onClick:s}):L.jsx(L.Fragment,{}),e&&L.jsx("div",{style:{textAlign:"center"},children:L.jsx("div",{className:Zn.traitInfoTitle,style:{margin:"auto",fontSize:"14px",width:"200px",textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:e})}),(t==null?void 0:t.length)>1?L.jsx("div",{className:`${Zn["arrow-button"]} ${Zn["right-button"]}`,onClick:i}):L.jsx(L.Fragment,{})]}),L.jsx("div",{className:Zn.traitInfoTitle,children:"Geometry info:"}),L.jsxs("div",{className:Zn.traitInfoText,children:["Meshes: ",a]}),L.jsxs("div",{className:Zn.traitInfoText,children:["SkinnedMeshes: ",A]}),L.jsxs("div",{className:Zn.traitInfoText,children:["Triangles: ",F]}),L.jsxs("div",{className:Zn.traitInfoText,children:["Bones: ",E]}),L.jsx("div",{className:Zn.traitInfoTitle,children:"Standard Material Count:"}),L.jsxs("div",{className:Zn.traitInfoText,children:["opaque: ",u]}),L.jsxs("div",{className:Zn.traitInfoText,children:["cutout: ",f]}),L.jsxs("div",{className:Zn.traitInfoText,children:["transparent: ",d]}),L.jsx("div",{className:Zn.traitInfoTitle,children:"MToon Material Count:"}),L.jsxs("div",{className:Zn.traitInfoText,children:["opaque: ",g]}),L.jsxs("div",{className:Zn.traitInfoText,children:["cutout: ",C]}),L.jsxs("div",{className:Zn.traitInfoText,children:["transparent: ",w]})]})]})}):L.jsx(L.Fragment,{})}function lPe(){const{isLoading:n,setViewMode:e,setIsLoading:t}=X.useContext(Ci),{manifest:r,toggleDebugMode:i,characterManager:s,animationManager:o,loraDataGenerator:a,spriteAtlasGenerator:l,sceneElements:A}=X.useContext(lr),[c,u]=Ce.useState(null),[h,d]=Ce.useState(""),[p,f]=X.useState(""),{playSound:m}=X.useContext(bs),{isMute:g}=X.useContext(Bs),[v,w]=X.useState(null),B=()=>{!g&&m("backNextButton"),s.removeCurrentCharacter(),s.removeCurrentManifest(),i(!1),e(at.LANDING)},C=()=>{const U=De.mergeOptions_sel_option||0;return{isVrm0:!0,createTextureAtlas:!0,mToonAtlasSize:Cn(De.mergeOptions_atlas_mtoon_size||6),mToonAtlasSizeTransp:Cn(De.mergeOptions_atlas_mtoon_transp_size||6),stdAtlasSize:Cn(De.mergeOptions_atlas_std_size||6),stdAtlasSizeTransp:Cn(De.mergeOptions_atlas_std_transp_size||6),exportStdAtlas:U===0||U==2,exportMtoonAtlas:U===1||U==2,ktxCompression:De.merge_options_ktx_compression||!1,twoSidedMaterial:De.mergeOptions_two_sided_mat||!1}},b=(U,y=!1)=>{console.log(y),(async()=>{await s.loadTraitsFromNFTObject(v[U]),(De.mergeOptions_download_vrm==null?!0:De.mergeOptions_download_vrm)&&await s.downloadVRM(v[U].name,C());const D=new qf,k=A.parent;k.remove(A);const V=De.mergeOptions_download_lora==null?!0:De.mergeOptions_download_lora;if(V===!0){const N=r.loras.map(async _=>a.createLoraData(_,D));await Promise.all(N)}const Z=De.mergeOptions_download_sprites==null?!0:De.mergeOptions_download_sprites;if(Z===!0){const N=r.sprites.map(async _=>l.createSpriteAtlas(_,D));await Promise.all(N)}(V===!0||Z===!0)&&D.saveZip(v[U].name),k.add(A),U{t(!0),b(0,!0)},{t:x}=Ce.useContext(xs),E=async U=>{if(s.getCurrentCharacterModel()){const I=Sl(U.name),R=URL.createObjectURL(U);await o.loadAnimation(R,!1,0,!0,"",I),f(o.getCurrentAnimationName()),URL.revokeObjectURL(R)}else console.warn("Please load a vrm model to test animations.")},M=async U=>{const y=URL.createObjectURL(U);await s.loadOptimizerCharacter(y),URL.revokeObjectURL(y);const I=Sl(U.name);d(I),u(s.getCurrentCharacterModel())},H=U=>{const y=Array.from(U),I=[],R=D=>new Promise((k,V)=>{var Z;if(D&&D.name.toLowerCase().endsWith(".json")){const N=new FileReader,_=`${(Z=s.manifestData)==null?void 0:Z.getAssetsDirectory()}/anata/_thumbnails/t_${D.name.split("_")[0]}.jpg`;N.onload=function(z){try{const ie=JSON.parse(z.target.result);ie.thumb=_,I.push(ie),k()}catch(ie){console.error("Error parsing the JSON file:",ie),V(ie)}},N.readAsText(D)}});Promise.all(y.map(R)).then(()=>{I.length>0&&(w(I),t(!0),s.loadTraitsFromNFTObject(I[0]).then(()=>{t(!1)}))}).catch(D=>{console.error("Error processing files:",D)})},O=async U=>{const y=U[0];console.log("anim"),y&&y.name.toLowerCase().endsWith(".fbx")&&(console.log("anim2"),E(y)),y&&y.name.toLowerCase().endsWith(".vrm")&&M(y),y&&y.name.toLowerCase().endsWith(".json")&&H(U)};return L.jsxs("div",{className:gi.container,children:[L.jsx("div",{className:`loadingIndicator ${n?"active":""}`,children:L.jsx("img",{className:"rotate",src:"ui/loading.svg"})}),L.jsx("div",{className:"sectionTitle",children:"Batch Download"}),L.jsx(I0,{onFilesDrop:O}),L.jsx(xb,{showDropToDownload:!0,showCreateAtlas:!1,mergeMenuTitle:"Download Options"}),L.jsx(uR,{model:c}),L.jsx(yQ,{jsonSelectionArray:v}),L.jsx(Eb,{loadedAnimationName:p}),L.jsxs("div",{className:gi.buttonContainer,children:[L.jsx(sn,{theme:"light",text:x("callToAction.back"),size:14,className:gi.buttonLeft,onClick:B}),(v==null?void 0:v.length)==1&&L.jsx(sn,{theme:"light",text:"Download",size:14,className:gi.buttonRight,onClick:F}),(v==null?void 0:v.length)>1&&L.jsx(sn,{theme:"light",text:"Download All",size:14,className:gi.buttonRight,onClick:F})]})]})}function APe(){const{isLoading:n,setViewMode:e}=X.useContext(Ci),{manifest:t,characterManager:r,animationManager:i,sceneElements:s,loraDataGenerator:o,spriteAtlasGenerator:a}=X.useContext(lr),{playSound:l}=X.useContext(bs),{isMute:A}=X.useContext(Bs),[c,u]=Ce.useState(null),[h,d]=Ce.useState(""),[p,f]=Ce.useState([]),[m,g]=Ce.useState(0),[v,w]=X.useState("T-Pose"),B=()=>{!A&&l("backNextButton"),r.removeCurrentCharacter(),r.removeCurrentManifest(),e(at.LANDING)},C=()=>{const I=De.mergeOptions_sel_option||0;return{isVrm0:!0,createTextureAtlas:!0,mToonAtlasSize:Cn(De.mergeOptions_atlas_mtoon_size||6),mToonAtlasSizeTransp:Cn(De.mergeOptions_atlas_mtoon_transp_size||6),stdAtlasSize:Cn(De.mergeOptions_atlas_std_size||6),stdAtlasSizeTransp:Cn(De.mergeOptions_atlas_std_transp_size||6),exportStdAtlas:I===0||I==2,exportMtoonAtlas:I===1||I==2,ktxCompression:De.merge_options_ktx_compression||!1,twoSidedMaterial:De.mergeOptions_two_sided_mat||!1}},b=async()=>{for(let I=0;I{await(async()=>{var ie;I=I||h+"_merged",C(),(De.mergeOptions_download_vrm_preview==null?!0:De.mergeOptions_download_vrm_preview)&&r.savePortraitScreenshot(I+"_portrait",512,1024,1.5,-.1),(De.mergeOptions_download_vrm==null?!0:De.mergeOptions_download_vrm)&&await r.downloadVRM(I+"_merged",C());const V=new qf,Z=s.parent;Z.remove(s);const N=(ie=r.getCurrentOptimizerCharacterModel().data)==null?void 0:ie.isVRM0;N&&Z.rotateY(3.14159);const _=De.mergeOptions_download_lora==null?!0:De.mergeOptions_download_lora;if(_===!0){const T=t.loras.map(async q=>o.createLoraData(q,V));await Promise.all(T)}const z=De.mergeOptions_download_sprites==null?!0:De.mergeOptions_download_sprites;if(z===!0){const T=t.sprites.map(async q=>a.createSpriteAtlas(q,V));await Promise.all(T)}(_===!0||z===!0)&&V.saveZip(I),N&&Z.rotateY(-3.14159),Z.add(s)})()},{t:x}=Ce.useContext(xs),E=async I=>{if(r.getCurrentOptimizerCharacterModel()){const D=Sl(I.name),k=URL.createObjectURL(I);await i.loadAnimation(k,!1,0,!0,"",D),w(i.getCurrentAnimationName()),URL.revokeObjectURL(k)}else console.warn("Please load a vrm model to test animations.")},M=()=>{if(m===0)O(p[p.length-1]),g(p.length-1);else{const I=m-1;O(p[I]),g(I)}},H=()=>{if(m>=p.length-1)O(p[0]),g(0);else{const I=m+1;O(p[I]),g(I)}},O=async I=>{const R=URL.createObjectURL(I);await r.loadOptimizerCharacter(R),URL.revokeObjectURL(R);const D=Sl(I.name);d(D),u({...r.getCurrentCharacterModel()})},U=async I=>{O(I[0]);const R=[];for(let D=0;D{const R=I[0];R&&R.name.toLowerCase().endsWith(".fbx")&&E(R),R&&R.name.toLowerCase().endsWith(".vrm")&&U(I)};return L.jsxs("div",{className:gi.container,children:[L.jsx("div",{className:`loadingIndicator ${n?"active":""}`,children:L.jsx("img",{className:"rotate",src:"ui/loading.svg"})}),L.jsx("div",{className:"sectionTitle",children:"Optimize your character"}),L.jsx(I0,{onFilesDrop:y}),L.jsx(xb,{showDropToDownload:!0,showCreateAtlas:!1,mergeMenuTitle:"Optimizer Options"}),L.jsx(uR,{model:c,name:h,files:p,index:m,nextVrm:H,previousVrm:M}),L.jsx(Eb,{loadedAnimationName:v}),L.jsxs("div",{className:gi.buttonContainer,children:[L.jsx(sn,{theme:"light",text:x("callToAction.back"),size:14,className:gi.buttonLeft,onClick:B}),(p==null?void 0:p.length)>1!=""&&L.jsx(sn,{theme:"light",text:"Download All",size:14,className:gi.buttonRight,onClick:b}),c!=""&&L.jsx(sn,{theme:"light",text:"Download",size:14,className:gi.buttonRight,onClick:F})]})]})}function cPe(){const{isLoading:n,setViewMode:e,setIsLoading:t}=X.useContext(Ci),{manifest:r,characterManager:i,animationManager:s,toggleDebugMode:o,loraDataGenerator:a,spriteAtlasGenerator:l,sceneElements:A}=X.useContext(lr),[c,u]=Ce.useState(null),[h,d]=Ce.useState(""),{playSound:p}=X.useContext(bs),{isMute:f}=X.useContext(Bs);X.useState(null);const[m,g]=X.useState(null),[v,w]=X.useState(""),B=()=>{!f&&p("backNextButton"),i.removeCurrentCharacter(),i.removeCurrentManifest(),o(!1),e(at.LANDING)},C=()=>{const y=De.mergeOptions_sel_option||0;return{isVrm0:!0,createTextureAtlas:!0,mToonAtlasSize:Cn(De.mergeOptions_atlas_mtoon_size||6),mToonAtlasSizeTransp:Cn(De.mergeOptions_atlas_mtoon_transp_size||6),stdAtlasSize:Cn(De.mergeOptions_atlas_std_size||6),stdAtlasSizeTransp:Cn(De.mergeOptions_atlas_std_transp_size||6),exportStdAtlas:y===0||y==2,exportMtoonAtlas:y===1||y==2,ktxCompression:De.merge_options_ktx_compression||!1,twoSidedMaterial:De.mergeOptions_two_sided_mat||!1}},b=y=>{const I=m[y].manifestName;(async()=>{(De.mergeOptions_download_vrm_preview==null?!0:De.mergeOptions_download_vrm_preview)&&i.savePortraitScreenshot(I,512,1024,1.5,-.1),(De.mergeOptions_download_vrm==null?!0:De.mergeOptions_download_vrm)&&await i.downloadVRM(I,C());const V=new qf,Z=A.parent;Z.remove(A);const N=De.mergeOptions_download_lora==null?!0:De.mergeOptions_download_lora;if(N===!0){const z=r.loras.map(async ie=>a.createLoraData(ie,V));await Promise.all(z)}const _=De.mergeOptions_download_sprites==null?!0:De.mergeOptions_download_sprites;if(_===!0){const z=r.sprites.map(async ie=>l.createSpriteAtlas(ie,V));await Promise.all(z)}(N===!0||_===!0)&&V.saveZip(m[y].manifestName),Z.add(A),y{y==0?(console.log(r.loras[0]),b(y)):(await i.setManifest(m[y]),t(!0),i.loadInitialTraits().then(async()=>{await(R=>new Promise(D=>setTimeout(D,R)))(1),b(y)}))},x=()=>{t(!0),F(0)},{t:E}=Ce.useContext(xs),M=async y=>{if(i.getCurrentCharacterModel()){const R=Sl(y.name),D=URL.createObjectURL(y);await s.loadAnimation(D,!1,0,!0,"",R),w(s.getCurrentAnimationName()),URL.revokeObjectURL(D)}else console.warn("Please load a vrm model to test animations.")},H=async y=>{const I=URL.createObjectURL(y);await i.loadOptimizerCharacter(I),URL.revokeObjectURL(I);const R=Sl(y.name);d(R),u(i.getCurrentCharacterModel())},O=y=>{const I=Array.from(y),R=[],D=k=>new Promise((V,Z)=>{if(k&&k.name.toLowerCase().endsWith(".json")){const N=new FileReader,_=k.name.replace(/\.[^/.]+$/,"");N.onload=function(z){try{const ie=JSON.parse(z.target.result),T=ie.thumbnail;ie.manifestName=_,R.push(ie),V()}catch(ie){console.error("Error parsing the JSON file:",ie),Z(ie)}},N.readAsText(k)}});Promise.all(I.map(D)).then(()=>{R.length>0&&(g(R),i.setManifest(R[0]),t(!0),i.loadInitialTraits().then(()=>{t(!1)}))}).catch(k=>{console.error("Error processing files:",k)})},U=async y=>{const I=y[0];I&&I.name.toLowerCase().endsWith(".fbx")&&M(I),I&&I.name.toLowerCase().endsWith(".vrm")&&H(I),I&&I.name.toLowerCase().endsWith(".json")&&O(y)};return L.jsxs("div",{className:gi.container,children:[L.jsx("div",{className:`loadingIndicator ${n?"active":""}`,children:L.jsx("img",{className:"rotate",src:"ui/loading.svg"})}),L.jsx("div",{className:"sectionTitle",children:"NFT Characters"}),L.jsx(I0,{onFilesDrop:U}),L.jsx(xb,{showDropToDownload:!0,showCreateAtlas:!1,mergeMenuTitle:"Download Options"}),L.jsx(uR,{model:c}),L.jsx(yQ,{jsonSelectionArray:m,byManifest:!0}),(m==null?void 0:m.length)>0&&L.jsx(Eb,{loadedAnimationName:v}),L.jsxs("div",{className:gi.buttonContainer,children:[L.jsx(sn,{theme:"light",text:E("callToAction.back"),size:14,className:gi.buttonLeft,onClick:B}),(m==null?void 0:m.length)==1&&L.jsx(sn,{theme:"light",text:"Download",size:14,className:gi.buttonRight,onClick:x}),(m==null?void 0:m.length)>1&&L.jsx(sn,{theme:"light",text:"Download All",size:14,className:gi.buttonRight,onClick:x})]})]})}function uPe(){const{t:n}=Ce.useContext(xs),{setViewMode:e,setIsLoading:t,isLoading:r}=X.useContext(Ci),{playSound:i}=X.useContext(bs),{isMute:s}=X.useContext(Bs),{manifest:o,characterManager:a}=X.useContext(lr);Ce.useState([]);const[l,A]=Ce.useState([]);Ce.useEffect(()=>{c()},[]);const c=async()=>{const f=await vQ();Lwe(f,"the-anata-nft").then(m=>{A(m.nfts),console.log(m.nfts)})},u=()=>{e(at.LANDING),!s&&i("backNextButton")},h=async f=>{t(!0),a.loadManifest(o[f].manifest).then(()=>{e(at.APPEARANCE),a.loadInitialTraits().then(()=>{t(!1)})}),!s&&i("classSelect")},d=()=>{console.log("ttt"),a.loadManifest(o[0].manifest).then(()=>{a.loadAppendManifest(o[1].manifest,!0).then(()=>{console.log(a.manifestData)})})},p=()=>{!s&&i("classMouseOver")};return L.jsxs("div",{className:`${st.container} horizontalScroll`,children:[L.jsx("div",{className:"sectionTitle",children:n("pageTitles.chooseClass")}),L.jsx("div",{className:st.vrmOptimizerButton}),L.jsx("div",{className:st.topLine}),L.jsx("div",{className:st.classContainer,children:l.map((f,m)=>L.jsxs("div",{className:st.class,onClick:()=>h(m),onMouseOver:()=>p(),children:[L.jsx("div",{className:st.classFrame,style:{backgroundImage:`url(${f.image_url})`},children:L.jsx("div",{className:st.frameContainer,children:L.jsx("img",{src:"./assets/backgrounds/class-frame.svg",className:st.frame})})}),L.jsx("div",{className:st.name,children:f.name})]},m))}),L.jsx("div",{className:st.bottomLine}),L.jsxs("div",{className:st.buttonContainer,children:[L.jsx(sn,{theme:"light",text:n("callToAction.back"),size:14,className:st.buttonLeft,onClick:u}),L.jsx(sn,{theme:"light",text:"test",size:14,className:st.buttonLeft,onClick:d})]})]})}const dPe="https://beta.anata.dev/character-assets/manifest.json";let XI;const jI=new j,ky=new j;let KI,$I;const hPe=1.4,fPe=new j(0,1.25,0),wz=new j(-.9786403788721187,1.4036900759197288,.9892635490125085),pPe=wz.length(),gPe=.35,SV=6,UV=new j(0,.8,0),Bz=new j(-2.2367993753934425,1.1512971720174363,2.2612065299409223),mPe=Bz.length(),vPe=.5,Td=new j,Ji=new kt,yPe=new kt,wPe=new j(1,0,0),BPe=new j(0,1,0);async function CPe(n){try{const e=await fetch(n);if(!e.ok)throw new Error(`Failed to fetch manifest. Status: ${e.status}`);return await e.json()}catch(e){return console.error(`Error fetching manifest: ${e.message}`),[]}}async function bPe(){const n=await CPe(dPe),e=new bme;return{initialManifest:n,effectManager:e}}const xPe=()=>{let n,e;const r=bPe().then(i=>{n="success",e=i},i=>{n="error",e=i});return{read(){if(n==="error")throw e;if(n==="success")return e;throw r}}},IPe=xPe();function FPe(){const{initialManifest:n,effectManager:e}=IPe.read(),[t,r]=Ce.useState(!1),{camera:i,controls:s,scene:o,moveCamera:a,setManifest:l,lookAtManager:A,showEnvironmentModels:c}=Ce.useContext(lr),{viewMode:u}=Ce.useContext(Ci);e.camera=i,e.scene=o;const h=()=>{if(e.camera){if([at.BIO,at.CHAT].includes(u)){u===at.CHAT?(XI=hPe,jI.copy(fPe),ky.copy(wz),KI=pPe,$I=gPe):(XI=SV,jI.copy(UV),ky.copy(Bz),KI=mPe,$I=vPe),Ji.set(0,0,KI,1).applyMatrix4(e.camera.projectionMatrix),Ji.x/=Ji.w,Ji.y/=Ji.w,Ji.z/=Ji.w;const b=yPe.set($I*Ji.w,Ji.y*Ji.w,Ji.z*Ji.w,Ji.w).applyMatrix4(e.camera.projectionMatrixInverse).x,F=Td.set(ky.x,0,ky.z).angleTo(wPe);Td.set(b,0,0).applyAxisAngle(BPe,F),Td.add(jI),a({targetX:Td.x,targetY:Td.y,targetZ:Td.z,distance:XI})}else a({targetX:0,targetY:UV.y,targetZ:0,distance:SV});s&&([at.APPEARANCE,at.SAVE,at.OPTIMIZER,at.BATCHDOWNLOAD,at.BATCHMANIFEST].includes(u)?s.enabled=!0:s.enabled=!1)}},[d,p]=Ce.useState(!1),[f,m]=Ce.useState(""),[g,v]=Ce.useState([]),w=(b,F)=>{m(b),p(!0),v([F])},B={[at.LANDING]:L.jsx(uBe,{}),[at.APPEARANCE]:L.jsx(OVe,{confirmDialog:w}),[at.OPTIMIZER]:L.jsx(APe,{}),[at.CREATE]:L.jsx(aBe,{}),[at.WALLET]:L.jsx(uPe,{}),[at.CLAIM]:L.jsx(lBe,{}),[at.BATCHMANIFEST]:L.jsx(cPe,{}),[at.BATCHDOWNLOAD]:L.jsx(lPe,{}),[at.LOAD]:L.jsx(ywe,{}),[at.MINT]:L.jsx(Wwe,{}),[at.SAVE]:L.jsx(Sye,{}),[at.CHAT]:L.jsx(oye,{})};let C=0;return Ce.useEffect(()=>{const b=F=>{const x=new Date().getTime(),E=x-C;E<300&&E>10&&F.target.id=="editor-scene"&&r(!t),C=x};return window.addEventListener("touchend",b),window.addEventListener("click",b),()=>{window.removeEventListener("touchend",b),window.removeEventListener("click",b)}},[t]),Ce.useEffect(()=>{if(A!=null)return h(),[at.BIO,at.MINT,at.CHAT].includes(u)?A.enabled=!1:A.enabled=!0,[at.LANDING,at.CREATE,at.CLAIM,at.LOAD,at.CLAIM,at.CLAIM].includes(u)?c(!1):c(!0),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[u,A]),Ce.useEffect(()=>{l(n)},[n]),Ce.useContext(xs),L.jsxs(Ce.Fragment,{children:[L.jsx("div",{className:"generalTitle",children:"Character Studio"}),L.jsx(Ome,{confirmDialogText:f,confirmDialogCallback:g,confirmDialogWindow:d,setConfirmDialogWindow:p}),L.jsx(Yme,{}),B[u]]})}const _Pe=n=>{const e=new aS(n);return e.pollingInterval=12e3,e};AF.createRoot(document.getElementById("root")).render(L.jsx(X.StrictMode,{children:L.jsx(u8,{getLibrary:_Pe,children:L.jsx(BK,{children:L.jsx(tme,{children:L.jsx(yK,{children:L.jsx(Mpe,{children:L.jsx(Qpe,{children:L.jsx(Wpe,{children:L.jsx(Ce.Suspense,{children:L.jsx(FPe,{})})})})})})})})})}));export{pa as c,Zl as g}; + `),X.createElement("div",{style:c.white,className:"saturation-white"},X.createElement("div",{style:c.black,className:"saturation-black"}),X.createElement("div",{style:c.pointer},this.props.pointer?X.createElement(this.props.pointer,this.props):X.createElement("div",{style:c.circle}))))}}]),e}(Ce.PureComponent||Ce.Component);function ADe(n,e){for(var t=-1,r=n==null?0:n.length;++t=0,s=!t&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return et(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(UDe,arguments)},brighten:function(){return this._applyModification(QDe,arguments)},darken:function(){return this._applyModification(RDe,arguments)},desaturate:function(){return this._applyModification(_De,arguments)},saturate:function(){return this._applyModification(EDe,arguments)},greyscale:function(){return this._applyModification(SDe,arguments)},spin:function(){return this._applyModification(MDe,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(kDe,arguments)},complement:function(){return this._applyCombination(TDe,arguments)},monochromatic:function(){return this._applyCombination(DDe,arguments)},splitcomplement:function(){return this._applyCombination(NDe,arguments)},triad:function(){return this._applyCombination(nV,[3])},tetrad:function(){return this._applyCombination(nV,[4])}};et.fromRatio=function(n,e){if(mC(n)=="object"){var t={};for(var r in n)n.hasOwnProperty(r)&&(r==="a"?t[r]=n[r]:t[r]=_g(n[r]));n=t}return et(n,e)};function CDe(n){var e={r:0,g:0,b:0},t=1,r=null,i=null,s=null,o=!1,a=!1;return typeof n=="string"&&(n=WDe(n)),mC(n)=="object"&&(il(n.r)&&il(n.g)&&il(n.b)?(e=bDe(n.r,n.g,n.b),o=!0,a=String(n.r).substr(-1)==="%"?"prgb":"rgb"):il(n.h)&&il(n.s)&&il(n.v)?(r=_g(n.s),i=_g(n.v),e=IDe(n.h,r,i),o=!0,a="hsv"):il(n.h)&&il(n.s)&&il(n.l)&&(r=_g(n.s),s=_g(n.l),e=xDe(n.h,r,s),o=!0,a="hsl"),n.hasOwnProperty("a")&&(t=n.a)),t=iz(t),{ok:o,format:n.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function bDe(n,e,t){return{r:Bn(n,255)*255,g:Bn(e,255)*255,b:Bn(t,255)*255}}function $L(n,e,t){n=Bn(n,255),e=Bn(e,255),t=Bn(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),s,o,a=(r+i)/2;if(r==i)s=o=0;else{var l=r-i;switch(o=a>.5?l/(2-r-i):l/(r+i),r){case n:s=(e-t)/l+(e1&&(u-=1),u<1/6?A+(c-A)*6*u:u<1/2?c:u<2/3?A+(c-A)*(2/3-u)*6:A}if(e===0)r=i=s=t;else{var a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=o(l,a,n+1/3),i=o(l,a,n),s=o(l,a,n-1/3)}return{r:r*255,g:i*255,b:s*255}}function qL(n,e,t){n=Bn(n,255),e=Bn(e,255),t=Bn(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),s,o,a=r,l=r-i;if(o=r===0?0:l/r,r==i)s=0;else{switch(r){case n:s=(e-t)/l+(e>1)+720)%360;--e;)r.h=(r.h+i)%360,s.push(et(r));return s}function DDe(n,e){e=e||6;for(var t=et(n).toHsv(),r=t.h,i=t.s,s=t.v,o=[],a=1/e;e--;)o.push(et({h:r,s:i,v:s})),s=(s+a)%1;return o}et.mix=function(n,e,t){t=t===0?0:t||50;var r=et(n).toRgb(),i=et(e).toRgb(),s=t/100,o={r:(i.r-r.r)*s+r.r,g:(i.g-r.g)*s+r.g,b:(i.b-r.b)*s+r.b,a:(i.a-r.a)*s+r.a};return et(o)};et.readability=function(n,e){var t=et(n),r=et(e);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)};et.isReadable=function(n,e,t){var r=et.readability(n,e),i,s;switch(s=!1,i=ZDe(t),i.level+i.size){case"AAsmall":case"AAAlarge":s=r>=4.5;break;case"AAlarge":s=r>=3;break;case"AAAsmall":s=r>=7;break}return s};et.mostReadable=function(n,e,t){var r=null,i=0,s,o,a,l;t=t||{},o=t.includeFallbackColors,a=t.level,l=t.size;for(var A=0;Ai&&(i=s,r=et(e[A]));return et.isReadable(n,r,{level:a,size:l})||!o?r:(t.includeFallbackColors=!1,et.mostReadable(n,["#fff","#000"],t))};var OE=et.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},LDe=et.hexNames=VDe(OE);function VDe(n){var e={};for(var t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function iz(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Bn(n,e){PDe(n)&&(n="100%");var t=ODe(n);return n=Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(n*e,10)/100),Math.abs(n-e)<1e-6?1:n%e/parseFloat(e)}function Zb(n){return Math.min(1,Math.max(0,n))}function Yi(n){return parseInt(n,16)}function PDe(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function ODe(n){return typeof n=="string"&&n.indexOf("%")!=-1}function Qo(n){return n.length==1?"0"+n:""+n}function _g(n){return n<=1&&(n=n*100+"%"),n}function sz(n){return Math.round(parseFloat(n)*255).toString(16)}function rV(n){return Yi(n)/255}var bo=function(){var n="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+n+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function il(n){return!!bo.CSS_UNIT.exec(n)}function WDe(n){n=n.replace(wDe,"").replace(BDe,"").toLowerCase();var e=!1;if(OE[n])n=OE[n],e=!0;else if(n=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=bo.rgb.exec(n))?{r:t[1],g:t[2],b:t[3]}:(t=bo.rgba.exec(n))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=bo.hsl.exec(n))?{h:t[1],s:t[2],l:t[3]}:(t=bo.hsla.exec(n))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=bo.hsv.exec(n))?{h:t[1],s:t[2],v:t[3]}:(t=bo.hsva.exec(n))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=bo.hex8.exec(n))?{r:Yi(t[1]),g:Yi(t[2]),b:Yi(t[3]),a:rV(t[4]),format:e?"name":"hex8"}:(t=bo.hex6.exec(n))?{r:Yi(t[1]),g:Yi(t[2]),b:Yi(t[3]),format:e?"name":"hex"}:(t=bo.hex4.exec(n))?{r:Yi(t[1]+""+t[1]),g:Yi(t[2]+""+t[2]),b:Yi(t[3]+""+t[3]),a:rV(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=bo.hex3.exec(n))?{r:Yi(t[1]+""+t[1]),g:Yi(t[2]+""+t[2]),b:Yi(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function ZDe(n){var e,t;return n=n||{level:"AA",size:"small"},e=(n.level||"AA").toUpperCase(),t=(n.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}var iV=function(e){var t=["r","g","b","a","h","s","l","v"],r=0,i=0;return yDe(t,function(s){if(e[s]&&(r+=1,isNaN(e[s])||(i+=1),s==="s"||s==="l")){var o=/^\d+%$/;o.test(e[s])&&(i+=1)}}),r===i?e:!1},Eg=function(e,t){var r=e.hex?et(e.hex):et(e),i=r.toHsl(),s=r.toHsv(),o=r.toRgb(),a=r.toHex();i.s===0&&(i.h=t||0,s.h=t||0);var l=a==="000000"&&o.a===0;return{hsl:i,hex:l?"transparent":"#"+a,rgb:o,hsv:s,oldHue:e.h||t||i.h,source:e.source}},Bc=function(e){if(e==="transparent")return!0;var t=String(e).charAt(0)==="#"?1:0;return e.length!==4+t&&e.length<7+t&&et(e).isValid()},zQ=function(e){if(!e)return"#fff";var t=Eg(e);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},HI=function(e,t){var r=e.replace("°","");return et(t+" ("+r+")")._ok},rg=Object.assign||function(n){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){KDe(i,r);function i(){var s,o,a,l;jDe(this,i);for(var A=arguments.length,c=Array(A),u=0;ua))return!1;var A=s.get(n),c=s.get(e);if(A&&c)return A==e&&c==n;var u=-1,h=!0,d=t&A3e?new vC:void 0;for(s.set(n,e),s.set(e,n);++u=0||Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}var Ty=24,QLe=pz.default=function(n){var e=n.fill,t=e===void 0?"currentColor":e,r=n.width,i=r===void 0?Ty:r,s=n.height,o=s===void 0?Ty:s,a=n.style,l=a===void 0?{}:a,A=ULe(n,["fill","width","height","style"]);return bV.default.createElement("svg",CV({viewBox:"0 0 "+Ty+" "+Ty,style:CV({fill:t,width:i,height:o},l)},A),bV.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},RLe=function(){function n(e,t){for(var r=0;r1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},s)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(BV(i.s)?r.props.hsl.s:i.s),l:Number(BV(i.l)?r.props.hsl.l:i.l),source:"hsl"},s))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?r.state={view:"rgb"}:r.state={view:t.view},r}return RLe(e,[{key:"render",value:function(){var r=this,i=ht({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),s=void 0;return this.state.view==="hex"?s=X.createElement("div",{style:i.fields,className:"flexbox-fix"},X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?s=X.createElement("div",{style:i.fields,className:"flexbox-fix"},X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),X.createElement("div",{style:i.alpha},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(s=X.createElement("div",{style:i.fields,className:"flexbox-fix"},X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),X.createElement("div",{style:i.field},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),X.createElement("div",{style:i.alpha},X.createElement(Nt,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),X.createElement("div",{style:i.wrap,className:"flexbox-fix"},s,X.createElement("div",{style:i.toggle},X.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(a){return r.icon=a}},X.createElement(QLe,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e}(X.Component);gz.defaultProps={view:"hex"};var xV=function(){var e=ht({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return X.createElement("div",{style:e.picker})},kLe=function(){var e=ht({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return X.createElement("div",{style:e.picker})},qQ=function(e){var t=e.width,r=e.onChange,i=e.disableAlpha,s=e.rgb,o=e.hsl,a=e.hsv,l=e.hex,A=e.renderers,c=e.styles,u=c===void 0?{}:c,h=e.className,d=h===void 0?"":h,p=e.defaultView,f=ht(Oi({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+s.r+", "+s.g+", "+s.b+", "+s.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},u),{disableAlpha:i});return X.createElement("div",{style:f.picker,className:"chrome-picker "+d},X.createElement("div",{style:f.saturation},X.createElement(Wb,{style:f.Saturation,hsl:o,hsv:a,pointer:kLe,onChange:r})),X.createElement("div",{style:f.body},X.createElement("div",{style:f.controls,className:"flexbox-fix"},X.createElement("div",{style:f.color},X.createElement("div",{style:f.swatch},X.createElement("div",{style:f.active}),X.createElement(lp,{renderers:A}))),X.createElement("div",{style:f.toggles},X.createElement("div",{style:f.hue},X.createElement(Ap,{style:f.Hue,hsl:o,pointer:xV,onChange:r})),X.createElement("div",{style:f.alpha},X.createElement(VQ,{style:f.Alpha,rgb:s,hsl:o,pointer:xV,renderers:A,onChange:r})))),X.createElement(gz,{rgb:s,hsl:o,hex:l,view:p,onChange:r,disableAlpha:i})))};qQ.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),disableAlpha:Oe.bool,styles:Oe.object,defaultView:Oe.oneOf(["hex","rgb","hsl"])};qQ.defaultProps={width:225,disableAlpha:!1,styles:{}};const DLe=Wi(qQ);var LLe=function(e){var t=e.color,r=e.onClick,i=r===void 0?function(){}:r,s=e.onSwatchHover,o=e.active,a=ht({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:zQ(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return X.createElement(Hu,{style:a.color,color:t,onClick:i,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},X.createElement("div",{style:a.dot}))},VLe=function(e){var t=e.hex,r=e.rgb,i=e.onChange,s=ht({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(l,A){l.r||l.g||l.b?i({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},A):i({hex:l.hex,source:"hex"},A)};return X.createElement("div",{style:s.fields,className:"flexbox-fix"},X.createElement("div",{style:s.active}),X.createElement(Nt,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"hex",value:t,onChange:o}),X.createElement(Nt,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:r.r,onChange:o}),X.createElement(Nt,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:r.g,onChange:o}),X.createElement(Nt,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:r.b,onChange:o}))},eR=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.colors,s=e.hex,o=e.rgb,a=e.styles,l=a===void 0?{}:a,A=e.className,c=A===void 0?"":A,u=ht(Oi({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),h=function(p,f){p.hex?Bc(p.hex)&&t({hex:p.hex,source:"hex"},f):t(p,f)};return X.createElement(N0,{style:u.Compact,styles:l},X.createElement("div",{style:u.compact,className:"compact-picker "+c},X.createElement("div",null,zu(i,function(d){return X.createElement(LLe,{key:d,color:d,active:d.toLowerCase()===s,onClick:h,onSwatchHover:r})}),X.createElement("div",{style:u.clear})),X.createElement(VLe,{hex:s,rgb:o,onChange:h})))};eR.propTypes={colors:Oe.arrayOf(Oe.string),styles:Oe.object};eR.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Wi(eR);var PLe=function(e){var t=e.hover,r=e.color,i=e.onClick,s=e.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=ht({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:t});return X.createElement("div",{style:a.swatch},X.createElement(Hu,{color:r,onClick:i,onHover:s,focusStyle:o}))};const OLe=LQ(PLe);var tR=function(e){var t=e.width,r=e.colors,i=e.onChange,s=e.onSwatchHover,o=e.triangle,a=e.styles,l=a===void 0?{}:a,A=e.className,c=A===void 0?"":A,u=ht(Oi({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":o==="hide","top-left-triangle":o==="top-left","top-right-triangle":o==="top-right","bottom-left-triangle":o==="bottom-left","bottom-right-triangle":o==="bottom-right"}),h=function(p,f){return i({hex:p,source:"hex"},f)};return X.createElement("div",{style:u.card,className:"github-picker "+c},X.createElement("div",{style:u.triangleShadow}),X.createElement("div",{style:u.triangle}),zu(r,function(d){return X.createElement(OLe,{color:d,key:d,onClick:h,onSwatchHover:s})}))};tR.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),colors:Oe.arrayOf(Oe.string),triangle:Oe.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:Oe.object};tR.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Wi(tR);var WLe=function(e){var t=e.direction,r=ht({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return X.createElement("div",{style:r.picker})},ZLe=Object.assign||function(n){for(var e=1;e.5});return X.createElement("div",{style:r.picker})},zLe=function(){var e=ht({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return X.createElement("div",{style:e.pointer},X.createElement("div",{style:e.left},X.createElement("div",{style:e.leftInside})),X.createElement("div",{style:e.right},X.createElement("div",{style:e.rightInside})))},IV=function(e){var t=e.onClick,r=e.label,i=e.children,s=e.active,o=ht({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:s});return X.createElement("div",{style:o.button,onClick:t},r||i)},YLe=function(e){var t=e.rgb,r=e.currentColor,i=ht({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return X.createElement("div",null,X.createElement("div",{style:i.label},"new"),X.createElement("div",{style:i.swatches},X.createElement("div",{style:i.new}),X.createElement("div",{style:i.current})),X.createElement("div",{style:i.label},"current"))},XLe=function(){function n(e,t){for(var r=0;r100&&(c.a=100),c.a/=100,t({h:i.h,s:i.s,l:i.l,a:c.a,source:"rgb"},u))};return X.createElement("div",{style:a.fields,className:"flexbox-fix"},X.createElement("div",{style:a.double},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"hex",value:s.replace("#",""),onChange:l})),X.createElement("div",{style:a.single},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),X.createElement("div",{style:a.single},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),X.createElement("div",{style:a.single},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),X.createElement("div",{style:a.alpha},X.createElement(Nt,{style:{input:a.input,label:a.label},label:"a",value:Math.round(r.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},eVe=Object.assign||function(n){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}var Ny=24,aVe=vz.default=function(n){var e=n.fill,t=e===void 0?"currentColor":e,r=n.width,i=r===void 0?Ny:r,s=n.height,o=s===void 0?Ny:s,a=n.style,l=a===void 0?{}:a,A=oVe(n,["fill","width","height","style"]);return _V.default.createElement("svg",FV({viewBox:"0 0 "+Ny+" "+Ny,style:FV({fill:t,width:i,height:o},l)},A),_V.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},lVe=function(e){var t=e.color,r=e.onClick,i=r===void 0?function(){}:r,s=e.onSwatchHover,o=e.first,a=e.last,l=e.active,A=ht({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:zQ(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:o,last:a,active:l,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return X.createElement(Hu,{color:t,style:A.color,onClick:i,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},X.createElement("div",{style:A.check},X.createElement(aVe,null)))},AVe=function(e){var t=e.onClick,r=e.onSwatchHover,i=e.group,s=e.active,o=ht({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return X.createElement("div",{style:o.group},zu(i,function(a,l){return X.createElement(lVe,{key:a,color:a,active:a.toLowerCase()===s,first:l===0,last:l===i.length-1,onClick:t,onSwatchHover:r})}))},oR=function(e){var t=e.width,r=e.height,i=e.onChange,s=e.onSwatchHover,o=e.colors,a=e.hex,l=e.styles,A=l===void 0?{}:l,c=e.className,u=c===void 0?"":c,h=ht(Oi({default:{picker:{width:t,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},A)),d=function(f,m){return i({hex:f,source:"hex"},m)};return X.createElement("div",{style:h.picker,className:"swatches-picker "+u},X.createElement(N0,null,X.createElement("div",{style:h.overflow},X.createElement("div",{style:h.body},zu(o,function(p){return X.createElement(AVe,{key:p.toString(),group:p,active:a,onClick:d,onSwatchHover:s})}),X.createElement("div",{style:h.clear})))))};oR.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),height:Oe.oneOfType([Oe.string,Oe.number]),colors:Oe.arrayOf(Oe.arrayOf(Oe.string)),styles:Oe.object};oR.defaultProps={width:320,height:240,colors:[[Od[900],Od[700],Od[500],Od[300],Od[100]],[Wd[900],Wd[700],Wd[500],Wd[300],Wd[100]],[Zd[900],Zd[700],Zd[500],Zd[300],Zd[100]],[Gd[900],Gd[700],Gd[500],Gd[300],Gd[100]],[Jd[900],Jd[700],Jd[500],Jd[300],Jd[100]],[Hd[900],Hd[700],Hd[500],Hd[300],Hd[100]],[zd[900],zd[700],zd[500],zd[300],zd[100]],[Yd[900],Yd[700],Yd[500],Yd[300],Yd[100]],[Xd[900],Xd[700],Xd[500],Xd[300],Xd[100]],["#194D33",Sg[700],Sg[500],Sg[300],Sg[100]],[jd[900],jd[700],jd[500],jd[300],jd[100]],[Kd[900],Kd[700],Kd[500],Kd[300],Kd[100]],[$d[900],$d[700],$d[500],$d[300],$d[100]],[qd[900],qd[700],qd[500],qd[300],qd[100]],[eh[900],eh[700],eh[500],eh[300],eh[100]],[th[900],th[700],th[500],th[300],th[100]],[nh[900],nh[700],nh[500],nh[300],nh[100]],[rh[900],rh[700],rh[500],rh[300],rh[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Wi(oR);var aR=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.hex,s=e.colors,o=e.width,a=e.triangle,l=e.styles,A=l===void 0?{}:l,c=e.className,u=c===void 0?"":c,h=ht(Oi({default:{card:{width:o,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},A),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right"}),d=function(f,m){Bc(f)&&t({hex:f,source:"hex"},m)};return X.createElement("div",{style:h.card,className:"twitter-picker "+u},X.createElement("div",{style:h.triangleShadow}),X.createElement("div",{style:h.triangle}),X.createElement("div",{style:h.body},zu(s,function(p,f){return X.createElement(Hu,{key:f,color:p,hex:p,style:h.swatch,onClick:d,onHover:r,focusStyle:{boxShadow:"0 0 4px "+p}})}),X.createElement("div",{style:h.hash},"#"),X.createElement(Nt,{label:null,style:{input:h.input},value:i.replace("#",""),onChange:d}),X.createElement("div",{style:h.clear})))};aR.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),triangle:Oe.oneOf(["hide","top-left","top-right"]),colors:Oe.arrayOf(Oe.string),styles:Oe.object};aR.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Wi(aR);var lR=function(e){var t=ht({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return X.createElement("div",{style:t.picker})};lR.propTypes={hsl:Oe.shape({h:Oe.number,s:Oe.number,l:Oe.number,a:Oe.number})};lR.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var AR=function(e){var t=ht({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return X.createElement("div",{style:t.picker})};AR.propTypes={hsl:Oe.shape({h:Oe.number,s:Oe.number,l:Oe.number,a:Oe.number})};AR.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var cVe=function(e){var t=e.onChange,r=e.rgb,i=e.hsl,s=e.hex,o=e.hsv,a=function(d,p){if(d.hex)Bc(d.hex)&&t({hex:d.hex,source:"hex"},p);else if(d.rgb){var f=d.rgb.split(",");HI(d.rgb,"rgb")&&t({r:f[0],g:f[1],b:f[2],a:1,source:"rgb"},p)}else if(d.hsv){var m=d.hsv.split(",");HI(d.hsv,"hsv")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),m[1]==1?m[1]=.01:m[2]==1&&(m[2]=.01),t({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsv"},p))}else if(d.hsl){var g=d.hsl.split(",");HI(d.hsl,"hsl")&&(g[2]=g[2].replace("%",""),g[1]=g[1].replace("%",""),g[0]=g[0].replace("°",""),u[1]==1?u[1]=.01:u[2]==1&&(u[2]=.01),t({h:Number(g[0]),s:Number(g[1]),v:Number(g[2]),source:"hsl"},p))}},l=ht({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),A=r.r+", "+r.g+", "+r.b,c=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",u=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.v*100)+"%";return X.createElement("div",{style:l.wrap,className:"flexbox-fix"},X.createElement("div",{style:l.fields},X.createElement("div",{style:l.double},X.createElement(Nt,{style:{input:l.input,label:l.label},label:"hex",value:s,onChange:a})),X.createElement("div",{style:l.column},X.createElement("div",{style:l.single},X.createElement(Nt,{style:{input:l.input2,label:l.label2},label:"rgb",value:A,onChange:a})),X.createElement("div",{style:l.single},X.createElement(Nt,{style:{input:l.input2,label:l.label2},label:"hsv",value:u,onChange:a})),X.createElement("div",{style:l.single},X.createElement(Nt,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:a})))))},cR=function(e){var t=e.width,r=e.onChange,i=e.rgb,s=e.hsl,o=e.hsv,a=e.hex,l=e.header,A=e.styles,c=A===void 0?{}:A,u=e.className,h=u===void 0?"":u,d=ht(Oi({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+i.r+", "+i.g+", "+i.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return X.createElement("div",{style:d.picker,className:"google-picker "+h},X.createElement("div",{style:d.head},l),X.createElement("div",{style:d.swatch}),X.createElement("div",{style:d.saturation},X.createElement(Wb,{hsl:s,hsv:o,pointer:lR,onChange:r})),X.createElement("div",{style:d.body},X.createElement("div",{style:d.controls,className:"flexbox-fix"},X.createElement("div",{style:d.hue},X.createElement(Ap,{style:d.Hue,hsl:s,radius:"4px",pointer:AR,onChange:r}))),X.createElement(cVe,{rgb:i,hsl:s,hex:a,hsv:o,onChange:r})))};cR.propTypes={width:Oe.oneOfType([Oe.string,Oe.number]),styles:Oe.object,header:Oe.string};cR.defaultProps={width:652,styles:{},header:"Color picker"};Wi(cR);const uVe="_InformationContainerPos_1yd4c_2",dVe="_scrollContainer_1yd4c_15",YI={InformationContainerPos:uVe,scrollContainer:dVe,"options-container":"_options-container_1yd4c_24"},hVe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAABE5AAAROQEb2ZNGAAAGiGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDEgNzkuMTQ2Mjg5OSwgMjAyMy8wNi8yNS0yMDowMTo1NSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8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er_1m76y_15",yVe="_centerAlign_1m76y_25",wVe="_traitInfoTitle_1m76y_28",BVe="_dropdownFlex_1m76y_38",CVe="_checkboxFlex_1m76y_44",bVe="_simpleFlex_1m76y_49",xVe="_traitInfoText_1m76y_55",IVe="_dropdownBase_1m76y_64",FVe="_dropdownControl_1m76y_74",_Ve="_dropdownControlSmall_1m76y_80",EVe="_flexSelect_1m76y_106",SVe="_checked_1m76y_163",UVe="_checkmark_1m76y_167",QVe="_checkboxHolder_1m76y_180",RVe="_actionButton_1m76y_189",MVe="_tabHolder_1m76y_209",TVe="_tabButton_1m76y_215",NVe="_tabButtonSelected_1m76y_235",Ge={InformationContainerPos:mVe,scrollContainer:vVe,centerAlign:yVe,traitInfoTitle:wVe,dropdownFlex:BVe,checkboxFlex:CVe,simpleFlex:bVe,traitInfoText:xVe,dropdownBase:IVe,dropdownControl:FVe,dropdownControlSmall:_Ve,"input-box":"_input-box_1m76y_87",flexSelect:EVe,"arrow-button":"_arrow-button_1m76y_114","left-button":"_left-button_1m76y_130","right-button":"_right-button_1m76y_137","anim-button":"_anim-button_1m76y_144","custom-checkbox":"_custom-checkbox_1m76y_149","checkbox-container":"_checkbox-container_1m76y_154",checked:SVe,checkmark:UVe,checkboxHolder:QVe,actionButton:RVe,tabHolder:MVe,tabButton:TVe,tabButtonSelected:NVe};function kVe({selectedTrait:n,selectedVRM:e}){const{animationManager:t,characterManager:r}=Ce.useContext(lr),[i,s]=Ce.useState(0),[o,a]=Ce.useState(0),[l,A]=Ce.useState(0);Ce.useEffect(()=>{var p,f,m;e!=null&&(A((p=e.data)==null?void 0:p.cullingLayer),s(((f=e.data)==null?void 0:f.cullingDistance[0])||0),a(((m=e.data)==null?void 0:m.cullingDistance[1])||0))},[e]);const c=p=>{s(p.target.value),e!=null&&e.data&&(e.data.cullingDistance[0]=p.target.value)},u=p=>{a(p.target.value),e!=null&&e.data&&(e.data.cullingDistance[1]=p.target.value)},h=p=>{e!=null&&e.data&&(A(p.target.value),e.data.cullingLayer=p.target.value)},d=()=>{r.updateCullHiddenMeshes()};return L.jsx("div",{children:L.jsxs("div",{className:Ge.InformationContainerPos,children:[L.jsx(ka,{title:"Trait Information",width:180,right:20}),L.jsx("div",{className:Ge.scrollContainer,children:n!=null?L.jsxs(L.Fragment,{children:[L.jsx("div",{className:Ge.traitInfoTitle,children:"Trait ID"}),L.jsx("div",{className:Ge.traitInfoText,children:n==null?void 0:n.id}),L.jsx("div",{className:Ge.traitInfoTitle,children:"Trait Name"}),L.jsx("div",{className:Ge.traitInfoText,children:n==null?void 0:n.name}),L.jsx("div",{className:Ge.traitInfoTitle,children:"Description"}),L.jsx("div",{className:Ge.traitInfoText,children:(n==null?void 0:n.description)||"A nice "+(n==null?void 0:n.name)}),L.jsx("div",{className:Ge.traitInfoTitle,children:"Culling Options"}),L.jsx("br",{}),L.jsxs("div",{className:Ge.traitInfoText,children:["Culling Layer",L.jsx("input",{type:"number",min:"0",max:"100",value:l,onChange:h,className:Ge["input-box"],step:1}),L.jsx("br",{}),L.jsx("br",{}),L.jsx(Uh,{title:"Out Distance",value:i,onChange:c,min:0,max:1,step:.001,stepBox:.01}),L.jsx("br",{}),L.jsx(Uh,{title:"In Distance",value:o,onChange:u,min:0,max:1,step:.001,stepBox:.01}),L.jsx("div",{className:Ge.actionButton,onClick:d,children:L.jsx("div",{children:"Update Culling "})})]})]}):L.jsx(L.Fragment,{children:L.jsx("div",{className:Ge.traitInfoTitle,children:"No Trait Selected"})})})]})})}var yz={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=s(Ce),t=r(fH);function r(b){return b&&b.__esModule?b:{default:b}}function i(){if(typeof WeakMap!="function")return null;var b=new WeakMap;return i=function(){return b},b}function s(b){if(b&&b.__esModule)return b;if(b===null||o(b)!=="object"&&typeof b!="function")return{default:b};var F=i();if(F&&F.has(b))return F.get(b);var x={},E=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in b)if(Object.prototype.hasOwnProperty.call(b,M)){var H=E?Object.getOwnPropertyDescriptor(b,M):null;H&&(H.get||H.set)?Object.defineProperty(x,M,H):x[M]=b[M]}return x.default=b,F&&F.set(b,x),x}function o(b){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(x){return typeof x}:o=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},o(b)}function a(){return a=Object.assign||function(b){for(var F=1;F"u"?w:x.placeholder,value:""},isOpen:!1},E.dropdownRef=(0,e.createRef)(),E.mounted=!0,E.handleDocumentClick=E.handleDocumentClick.bind(m(E)),E.fireChangeEvent=E.fireChangeEvent.bind(m(E)),E}return d(F,[{key:"componentDidUpdate",value:function(E){if(this.props.value!==E.value)if(this.props.value){var M=this.parseValue(this.props.value,this.props.options);M!==this.state.selected&&this.setState({selected:M})}else this.setState({selected:{label:typeof this.props.placeholder>"u"?w:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function(E){this.props.onFocus&&typeof this.props.onFocus=="function"&&this.props.onFocus(this.state.isOpen),!(E.type==="mousedown"&&E.button!==0)&&(E.stopPropagation(),E.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function(E,M){var H;if(typeof E=="string")for(var O=0,U=M.length;O"u"&&(H=E.label||E);var O=E.label||E.value||E,U=H===this.state.selected.value||H===this.state.selected,y=(M={},c(M,"".concat(this.props.baseClassName,"-option"),!0),c(M,E.className,!!E.className),c(M,"is-selected",U),M),I=(0,t.default)(y),R=Object.keys(E.data||{}).reduce(function(D,k){return A({},D,c({},"data-".concat(k),E.data[k]))},{});return e.default.createElement("div",a({key:H,className:I,onMouseDown:this.setValue.bind(this,H,O),onClick:this.setValue.bind(this,H,O),role:"option","aria-selected":U?"true":"false"},R),O)}},{key:"buildMenu",value:function(){var E=this,M=this.props,H=M.options,O=M.baseClassName,U=H.map(function(y){if(y.type==="group"){var I=e.default.createElement("div",{className:"".concat(O,"-title")},y.name),R=y.items.map(function(D){return E.renderOption(D)});return e.default.createElement("div",{className:"".concat(O,"-group"),key:y.name,role:"listbox",tabIndex:"-1"},I,R)}else return E.renderOption(y)});return U.length?U:e.default.createElement("div",{className:"".concat(O,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function(E){this.mounted&&(this.dropdownRef.current.contains(E.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function(){return typeof this.state.selected=="string"||this.state.selected.value!==""}},{key:"render",value:function(){var E,M,H,O,U,y=this.props,I=y.baseClassName,R=y.controlClassName,D=y.placeholderClassName,k=y.menuClassName,V=y.arrowClassName,Z=y.arrowClosed,N=y.arrowOpen,_=y.className,z=this.props.disabled?"Dropdown-disabled":"",ie=typeof this.state.selected=="string"?this.state.selected:this.state.selected.label,T=(0,t.default)((E={},c(E,"".concat(I,"-root"),!0),c(E,_,!!_),c(E,"is-open",this.state.isOpen),E)),q=(0,t.default)((M={},c(M,"".concat(I,"-control"),!0),c(M,R,!!R),c(M,z,!!z),M)),ge=(0,t.default)((H={},c(H,"".concat(I,"-placeholder"),!0),c(H,D,!!D),c(H,"is-selected",this.isValueSelected()),H)),he=(0,t.default)((O={},c(O,"".concat(I,"-menu"),!0),c(O,k,!!k),O)),Ae=(0,t.default)((U={},c(U,"".concat(I,"-arrow"),!0),c(U,V,!!V),U)),$=e.default.createElement("div",{className:ge},ie),ce=this.state.isOpen?e.default.createElement("div",{className:he,"aria-expanded":"true"},this.buildMenu()):null;return e.default.createElement("div",{ref:this.dropdownRef,className:T},e.default.createElement("div",{className:q,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},$,e.default.createElement("div",{className:"".concat(I,"-arrow-wrapper")},N&&Z?this.state.isOpen?N:Z:e.default.createElement("span",{className:Ae}))),ce)}}]),F}(e.Component);B.defaultProps={baseClassName:"Dropdown"};var C=B;n.default=C})(yz);const BA=Zl(yz);function DVe({selectedTrait:n,selectedVRM:e}){const{manifest:t,loraDataGenerator:r,sceneElements:i}=X.useContext(lr),[s,o]=Ce.useState([]),[a,l]=Ce.useState(null),A=u=>{(t==null?void 0:t.loras)!=null&&(l(t.loras[u.value]),console.log(t.loras[u.value]))},c=async()=>{const u=i.parent;u.remove(i),await r.createLoraData(a),u.add(i)};return Ce.useEffect(()=>{if((t==null?void 0:t.loras)!=null){const u=t.loras.map((h,d)=>({value:d,label:h.name,description:h.description,manifest:h.manifest}));o(u)}},[t]),L.jsx("div",{children:L.jsxs("div",{className:Ge.InformationContainerPos,children:[L.jsx(ka,{title:"Lora Creation",width:180,right:20}),L.jsxs("div",{className:Ge.scrollContainer,children:[L.jsx("div",{className:Ge.traitInfoTitle,children:"Lora Manifests"}),L.jsx(BA,{className:Ge.dropdownControl,options:s,onChange:A,placeholder:"Select an option"}),";",L.jsx("div",{className:Ge.traitInfoText,children:(a==null?void 0:a.description)||""}),a!=null&&L.jsx("div",{className:Ge.actionButton,onClick:c,children:L.jsx("div",{children:" Create Lora Data "})})]})]})})}function LVe({selectedTrait:n,selectedVRM:e}){const{manifest:t,spriteAtlasGenerator:r,sceneElements:i}=X.useContext(lr),[s,o]=Ce.useState([]),[a,l]=Ce.useState(""),[A,c]=Ce.useState(null),u=d=>{(t==null?void 0:t.sprites)!=null&&(l(t.sprites[d.value].description),c(t.sprites[d.value]))},h=async()=>{const d=i.parent;d.remove(i),await r.createSpriteAtlas(A),d.add(i)};return Ce.useEffect(()=>{if((t==null?void 0:t.sprites)!=null){const d=t.sprites.map((p,f)=>({value:f,label:p.name,description:p.description,manifest:p.manifest}));o(d)}},[t]),L.jsx("div",{children:L.jsxs("div",{className:Ge.InformationContainerPos,children:[L.jsx(ka,{title:"Sprite Creation",width:180,right:20}),L.jsxs("div",{className:Ge.scrollContainer,children:[L.jsx("div",{className:Ge.traitInfoTitle,children:"Sprite Manifests"}),L.jsx(BA,{className:Ge.dropdownControl,options:s,onChange:u,placeholder:"Select an option"}),";",L.jsx("div",{className:Ge.traitInfoText,children:a||""}),A!=null&&L.jsx("div",{className:Ge.actionButton,onClick:h,children:L.jsx("div",{children:" Create Sprite Data "})})]})]})})}const EV=4096;function VVe({selectedTrait:n,traitGroupName:e}){const{manifest:t,thumbnailsGenerator:r,sceneElements:i,characterManager:s}=X.useContext(lr),[o,a]=Ce.useState([]),[l,A]=Ce.useState(""),[c,u]=Ce.useState(""),[h,d]=Ce.useState(""),[p,f]=Ce.useState(!1),[m,g]=Ce.useState(512),[v,w]=Ce.useState(512),[B,C]=Ce.useState(.1),[b,F]=Ce.useState(.1),[x,E]=Ce.useState("center"),[M,H]=Ce.useState("center"),[O,U]=Ce.useState("center"),[y,I]=Ce.useState("head"),[R,D]=Ce.useState("chest"),[k,V]=Ce.useState(!0),[Z,N]=Ce.useState(!1),_=[{label:"center"},{label:"left"},{label:"right"}],z=[{label:"center"},{label:"top"},{label:"bottom"}],ie=[{label:"center"},{label:"front"},{label:"back"}],T=[{label:"head"},{label:"neck"},{label:"chest"},{label:"spine"},{label:"hips"},{label:"upperLeg"},{label:"lowerLeg"},{label:"foot"}],q=de=>{(t==null?void 0:t.thumbnails)!=null&&(A(t.thumbnails[de.value].description),d(t.thumbnails[de.value].manifest),u(t.thumbnails[de.value].name))},ge=(de,ee,K,se)=>isNaN(de)?se:de>K?K:de{const ee=parseInt(de.target.value);g(ge(ee,1,EV,512))},Ae=de=>{const ee=parseInt(de.target.value);w(ge(ee,1,EV,512))},$=de=>{const ee=parseFloat(de.target.value);C(ge(ee,0,1,.1))},ce=de=>{const ee=parseFloat(de.target.value);F(ge(ee,0,1,.1))},me=de=>{f(de)},_e=async()=>{const de=i.parent;de.remove(i),await r.createThumbnails(t.thumbnails[0]),de.add(i)},P=(de=!0)=>({topFrameOffset:b,bottomFrameOffset:B,thumbnailsWidth:m,thumbnailsHeight:v,backgroundColor:[0,0,0,0],thumbnailsCollection:[{traitGroup:e,cameraPosition:M+"-"+O+"-"+x,topBoneName:y==="upperLeg"||y==="lowerLeg"||y==="foot"?"left"+y[0].toUpperCase()+y.slice(1):y,topBoneMaxVertex:k,bottomBoneName:R==="upperLeg"||R==="lowerLeg"||y==="foot"?"left"+R[0].toUpperCase()+R.slice(1):R,bottomBoneMaxVertex:Z,saveOnlyIDs:de?null:n.id}]}),fe=async(de=!1)=>{s.storeCurrentAvatar();const ee=i.parent;ee.remove(i),de?await r.createThumbnailsWithObjectData(P(),!1,null,e+"_thumbnails"):await r.createThumbnailsWithObjectData(P(!1),!1),ee.add(i),s.loadStoredAvatar()};return Ce.useEffect(()=>{if((t==null?void 0:t.thumbnails)!=null){const de=t.thumbnails.map((ee,K)=>({value:K,label:ee.name,description:ee.description,manifest:ee.manifest}));a(de)}},[t]),L.jsx("div",{children:L.jsxs("div",{className:Ge.InformationContainerPos,children:[L.jsx(ka,{title:"Thumbnail Creation",width:180,right:20}),L.jsxs("div",{className:Ge.scrollContainer,children:[L.jsxs("div",{className:Ge.tabHolder,children:[L.jsx("div",{className:Ge.tabButton+(p?"":" "+Ge.tabButtonSelected),onClick:()=>{me(!1)},children:L.jsxs("div",{children:[" ","Custom"," "]})}),L.jsx("div",{className:Ge.tabButton+(p?" "+Ge.tabButtonSelected:""),onClick:()=>{me(!0)},children:L.jsxs("div",{children:[" ","Manifest"," "]})})]}),L.jsx("br",{}),p?L.jsxs(L.Fragment,{children:[L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,children:"Thumbnail Manifests"}),L.jsx(BA,{className:Ge.dropdownControl,options:o,value:c,onChange:q,placeholder:"Select an option"}),";",L.jsx("div",{className:Ge.traitInfoText,children:l||""}),h!=""&&L.jsx("div",{className:Ge.actionButton,onClick:_e,children:L.jsx("div",{children:" Create Thumbnails "})})]}):L.jsxs(L.Fragment,{children:[L.jsxs("div",{className:Ge.traitInfoText,children:[L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,style:{margin:"10px 0px 10px"},children:"Resolution"}),"Width ",L.jsx("input",{value:m,className:Ge["input-box"],step:1,onChange:de=>{g(de.target.value)},onBlur:he}),L.jsx("br",{}),"Height ",L.jsx("input",{value:v,className:Ge["input-box"],step:1,onChange:de=>{w(de.target.value)},onBlur:Ae}),L.jsx("br",{}),"Top Spacing ",L.jsx("input",{value:B,className:Ge["input-box"],step:.1,onChange:de=>{C(de.target.value)},onBlur:$}),L.jsx("br",{}),"Bottom Spacing ",L.jsx("input",{value:b,className:Ge["input-box"],step:.1,onChange:de=>{F(de.target.value)},onBlur:ce}),L.jsx("br",{}),L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,style:{margin:"20px"},children:"Camera Position"})]}),L.jsxs("div",{className:Ge.dropdownFlex,children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"X"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:_,onChange:de=>{H(de.label)},value:M})]}),L.jsxs("div",{className:Ge.dropdownFlex,children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"Y"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:z,onChange:de=>{U(de.label)},value:O})]}),L.jsxs("div",{className:Ge.dropdownFlex,children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"Z"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:ie,onChange:de=>{E(de.label)},value:x})]}),L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,style:{margin:"30px 0px 30px"},children:"Target Bones"}),L.jsxs("div",{className:Ge.dropdownFlex,style:{justifyContent:"space-between"},children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"Top"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:T,onChange:de=>{I(de.label)},value:y})]}),L.jsxs("div",{className:Ge.dropdownFlex,style:{justifyContent:"space-between"},children:[L.jsx("div",{className:Ge.traitInfoTitle,style:{margin:"0px"},children:"Bottom"}),L.jsx(BA,{className:Ge.dropdownControlSmall,options:T,onChange:de=>{D(de.label)},value:R})]}),L.jsxs("div",{style:{textAlign:"left"},children:[L.jsxs("div",{className:Ge.checkboxFlex,style:{marginTop:"20px"},children:[L.jsx("input",{type:"checkbox",checked:k,onChange:de=>{V(de.target.checked)}}),L.jsx("div",{className:Ge.traitInfoText,style:{margin:"0px",fontSize:"12px"},children:`Top bone ${k?"uses Top":"uses Low"} Vertex`})]}),L.jsxs("div",{className:Ge.checkboxFlex,style:{marginTop:"10px"},children:[L.jsx("input",{type:"checkbox",checked:Z,onChange:de=>{N(de.target.checked)}}),L.jsx("div",{className:Ge.traitInfoText,style:{margin:"0px",fontSize:"12px"},children:`Bottom bone ${Z?"uses Top":"uses Low"} Vertex`})]})]}),e==""?L.jsx("div",{className:Ge.traitInfoText+" "+Ge.centerAlign,style:{marginTop:"40px"},children:"Please choose a trait category in the left side menu."}):L.jsxs(L.Fragment,{children:[L.jsx("div",{className:Ge.traitInfoTitle+" "+Ge.centerAlign,style:{marginTop:"20px"},children:"Generate"}),L.jsx("div",{className:Ge.traitInfoText+" "+Ge.centerAlign,style:{margin:"0px auto 20px"},children:"( "+e+" )"}),L.jsxs("div",{className:Ge.simpleFlex,style:{marginTop:"0px"},children:[L.jsx("div",{className:Ge.actionButton,style:{margin:"0px"},onClick:()=>{fe(!1)},children:L.jsx("div",{children:" Current "})}),L.jsx("div",{className:Ge.actionButton,style:{margin:"0px"},onClick:()=>{fe(!0)},children:L.jsx("div",{children:" All "})})]})]})]})]})]})})}function PVe({selectedTrait:n,selectedVRM:e,traitGroupName:t}){const[r,i]=X.useState(""),s=o=>{o!=r?i(o):i("")};return L.jsxs("div",{children:[r=="Information"&&L.jsx(kVe,{selectedTrait:n,selectedVRM:e}),r=="LoraCreation"&&L.jsx(DVe,{selectedTrait:n,selectedVRM:e}),r=="SpriteCreation"&&L.jsx(LVe,{selectedTrait:n,selectedVRM:e}),r=="ThumbnailCreation"&&L.jsx(VVe,{selectedTrait:n,traitGroupName:t}),L.jsxs("div",{className:YI.InformationContainerPos,children:[L.jsx(ka,{title:"Tools",width:90,right:0}),L.jsx("div",{className:YI.scrollContainer,children:L.jsxs("div",{className:YI.optionsContainer,children:[L.jsx("div",{onClick:()=>{s("Information")},children:L.jsx(DA,{size:56,icon:hVe,rarity:r=="Information"?"mythic":"none"})},"Information"),L.jsx("div",{onClick:()=>{s("LoraCreation")},children:L.jsx(DA,{size:56,icon:pVe,rarity:r=="LoraCreation"?"mythic":"none"})},"LoraCreation"),L.jsx("div",{onClick:()=>{s("SpriteCreation")},children:L.jsx(DA,{size:56,icon:fVe,rarity:r=="SpriteCreation"?"mythic":"none"})},"SpriteCreation"),L.jsx("div",{onClick:()=>{s("ThumbnailCreation")},children:L.jsx(DA,{size:56,icon:gVe,rarity:r=="ThumbnailCreation"?"mythic":"none"})},"ThumbnailCreation")]})})]})]})}function OVe(){const{isLoading:n,setViewMode:e,setIsLoading:t}=X.useContext(Ci),{toggleDebugMode:r,characterManager:i,animationManager:s,moveCamera:o,loraDataGenerator:a,spriteAtlasGenerator:l,thumbnailsGenerator:A,sceneElements:c}=X.useContext(lr),{playSound:u}=X.useContext(bs),{isMute:h}=X.useContext(Bs),{t:d}=Ce.useContext(xs),p=()=>{!h&&u("backNextButton"),i.removeCurrentCharacter(),i.removeCurrentManifest(),e(at.CREATE),r(!1)},[f,m]=X.useState(null),[g,v]=X.useState(null),[w,B]=X.useState(""),[C,b]=X.useState(null),[F,x]=X.useState(null),[E,M]=X.useState(""),[H,O]=X.useState(!1),[U,y]=X.useState({background:"#ffffff"}),I=()=>{!h&&u("backNextButton"),e(at.SAVE),r(!1)},R=()=>{t(!0),m(null),i.loadRandomTraits().then(()=>{console.log("success"),w!=""&&b(i.getCurrentTraitData(w)),t(!1)}).catch(Ae=>{t(!1),console.error("Error loading random traits:",Ae.message)})},D=Ae=>{y({background:Ae.hex})},k=Ae=>{y({background:Ae.hex}),i.setTraitColor(w,Ae.hex)},V=async Ae=>{const $=Sl(Ae.name),ce=URL.createObjectURL(Ae);await s.loadAnimation(ce,!1,0,!0,"",$),M(s.getCurrentAnimationName())},Z=Ae=>{if(O(!1),w!=""){t(!0);const $=URL.createObjectURL(Ae);i.loadCustomTexture(w,$).then(()=>{t(!1)})}else console.warn("Please select a group trait first.")},N=Ae=>{if(O(!1),w!=""){t(!0);const $=URL.createObjectURL(Ae);i.loadCustomTrait(w,$).then(()=>{t(!1)})}else console.warn("Please select a group trait first.")},_=Ae=>{O(!1),t(!0),i.loadTrait(Ae.traitGroup.trait,Ae.id).then(()=>{t(!1),b(Ae)})},z=Ae=>{O(!1),i.removeTrait(Ae),b(null)},ie=Ae=>{O(!1),t(!0),i.loadRandomTrait(Ae).then(()=>{t(!1),b(i.getCurrentTraitData(Ae))})},T=Ae=>{O(!1);const $=Array.from(Ae),ce=[],me=_e=>new Promise((P,fe)=>{var de;if(_e&&_e.name.toLowerCase().endsWith(".json")){const ee=new FileReader,K=`${(de=i.manifestData)==null?void 0:de.getAssetsDirectory()}/anata/_thumbnails/t_${_e.name.split("_")[0]}.jpg`;console.log(K),ee.onload=function(se){try{const ye=JSON.parse(se.target.result);ye.thumb=K,ce.push(ye),P()}catch(ye){console.error("Error parsing the JSON file:",ye),fe(ye)}},ee.readAsText(_e)}});Promise.all($.map(me)).then(()=>{ce.length>0&&(m(ce),t(!0),i.loadTraitsFromNFTObject(ce[0]).then(()=>{t(!1)}))}).catch(_e=>{console.error("Error processing files:",_e)})},q=async Ae=>{const $=Ae[0];$&&$.name.toLowerCase().endsWith(".fbx")&&V($),$&&($.name.toLowerCase().endsWith(".png")||$.name.toLowerCase().endsWith(".jpg"))&&Z($),$&&$.name.toLowerCase().endsWith(".vrm")&&N($),$&&$.name.toLowerCase().endsWith(".json")&&T(Ae)},ge=Ae=>{!h&&u("optionClick"),O(!1),w!==Ae.trait?(v(i.getTraits(Ae.trait)),B(Ae.trait),b(i.getCurrentTraitData(Ae.trait)),x(i.getCurrentTraitVRM(Ae.trait)),o({targetY:Ae.cameraTarget.height,distance:Ae.cameraTarget.distance})):(v(null),B(""),b(null),o({targetY:.8,distance:3.2}))},he=()=>{O(!1);var Ae=document.createElement("input");Ae.type="file",Ae.accept=".vrm",Ae.onchange=$=>{var ce=$.target.files[0];if(ce.name.endsWith(".vrm")){const me=URL.createObjectURL(ce);t(!0),i.loadCustomTrait(w,me).then(()=>{t(!1)})}},Ae.click()};return L.jsxs("div",{className:Tn.container,children:[L.jsx("div",{className:`loadingIndicator ${n?"active":""}`,children:L.jsx("img",{className:"rotate",src:"ui/loading.svg"})}),L.jsx("div",{className:"sectionTitle",children:d("pageTitles.chooseAppearance")}),L.jsx(I0,{onFilesDrop:q}),L.jsxs("div",{className:Tn.sideMenu,children:[L.jsx(ka,{title:"Appearance",left:20}),L.jsx("div",{className:Tn.bottomLine}),L.jsx("div",{className:Tn.scrollContainer,children:L.jsx("div",{className:Tn["editor-container"],children:i.getGroupTraits().map((Ae,$)=>L.jsxs("div",{className:Tn.editorButton,onClick:()=>{ge(Ae)},children:[L.jsx(DA,{size:56,icon:Ae.fullIconSvg,rarity:w!==Ae.trait?"none":"mythic"}),L.jsx("div",{className:Tn.editorText,children:Ae.name})]},"options_"+$))})})]}),!!g&&L.jsxs("div",{className:Tn.selectorContainerPos,children:[L.jsx(ka,{title:w,width:130,left:20}),C&&L.jsx("div",{className:Tn.selectorColorPickerButton,onClick:()=>{O(!H)},children:L.jsx("img",{className:Tn.selectorColorPickerImg,src:wCe})}),!!H&&L.jsx("div",{draggable:!1,className:Tn.selectorColorPickerUI,children:L.jsx(DLe,{draggable:!1,width:"200px",color:U.background,onChange:D,onChangeComplete:k})}),L.jsx("div",{className:Tn.bottomLine}),L.jsx("div",{className:Tn.scrollContainerOptions,children:L.jsxs("div",{className:Tn["selector-container"],children:[L.jsx("div",{className:`${Tn.selectorButton}`,onClick:()=>{ie(w)},children:L.jsx(DA,{size:56,icon:yCe,rarity:"none"})},"randomize-trait"),i.isTraitGroupRequired(w)?L.jsx(L.Fragment,{}):L.jsx("div",{className:`${Tn.selectorButton}`,icon:H3,onClick:()=>{z(w)},children:L.jsx(DA,{size:56,icon:H3,rarity:C==null?"mythic":"none"})},"no-trait"),g.map(Ae=>{let $=Ae.id===(C==null?void 0:C.id);return L.jsx("div",{className:`${Tn.selectorButton}`,onClick:()=>{_(Ae)},children:L.jsx(DA,{size:56,icon:Ae.fullThumbnail,rarity:$?"mythic":"none"})},Ae.id)})]})}),L.jsx("div",{className:Tn.uploadContainer,children:L.jsx("div",{className:Tn.uploadButton,onClick:he,children:L.jsx("div",{children:"Upload "})})})]}),L.jsx(yQ,{jsonSelectionArray:f}),L.jsx(PVe,{selectedTrait:C,selectedVRM:F,traitGroupName:w}),L.jsx(Eb,{loadedAnimationName:E,randomize:R}),L.jsxs("div",{className:Tn.buttonContainer,children:[L.jsx(sn,{theme:"light",text:d("callToAction.back"),size:14,className:Tn.buttonLeft,onClick:p}),i.canDownload()&&L.jsx(sn,{theme:"light",text:d("callToAction.next"),size:14,className:Tn.buttonRight,onClick:I})]})]})}const WVe="_InformationContainerPos_rgqwy_1",ZVe="_traitInfoTitle_rgqwy_13",GVe="_traitInfoText_rgqwy_21",JVe="_flexSelect_rgqwy_30",HVe="_scrollContainer_rgqwy_65",zVe="_checked_rgqwy_90",YVe="_checkmark_rgqwy_94",XVe="_checkboxHolder_rgqwy_107",jVe="_buttonContainer_rgqwy_114",KVe="_buttonLeft_rgqwy_123",$Ve="_buttonRight_rgqwy_127",qVe="_buttonCenter_rgqwy_131",gi={InformationContainerPos:WVe,traitInfoTitle:ZVe,traitInfoText:GVe,flexSelect:JVe,"arrow-button":"_arrow-button_rgqwy_37","left-button":"_left-button_rgqwy_51","right-button":"_right-button_rgqwy_58",scrollContainer:HVe,"custom-checkbox":"_custom-checkbox_rgqwy_76","checkbox-container":"_checkbox-container_rgqwy_81",checked:zVe,checkmark:YVe,checkboxHolder:XVe,buttonContainer:jVe,buttonLeft:KVe,buttonRight:$Ve,buttonCenter:qVe},ePe="_InformationContainerPos_11mqa_2",tPe="_scrollContainer_11mqa_16",nPe="_traitInfoTitle_11mqa_28",rPe="_traitInfoText_11mqa_38",iPe="_flexSelect_11mqa_66",sPe="_checked_11mqa_124",oPe="_checkmark_11mqa_128",aPe="_checkboxHolder_11mqa_141",Zn={InformationContainerPos:ePe,scrollContainer:tPe,traitInfoTitle:nPe,traitInfoText:rPe,"input-box":"_input-box_11mqa_47",flexSelect:iPe,"arrow-button":"_arrow-button_11mqa_76","left-button":"_left-button_11mqa_91","right-button":"_right-button_11mqa_98","anim-button":"_anim-button_11mqa_105","custom-checkbox":"_custom-checkbox_11mqa_110","checkbox-container":"_checkbox-container_11mqa_115",checked:sPe,checkmark:oPe,checkboxHolder:aPe};function uR({model:n,name:e,files:t,index:r,nextVrm:i,previousVrm:s}){const{characterManager:o}=X.useContext(lr),[a,l]=Ce.useState(0),[A,c]=Ce.useState(0),[u,h]=Ce.useState(0),[d,p]=Ce.useState(0),[f,m]=Ce.useState(0),[g,v]=Ce.useState(0),[w,B]=Ce.useState(0),[C,b]=Ce.useState(0),[F,x]=Ce.useState(0),[E,M]=Ce.useState(0);return Ce.useEffect(()=>{if(n!=null){const H=Ef(n,"Mesh"),O=Ef(n,"SkinnedMesh");l(H.length),c(O.length);const U=H.concat(O),{stdMats:y,stdCutoutpMats:I,stdTranspMats:R,mToonMats:D,mToonCutoutMats:k,mToonTranspMats:V}=dfe(U);h(y.length),p(R.length),m(I.length),v(D.length),B(V.length),b(k.length);const{triangles:Z,bones:N}=o.getBoneTriangleCount();x(Z),M(N)}},[n]),n!=null?L.jsx("div",{children:L.jsxs("div",{className:Zn.InformationContainerPos,children:[L.jsx(ka,{title:"Model Information",width:180,right:20}),L.jsxs("div",{className:Zn.scrollContainer,children:[L.jsxs("div",{className:Zn.flexSelect,children:[(t==null?void 0:t.length)>1?L.jsx("div",{className:`${Zn["arrow-button"]} ${Zn["left-button"]}`,onClick:s}):L.jsx(L.Fragment,{}),e&&L.jsx("div",{style:{textAlign:"center"},children:L.jsx("div",{className:Zn.traitInfoTitle,style:{margin:"auto",fontSize:"14px",width:"200px",textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:e})}),(t==null?void 0:t.length)>1?L.jsx("div",{className:`${Zn["arrow-button"]} ${Zn["right-button"]}`,onClick:i}):L.jsx(L.Fragment,{})]}),L.jsx("div",{className:Zn.traitInfoTitle,children:"Geometry info:"}),L.jsxs("div",{className:Zn.traitInfoText,children:["Meshes: ",a]}),L.jsxs("div",{className:Zn.traitInfoText,children:["SkinnedMeshes: ",A]}),L.jsxs("div",{className:Zn.traitInfoText,children:["Triangles: ",F]}),L.jsxs("div",{className:Zn.traitInfoText,children:["Bones: ",E]}),L.jsx("div",{className:Zn.traitInfoTitle,children:"Standard Material Count:"}),L.jsxs("div",{className:Zn.traitInfoText,children:["opaque: ",u]}),L.jsxs("div",{className:Zn.traitInfoText,children:["cutout: ",f]}),L.jsxs("div",{className:Zn.traitInfoText,children:["transparent: ",d]}),L.jsx("div",{className:Zn.traitInfoTitle,children:"MToon Material Count:"}),L.jsxs("div",{className:Zn.traitInfoText,children:["opaque: ",g]}),L.jsxs("div",{className:Zn.traitInfoText,children:["cutout: ",C]}),L.jsxs("div",{className:Zn.traitInfoText,children:["transparent: ",w]})]})]})}):L.jsx(L.Fragment,{})}function lPe(){const{isLoading:n,setViewMode:e,setIsLoading:t}=X.useContext(Ci),{manifest:r,toggleDebugMode:i,characterManager:s,animationManager:o,loraDataGenerator:a,spriteAtlasGenerator:l,sceneElements:A}=X.useContext(lr),[c,u]=Ce.useState(null),[h,d]=Ce.useState(""),[p,f]=X.useState(""),{playSound:m}=X.useContext(bs),{isMute:g}=X.useContext(Bs),[v,w]=X.useState(null),B=()=>{!g&&m("backNextButton"),s.removeCurrentCharacter(),s.removeCurrentManifest(),i(!1),e(at.LANDING)},C=()=>{const U=De.mergeOptions_sel_option||0;return{isVrm0:!0,createTextureAtlas:!0,mToonAtlasSize:Cn(De.mergeOptions_atlas_mtoon_size||6),mToonAtlasSizeTransp:Cn(De.mergeOptions_atlas_mtoon_transp_size||6),stdAtlasSize:Cn(De.mergeOptions_atlas_std_size||6),stdAtlasSizeTransp:Cn(De.mergeOptions_atlas_std_transp_size||6),exportStdAtlas:U===0||U==2,exportMtoonAtlas:U===1||U==2,ktxCompression:De.merge_options_ktx_compression||!1,twoSidedMaterial:De.mergeOptions_two_sided_mat||!1}},b=(U,y=!1)=>{console.log(y),(async()=>{await s.loadTraitsFromNFTObject(v[U]),(De.mergeOptions_download_vrm==null?!0:De.mergeOptions_download_vrm)&&await s.downloadVRM(v[U].name,C());const D=new qf,k=A.parent;k.remove(A);const V=De.mergeOptions_download_lora==null?!0:De.mergeOptions_download_lora;if(V===!0){const N=r.loras.map(async _=>a.createLoraData(_,D));await Promise.all(N)}const Z=De.mergeOptions_download_sprites==null?!0:De.mergeOptions_download_sprites;if(Z===!0){const N=r.sprites.map(async _=>l.createSpriteAtlas(_,D));await Promise.all(N)}(V===!0||Z===!0)&&D.saveZip(v[U].name),k.add(A),U{t(!0),b(0,!0)},{t:x}=Ce.useContext(xs),E=async U=>{if(s.getCurrentCharacterModel()){const I=Sl(U.name),R=URL.createObjectURL(U);await o.loadAnimation(R,!1,0,!0,"",I),f(o.getCurrentAnimationName()),URL.revokeObjectURL(R)}else console.warn("Please load a vrm model to test animations.")},M=async U=>{const y=URL.createObjectURL(U);await s.loadOptimizerCharacter(y),URL.revokeObjectURL(y);const I=Sl(U.name);d(I),u(s.getCurrentCharacterModel())},H=U=>{const y=Array.from(U),I=[],R=D=>new Promise((k,V)=>{var Z;if(D&&D.name.toLowerCase().endsWith(".json")){const N=new FileReader,_=`${(Z=s.manifestData)==null?void 0:Z.getAssetsDirectory()}/anata/_thumbnails/t_${D.name.split("_")[0]}.jpg`;N.onload=function(z){try{const ie=JSON.parse(z.target.result);ie.thumb=_,I.push(ie),k()}catch(ie){console.error("Error parsing the JSON file:",ie),V(ie)}},N.readAsText(D)}});Promise.all(y.map(R)).then(()=>{I.length>0&&(w(I),t(!0),s.loadTraitsFromNFTObject(I[0]).then(()=>{t(!1)}))}).catch(D=>{console.error("Error processing files:",D)})},O=async U=>{const y=U[0];console.log("anim"),y&&y.name.toLowerCase().endsWith(".fbx")&&(console.log("anim2"),E(y)),y&&y.name.toLowerCase().endsWith(".vrm")&&M(y),y&&y.name.toLowerCase().endsWith(".json")&&H(U)};return L.jsxs("div",{className:gi.container,children:[L.jsx("div",{className:`loadingIndicator ${n?"active":""}`,children:L.jsx("img",{className:"rotate",src:"ui/loading.svg"})}),L.jsx("div",{className:"sectionTitle",children:"Batch Download"}),L.jsx(I0,{onFilesDrop:O}),L.jsx(xb,{showDropToDownload:!0,showCreateAtlas:!1,mergeMenuTitle:"Download Options"}),L.jsx(uR,{model:c}),L.jsx(yQ,{jsonSelectionArray:v}),L.jsx(Eb,{loadedAnimationName:p}),L.jsxs("div",{className:gi.buttonContainer,children:[L.jsx(sn,{theme:"light",text:x("callToAction.back"),size:14,className:gi.buttonLeft,onClick:B}),(v==null?void 0:v.length)==1&&L.jsx(sn,{theme:"light",text:"Download",size:14,className:gi.buttonRight,onClick:F}),(v==null?void 0:v.length)>1&&L.jsx(sn,{theme:"light",text:"Download All",size:14,className:gi.buttonRight,onClick:F})]})]})}function APe(){const{isLoading:n,setViewMode:e}=X.useContext(Ci),{manifest:t,characterManager:r,animationManager:i,sceneElements:s,loraDataGenerator:o,spriteAtlasGenerator:a}=X.useContext(lr),{playSound:l}=X.useContext(bs),{isMute:A}=X.useContext(Bs),[c,u]=Ce.useState(null),[h,d]=Ce.useState(""),[p,f]=Ce.useState([]),[m,g]=Ce.useState(0),[v,w]=X.useState("T-Pose"),B=()=>{!A&&l("backNextButton"),r.removeCurrentCharacter(),r.removeCurrentManifest(),e(at.LANDING)},C=()=>{const I=De.mergeOptions_sel_option||0;return{isVrm0:!0,createTextureAtlas:!0,mToonAtlasSize:Cn(De.mergeOptions_atlas_mtoon_size||6),mToonAtlasSizeTransp:Cn(De.mergeOptions_atlas_mtoon_transp_size||6),stdAtlasSize:Cn(De.mergeOptions_atlas_std_size||6),stdAtlasSizeTransp:Cn(De.mergeOptions_atlas_std_transp_size||6),exportStdAtlas:I===0||I==2,exportMtoonAtlas:I===1||I==2,ktxCompression:De.merge_options_ktx_compression||!1,twoSidedMaterial:De.mergeOptions_two_sided_mat||!1}},b=async()=>{for(let I=0;I{typeof I!="string"&&(I=h),await(async()=>{var ie;(De.mergeOptions_download_vrm_preview==null?!0:De.mergeOptions_download_vrm_preview)&&r.savePortraitScreenshot(I+"_portrait",512,1024,1.5,-.1),(De.mergeOptions_download_vrm==null?!0:De.mergeOptions_download_vrm)&&await r.downloadVRM(I+"_merged",C());const V=new qf,Z=s.parent;Z.remove(s);const N=(ie=r.getCurrentOptimizerCharacterModel().data)==null?void 0:ie.isVRM0;N&&Z.rotateY(3.14159);const _=De.mergeOptions_download_lora==null?!0:De.mergeOptions_download_lora;if(_===!0){const T=t.loras.map(async q=>o.createLoraData(q,V));await Promise.all(T)}const z=De.mergeOptions_download_sprites==null?!0:De.mergeOptions_download_sprites;if(z===!0){const T=t.sprites.map(async q=>a.createSpriteAtlas(q,V));await Promise.all(T)}(_===!0||z===!0)&&V.saveZip(I),N&&Z.rotateY(-3.14159),Z.add(s)})()},{t:x}=Ce.useContext(xs),E=async I=>{if(r.getCurrentOptimizerCharacterModel()){const D=Sl(I.name),k=URL.createObjectURL(I);await i.loadAnimation(k,!1,0,!0,"",D),w(i.getCurrentAnimationName()),URL.revokeObjectURL(k)}else console.warn("Please load a vrm model to test animations.")},M=()=>{if(m===0)O(p[p.length-1]),g(p.length-1);else{const I=m-1;O(p[I]),g(I)}},H=()=>{if(m>=p.length-1)O(p[0]),g(0);else{const I=m+1;O(p[I]),g(I)}},O=async I=>{const R=URL.createObjectURL(I);await r.loadOptimizerCharacter(R),URL.revokeObjectURL(R);const D=Sl(I.name);d(D),u({...r.getCurrentCharacterModel()})},U=async I=>{O(I[0]);const R=[];for(let D=0;D{const R=I[0];R&&R.name.toLowerCase().endsWith(".fbx")&&E(R),R&&R.name.toLowerCase().endsWith(".vrm")&&U(I)};return L.jsxs("div",{className:gi.container,children:[L.jsx("div",{className:`loadingIndicator ${n?"active":""}`,children:L.jsx("img",{className:"rotate",src:"ui/loading.svg"})}),L.jsx("div",{className:"sectionTitle",children:"Optimize your character"}),L.jsx(I0,{onFilesDrop:y}),L.jsx(xb,{showDropToDownload:!0,showCreateAtlas:!1,mergeMenuTitle:"Optimizer Options"}),L.jsx(uR,{model:c,name:h,files:p,index:m,nextVrm:H,previousVrm:M}),L.jsx(Eb,{loadedAnimationName:v}),L.jsxs("div",{className:gi.buttonContainer,children:[L.jsx(sn,{theme:"light",text:x("callToAction.back"),size:14,className:gi.buttonLeft,onClick:B}),(p==null?void 0:p.length)>1!=""&&L.jsx(sn,{theme:"light",text:"Download All",size:14,className:gi.buttonRight,onClick:b}),c!=""&&L.jsx(sn,{theme:"light",text:"Download",size:14,className:gi.buttonRight,onClick:F})]})]})}function cPe(){const{isLoading:n,setViewMode:e,setIsLoading:t}=X.useContext(Ci),{manifest:r,characterManager:i,animationManager:s,toggleDebugMode:o,loraDataGenerator:a,spriteAtlasGenerator:l,sceneElements:A}=X.useContext(lr),[c,u]=Ce.useState(null),[h,d]=Ce.useState(""),{playSound:p}=X.useContext(bs),{isMute:f}=X.useContext(Bs);X.useState(null);const[m,g]=X.useState(null),[v,w]=X.useState(""),B=()=>{!f&&p("backNextButton"),i.removeCurrentCharacter(),i.removeCurrentManifest(),o(!1),e(at.LANDING)},C=()=>{const y=De.mergeOptions_sel_option||0;return{isVrm0:!0,createTextureAtlas:!0,mToonAtlasSize:Cn(De.mergeOptions_atlas_mtoon_size||6),mToonAtlasSizeTransp:Cn(De.mergeOptions_atlas_mtoon_transp_size||6),stdAtlasSize:Cn(De.mergeOptions_atlas_std_size||6),stdAtlasSizeTransp:Cn(De.mergeOptions_atlas_std_transp_size||6),exportStdAtlas:y===0||y==2,exportMtoonAtlas:y===1||y==2,ktxCompression:De.merge_options_ktx_compression||!1,twoSidedMaterial:De.mergeOptions_two_sided_mat||!1}},b=y=>{const I=m[y].manifestName;(async()=>{(De.mergeOptions_download_vrm_preview==null?!0:De.mergeOptions_download_vrm_preview)&&i.savePortraitScreenshot(I,512,1024,1.5,-.1),(De.mergeOptions_download_vrm==null?!0:De.mergeOptions_download_vrm)&&await i.downloadVRM(I,C());const V=new qf,Z=A.parent;Z.remove(A);const N=De.mergeOptions_download_lora==null?!0:De.mergeOptions_download_lora;if(N===!0){const z=r.loras.map(async ie=>a.createLoraData(ie,V));await Promise.all(z)}const _=De.mergeOptions_download_sprites==null?!0:De.mergeOptions_download_sprites;if(_===!0){const z=r.sprites.map(async ie=>l.createSpriteAtlas(ie,V));await Promise.all(z)}(N===!0||_===!0)&&V.saveZip(m[y].manifestName),Z.add(A),y{y==0?(console.log(r.loras[0]),b(y)):(await i.setManifest(m[y]),t(!0),i.loadInitialTraits().then(async()=>{await(R=>new Promise(D=>setTimeout(D,R)))(1),b(y)}))},x=()=>{t(!0),F(0)},{t:E}=Ce.useContext(xs),M=async y=>{if(i.getCurrentCharacterModel()){const R=Sl(y.name),D=URL.createObjectURL(y);await s.loadAnimation(D,!1,0,!0,"",R),w(s.getCurrentAnimationName()),URL.revokeObjectURL(D)}else console.warn("Please load a vrm model to test animations.")},H=async y=>{const I=URL.createObjectURL(y);await i.loadOptimizerCharacter(I),URL.revokeObjectURL(I);const R=Sl(y.name);d(R),u(i.getCurrentCharacterModel())},O=y=>{const I=Array.from(y),R=[],D=k=>new Promise((V,Z)=>{if(k&&k.name.toLowerCase().endsWith(".json")){const N=new FileReader,_=k.name.replace(/\.[^/.]+$/,"");N.onload=function(z){try{const ie=JSON.parse(z.target.result),T=ie.thumbnail;ie.manifestName=_,R.push(ie),V()}catch(ie){console.error("Error parsing the JSON file:",ie),Z(ie)}},N.readAsText(k)}});Promise.all(I.map(D)).then(()=>{R.length>0&&(g(R),i.setManifest(R[0]),t(!0),i.loadInitialTraits().then(()=>{t(!1)}))}).catch(k=>{console.error("Error processing files:",k)})},U=async y=>{const I=y[0];I&&I.name.toLowerCase().endsWith(".fbx")&&M(I),I&&I.name.toLowerCase().endsWith(".vrm")&&H(I),I&&I.name.toLowerCase().endsWith(".json")&&O(y)};return L.jsxs("div",{className:gi.container,children:[L.jsx("div",{className:`loadingIndicator ${n?"active":""}`,children:L.jsx("img",{className:"rotate",src:"ui/loading.svg"})}),L.jsx("div",{className:"sectionTitle",children:"NFT Characters"}),L.jsx(I0,{onFilesDrop:U}),L.jsx(xb,{showDropToDownload:!0,showCreateAtlas:!1,mergeMenuTitle:"Download Options"}),L.jsx(uR,{model:c}),L.jsx(yQ,{jsonSelectionArray:m,byManifest:!0}),(m==null?void 0:m.length)>0&&L.jsx(Eb,{loadedAnimationName:v}),L.jsxs("div",{className:gi.buttonContainer,children:[L.jsx(sn,{theme:"light",text:E("callToAction.back"),size:14,className:gi.buttonLeft,onClick:B}),(m==null?void 0:m.length)==1&&L.jsx(sn,{theme:"light",text:"Download",size:14,className:gi.buttonRight,onClick:x}),(m==null?void 0:m.length)>1&&L.jsx(sn,{theme:"light",text:"Download All",size:14,className:gi.buttonRight,onClick:x})]})]})}function uPe(){const{t:n}=Ce.useContext(xs),{setViewMode:e,setIsLoading:t,isLoading:r}=X.useContext(Ci),{playSound:i}=X.useContext(bs),{isMute:s}=X.useContext(Bs),{manifest:o,characterManager:a}=X.useContext(lr);Ce.useState([]);const[l,A]=Ce.useState([]);Ce.useEffect(()=>{c()},[]);const c=async()=>{const f=await vQ();Lwe(f,"the-anata-nft").then(m=>{A(m.nfts),console.log(m.nfts)})},u=()=>{e(at.LANDING),!s&&i("backNextButton")},h=async f=>{t(!0),a.loadManifest(o[f].manifest).then(()=>{e(at.APPEARANCE),a.loadInitialTraits().then(()=>{t(!1)})}),!s&&i("classSelect")},d=()=>{console.log("ttt"),a.loadManifest(o[0].manifest).then(()=>{a.loadAppendManifest(o[1].manifest,!0).then(()=>{console.log(a.manifestData)})})},p=()=>{!s&&i("classMouseOver")};return L.jsxs("div",{className:`${st.container} horizontalScroll`,children:[L.jsx("div",{className:"sectionTitle",children:n("pageTitles.chooseClass")}),L.jsx("div",{className:st.vrmOptimizerButton}),L.jsx("div",{className:st.topLine}),L.jsx("div",{className:st.classContainer,children:l.map((f,m)=>L.jsxs("div",{className:st.class,onClick:()=>h(m),onMouseOver:()=>p(),children:[L.jsx("div",{className:st.classFrame,style:{backgroundImage:`url(${f.image_url})`},children:L.jsx("div",{className:st.frameContainer,children:L.jsx("img",{src:"./assets/backgrounds/class-frame.svg",className:st.frame})})}),L.jsx("div",{className:st.name,children:f.name})]},m))}),L.jsx("div",{className:st.bottomLine}),L.jsxs("div",{className:st.buttonContainer,children:[L.jsx(sn,{theme:"light",text:n("callToAction.back"),size:14,className:st.buttonLeft,onClick:u}),L.jsx(sn,{theme:"light",text:"test",size:14,className:st.buttonLeft,onClick:d})]})]})}const dPe="https://beta.anata.dev/character-assets/manifest.json";let XI;const jI=new j,ky=new j;let KI,$I;const hPe=1.4,fPe=new j(0,1.25,0),wz=new j(-.9786403788721187,1.4036900759197288,.9892635490125085),pPe=wz.length(),gPe=.35,SV=6,UV=new j(0,.8,0),Bz=new j(-2.2367993753934425,1.1512971720174363,2.2612065299409223),mPe=Bz.length(),vPe=.5,Td=new j,Ji=new kt,yPe=new kt,wPe=new j(1,0,0),BPe=new j(0,1,0);async function CPe(n){try{const e=await fetch(n);if(!e.ok)throw new Error(`Failed to fetch manifest. Status: ${e.status}`);return await e.json()}catch(e){return console.error(`Error fetching manifest: ${e.message}`),[]}}async function bPe(){const n=await CPe(dPe),e=new bme;return{initialManifest:n,effectManager:e}}const xPe=()=>{let n,e;const r=bPe().then(i=>{n="success",e=i},i=>{n="error",e=i});return{read(){if(n==="error")throw e;if(n==="success")return e;throw r}}},IPe=xPe();function FPe(){const{initialManifest:n,effectManager:e}=IPe.read(),[t,r]=Ce.useState(!1),{camera:i,controls:s,scene:o,moveCamera:a,setManifest:l,lookAtManager:A,showEnvironmentModels:c}=Ce.useContext(lr),{viewMode:u}=Ce.useContext(Ci);e.camera=i,e.scene=o;const h=()=>{if(e.camera){if([at.BIO,at.CHAT].includes(u)){u===at.CHAT?(XI=hPe,jI.copy(fPe),ky.copy(wz),KI=pPe,$I=gPe):(XI=SV,jI.copy(UV),ky.copy(Bz),KI=mPe,$I=vPe),Ji.set(0,0,KI,1).applyMatrix4(e.camera.projectionMatrix),Ji.x/=Ji.w,Ji.y/=Ji.w,Ji.z/=Ji.w;const b=yPe.set($I*Ji.w,Ji.y*Ji.w,Ji.z*Ji.w,Ji.w).applyMatrix4(e.camera.projectionMatrixInverse).x,F=Td.set(ky.x,0,ky.z).angleTo(wPe);Td.set(b,0,0).applyAxisAngle(BPe,F),Td.add(jI),a({targetX:Td.x,targetY:Td.y,targetZ:Td.z,distance:XI})}else a({targetX:0,targetY:UV.y,targetZ:0,distance:SV});s&&([at.APPEARANCE,at.SAVE,at.OPTIMIZER,at.BATCHDOWNLOAD,at.BATCHMANIFEST].includes(u)?s.enabled=!0:s.enabled=!1)}},[d,p]=Ce.useState(!1),[f,m]=Ce.useState(""),[g,v]=Ce.useState([]),w=(b,F)=>{m(b),p(!0),v([F])},B={[at.LANDING]:L.jsx(uBe,{}),[at.APPEARANCE]:L.jsx(OVe,{confirmDialog:w}),[at.OPTIMIZER]:L.jsx(APe,{}),[at.CREATE]:L.jsx(aBe,{}),[at.WALLET]:L.jsx(uPe,{}),[at.CLAIM]:L.jsx(lBe,{}),[at.BATCHMANIFEST]:L.jsx(cPe,{}),[at.BATCHDOWNLOAD]:L.jsx(lPe,{}),[at.LOAD]:L.jsx(ywe,{}),[at.MINT]:L.jsx(Wwe,{}),[at.SAVE]:L.jsx(Sye,{}),[at.CHAT]:L.jsx(oye,{})};let C=0;return Ce.useEffect(()=>{const b=F=>{const x=new Date().getTime(),E=x-C;E<300&&E>10&&F.target.id=="editor-scene"&&r(!t),C=x};return window.addEventListener("touchend",b),window.addEventListener("click",b),()=>{window.removeEventListener("touchend",b),window.removeEventListener("click",b)}},[t]),Ce.useEffect(()=>{if(A!=null)return h(),[at.BIO,at.MINT,at.CHAT].includes(u)?A.enabled=!1:A.enabled=!0,[at.LANDING,at.CREATE,at.CLAIM,at.LOAD,at.CLAIM,at.CLAIM].includes(u)?c(!1):c(!0),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[u,A]),Ce.useEffect(()=>{l(n)},[n]),Ce.useContext(xs),L.jsxs(Ce.Fragment,{children:[L.jsx("div",{className:"generalTitle",children:"Character Studio"}),L.jsx(Ome,{confirmDialogText:f,confirmDialogCallback:g,confirmDialogWindow:d,setConfirmDialogWindow:p}),L.jsx(Yme,{}),B[u]]})}const _Pe=n=>{const e=new aS(n);return e.pollingInterval=12e3,e};AF.createRoot(document.getElementById("root")).render(L.jsx(X.StrictMode,{children:L.jsx(u8,{getLibrary:_Pe,children:L.jsx(BK,{children:L.jsx(tme,{children:L.jsx(yK,{children:L.jsx(Mpe,{children:L.jsx(Qpe,{children:L.jsx(Wpe,{children:L.jsx(Ce.Suspense,{children:L.jsx(FPe,{})})})})})})})})})}));export{pa as c,Zl as g}; diff --git a/index.html b/index.html index b72af6ac..747c78ce 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ Character Studio - +