diff --git a/lib/direct-node.min.js b/lib/direct-node.min.js index d9c8c65..2942cf8 100755 --- a/lib/direct-node.min.js +++ b/lib/direct-node.min.js @@ -1,12 +1 @@ -!function(e,t){"use strict";function n(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}function i(e){return e instanceof Array?function(){return _.iter(e)}:"function"==typeof e.iterator?r(e,e.iterator):e.iterator}function r(e,t){if(null==t)return null;null==t.__id__&&(t.__id__=sa++);var n;return null==e.hx__closures__?e.hx__closures__={}:n=e.hx__closures__[t.__id__],null==n&&(n=function(){return n.method.apply(n.scope,arguments)},n.scope=e,n.method=t,e.hx__closures__[t.__id__]=n),n}var a={},o=function(){return jr.__string_rec(this,"")},s=e.DirectAPI=function(){this.eventEmitter=new c,require("unorm")};a.DirectAPI=s,s.__name__=["DirectAPI"],s.getInstance=function(){return null==s.instance&&(s.instance=new s),s.instance},s.main=function(){},s.prototype={setOptions:function(e){null!=e&&(la.host=e.host,la.endpoint=e.endpoint,la.accessToken=e.access_token,la.proxyURL=e.proxyURL,la.account=e.account,la.talkWithBot=e.talkWithBot,la.name=e.name,la.storagePath=e.storage_path,la.storageQuota=e.storage_quota,la.wsConfig=e.ws_config),si._d("["+_.dateStr(new Date)+"] ","current settings",la,"","",""),null==la.accessToken&&si._e("["+_.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},announce:function(e,t){var n,i=e.room;if(null!=i){var r,a=i.split("_");if(a.length>2){r=new Cn(v.parseInt(a[1]),v.parseInt(a[2]))}else r=null;if(null==r||null==t)return;var o=this.data.getTalk(r);if(null==o)return;n=o.domainId}else{var s=e.id.split("_");if(s.length>2){n=new Cn(v.parseInt(s[1]),v.parseInt(s[2]))}else n=null}null!=n&&this.sendQueue.sendAnnouncement(n,t)},send:function(e,t){var n,i=e.room,r=i.split("_");if(r.length>2){n=new Cn(v.parseInt(r[1]),v.parseInt(r[2]))}else n=null;null!=n&&null!=t&&this.sendQueue.sendMessage(n,t)},topic:function(e,t){var n,i=e.room,r=i.split("_");if(r.length>2){n=new Cn(v.parseInt(r[1]),v.parseInt(r[2]))}else n=null;this.facade.sendNotification("Talk",Ee.UPDATE(n,null,t))},download:function(e,t,n){var i,r=null,a=null;if("string"==typeof t?i=t:(i=t.url,r=t.path,a=t.name),null==i)return void n(null);null==a&&(a=Wr.basename(i)),null==r&&(r=Wr.join(Gr.tmpdir(),a)),this.facade.sendNotification("File",re.DOWNLOAD_PATH(i,r,n))},leave:function(e,t){var n,i=this,r=e.room,a=r.split("_");if(a.length>2){var o=new Cn(v.parseInt(a[1]),v.parseInt(a[2]));n=o}else n=null;var s;if(null==t)s=null;else{var l=t.id.split("_");if(l.length>2){var u=new Cn(v.parseInt(l[1]),v.parseInt(l[2]));s=u}else s=null}vr.delay(function(){i.facade.sendNotification("Talk",Ee.DELETE(n,null,s))},500)},userForId:function(e){return this.hubotObject.userObjectByIdStr(null,e)},userObjects:function(){return this.hubotObject.userObjects(null)},talkObjects:function(){return this.hubotObject.talkObjects()},domainObjects:function(){return this.hubotObject.domainObjects()},parseInt64:function(e){return e.length>0&&"_"==e.charAt(0)?M.makeFromIdStr(e):M.parse(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:pr.toString(e)},listen:function(){this.facade=A.getInstance(),this.api=jr.__cast(this.facade.retrieveProxy("api"),Ei),this.data=jr.__cast(this.facade.retrieveProxy("dataStore"),Di),this.hubotObject=jr.__cast(this.facade.retrieveProxy("hubotObject"),ur),this.sendQueue=jr.__cast(this.facade.retrieveProxy("sendQueue"),hr),this.facade.startup()},emit:function(e,t,n,i){this.eventEmitter.emit(e,t,n,i)},on:function(e,t){return this.eventEmitter.on(e,t)},getDomainInvites:function(e){this.api._getDomainInvites(e)},acceptDomainInvite:function(e){this.api.acceptDomainInvite(e)},__class__:s};var l=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};a.EReg=l,l.__name__=["EReg"],l.prototype={match:function(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:function(e){if(null!=this.r.m&&e>=0&&e=e.length)break;if(!this.matchSub(e,n)){i+=v.string(_.substr(e,n,null));break}var r=this.matchedPos();if(i+=v.string(_.substr(e,n,r.pos-n)),i+=v.string(t(this)),0==r.len?(i+=v.string(_.substr(e,r.pos,1)),n=r.pos+1):n=r.pos+r.len,!this.r.global)break}return!this.r.global&&n>0&&nt?1:-1},g.isObject=function(e){if(null==e)return!1;var t=typeof e;return"string"==t||"object"==t&&null==e.__enum__||"function"==t&&null!=(e.__name__||e.__ename__)},g.isEnumValue=function(e){return null!=e&&null!=e.__enum__},g.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var v=function(){};a.Std=v,v.__name__=["Std"],v.string=function(e){return jr.__string_rec(e,"")},v.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=_.cca(e,1)&&88!=_.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t};var y=function(){this.b=""};a.StringBuf=y,y.__name__=["StringBuf"],y.prototype={toString:function(){return this.b},__class__:y};var S=function(){};a.StringTools=S,S.__name__=["StringTools"],S.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},S.startsWith=function(e,t){return e.length>=t.length&&_.substr(e,0,t.length)==t},S.replace=function(e,t,n){return e.split(t).join(n)},S.hex=function(e,t){for(var n="",i="0123456789ABCDEF";;)if(n=i.charAt(15&e)+n,!((e>>>=4)>0))break;if(null!=t)for(;n.lengtht;){var i=_.substr(e,0,t);n.push(i),e=_.substr(e,t,null)}e.length>0&&n.push(e)},r="",a=e.split("\n");a.length>0;){var o=a.shift();r.length+o.length>t&&(i(r),r=""),r.length>0&&(r+="\n"),r+=o}return i(r),n};var T=a.ValueType={__ename__:["ValueType"],__constructs__:["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"]};T.TNull=["TNull",0],T.TNull.toString=o,T.TNull.__enum__=T,T.TInt=["TInt",1],T.TInt.toString=o,T.TInt.__enum__=T,T.TFloat=["TFloat",2],T.TFloat.toString=o,T.TFloat.__enum__=T,T.TBool=["TBool",3],T.TBool.toString=o,T.TBool.__enum__=T,T.TObject=["TObject",4],T.TObject.toString=o,T.TObject.__enum__=T,T.TFunction=["TFunction",5],T.TFunction.toString=o,T.TFunction.__enum__=T,T.TClass=function(e){var t=["TClass",6,e];return t.__enum__=T,t.toString=o,t},T.TEnum=function(e){var t=["TEnum",7,e];return t.__enum__=T,t.toString=o,t},T.TUnknown=["TUnknown",8],T.TUnknown.toString=o,T.TUnknown.__enum__=T,T.__empty_constructs__=[T.TNull,T.TInt,T.TFloat,T.TBool,T.TObject,T.TFunction,T.TUnknown];var I=function(){};a.Type=I,I.__name__=["Type"],I.getClassName=function(e){var t=e.__name__;return null==t?null:t.join(".")},I.getEnumName=function(e){return e.__ename__.join(".")},I.resolveClass=function(e){var t=a[e];return null!=t&&t.__name__?t:null},I.resolveEnum=function(e){var t=a[e];return null!=t&&t.__ename__?t:null},I.createInstance=function(e,t){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);case 8:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]);case 9:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]);case 10:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9]);case 11:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10]);case 12:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11]);case 13:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12]);case 14:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13]);default:throw new Br("Too many arguments")}},I.createEmptyInstance=function(e){function t(){}return t.prototype=e.prototype,new t},I.createEnum=function(e,t,n){var i=g.field(e,t);if(null==i)throw new Br("No such constructor "+t);if(g.isFunction(i)){if(null==n)throw new Br("Constructor "+t+" need parameters");return i.apply(e,n)}if(null!=n&&0!=n.length)throw new Br("Constructor "+t+" does not need parameters");return i},I.typeof=function(e){switch(typeof e){case"boolean":return T.TBool;case"function":return e.__name__||e.__ename__?T.TObject:T.TFunction;case"number":return Math.ceil(e)==e%2147483648?T.TInt:T.TFloat;case"object":if(null==e)return T.TNull;var t=e.__enum__;if(null!=t)return T.TEnum(t);var n=jr.getClass(e);return null!=n?T.TClass(n):T.TObject;case"string":return T.TClass(String);case"undefined":return T.TNull;default:return T.TUnknown}},I.enumEq=function(e,t){if(e==t)return!0;try{if(e[0]!=t[0])return!1;for(var n=2,i=e.length;n=0?i:i+4294967296),a=new Date(r);return t.getFullYear()==a.getFullYear()&&t.getMonth()==a.getMonth()&&t.getDate()==a.getDate()?a.getHours()+":"+(a.getMinutes()<10?"0":"")+a.getMinutes():D.dateString(a,!1)},D.datetimeStringIn11Chars=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=4294967296*n+(i>=0?i:i+4294967296),a=new Date(r),o=D.dateString(a,!1);return t.getFullYear()==a.getFullYear()&&(o+=" "+a.getHours()+":"+(a.getMinutes()<10?"0":"")+a.getMinutes()),o},D.timeString=function(e){if(null==e)return"";var t=e.high,n=e.low,i=4294967296*t+(n>=0?n:n+4294967296),r=new Date(i);return r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()},D.datetimeString=function(e){if(null==e)return"";var t=parseFloat(pr.toString(e)),n=new Date(t);return n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate()+" "+n.getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes()};var C=function(){};a["albero.FileDynamicHelper"]=C,C.__name__=["albero","FileDynamicHelper"],C.filterDeleted=function(e){return null==e?[]:e.filter(C.isNotDeleted)},C.isNotDeleted=function(e){return null==e.deleted||!e.deleted},C.createFileInfoDynamic=function(e,t,n,i){var r={url:i.get_url,content_type:e.type,content_size:e.size,name:t,file_id:i.file_id};return U.foreach(n,function(e){null!=e.auth&&(r.thumbnail_url=e.auth.get_url),null!=e.dimension&&(r.thumbnail_dimension=e.dimension.toObject())}),r};var O=function(){};a["albero.FileHelper"]=O,O.__name__=["albero","FileHelper"],O.createByteSizeStringWithUnit=function(e){for(var t,n=["","K","M","G","T"];;){if(!((t=e/1024|0)>0))break;e=t,n.shift()}return e+" "+n.shift()+"B"};var R=function(){};a["albero.History"]=R,R.__name__=["albero","History"],R.replaceState=function(e,t,n){return null!=window.history&&(window.history.replaceState(e,t,n),!0)};var M=function(){};a["albero.Int64Helper"]=M,M.__name__=["albero","Int64Helper"],M.parse=function(e){if(!new l("^\\d+$","").match(e))return null;for(var t=new Cn(0,0),n=t,i=new Cn(0,10),r=i,a=0,o=e.length;a>>16,_=65535&r.low,h=r.low>>>16,d=mr._mul(u,_),f=mr._mul(c,_),m=mr._mul(u,h),p=mr._mul(c,h),g=d,y=(p+(m>>>16)|0)+(f>>>16)|0;if(m<<=16,g=g+m|0,mr.ucompare(g,m)<0){y++;y|=0}if(f<<=16,g=g+f|0,mr.ucompare(g,f)<0){y++;y|=0}y=y+(mr._mul(n.low,r.high)+mr._mul(n.high,r.low)|0)|0;var S=new Cn(y,g),w=S,T=new Cn(0,v.parseInt(e.charAt(s))),I=T,E=w.high+I.high|0,b=w.low+I.low|0;if(mr.ucompare(b,w.low)<0){E++;E|=0}n=new Cn(E,b)}return n},M.getHigh=function(e){return e.high},M.getLow=function(e){return e.low},M.idStr=function(e){return"_"+e.high+"_"+e.low},M.makeFromIdStr=function(e){var t=new l("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Cn(v.parseInt(t.matched(1)),v.parseInt(t.matched(2))):null},M.toStr=function(e){return pr.toString(e)},M.isNeg=function(e){return e.high<0},M.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(mr.ucompare(i,e.low)<0){n++;n|=0}return new Cn(n,i)},M.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(mr.ucompare(e.low,t.low)<0){n--;n|=0}return new Cn(n,i)},M.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:mr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:t.high>=0?n:1},M.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},M.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},M.toFloat=function(e){var t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)},M.idStrToInt64=function(e){var t=e.split("_");if(t.length>2){return new Cn(v.parseInt(t[1]),v.parseInt(t[2]))}return null},M.decrement=function(e){if(null==e)return null;var t=new Cn(0,1),n=t,i=e.high-n.high|0,r=e.low-n.low|0;if(mr.ucompare(e.low,n.low)<0){i--;i|=0}return new Cn(i,r)},M.increment=function(e){if(null==e)return null;var t=new Cn(0,1),n=t,i=e.high+n.high|0,r=e.low+n.low|0;if(mr.ucompare(r,e.low)<0){i++;i|=0}return new Cn(i,r)},M.unique=function(e){if(null==e)return[];for(var t=[],n=0,i=e.length;n>31,t)},M.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;nt?1:e0&&a.push(new Gt(d.id,f))}}}else{for(var w=[],T=(_.iter(n),0);T0&&a.push(new Gt(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:be});var Ae=function(){q.call(this)};a["albero.command.UpdateUserCommand"]=Ae,Ae.__name__=["albero","command","UpdateUserCommand"],Ae.__super__=q,Ae.prototype=n(q.prototype,{execute:function(e){var t=e.getBody();(null==t.profileImage||S.startsWith(t.profileImage.type,"image/"))&&this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:Ae});var Ne=function(){q.call(this)};a["albero.command.UpdateUserPresencesCommand"]=Ne,Ne.__name__=["albero","command","UpdateUserPresencesCommand"],Ne.__super__=q,Ne.prototype=n(q.prototype,{execute:function(e){var t=e.getBody().domainId,n=e.getBody().userIds;if(null!=t&&null!=n){var i=this.filterOnlyExpired(M.unique(n));0!=i.length&&this.updateIfNeedPerSub(t,i)}},filterOnlyExpired:function(e){var t=this,n=D.nowAsInt64(),i=this.settings.getConfiguration().presenceExpiration,r=new Cn(i>>31,i),a=r;return e.filter(function(e){var i=U.map(t.userPresences.getUserPresence(e),function(e){return e.isExpired(n,a)});switch(i[1]){case 0:return i[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:Ne});var ke=function(){q.call(this)};a["albero.command.UrlCommand"]=ke,ke.__name__=["albero","command","UrlCommand"],ke.__super__=q,ke.prototype=n(q.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:ke});var De=a["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};De.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=De,t.toString=o,t},De.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=De,t.toString=o,t},De.BACK=["BACK",2],De.BACK.toString=o,De.BACK.__enum__=De,De.__empty_constructs__=[De.BACK];var Ce=function(e,t,n){this.email=e,this.pass=t,this.accessToken=n};a["albero.entity.Account"]=Ce,Ce.__name__=["albero","entity","Account"],Ce.prototype={__class__:Ce};var Oe=function(e){null!=e&&(this.id=e.id,this.group=new Re(e.group),this.profilePolicy=new Me(e.profile_policy))};a["albero.entity.AccountControlGroup"]=Oe,Oe.__name__=["albero","entity","AccountControlGroup"],Oe.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:Oe};var Re=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};a["albero.entity.AccountControlGroupGroup"]=Re,Re.__name__=["albero","entity","AccountControlGroupGroup"],Re.prototype={__class__:Re};var Me=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};a["albero.entity.AccountControlGroupProfilePolicy"]=Me,Me.__name__=["albero","entity","AccountControlGroupProfilePolicy"],Me.prototype={__class__:Me};var xe=function(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Re(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Me(e.profile_policy)))};a["albero.entity.AccountControlGroupPartialUpdate"]=xe,xe.__name__=["albero","entity","AccountControlGroupPartialUpdate"],xe.prototype={__class__:xe};var Fe=function(e){null!=e&&(this.id=M.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)};a["albero.entity.AccountControlRequest"]=Fe,Fe.__name__=["albero","entity","AccountControlRequest"],Fe.prototype={__class__:Fe};var Ue=a["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ue.ng=["ng",0],Ue.ng.toString=o,Ue.ng.__enum__=Ue,Ue.ok=["ok",1],Ue.ok.toString=o,Ue.ok.__enum__=Ue,Ue.image=["image",2],Ue.image.toString=o,Ue.image.__enum__=Ue,Ue.imageOrVideo=["imageOrVideo",3],Ue.imageOrVideo.toString=o,Ue.imageOrVideo.__enum__=Ue,Ue.imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ue.imageOrVideoOrAudio.toString=o,Ue.imageOrVideoOrAudio.__enum__=Ue,Ue.other=["other",5],Ue.other.toString=o,Ue.other.__enum__=Ue,Ue.__empty_constructs__=[Ue.ng,Ue.ok,Ue.image,Ue.imageOrVideo,Ue.imageOrVideoOrAudio,Ue.other];var Pe=function(e){this.value=e};a["albero.entity.AllowAttachmentType"]=Pe,Pe.__name__=["albero","entity","AllowAttachmentType"],Pe.fromInt=function(e){if(null==e)return new Pe(Ue.other);var t;if(null==e)t=Ue.other;else switch(e){case 0:t=Ue.ng;break;case 1:t=Ue.ok;break;case 2:t=Ue.image;break;case 3:t=Ue.imageOrVideo;break;case 4:t=Ue.imageOrVideoOrAudio;break;default:t=Ue.other}return new Pe(t)},Pe.fromValue=function(e){return new Pe(e)},Pe.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),e.compareStrongness(t)>0?e.createAttachmentErrorMessageByNetwork(n):t.createAttachmentErrorMessageByDomain(n)},Pe.prototype={compareStrongness:function(e){return this.getStrongness()-e.getStrongness()},getStrongness:function(){switch(this.value[1]){case 0:return 40;case 2:return 30;case 3:return 20;case 4:return 10;case 1:case 5:return 0}},createAttachmentErrorMessageByDomain:function(e){switch(null==e&&(e=""),this.value[1]){case 0:return oi.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return oi.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return oi.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return oi.localize("AllowAttachmentType.ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentErrorMessageByNetwork:function(e){switch(null==e&&(e=""),this.value[1]){case 0:return oi.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return oi.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return oi.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return oi.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie_sound")+e;default:return""}},__class__:Pe};var Le=function(e){null!=e&&(this.id=e.announcement_id,this.domainId=e.domain_id,this.groupId=e.group_id,this.groupName=e.group_name,this.type=At.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)};a["albero.entity.Announcement"]=Le,Le.__name__=["albero","entity","Announcement"],Le.prototype={getDisplayTextWithoutEscape:function(){return At.getDisplayTextWithoutEscape(this.type,this.content)},getNotificatoinTextWithoutEscape:function(e){switch(null==e&&(e=this.userName),null==e&&(e=""),this.type[1]){case 1:case 6:return e+":"+this.getDisplayTextWithoutEscape();default:return si._e("["+_.dateStr(new Date)+"] ","Unsupported announcement.type is detected. announcment:%o",this,"","",""),At.getUnsupportText()}},__class__:Le};var Be=function(e){this.unreadCount=0,null!=e&&(this.domainId=e.domain_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.maxAnnouncementId=e.max_announcement_id,null!=e.max_announcement&&(this.maxAnnouncement=new Le(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};a["albero.entity.AnnouncementStatus"]=Be,Be.__name__=["albero","entity","AnnouncementStatus"],Be.prototype={updateReadWithStatusUpdate:function(e){var t=0,n=null;if(null!=e.readAnnouncementIds)for(var i=0,r=e.readAnnouncementIds;i=0?l:1)>0}else o=!0;if(o){var u;if(null!=n){var c=a.high-n.high|0;c=0!=c?c:mr.ucompare(a.low,n.low),u=(a.high<0?n.high<0?c:-1:n.high>=0?c:1)>0}else u=!0;u&&(n=a),++t}}null!=n&&this.read(n,t)},read:function(e,t){this.maxReadAnnouncementId=e,this.unreadCount-=t,this.unreadCount<0&&(this.unreadCount=0);var n=this.domainId,i=this.maxReadAnnouncementId,r=this.unreadCount;si._d("["+_.dateStr(new Date)+"] ","Announcement status is updated. [domainId, maxReadAnnoundementId, unreadCount]:",n,i,r,"")}, -readAll:function(){this.maxReadAnnouncementId=this.maxAnnouncementId,this.unreadCount=0},__class__:Be};var je=function(){};a["albero.entity.AnnouncementStatusHelper"]=je,je.__name__=["albero","entity","AnnouncementStatusHelper"],je.isUnreadAnnouncementExisted=function(e){if(null==e)return!1;if(null==e.maxAnnouncement)return!1;if(null==e.maxReadAnnouncementId)return!0;var t=e.maxAnnouncement.id,n=e.maxReadAnnouncementId,i=t.high-n.high|0;return i=0!=i?i:mr.ucompare(t.low,n.low),(t.high<0?n.high<0?i:-1:n.high>=0?i:1)>0},je.isUnread=function(e,t){if(null!=e.maxReadAnnouncementId){var n=e.maxReadAnnouncementId,i=n.high-t.high|0;return i=0!=i?i:mr.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<0}return!0},je.isNewMax=function(e,t){if(null!=e.maxAnnouncementId){var n=e.maxAnnouncementId,i=n.high-t.high|0;return i=0!=i?i:mr.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<0}return!0},je.isMax=function(e,t){if(null!=e.maxAnnouncementId){var n=e.maxAnnouncementId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low}return!1},je.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var He=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};a["albero.entity.AnnouncementStatusUpdate"]=He,He.__name__=["albero","entity","AnnouncementStatusUpdate"],He.prototype={__class__:He};var ze=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.talkAutoScroll=1,this.keywordWatchingText="",this.keywordWatchingEmphasis=!1,this.keywordWatchingSelfMessage=!1,this.keywordWatchingActionReply=!1,this.userDataContainer=[],this.language="ja",this.conferenceIncomingSound=!0,null!=e){if(null!=e.notificationInvisibleTalkSound&&(this.notificationInvisibleTalkSound=e.notificationInvisibleTalkSound),null!=e.notificationInvisibleTalkPopup&&(this.notificationInvisibleTalkPopup=e.notificationInvisibleTalkPopup),null!=e.notificationVisibleTalkSound&&(this.notificationVisibleTalkSound=e.notificationVisibleTalkSound),null!=e.notificationVisibleTalkPopup&&(this.notificationVisibleTalkPopup=e.notificationVisibleTalkPopup),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.keywordWatchingText&&(this.keywordWatchingText=e.keywordWatchingText),null!=e.keywordWatchingEmphasis&&(this.keywordWatchingEmphasis=e.keywordWatchingEmphasis),null!=e.keywordWatchingSelfMessage&&(this.keywordWatchingSelfMessage=e.keywordWatchingSelfMessage),null!=e.keywordWatchingActionReply&&(this.keywordWatchingActionReply=e.keywordWatchingActionReply),null!=e.userDataContainer)for(var t=0,n=jr.__cast(e.userDataContainer,Array);t=0?n:n+4294967296)+We.INCOMING_TIME<(new Date).getTime()},isExpired:function(){var e=this.expiredAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)<(new Date).getTime()},__class__:We};var Ke=function(e){null!=e&&(this.maxFriends=e.max_friends,this.maxTalks=e.max_talks,this.maxTalkers=e.max_talkers,this.maxMessageContentLength=e.max_message_content_length,this.botExpiredVersion=e.bot_expired_version,this.presenceExpiration=null!=e.presence_expiration?e.presence_expiration:Ke.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Pe.fromInt(e.allow_attachment_type))};a["albero.entity.Configuration"]=Ke,Ke.__name__=["albero","entity","Configuration"],Ke.prototype={__class__:Ke};var Ye=function(e){this.contractConference=Ar.None,null!=e&&(this.id=e.contract_id,this.plan=new Lt(e.plan),this.quota=new Jt(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=Ar.Some(new Ve(e.conference))))};a["albero.entity.Contract"]=Ye,Ye.__name__=["albero","entity","Contract"],Ye.prototype={getMaxMessageContentLength:function(){return U.map(U.option(this.quota),function(e){return e.maxMessageContentLength})},getMaxTalkers:function(){return U.flatMap(U.option(this.quota),function(e){return U.option(e.maxTalkers)})},isConferenceEnalbed:function(){return U.isDefined(this.contractConference)},isVideoEnalbed:function(){var e=U.map(this.contractConference,function(e){return e.videoEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},getConferenceTtl:function(){return U.map(this.contractConference,function(e){return e.ttl})},getConferenceMaxParticipants:function(){return U.map(this.contractConference,function(e){return e.maxConferenceParticipants})},__class__:Ye};var Ve=function(e){this.maxConferenceParticipants=Ve.DEFAULT_MAX_PARTICIPANTS,this.ttl=Ve.DEFAULT_TTL,this.videoEnabled=!1,null!=e&&(this.videoEnabled=e.video_enabled,this.ttl=e.ttl,this.maxConferenceParticipants=e.max_conference_participants)};a["albero.entity.ContractConference"]=Ve,Ve.__name__=["albero","entity","ContractConference"],Ve.prototype={__class__:Ve};var qe=function(e){if(null!=e){this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?Je.Normal:this.parseDepartmentNodeType(e.node);switch(this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=qe.getLabelRoot();break;case 2:this.name=qe.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};a["albero.entity.Department"]=qe,qe.__name__=["albero","entity","Department"],qe.getLabelFree=function(){return oi.localize("Department.label_free")},qe.getLabelRoot=function(){return oi.localize("Department.label_root")},qe.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==Je.Root},isFree:function(){return this.nodeType==Je.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return Je.Root;case 2:return Je.Free;default:return Je.Normal}},__class__:qe};var Qe=function(){};a["albero.entity.DepartmentHelper"]=Qe,Qe.__name__=["albero","entity","DepartmentHelper"],Qe.getName=function(e){return null==e?null:e.name};var Je=a["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};Je.Normal=["Normal",0],Je.Normal.toString=o,Je.Normal.__enum__=Je,Je.Root=["Root",1],Je.Root.toString=o,Je.Root.__enum__=Je,Je.Free=["Free",2],Je.Free.toString=o,Je.Free.__enum__=Je,Je.__empty_constructs__=[Je.Normal,Je.Root,Je.Free];var Xe=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};a["albero.entity.DepartmentList"]=Xe,Xe.__name__=["albero","entity","DepartmentList"],Xe.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new qe(e)})},__class__:Xe};var Ze=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};a["albero.entity.DepartmentUserCount"]=Ze,Ze.__name__=["albero","entity","DepartmentUserCount"],Ze.prototype={__class__:Ze};var $e=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};a["albero.entity.DepartmentUserCountList"]=$e,$e.__name__=["albero","entity","DepartmentUserCountList"],$e.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new Ze(e)})},__class__:$e};var et=function(e){null!=e&&(this.id=e.domain_id,this.updatedAt=e.updated_at,this.domainInfo=new tt(e.domain),this.contract=new Ye(e.contract),this.profileDefinition=new jt(e.profile_definition),this.setting=new nt(e.setting),this.role=new rt(e.role),this.closed=!1)};a["albero.entity.Domain"]=et,et.__name__=["albero","entity","Domain"],et.isChangedContractTreeEnabled=function(e,t){return et.isDepartmentEnabled(e)!=et.isDepartmentEnabled(t)},et.isDepartmentEnabled=function(e){return null!=e&&(!!et.isAllowListUser(e)&&!!e.setting.contactTreeEnabled)},et.isAllowListUser=function(e){return null==e||e.role.allowListUsers},et.isChangedRoleType=function(e,t){return(null==e?at.user:e.role.type)!=(null==t?at.user:t.role.type)},et.isChangedMaxTalkers=function(e,t){var n,i=U.flatMap(U.option(e),function(e){return e.getMaxTalkers()});switch(i[1]){case 0:n=i[2];break;case 1:n=0}var r,a=U.flatMap(U.option(t),function(e){return e.getMaxTalkers()});switch(a[1]){case 0:r=a[2];break;case 1:r=0}return n!=r},et.isAllowReadAnnouncement=function(e){return null!=e&&!!e.role.allowReadAnnouncements},et.prototype={getMaxMessageContentLengthOrElse:function(e){var t=U.flatMap(U.option(this.contract),function(e){return e.getMaxMessageContentLength()});switch(t[1]){case 0:return t[2];case 1:return e}},getMaxTalkers:function(){return U.flatMap(U.option(this.contract),function(e){return e.getMaxTalkers()})},__class__:et};var tt=function(e){null!=e&&(this.name=e.domain_name,this.logoUrl=e.logo_url,this.frozen=e.frozen)};a["albero.entity.DomainInfo"]=tt,tt.__name__=["albero","entity","DomainInfo"],tt.prototype={__class__:tt};var nt=function(e){null!=e&&(this.allowAttachmentType=Pe.fromInt(e.allow_attachment_type),this.allowSaveAttachmentsToDevice=e.allow_save_attachments_to_device,null!=e.allow_save_attachments&&(this.allowSaveAttachments=new it(e.allow_save_attachments)),this.allowForwardMessageType=this.allowForwardMessageTypeOf(e.allow_forward_message_type),this.contactTreeEnabled=!!e.contact_tree_enabled)};a["albero.entity.DomainSetting"]=nt,nt.__name__=["albero","entity","DomainSetting"],nt.prototype={allowForwardMessageTypeOf:function(e){switch(e){case 0:return ot.ng;case 1:return ot.ok;case 2:return ot.onlyTextOrStamp;default:return ot.other}},__class__:nt};var it=function(e){null!=e&&(this.web=null==e.web||e.web,this.ios=null==e.ios||e.ios,this.android=null==e.android||e.android,this.desktop=null==e.desktop||e.desktop)};a["albero.entity.DomainSettingAllowSaveAttachments"]=it,it.__name__=["albero","entity","DomainSettingAllowSaveAttachments"],it.prototype={__class__:it};var rt=function(e){if(null!=e){this.type=this.typeOf(e.type);var t=e.allow_guests;this.allowGuests=t||!0;var n=e.allow_create_attachments;this.allowCreateAttachments=n||!0;var i=e.allow_read_attachments;this.allowReadAttachments=i||!0;var r=e.allow_create_announcement;this.allowCreateAnnouncement=r&&r,this.allowReadAnnouncements=e.allow_read_announcements,null==this.allowReadAnnouncements&&(this.allowReadAnnouncements=!0),this.allowListUsers=e.allow_list_users,null==this.allowListUsers&&(this.allowListUsers=!0)}};a["albero.entity.DomainRole"]=rt,rt.__name__=["albero","entity","DomainRole"],rt.prototype={def:function(e,t){return e||t},typeOf:function(e){switch(e){case 10:return at.owner;case 20:return at.manager;case 30:return at.user;default:return at.guest}},__class__:rt};var at=a["albero.entity.DomainRoleType"]={__ename__:["albero","entity","DomainRoleType"],__constructs__:["owner","manager","user","guest"]};at.owner=["owner",0],at.owner.toString=o,at.owner.__enum__=at,at.manager=["manager",1],at.manager.toString=o,at.manager.__enum__=at,at.user=["user",2],at.user.toString=o,at.user.__enum__=at,at.guest=["guest",3],at.guest.toString=o,at.guest.__enum__=at,at.__empty_constructs__=[at.owner,at.manager,at.user,at.guest];var ot=a["albero.entity.DomainAllowForwardMessageType"]={__ename__:["albero","entity","DomainAllowForwardMessageType"],__constructs__:["ng","ok","onlyTextOrStamp","other"]};ot.ng=["ng",0],ot.ng.toString=o,ot.ng.__enum__=ot,ot.ok=["ok",1],ot.ok.toString=o,ot.ok.__enum__=ot,ot.onlyTextOrStamp=["onlyTextOrStamp",2],ot.onlyTextOrStamp.toString=o,ot.onlyTextOrStamp.__enum__=ot,ot.other=["other",3],ot.other.toString=o,ot.other.__enum__=ot,ot.__empty_constructs__=[ot.ng,ot.ok,ot.onlyTextOrStamp,ot.other];var st=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=e.departments)};a["albero.entity.DomainDepartmentPath"]=st,st.__name__=["albero","entity","DomainDepartmentPath"],st.prototype={__class__:st};var lt=function(e){null!=e&&(this.id=e.domain_id,this.name=e.domain_name,this.accountControlRequestId=M.fromIntOrInt64(e.account_control_request_id),this.updatedAt=e.updated_at)};a["albero.entity.DomainInvite"]=lt,lt.__name__=["albero","entity","DomainInvite"],lt.prototype={__class__:lt};var ut=function(e){null!=e&&(this.id=e.user_id,this.status=e.status,this.displayName=e.display_name,this.canonicalDisplayName=e.canonical_display_name,this.phoneticDisplayName=e.phonetic_display_name,this.canonicalPhoneticDisplayName=e.canonical_phonetic_display_name,this.profileImageUrl=e.profile_image_url,this.updatedAt=e.updated_at)};a["albero.entity.User"]=ut,ut.__name__=["albero","entity","User"],ut.prototype={__class__:ut};var ct=function(e){ut.call(this,e),null!=e&&(this.domainId=e.domain_id,null!=e.profile_contact&&(this.profileContact=jr.__cast(e.profile_contact,Array).map(function(e){return new zt(e)})),this.departments=e.departments)};a["albero.entity.DomainUser"]=ct,ct.__name__=["albero","entity","DomainUser"],ct.__super__=ut,ct.prototype=n(ut.prototype,{match:function(e,t){if(this.matchNameOrPhonetic(e))return!0;if(null!=this.profileContact&&null!=t.profileDefinition.itemDefinitions)for(var n=0,i=this.profileContact;n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){if(L.isEmpty(e))return!0;if(L.isEmpty(this.canonicalDisplayName)){this.canonicalDisplayName=hi.canonicalize(this.displayName);var t=this.canonicalDisplayName,n=this.displayName;si._d("["+_.dateStr(new Date)+"] ","create canonical display name from %s to %s.",t,n,"","")}return this.canonicalDisplayName.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&this.canonicalPhoneticDisplayName.indexOf(e)>-1},matchNameOrPhoneticRoman:function(e){if(this.matchNameOrPhonetic(e))return!0;if(L.isEmpty(this.canonicalDisplayNameRoman)){this.canonicalDisplayNameRoman=hi.canonicalizeForRoman(this.displayName);var t=this.canonicalDisplayNameRoman,n=this.displayName;si._d("["+_.dateStr(new Date)+"] ","create canonical display name(roman) from %s to %s.",t,n,"","")}return this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(L.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=hi.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1)},__class__:ct});var _t=function(e){this.values=e};a["albero.entity.Domains"]=_t,_t.__name__=["albero","entity","Domains"],_t.prototype={orderByName:function(){var e=F.sortAndReturn(this.values.map(ht.fromDomain),ht.compare).map(ht.toDomain);return new _t(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?Ar.None:h.fold(this.values,function(e,t){switch(U.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:mr.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0})[1]){case 0:return U.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:mr.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return Ar.Some(e)}},Ar.None)},__class__:_t};var ht=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=hi.canonicalize(this.name)};a["albero.entity.DomainForSort"]=ht,ht.__name__=["albero","entity","DomainForSort"],ht.fromDomain=function(e){return new ht(e)},ht.toDomain=function(e){return e.domain},ht.compare=function(e,t){var n=L.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:L.compare(e.name,t.name)},ht.prototype={__class__:ht};var dt=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new ft(e.get_headers))};a["albero.entity.DownloadAuth"]=dt,dt.__name__=["albero","entity","DownloadAuth"],dt.prototype={__class__:dt};var ft=function(e){this.rawData=e};a["albero.entity.DownloadAuthHeaders"]=ft,ft.__name__=["albero","entity","DownloadAuthHeaders"],ft.prototype={createGetRequest:function(e){var t=new XMLHttpRequest;t.open("GET",e);for(var n=0,i=g.fields(this.rawData);n0||this.credential.ttl0?this.content.text:"";case 3:case 4:return"";case 5:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 6:return"";case 11:return[this.content.question,oi.localize("MessageStringMaker.yes"),oi.localize("MessageStringMaker.no")].join(" ");case 12:return e&&null!=this.content.response?this.content.response?oi.localize("MessageStringMaker.yes"):oi.localize("MessageStringMaker.no"):"";case 13:return null!=this.content.options?v.string(this.content.question)+" "+v.string(this.content.options.join(" ")):this.content.question;case 14:return e&&null!=this.content.response&&null!=this.content.options&&this.content.options.length>this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,oi.localize("MessageStringMaker.achieve"),oi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?oi.localize("MessageStringMaker.achieve"):oi.localize("MessageStringMaker.remand"):"";case 17:case 18:case 19:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 2:if(null!=this.content.text&&this.content.text.length>0)return[oi.localize("Message.bookmark_label_stamp"),this.content.text].join(" ");break;case 5:if(null!=this.content.text&&this.content.text.length>0)return this.content.text;break;case 6:return oi.localize("Message.bookmark_label_deleted");case 7:return[oi.localize("Message.bookmark_label_note_shared"),new kt(this.content).title].join(" ");case 9:return[oi.localize("Message.bookmark_label_note_created"),new kt(this.content).title].join(" ");case 10:return[oi.localize("Message.bookmark_label_note_updated"),new kt(this.content).title].join(" ");case 11:case 13:return[oi.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 12:case 14:return[oi.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 15:return[oi.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 16:return[this.content.done?oi.localize("Message.bookmark_label_completed"):oi.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 17:case 18:return[oi.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 19: -return[oi.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 7:case 9:case 10:return Ar.Some(new kt(this.content));default:return Ar.None}},getContentsForNoteDelete:function(){return 8==this.type[1]?Ar.Some(new Dt(this.content)):Ar.None},isAllowedToDelete:function(e){return!!(this.isSentBy(e)&&this.isNotSystemMessage()&&this.isNotActionStampMessage()&&this.isNotNoteMessage())&&this.isNotDeletedMessage()},isAllowedToReply:function(e){return!(!this.isNotSentBy(e)||!this.isNotSystemMessage())&&this.isNotDeletedMessage()},isAllowedToQuote:function(e){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotFileMessage()&&this.isNotStampMessageWithEmptyText())&&this.isNotTextMultipleFileWithEmptyText()},isAllowedToCopy:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotFileMessage()&&this.isNotStampMessageWithEmptyText())&&this.isNotTextMultipleFileWithEmptyText()},isAllowedToForward:function(e){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotActionStampMessage()&&this.isNotDeletedFileMessage(e)&&this.isNotTextMultipleFileAllDeletedWithEmptyText(e)&&this.isNotNoteMessage())&&this.isNotOpenConference()},isAllowedToForwardOnOnlyTextOrStamp:function(){return!(!this.isTextMessage()&&!this.isStampMessage())||this.isTextMultipleFileWithText()},isAllowedToAddToFavorites:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotOpenConference()&&this.isNotStampMessageWithEmptyText()&&this.isNotNoteDeletedMessage())&&this.isNotFavorite()},isAllowedToRemoveFromFavorites:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotOpenConference()&&this.isNotStampMessageWithEmptyText()&&this.isNotNoteDeletedMessage())&&this.isFavorite()},isSentBy:function(e){var t=this.userId;return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},isNotSentBy:function(e){return!this.isSentBy(e)},isSystemMessage:function(){return this.type==Nt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==Nt.yesOrNo||this.type==Nt.yesOrNoReply||this.type==Nt.selectOne||this.type==Nt.selectOneReply||this.type==Nt.todo||this.type==Nt.todoDone||this.type==Nt.yesOrNoClosed||this.type==Nt.selectOneClosed||this.type==Nt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==Nt.selectOneReply||this.type==Nt.yesOrNoReply||this.type==Nt.todoDone},isClosedActionStampMessage:function(){return this.type==Nt.yesOrNoClosed||this.type==Nt.selectOneClosed||this.type==Nt.todoClosed},isSendingActionStampMessage:function(){return this.type==Nt.yesOrNo||this.type==Nt.selectOne||this.type==Nt.todo},isNoteMessage:function(){return this.type==Nt.noteShared||this.type==Nt.noteDeleted||this.type==Nt.noteCreated||this.type==Nt.noteUpdated},isNoteDeletedMessage:function(){return this.type==Nt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==Nt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==Nt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==Nt.stamp},isNotStampMessage:function(){return!this.isStampMessage()},isStampMessageWithEmptyText:function(){return!!this.isStampMessage()&&this.isObjectWithEmptyText()},isNotStampMessageWithEmptyText:function(){return!!this.isNotStampMessage()||this.isNotObjectWithEmptyText()},isObjectWithEmptyText:function(){return L.isEmpty(this.content.text)},isNotObjectWithEmptyText:function(){return!this.isObjectWithEmptyText()},isTextMultipleFile:function(){return this.type==Nt.textMultipleFile},isNotTextMultipleFile:function(){return!this.isTextMultipleFile()},isTextMultipleFileWithText:function(){return!!this.isTextMultipleFile()&&this.isNotObjectWithEmptyText()},isTextMultipleFileWithEmptyText:function(){return!!this.isTextMultipleFile()&&this.isObjectWithEmptyText()},isNotTextMultipleFileWithEmptyText:function(){return!!this.isNotTextMultipleFile()||this.isNotObjectWithEmptyText()},isNotDeletedFileMessage:function(e){return!!this.isNotFileMessage()||!e},isNotTextMultipleFileAllDeletedWithEmptyText:function(e){return!!this.isNotTextMultipleFileWithEmptyText()||!e},isTextMessage:function(){return this.type==Nt.text},isOpenConference:function(){return this.type==Nt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){var e=this.type;return si._i("["+_.dateStr(new Date)+"] ",e,"","","",""),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?Ar.Some(this.content.in_reply_to):Ar.None},isNotFavorite:function(){return!this.isFavorite()},isFavorite:function(){return this.favorite.isFavorite()},isNotCalloutHolder:function(){return!(!this.isFileMessage()&&!this.isTextMultipleFileWithEmptyText())||this.isStampMessageWithEmptyText()},close:function(){this.content.closed=!0},updateFavorite:function(e){this.favorite.update(e)},addReadUsersUntillMaxCount:function(e){var t=this;if(!(this.readUserIds.length>=16)){var n=e.filter(function(e){return M.notContains(t.readUserIds,e)});this.readUserIds=this.readUserIds.concat(n).slice(0,16)}},createReadCountText:function(){return this.readUserIds.length>=16?"15+":v.string(this.readUserIds.length)},hasNoReadUsers:function(){return 0==this.readUserIds.length},__class__:At};var Nt=a["albero.entity.MessageType"]={__ename__:["albero","entity","MessageType"],__constructs__:["system","text","stamp","geo","file","textMultipleFile","deleted","noteShared","noteDeleted","noteCreated","noteUpdated","yesOrNo","yesOrNoReply","selectOne","selectOneReply","todo","todoDone","yesOrNoClosed","selectOneClosed","todoClosed","openConference","phoneCall","phoneReceive","unknown"]};Nt.system=["system",0],Nt.system.toString=o,Nt.system.__enum__=Nt,Nt.text=["text",1],Nt.text.toString=o,Nt.text.__enum__=Nt,Nt.stamp=["stamp",2],Nt.stamp.toString=o,Nt.stamp.__enum__=Nt,Nt.geo=["geo",3],Nt.geo.toString=o,Nt.geo.__enum__=Nt,Nt.file=["file",4],Nt.file.toString=o,Nt.file.__enum__=Nt,Nt.textMultipleFile=["textMultipleFile",5],Nt.textMultipleFile.toString=o,Nt.textMultipleFile.__enum__=Nt,Nt.deleted=["deleted",6],Nt.deleted.toString=o,Nt.deleted.__enum__=Nt,Nt.noteShared=["noteShared",7],Nt.noteShared.toString=o,Nt.noteShared.__enum__=Nt,Nt.noteDeleted=["noteDeleted",8],Nt.noteDeleted.toString=o,Nt.noteDeleted.__enum__=Nt,Nt.noteCreated=["noteCreated",9],Nt.noteCreated.toString=o,Nt.noteCreated.__enum__=Nt,Nt.noteUpdated=["noteUpdated",10],Nt.noteUpdated.toString=o,Nt.noteUpdated.__enum__=Nt,Nt.yesOrNo=["yesOrNo",11],Nt.yesOrNo.toString=o,Nt.yesOrNo.__enum__=Nt,Nt.yesOrNoReply=["yesOrNoReply",12],Nt.yesOrNoReply.toString=o,Nt.yesOrNoReply.__enum__=Nt,Nt.selectOne=["selectOne",13],Nt.selectOne.toString=o,Nt.selectOne.__enum__=Nt,Nt.selectOneReply=["selectOneReply",14],Nt.selectOneReply.toString=o,Nt.selectOneReply.__enum__=Nt,Nt.todo=["todo",15],Nt.todo.toString=o,Nt.todo.__enum__=Nt,Nt.todoDone=["todoDone",16],Nt.todoDone.toString=o,Nt.todoDone.__enum__=Nt,Nt.yesOrNoClosed=["yesOrNoClosed",17],Nt.yesOrNoClosed.toString=o,Nt.yesOrNoClosed.__enum__=Nt,Nt.selectOneClosed=["selectOneClosed",18],Nt.selectOneClosed.toString=o,Nt.selectOneClosed.__enum__=Nt,Nt.todoClosed=["todoClosed",19],Nt.todoClosed.toString=o,Nt.todoClosed.__enum__=Nt,Nt.openConference=["openConference",20],Nt.openConference.toString=o,Nt.openConference.__enum__=Nt,Nt.phoneCall=["phoneCall",21],Nt.phoneCall.toString=o,Nt.phoneCall.__enum__=Nt,Nt.phoneReceive=["phoneReceive",22],Nt.phoneReceive.toString=o,Nt.phoneReceive.__enum__=Nt,Nt.unknown=["unknown",23],Nt.unknown.toString=o,Nt.unknown.__enum__=Nt,Nt.__empty_constructs__=[Nt.system,Nt.text,Nt.stamp,Nt.geo,Nt.file,Nt.textMultipleFile,Nt.deleted,Nt.noteShared,Nt.noteDeleted,Nt.noteCreated,Nt.noteUpdated,Nt.yesOrNo,Nt.yesOrNoReply,Nt.selectOne,Nt.selectOneReply,Nt.todo,Nt.todoDone,Nt.yesOrNoClosed,Nt.selectOneClosed,Nt.todoClosed,Nt.openConference,Nt.phoneCall,Nt.phoneReceive,Nt.unknown];var kt=function(e){null!=e&&(this.noteId=new Qn(e.note_id),this.title=e.title,this.revision=e.revision,this.deleted=e.deleted)};a["albero.entity.MessageContentForNote"]=kt,kt.__name__=["albero","entity","MessageContentForNote"],kt.prototype={__class__:kt};var Dt=function(e){null!=e&&(this.noteId=new Qn(e.note_id),this.title=e.title)};a["albero.entity.MessageContentForNoteDeleted"]=Dt,Dt.__name__=["albero","entity","MessageContentForNoteDeleted"],Dt.prototype={__class__:Dt};var Ct=function(e){null!=e&&(this.talkId=e[0],this.messageId=e[1])};a["albero.entity.MessageDeletion"]=Ct,Ct.__name__=["albero","entity","MessageDeletion"],Ct.prototype={__class__:Ct};var Ot=function(e){this.id=e.message_id,this.talkId=e.talk_id,this.readUserIds=null==e.read_user_ids?[]:e.read_user_ids,this.unreadUserIds=null==e.unread_user_ids?[]:e.unread_user_ids};a["albero.entity.MessageReadStatus"]=Ot,Ot.__name__=["albero","entity","MessageReadStatus"],Ot.prototype={__class__:Ot};var Rt=function(e){this.talkId=e.talk_id,this.messageIds=e.message_ids,this.readUserIds=null==e.read_user_ids?[]:e.read_user_ids,this.messageIdsExcludingUnreadCountTargets=e.message_ids_excluding_unread_count_targets,null==this.messageIdsExcludingUnreadCountTargets&&(this.messageIdsExcludingUnreadCountTargets=[])};a["albero.entity.MessageReadStatusesUpdate"]=Rt,Rt.__name__=["albero","entity","MessageReadStatusesUpdate"],Rt.prototype={__class__:Rt};var Mt=a["albero.entity.MessagesOrder"]={__ename__:["albero","entity","MessagesOrder"],__constructs__:["asc","desc"]};Mt.asc=["asc",0],Mt.asc.toString=o,Mt.asc.__enum__=Mt,Mt.desc=["desc",1],Mt.desc.toString=o,Mt.desc.__enum__=Mt,Mt.__empty_constructs__=[Mt.asc,Mt.desc];var xt=function(){};a["albero.entity.MessagesOrderProc"]=xt,xt.__name__=["albero","entity","MessagesOrderProc"],xt.orderToInt=function(e){switch(e[1]){case 0:return 1;case 1:return 2}};var Ft=a["albero.entity.PaneType"]={__ename__:["albero","entity","PaneType"],__constructs__:["SingleTalkPane","MultiTalkPane1","MultiTalkPane2","MultiTalkPane3"]};Ft.SingleTalkPane=["SingleTalkPane",0],Ft.SingleTalkPane.toString=o,Ft.SingleTalkPane.__enum__=Ft,Ft.MultiTalkPane1=["MultiTalkPane1",1],Ft.MultiTalkPane1.toString=o,Ft.MultiTalkPane1.__enum__=Ft,Ft.MultiTalkPane2=["MultiTalkPane2",2],Ft.MultiTalkPane2.toString=o,Ft.MultiTalkPane2.__enum__=Ft,Ft.MultiTalkPane3=["MultiTalkPane3",3],Ft.MultiTalkPane3.toString=o,Ft.MultiTalkPane3.__enum__=Ft,Ft.__empty_constructs__=[Ft.SingleTalkPane,Ft.MultiTalkPane1,Ft.MultiTalkPane2,Ft.MultiTalkPane3];var Ut=function(){};a["albero.entity.PaneTypeHelper"]=Ut,Ut.__name__=["albero","entity","PaneTypeHelper"],Ut.toPanePrefix=function(e){switch(e[1]){case 0:return"";case 1:return"multi1-";case 2:return"multi2-";case 3:return"multi3-"}},Ut.getPaneType=function(e){switch(e){case 0:return Ft.SingleTalkPane;case 1:return Ft.MultiTalkPane1;case 2:return Ft.MultiTalkPane2;case 3:return Ft.MultiTalkPane3;default:return null}},Ut.getMultiPaneType=function(e){switch(e){case 0:return Ft.MultiTalkPane1;case 1:return Ft.MultiTalkPane2;case 2:return Ft.MultiTalkPane3;default:return Ft.MultiTalkPane1}},Ut.getMultiPaneTypes=function(){return[Ft.MultiTalkPane1,Ft.MultiTalkPane2,Ft.MultiTalkPane3]};var Pt=function(e){null!=e&&(this.expiration=e.expiration,this.warning=e.warning)};a["albero.entity.PasswordExpiration"]=Pt,Pt.__name__=["albero","entity","PasswordExpiration"],Pt.prototype={isExpired:function(e){return this.timeOvered(this.expiration,e)},needWarning:function(e,t){return!!this.timeOveredOrNotExist(t,e)&&this.timeOvered(this.warning,e)},timeOvered:function(e,t){if(null!=e){var n=t.high-e.high|0;return n=0!=n?n:mr.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)>0}return!1},timeOveredOrNotExist:function(e,t){return null==e||this.timeOvered(e,t)},__class__:Pt};var Lt=function(e){null!=e&&(this.name=e.plan_name,this.trial=e.trial)};a["albero.entity.Plan"]=Lt,Lt.__name__=["albero","entity","Plan"],Lt.prototype={__class__:Lt};var Bt=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=jr.__cast(e.item_values,Array).map(function(e){return new zt(e)})))};a["albero.entity.Profile"]=Bt,Bt.__name__=["albero","entity","Profile"],Bt.prototype={__class__:Bt};var jt=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=jr.__cast(e.item_definitions,Array);t=0?r:1},pn.compareTalkConsideredFavorite=function(e,t){var n=e.getTalkOrderInFavorites(),i=t.getTalkOrderInFavorites();return null!=n&&null!=i?pn.compareTalkOrderingTimestamp(e,t):null!=n?1:null!=i?-1:pn.compareTalkOrderingTimestamp(e,t)},pn.prototype={getTalkOrderingTimestamp:function(){return null!=this.status&&null!=this.status.talkOrderingTimestamp?this.status.talkOrderingTimestamp:this.talk.updatedAt},getTalkOrderInFavorites:function(){return null!=this.status?this.status.orderInFavorites:null},__class__:pn};var gn=function(e,t){this.paneType=e,this.talkSelection=t};a["albero.entity.TalkPaneSelection"]=gn,gn.__name__=["albero","entity","TalkPaneSelection"],gn.createArrayForMultiPanes=function(e){return h.mapi(e,function(e,t){return new gn(Ut.getMultiPaneType(e),t)})},gn.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return B.talks(e,j.single(this.talkSelection));case 1:var n=r(t,t.getTalkSelection),i=e,a=function(e){return n(i,e)},o=Ut.getMultiPaneTypes().map(a);return o[0]=this.talkSelection,B.talks(e,j.multi(o));case 2:var s=r(t,t.getTalkSelection),l=e,u=function(e){return s(l,e)},c=Ut.getMultiPaneTypes().map(u);return c[1]=this.talkSelection,B.talks(e,j.multi(c));case 3:var _=r(t,t.getTalkSelection),h=e,d=function(e){return _(h,e)},f=Ut.getMultiPaneTypes().map(d);return f[2]=this.talkSelection,B.talks(e,j.multi(f))}},__class__:gn};var vn=function(){};a["albero.entity.ITalkSelectionGetter"]=vn,vn.__name__=["albero","entity","ITalkSelectionGetter"],vn.prototype={__class__:vn};var yn=function(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.version=e.version)};a["albero.entity.TalkPushNotificationEvent"]=yn, -yn.__name__=["albero","entity","TalkPushNotificationEvent"],yn.prototype={__class__:yn};var Sn=a["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};Sn.NotSelected=["NotSelected",0],Sn.NotSelected.toString=o,Sn.NotSelected.__enum__=Sn,Sn.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=Sn,n.toString=o,n},Sn.AnnouncementsSelected=["AnnouncementsSelected",2],Sn.AnnouncementsSelected.toString=o,Sn.AnnouncementsSelected.__enum__=Sn,Sn.__empty_constructs__=[Sn.NotSelected,Sn.AnnouncementsSelected];var wn=function(){};a["albero.entity.TalkSelectionHelper"]=wn,wn.__name__=["albero","entity","TalkSelectionHelper"],wn.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=wn.getTalkIdOrNull(e),r=wn.getTalkIdOrNull(t);n=null==i&&null==r||null!=i&&null!=r&&i.high==r.high&&i.low==r.low}else n=!1;if(n){var a=wn.getMessageIdOrNull(e),o=wn.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},wn.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:var n=(e[3],e[2]),i=U.orNull(mn.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==fn.annoucements}},wn.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},wn.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return U.orNull(t);case 2:return null}};var Tn=function(e){this.unreadCount=0,null!=e&&(this.id=e.talk_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.maxMessageId=e.max_message_id,null!=e.max_message?this.maxMessage=new At(e.max_message):this.maxMessage=null,this.maxReadMessageId=e.max_read_message_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.talkOrderingTimestamp=e.talk_ordering_timestamp,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version,this.pushNotificationSetting=new Wt(e.push_notification))};a["albero.entity.TalkStatus"]=Tn,Tn.__name__=["albero","entity","TalkStatus"],Tn.prototype={update:function(e){var t=this,n=!1;return this.needIdUpdate(this.maxEveryoneReadMessageId,e.maxEveryoneReadMessageId)&&(this.maxEveryoneReadMessageId=e.maxEveryoneReadMessageId,n=!0),U.foreach(e.maxReadMessageId,function(e){t.needIdUpdate(t.maxReadMessageId,e)&&(t.maxReadMessageId=e,n=!0)}),n},needIdUpdate:function(e,t){if(null!=t){if(null!=e){var n=e.high-t.high|0;return n=0!=n?n:mr.ucompare(e.low,t.low),(e.high<0?t.high<0?n:-1:t.high>=0?n:1)<0}return!0}return!1},read:function(e,t){this.maxReadMessageId=e,this.unreadCount-=t,this.unreadCount<0&&(this.unreadCount=0)},readAll:function(){this.maxReadMessageId=this.maxMessageId,this.unreadCount=0},__class__:Tn};var In=function(){};a["albero.entity.TalkStatusHelper"]=In,In.__name__=["albero","entity","TalkStatusHelper"],In.isNotificationDisabled=function(e){return null!=e&&null!=e.pushNotificationSetting&&!e.pushNotificationSetting.enabled},In.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},In.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&In.isUnread(e,e.maxMessage.id))},In.isUnread=function(e,t){if(null!=e.maxReadMessageId){var n=e.maxReadMessageId,i=n.high-t.high|0;return i=0!=i?i:mr.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<0}return!0},In.isNewMax=function(e,t){if(null!=e.maxMessageId){var n=e.maxMessageId,i=n.high-t.high|0;return i=0!=i?i:mr.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<0}return!0},In.isMax=function(e,t){if(null!=e.maxMessageId){var n=e.maxMessageId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low}return!1};var En=function(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=U.option(e.max_read_message_id))};a["albero.entity.TalkStatusUpdate"]=En,En.__name__=["albero","entity","TalkStatusUpdate"],En.prototype={__class__:En};var bn=function(e,t,n){this.file=e,this.dimension=An.createWithSize(t,n),this.auth=null};a["albero.entity.ThumbInfo"]=bn,bn.__name__=["albero","entity","ThumbInfo"],bn.prototype={setAuth:function(e){this.auth=e},__class__:bn};var An=function(e){null!=e&&(this.width=e.width,this.height=e.height)};a["albero.entity.ThumbDimension"]=An,An.__name__=["albero","entity","ThumbDimension"],An.createWithSize=function(e,t){var n=new An;return n.width=e,n.height=t,n},An.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:An};var Nn=a["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL"]};Nn.PROFILE_IMAGE=["PROFILE_IMAGE",0],Nn.PROFILE_IMAGE.toString=o,Nn.PROFILE_IMAGE.__enum__=Nn,Nn.MESSAGE=["MESSAGE",1],Nn.MESSAGE.toString=o,Nn.MESSAGE.__enum__=Nn,Nn.TALK_ICON=["TALK_ICON",2],Nn.TALK_ICON.toString=o,Nn.TALK_ICON.__enum__=Nn,Nn.THUMBNAIL=["THUMBNAIL",3],Nn.THUMBNAIL.toString=o,Nn.THUMBNAIL.__enum__=Nn,Nn.__empty_constructs__=[Nn.PROFILE_IMAGE,Nn.MESSAGE,Nn.TALK_ICON,Nn.THUMBNAIL];var kn=function(){};a["albero.entity.UploadUseTypeHelper"]=kn,kn.__name__=["albero","entity","UploadUseTypeHelper"],kn.getUseTypeInt=function(e){switch(e[1]){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4}};var Dn=function(e){null!=e&&(null!=e.user_id&&(this.userId=e.user_id),null!=e.email&&(this.email=e.email),null!=e.sub_email&&(this.subEmail=e.sub_email),null!=e.group_alias&&(this.groupAlias=e.group_alias),null!=e.signin_id&&(this.signinId=e.signin_id))};a["albero.entity.UserIdentifier"]=Dn,Dn.__name__=["albero","entity","UserIdentifier"],Dn.prototype={__class__:Dn};var Cn=function(e,t){this.high=e,this.low=t};a["haxe._Int64.___Int64"]=Cn,Cn.__name__=["haxe","_Int64","___Int64"],Cn.prototype={__class__:Cn};var On=function(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=U.option(e.last_used_at))};a["albero.entity.UserPresence"]=On,On.__name__=["albero","entity","UserPresence"],On.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(mr.ucompare(t.low,e.low)<0){n--;n|=0}var r=new Cn(n,i),a=r,o=On.SIXTY_MINUTES,s=a.high-o.high|0;if(s=0!=s?s:mr.ucompare(a.low,o.low),(a.high<0?o.high<0?s:-1:o.high>=0?s:1)>0)return Rn.GT_60;var l=On.FIFTEEN_MINUTES,u=a.high-l.high|0;return u=0!=u?u:mr.ucompare(a.low,l.low),(a.high<0?l.high<0?u:-1:l.high>=0?u:1)>0?Rn.LT_OR_EQ_60:Rn.LT_OR_EQ_15},On.prototype={toState:function(e){var t=e,n=function(e){return On.createUserPresenceState(e,t)},i=U.map(this.lastUsedAtOpt,n);switch(i[1]){case 0:return i[2];case 1:return Rn.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(mr.ucompare(e.low,n.low)<0){i--;i|=0}var a=new Cn(i,r),o=a,s=o.high-t.high|0;return s=0!=s?s:mr.ucompare(o.low,t.low),(o.high<0?t.high<0?s:-1:t.high>=0?s:1)>0},__class__:On};var Rn=a["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};Rn.LT_OR_EQ_15=["LT_OR_EQ_15",0],Rn.LT_OR_EQ_15.toString=o,Rn.LT_OR_EQ_15.__enum__=Rn,Rn.LT_OR_EQ_60=["LT_OR_EQ_60",1],Rn.LT_OR_EQ_60.toString=o,Rn.LT_OR_EQ_60.__enum__=Rn,Rn.GT_60=["GT_60",2],Rn.GT_60.toString=o,Rn.GT_60.__enum__=Rn,Rn.__empty_constructs__=[Rn.LT_OR_EQ_15,Rn.LT_OR_EQ_60,Rn.GT_60];var Mn=function(e){this.success=e};a["albero.entity.api.message.AddFavoriteMessageResult"]=Mn,Mn.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],Mn.prototype={__class__:Mn};var xn=function(e){this.success=e};a["albero.entity.api.message.DeleteFavoriteMessageResult"]=xn,xn.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],xn.prototype={__class__:xn};var Fn=function(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r};a["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=Fn,Fn.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],Fn.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:Fn};var Un=function(e){this.note=new Yn(e)};a["albero.entity.api.note.CreateNoteResult"]=Un,Un.__name__=["albero","entity","api","note","CreateNoteResult"],Un.prototype={__class__:Un};var Pn=function(e){this.result=e};a["albero.entity.api.note.DeleteNoteResult"]=Pn,Pn.__name__=["albero","entity","api","note","DeleteNoteResult"],Pn.prototype={__class__:Pn};var Ln=function(e){this.note=new Yn(e)};a["albero.entity.api.note.GetNoteResult"]=Ln,Ln.__name__=["albero","entity","api","note","GetNoteResult"],Ln.prototype={getNoteId:function(){return this.note.noteId},getNoteCreateUserId:function(){return this.note.createdBy},getRevisionCreateUserId:function(){return this.note.getRevisionCreateUserId()},getNoteCreateDate:function(){return this.note.createdAt},getRevisionCreateDate:function(){return this.note.getRevisionCreateDate()},__class__:Ln};var Bn=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=F.asArray(e.contents).map(function(e){return new ti(e)}))};a["albero.entity.api.note.GetNoteStatusesResult"]=Bn,Bn.__name__=["albero","entity","api","note","GetNoteStatusesResult"],Bn.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:Bn};var jn=function(e){this.note=new Yn(e)};a["albero.entity.api.note.UpdateNoteResult"]=jn,jn.__name__=["albero","entity","api","note","UpdateNoteResult"],jn.prototype={__class__:jn};var Hn=function(e){this.note=new Yn(e)};a["albero.entity.api.note.UpdateNoteSettingResult"]=Hn,Hn.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],Hn.prototype={__class__:Hn};var zn=function(){};a["albero.entity.message.IFavoriteMessageEvent"]=zn,zn.__name__=["albero","entity","message","IFavoriteMessageEvent"],zn.prototype={__class__:zn};var Gn=function(e){this.message=new At(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};a["albero.entity.message.AddFavoriteMessageEvent"]=Gn,Gn.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Gn.__interfaces__=[zn],Gn.prototype={getMessage:function(){return this.message},getMessageId:function(){return this.message.id},isFavorite:function(){return!0},getDomainId:function(){return this.domainId},__class__:Gn};var Wn=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};a["albero.entity.message.DeleteFavoriteMessageEvent"]=Wn,Wn.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Wn.__interfaces__=[zn],Wn.prototype={getMessageId:function(){return this.messageId},isFavorite:function(){return!1},__class__:Wn};var Kn=function(e){if(null==e)return this.favorite=!1,this.createdAt=null,void(this.tags=[]);this.favorite=!0,this.createdAt=e.created_at,this.tags=e.tags};a["albero.entity.message.MessageFavorite"]=Kn,Kn.__name__=["albero","entity","message","MessageFavorite"],Kn.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:Kn};var Yn=function(e){null!=e&&(this.noteId=new Qn(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new ei(e.setting),this.noteRevision=new Zn(e.note_revision))};a["albero.entity.note.Note"]=Yn,Yn.__name__=["albero","entity","note","Note"],Yn.prototype={isSameNoteId:function(e){return this.noteId.equals(e)},getRevisionCreateUserId:function(){return this.noteRevision.createdBy},getRevisionCreateDate:function(){return this.noteRevision.createdAt},compareRevision:function(e){return this.noteRevision.compareRevision(e)},__class__:Yn};var Vn=a["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT"]};Vn.TEXT=["TEXT",0],Vn.TEXT.toString=o,Vn.TEXT.__enum__=Vn,Vn.__empty_constructs__=[Vn.TEXT];var qn=function(){};a["albero.entity.note.NoteContentTypeHelper"]=qn,qn.__name__=["albero","entity","note","NoteContentTypeHelper"],qn.createNoteContentType=function(e){return null==e?(si._e("["+_.dateStr(new Date)+"] ","no value.","","","",""),null):1==e?Vn.TEXT:(si._e("["+_.dateStr(new Date)+"] ","value is not expected.","","","",""),null)},qn.getValue=function(e){return null==e?(si._e("["+_.dateStr(new Date)+"] ","no content type.","","","",""),null):1};var Qn=function(e){this.value=e};a["albero.entity.note.NoteId"]=Qn,Qn.__name__=["albero","entity","note","NoteId"],Qn.__interfaces__=[St],Qn.prototype={toString:function(){var e=this.value;return"_"+e.high+"_"+e.low},equals:function(e){if(null==e)return!1;var t=this.value,n=e.value;return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},getHtmlAttributeId:function(){return"note-"+this.toString()},__class__:Qn};var Jn=function(e){null!=e&&(this.noteId=new Qn(e.note_id),this.talkId=e.talk_id,this.setting=new ei(e.setting))};a["albero.entity.note.NotePartialUpdateForSetting"]=Jn,Jn.__name__=["albero","entity","note","NotePartialUpdateForSetting"],Jn.prototype={__class__:Jn};var Xn=function(e){null!=e&&(this.noteId=new Qn(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new $n(e.note_revision_summary))};a["albero.entity.note.NotePartialUpdateForSummary"]=Xn,Xn.__name__=["albero","entity","note","NotePartialUpdateForSummary"],Xn.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:Xn};var Zn=function(e){null!=e&&(this.revision=e.revision,this.title=e.title,this.contentType=qn.createNoteContentType(e.content_type),this.content=e.content,this.createdBy=e.created_by,this.createdAt=e.created_at)};a["albero.entity.note.NoteRevision"]=Zn,Zn.__name__=["albero","entity","note","NoteRevision"],Zn.prototype={isEmptyTitle:function(){return""==this.title||null==this.title},compareRevision:function(e){return this.revision==e?0:this.revision=hi.HIRAGANA_SMALL_A&&o<=hi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(hi.KATAKANA_SMALL_A-hi.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},hi.katakanaToRoman=function(e){return(new ii).convert(e)},hi.normalize=function(e){return new di(null).normalize(e)},hi.asyncAssureNormalize=function(){return Promise.resolve()},hi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var di=function(e){this.beforeTask=null,this.beforeTask=e};a["albero.js.Normalizer"]=di,di.__name__=["albero","js","Normalizer"],di.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Br&&(e=e.val),si._e("["+_.dateStr(new Date)+"] ","invalid character:",e,"","",""),oi.localize("TextCanonicalizer.invalid")}},__class__:di};var fi=function(e){var t=this,n=la.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",r(this,this.onError)),this.ws.on("connect",function(e){t.connection=e,e.on("error",r(t,t.onError)),e.on("close",r(t,t.onConnectionClose)),e.on("message",r(t,t.onMessage)),e.on("pong",r(t,t.onPong)),t.onOpen(null)});var a=null;null!=la.proxyURL&&(a={agent:_i.createAgent(la.proxyURL)}),this.ws.connect(e,null,null,null,a)};a["albero.js.WebSocket"]=fi,fi.__name__=["albero","js","WebSocket"],fi.prototype={onOpen:function(e){si._i("["+_.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=Dr.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){si._e("["+_.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null);var t="WebSocket closed. "+v.string(e.code)+" "+v.string(e.reason)+" "+v.string(e.wasClean);si._i("["+_.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new Yr(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:fi};var mi=function(){};a["puremvc.interfaces.IProxy"]=mi,mi.__name__=["puremvc","interfaces","IProxy"],mi.prototype={__class__:mi};var pi=function(){};a["albero.proxy.AccessTokenResolverProxy"]=pi,pi.__name__=["albero","proxy","AccessTokenResolverProxy"],pi.__interfaces__=[mi],pi.prototype={__class__:pi};var gi=function(){};a["albero.proxy.AccessTokenResolverProxyFactory"]=gi,gi.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],gi.newInstance=function(){return new yi("accessTokenResolver")};var vi=function(e,t){K.call(this),this.proxyName=null!=e?e:vi.NAME,null!=t&&this.setData(t)};a["puremvc.patterns.proxy.Proxy"]=vi,vi.__name__=["puremvc","patterns","proxy","Proxy"],vi.__interfaces__=[mi],vi.__super__=K,vi.prototype=n(K.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:vi});var yi=function(e){vi.call(this,e)};a["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=yi,yi.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],yi.__interfaces__=[pi],yi.__super__=vi,yi.prototype=n(vi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null!=n)return void t(n);var i=null!=la.account?la.account.split(":"):null;if(null!=i&&2==i.length)return void this.api.createAccessToken(i[0],i[1],t);null!=(e=null==e?this.accountLoader.load():e)&&(null!=e.accessToken?(this.settings.setAccessToken(e.accessToken),t(e.accessToken)):this.api.createAccessToken(e.email,e.pass,t))},__class__:yi});var Si=function(){};a["albero.proxy.AccountLoaderProxy"]=Si,Si.__name__=["albero","proxy","AccountLoaderProxy"],Si.__interfaces__=[mi],Si.prototype={__class__:Si};var wi=function(){};a["albero.proxy.AccountLoaderProxyFactory"]=wi,wi.__name__=["albero","proxy","AccountLoaderProxyFactory"],wi.newInstance=function(){var e=I.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?I.createInstance(e,["accountLoader"]):new Ti("accountLoader")};var Ti=function(e){vi.call(this,e)};a["albero.proxy.AccountLoaderProxyForHubot"]=Ti,Ti.__name__=["albero","proxy","AccountLoaderProxyForHubot"],Ti.__interfaces__=[Si],Ti.__super__=vi,Ti.prototype=n(vi.prototype,{load:function(){var e=this,t=require("read");return t({prompt:"Email: "},function(n,i){t({prompt:"Password: ",silent:!0},function(t,n){e.sendNotification("SignIn",new Ce(i,n))})}),null},__class__:Ti});var Ii=function(){vi.call(this,"broadcast")};a["albero.proxy.AlberoBroadcastProxy"]=Ii,Ii.__name__=["albero","proxy","AlberoBroadcastProxy"],Ii.__super__=vi,Ii.prototype=n(vi.prototype,{handleNotification:function(e,t,n){var i=this;switch(si._d("["+_.dateStr(new Date)+"] ","Receive request from server. name:",e," body:",t,""),e){case"notify_add_account_control_request":var r=new Fe(t);this.dataStore.setAccountControlRequest(r),this.sendNotification(e,r),n();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(t[1]);this.sendNotification(e,a),n();break;case"notify_add_domain_invite":var o=new lt(t);this.dataStore.setDomainInvite(o),this.sendNotification(e,o),n();break;case"notify_add_favorite_message":var s=new Gn(t);this.messageStore.onAddFavoriteMessage(s),this.sendNotification(e,s),n();break;case"notify_add_favorite_talk":var l=new mt(t);this.updateTalkStatusByFavoriteTalkEvent(l),this.sendNotification(e,l),n();break;case"notify_add_friend":var u=this.dataFactory.newFriend(t[1]);this.sendNotification(e,u),n();break;case"notify_add_talkers":var c=new _n(t);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(e,c),n();break;case"notify_close_conference":var d=new We(t);this.conferenceStore.removeConference(d),this.updateTalkStatusByConferenceClosedEvent(d),this.sendNotification(e,d),n();break;case"notify_conference_participant_join":var f,m=t[3],p=t[4],g=this.dataStore;if(null!=g.me){var v=g.me.id;f=null!=v&&null!=p&&v.high==p.high&&v.low==p.low}else f=!1;f&&this.dataStore.addReactedConfereceId(m),this.sendNotification(e,t),n();break;case"notify_conference_participant_reject":var y=t[3];this.dataStore.addReactedConfereceId(y),this.sendNotification(e,t),n();break;case"notify_create_announcement":var S=new Le(t);this.keywordWatcher.onAnnouncementCreated(S),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(S)),this.sendNotification(e,S),n();break;case"notify_create_message":var w=new At(t);this.messageStore.setMessage(w),this.keywordWatcher.onMessageCreated(w);var T=this.newTalkStatusByMessage(w);null!=T&&this.sendNotification("notify_update_local_talk_status",T);switch(w.type[1]){case 0:var I=w.content,E=null;switch(I.type){case"delete_talker":E=I.deleted_user_id;break;case"hide_pair_talk":E=I.user_id}if(null==E)return this.sendNotification(e,w),void n();for(var b=w.talkId,A=this.dataStore.getQuestions(b,E),N=0;Nt.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void si._e("["+_.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");n=new Tn,n.id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Wt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&(t=new Tn,t.id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&(t=new Tn,t.id=e.talkId),In.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;n||t.unreadCount++,t.talkOrderingTimestamp=e.createdAt}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(In.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),In.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Nt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var t=this;if(!h.exists(e.readUserIds,function(e){var n=t.dataStore;if(null!=n.me){var i=n.me.id;return null!=i&&null!=e&&i.high==e.high&&i.low==e.low}return!1}))return null;var n=this.dataStore.getTalkStatus(e.talkId);if(null==n)return si._e("["+_.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var i=e.messageIds[0],r=0,a=e.messageIds;r=0?s:1)<0&&(i=o),M.notContains(e.messageIdsExcludingUnreadCountTargets,o)&&n.unreadCount--}}return In.isUnread(n,i)&&(n.maxReadMessageId=i,this.dataStore.setTalkStatus(n)),n},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&(t=new Be,t.domainId=e.domainId),je.isNewMax(t,e.id)&&(t.maxAnnouncementId=e.id,t.maxAnnouncement=e),null==t.unreadCount&&(t.unreadCount=0),t.unreadCount++,this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:Ii});var Ei=function(){vi.call(this,"api")};a["albero.proxy.AlberoServiceProxy"]=Ei,Ei.__name__=["albero","proxy","AlberoServiceProxy"],Ei.__super__=vi,Ei.prototype=n(vi.prototype,{getOSString:function(){return"bot"},createAccessToken:function(e,t,n){var i,r,a=this,o=this.settings.getOs(),s=this.settings.getIDFV(),l=e.split("$");-1==e.indexOf("@")&&2==l.length?(i="create_access_token_by_id",r=[l[1],l[0],t,s,o,""]):(i="create_access_token",r=[e,t,s,o,""]),this.apiCaller.callImmediately(i,r,function(e){si._d("["+_.dateStr(new Date)+"] ","access token:",e,"","",""),a.settings.setAccessToken(e),n(e)},function(e){a.sendNotification("Url",De.FORWARD(B.error))})},authorizeDevice:function(e,t){var n=this.settings.getIDFV();this.apiCaller.call("authorize_device",[e,n],function(e){t()})},createSession:function(e,t){var n=this,i=[e,"1.105",this.getOSString()];this.apiCaller.callCreateSession(i,function(e){var i=new an(e),r=D.nowAsInt64();if(i.passwordExpiration.isExpired(r))return void n.sendNotification("password_expiration_overed");i.passwordExpiration.needWarning(r,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(D.oneDayAfterAsInt64()),n.sendNotification("password_expiration_warned")),t(i)},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void n.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void n.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void n.sendNotification("Device",ee.AUTHORIZE);n.apiCaller.handleServerErrorDefault(e)}n.settings.clearAccessToken(),n.sendNotification("Url",De.FORWARD(B.error))})},startNotification:function(){var e=this;this.apiCaller.call("start_notification",[],function(t){t||(e.dataStore.clear(!0),si._e("["+_.dateStr(new Date)+"] ","start_notification failed.","","","",""),process.exit(1))})},resetNotification:function(e){this.apiCaller.call("reset_notification",[],e)},sendDomainNotifications:function(e){for(var t=0;t=t.length)){var r=t[n],a=e.id,o=this.dataFactory.newDummyMessage(a,r.type,r.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[a,At.enumIndex(r.type),r.content],function(r){var a=i.dataFactory.newMessage(r);i.sendNotification("create_message_complete",[a,o.id]),i.forwardMessages(e,t,n+1)},function(e){if(i.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Ki.toLocalError(It.SendingMessageConflicted,e);i.sendNotification("error_occurred",t)}else i.sendNotification("error_occurred",e)})}},deleteMessage:function(e,t){var n=this;this.apiCaller.call("delete_message",[e,t],function(i){var r=new Ct;r.talkId=e,r.messageId=t,n.sendNotification("notify_delete_message",r)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void n.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=Ki.toLocalError(It.DeletingMessageConflicted,e);return void n.sendNotification("error_occurred",t)}n.sendNotification("error_occurred",e)}})},updateReadStatuses:function(e,t){var n=this;this.apiCaller.callApiReliable("update_read_statuses",[e,t],function(i){var r,a=n.dataStore.getTalkStatus(e);if(null!=a){var o=a.maxReadMessageId;r=null!=o&&null!=t&&o.high==t.high&&o.low==t.low}else r=!1;r&&n.sendNotification("notify_update_local_talk_status",a)},null,function(e){return 429==e.code&&"too many requests"==e.message?Ar.Some(1e3*n.asInt(e.detail.retry_after)):Ar.None})},upload:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n),o=function(e){r.sendNotification("create_message_fail",[e,a],i)};this.prepareFileMessage(n,e,t,a,function(e){r.createMessageReliable(t,Nt.file,e,a,i)},o)},uploadMulti:function(e,t,n,i,r){var a=this,o=this.dataFactory.newDummyMultipleFileMessage(t,n,i);this.sendNotification("create_message_start",o);var s=function(e){a.sendNotification("create_message_fail",[e,o],r)},l=[],u=function(){if(l.length==i.length){var e={files:l};null!=n&&n.length>0&&(e.text=n),a.createMessageReliable(t,Nt.textMultipleFile,e,o,r)}},c=null;c=function(n){if(n.hasNext()){var i=n.next();a.prepareFileMessage(i,e,t,null,function(e){l.push(e),c(n)},s)}else u()};var h=_.iter(i);c(h)},prepareFileMessage:function(e,t,n,i,r,a){var o=this;this.uploadThumbnail(e,t,n,null,function(n){o.uploadFile(e,t,Nn.MESSAGE,function(t){var i=hi.normalize(e.name),a=C.createFileInfoDynamic(e,i,n,t);r(a)},a)},a)},createMessageReliable:function(e,t,n,i,r){var a=this;this.apiCaller.callApiReliable("create_message",[e,At.enumIndex(t),n],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,i.id],r)},function(e){if(a.sendNotification("create_message_fail",[e,i],r),null!=e&&409==e.code){var t=Ki.toLocalError(It.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)},function(e){return 500==e.code&&"Internal Error (IllegalStateException)"==e.message?Ar.Some(1e3):Ar.None})},uploadThumbnail:function(e,t,n,i,r,a){var o=this,s=Mi.getBlobFromUpdatableFile(e);this.fileService.asyncCreateThumbnail(s).then(function(e){null!=i&&(U.foreach(o.fileInfoStore.getMessageFileInfos(i.id),function(t){t[0].setDummyThumbnail(e)}),o.sendNotification("create_message_start",i)),o.uploadFile(e.file,t,Nn.THUMBNAIL,function(t){e.setAuth(t),r(Ar.Some(e))},a)},function(e){null!=i&&o.sendNotification("create_message_start",i),r(Ar.None)})},uploadFile:function(e,t,n,i,r){var a=this,o=hi.normalize(e.name);this.apiCaller.call("create_upload_auth",[o,e.type,e.size,t,kn.getUseTypeInt(n)],function(t){var n=i,o=t,s=function(){n(o)};a.fileService.upload(t,e.type,e,s,r)},function(e){if(null!=e)if(502==e.code&&null!=e.detail){var t=e.detail.limit_max;if("file_size"==e.detail.limit_target){var n=Ki.toLocalError(It.UploadSizeOvered(t),e);a.sendNotification("error_occurred",n)}else if("storage_size"==e.detail.limit_target){var i=Ki.toLocalError(It.StorageSizeOvered(t),e);a.sendNotification("error_occurred",i)}}else a.sendNotification("error_occurred",e);r(e)})},createDownloadAuth:function(e,t,n,i,r){var a=this;this.apiCaller.callApiReliable("create_download_auth",[e,t,n],function(e){i(new dt(e))},function(e){r(e)},function(e){return 429==e.code&&"too many requests"==e.message?Ar.Some(1e3*a.asInt(e.detail.retry_after)):Ar.None})},deleteAttachment:function(e,t){this.apiCaller.call("delete_attachment",[e,t])},getAttachments:function(e,t){var n=this;null==t&&(t={sinceId:null,maxId:null}),this.apiCaller.call("get_attachments",[e,20,t.sinceId,t.maxId],function(t){var i=t.map((oa=n.dataFactory,r(oa,oa.newFileInfo)));n.sendNotification("get_file_responsed",{talkId:e,files:i})})},createAnnouncement:function(e,t,n,i){var r=this -;if(null!=e||null!=(e=this.settings.getSelectedDomainId())){var a=this.dataFactory.newDummyMessage(null,t,n);this.sendNotification("create_announcement_start",a),this.apiCaller.call("create_announcement",[e,At.enumIndex(t),n],function(e){var t=r.dataFactory.newAnnouncement(e);r.sendNotification("create_announcement_complete",[t,a.id],i)},function(e){r.sendNotification("create_announcement_fail",a),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,a=this.settings.getSelectedDomainId();if(null!=a){e=null==e?{sinceId:null,maxId:null}:e;var o=this.apiCaller,s=e.sinceId,l=e.maxId,u=xt.orderToInt(t);o.call("get_announcements",[a,20,s,l,u],function(e){var o=e.map((oa=i.dataFactory,r(oa,oa.newAnnouncement)));i.sendNotification("notify_get_announcements",{domainId:a,announcements:o,sortOrder:t,callerKey:n})})}},getAnnouncementStatuses:function(e){var t=this;this.apiCaller.call("get_announcement_statuses",[],function(n){for(var i=0;i=0?i:i+4294967296)-(new Date).getTime()|0}e<=0?(this.updateLastUsedAt(),this.lastUsedExpiredAtTimer=new vr(6e5),this.lastUsedExpiredAtTimer.run=r(this,this.updateLastUsedAt)):vr.delay(r(this,this.startUpdateLastUsedAtIfNeed),e)}},updateLastUsedAt:function(){var e=this;this.apiCaller.call("update_last_used_at",[],function(t){e.settings.setLastUsedExpiredAt(D.afterAsInt64(6e5))})},addFavoriteTalk:function(e,t){this.apiCaller.call("add_favorite_talk",[e,t])},deleteFavoriteTalk:function(e,t){this.apiCaller.call("delete_favorite_talk",[e,t])},disablePushNotification:function(e,t){this.apiCaller.call("disable_push_notification",[e,t])},enablePushNotification:function(e,t){this.apiCaller.call("enable_push_notification",[e,t])},getSolutions:function(e,t){var n=this;this.apiCaller.call("get_solutions",[e,t],function(e){h.iter(e,(oa=n.dataFactory,r(oa,oa.newSolution))),n.sendNotification("solutions_loaded")})},getPresences:function(e,t){var n=this;this.apiCaller.call("get_presences",[e,t],function(e){var i=D.nowAsInt64(),a=(oa=n.dataFactory,r(oa,oa.newUserPresence)),o=i;h.iter(e,function(e){return a(e,o)}),n.sendNotification("presences_updated",t)})},joinConference:function(e,t){var n=this;this.apiCaller.call("join_conference",[e,t],function(t){var i=new wt(t);n.sendNotification("join_conference_responsed",{talkId:e,joinConference:i})},function(e){n.sendNotification("join_conference_canceled",e)})},rejectConference:function(e){var t=this;this.apiCaller.call("reject_conference",[e],function(e){},function(e){return 404==e.code?void si._d("["+_.dateStr(new Date)+"] ","conference not found.","","","",""):409==e.code?void si._d("["+_.dateStr(new Date)+"] ","joined.","","","",""):void t.sendNotification("error_occurred",e)})},leaveConference:function(e){var t=this;this.apiCaller.call("leave_conference",[e],function(e){},function(e){if(404==e.code)return void si._d("["+_.dateStr(new Date)+"] ","conference not found.","","","","");t.sendNotification("error_occurred",e)})},getConferences:function(){var e=this;this.apiCaller.call("get_conferences",[],function(t){var n=t.map((oa=e.dataFactory,r(oa,oa.newConference)));h.iter(n,function(t){e.sendNotification("notify_open_conference",t)}),e.dataStore.filterReactedConferenceIds(n.filter(function(t){return!e.dataStore.isReactedConferenceId(t.id)}).map(function(e){return e.id}))})},getConferenceParticipants:function(e){var t=this;this.apiCaller.call("get_conference_participants",[e],function(n){U.foreach(t.conferenceStore.getConference(e),function(e){e.participants=n})})},getNoteStatuses:function(e,t){var n=this,i=this.settings.getSelectedDomainId();this.apiCaller.call("get_note_statuses",[i,e,60,t],function(t){n.sendNotification("get_note_statuses_loaded",{talkId:e,result:new Bn(t)})},function(e){400==e.code&&si._d("["+_.dateStr(new Date)+"] ","invalid parameter.","","","",""),n.sendNotification("error_occurred",e)})},getNote:function(e){var t=this;this.apiCaller.call("get_note",[e.value],function(e){var n=new Ln(e);t.dataStore.setNote(n.getNoteId(),n.note),t.sendNotification("get_note_loaded",n)},function(n){if(404==n.code)return si._d("["+_.dateStr(new Date)+"] ","note is not found.","","","",""),t.dataStore.setNote(e,null),void t.sendNotification("get_note_failed_by_note_not_found",e);400==n.code&&(si._d("["+_.dateStr(new Date)+"] ","invalid parameter.","","","",""),t.sendNotification("error_occurred",n))})},createNote:function(e,t,n,i,r){var a=this;this.apiCaller.call("create_note",[e,t,qn.getValue(n),i,r],function(e){a.sendNotification("create_note_completed",new Un(e))},function(e){400==e.code&&si._d("["+_.dateStr(new Date)+"] ","invalid parameter.","","","",""),a.sendNotification("error_occurred",e)})},updateNoteSetting:function(e,t,n){var i=this;this.apiCaller.call("update_note_setting",[e.value,t,n],function(e){i.sendNotification("update_note_setting_completed",new Hn(e))},function(t){return 404==t.code?(si._d("["+_.dateStr(new Date)+"] ","note is not found.","","","",""),i.dataStore.setNote(e,null),void i.sendNotification("update_note_setting_failed_by_not_found",e)):409==t.code?(si._d("["+_.dateStr(new Date)+"] ","conflict.","","","",""),i.dataStore.setNote(e,null),void i.sendNotification("update_note_setting_failed_by_conflict",e)):(400==t.code&&si._d("["+_.dateStr(new Date)+"] ","invalid parameter.","","","",""),403==t.code&&si._d("["+_.dateStr(new Date)+"] ","forbidden.","","","",""),void i.sendNotification("error_occurred",t))})},updateNote:function(e,t,n,i,r,a){var o=this,s=qn.getValue(i);this.apiCaller.call("update_note",[e.value,t,n,s,r,a],function(t){var n=new jn(t);o.dataStore.setNote(e,n.note),o.sendNotification("update_note_completed",n)},function(t){return 404==t.code?(si._d("["+_.dateStr(new Date)+"] ","note is not found.","","","",""),o.dataStore.setNote(e,null),void o.sendNotification("update_note_failed_by_not_found",e)):409==t.code?(si._d("["+_.dateStr(new Date)+"] ","conflict.","","","",""),o.dataStore.setNote(e,null),void o.sendNotification("update_note_failed_by_conflict",e)):(400==t.code&&si._d("["+_.dateStr(new Date)+"] ","invalid parameter.","","","",""),403==t.code&&si._d("["+_.dateStr(new Date)+"] ","forbidden.","","","",""),void o.sendNotification("error_occurred",t))})},deleteNote:function(e){var t=this;this.apiCaller.call("delete_note",[e.value],function(e){t.sendNotification("delete_note_completed",new Pn(e))},function(n){404==n.code&&(si._d("["+_.dateStr(new Date)+"] ","note is not found.","","","",""),t.dataStore.setNote(e,null)),400==n.code&&si._d("["+_.dateStr(new Date)+"] ","invalid parameter.","","","",""),403==n.code&&si._d("["+_.dateStr(new Date)+"] ","forbidden.","","","",""),t.sendNotification("error_occurred",n)})},addFavoriteMessage:function(e,t,n){var i=this;this.apiCaller.call("add_favorite_message",[e,t,n],function(e){i.sendNotification("add_favorite_message_completed",new Mn(e))},function(e){if(400==e.code&&"invalid message"==e.message&&si._d("["+_.dateStr(new Date)+"] ","invalid message.","","","",""),400==e.code&&"invalid message (not favoritable message)"==e.message&&si._d("["+_.dateStr(new Date)+"] ","invalid message (not favoritable message).","","","",""),403==e.code&&"forbidden"==e.message&&si._d("["+_.dateStr(new Date)+"] ","forbidden.","","","",""),404==e.code&&si._d("["+_.dateStr(new Date)+"] ","message is not found.","","","",""),409==e.code&&"conflict"==e.message)return void si._d("["+_.dateStr(new Date)+"] ","conflict","","","","");i.sendNotification("error_occurred",e)})},deleteFavoriteMessage:function(e,t){var n=this;this.apiCaller.call("delete_favorite_message",[e,t],function(e){n.sendNotification("delete_favorite_message_completed",new xn(e))},function(e){400==e.code&&si._d("["+_.dateStr(new Date)+"] ","invalid parameter.","","","",""),404==e.code&&si._d("["+_.dateStr(new Date)+"] ","message is not found.","","","",""),n.sendNotification("error_occurred",e)})},getFavoriteMessages:function(e,t,n){var i=this;this.apiCaller.call("get_favorite_messages",[e,t,20,n],function(n){var a=n.marker,o=n.next_marker,s=n.contents.map((oa=i.dataFactory,r(oa,oa.newMessage))),l=new Fn(e,t,a,o,s);i.sendNotification("get_favorite_messages_completed",l)},function(e){400==e.code&&si._d("["+_.dateStr(new Date)+"] ","invalid parameter.","","","",""),i.sendNotification("error_occurred",e)})},asInt:function(e){return jr.__cast(e,ua)},__class__:Ei});var bi=function(){this.callbacksWhenCreateSessionSucceed=[],this.createSessionSucceed=!1,vi.call(this,"apiCaller")};a["albero.proxy.ApiCallerProxy"]=bi,bi.__name__=["albero","proxy","ApiCallerProxy"],bi.__super__=vi,bi.prototype=n(vi.prototype,{callCreateSession:function(e,t,n){var i=this;this.createSessionSucceed=!1,this.rpc.call("create_session",e,function(e){i.createSessionSucceed=!0,null!=t&&t(e),h.iter(i.callbacksWhenCreateSessionSucceed,function(e){e()}),i.callbacksWhenCreateSessionSucceed.splice(0,i.callbacksWhenCreateSessionSucceed.length)},n)},callImmediately:function(e,t,n,i){this.rpc.call(e,t,n,i)},call:function(e,t,n,i){var a=(oa=this.rpc,r(oa,oa.call)),o=e,s=t,l=n,u=i,c=function(){a(o,s,l,u)};this.createSessionSucceed?c():this.callbacksWhenCreateSessionSucceed.push(c)},callApiReliable:function(e,t,n,i,r,a){null==a&&(a=3);var o=this,s=this.createOnErrorReliable(a,i,r,function(s){vr.delay(function(){o.callApiReliable(e,t,n,i,r,a-1)},s)});this.call(e,t,n,s)},createOnErrorReliable:function(e,t,n,i){return null==n&&(n=function(e){return 404==e.code?Ar.Some(1e3):Ar.None}),null==t&&(t=r(this,this.handleServerErrorDefault)),function(r){if(0==e)return void t(r);var a=n(r);if(U.isEmpty(a))return void t(r);U.foreach(a,i)}},handleServerErrorDefault:function(e){this.rpc.onServerError(e)},restart:function(){this.rpc.restart()},__class__:bi});var Ai=function(){vi.call(this,"appState")};a["albero.proxy.AppStateProxy"]=Ai,Ai.__name__=["albero","proxy","AppStateProxy"],Ai.__super__=vi,Ai.prototype=n(vi.prototype,{start:function(){this.updateLastActivityAt(),this.checkInactiveInterval()},activateAppIfNeed:function(){this.updateLastActivityAt(),this.appState==N.Inactive&&this.setAppState(N.Active)},setAppState:function(e){si._d("["+_.dateStr(new Date)+"] ","APP_STATE_CHANGED: ",e,"","",""),this.appState=e,this.sendNotification("app_state_changed",this.appState)},updateLastActivityAt:function(){this.lastActivityAt=new Date},checkInactiveInterval:function(){var e=this;this.checkInactive(),vr.delay(function(){e.checkInactiveInterval()},500)},checkInactive:function(){if(this.appState!=N.Inactive){(new Date).getTime()-this.lastActivityAt.getTime()<2e3||this.setAppState(N.Inactive)}},__class__:Ai});var Ni=function(){vi.call(this,"conferenceStore"),this.conferencesMap=new kr,this.talkIdConferenceIdMap=new kr};a["albero.proxy.ConferenceStoreProxy"]=Ni,Ni.__name__=["albero","proxy","ConferenceStoreProxy"],Ni.__super__=vi,Ni.prototype=n(vi.prototype,{addConference:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.conferencesMap;null!=ma[n]?i.setReserved(n,e):i.h[n]=e;var r=e.talkId,a="_"+r.high+"_"+r.low,o=this.talkIdConferenceIdMap;null!=ma[a]?o.setReserved(a,n):o.h[a]=n},removeConference:function(e){this.dataStore.removeReactedConfereceId(e.id);var t=e.id,n="_"+t.high+"_"+t.low;this.conferencesMap.remove(n);var i=e.talkId,r="_"+i.high+"_"+i.low,a=this.talkIdConferenceIdMap;(null!=ma[r]?a.getReserved(r):a.h[r])==n&&this.talkIdConferenceIdMap.remove(r),this.messageStore.onConferenceClose(e)},getConference:function(e){var t="_"+e.high+"_"+e.low,n=this.conferencesMap;return U.option(null!=ma[t]?n.getReserved(t):n.h[t])},hasConference:function(e){if(null!=e){var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;return null!=ma[t]?n.existsReserved(t):n.h.hasOwnProperty(t)}return!1},hasConferenceInDomain:function(e){return null!=h.find(this.getConferenceTalkIds().map(M.makeFromIdStr).map((oa=this.dataStore,r(oa,oa.getTalk))),function(t){if(null!=t){var n=t.domainId;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}return!1})},getConferenceTalkIds:function(){for(var e=[],t=this.talkIdConferenceIdMap.keys();t.hasNext();){var n=t.next();e.push(n)}return e},hasConferenceInAllDomains:function(e){return U.isEmpty(e)?this.talkIdConferenceIdMap.keys().hasNext():null!=h.find(this.getConferenceTalkIds().map(M.makeFromIdStr).map((oa=this.dataStore,r(oa,oa.getTalk))),function(t){if(null!=t){var n=t.domainId,i=U.get(e);return!(null!=n&&null!=i&&n.high==i.high&&n.low==i.low)}return!1})},removeConferencesOnLeaveDomain:function(e){for(var t=this.conferencesMap,n=new Nr(t,t.arrayKeys());n.hasNext();){var i=n.next(),r=i.domainId;null!=r&&null!=e&&r.high==e.high&&r.low==e.low&&(this.removeConference(i),this.sendNotification("notify_close_conference",i))}},removeConferencesOnLeaveTalk:function(e){for(var t=this.conferencesMap,n=new Nr(t,t.arrayKeys());n.hasNext();){var i=n.next(),r=i.talkId;null!=r&&null!=e&&r.high==e.high&&r.low==e.low&&(this.removeConference(i),this.sendNotification("notify_close_conference",i))}},__class__:Ni});var ki=function(){var e=new Cn(-1,-1);this.dummyFileId=e;var t=new Cn(-1,-1);this.dummyMsgId=t,vi.call(this,"dataFactory")};a["albero.proxy.DataFactoryProxy"]=ki,ki.__name__=["albero","proxy","DataFactoryProxy"],ki.__super__=vi,ki.prototype=n(vi.prototype,{onRegister:function(){},newAcquaintance:function(e){return this.dataStore.addAcquaintance(this.newDomainUser(e))},newFriend:function(e){return this.dataStore.addFriend(this.newDomainUser(e))},newDomainUser:function(e){return new ct(e)},newDomain:function(e){return this.dataStore.setDomainIfLatest(new et(e))},newDomainInvite:function(e){return this.dataStore.setDomainInvite(new lt(e))},newTalk:function(e){return this.dataStore.setTalk(new _n(e))},newTalkStatus:function(e){return this.dataStore.setTalkStatus(new Tn(e))},newMessage:function(e){var t=new At(e);switch(t.type[1]){case 4:this.fileInfoStore.setMessageFileInfos(t.id,[pt.fromMessageAndFile(t,t.content)]);break;case 5:var n=t,i=function(e){return pt.fromMessageAndFile(n,e)};this.fileInfoStore.setMessageFileInfos(t.id,F.asArray(t.content.files).map(i))}return this.messageStore.setMessage(t),t},newDummyMessage:function(e,t,n){var i=this,r=new At;r.id=this.dummyMsgId,r.userId=this.dataStore.me.id,r.talkId=e,r.type=t,r.content=n;var a,o=this.dummyMsgId;if(null==o)a=null;else{var s=new Cn(0,1),l=s,u=o.high-l.high|0,c=o.low-l.low|0;if(mr.ucompare(o.low,l.low)<0){u--;u|=0}a=new Cn(u,c)}switch(this.dummyMsgId=a,r.type[1]){case 4:var _=[this.createDummyFileInfo(r,r.content)];this.fileInfoStore.setMessageFileInfos(r.id,_);break;case 5:var h=jr.__cast(r.content.files,Array).map(function(e){return i.createDummyFileInfo(r,e)});this.fileInfoStore.setMessageFileInfos(r.id,h)}return this.messageStore.setMessage(r),r},newDummyFileMessage:function(e,t){var n=this.createFileInfoDynamic(t);return this.newDummyMessage(e,Nt.file,n)},newDummyMultipleFileMessage:function(e,t,n){var i=h.array(n.filter(function(e){return null!=e}).map(r(this,this.createFileInfoDynamic)));return this.newDummyMessage(e,Nt.textMultipleFile,{text:t,files:i})},createFileInfoDynamic:function(e){return{content_type:e.type,content_size:e.size,name:hi.normalize(e.name),file:e}},createDummyFileInfo:function(e,t){var n,i=pt.fromMessageAndFileWithFileId(e,t,this.dummyFileId),r=this.dummyFileId;if(null==r)n=null;else{var a=new Cn(0,1),o=a,s=r.high-o.high|0,l=r.low-o.low|0;if(mr.ucompare(r.low,o.low)<0){s--;s|=0}n=new Cn(s,l)}return this.dummyFileId=n,i},newQuestion:function(e){return this.dataStore.setQuestion(new Kt(e))},newFileInfo:function(e){var t=new pt(e);return this.fileInfoStore.setTalkFileInfo(t,!0),t},newAnnouncement:function(e){return new Le(e)},newAnnouncementStatus:function(e){return this.dataStore.setAnnouncementStatus(new Be(e))},newAnnouncementStatusForDomain:function(e){var t=new Be;return t.domainId=e,t.unreadCount=0,this.dataStore.setAnnouncementStatus(t)},newAccountControlRequest:function(e){return this.dataStore.setAccountControlRequest(new Fe(e))},newAccountControlGroup:function(e){return this.dataStore.setAccountControlGroup(new Oe(e))},newSolution:function(e){var t=new on(e);return this.solutionsStore.setSolution(t),t},newUserPresence:function(e,t){var n=new On(e,t);return this.dataStore.setUserPresence(n),n},newConference:function(e){var t=new We(e);return this.conferenceStore.addConference(t),t},__class__:ki});var Di=function(){vi.call(this,"dataStore")};a["albero.proxy.DataStoreProxy"]=Di,Di.__name__=["albero","proxy","DataStoreProxy"],Di.__super__=vi,Di.prototype=n(vi.prototype,{onRegister:function(){this.init()},setMe:function(e){this.me=e;for(var t=0,n=this.getDomains();t=0?s:1;(l>1||2==r.type&&0!=l)&&(r.user=t,this.sendNotification("notify_update_user",t))}else{var u={type:2,user:t};null!=ma[i]?e.setReserved(i,u):e.h[i]=u}this.storage.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new kr);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=ma[n]?i.setReserved(n,e):i.h[n]=e,this.storage.setDirtyFlag()},getUserPresence:function(e){if(null==this.userPresences)return null;var t="_"+e.high+"_"+e.low,n=this.userPresences;return null!=ma[t]?n.getReserved(t):n.h[t]},isDepartmentsChanged:function(e,t){return!M.eqArray(e.departments,t.departments)},setUsersIfLatest:function(e,t){var n=this.ensureDomainUserMap(e),i=r(this,this.setUserIfLatest),a=n;h.iter(t,function(e){i(a,e)})},clearUsersDepartments:function(e){var t="_"+e.high+"_"+e.low,n=this.users,i=null!=ma[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new Nr(i,i.arrayKeys());r.hasNext();){var a=r.next();a.user.departments=null,this.sendNotification("notify_update_user",a.user)}this.storage.setDirtyFlag()},removeFriend:function(e,t){var n="_"+e.high+"_"+e.low,i=this.users,r=null!=ma[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=ma[a]?r.getReserved(a):r.h[a];null!=o&&(o.type=2)}this.storage.setDirtyFlag()},removeAcquaintance:function(e,t){this.removeFriend(e,t)},getUser:function(e,t){if(null==t)return null;var n=new Cn(0,0),i=n;if(t.high==i.high&&t.low==i.low)return null;var r;if(null!=this.me){var a=this.me.id;r=null!=a&&null!=t&&a.high==t.high&&a.low==t.low}else r=!1;if(r)return this.me.toDomainUser(e);var o="_"+e.high+"_"+e.low,s=this.users,l=null!=ma[o]?s.getReserved(o):s.h[o];if(null!=l){var u="_"+t.high+"_"+t.low,c=null!=ma[u]?l.getReserved(u):l.h[u];if(null!=c)return c.user}return null},getUsers:function(e,t){var n=this,i=function(e,t){var i="_"+e.high+"_"+e.low,r=n.users,a=null!=ma[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new Cn(0,0),r=i;if(t.high==r.high&&t.low==r.low)return null;var o=n.me.id;if(null!=o&&null!=t&&o.high==t.high&&o.low==t.low)return n.me.toDomainUser(e);var s="_"+t.high+"_"+t.low,l=null!=ma[s]?a.getReserved(s):a.h[s];return null!=l?l.user:null});for(var o=[],s=a.arrayKeys(),l=new Nr(a,s);l.hasNext();)o.push(l.next().user);return o}return[]};if(null!=e)return i(e,t);for(var r=this.domains,a=new Nr(r,r.arrayKeys()),o=null;a.hasNext();)o=null==o?i(a.next().id,t):o.concat(i(a.next().id,t));return null==o?[]:o},getTalk:function(e){var t="_"+e.high+"_"+e.low,n=this.talks;return null!=ma[t]?n.getReserved(t):n.h[t]},getValidPairTalk:function(e,t){var n=this;return null==this.me?null:h.find(this.getTalks(),function(i){if(!I.enumEq(i.type,dn.PairTalk))return!1;var r=i.domainId;return null!=r&&null!=t&&r.high==t.high&&r.low==t.low&&(!!h.exists(i.userIds,function(t){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})&&!!h.exists(i.userIds,function(e){var t=n.me.id;return null!=e&&null!=t&&e.high==t.high&&e.low==t.low}))})},setTalk:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.talks;if(null!=ma[n]?i.setReserved(n,e):i.h[n]=e,null!=e.leftUsers)for(var r=this.ensureDomainUserMap(e.domainId),a=0,o=e.leftUsers;a=0?f:1)>0}else _=!1;_&&(c.user=s,this.sendNotification("notify_update_user",s))}else{var m={type:2,user:s};null!=ma[u]?r.setReserved(u,m):r.h[u]=m,this.sendNotification("notify_update_user",s)}}return this.storage.setDirtyFlag(),e},getTalks:function(){for(var e=[],t=this.talks.keys();t.hasNext();){var n=t.next(),i=this.talks;e.push(null!=ma[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){h.iter(e,r(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=ma[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}if(null!=this.questions)for(var a=this.getQuestions(e),o=0;o=0?l:1)>=0}else t=!0;if(t){var u=this.domains;return null!=ma[i]?u.setReserved(i,e):u.h[i]=e,this.storage.setDirtyFlag(),e}return a},removeDomain:function(e){this.domains.remove("_"+e.high+"_"+e.low),this.storage.setDirtyFlag();for(var t=this.getTalks().filter(function(t){var n=t.domainId;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}),n=0;ne.version)return r;var a=this.accountControlRequests;return null!=ma[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new kr,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group -;null!=i&&this.accountControlGroup.group.versionn||h>i;)si._d("["+_.dateStr(new Date)+"] ","downsize",r,c,a,h),u.clearRect(0,0,r,a),u.drawImage(o,0,0,r,a,0,0,c,h),s.clearRect(0,0,r,a),s.drawImage(l,0,0,c,h,0,0,c,h),r=c,c=this.getOptSize(r,n),a=h,h=this.getOptSize(a,i);var d=e.getContext("2d");d.fillStyle="rgb(255, 255, 255)",d.fillRect(0,0,n,i),d.drawImage(o,0,0,r,a,0,0,n,i)},getOptSize:function(e,t){return t*Math.ceil(Math.log(e/t)/Math.log(2))},__class__:Mi});var xi=function(){vi.call(this,"keywordWatcher")};a["albero.proxy.KeywordWatcherProxy"]=xi,xi.__name__=["albero","proxy","KeywordWatcherProxy"],xi.__super__=vi,xi.prototype=n(vi.prototype,{onMessageCreated:function(e){if(null!=e){var t,n=U.map(U.option(this.dataStore.getTalk(e.talkId)),function(e){return e.domainId});switch(n[1]){case 0:t=n[2];break;case 1:t=this.settings.getSelectedDomainId()}if(this.features.canDetectKeyword(t)){var i;if(this.settings.getBrowserSettings().keywordWatchingSelfMessage)i=!1;else{var r=this.dataStore,a=e.userId;if(null!=r.me){var o=r.me.id;i=null!=o&&null!=a&&o.high==a.high&&o.low==a.low}else i=!1}if(!i){var s=e.messageStringForKeywordDetection(this.settings.getBrowserSettings().keywordWatchingActionReply);this.detectKeyword(s,e.type,e.id,t,e.talkId)}}}},onAnnouncementCreated:function(e){if(null!=e&&this.features.canDetectKeyword(e.domainId)){var t=At.getDisplayTextWithoutEscape(e.type,e.content);this.detectKeyword(t,e.type,e.id,e.domainId,null)}},detectKeyword:function(e,t,n,i,r){var a=this;this.reserveOnNormalizedKeywordPrepared(function(o){for(var s=o.keys();s.hasNext();){var l=s.next(),u=o.get(l);if(null!=u&&0!=u.length&&Li.match(t,l))for(var c=0;c=0?a:1)>=0}else r=!1;r&&this.removeKeywordDetection(e,t)}},removeKeywordDetection:function(e,t){if(null!=this.detectedDomainTalkIdStrings){var n=this.getKey(e,t);if(null!=n){this.detectedDomainTalkIdStrings.remove(n);var i=this.settings.getBrowserSettings().keywordWatchingEmphasis;this.sendNotification("keyword_detaction_updated",{domainId:e,talkId:t,detected:!1,emphasis:i})}}},removeKeywordDetectionAll:function(){if(null!=this.detectedDomainTalkIdStrings)for(var e=this.settings.getBrowserSettings().keywordWatchingEmphasis,t=this.detectedDomainTalkIdStrings.keys();t.hasNext();){var n=t.next();if(S.startsWith(n,"talk_")){var i=n.substring("talk_".length),r=M.makeFromIdStr(i);this.sendNotification("keyword_detaction_updated",{domainId:null,talkId:r,detected:!1,emphasis:e})}else if(S.startsWith(n,"announcement_")){var a=n.substring("announcement_".length),o=M.makeFromIdStr(a);this.sendNotification("keyword_detaction_updated",{domainId:o,talkId:null,detected:!1,emphasis:e})}this.detectedDomainTalkIdStrings.remove(n)}},getDetectId:function(e,t){if(null==this.detectedDomainTalkIdStrings)return null;var n=this.getKey(e,t);if(null==n)return null;var i=this.detectedDomainTalkIdStrings;return null!=ma[n]?i.getReserved(n):i.h[n]},hasKeywordDetection:function(e,t){return null!=this.getDetectId(e,t)},getKey:function(e,t){return null==e&&null==t?null:null!=t?"talk__"+t.high+"_"+t.low:"announcement__"+e.high+"_"+e.low},__class__:xi});var Fi=function(){};a["albero.proxy.KeywordParser"]=Fi,Fi.__name__=["albero","proxy","KeywordParser"],Fi.parse=function(e){var t=S.htmlEscape(e,!0),n=new l(""(.*?)"","g").map(t,function(e){return Fi.encodeSpace(e.matched(1))});return new l("[  ]","g").split(n).filter(L.isNotEmpty).map(Fi.decodeSpace).map(Fi.createParsedKeyword)},Fi.encodeSpace=function(e){return S.replace(S.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},Fi.decodeSpace=function(e){return S.replace(S.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},Fi.createParsedKeyword=function(e){var t=new l("\\[type:([A-Za-z]+)\\](.*)","g");if(t.match(e)){var n=t.matched(1),i=t.matched(2),r=Li.getKeywordTypeByMessageTypeString(n);if(r!=Pi.normal)return new Ui(r,i)}return new Ui(Pi.normal,e)};var Ui=function(e,t){this.type=e,this.word=t};a["albero.proxy.ParsedKeyword"]=Ui,Ui.__name__=["albero","proxy","ParsedKeyword"],Ui.prototype={__class__:Ui};var Pi=a["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};Pi.normal=["normal",0],Pi.normal.toString=o,Pi.normal.__enum__=Pi,Pi.selectOneReplyOnly=["selectOneReplyOnly",1],Pi.selectOneReplyOnly.toString=o,Pi.selectOneReplyOnly.__enum__=Pi,Pi.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],Pi.yesOrNoReplyOnly.toString=o,Pi.yesOrNoReplyOnly.__enum__=Pi,Pi.todoDoneOnly=["todoDoneOnly",3],Pi.todoDoneOnly.toString=o,Pi.todoDoneOnly.__enum__=Pi,Pi.__empty_constructs__=[Pi.normal,Pi.selectOneReplyOnly,Pi.yesOrNoReplyOnly,Pi.todoDoneOnly];var Li=function(){};a["albero.proxy.KeywordTypeHelper"]=Li,Li.__name__=["albero","proxy","KeywordTypeHelper"],Li.getKeywordType=function(e){return null!=e?Li.getKeywordTypeByMessageTypeString(At.typeString(e)):Pi.normal},Li.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return Pi.selectOneReplyOnly;case"todoDone":return Pi.todoDoneOnly;case"yesOrNoReply":return Pi.yesOrNoReplyOnly}return Pi.normal},Li.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==Nt.selectOneReply;case 2:return e==Nt.yesOrNoReply;case 3:return e==Nt.todoDone}},Li.createFilterClassStringFromMessageType=function(e){return Li.createFilterClassString(Li.getKeywordType(e))},Li.createFilterClassString=function(e){return"keyword_type_"+v.string(e)};var Bi=function(){vi.call(this,"limitations")};a["albero.proxy.LimitationsProxy"]=Bi,Bi.__name__=["albero","proxy","LimitationsProxy"],Bi.__super__=vi,Bi.prototype=n(vi.prototype,{getMaxTalkers:function(){var e=this,t=U.flatMap(U.flatMap(U.option(this.settings.getSelectedDomainId()),function(t){return U.option(e.dataStore.getDomain(t))}),function(e){return e.getMaxTalkers()});switch(t[1]){case 0:return t[2];case 1:return this.settings.getConfiguration().maxTalkers}},__class__:Bi});var ji=function(){vi.call(this,"messageStore")};a["albero.proxy.MessageStoreProxy"]=ji,ji.__name__=["albero","proxy","MessageStoreProxy"],ji.__super__=vi,ji.prototype=n(vi.prototype,{onRegister:function(){this.messages=new kr},getMessage:function(e){if(null==e)return Ar.None;var t="_"+e.high+"_"+e.low,n=this.messages;return U.option(null!=ma[t]?n.getReserved(t):n.h[t])},setMessage:function(e){},removeMessage:function(e){this.messages.remove("_"+e.high+"_"+e.low)},onFileDeleted:function(e){U.foreach(this.getMessage(e.messageId),function(t){var n=t.getFilesDynamic();if(0!=n.length){var i=h.find(n,function(t){var n=t.file_id,i=e.fileId;return null!=n&&null!=i&&n.high==i.high&&n.low==i.low});null!=i&&(i.deleted=!0)}})},onConferenceClose:function(e){U.foreach(this.getMessage(e.messageId),function(e){e.close()})},onActionStampClose:function(e){U.foreach(this.getMessage(e),function(e){e.close()})},onDeleteFavoriteMessage:function(e){var t=this.getMessage(e.getMessageId());U.foreach(t,function(t){t.updateFavorite(e)})},onAddFavoriteMessage:function(e){var t=this.getMessage(e.getMessageId());U.foreach(t,function(t){t.updateFavorite(e)}),U.isEmpty(t)&&this.setMessage(e.getMessage())},__class__:ji});var Hi=function(){this.connectionStatus=k.Ok,vi.call(this,"rpc"),this.responseHandlers=new Er,this.errorHandler=r(this,this.onServerErrorWithMethod),this.connectionKeeper=new zi(r(this,this.ping))};a["albero.proxy.MsgPackRpcProxy"]=Hi,Hi.__name__=["albero","proxy","MsgPackRpcProxy"],Hi.__super__=vi,Hi.prototype=n(vi.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=new fi(la.endpoint),this.ws.onopen=r(this,this.onOpen),this.ws.onmessage=r(this,this.onMessage),this.ws.onclose=r(this,this.onClose),this.ws.onpong=r(this,this.onPong),Hi.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.onopen=null,this.ws.onmessage=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.onpong=null,this.ws.close();var e=this.ws;return this.ws=null,Hi.pingAt=null,e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=k.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){Hi.pingAt=null;var t="PONG "+v.string(e);si._d("["+_.dateStr(new Date)+"] ",t,"","","","")},onMessage:function(e){var t=this,n=new Vr(e,!0).o,i=jr.__cast(n[0],ua);if(1==i&&4==n.length){var r=jr.__cast(n[1],ua),a=n[2],o=n[3],s=this.responseHandlers.h[r];if(null==s)return void si._e("["+_.dateStr(new Date)+"] ","No ResponseHandler prepared. msgId:%s error:%s result:",r,a,o,"");var l=s.method;if(si._d("["+_.dateStr(new Date)+"] ","response received. method:",l," data:",n,""),null==a){var u=s.onSuccess;null!=u&&u(o)}else{var c=s.method;si._e("["+_.dateStr(new Date)+"] ","Receive Error Response. method:",c," error:",a,"");var h=s.onError;null!=h?h(a):null!=this.errorHandler&&this.errorHandler(s.method,a)}this.responseHandlers.remove(r)}else if(0==i&&4==n.length){var d=jr.__cast(n[1],ua),f=jr.__cast(n[2],String),m=jr.__cast(n[3],Array);si._d("["+_.dateStr(new Date)+"] ","request received. method:",f,"","","");for(var p=0;p0){this.restart();var t="restart connection. "+Hi.pingAt+" "+v.string(null==this.ws||this.ws.isClosed());si._d("["+_.dateStr(new Date)+"] ",t,"","","","")}else{var n="before pingAt "+Hi.pingAt;si._d("["+_.dateStr(new Date)+"] ",n,"","","",""),this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),Hi.pingAt=(new Date).getTime(),si._d("["+_.dateStr(new Date)+"] ","send ping","","","",""))}},onServerErrorWithMethod:function(e,t){this.onServerError(t)},onServerError:function(e){if(this.sendNotification("error_occurred",e),503==e.code&&"service temporarily unavailable"==e.message){var t=e.detail.retry_after;this.restart(1e3*t)}"invalid session"==e.message&&this.restart()},__class__:Hi});var zi=function(e){this.connected=!1,this.ping=e};a["albero.proxy._MsgPackRpcProxy.ConnectionKeeper"]=zi,zi.__name__=["albero","proxy","_MsgPackRpcProxy","ConnectionKeeper"],zi.prototype={start:function(){},stop:function(){this.deleteTimer()},setConnected:function(e){this.connected==e&&null!=this.timer||(this.connected=e,this.resetTimer())},isConnected:function(){return this.connected},resetTimer:function(){var e=this;if(this.deleteTimer(),this.connected)this.timer=new vr(45e3),this.timer.run=this.ping;else{var t=null;t=function(n){var i=0|Math.min(2*n,45e3);return function(){e.ping();var r=t(i);e.timer=vr.delay(r,n)}},t(3e3)()}},deleteTimer:function(){null!=this.timer&&(this.timer.stop(),this.timer=null)},__class__:zi};var Gi=function(e,t,n){this.method=e,this.onSuccess=t,this.onError=n};a["albero.proxy._MsgPackRpcProxy.ResponseHandler"]=Gi,Gi.__name__=["albero","proxy","_MsgPackRpcProxy","ResponseHandler"],Gi.prototype={__class__:Gi};var Wi=function(e){this.code=e.code,this.message=e.message,this.detail=e.detail};a["albero.proxy.Error"]=Wi,Wi.__name__=["albero","proxy","Error"],Wi.prototype={__class__:Wi};var Ki=function(){};a["albero.proxy.ErrorConverter"]=Ki,Ki.__name__=["albero","proxy","ErrorConverter"],Ki.toLocalError=function(e,t){return{code:t.code,message:t.message,detail:t.detail,localErrorType:e}};var Yi=function(){vi.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new kr,this.updateReadAnnouncementStatusesTimers=new kr};a["albero.proxy.ReadStatusUpdaterProxy"]=Yi,Yi.__name__=["albero","proxy","ReadStatusUpdaterProxy"],Yi.__super__=vi,Yi.prototype=n(vi.prototype,{updateReadStatuses:function(e,t){var n=this,i=this.dataStore.getTalkStatus(e);if(null!=i){if(null==t||this.canRegardTalkReadCountZero(i,t)){if(!In.isUnreadMesasgeExisted(i))return;if(null==i.maxMessageId)return;i.readAll(),this.dataStore.setTalkStatus(i)}else{var r=t.filter(function(e){return In.isUnread(i,e.id)});if(0==r.length)return;var a=r.filter(function(e){if(e.isUnreadCountTarget){var t,i=n.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;t=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else t=!1;return!t}return!1}).length;i.read(r[r.length-1].id,a),this.dataStore.setTalkStatus(i)}var o="_"+e.high+"_"+e.low,s=this.updateReadStatusesTimers,l=null!=ma[o]?s.getReserved(o):s.h[o];null!=l&&l.stop();var u=i.maxReadMessageId,c=vr.delay(function(){n.updateReadStatusesTimers.remove(o),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,u)},1e3),_=this.updateReadStatusesTimers;null!=ma[o]?_.setReserved(o,c):_.h[o]=c}},updateAnnouncementReadStatus:function(e,t){var n=this,i=this.dataStore.getAnnouncementStatus(e);if(null!=i){if(null==t||this.canRegardAnnouncementReadCountZero(i,t)){if(!je.isUnreadAnnouncementExisted(i))return;if(null==i.maxAnnouncementId)return;i.readAll(),this.dataStore.setAnnouncementStatus(i)}else{var r=t.filter(function(e){return je.isUnread(i,e)});if(0==r.length)return;i.read(r[r.length-1],r.length),this.dataStore.setAnnouncementStatus(i)}var a="_"+e.high+"_"+e.low,o=this.updateReadAnnouncementStatusesTimers,s=null!=ma[a]?o.getReserved(a):o.h[a];null!=s&&s.stop();var l=i.maxReadAnnouncementId;s=vr.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(a),n.api.updateAnnouncementReadStatus(e,l)},1e3);var u=this.updateReadAnnouncementStatusesTimers;null!=ma[a]?u.setReserved(a,s):u.h[a]=s}},canRegardTalkReadCountZero:function(e,t){return this.canRegardReadCountZero(e.maxMessageId,t.map(function(e){return e.id}))},canRegardAnnouncementReadCountZero:function(e,t){return this.canRegardReadCountZero(e.maxAnnouncementId,t)},canRegardReadCountZero:function(e,t){var n=U.orNull(F.lastOption(t));return null!=e&&null!=n&&e.high==n.high&&e.low==n.low},__class__:Yi});var Vi=function(){vi.call(this,"routing")};a["albero.proxy.RoutingProxy"]=Vi,Vi.__name__=["albero","proxy","RoutingProxy"],Vi.__super__=vi,Vi.prototype=n(vi.prototype,{onRegister:function(){},init:function(){null==this.router&&(this.router=new qi(this,this.settings,this.dataStore),this.router.start())},forward:function(e){this.init(),this.router.forward(e)}, -redirect:function(e,t){this.init(),this.router.redirect(e,t)},back:function(){null!=this.router&&this.router.back()},stop:function(){null!=this.router&&this.router.started&&this.router.stop()},__class__:Vi});var qi=function(e,t,n){this.proxy=e,this.settings=t,this.dataStore=n,this.started=!1,this.urlConverterDelegate=new Qi(t,n)};a["albero.proxy._RoutingProxy.LocalRouter"]=qi,qi.__name__=["albero","proxy","_RoutingProxy","LocalRouter"],qi.prototype={notify:function(e){var t=this.getDomainId(e);this.settings.setSelectedDomainId(t),this.proxy.sendNotification("current_page_changed",e)},start:function(){this.started=!0},forward:function(e){0!=e[1]&&this.notify(e)},redirect:function(e,t){},redirectWithHash:function(){},back:function(){this.notify(this.prev)},stop:function(){this.started=!1},getDomainId:function(e){switch(e[1]){case 2:return e[2];case 3:return e[2];case 4:return e[2];case 5:return e[2];case 6:return e[2];case 10:return e[2];default:return null}},parseFragment:function(e){return z.createUrls(e,this.urlConverterDelegate)},toFragment:function(e){return z.createFragment(e,this.urlConverterDelegate)},__class__:qi};var Qi=function(e,t){this.settings=e,this.dataStore=t};a["albero.proxy.UrlConverterDelegate"]=Qi,Qi.__name__=["albero","proxy","UrlConverterDelegate"],Qi.__interfaces__=[G],Qi.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return U.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e,t=U.flatMap(this.getLastSelectedDomainId(),r(this,this.getDomain));switch(t[1]){case 0:e=U.flatMap(this.getLastSelectedDomainId(),r(this,this.getDomain));break;case 1:e=this.getOldestDomain()}return U.map(e,function(e){return e.id})},getDomain:function(e){return U.option(this.dataStore.getDomain(e))},getOldestDomain:function(){return new _t(this.dataStore.getDomains()).getOldestDomain()},__class__:Qi};var Ji=function(){vi.call(this,"searchService")};a["albero.proxy.SearchServiceProxy"]=Ji,Ji.__name__=["albero","proxy","SearchServiceProxy"],Ji.__super__=vi,Ji.prototype=n(vi.prototype,{isSearching:function(){return this.searching},clearSearching:function(){this.searching=!1},isRecentParams:function(e){return null!=this.recentParams&&null!=e&&this.recentParams.eq(e)},clearRecentParams:function(){this.recentParams=null},clearEditingParams:function(){this.editingParams=null},saveParams:function(e){this.editingParams=e,this.recentParams=e.copy()},updateTalkIdParam:function(e){this.assureParams(),this.editingParams.talkId=e},updateSearchTypeParam:function(e){this.assureParams(),this.editingParams.searchType=e},updateFromUserIdParam:function(e){this.assureParams(),this.editingParams.fromUserId=e},updateKeywordParam:function(e){this.assureParams(),this.editingParams.keyword=e},updateDomainIdParam:function(e){this.assureParams(),this.editingParams.domainId=e},updateSinceTextParam:function(e){this.assureParams(),this.editingParams.sinceText=e},updateUntilTextParam:function(e){this.assureParams(),this.editingParams.untilText=e},assureParams:function(){if(null==this.editingParams){var e=this.settings.getSelectedDomainId(),t={domain_id_str:"_"+e.high+"_"+e.low};this.editingParams=new $t(t)}},prepareForSearching:function(e,t){this.searching=!0,null==t&&this.sendNotification("notify_search_prepare",{searching:!0,params:e})},notifySearchMessagesFail:function(){this.searching=!1,this.sendNotification("notify_search_messages_fail",{})},notifySearchAttachmentsFail:function(){this.searching=!1,this.sendNotification("notify_search_attachments_fail",{})},saveSearchMessagesResult:function(e){null==this.contextMap&&(this.contextMap=new kr),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new kr);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(r):i();var a=0,o=function(){2==(a+=1)&&e.api.getTalks(i)};e.api.getFriends(o),e.api.getAcquaintances(o)}),e.api.getDomainInvites(i),e.api.getAccountControlRequests(i),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=F.sortAndReturn(this.dataStore.getDomains(),function(e,t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:mr.ucompare(n.low,i.low),n.high<0?i.high<0?r:-1:i.high>=0?r:1});this.api.sendDomainNotifications(e);for(var t=0;t=0&&process.stderr.write("-----------------------------------------\nCurrent version is expired! (current: "+t+")\nRun 'npm install direct-js' to update\n-----------------------------------------\n")}}this.sendNotification("data_recovered"),this.api.startNotification(),this.api.startUpdateLastUsedAtIfNeed(),this.api.getConferences()},__class__:Xi});var Zi=function(){this.selectedDomainIdOnTalkSelectionChanged=null,this.selectedDomainId=null,this.remember=!0,vi.call(this,"settings")};a["albero.proxy.SettingsProxy"]=Zi,Zi.__name__=["albero","proxy","SettingsProxy"],Zi.__interfaces__=[vn],Zi.__super__=vi,Zi.prototype=n(vi.prototype,{onRegister:function(){this.loadBrowserSettings()},setAccessTokenRemember:function(e){this.remember=e},setAccessToken:function(e){this.remember&&(this.accessToken=e,this.sendNotification("access_token_changed",e))},getAccessToken:function(){return null==this.accessToken&&(this.accessToken=la.accessToken),this.accessToken},clearAccessToken:function(){this.accessToken=null},getOs:function(){return"bot"},getIDFV:function(){var e=P.getItem("idfv");return null!=e&&""!=e||(e=L.randomString(),P.setItem("idfv",e)),e},setConfiguration:function(e){this.configuration=e,this.sendNotification("configuration_changed",e)},getConfiguration:function(){return this.configuration},setSelectedDomainId:function(e){var t=this.selectedDomainId;null!=t&&null!=e&&t.high==e.high&&t.low==e.low||(null!=e?(P.setItem("selected_domain_id_h",v.string(e.high)),P.setItem("selected_domain_id_l",v.string(e.low))):(P.removeItem("selected_domain_id_h"),P.removeItem("selected_domain_id_l")),this.selectedDomainId=e,this.sendNotification("domain_selection_changed",e))},getLastSelectedDomainId:function(){var e,t=P.getItemAsInt("selected_domain_id_h"),n=P.getItemAsInt("selected_domain_id_l");if(null!=t&&null!=n){e=new Cn(t,n)}else e=null;return e},getSelectedDomainId:function(){return this.selectedDomainId},getSelectedDomainIdOnTalkSelectionChanged:function(){return this.selectedDomainIdOnTalkSelectionChanged},clearDomainSelection:function(){this.selectedDomainId=null,P.removeItem("selected_domain_id_h"),P.removeItem("selected_domain_id_l")},clearSelectedTalk:function(e){null==e&&(e=Ft.SingleTalkPane);var t=this.selectedDomainId;this.assureTalkSelectionMap("_"+t.high+"_"+t.low).remove(e),this.selectedDomainIdOnTalkSelectionChanged=this.selectedDomainId,this.sendNotification("talk_selection_changed",new gn(e,Sn.NotSelected))},selectTalk:function(e,t,n,i){var r="_"+t.high+"_"+t.low;if(null==r)return!1;var a=this.assureTalkSelectionMap(r),o=Sn.TalkSelected(n,i);a.set(e,o);var s=this.selectedDomainId;return null!=t&&null!=s&&t.high==s.high&&t.low==s.low&&(this.selectedDomainIdOnTalkSelectionChanged=this.selectedDomainId,this.sendNotification("talk_selection_changed",new gn(e,o)),!0)},selectAnnouncement:function(e){if(null==this.selectedDomainId)return!1;var t=this.selectedDomainId,n="_"+t.high+"_"+t.low;return this.assureTalkSelectionMap(n).set(e,Sn.AnnouncementsSelected),this.selectedDomainIdOnTalkSelectionChanged=this.selectedDomainId,this.sendNotification("talk_selection_changed",new gn(e,Sn.AnnouncementsSelected)),!0},hasSelectedTalkOrAnnouncements:function(e){null==e&&(e=Ft.SingleTalkPane);var t=this.getTalkSelectionMap(this.selectedDomainId);return null!=t&&t.get(e)!=Sn.NotSelected},hasSelectedTalk:function(e){null==e&&(e=Ft.SingleTalkPane);var t=this.getTalkSelectionMap(this.selectedDomainId);if(null==t)return!1;var n=t.get(e);return null!=n&&0!=n[1]},getTalkSelectionMap:function(e){if(null==this.paneTalkSelections)return null;if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.paneTalkSelections;return null!=ma[t]?n.getReserved(t):n.h[t]},assureTalkSelectionMap:function(e){null==this.paneTalkSelections&&(this.paneTalkSelections=new kr);var t=this.paneTalkSelections,n=null!=ma[e]?t.getReserved(e):t.h[e];if(null==n){n=new Ir;var i=this.paneTalkSelections;null!=ma[e]?i.setReserved(e,n):i.h[e]=n}return n},getSelectedTalkId:function(){var e=this.getTalkSelection(this.selectedDomainId,Ft.SingleTalkPane);if(1==e[1]){e[3];return e[2]}return null},isSelectedTalkOrAnnouncements:function(e,t){return wn.isSelected(this.getTalkSelection(this.selectedDomainId,e),t)},getTalkSelection:function(e,t){if(null==this.paneTalkSelections)return Sn.NotSelected;var n=this.getTalkSelectionMap(e);if(null==n)return Sn.NotSelected;var i=n.get(t);return null==i?Sn.NotSelected:i},isSendByEnter:function(){return null==this.sendByEnter&&(this.sendByEnter=!0),this.sendByEnter},setSendByEnter:function(e){e!=this.sendByEnter&&(this.sendByEnter=e,this.sendNotification("send_by_enter_changed",e))},setSelectedStampTabId:function(e){P.setItem("selected_stamp_tab_id",null==e?"null":""+e)},getSelectedStampTabId:function(){var e=P.getItemAsInt("selected_stamp_tab_id");return null==e?0:e},clearSelectedStampTabId:function(){P.removeItem("selected_stamp_tab_id")},setInputTextForTalkId:function(e,t){null==e||0==e.length?this.clearInputTextForTalkId(t):(this.loadInputTextForAll(),this.inputTexts["_"+t.high+"_"+t.low]=e)},getInputTextForTalkId:function(e){this.loadInputTextForAll();var t=this.inputTexts["_"+e.high+"_"+e.low];return null!=t?t:""},clearInputTextForTalkId:function(e){this.loadInputTextForAll(),delete this.inputTexts["_"+e.high+"_"+e.low]},loadInputTextForAll:function(){null==this.inputTexts&&(this.inputTexts=P.getItemAsJson("input_text"),null==this.inputTexts&&(this.inputTexts={}))},saveInputTextForAll:function(){if(null!=this.inputTexts){var e=JSON.stringify(this.inputTexts);P.setItem("input_text",e)}},clearInputTextForAll:function(){P.removeItem("input_text"),this.inputTexts=null},setCopyProfileToAllDomains:function(e){e?P.setItem("copy_profile_to_all_domains","true"):P.removeItem("copy_profile_to_all_domains")},isCopyProfileToAllDomains:function(){return null!=P.getItem("copy_profile_to_all_domains")},setSearchHistoriesForSelectedDomain:function(e){if(null!=this.selectedDomainId){if(this.loadSearchHistoryForAll(),null==e){var t=this.selectedDomainId;delete this.searchHistories["_"+t.high+"_"+t.low]}else{var n=this.selectedDomainId;this.searchHistories["_"+n.high+"_"+n.low]=e}this.saveSearchHistoryForAll()}},getSearchHistoriesForSelectedDomain:function(){if(null==this.selectedDomainId)return null;this.loadSearchHistoryForAll();var e=this.selectedDomainId;return this.searchHistories["_"+e.high+"_"+e.low]},loadSearchHistoryForAll:function(){null==this.searchHistories&&(this.searchHistories=P.getItemAsJson("search_histories"),null==this.searchHistories&&(this.searchHistories={}))},saveSearchHistoryForAll:function(){if(null!=this.searchHistories){var e=JSON.stringify(this.searchHistories);P.setItem("search_histories",e)}},setSelectedDepartmentId:function(e,t){if(null!=e){if(this.loadSelectedDepartmentIdsForAll(),null==t)this.selectedDepartmentIds.remove("_"+e.high+"_"+e.low);else{var n="_"+e.high+"_"+e.low,i=this.selectedDepartmentIds;null!=ma[n]?i.setReserved(n,t):i.h[n]=t}this.saveSelectedDepartmentIdsForAll()}},getSelectedDepartmentId:function(e){if(null==e)return null;this.loadSelectedDepartmentIdsForAll();var t="_"+e.high+"_"+e.low,n=this.selectedDepartmentIds;return null!=ma[t]?n.getReserved(t):n.h[t]},loadSelectedDepartmentIdsForAll:function(){null==this.selectedDepartmentIds&&(this.selectedDepartmentIds=P.getItemWithUnserialize("selected_department_ids"),null==this.selectedDepartmentIds&&(this.selectedDepartmentIds=new kr))},saveSelectedDepartmentIdsForAll:function(){null!=this.selectedDepartmentIds&&P.setItemWithSerialize("selected_department_ids",this.selectedDepartmentIds)},setRightPanelOpened:function(e){e?P.removeItem("right_panel_opened"):P.setItem("right_panel_opened","false")},isRightPanelOpened:function(){return null==P.getItem("right_panel_opened")},setMultiViewMode:function(e){e?P.setItem("multi_view_mode","true"):P.removeItem("multi_view_mode")},isMultiViewMode:function(){return null!=P.getItem("multi_view_mode")},setPasswordWarningSkipUntil:function(e){null==e?P.removeItem("password_warning_skip_until"):P.setItem("password_warning_skip_until","_"+e.high+"_"+e.low)},getPasswordWarningSkipUntil:function(){var e=P.getItem("password_warning_skip_until");return null==e?null:M.makeFromIdStr(e)},setLastUsedExpiredAt:function(e){null==e?P.removeItem("last_used_expired_at"):P.setItem("last_used_expired_at","_"+e.high+"_"+e.low)},getLastUsedExpiredAt:function(){var e=P.getItem("last_used_expired_at");return null==e?null:M.makeFromIdStr(e)},setOnPremise:function(e){this.onPremises=e},isOnPremises:function(){return this.onPremises},getBrowserSettings:function(){return this.browserSettings},applyNotificationSettings:function(e){return e.copyNotificationSettingsTo(this.browserSettings),this.saveBrowserSettings()},applyKeywordWatchingSettings:function(e){return e.copyKeywordSettingsTo(this.browserSettings),this.saveBrowserSettings()},applyTalkSettings:function(e){return e.copyTalkSettingsTo(this.browserSettings),this.saveBrowserSettings()},applyUserDataSettings:function(e){return e.copyUserDataContainerTo(this.browserSettings),this.saveBrowserSettings()},applyLanguageSettings:function(e){return e.copyLanguageSettingsTo(this.browserSettings),this.saveBrowserSettings()},applyConferenceSettings:function(e){return e.copyConferenceSettingsTo(this.browserSettings),this.saveBrowserSettings()},loadBrowserSettings:function(){this.browserSettings=ze.fromJson(P.getItemAsJson(ze.NAME))},saveBrowserSettings:function(){var e=P.getItemAsJson(ze.NAME);return null==e&&(e={}),this.browserSettings.copyTo(e),P.setItem(ze.NAME,JSON.stringify(e))},__class__:Zi});var $i=function(){vi.call(this,"solutionsStore")};a["albero.proxy.SolutionsStoreProxy"]=$i,$i.__name__=["albero","proxy","SolutionsStoreProxy"],$i.__super__=vi,$i.prototype=n(vi.prototype,{getSolutions:function(e){var t=this;return null==this.solutionsMap?[]:this.getSolutionIds(e).map(function(e){return t.solutionsMap.h[e]}).filter(function(e){return null!=e})},getSolution:function(e){return null==this.solutionsMap?null:this.solutionsMap.h[e]},getSolutionIds:function(e){return null==e?[]:null==e.contract?[]:null==e.contract.solutionIds?[]:e.contract.solutionIds},getSolutionIdsNotLoaded:function(e){var t=this;return this.getSolutionIds(e).filter(function(e){return null==t.solutionsMap||!t.solutionsMap.h.hasOwnProperty(e)})},setSolution:function(e){null==this.solutionsMap&&(this.solutionsMap=new Er),this.solutionsMap.h[e.solutionId]=e},__class__:$i});var er=function(){vi.call(this,"talksService")};a["albero.proxy.TalksServiceProxy"]=er,er.__name__=["albero","proxy","TalksServiceProxy"],er.__super__=vi,er.prototype=n(vi.prototype,{getDomainTalksOrderedByTimestamp:function(e){return F.sortAndReturn(this.getDomainTalks(e).map(r(this,this.createTalkPack)),pn.compareTalkOrderingTimestamp).map(r(this,this.getTalkFromTalkPack))},hasConference:function(e){return null!=e&&this.conferenceStore.hasConference(e.id)},isFavoriteTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null!=t&&null!=t.orderInFavorites},getTalkFromTalkPack:function(e){return e.talk},getTalkIdFromTalk:function(e){return e.id},getDomainTalks:function(e){return null==e?[]:this.dataStore.getTalks().filter(function(t){var n=t.domainId;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low})},createTalkPack:function(e){return new pn(e,this.dataStore.getTalkStatus(e.id))},__class__:er});var tr=function(){vi.call(this,"ThumbnailExpansion")};a["albero.proxy.ThumbnailExpansionProxy"]=tr,tr.__name__=["albero","proxy","ThumbnailExpansionProxy"],tr.__super__=vi,tr.prototype=n(vi.prototype,{onRegister:function(){var e=this;vr.delay(function(){e.workingBrowserSettings=e.settings.getBrowserSettings().createCopy()},0)},updateThumbnailExpansionEnabled:function(e){if(null!=this.workingBrowserSettings){var t=this.dataStore.me;if(null!=t){var n=t.id;this.workingBrowserSettings.assureUserData("_"+n.high+"_"+n.low).useThumbnailExpansion=e,this.settings.applyUserDataSettings(this.workingBrowserSettings)}}},isThumbnailExpansionEnabled:function(){if(null==this.workingBrowserSettings)return!1;var e=this.dataStore.me;if(null==e)return!1;var t=e.id;return this.workingBrowserSettings.assureUserData("_"+t.high+"_"+t.low).useThumbnailExpansion},__class__:tr});var nr=function(){vi.call(this,"userPresences")};a["albero.proxy.UserPresencesProxy"]=nr,nr.__name__=["albero","proxy","UserPresencesProxy"],nr.__super__=vi,nr.prototype=n(vi.prototype,{getUserPresenceState:function(e,t){var n=U.map(this.getUserPresence(e),function(e){return e.toState(t)});switch(n[1]){case 0:return n[2];case 1:return Rn.GT_60}},getUserPresence:function(e){return U.option(this.dataStore.getUserPresence(e))},getLastUsedAtString:function(e){var t=U.map(U.flatMap(this.getUserPresence(e),function(e){return e.lastUsedAtOpt}),function(e){return D.datetimeString(e)});switch(t[1]){case 0:return t[2];case 1:return" - "}},__class__:nr});var ir=function(){};a["albero.proxy.helper.AnnouncementHelper"]=ir,ir.__name__=["albero","proxy","helper","AnnouncementHelper"],ir.getDisplayTextWithoutEscape=function(e){return 1==e.type[1]?e.content:""};var rr=function(){};a["albero.proxy.helper.DomainHelper"]=rr,rr.__name__=["albero","proxy","helper","DomainHelper"],rr.isAllowReadAnnouncement=function(e){return null!=e&&!!e.role.allowReadAnnouncements};var ar=function(){};a["albero.proxy.helper.MessageStringMaker"]=ar,ar.__name__=["albero","proxy","helper","MessageStringMaker"],ar.messageStringForKeywordDetection=function(e,t){return null==e?"":1==e.type[1]?e.content:""};var or=function(){};a["puremvc.interfaces.IMediator"]=or,or.__name__=["puremvc","interfaces","IMediator"],or.prototype={__class__:or};var sr=function(e,t){K.call(this),this.mediatorName=null!=e?e:sr.NAME,null!=t&&(this.viewComponent=t)};a["puremvc.patterns.mediator.Mediator"]=sr,sr.__name__=["puremvc","patterns","mediator","Mediator"],sr.__interfaces__=[or],sr.__super__=K,sr.prototype=n(K.prototype,{getMediatorName:function(){return this.mediatorName},setViewComponent:function(e){this.viewComponent=e},getViewComponent:function(){return this.viewComponent},listNotificationInterests:function(){return[]},handleNotification:function(e){},onRegister:function(){},onRemove:function(){},__class__:sr});var lr=function(){sr.call(this,"commandline",null)};a["albero_cli.mediator.CommandLineMediator"]=lr,lr.__name__=["albero_cli","mediator","CommandLineMediator"],lr.__super__=sr,lr.prototype=n(sr.prototype,{onRegister:function(){this.getViewComponent();this.eventEmitter=s.getInstance(),this.dataRecovered=!1,this.startDataSaver()},listNotificationInterests:function(){return["app_state_changed","access_token_changed","current_user_changed","configuration_changed","domain_selection_changed","talk_selection_changed","talk_list_scroll_to_talk_top_needed","user_selection_needed","user_selection_changed","friend_selection_needed","stamp_set_changed","stamp_selection_started","stamp_selection_ended","stamp_selection_changed","action_selection_changed","current_page_changed","fileinfo_selection_changed","message_fileinfo_selection_changed","staged_fileinfo_selection_changed","staged_fileinfos_added","staged_fileinfos_moved","error_occurred","brand_badge_changed","send_form_top_changed","solutions_loaded","right_pane_opened","right_pane_closed","password_expiration_overed","password_expiration_warned","photo_editor_saved","mc_authenticated_user_received","keyword_watching_updated","keyword_detaction_updated","send_by_enter_changed","department_selection_changed_for_members_page","presences_updated","noteinfo_selection_changed","start_note_editing","data_recovering","data_recovered","notify_update_user","notify_add_friend","notify_add_acquaintance","notify_delete_friend","notify_delete_acquaintance","notify_update_domain_users","get_domain_users_responsed","get_users_responsed","get_profile_responsed","get_profile_errored","update_user_responsed","update_user_errored","update_profile_responsed","update_profile_errored","notify_update_department_tree","notify_update_department_users","get_department_tree_responsed","get_department_tree_canceled","get_department_users_responsed","get_department_users_canceled","get_department_user_count_responsed","get_me_responsed","department_user_count_cleared","department_user_ids_prepared","notify_add_domain_invite","notify_accept_domain_invite","notify_delete_domain_invite","notify_join_domain","notify_update_domain","notify_leave_domain","notify_create_pair_talk","notify_create_group_talk","notify_update_group_talk","notify_update_group_talk_ERRORED","notify_add_talkers","notify_add_talkers_including_me","notify_delete_talker","notify_delete_talk","notify_create_message","notify_delete_message","notify_update_read_statuses","notify_update_talk_status","notify_update_local_talk_status","notify_get_messages","notify_get_message_status","notify_add_favorite_talk","notify_delete_favorite_talk","notify_disable_push_notification","notify_enable_push_notification","create_message_start","create_message_complete","create_message_fail","notify_create_announcement","notify_delete_announcement","notify_update_announcement_status","notify_get_announcements","create_announcement_start","create_announcement_complete","create_announcement_fail","notify_update_question","get_questions_responsed","notify_create_attachment","notify_delete_attachment","get_note_statuses_loaded","get_note_loaded","get_note_failed_by_note_not_found","create_note_completed","update_note_setting_completed","update_note_setting_failed_by_not_found","update_note_setting_failed_by_conflict","update_note_completed","update_note_failed_by_not_found","update_note_failed_by_conflict","delete_note_completed","notify_create_note","notify_update_note_partially","notify_delete_note","notify_update_note_for_setting","notify_update_note_for_revision","create_note_button_clicked","get_file_responsed","notify_search_messages","notify_search_attachments","notify_search_messages_fail","notify_search_attachments_fail","notify_search_prepare","notify_search_clear","notify_filter_box_text_changed","notify_search_box_popup","notify_add_account_control_request","notify_delete_account_control_request","notify_join_account_control_group","notify_update_account_control_group_partially","notify_leave_account_control_group","prepare_conference_from_message","join_conference_responsed","join_conference_canceled","notify_open_conference","notify_close_conference","notify_conference_participant_join","notify_conference_participant_limit","notify_conference_participant_reject","notify_all_talk_members_rejected_conference"]},handleNotification:function(e){var t=this,n=e.getName();switch(n){case"current_page_changed":var i=e.getBody();I.enumEq(i,B.error)&&(this.dataRecovered=!1),this.eventEmitter.emit(e.getName(),e.getBody());break;case"data_recovered":if(this.dataRecovered)return;this.dataRecovered=!0,this.eventEmitter.emit(e.getName());break;case"data_recovering":this.dataRecovered=!1,this.eventEmitter.emit(e.getName());break;case"error_occurred":this.eventEmitter.emit(e.getName(),new Error("AdapterError"),e.getBody());break;default:;this.eventEmitter.emit(e.getName(),e.getBody())}this.getViewComponent();switch(e.getName()){case"access_token_changed":this.dataStore.clear(!0),console.log(e.getBody()),process.exit(0);break;case"create_announcement_complete":case"create_message_complete":var r,a=e.getBody(),o=a[0],s=(a[1],this.dataStore),l=o.userId;if(null!=s.me){var u=s.me.id;r=null!=u&&null!=l&&u.high==l.high&&u.low==l.low}else r=!1;if(r)return this.messageEvent.messageCreated(o,e.getType()),void this.sendQueue.sendNext(o);break;case"create_message_fail":var c,_=e.getBody()[0],h=e.getBody()[1],d=this.dataStore,f=h.userId;if(null!=d.me){var m=d.me.id;c=null!=m&&null!=f&&m.high==f.high&&m.low==f.low}else c=!1;if(c)return this.messageEvent.messageCreated(null,e.getType()),void(null!=_&&429==_.code?this.sendQueue.retryAfter(1e3*(0|_.detail.retry_after)):null!=_&&503==_.code?this.sendQueue.retryAfter(1e3*(0|_.detail.retry_after)):this.sendQueue.sendNext(h));break;case"current_user_changed":e.getBody(),this.sendQueue.restart();break;case"notify_add_domain_invite":e.getBody();break;case"notify_create_group_talk":case"notify_create_pair_talk":if(!this.dataRecovered)return;var p=e.getBody();vr.delay(function(){t.emit(p,"JoinMessage",t.dataStore.me)},500);break;case"notify_create_message":var g,v=e.getBody(),y=this.dataStore,S=v.userId;if(null!=y.me){var w=y.me.id;g=null!=w&&null!=S&&w.high==S.high&&w.low==S.low}else g=!1;if(g)return;if(v.isBotMessage&&!la.talkWithBot)return;var T,E=this.dataStore.getTalkStatus(v.talkId);if(null!=E&&null!=E.maxReadMessageId){var b=E.maxReadMessageId,A=v.id,N=b.high-A.high|0;N=0!=N?N:mr.ucompare(b.low,A.low),T=(b.high<0?A.high<0?N:-1:A.high>=0?N:1)>=0}else T=!1;if(T)return;vr.delay(function(){null!=t.dataStore.getTalk(v.talkId)&&(t.sendNotification("Read",de.TALK(v.talkId)),t.dispatch(v))},200);break;case"notify_delete_talk":var k=e.getBody();this.messageEvent.deleteTalk(k);break;case"notify_get_message_status":var D=e.getBody();this.messageEvent.messageRead(D.talkId,D.id,D.readUserIds,D.unreadUserIds);break;case"notify_leave_domain":var C=e.getBody();this.messageEvent.leaveDomain(C);break;case"notify_update_group_talk":if(!this.dataRecovered)return;var O=e.getBody(),R=null!=O.name?O.name:"";vr.delay(function(){t.emit(O,"TopicChangeMessage",t.dataStore.me,R)},500);break;case"notify_update_local_talk_status":var M=e.getBody();this.messageEvent.messageReadEveryone(M.id,M.maxEveryoneReadMessageId);break;case"notify_update_read_statuses":for(var x=e.getBody(),F=0,U=x.messageIds;F2){n=new Cn(v.parseInt(i[1]),v.parseInt(i[2]))}else n=null;var r=this.userObjectsByIds(e,[n]);return r.length>0?r[0]:null},userObjectsByIds:function(e,t,n){for(var i=[],r=0,a=this.dataStore.getUsers(e,t);r=0?_:1)<=0}else o=!0;o&&(t[l]=this.userObject(a),null!=ma[l]?n.setReserved(l,a):n.h[l]=a)}return t},talkObject:function(e,t){var n=null==e?null:JSON.parse(JSON.stringify(e));n.id_i64=e.id;var i=e.id;n.id="_"+i.high+"_"+i.low,n.topic=e.name,n.type=e.type==dn.Unknown?0:e.type==dn.PairTalk?1:2,n.userIds=e.userIds,n.users=this.userObjectsByIds(e.domainId,e.userIds,t),n.domain=this.domainObjectById(e.domainId,t),n.domainId_i64=e.domainId;var r=e.domainId;return n.domainId="_"+r.high+"_"+r.low,n},talkObjects:function(e){for(var t=new kr,n={},i=0,r=this.dataStore.getTalks();i0?i[0]:null;var u=e.userId;r.userId="_"+u.high+"_"+u.low,r.talk=this.talkObject(n,t);var c=e.talkId;return r.talkId="_"+c.high+"_"+c.low,r},__class__:ur});var cr=function(){vi.call(this,"messageEvent"),this.emitters=new kr};a["albero_cli.proxy.MessageEventProxy"]=cr,cr.__name__=["albero_cli","proxy","MessageEventProxy"],cr.__super__=vi,cr.prototype=n(vi.prototype,{registEmitter:function(e,t){_r.factory=this;var n=_r.createInstance(t);if(null!=n){var i=this.emitters;null!=ma[e]?i.setReserved(e,n):i.h[e]=n}},messageCreated:function(e,t){var n=this.emitters,i=null!=ma[t]?n.getReserved(t):n.h[t];if(null!=i&&(this.emitters.remove(t),null!=e)){var r=e.id,a="_"+r.high+"_"+r.low,o=this.emitters;if(null!=ma[a]?o.setReserved(a,i):o.h[a]=i,i.talk=this.dataStore.getTalk(e.talkId),i.setFirstReader(this.dataStore.me),i.emitOnSend(e),i.removeEventListener("send"),!i.hasEventListener()){var s=e.id;this.emitters.remove("_"+s.high+"_"+s.low)}}},messageRead:function(e,t,n,i){var r=this,a="_"+t.high+"_"+t.low,o=this.emitters,s=null!=ma[a]?o.getReserved(a):o.h[a];if(null!=s){s.emitOnRead(n,i);var l=s.__readerIds.length>=16;s.startTimer(l,function(n){n?r.messageReadEveryone(e,t):r.sendNotification("Read",de.READ_STATUS(e,t))}),0==s.__unreadIds.length&&this.messageReadEveryone(e,t)}},messageReadEveryone:function(e,t){if(null!=t)for(var n=this.emitters.keys();n.hasNext();){var i,r=n.next(),a=this.emitters,o=null!=ma[r]?a.getReserved(r):a.h[r];if(null!=o.talk){var s=o.talk.id;i=null!=s&&null!=e&&s.high==e.high&&s.low==e.low}else i=!1;if(i){var l=M.makeFromIdStr(r),u=l.high-t.high|0;u=0!=u?u:mr.ucompare(l.low,t.low),(l.high<0?t.high<0?u:-1:t.high>=0?u:1)<=0&&this._messageReadEveryone(e,r)}}},_messageReadEveryone:function(e,t){var n=this.emitters,i=null!=ma[t]?n.getReserved(t):n.h[t];null!=i&&(i.__unreadIds.length>0&&i.emitOnRead(i.__unreadIds),i.stopTimer(),i.removeEventListener("read"),i.hasEventListener()||this.emitters.remove(t))},deleteTalk:function(e){for(var t=this.emitters.keys();t.hasNext();){var n,i=t.next(),r=this.emitters,a=null!=ma[i]?r.getReserved(i):r.h[i];if(null!=a.talk){var o=a.talk.id;n=null!=o&&null!=e&&o.high==e.high&&o.low==e.low}else n=!1;n&&(a.stopTimer(),this.emitters.remove(i))}},leaveDomain:function(e){for(var t=this.emitters.keys();t.hasNext();){var n,i=t.next(),r=this.emitters,a=null!=ma[i]?r.getReserved(i):r.h[i];if(null!=a.talk){var o=a.talk.domainId;n=null!=o&&null!=e&&o.high==e.high&&o.low==e.low}else n=!1;n&&(a.stopTimer(),this.emitters.remove(i))}},__class__:cr});var _r=function(e){this.context=e,this.listeners=new kr,Object.defineProperty(this,"readUsers",{get:this.get_readUsers}),Object.defineProperty(this,"unreadUsers",{get:this.get_unreadUsers})};a["albero_cli.proxy.Emitter"]=_r,_r.__name__=["albero_cli","proxy","Emitter"],_r.createInstance=function(e){for(var t=null,n=g.fields(e),i=0;i0&&this.emit("read",[this.users(n),this.get_readUsers(),this.get_unreadUsers()])},setFirstReader:function(e){this.__readerIds=[e.id],this.__unreadIds=this.talk.userIds.slice(),M.remove(this.__unreadIds,e.id)},get_readUsers:function(){return this.users(this.__readerIds)},get_unreadUsers:function(){return this.users(this.__unreadIds)},users:function(e){return null==e?[]:_r.factory.hubotObject.userObjectsByIds(this.talk.domainId,e)},get_message:function(e){return _r.factory.hubotObject.messageObject(e)},answer:function(e){var t,n=this,i=At.typeOf(this.message.type),r=this.message.id.split("_");if(r.length>2){t=new Cn(v.parseInt(r[1]),v.parseInt(r[2]))}else t=null;switch(i[1]){case 12:case 14:case 16:case 17:case 18:case 19:var a=this.message.content.in_reply_to;t=new Cn(a.high,a.low)}var o=me.Question(t,function(t){var r=t.responses;switch(i[1]){case 11:case 12:case 17:var a=n.users(r[0].userIds),o=n.users(r[1].userIds);e(a,o);break;case 13:case 14:case 18:var s=r.map(function(e){return n.users(e.userIds)});e(s);break;case 15:case 16:case 19:var l=n.users(r[0].userIds),u=n.users(r[1].userIds);e(l,u)}});_r.factory.sendNotification("ReloadData",o)},startTimer:function(e,t){var n=this;null!=this.__readerTimer&&this.stopTimer(),this.__readerTimerWait=e?1:1440;var i=null;i=function(){n.__readerTimerWait*=2,n.__readerTimerWait<1440?(t(!1),n.__readerTimer=vr.delay(i,60*n.__readerTimerWait*1e3|0)):(t(!0),n.__readerTimer=null)},this.__readerTimer=vr.delay(i,60*this.__readerTimerWait*1e3|0)},stopTimer:function(){null!=this.__readerTimer&&(this.__readerTimer.stop(),this.__readerTimer=null)},__class__:_r};var hr=function(){vi.call(this,"sendQueue"),this.sendCount=0,this.sendMsgQueue=new dr(this,550,new ai("sendQueueMessage")),this.sendAnnounceQueue=new dr(this,5050,new ai("sendQueueAnnounce"))};a["albero_cli.proxy.SendQueueProxy"]=hr,hr.__name__=["albero_cli","proxy","SendQueueProxy"],hr.__super__=vi,hr.prototype=n(vi.prototype,{restart:function(){this.sendMsgQueue.sendNext(),this.sendAnnounceQueue.sendNext()},retryAfter:function(e){this.sendMsgQueue.retryAfter(e),this.sendAnnounceQueue.retryAfter(e)},sendNext:function(e){null!=e.talkId?this.sendMsgQueue.sendNext():this.sendAnnounceQueue.sendNext()},sendAnnouncement:function(e,t){this.send(e,null,t)},sendMessage:function(e,t){this.send(null,e,t)},send:function(e,t,n){if("string"!=typeof n){var i=new Cn(0,this.sendCount++),r=i;this.messageEvent.registEmitter("_"+r.high+"_"+r.low,n);var a=new At;if(a.id=r,a.domainId=e,a.talkId=t,a.content=this.parseContent(n),a.type=this.detectType(a.content),a.type==Nt.unknown)return;if(a.type==Nt.file&&null!=a.content.path)return void this.sendFile(t,a.content,"_"+r.high+"_"+r.low);a.type!=Nt.yesOrNo&&a.type!=Nt.selectOne||null!=a.content.listing||(a.content.listing=!1),this.applyLimitToMessage(a),this.pushQueue(a)}else for(var o=n,s=0,l=w.slice(o,1024);s2){var s=new Cn(v.parseInt(o[1]),v.parseInt(o[2]));a=s}else a=null}else if("close_yesno"==i||"close_select"==i||"close_task"==i){e.close=_.substr(i,6,null),i="in_reply_to";var l=r.split("_");if(l.length>2){var u=new Cn(v.parseInt(l[1]),v.parseInt(l[2]));a=u}else a=null}null!=a&&(e[i]=a)}else if(null!=r&&g.isObject(e)&&null!=r.high&&null!=r.low){var c=new Cn(r.high,r.low);e[i]=c}}return 1==t.length&&null!=e.text?e.text:e},detectType:function(e){if(null==e)return Nt.unknown;if("string"==typeof e)return Nt.text;if(null!=e.stamp_set)return Nt.stamp;if(null!=e.lat)return Nt.geo;if(null!=e.file_id||null!=e.path)return Nt.file;if(null!=e.close){var t=e.close;if(g.deleteField(e,"close"),"yesno"==t)return Nt.yesOrNoClosed;if("select"==t)return Nt.selectOneClosed;if("task"==t)return Nt.todoClosed}else if(null!=e.in_reply_to){if("boolean"==typeof e.response)return Nt.yesOrNoReply;var n=e.response;if("number"==typeof n&&(0|n)===n)return Nt.selectOneReply;if(null!=e.done)return Nt.todoDone}else{if(null!=e.question)return null==e.options?Nt.yesOrNo:Nt.selectOne;if(null!=e.title)return Nt.todo}return Nt.unknown},applyLimitToMessage:function(e){switch(e.type[1]){case 1:var t=e.content;null!=t&&t.length>1024&&(e.content=t.substring(0,1024));break;case 2:case 5:var n=e.content.text;null!=n&&n.length>1024&&(e.content.text=n.substring(0,1024));break;case 11:case 13:var i=e.content.question;if(null!=i&&i.length>1024&&(e.content.question=i.substring(0,1024)),e.type==Nt.selectOne){var r=e.content.options;r.length>9&&(r=r.slice(0,9),e.content.options=r);for(var a=0,o=r.length;a64&&(r[s]=r[s].substring(0,64))}}break;case 15:var l=e.content.title;null!=l&&l.length>1024&&(e.content.title=l.substring(0,1024))}},__class__:hr});var dr=function(e,t,n){this.proxy=e,this.sendSpan=t,this.storage=n,this.sendQueue=this.loadQueue(),this.sending=this.sendQueue.length>0,this.lastSendNode=null,this.lastSendTime=new Date(0)};a["albero_cli.proxy._SendQueueProxy.SendQueue"]=dr,dr.__name__=["albero_cli","proxy","_SendQueueProxy","SendQueue"],dr.prototype={pushQueue:function(e,t){this.sendQueue.push({name:e,param:t}),this.saveQueue(),this.sending||(this.sending=!0,this.sendNext())},sendNext:function(){if(!this.sending||0==this.sendQueue.length)return void this.closeQueue();var e=(new Date).getTime()-this.lastSendTime.getTime(),t=0|Math.max(this.sendSpan-e,100);vr.delay(r(this,this.sendNotification),t)},retryAfter:function(e){if(!this.sending||null==this.lastSendNode)return void this.closeQueue();this.sendQueue.unshift(this.lastSendNode),this.saveQueue(),vr.delay(r(this,this.sendNotification),e)},sendNotification:function(){var e=this.sendQueue.shift();this.saveQueue(),this.proxy.sendNotification(e.name,e.param),this.lastSendNode=e,this.lastSendTime=new Date},closeQueue:function(){this.sending=!1,this.lastSendNode=null},saveQueue:function(){null!=this.storage&&this.storage.save(this.sendQueue)},loadQueue:function(){if(null!=this.storage){var e=this.storage.load();if(null!=e)return e}return[]},__class__:dr};var fr=function(){};a["haxe.IMap"]=fr,fr.__name__=["haxe","IMap"];var mr={};a["haxe._Int32.Int32_Impl_"]=mr,mr.__name__=["haxe","_Int32","Int32_Impl_"],mr.ucompare=function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0};var pr={};a["haxe._Int64.Int64_Impl_"]=pr,pr.__name__=["haxe","_Int64","Int64_Impl_"],pr.toString=function(e){var t=e,n=new Cn(0,0),i=n;if(t.high==i.high&&t.low==i.low)return"0";var r="",a=!1;t.high<0&&(a=!0);for(var o=new Cn(0,10),s=o;;){var l=new Cn(0,0),u=l;if(t.high==u.high&&t.low==u.low)break;var c=pr.divMod(t,s);if(c.modulus.high<0){var _=c.modulus,h=~_.high,d=-_.low;if(0==d){h++;h|=0}r=new Cn(h,d).low+r;var f=c.quotient,m=~f.high,p=-f.low;if(0==p){m++;m|=0}t=new Cn(m,p)}else r=c.modulus.low+r,t=c.quotient}return a&&(r="-"+r),r},pr.divMod=function(e,t){if(0==t.high){switch(t.low){case 0:throw new Br("divide by zero");case 1:return{quotient:new Cn(e.high,e.low),modulus:new Cn(0,0)}}}var n,i=e.high<0!=t.high<0;if(e.high<0){var r=~e.high,a=-e.low;if(0==a){r++;r|=0}n=new Cn(r,a)}else{n=new Cn(e.high,e.low)}if(t.high<0){var o=~t.high,s=-t.low;if(0==s){o++;o|=0}t=new Cn(o,s)}else t=t;for(var l=new Cn(0,0),u=l,c=new Cn(0,1),_=c;!(t.high<0);){var h=mr.ucompare(t.high,n.high),d=0!=h?h:mr.ucompare(t.low,n.low),f=1;if(0==(f&=63)){t=new Cn(t.high,t.low)}else if(f<32){var m=new Cn(t.high<>>32-f,t.low<>>32-g,_.low<=0)break}for(;;){var S=new Cn(0,0),w=S;if(_.high==w.high&&_.low==w.low)break;var T=mr.ucompare(n.high,t.high);if((0!=T?T:mr.ucompare(n.low,t.low))>=0){u=new Cn(u.high|_.high,u.low|_.low);var I=n.high-t.high|0,E=n.low-t.low|0;if(mr.ucompare(n.low,t.low)<0){I--;I|=0}n=new Cn(I,E)}var b=1;if(0==(b&=63)){_=new Cn(_.high,_.low)}else if(b<32){var A=new Cn(_.high>>>b,_.high<<32-b|_.low>>>b);_=A}else{var N=new Cn(0,_.high>>>b-32);_=N}var k=1;if(0==(k&=63)){t=new Cn(t.high,t.low)}else if(k<32){var D=new Cn(t.high>>>k,t.high<<32-k|t.low>>>k);t=D}else{var C=new Cn(0,t.high>>>k-32);t=C}}if(i){var O=~u.high,R=-u.low;if(0==R){O++;O|=0}u=new Cn(O,R)}if(e.high<0){var M=~n.high,x=-n.low;if(0==x){M++;M|=0}n=new Cn(M,x)}return{quotient:u,modulus:n}};var gr=function(){this.buf=new y,this.cache=[],this.useCache=gr.USE_CACHE,this.useEnumIndex=gr.USE_ENUM_INDEX,this.shash=new kr,this.scount=0};a["haxe.Serializer"]=gr,gr.__name__=["haxe","Serializer"],gr.run=function(e){var t=new gr;return t.serialize(e),t.toString()},gr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=ma[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=ma[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=v.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n0&&(1==o?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==o?"null":""+o),o=0),this.serialize(e[c]))}o>0&&(1==o?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==o?"null":""+o)),this.buf.b+="h";break;case Date:var h=e;this.buf.b+="v",this.buf.b+=v.string(h.getTime());break;case d:this.buf.b+="l";for(var f=e,m=f.h;null!=m;){var p=m.item;m=m.next;var y=p;this.serialize(y)}this.buf.b+="h";break;case Er:this.buf.b+="q";for(var S=e,w=S.keys();w.hasNext();){var T=w.next();this.buf.b+=":",this.buf.b+=null==T?"null":""+T,this.serialize(S.h[T])}this.buf.b+="h";break;case br:this.buf.b+="M";for(var E=e,b=E.keys();b.hasNext();){var A=b.next(),N=g.field(A,"__id__");g.deleteField(A,"__id__"),this.serialize(A),A.__id__=N,this.serialize(E.h[A.__id__])}this.buf.b+="h";break;case kr:this.buf.b+="b";for(var k=e,D=k.keys();D.hasNext();){var C=D.next();this.serializeString(C),this.serialize(null!=ma[C]?k.getReserved(C):k.h[C])}this.buf.b+="h";break;case Dr:var O=e;this.buf.b+="s",this.buf.b+=v.string(Math.ceil(8*O.length/6)),this.buf.b+=":";var R=0,M=O.length-2,x=gr.BASE64_CODES;if(null==x){var F=gr.BASE64.length;x=new Array(F);for(var U=0,P=gr.BASE64.length;U>2]),this.buf.b+=String.fromCharCode(x[63&(B<<4|j>>4)]),this.buf.b+=String.fromCharCode(x[63&(j<<2|H>>6)]),this.buf.b+=String.fromCharCode(x[63&H])}if(R==M){var z=O.b[R++],G=O.b[R++];this.buf.b+=String.fromCharCode(x[z>>2]),this.buf.b+=String.fromCharCode(x[63&(z<<4|G>>4)]),this.buf.b+=String.fromCharCode(x[G<<2&63])}else if(R==M+1){var W=O.b[R++];this.buf.b+=String.fromCharCode(x[W>>2]),this.buf.b+=String.fromCharCode(x[W<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(I.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(I.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var K=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=v.string(this.useEnumIndex?"j":"w"),this.serializeString(I.getEnumName(K)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=v.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var Y=e.length;this.buf.b+=v.string(Y-2);for(var V=2,q=Y;V57)break;e=10*e+(i-48),this.pos++}else{if(this.pos!=n)break;t=!0,this.pos++}}return t&&(e*=-1),e},readFloat:function(){for(var e=this.pos;;){var t=this.buf.charCodeAt(this.pos);if(t!=t)break;if(!(t>=43&&t<58||101==t||69==t))break;this.pos++}return parseFloat(_.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw new Br("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Br("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new Br("Invalid enum format");var n=this.readDigits();if(0==n)return I.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return I.createEnum(e,t,i)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new Br("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new Br("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new Br("Class not found "+r);var o=I.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new Br("Invalid custom data");return o;case 77:var s=new br;for(this.cache.push(s),this.buf;104!=this.buf.charCodeAt(this.pos);){var l=this.unserialize();s.set(l,this.unserialize())}return this.pos++,s;case 82:var u=this.readDigits();if(u<0||u>=this.scache.length)throw new Br("Invalid string reference");return this.scache[u];case 97:var c=(this.buf,[]);for(this.cache.push(c);;){var h=this.buf.charCodeAt(this.pos);if(104==h){this.pos++;break}if(117==h){this.pos++;var f=this.readDigits();c[c.length+f-1]=null}else c.push(this.unserialize())}return c;case 98:var m=new kr;for(this.cache.push(m),this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=ma[p]?m.setReserved(p,g):m.h[p]=g}return this.pos++,m;case 99:var v=this.unserialize(),y=this.resolver.resolveClass(v);if(null==y)throw new Br("Class not found "+v);var S=I.createEmptyInstance(y);return this.cache.push(S),this.unserializeObject(S),S;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var w=this.unserialize(),T=this.resolver.resolveEnum(w);if(null==T)throw new Br("Enum not found "+w);this.pos++;var E=this.readDigits(),b=T.__constructs__.slice()[E];if(null==b)throw new Br("Unknown enum index "+w+"@"+E);var A=this.unserializeEnum(T,b);return this.cache.push(A),A;case 107:return NaN;case 108:var N=new d;for(this.cache.push(N),this.buf;104!=this.buf.charCodeAt(this.pos);)N.add(this.unserialize());return this.pos++,N;case 109:return-1/0;case 110:return null;case 111:var k={};return this.cache.push(k),this.unserializeObject(k),k;case 112:return 1/0;case 113:var D=new Er;this.cache.push(D);for(var C=(this.buf,this.buf.charCodeAt(this.pos++));58==C;){var O=this.readDigits(),R=this.unserialize();D.h[O]=R,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new Br("Invalid IntMap format");return D;case 114:var M=this.readDigits();if(M<0||M>=this.cache.length)throw new Br("Invalid reference");return this.cache[M];case 115:var x=this.readDigits(),F=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0),j=P+(x-L),H=new Dr(new ArrayBuffer(B)),z=0;P>4);var K=U[F.charCodeAt(P++)];H.b[z++]=255&(W<<4|K>>2);var Y=U[F.charCodeAt(P++)];H.b[z++]=255&(K<<6|Y)}if(L>=2){var V=U[F.charCodeAt(P++)],q=U[F.charCodeAt(P++)];if(H.b[z++]=255&(V<<2|q>>4),3==L){var Q=U[F.charCodeAt(P++)];H.b[z++]=255&(q<<4|Q>>2)}}return this.pos+=x,this.cache.push(H),H;case 116:return!0;case 118:var J;if(this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))J=_.strDate(_.substr(this.buf,this.pos,19)),this.pos+=19;else{var X=this.readFloat();J=new Date(X)}return this.cache.push(J),J;case 119:var Z=this.unserialize(),$=this.resolver.resolveEnum(Z);if(null==$)throw new Br("Enum not found "+Z);var ee=this.unserializeEnum($,this.unserialize());return this.cache.push(ee),ee;case 120:throw Br.wrap(this.unserialize());case 121:var te=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.posa+2){var o=e.left,s=e.right;return(null==o?0:o._height)>=(null==s?0:s._height)?new Tr(e.left,e.key,e.value,new Tr(e.right,t,n,i)):new Tr(new Tr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Tr(e.right.right,t,n,i))}if(a>r+2){var l=i.right,u=i.left;return(null==l?0:l._height)>(null==u?0:u._height)?new Tr(new Tr(e,t,n,i.left),i.key,i.value,i.right):new Tr(new Tr(e,t,n,i.left.left),i.left.key,i.left.value,new Tr(i.left.right,i.key,i.value,i.right))}return new Tr(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return g.compare(e,t)},__class__:wr};var Tr=function(e,t,n,i,r){if(null==r&&(r=-1),this.left=e,this.key=t,this.value=n,this.right=i,-1==r){var a,o=this.left,s=this.right;if((null==o?0:o._height)>(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};a["haxe.ds.TreeNode"]=Tr,Tr.__name__=["haxe","ds","TreeNode"],Tr.prototype={__class__:Tr};var Ir=function(){wr.call(this)};a["haxe.ds.EnumValueMap"]=Ir,Ir.__name__=["haxe","ds","EnumValueMap"],Ir.__interfaces__=[fr],Ir.__super__=wr,Ir.prototype=n(wr.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6),t.push(128|63&i)):i<=65535?(t.push(224|i>>12),t.push(128|i>>6&63),t.push(128|63&i)):(t.push(240|i>>18),t.push(128|i>>12&63),t.push(128|i>>6&63),t.push(128|63&i))}return new Dr(new Uint8Array(t).buffer)},Dr.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Dr(e)},Dr.fastGet=function(e,t){return e.bytes[t]},Dr.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Br(Ur.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&_|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Dr};var Cr=function(){this.b=[]};a["haxe.io.BytesBuffer"]=Cr,Cr.__name__=["haxe","io","BytesBuffer"],Cr.prototype={getBytes:function(){var e=new Dr(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Cr};var Or=function(){};a["haxe.io.Input"]=Or,Or.__name__=["haxe","io","Input"],Or.prototype={readByte:function(){throw new Br("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Br(Ur.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof Br&&(e=e.val),!jr.__instanceof(e,Fr))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new Dr(new ArrayBuffer(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new Br(Ur.Blocked);n+=i,e-=i}return t},readFloat:function(){return Pr.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?Pr.i64ToDouble(t,e):Pr.i64ToDouble(e,t)},readInt8:function(){var e=this.readByte();return e>=128?e-256:e},readInt16:function(){var e=this.readByte(),t=this.readByte(),n=this.bigEndian?t|e<<8:e|t<<8;return 0!=(32768&n)?n-65536:n},readUInt16:function(){var e=this.readByte(),t=this.readByte();return this.bigEndian?t|e<<8:e|t<<8},readInt32:function(){var e=this.readByte(),t=this.readByte(),n=this.readByte(),i=this.readByte();return this.bigEndian?i|n<<8|t<<16|e<<24:e|t<<8|n<<16|i<<24},__class__:Or};var Rr=function(e,t,n){if(null==t&&(t=0),null==n&&(n=e.length-t),t<0||n<0||t+n>e.length)throw new Br(Ur.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};a["haxe.io.BytesInput"]=Rr,Rr.__name__=["haxe","io","BytesInput"],Rr.__super__=Or,Rr.prototype=n(Or.prototype,{readByte:function(){if(0==this.len)throw new Br(new Fr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Br(Ur.OutsideBounds);if(0==this.len&&n>0)throw new Br(new Fr);this.lene.length)throw new Br(Ur.OutsideBounds);for(var i=e.b,r=n;r>0;)this.writeByte(i[t]),++t,--r;return n},set_bigEndian:function(e){return this.bigEndian=e,e},write:function(e){for(var t=e.length,n=0;t>0;){var i=this.writeBytes(e,n,t);if(0==i)throw new Br(Ur.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(Pr.floatToI32(e))},writeDouble:function(e){var t=Pr.doubleToI64(e);this.bigEndian?(this.writeInt32(t.high),this.writeInt32(t.low)):(this.writeInt32(t.low),this.writeInt32(t.high))},writeInt8:function(e){if(e<-128||e>=128)throw new Br(Ur.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new Br(Ur.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new Br(Ur.Overflow);this.bigEndian?(this.writeByte(e>>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:Mr};var xr=function(){this.b=new Cr};a["haxe.io.BytesOutput"]=xr,xr.__name__=["haxe","io","BytesOutput"],xr.__super__=Mr,xr.prototype=n(Mr.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Br(Ur.OutsideBounds);for(var r=(i.b,e.b),a=t,o=t+n;a>>31<<1),n=e>>>23&255,i=8388607&e;return 0==i&&0==n?0:t*(1+Math.pow(2,-23)*i)*Math.pow(2,n-127)},Pr.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:n>128&&(n=128);var i=Math.round(8388608*(t/Math.pow(2,n)-1));return 8388608==i&&n<128&&(i=0,++n),(e<0?-2147483648:0)|n+127<<23|i},Pr.i64ToDouble=function(e,t){var n=1-(t>>>31<<1),i=(t>>20&2047)-1023,r=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==r&&-1023==i?0:n*(1+Math.pow(2,-52)*r)*Math.pow(2,i)},Pr.doubleToI64=function(e){var t=Pr.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else e>0?(t.low=0,t.high=2146435072):(t.low=0,t.high=-1048576);return t};var Lr=function(){};a["haxe.rtti.Meta"]=Lr,Lr.__name__=["haxe","rtti","Meta"],Lr.getMeta=function(e){return e.__meta__},Lr.getFields=function(e){var t=Lr.getMeta(e);return null==t||null==t.fields?{}:t.fields};var Br=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,Br)};a["js._Boot.HaxeError"]=Br,Br.__name__=["js","_Boot","HaxeError"],Br.wrap=function(e){return e instanceof Error?e:new Br(e)},Br.__super__=Error,Br.prototype=n(Error.prototype,{__class__:Br});var jr=function(){};a["js.Boot"]=jr,jr.__name__=["js","Boot"],jr.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=jr.__nativeClassName(e);return null!=n?jr.__resolveNativeClass(n):null},jr.__string_rec=function(e,t){if(null==e)return"null";if(t.length>=5)return"<...>";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;r0?",":"")+jr.__string_rec(e[_],t)}return l+="]"}var h;try{h=e.toString}catch(e){return"???"}if(null!=h&&h!=Object.toString&&"function"==typeof h){var d=e.toString();if("[object Object]"!=d)return d}var f=null,m="{\n";t+="\t";var p=null!=e.hasOwnProperty;for(var f in e)p&&!e.hasOwnProperty(f)||"prototype"!=f&&"__class__"!=f&&"__super__"!=f&&"__interfaces__"!=f&&"__properties__"!=f&&(2!=m.length&&(m+=", \n"),m+=t+f+" : "+jr.__string_rec(e[f],t));return t=t.substring(1),m+="\n"+t+"}";case"string":return e;default:return String(e)}},jr.__interfLoop=function(e,t){if(null==e)return!1;if(e==t)return!0;var n=e.__interfaces__;if(null!=n)for(var i=0,r=n.length;i223)return-256|n}}catch(e){if(e instanceof Br&&(e=e.val),!jr.__instanceof(e,Fr))throw e}return null},readArray:function(e,t,n){for(var i=[],r=0,a=t;r1.401298464324817e-45&&r<3.4028234663852886e38?(this.o.writeByte(202),this.o.writeFloat(i)):(this.o.writeByte(203),this.o.writeDouble(i));break;case 3:this.o.writeByte(e?195:194);break;case 4:var a=g.fields(e),o=h.count(a);o<16?this.o.writeByte(128|o):o<65536?(this.o.writeByte(222),this.o.writeUInt16(o)):(this.o.writeByte(223),this.o.writeInt32(o));for(var s=0;s1.401298464324817e-45&&t<3.4028234663852886e38?(this.o.writeByte(202),this.o.writeFloat(e)):(this.o.writeByte(203),this.o.writeDouble(e))},writeRaw:function(e){var t=e.length;t<32?this.o.writeByte(160|t):t<65536?(this.o.writeByte(218),this.o.writeUInt16(t)):(this.o.writeByte(219),this.o.writeInt32(t)),this.o.write(e)},writeArray:function(e){var t=e.length;t<16?this.o.writeByte(144|t):t<65536?(this.o.writeByte(220),this.o.writeUInt16(t)):(this.o.writeByte(221),this.o.writeInt32(t));for(var n=0;n0)for(var s=new aa(r(e,e.handleNotification),e),l=0,u=o.length;l>>16)<<16|0)|0},gr.USE_CACHE=!1,gr.USE_ENUM_INDEX=!1,gr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Sr.DEFAULT_RESOLVER=new yr,Sr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",br.count=0,Pr.i64tmp=function(e){return new Cn(0,0)}(),jr.__toStr={}.toString,qr.FLOAT_SINGLE_MIN=1.401298464324817e-45,qr.FLOAT_SINGLE_MAX=3.4028234663852886e38,qr.FLOAT_DOUBLE_MIN=5e-324,qr.FLOAT_DOUBLE_MAX=1.7976931348623157e308,s.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file +!function(e,t){"use strict";function s(){return Qr.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new o,require("unorm")};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(ya.host=e.host,ya.endpoint=e.endpoint,ya.accessToken=e.access_token,ya.proxyURL=e.proxyURL,ya.account=e.account,ya.talkWithBot=e.talkWithBot,ya.name=e.name,ya.storagePath=e.storage_path,ya.storageQuota=e.storage_quota,ya.wsConfig=e.ws_config),vi._d("["+Fe.dateStr(new Date)+"] ","current settings",ya,"","",""),null==ya.accessToken&&vi._e("["+Fe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},announce:function(e,t){var n,i=e.room;if(null!=i){var r,a=i.split("_");if(2=e.length);){if(!this.matchSub(e,n)){i+=Y.string(Fe.substr(e,n,null));break}var r=this.matchedPos();if(i+=Y.string(Fe.substr(e,n,r.pos-n)),i+=Y.string(t(this)),n=0==r.len?(i+=Y.string(Fe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},I.startsWith=function(e,t){return e.length>=t.length&&Fe.substr(e,0,t.length)==t},I.replace=function(e,t,n){return e.split(t).join(n)},I.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,0<(e>>>=4););if(null!=t)for(;n.lengthn;){var t=Fe.substr(e,0,n);i.push(t),e=Fe.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=Er._mul(o,l),_=Er._mul(s,l),d=Er._mul(o,u),h=c,f=(Er._mul(s,u)+(d>>>16)|0)+(_>>>16)|0;if(h=h+(d<<=16)|0,Er.ucompare(h,d)<0){f++;f|=0}if(h=h+(_<<=16)|0,Er.ucompare(h,_)<0){f++;f|=0}f=f+(Er._mul(t.low,n.high)+Er._mul(t.high,n.low)|0)|0;var m=new bn(f,h),p=new bn(0,Y.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Er.ucompare(v,m.low)<0){g++;g|=0}t=new bn(g,v)}return t},Ue.getHigh=function(e){return e.high},Ue.getLow=function(e){return e.low},Ue.idStr=function(e){return"_"+e.high+"_"+e.low},Ue.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new bn(Y.parseInt(t.matched(1)),Y.parseInt(t.matched(2))):null},Ue.toStr=function(e){return Nr.toString(e)},Ue.isNeg=function(e){return e.high<0},Ue.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Er.ucompare(i,e.low)<0){n++;n|=0}return new bn(n,i)},Ue.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Er.ucompare(e.low,t.low)<0){n--;n|=0}return new bn(n,i)},Ue.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Er.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Ue.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Ue.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Ue.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=Le.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:ye});var Se=function(){U.call(this)};(n["albero.command.UrlCommand"]=Se).__name__=["albero","command","UrlCommand"],Se.__super__=U,Se.prototype=i(U.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Se});var we=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};we.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=we,t.toString=s,t},we.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=we,t.toString=s,t},we.BACK=["BACK",2],we.BACK.toString=s,(we.BACK.__enum__=we).__empty_constructs__=[we.BACK];function Te(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Te).__name__=["albero","entity","Account"],Te.prototype={__class__:Te};function je(e){null!=e&&(this.id=e.id,this.group=new Ie(e.group),this.profilePolicy=new Ee(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=je).__name__=["albero","entity","AccountControlGroup"],je.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:je};var Ie=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=Ie).__name__=["albero","entity","AccountControlGroupGroup"],Ie.prototype={__class__:Ie};var Ee=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=Ee).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Ee.prototype={__class__:Ee};function He(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ie(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Ee(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=He).__name__=["albero","entity","AccountControlGroupPartialUpdate"],He.prototype={__class__:He};function Ge(e){null!=e&&(this.id=Ue.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}(n["albero.entity.AccountControlRequest"]=Ge).__name__=["albero","entity","AccountControlRequest"],Ge.prototype={__class__:Ge};var Ne=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ne.ng=["ng",0],Ne.ng.toString=s,(Ne.ng.__enum__=Ne).ok=["ok",1],Ne.ok.toString=s,(Ne.ok.__enum__=Ne).image=["image",2],Ne.image.toString=s,(Ne.image.__enum__=Ne).imageOrVideo=["imageOrVideo",3],Ne.imageOrVideo.toString=s,(Ne.imageOrVideo.__enum__=Ne).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ne.imageOrVideoOrAudio.toString=s,(Ne.imageOrVideoOrAudio.__enum__=Ne).other=["other",5],Ne.other.toString=s,(Ne.other.__enum__=Ne).__empty_constructs__=[Ne.ng,Ne.ok,Ne.image,Ne.imageOrVideo,Ne.imageOrVideoOrAudio,Ne.other];function Ae(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Ae).__name__=["albero","entity","AllowAttachmentType"],Ae.fromInt=function(e){if(null==e)return new Ae(Ne.other);var t;if(null==e)t=Ne.other;else switch(e){case 0:t=Ne.ng;break;case 1:t=Ne.ok;break;case 2:t=Ne.image;break;case 3:t=Ne.imageOrVideo;break;case 4:t=Ne.imageOrVideoOrAudio;break;default:t=Ne.other}return new Ae(t)},Ae.fromValue=function(e){return new Ae(e)},Ae.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,gi.localize("MessageStringMaker.achieve"),gi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?gi.localize("MessageStringMaker.achieve"):gi.localize("MessageStringMaker.remand"):"";case 17:case 18:case 19:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 2:if(null!=this.content.text&&0=Ii.HIRAGANA_SMALL_A&&o<=Ii.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Ii.KATAKANA_SMALL_A-Ii.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Ii.katakanaToRoman=function(e){return(new fi).convert(e)},Ii.normalize=function(e){return new Ei(null).normalize(e)},Ii.normalizeForFile=function(e){return new Ei(null).normalizeForFile(e)},Ii.asyncAssureNormalize=function(){return Promise.resolve()},Ii.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ei=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Ei).__name__=["albero","js","Normalizer"],Ei.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof qr&&(e=e.val),vi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),gi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof qr&&(e=e.val),vi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),gi.localize("TextCanonicalizer.invalid")}},__class__:Ei};function Ni(e){var t=this,n=ya.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",va(this,this.onError)),this.ws.on("connect",function(e){(t.connection=e).on("error",va(t,t.onError)),e.on("close",va(t,t.onConnectionClose)),e.on("message",va(t,t.onMessage)),e.on("pong",va(t,t.onPong)),t.onOpen(null)});var r=null;null!=ya.proxyURL&&(r={agent:Ti.createAgent(ya.proxyURL)}),this.ws.connect(e,null,null,null,r)}(n["albero.js.WebSocket"]=Ni).__name__=["albero","js","WebSocket"],Ni.prototype={onOpen:function(e){vi._i("["+Fe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=Lr.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){vi._e("["+Fe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null);var t="WebSocket closed. "+Y.string(e.code)+" "+Y.string(e.reason)+" "+Y.string(e.wasClean);vi._i("["+Fe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new ta(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:Ni};function Ai(){}(n["puremvc.interfaces.IProxy"]=Ai).__name__=["puremvc","interfaces","IProxy"],Ai.prototype={__class__:Ai};function bi(){}(n["albero.proxy.AccessTokenResolverProxy"]=bi).__name__=["albero","proxy","AccessTokenResolverProxy"],bi.__interfaces__=[Ai],bi.prototype={__class__:bi};var Di=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Di).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Di.newInstance=function(){return new Ci("accessTokenResolver")};var ki=function(e,t){M.call(this),this.proxyName=null!=e?e:ki.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=ki).__name__=["puremvc","patterns","proxy","Proxy"],ki.__interfaces__=[Ai],ki.__super__=M,ki.prototype=i(M.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:ki});var Ci=function(e){ki.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Ci).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Ci.__interfaces__=[bi],Ci.__super__=ki,Ci.prototype=i(ki.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ya.account?ya.account.split(":"):null;null==i||2!=i.length?null!=(e=null==e?this.accountLoader.load():e)&&(null!=e.accessToken?(this.settings.setAccessToken(e.accessToken),t(e.accessToken)):this.api.createAccessToken(e.email,e.pass,t)):this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Ci});function Oi(){}(n["albero.proxy.AccountLoaderProxy"]=Oi).__name__=["albero","proxy","AccountLoaderProxy"],Oi.__interfaces__=[Ai],Oi.prototype={__class__:Oi};var Ri=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=Ri).__name__=["albero","proxy","AccountLoaderProxyFactory"],Ri.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new Mi("accountLoader")};var Mi=function(e){ki.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=Mi).__name__=["albero","proxy","AccountLoaderProxyForHubot"],Mi.__interfaces__=[Oi],Mi.__super__=ki,Mi.prototype=i(ki.prototype,{load:function(){var i=this,t=require("read");return t({prompt:"Email: "},function(e,n){t({prompt:"Password: ",silent:!0},function(e,t){i.sendNotification("SignIn",new Te(n,t))})}),null},__class__:Mi});var Fi=function(){ki.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Fi).__name__=["albero","proxy","AlberoBroadcastProxy"],Fi.__super__=ki,Fi.prototype=i(ki.prototype,{handleNotification:function(n,e,i){var r=this;switch(vi._d("["+Fe.dateStr(new Date)+"] ","Receive request from server. name:",n," body:",e,""),n){case"notify_add_account_control_request":var t=new Ge(e);this.dataStore.setAccountControlRequest(t),this.sendNotification(n,t),i();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(e[1]);this.sendNotification(n,a),i();break;case"notify_add_domain_invite":var o=new ot(e);this.dataStore.setDomainInvite(o),this.sendNotification(n,o),i();break;case"notify_add_favorite_message":var s=new zn(e);this.messageStore.onAddFavoriteMessage(s),this.sendNotification(n,s),i();break;case"notify_add_favorite_talk":var l=new ht(e);this.updateTalkStatusByFavoriteTalkEvent(l),this.sendNotification(n,l),i();break;case"notify_add_friend":var u=this.dataFactory.newFriend(e[1]);this.sendNotification(n,u),i();break;case"notify_add_talkers":var c=new ln(e);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(n,c),i();break;case"notify_close_conference":var _=new Ke(e);this.conferenceStore.removeConference(_),this.updateTalkStatusByConferenceClosedEvent(_),this.sendNotification(n,_),i();break;case"notify_conference_participant_join":var d,h=e[3],f=e[4],m=this.dataStore;if(null!=m.me){var p=m.me.id;d=null!=p&&null!=f&&p.high==f.high&&p.low==f.low}else d=!1;d&&this.dataStore.addReactedConfereceId(h),this.sendNotification(n,e),i();break;case"notify_conference_participant_reject":var g=e[3];this.dataStore.addReactedConfereceId(g),this.sendNotification(n,e),i();break;case"notify_create_announcement":var v=new ze(e);this.keywordWatcher.onAnnouncementCreated(v),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(v)),this.sendNotification(n,v),i();break;case"notify_create_message":var y=new Nt(e);this.messageStore.setMessage(y),this.keywordWatcher.onMessageCreated(y);var S=this.newTalkStatusByMessage(y);switch(null!=S&&this.sendNotification("notify_update_local_talk_status",S),y.type[1]){case 0:var w=y.content,T=null;switch(w.type){case"delete_talker":T=w.deleted_user_id;break;case"hide_pair_talk":T=w.user_id}if(null==T)return this.sendNotification(n,y),void i();for(var I=y.talkId,E=this.dataStore.getQuestions(I,T),N=0;Nt.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void vi._e("["+Fe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new yn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Ht.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new yn).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&((t=new yn).id=e.talkId),Sn.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;n||t.unreadCount++,t.talkOrderingTimestamp=e.createdAt}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(Sn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),Sn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=At.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!xe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return vi._e("["+Fe.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var n=e.messageIds[0],r=0,a=e.messageIds;r=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,Nt.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=ir.toLocalError(Tt.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new bt;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=ir.toLocalError(Tt.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?xr.Some(1e3*o.asInt(e.detail.retry_after)):xr.None})},upload:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a);var o=this.prepareMessageFileAsync(n,e);o.then(function(e){r.createMessageReliable(t,At.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadMulti:function(n,i,r,a,o){var s=this,l=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",l);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=Aa[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new Pr,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>>31,t.low<<1);if(63,u=new bn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var d=new bn(0,0);if(u.high==d.high&&u.low==d.low)break;var h=Er.ucompare(n.high,t.high);if(0<=(0!=h?h:Er.ucompare(n.low,t.low))){l=new bn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Er.ucompare(n.low,t.low)<0){f--;f|=0}n=new bn(f,m)}63,u=new bn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new bn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new bn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new bn(v,y)}return{quotient:l,modulus:n}};var Ar=function(){this.buf=new T,this.cache=[],this.useCache=Ar.USE_CACHE,this.useEnumIndex=Ar.USE_ENUM_INDEX,this.shash=new Pr,this.scount=0};(n["haxe.Serializer"]=Ar).__name__=["haxe","Serializer"],Ar.run=function(e){var t=new Ar;return t.serialize(e),t.toString()},Ar.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Aa[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=Aa[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=Y.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(R<<4|M>>4)]),this.buf.b+=String.fromCharCode(b[63&(M<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=Y.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=Y.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=Y.string(B-2);for(var j=2,H=B;j=this.length)throw new qr("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new qr("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new qr("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new qr("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var d=this.readDigits();c[c.length+d-1]=null}else c.push(this.unserialize())}return c;case 98:var h=new Pr;this.cache.push(h);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=Aa[f]?h.setReserved(f,m):h.h[f]=m}return this.pos++,h;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new qr("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new qr("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new qr("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new Mr;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new qr("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new qr("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),R=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var H=M[R.charCodeAt(F++)];P.b[L++]=255&(j<<4|H>>2);var G=M[R.charCodeAt(F++)];P.b[L++]=255&(H<<6|G)}if(2<=x){var z=M[R.charCodeAt(F++)],Y=M[R.charCodeAt(F++)];if(P.b[L++]=255&(z<<2|Y>>4),3==x){var W=M[R.charCodeAt(F++)];P.b[L++]=255&(Y<<4|W>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var K;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))K=Fe.strDate(Fe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();K=new Date(V)}return this.cache.push(K),K;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new qr("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw qr.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new Or(e.left,e.key,e.value,new Or(e.right,t,n,i)):new Or(new Or(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Or(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Or(new Or(e,t,n,i.left),i.key,i.value,i.right):new Or(new Or(e,t,n,i.left.left),i.left.key,i.left.value,new Or(i.left.right,i.key,i.value,i.right))}return new Or(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=Or).__name__=["haxe","ds","TreeNode"],Or.prototype={__class__:Or};var Rr=function(){Cr.call(this)};(n["haxe.ds.EnumValueMap"]=Rr).__name__=["haxe","ds","EnumValueMap"],Rr.__interfaces__=[Ir],Rr.__super__=Cr,Rr.prototype=i(Cr.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new Lr(new Uint8Array(t).buffer)},Lr.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Lr(e)},Lr.fastGet=function(e,t){return e.bytes[t]},Lr.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new qr(Wr.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Lr};function Br(){this.b=[]}(n["haxe.io.BytesBuffer"]=Br).__name__=["haxe","io","BytesBuffer"],Br.prototype={getBytes:function(){var e=new Lr(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Br};function jr(){}(n["haxe.io.Input"]=jr).__name__=["haxe","io","Input"],jr.prototype={readByte:function(){throw new qr("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new qr(Wr.OutsideBounds);try{for(;0e.length)throw new qr(Wr.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Hr).__name__=["haxe","io","BytesInput"],Hr.__super__=jr,Hr.prototype=i(jr.prototype,{readByte:function(){if(0==this.len)throw new qr(new Yr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new qr(Wr.OutsideBounds);if(0==this.len&&0e.length)throw new qr(Wr.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:Gr};function zr(){this.b=new Br}(n["haxe.io.BytesOutput"]=zr).__name__=["haxe","io","BytesOutput"],zr.__super__=Gr,zr.prototype=i(Gr.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new qr(Wr.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},Kr.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},Kr.doubleToI64=function(e){var t=Kr.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;r>>16)<<16|0)|0},Ar.USE_CACHE=!1,Ar.USE_ENUM_INDEX=!1,Ar.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",kr.DEFAULT_RESOLVER=new Dr,kr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Fr.count=0,Kr.i64tmp=new bn(0,0),Qr.__toStr={}.toString,ia.FLOAT_SINGLE_MIN=1401298464324817e-60,ia.FLOAT_SINGLE_MAX=34028234663852886e22,ia.FLOAT_DOUBLE_MIN=5e-324,ia.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file diff --git a/lib/direct.min.js b/lib/direct.min.js index 69c21bf..4b69fa9 100755 --- a/lib/direct.min.js +++ b/lib/direct.min.js @@ -1,11 +1 @@ -!function(e,t){"use strict";function n(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}function i(e){return e instanceof Array?function(){return m.iter(e)}:"function"==typeof e.iterator?r(e,e.iterator):e.iterator}function r(e,t){if(null==t)return null;null==t.__id__&&(t.__id__=Zr++);var n;return null==e.hx__closures__?e.hx__closures__={}:n=e.hx__closures__[t.__id__],null==n&&(n=function(){return n.method.apply(n.scope,arguments)},n.scope=e,n.method=t,e.hx__closures__[t.__id__]=n),n}function a(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function s(e){return"number"==typeof e}function l(e){return"object"==typeof e&&null!==e}function u(e){return void 0===e}function c(e){var t=e.url,n=e.headers,i=e.data,r=e.files,a=e.complete,o=new FormData;for(var s in i)i.hasOwnProperty(s)&&o.append(s,i[s]);for(var s in r)r.hasOwnProperty(s)&&o.append(s,r[s]);var l=new XMLHttpRequest;l.open("POST",t,!0);for(var s in n)n.hasOwnProperty(s)&&l.setRequestHeader(s,n[s]);return l.onload=function(e){4===l.readyState&&a(200===l.status,l)},l.onerror=function(e){a(!1,l)},l.send(o),l}var _={},h=function(){return xr.__string_rec(this,"")},d=e.DirectAPI=function(){this.eventEmitter=new a};_.DirectAPI=d,d.__name__=["DirectAPI"],d.getInstance=function(){return null==d.instance&&(d.instance=new d),d.instance},d.main=function(){},d.prototype={setOptions:function(e){null!=e&&($r.host=e.host,$r.endpoint=e.endpoint,$r.accessToken=e.access_token,$r.proxyURL=e.proxyURL,$r.account=e.account,$r.talkWithBot=e.talkWithBot),ci._d("["+m.dateStr(new Date)+"] ","current settings",$r,"","",""),null==$r.accessToken&&ci._e("["+m.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return e.length>0&&"_"==e.charAt(0)?F.makeFromIdStr(e):F.parse(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:cr.toString(e)},listen:function(){this.facade=k.getInstance(),this.api=xr.__cast(this.facade.retrieveProxy("api"),Ei),this.data=xr.__cast(this.facade.retrieveProxy("dataStore"),ki),this.facade.startup()},emit:function(e,t,n,i){this.eventEmitter.emit(e,t,n,i)},on:function(e,t){return this.eventEmitter.on(e,t)},getDomainInvites:function(e){this.api._getDomainInvites(e)},acceptDomainInvite:function(e){this.api.acceptDomainInvite(e)},__class__:d};var f=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};_.EReg=f,f.__name__=["EReg"],f.prototype={match:function(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:function(e){if(null!=this.r.m&&e>=0&&e=e.length)break;if(!this.matchSub(e,n)){i+=w.string(m.substr(e,n,null));break}var r=this.matchedPos();if(i+=w.string(m.substr(e,n,r.pos-n)),i+=w.string(t(this)),0==r.len?(i+=w.string(m.substr(e,r.pos,1)),n=r.pos+1):n=r.pos+r.len,!this.r.global)break}return!this.r.global&&n>0&&nt?1:-1},S.isEnumValue=function(e){return null!=e&&null!=e.__enum__},S.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var w=function(){};_.Std=w,w.__name__=["Std"],w.string=function(e){return xr.__string_rec(e,"")},w.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=m.cca(e,1)&&88!=m.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t};var T=function(){this.b=""};_.StringBuf=T,T.__name__=["StringBuf"],T.prototype={toString:function(){return this.b},__class__:T};var E=function(){};_.StringTools=E,E.__name__=["StringTools"],E.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},E.startsWith=function(e,t){return e.length>=t.length&&m.substr(e,0,t.length)==t},E.replace=function(e,t,n){return e.split(t).join(n)},E.hex=function(e,t){for(var n="",i="0123456789ABCDEF";;)if(n=i.charAt(15&e)+n,!((e>>>=4)>0))break;if(null!=t)for(;n.length=0?i:i+4294967296),a=new Date(r);return t.getFullYear()==a.getFullYear()&&t.getMonth()==a.getMonth()&&t.getDate()==a.getDate()?a.getHours()+":"+(a.getMinutes()<10?"0":"")+a.getMinutes():M.dateString(a,!1)},M.datetimeStringIn11Chars=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=4294967296*n+(i>=0?i:i+4294967296),a=new Date(r),o=M.dateString(a,!1);return t.getFullYear()==a.getFullYear()&&(o+=" "+a.getHours()+":"+(a.getMinutes()<10?"0":"")+a.getMinutes()),o},M.timeString=function(e){if(null==e)return"";var t=e.high,n=e.low,i=4294967296*t+(n>=0?n:n+4294967296),r=new Date(i);return r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()},M.datetimeString=function(e){if(null==e)return"";var t=parseFloat(cr.toString(e)),n=new Date(t);return n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate()+" "+n.getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes()};var R=function(){};_["albero.FileDynamicHelper"]=R,R.__name__=["albero","FileDynamicHelper"],R.filterDeleted=function(e){return null==e?[]:e.filter(R.isNotDeleted)},R.isNotDeleted=function(e){return null==e.deleted||!e.deleted},R.createFileInfoDynamic=function(e,t,n,i){var r={url:i.get_url,content_type:e.type,content_size:e.size,name:t,file_id:i.file_id};return L.foreach(n,function(e){null!=e.auth&&(r.thumbnail_url=e.auth.get_url),null!=e.dimension&&(r.thumbnail_dimension=e.dimension.toObject())}),r};var O=function(){};_["albero.FileHelper"]=O,O.__name__=["albero","FileHelper"],O.createByteSizeStringWithUnit=function(e){for(var t,n=["","K","M","G","T"];;){if(!((t=e/1024|0)>0))break;e=t,n.shift()}return e+" "+n.shift()+"B"};var x=function(){};_["albero.History"]=x,x.__name__=["albero","History"],x.replaceState=function(e,t,n){return null!=window.history&&(window.history.replaceState(e,t,n),!0)};var F=function(){};_["albero.Int64Helper"]=F,F.__name__=["albero","Int64Helper"],F.parse=function(e){if(!new f("^\\d+$","").match(e))return null;for(var t=new Rn(0,0),n=t,i=new Rn(0,10),r=i,a=0,o=e.length;a>>16,c=65535&r.low,_=r.low>>>16,h=ur._mul(l,c),d=ur._mul(u,c),m=ur._mul(l,_),p=ur._mul(u,_),g=h,v=(p+(m>>>16)|0)+(d>>>16)|0;if(m<<=16,g=g+m|0,ur.ucompare(g,m)<0){v++;v|=0}if(d<<=16,g=g+d|0,ur.ucompare(g,d)<0){v++;v|=0}v=v+(ur._mul(n.low,r.high)+ur._mul(n.high,r.low)|0)|0;var y=new Rn(v,g),S=y,T=new Rn(0,w.parseInt(e.charAt(s))),E=T,I=S.high+E.high|0,A=S.low+E.low|0;if(ur.ucompare(A,S.low)<0){I++;I|=0}n=new Rn(I,A)}return n},F.getHigh=function(e){return e.high},F.getLow=function(e){return e.low},F.idStr=function(e){return"_"+e.high+"_"+e.low},F.makeFromIdStr=function(e){var t=new f("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Rn(w.parseInt(t.matched(1)),w.parseInt(t.matched(2))):null},F.toStr=function(e){return cr.toString(e)},F.isNeg=function(e){return e.high<0},F.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(ur.ucompare(i,e.low)<0){n++;n|=0}return new Rn(n,i)},F.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(ur.ucompare(e.low,t.low)<0){n--;n|=0}return new Rn(n,i)},F.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:ur.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:t.high>=0?n:1},F.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},F.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},F.toFloat=function(e){var t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)},F.idStrToInt64=function(e){var t=e.split("_");if(t.length>2){return new Rn(w.parseInt(t[1]),w.parseInt(t[2]))}return null},F.decrement=function(e){if(null==e)return null;var t=new Rn(0,1),n=t,i=e.high-n.high|0,r=e.low-n.low|0;if(ur.ucompare(e.low,n.low)<0){i--;i|=0}return new Rn(i,r)},F.increment=function(e){if(null==e)return null;var t=new Rn(0,1),n=t,i=e.high+n.high|0,r=e.low+n.low|0;if(ur.ucompare(r,e.low)<0){i++;i|=0}return new Rn(i,r)},F.unique=function(e){if(null==e)return[];for(var t=[],n=0,i=e.length;n>31,t)},F.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;nt?1:e0&&a.push(new Yt(h.id,d))}}}else{for(var w=[],T=(m.iter(n),0);T0&&a.push(new Yt(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:Ne});var ke=function(){J.call(this)};_["albero.command.UpdateUserCommand"]=ke,ke.__name__=["albero","command","UpdateUserCommand"],ke.__super__=J,ke.prototype=n(J.prototype,{execute:function(e){var t=e.getBody();(null==t.profileImage||E.startsWith(t.profileImage.type,"image/"))&&this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:ke});var De=function(){J.call(this)};_["albero.command.UpdateUserPresencesCommand"]=De,De.__name__=["albero","command","UpdateUserPresencesCommand"],De.__super__=J,De.prototype=n(J.prototype,{execute:function(e){var t=e.getBody().domainId,n=e.getBody().userIds;if(null!=t&&null!=n){var i=this.filterOnlyExpired(F.unique(n));0!=i.length&&this.updateIfNeedPerSub(t,i)}},filterOnlyExpired:function(e){var t=this,n=M.nowAsInt64(),i=this.settings.getConfiguration().presenceExpiration,r=new Rn(i>>31,i),a=r;return e.filter(function(e){var i=L.map(t.userPresences.getUserPresence(e),function(e){return e.isExpired(n,a)});switch(i[1]){case 0:return i[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:De});var Ce=function(){J.call(this)};_["albero.command.UrlCommand"]=Ce,Ce.__name__=["albero","command","UrlCommand"],Ce.__super__=J,Ce.prototype=n(J.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Ce});var Me=_["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};Me.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=Me,t.toString=h,t},Me.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=Me,t.toString=h,t},Me.BACK=["BACK",2],Me.BACK.toString=h,Me.BACK.__enum__=Me,Me.__empty_constructs__=[Me.BACK];var Re=function(e,t,n){this.email=e,this.pass=t,this.accessToken=n};_["albero.entity.Account"]=Re,Re.__name__=["albero","entity","Account"],Re.prototype={__class__:Re};var Oe=function(e){null!=e&&(this.id=e.id,this.group=new xe(e.group),this.profilePolicy=new Fe(e.profile_policy))};_["albero.entity.AccountControlGroup"]=Oe,Oe.__name__=["albero","entity","AccountControlGroup"],Oe.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:Oe};var xe=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};_["albero.entity.AccountControlGroupGroup"]=xe,xe.__name__=["albero","entity","AccountControlGroupGroup"],xe.prototype={__class__:xe};var Fe=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};_["albero.entity.AccountControlGroupProfilePolicy"]=Fe,Fe.__name__=["albero","entity","AccountControlGroupProfilePolicy"],Fe.prototype={__class__:Fe};var Ue=function(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new xe(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Fe(e.profile_policy)))};_["albero.entity.AccountControlGroupPartialUpdate"]=Ue,Ue.__name__=["albero","entity","AccountControlGroupPartialUpdate"],Ue.prototype={__class__:Ue};var Pe=function(e){null!=e&&(this.id=F.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)};_["albero.entity.AccountControlRequest"]=Pe,Pe.__name__=["albero","entity","AccountControlRequest"],Pe.prototype={__class__:Pe};var Le=_["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Le.ng=["ng",0],Le.ng.toString=h,Le.ng.__enum__=Le,Le.ok=["ok",1],Le.ok.toString=h,Le.ok.__enum__=Le,Le.image=["image",2],Le.image.toString=h,Le.image.__enum__=Le,Le.imageOrVideo=["imageOrVideo",3],Le.imageOrVideo.toString=h,Le.imageOrVideo.__enum__=Le,Le.imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Le.imageOrVideoOrAudio.toString=h,Le.imageOrVideoOrAudio.__enum__=Le,Le.other=["other",5],Le.other.toString=h,Le.other.__enum__=Le,Le.__empty_constructs__=[Le.ng,Le.ok,Le.image,Le.imageOrVideo,Le.imageOrVideoOrAudio,Le.other];var Be=function(e){this.value=e};_["albero.entity.AllowAttachmentType"]=Be,Be.__name__=["albero","entity","AllowAttachmentType"],Be.fromInt=function(e){if(null==e)return new Be(Le.other);var t;if(null==e)t=Le.other;else switch(e){case 0:t=Le.ng;break;case 1:t=Le.ok;break;case 2:t=Le.image;break;case 3:t=Le.imageOrVideo;break;case 4:t=Le.imageOrVideoOrAudio;break;default:t=Le.other}return new Be(t)},Be.fromValue=function(e){return new Be(e)},Be.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),e.compareStrongness(t)>0?e.createAttachmentErrorMessageByNetwork(n):t.createAttachmentErrorMessageByDomain(n)},Be.prototype={compareStrongness:function(e){return this.getStrongness()-e.getStrongness()},getStrongness:function(){switch(this.value[1]){case 0:return 40;case 2:return 30;case 3:return 20;case 4:return 10;case 1:case 5:return 0}},createAttachmentErrorMessageByDomain:function(e){switch(null==e&&(e=""),this.value[1]){case 0:return ui.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return ui.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return ui.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return ui.localize("AllowAttachmentType.ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentErrorMessageByNetwork:function(e){switch(null==e&&(e=""),this.value[1]){case 0:return ui.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return ui.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return ui.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return ui.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie_sound")+e;default:return""}},__class__:Be};var ze=function(e){null!=e&&(this.id=e.announcement_id,this.domainId=e.domain_id,this.groupId=e.group_id,this.groupName=e.group_name,this.type=kt.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)};_["albero.entity.Announcement"]=ze,ze.__name__=["albero","entity","Announcement"],ze.prototype={getDisplayTextWithoutEscape:function(){return kt.getDisplayTextWithoutEscape(this.type,this.content)},getNotificatoinTextWithoutEscape:function(e){switch(null==e&&(e=this.userName),null==e&&(e=""),this.type[1]){case 1:case 6:return e+":"+this.getDisplayTextWithoutEscape();default:return ci._e("["+m.dateStr(new Date)+"] ","Unsupported announcement.type is detected. announcment:%o",this,"","",""),kt.getUnsupportText()}},__class__:ze};var He=function(e){this.unreadCount=0,null!=e&&(this.domainId=e.domain_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.maxAnnouncementId=e.max_announcement_id,null!=e.max_announcement&&(this.maxAnnouncement=new ze(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};_["albero.entity.AnnouncementStatus"]=He,He.__name__=["albero","entity","AnnouncementStatus"],He.prototype={updateReadWithStatusUpdate:function(e){var t=0,n=null;if(null!=e.readAnnouncementIds)for(var i=0,r=e.readAnnouncementIds;i=0?l:1)>0}else o=!0;if(o){var u;if(null!=n){var c=a.high-n.high|0;c=0!=c?c:ur.ucompare(a.low,n.low),u=(a.high<0?n.high<0?c:-1:n.high>=0?c:1)>0}else u=!0;u&&(n=a),++t}}null!=n&&this.read(n,t)},read:function(e,t){this.maxReadAnnouncementId=e,this.unreadCount-=t,this.unreadCount<0&&(this.unreadCount=0);this.domainId,this.maxReadAnnouncementId,this.unreadCount},readAll:function(){this.maxReadAnnouncementId=this.maxAnnouncementId,this.unreadCount=0},__class__:He};var Ge=function(){};_["albero.entity.AnnouncementStatusHelper"]=Ge,Ge.__name__=["albero","entity","AnnouncementStatusHelper"],Ge.isUnreadAnnouncementExisted=function(e){if(null==e)return!1;if(null==e.maxAnnouncement)return!1;if(null==e.maxReadAnnouncementId)return!0;var t=e.maxAnnouncement.id,n=e.maxReadAnnouncementId,i=t.high-n.high|0;return i=0!=i?i:ur.ucompare(t.low,n.low),(t.high<0?n.high<0?i:-1:n.high>=0?i:1)>0},Ge.isUnread=function(e,t){if(null!=e.maxReadAnnouncementId){var n=e.maxReadAnnouncementId,i=n.high-t.high|0;return i=0!=i?i:ur.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<0}return!0},Ge.isNewMax=function(e,t){if(null!=e.maxAnnouncementId){var n=e.maxAnnouncementId,i=n.high-t.high|0;return i=0!=i?i:ur.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<0}return!0},Ge.isMax=function(e,t){if(null!=e.maxAnnouncementId){var n=e.maxAnnouncementId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low}return!1},Ge.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var je=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};_["albero.entity.AnnouncementStatusUpdate"]=je,je.__name__=["albero","entity","AnnouncementStatusUpdate"],je.prototype={__class__:je};var Ke=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.talkAutoScroll=1,this.keywordWatchingText="",this.keywordWatchingEmphasis=!1,this.keywordWatchingSelfMessage=!1,this.keywordWatchingActionReply=!1,this.userDataContainer=[],this.language="ja",this.conferenceIncomingSound=!0,null!=e){if(null!=e.notificationInvisibleTalkSound&&(this.notificationInvisibleTalkSound=e.notificationInvisibleTalkSound),null!=e.notificationInvisibleTalkPopup&&(this.notificationInvisibleTalkPopup=e.notificationInvisibleTalkPopup),null!=e.notificationVisibleTalkSound&&(this.notificationVisibleTalkSound=e.notificationVisibleTalkSound),null!=e.notificationVisibleTalkPopup&&(this.notificationVisibleTalkPopup=e.notificationVisibleTalkPopup),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.keywordWatchingText&&(this.keywordWatchingText=e.keywordWatchingText),null!=e.keywordWatchingEmphasis&&(this.keywordWatchingEmphasis=e.keywordWatchingEmphasis),null!=e.keywordWatchingSelfMessage&&(this.keywordWatchingSelfMessage=e.keywordWatchingSelfMessage),null!=e.keywordWatchingActionReply&&(this.keywordWatchingActionReply=e.keywordWatchingActionReply),null!=e.userDataContainer)for(var t=0,n=xr.__cast(e.userDataContainer,Array);t=0?n:n+4294967296)+We.INCOMING_TIME<(new Date).getTime()},isExpired:function(){var e=this.expiredAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)<(new Date).getTime()},__class__:We};var Ve=function(e){null!=e&&(this.maxFriends=e.max_friends,this.maxTalks=e.max_talks,this.maxTalkers=e.max_talkers,this.maxMessageContentLength=e.max_message_content_length,this.botExpiredVersion=e.bot_expired_version,this.presenceExpiration=null!=e.presence_expiration?e.presence_expiration:Ve.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Be.fromInt(e.allow_attachment_type))};_["albero.entity.Configuration"]=Ve,Ve.__name__=["albero","entity","Configuration"],Ve.prototype={__class__:Ve};var qe=function(e){this.contractConference=Sr.None,null!=e&&(this.id=e.contract_id,this.plan=new zt(e.plan),this.quota=new Zt(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=Sr.Some(new Qe(e.conference))))};_["albero.entity.Contract"]=qe,qe.__name__=["albero","entity","Contract"],qe.prototype={getMaxMessageContentLength:function(){return L.map(L.option(this.quota),function(e){return e.maxMessageContentLength})},getMaxTalkers:function(){return L.flatMap(L.option(this.quota),function(e){return L.option(e.maxTalkers)})},isConferenceEnalbed:function(){return L.isDefined(this.contractConference)},isVideoEnalbed:function(){var e=L.map(this.contractConference,function(e){return e.videoEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},getConferenceTtl:function(){return L.map(this.contractConference,function(e){return e.ttl})},getConferenceMaxParticipants:function(){return L.map(this.contractConference,function(e){return e.maxConferenceParticipants})},__class__:qe};var Qe=function(e){this.maxConferenceParticipants=Qe.DEFAULT_MAX_PARTICIPANTS,this.ttl=Qe.DEFAULT_TTL,this.videoEnabled=!1,null!=e&&(this.videoEnabled=e.video_enabled,this.ttl=e.ttl,this.maxConferenceParticipants=e.max_conference_participants)};_["albero.entity.ContractConference"]=Qe,Qe.__name__=["albero","entity","ContractConference"],Qe.prototype={__class__:Qe};var Je=function(e){if(null!=e){this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?Ze.Normal:this.parseDepartmentNodeType(e.node);switch(this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=Je.getLabelRoot();break;case 2:this.name=Je.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};_["albero.entity.Department"]=Je,Je.__name__=["albero","entity","Department"],Je.getLabelFree=function(){return ui.localize("Department.label_free")},Je.getLabelRoot=function(){return ui.localize("Department.label_root")},Je.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==Ze.Root},isFree:function(){return this.nodeType==Ze.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return Ze.Root;case 2:return Ze.Free;default:return Ze.Normal}},__class__:Je};var Xe=function(){};_["albero.entity.DepartmentHelper"]=Xe,Xe.__name__=["albero","entity","DepartmentHelper"],Xe.getName=function(e){return null==e?null:e.name};var Ze=_["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};Ze.Normal=["Normal",0],Ze.Normal.toString=h,Ze.Normal.__enum__=Ze,Ze.Root=["Root",1],Ze.Root.toString=h,Ze.Root.__enum__=Ze,Ze.Free=["Free",2],Ze.Free.toString=h,Ze.Free.__enum__=Ze,Ze.__empty_constructs__=[Ze.Normal,Ze.Root,Ze.Free];var $e=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};_["albero.entity.DepartmentList"]=$e,$e.__name__=["albero","entity","DepartmentList"],$e.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new Je(e)})},__class__:$e};var et=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};_["albero.entity.DepartmentUserCount"]=et,et.__name__=["albero","entity","DepartmentUserCount"],et.prototype={__class__:et};var tt=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};_["albero.entity.DepartmentUserCountList"]=tt,tt.__name__=["albero","entity","DepartmentUserCountList"],tt.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new et(e)})},__class__:tt};var nt=function(e){null!=e&&(this.id=e.domain_id,this.updatedAt=e.updated_at,this.domainInfo=new it(e.domain),this.contract=new qe(e.contract),this.profileDefinition=new Gt(e.profile_definition),this.setting=new rt(e.setting),this.role=new ot(e.role),this.closed=!1)};_["albero.entity.Domain"]=nt,nt.__name__=["albero","entity","Domain"],nt.isChangedContractTreeEnabled=function(e,t){return nt.isDepartmentEnabled(e)!=nt.isDepartmentEnabled(t)},nt.isDepartmentEnabled=function(e){return null!=e&&(!!nt.isAllowListUser(e)&&!!e.setting.contactTreeEnabled)},nt.isAllowListUser=function(e){return null==e||e.role.allowListUsers},nt.isChangedRoleType=function(e,t){return(null==e?st.user:e.role.type)!=(null==t?st.user:t.role.type)},nt.isChangedMaxTalkers=function(e,t){var n,i=L.flatMap(L.option(e),function(e){return e.getMaxTalkers()});switch(i[1]){case 0:n=i[2];break;case 1:n=0}var r,a=L.flatMap(L.option(t),function(e){return e.getMaxTalkers()});switch(a[1]){case 0:r=a[2];break;case 1:r=0}return n!=r},nt.isAllowReadAnnouncement=function(e){return null!=e&&!!e.role.allowReadAnnouncements},nt.prototype={getMaxMessageContentLengthOrElse:function(e){var t=L.flatMap(L.option(this.contract),function(e){return e.getMaxMessageContentLength()});switch(t[1]){case 0:return t[2];case 1:return e}},getMaxTalkers:function(){return L.flatMap(L.option(this.contract),function(e){return e.getMaxTalkers()})},__class__:nt};var it=function(e){null!=e&&(this.name=e.domain_name,this.logoUrl=e.logo_url,this.frozen=e.frozen)};_["albero.entity.DomainInfo"]=it,it.__name__=["albero","entity","DomainInfo"],it.prototype={__class__:it};var rt=function(e){null!=e&&(this.allowAttachmentType=Be.fromInt(e.allow_attachment_type),this.allowSaveAttachmentsToDevice=e.allow_save_attachments_to_device,null!=e.allow_save_attachments&&(this.allowSaveAttachments=new at(e.allow_save_attachments)),this.allowForwardMessageType=this.allowForwardMessageTypeOf(e.allow_forward_message_type),this.contactTreeEnabled=!!e.contact_tree_enabled)};_["albero.entity.DomainSetting"]=rt,rt.__name__=["albero","entity","DomainSetting"],rt.prototype={allowForwardMessageTypeOf:function(e){switch(e){case 0:return lt.ng;case 1:return lt.ok;case 2:return lt.onlyTextOrStamp;default:return lt.other}},__class__:rt};var at=function(e){null!=e&&(this.web=null==e.web||e.web,this.ios=null==e.ios||e.ios,this.android=null==e.android||e.android,this.desktop=null==e.desktop||e.desktop)};_["albero.entity.DomainSettingAllowSaveAttachments"]=at,at.__name__=["albero","entity","DomainSettingAllowSaveAttachments"],at.prototype={__class__:at};var ot=function(e){if(null!=e){this.type=this.typeOf(e.type);var t=e.allow_guests;this.allowGuests=t||!0;var n=e.allow_create_attachments;this.allowCreateAttachments=n||!0;var i=e.allow_read_attachments;this.allowReadAttachments=i||!0;var r=e.allow_create_announcement;this.allowCreateAnnouncement=r&&r,this.allowReadAnnouncements=e.allow_read_announcements,null==this.allowReadAnnouncements&&(this.allowReadAnnouncements=!0),this.allowListUsers=e.allow_list_users,null==this.allowListUsers&&(this.allowListUsers=!0)}};_["albero.entity.DomainRole"]=ot,ot.__name__=["albero","entity","DomainRole"],ot.prototype={def:function(e,t){return e||t},typeOf:function(e){switch(e){case 10:return st.owner;case 20:return st.manager;case 30:return st.user;default:return st.guest}},__class__:ot};var st=_["albero.entity.DomainRoleType"]={__ename__:["albero","entity","DomainRoleType"],__constructs__:["owner","manager","user","guest"]};st.owner=["owner",0],st.owner.toString=h,st.owner.__enum__=st,st.manager=["manager",1],st.manager.toString=h,st.manager.__enum__=st,st.user=["user",2],st.user.toString=h,st.user.__enum__=st,st.guest=["guest",3],st.guest.toString=h,st.guest.__enum__=st,st.__empty_constructs__=[st.owner,st.manager,st.user,st.guest];var lt=_["albero.entity.DomainAllowForwardMessageType"]={__ename__:["albero","entity","DomainAllowForwardMessageType"],__constructs__:["ng","ok","onlyTextOrStamp","other"]};lt.ng=["ng",0],lt.ng.toString=h,lt.ng.__enum__=lt,lt.ok=["ok",1],lt.ok.toString=h,lt.ok.__enum__=lt,lt.onlyTextOrStamp=["onlyTextOrStamp",2],lt.onlyTextOrStamp.toString=h,lt.onlyTextOrStamp.__enum__=lt,lt.other=["other",3],lt.other.toString=h,lt.other.__enum__=lt,lt.__empty_constructs__=[lt.ng,lt.ok,lt.onlyTextOrStamp,lt.other];var ut=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=e.departments)};_["albero.entity.DomainDepartmentPath"]=ut,ut.__name__=["albero","entity","DomainDepartmentPath"],ut.prototype={__class__:ut};var ct=function(e){null!=e&&(this.id=e.domain_id,this.name=e.domain_name,this.accountControlRequestId=F.fromIntOrInt64(e.account_control_request_id),this.updatedAt=e.updated_at)};_["albero.entity.DomainInvite"]=ct,ct.__name__=["albero","entity","DomainInvite"],ct.prototype={__class__:ct};var _t=function(e){null!=e&&(this.id=e.user_id,this.status=e.status,this.displayName=e.display_name,this.canonicalDisplayName=e.canonical_display_name,this.phoneticDisplayName=e.phonetic_display_name,this.canonicalPhoneticDisplayName=e.canonical_phonetic_display_name,this.profileImageUrl=e.profile_image_url,this.updatedAt=e.updated_at)};_["albero.entity.User"]=_t,_t.__name__=["albero","entity","User"],_t.prototype={__class__:_t};var ht=function(e){_t.call(this,e),null!=e&&(this.domainId=e.domain_id,null!=e.profile_contact&&(this.profileContact=xr.__cast(e.profile_contact,Array).map(function(e){return new Kt(e)})),this.departments=e.departments)};_["albero.entity.DomainUser"]=ht,ht.__name__=["albero","entity","DomainUser"],ht.__super__=_t,ht.prototype=n(_t.prototype,{match:function(e,t){if(this.matchNameOrPhonetic(e))return!0;if(null!=this.profileContact&&null!=t.profileDefinition.itemDefinitions)for(var n=0,i=this.profileContact;n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){if(z.isEmpty(e))return!0;if(z.isEmpty(this.canonicalDisplayName)){this.canonicalDisplayName=fi.canonicalize(this.displayName);this.canonicalDisplayName,this.displayName}return this.canonicalDisplayName.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&this.canonicalPhoneticDisplayName.indexOf(e)>-1},matchNameOrPhoneticRoman:function(e){if(this.matchNameOrPhonetic(e))return!0;if(z.isEmpty(this.canonicalDisplayNameRoman)){this.canonicalDisplayNameRoman=fi.canonicalizeForRoman(this.displayName);this.canonicalDisplayNameRoman,this.displayName}return this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(z.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=fi.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1)},__class__:ht});var dt=function(e){this.values=e};_["albero.entity.Domains"]=dt,dt.__name__=["albero","entity","Domains"],dt.prototype={orderByName:function(){var e=P.sortAndReturn(this.values.map(ft.fromDomain),ft.compare).map(ft.toDomain);return new dt(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?Sr.None:p.fold(this.values,function(e,t){switch(L.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:ur.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0})[1]){case 0:return L.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:ur.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return Sr.Some(e)}},Sr.None)},__class__:dt};var ft=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=fi.canonicalize(this.name)};_["albero.entity.DomainForSort"]=ft,ft.__name__=["albero","entity","DomainForSort"],ft.fromDomain=function(e){return new ft(e)},ft.toDomain=function(e){return e.domain},ft.compare=function(e,t){var n=z.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:z.compare(e.name,t.name)},ft.prototype={__class__:ft};var mt=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new pt(e.get_headers))};_["albero.entity.DownloadAuth"]=mt,mt.__name__=["albero","entity","DownloadAuth"],mt.prototype={__class__:mt};var pt=function(e){this.rawData=e};_["albero.entity.DownloadAuthHeaders"]=pt,pt.__name__=["albero","entity","DownloadAuthHeaders"],pt.prototype={createGetRequest:function(e){var t=new XMLHttpRequest;t.open("GET",e);for(var n=0,i=S.fields(this.rawData);n0||this.credential.ttl0?this.content.text:"";case 3:case 4:return"";case 5:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 6:return"";case 11:return[this.content.question,ui.localize("MessageStringMaker.yes"),ui.localize("MessageStringMaker.no")].join(" ");case 12:return e&&null!=this.content.response?this.content.response?ui.localize("MessageStringMaker.yes"):ui.localize("MessageStringMaker.no"):"";case 13:return null!=this.content.options?w.string(this.content.question)+" "+w.string(this.content.options.join(" ")):this.content.question;case 14:return e&&null!=this.content.response&&null!=this.content.options&&this.content.options.length>this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,ui.localize("MessageStringMaker.achieve"),ui.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?ui.localize("MessageStringMaker.achieve"):ui.localize("MessageStringMaker.remand"):"";case 17:case 18:case 19:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 2:if(null!=this.content.text&&this.content.text.length>0)return[ui.localize("Message.bookmark_label_stamp"),this.content.text].join(" ");break;case 5:if(null!=this.content.text&&this.content.text.length>0)return this.content.text;break;case 6:return ui.localize("Message.bookmark_label_deleted");case 7:return[ui.localize("Message.bookmark_label_note_shared"),new Ct(this.content).title].join(" ");case 9:return[ui.localize("Message.bookmark_label_note_created"),new Ct(this.content).title].join(" ");case 10:return[ui.localize("Message.bookmark_label_note_updated"),new Ct(this.content).title].join(" ");case 11:case 13:return[ui.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 12:case 14:return[ui.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 15:return[ui.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 16:return[this.content.done?ui.localize("Message.bookmark_label_completed"):ui.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 17:case 18:return[ui.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 19:return[ui.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 7:case 9:case 10:return Sr.Some(new Ct(this.content));default:return Sr.None}},getContentsForNoteDelete:function(){return 8==this.type[1]?Sr.Some(new Mt(this.content)):Sr.None},isAllowedToDelete:function(e){return!!(this.isSentBy(e)&&this.isNotSystemMessage()&&this.isNotActionStampMessage()&&this.isNotNoteMessage())&&this.isNotDeletedMessage()},isAllowedToReply:function(e){return!(!this.isNotSentBy(e)||!this.isNotSystemMessage())&&this.isNotDeletedMessage()},isAllowedToQuote:function(e){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotFileMessage()&&this.isNotStampMessageWithEmptyText())&&this.isNotTextMultipleFileWithEmptyText()},isAllowedToCopy:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotFileMessage()&&this.isNotStampMessageWithEmptyText())&&this.isNotTextMultipleFileWithEmptyText()},isAllowedToForward:function(e){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotActionStampMessage()&&this.isNotDeletedFileMessage(e)&&this.isNotTextMultipleFileAllDeletedWithEmptyText(e)&&this.isNotNoteMessage())&&this.isNotOpenConference()},isAllowedToForwardOnOnlyTextOrStamp:function(){return!(!this.isTextMessage()&&!this.isStampMessage())||this.isTextMultipleFileWithText()},isAllowedToAddToFavorites:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotOpenConference()&&this.isNotStampMessageWithEmptyText()&&this.isNotNoteDeletedMessage())&&this.isNotFavorite()},isAllowedToRemoveFromFavorites:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotOpenConference()&&this.isNotStampMessageWithEmptyText()&&this.isNotNoteDeletedMessage())&&this.isFavorite()},isSentBy:function(e){var t=this.userId;return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},isNotSentBy:function(e){return!this.isSentBy(e)},isSystemMessage:function(){return this.type==Dt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==Dt.yesOrNo||this.type==Dt.yesOrNoReply||this.type==Dt.selectOne||this.type==Dt.selectOneReply||this.type==Dt.todo||this.type==Dt.todoDone||this.type==Dt.yesOrNoClosed||this.type==Dt.selectOneClosed||this.type==Dt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==Dt.selectOneReply||this.type==Dt.yesOrNoReply||this.type==Dt.todoDone},isClosedActionStampMessage:function(){return this.type==Dt.yesOrNoClosed||this.type==Dt.selectOneClosed||this.type==Dt.todoClosed},isSendingActionStampMessage:function(){return this.type==Dt.yesOrNo||this.type==Dt.selectOne||this.type==Dt.todo},isNoteMessage:function(){return this.type==Dt.noteShared||this.type==Dt.noteDeleted||this.type==Dt.noteCreated||this.type==Dt.noteUpdated},isNoteDeletedMessage:function(){return this.type==Dt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==Dt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==Dt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==Dt.stamp},isNotStampMessage:function(){return!this.isStampMessage()},isStampMessageWithEmptyText:function(){return!!this.isStampMessage()&&this.isObjectWithEmptyText()},isNotStampMessageWithEmptyText:function(){return!!this.isNotStampMessage()||this.isNotObjectWithEmptyText()},isObjectWithEmptyText:function(){return z.isEmpty(this.content.text)},isNotObjectWithEmptyText:function(){return!this.isObjectWithEmptyText()}, -isTextMultipleFile:function(){return this.type==Dt.textMultipleFile},isNotTextMultipleFile:function(){return!this.isTextMultipleFile()},isTextMultipleFileWithText:function(){return!!this.isTextMultipleFile()&&this.isNotObjectWithEmptyText()},isTextMultipleFileWithEmptyText:function(){return!!this.isTextMultipleFile()&&this.isObjectWithEmptyText()},isNotTextMultipleFileWithEmptyText:function(){return!!this.isNotTextMultipleFile()||this.isNotObjectWithEmptyText()},isNotDeletedFileMessage:function(e){return!!this.isNotFileMessage()||!e},isNotTextMultipleFileAllDeletedWithEmptyText:function(e){return!!this.isNotTextMultipleFileWithEmptyText()||!e},isTextMessage:function(){return this.type==Dt.text},isOpenConference:function(){return this.type==Dt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){var e=this.type;return ci._i("["+m.dateStr(new Date)+"] ",e,"","","",""),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?Sr.Some(this.content.in_reply_to):Sr.None},isNotFavorite:function(){return!this.isFavorite()},isFavorite:function(){return this.favorite.isFavorite()},isNotCalloutHolder:function(){return!(!this.isFileMessage()&&!this.isTextMultipleFileWithEmptyText())||this.isStampMessageWithEmptyText()},close:function(){this.content.closed=!0},updateFavorite:function(e){this.favorite.update(e)},addReadUsersUntillMaxCount:function(e){var t=this;if(!(this.readUserIds.length>=16)){var n=e.filter(function(e){return F.notContains(t.readUserIds,e)});this.readUserIds=this.readUserIds.concat(n).slice(0,16)}},createReadCountText:function(){return this.readUserIds.length>=16?"15+":w.string(this.readUserIds.length)},hasNoReadUsers:function(){return 0==this.readUserIds.length},__class__:kt};var Dt=_["albero.entity.MessageType"]={__ename__:["albero","entity","MessageType"],__constructs__:["system","text","stamp","geo","file","textMultipleFile","deleted","noteShared","noteDeleted","noteCreated","noteUpdated","yesOrNo","yesOrNoReply","selectOne","selectOneReply","todo","todoDone","yesOrNoClosed","selectOneClosed","todoClosed","openConference","phoneCall","phoneReceive","unknown"]};Dt.system=["system",0],Dt.system.toString=h,Dt.system.__enum__=Dt,Dt.text=["text",1],Dt.text.toString=h,Dt.text.__enum__=Dt,Dt.stamp=["stamp",2],Dt.stamp.toString=h,Dt.stamp.__enum__=Dt,Dt.geo=["geo",3],Dt.geo.toString=h,Dt.geo.__enum__=Dt,Dt.file=["file",4],Dt.file.toString=h,Dt.file.__enum__=Dt,Dt.textMultipleFile=["textMultipleFile",5],Dt.textMultipleFile.toString=h,Dt.textMultipleFile.__enum__=Dt,Dt.deleted=["deleted",6],Dt.deleted.toString=h,Dt.deleted.__enum__=Dt,Dt.noteShared=["noteShared",7],Dt.noteShared.toString=h,Dt.noteShared.__enum__=Dt,Dt.noteDeleted=["noteDeleted",8],Dt.noteDeleted.toString=h,Dt.noteDeleted.__enum__=Dt,Dt.noteCreated=["noteCreated",9],Dt.noteCreated.toString=h,Dt.noteCreated.__enum__=Dt,Dt.noteUpdated=["noteUpdated",10],Dt.noteUpdated.toString=h,Dt.noteUpdated.__enum__=Dt,Dt.yesOrNo=["yesOrNo",11],Dt.yesOrNo.toString=h,Dt.yesOrNo.__enum__=Dt,Dt.yesOrNoReply=["yesOrNoReply",12],Dt.yesOrNoReply.toString=h,Dt.yesOrNoReply.__enum__=Dt,Dt.selectOne=["selectOne",13],Dt.selectOne.toString=h,Dt.selectOne.__enum__=Dt,Dt.selectOneReply=["selectOneReply",14],Dt.selectOneReply.toString=h,Dt.selectOneReply.__enum__=Dt,Dt.todo=["todo",15],Dt.todo.toString=h,Dt.todo.__enum__=Dt,Dt.todoDone=["todoDone",16],Dt.todoDone.toString=h,Dt.todoDone.__enum__=Dt,Dt.yesOrNoClosed=["yesOrNoClosed",17],Dt.yesOrNoClosed.toString=h,Dt.yesOrNoClosed.__enum__=Dt,Dt.selectOneClosed=["selectOneClosed",18],Dt.selectOneClosed.toString=h,Dt.selectOneClosed.__enum__=Dt,Dt.todoClosed=["todoClosed",19],Dt.todoClosed.toString=h,Dt.todoClosed.__enum__=Dt,Dt.openConference=["openConference",20],Dt.openConference.toString=h,Dt.openConference.__enum__=Dt,Dt.phoneCall=["phoneCall",21],Dt.phoneCall.toString=h,Dt.phoneCall.__enum__=Dt,Dt.phoneReceive=["phoneReceive",22],Dt.phoneReceive.toString=h,Dt.phoneReceive.__enum__=Dt,Dt.unknown=["unknown",23],Dt.unknown.toString=h,Dt.unknown.__enum__=Dt,Dt.__empty_constructs__=[Dt.system,Dt.text,Dt.stamp,Dt.geo,Dt.file,Dt.textMultipleFile,Dt.deleted,Dt.noteShared,Dt.noteDeleted,Dt.noteCreated,Dt.noteUpdated,Dt.yesOrNo,Dt.yesOrNoReply,Dt.selectOne,Dt.selectOneReply,Dt.todo,Dt.todoDone,Dt.yesOrNoClosed,Dt.selectOneClosed,Dt.todoClosed,Dt.openConference,Dt.phoneCall,Dt.phoneReceive,Dt.unknown];var Ct=function(e){null!=e&&(this.noteId=new Xn(e.note_id),this.title=e.title,this.revision=e.revision,this.deleted=e.deleted)};_["albero.entity.MessageContentForNote"]=Ct,Ct.__name__=["albero","entity","MessageContentForNote"],Ct.prototype={__class__:Ct};var Mt=function(e){null!=e&&(this.noteId=new Xn(e.note_id),this.title=e.title)};_["albero.entity.MessageContentForNoteDeleted"]=Mt,Mt.__name__=["albero","entity","MessageContentForNoteDeleted"],Mt.prototype={__class__:Mt};var Rt=function(e){null!=e&&(this.talkId=e[0],this.messageId=e[1])};_["albero.entity.MessageDeletion"]=Rt,Rt.__name__=["albero","entity","MessageDeletion"],Rt.prototype={__class__:Rt};var Ot=function(e){this.id=e.message_id,this.talkId=e.talk_id,this.readUserIds=null==e.read_user_ids?[]:e.read_user_ids,this.unreadUserIds=null==e.unread_user_ids?[]:e.unread_user_ids};_["albero.entity.MessageReadStatus"]=Ot,Ot.__name__=["albero","entity","MessageReadStatus"],Ot.prototype={__class__:Ot};var xt=function(e){this.talkId=e.talk_id,this.messageIds=e.message_ids,this.readUserIds=null==e.read_user_ids?[]:e.read_user_ids,this.messageIdsExcludingUnreadCountTargets=e.message_ids_excluding_unread_count_targets,null==this.messageIdsExcludingUnreadCountTargets&&(this.messageIdsExcludingUnreadCountTargets=[])};_["albero.entity.MessageReadStatusesUpdate"]=xt,xt.__name__=["albero","entity","MessageReadStatusesUpdate"],xt.prototype={__class__:xt};var Ft=_["albero.entity.MessagesOrder"]={__ename__:["albero","entity","MessagesOrder"],__constructs__:["asc","desc"]};Ft.asc=["asc",0],Ft.asc.toString=h,Ft.asc.__enum__=Ft,Ft.desc=["desc",1],Ft.desc.toString=h,Ft.desc.__enum__=Ft,Ft.__empty_constructs__=[Ft.asc,Ft.desc];var Ut=function(){};_["albero.entity.MessagesOrderProc"]=Ut,Ut.__name__=["albero","entity","MessagesOrderProc"],Ut.orderToInt=function(e){switch(e[1]){case 0:return 1;case 1:return 2}};var Pt=_["albero.entity.PaneType"]={__ename__:["albero","entity","PaneType"],__constructs__:["SingleTalkPane","MultiTalkPane1","MultiTalkPane2","MultiTalkPane3"]};Pt.SingleTalkPane=["SingleTalkPane",0],Pt.SingleTalkPane.toString=h,Pt.SingleTalkPane.__enum__=Pt,Pt.MultiTalkPane1=["MultiTalkPane1",1],Pt.MultiTalkPane1.toString=h,Pt.MultiTalkPane1.__enum__=Pt,Pt.MultiTalkPane2=["MultiTalkPane2",2],Pt.MultiTalkPane2.toString=h,Pt.MultiTalkPane2.__enum__=Pt,Pt.MultiTalkPane3=["MultiTalkPane3",3],Pt.MultiTalkPane3.toString=h,Pt.MultiTalkPane3.__enum__=Pt,Pt.__empty_constructs__=[Pt.SingleTalkPane,Pt.MultiTalkPane1,Pt.MultiTalkPane2,Pt.MultiTalkPane3];var Lt=function(){};_["albero.entity.PaneTypeHelper"]=Lt,Lt.__name__=["albero","entity","PaneTypeHelper"],Lt.toPanePrefix=function(e){switch(e[1]){case 0:return"";case 1:return"multi1-";case 2:return"multi2-";case 3:return"multi3-"}},Lt.getPaneType=function(e){switch(e){case 0:return Pt.SingleTalkPane;case 1:return Pt.MultiTalkPane1;case 2:return Pt.MultiTalkPane2;case 3:return Pt.MultiTalkPane3;default:return null}},Lt.getMultiPaneType=function(e){switch(e){case 0:return Pt.MultiTalkPane1;case 1:return Pt.MultiTalkPane2;case 2:return Pt.MultiTalkPane3;default:return Pt.MultiTalkPane1}},Lt.getMultiPaneTypes=function(){return[Pt.MultiTalkPane1,Pt.MultiTalkPane2,Pt.MultiTalkPane3]};var Bt=function(e){null!=e&&(this.expiration=e.expiration,this.warning=e.warning)};_["albero.entity.PasswordExpiration"]=Bt,Bt.__name__=["albero","entity","PasswordExpiration"],Bt.prototype={isExpired:function(e){return this.timeOvered(this.expiration,e)},needWarning:function(e,t){return!!this.timeOveredOrNotExist(t,e)&&this.timeOvered(this.warning,e)},timeOvered:function(e,t){if(null!=e){var n=t.high-e.high|0;return n=0!=n?n:ur.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)>0}return!1},timeOveredOrNotExist:function(e,t){return null==e||this.timeOvered(e,t)},__class__:Bt};var zt=function(e){null!=e&&(this.name=e.plan_name,this.trial=e.trial)};_["albero.entity.Plan"]=zt,zt.__name__=["albero","entity","Plan"],zt.prototype={__class__:zt};var Ht=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=xr.__cast(e.item_values,Array).map(function(e){return new Kt(e)})))};_["albero.entity.Profile"]=Ht,Ht.__name__=["albero","entity","Profile"],Ht.prototype={__class__:Ht};var Gt=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=xr.__cast(e.item_definitions,Array);t=0?r:1},vn.compareTalkConsideredFavorite=function(e,t){var n=e.getTalkOrderInFavorites(),i=t.getTalkOrderInFavorites();return null!=n&&null!=i?vn.compareTalkOrderingTimestamp(e,t):null!=n?1:null!=i?-1:vn.compareTalkOrderingTimestamp(e,t)},vn.prototype={getTalkOrderingTimestamp:function(){return null!=this.status&&null!=this.status.talkOrderingTimestamp?this.status.talkOrderingTimestamp:this.talk.updatedAt},getTalkOrderInFavorites:function(){return null!=this.status?this.status.orderInFavorites:null},__class__:vn};var yn=function(e,t){this.paneType=e,this.talkSelection=t};_["albero.entity.TalkPaneSelection"]=yn,yn.__name__=["albero","entity","TalkPaneSelection"],yn.createArrayForMultiPanes=function(e){return p.mapi(e,function(e,t){return new yn(Lt.getMultiPaneType(e),t)})},yn.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return H.talks(e,G.single(this.talkSelection));case 1:var n=r(t,t.getTalkSelection),i=e,a=function(e){return n(i,e)},o=Lt.getMultiPaneTypes().map(a);return o[0]=this.talkSelection,H.talks(e,G.multi(o));case 2:var s=r(t,t.getTalkSelection),l=e,u=function(e){return s(l,e)},c=Lt.getMultiPaneTypes().map(u);return c[1]=this.talkSelection,H.talks(e,G.multi(c));case 3:var _=r(t,t.getTalkSelection),h=e,d=function(e){return _(h,e)},f=Lt.getMultiPaneTypes().map(d);return f[2]=this.talkSelection,H.talks(e,G.multi(f))}},__class__:yn};var Sn=function(){};_["albero.entity.ITalkSelectionGetter"]=Sn,Sn.__name__=["albero","entity","ITalkSelectionGetter"],Sn.prototype={__class__:Sn};var wn=function(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.version=e.version)};_["albero.entity.TalkPushNotificationEvent"]=wn,wn.__name__=["albero","entity","TalkPushNotificationEvent"],wn.prototype={__class__:wn};var Tn=_["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};Tn.NotSelected=["NotSelected",0],Tn.NotSelected.toString=h,Tn.NotSelected.__enum__=Tn,Tn.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=Tn,n.toString=h,n},Tn.AnnouncementsSelected=["AnnouncementsSelected",2],Tn.AnnouncementsSelected.toString=h,Tn.AnnouncementsSelected.__enum__=Tn,Tn.__empty_constructs__=[Tn.NotSelected,Tn.AnnouncementsSelected];var En=function(){};_["albero.entity.TalkSelectionHelper"]=En,En.__name__=["albero","entity","TalkSelectionHelper"],En.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=En.getTalkIdOrNull(e),r=En.getTalkIdOrNull(t);n=null==i&&null==r||null!=i&&null!=r&&i.high==r.high&&i.low==r.low}else n=!1;if(n){var a=En.getMessageIdOrNull(e),o=En.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},En.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:var n=(e[3],e[2]),i=L.orNull(gn.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==pn.annoucements}},En.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},En.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return L.orNull(t);case 2:return null}};var In=function(e){this.unreadCount=0,null!=e&&(this.id=e.talk_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.maxMessageId=e.max_message_id,null!=e.max_message?this.maxMessage=new kt(e.max_message):this.maxMessage=null,this.maxReadMessageId=e.max_read_message_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.talkOrderingTimestamp=e.talk_ordering_timestamp,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version,this.pushNotificationSetting=new Wt(e.push_notification))};_["albero.entity.TalkStatus"]=In,In.__name__=["albero","entity","TalkStatus"],In.prototype={update:function(e){var t=this,n=!1;return this.needIdUpdate(this.maxEveryoneReadMessageId,e.maxEveryoneReadMessageId)&&(this.maxEveryoneReadMessageId=e.maxEveryoneReadMessageId,n=!0),L.foreach(e.maxReadMessageId,function(e){t.needIdUpdate(t.maxReadMessageId,e)&&(t.maxReadMessageId=e,n=!0)}),n},needIdUpdate:function(e,t){if(null!=t){if(null!=e){var n=e.high-t.high|0;return n=0!=n?n:ur.ucompare(e.low,t.low),(e.high<0?t.high<0?n:-1:t.high>=0?n:1)<0}return!0}return!1},read:function(e,t){this.maxReadMessageId=e,this.unreadCount-=t,this.unreadCount<0&&(this.unreadCount=0)},readAll:function(){this.maxReadMessageId=this.maxMessageId,this.unreadCount=0},__class__:In};var An=function(){};_["albero.entity.TalkStatusHelper"]=An,An.__name__=["albero","entity","TalkStatusHelper"],An.isNotificationDisabled=function(e){return null!=e&&null!=e.pushNotificationSetting&&!e.pushNotificationSetting.enabled},An.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},An.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&An.isUnread(e,e.maxMessage.id))},An.isUnread=function(e,t){if(null!=e.maxReadMessageId){var n=e.maxReadMessageId,i=n.high-t.high|0;return i=0!=i?i:ur.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<0}return!0},An.isNewMax=function(e,t){if(null!=e.maxMessageId){var n=e.maxMessageId,i=n.high-t.high|0;return i=0!=i?i:ur.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<0}return!0},An.isMax=function(e,t){if(null!=e.maxMessageId){var n=e.maxMessageId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low}return!1};var bn=function(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=L.option(e.max_read_message_id))};_["albero.entity.TalkStatusUpdate"]=bn, -bn.__name__=["albero","entity","TalkStatusUpdate"],bn.prototype={__class__:bn};var Nn=function(e,t,n){this.file=e,this.dimension=kn.createWithSize(t,n),this.auth=null};_["albero.entity.ThumbInfo"]=Nn,Nn.__name__=["albero","entity","ThumbInfo"],Nn.prototype={setAuth:function(e){this.auth=e},__class__:Nn};var kn=function(e){null!=e&&(this.width=e.width,this.height=e.height)};_["albero.entity.ThumbDimension"]=kn,kn.__name__=["albero","entity","ThumbDimension"],kn.createWithSize=function(e,t){var n=new kn;return n.width=e,n.height=t,n},kn.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:kn};var Dn=_["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL"]};Dn.PROFILE_IMAGE=["PROFILE_IMAGE",0],Dn.PROFILE_IMAGE.toString=h,Dn.PROFILE_IMAGE.__enum__=Dn,Dn.MESSAGE=["MESSAGE",1],Dn.MESSAGE.toString=h,Dn.MESSAGE.__enum__=Dn,Dn.TALK_ICON=["TALK_ICON",2],Dn.TALK_ICON.toString=h,Dn.TALK_ICON.__enum__=Dn,Dn.THUMBNAIL=["THUMBNAIL",3],Dn.THUMBNAIL.toString=h,Dn.THUMBNAIL.__enum__=Dn,Dn.__empty_constructs__=[Dn.PROFILE_IMAGE,Dn.MESSAGE,Dn.TALK_ICON,Dn.THUMBNAIL];var Cn=function(){};_["albero.entity.UploadUseTypeHelper"]=Cn,Cn.__name__=["albero","entity","UploadUseTypeHelper"],Cn.getUseTypeInt=function(e){switch(e[1]){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4}};var Mn=function(e){null!=e&&(null!=e.user_id&&(this.userId=e.user_id),null!=e.email&&(this.email=e.email),null!=e.sub_email&&(this.subEmail=e.sub_email),null!=e.group_alias&&(this.groupAlias=e.group_alias),null!=e.signin_id&&(this.signinId=e.signin_id))};_["albero.entity.UserIdentifier"]=Mn,Mn.__name__=["albero","entity","UserIdentifier"],Mn.prototype={__class__:Mn};var Rn=function(e,t){this.high=e,this.low=t};_["haxe._Int64.___Int64"]=Rn,Rn.__name__=["haxe","_Int64","___Int64"],Rn.prototype={__class__:Rn};var On=function(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=L.option(e.last_used_at))};_["albero.entity.UserPresence"]=On,On.__name__=["albero","entity","UserPresence"],On.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(ur.ucompare(t.low,e.low)<0){n--;n|=0}var r=new Rn(n,i),a=r,o=On.SIXTY_MINUTES,s=a.high-o.high|0;if(s=0!=s?s:ur.ucompare(a.low,o.low),(a.high<0?o.high<0?s:-1:o.high>=0?s:1)>0)return xn.GT_60;var l=On.FIFTEEN_MINUTES,u=a.high-l.high|0;return u=0!=u?u:ur.ucompare(a.low,l.low),(a.high<0?l.high<0?u:-1:l.high>=0?u:1)>0?xn.LT_OR_EQ_60:xn.LT_OR_EQ_15},On.prototype={toState:function(e){var t=e,n=function(e){return On.createUserPresenceState(e,t)},i=L.map(this.lastUsedAtOpt,n);switch(i[1]){case 0:return i[2];case 1:return xn.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(ur.ucompare(e.low,n.low)<0){i--;i|=0}var a=new Rn(i,r),o=a,s=o.high-t.high|0;return s=0!=s?s:ur.ucompare(o.low,t.low),(o.high<0?t.high<0?s:-1:t.high>=0?s:1)>0},__class__:On};var xn=_["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};xn.LT_OR_EQ_15=["LT_OR_EQ_15",0],xn.LT_OR_EQ_15.toString=h,xn.LT_OR_EQ_15.__enum__=xn,xn.LT_OR_EQ_60=["LT_OR_EQ_60",1],xn.LT_OR_EQ_60.toString=h,xn.LT_OR_EQ_60.__enum__=xn,xn.GT_60=["GT_60",2],xn.GT_60.toString=h,xn.GT_60.__enum__=xn,xn.__empty_constructs__=[xn.LT_OR_EQ_15,xn.LT_OR_EQ_60,xn.GT_60];var Fn=function(e){this.success=e};_["albero.entity.api.message.AddFavoriteMessageResult"]=Fn,Fn.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],Fn.prototype={__class__:Fn};var Un=function(e){this.success=e};_["albero.entity.api.message.DeleteFavoriteMessageResult"]=Un,Un.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],Un.prototype={__class__:Un};var Pn=function(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r};_["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=Pn,Pn.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],Pn.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:Pn};var Ln=function(e){this.note=new qn(e)};_["albero.entity.api.note.CreateNoteResult"]=Ln,Ln.__name__=["albero","entity","api","note","CreateNoteResult"],Ln.prototype={__class__:Ln};var Bn=function(e){this.result=e};_["albero.entity.api.note.DeleteNoteResult"]=Bn,Bn.__name__=["albero","entity","api","note","DeleteNoteResult"],Bn.prototype={__class__:Bn};var zn=function(e){this.note=new qn(e)};_["albero.entity.api.note.GetNoteResult"]=zn,zn.__name__=["albero","entity","api","note","GetNoteResult"],zn.prototype={getNoteId:function(){return this.note.noteId},getNoteCreateUserId:function(){return this.note.createdBy},getRevisionCreateUserId:function(){return this.note.getRevisionCreateUserId()},getNoteCreateDate:function(){return this.note.createdAt},getRevisionCreateDate:function(){return this.note.getRevisionCreateDate()},__class__:zn};var Hn=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=P.asArray(e.contents).map(function(e){return new ii(e)}))};_["albero.entity.api.note.GetNoteStatusesResult"]=Hn,Hn.__name__=["albero","entity","api","note","GetNoteStatusesResult"],Hn.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:Hn};var Gn=function(e){this.note=new qn(e)};_["albero.entity.api.note.UpdateNoteResult"]=Gn,Gn.__name__=["albero","entity","api","note","UpdateNoteResult"],Gn.prototype={__class__:Gn};var jn=function(e){this.note=new qn(e)};_["albero.entity.api.note.UpdateNoteSettingResult"]=jn,jn.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],jn.prototype={__class__:jn};var Kn=function(){};_["albero.entity.message.IFavoriteMessageEvent"]=Kn,Kn.__name__=["albero","entity","message","IFavoriteMessageEvent"],Kn.prototype={__class__:Kn};var Yn=function(e){this.message=new kt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};_["albero.entity.message.AddFavoriteMessageEvent"]=Yn,Yn.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Yn.__interfaces__=[Kn],Yn.prototype={getMessage:function(){return this.message},getMessageId:function(){return this.message.id},isFavorite:function(){return!0},getDomainId:function(){return this.domainId},__class__:Yn};var Wn=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};_["albero.entity.message.DeleteFavoriteMessageEvent"]=Wn,Wn.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Wn.__interfaces__=[Kn],Wn.prototype={getMessageId:function(){return this.messageId},isFavorite:function(){return!1},__class__:Wn};var Vn=function(e){if(null==e)return this.favorite=!1,this.createdAt=null,void(this.tags=[]);this.favorite=!0,this.createdAt=e.created_at,this.tags=e.tags};_["albero.entity.message.MessageFavorite"]=Vn,Vn.__name__=["albero","entity","message","MessageFavorite"],Vn.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:Vn};var qn=function(e){null!=e&&(this.noteId=new Xn(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new ni(e.setting),this.noteRevision=new ei(e.note_revision))};_["albero.entity.note.Note"]=qn,qn.__name__=["albero","entity","note","Note"],qn.prototype={isSameNoteId:function(e){return this.noteId.equals(e)},getRevisionCreateUserId:function(){return this.noteRevision.createdBy},getRevisionCreateDate:function(){return this.noteRevision.createdAt},compareRevision:function(e){return this.noteRevision.compareRevision(e)},__class__:qn};var Qn=_["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT"]};Qn.TEXT=["TEXT",0],Qn.TEXT.toString=h,Qn.TEXT.__enum__=Qn,Qn.__empty_constructs__=[Qn.TEXT];var Jn=function(){};_["albero.entity.note.NoteContentTypeHelper"]=Jn,Jn.__name__=["albero","entity","note","NoteContentTypeHelper"],Jn.createNoteContentType=function(e){return null==e?(ci._e("["+m.dateStr(new Date)+"] ","no value.","","","",""),null):1==e?Qn.TEXT:(ci._e("["+m.dateStr(new Date)+"] ","value is not expected.","","","",""),null)},Jn.getValue=function(e){return null==e?(ci._e("["+m.dateStr(new Date)+"] ","no content type.","","","",""),null):1};var Xn=function(e){this.value=e};_["albero.entity.note.NoteId"]=Xn,Xn.__name__=["albero","entity","note","NoteId"],Xn.__interfaces__=[Tt],Xn.prototype={toString:function(){var e=this.value;return"_"+e.high+"_"+e.low},equals:function(e){if(null==e)return!1;var t=this.value,n=e.value;return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},getHtmlAttributeId:function(){return"note-"+this.toString()},__class__:Xn};var Zn=function(e){null!=e&&(this.noteId=new Xn(e.note_id),this.talkId=e.talk_id,this.setting=new ni(e.setting))};_["albero.entity.note.NotePartialUpdateForSetting"]=Zn,Zn.__name__=["albero","entity","note","NotePartialUpdateForSetting"],Zn.prototype={__class__:Zn};var $n=function(e){null!=e&&(this.noteId=new Xn(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new ti(e.note_revision_summary))};_["albero.entity.note.NotePartialUpdateForSummary"]=$n,$n.__name__=["albero","entity","note","NotePartialUpdateForSummary"],$n.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:$n};var ei=function(e){null!=e&&(this.revision=e.revision,this.title=e.title,this.contentType=Jn.createNoteContentType(e.content_type),this.content=e.content,this.createdBy=e.created_by,this.createdAt=e.created_at)};_["albero.entity.note.NoteRevision"]=ei,ei.__name__=["albero","entity","note","NoteRevision"],ei.prototype={isEmptyTitle:function(){return""==this.title||null==this.title},compareRevision:function(e){return this.revision==e?0:this.revision>2)),r+=w.string(a.charAt(63&(o<<4|s>>4))),r+=w.string(a.charAt(63&(s<<2|l>>6))),r+=w.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=w.string(a.charAt(u>>2)),r+=w.string(a.charAt(63&(u<<4|c>>4))),r+=w.string(a.charAt(c<<2&63))}else if(n==i+1){var _=t.b[n++];r+=w.string(a.charAt(_>>2)),r+=w.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},ai.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=m.substr(e,0,t));var n=e.length,i=e,r=ai.CODES;null==r&&(r=ai.initCodes(),ai.CODES=r);for(var a=0,o=3&n,s=3*(n>>2)+(o>=2?o-1:0),l=a+(n-o),u=new Er(new ca(s)),c=0;a>4);var d=r[i.charCodeAt(a++)];u.b[c++]=255&(h<<4|d>>2);var f=r[i.charCodeAt(a++)];u.b[c++]=255&(d<<6|f)}if(o>=2){var p=r[i.charCodeAt(a++)],g=r[i.charCodeAt(a++)];if(u.b[c++]=255&(p<<2|g>>4),3==o){var v=r[i.charCodeAt(a++)];u.b[c++]=255&(g<<4|v>>2)}}return u};var oi=function(){};_["albero.js.KatakanaToRoman"]=oi,oi.__name__=["albero","js","KatakanaToRoman"],oi.assureConvertTable=function(){return null!=oi.convertTable?oi.convertTable:(oi.convertTable=new Tr,p.iter([["ア","A"],["イ","I"],["ウ","U"],["エ","E"],["オ","O"],["カ","KA"],["キ","KI"],["ク","KU"],["ケ","KE"],["コ","KO"],["キャ","KYA"],["キュ","KYU"],["キョ","KYO"],["サ","SA"],["シ","SI"],["ス","SU"],["セ","SE"],["ソ","SO"],["シャ","SHA"],["シュ","SHU"],["ショ","SHO"],["タ","TA"],["チ","TI"],["ツ","TU"],["テ","TE"],["ト","TO"],["チャ","THA"],["チュ","THU"],["チョ","THO"],["ナ","NA"],["ニ","NI"],["ヌ","NU"],["ネ","NE"],["ノ","NO"],["ニャ","NYA"],["ニュ","NYU"],["ニョ","NYO"],["ハ","HA"],["ヒ","HI"],["フ","FU"],["ヘ","HE"],["ホ","HO"],["ヒャ","HYA"],["ヒュ","HYU"],["ヒョ","HYO"],["マ","MA"],["ミ","MI"],["ム","MU"],["メ","ME"],["モ","MO"],["ミャ","MYA"],["ミュ","MYU"],["ミョ","MYO"],["ヤ","YA"],["ユ","YU"],["ヨ","YO"],["ラ","RA"],["リ","RI"],["ル","RU"],["レ","RE"],["ロ","RO"],["リャ","RYA"],["リュ","RYU"],["リョ","RYO"],["ワ","WA"],["ヲ","O"],["ン","N"],["ガ","GA"],["ギ","GI"],["グ","GU"],["ゲ","GE"],["ゴ","GO"],["ギャ","GYA"],["ギュ","GYU"],["ギョ","GYO"],["ザ","ZA"],["ジ","JI"],["ズ","ZU"],["ゼ","ZE"],["ゾ","ZO"],["ジャ","ZYA"],["ジュ","ZYU"],["ジョ","ZYO"],["ダ","DA"],["ヂ","JI"],["ヅ","ZU"],["デ","DE"],["ド","DO"],["バ","BA"],["ビ","BI"],["ブ","BU"],["ベ","BE"],["ボ","BO"],["ビャ","BYA"],["ビュ","BYU"],["ビョ","BYO"],["パ","PA"],["ピ","PI"],["プ","PU"],["ペ","PE"],["ポ","PO"],["ピャ","PYA"],["ピュ","PYU"],["ピョ","PYO"],["ー",""],["ッ","ッ"]],function(e){var t=oi.convertTable,n=e[0],i=e[1];null!=ua[n]?t.setReserved(n,i):t.h[n]=i}),oi.convertTable)},oi.matchNext=function(e,t){var n=oi.assureConvertTable();if(t+1=fi.HIRAGANA_SMALL_A&&o<=fi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(fi.KATAKANA_SMALL_A-fi.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},fi.katakanaToRoman=function(e){return(new oi).convert(e)},fi.normalize=function(e){return new mi(null).normalize(e)},fi.asyncAssureNormalize=function(){return Promise.resolve()},fi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var mi=function(e){this.beforeTask=null,this.beforeTask=e};_["albero.js.Normalizer"]=mi,mi.__name__=["albero","js","Normalizer"],mi.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Or&&(e=e.val),ci._e("["+m.dateStr(new Date)+"] ","invalid character:",e,"","",""),ui.localize("TextCanonicalizer.invalid")}},__class__:mi};var pi=function(e){this.ws=new WebSocket(e),la.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=r(this,this.onOpen),this.ws.onmessage=r(this,this.onMessage),this.ws.onerror=r(this,this.onError),this.ws.onclose=r(this,this.onClose)};_["albero.js.WebSocket"]=pi,pi.__name__=["albero","js","WebSocket"],pi.prototype={onOpen:function(e){ci._i("["+m.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=la.websocketsbinary?Er.ofData(new _a(e.data)):ai.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){ci._e("["+m.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+w.string(e.code)+" "+w.string(e.reason)+" "+w.string(e.wasClean);ci._i("["+m.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){la.websocketsbinary?this.ws.send(new _a(e.b.bufferValue).buffer):this.ws.send(ai.encode(e))},ping:function(e){this.send(new Er(new ca(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:pi};var gi=function(){};_["puremvc.interfaces.IProxy"]=gi,gi.__name__=["puremvc","interfaces","IProxy"],gi.prototype={__class__:gi};var vi=function(){};_["albero.proxy.AccessTokenResolverProxy"]=vi,vi.__name__=["albero","proxy","AccessTokenResolverProxy"],vi.__interfaces__=[gi],vi.prototype={__class__:vi};var yi=function(){};_["albero.proxy.AccessTokenResolverProxyFactory"]=yi,yi.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],yi.newInstance=function(){return new wi("accessTokenResolver")};var Si=function(e,t){V.call(this),this.proxyName=null!=e?e:Si.NAME,null!=t&&this.setData(t)};_["puremvc.patterns.proxy.Proxy"]=Si,Si.__name__=["puremvc","patterns","proxy","Proxy"],Si.__interfaces__=[gi],Si.__super__=V,Si.prototype=n(V.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Si});var wi=function(e){Si.call(this,e)};_["albero.proxy.AccessTokenResolverProxyForDirectJs"]=wi,wi.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],wi.__interfaces__=[vi],wi.__super__=Si,wi.prototype=n(Si.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null!=n)return void t(n);var i=null!=$r.account?$r.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)},__class__:wi});var Ti=function(){Si.call(this,"broadcast")};_["albero.proxy.AlberoBroadcastProxy"]=Ti,Ti.__name__=["albero","proxy","AlberoBroadcastProxy"],Ti.__super__=Si,Ti.prototype=n(Si.prototype,{handleNotification:function(e,t,n){var i=this;switch(e){case"notify_add_account_control_request":var r=new Pe(t);this.dataStore.setAccountControlRequest(r),this.sendNotification(e,r),n();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(t[1]);this.sendNotification(e,a),n();break;case"notify_add_domain_invite":var o=new ct(t);this.dataStore.setDomainInvite(o),this.sendNotification(e,o),n();break;case"notify_add_favorite_message":var s=new Yn(t);this.messageStore.onAddFavoriteMessage(s),this.sendNotification(e,s),n();break;case"notify_add_favorite_talk":var l=new gt(t);this.updateTalkStatusByFavoriteTalkEvent(l),this.sendNotification(e,l),n();break;case"notify_add_friend":var u=this.dataFactory.newFriend(t[1]);this.sendNotification(e,u),n();break;case"notify_add_talkers":var c=new dn(t);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(e,c),n();break;case"notify_close_conference":var _=new We(t);this.conferenceStore.removeConference(_),this.updateTalkStatusByConferenceClosedEvent(_),this.sendNotification(e,_),n();break;case"notify_conference_participant_join":var h,d=t[3],f=t[4],g=this.dataStore;if(null!=g.me){var v=g.me.id;h=null!=v&&null!=f&&v.high==f.high&&v.low==f.low}else h=!1;h&&this.dataStore.addReactedConfereceId(d),this.sendNotification(e,t),n();break;case"notify_conference_participant_reject":var y=t[3];this.dataStore.addReactedConfereceId(y),this.sendNotification(e,t),n();break;case"notify_create_announcement":var S=new ze(t);this.keywordWatcher.onAnnouncementCreated(S),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(S)),this.sendNotification(e,S),n();break;case"notify_create_message":var w=new kt(t);this.messageStore.setMessage(w),this.keywordWatcher.onMessageCreated(w);var T=this.newTalkStatusByMessage(w);null!=T&&this.sendNotification("notify_update_local_talk_status",T);switch(w.type[1]){case 0:var E=w.content,I=null;switch(E.type){case"delete_talker":I=E.deleted_user_id;break;case"hide_pair_talk":I=E.user_id}if(null==I)return this.sendNotification(e,w),void n();for(var A=w.talkId,b=this.dataStore.getQuestions(A,I),N=0;Nt.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void ci._e("["+m.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");n=new In,n.id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Wt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&(t=new In,t.id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&(t=new In,t.id=e.talkId),An.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;n||t.unreadCount++,t.talkOrderingTimestamp=e.createdAt}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(An.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),An.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Dt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var t=this;if(!p.exists(e.readUserIds,function(e){var n=t.dataStore;if(null!=n.me){var i=n.me.id;return null!=i&&null!=e&&i.high==e.high&&i.low==e.low}return!1}))return null;var n=this.dataStore.getTalkStatus(e.talkId);if(null==n)return ci._e("["+m.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var i=e.messageIds[0],r=0,a=e.messageIds;r=0?s:1)<0&&(i=o),F.notContains(e.messageIdsExcludingUnreadCountTargets,o)&&n.unreadCount--}}return An.isUnread(n,i)&&(n.maxReadMessageId=i,this.dataStore.setTalkStatus(n)),n},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&(t=new He,t.domainId=e.domainId),Ge.isNewMax(t,e.id)&&(t.maxAnnouncementId=e.id,t.maxAnnouncement=e),null==t.unreadCount&&(t.unreadCount=0),t.unreadCount++,this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:Ti});var Ei=function(){Si.call(this,"api")};_["albero.proxy.AlberoServiceProxy"]=Ei,Ei.__name__=["albero","proxy","AlberoServiceProxy"],Ei.__super__=Si,Ei.prototype=n(Si.prototype,{getOSString:function(){return"bot"},createAccessToken:function(e,t,n){var i,r,a=this,o=this.settings.getOs(),s=this.settings.getIDFV(),l=e.split("$");-1==e.indexOf("@")&&2==l.length?(i="create_access_token_by_id",r=[l[1],l[0],t,s,o,""]):(i="create_access_token",r=[e,t,s,o,""]),this.apiCaller.callImmediately(i,r,function(e){a.settings.setAccessToken(e),n(e)},function(e){a.sendNotification("Url",Me.FORWARD(H.error))})},authorizeDevice:function(e,t){var n=this.settings.getIDFV();this.apiCaller.call("authorize_device",[e,n],function(e){t()})},createSession:function(e,t){var n=this,i=[e,"1.105"];this.apiCaller.callCreateSession(i,function(e){var i=new sn(e),r=M.nowAsInt64();if(i.passwordExpiration.isExpired(r))return void n.sendNotification("password_expiration_overed");i.passwordExpiration.needWarning(r,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(M.oneDayAfterAsInt64()),n.sendNotification("password_expiration_warned")),t(i)},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void n.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void n.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void n.sendNotification("Device",ne.AUTHORIZE);n.apiCaller.handleServerErrorDefault(e)}n.settings.clearAccessToken(),n.sendNotification("Url",Me.FORWARD(H.error))})},startNotification:function(){var e=this;this.apiCaller.call("start_notification",[],function(t){t||(e.dataStore.clear(!0),ci._e("["+m.dateStr(new Date)+"] ","start_notification failed.","","","",""))})},resetNotification:function(e){this.apiCaller.call("reset_notification",[],e)},sendDomainNotifications:function(e){for(var t=0;t=t.length)){var r=t[n],a=e.id,o=this.dataFactory.newDummyMessage(a,r.type,r.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[a,kt.enumIndex(r.type),r.content],function(r){var a=i.dataFactory.newMessage(r);i.sendNotification("create_message_complete",[a,o.id]),i.forwardMessages(e,t,n+1)},function(e){if(i.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Ki.toLocalError(At.SendingMessageConflicted,e);i.sendNotification("error_occurred",t)}else i.sendNotification("error_occurred",e)})}},deleteMessage:function(e,t){var n=this;this.apiCaller.call("delete_message",[e,t],function(i){var r=new Rt;r.talkId=e,r.messageId=t,n.sendNotification("notify_delete_message",r)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void n.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=Ki.toLocalError(At.DeletingMessageConflicted,e);return void n.sendNotification("error_occurred",t)}n.sendNotification("error_occurred",e)}})},updateReadStatuses:function(e,t){var n=this;this.apiCaller.callApiReliable("update_read_statuses",[e,t],function(i){var r,a=n.dataStore.getTalkStatus(e);if(null!=a){var o=a.maxReadMessageId;r=null!=o&&null!=t&&o.high==t.high&&o.low==t.low}else r=!1;r&&n.sendNotification("notify_update_local_talk_status",a)},null,function(e){return 429==e.code&&"too many requests"==e.message?Sr.Some(1e3*n.asInt(e.detail.retry_after)):Sr.None})},upload:function(e,t,n){var i=this,r=this.dataFactory.newDummyFileMessage(t,n),a=function(e){i.sendNotification("create_message_fail",[e,r])};this.prepareFileMessage(n,e,t,r,function(e){i.createMessageReliable(t,Dt.file,e,r)},a)},uploadMulti:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyMultipleFileMessage(t,n,i);this.sendNotification("create_message_start",a);var o=function(e){r.sendNotification("create_message_fail",[e,a])},s=[],l=function(){if(s.length==i.length){var e={files:s};null!=n&&n.length>0&&(e.text=n),r.createMessageReliable(t,Dt.textMultipleFile,e,a)}},u=null;u=function(n){if(n.hasNext()){var i=n.next();r.prepareFileMessage(i,e,t,null,function(e){s.push(e),u(n)},o)}else l()};var c=m.iter(i);u(c)},prepareFileMessage:function(e,t,n,i,r,a){var o=this;this.uploadThumbnail(e,t,n,null,function(n){o.uploadFile(e,t,Dn.MESSAGE,function(t){var i=fi.normalize(e.name),a=R.createFileInfoDynamic(e,i,n,t);r(a)},a)},a)},createMessageReliable:function(e,t,n,i){var r=this;this.apiCaller.callApiReliable("create_message",[e,kt.enumIndex(t),n],function(e){var t=r.dataFactory.newMessage(e);r.sendNotification("create_message_complete",[t,i.id])},function(e){if(r.sendNotification("create_message_fail",[e,i]),null!=e&&409==e.code){var t=Ki.toLocalError(At.SendingMessageConflicted,e);r.sendNotification("error_occurred",t)}else r.sendNotification("error_occurred",e)},function(e){return 500==e.code&&"Internal Error (IllegalStateException)"==e.message?Sr.Some(1e3):Sr.None})},uploadThumbnail:function(e,t,n,i,r,a){var o=this,s=Ri.getBlobFromUpdatableFile(e);this.fileService.asyncCreateThumbnail(s).then(function(e){null!=i&&(L.foreach(o.fileInfoStore.getMessageFileInfos(i.id),function(t){t[0].setDummyThumbnail(e)}),o.sendNotification("create_message_start",i)),o.uploadFile(e.file,t,Dn.THUMBNAIL,function(t){e.setAuth(t),r(Sr.Some(e))},a)},function(e){null!=i&&o.sendNotification("create_message_start",i),r(Sr.None)})},uploadFile:function(e,t,n,i,r){var a=this,o=fi.normalize(e.name);this.apiCaller.call("create_upload_auth",[o,e.type,e.size,t,Cn.getUseTypeInt(n)],function(t){var n=i,o=t,s=function(){n(o)};a.fileService.upload(t,e.type,e,s,r)},function(e){if(null!=e)if(502==e.code&&null!=e.detail){var t=e.detail.limit_max;if("file_size"==e.detail.limit_target){var n=Ki.toLocalError(At.UploadSizeOvered(t),e);a.sendNotification("error_occurred",n)}else if("storage_size"==e.detail.limit_target){var i=Ki.toLocalError(At.StorageSizeOvered(t),e);a.sendNotification("error_occurred",i)}}else a.sendNotification("error_occurred",e);r(e)})},createDownloadAuth:function(e,t,n,i,r){var a=this;this.apiCaller.callApiReliable("create_download_auth",[e,t,n],function(e){i(new mt(e))},function(e){r(e)},function(e){return 429==e.code&&"too many requests"==e.message?Sr.Some(1e3*a.asInt(e.detail.retry_after)):Sr.None})},deleteAttachment:function(e,t){this.apiCaller.call("delete_attachment",[e,t])},getAttachments:function(e,t){var n=this;null==t&&(t={sinceId:null,maxId:null}),this.apiCaller.call("get_attachments",[e,20,t.sinceId,t.maxId],function(t){var i=t.map((Xr=n.dataFactory,r(Xr,Xr.newFileInfo)));n.sendNotification("get_file_responsed",{talkId:e,files:i})})},createAnnouncement:function(e,t,n){var i=this;if(null!=e||null!=(e=this.settings.getSelectedDomainId())){var r=this.dataFactory.newDummyMessage(null,t,n);this.sendNotification("create_announcement_start",r),this.apiCaller.call("create_announcement",[e,kt.enumIndex(t),n],function(e){var t=i.dataFactory.newAnnouncement(e);i.sendNotification("create_announcement_complete",[t,r.id])},function(e){i.sendNotification("create_announcement_fail",r),i.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,a=this.settings.getSelectedDomainId();if(null!=a){e=null==e?{sinceId:null,maxId:null}:e;var o=this.apiCaller,s=e.sinceId,l=e.maxId,u=Ut.orderToInt(t);o.call("get_announcements",[a,20,s,l,u],function(e){var o=e.map((Xr=i.dataFactory,r(Xr,Xr.newAnnouncement)));i.sendNotification("notify_get_announcements",{domainId:a,announcements:o,sortOrder:t,callerKey:n})})}},getAnnouncementStatuses:function(e){var t=this;this.apiCaller.call("get_announcement_statuses",[],function(n){for(var i=0;i=0?i:i+4294967296)-(new Date).getTime()|0}e<=0?(this.updateLastUsedAt(),this.lastUsedExpiredAtTimer=new hr(6e5),this.lastUsedExpiredAtTimer.run=r(this,this.updateLastUsedAt)):hr.delay(r(this,this.startUpdateLastUsedAtIfNeed),e)}},updateLastUsedAt:function(){var e=this;this.apiCaller.call("update_last_used_at",[],function(t){e.settings.setLastUsedExpiredAt(M.afterAsInt64(6e5))})},addFavoriteTalk:function(e,t){this.apiCaller.call("add_favorite_talk",[e,t])},deleteFavoriteTalk:function(e,t){this.apiCaller.call("delete_favorite_talk",[e,t])},disablePushNotification:function(e,t){this.apiCaller.call("disable_push_notification",[e,t])},enablePushNotification:function(e,t){this.apiCaller.call("enable_push_notification",[e,t])},getSolutions:function(e,t){var n=this;this.apiCaller.call("get_solutions",[e,t],function(e){p.iter(e,(Xr=n.dataFactory,r(Xr,Xr.newSolution))),n.sendNotification("solutions_loaded")})},getPresences:function(e,t){var n=this;this.apiCaller.call("get_presences",[e,t],function(e){var i=M.nowAsInt64(),a=(Xr=n.dataFactory,r(Xr,Xr.newUserPresence)),o=i;p.iter(e,function(e){return a(e,o)}),n.sendNotification("presences_updated",t)})},joinConference:function(e,t){var n=this;this.apiCaller.call("join_conference",[e,t],function(t){var i=new Et(t);n.sendNotification("join_conference_responsed",{talkId:e,joinConference:i})},function(e){n.sendNotification("join_conference_canceled",e)})},rejectConference:function(e){var t=this;this.apiCaller.call("reject_conference",[e],function(e){},function(e){404!=e.code&&409!=e.code&&t.sendNotification("error_occurred",e)})},leaveConference:function(e){var t=this;this.apiCaller.call("leave_conference",[e],function(e){},function(e){404!=e.code&&t.sendNotification("error_occurred",e)})},getConferences:function(){var e=this;this.apiCaller.call("get_conferences",[],function(t){var n=t.map((Xr=e.dataFactory,r(Xr,Xr.newConference)));p.iter(n,function(t){e.sendNotification("notify_open_conference",t)}),e.dataStore.filterReactedConferenceIds(n.filter(function(t){return!e.dataStore.isReactedConferenceId(t.id)}).map(function(e){return e.id}))})},getConferenceParticipants:function(e){var t=this;this.apiCaller.call("get_conference_participants",[e],function(n){L.foreach(t.conferenceStore.getConference(e),function(e){e.participants=n})})},getNoteStatuses:function(e,t){var n=this,i=this.settings.getSelectedDomainId();this.apiCaller.call("get_note_statuses",[i,e,60,t],function(t){n.sendNotification("get_note_statuses_loaded",{talkId:e,result:new Hn(t)})},function(e){e.code;n.sendNotification("error_occurred",e)})},getNote:function(e){var t=this;this.apiCaller.call("get_note",[e.value],function(e){var n=new zn(e);t.dataStore.setNote(n.getNoteId(),n.note),t.sendNotification("get_note_loaded",n)},function(n){if(404==n.code)return t.dataStore.setNote(e,null),void t.sendNotification("get_note_failed_by_note_not_found",e);400==n.code&&t.sendNotification("error_occurred",n)})},createNote:function(e,t,n,i,r){var a=this;this.apiCaller.call("create_note",[e,t,Jn.getValue(n),i,r],function(e){a.sendNotification("create_note_completed",new Ln(e))},function(e){e.code;a.sendNotification("error_occurred",e)})},updateNoteSetting:function(e,t,n){var i=this;this.apiCaller.call("update_note_setting",[e.value,t,n],function(e){ -i.sendNotification("update_note_setting_completed",new jn(e))},function(t){if(404==t.code)return i.dataStore.setNote(e,null),void i.sendNotification("update_note_setting_failed_by_not_found",e);if(409==t.code)return i.dataStore.setNote(e,null),void i.sendNotification("update_note_setting_failed_by_conflict",e);t.code,t.code;i.sendNotification("error_occurred",t)})},updateNote:function(e,t,n,i,r,a){var o=this,s=Jn.getValue(i);this.apiCaller.call("update_note",[e.value,t,n,s,r,a],function(t){var n=new Gn(t);o.dataStore.setNote(e,n.note),o.sendNotification("update_note_completed",n)},function(t){if(404==t.code)return o.dataStore.setNote(e,null),void o.sendNotification("update_note_failed_by_not_found",e);if(409==t.code)return o.dataStore.setNote(e,null),void o.sendNotification("update_note_failed_by_conflict",e);t.code,t.code;o.sendNotification("error_occurred",t)})},deleteNote:function(e){var t=this;this.apiCaller.call("delete_note",[e.value],function(e){t.sendNotification("delete_note_completed",new Bn(e))},function(n){404==n.code&&t.dataStore.setNote(e,null);n.code,n.code;t.sendNotification("error_occurred",n)})},addFavoriteMessage:function(e,t,n){var i=this;this.apiCaller.call("add_favorite_message",[e,t,n],function(e){i.sendNotification("add_favorite_message_completed",new Fn(e))},function(e){400==e.code&&e.message,400==e.code&&e.message,403==e.code&&e.message,e.code;409==e.code&&"conflict"==e.message||i.sendNotification("error_occurred",e)})},deleteFavoriteMessage:function(e,t){var n=this;this.apiCaller.call("delete_favorite_message",[e,t],function(e){n.sendNotification("delete_favorite_message_completed",new Un(e))},function(e){e.code,e.code;n.sendNotification("error_occurred",e)})},getFavoriteMessages:function(e,t,n){var i=this;this.apiCaller.call("get_favorite_messages",[e,t,20,n],function(n){var a=n.marker,o=n.next_marker,s=n.contents.map((Xr=i.dataFactory,r(Xr,Xr.newMessage))),l=new Pn(e,t,a,o,s);i.sendNotification("get_favorite_messages_completed",l)},function(e){e.code;i.sendNotification("error_occurred",e)})},asInt:function(e){return xr.__cast(e,ta)},__class__:Ei});var Ii=function(){this.callbacksWhenCreateSessionSucceed=[],this.createSessionSucceed=!1,Si.call(this,"apiCaller")};_["albero.proxy.ApiCallerProxy"]=Ii,Ii.__name__=["albero","proxy","ApiCallerProxy"],Ii.__super__=Si,Ii.prototype=n(Si.prototype,{callCreateSession:function(e,t,n){var i=this;this.createSessionSucceed=!1,this.rpc.call("create_session",e,function(e){i.createSessionSucceed=!0,null!=t&&t(e),p.iter(i.callbacksWhenCreateSessionSucceed,function(e){e()}),i.callbacksWhenCreateSessionSucceed.splice(0,i.callbacksWhenCreateSessionSucceed.length)},n)},callImmediately:function(e,t,n,i){this.rpc.call(e,t,n,i)},call:function(e,t,n,i){var a=(Xr=this.rpc,r(Xr,Xr.call)),o=e,s=t,l=n,u=i,c=function(){a(o,s,l,u)};this.createSessionSucceed?c():this.callbacksWhenCreateSessionSucceed.push(c)},callApiReliable:function(e,t,n,i,r,a){null==a&&(a=3);var o=this,s=this.createOnErrorReliable(a,i,r,function(s){hr.delay(function(){o.callApiReliable(e,t,n,i,r,a-1)},s)});this.call(e,t,n,s)},createOnErrorReliable:function(e,t,n,i){return null==n&&(n=function(e){return 404==e.code?Sr.Some(1e3):Sr.None}),null==t&&(t=r(this,this.handleServerErrorDefault)),function(r){if(0==e)return void t(r);var a=n(r);if(L.isEmpty(a))return void t(r);L.foreach(a,i)}},handleServerErrorDefault:function(e){this.rpc.onServerError(e)},restart:function(){this.rpc.restart()},__class__:Ii});var Ai=function(){Si.call(this,"appState")};_["albero.proxy.AppStateProxy"]=Ai,Ai.__name__=["albero","proxy","AppStateProxy"],Ai.__super__=Si,Ai.prototype=n(Si.prototype,{start:function(){this.updateLastActivityAt(),this.checkInactiveInterval()},activateAppIfNeed:function(){this.updateLastActivityAt(),this.appState==D.Inactive&&this.setAppState(D.Active)},setAppState:function(e){this.appState=e,this.sendNotification("app_state_changed",this.appState)},updateLastActivityAt:function(){this.lastActivityAt=new Date},checkInactiveInterval:function(){var e=this;this.checkInactive(),hr.delay(function(){e.checkInactiveInterval()},500)},checkInactive:function(){if(this.appState!=D.Inactive){(new Date).getTime()-this.lastActivityAt.getTime()<2e3||this.setAppState(D.Inactive)}},__class__:Ai});var bi=function(){Si.call(this,"conferenceStore"),this.conferencesMap=new Tr,this.talkIdConferenceIdMap=new Tr};_["albero.proxy.ConferenceStoreProxy"]=bi,bi.__name__=["albero","proxy","ConferenceStoreProxy"],bi.__super__=Si,bi.prototype=n(Si.prototype,{addConference:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.conferencesMap;null!=ua[n]?i.setReserved(n,e):i.h[n]=e;var r=e.talkId,a="_"+r.high+"_"+r.low,o=this.talkIdConferenceIdMap;null!=ua[a]?o.setReserved(a,n):o.h[a]=n},removeConference:function(e){this.dataStore.removeReactedConfereceId(e.id);var t=e.id,n="_"+t.high+"_"+t.low;this.conferencesMap.remove(n);var i=e.talkId,r="_"+i.high+"_"+i.low,a=this.talkIdConferenceIdMap;(null!=ua[r]?a.getReserved(r):a.h[r])==n&&this.talkIdConferenceIdMap.remove(r),this.messageStore.onConferenceClose(e)},getConference:function(e){var t="_"+e.high+"_"+e.low,n=this.conferencesMap;return L.option(null!=ua[t]?n.getReserved(t):n.h[t])},hasConference:function(e){if(null!=e){var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;return null!=ua[t]?n.existsReserved(t):n.h.hasOwnProperty(t)}return!1},hasConferenceInDomain:function(e){return null!=p.find(this.getConferenceTalkIds().map(F.makeFromIdStr).map((Xr=this.dataStore,r(Xr,Xr.getTalk))),function(t){if(null!=t){var n=t.domainId;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}return!1})},getConferenceTalkIds:function(){for(var e=[],t=this.talkIdConferenceIdMap.keys();t.hasNext();){var n=t.next();e.push(n)}return e},hasConferenceInAllDomains:function(e){return L.isEmpty(e)?this.talkIdConferenceIdMap.keys().hasNext():null!=p.find(this.getConferenceTalkIds().map(F.makeFromIdStr).map((Xr=this.dataStore,r(Xr,Xr.getTalk))),function(t){if(null!=t){var n=t.domainId,i=L.get(e);return!(null!=n&&null!=i&&n.high==i.high&&n.low==i.low)}return!1})},removeConferencesOnLeaveDomain:function(e){for(var t=this.conferencesMap,n=new wr(t,t.arrayKeys());n.hasNext();){var i=n.next(),r=i.domainId;null!=r&&null!=e&&r.high==e.high&&r.low==e.low&&(this.removeConference(i),this.sendNotification("notify_close_conference",i))}},removeConferencesOnLeaveTalk:function(e){for(var t=this.conferencesMap,n=new wr(t,t.arrayKeys());n.hasNext();){var i=n.next(),r=i.talkId;null!=r&&null!=e&&r.high==e.high&&r.low==e.low&&(this.removeConference(i),this.sendNotification("notify_close_conference",i))}},__class__:bi});var Ni=function(){var e=new Rn(-1,-1);this.dummyFileId=e;var t=new Rn(-1,-1);this.dummyMsgId=t,Si.call(this,"dataFactory")};_["albero.proxy.DataFactoryProxy"]=Ni,Ni.__name__=["albero","proxy","DataFactoryProxy"],Ni.__super__=Si,Ni.prototype=n(Si.prototype,{onRegister:function(){},newAcquaintance:function(e){return this.dataStore.addAcquaintance(this.newDomainUser(e))},newFriend:function(e){return this.dataStore.addFriend(this.newDomainUser(e))},newDomainUser:function(e){return new ht(e)},newDomain:function(e){return this.dataStore.setDomainIfLatest(new nt(e))},newDomainInvite:function(e){return this.dataStore.setDomainInvite(new ct(e))},newTalk:function(e){return this.dataStore.setTalk(new dn(e))},newTalkStatus:function(e){return this.dataStore.setTalkStatus(new In(e))},newMessage:function(e){var t=new kt(e);switch(t.type[1]){case 4:this.fileInfoStore.setMessageFileInfos(t.id,[vt.fromMessageAndFile(t,t.content)]);break;case 5:var n=t,i=function(e){return vt.fromMessageAndFile(n,e)};this.fileInfoStore.setMessageFileInfos(t.id,P.asArray(t.content.files).map(i))}return this.messageStore.setMessage(t),t},newDummyMessage:function(e,t,n){var i=this,r=new kt;r.id=this.dummyMsgId,r.userId=this.dataStore.me.id,r.talkId=e,r.type=t,r.content=n;var a,o=this.dummyMsgId;if(null==o)a=null;else{var s=new Rn(0,1),l=s,u=o.high-l.high|0,c=o.low-l.low|0;if(ur.ucompare(o.low,l.low)<0){u--;u|=0}a=new Rn(u,c)}switch(this.dummyMsgId=a,r.type[1]){case 4:var _=[this.createDummyFileInfo(r,r.content)];this.fileInfoStore.setMessageFileInfos(r.id,_);break;case 5:var h=xr.__cast(r.content.files,Array).map(function(e){return i.createDummyFileInfo(r,e)});this.fileInfoStore.setMessageFileInfos(r.id,h)}return this.messageStore.setMessage(r),r},newDummyFileMessage:function(e,t){var n=this.createFileInfoDynamic(t);return this.newDummyMessage(e,Dt.file,n)},newDummyMultipleFileMessage:function(e,t,n){var i=p.array(n.filter(function(e){return null!=e}).map(r(this,this.createFileInfoDynamic)));return this.newDummyMessage(e,Dt.textMultipleFile,{text:t,files:i})},createFileInfoDynamic:function(e){return{content_type:e.type,content_size:e.size,name:fi.normalize(e.name),file:e}},createDummyFileInfo:function(e,t){var n,i=vt.fromMessageAndFileWithFileId(e,t,this.dummyFileId),r=this.dummyFileId;if(null==r)n=null;else{var a=new Rn(0,1),o=a,s=r.high-o.high|0,l=r.low-o.low|0;if(ur.ucompare(r.low,o.low)<0){s--;s|=0}n=new Rn(s,l)}return this.dummyFileId=n,i},newQuestion:function(e){return this.dataStore.setQuestion(new Vt(e))},newFileInfo:function(e){var t=new vt(e);return this.fileInfoStore.setTalkFileInfo(t,!0),t},newAnnouncement:function(e){return new ze(e)},newAnnouncementStatus:function(e){return this.dataStore.setAnnouncementStatus(new He(e))},newAnnouncementStatusForDomain:function(e){var t=new He;return t.domainId=e,t.unreadCount=0,this.dataStore.setAnnouncementStatus(t)},newAccountControlRequest:function(e){return this.dataStore.setAccountControlRequest(new Pe(e))},newAccountControlGroup:function(e){return this.dataStore.setAccountControlGroup(new Oe(e))},newSolution:function(e){var t=new ln(e);return this.solutionsStore.setSolution(t),t},newUserPresence:function(e,t){var n=new On(e,t);return this.dataStore.setUserPresence(n),n},newConference:function(e){var t=new We(e);return this.conferenceStore.addConference(t),t},__class__:Ni});var ki=function(){Si.call(this,"dataStore")};_["albero.proxy.DataStoreProxy"]=ki,ki.__name__=["albero","proxy","DataStoreProxy"],ki.__super__=Si,ki.prototype=n(Si.prototype,{onRegister:function(){this.init()},setMe:function(e){this.me=e;for(var t=0,n=this.getDomains();t=0?s:1;(l>1||2==r.type&&0!=l)&&(r.user=t,this.sendNotification("notify_update_user",t))}else{var u={type:2,user:t};null!=ua[i]?e.setReserved(i,u):e.h[i]=u}this.storage.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new Tr);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=ua[n]?i.setReserved(n,e):i.h[n]=e,this.storage.setDirtyFlag()},getUserPresence:function(e){if(null==this.userPresences)return null;var t="_"+e.high+"_"+e.low,n=this.userPresences;return null!=ua[t]?n.getReserved(t):n.h[t]},isDepartmentsChanged:function(e,t){return!F.eqArray(e.departments,t.departments)},setUsersIfLatest:function(e,t){var n=this.ensureDomainUserMap(e),i=r(this,this.setUserIfLatest),a=n;p.iter(t,function(e){i(a,e)})},clearUsersDepartments:function(e){var t="_"+e.high+"_"+e.low,n=this.users,i=null!=ua[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new wr(i,i.arrayKeys());r.hasNext();){var a=r.next();a.user.departments=null,this.sendNotification("notify_update_user",a.user)}this.storage.setDirtyFlag()},removeFriend:function(e,t){var n="_"+e.high+"_"+e.low,i=this.users,r=null!=ua[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=ua[a]?r.getReserved(a):r.h[a];null!=o&&(o.type=2)}this.storage.setDirtyFlag()},removeAcquaintance:function(e,t){this.removeFriend(e,t)},getUser:function(e,t){if(null==t)return null;var n=new Rn(0,0),i=n;if(t.high==i.high&&t.low==i.low)return null;var r;if(null!=this.me){var a=this.me.id;r=null!=a&&null!=t&&a.high==t.high&&a.low==t.low}else r=!1;if(r)return this.me.toDomainUser(e);var o="_"+e.high+"_"+e.low,s=this.users,l=null!=ua[o]?s.getReserved(o):s.h[o];if(null!=l){var u="_"+t.high+"_"+t.low,c=null!=ua[u]?l.getReserved(u):l.h[u];if(null!=c)return c.user}return null},getUsers:function(e,t){var n=this,i=function(e,t){var i="_"+e.high+"_"+e.low,r=n.users,a=null!=ua[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new Rn(0,0),r=i;if(t.high==r.high&&t.low==r.low)return null;var o=n.me.id;if(null!=o&&null!=t&&o.high==t.high&&o.low==t.low)return n.me.toDomainUser(e);var s="_"+t.high+"_"+t.low,l=null!=ua[s]?a.getReserved(s):a.h[s];return null!=l?l.user:null});for(var o=[],s=a.arrayKeys(),l=new wr(a,s);l.hasNext();)o.push(l.next().user);return o}return[]};if(null!=e)return i(e,t);for(var r=this.domains,a=new wr(r,r.arrayKeys()),o=null;a.hasNext();)o=null==o?i(a.next().id,t):o.concat(i(a.next().id,t));return null==o?[]:o},getTalk:function(e){var t="_"+e.high+"_"+e.low,n=this.talks;return null!=ua[t]?n.getReserved(t):n.h[t]},getValidPairTalk:function(e,t){var n=this;return null==this.me?null:p.find(this.getTalks(),function(i){if(!A.enumEq(i.type,mn.PairTalk))return!1;var r=i.domainId;return null!=r&&null!=t&&r.high==t.high&&r.low==t.low&&(!!p.exists(i.userIds,function(t){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})&&!!p.exists(i.userIds,function(e){var t=n.me.id;return null!=e&&null!=t&&e.high==t.high&&e.low==t.low}))})},setTalk:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.talks;if(null!=ua[n]?i.setReserved(n,e):i.h[n]=e,null!=e.leftUsers)for(var r=this.ensureDomainUserMap(e.domainId),a=0,o=e.leftUsers;a=0?f:1)>0}else _=!1;_&&(c.user=s,this.sendNotification("notify_update_user",s))}else{var m={type:2,user:s};null!=ua[u]?r.setReserved(u,m):r.h[u]=m,this.sendNotification("notify_update_user",s)}}return this.storage.setDirtyFlag(),e},getTalks:function(){for(var e=[],t=this.talks.keys();t.hasNext();){var n=t.next(),i=this.talks;e.push(null!=ua[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){p.iter(e,r(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=ua[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}if(null!=this.questions)for(var a=this.getQuestions(e),o=0;o=0?l:1)>=0}else t=!0;if(t){var u=this.domains;return null!=ua[i]?u.setReserved(i,e):u.h[i]=e,this.storage.setDirtyFlag(),e}return a},removeDomain:function(e){this.domains.remove("_"+e.high+"_"+e.low),this.storage.setDirtyFlag();for(var t=this.getTalks().filter(function(t){var n=t.domainId;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}),n=0;ne.version)return r;var a=this.accountControlRequests;return null!=ua[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new Tr,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.versionn||_>i;)ci._d("["+m.dateStr(new Date)+"] ","downsize",r,c,a,_),u.clearRect(0,0,r,a),u.drawImage(o,0,0,r,a,0,0,c,_),s.clearRect(0,0,r,a),s.drawImage(l,0,0,c,_,0,0,c,_),r=c,c=this.getOptSize(r,n),a=_,_=this.getOptSize(a,i);var h=e.getContext("2d");h.fillStyle="rgb(255, 255, 255)",h.fillRect(0,0,n,i),h.drawImage(o,0,0,r,a,0,0,n,i)},getOptSize:function(e,t){return t*Math.ceil(Math.log(e/t)/Math.log(2))},__class__:Ri});var Oi=function(){Si.call(this,"keywordWatcher")};_["albero.proxy.KeywordWatcherProxy"]=Oi,Oi.__name__=["albero","proxy","KeywordWatcherProxy"],Oi.__super__=Si,Oi.prototype=n(Si.prototype,{onMessageCreated:function(e){if(null!=e){var t,n=L.map(L.option(this.dataStore.getTalk(e.talkId)),function(e){return e.domainId});switch(n[1]){case 0:t=n[2];break;case 1:t=this.settings.getSelectedDomainId()}if(this.features.canDetectKeyword(t)){var i;if(this.settings.getBrowserSettings().keywordWatchingSelfMessage)i=!1;else{var r=this.dataStore,a=e.userId;if(null!=r.me){var o=r.me.id;i=null!=o&&null!=a&&o.high==a.high&&o.low==a.low}else i=!1}if(!i){var s=e.messageStringForKeywordDetection(this.settings.getBrowserSettings().keywordWatchingActionReply);this.detectKeyword(s,e.type,e.id,t,e.talkId)}}}},onAnnouncementCreated:function(e){if(null!=e&&this.features.canDetectKeyword(e.domainId)){var t=kt.getDisplayTextWithoutEscape(e.type,e.content);this.detectKeyword(t,e.type,e.id,e.domainId,null)}},detectKeyword:function(e,t,n,i,r){var a=this;this.reserveOnNormalizedKeywordPrepared(function(o){for(var s=o.keys();s.hasNext();){var l=s.next(),u=o.get(l);if(null!=u&&0!=u.length&&Pi.match(t,l))for(var c=0;c=0?a:1)>=0}else i=!1;i&&this.removeKeywordDetection(e,t)}},removeKeywordDetection:function(e,t){if(null!=this.detectedDomainTalkIdStrings){var n=this.getKey(e,t);if(null!=n){this.detectedDomainTalkIdStrings.remove(n);var i=this.settings.getBrowserSettings().keywordWatchingEmphasis;this.sendNotification("keyword_detaction_updated",{domainId:e,talkId:t,detected:!1,emphasis:i})}}},removeKeywordDetectionAll:function(){if(null!=this.detectedDomainTalkIdStrings)for(var e=this.settings.getBrowserSettings().keywordWatchingEmphasis,t=this.detectedDomainTalkIdStrings.keys();t.hasNext();){var n=t.next();if(E.startsWith(n,"talk_")){var i=n.substring("talk_".length),r=F.makeFromIdStr(i);this.sendNotification("keyword_detaction_updated",{domainId:null,talkId:r,detected:!1,emphasis:e})}else if(E.startsWith(n,"announcement_")){var a=n.substring("announcement_".length),o=F.makeFromIdStr(a);this.sendNotification("keyword_detaction_updated",{domainId:o,talkId:null,detected:!1,emphasis:e})}this.detectedDomainTalkIdStrings.remove(n)}},getDetectId:function(e,t){if(null==this.detectedDomainTalkIdStrings)return null;var n=this.getKey(e,t);if(null==n)return null;var i=this.detectedDomainTalkIdStrings;return null!=ua[n]?i.getReserved(n):i.h[n]},hasKeywordDetection:function(e,t){return null!=this.getDetectId(e,t)},getKey:function(e,t){return null==e&&null==t?null:null!=t?"talk__"+t.high+"_"+t.low:"announcement__"+e.high+"_"+e.low},__class__:Oi});var xi=function(){};_["albero.proxy.KeywordParser"]=xi,xi.__name__=["albero","proxy","KeywordParser"],xi.parse=function(e){var t=E.htmlEscape(e,!0),n=new f(""(.*?)"","g").map(t,function(e){return xi.encodeSpace(e.matched(1))});return new f("[  ]","g").split(n).filter(z.isNotEmpty).map(xi.decodeSpace).map(xi.createParsedKeyword)},xi.encodeSpace=function(e){return E.replace(E.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},xi.decodeSpace=function(e){return E.replace(E.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},xi.createParsedKeyword=function(e){var t=new f("\\[type:([A-Za-z]+)\\](.*)","g");if(t.match(e)){var n=t.matched(1),i=t.matched(2),r=Pi.getKeywordTypeByMessageTypeString(n);if(r!=Ui.normal)return new Fi(r,i)}return new Fi(Ui.normal,e)};var Fi=function(e,t){this.type=e,this.word=t};_["albero.proxy.ParsedKeyword"]=Fi,Fi.__name__=["albero","proxy","ParsedKeyword"],Fi.prototype={__class__:Fi};var Ui=_["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};Ui.normal=["normal",0],Ui.normal.toString=h,Ui.normal.__enum__=Ui,Ui.selectOneReplyOnly=["selectOneReplyOnly",1],Ui.selectOneReplyOnly.toString=h,Ui.selectOneReplyOnly.__enum__=Ui,Ui.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],Ui.yesOrNoReplyOnly.toString=h,Ui.yesOrNoReplyOnly.__enum__=Ui,Ui.todoDoneOnly=["todoDoneOnly",3],Ui.todoDoneOnly.toString=h,Ui.todoDoneOnly.__enum__=Ui,Ui.__empty_constructs__=[Ui.normal,Ui.selectOneReplyOnly,Ui.yesOrNoReplyOnly,Ui.todoDoneOnly];var Pi=function(){};_["albero.proxy.KeywordTypeHelper"]=Pi,Pi.__name__=["albero","proxy","KeywordTypeHelper"],Pi.getKeywordType=function(e){return null!=e?Pi.getKeywordTypeByMessageTypeString(kt.typeString(e)):Ui.normal},Pi.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return Ui.selectOneReplyOnly;case"todoDone":return Ui.todoDoneOnly;case"yesOrNoReply":return Ui.yesOrNoReplyOnly}return Ui.normal},Pi.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==Dt.selectOneReply;case 2:return e==Dt.yesOrNoReply;case 3:return e==Dt.todoDone}},Pi.createFilterClassStringFromMessageType=function(e){return Pi.createFilterClassString(Pi.getKeywordType(e))},Pi.createFilterClassString=function(e){return"keyword_type_"+w.string(e)};var Li=function(){Si.call(this,"limitations")};_["albero.proxy.LimitationsProxy"]=Li,Li.__name__=["albero","proxy","LimitationsProxy"],Li.__super__=Si,Li.prototype=n(Si.prototype,{getMaxTalkers:function(){var e=this,t=L.flatMap(L.flatMap(L.option(this.settings.getSelectedDomainId()),function(t){return L.option(e.dataStore.getDomain(t))}),function(e){return e.getMaxTalkers()});switch(t[1]){case 0:return t[2];case 1:return this.settings.getConfiguration().maxTalkers}},__class__:Li});var Bi=function(){Si.call(this,"messageStore")};_["albero.proxy.MessageStoreProxy"]=Bi,Bi.__name__=["albero","proxy","MessageStoreProxy"],Bi.__super__=Si,Bi.prototype=n(Si.prototype,{onRegister:function(){this.messages=new Tr},getMessage:function(e){if(null==e)return Sr.None;var t="_"+e.high+"_"+e.low,n=this.messages;return L.option(null!=ua[t]?n.getReserved(t):n.h[t])},setMessage:function(e){},removeMessage:function(e){this.messages.remove("_"+e.high+"_"+e.low)},onFileDeleted:function(e){L.foreach(this.getMessage(e.messageId),function(t){var n=t.getFilesDynamic();if(0!=n.length){var i=p.find(n,function(t){var n=t.file_id,i=e.fileId;return null!=n&&null!=i&&n.high==i.high&&n.low==i.low});null!=i&&(i.deleted=!0)}})},onConferenceClose:function(e){L.foreach(this.getMessage(e.messageId),function(e){e.close()})},onActionStampClose:function(e){L.foreach(this.getMessage(e),function(e){e.close()})},onDeleteFavoriteMessage:function(e){var t=this.getMessage(e.getMessageId());L.foreach(t,function(t){t.updateFavorite(e)})},onAddFavoriteMessage:function(e){var t=this.getMessage(e.getMessageId());L.foreach(t,function(t){t.updateFavorite(e)}),L.isEmpty(t)&&this.setMessage(e.getMessage())},__class__:Bi});var zi=function(){this.connectionStatus=C.Ok,Si.call(this,"rpc"),this.responseHandlers=new vr,this.errorHandler=r(this,this.onServerErrorWithMethod),this.connectionKeeper=new Hi(r(this,this.ping))};_["albero.proxy.MsgPackRpcProxy"]=zi,zi.__name__=["albero","proxy","MsgPackRpcProxy"],zi.__super__=Si,zi.prototype=n(Si.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=new pi($r.endpoint),this.ws.onopen=r(this,this.onOpen),this.ws.onmessage=r(this,this.onMessage),this.ws.onclose=r(this,this.onClose),this.ws.onpong=r(this,this.onPong),zi.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.onopen=null,this.ws.onmessage=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.onpong=null,this.ws.close();var e=this.ws;return this.ws=null,zi.pingAt=null,e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=C.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){zi.pingAt=null;w.string(e)},onMessage:function(e){var t=this,n=new Lr(e,!0).o,i=xr.__cast(n[0],ta);if(1==i&&4==n.length){var r=xr.__cast(n[1],ta),a=n[2],o=n[3],s=this.responseHandlers.h[r];if(null==s)return void ci._e("["+m.dateStr(new Date)+"] ","No ResponseHandler prepared. msgId:%s error:%s result:",r,a,o,"");s.method;if(null==a){var l=s.onSuccess;null!=l&&l(o)}else{var u=s.method;ci._e("["+m.dateStr(new Date)+"] ","Receive Error Response. method:",u," error:",a,"");var c=s.onError;null!=c?c(a):null!=this.errorHandler&&this.errorHandler(s.method,a)}this.responseHandlers.remove(r)}else if(0==i&&4==n.length)for(var _=xr.__cast(n[1],ta),h=xr.__cast(n[2],String),d=xr.__cast(n[3],Array),f=0;f0?e.api.getAnnouncementStatuses(r):i();var a=0,o=function(){2==(a+=1)&&e.api.getTalks(i)};e.api.getFriends(o),e.api.getAcquaintances(o)}),e.api.getDomainInvites(i),e.api.getAccountControlRequests(i),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=P.sortAndReturn(this.dataStore.getDomains(),function(e,t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:ur.ucompare(n.low,i.low),n.high<0?i.high<0?r:-1:i.high>=0?r:1});this.api.sendDomainNotifications(e);for(var t=0;t>>32-f,t.low<>>32-g,_.low<=0)break}for(;;){var S=new Rn(0,0),w=S;if(_.high==w.high&&_.low==w.low)break;var T=ur.ucompare(n.high,t.high);if((0!=T?T:ur.ucompare(n.low,t.low))>=0){u=new Rn(u.high|_.high,u.low|_.low);var E=n.high-t.high|0,I=n.low-t.low|0;if(ur.ucompare(n.low,t.low)<0){E--;E|=0}n=new Rn(E,I)}var A=1;if(0==(A&=63)){_=new Rn(_.high,_.low)}else if(A<32){var b=new Rn(_.high>>>A,_.high<<32-A|_.low>>>A);_=b}else{var N=new Rn(0,_.high>>>A-32);_=N}var k=1;if(0==(k&=63)){t=new Rn(t.high,t.low)}else if(k<32){var D=new Rn(t.high>>>k,t.high<<32-k|t.low>>>k);t=D}else{var C=new Rn(0,t.high>>>k-32);t=C}}if(i){var M=~u.high,R=-u.low;if(0==R){M++;M|=0}u=new Rn(M,R)}if(e.high<0){var O=~n.high,x=-n.low;if(0==x){O++;O|=0}n=new Rn(O,x)}return{quotient:u,modulus:n}};var _r=function(){this.buf=new T,this.cache=[],this.useCache=_r.USE_CACHE,this.useEnumIndex=_r.USE_ENUM_INDEX,this.shash=new Tr,this.scount=0};_["haxe.Serializer"]=_r,_r.__name__=["haxe","Serializer"],_r.run=function(e){var t=new _r;return t.serialize(e),t.toString()},_r.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=ua[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=ua[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=w.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n0&&(1==o?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==o?"null":""+o),o=0),this.serialize(e[c]))}o>0&&(1==o?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==o?"null":""+o)),this.buf.b+="h";break;case Date:var _=e;this.buf.b+="v",this.buf.b+=w.string(_.getTime());break;case g:this.buf.b+="l";for(var h=e,d=h.h;null!=d;){var f=d.item;d=d.next;var p=f;this.serialize(p)}this.buf.b+="h";break;case vr:this.buf.b+="q";for(var v=e,y=v.keys();y.hasNext();){var T=y.next();this.buf.b+=":",this.buf.b+=null==T?"null":""+T,this.serialize(v.h[T])}this.buf.b+="h";break;case yr:this.buf.b+="M";for(var E=e,I=E.keys();I.hasNext();){var b=I.next(),N=S.field(b,"__id__");S.deleteField(b,"__id__"),this.serialize(b),b.__id__=N,this.serialize(E.h[b.__id__])}this.buf.b+="h";break;case Tr:this.buf.b+="b";for(var k=e,D=k.keys();D.hasNext();){var C=D.next();this.serializeString(C),this.serialize(null!=ua[C]?k.getReserved(C):k.h[C])}this.buf.b+="h";break;case Er:var M=e;this.buf.b+="s",this.buf.b+=w.string(Math.ceil(8*M.length/6)),this.buf.b+=":";var R=0,O=M.length-2,x=_r.BASE64_CODES;if(null==x){var F=_r.BASE64.length;x=new Array(F);for(var U=0,P=_r.BASE64.length;U>2]),this.buf.b+=String.fromCharCode(x[63&(B<<4|z>>4)]),this.buf.b+=String.fromCharCode(x[63&(z<<2|H>>6)]),this.buf.b+=String.fromCharCode(x[63&H])}if(R==O){var G=M.b[R++],j=M.b[R++];this.buf.b+=String.fromCharCode(x[G>>2]),this.buf.b+=String.fromCharCode(x[63&(G<<4|j>>4)]),this.buf.b+=String.fromCharCode(x[j<<2&63])}else if(R==O+1){var K=M.b[R++];this.buf.b+=String.fromCharCode(x[K>>2]),this.buf.b+=String.fromCharCode(x[K<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(A.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(A.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var Y=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=w.string(this.useEnumIndex?"j":"w"),this.serializeString(A.getEnumName(Y)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=w.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var W=e.length;this.buf.b+=w.string(W-2);for(var V=2,q=W;V57)break;e=10*e+(i-48),this.pos++}else{if(this.pos!=n)break;t=!0,this.pos++}}return t&&(e*=-1),e},readFloat:function(){for(var e=this.pos;;){var t=this.buf.charCodeAt(this.pos);if(t!=t)break;if(!(t>=43&&t<58||101==t||69==t))break;this.pos++}return parseFloat(m.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw new Or("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Or("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new Or("Invalid enum format");var n=this.readDigits();if(0==n)return A.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return A.createEnum(e,t,i)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new Or("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new Or("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new Or("Class not found "+r);var o=A.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new Or("Invalid custom data");return o;case 77:var s=new yr;for(this.cache.push(s),this.buf;104!=this.buf.charCodeAt(this.pos);){var l=this.unserialize();s.set(l,this.unserialize())}return this.pos++,s;case 82:var u=this.readDigits();if(u<0||u>=this.scache.length)throw new Or("Invalid string reference");return this.scache[u];case 97:var c=(this.buf,[]);for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new Tr;for(this.cache.push(d),this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),p=this.unserialize();null!=ua[f]?d.setReserved(f,p):d.h[f]=p}return this.pos++,d;case 99:var v=this.unserialize(),y=this.resolver.resolveClass(v);if(null==y)throw new Or("Class not found "+v);var S=A.createEmptyInstance(y);return this.cache.push(S),this.unserializeObject(S),S;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var w=this.unserialize(),T=this.resolver.resolveEnum(w);if(null==T)throw new Or("Enum not found "+w);this.pos++;var E=this.readDigits(),I=T.__constructs__.slice()[E];if(null==I)throw new Or("Unknown enum index "+w+"@"+E);var b=this.unserializeEnum(T,I);return this.cache.push(b),b;case 107:return NaN;case 108:var N=new g;for(this.cache.push(N),this.buf;104!=this.buf.charCodeAt(this.pos);)N.add(this.unserialize());return this.pos++,N;case 109:return-1/0;case 110:return null;case 111:var k={};return this.cache.push(k),this.unserializeObject(k),k;case 112:return 1/0;case 113:var D=new vr;this.cache.push(D);for(var C=(this.buf,this.buf.charCodeAt(this.pos++));58==C;){var M=this.readDigits(),R=this.unserialize();D.h[M]=R,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new Or("Invalid IntMap format");return D;case 114:var O=this.readDigits();if(O<0||O>=this.cache.length)throw new Or("Invalid reference");return this.cache[O];case 115:var x=this.readDigits(),F=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0),z=P+(x-L),H=new Er(new ca(B)),G=0;P>4);var Y=U[F.charCodeAt(P++)];H.b[G++]=255&(K<<4|Y>>2);var W=U[F.charCodeAt(P++)];H.b[G++]=255&(Y<<6|W)}if(L>=2){var V=U[F.charCodeAt(P++)],q=U[F.charCodeAt(P++)];if(H.b[G++]=255&(V<<2|q>>4),3==L){var Q=U[F.charCodeAt(P++)];H.b[G++]=255&(q<<4|Q>>2)}}return this.pos+=x,this.cache.push(H),H;case 116:return!0;case 118:var J;if(this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))J=m.strDate(m.substr(this.buf,this.pos,19)),this.pos+=19;else{var X=this.readFloat();J=new Date(X)}return this.cache.push(J),J;case 119:var Z=this.unserialize(),$=this.resolver.resolveEnum(Z);if(null==$)throw new Or("Enum not found "+Z);var ee=this.unserializeEnum($,this.unserialize());return this.cache.push(ee),ee;case 120:throw Or.wrap(this.unserialize());case 121:var te=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.posa+2){var o=e.left,s=e.right;return(null==o?0:o._height)>=(null==s?0:s._height)?new pr(e.left,e.key,e.value,new pr(e.right,t,n,i)):new pr(new pr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new pr(e.right.right,t,n,i))}if(a>r+2){var l=i.right,u=i.left;return(null==l?0:l._height)>(null==u?0:u._height)?new pr(new pr(e,t,n,i.left),i.key,i.value,i.right):new pr(new pr(e,t,n,i.left.left),i.left.key,i.left.value,new pr(i.left.right,i.key,i.value,i.right))}return new pr(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return S.compare(e,t)},__class__:mr};var pr=function(e,t,n,i,r){if(null==r&&(r=-1),this.left=e,this.key=t,this.value=n,this.right=i,-1==r){var a,o=this.left,s=this.right;if((null==o?0:o._height)>(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height -}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};_["haxe.ds.TreeNode"]=pr,pr.__name__=["haxe","ds","TreeNode"],pr.prototype={__class__:pr};var gr=function(){mr.call(this)};_["haxe.ds.EnumValueMap"]=gr,gr.__name__=["haxe","ds","EnumValueMap"],gr.__interfaces__=[lr],gr.__super__=mr,gr.prototype=n(mr.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6),t.push(128|63&i)):i<=65535?(t.push(224|i>>12),t.push(128|i>>6&63),t.push(128|63&i)):(t.push(240|i>>18),t.push(128|i>>12&63),t.push(128|i>>6&63),t.push(128|63&i))}return new Er(new _a(t).buffer)},Er.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Er(e)},Er.fastGet=function(e,t){return e.bytes[t]},Er.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Or(Cr.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&_|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Er};var Ir=function(){this.b=[]};_["haxe.io.BytesBuffer"]=Ir,Ir.__name__=["haxe","io","BytesBuffer"],Ir.prototype={getBytes:function(){var e=new Er(new _a(this.b).buffer);return this.b=null,e},__class__:Ir};var Ar=function(){};_["haxe.io.Input"]=Ar,Ar.__name__=["haxe","io","Input"],Ar.prototype={readByte:function(){throw new Or("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Or(Cr.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof Or&&(e=e.val),!xr.__instanceof(e,Dr))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new Er(new ca(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new Or(Cr.Blocked);n+=i,e-=i}return t},readFloat:function(){return Mr.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?Mr.i64ToDouble(t,e):Mr.i64ToDouble(e,t)},readInt8:function(){var e=this.readByte();return e>=128?e-256:e},readInt16:function(){var e=this.readByte(),t=this.readByte(),n=this.bigEndian?t|e<<8:e|t<<8;return 0!=(32768&n)?n-65536:n},readUInt16:function(){var e=this.readByte(),t=this.readByte();return this.bigEndian?t|e<<8:e|t<<8},readInt32:function(){var e=this.readByte(),t=this.readByte(),n=this.readByte(),i=this.readByte();return this.bigEndian?i|n<<8|t<<16|e<<24:e|t<<8|n<<16|i<<24},__class__:Ar};var br=function(e,t,n){if(null==t&&(t=0),null==n&&(n=e.length-t),t<0||n<0||t+n>e.length)throw new Or(Cr.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};_["haxe.io.BytesInput"]=br,br.__name__=["haxe","io","BytesInput"],br.__super__=Ar,br.prototype=n(Ar.prototype,{readByte:function(){if(0==this.len)throw new Or(new Dr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Or(Cr.OutsideBounds);if(0==this.len&&n>0)throw new Or(new Dr);this.lene.length)throw new Or(Cr.OutsideBounds);for(var i=e.b,r=n;r>0;)this.writeByte(i[t]),++t,--r;return n},set_bigEndian:function(e){return this.bigEndian=e,e},write:function(e){for(var t=e.length,n=0;t>0;){var i=this.writeBytes(e,n,t);if(0==i)throw new Or(Cr.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(Mr.floatToI32(e))},writeDouble:function(e){var t=Mr.doubleToI64(e);this.bigEndian?(this.writeInt32(t.high),this.writeInt32(t.low)):(this.writeInt32(t.low),this.writeInt32(t.high))},writeInt8:function(e){if(e<-128||e>=128)throw new Or(Cr.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new Or(Cr.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new Or(Cr.Overflow);this.bigEndian?(this.writeByte(e>>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:Nr};var kr=function(){this.b=new Ir};_["haxe.io.BytesOutput"]=kr,kr.__name__=["haxe","io","BytesOutput"],kr.__super__=Nr,kr.prototype=n(Nr.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Or(Cr.OutsideBounds);for(var r=(i.b,e.b),a=t,o=t+n;a>>31<<1),n=e>>>23&255,i=8388607&e;return 0==i&&0==n?0:t*(1+Math.pow(2,-23)*i)*Math.pow(2,n-127)},Mr.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:n>128&&(n=128);var i=Math.round(8388608*(t/Math.pow(2,n)-1));return 8388608==i&&n<128&&(i=0,++n),(e<0?-2147483648:0)|n+127<<23|i},Mr.i64ToDouble=function(e,t){var n=1-(t>>>31<<1),i=(t>>20&2047)-1023,r=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==r&&-1023==i?0:n*(1+Math.pow(2,-52)*r)*Math.pow(2,i)},Mr.doubleToI64=function(e){var t=Mr.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else e>0?(t.low=0,t.high=2146435072):(t.low=0,t.high=-1048576);return t};var Rr=function(){};_["haxe.rtti.Meta"]=Rr,Rr.__name__=["haxe","rtti","Meta"],Rr.getMeta=function(e){return e.__meta__},Rr.getFields=function(e){var t=Rr.getMeta(e);return null==t||null==t.fields?{}:t.fields};var Or=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,Or)};_["js._Boot.HaxeError"]=Or,Or.__name__=["js","_Boot","HaxeError"],Or.wrap=function(e){return e instanceof Error?e:new Or(e)},Or.__super__=Error,Or.prototype=n(Error.prototype,{__class__:Or});var xr=function(){};_["js.Boot"]=xr,xr.__name__=["js","Boot"],xr.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=xr.__nativeClassName(e);return null!=n?xr.__resolveNativeClass(n):null},xr.__string_rec=function(e,t){if(null==e)return"null";if(t.length>=5)return"<...>";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;r0?",":"")+xr.__string_rec(e[_],t)}return l+="]"}var h;try{h=e.toString}catch(e){return"???"}if(null!=h&&h!=Object.toString&&"function"==typeof h){var d=e.toString();if("[object Object]"!=d)return d}var f=null,m="{\n";t+="\t";var p=null!=e.hasOwnProperty;for(var f in e)p&&!e.hasOwnProperty(f)||"prototype"!=f&&"__class__"!=f&&"__super__"!=f&&"__interfaces__"!=f&&"__properties__"!=f&&(2!=m.length&&(m+=", \n"),m+=t+f+" : "+xr.__string_rec(e[f],t));return t=t.substring(1),m+="\n"+t+"}";case"string":return e;default:return String(e)}},xr.__interfLoop=function(e,t){if(null==e)return!1;if(e==t)return!0;var n=e.__interfaces__;if(null!=n)for(var i=0,r=n.length;ithis.byteLength)throw new Or("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Or("set() outside of range");for(var s=0,l=o.length;s223)return-256|n}}catch(e){if(e instanceof Or&&(e=e.val),!xr.__instanceof(e,Dr))throw e}return null},readArray:function(e,t,n){for(var i=[],r=0,a=t;r1.401298464324817e-45&&r<3.4028234663852886e38?(this.o.writeByte(202),this.o.writeFloat(i)):(this.o.writeByte(203),this.o.writeDouble(i));break;case 3:this.o.writeByte(e?195:194);break;case 4:var a=S.fields(e),o=p.count(a);o<16?this.o.writeByte(128|o):o<65536?(this.o.writeByte(222),this.o.writeUInt16(o)):(this.o.writeByte(223),this.o.writeInt32(o));for(var s=0;s1.401298464324817e-45&&t<3.4028234663852886e38?(this.o.writeByte(202),this.o.writeFloat(e)):(this.o.writeByte(203),this.o.writeDouble(e))},writeRaw:function(e){var t=e.length;t<32?this.o.writeByte(160|t):t<65536?(this.o.writeByte(218),this.o.writeUInt16(t)):(this.o.writeByte(219),this.o.writeInt32(t)),this.o.write(e)},writeArray:function(e){var t=e.length;t<16?this.o.writeByte(144|t):t<65536?(this.o.writeByte(220),this.o.writeUInt16(t)):(this.o.writeByte(221),this.o.writeInt32(t));for(var n=0;n0)for(var s=new Jr(r(e,e.handleNotification),e),l=0,u=o.length;l0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},a.prototype.removeListener=function(e,t){var n,i,r,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],r=n.length,i=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(l(n)){for(a=r;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},a.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],o(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},a.prototype.listeners=function(e){return this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},a.listenerCount=function(e,t){return e._events&&e._events[t]?o(e._events[t])?1:e._events[t].length:0};ea.exports;_.Math=Math,String.prototype.__class__=_.String=String,String.__name__=["String"],_.Array=Array,Array.__name__=["Array"],Date.prototype.__class__=_.Date=Date,Date.__name__=["Date"];var ta=_.Int={__name__:["Int"]},na=_.Dynamic={__name__:["Dynamic"]},ia=_.Float=Number;ia.__name__=["Float"];var ra=_.Bool=Boolean;ra.__ename__=["Bool"];var aa=_.Class={__name__:["Class"]},oa={},ea={};ea.exports=null,ea.exports={upload:c};var sa=ea.exports,la={websocketsbinary:!0,audio:!1},ua={},ca=t.ArrayBuffer||Ur;null==ca.prototype.slice&&(ca.prototype.slice=Ur.sliceImpl);var _a=t.Uint8Array||Pr._new;k.APP_STATE_CHANGED="app_state_changed",k.ACCESS_TOKEN_CHANGED="access_token_changed",k.CURRENT_USER_CHANGED="current_user_changed",k.CONFIGURATION_CHANGED="configuration_changed",k.DOMAIN_SELECTION_CHANGED="domain_selection_changed",k.TALK_SELECTION_CHANGED="talk_selection_changed",k.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",k.USER_SELECTION_NEEDED="user_selection_needed",k.USER_SELECTION_CHANGED="user_selection_changed",k.FRIEND_SELECTION_NEEDED="friend_selection_needed",k.STAMP_SET_CHANGED="stamp_set_changed",k.STAMP_SELECTION_STARTED="stamp_selection_started",k.STAMP_SELECTION_ENDED="stamp_selection_ended",k.STAMP_SELECTION_CHANGED="stamp_selection_changed",k.ACTION_SELECTION_CHANGED="action_selection_changed",k.CURRENT_PAGE_CHANGED="current_page_changed",k.CURRENT_PAGE_REASSIGNED="current_page_reassgined",k.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",k.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",k.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",k.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",k.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",k.ERROR_OCCURRED="error_occurred",k.UNREAD_COUNT_CHANGED="brand_badge_changed",k.SEND_FORM_TOP_CHANGED="send_form_top_changed",k.SOLUTIONS_LOADED="solutions_loaded",k.RIGHT_PANE_OPENED="right_pane_opened",k.RIGHT_PANE_CLOSED="right_pane_closed",k.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",k.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",k.PHOTO_EDITOR_SAVED="photo_editor_saved",k.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",k.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",k.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",k.SEND_BY_ENTER_CHANGED="send_by_enter_changed",k.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",k.PRESENCES_UPDATED="presences_updated",k.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",k.START_NOTE_EDITING="start_note_editing",k.DATA_RECOVERING="data_recovering",k.DATA_RECOVERED="data_recovered",k.NOTIFY_UPDATE_USER="notify_update_user", -k.NOTIFY_ADD_FRIEND="notify_add_friend",k.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",k.NOTIFY_DELETE_FRIEND="notify_delete_friend",k.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",k.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",k.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",k.GET_USERS_RESPONSED="get_users_responsed",k.GET_PROFILE_RESPONSED="get_profile_responsed",k.GET_PROFILE_ERRORED="get_profile_errored",k.UPDATE_USER_RESPONSED="update_user_responsed",k.UPDATE_USER_ERRORED="update_user_errored",k.UPDATE_PROFILE_RESPONSED="update_profile_responsed",k.UPDATE_PROFILE_ERRORED="update_profile_errored",k.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",k.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",k.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",k.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",k.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",k.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",k.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",k.GET_ME_RESPONSED="get_me_responsed",k.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",k.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",k.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",k.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",k.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",k.NOTIFY_JOIN_DOMAIN="notify_join_domain",k.NOTIFY_UPDATE_DOMAIN="notify_update_domain",k.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",k.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",k.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",k.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",k.NOTIFY_UPDATE_GROUP_TALK_ERRORED="notify_update_group_talk_ERRORED",k.NOTIFY_ADD_TALKERS="notify_add_talkers",k.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",k.NOTIFY_DELETE_TALKER="notify_delete_talker",k.NOTIFY_DELETE_TALK="notify_delete_talk",k.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",k.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",k.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",k.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",k.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",k.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",k.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",k.NOTIFY_CREATE_MESSAGE="notify_create_message",k.NOTIFY_DELETE_MESSAGE="notify_delete_message",k.NOTIFY_GET_MESSAGES="notify_get_messages",k.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",k.CREATE_MESSAGE_START="create_message_start",k.CREATE_MESSAGE_COMPLETE="create_message_complete",k.CREATE_MESSAGE_FAIL="create_message_fail",k.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",k.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",k.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",k.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",k.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",k.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",k.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",k.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",k.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",k.CREATE_ANNOUNCEMENT_START="create_announcement_start",k.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",k.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",k.NOTIFY_UPDATE_QUESTION="notify_update_question",k.NOTIFY_GET_QUESTIONS="get_questions_responsed",k.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",k.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",k.GET_FILE_RESPONSED="get_file_responsed",k.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",k.GET_NOTE_LOADED="get_note_loaded",k.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",k.CREATE_NOTE_COMPLETED="create_note_completed",k.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",k.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",k.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",k.UPDATE_NOTE_COMPLETED="update_note_completed",k.UPDATE_NOTE_FAILED_BY_NOT_FOUND="update_note_failed_by_not_found",k.UPDATE_NOTE_FAILED_BY_CONFLICT="update_note_failed_by_conflict",k.DELETE_NOTE_COMPLETED="delete_note_completed",k.NOTIFY_CREATE_NOTE="notify_create_note",k.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",k.NOTIFY_DELETE_NOTE="notify_delete_note",k.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",k.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",k.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",k.NOTIFY_SEARCH_MESSAGES="notify_search_messages",k.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",k.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",k.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",k.NOTIFY_SEARCH_PREPARE="notify_search_prepare",k.NOTIFY_SEARCH_CLEAR="notify_search_clear",k.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",k.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",k.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",k.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",k.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",k.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",k.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",k.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",k.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",k.JOIN_CONFERENCE_CANCELED="join_conference_canceled",k.NOTIFY_OPEN_CONFERENCE="notify_open_conference",k.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",k.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",k.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",k.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",k.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",K.ANNOUNCEMENTS_KEY="-1",X.__meta__={fields:{api:{inject:null}}},X.NAME="AccountControlRequest",$.__meta__={fields:{api:{inject:null},conferenceStore:{inject:null}}},$.NAME="Conference",te.__meta__={fields:{api:{inject:null}}},te.NAME="Device",ie.__meta__={fields:{api:{inject:null}}},ie.NAME="Domain",ae.__meta__={fields:{api:{inject:null}}},ae.NAME="File",se.NAME="LoadStampSet",se.TAB_URL="./json/app_ja.json",se.TAB_PANE_URL="./json/illust_category_ja.json",le.__meta__={fields:{api:{inject:null}}},le.NAME="ManageFriends",ce.__meta__={fields:{api:{inject:null}}},ce.NAME="Message",he.__meta__={fields:{api:{inject:null}}},he.NAME="Note",fe.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},fe.NAME="Read",pe.__meta__={fields:{api:{inject:null}}},pe.NAME="ReloadData",ve.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},ve.NAME="Search",Se.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},Se.NAME="SelectTalk",Te.__meta__={fields:{api:{inject:null}}},Te.NAME="Send",Ee.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},Ee.NAME="SignIn",Ie.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},Ie.NAME="SignOut",Ae.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ae.NAME="Talk",Ne.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ne.NAME="UpdateProfile",ke.__meta__={fields:{api:{inject:null}}},ke.NAME="UpdateUser",De.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},De.NAME="UpdateUserPresences",De.MAX_USERS_PER_API=100,Ce.__meta__={fields:{routing:{inject:null}}},Ce.NAME="Url",Ke.TalkAutoScrollDelay=1,Ke.TalkAutoScrollImmediately=2,Ke.TalkAutoScrollNone=3,Ke.NAME="browser_settings",We.INCOMING_TIME=6e4,Ve.DEFAULT_PRESENCE_EXPIRATION=3e5;Qe.DEFAULT_TTL=3600,Qe.DEFAULT_MAX_PARTICIPANTS=8,kt.MAX_READ_USER_IDS_COUNT=16,tn.QUERY_DATE_TODAY="t",tn.QUERY_DATE_YESTERDAY="-1d",tn.QUERY_DATE_THREE_DAYS_BEFORE="-3d",On.SIXTY_MINUTES=function(e){return new Rn(0,36e5)}(),On.FIFTEEN_MINUTES=function(e){return new Rn(0,9e5)}(),Xn.PREFIX="note-",ai.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oi.TU_REG=new f("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),oi.XTU_REG=new f("ッ","gm"),ci.EMERGENCY=0,ci.ALERT=1,ci.CRITICAL=2,ci.ERROR=3,ci.WARNING=4,ci.NOTICE=5,ci.INFO=6,ci.DEBUG=7,ci.level=6,ci._d=ci._nop,ci._i=null!=console?console.info.bind(console):ci._nop,ci._w=null!=console?console.warn.bind(console):ci._nop,ci._e=null!=console?console.error.bind(console):ci._nop,fi.HIRAGANA_SMALL_A=12353,fi.HIRAGANA_NN=12435,fi.KATAKANA_SMALL_A=12449,yi.NAME="accessTokenResolver",Si.NAME="Proxy",wi.__meta__={fields:{settings:{inject:null},api:{inject:null}}},Ti.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},fileInfoStore:{inject:null},departmentStore:{inject:null},messageStore:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null},conferenceStore:{inject:null}}},Ti.NAME="broadcast",Ei.__meta__={fields:{apiCaller:{inject:null},settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},fileService:{inject:null},searchService:{inject:null},fileInfoStore:{inject:null},departmentStore:{inject:null},conferenceStore:{inject:null}}},Ei.NAME="api",Ei.API_VERSION="1.105",Ei.UPDATE_VERSION="1.105_1",Ei.ACTIONS_COUNT_PER_API=20,Ei.UPDATE_LAST_USED_AT_INTERVAL=6e5,Ii.__meta__={fields:{rpc:{inject:null}}},Ii.NAME="apiCaller",Ii.DELAY_FOR_DB_REPLICATION=500,Ii.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,Ii.API_TRY_COUNT=3,Ai.NAME="appState",bi.__meta__={fields:{dataStore:{inject:null},messageStore:{inject:null}}},bi.NAME="conferenceStore",Ni.__meta__={fields:{dataStore:{inject:null},fileInfoStore:{inject:null},messageStore:{inject:null},solutionsStore:{inject:null},conferenceStore:{inject:null}}},Ni.NAME="dataFactory",ki.NAME="dataStore",ki.TYPE_FRIEND=0,ki.TYPE_ACQUAINSTANCE=1,ki.TYPE_NONE=2,Di.__meta__={fields:{dataStore:{inject:null}}},Di.NAME="departmentStore",Ci.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Ci.NAME="features",Mi.NAME="fileInfoStore",Ri.__meta__={fields:{settings:{inject:null}}},Ri.NAME="fileService",Ri.THUMBNAIL_WIDTH=600,Ri.THUMBNAIL_HEIGHT=600,Oi.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},Oi.NAME="keywordWatcher",Oi.TALK_KEY_PREFIX="talk_",Oi.ANNOUNCEMENT_KEY_PREFIX="announcement_",xi.TEMP_HALF_SPACE="&SPACE",xi.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",Li.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Li.NAME="limitations",Bi.NAME="messageStore",zi.__meta__={fields:{broadcast:{inject:null}}},zi.NAME="rpc",zi.lastMsgId=0,Hi.PING_INTERVAL_ON_CONNECTED=45e3,Yi.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},Yi.NAME="readStatusUpdater",Wi.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Wi.NAME="routing",Qi.__meta__={fields:{settings:{inject:null}}},Qi.NAME="searchService",Qi.LOAD_SIZE=20,Qi.DUMMY_VALUE_FOR_SET=1,Ji.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},api:{inject:null}}},Ji.NAME="session",Xi.NAME="settings",Xi.KEY_ACCESS_TOKEN="access_token",Xi.KEY_ACCESS_TOKEN_WITHOUT_MANAGEMENT_CONSOLE="access_token_without_management_console",Xi.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",Xi.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",Xi.COOKIE_KEY_SEND_BY_ENTER="send-by-enter",Xi.COOKIE_EXPIRES_SEND_BY_ENTER=31536e3,Xi.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",Xi.KEY_INPUT_TEXT="input_text",Xi.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",Xi.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",Xi.KEY_SEARCH_HISTORIES="search_histories",Xi.KEY_RIGHT_PANEL_OPENED="right_panel_opened",Xi.KEY_MULTI_VIEW_MODE="multi_view_mode",Xi.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",Xi.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",Xi.KEY_IDFV="idfv",Zi.NAME="solutionsStore",$i.__meta__={fields:{dataStore:{inject:null},conferenceStore:{inject:null}}},$i.NAME="talksService",er.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},er.NAME="ThumbnailExpansion",tr.__meta__={fields:{dataStore:{inject:null}}},tr.NAME="userPresences",or.NAME="Mediator",sr.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},sr.NAME="commandline",sr.DATA_SAVE_SPAN=5e3,ur._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},_r.USE_CACHE=!1,_r.USE_ENUM_INDEX=!1,_r.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",fr.DEFAULT_RESOLVER=new dr,fr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",yr.count=0,Mr.i64tmp=function(e){return new Rn(0,0)}(),xr.__toStr={}.toString,Pr.BYTES_PER_ELEMENT=1,Br.FLOAT_SINGLE_MIN=1.401298464324817e-45,Br.FLOAT_SINGLE_MAX=3.4028234663852886e38,Br.FLOAT_DOUBLE_MIN=5e-324,Br.FLOAT_DOUBLE_MAX=1.7976931348623157e308,d.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file +!function(e,t){"use strict";function o(){return Pr.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new aa};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(ra.host=e.host,ra.endpoint=e.endpoint,ra.accessToken=e.access_token,ra.proxyURL=e.proxyURL,ra.account=e.account,ra.talkWithBot=e.talkWithBot),mi._d("["+Fe.dateStr(new Date)+"] ","current settings",ra,"","",""),null==ra.accessToken&&mi._e("["+Fe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return 0=e.length);){if(!this.matchSub(e,n)){i+=j.string(Fe.substr(e,n,null));break}var r=this.matchedPos();if(i+=j.string(Fe.substr(e,n,r.pos-n)),i+=j.string(t(this)),n=0==r.len?(i+=j.string(Fe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},E.startsWith=function(e,t){return e.length>=t.length&&Fe.substr(e,0,t.length)==t},E.replace=function(e,t,n){return e.split(t).join(n)},E.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,0<(e>>>=4););if(null!=t)for(;n.length>>16,l=65535&n.low,u=n.low>>>16,c=hr._mul(o,l),_=hr._mul(s,l),h=hr._mul(o,u),d=c,f=(hr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,hr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,hr.ucompare(d,_)<0){f++;f|=0}f=f+(hr._mul(t.low,n.high)+hr._mul(t.high,n.low)|0)|0;var m=new En(f,d),p=new En(0,j.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(hr.ucompare(v,m.low)<0){g++;g|=0}t=new En(g,v)}return t},Ue.getHigh=function(e){return e.high},Ue.getLow=function(e){return e.low},Ue.idStr=function(e){return"_"+e.high+"_"+e.low},Ue.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new En(j.parseInt(t.matched(1)),j.parseInt(t.matched(2))):null},Ue.toStr=function(e){return dr.toString(e)},Ue.isNeg=function(e){return e.high<0},Ue.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(hr.ucompare(i,e.low)<0){n++;n|=0}return new En(n,i)},Ue.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(hr.ucompare(e.low,t.low)<0){n--;n|=0}return new En(n,i)},Ue.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:hr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Ue.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Ue.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Ue.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=Le.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:me});var pe=function(){M.call(this)};(n["albero.command.UrlCommand"]=pe).__name__=["albero","command","UrlCommand"],pe.__super__=M,pe.prototype=i(M.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:pe});var ge=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};ge.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=ge,t.toString=o,t},ge.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=ge,t.toString=o,t},ge.BACK=["BACK",2],ge.BACK.toString=o,(ge.BACK.__enum__=ge).__empty_constructs__=[ge.BACK];function ve(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=ve).__name__=["albero","entity","Account"],ve.prototype={__class__:ve};function ze(e){null!=e&&(this.id=e.id,this.group=new ye(e.group),this.profilePolicy=new Se(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=ze).__name__=["albero","entity","AccountControlGroup"],ze.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:ze};var ye=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=ye).__name__=["albero","entity","AccountControlGroupGroup"],ye.prototype={__class__:ye};var Se=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=Se).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Se.prototype={__class__:Se};function Ge(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new ye(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Se(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=Ge).__name__=["albero","entity","AccountControlGroupPartialUpdate"],Ge.prototype={__class__:Ge};function Ye(e){null!=e&&(this.id=Ue.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}(n["albero.entity.AccountControlRequest"]=Ye).__name__=["albero","entity","AccountControlRequest"],Ye.prototype={__class__:Ye};var we=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};we.ng=["ng",0],we.ng.toString=o,(we.ng.__enum__=we).ok=["ok",1],we.ok.toString=o,(we.ok.__enum__=we).image=["image",2],we.image.toString=o,(we.image.__enum__=we).imageOrVideo=["imageOrVideo",3],we.imageOrVideo.toString=o,(we.imageOrVideo.__enum__=we).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],we.imageOrVideoOrAudio.toString=o,(we.imageOrVideoOrAudio.__enum__=we).other=["other",5],we.other.toString=o,(we.other.__enum__=we).__empty_constructs__=[we.ng,we.ok,we.image,we.imageOrVideo,we.imageOrVideoOrAudio,we.other];function Te(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Te).__name__=["albero","entity","AllowAttachmentType"],Te.fromInt=function(e){if(null==e)return new Te(we.other);var t;if(null==e)t=we.other;else switch(e){case 0:t=we.ng;break;case 1:t=we.ok;break;case 2:t=we.image;break;case 3:t=we.imageOrVideo;break;case 4:t=we.imageOrVideoOrAudio;break;default:t=we.other}return new Te(t)},Te.fromValue=function(e){return new Te(e)},Te.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,fi.localize("MessageStringMaker.achieve"),fi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?fi.localize("MessageStringMaker.achieve"):fi.localize("MessageStringMaker.remand"):"";case 17:case 18:case 19:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 2:if(null!=this.content.text&&0>2)),r+=j.string(a.charAt(63&(o<<4|s>>4))),r+=j.string(a.charAt(63&(s<<2|l>>6))),r+=j.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=j.string(a.charAt(u>>2)),r+=j.string(a.charAt(63&(u<<4|c>>4))),r+=j.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=j.string(a.charAt(_>>2)),r+=j.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},ci.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=Fe.substr(e,0,t));var n=e.length,i=e,r=ci.CODES;null==r&&(r=ci.initCodes(),ci.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new Ar(new ya(3*(n>>2)+(2<=o?o-1:0))),u=0;a>4);var h=r[i.charCodeAt(a++)];l.b[u++]=255&(_<<4|h>>2);var d=r[i.charCodeAt(a++)];l.b[u++]=255&(h<<6|d)}if(2<=o){var f=r[i.charCodeAt(a++)],m=r[i.charCodeAt(a++)];if(l.b[u++]=255&(f<<2|m>>4),3==o){var p=r[i.charCodeAt(a++)];l.b[u++]=255&(m<<4|p>>2)}}return l};function _i(){}(n["albero.js.KatakanaToRoman"]=_i).__name__=["albero","js","KatakanaToRoman"],_i.assureConvertTable=function(){return null!=_i.convertTable||(_i.convertTable=new Nr,xe.iter([["ア","A"],["イ","I"],["ウ","U"],["エ","E"],["オ","O"],["カ","KA"],["キ","KI"],["ク","KU"],["ケ","KE"],["コ","KO"],["キャ","KYA"],["キュ","KYU"],["キョ","KYO"],["サ","SA"],["シ","SI"],["ス","SU"],["セ","SE"],["ソ","SO"],["シャ","SHA"],["シュ","SHU"],["ショ","SHO"],["タ","TA"],["チ","TI"],["ツ","TU"],["テ","TE"],["ト","TO"],["チャ","THA"],["チュ","THU"],["チョ","THO"],["ナ","NA"],["ニ","NI"],["ヌ","NU"],["ネ","NE"],["ノ","NO"],["ニャ","NYA"],["ニュ","NYU"],["ニョ","NYO"],["ハ","HA"],["ヒ","HI"],["フ","FU"],["ヘ","HE"],["ホ","HO"],["ヒャ","HYA"],["ヒュ","HYU"],["ヒョ","HYO"],["マ","MA"],["ミ","MI"],["ム","MU"],["メ","ME"],["モ","MO"],["ミャ","MYA"],["ミュ","MYU"],["ミョ","MYO"],["ヤ","YA"],["ユ","YU"],["ヨ","YO"],["ラ","RA"],["リ","RI"],["ル","RU"],["レ","RE"],["ロ","RO"],["リャ","RYA"],["リュ","RYU"],["リョ","RYO"],["ワ","WA"],["ヲ","O"],["ン","N"],["ガ","GA"],["ギ","GI"],["グ","GU"],["ゲ","GE"],["ゴ","GO"],["ギャ","GYA"],["ギュ","GYU"],["ギョ","GYO"],["ザ","ZA"],["ジ","JI"],["ズ","ZU"],["ゼ","ZE"],["ゾ","ZO"],["ジャ","ZYA"],["ジュ","ZYU"],["ジョ","ZYO"],["ダ","DA"],["ヂ","JI"],["ヅ","ZU"],["デ","DE"],["ド","DO"],["バ","BA"],["ビ","BI"],["ブ","BU"],["ベ","BE"],["ボ","BO"],["ビャ","BYA"],["ビュ","BYU"],["ビョ","BYO"],["パ","PA"],["ピ","PI"],["プ","PU"],["ペ","PE"],["ポ","PO"],["ピャ","PYA"],["ピュ","PYU"],["ピョ","PYO"],["ー",""],["ッ","ッ"]],function(e){var t=_i.convertTable,n=e[0],i=e[1];null!=va[n]?t.setReserved(n,i):t.h[n]=i})),_i.convertTable},_i.matchNext=function(e,t){var n=_i.assureConvertTable();if(t+1=yi.HIRAGANA_SMALL_A&&o<=yi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(yi.KATAKANA_SMALL_A-yi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},yi.katakanaToRoman=function(e){return(new _i).convert(e)},yi.normalize=function(e){return new Si(null).normalize(e)},yi.normalizeForFile=function(e){return new Si(null).normalizeForFile(e)},yi.asyncAssureNormalize=function(){return Promise.resolve()},yi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Si=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Si).__name__=["albero","js","Normalizer"],Si.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Ur&&(e=e.val),mi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),fi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Ur&&(e=e.val),mi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),fi.localize("TextCanonicalizer.invalid")}},__class__:Si};function wi(e){this.ws=new WebSocket(e),ga.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=ia(this,this.onOpen),this.ws.onmessage=ia(this,this.onMessage),this.ws.onerror=ia(this,this.onError),this.ws.onclose=ia(this,this.onClose)}(n["albero.js.WebSocket"]=wi).__name__=["albero","js","WebSocket"],wi.prototype={onOpen:function(e){mi._i("["+Fe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=ga.websocketsbinary?Ar.ofData(new Sa(e.data)):ci.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){mi._e("["+Fe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+j.string(e.code)+" "+j.string(e.reason)+" "+j.string(e.wasClean);mi._i("["+Fe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){ga.websocketsbinary?this.ws.send(new Sa(e.b.bufferValue).buffer):this.ws.send(ci.encode(e))},ping:function(e){this.send(new Ar(new ya(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:wi};function Ti(){}(n["puremvc.interfaces.IProxy"]=Ti).__name__=["puremvc","interfaces","IProxy"],Ti.prototype={__class__:Ti};function Ei(){}(n["albero.proxy.AccessTokenResolverProxy"]=Ei).__name__=["albero","proxy","AccessTokenResolverProxy"],Ei.__interfaces__=[Ti],Ei.prototype={__class__:Ei};var Ii=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Ii).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ii.newInstance=function(){return new Ai("accessTokenResolver")};var Ni=function(e,t){C.call(this),this.proxyName=null!=e?e:Ni.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Ni).__name__=["puremvc","patterns","proxy","Proxy"],Ni.__interfaces__=[Ti],Ni.__super__=C,Ni.prototype=i(C.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Ni});var Ai=function(e){Ni.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Ai).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Ai.__interfaces__=[Ei],Ai.__super__=Ni,Ai.prototype=i(Ni.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ra.account?ra.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Ai});var bi=function(){Ni.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=bi).__name__=["albero","proxy","AlberoBroadcastProxy"],bi.__super__=Ni,bi.prototype=i(Ni.prototype,{handleNotification:function(n,e,i){var r=this;switch(n){case"notify_add_account_control_request":var t=new Ye(e);this.dataStore.setAccountControlRequest(t),this.sendNotification(n,t),i();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(e[1]);this.sendNotification(n,a),i();break;case"notify_add_domain_invite":var o=new nt(e);this.dataStore.setDomainInvite(o),this.sendNotification(n,o),i();break;case"notify_add_favorite_message":var s=new Bn(e);this.messageStore.onAddFavoriteMessage(s),this.sendNotification(n,s),i();break;case"notify_add_favorite_talk":var l=new ut(e);this.updateTalkStatusByFavoriteTalkEvent(l),this.sendNotification(n,l),i();break;case"notify_add_friend":var u=this.dataFactory.newFriend(e[1]);this.sendNotification(n,u),i();break;case"notify_add_talkers":var c=new rn(e);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(n,c),i();break;case"notify_close_conference":var _=new We(e);this.conferenceStore.removeConference(_),this.updateTalkStatusByConferenceClosedEvent(_),this.sendNotification(n,_),i();break;case"notify_conference_participant_join":var h,d=e[3],f=e[4],m=this.dataStore;if(null!=m.me){var p=m.me.id;h=null!=p&&null!=f&&p.high==f.high&&p.low==f.low}else h=!1;h&&this.dataStore.addReactedConfereceId(d),this.sendNotification(n,e),i();break;case"notify_conference_participant_reject":var g=e[3];this.dataStore.addReactedConfereceId(g),this.sendNotification(n,e),i();break;case"notify_create_announcement":var v=new He(e);this.keywordWatcher.onAnnouncementCreated(v),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(v)),this.sendNotification(n,v),i();break;case"notify_create_message":var y=new wt(e);this.messageStore.setMessage(y),this.keywordWatcher.onMessageCreated(y);var S=this.newTalkStatusByMessage(y);switch(null!=S&&this.sendNotification("notify_update_local_talk_status",S),y.type[1]){case 0:var w=y.content,T=null;switch(w.type){case"delete_talker":T=w.deleted_user_id;break;case"hide_pair_talk":T=w.user_id}if(null==T)return this.sendNotification(n,y),void i();for(var E=y.talkId,I=this.dataStore.getQuestions(E,T),N=0;Nt.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void mi._e("["+Fe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new mn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Pt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new mn).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&((t=new mn).id=e.talkId),pn.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;n||t.unreadCount++,t.talkOrderingTimestamp=e.createdAt}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(pn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),pn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Tt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!xe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return mi._e("["+Fe.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var n=e.messageIds[0],r=0,a=e.messageIds;r=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,wt.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Ji.toLocalError(vt.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new Et;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=Ji.toLocalError(vt.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?Er.Some(1e3*o.asInt(e.detail.retry_after)):Er.None})},upload:function(e,t,n){var i=this,r=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",r);var a=this.prepareMessageFileAsync(n,e);a.then(function(e){i.createMessageReliable(t,Tt.file,e,r)}),a.catch(function(e){i.sendNotification("create_message_fail",[e,r])})},uploadMulti:function(n,i,r,a){var o=this,s=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",s);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=va[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new Nr,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>>31,t.low<<1);if(63,u=new En(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new En(0,0);if(u.high==h.high&&u.low==h.low)break;var d=hr.ucompare(n.high,t.high);if(0<=(0!=d?d:hr.ucompare(n.low,t.low))){l=new En(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(hr.ucompare(n.low,t.low)<0){f--;f|=0}n=new En(f,m)}63,u=new En(u.high>>>1,u.high<<31|u.low>>>1);63,t=new En(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new En(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new En(v,y)}return{quotient:l,modulus:n}};var fr=function(){this.buf=new T,this.cache=[],this.useCache=fr.USE_CACHE,this.useEnumIndex=fr.USE_ENUM_INDEX,this.shash=new Nr,this.scount=0};(n["haxe.Serializer"]=fr).__name__=["haxe","Serializer"],fr.run=function(e){var t=new fr;return t.serialize(e),t.toString()},fr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=va[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=va[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=j.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(R<<4|M>>4)]),this.buf.b+=String.fromCharCode(b[63&(M<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=I.b[N++],U=I.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=I.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=j.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=j.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=j.string(B-2);for(var z=2,G=B;z=this.length)throw new Ur("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Ur("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new Ur("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Ur("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new Nr;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=va[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new Ur("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new Ur("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Ur("Unknown enum index "+y+"@"+w);var E=this.unserializeEnum(S,T);return this.cache.push(E),E;case 107:return NaN;case 108:var I=new $;this.cache.push(I);for(this.buf;104!=this.buf.charCodeAt(this.pos);)I.add(this.unserialize());return this.pos++,I;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new wr;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new Ur("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new Ur("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),R=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var G=M[R.charCodeAt(F++)];P.b[L++]=255&(z<<4|G>>2);var Y=M[R.charCodeAt(F++)];P.b[L++]=255&(G<<6|Y)}if(2<=x){var H=M[R.charCodeAt(F++)],j=M[R.charCodeAt(F++)];if(P.b[L++]=255&(H<<2|j>>4),3==x){var K=M[R.charCodeAt(F++)];P.b[L++]=255&(j<<4|K>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=Fe.strDate(Fe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new Ur("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Ur.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new yr(e.left,e.key,e.value,new yr(e.right,t,n,i)):new yr(new yr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new yr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new yr(new yr(e,t,n,i.left),i.key,i.value,i.right):new yr(new yr(e,t,n,i.left.left),i.left.key,i.left.value,new yr(i.left.right,i.key,i.value,i.right))}return new yr(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=yr).__name__=["haxe","ds","TreeNode"],yr.prototype={__class__:yr};var Sr=function(){vr.call(this)};(n["haxe.ds.EnumValueMap"]=Sr).__name__=["haxe","ds","EnumValueMap"],Sr.__interfaces__=[_r],Sr.__super__=vr,Sr.prototype=i(vr.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new Ar(new Sa(t).buffer)},Ar.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ar(e)},Ar.fastGet=function(e,t){return e.bytes[t]},Ar.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Ur(Mr.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Ar};function br(){this.b=[]}(n["haxe.io.BytesBuffer"]=br).__name__=["haxe","io","BytesBuffer"],br.prototype={getBytes:function(){var e=new Ar(new Sa(this.b).buffer);return this.b=null,e},__class__:br};function Dr(){}(n["haxe.io.Input"]=Dr).__name__=["haxe","io","Input"],Dr.prototype={readByte:function(){throw new Ur("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Ur(Mr.OutsideBounds);try{for(;0e.length)throw new Ur(Mr.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=kr).__name__=["haxe","io","BytesInput"],kr.__super__=Dr,kr.prototype=i(Dr.prototype,{readByte:function(){if(0==this.len)throw new Ur(new Rr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Ur(Mr.OutsideBounds);if(0==this.len&&0e.length)throw new Ur(Mr.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:Cr};function Or(){this.b=new br}(n["haxe.io.BytesOutput"]=Or).__name__=["haxe","io","BytesOutput"],Or.__super__=Cr,Or.prototype=i(Cr.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Ur(Mr.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},Fr.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},Fr.doubleToI64=function(e){var t=Fr.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;rthis.byteLength)throw new Ur("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Ur("set() outside of range");for(var s=0,l=o.length;sn&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},aa.prototype.once=function(e,t){if(!oa(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},aa.prototype.removeListener=function(e,t){var n,i,r,a;if(!oa(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=(n=this._events[e]).length,i=-1,n===t||oa(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(sa(n)){for(a=r;0>>16)<<16|0)|0},fr.USE_CACHE=!1,fr.USE_ENUM_INDEX=!1,fr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",gr.DEFAULT_RESOLVER=new pr,gr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Tr.count=0,Fr.i64tmp=new En(0,0),Pr.__toStr={}.toString,zr.BYTES_PER_ELEMENT=1,Yr.FLOAT_SINGLE_MIN=1401298464324817e-60,Yr.FLOAT_SINGLE_MAX=34028234663852886e22,Yr.FLOAT_DOUBLE_MIN=5e-324,Yr.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file diff --git a/package.json b/package.json index 59d6b9e..28f5667 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "direct-js", - "version": "1.105.0", + "version": "1.106.0", "description": "Low-level javascript library for direct", "main": "./lib/direct-node.min.js", "scripts": {