diff --git a/bin/mc2it_theme.js b/bin/mc2it_theme.js index b798d1c..00eaf03 100755 --- a/bin/mc2it_theme.js +++ b/bin/mc2it_theme.js @@ -1,2 +1,2 @@ #!/usr/bin/env node -!function(e){"use strict";var t,n=function(){return p.__string_rec(this,"")},s=s||{};class r{constructor(e,t){this.r=new RegExp(e,t.split("u").join(""))}match(e){return this.r.global&&(this.r.lastIndex=0),this.r.m=this.r.exec(e),this.r.s=e,null!=this.r.m}matched(e){if(null!=this.r.m&&e>=0&&e8&&n<14||32==n}static ltrim(e){let t=e.length,n=0;for(;n0?i.substr(e,n,t-n):e}static rtrim(e){let t=e.length,n=0;for(;n0?i.substr(e,0,t-n):e}static trim(e){return u.ltrim(u.rtrim(e))}static lpad(e,t,n){if(t.length<=0)return e;let s="";for(n-=e.length;s.length0&&".."!=n[n.length-1]?n.pop():""==t?(n.length>0||47==i.cca(e,0))&&n.push(t):"."!=t&&n.push(t)}let a="",l=!1,c=!1,u=0,o=n.join(t);for(;u=55296&&n<=56319&&(n=n-55232<<10|1023&e.charCodeAt(t+1));n>=65536&&++u;let s=n;switch(s){case 47:if(l){let e=s;l=!1,c&&(a+="/",c=!1),a+=String.fromCodePoint(e)}else c=!0;break;case 58:a+=":",l=!0;break;default:let e=s;l=!1,c&&(a+="/",c=!1),a+=String.fromCodePoint(e)}}return a}static addTrailingSlash(e){if(0==e.length)return"/";let t=e.lastIndexOf("/"),n=e.lastIndexOf("\\");return t=5)return"<...>";let n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e.__enum__){let n=s[e.__enum__].__constructs__[e._hx_index],r=n._hx_name;return n.__params__?(t+="\t",r+"("+function(){let s=[];{let r=0,i=n.__params__;for(;r0?",":"")+p.__string_rec(e[r],t)}return n+="]",n}let n;try{n=e.toString}catch(e){return"???"}if(null!=n&&n!=Object.toString&&"function"==typeof n){let t=e.toString();if("[object Object]"!=t)return t}let r="{\n";t+="\t";let i=null!=e.hasOwnProperty,a=null;for(a in e)i&&!e.hasOwnProperty(a)||"prototype"!=a&&"__class__"!=a&&"__super__"!=a&&"__interfaces__"!=a&&"__properties__"!=a&&(2!=r.length&&(r+=", \n"),r+=t+a+" : "+p.__string_rec(e[a],t));return r+="\n"+(t=t.substring(1))+"}",r;case"string":return e;default:return String(e)}}}p.__name__=!0;var g=require("fs"),w=require("path"),x=require("buffer").Buffer;class y{static get_packageVersion(){return null==y.packageVersion&&(y.packageVersion="9.0.1"),y.packageVersion}}y.__name__=!0;class b{static assetPath(e){let t=null!=e?e.scss:null;return u.replace(m.join([m.directory(__filename),null!=t&&t?"../lib/scss":"../www"]),"/","Windows"==o.systemName()?"\\":"/")}static copyAssets(e,t){null==t&&(t={});let n=["css","fonts","img"],s=[],r=0;for(;r0?s:n;for(;a0;)g.writeSync(i,F.copyBuf,0,n),a+=n;g.closeSync(s),g.closeSync(i)}}F.__name__=!0;class N{static exit(e){switch(e._hx_index){case 0:process.exit(0);break;case 1:let t=e.failure,n=t.message;null!=t.data&&(n+=", "+(null==t.data?"null":c.string(t.data))),process.stdout.write(c.string(n)),process.stdout.write("\n");let s=t.code;process.exit(s)}}}N.__name__=!0;class E{constructor(e){this.buffer=e}}E.__name__=!0;class C{static get(){return null==C.doc&&(C.doc={doc:"\r\n\tCopy the theme assets to a given directory.\r\n\r\n\t> mc2it_theme copy [flags] \r\n",commands:[{isDefault:!0,isSub:!1,names:[],doc:" directory : The path to the output directory. "}],flags:[{names:["--css"],aliases:["c"],doc:" Copy only CSS files. "},{names:["--fonts"],aliases:["f"],doc:" Copy only font files. "},{names:["--img"],aliases:["i"],doc:" Copy only image files. "},{names:["--help"],aliases:["h"],doc:" Display this help. "}]}),C.doc}}C.__name__=!0;class D{static get(){return null==D.doc&&(D.doc={doc:"\r\n\tPrint the path to the theme assets.\r\n\r\n\t> mc2it_theme libpath [flags]\r\n",commands:[{isDefault:!0,isSub:!1,names:[],doc:null}],flags:[{names:["--scss"],aliases:["s"],doc:" Print the specific path of SCSS files. "},{names:["--help"],aliases:["h"],doc:" Display this help. "}]}),D.doc}}D.__name__=!0;class j{static get(){return null==j.doc&&(j.doc={doc:"\r\n\tCommand line interface of MC2IT Theme.\r\n\r\n\t> mc2it_theme [flags] \r\n",commands:[{isDefault:!1,isSub:!0,names:["copy"],doc:" Copy the theme assets to a given directory. "},{isDefault:!1,isSub:!0,names:["libpath"],doc:" Print the path to the theme assets. "},{isDefault:!0,isSub:!1,names:[],doc:null}],flags:[{names:["--help"],aliases:["h"],doc:" Display this help. "},{names:["--version"],aliases:["v"],doc:" Output the version number. "}]}),j.doc}}j.__name__=!0;class R{constructor(e,t,n){this.command=e,this.prompt=t,this.hasFlags=n}processArgs(e){let t=this;return this.hasFlags?G.catchExceptions((function(){let n=R.expandAssignments(e),s=[],r=0,a=!1;for(;r0){let e=a.fold(r,(function(e,t){let n=0,s=e.names;for(;nt&&(t=e.length)}return t}),0);null!=this.root&&(t+=c.string(" Usage: "+this.root+" \n")),t+=c.string(" Subcommands:\n");let n=function(n,s){null==s&&(s="(doc missing)"),t+=c.string(o.indent(u.lpad(n," ",e)+" : "+u.trim(o.indent(s,e+3)),6)+"\n")},s=0;for(;s1){let s=1,r=e.names.length;for(;s0){let n=function(e){let t=e.names.join(", ");if(e.aliases.length>0){let n=e.aliases,s=new Array(n.length),r=0,i=n.length;for(;rt&&(t=s.length),t}),0),r=function(e,n){null==n&&(n=""),t+=c.string(o.indent(u.lpad(e," ",s)+" : "+u.trim(o.indent(n,s+3)),6)+"\n")};t=(t+="\n")+c.string(" Flags:\n");let i=0,l=e.flags;for(;i>1&&e.compact()}}}V.__name__=!0;class B{constructor(e){B._hx_skip_constructor||this._hx_constructor(e)}_hx_constructor(e){this.disposeHandlers=[],this.f=e}dispose(){let e=this.disposeHandlers;if(null!=e){this.disposeHandlers=null;let t=this.f;this.f=B.noop,t();let n=0;for(;n0){this.used=0;let e=this.ondrain;z.depth<500?(z.depth++,e(),z.depth--):z.defer(e)}}invoke(e){let t=this;if(z.depth<500){if(z.depth++,null!=t.disposeHandlers)if(t.busy){if(1!=t.destructive){let n=t,s=e,r=function(){n.invoke(s)};t.queue.push(r)}}else{t.busy=!0,t.destructive&&t.dispose();let n=t.cells.length,s=0;for(;s0&&t.queue.shift()())}z.depth--}else z.defer((function(){if(null!=t.disposeHandlers)if(t.busy){if(1!=t.destructive){let n=t,s=e,r=function(){n.invoke(s)};t.queue.push(r)}}else{t.busy=!0,t.destructive&&t.dispose();let n=t.cells.length,s=0;for(;s0&&t.queue.shift()())}}))}compact(){if(!this.busy)if(0==this.used){this.resize(0);let e=this.ondrain;z.depth<500?(z.depth++,e(),z.depth--):z.defer(e)}else{let e=0,t=0,n=this.cells.length;for(;t>10))+String.fromCharCode(56320+(1023&e))}),String.__name__=!0,Array.__name__=!0,p.__toStr={}.toString,F.copyBuf=x.alloc(65536),z.depth=0,B._hx_skip_constructor=!1,X._hx_skip_constructor=!1,J.NEVER_INST=new X,v.main()}("undefined"!=typeof exports?exports:globalThis,globalThis); \ No newline at end of file +!function(e){"use strict";var t,n=function(){return p.__string_rec(this,"")},s=s||{};class r{constructor(e,t){this.r=new RegExp(e,t.split("u").join(""))}match(e){return this.r.global&&(this.r.lastIndex=0),this.r.m=this.r.exec(e),this.r.s=e,null!=this.r.m}matched(e){if(null!=this.r.m&&e>=0&&e8&&n<14||32==n}static ltrim(e){let t=e.length,n=0;for(;n0?i.substr(e,n,t-n):e}static rtrim(e){let t=e.length,n=0;for(;n0?i.substr(e,0,t-n):e}static trim(e){return u.ltrim(u.rtrim(e))}static lpad(e,t,n){if(t.length<=0)return e;let s="";for(n-=e.length;s.length0&&".."!=n[n.length-1]?n.pop():""==t?(n.length>0||47==i.cca(e,0))&&n.push(t):"."!=t&&n.push(t)}let a="",l=!1,c=!1,u=0,o=n.join(t);for(;u=55296&&n<=56319&&(n=n-55232<<10|1023&e.charCodeAt(t+1));n>=65536&&++u;let s=n;switch(s){case 47:if(l){let e=s;l=!1,c&&(a+="/",c=!1),a+=String.fromCodePoint(e)}else c=!0;break;case 58:a+=":",l=!0;break;default:let e=s;l=!1,c&&(a+="/",c=!1),a+=String.fromCodePoint(e)}}return a}static addTrailingSlash(e){if(0==e.length)return"/";let t=e.lastIndexOf("/"),n=e.lastIndexOf("\\");return t=5)return"<...>";let n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e.__enum__){let n=s[e.__enum__].__constructs__[e._hx_index],r=n._hx_name;return n.__params__?(t+="\t",r+"("+function(){let s=[];{let r=0,i=n.__params__;for(;r0?",":"")+p.__string_rec(e[r],t)}return n+="]",n}let n;try{n=e.toString}catch(e){return"???"}if(null!=n&&n!=Object.toString&&"function"==typeof n){let t=e.toString();if("[object Object]"!=t)return t}let r="{\n";t+="\t";let i=null!=e.hasOwnProperty,a=null;for(a in e)i&&!e.hasOwnProperty(a)||"prototype"!=a&&"__class__"!=a&&"__super__"!=a&&"__interfaces__"!=a&&"__properties__"!=a&&(2!=r.length&&(r+=", \n"),r+=t+a+" : "+p.__string_rec(e[a],t));return r+="\n"+(t=t.substring(1))+"}",r;case"string":return e;default:return String(e)}}}p.__name__=!0;var g=require("fs"),w=require("path"),x=require("buffer").Buffer;class y{static get_packageVersion(){return null==y.packageVersion&&(y.packageVersion="9.0.2"),y.packageVersion}}y.__name__=!0;class b{static assetPath(e){let t=null!=e?e.scss:null;return u.replace(m.join([m.directory(__filename),null!=t&&t?"../lib/scss":"../www"]),"/","Windows"==o.systemName()?"\\":"/")}static copyAssets(e,t){null==t&&(t={});let n=["css","fonts","img"],s=[],r=0;for(;r0?s:n;for(;a0;)g.writeSync(i,F.copyBuf,0,n),a+=n;g.closeSync(s),g.closeSync(i)}}F.__name__=!0;class N{static exit(e){switch(e._hx_index){case 0:process.exit(0);break;case 1:let t=e.failure,n=t.message;null!=t.data&&(n+=", "+(null==t.data?"null":c.string(t.data))),process.stdout.write(c.string(n)),process.stdout.write("\n");let s=t.code;process.exit(s)}}}N.__name__=!0;class E{constructor(e){this.buffer=e}}E.__name__=!0;class C{static get(){return null==C.doc&&(C.doc={doc:"\r\n\tCopy the theme assets to a given directory.\r\n\r\n\t> mc2it_theme copy [flags] \r\n",commands:[{isDefault:!0,isSub:!1,names:[],doc:" directory : The path to the output directory. "}],flags:[{names:["--css"],aliases:["c"],doc:" Copy only CSS files. "},{names:["--fonts"],aliases:["f"],doc:" Copy only font files. "},{names:["--img"],aliases:["i"],doc:" Copy only image files. "},{names:["--help"],aliases:["h"],doc:" Display this help. "}]}),C.doc}}C.__name__=!0;class D{static get(){return null==D.doc&&(D.doc={doc:"\r\n\tPrint the path to the theme assets.\r\n\r\n\t> mc2it_theme libpath [flags]\r\n",commands:[{isDefault:!0,isSub:!1,names:[],doc:null}],flags:[{names:["--scss"],aliases:["s"],doc:" Print the specific path of SCSS files. "},{names:["--help"],aliases:["h"],doc:" Display this help. "}]}),D.doc}}D.__name__=!0;class j{static get(){return null==j.doc&&(j.doc={doc:"\r\n\tCommand line interface of MC2IT Theme.\r\n\r\n\t> mc2it_theme [flags] \r\n",commands:[{isDefault:!1,isSub:!0,names:["copy"],doc:" Copy the theme assets to a given directory. "},{isDefault:!1,isSub:!0,names:["libpath"],doc:" Print the path to the theme assets. "},{isDefault:!0,isSub:!1,names:[],doc:null}],flags:[{names:["--help"],aliases:["h"],doc:" Display this help. "},{names:["--version"],aliases:["v"],doc:" Output the version number. "}]}),j.doc}}j.__name__=!0;class R{constructor(e,t,n){this.command=e,this.prompt=t,this.hasFlags=n}processArgs(e){let t=this;return this.hasFlags?G.catchExceptions((function(){let n=R.expandAssignments(e),s=[],r=0,a=!1;for(;r0){let e=a.fold(r,(function(e,t){let n=0,s=e.names;for(;nt&&(t=e.length)}return t}),0);null!=this.root&&(t+=c.string(" Usage: "+this.root+" \n")),t+=c.string(" Subcommands:\n");let n=function(n,s){null==s&&(s="(doc missing)"),t+=c.string(o.indent(u.lpad(n," ",e)+" : "+u.trim(o.indent(s,e+3)),6)+"\n")},s=0;for(;s1){let s=1,r=e.names.length;for(;s0){let n=function(e){let t=e.names.join(", ");if(e.aliases.length>0){let n=e.aliases,s=new Array(n.length),r=0,i=n.length;for(;rt&&(t=s.length),t}),0),r=function(e,n){null==n&&(n=""),t+=c.string(o.indent(u.lpad(e," ",s)+" : "+u.trim(o.indent(n,s+3)),6)+"\n")};t=(t+="\n")+c.string(" Flags:\n");let i=0,l=e.flags;for(;i>1&&e.compact()}}}V.__name__=!0;class B{constructor(e){B._hx_skip_constructor||this._hx_constructor(e)}_hx_constructor(e){this.disposeHandlers=[],this.f=e}dispose(){let e=this.disposeHandlers;if(null!=e){this.disposeHandlers=null;let t=this.f;this.f=B.noop,t();let n=0;for(;n0){this.used=0;let e=this.ondrain;z.depth<500?(z.depth++,e(),z.depth--):z.defer(e)}}invoke(e){let t=this;if(z.depth<500){if(z.depth++,null!=t.disposeHandlers)if(t.busy){if(1!=t.destructive){let n=t,s=e,r=function(){n.invoke(s)};t.queue.push(r)}}else{t.busy=!0,t.destructive&&t.dispose();let n=t.cells.length,s=0;for(;s0&&t.queue.shift()())}z.depth--}else z.defer((function(){if(null!=t.disposeHandlers)if(t.busy){if(1!=t.destructive){let n=t,s=e,r=function(){n.invoke(s)};t.queue.push(r)}}else{t.busy=!0,t.destructive&&t.dispose();let n=t.cells.length,s=0;for(;s0&&t.queue.shift()())}}))}compact(){if(!this.busy)if(0==this.used){this.resize(0);let e=this.ondrain;z.depth<500?(z.depth++,e(),z.depth--):z.defer(e)}else{let e=0,t=0,n=this.cells.length;for(;t>10))+String.fromCharCode(56320+(1023&e))}),String.__name__=!0,Array.__name__=!0,p.__toStr={}.toString,F.copyBuf=x.alloc(65536),z.depth=0,B._hx_skip_constructor=!1,X._hx_skip_constructor=!1,J.NEVER_INST=new X,v.main()}("undefined"!=typeof exports?exports:globalThis,globalThis); \ No newline at end of file