`,`
@@ -1126,14 +1126,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
-
`)}},{key:"formatTable",value:function(Wt){var Ut=Wt[0],mn=Wt[1],Dn=[];return fr()(mn)&&(mn=Zr()(mn)),kt()(mn)||(mn=null),Nn()(Ut)?(St()(Ut,function(br){Rn()(br)?Dn.push("__LunaConsoleValue"):Nn()(br)&&(Dn=Dn.concat(Ot()(br)))}),(Dn=Pt()(Dn)).sort(),mn&&(Dn=Dn.filter(function(br){return ct()(mn,br)})),Dn.length>20&&(Dn=Dn.slice(0,20)),_t()(Dn)?this.formatCommon(Wt):(this.columns=Dn,this.console.c('
')+this.formatPreview(Ut))):this.formatCommon(Wt)}},{key:"formatErr",value:function(Wt){var Ut=Wt.stack?Wt.stack.split(`
-`):[],mn="".concat(Wt.message||Ut[0],"
");return Ut=Ut.map(function(Dn){return ut()(Dn)}),mn+'
').concat(Ut.slice(1).join("
"),"
").replace(qr,function(Dn){return'
').concat(Dn,"")})}},{key:"formatCommon",value:function(Wt){var Ut=this.console.c,mn=fr()(Wt[0])&&Wt.length!==1;mn&&(Wt=this.substituteStr(Wt));for(var Dn=0,br=Wt.length;Dn
').concat(ut()(ft()(dr)),""):Nn()(dr)?Wt[Dn]=this.formatPreview(dr):Pr()(dr)?Wt[Dn]='
undefined'):kr()(dr)?Wt[Dn]='
null'):Vn()(dr)?Wt[Dn]='
').concat(ft()(dr),""):typeof dr=="bigint"?Wt[Dn]='
').concat(ft()(dr),"n"):Dr()(dr)?Wt[Dn]='
').concat(ft()(dr),""):Nr()(dr)?Wt[Dn]='
').concat(ut()(ft()(dr)),""):(dr=ft()(dr),Dn===0&&mn||(dr=ut()(dr)),dr.length>5e3&&(dr=Mt()(dr,5e3,{separator:" ",ellipsis:"…"})),Wt[Dn]=dr)}return Wt.join(" ")}},{key:"formatDir",value:function(Wt){return Nn()(Wt[0])?this.formatPreview(Wt[0]):this.formatCommon(Wt)}},{key:"formatTableVal",value:function(Wt){var Ut=this.console.c;return Nn()(Wt)?"{…}":Rn()(Wt)?jr()('
').concat(Ln(Wt),"
")):ft()(Wt)}},{key:"formatPreview",value:function(Wt){var Ut=this,mn=this.console.c,Dn=sn()();this.lazyEvaluation?this.objects[Dn]=Wt:this.extractObj(Wt,{},function(_r){Ut.objects[Dn]=_r});var br=ct()(["dir","table"],this.type),dr=zt(Wt);return dr==="Array"&&Wt.length>1?(dr="(".concat(Wt.length,")"),br&&(dr="Array".concat(dr))):dr==="RegExp"?dr=ft()(Wt):Gn()(Wt)&&(dr=this.formatElName(Wt)),'
')+'
')+'
')+'
')+'').concat(ut()(dr)," ")+'').concat(br?"":Ln(Wt,{getterVal:this.accessGetter,unenumerable:!1}),"")+""+'
')}},{key:"substituteStr",value:function(Wt){var Ut=ut()(Wt[0]),mn=!1,Dn="";Wt.shift();for(var br=0,dr=Ut.length;br
"),mn=!0,Dn+='');break;default:br--,Wt.unshift(Cr),Dn+=_r}}else Dn+=_r}return mn&&(Dn+=""),Wt.unshift(Dn),Wt}},{key:"formatJs",value:function(Wt){return'').concat(this.console.c(sr()(Wt,"js",eo)),"
")}},{key:"formatFn",value:function(Wt){return''.concat(this.formatJs(Wt.toString()),"
")}},{key:"formatElName",value:function(Wt){var Ut=Wt.id,mn=Wt.className,Dn=Wt.tagName.toLowerCase();if(Ut!==""&&(Dn+="#".concat(Ut)),fr()(mn)){var br="";St()(mn.split(/\s+/g),function(dr){dr.trim()!==""&&(br+=".".concat(dr))}),Dn+=br}return Dn}},{key:"formatEl",value:function(Wt){var Ut=sn()();return this.elements[Ut]=Wt,this.console.c(''))}}]),Sr}(Ht());function no(Er){var Hr=(Er=Et()(Er)).split(";"),Sr={};St()(Hr,function(Ut){if(ct()(Ut,":")){var mn=$(Ut.split(":"),2),Dn=mn[0],br=mn[1];Sr[Zt()(Dn)]=Zt()(br)}}),Sr.display="inline-block",Sr["max-width"]="100%",delete Sr.width,delete Sr.height;var Wt="";return St()(Sr,function(Ut,mn){Wt+="".concat(mn,":").concat(Ut,";")}),Wt}var io=d(1194),co=d.n(io),so=d(8847),fo=d.n(so),Ho=d(6329),Xo=d.n(Ho),vs=d(9001),_i=d.n(vs),ys=d(9702),bs=d.n(ys),Kr=d(2439),ws=d.n(Kr),ga=d(8933),xs=d.n(ga),_s=d(4407),Cs=d.n(_s),ks=d(5852),As=d.n(ks);function Ss(Er){var Hr=function(){if(typeof Reflect>"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}}();return function(){var Sr,Wt=(0,at.Z)(Er);if(Hr){var Ut=(0,at.Z)(this).constructor;Sr=Reflect.construct(Wt,arguments,Ut)}else Sr=Wt.apply(this,arguments);return(0,ot.Z)(this,Sr)}}var va,Es=function(Er){(0,nt.Z)(Sr,Er);var Hr=Ss(Sr);function Sr(Wt,Ut){var mn,Dn=Ut.compName,br=(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).theme,dr=br===void 0?"light":br;return(0,et.Z)(this,Sr),(mn=Hr.call(this)).subComponents=[],mn.compName=Dn,mn.c=_n(Dn),mn.options={},mn.container=Wt,mn.$container=It()(Wt),mn.$container.addClass(["luna-".concat(Dn),mn.c("platform-".concat(Tn()))]),mn.on("optionChange",function(_r,Cr,Rr){var Yr=mn.c;_r==="theme"&&(mn.$container.rmClass(Yr("theme-".concat(Rr))).addClass(Yr("theme-".concat(Cr))),St()(mn.subComponents,function(Gr){return Gr.setOption("theme",Cr)}))}),mn.setOption("theme",dr),mn}return(0,tt.Z)(Sr,[{key:"destroy",value:function(){this.destroySubComponents();var Wt=this.c;this.$container.rmClass("luna-".concat(this.compName)).rmClass(Wt("platform-".concat(Tn()))).rmClass(Wt("theme-".concat(this.options.theme))),this.$container.html(""),this.emit("destroy"),this.removeAllListeners()}},{key:"setOption",value:function(Wt,Ut){var mn=this,Dn=this.options,br={};typeof Wt=="string"?br[Wt]=Ut:br=Wt,St()(br,function(dr,_r){var Cr=Dn[_r];Dn[_r]=dr,mn.emit("optionChange",_r,dr,Cr)})}},{key:"getOption",value:function(Wt){return this.options[Wt]}},{key:"addSubComponent",value:function(Wt){Wt.setOption("theme",this.options.theme),this.subComponents.push(Wt)}},{key:"removeSubComponent",value:function(Wt){As()(this.subComponents,function(Ut){return Ut===Wt})}},{key:"destroySubComponents",value:function(){St()(this.subComponents,function(Wt){return Wt.destroy()}),this.subComponents=[]}},{key:"initOptions",value:function(Wt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};qn()(Wt,Ut),Xo()(this.options,Wt)}},{key:"find",value:function(Wt){return this.$container.find(this.c(Wt))}}]),Sr}(Ht()),Ts=d(1571),Ms=d.n(Ts);function Os(Er){var Hr=function(){if(typeof Reflect>"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}}();return function(){var Sr,Wt=(0,at.Z)(Er);if(Hr){var Ut=(0,at.Z)(this).constructor;Sr=Reflect.construct(Wt,arguments,Ut)}else Sr=Wt.apply(this,arguments);return(0,ot.Z)(this,Sr)}}b=d.hmd(b);var es=navigator.userAgent,js=es.indexOf("Android")>-1||es.indexOf("Adr")>-1,Rs=0,ts=function(Er){(0,nt.Z)(Sr,Er);var Hr=Os(Sr);function Sr(Wt){var Ut,mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,et.Z)(this,Sr),(Ut=Hr.call(this,Wt,{compName:"console"},mn)).spaceHeight=0,Ut.topSpaceHeight=0,Ut.bottomSpaceHeight=0,Ut.lastScrollTop=0,Ut.lastTimestamp=0,Ut.speedToleranceFactor=100,Ut.maxSpeedTolerance=2e3,Ut.minSpeedTolerance=100,Ut.logs=[],Ut.displayLogs=[],Ut.timer={},Ut.counter={},Ut.asyncList=[],Ut.asyncTimer=null,Ut.isAtBottom=!0,Ut.groupStack=new(_i()),Ut.selectedLog=null,Ut.onScroll=function(){var Dn=Ut.container,br=Dn.scrollHeight,dr=Dn.offsetHeight,_r=Dn.scrollTop;if(!(_r<=0||dr+_r>br)){var Cr=!1;(br===dr||_r===br-dr)&&(Cr=!0),Ut.isAtBottom=Cr;var Rr=Ut.lastScrollTop,Yr=Ut.lastTimestamp,Gr=fo()(),oo=Gr-Yr,po=_r-Rr,Ur=Math.abs(po/oo)*Ut.speedToleranceFactor;oo>1e3&&(Ur=1e3),Ur>Ut.maxSpeedTolerance&&(Ur=Ut.maxSpeedTolerance),Ur_r+dr+yo||Ut.renderViewport({topTolerance:2*ao,bottomTolerance:2*yo})}},Ut.initTpl(),Ut.initOptions(mn,{maxNum:0,asyncRender:!0,showHeader:!1,filter:"",level:["verbose","info","warning","error"],accessGetter:!1,unenumerable:!0,lazyEvaluation:!0}),Ut.$el=Ut.find(".logs"),Ut.el=Ut.$el.get(0),Ut.$fakeEl=Ut.find(".fake-logs"),Ut.fakeEl=Ut.$fakeEl.get(0),Ut.$space=Ut.find(".logs-space"),Ut.space=Ut.$space.get(0),js&&(Ut.speedToleranceFactor=800,Ut.maxSpeedTolerance=3e3,Ut.minSpeedTolerance=800),Ut.resizeSensor=new(qt())(Wt),Ut.renderViewport=ws()(function(Dn){Ut._renderViewport(Dn)},16),Ut.global={copy:function(Dn){fr()(Dn)||(Dn=JSON.stringify(Dn,null,2)),Hn()(Dn)},$:function(Dn){return document.querySelector(Dn)},$$:function(Dn){return Zr()(document.querySelectorAll(Dn))},$x:function(Dn){return xs()(Dn)},clear:function(){Ut.clear()},dir:function(Dn){Ut.dir(Dn)},table:function(Dn,br){Ut.table(Dn,br)},keys:Ot()},Ut.bindEvent(),Ut}return(0,tt.Z)(Sr,[{key:"setGlobal",value:function(Wt,Ut){this.global[Wt]=Ut}},{key:"destroy",value:function(){this.$container.off("scroll",this.onScroll),this.resizeSensor.destroy(),(0,rt.Z)((0,at.Z)(Sr.prototype),"destroy",this).call(this)}},{key:"count",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"default",Ut=this.counter;Pr()(Ut[Wt])?Ut[Wt]=1:Ut[Wt]++,this.info("".concat(Wt,": ").concat(Ut[Wt]))}},{key:"countReset",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"default";this.counter[Wt]=0}},{key:"assert",value:function(){for(var Wt=arguments.length,Ut=new Array(Wt),mn=0;mn0&&arguments[0]!==void 0?arguments[0]:"default";if(this.timer[Wt])return this.insert("warn",["Timer '".concat(Wt,"' already exists")]);this.timer[Wt]=co()()}},{key:"timeLog",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"default",Ut=this.timer[Wt];if(!Ut)return this.insert("warn",["Timer '".concat(Wt,"' does not exist")]);this.info("".concat(Wt,": ").concat(co()()-Ut,"ms"))}},{key:"timeEnd",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"default";this.timeLog(Wt),delete this.timer[Wt]}},{key:"clear",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.logs=[],this.displayLogs=[],this.selectLog(null),this.lastLog=void 0,this.counter={},this.timer={},this.groupStack=new(_i()),this.asyncList=[],this.asyncTimer&&(clearTimeout(this.asyncTimer),this.asyncTimer=null),Wt?this.render():this.insert("log",["%cConsole was cleared","color:#808080;font-style:italic;"])}},{key:"info",value:function(){for(var Wt=arguments.length,Ut=new Array(Wt),mn=0;mn0&&(Dn.group=_r.peek()),Xo()(Dn,{id:++Rs,accessGetter:Yr,unenumerable:Gr,lazyEvaluation:oo}),Dn.type==="group"||Dn.type==="groupCollapsed"){var po={id:sn()("group"),collapsed:!1,parent:_r.peek(),indentLevel:_r.size+1};Dn.type==="groupCollapsed"&&(po.collapsed=!0),Dn.targetGroup=po,_r.push(po)}var Ur=new to(this,Dn);Ur.on("updateHeight",function(){br.isAtBottom=!1,br.renderViewport()});var ao=this.lastLog;if(ao&&!ct()(["html","group","groupCollapsed"],Ur.type)&&ao.type===Ur.type&&Ur.isSimple()&&ao.text()===Ur.text()?(ao.addCount(),Ur.header&&ao.updateTime(Ur.header.time),Ur=ao,this.detachLog(ao)):(dr.push(Ur),this.lastLog=Ur),Rr!==0&&dr.length>Rr){var yo=dr[0];this.detachLog(yo),dr.shift()}this.attachLog(Ur),this.emit("insert",Ur)}},{key:"updateTopSpace",value:function(Wt){this.topSpaceHeight=Wt,this.el.style.top=Wt+"px"}},{key:"updateBottomSpace",value:function(Wt){this.bottomSpaceHeight=Wt}},{key:"updateSpace",value:function(Wt){this.spaceHeight!==Wt&&(this.spaceHeight=Wt,this.space.style.height=Wt+"px")}},{key:"detachLog",value:function(Wt){var Ut=this.displayLogs,mn=Ut.indexOf(Wt);mn>-1&&(Ut.splice(mn,1),this.renderViewport())}},{key:"attachLog",value:function(Wt){if(this.filterLog(Wt)&&!Wt.collapsed){var Ut=this.displayLogs;if(Ut.length===0)return Ut.push(Wt),void this.renderViewport();var mn=bs()(Ut);if(Wt.id>mn.id)return Ut.push(Wt),void this.renderViewport();for(var Dn,br=0,dr=Ut.length-1,_r=0;br<=dr;){if((Dn=Ut[_r=br+Math.floor((dr-br)/2)]).id===Wt.id)return;Dn.id0&&arguments[0]!==void 0?arguments[0]:20,mn=this.asyncList;this.asyncTimer||(this.asyncTimer=setTimeout(function(){Wt.asyncTimer=null;var Dn,br,dr=!1,_r=mn.length;_r<1e3?(br=200,Dn=400):_r<5e3?(br=500,Dn=800):_r<1e4?(br=800,Dn=1e3):_r<25e3?(br=1e3,Dn=1200):_r<5e4?(br=1500,Dn=1500):(br=2e3,Dn=2500),br>_r&&(br=_r,dr=!0);for(var Cr=0;Cr
0&&_r.length>dr&&(Wt.logs=_r.slice(_r.length-dr),Wt.render());break;case"filter":Wt.render();break;case"level":Wt.options.level=Zr()(dr),Wt.render()}}),this.$container.on("scroll",this.onScroll)}},{key:"_renderViewport",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ut=Wt.topTolerance,mn=Ut===void 0?500:Ut,Dn=Wt.bottomTolerance,br=Dn===void 0?500:Dn,dr=this.el,_r=this.container,Cr=this.space;if(!hn()(_r)){for(var Rr=_r.scrollTop,Yr=_r.offsetHeight,Gr=Cr.getBoundingClientRect().width,oo=Rr-mn,po=Rr+Yr+br,Ur=this.displayLogs,ao=0,yo=0,bo=0,So=Ur.length,Io=this.fakeEl,vo=document.createDocumentFragment(),Oo=[],Eo=0;Eo0){Io.appendChild(vo);for(var Co=0,Lo=Oo.length;Copo?yo+=jo:bo+jo>oo?Po.appendChild(Uo):bo`)}},{key:"formatTable",value:function(Wt){var Ut=Wt[0],mn=Wt[1],Dn=[];return fr()(mn)&&(mn=Zr()(mn)),kt()(mn)||(mn=null),Pn()(Ut)?(St()(Ut,function(br){Rn()(br)?Dn.push("__LunaConsoleValue"):Pn()(br)&&(Dn=Dn.concat(Ot()(br)))}),(Dn=Pt()(Dn)).sort(),mn&&(Dn=Dn.filter(function(br){return ct()(mn,br)})),Dn.length>20&&(Dn=Dn.slice(0,20)),_t()(Dn)?this.formatCommon(Wt):(this.columns=Dn,this.console.c('')+this.formatPreview(Ut))):this.formatCommon(Wt)}},{key:"formatErr",value:function(Wt){var Ut=Wt.stack?Wt.stack.split(`
+`):[],mn="".concat(Wt.message||Ut[0],"
");return Ut=Ut.map(function(Dn){return ut()(Dn)}),mn+'').concat(Ut.slice(1).join("
"),"
").replace(qr,function(Dn){return'').concat(Dn,"")})}},{key:"formatCommon",value:function(Wt){var Ut=this.console.c,mn=fr()(Wt[0])&&Wt.length!==1;mn&&(Wt=this.substituteStr(Wt));for(var Dn=0,br=Wt.length;Dn
').concat(ut()(ft()(dr)),""):Pn()(dr)?Wt[Dn]=this.formatPreview(dr):Pr()(dr)?Wt[Dn]='undefined'):kr()(dr)?Wt[Dn]='null'):Vn()(dr)?Wt[Dn]='').concat(ft()(dr),""):typeof dr=="bigint"?Wt[Dn]='').concat(ft()(dr),"n"):Dr()(dr)?Wt[Dn]='').concat(ft()(dr),""):Nr()(dr)?Wt[Dn]='').concat(ut()(ft()(dr)),""):(dr=ft()(dr),Dn===0&&mn||(dr=ut()(dr)),dr.length>5e3&&(dr=Mt()(dr,5e3,{separator:" ",ellipsis:"…"})),Wt[Dn]=dr)}return Wt.join(" ")}},{key:"formatDir",value:function(Wt){return Pn()(Wt[0])?this.formatPreview(Wt[0]):this.formatCommon(Wt)}},{key:"formatTableVal",value:function(Wt){var Ut=this.console.c;return Pn()(Wt)?"{…}":Rn()(Wt)?jr()('').concat(Ln(Wt),"
")):ft()(Wt)}},{key:"formatPreview",value:function(Wt){var Ut=this,mn=this.console.c,Dn=sn()();this.lazyEvaluation?this.objects[Dn]=Wt:this.extractObj(Wt,{},function(_r){Ut.objects[Dn]=_r});var br=ct()(["dir","table"],this.type),dr=zt(Wt);return dr==="Array"&&Wt.length>1?(dr="(".concat(Wt.length,")"),br&&(dr="Array".concat(dr))):dr==="RegExp"?dr=ft()(Wt):Gn()(Wt)&&(dr=this.formatElName(Wt)),'')+'
')+'
')+'
')+'').concat(ut()(dr)," ")+'').concat(br?"":Ln(Wt,{getterVal:this.accessGetter,unenumerable:!1}),"")+""+'
')}},{key:"substituteStr",value:function(Wt){var Ut=ut()(Wt[0]),mn=!1,Dn="";Wt.shift();for(var br=0,dr=Ut.length;br"),mn=!0,Dn+='');break;default:br--,Wt.unshift(Cr),Dn+=_r}}else Dn+=_r}return mn&&(Dn+=""),Wt.unshift(Dn),Wt}},{key:"formatJs",value:function(Wt){return'').concat(this.console.c(sr()(Wt,"js",eo)),"
")}},{key:"formatFn",value:function(Wt){return''.concat(this.formatJs(Wt.toString()),"
")}},{key:"formatElName",value:function(Wt){var Ut=Wt.id,mn=Wt.className,Dn=Wt.tagName.toLowerCase();if(Ut!==""&&(Dn+="#".concat(Ut)),fr()(mn)){var br="";St()(mn.split(/\s+/g),function(dr){dr.trim()!==""&&(br+=".".concat(dr))}),Dn+=br}return Dn}},{key:"formatEl",value:function(Wt){var Ut=sn()();return this.elements[Ut]=Wt,this.console.c(''))}}]),Sr}(Ht());function no(Er){var Hr=(Er=Et()(Er)).split(";"),Sr={};St()(Hr,function(Ut){if(ct()(Ut,":")){var mn=$(Ut.split(":"),2),Dn=mn[0],br=mn[1];Sr[Zt()(Dn)]=Zt()(br)}}),Sr.display="inline-block",Sr["max-width"]="100%",delete Sr.width,delete Sr.height;var Wt="";return St()(Sr,function(Ut,mn){Wt+="".concat(mn,":").concat(Ut,";")}),Wt}var io=d(1194),co=d.n(io),so=d(8847),fo=d.n(so),Ho=d(6329),Xo=d.n(Ho),vs=d(9001),_i=d.n(vs),ys=d(9702),bs=d.n(ys),Kr=d(2439),ws=d.n(Kr),ga=d(8933),xs=d.n(ga),_s=d(4407),Cs=d.n(_s),ks=d(5852),As=d.n(ks);function Ss(Er){var Hr=function(){if(typeof Reflect>"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}}();return function(){var Sr,Wt=(0,at.Z)(Er);if(Hr){var Ut=(0,at.Z)(this).constructor;Sr=Reflect.construct(Wt,arguments,Ut)}else Sr=Wt.apply(this,arguments);return(0,ot.Z)(this,Sr)}}var va,Es=function(Er){(0,nt.Z)(Sr,Er);var Hr=Ss(Sr);function Sr(Wt,Ut){var mn,Dn=Ut.compName,br=(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).theme,dr=br===void 0?"light":br;return(0,et.Z)(this,Sr),(mn=Hr.call(this)).subComponents=[],mn.compName=Dn,mn.c=_n(Dn),mn.options={},mn.container=Wt,mn.$container=It()(Wt),mn.$container.addClass(["luna-".concat(Dn),mn.c("platform-".concat(Tn()))]),mn.on("optionChange",function(_r,Cr,Rr){var Yr=mn.c;_r==="theme"&&(mn.$container.rmClass(Yr("theme-".concat(Rr))).addClass(Yr("theme-".concat(Cr))),St()(mn.subComponents,function(Gr){return Gr.setOption("theme",Cr)}))}),mn.setOption("theme",dr),mn}return(0,tt.Z)(Sr,[{key:"destroy",value:function(){this.destroySubComponents();var Wt=this.c;this.$container.rmClass("luna-".concat(this.compName)).rmClass(Wt("platform-".concat(Tn()))).rmClass(Wt("theme-".concat(this.options.theme))),this.$container.html(""),this.emit("destroy"),this.removeAllListeners()}},{key:"setOption",value:function(Wt,Ut){var mn=this,Dn=this.options,br={};typeof Wt=="string"?br[Wt]=Ut:br=Wt,St()(br,function(dr,_r){var Cr=Dn[_r];Dn[_r]=dr,mn.emit("optionChange",_r,dr,Cr)})}},{key:"getOption",value:function(Wt){return this.options[Wt]}},{key:"addSubComponent",value:function(Wt){Wt.setOption("theme",this.options.theme),this.subComponents.push(Wt)}},{key:"removeSubComponent",value:function(Wt){As()(this.subComponents,function(Ut){return Ut===Wt})}},{key:"destroySubComponents",value:function(){St()(this.subComponents,function(Wt){return Wt.destroy()}),this.subComponents=[]}},{key:"initOptions",value:function(Wt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};qn()(Wt,Ut),Xo()(this.options,Wt)}},{key:"find",value:function(Wt){return this.$container.find(this.c(Wt))}}]),Sr}(Ht()),Ts=d(1571),Ms=d.n(Ts);function Os(Er){var Hr=function(){if(typeof Reflect>"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}}();return function(){var Sr,Wt=(0,at.Z)(Er);if(Hr){var Ut=(0,at.Z)(this).constructor;Sr=Reflect.construct(Wt,arguments,Ut)}else Sr=Wt.apply(this,arguments);return(0,ot.Z)(this,Sr)}}b=d.hmd(b);var es=navigator.userAgent,js=es.indexOf("Android")>-1||es.indexOf("Adr")>-1,Rs=0,ts=function(Er){(0,nt.Z)(Sr,Er);var Hr=Os(Sr);function Sr(Wt){var Ut,mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,et.Z)(this,Sr),(Ut=Hr.call(this,Wt,{compName:"console"},mn)).spaceHeight=0,Ut.topSpaceHeight=0,Ut.bottomSpaceHeight=0,Ut.lastScrollTop=0,Ut.lastTimestamp=0,Ut.speedToleranceFactor=100,Ut.maxSpeedTolerance=2e3,Ut.minSpeedTolerance=100,Ut.logs=[],Ut.displayLogs=[],Ut.timer={},Ut.counter={},Ut.asyncList=[],Ut.asyncTimer=null,Ut.isAtBottom=!0,Ut.groupStack=new(_i()),Ut.selectedLog=null,Ut.onScroll=function(){var Dn=Ut.container,br=Dn.scrollHeight,dr=Dn.offsetHeight,_r=Dn.scrollTop;if(!(_r<=0||dr+_r>br)){var Cr=!1;(br===dr||_r===br-dr)&&(Cr=!0),Ut.isAtBottom=Cr;var Rr=Ut.lastScrollTop,Yr=Ut.lastTimestamp,Gr=fo()(),oo=Gr-Yr,po=_r-Rr,Ur=Math.abs(po/oo)*Ut.speedToleranceFactor;oo>1e3&&(Ur=1e3),Ur>Ut.maxSpeedTolerance&&(Ur=Ut.maxSpeedTolerance),Ur_r+dr+yo||Ut.renderViewport({topTolerance:2*ao,bottomTolerance:2*yo})}},Ut.initTpl(),Ut.initOptions(mn,{maxNum:0,asyncRender:!0,showHeader:!1,filter:"",level:["verbose","info","warning","error"],accessGetter:!1,unenumerable:!0,lazyEvaluation:!0}),Ut.$el=Ut.find(".logs"),Ut.el=Ut.$el.get(0),Ut.$fakeEl=Ut.find(".fake-logs"),Ut.fakeEl=Ut.$fakeEl.get(0),Ut.$space=Ut.find(".logs-space"),Ut.space=Ut.$space.get(0),js&&(Ut.speedToleranceFactor=800,Ut.maxSpeedTolerance=3e3,Ut.minSpeedTolerance=800),Ut.resizeSensor=new(qt())(Wt),Ut.renderViewport=ws()(function(Dn){Ut._renderViewport(Dn)},16),Ut.global={copy:function(Dn){fr()(Dn)||(Dn=JSON.stringify(Dn,null,2)),Hn()(Dn)},$:function(Dn){return document.querySelector(Dn)},$$:function(Dn){return Zr()(document.querySelectorAll(Dn))},$x:function(Dn){return xs()(Dn)},clear:function(){Ut.clear()},dir:function(Dn){Ut.dir(Dn)},table:function(Dn,br){Ut.table(Dn,br)},keys:Ot()},Ut.bindEvent(),Ut}return(0,tt.Z)(Sr,[{key:"setGlobal",value:function(Wt,Ut){this.global[Wt]=Ut}},{key:"destroy",value:function(){this.$container.off("scroll",this.onScroll),this.resizeSensor.destroy(),(0,rt.Z)((0,at.Z)(Sr.prototype),"destroy",this).call(this)}},{key:"count",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"default",Ut=this.counter;Pr()(Ut[Wt])?Ut[Wt]=1:Ut[Wt]++,this.info("".concat(Wt,": ").concat(Ut[Wt]))}},{key:"countReset",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"default";this.counter[Wt]=0}},{key:"assert",value:function(){for(var Wt=arguments.length,Ut=new Array(Wt),mn=0;mn0&&arguments[0]!==void 0?arguments[0]:"default";if(this.timer[Wt])return this.insert("warn",["Timer '".concat(Wt,"' already exists")]);this.timer[Wt]=co()()}},{key:"timeLog",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"default",Ut=this.timer[Wt];if(!Ut)return this.insert("warn",["Timer '".concat(Wt,"' does not exist")]);this.info("".concat(Wt,": ").concat(co()()-Ut,"ms"))}},{key:"timeEnd",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"default";this.timeLog(Wt),delete this.timer[Wt]}},{key:"clear",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.logs=[],this.displayLogs=[],this.selectLog(null),this.lastLog=void 0,this.counter={},this.timer={},this.groupStack=new(_i()),this.asyncList=[],this.asyncTimer&&(clearTimeout(this.asyncTimer),this.asyncTimer=null),Wt?this.render():this.insert("log",["%cConsole was cleared","color:#808080;font-style:italic;"])}},{key:"info",value:function(){for(var Wt=arguments.length,Ut=new Array(Wt),mn=0;mn0&&(Dn.group=_r.peek()),Xo()(Dn,{id:++Rs,accessGetter:Yr,unenumerable:Gr,lazyEvaluation:oo}),Dn.type==="group"||Dn.type==="groupCollapsed"){var po={id:sn()("group"),collapsed:!1,parent:_r.peek(),indentLevel:_r.size+1};Dn.type==="groupCollapsed"&&(po.collapsed=!0),Dn.targetGroup=po,_r.push(po)}var Ur=new to(this,Dn);Ur.on("updateHeight",function(){br.isAtBottom=!1,br.renderViewport()});var ao=this.lastLog;if(ao&&!ct()(["html","group","groupCollapsed"],Ur.type)&&ao.type===Ur.type&&Ur.isSimple()&&ao.text()===Ur.text()?(ao.addCount(),Ur.header&&ao.updateTime(Ur.header.time),Ur=ao,this.detachLog(ao)):(dr.push(Ur),this.lastLog=Ur),Rr!==0&&dr.length>Rr){var yo=dr[0];this.detachLog(yo),dr.shift()}this.attachLog(Ur),this.emit("insert",Ur)}},{key:"updateTopSpace",value:function(Wt){this.topSpaceHeight=Wt,this.el.style.top=Wt+"px"}},{key:"updateBottomSpace",value:function(Wt){this.bottomSpaceHeight=Wt}},{key:"updateSpace",value:function(Wt){this.spaceHeight!==Wt&&(this.spaceHeight=Wt,this.space.style.height=Wt+"px")}},{key:"detachLog",value:function(Wt){var Ut=this.displayLogs,mn=Ut.indexOf(Wt);mn>-1&&(Ut.splice(mn,1),this.renderViewport())}},{key:"attachLog",value:function(Wt){if(this.filterLog(Wt)&&!Wt.collapsed){var Ut=this.displayLogs;if(Ut.length===0)return Ut.push(Wt),void this.renderViewport();var mn=bs()(Ut);if(Wt.id>mn.id)return Ut.push(Wt),void this.renderViewport();for(var Dn,br=0,dr=Ut.length-1,_r=0;br<=dr;){if((Dn=Ut[_r=br+Math.floor((dr-br)/2)]).id===Wt.id)return;Dn.id0&&arguments[0]!==void 0?arguments[0]:20,mn=this.asyncList;this.asyncTimer||(this.asyncTimer=setTimeout(function(){Wt.asyncTimer=null;var Dn,br,dr=!1,_r=mn.length;_r<1e3?(br=200,Dn=400):_r<5e3?(br=500,Dn=800):_r<1e4?(br=800,Dn=1e3):_r<25e3?(br=1e3,Dn=1200):_r<5e4?(br=1500,Dn=1500):(br=2e3,Dn=2500),br>_r&&(br=_r,dr=!0);for(var Cr=0;Cr
0&&_r.length>dr&&(Wt.logs=_r.slice(_r.length-dr),Wt.render());break;case"filter":Wt.render();break;case"level":Wt.options.level=Zr()(dr),Wt.render()}}),this.$container.on("scroll",this.onScroll)}},{key:"_renderViewport",value:function(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ut=Wt.topTolerance,mn=Ut===void 0?500:Ut,Dn=Wt.bottomTolerance,br=Dn===void 0?500:Dn,dr=this.el,_r=this.container,Cr=this.space;if(!hn()(_r)){for(var Rr=_r.scrollTop,Yr=_r.offsetHeight,Gr=Cr.getBoundingClientRect().width,oo=Rr-mn,po=Rr+Yr+br,Ur=this.displayLogs,ao=0,yo=0,bo=0,So=Ur.length,Io=this.fakeEl,vo=document.createDocumentFragment(),Oo=[],Eo=0;Eo0){Io.appendChild(vo);for(var Co=0,Lo=Oo.length;Copo?yo+=jo:bo+jo>oo?Po.appendChild(Uo):bo
`])))))}}]),Sr}(Es),ns=function(){return Cs()("HH:MM:ss ")};function Is(){for(var Er=new Error,Hr="",Sr=Er.stack?Er.stack.split(`
-`):"",Wt=0,Ut=Sr.length;Wt