var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b'),$(c).html(b));getJSONCDS(a+"?limit="+h+"&page="+n+"&keyword="+k+l).done(function(g){$(c).html(parseHtml(f,h,g,e))})} function multiPageHelper(a,b,c,f,n,h,k,e,l,g,m,q){q=void 0===q?"":q;""!==f&&(f='
'),$(n).html(f));var d="";b&&b.constructor===Array&&(d=parseArrayArgs(b));$(h).html("");getJSONCDS(c+"?limit="+l+"&page="+e+"&keyword="+g+q).done(function(r){var t=!1,u="",p=r.pageCount,y=r.pageResults,w=e+1,v=e-1;var x=e+3;w>p&&(w=p);0==v&&(v=1);1p?(t=1,x=p):v==e-1?(t=e>=p-2?p-3:e-1,--x):t=e;u+='';u+='';for(i=t;i<=x;i++)i<=p&&(u+='");u+='';u+=''}$(n).html(parseHtml(k, y,r,m));$(h).html(u)})}var Comments=function(a,b,c,f,n,h,k,e,l){this.assetid=a;this.commentsid=b;this.commentscontainer=c;this.buttonscontainer=f;this.successid=n;this.errorid=h;this.inputid=k;this.messageDelay=e;this.newObject=l;var g=this;getJSONCDS("https://api.alphaland.cc/game/info?id="+this.assetid).done(function(m){m.CommentsEnabled&&($(g.commentsid).show(),g.commentsPage())})}; Comments.prototype.commentsPage=function(a){multiPageHelper(this.newObject+".commentsPage",[],"https://api.alphaland.cc/comments/","https://api.alphaland.cc/logo",this.commentscontainer,this.buttonscontainer,'
Comment by {username} : {date}

{comment}

', void 0===a?1:a,10,"","No comments","&assetId="+this.assetid)};Comments.prototype.submitComment=function(a){var b=this;postJSONCDS("https://api.alphaland.cc/comments/newcomment?assetId="+this.assetid,JSON.stringify({comment:a})).done(function(c){c=c.alert;var f=b.errorid;"Comment Placed"==c&&(f=b.successid,$(b.inputid).val(""),b.commentsPage());$(f).text(c);$(f).show();window.scrollTo({top:0,behavior:"smooth"});setTimeout(function(){$(f).hide()},b.messageDelay)})};