From 33b339576a55630b37db61bb7ac80aef14cb127d Mon Sep 17 00:00:00 2001 From: lisb-jenkins Date: Tue, 12 Mar 2024 06:58:30 +0000 Subject: [PATCH 1/2] Update lib/*.js based on albero-client-web@direct-js@2.3.0 --- lib/direct-node.min.js | 2 +- lib/direct.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/direct-node.min.js b/lib/direct-node.min.js index d1049b7..b0d15d0 100755 --- a/lib/direct-node.min.js +++ b/lib/direct-node.min.js @@ -1 +1 @@ -!function(e,t){"use strict";var n={},i=function(){return vo.__string_rec(this,"")};function r(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 a=e.DirectAPI=function(){this.eventEmitter=new l};n.DirectAPI=a,a.__name__=["DirectAPI"],a.getInstance=function(){return null==a.instance&&(a.instance=new a),a.instance},a.main=function(){},a.prototype={setOptions:function(e){null!=e&&(Jo.host=e.host,Jo.endpoint=e.endpoint,Jo.accessToken=e.access_token,Jo.proxyURL=e.proxyURL,Jo.account=e.account,Jo.talkWithBot=e.talkWithBot,Jo.acceptableEventTimeDiff=e.acceptableEventTimeDiff,Jo.name=e.name,Jo.storagePath=e.storage_path,Jo.storageQuota=e.storage_quota,Jo.wsConfig=e.ws_config,null!=e.internalLogger&&dr.setInternalLogger(e.internalLogger)),dr.d("current settings",Jo),null==Jo.accessToken&&dr.e("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 hi(y.parseInt(a[1]),y.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 hi(y.parseInt(s[1]),y.parseInt(s[2]));else n=null}null!=n&&this.sendQueue.sendAnnouncement(n,t)},send:function(e,t){var n,i=e.room.split("_");i.length>2?n=new hi(y.parseInt(i[1]),y.parseInt(i[2])):n=null;null!=n&&null!=t&&this.sendQueue.sendMessage(n,t)},topic:function(e,t){var n,i=e.room.split("_");i.length>2?n=new hi(y.parseInt(i[1]),y.parseInt(i[2])):n=null;this.facade.sendNotification("Talk",Oe.UPDATE_FOR_HUBOT(n,t))},download:function(e,t,n){var i,r=null,a=null;"string"==typeof t?i=t:(i=t.url,r=t.path,a=t.name),null!=i?(null==a&&(a=Io.basename(i)),null==r&&(r=Io.join(wo.tmpdir(),a)),this.facade.sendNotification("FilePath",le.DOWNLOAD_PATH(i,r,n))):n(null,new Error("target URL is required"))},leave:function(e,t){var n,i,r=this,a=e.room.split("_");if(a.length>2){var o=new hi(y.parseInt(a[1]),y.parseInt(a[2]));n=o}else n=null;if(null==t)i=null;else{var s=t.id.split("_");if(s.length>2){var l=new hi(y.parseInt(s[1]),y.parseInt(s[2]));i=l}else i=null}qa.delay(function(){r.facade.sendNotification("Talk",Oe.DELETE_FOR_HUBOT(n,i))},500)},userForId:function(e,t){var n=U.fromNullableIdStr(t);return this.hubotObject.userObjectByIdStr(n,e)},userObjects:function(e){var t=U.fromNullableIdStr(e);return this.hubotObject.userObjects(t)},talkObjects:function(){return this.hubotObject.talkObjects()},domainObjects:function(){return this.hubotObject.domainObjects()},parseInt64:function(e){return La.parseInt64(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),La.stringifyInt64(e,t)},listen:function(){this.facade=b.getInstance(),this.api=vo.__cast(this.facade.retrieveProxy("api"),Fr),this.data=vo.__cast(this.facade.retrieveProxy("dataStore"),Lr),this.ID=new La,this.hubotObject=vo.__cast(this.facade.retrieveProxy("hubotObject"),Oa),this.sendQueue=vo.__cast(this.facade.retrieveProxy("sendQueue"),Ra);var e=vo.__cast(this.facade.retrieveProxy("fileService"),Hr);this.notes=new ma(new pa(this,this.api,e)),this.mention=new f,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__:a};var o=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};n.EReg=o,o.__name__=["EReg"],o.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);){if(!this.matchSub(e,n)){i+=y.string(u.substr(e,n,null));break}var r=this.matchedPos();if(i+=y.string(u.substr(e,n,r.pos-n)),i+=y.string(t(this)),0==r.len?(i+=y.string(u.substr(e,r.pos,1)),n=r.pos+1):n=r.pos+r.len,!this.r.global)break}return!this.r.global&&n>0&&n0?this.interval-(e-this.basetime):this.interval,Math.ceil(t/1e3)},createError:function(e){var t=this.max+" calls every "+Math.floor(this.interval/1e3)+" sec";return Ua.createTooManyRequestsError(t,this.calculateRetryAfter(e))},apply:function(e){var t=this;return new Promise(function(n,i){var r=t._now();if(t.max>0&&r-t.basetime>t.interval)t.basetime=r,t.count=1;else{if(!(t.max>0&&t.countt?1:-1},v.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__)},v.isEnumValue=function(e){return null!=e&&null!=e.__enum__},v.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var y=function(){};n.Std=y,y.__name__=["Std"],y.string=function(e){return vo.__string_rec(e,"")},y.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=u.cca(e,1)&&88!=u.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t};var S=function(){this.b=""};n.StringBuf=S,S.__name__=["StringBuf"],S.prototype={toString:function(){return this.b},__class__:S};var w=function(){};n.StringTools=w,w.__name__=["StringTools"],w.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},w.startsWith=function(e,t){return e.length>=t.length&&u.substr(e,0,t.length)==t},w.isSpace=function(e,t){var n=u.cca(e,t);return n>8&&n<14||32==n},w.ltrim=function(e){for(var t=e.length,n=0;n0?u.substr(e,n,t-n):e},w.rtrim=function(e){for(var t=e.length,n=0;n0?u.substr(e,0,t-n):e},w.trim=function(e){return w.ltrim(w.rtrim(e))},w.replace=function(e,t,n){return e.split(t).join(n)},w.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,(e>>>=4)>0;);if(null!=t)for(;n.lengtht;){var i=u.substr(e,0,t);n.push(i),e=u.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=n.ValueType={__ename__:["ValueType"],__constructs__:["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"]};T.TNull=["TNull",0],T.TNull.toString=i,T.TNull.__enum__=T,T.TInt=["TInt",1],T.TInt.toString=i,T.TInt.__enum__=T,T.TFloat=["TFloat",2],T.TFloat.toString=i,T.TFloat.__enum__=T,T.TBool=["TBool",3],T.TBool.toString=i,T.TBool.__enum__=T,T.TObject=["TObject",4],T.TObject.toString=i,T.TObject.__enum__=T,T.TFunction=["TFunction",5],T.TFunction.toString=i,T.TFunction.__enum__=T,T.TClass=function(e){var t=["TClass",6,e];return t.__enum__=T,t.toString=i,t},T.TEnum=function(e){var t=["TEnum",7,e];return t.__enum__=T,t.toString=i,t},T.TUnknown=["TUnknown",8],T.TUnknown.toString=i,T.TUnknown.__enum__=T,T.__empty_constructs__=[T.TNull,T.TInt,T.TFloat,T.TBool,T.TObject,T.TFunction,T.TUnknown];var N=function(){};n.Type=N,N.__name__=["Type"],N.getClassName=function(e){var t=e.__name__;return null==t?null:t.join(".")},N.getEnumName=function(e){return e.__ename__.join(".")},N.resolveClass=function(e){var t=n[e];return null!=t&&t.__name__?t:null},N.resolveEnum=function(e){var t=n[e];return null!=t&&t.__ename__?t:null},N.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 go("Too many arguments")}},N.createEmptyInstance=function(e){function t(){}return t.prototype=e.prototype,new t},N.createEnum=function(e,t,n){var i=v.field(e,t);if(null==i)throw new go("No such constructor "+t);if(v.isFunction(i)){if(null==n)throw new go("Constructor "+t+" need parameters");return i.apply(e,n)}if(null!=n&&0!=n.length)throw new go("Constructor "+t+" does not need parameters");return i},N.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=vo.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}},N.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));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():M.dateString(r,!1)},M.getDateStringForNotification=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():r.getMonth()+1+"/"+r.getDate()},M.datetimeStringIn11Chars=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296)),a=M.dateString(r,!1);return t.getFullYear()==r.getFullYear()&&(a+=" "+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()),a},M.timeString=function(e){if(null==e)return"";var t=e.high,n=e.low,i=new Date(4294967296*t+(n>=0?n:n+4294967296));return i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes()},M.datetimeString=function(e){if(null==e)return"";var t=parseFloat(Wa.toString(e)),n=new Date(t);return n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate()+" "+n.getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes()};var F=function(){};n["albero.FileDynamicHelper"]=F,F.__name__=["albero","FileDynamicHelper"],F.filterDeleted=function(e){return null==e?[]:e.filter(F.isNotDeleted)},F.isNotDeleted=function(e){return null==e.deleted||!e.deleted},F.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 H.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 R=function(){};n["albero.FileHelper"]=R,R.__name__=["albero","FileHelper"],R.createByteSizeStringWithUnit=function(e){if(null==e)return"0 B";for(var t,n=["","K","M","G","T"];;){var i=new hi(0,1024),r=t=Wa.divMod(e,i).quotient,a=new hi(0,0),o=r.high-a.high|0;if(o=0!=o?o:za.ucompare(r.low,a.low),!((r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0))break;e=t,n.shift()}return Wa.toString(e)+" "+n.shift()+"B"},R.extractFilenameExceptExtension=function(e){return new o("\\.(?=[^.]+$)","").split(e)[0]};var x=function(){};n["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 U=function(){};n["albero.Int64Helper"]=U,U.__name__=["albero","Int64Helper"],U.parse=function(e){if(!new o("^\\d+$","").match(e))return null;for(var t=new hi(0,0),n=new hi(0,10),i=0,r=e.length;i>>16,u=65535&n.low,c=n.low>>>16,_=za._mul(s,u),h=za._mul(l,u),d=za._mul(s,c),f=_,m=(za._mul(l,c)+(d>>>16)|0)+(h>>>16)|0;if(f=f+(d<<=16)|0,za.ucompare(f,d)<0){m++;m|=0}if(f=f+(h<<=16)|0,za.ucompare(f,h)<0){m++;m|=0}m=m+(za._mul(t.low,n.high)+za._mul(t.high,n.low)|0)|0;var p=new hi(m,f),g=new hi(0,y.parseInt(e.charAt(a))),v=p.high+g.high|0,S=p.low+g.low|0;if(za.ucompare(S,p.low)<0){v++;v|=0}t=new hi(v,S)}return t},U.getHigh=function(e){return e.high},U.getLow=function(e){return e.low},U.idStr=function(e){return"_"+e.high+"_"+e.low},U.makeFromIdStr=function(e){var t=new o("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new hi(y.parseInt(t.matched(1)),y.parseInt(t.matched(2))):null},U.fromNullableIdStr=function(e){return null!=e?U.makeFromIdStr(e):null},U.toStr=function(e){return Wa.toString(e)},U.isNeg=function(e){return e.high<0},U.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(za.ucompare(i,e.low)<0){n++;n|=0}return new hi(n,i)},U.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(za.ucompare(e.low,t.low)<0){n--;n|=0}return new hi(n,i)},U.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:za.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:t.high>=0?n:1},U.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},U.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},U.toFloat=function(e){var t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)},U.idStrToInt64=function(e){var t=e.split("_");return t.length>2?new hi(y.parseInt(t[1]),y.parseInt(t[2])):null},U.decrement=function(e){if(null==e)return null;var t=new hi(0,1),n=e.high-t.high|0,i=e.low-t.low|0;if(za.ucompare(e.low,t.low)<0){n--;n|=0}return new hi(n,i)},U.increment=function(e){if(null==e)return null;var t=new hi(0,1),n=e.high+t.high|0,i=e.low+t.low|0;if(za.ucompare(i,e.low)<0){n++;n|=0}return new hi(n,i)},U.unique=function(e){if(null==e)return[];for(var t=[],n=0,i=e.length;n>31,t)},U.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 hn(d.id,f))}}}else{for(var w=[],I=(u.iter(n),0);I0&&a.push(new hn(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:Me});var Fe=function(){Z.call(this)};n["albero.command.UpdateUserCommand"]=Fe,Fe.__name__=["albero","command","UpdateUserCommand"],Fe.__super__=Z,Fe.prototype=r(Z.prototype,{execute:function(e){var t=e.getBody();if(null!=t.profileImage){var n=t.profileImage;if(!w.startsWith(n.type,"image/"))return}this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:Fe});var Re=function(){Z.call(this)};n["albero.command.UpdateUserPresencesCommand"]=Re,Re.__name__=["albero","command","UpdateUserPresencesCommand"],Re.__super__=Z,Re.prototype=r(Z.prototype,{execute:function(e){var t=e.getBody().domainId,n=e.getBody().userIds;if(null!=t&&null!=n){var i=this.filterOnlyExpired(U.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 hi(i>>31,i);return e.filter(function(e){var i=H.map(t.userPresences.getUserPresence(e),function(e){return e.isExpired(n,r)});switch(i[1]){case 0:return i[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){for(var n=this,i=Promise.resolve([]),r=U.splitUsingMaxCount(t,100),a=0;a0?e.createAttachmentErrorMessageByNetwork(n):t.createAttachmentErrorMessageByDomain(n)},ze.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 hr.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return hr.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return hr.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return hr.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 hr.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return hr.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return hr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return hr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:return function(e){return new o("image.*","").match(e.type)};case 3:return function(e){return new o("image.*|video.*","").match(e.type)};case 4:return function(e){return new o("image.*|video.*|audio.*","").match(e.type)};default:return function(e){return!0}}},createDataTransferItemFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:var e=new o("image.*","");return function(t){return e.match(t.type)};case 3:var t=new o("image.*|video.*","");return function(e){return t.match(e.type)};case 4:var n=new o("image.*|video.*|audio.*","");return function(e){return n.match(e.type)};default:return function(e){return!0}}},__class__:ze};var We=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=qt.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)};n["albero.entity.Announcement"]=We,We.__name__=["albero","entity","Announcement"],We.prototype={getDisplayTextWithoutEscape:function(){return qt.getDisplayTextWithoutEscape(this.type,this.content)},getNotificatoinTextWithoutEscape:function(e){switch(null==e&&(e=this.userName),null==e&&(e=""),this.type[1]){case 1:case 7:return e+":"+this.getDisplayTextWithoutEscape();default:return dr.e("Unsupported announcement.type is detected. announcment:%o",this),qt.getUnsupportText()}},__class__:We};var Ke=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 We(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};n["albero.entity.AnnouncementStatus"]=Ke,Ke.__name__=["albero","entity","AnnouncementStatus"],Ke.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 a=!0;if(a){var u;if(null!=n){var c=o.high-n.high|0;c=0!=c?c:za.ucompare(o.low,n.low),u=(o.high<0?n.high<0?c:-1:n.high>=0?c:1)>0}else u=!0;u&&(n=o),++t}}null!=n&&this.read(n,t)},updateByAnnouncementDeletion:function(e){var t,n=!1;if(this.isUnread(e)&&(this.decrementUnreadCount(1),n=!0),null!=this.maxAnnouncementId){var i=this.maxAnnouncementId;t=null!=i&&null!=e&&i.high==e.high&&i.low==e.low}else t=!1;return t&&null!=this.maxAnnouncement&&(this.maxAnnouncement.type=Qt.deleted,this.maxAnnouncement.content="",n=!0),n},updateByAnnouncement:function(e){this.isNewMax(e.id)&&(this.maxAnnouncementId=e.id,this.maxAnnouncement=e),this.unreadCount++},updateByReadingAnnouncements:function(e){if(null==e||this.canRegardAnnouncementReadCountZero(e)){if(!Ve.isUnreadAnnouncementExisted(this))return!1;if(null==this.maxAnnouncementId)return!1;this.readAll()}else{var t=e.filter(Go(this,this.isUnread));if(0==t.length)return!1;this.read(t[t.length-1],t.length)}return!0},canRegardAnnouncementReadCountZero:function(e){var t=this.maxAnnouncementId,n=H.orNull(L.lastOption(e));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},read:function(e,t){this.maxReadAnnouncementId=e,this.decrementUnreadCount(t),dr.v("Announcement status is updated. [domainId, maxReadAnnoundementId, unreadCount]:",this.domainId,this.maxReadAnnouncementId,this.unreadCount)},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},readAll:function(){this.maxReadAnnouncementId=this.maxAnnouncementId,this.unreadCount=0},isUnread:function(e){if(null!=this.maxReadAnnouncementId){var t=this.maxReadAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:za.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:za.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},__class__:Ke};var Ve=function(){};n["albero.entity.AnnouncementStatusHelper"]=Ve,Ve.__name__=["albero","entity","AnnouncementStatusHelper"],Ve.isUnreadAnnouncementExisted=function(e){return null!=e&&(null!=e.maxAnnouncement&&e.isUnread(e.maxAnnouncement.id))},Ve.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var qe=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};n["albero.entity.AnnouncementStatusUpdate"]=qe,qe.__name__=["albero","entity","AnnouncementStatusUpdate"],qe.prototype={__class__:qe};var Qe=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.talkAutoScroll=1,this.talksSortMode="new_messages_first",this.talkRightPanelOpened=!0,this.talkRightPanelWidth=0,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.notificationIncludingMessageContent&&(this.notificationIncludingMessageContent=e.notificationIncludingMessageContent),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),null!=e.talkRightPanelOpened?this.talkRightPanelOpened=e.talkRightPanelOpened:this.talkRightPanelOpened=null==G.getItem("right_panel_opened"),null!=e.talkRightPanelWidth)this.talkRightPanelWidth=e.talkRightPanelWidth;else{var t=y.parseInt(G.getItem("right_panel_width"));this.talkRightPanelWidth=null==t?0:t}if(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 n=0,i=vo.__cast(e.userDataContainer,Array);ne.version},isStampsetEnabled:function(e){return c.has(this.allowCreateMessageStampCategories,e)},isStampCategoriesEmpty:function(){return 0==this.allowCreateMessageStampCategories.length},getCategoryIndex:function(e){return this.allowCreateMessageStampCategories.indexOf(e)},__class__:Ze};var $e=function(e){null!=e&&(this.userId=e.user_id,this.id=e.conference_id,this.domainId=e.domain_id,this.talkId=e.talk_id,this.messageId=e.message_id,this.createdAt=e.created_at,this.expiredAt=e.expired_at,this.participants=e.participants,this.skywayVersion=null==e.skyway_version?1:e.skyway_version)};n["albero.entity.Conference"]=$e,$e.__name__=["albero","entity","Conference"],$e.prototype={isIncomingExpired:function(){var e=this.createdAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)+$e.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__:$e};var et=function(){this.conferencesMap=new ao,this.talkIdConferenceIdMap=new ao};n["albero.entity.ConferenceStore"]=et,et.__name__=["albero","entity","ConferenceStore"],et.prototype={addConference:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.conferencesMap;null!=Xo[n]?i.setReserved(n,e):i.h[n]=e;var r=e.talkId,a="_"+r.high+"_"+r.low,o=this.talkIdConferenceIdMap;null!=Xo[a]?o.setReserved(a,n):o.h[a]=n},removeConference:function(e){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!=Xo[r]?a.getReserved(r):a.h[r])==n&&this.talkIdConferenceIdMap.remove(r)},getConferences:function(){return B.toValueArray(this.conferencesMap)},getConference:function(e){var t="_"+e.high+"_"+e.low,n=this.conferencesMap;return null!=Xo[t]?n.getReserved(t):n.h[t]},hasConferenceInTalk:function(e){if(null!=e){var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;return null!=Xo[t]?n.existsReserved(t):n.h.hasOwnProperty(t)}return!1},getConferenceIdInTalk:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap,i=null!=Xo[t]?n.getReserved(t):n.h[t];return null==i?null:U.makeFromIdStr(i)},getConferenceTalkIds:function(){return B.toKeyArray(this.talkIdConferenceIdMap).map(U.makeFromIdStr)},hasConference:function(){return this.talkIdConferenceIdMap.keys().hasNext()},__class__:et};var tt=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:tt.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=ze.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled)};n["albero.entity.Configuration"]=tt,tt.__name__=["albero","entity","Configuration"],tt.prototype={__class__:tt};var nt=function(e){this.contractConference=io.None,null!=e&&(this.id=e.contract_id,this.plan=new sn(e.plan),this.quota=new Tn(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=io.Some(new it(e.conference))))};n["albero.entity.Contract"]=nt,nt.__name__=["albero","entity","Contract"],nt.prototype={getMaxMessageContentLength:function(){return H.map(H.option(this.quota),function(e){return e.maxMessageContentLength})},getMaxTalkers:function(){return H.flatMap(H.option(this.quota),function(e){return H.option(e.maxTalkers)})},getMaxTalks:function(){return H.flatMap(H.option(this.quota),function(e){return H.option(e.maxTalks)})},isConferenceEnalbed:function(){return H.isDefined(this.contractConference)},isVideoEnalbed:function(){var e=H.map(this.contractConference,function(e){return e.videoEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},getConferenceTtl:function(){return H.map(this.contractConference,function(e){return e.ttl})},getConferenceMaxParticipants:function(){return H.map(this.contractConference,function(e){return e.maxConferenceParticipants})},isGroupConfenreceEnalbed:function(){var e=H.map(this.contractConference,function(e){return e.groupConferenceEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},isTargetOfPlanAd:function(){return null!=this.quota&&this.quota.withAd},isFreePlan:function(){return null!=this.plan&&this.plan.free},__class__:nt};var it=function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=it.DEFAULT_MAX_PARTICIPANTS,this.ttl=it.DEFAULT_TTL,this.videoEnabled=!1,null!=e&&(this.videoEnabled=e.video_enabled,this.ttl=e.ttl,this.maxConferenceParticipants=e.max_conference_participants,this.groupConferenceEnabled=e.group_conference_enabled)};n["albero.entity.ContractConference"]=it,it.__name__=["albero","entity","ContractConference"],it.prototype={__class__:it};var rt=function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?ot.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=rt.getLabelRoot();break;case 2:this.name=rt.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};n["albero.entity.Department"]=rt,rt.__name__=["albero","entity","Department"],rt.getLabelFree=function(){return hr.localize("Department.label_free")},rt.getLabelRoot=function(){return hr.localize("Department.label_root")},rt.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==ot.Root},isFree:function(){return this.nodeType==ot.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return ot.Root;case 2:return ot.Free;default:return ot.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(U.idStr)},__class__:rt};var at=function(){};n["albero.entity.DepartmentHelper"]=at,at.__name__=["albero","entity","DepartmentHelper"],at.getName=function(e){return null==e?null:e.name};var ot=n["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};ot.Normal=["Normal",0],ot.Normal.toString=i,ot.Normal.__enum__=ot,ot.Root=["Root",1],ot.Root.toString=i,ot.Root.__enum__=ot,ot.Free=["Free",2],ot.Free.toString=i,ot.Free.__enum__=ot,ot.__empty_constructs__=[ot.Normal,ot.Root,ot.Free];var st=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};n["albero.entity.DepartmentList"]=st,st.__name__=["albero","entity","DepartmentList"],st.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new rt(e)})},__class__:st};var lt=function(){this.departmentMap=new ao,this.rootDepartmentIdMap=new ao};n["albero.entity.DepartmentStore"]=lt,lt.__name__=["albero","entity","DepartmentStore"],lt.prototype={getDepartment:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.departmentMap;return null!=Xo[t]?n.getReserved(t):n.h[t]},setDepartment:function(e){if(null!=e.parentId){var t=this.getDepartment(e.parentId);null!=t&&(t.addChild(e.id),e.depth=t.depth+1)}var n=e.id,i="_"+n.high+"_"+n.low,r=this.departmentMap;null!=Xo[i]?r.setReserved(i,e):r.h[i]=e},clearDomainDepartment:function(e){var t=this,n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap,r=null!=Xo[n]?i.getReserved(n):i.h[n];null!=r&&(c.iter(this.getDepartmentsDescendantOrSelf(r),function(e){var n=e.id;t.departmentMap.remove("_"+n.high+"_"+n.low)}),this.rootDepartmentIdMap.remove(n))},getRootDepartmentId:function(e){var t="_"+e.high+"_"+e.low,n=this.rootDepartmentIdMap;return null!=Xo[t]?n.getReserved(t):n.h[t]},setRootDepartmentId:function(e,t){var n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap;null!=Xo[n]?i.setReserved(n,t):i.h[n]=t},setDepartmentUserCount:function(e){var t=this.getDepartment(e.departmentId);null!=t&&(t.userCount=e,t.userCountLoading=!1)},setUserCountLoading:function(e,t){var n=this.getDepartment(e);null!=n&&(n.userCountLoading=t)},isUserCountLoadingRequired:function(e){var t=this.getDepartment(e);return null==t||null==t.userCount&&!t.userCountLoading},clearDomainDepartmentUsers:function(e){var t=this.getRootDepartmentId(e);return null!=t&&(c.iter(this.getDepartmentsDescendantOrSelf(t),function(e){e.userCount=null,e.userIds=null,e.userCountLoading=!1}),!0)},setDepartmentUsers:function(e,t){var n=this.getDepartment(e);null!=n&&(n.userIds=t)},getDepartmentPath:function(e){return this.getDepartmentsAncestorOrSelf(e)},getDepartmentPathWithoutRoot:function(e){return this.getDepartmentPath(e).filter(function(e){return!e.isRoot()})},getDepartmentsAncestorOrSelf:function(e){var t=[];return this._getDepartmentsAncestorOrSelf(e,t),t},_getDepartmentsAncestorOrSelf:function(e,t){var n=this.getDepartment(e);null!=n&&(null!=n.parentId&&this._getDepartmentsAncestorOrSelf(n.parentId,t),t.push(n))},getDepartmentsDescendantOrSelf:function(e){var t=[];return this._getDepartmentsDescendantOrSelf(e,t),t},_getDepartmentsDescendantOrSelf:function(e,t){var n=this,i=this.getDepartment(e);null!=i&&(t.push(i),null!=i.childrenIds&&c.iter(i.childrenIds,function(e){n._getDepartmentsDescendantOrSelf(e,t)}))},__class__:lt};var ut=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};n["albero.entity.DepartmentUserCount"]=ut,ut.__name__=["albero","entity","DepartmentUserCount"],ut.prototype={__class__:ut};var ct=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};n["albero.entity.DepartmentUserCountList"]=ct,ct.__name__=["albero","entity","DepartmentUserCountList"],ct.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new ut(e)})},__class__:ct};var _t=function(e,t){if(null!=e){if(this.id=U.fromIntOrInt64(e.direct_app_id),this.uniqueKey=e.unique_key,this.appUrl=e.app_url,this.locales=new ao,null!=e.locales)for(var n=0,i=v.fields(e.locales);n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){return!!j.isEmpty(e)||(j.isEmpty(this.canonicalDisplayName)&&(this.canonicalDisplayName=yr.canonicalize(this.displayName),dr.v("create canonical display name from %s to %s.",this.canonicalDisplayName,this.displayName)),this.canonicalDisplayName.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&this.canonicalPhoneticDisplayName.indexOf(e)>-1)},matchNameOrPhoneticRoman:function(e){return!!this.matchNameOrPhonetic(e)||(j.isEmpty(this.canonicalDisplayNameRoman)&&(this.canonicalDisplayNameRoman=yr.canonicalizeForRoman(this.displayName),dr.v("create canonical display name(roman) from %s to %s.",this.canonicalDisplayNameRoman,this.displayName)),this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(j.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=yr.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1))},__class__:bt});var kt=function(e){this.values=e};n["albero.entity.Domains"]=kt,kt.__name__=["albero","entity","Domains"],kt.prototype={orderByName:function(){var e=L.sortAndReturn(this.values.map(Dt.fromDomain),Dt.compare).map(Dt.toDomain);return new kt(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?io.None:c.fold(this.values,function(e,t){switch(H.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:za.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0})[1]){case 0:return H.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:za.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return io.Some(e)}},io.None)},getDirectAppsIds:function(){if(null==this.values||0==this.values.length)return[];var e=new ao;return c.iter(this.values,function(t){c.iter(t.directAppsSetting.enabled,function(t){var n="_"+t.high+"_"+t.low;null!=Xo[n]?e.setReserved(n,t):e.h[n]=t})}),B.toValueArray(e)},__class__:kt};var Dt=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=yr.canonicalize(this.name)};n["albero.entity.DomainForSort"]=Dt,Dt.__name__=["albero","entity","DomainForSort"],Dt.fromDomain=function(e){return new Dt(e)},Dt.toDomain=function(e){return e.domain},Dt.compare=function(e,t){var n=j.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:j.compare(e.name,t.name)},Dt.prototype={__class__:Dt};var Ct=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new Ot(e.get_headers))};n["albero.entity.DownloadAuth"]=Ct,Ct.__name__=["albero","entity","DownloadAuth"],Ct.prototype={__class__:Ct};var Ot=function(e){this.rawData=e};n["albero.entity.DownloadAuthHeaders"]=Ot,Ot.__name__=["albero","entity","DownloadAuthHeaders"],Ot.prototype={__class__:Ot};var Mt=function(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version)};n["albero.entity.FavoriteTalkEvent"]=Mt,Mt.__name__=["albero","entity","FavoriteTalkEvent"],Mt.prototype={__class__:Mt};var Ft=function(e){this.uploadResult=Rt.NONE,this.preview=io.None,this.thumbnailDimension=io.None,null!=e&&(this.attachmentId=e.attachment_id,this.messageId=e.message_id,this.talkId=e.talk_id,this.id=e.file_id,this.userId=e.user_id,this.name=e.name,this.contentType=e.content_type,this.contentSize=e.content_size,this.url=e.url,this.thumbUrl=e.thumbnail_url,this.updatedAt=e.updated_at,this.file=e.file,this.localThumbInfo=e.localThumbInfo,this.thumbnailDimension=io.None,this.deleted=null!=e.deleted&&e.deleted,this.previewSupported=null!=e.preview_supported&&e.preview_supported)};n["albero.entity.FileInfo"]=Ft,Ft.__name__=["albero","entity","FileInfo"],Ft.fromMessageAndFile=function(e,t){var n=new Ft;return n.messageId=e.id,n.talkId=e.talkId,n.userId=e.userId,n.updatedAt=e.createdAt,n.id=t.file_id,n.name=t.name,n.contentType=t.content_type,n.contentSize=t.content_size,n.url=t.url,n.thumbUrl=t.thumbnail_url,n.thumbnailDimension=null==t.thumbnail_dimension?io.None:io.Some(new si(t.thumbnail_dimension)),n.deleted=null!=t.deleted&&t.deleted,n.file=t.file,n.localThumbInfo=t.localThumbInfo,n.previewSupported=t.preview_supported,n},Ft.fromMessageAndFileWithFileId=function(e,t,n){var i=Ft.fromMessageAndFile(e,t);return i.id=n,i},Ft.createUploadedFileInfo=function(e){var t=new Ft;return t.id=e.id,t.contentType=e.content_type,t.contentSize=e.content_size,t.url=e.url,t.name=e.name,t},Ft.createStagedFileInfo=function(e,t,n){var i=t,r=new Ft,a=new hi(0,--Ft.stagedFileInfosMaxId);return r.id=a,r.talkId=e,null!=t&&(r.contentType=i.type,r.contentSize=i.size,r.addLocalFile(t),r.name=i.name),null!=n&&r.addLocalThumbInfo(n),r},Ft.createStagedFileInfoFromDummyFile=function(e,t,n){var i=new Ft,r=new hi(0,--Ft.stagedFileInfosMaxId);return i.id=r,i.talkId=e,null!=t&&(i.contentType=t.type,i.contentSize=t.size,i.file=t,i.name=t.name),null!=n&&i.addLocalThumbInfo(n),i},Ft.prototype={isRemote:function(){return null==this.file},isUploaded:function(){if(this.isRemote())return!0;switch(this.uploadResult[1]){case 0:return!0;case 1:case 2:return!1}},isUploadFailed:function(){if(this.isRemote())return!1;switch(this.uploadResult[1]){case 1:return!0;case 0:case 2:return!1}},setUploadResult:function(e){this.uploadResult=e},isNotUploaded:function(){return!this.isUploaded()},hasThumb:function(){return null!=this.thumbUrl||this.hasLocalThumbInfo()},hasLocalThumbInfo:function(){return null!=this.localThumbInfo},hasLocalFile:function(){return null!=this.file},hasUrl:function(){return null!=this.url},isImage:function(){return w.startsWith(this.contentType,"image/")},isImageGif:function(){return w.startsWith(this.contentType,"image/gif")},isImageJpeg:function(){return w.startsWith(this.contentType,"image/jpeg")},isPdf:function(){return w.startsWith(this.contentType,"application/pdf")},isVideo:function(){return w.startsWith(this.contentType,"video/")},canDisplayAsThumb:function(){return!!this.hasThumb()||this.isImage()},getNoThumbText:function(){return null!=this.name?this.name:this.url},getUploadedFileData:function(){if(null==this.file){var e={url:this.url,content_type:this.contentType,content_size:this.contentSize,name:this.name,file_id:this.id};return null!=this.thumbUrl&&(e.thumbnail_url=this.thumbUrl),H.isDefined(this.thumbnailDimension)&&(e.thumbnail_dimension=H.get(this.thumbnailDimension)),e}var t=this.uploadResult;switch(t[1]){case 0:return t[2];case 1:case 2:return dr.e("file not uploaded."),null}},addLocalFile:function(e){this.file=e},addLocalThumbInfo:function(e){this.localThumbInfo=e},getUploadableFilePack:function(){return{file:this.file,thumb:this.localThumbInfo}},__class__:Ft};var Rt=n["albero.entity.UploadResult"]={__ename__:["albero","entity","UploadResult"],__constructs__:["SUCCESS","FAILUER","NONE"]};Rt.SUCCESS=function(e){var t=["SUCCESS",0,e];return t.__enum__=Rt,t.toString=i,t},Rt.FAILUER=["FAILUER",1],Rt.FAILUER.toString=i,Rt.FAILUER.__enum__=Rt,Rt.NONE=["NONE",2],Rt.NONE.toString=i,Rt.NONE.__enum__=Rt,Rt.__empty_constructs__=[Rt.FAILUER,Rt.NONE];var xt=function(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])};n["albero.entity.FileInfoDeletion"]=xt,xt.__name__=["albero","entity","FileInfoDeletion"],xt.prototype={__class__:xt};var Ut=function(){this.fileInfoMap=new ao,this.fileIdStrsMap=new ao,this.messageFileIdStrsMap=new ao,this.noteFileIdStrsMap=new ao,this.filePreviewMap=new ao};n["albero.entity.FileInfoStore"]=Ut,Ut.__name__=["albero","entity","FileInfoStore"],Ut.prototype={ensureStagedFileInfos:function(e){return this.ensureStagedFileIdStrs(e).map(U.makeFromIdStr).filter(function(e){return null!=e}).map(Go(this,this.getFileInfo))},moveStagedFile:function(e,t,n){var i=this.ensureStagedFileIdStrs(e);if(null!=i){var r=i[t];u.remove(i,r),i.splice(n,0,r)}},ensureStagedFileIdStrs:function(e){var t=e.toString(),n=this.fileIdStrsMap,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null==i){i=[];var r=this.fileIdStrsMap;null!=Xo[t]?r.setReserved(t,i):r.h[t]=i}return i},addStagedFileInfo:function(e,t,n,i){var r=Ft.createStagedFileInfo(e,n,i),a=r.id,o="_"+a.high+"_"+a.low,s=this.fileInfoMap;null!=Xo[o]?s.setReserved(o,r):s.h[o]=r;var l=r.id,u="_"+l.high+"_"+l.low;return this.ensureStagedFileIdStrs(t).push(u),r},replaceStagedFileInfo:function(e,t,n,i){var r=Ft.createStagedFileInfo(e.talkId,n,i);return this.replaceStagedFileInfoFromFileId(e.id,t,r),r},replaceStagedFileInfoFromFileId:function(e,t,n){var i=n.id,r="_"+i.high+"_"+i.low,a=this.fileInfoMap;null!=Xo[r]?a.setReserved(r,n):a.h[r]=n;var o=this.ensureStagedFileIdStrs(t),s=o.indexOf("_"+e.high+"_"+e.low);if(-1!=s){o.splice(s,1);var l=n.id;o.splice(s,0,"_"+l.high+"_"+l.low),this.removeStagedFileInfo(t,e)}},restoreStagedFile:function(e,t){var n=t.id,i="_"+n.high+"_"+n.low,r=this.fileInfoMap;null!=Xo[i]?r.setReserved(i,t):r.h[i]=t;var a=t.id,o="_"+a.high+"_"+a.low;this.ensureStagedFileIdStrs(e).push(o)},removeStagedFileInfo:function(e,t){var n="_"+t.high+"_"+t.low;u.remove(this.ensureStagedFileIdStrs(e),n);var i=this.fileInfoMap;(null!=Xo[n]?i.getReserved(n):i.h[n]).isRemote()||this.fileInfoMap.remove(n)},removeStagedFileInfos:function(e){for(var t=0,n=this.ensureStagedFileIdStrs(e);t>t,e.high<<32-t|e.low>>>t):new hi(e.high>>31,e.high>>t-32)},Gt.subTimestampPart=function(e,t){var n=Gt.timestamp(e),i=Gt.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(za.ucompare(n.low,i.low)<0){r--;r|=0}return new hi(r,a)},Gt.createForTest=function(e){var t=Gt.TIMESTAMP_SHIFT;return 0==(t&=63)?new hi(e.high,e.low):t<32?new hi(e.high<>>32-t,e.low<0||this.credential.ttl0?this.content.text:"";case 7:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 13:return[this.content.question,hr.localize("MessageStringMaker.yes"),hr.localize("MessageStringMaker.no")].join(" ");case 14:return e&&null!=this.content.response?this.content.response?hr.localize("MessageStringMaker.yes"):hr.localize("MessageStringMaker.no"):"";case 15:return null!=this.content.options?y.string(this.content.question)+" "+y.string(this.content.options.join(" ")):this.content.question;case 16:return e&&null!=this.content.response&&null!=this.content.options&&this.content.options.length>this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,hr.localize("MessageStringMaker.achieve"),hr.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?hr.localize("MessageStringMaker.achieve"):hr.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&this.content.text.length>0)return this.content.text;break;case 7:return hr.localize("Message.bookmark_label_deleted");case 8:return[hr.localize("Message.bookmark_label_note_shared"),new Ui(this.content).title].join(" ");case 10:return[hr.localize("Message.bookmark_label_note_created"),new Ui(this.content).title].join(" ");case 11:return[hr.localize("Message.bookmark_label_note_updated"),new Ui(this.content).title].join(" ");case 2:case 12:if(null!=this.content.text&&this.content.text.length>0)return[hr.localize("Message.bookmark_label_stamp"),this.content.text].join(" ");break;case 14:case 16:return[hr.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 13:case 15:return[hr.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 17:return[hr.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 18:return[this.content.done?hr.localize("Message.bookmark_label_completed"):hr.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 19:case 20:return[hr.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 21:return[hr.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 8:case 10:case 11:return new Ui(this.content);default:return null}},messageStringRaw:function(){switch(this.type[1]){case 0:return"";case 1:return this.content;case 3:case 4:return"";case 5:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 8:case 9:case 10:case 11:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 14:case 16:return"";case 13:case 15:return this.content.question;case 17:return this.content.title;case 18:return"";case 19:case 20:case 21:case 22:default:return""}},getContentsForNoteDelete:function(){return 9==this.type[1]?new Pi(this.content):null},getContentsForOriginalStamp:function(){return 12==this.type[1]?new Li(this.content):null},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()},isAllowedToShowSelectionMessageMenu:function(){return!(this.type!=Qt.text&&!this.isStampMessageWithText())||this.isTextMultipleFileWithText()},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()},isMatchCategory:function(e){switch(e[1]){case 0:return!!(this.isTextMessage()||this.isFileMessage()||this.isTextMultipleFile())||this.isStampMessageWithText();case 1:return!1}},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==Qt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==Qt.yesOrNo||this.type==Qt.yesOrNoReply||this.type==Qt.selectOne||this.type==Qt.selectOneReply||this.type==Qt.todo||this.type==Qt.todoDone||this.type==Qt.yesOrNoClosed||this.type==Qt.selectOneClosed||this.type==Qt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==Qt.selectOneReply||this.type==Qt.yesOrNoReply||this.type==Qt.todoDone},isClosedActionStampMessage:function(){return this.type==Qt.yesOrNoClosed||this.type==Qt.selectOneClosed||this.type==Qt.todoClosed},isTextMultipleFile:function(){return this.type==Qt.textMultipleFile},isSendingActionStampMessage:function(){return this.type==Qt.yesOrNo||this.type==Qt.selectOne||this.type==Qt.todo},isNoteMessage:function(){return this.type==Qt.noteShared||this.type==Qt.noteDeleted||this.type==Qt.noteCreated||this.type==Qt.noteUpdated},isNoteDeletedMessage:function(){return this.type==Qt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==Qt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==Qt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==Qt.stamp||this.type==Qt.originalStamp},isNotStampMessage:function(){return!this.isStampMessage()},isStampMessageWithText:function(){return!!this.isStampMessage()&&this.isNotObjectWithEmptyText()},isStampMessageWithEmptyText:function(){return!!this.isStampMessage()&&this.isObjectWithEmptyText()},isNotStampMessageWithEmptyText:function(){return!!this.isNotStampMessage()||this.isNotObjectWithEmptyText()},isObjectWithEmptyText:function(){return j.isEmpty(this.content.text)},isNotObjectWithEmptyText:function(){return!this.isObjectWithEmptyText()},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==Qt.text},isOpenConference:function(){return this.type==Qt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){return dr.i(this.type),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?io.Some(this.content.in_reply_to):io.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 U.notContains(t.readUserIds,e)});this.readUserIds=this.readUserIds.concat(n).slice(0,16)}},createReadCountText:function(){return this.readUserIds.length>=16?"15+":y.string(this.readUserIds.length)},hasNoReadUsers:function(){return 0==this.readUserIds.length},deleteFile:function(e){var t;switch(this.type[1]){case 4:t=[this.content];break;case 5:t=this.content.files;break;default:t=[]}if(0!=t.length){var n=c.find(t,function(t){var n=t.file_id,i=e.fileId;return null!=n&&null!=i&&n.high==i.high&&n.low==i.low});null!=n&&(n.deleted=!0)}},getQuestionTitle:function(){switch(this.type[1]){case 17:case 18:case 21:return null==this.content.title?"":this.content.title;case 13:case 14:case 15:case 16:case 19:case 20:return null==this.content.question?"":this.content.question;default:return""}},getChoiceCloseResponse:function(e){var t=hr.localize("QuestionHelper.close_answer")+"\n";if(null==this.content.responses)t+="...";else{var n=this.content.responses,i=this.content.last_response;if(0==Sn.closingTypeOf(this.content.closing_type)[1])t+=null!=i?hr.localize("QuestionHelper.last_response",{content:e(n[i].content),interpolation:{escapeValue:!1}}):hr.localize("QuestionHelper.no_answer");else{t+=null!=i?null==n?"":n.map(function(t){var n=null==t.count?0:t.count;return e(t.content)+": "+n+hr.localize("QuestionHelper.name")}).join("\n"):hr.localize("QuestionHelper.no_answer")}}return t},getTodoCloseResponse:function(){var e=hr.localize("QuestionHelper.close_task")+"\n";if(null==this.content.responses)e+="...";else{var t=this.content.responses,n=this.content.last_response;if(0==Sn.closingTypeOf(this.content.closing_type)[1]){e+=null!=n&&"DONE"==t[n].content?hr.localize("QuestionHelper.achieve_task"):hr.localize("QuestionHelper.not_achieve_task")}else{var i=0;if(null!=t)for(var r=0;r=0?n:1)>0}return!1},timeOveredOrNotExist:function(e,t){return null==e||this.timeOvered(e,t)},__class__:on};var sn=function(e){null!=e&&(this.name=e.plan_name,this.trial=!!e.trial,this.free=!!e.free)};n["albero.entity.Plan"]=sn,sn.__name__=["albero","entity","Plan"],sn.prototype={__class__:sn};var ln=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=vo.__cast(e.item_values,Array).map(function(e){return new _n(e)})))};n["albero.entity.Profile"]=ln,ln.__name__=["albero","entity","Profile"],ln.prototype={__class__:ln};var un=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=vo.__cast(e.item_definitions,Array);t=0?o:1)>0&&(this.updatedAt=i,this.maxResponseId=t,this.lastResponse=e,this.lastResponseUserId=n)},__class__:pn};var gn=n["albero.entity.QuestionFromType"]={__ename__:["albero","entity","QuestionFromType"],__constructs__:["fromSelf","fromOther"]};gn.fromSelf=["fromSelf",0],gn.fromSelf.toString=i,gn.fromSelf.__enum__=gn,gn.fromOther=["fromOther",1],gn.fromOther.toString=i,gn.fromOther.__enum__=gn,gn.__empty_constructs__=[gn.fromSelf,gn.fromOther];var vn=n["albero.entity.QuestionFilter"]={__ename__:["albero","entity","QuestionFilter"],__constructs__:["onlyClosed","onlyUnclosed","noFilter"]};vn.onlyClosed=["onlyClosed",0],vn.onlyClosed.toString=i,vn.onlyClosed.__enum__=vn,vn.onlyUnclosed=["onlyUnclosed",1],vn.onlyUnclosed.toString=i,vn.onlyUnclosed.__enum__=vn,vn.noFilter=["noFilter",2],vn.noFilter.toString=i,vn.noFilter.__enum__=vn,vn.__empty_constructs__=[vn.onlyClosed,vn.onlyUnclosed,vn.noFilter];var yn=n["albero.entity.QuestionClosingType"]={__ename__:["albero","entity","QuestionClosingType"],__constructs__:["any","all","unknown"]};yn.any=["any",0],yn.any.toString=i,yn.any.__enum__=yn,yn.all=["all",1],yn.all.toString=i,yn.all.__enum__=yn,yn.unknown=["unknown",2],yn.unknown.toString=i,yn.unknown.__enum__=yn,yn.__empty_constructs__=[yn.any,yn.all,yn.unknown];var Sn=function(){};n["albero.entity.QuestionClosingTypeHelper"]=Sn,Sn.__name__=["albero","entity","QuestionClosingTypeHelper"],Sn.closingTypeOf=function(e){switch(e){case 0:return yn.any;case 1:return yn.all;default:return yn.unknown}};var wn=function(e){this.content=e.content,this.count=null==e.count?0:e.count,this.userIds=null==e.user_ids?[]:e.user_ids};n["albero.entity.QuestionResponse"]=wn,wn.__name__=["albero","entity","QuestionResponse"],wn.prototype={add:function(e){this.contains(e)||(this.count+=1,this.userIds=this.userIds.concat([e]))},sub:function(e){this.contains(e)&&(this.count-=1,this.userIds=this.userIds.filter(function(t){return!(e.high==t.high&&e.low==t.low)}))},contains:function(e){return U.contains(this.userIds,e)},__class__:wn};var In=function(){this.questions=new ao};n["albero.entity.QuestionStore"]=In,In.__name__=["albero","entity","QuestionStore"],In.prototype={removeTalkQuestions:function(e){for(var t=this.getQuestions(e),n=0;n>>16,s=65535&t.low,l=t.low>>>16,u=za._mul(a,s),c=za._mul(o,s),_=za._mul(a,l),h=u,d=(za._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,za.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,za.ucompare(h,c)<0){d++;d|=0}d=d+(za._mul(e.low,t.high)+za._mul(e.high,t.low)|0)|0;var f=new hi(d,h),m=new hi(0,y.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(za.ucompare(g,f.low)<0){p++;p|=0}e=new hi(p,g)}return e},__class__:Ln};var Bn=function(e,t,n){this.stampsetId=e,this.id=t,this.illust=n};n["albero.entity.OriginalStamp"]=Bn,Bn.__name__=["albero","entity","OriginalStamp"],Bn.__interfaces__=[Pn],Bn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=U.makeFromIdStr(t.stampsetIdStr),i=U.makeFromIdStr(t.stampIdStr);return new Bn(n,i,t.illust)},Bn.fromPropsAndStampsetId=function(e,t){return new Bn(t,U.fromIntOrInt64(e.id),e.illust)},Bn.createKey=function(e){return"original__"+e.high+"_"+e.low},Bn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return Bn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new qt;return n.talkId=e,n.type=Qt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:Bn};var Hn=function(){this.stampsetStore=new ao,this.stampStore=new ao,this.stampKeyCategoryIdMap=new ao};n["albero.entity.StampStore"]=Hn,Hn.__name__=["albero","entity","StampStore"],Hn.prototype={addStampsets:function(e){for(var t=0;te.version},__class__:jn};var Yn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(U.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};n["albero.entity.StampsetSetting"]=Yn,Yn.__name__=["albero","entity","StampsetSetting"],Yn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new jn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(e){return null!=this.allowCreateMessageStampsetIds&&c.exists(this.allowCreateMessageStampsetIds,function(t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low})},containVisibleStampset:function(e){return c.exists(this.stampsetInfos,function(t){var n=t.stampsetId;return null!=e&&null!=n&&e.high==n.high&&e.low==n.low})},getSendableStampsetInfos:function(){var e=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(t){return e.containSendableStampset(t.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.map(function(t){return e.eqStampsetId(t)&&e.isNewerThan(t)?e:t})},deleteStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.filter(function(t){var n=t.stampsetId;return!(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(t){return!(null!=t&&null!=e&&t.high==e.high&&t.low==e.low)})},getStampsetIdsDiff:function(e){for(var t=new ao,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=0?r:1},Xn.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__:Xn};var Zn=function(e,t){this.paneType=e,this.talkSelection=t};n["albero.entity.TalkPaneSelection"]=Zn,Zn.__name__=["albero","entity","TalkPaneSelection"],Zn.createArrayForMultiPanes=function(e){return c.mapi(e,function(e,t){return new Zn(an.getMultiPaneType(e),t)})},Zn.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return Y.talks(e,z.single(this.talkSelection));case 1:var n=Go(t,t.getTalkSelection),i=e,r=an.getMultiPaneTypes().map(function(e){return n(i,e)});return r[0]=this.talkSelection,Y.talks(e,z.multi(r));case 2:var a=Go(t,t.getTalkSelection),o=e,s=an.getMultiPaneTypes().map(function(e){return a(o,e)});return s[1]=this.talkSelection,Y.talks(e,z.multi(s));case 3:var l=Go(t,t.getTalkSelection),u=e,c=an.getMultiPaneTypes().map(function(e){return l(u,e)});return c[2]=this.talkSelection,Y.talks(e,z.multi(c))}},getTalkIdOrNull:function(){return ni.getTalkIdOrNull(this.talkSelection)},__class__:Zn};var $n=function(){};n["albero.entity.ITalkSelectionGetter"]=$n,$n.__name__=["albero","entity","ITalkSelectionGetter"],$n.prototype={__class__:$n};var ei=function(e,t){this.domainId=e.domain_id,this.talkId=e.talk_id,this.type=t?fn.fromRawValue(e.type):mn.None,this.version=e.version};n["albero.entity.TalkPushNotificationEvent"]=ei,ei.__name__=["albero","entity","TalkPushNotificationEvent"],ei.prototype={__class__:ei};var ti=n["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};ti.NotSelected=["NotSelected",0],ti.NotSelected.toString=i,ti.NotSelected.__enum__=ti,ti.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=ti,n.toString=i,n},ti.AnnouncementsSelected=["AnnouncementsSelected",2],ti.AnnouncementsSelected.toString=i,ti.AnnouncementsSelected.__enum__=ti,ti.__empty_constructs__=[ti.NotSelected,ti.AnnouncementsSelected];var ni=function(){};n["albero.entity.TalkSelectionHelper"]=ni,ni.__name__=["albero","entity","TalkSelectionHelper"],ni.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=ni.getTalkIdOrNull(e),r=ni.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=ni.getMessageIdOrNull(e),o=ni.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},ni.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:e[3];var n=e[2],i=H.orNull(Jn.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==Qn.annoucements}},ni.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},ni.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return H.orNull(t);case 2:return null}},ni.toTalkSelectionStr=function(e){switch(e[1]){case 0:return"";case 1:var t=e[2];return"_"+t.high+"_"+t.low;case 2:return"announcement"}};var ii=function(e){this.unreadMentionCount=0,this.unreadCount=0,null!=e?(this.id=e.talk_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.unreadMentionCount=null!=e.unread_mention_count?e.unread_mention_count:0,this.maxMessageId=e.max_message_id,null!=e.max_message?this.maxMessage=new qt(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 dn(e.push_notification)):this.pushNotificationSetting=new dn};n["albero.entity.TalkStatus"]=ii,ii.__name__=["albero","entity","TalkStatus"],ii.prototype={update:function(e){var t=this,n=!1;return this.needIdUpdate(this.maxEveryoneReadMessageId,e.maxEveryoneReadMessageId)&&(this.maxEveryoneReadMessageId=e.maxEveryoneReadMessageId,n=!0),H.foreach(e.maxReadMessageId,function(e){t.needIdUpdate(t.maxReadMessageId,e)&&(t.maxReadMessageId=e,n=!0)}),n},updateByMessageDeletion:function(e){var t=!1;return this.isUnread(e.messageId)&&(this.decrementUnreadCount(1),e.isMention&&this.decrementUnreadMentionCount(1),t=!0),this.isMax(e.messageId)&&(null!=this.maxMessage&&(this.maxMessage.type=Qt.deleted),t=!0),t},updateByMessageReadStatusesUpdate:function(e){var t=e.messageIds,n=e.mentionMessageIds,i=t.filter(Go(this,this.isUnread));if(0==i.length)return!1;for(var r=i[0],a=0;a=0?s:1)<0&&(r=o),U.notContains(e.messageIdsExcludingUnreadCountTargets,o)&&(this.decrementUnreadCount(1),U.contains(n,o)&&this.decrementUnreadMentionCount(1))}return this.maxReadMessageId=r,!0},needIdUpdate:function(e,t){if(null!=t){if(null!=e){var n=e.high-t.high|0;return n=0!=n?n:za.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,n){this.maxReadMessageId=e,this.decrementUnreadCount(t),this.decrementUnreadMentionCount(n)},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},decrementUnreadMentionCount:function(e){this.unreadMentionCount-=e,this.unreadMentionCount<0&&(this.unreadMentionCount=0)},readAll:function(){this.maxReadMessageId=this.maxMessageId,this.unreadCount=0,this.unreadMentionCount=0},updateByMessage:function(e,t){this.isNewMax(e.id)&&(this.maxMessageId=e.id,this.maxMessage=e),e.isUnreadCountTarget&&(t?this.isUnread(e.id)&&this.readAll():(this.unreadCount++,e.mention&&this.unreadMentionCount++),this.talkOrderingTimestamp=e.createdAt)},updateByReadingMessages:function(e,t){var n=this;if(null==e||this.canRegardTalkReadCountZero(e)){if(!ri.isUnreadMesasgeExisted(this))return!1;if(null==this.maxMessageId)return!1;this.readAll()}else{var i=e.filter(function(e){return n.isUnread(e.id)});if(0==i.length)return!1;var r=i[i.length-1].id,a=i.filter(function(e){if(e.isUnreadCountTarget){var n=e.userId;return!(null!=n&&null!=t&&n.high==t.high&&n.low==t.low)}return!1}),o=a.filter(function(e){return e.mention});this.read(r,a.length,o.length)}return!0},updateByTalkPushNotificationEvent:function(e){return e.version>this.pushNotificationSetting.version&&(this.pushNotificationSetting=dn.createWithParams(e.type,e.version),!0)},canRegardTalkReadCountZero:function(e){var t=this.maxMessageId,n=H.orNull(L.lastOption(e.map(function(e){return e.id})));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},isMessageAcceptable:function(e,t){if(this.isUnread(e.id))return!0;var n=Gt.subTimestampPart(this.maxReadMessageId,e.id),i=n.high-t.high|0;return i=0!=i?i:za.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<=0},isUnread:function(e){if(null!=this.maxReadMessageId){var t=this.maxReadMessageId,n=t.high-e.high|0;return n=0!=n?n:za.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId,n=t.high-e.high|0;return n=0!=n?n:za.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isNotificationDisabled:function(){return this.pushNotificationSetting.isDisabled()},getNotificationType:function(){return this.pushNotificationSetting.type},__class__:ii};var ri=function(){};n["albero.entity.TalkStatusHelper"]=ri,ri.__name__=["albero","entity","TalkStatusHelper"],ri.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},ri.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},ri.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&e.isUnread(e.maxMessage.id))};var ai=function(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=H.option(e.max_read_message_id))};n["albero.entity.TalkStatusUpdate"]=ai,ai.__name__=["albero","entity","TalkStatusUpdate"],ai.prototype={__class__:ai};var oi=function(e,t,n){this.file=e,this.dimension=si.createWithSize(t,n),this.auth=null};n["albero.entity.ThumbInfo"]=oi,oi.__name__=["albero","entity","ThumbInfo"],oi.prototype={setAuth:function(e){this.auth=e},__class__:oi};var si=function(e){null!=e&&(this.width=e.width,this.height=e.height)};n["albero.entity.ThumbDimension"]=si,si.__name__=["albero","entity","ThumbDimension"],si.createWithSize=function(e,t){var n=new si;return n.width=e,n.height=t,n},si.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:si};var li=function(e,t,n){var i=new hi(0,0);this.domainId=i,this.domainId=e,this.oldSetting=t,this.newSetting=n};n["albero.entity.UpdateDomainStampSettingEvent"]=li,li.__name__=["albero","entity","UpdateDomainStampSettingEvent"],li.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:li};var ui=n["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL"]};ui.PROFILE_IMAGE=["PROFILE_IMAGE",0],ui.PROFILE_IMAGE.toString=i,ui.PROFILE_IMAGE.__enum__=ui,ui.MESSAGE=["MESSAGE",1],ui.MESSAGE.toString=i,ui.MESSAGE.__enum__=ui,ui.TALK_ICON=["TALK_ICON",2],ui.TALK_ICON.toString=i,ui.TALK_ICON.__enum__=ui,ui.THUMBNAIL=["THUMBNAIL",3],ui.THUMBNAIL.toString=i,ui.THUMBNAIL.__enum__=ui,ui.NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],ui.NOTE_ATTACHMENT.toString=i,ui.NOTE_ATTACHMENT.__enum__=ui,ui.NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],ui.NOTE_THUMBNAIL.toString=i,ui.NOTE_THUMBNAIL.__enum__=ui,ui.__empty_constructs__=[ui.PROFILE_IMAGE,ui.MESSAGE,ui.TALK_ICON,ui.THUMBNAIL,ui.NOTE_ATTACHMENT,ui.NOTE_THUMBNAIL];var ci=function(){};n["albero.entity.UploadUseTypeHelper"]=ci,ci.__name__=["albero","entity","UploadUseTypeHelper"],ci.getUseTypeInt=function(e){switch(e[1]){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4;case 4:return 5;case 5:return 6}};var _i=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))};n["albero.entity.UserIdentifier"]=_i,_i.__name__=["albero","entity","UserIdentifier"],_i.prototype={__class__:_i};var hi=function(e,t){this.high=e,this.low=t};n["haxe._Int64.___Int64"]=hi,hi.__name__=["haxe","_Int64","___Int64"],hi.prototype={__class__:hi};var di=function(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=H.option(e.last_used_at))};n["albero.entity.UserPresence"]=di,di.__name__=["albero","entity","UserPresence"],di.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(za.ucompare(t.low,e.low)<0){n--;n|=0}var r=new hi(n,i),a=di.SIXTY_MINUTES,o=r.high-a.high|0;if(o=0!=o?o:za.ucompare(r.low,a.low),(r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0)return fi.GT_60;var s=di.FIFTEEN_MINUTES,l=r.high-s.high|0;return l=0!=l?l:za.ucompare(r.low,s.low),(r.high<0?s.high<0?l:-1:s.high>=0?l:1)>0?fi.LT_OR_EQ_60:fi.LT_OR_EQ_15},di.prototype={toState:function(e){var t=e,n=H.map(this.lastUsedAtOpt,function(e){return di.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return fi.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(za.ucompare(e.low,n.low)<0){i--;i|=0}var a=new hi(i,r),o=a.high-t.high|0;return o=0!=o?o:za.ucompare(a.low,t.low),(a.high<0?t.high<0?o:-1:t.high>=0?o:1)>0},__class__:di};var fi=n["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};fi.LT_OR_EQ_15=["LT_OR_EQ_15",0],fi.LT_OR_EQ_15.toString=i,fi.LT_OR_EQ_15.__enum__=fi,fi.LT_OR_EQ_60=["LT_OR_EQ_60",1],fi.LT_OR_EQ_60.toString=i,fi.LT_OR_EQ_60.__enum__=fi,fi.GT_60=["GT_60",2],fi.GT_60.toString=i,fi.GT_60.__enum__=fi,fi.__empty_constructs__=[fi.LT_OR_EQ_15,fi.LT_OR_EQ_60,fi.GT_60];var mi=function(e){this.success=e};n["albero.entity.api.message.AddFavoriteMessageResult"]=mi,mi.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],mi.prototype={__class__:mi};var pi=function(e){this.success=e};n["albero.entity.api.message.DeleteFavoriteMessageResult"]=pi,pi.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],pi.prototype={__class__:pi};var gi=function(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r};n["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=gi,gi.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],gi.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:gi};var vi=function(e,t){var n=this;c.iter(t,function(t){var i=new yi(t),r=i.createdAt,a=e.high-r.high|0;a=0!=a?a:za.ucompare(e.low,r.low),(e.high<0?r.high<0?a:-1:r.high>=0?a:1)<0?n.messageCreatedAtNew=i:n.messageCreatedAtOld=i})};n["albero.entity.api.message.SearchMessagesAroundDateTimeResult"]=vi,vi.__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],vi.prototype={__class__:vi};var yi=function(e){this.messageId=e.message_id,this.createdAt=e.created_at};n["albero.entity.api.message.MessageCreatedAt"]=yi,yi.__name__=["albero","entity","api","message","MessageCreatedAt"],yi.prototype={__class__:yi};var Si=function(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n};n["albero.entity.api.note.CreateNoteError"]=Si,Si.__name__=["albero","entity","api","note","CreateNoteError"],Si.prototype={__class__:Si};var wi=function(e){this.note=new Yi(e),this.emitterKey=null};n["albero.entity.api.note.CreateNoteResult"]=wi,wi.__name__=["albero","entity","api","note","CreateNoteResult"],wi.prototype={updateWithEmitterKey:function(e){var t=new wi;return t.note=this.note,t.emitterKey=e,t},__class__:wi};var Ii=function(e){this.result=e};n["albero.entity.api.note.DeleteNoteResult"]=Ii,Ii.__name__=["albero","entity","api","note","DeleteNoteResult"],Ii.prototype={__class__:Ii};var Ti=function(e){this.note=new Yi(e)};n["albero.entity.api.note.GetNoteResult"]=Ti,Ti.__name__=["albero","entity","api","note","GetNoteResult"],Ti.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()},getLockedUserIdWithoutSelf:function(e){return this.note.getLockedUserIdWithoutSelf(e)},__class__:Ti};var Ni=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=L.asArray(e.contents).map(function(e){return new ar(e)}))};n["albero.entity.api.note.GetNoteStatusesResult"]=Ni,Ni.__name__=["albero","entity","api","note","GetNoteStatusesResult"],Ni.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:Ni};var Ei=function(e){this.note=new Yi(e)};n["albero.entity.api.note.UpdateNoteResult"]=Ei,Ei.__name__=["albero","entity","api","note","UpdateNoteResult"],Ei.prototype={__class__:Ei};var Ai=function(e){this.note=new Yi(e)};n["albero.entity.api.note.UpdateNoteSettingResult"]=Ai,Ai.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],Ai.prototype={__class__:Ai};var bi=function(){};n["albero.entity.file.DummyFileUtil"]=bi,bi.__name__=["albero","entity","file","DummyFileUtil"],bi.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob};var ki=function(e){null!=e&&(this.fileId=e.file_id,this.status=e.status,this.filePreviewFileId=e.file_preview_file_id,this.url=e.url,this.key=e.key)};n["albero.entity.file.FilePreview"]=ki,ki.__name__=["albero","entity","file","FilePreview"],ki.prototype={__class__:ki};var Di=function(){};n["albero.entity.file.StageType"]=Di,Di.__name__=["albero","entity","file","StageType"],Di.prototype={__class__:Di};var Ci=function(e,t){this.talkId=e,this.paneType=t};n["albero.entity.file.StageTypeTalk"]=Ci,Ci.__name__=["albero","entity","file","StageTypeTalk"],Ci.__interfaces__=[Di],Ci.prototype={toString:function(){var e=this.talkId;return"staged__"+e.high+"_"+e.low+an.toPanePrefix(this.paneType)},isForPane:function(e){return this.paneType==e},isForNote:function(){return!1},isForPreview:function(){return!1},__class__:Ci};var Oi=function(){};n["albero.entity.file.StageTypeNote"]=Oi,Oi.__name__=["albero","entity","file","StageTypeNote"],Oi.__interfaces__=[Di],Oi.prototype={toString:function(){return"staged_note_"},isForPane:function(e){return!1},isForNote:function(){return!0},isForPreview:function(){return!1},__class__:Oi};var Mi=function(){};n["albero.entity.message.IFavoriteMessageEvent"]=Mi,Mi.__name__=["albero","entity","message","IFavoriteMessageEvent"],Mi.prototype={__class__:Mi};var Fi=function(e){this.message=new qt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.AddFavoriteMessageEvent"]=Fi,Fi.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Fi.__interfaces__=[Mi],Fi.prototype={getMessage:function(){return this.message},getMessageId:function(){return this.message.id},isFavorite:function(){return!0},getDomainId:function(){return this.domainId},getTalkId:function(){return this.talkId},__class__:Fi};var Ri=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.DeleteFavoriteMessageEvent"]=Ri,Ri.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Ri.__interfaces__=[Mi],Ri.prototype={getMessageId:function(){return this.messageId},isFavorite:function(){return!1},__class__:Ri};var xi=function(){};n["albero.entity.message.IMessageContentForActionReply"]=xi,xi.__name__=["albero","entity","message","IMessageContentForActionReply"],xi.prototype={__class__:xi};var Ui=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.title=e.title,this.revision=e.revision,this.deleted=e.deleted,this.hasAttachments=!!e.has_attachments)};n["albero.entity.message.MessageContentForNote"]=Ui,Ui.__name__=["albero","entity","message","MessageContentForNote"],Ui.prototype={__class__:Ui};var Pi=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.title=e.title)};n["albero.entity.message.MessageContentForNoteDeleted"]=Pi,Pi.__name__=["albero","entity","message","MessageContentForNoteDeleted"],Pi.prototype={__class__:Pi};var Li=function(e){this.text=io.None,this.stampsetId=U.fromIntOrInt64(e.stampset_id),this.stampId=U.fromIntOrInt64(e.stamp_id),null!=e.text&&(this.text=io.Some(e.text))};n["albero.entity.message.MessageContentForOriginalStamp"]=Li,Li.__name__=["albero","entity","message","MessageContentForOriginalStamp"],Li.prototype={hasValidText:function(){return H.isDefined(this.getValidText())},getValidText:function(){return H.filter(this.text,j.isNotEmpty)},__class__:Li};var Bi=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.options=e.options,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForSelectOneReply"]=Bi,Bi.__name__=["albero","entity","message","MessageContentForSelectOneReply"],Bi.__interfaces__=[xi],Bi.prototype={getResponseIndex:function(){return this.response},__class__:Bi};var Hi=function(e){this.inReplyTo=e.in_reply_to,this.title=e.title,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.done=e.done,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForTodoReply"]=Hi,Hi.__name__=["albero","entity","message","MessageContentForTodoReply"],Hi.__interfaces__=[xi],Hi.prototype={getResponseIndex:function(){return this.done?0:1},__class__:Hi};var Gi=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.question=e.question,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForYesNoReply"]=Gi,Gi.__name__=["albero","entity","message","MessageContentForYesNoReply"],Gi.__interfaces__=[xi],Gi.prototype={getResponseIndex:function(){return this.response?0:1},__class__:Gi};var ji=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};n["albero.entity.message.MessageFavorite"]=ji,ji.__name__=["albero","entity","message","MessageFavorite"],ji.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:ji};var Yi=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new rr(e.setting),this.noteRevision=new nr(e.note_revision),this.noteLocked=new $i(e.locked))};n["albero.entity.note.Note"]=Yi,Yi.__name__=["albero","entity","note","Note"],Yi.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)},lock:function(e,t,n,i){this.noteRevision.revision==e&&this.noteLocked.lock(t,n,i)},unlock:function(e,t){this.noteRevision.revision==e&&this.noteLocked.unlock(t)},getLockedUserIdWithoutSelf:function(e){return this.noteLocked.getLockedUserIdWithoutSelf(e)},isSameTalkId:function(e){var t=this.talkId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low},__class__:Yi};var zi=n["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT","FILES"]};zi.TEXT=["TEXT",0],zi.TEXT.toString=i,zi.TEXT.__enum__=zi,zi.FILES=["FILES",1],zi.FILES.toString=i,zi.FILES.__enum__=zi,zi.__empty_constructs__=[zi.TEXT,zi.FILES];var Wi=function(){};n["albero.entity.note.NoteContentTypeHelper"]=Wi,Wi.__name__=["albero","entity","note","NoteContentTypeHelper"],Wi.createNoteContentType=function(e){if(null==e)return dr.e("no value."),null;switch(e){case 1:return zi.TEXT;case 5:return zi.FILES;default:return dr.e("value is not expected."),null}},Wi.getValue=function(e){if(null==e)return dr.e("no content type."),null;switch(e[1]){case 0:return 1;case 1:return 5}};var Ki=function(e){this.value=e};n["albero.entity.note.NoteId"]=Ki,Ki.__name__=["albero","entity","note","NoteId"],Ki.__interfaces__=[jt],Ki.createDummyId=function(){var e,t=Ki.nextDummyId,n=Ki.nextDummyId;if(null==n)e=null;else{var i=new hi(0,1),r=n.high-i.high|0,a=n.low-i.low|0;if(za.ucompare(n.low,i.low)<0){r--;r|=0}e=new hi(r,a)}return Ki.nextDummyId=e,new Ki(t)},Ki.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()},isDummy:function(){return this.value.high<0},__class__:Ki};var Vi=function(e,t,n,i,r,a,o){this.state=qi.SENDING,this.talkId=e,this.noteId=t,this.title=n,this.text=i,this.fileInfos=r,this.emitterKey=a,this.createMessage=null==o||o};n["albero.entity.note.NoteLocalEdit"]=Vi,Vi.__name__=["albero","entity","note","NoteLocalEdit"],Vi.prototype={hasEmitterKey:function(){return null!=this.emitterKey},getEmitterKey:function(){return this.emitterKey},setState:function(e){this.state=e},getTalkId:function(){return this.talkId},getNoteId:function(){return this.noteId},getTitle:function(){return this.title},getText:function(){return this.text},getContent:function(){switch(this.getContentType()[1]){case 0:return this.text;case 1:return{files:this.getUploadedFilesData(),text:null==this.text?"":this.text}}},getFileInfos:function(){return this.fileInfos},getState:function(){return this.state},isSending:function(){return this.state==qi.SENDING},isFailed:function(){switch(this.state[1]){case 0:case 6:return!1;case 1:case 2:case 3:case 4:case 5:return!0}},isForCreate:function(){return this.noteId.isDummy()},canNotSend:function(){return 0!=this.getUnuploadedFileInfos().length},getContentType:function(){return this.fileInfos.length>0?zi.FILES:zi.TEXT},getUnuploadedFileInfos:function(){return this.fileInfos.filter(function(e){return e.isNotUploaded()})},getUploadedFilesData:function(){return this.fileInfos.map(function(e){return e.getUploadedFileData()}).filter(function(e){return null!=e})},createNoteRevisionSummary:function(e){var t=new ir;return t.revision=0,t.contentType=this.getContentType(),t.title=this.title,t.contentSummary=this.text,t.createdBy=e,t.createdAt=M.nowAsInt64(),t.contentFiles=this.fileInfos,t},conflict:function(){this.state=qi.FAILED_BY_CONFLICT},deleted:function(){this.state=qi.FAILED_BY_NOT_FOUND},getCreateMessage:function(){return this.createMessage},__class__:Vi};var qi=n["albero.entity.note.NoteLocalEditState"]={__ename__:["albero","entity","note","NoteLocalEditState"],__constructs__:["SENDING","FAILED_BY_CONFLICT","FAILED_BY_NOT_FOUND","FAILED_BY_NOT_FOUND_FORWARDING","FAILED_BY_FILE","FAILED_BY_UNKNOWN","COMPLETED"]};qi.SENDING=["SENDING",0],qi.SENDING.toString=i,qi.SENDING.__enum__=qi,qi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",1],qi.FAILED_BY_CONFLICT.toString=i,qi.FAILED_BY_CONFLICT.__enum__=qi,qi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],qi.FAILED_BY_NOT_FOUND.toString=i,qi.FAILED_BY_NOT_FOUND.__enum__=qi,qi.FAILED_BY_NOT_FOUND_FORWARDING=["FAILED_BY_NOT_FOUND_FORWARDING",3],qi.FAILED_BY_NOT_FOUND_FORWARDING.toString=i,qi.FAILED_BY_NOT_FOUND_FORWARDING.__enum__=qi,qi.FAILED_BY_FILE=function(e,t){var n=["FAILED_BY_FILE",4,e,t];return n.__enum__=qi,n.toString=i,n},qi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",5],qi.FAILED_BY_UNKNOWN.toString=i,qi.FAILED_BY_UNKNOWN.__enum__=qi,qi.COMPLETED=["COMPLETED",6],qi.COMPLETED.toString=i,qi.COMPLETED.__enum__=qi,qi.__empty_constructs__=[qi.SENDING,qi.FAILED_BY_CONFLICT,qi.FAILED_BY_NOT_FOUND,qi.FAILED_BY_NOT_FOUND_FORWARDING,qi.FAILED_BY_UNKNOWN,qi.COMPLETED];var Qi=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.revision=e.revision,this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLockEvent"]=Qi,Qi.__name__=["albero","entity","note","NoteLockEvent"],Qi.prototype={__class__:Qi};var Ji=function(e){this.value=e};n["albero.entity.note.NoteLockExpiredAt"]=Ji,Ji.__name__=["albero","entity","note","NoteLockExpiredAt"],Ji.prototype={fromNow:function(){var e=this.value,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)-(new Date).getTime()|0},calcRelockDelay:function(){return.9*this.fromNow()|0},__class__:Ji};var Xi=n["albero.entity.note.NoteLockStateValue"]={__ename__:["albero","entity","note","NoteLockStateValue"],__constructs__:["FAILED_BY_CONFLICT","FAILED_BY_LOCKED","FAILED_BY_NOT_FOUND","FAILED_BY_UNKNOWN","COMPLETED","RELEASED"]};Xi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",0],Xi.FAILED_BY_CONFLICT.toString=i,Xi.FAILED_BY_CONFLICT.__enum__=Xi,Xi.FAILED_BY_LOCKED=function(e){var t=["FAILED_BY_LOCKED",1,e];return t.__enum__=Xi,t.toString=i,t},Xi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],Xi.FAILED_BY_NOT_FOUND.toString=i,Xi.FAILED_BY_NOT_FOUND.__enum__=Xi,Xi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",3],Xi.FAILED_BY_UNKNOWN.toString=i,Xi.FAILED_BY_UNKNOWN.__enum__=Xi,Xi.COMPLETED=function(e){var t=["COMPLETED",4,e];return t.__enum__=Xi,t.toString=i,t},Xi.RELEASED=["RELEASED",5],Xi.RELEASED.toString=i,Xi.RELEASED.__enum__=Xi,Xi.__empty_constructs__=[Xi.FAILED_BY_CONFLICT,Xi.FAILED_BY_NOT_FOUND,Xi.FAILED_BY_UNKNOWN,Xi.RELEASED];var Zi=function(e){this.value=e};n["albero.entity.note.NoteLockState"]=Zi,Zi.__name__=["albero","entity","note","NoteLockState"],Zi.prototype={isCompleted:function(){return 4==this.value[1]},getExpiredAtOrNull:function(){var e=this.value;return 4==e[1]?e[2]:null},isLockedByOther:function(){return 1==this.value[1]},getLockedUser:function(){var e=this.value;return 1==e[1]?e[2]:null},__class__:Zi};var $i=function(e){null!=e&&(this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLocked"]=$i,$i.__name__=["albero","entity","note","NoteLocked"],$i.prototype={lock:function(e,t,n){this.expiredAt=n,this.deviceId=t,this.userId=e},unlock:function(e){var t=this.userId;null!=t&&null!=e&&t.high==e.high&&t.low==e.low&&(this.expiredAt=null,this.userId=null,this.deviceId=null)},getLockedUserIdWithoutSelf:function(e){var t,n=this.deviceId;if(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)return null;if(null!=this.expiredAt){var i=this.expiredAt,r=i.high,a=i.low;t=4294967296*r+(a>=0?a:a+4294967296)<=(new Date).getTime()}else t=!0;return t?null:this.userId},__class__:$i};var er=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.talkId=e.talk_id,this.setting=new rr(e.setting))};n["albero.entity.note.NotePartialUpdateForSetting"]=er,er.__name__=["albero","entity","note","NotePartialUpdateForSetting"],er.prototype={__class__:er};var tr=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new ir(e.note_revision_summary))};n["albero.entity.note.NotePartialUpdateForSummary"]=tr,tr.__name__=["albero","entity","note","NotePartialUpdateForSummary"],tr.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:tr};var nr=function(e){if(this.contentFiles=[],null!=e){switch(this.revision=e.revision,this.title=e.title,this.contentType=Wi.createNoteContentType(e.content_type),this.contentType[1]){case 0:this.contentText=e.content;break;case 1:if(this.contentText=null==e.content.text?"":e.content.text,null!=e.content.files)for(var t=0,n=vo.__cast(e.content.files,Array);t=yr.HIRAGANA_SMALL_A&&o<=yr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(yr.KATAKANA_SMALL_A-yr.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},yr.katakanaToRoman=function(e){return(new ur).convert(e)},yr.normalize=function(e){return new Sr(null).normalize(e)},yr.normalizeForFile=function(e){return new Sr(null).normalizeForFile(e)},yr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Sr=function(e){this.beforeTask=null,this.beforeTask=e};n["albero.js.Normalizer"]=Sr,Sr.__name__=["albero","js","Normalizer"],Sr.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof go&&(e=e.val),dr.e("invalid character:",e),hr.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof go&&(e=e.val),dr.e("invalid character:",e),hr.localize("TextCanonicalizer.invalid")}},__class__:Sr};var wr=function(){};n["albero.js.WebSocket"]=wr,wr.__name__=["albero","js","WebSocket"],wr.prototype={__class__:wr};var Ir=function(){};n["albero.js.WebSocketFactory"]=Ir,Ir.__name__=["albero","js","WebSocketFactory"],Ir.newInstance=function(e,t){return new Tr(e,t)};var Tr=function(e,t){var n=this;this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong;var i=Jo.wsConfig,r=require("websocket").client;this.ws=new r(i),this.ws.on("connectFailed",Go(this,this.onError)),this.ws.on("connect",function(e){n.connection=e,e.on("error",Go(n,n.onError)),e.on("close",Go(n,n.onConnectionClose)),e.on("message",Go(n,n.onMessage)),e.on("pong",Go(n,n.onPong)),n.onOpen(null)});var a=null;null!=Jo.proxyURL&&(a={agent:gr.createAgent(Jo.proxyURL)}),this.ws.connect(e,null,null,null,a)};n["albero.js.WebSocketForNodeJs"]=Tr,Tr.__name__=["albero","js","WebSocketForNodeJs"],Tr.__interfaces__=[wr],Tr.prototype={onOpen:function(e){dr.i("WebSocket opened."),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryDataForHubot(e),this.onmessage(t)}},getBinaryDataForHubot:function(e){return oo.ofData(e.binaryData)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){dr.e("WebSocket error. event:",e),null!=this.onerror&&this.onerror()},onClose:function(e){this.removeAllEventListenersForHubot(),dr.i("WebSocket closed. "+y.string(e.code)+" "+y.string(e.reason)+" "+y.string(e.wasClean)),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},removeAllEventListenersForHubot:function(){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new No(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:Tr};var Nr=function(){};n["puremvc.interfaces.IProxy"]=Nr,Nr.__name__=["puremvc","interfaces","IProxy"],Nr.prototype={__class__:Nr};var Er=function(){};n["albero.proxy.AccessTokenResolverProxy"]=Er,Er.__name__=["albero","proxy","AccessTokenResolverProxy"],Er.__interfaces__=[Nr],Er.prototype={__class__:Er};var Ar=function(){};n["albero.proxy.AccessTokenResolverProxyFactory"]=Ar,Ar.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ar.newInstance=function(){return new kr("accessTokenResolver")};var br=function(e,t){Q.call(this),this.proxyName=null!=e?e:br.NAME,null!=t&&this.setData(t)};n["puremvc.patterns.proxy.Proxy"]=br,br.__name__=["puremvc","patterns","proxy","Proxy"],br.__interfaces__=[Nr],br.__super__=Q,br.prototype=r(Q.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:br});var kr=function(e){br.call(this,e)};n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=kr,kr.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],kr.__interfaces__=[Er],kr.__super__=br,kr.prototype=r(br.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=Jo.account?Jo.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__:kr});var Dr=function(){};n["albero.proxy.AccountLoaderProxy"]=Dr,Dr.__name__=["albero","proxy","AccountLoaderProxy"],Dr.__interfaces__=[Nr],Dr.prototype={__class__:Dr};var Cr=function(){};n["albero.proxy.AccountLoaderProxyFactory"]=Cr,Cr.__name__=["albero","proxy","AccountLoaderProxyFactory"],Cr.newInstance=function(){var e=N.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?N.createInstance(e,["accountLoader"]):new Or("accountLoader")};var Or=function(e){br.call(this,e)};n["albero.proxy.AccountLoaderProxyForHubot"]=Or,Or.__name__=["albero","proxy","AccountLoaderProxyForHubot"],Or.__interfaces__=[Dr],Or.__super__=br,Or.prototype=r(br.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 Pe(i,n))})}),null},__class__:Or});var Mr=function(){br.call(this,"broadcast")};n["albero.proxy.AlberoBroadcastProxy"]=Mr,Mr.__name__=["albero","proxy","AlberoBroadcastProxy"],Mr.__super__=br,Mr.prototype=r(br.prototype,{handleNotification:function(e,t){var n=this;switch(dr.v("Receive request from server. name:",e," body:",t),e){case"notify_add_account_control_request":var i=new je(t);this.dataStore.setAccountControlRequest(i),this.sendNotification(e,i);break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1]));break;case"notify_add_acquaintances":for(var r=t[1].map(Go(Bo=this.dataFactory,Bo.newAcquaintance)),a=0;at.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){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t){var n=this.dataStore.getTalk(e.talkId);if(null==n)return void dr.e("talk not found on change favorite talk.");(t=new ii).id=e.talkId,t.talkOrderingTimestamp=n.updatedAt}t.updateByTalkPushNotificationEvent(e)&&this.dataStore.setTalkStatus(t)},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new ii).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);null==t&&((t=new ii).id=e.talkId);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;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var t=this;if(!c.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);return null==n?(dr.e("talkStatus is not found."),null):(n.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(n),n)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new Ke).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:Mr});var Fr=function(){br.call(this,"api")};n["albero.proxy.AlberoServiceProxy"]=Fr,Fr.__name__=["albero","proxy","AlberoServiceProxy"],Fr.__super__=br,Fr.prototype=r(br.prototype,{getOSString:function(){return"bot","bot"},createAccessToken:function(e,t,n){var i=this,r=e.split("$"),a=this.settings.getOs(),o=this.settings.getIDFV(),s=function(e){dr.v("access token:",e),i.settings.setAccessToken(e),n(e)},l=function(e){i.sendNotification("Url",Ue.FORWARD(Y.error))};-1==e.indexOf("@")&&2==r.length?this.wsApi.createAccessTokenById(r[1],r[0],t,o,a).then(s,l):this.wsApi.createAccessToken(e,t,o,a).then(s,l)},authorizeDevice:function(e,t){var n=this,i=this.settings.getIDFV();this.wsApi.authorizeDevice(e,i).then(function(e){t()},function(e){n.apiCaller.handleServerErrorDefault(e)})},createSession:function(e,t){var n=this,i=this.getOSString();this.apiCaller.onSessionClear(),this.wsApi.createSession(e,"1.122",i).then(function(e){var i=M.nowAsInt64();e.passwordExpiration.isExpired(i)?n.sendNotification("password_expiration_overed"):(e.passwordExpiration.needWarning(i,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(M.oneDayAfterAsInt64()),n.sendNotification("password_expiration_warned")),n.apiCaller.onSessionCreated(),t(e),n.apiCaller.fireCallbacksWaitingForSession())},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",re.AUTHORIZE);n.apiCaller.handleServerErrorDefault(e)}n.settings.clearAccessToken(),n.sendNotification("Url",Ue.FORWARD(Y.error))})},startNotification:function(){var e=this;this.wsApi.startNotification().then(function(t){t||(e.dataStore.clear(!0),e.sendNotification("start_notification_failed"))},function(t){e.apiCaller.handleServerErrorDefault(t)})},resetNotification:function(e){var t=this;this.wsApi.resetNotification().then(e,function(e){t.apiCaller.handleServerErrorDefault(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.wsApi.createMessage(a,r.type,r.content).then(function(r){i.dataStore.setMessage(r),i.sendNotification("create_message_complete",[r,o.id]),i.forwardMessages(e,t,n+1),i.dataStore.removeMessage(o.id)},function(e){if(i.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=ta.toLocalError(Wt.SendingMessageConflicted,e);i.sendNotification("error_occurred",t)}else i.sendNotification("error_occurred",e)})}},deleteMessage:function(e,t){var n=this;this.wsApi.deleteMessage(e,t).then(function(e){},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=ta.toLocalError(Wt.DeletingMessageConflicted,e);return void n.sendNotification("error_occurred",t)}n.sendNotification("error_occurred",e)}})},updateReadStatuses:function(e,t){var n=this;this.wsApi.updateReadStatuses(e,t).then(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)},function(e){n.apiCaller.handleServerErrorDefault(e)})},searchMessagesAroundDateTime:function(e,t){return this.wsApi.searchMessagesAroundDateTime(e,t)},uploadV2:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a),this.prepareMessageFileAsync(n.file,n.thumb,e).then(function(e){r._createMessage(t,Qt.file,e,a,i)},function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return dr.w("WARNING method: upload",o),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMultiV2:function(e,t,n,i,r){var a=this,o=this.dataFactory.newDummyMultipleFileMessage(t,n,i);this.sendNotification("create_message_start",o);for(var s=Promise.resolve([]),l=0;l0&&(s.text=n),a._createMessage(t,Qt.textMultipleFile,s,o,r)}},function(e){a.sendNotification("create_message_fail",[e,o],r)})},uploadMultiForHubot:function(e,t,n,i){var r=this.dataStore.getTalk(e),a=n.map(function(e){return{file:e,thumb:null}});if(null==r){var o=this.dataFactory.newDummyMultipleFileMessage(e,t,a),s={code:400,message:"invalid talk_id (deleted talk)"};return dr.w("WARNING method: uploadMulti",s),void this.sendNotification("create_message_fail",[s,o],i)}this.uploadMultiV2(r.domainId,r.id,t,a,i)},prepareMessageFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,ui.THUMBNAIL,function(n){t.setAuth(n),e(io.Some(t))},function(t){e(io.None)}):e(io.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,ui.MESSAGE,function(n){var i=yr.normalizeForFile(e.name),a=F.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},prepareNoteFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,ui.NOTE_THUMBNAIL,function(n){t.setAuth(n),e(io.Some(t))},function(t){e(io.None)}):e(io.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,ui.NOTE_ATTACHMENT,function(n){var i=yr.normalizeForFile(e.name),a=F.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},uploadFile:function(e,t,n,i,r){var a=this,o=e,s=yr.normalizeForFile(o.name),l=o.type,u=o.size;this.wsApi.createUploadAuth(s,l,u,t,n).then(function(t){a.fileService.upload(t,l,e).then(function(e){i(t.rawValue)},function(e){dr.e("failed to upload: "+y.string(e));var t=new ea({code:null,detail:null,message:e});if(n!=ui.THUMBNAIL&&n!=ui.NOTE_THUMBNAIL&&n!=ui.NOTE_ATTACHMENT){var i=ta.toLocalError(Wt.GeneralFileError,t);a.sendNotification("error_occurred",i)}r(t)})},function(e){if(n!=ui.THUMBNAIL&&n!=ui.NOTE_THUMBNAIL&&n!=ui.NOTE_ATTACHMENT&&null!=e)if(502==e.code&&null!=e.detail){var t=U.fromIntOrInt64(e.detail.limit_max);if("file_size"==e.detail.limit_target){var i=ta.toLocalError(Wt.UploadSizeOvered(t),e);a.sendNotification("error_occurred",i)}else if("storage_size"==e.detail.limit_target){var o=ta.toLocalError(Wt.StorageSizeOvered(t),e);a.sendNotification("error_occurred",o)}}else a.sendNotification("error_occurred",e);r(e)})},createDownloadAuth:function(e,t,n,i,r){this.wsApi.createDownloadAuth(e,t,n).then(function(e){i(e)},function(e){r(e)})},deleteAttachment:function(e,t){var n=this;this.wsApi.deleteAttachment(e,t).then(function(e){},function(e){n.apiCaller.handleServerErrorDefault(e)})},getAttachments:function(e,t){var n=this;null==t&&(t={sinceId:null,maxId:null}),this.wsApi.getAttachments(e,20,t.sinceId,t.maxId).then(function(t){c.iter(t,function(e){n.dataStore.setTalkFileInfo(e,!0)}),n.sendNotification("get_file_responsed",{talkId:e,files:t})},function(e){n.apiCaller.handleServerErrorDefault(e)})},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,qt.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",[e,a],i),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,r=this.settings.getSelectedDomainId();if(null!=r){e=null==e?{sinceId:null,maxId:null}:e;var a=this.apiCaller,o=e.sinceId,s=e.maxId,l=nn.orderToInt(t);a.call("get_announcements",[r,20,o,s,l],function(e){var a=e.map(Go(Bo=i.dataFactory,Bo.newAnnouncement));i.sendNotification("notify_get_announcements",{domainId:r,announcements:a,sortOrder:t,callerKey:n})})}},getAnnouncementStatuses:function(e){var t=this;this.apiCaller.call("get_announcement_statuses",[],function(n){for(var i=0;i0&&400==e.code&&"invalid file_id"==e.message&&(a.setState(qi.FAILED_BY_NOT_FOUND_FORWARDING),o.dataStore.setNoteLocalEdit(a.getNoteId(),a)),null!=a&&400==e.code&&"invalid talk_id"==e.message){var i=Kt.getNoteForwardingForbiddenError(),r=ta.toLocalError(i,e);return o.sendNotification("error_occurred",r),Promise.reject(e)}return o.sendNotification("error_occurred",e),Promise.reject(e)})},updateNoteSetting:function(e,t,n){var i=this;return new Promise(function(r,a){i.apiCaller.call("update_note_setting",[e.value,t,n],function(e){r(new Ai(e))},a)}).then(function(e){return i.sendNotification("update_note_setting_completed",e),e},function(t){return 404==t.code?(i.dataStore.setNote(e,null),i.sendNotification("update_note_setting_failed_by_not_found",e),Promise.reject(t)):409==t.code&&"conflict"==t.message?(i.dataStore.setNote(e,null),i.sendNotification("update_note_setting_failed_by_conflict",e),Promise.reject(t)):409==t.code&&"locked by another user"==t.message&&null!=t.detail&&null!=t.detail.user_id&&null!=t.detail.device_id?(i.sendNotification("update_note_setting_failed_by_editing",e),Promise.reject(t)):(i.sendNotification("error_occurred",t),Promise.reject(t))})},updateNote:function(e,t,n,i,r,a,o){var s=this;return new Promise(function(o,l){var u=Wi.getValue(i);s.apiCaller.callApiReliable("update_note",[e.value,t,n,u,r,a],function(e){o(new Ei(e))},l,Go(s,s.retryTimeForCreateOrUpdateNoteFromError))}).then(function(t){return null!=o&&s.dataStore.setNoteLocalEdit(e,null),s.dataStore.setNote(e,t.note),s.sendNotification("update_note_completed",t),t},function(t){return 404==t.code?(null!=o?(o.setState(qi.FAILED_BY_NOT_FOUND),s.dataStore.setNoteLocalEdit(e,o)):s.dataStore.setNote(e,null),Promise.reject(t)):409==t.code&&"conflict"==t.message?(null!=o?(o.setState(qi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)):s.dataStore.setNote(e,null),Promise.reject(t)):409==t.code&&"locked by another user"==t.message&&null!=t.detail&&null!=t.detail.user_id&&null!=t.detail.device_id?(null!=o&&(o.setState(qi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)),Promise.reject(t)):(null!=o&&(o.setState(qi.FAILED_BY_UNKNOWN),s.dataStore.setNoteLocalEdit(e,o)),s.sendNotification("error_occurred",t),Promise.reject(t))})},deleteNote:function(e){var t=this;return new Promise(function(n,i){t.apiCaller.call("delete_note",[e.value],function(e){n(new Ii(e))},i)}).then(function(e){return t.sendNotification("delete_note_completed",e),e},function(n){return 404==n.code&&t.dataStore.setNote(e,null),t.sendNotification("error_occurred",n),Promise.reject(n)})},lockNote:function(e,t,n){var i=this;return new Promise(function(e,r){i.apiCaller.call("lock_note",[t.value,n],e,r)}).then(function(e){var r=i.dataStore.getNote(t);if(null!=r){var a=i.dataStore.me.id,o=i.settings.getDeviceId();r.lock(n,a,o,e)}return new Zi(Xi.COMPLETED(new Ji(e)))}).catch(function(n){if(400==n.code)return dr.v("invalid parameter."),i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN);if(403==n.code)return dr.v("forbidden."),i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN);if(404==n.code)return dr.v("note is not found."),i.dataStore.setNote(t,null),new Zi(Xi.FAILED_BY_NOT_FOUND);if(409==n.code&&"locked by another user"==n.message&&null!=n.detail&&null!=n.detail.user_id&&null!=n.detail.device_id){var r=i.dataStore.getUser(e,n.detail.user_id);return new Zi(Xi.FAILED_BY_LOCKED(r))}return 409==n.code&&"conflict"==n.message?(dr.v("conflict"),new Zi(Xi.FAILED_BY_CONFLICT)):(i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN))})},unlockNote:function(e,t,n){var i=this;return new Promise(function(e,r){i.apiCaller.call("unlock_note",[t.value,n],e,r)}).then(function(e){var r=i.dataStore.getNote(t);return null!=r&&r.unlock(n,i.dataStore.me.id),new Zi(Xi.RELEASED)}).catch(function(n){if(400==n.code)return dr.v("invalid parameter."),i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN);if(403==n.code)return dr.v("forbidden."),i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN);if(404==n.code)return dr.v("note is not found."),i.dataStore.setNote(t,null),new Zi(Xi.FAILED_BY_NOT_FOUND);if(409==n.code&&"conflict"==n.message)return new Zi(Xi.FAILED_BY_CONFLICT);if(409==n.code&&"locked by another user"==n.message&&null!=n.detail&&null!=n.detail.user_id&&null!=n.detail.device_id){var r=i.dataStore.getUser(e,n.detail.user_id);return new Zi(Xi.FAILED_BY_LOCKED(r))}return i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN)})},retryTimeForCreateOrUpdateNoteFromError:function(e){return this.shouldRetryCreateOrUpdateNote(e)?io.Some(this.apiCaller.retryTimeForReplicationLag()):io.None},shouldRetryCreateOrUpdateNote:function(e){return null!=e.code&&(500==e.code?"Internal Error (IllegalStateException)"==e.message:400==e.code&&"invalid file_id"==e.message)},__class__:xr});var Ur=function(){br.call(this,"appState")};n["albero.proxy.AppStateProxy"]=Ur,Ur.__name__=["albero","proxy","AppStateProxy"],Ur.__super__=br,Ur.prototype=r(br.prototype,{start:function(){this.updateLastActivityAt(),this.checkInactiveInterval()},activateAppIfNeed:function(){this.updateLastActivityAt(),this.appState==k.Inactive&&this.setAppState(k.Active)},setAppState:function(e){dr.v("APP_STATE_CHANGED: ",e),this.appState=e,this.sendNotification("app_state_changed",this.appState)},updateLastActivityAt:function(){this.lastActivityAt=new Date},checkInactiveInterval:function(){this.checkInactive(),new qa(500).run=Go(this,this.checkInactive)},checkInactive:function(){this.appState!=k.Inactive&&((new Date).getTime()-this.lastActivityAt.getTime()<2e3||this.setAppState(k.Inactive))},__class__:Ur});var Pr=function(){var e=new hi(-1,-1);this.dummyFileId=e;var t=new hi(-1,-1);this.dummyMsgId=t,br.call(this,"dataFactory")};n["albero.proxy.DataFactoryProxy"]=Pr,Pr.__name__=["albero","proxy","DataFactoryProxy"],Pr.__super__=br,Pr.prototype=r(br.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 bt(e)},newDomain:function(e){return this.dataStore.setDomainIfLatest(new gt(e))},newDomainInvite:function(e){return this.dataStore.setDomainInvite(new Et(e))},newTalk:function(e){return this.dataStore.setTalk(new Kn(e))},newTalkStatus:function(e){return this.dataStore.setTalkStatus(new ii(e))},newDummyMessage:function(e,t,n){var i=this,r=new qt;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 hi(0,1),l=o.high-s.high|0,u=o.low-s.low|0;if(za.ucompare(o.low,s.low)<0){l--;l|=0}a=new hi(l,u)}this.dummyMsgId=a;var c=[];switch(r.type[1]){case 4:c=[this.createDummyFileInfo(r,r.content)];break;case 5:c=vo.__cast(r.content.files,Array).map(function(e){return i.createDummyFileInfo(r,e)})}return this.dataStore.setMessageWithFileInfos(r,c),r},newDummyFileMessage:function(e,t){var n=this.createFileInfoDynamic(t);return this.newDummyMessage(e,Qt.file,n)},newDummyMultipleFileMessage:function(e,t,n){var i=c.array(n.filter(function(e){return null!=e.file}).map(Go(this,this.createFileInfoDynamic)));return this.newDummyMessage(e,Qt.textMultipleFile,{text:t,files:i})},createFileInfoDynamic:function(e){var t=e.file;return{content_type:t.type,content_size:t.size,name:yr.normalizeForFile(t.name),file:t,localThumbInfo:e.thumb}},createDummyFileInfo:function(e,t){var n,i=Ft.fromMessageAndFileWithFileId(e,t,this.dummyFileId),r=this.dummyFileId;if(null==r)n=null;else{var a=new hi(0,1),o=r.high-a.high|0,s=r.low-a.low|0;if(za.ucompare(r.low,a.low)<0){o--;o|=0}n=new hi(o,s)}return this.dummyFileId=n,i},newQuestion:function(e){return this.dataStore.setQuestion(new pn(e))},newAnnouncement:function(e){return new We(e)},newAnnouncementStatus:function(e){return this.dataStore.setAnnouncementStatus(new Ke(e))},newAnnouncementStatusForDomain:function(e){var t=new Ke;return t.domainId=e,this.dataStore.setAnnouncementStatus(t)},newAccountControlRequest:function(e){return this.dataStore.setAccountControlRequest(new je(e))},newAccountControlGroup:function(e){return this.dataStore.setAccountControlGroup(new Le(e))},newUserPresence:function(e,t){var n=new di(e,t);return this.dataStore.setUserPresence(n),n},__class__:Pr});var Lr=function(){this.departmentStore=new lt,this.stampStore=new Hn,this.questionStore=new In,this.fileInfoStore=new Ut,this.messageStore=new en,this.conferenceStore=new et,this.solutionStore=new Un,this.directAppStore=new ft,this.flowNotificationBadgeStore=new Lt,br.call(this,"dataStore")};n["albero.proxy.DataStoreProxy"]=Lr,Lr.__name__=["albero","proxy","DataStoreProxy"],Lr.__super__=br,Lr.prototype=r(br.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!=Xo[i]?e.setReserved(i,u):e.h[i]=u}this.storageForUsers.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new ao);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=Xo[n]?i.setReserved(n,e):i.h[n]=e},getUserPresence:function(e){if(null==this.userPresences)return null;var t="_"+e.high+"_"+e.low,n=this.userPresences;return null!=Xo[t]?n.getReserved(t):n.h[t]},isDepartmentsChanged:function(e,t){return!U.eqArray(e.departments,t.departments)},setUsersIfLatest:function(e,t){var n=this.ensureDomainUserMap(e),i=Go(this,this.setUserIfLatest),r=n;c.iter(t,function(e){i(r,e)})},clearDomainUsers:function(e){this.users.remove("_"+e.high+"_"+e.low)&&this.storageForUsers.setDirtyFlag()},clearUsersDepartments:function(e){var t="_"+e.high+"_"+e.low,n=this.users,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new ro(i,i.arrayKeys());r.hasNext();){var a=r.next();a.user.departments=null,this.sendNotification("notify_update_user",a.user)}this.storageForUsers.setDirtyFlag()},removeFriend:function(e,t){var n="_"+e.high+"_"+e.low,i=this.users,r=null!=Xo[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=Xo[a]?r.getReserved(a):r.h[a];null!=o&&(o.type=2)}this.storageForUsers.setDirtyFlag()},removeAcquaintance:function(e,t){this.removeFriend(e,t)},getUser:function(e,t){if(null==t)return null;var n,i=new hi(0,0);if(t.high==i.high&&t.low==i.low)return null;if(null!=this.me){var r=this.me.id;n=null!=r&&null!=t&&r.high==t.high&&r.low==t.low}else n=!1;if(n)return this.me.toDomainUser(e);var a="_"+e.high+"_"+e.low,o=this.users,s=null!=Xo[a]?o.getReserved(a):o.h[a];if(null!=s){var l="_"+t.high+"_"+t.low,u=null!=Xo[l]?s.getReserved(l):s.h[l];if(null!=u)return u.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!=Xo[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new hi(0,0);if(t.high==i.high&&t.low==i.low)return null;var r=n.me.id;if(null!=r&&null!=t&&r.high==t.high&&r.low==t.low)return n.me.toDomainUser(e);var o="_"+t.high+"_"+t.low,s=null!=Xo[o]?a.getReserved(o):a.h[o];return null!=s?s.user:null});for(var o=[],s=a.arrayKeys(),l=new ro(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 ro(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!=Xo[t]?n.getReserved(t):n.h[t]},getValidPairTalk:function(e,t){var n=this;return null==this.me?null:c.find(this.getTalks(),function(i){if(!N.enumEq(i.type,qn.PairTalk))return!1;var r=i.domainId;return null!=r&&null!=t&&r.high==t.high&&r.low==t.low&&(!!c.exists(i.userIds,function(t){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})&&!!c.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!=Xo[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.storageForUsers.setDirtyFlag(),this.sendNotification("notify_update_user",s))}else{var m={type:2,user:s};null!=Xo[u]?r.setReserved(u,m):r.h[u]=m,this.storageForUsers.setDirtyFlag(),this.sendNotification("notify_update_user",s)}}return this.storageForTalks.setDirtyFlag(),e},getTalks:function(){for(var e=[],t=this.talks.keys();t.hasNext();){var n=t.next(),i=this.talks;e.push(null!=Xo[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){c.iter(e,Go(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}this.questionStore.removeTalkQuestions(e),this.talks.remove("_"+e.high+"_"+e.low),this.storageForTalks.setDirtyFlag()},getTalkStatuses:function(){for(var e=[],t=this.talkStatuses.keys();t.hasNext();){var n=t.next(),i=this.talks;if(null!=Xo[n]?i.existsReserved(n):i.h.hasOwnProperty(n)){var r=this.talkStatuses;e.push(null!=Xo[n]?r.getReserved(n):r.h[n])}}return e},getTalkStatus:function(e){var t="_"+e.high+"_"+e.low,n=this.talkStatuses;return null!=Xo[t]?n.getReserved(t):n.h[t]},setTalkStatus:function(e){var t=e.id,n="_"+t.high+"_"+t.low;if(null!=this.domainUnreadCounts){var i=this.talks,r=null!=Xo[n]?i.getReserved(n):i.h[n];if(null!=r){var a=r.domainId;this.domainUnreadCounts.remove("_"+a.high+"_"+a.low)}}var o=this.talkStatuses;return null!=Xo[n]?o.setReserved(n,e):o.h[n]=e,this.sendNotification("brand_badge_changed"),this.storageForTalkStatuses.setDirtyFlag(),e},removeTalkStatus:function(e){var t="_"+e.high+"_"+e.low;if(null!=this.domainUnreadCounts){var n=this.talks,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}this.talkStatuses.remove(t),this.storageForTalkStatuses.setDirtyFlag()},getDomains:function(){for(var e=[],t=this.domains,n=new ro(t,t.arrayKeys());n.hasNext();){var i=n.next();e.push(i)}return e},getDomain:function(e){var t="_"+e.high+"_"+e.low,n=this.domains;return null!=Xo[t]?n.getReserved(t):n.h[t]},setDomainIfLatest:function(e){var t,n=e.id,i="_"+n.high+"_"+n.low,r=this.domains,a=null!=Xo[i]?r.getReserved(i):r.h[i];if(null!=a){var o=e.updatedAt,s=a.updatedAt,l=o.high-s.high|0;l=0!=l?l:za.ucompare(o.low,s.low),t=(o.high<0?s.high<0?l:-1:s.high>=0?l:1)>=0}else t=!0;if(t){var u=this.domains;return null!=Xo[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!=Xo[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 ao,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=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(w.startsWith(n,"talk_")){var i=n.substring("talk_".length),r=U.makeFromIdStr(i);this.sendNotification("keyword_detaction_updated",{domainId:null,talkId:r,detected:!1,emphasis:e})}else if(w.startsWith(n,"announcement_")){var a=n.substring("announcement_".length),o=U.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!=Xo[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__:zr});var Wr=function(){};n["albero.proxy.KeywordParser"]=Wr,Wr.__name__=["albero","proxy","KeywordParser"],Wr.parse=function(e){var t=w.htmlEscape(e,!0),n=new o(""(.*?)"","g").map(t,function(e){return Wr.encodeSpace(e.matched(1))});return new o("[  ]","g").split(n).filter(j.isNotEmpty).map(Wr.decodeSpace).map(Wr.createParsedKeyword)},Wr.encodeSpace=function(e){return w.replace(w.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},Wr.decodeSpace=function(e){return w.replace(w.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},Wr.createParsedKeyword=function(e){var t=new o("\\[type:([A-Za-z]+)\\](.*)","g");if(t.match(e)){var n=t.matched(1),i=t.matched(2),r=qr.getKeywordTypeByMessageTypeString(n);if(r!=Vr.normal)return new Kr(r,i)}return new Kr(Vr.normal,e)};var Kr=function(e,t){this.type=e,this.word=t};n["albero.proxy.ParsedKeyword"]=Kr,Kr.__name__=["albero","proxy","ParsedKeyword"],Kr.prototype={__class__:Kr};var Vr=n["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};Vr.normal=["normal",0],Vr.normal.toString=i,Vr.normal.__enum__=Vr,Vr.selectOneReplyOnly=["selectOneReplyOnly",1],Vr.selectOneReplyOnly.toString=i,Vr.selectOneReplyOnly.__enum__=Vr,Vr.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],Vr.yesOrNoReplyOnly.toString=i,Vr.yesOrNoReplyOnly.__enum__=Vr,Vr.todoDoneOnly=["todoDoneOnly",3],Vr.todoDoneOnly.toString=i,Vr.todoDoneOnly.__enum__=Vr,Vr.__empty_constructs__=[Vr.normal,Vr.selectOneReplyOnly,Vr.yesOrNoReplyOnly,Vr.todoDoneOnly];var qr=function(){};n["albero.proxy.KeywordTypeHelper"]=qr,qr.__name__=["albero","proxy","KeywordTypeHelper"],qr.getKeywordType=function(e){return null!=e?qr.getKeywordTypeByMessageTypeString(qt.typeString(e)):Vr.normal},qr.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return Vr.selectOneReplyOnly;case"todoDone":return Vr.todoDoneOnly;case"yesOrNoReply":return Vr.yesOrNoReplyOnly}return Vr.normal},qr.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==Qt.selectOneReply;case 2:return e==Qt.yesOrNoReply;case 3:return e==Qt.todoDone}},qr.createFilterClassStringFromMessageType=function(e){return qr.createFilterClassString(qr.getKeywordType(e))},qr.createFilterClassString=function(e){return"keyword_type_"+y.string(e)};var Qr=function(){this.isCallingUpdateLastUsedAt=!1,br.call(this,"lastUsedAtUpdater")};n["albero.proxy.LastUsedAtUpdaterProxy"]=Qr,Qr.__name__=["albero","proxy","LastUsedAtUpdaterProxy"],Qr.__super__=br,Qr.prototype=r(br.prototype,{startPolling:function(e){var t=this;if(null==this.pollingTimer){var n,i=this.getLastUsedExpiredAt();if(null==i)n=0;else{var r=i.high,a=i.low;n=4294967296*r+(a>=0?a:a+4294967296)-(new Date).getTime()}n>0?qa.delay(function(){t.startPolling(e)},0|n):(this.isCallingUpdateLastUsedAt=!0,e(),this.pollingTimer=new qa(6e5),this.pollingTimer.run=function(){t.isCallingUpdateLastUsedAt||(t.isCallingUpdateLastUsedAt=!0,e())})}},stopPolling:function(){null!=this.pollingTimer&&(this.pollingTimer.stop(),this.pollingTimer=null)},getLastUsedExpiredAt:function(){return null!=this.lastUsedExpiredAtCache?this.lastUsedExpiredAtCache:this.settings.getLastUsedExpiredAt()},update:function(){this.lastUsedExpiredAtCache=M.afterAsInt64(6e5),this.settings.setLastUsedExpiredAt(this.lastUsedExpiredAtCache),this.isCallingUpdateLastUsedAt=!1},cancel:function(){this.isCallingUpdateLastUsedAt=!1},__class__:Qr});var Jr=function(){br.call(this,"limitations")};n["albero.proxy.LimitationsProxy"]=Jr,Jr.__name__=["albero","proxy","LimitationsProxy"],Jr.__super__=br,Jr.prototype=r(br.prototype,{getMaxTalkers:function(){var e=this,t=H.flatMap(H.flatMap(H.option(this.settings.getSelectedDomainId()),function(t){return H.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__:Jr});var Xr=function(){this.connectionStatus=D.Ok,br.call(this,"rpc"),this.responseHandlers=new to,this.connectionKeeper=new Zr(Go(this,this.ping))};n["albero.proxy.MsgPackRpcProxy"]=Xr,Xr.__name__=["albero","proxy","MsgPackRpcProxy"],Xr.__super__=br,Xr.prototype=r(br.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=Ir.newInstance(Jo.endpoint,{onopen:Go(this,this.onOpen),onmessage:Go(this,this.onMessage),onclose:Go(this,this.onClose),onpong:Go(this,this.onPong)}),Xr.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.close();var e=this.ws;return this.ws=null,Xr.pingAt=null,this.lastUsedAtUpdater.stopPolling(),e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=D.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){Xr.pingAt=null,dr.v("PONG "+y.string(e))},onMessage:function(e){var t=new Eo(e,!0).o,n=vo.__cast(t[0],zo);if(1==n&&4==t.length){var i=vo.__cast(t[1],zo),r=t[2],a=t[3],o=this.responseHandlers.h[i];if(null==o)return void dr.e("No ResponseHandler prepared. msgId:%s error:%s result:",i,r,a);dr.v("response received. method:",o.method," data:",t),null==r?o.onSuccess(a):(dr.e("Receive Error Response. method:",o.method," error:",r),o.onError(r)),this.responseHandlers.remove(i)}else if(0==n&&4==t.length){var s=vo.__cast(t[1],zo),l=vo.__cast(t[2],String),u=vo.__cast(t[3],Array);if(dr.v("request received. method:",l),0==u.length)return void dr.e("empty params.");if(this.broadcast.handleNotification(l,u[0]),null==this.ws)return void dr.e("websocket was finished.");dr.v("response sent. method:",l),this.ws.send(new Ao([1,s,null,!0]).o.getBytes())}},onClose:function(e,t,n){dr.i("onClose. code:"+e+", reason:"+t+", wasClean:"+(null==n?"null":""+n)),1001==e&&n||(this.connectionStatus=1e3!=e&&1005!=e||"concurrent access"!=t?1e3!=e&&1005!=e||"forcibly closed"!=t?D.Error:D.ForcibliyClosedError:D.ConcurrentAccessError,this.connectionStatus==D.ForcibliyClosedError?this.sendNotification("SignOut"):this.sendNotification("Url",Ue.FORWARD(Y.error))),this.finishWebSocket(),this.connectionKeeper.setConnected(!1)},restart:function(e){null==e&&(e=500);for(var t=this,n=this.finishWebSocket(),i=this.responseHandlers.keys();i.hasNext();){var r=i.next();this.responseHandlers.remove(r)}var a=null;a=function(){null==n||n.isClosed()?t.initWebSocket():qa.delay(a,100)},qa.delay(a,e)},call:function(e,t,n,i){if(null!=this.ws){null==t&&(t=[]),null==n&&(n=function(e){}),null==i&&(i=Go(this,this.onServerError));var r=Xr.lastMsgId++,a=this.responseHandlers,o=new $r(e,n,i);a.h[r]=o;var s=[0,r,e,t],l=new Ao(s).o.getBytes();this.ws.send(l),dr.v("send request. data:",s)}else dr.e("disconnected. data:",this.data)},ping:function(){switch(this.connectionStatus[1]){case 2:case 3:return}null==this.ws||this.ws.isClosed()?(this.restart(),dr.v("restart connection. "+Xr.pingAt+" "+y.string(null==this.ws||this.ws.isClosed()))):Xr.pingAt>0?(this.restart(),dr.v("restart connection. "+Xr.pingAt+" "+y.string(null==this.ws||this.ws.isClosed()))):(dr.v("before pingAt "+Xr.pingAt),this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),Xr.pingAt=(new Date).getTime(),dr.v("send ping")))},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__:Xr});var Zr=function(e){this.connected=!1,this.ping=e};n["albero.proxy._MsgPackRpcProxy.ConnectionKeeper"]=Zr,Zr.__name__=["albero","proxy","_MsgPackRpcProxy","ConnectionKeeper"],Zr.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 qa(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=qa.delay(r,n)}})(3e3)()}},deleteTimer:function(){null!=this.timer&&(this.timer.stop(),this.timer=null)},__class__:Zr};var $r=function(e,t,n){this.method=e,this.onSuccess=t,this.onError=n};n["albero.proxy._MsgPackRpcProxy.ResponseHandler"]=$r,$r.__name__=["albero","proxy","_MsgPackRpcProxy","ResponseHandler"],$r.prototype={__class__:$r};var ea=function(e){this.code=e.code,this.message=e.message,this.detail=e.detail};n["albero.proxy.Error"]=ea,ea.__name__=["albero","proxy","Error"],ea.prototype={__class__:ea};var ta=function(){};n["albero.proxy.ErrorConverter"]=ta,ta.__name__=["albero","proxy","ErrorConverter"],ta.toLocalError=function(e,t){return{code:t.code,message:t.message,detail:t.detail,localErrorType:e}};var na=function(){br.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new ao,this.updateReadAnnouncementStatusesTimers=new ao};n["albero.proxy.ReadStatusUpdaterProxy"]=na,na.__name__=["albero","proxy","ReadStatusUpdaterProxy"],na.__super__=br,na.prototype=r(br.prototype,{updateReadStatuses:function(e,t){var n=this,i=this.dataStore.getTalkStatus(e);if(null!=i&&i.updateByReadingMessages(t,this.dataStore.me.id)){this.dataStore.setTalkStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadStatusesTimers,o=null!=Xo[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadMessageId,l=qa.delay(function(){n.updateReadStatusesTimers.remove(r),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,s)},1e3),u=this.updateReadStatusesTimers;null!=Xo[r]?u.setReserved(r,l):u.h[r]=l}},updateAnnouncementReadStatus:function(e,t){var n=this,i=this.dataStore.getAnnouncementStatus(e);if(null!=i&&i.updateByReadingAnnouncements(t)){this.dataStore.setAnnouncementStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadAnnouncementStatusesTimers,o=null!=Xo[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadAnnouncementId;o=qa.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(r),n.api.updateAnnouncementReadStatus(e,s)},1e3);var l=this.updateReadAnnouncementStatusesTimers;null!=Xo[r]?l.setReserved(r,o):l.h[r]=o}},__class__:na});var ia=function(){br.call(this,"routing")};n["albero.proxy.RoutingProxy"]=ia,ia.__name__=["albero","proxy","RoutingProxy"],ia.__super__=br,ia.prototype=r(br.prototype,{onRegister:function(){},init:function(){null==this.router&&(this.router=new ra(this,this.settings,this.dataStore),this.sendNotification("first_routing_will_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.stop()},__class__:ia});var ra=function(e,t,n){this.proxy=e,this.settings=t,this.dataStore=n,this.urlConverterDelegate=new aa(t,n)};n["albero.proxy._RoutingProxy.LocalRouter"]=ra,ra.__name__=["albero","proxy","_RoutingProxy","LocalRouter"],ra.prototype={notify:function(e){var t=this.getDomainId(e);this.settings.setSelectedDomainId(t),this.proxy.sendNotification("current_page_changed",e)},forward:function(e){0!=e[1]&&this.notify(e)},redirect:function(e,t){},redirectWithHash:function(){},back:function(){this.notify(this.prev)},stop:function(){},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 7:return e[2];case 11:return e[2];default:return null}},parseFragment:function(e){return K.createUrls(e,this.urlConverterDelegate)},toFragment:function(e){return K.createFragment(e,this.urlConverterDelegate)},__class__:ra};var aa=function(e,t){this.settings=e,this.dataStore=t};n["albero.proxy.UrlConverterDelegate"]=aa,aa.__name__=["albero","proxy","UrlConverterDelegate"],aa.__interfaces__=[V],aa.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return H.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e;switch(H.flatMap(this.getLastSelectedDomainId(),Go(this,this.getDomain))[1]){case 0:e=H.flatMap(this.getLastSelectedDomainId(),Go(this,this.getDomain));break;case 1:e=this.getOldestDomain()}return H.map(e,function(e){return e.id})},getDomain:function(e){return H.option(this.dataStore.getDomain(e))},getOldestDomain:function(){return new kt(this.dataStore.getDomains()).getOldestDomain()},__class__:aa};var oa=function(){br.call(this,"searchService")};n["albero.proxy.SearchServiceProxy"]=oa,oa.__name__=["albero","proxy","SearchServiceProxy"],oa.__super__=br,oa.prototype=r(br.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 An(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 ao),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new ao);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(function(){(n+=1)==t.length&&i()}):i();var r=0,a=function(){2==(r+=1)&&e.api.getTalks(i)};e.api.getFriends(a),e.api.getAcquaintances(a)}),e.api.getAccountControlRequests(function(){e.api.getDomainInvites(i)}),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=L.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:za.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;tr[o])return!0;if(a[o]0,a=n.filter(function(e){return!e.isALL()}).map(function(e){return{user:{id:Ca.toIdStr(e.userIdNumStr)}}});return new Ca(e,t,r,i,a)},Ca.toIdStr=function(e){var t=U.parse(e);return"_"+t.high+"_"+t.low},Ca.prototype={__class__:Ca};var Oa=function(){br.call(this,"hubotObject")};n["albero_cli.proxy.HubotObjectProxy"]=Oa,Oa.__name__=["albero_cli","proxy","HubotObjectProxy"],Oa.__super__=br,Oa.prototype=r(br.prototype,{userObject:function(e){return ya.of(e).toCompatibleData()},meObject:function(e){return Sa.of(e).toCompatibleData()},userObjectByIdStr:function(e,t){var n,i=t.split("_");i.length>2?n=new hi(y.parseInt(i[1]),y.parseInt(i[2])):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!=Xo[l]?n.setReserved(l,a):n.h[l]=a)}return t},talkObject:function(e,t){var n=this.userObjectsByIds(e.domainId,e.userIds,t),i=this.domainObjectById(e.domainId,t);return Ta.create(e,n,i).toCompatibleData()},talkObjects:function(e){for(var t=new ao,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__:Oa});var Ma=function(){br.call(this,"messageEvent"),this.emitters=new ao};n["albero_cli.proxy.MessageEventProxy"]=Ma,Ma.__name__=["albero_cli","proxy","MessageEventProxy"],Ma.__super__=br,Ma.prototype=r(br.prototype,{registEmitter:function(e,t){Fa.factory=this;var n=Fa.createInstance(t);if(null!=n){var i=this.emitters;null!=Xo[e]?i.setReserved(e,n):i.h[e]=n}},noteCreated:function(e,t){var n=this.emitters,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null!=i&&(this.emitters.remove(t),null!=e)){var r=e.noteId.toString(),a=this.emitters;null!=Xo[r]?a.setReserved(r,i):a.h[r]=i,i.talk=this.dataStore.getTalk(e.talkId),i.setFirstReader(this.dataStore.me),i.onceOnSend(e),i.hasEventListener()||this.emitters.remove(r)}},messageCreated:function(e,t){var n=this.emitters,i=null!=Xo[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!=Xo[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!=Xo[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",Se.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!=Xo[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=U.makeFromIdStr(r),u=l.high-t.high|0;u=0!=u?u:za.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!=Xo[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!=Xo[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!=Xo[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__:Ma});var Fa=function(e){this.context=e,this.listeners=new ao,Object.defineProperty(this,"readUsers",{get:this.get_readUsers}),Object.defineProperty(this,"unreadUsers",{get:this.get_unreadUsers})};n["albero_cli.proxy.Emitter"]=Fa,Fa.__name__=["albero_cli","proxy","Emitter"],Fa.createInstance=function(e){for(var t=null,n=v.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(),U.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?[]:Fa.factory.hubotObject.userObjectsByIds(this.talk.domainId,e)},createNoteObjectForHubot:function(e){return Fa.factory.hubotObject.noteObject(e)},get_message:function(e){return Fa.factory.hubotObject.messageObject(e)},answer:function(e){var t,n=this,i=qt.typeOf(this.message.type),r=this.message.id.split("_");r.length>2?t=new hi(y.parseInt(r[1]),y.parseInt(r[2])):t=null;switch(i[1]){case 14:case 16:case 18:case 19:case 20:case 21:var a=this.message.content.in_reply_to;t=new hi(a.high,a.low)}var o=Ie.Question(t,function(t){var r=t.responses;switch(i[1]){case 13:case 14:case 19:var a=n.users(r[0].userIds),o=n.users(r[1].userIds);e(a,o);break;case 17:case 18:case 21:var s=n.users(r[0].userIds),l=n.users(r[1].userIds);e(s,l);break;case 15:case 16:case 20:var u=r.map(function(e){return n.users(e.userIds)});e(u)}});Fa.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=qa.delay(i,60*n.__readerTimerWait*1e3|0)):(t(!0),n.__readerTimer=null)},this.__readerTimer=qa.delay(i,60*this.__readerTimerWait*1e3|0)},stopTimer:function(){null!=this.__readerTimer&&(this.__readerTimer.stop(),this.__readerTimer=null)},__class__:Fa};var Ra=function(){br.call(this,"sendQueue"),this.sendCount=0,this.sendMsgQueue=new xa(this,550,new _r("sendQueueMessage")),this.sendAnnounceQueue=new xa(this,5050,new _r("sendQueueAnnounce"))};n["albero_cli.proxy.SendQueueProxy"]=Ra,Ra.__name__=["albero_cli","proxy","SendQueueProxy"],Ra.__super__=br,Ra.prototype=r(br.prototype,{restart:function(){this.sendMsgQueue.sendNext(),this.sendAnnounceQueue.sendNext()},retryAfter:function(e){this.sendMsgQueue.retryAfter(e),this.sendAnnounceQueue.retryAfter(e)},sendNextTalkMessage:function(){this.sendMsgQueue.sendNext()},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 hi(0,this.sendCount++);this.messageEvent.registEmitter("_"+i.high+"_"+i.low,n);var r=new qt;if(r.id=i,r.domainId=e,r.talkId=t,r.content=this.parseContent(n),r.type=this.detectType(r.content),r.type==Qt.unknown)return;if(r.type==Qt.file&&null!=r.content.path)return void this.sendFile(t,r.content,"_"+i.high+"_"+i.low);if(r.type==Qt.noteCreated)return void this.sendNote(t,r.content,"_"+i.high+"_"+i.low);r.type!=Qt.yesOrNo&&r.type!=Qt.selectOne||null!=r.content.listing||(r.content.listing=!1),this.applyLimitToMessage(r),this.pushQueue(r)}else for(var a=0,o=I.slice(n,1024);a2)a=new hi(y.parseInt(o[1]),y.parseInt(o[2]));else a=null}else if("close_yesno"==i||"close_select"==i||"close_task"==i){e.close=u.substr(i,6,null),i="in_reply_to";var s=r.split("_");if(s.length>2)a=new hi(y.parseInt(s[1]),y.parseInt(s[2]));else a=null}else"stampset_id"!=i&&"stamp_id"!=i||(a=La._from(r).toInt64());null!=a&&(e[i]=a)}else if(null!=r&&v.isObject(e)&&null!=r.high&&null!=r.low){var l=new hi(r.high,r.low);e[i]=l}}return 1==t.length&&null!=e.text?e.text:e},detectType:function(e){if(null==e)return Qt.unknown;if("string"==typeof e)return Qt.text;if(null!=e.stamp_set)return Qt.stamp;if(null!=e.stampset_id)return Qt.originalStamp;if(null!=e.lat)return Qt.geo;if(null!=e.file_id||null!=e.path)return Qt.file;if(null!=e.close){var t=e.close;if(v.deleteField(e,"close"),"yesno"==t)return Qt.yesOrNoClosed;if("select"==t)return Qt.selectOneClosed;if("task"==t)return Qt.todoClosed}else if(null!=e.in_reply_to){if("boolean"==typeof e.response)return Qt.yesOrNoReply;var n=e.response;if("number"==typeof n&&(0|n)===n)return Qt.selectOneReply;if(null!=e.done)return Qt.todoDone}else{if(null!=e.question)return null==e.options?Qt.yesOrNo:Qt.selectOne;if(null!=e.title)return Qt.todo;if(null!=e.note_title)return Qt.noteCreated}return Qt.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 13:case 15:var i=e.content.question;if(null!=i&&i.length>1024&&(e.content.question=i.substring(0,1024)),e.type==Qt.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 17:var l=e.content.title;null!=l&&l.length>1024&&(e.content.title=l.substring(0,1024))}},__class__:Ra});var xa=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)};n["albero_cli.proxy._SendQueueProxy.SendQueue"]=xa,xa.__name__=["albero_cli","proxy","_SendQueueProxy","SendQueue"],xa.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){var e=(new Date).getTime()-this.lastSendTime.getTime(),t=0|Math.max(this.sendSpan-e,100);qa.delay(Go(this,this.sendNotification),t)}else this.closeQueue()},retryAfter:function(e){this.sending&&null!=this.lastSendNode?(this.sendQueue.unshift(this.lastSendNode),this.saveQueue(),qa.delay(Go(this,this.sendNotification),e)):this.closeQueue()},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__:xa};var Ua=function(e,t,n){this.code=e,this.message=t,this.detail=n};n["albero_cli.value.ApiErrorResponse"]=Ua,Ua.__name__=["albero_cli","value","ApiErrorResponse"],Ua.of=function(e){switch(e.code){case 400:if("invalid parameter"==e.message)return new Ua(Pa.INVALID_PARAMETER);break;case 403:if("forbidden"==e.message)return new Ua(Pa.FORBIDDEN);break;case 404:if("not found"==e.message)return new Ua(Pa.NOT_FOUND);break;case 409:switch(e.message){case"conflict":return new Ua(Pa.CONFLICT);case"locked by another user":return new Ua(Pa.LOCKED_BY_ANOTHER_USER,null,{userId:e.detail.user_id})}break;case 429:return Ua.createTooManyRequestsError(e.message,e.detail.retry_after)}return dr.w("please contact us: error = "+y.string(e)),new Ua(Pa.UNKNOWN)},Ua.createInvalidParameterError=function(e){return new Ua(Pa.INVALID_PARAMETER,e)},Ua.createTooManyRequestsError=function(e,t){return new Ua(Pa.TOO_MANY_REQUESTS,e,{retryAfter:t})},Ua.prototype={__class__:Ua};var Pa=function(){};n["albero_cli.value.ApiErrorCode"]=Pa,Pa.__name__=["albero_cli","value","ApiErrorCode"];var La=function(){};n["albero_cli.value.IDUtil"]=La,La.__name__=["albero_cli","value","IDUtil"],La._from=function(e){if(null==e)return null;if("string"==typeof e){var t=La.parseInt64(e);if(null!=t)return new Ba(t)}if(null!=e.high&&null!=e.low){var n=La.parseInt64(La.stringifyInt64(e,!0));if(null!=n)return new Ba(n)}return null},La.parseInt64=function(e){return e.length>0&&"_"==e.charAt(0)?U.makeFromIdStr(e):U.parse(e)},La.stringifyInt64=function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:Wa.toString(e)},La.prototype={from:function(e){return La._from(e)},__class__:La};var Ba=function(e){this.value=e};n["albero_cli.value.ID"]=Ba,Ba.__name__=["albero_cli","value","ID"],Ba.prototype={toString:function(){return Wa.toString(this.value)},toDaabID:function(){var e=this.value;return"_"+e.high+"_"+e.low},toInt64:function(){return this.value},eq:function(e){if(this==e)return!0;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},__class__:Ba};var Ha=function(){};n["albero_cli.value.note.DeleteNoteResult"]=Ha,Ha.__name__=["albero_cli","value","note","DeleteNoteResult"],Ha.of=function(e){return new Ha},Ha.prototype={__class__:Ha};var Ga=function(e){this.note=e};n["albero_cli.value.note.GetNoteResult"]=Ga,Ga.__name__=["albero_cli","value","note","GetNoteResult"],Ga.of=function(e){return new Ga(Na.of(e.note))},Ga.prototype={__class__:Ga};var ja=function(e){this.note=e};n["albero_cli.value.note.UpdateNoteResult"]=ja,ja.__name__=["albero_cli","value","note","UpdateNoteResult"],ja.of=function(e){return new ja(Na.of(e.note))},ja.prototype={__class__:ja};var Ya=function(){};n["haxe.IMap"]=Ya,Ya.__name__=["haxe","IMap"],Ya.prototype={__class__:Ya};var za={};n["haxe._Int32.Int32_Impl_"]=za,za.__name__=["haxe","_Int32","Int32_Impl_"],za.ucompare=function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0};var Wa={};n["haxe._Int64.Int64_Impl_"]=Wa,Wa.__name__=["haxe","_Int64","Int64_Impl_"],Wa.toString=function(e){var t=e,n=new hi(0,0);if(t.high==n.high&&t.low==n.low)return"0";var i="",r=!1;t.high<0&&(r=!0);for(var a=new hi(0,10);;){var o=new hi(0,0);if(t.high==o.high&&t.low==o.low)break;var s=Wa.divMod(t,a);if(s.modulus.high<0){var l=s.modulus,u=~l.high,c=-l.low;if(0==c){u++;u|=0}i=new hi(u,c).low+i;var _=s.quotient,h=~_.high,d=-_.low;if(0==d){h++;h|=0}t=new hi(h,d)}else i=s.modulus.low+i,t=s.quotient}return r&&(i="-"+i),i},Wa.divMod=function(e,t){if(0==t.high)switch(t.low){case 0:throw new go("divide by zero");case 1:return{quotient:new hi(e.high,e.low),modulus:new hi(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 hi(r,a)}else{n=new hi(e.high,e.low)}if(t.high<0){var o=~t.high,s=-t.low;if(0==s){o++;o|=0}t=new hi(o,s)}else t=t;for(var l=new hi(0,0),u=new hi(0,1);!(t.high<0);){var c=za.ucompare(t.high,n.high),_=0!=c?c:za.ucompare(t.low,n.low),h=1;if(0==(h&=63))t=new hi(t.high,t.low);else if(h<32){t=new hi(t.high<>>32-h,t.low<>>32-d,u.low<=0)break}for(;;){var f=new hi(0,0);if(u.high==f.high&&u.low==f.low)break;var m=za.ucompare(n.high,t.high);if((0!=m?m:za.ucompare(n.low,t.low))>=0){l=new hi(l.high|u.high,l.low|u.low);var p=n.high-t.high|0,g=n.low-t.low|0;if(za.ucompare(n.low,t.low)<0){p--;p|=0}n=new hi(p,g)}var v=1;if(0==(v&=63))u=new hi(u.high,u.low);else if(v<32){u=new hi(u.high>>>v,u.high<<32-v|u.low>>>v)}else{u=new hi(0,u.high>>>v-32)}var y=1;if(0==(y&=63))t=new hi(t.high,t.low);else if(y<32){t=new hi(t.high>>>y,t.high<<32-y|t.low>>>y)}else{t=new hi(0,t.high>>>y-32)}}if(i){var S=~l.high,w=-l.low;if(0==w){S++;S|=0}l=new hi(S,w)}if(e.high<0){var I=~n.high,T=-n.low;if(0==T){I++;I|=0}n=new hi(I,T)}return{quotient:l,modulus:n}};var Ka=function(){};n["haxe.Int64Helper"]=Ka,Ka.__name__=["haxe","Int64Helper"],Ka.parseString=function(e){var t=new hi(0,10),n=new hi(0,0),i=new hi(0,1),r=!1,a=w.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s9)throw new go("NumberFormatError");var h=new hi(_>>31,_);if(r){var d=65535&i.low,f=i.low>>>16,m=65535&h.low,p=h.low>>>16,g=za._mul(d,m),v=za._mul(f,m),y=za._mul(d,p),S=g,I=(za._mul(f,p)+(y>>>16)|0)+(v>>>16)|0;if(S=S+(y<<=16)|0,za.ucompare(S,y)<0){I++;I|=0}if(S=S+(v<<=16)|0,za.ucompare(S,v)<0){I++;I|=0}I=I+(za._mul(i.low,h.high)+za._mul(i.high,h.low)|0)|0;var T=new hi(I,S),N=n.high-T.high|0,E=n.low-T.low|0;if(za.ucompare(n.low,T.low)<0){N--;N|=0}if(!((n=new hi(N,E)).high<0))throw new go("NumberFormatError: Underflow")}else{var A=65535&i.low,b=i.low>>>16,k=65535&h.low,D=h.low>>>16,C=za._mul(A,k),O=za._mul(b,k),M=za._mul(A,D),F=C,R=(za._mul(b,D)+(M>>>16)|0)+(O>>>16)|0;if(F=F+(M<<=16)|0,za.ucompare(F,M)<0){R++;R|=0}if(F=F+(O<<=16)|0,za.ucompare(F,O)<0){R++;R|=0}R=R+(za._mul(i.low,h.high)+za._mul(i.high,h.low)|0)|0;var x=new hi(R,F),U=n.high+x.high|0,P=n.low+x.low|0;if(za.ucompare(P,n.low)<0){U++;U|=0}if((n=new hi(U,P)).high<0)throw new go("NumberFormatError: Overflow")}var L=65535&i.low,B=i.low>>>16,H=65535&t.low,G=t.low>>>16,j=za._mul(L,H),Y=za._mul(B,H),z=za._mul(L,G),W=j,K=(za._mul(B,G)+(z>>>16)|0)+(Y>>>16)|0;if(W=W+(z<<=16)|0,za.ucompare(W,z)<0){K++;K|=0}if(W=W+(Y<<=16)|0,za.ucompare(W,Y)<0){K++;K|=0}K=K+(za._mul(i.low,t.high)+za._mul(i.high,t.low)|0)|0,i=new hi(K,W)}return n};var Va=function(){this.buf=new S,this.cache=[],this.useCache=Va.USE_CACHE,this.useEnumIndex=Va.USE_ENUM_INDEX,this.shash=new ao,this.scount=0};n["haxe.Serializer"]=Va,Va.__name__=["haxe","Serializer"],Va.run=function(e){var t=new Va;return t.serialize(e),t.toString()},Va.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Xo[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!=Xo[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;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+=y.string(h.getTime());break;case _:this.buf.b+="l";for(var d=e.h;null!=d;){var f=d.item;d=d.next;var m=f;this.serialize(m)}this.buf.b+="h";break;case to:this.buf.b+="q";for(var p=e,g=p.keys();g.hasNext();){var S=g.next();this.buf.b+=":",this.buf.b+=null==S?"null":""+S,this.serialize(p.h[S])}this.buf.b+="h";break;case no:this.buf.b+="M";for(var w=e,I=w.keys();I.hasNext();){var T=I.next(),E=v.field(T,"__id__");v.deleteField(T,"__id__"),this.serialize(T),T.__id__=E,this.serialize(w.h[T.__id__])}this.buf.b+="h";break;case ao:this.buf.b+="b";for(var A=e,b=A.keys();b.hasNext();){var k=b.next();this.serializeString(k),this.serialize(null!=Xo[k]?A.getReserved(k):A.h[k])}this.buf.b+="h";break;case oo:var D=e;this.buf.b+="s",this.buf.b+=y.string(Math.ceil(8*D.length/6)),this.buf.b+=":";var C=0,O=D.length-2,M=Va.BASE64_CODES;if(null==M){var F=Va.BASE64.length;M=new Array(F);for(var R=0,x=Va.BASE64.length;R>2]),this.buf.b+=String.fromCharCode(M[63&(P<<4|L>>4)]),this.buf.b+=String.fromCharCode(M[63&(L<<2|B>>6)]),this.buf.b+=String.fromCharCode(M[63&B])}if(C==O){var H=D.b[C++],G=D.b[C++];this.buf.b+=String.fromCharCode(M[H>>2]),this.buf.b+=String.fromCharCode(M[63&(H<<4|G>>4)]),this.buf.b+=String.fromCharCode(M[G<<2&63])}else if(C==O+1){var j=D.b[C++];this.buf.b+=String.fromCharCode(M[j>>2]),this.buf.b+=String.fromCharCode(M[j<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(N.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(N.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+=y.string(this.useEnumIndex?"j":"w"),this.serializeString(N.getEnumName(Y)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=y.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var z=e.length;this.buf.b+=y.string(z-2);for(var W=2,K=z;W57)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(u.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw new go("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new go("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 go("Invalid enum format");var n=this.readDigits();if(0==n)return N.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return N.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 go("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new go("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new go("Class not found "+r);var o=N.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new go("Invalid custom data");return o;case 77:var s=new no;this.cache.push(s);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var l=this.unserialize();s.set(l,this.unserialize())}return this.pos++,s;case 82:var c=this.readDigits();if(c<0||c>=this.scache.length)throw new go("Invalid string reference");return this.scache[c];case 97:this.buf;var h=[];for(this.cache.push(h);;){var d=this.buf.charCodeAt(this.pos);if(104==d){this.pos++;break}if(117==d){this.pos++;var f=this.readDigits();h[h.length+f-1]=null}else h.push(this.unserialize())}return h;case 98:var m=new ao;this.cache.push(m);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=Xo[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 go("Class not found "+v);var S=N.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(),I=this.resolver.resolveEnum(w);if(null==I)throw new go("Enum not found "+w);this.pos++;var T=this.readDigits(),E=I.__constructs__.slice()[T];if(null==E)throw new go("Unknown enum index "+w+"@"+T);var A=this.unserializeEnum(I,E);return this.cache.push(A),A;case 107:return NaN;case 108:var b=new _;this.cache.push(b);for(this.buf;104!=this.buf.charCodeAt(this.pos);)b.add(this.unserialize());return this.pos++,b;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 to;this.cache.push(D);this.buf;for(var C=this.buf.charCodeAt(this.pos++);58==C;){var O=this.readDigits(),M=this.unserialize();D.h[O]=M,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new go("Invalid IntMap format");return D;case 114:var F=this.readDigits();if(F<0||F>=this.cache.length)throw new go("Invalid reference");return this.cache[F];case 115:var R=this.readDigits(),x=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0))),G=0;P>4);var z=U[x.charCodeAt(P++)];H.b[G++]=255&(Y<<4|z>>2);var W=U[x.charCodeAt(P++)];H.b[G++]=255&(z<<6|W)}if(L>=2){var K=U[x.charCodeAt(P++)],V=U[x.charCodeAt(P++)];if(H.b[G++]=255&(K<<2|V>>4),3==L){var q=U[x.charCodeAt(P++)];H.b[G++]=255&(V<<4|q>>2)}}return this.pos+=R,this.cache.push(H),H;case 116:return!0;case 118:var Q;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))Q=u.strDate(u.substr(this.buf,this.pos,19)),this.pos+=19;else{var J=this.readFloat();Q=new Date(J)}return this.cache.push(Q),Q;case 119:var X=this.unserialize(),Z=this.resolver.resolveEnum(X);if(null==Z)throw new go("Enum not found "+X);var $=this.unserializeEnum(Z,this.unserialize());return this.cache.push($),$;case 120:throw go.wrap(this.unserialize());case 121:var ee=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 Za(e.left,e.key,e.value,new Za(e.right,t,n,i)):new Za(new Za(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Za(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 Za(new Za(e,t,n,i.left),i.key,i.value,i.right):new Za(new Za(e,t,n,i.left.left),i.left.key,i.left.value,new Za(i.left.right,i.key,i.value,i.right))}return new Za(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return v.compare(e,t)},__class__:Xa};var Za=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};n["haxe.ds.TreeNode"]=Za,Za.__name__=["haxe","ds","TreeNode"],Za.prototype={__class__:Za};var $a=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};$a.Left=function(e){var t=["Left",0,e];return t.__enum__=$a,t.toString=i,t},$a.Right=function(e){var t=["Right",1,e];return t.__enum__=$a,t.toString=i,t},$a.__empty_constructs__=[];var eo=function(){Xa.call(this)};n["haxe.ds.EnumValueMap"]=eo,eo.__name__=["haxe","ds","EnumValueMap"],eo.__interfaces__=[Ya],eo.__super__=Xa,eo.prototype=r(Xa.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 oo(new Uint8Array(t).buffer)},oo.ofData=function(e){var t=e.hxBytes;return null!=t?t:new oo(e)},oo.fastGet=function(e,t){return e.bytes[t]},oo.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new go(fo.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__:oo};var so=function(){this.b=[]};n["haxe.io.BytesBuffer"]=so,so.__name__=["haxe","io","BytesBuffer"],so.prototype={getBytes:function(){var e=new oo(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:so};var lo=function(){};n["haxe.io.Input"]=lo,lo.__name__=["haxe","io","Input"],lo.prototype={readByte:function(){throw new go("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new go(fo.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof go&&(e=e.val),!vo.__instanceof(e,ho))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new oo(new ArrayBuffer(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new go(fo.Blocked);n+=i,e-=i}return t},readFloat:function(){return mo.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?mo.i64ToDouble(t,e):mo.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__:lo};var uo=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 go(fo.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};n["haxe.io.BytesInput"]=uo,uo.__name__=["haxe","io","BytesInput"],uo.__super__=lo,uo.prototype=r(lo.prototype,{readByte:function(){if(0==this.len)throw new go(new ho);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new go(fo.OutsideBounds);if(0==this.len&&n>0)throw new go(new ho);this.lene.length)throw new go(fo.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 go(fo.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(mo.floatToI32(e))},writeDouble:function(e){var t=mo.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 go(fo.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new go(fo.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new go(fo.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__:co};var _o=function(){this.b=new so};n["haxe.io.BytesOutput"]=_o,_o.__name__=["haxe","io","BytesOutput"],_o.__super__=co,_o.prototype=r(co.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 go(fo.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)},mo.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},mo.i64ToDouble=function(e,t){var n=(t>>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)},mo.doubleToI64=function(e){var t=mo.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 po=function(){};n["haxe.rtti.Meta"]=po,po.__name__=["haxe","rtti","Meta"],po.getMeta=function(e){return e.__meta__},po.getFields=function(e){var t=po.getMeta(e);return null==t||null==t.fields?{}:t.fields};var go=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,go)};n["js._Boot.HaxeError"]=go,go.__name__=["js","_Boot","HaxeError"],go.wrap=function(e){return e instanceof Error?e:new go(e)},go.__super__=Error,go.prototype=r(Error.prototype,{__class__:go});var vo=function(){};n["js.Boot"]=vo,vo.__name__=["js","Boot"],vo.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=vo.__nativeClassName(e);return null!=n?vo.__resolveNativeClass(n):null},vo.__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?",":"")+vo.__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+" : "+vo.__string_rec(e[f],t));return m+="\n"+(t=t.substring(1))+"}";case"string":return e;default:return String(e)}},vo.__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 go&&(e=e.val),!vo.__instanceof(e,ho))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=v.fields(e),o=c.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 o=new Po(Go(e,e.handleNotification),e),s=0,l=a.length;s{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,r={};((t,n)=>{for(var i in n)e(t,i,{get:n[i],enumerable:!0})})(r,{codePointCount:()=>o,extractMentionParts:()=>h,findMentionSuggestionHint:()=>f,hasMentionPartForMeOrAll:()=>l,invalidateManualMentionMarkup:()=>c,parseMessageMention:()=>_,removeMentionMarkup:()=>u});var a=e=>Array.from(e),o=e=>a(e).length,s=/{@:(ALL|\d+),(\d+)}@/g,l=e=>h(e).some(({userIdNumStr:e})=>null===e||"ALL"===e),u=e=>_(e).map(t=>"mention"===t.type?t.mentionText:"normal"===t.type?e.substring(t.start,t.end):"").join(""),c=e=>e.replace(s,e=>e.substring(0,e.length-1)+" "),_=e=>{let t=0;const n=h(e).flatMap(e=>{const n=[];return t!==e.start&&n.push({type:"normal",start:t,end:e.start}),n.push(e),t=e.end,n});return e.length!==t&&n.push({type:"normal",start:t,end:e.length}),n},h=e=>{let t=0;return Array.from(e.matchAll(s)).flatMap(n=>{var i;const r=null!=(i=n.index)?i:0;if(r{const t=e.match(d);return null===t?null:{prev:t[1],atMarks:t[2],keyword:t[3]}};return(r=>((r,a,o,s)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of n(a))i.call(r,l)||l===o||e(r,l,{get:()=>a[l],enumerable:!(s=t(a,l))||s.enumerable});return r})(e({},"__esModule",{value:!0}),r))(r)})();var Yo=jo.exports;String.prototype.__class__=n.String=String,String.__name__=["String"],n.Array=Array,Array.__name__=["Array"],Date.prototype.__class__=n.Date=Date,Date.__name__=["Date"];var zo=n.Int={__name__:["Int"]},Wo=n.Dynamic={__name__:["Dynamic"]},Ko=n.Float=Number;Ko.__name__=["Float"];var Vo=n.Bool=Boolean;Vo.__ename__=["Bool"];var qo=n.Class={__name__:["Class"]},Qo={},Jo={},Xo={};b.APP_STATE_CHANGED="app_state_changed",b.ACCESS_TOKEN_CHANGED="access_token_changed",b.CURRENT_USER_CHANGED="current_user_changed",b.CONFIGURATION_CHANGED="configuration_changed",b.DOMAIN_SELECTION_CHANGED="domain_selection_changed",b.TALK_SELECTION_CHANGED="talk_selection_changed",b.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",b.USER_SELECTION_NEEDED="user_selection_needed",b.USER_SELECTION_CHANGED="user_selection_changed",b.FRIEND_SELECTION_NEEDED="friend_selection_needed",b.COMMON_STAMP_SET_LOADED="common_stamp_set_loaded",b.STAMP_SELECTION_STARTED="stamp_selection_started",b.STAMP_SELECTION_ENDED="stamp_selection_ended",b.STAMP_SELECTION_CHANGED="stamp_selection_changed",b.ACTION_SELECTION_CHANGED="action_selection_changed",b.CURRENT_PAGE_CHANGED="current_page_changed",b.CURRENT_PAGE_REASSIGNED="current_page_reassgined",b.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",b.NOTE_FILEINFO_SELECTION_CHANGED="note_fileinfo_selection_changed",b.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",b.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",b.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",b.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",b.CLOSE_FILEPREVIEW_MODAL="close_filepreview_modal",b.ERROR_OCCURRED="error_occurred",b.UNREAD_COUNT_CHANGED="brand_badge_changed",b.SEND_FORM_TOP_CHANGED="send_form_top_changed",b.SOLUTIONS_LOADED="solutions_loaded",b.RIGHT_PANE_OPENED="right_pane_opened",b.RIGHT_PANE_CLOSED="right_pane_closed",b.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",b.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",b.PHOTO_EDITOR_SAVED="photo_editor_saved",b.ICON_EDITOR_SAVED="icon_editor_saved",b.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",b.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",b.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",b.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",b.PRESENCES_UPDATED="presences_updated",b.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",b.START_NOTE_EDITING="start_note_editing",b.OPEN_EXISTING_PAIR_TALK_COMPLETED="open_existing_pair_talk_completed",b.FIRST_ROUTING_WILL_START="first_routing_will_start",b.SIGNED_OUT="signed_out",b.ROUTUNG_TALK_FALLBACK="routing_talk_fallback",b.ROUTUNG_DOMAIN_FALLBACK="routing_domain_fallback",b.TALKS_SORT_MODE_CHANGED="talks_sort_mode_changed",b.DATA_RECOVERING="data_recovering",b.DATA_RECOVERED="data_recovered",b.NOTIFY_UPDATE_USER="notify_update_user",b.NOTIFY_ADD_FRIEND="notify_add_friend",b.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",b.NOTIFY_ADD_ACQUAINTANCES="notify_add_acquaintances",b.NOTIFY_DELETE_FRIEND="notify_delete_friend",b.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",b.NOTIFY_DELETE_ACQUAINTANCES="notify_delete_acquaintances",b.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",b.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",b.GET_USERS_RESPONSED="get_users_responsed",b.GET_PROFILE_RESPONSED="get_profile_responsed",b.GET_PROFILE_ERRORED="get_profile_errored",b.UPDATE_USER_RESPONSED="update_user_responsed",b.UPDATE_USER_ERRORED="update_user_errored",b.UPDATE_PROFILE_RESPONSED="update_profile_responsed",b.UPDATE_PROFILE_ERRORED="update_profile_errored",b.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",b.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",b.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",b.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",b.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",b.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",b.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",b.GET_ME_RESPONSED="get_me_responsed",b.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",b.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",b.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",b.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",b.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",b.NOTIFY_JOIN_DOMAIN="notify_join_domain",b.NOTIFY_UPDATE_DOMAIN="notify_update_domain",b.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",b.NOTIFY_ADD_DOMAIN_MEMBERS="notify_add_domain_members",b.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",b.CREATE_PAIR_TALK_COMPLETE="create_pair_talk_complete",b.CREATE_PAIR_TALK_FAIL="create_pair_talk_fail",b.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",b.CREATE_GROUP_TALK_COMPLETE="create_group_talk_complete",b.CREATE_GROUP_TALK_FAIL="create_group_talk_fail",b.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",b.UPDATE_GROUP_TALK_COMPLETE="update_group_talk_complete",b.UPDATE_GROUP_TALK_FAIL="update_group_talk_fail",b.NOTIFY_ADD_TALKERS="notify_add_talkers",b.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",b.NOTIFY_DELETE_TALKER="notify_delete_talker",b.NOTIFY_DELETE_TALK="notify_delete_talk",b.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",b.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",b.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",b.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",b.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",b.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",b.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",b.ADD_TALKERS_SUCCEEDED="add_talkers_succeeded",b.ADD_TALKERS_FAILED="add_talkers_failed",b.NOTIFY_CREATE_MESSAGE="notify_create_message",b.NOTIFY_DELETE_MESSAGE="notify_delete_message",b.NOTIFY_GET_MESSAGES="notify_get_messages",b.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",b.CREATE_MESSAGE_START="create_message_start",b.CREATE_MESSAGE_COMPLETE="create_message_complete",b.CREATE_MESSAGE_FAIL="create_message_fail",b.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",b.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",b.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",b.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",b.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",b.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",b.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",b.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",b.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",b.CREATE_ANNOUNCEMENT_START="create_announcement_start",b.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",b.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",b.NOTIFY_UPDATE_QUESTION="notify_update_question",b.NOTIFY_GET_QUESTIONS="get_questions_responsed",b.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",b.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",b.GET_FILE_RESPONSED="get_file_responsed",b.GET_FILE_PREVIEW="get_file_preview",b.CREATE_FILE_PREVIEW="create_file_preview",b.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",b.GET_NOTE_LOADED="get_note_loaded",b.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",b.CREATE_NOTE_COMPLETED="create_note_completed",b.CREATE_NOTE_FAILED="create_note_failed",b.UPDATE_NOTE_LOCAL_EDIT="update_note_local_edit",b.CLEAR_NOTE_LOCAL_EDIT="clear_note_local_edit",b.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",b.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",b.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",b.UPDATE_NOTE_SETTING_FAILED_BY_EDITING="update_note_setting_failed_by_editing",b.UPDATE_NOTE_COMPLETED="update_note_completed",b.DELETE_NOTE_COMPLETED="delete_note_completed",b.NOTIFY_CREATE_NOTE="notify_create_note",b.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",b.NOTIFY_DELETE_NOTE="notify_delete_note",b.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",b.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",b.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",b.NOTIFY_LOCK_NOTE="notify_lock_note",b.NOTIFY_UNLOCK_NOTE="notify_unlock_note",b.NOTIFY_SEARCH_MESSAGES="notify_search_messages",b.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",b.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",b.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",b.NOTIFY_SEARCH_PREPARE="notify_search_prepare",b.NOTIFY_SEARCH_CLEAR="notify_search_clear",b.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",b.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",b.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",b.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",b.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",b.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",b.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",b.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",b.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",b.JOIN_CONFERENCE_CANCELED="join_conference_canceled",b.GET_CONFERENCE_PARTICIPANTS_RESPONSED="get_conference_participants_responsed",b.NOTIFY_OPEN_CONFERENCE="notify_open_conference",b.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",b.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",b.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",b.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",b.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",b.NOTIFY_UPDATE_DOMAIN_STAMP_SETTING="notify_update_domain_stampsetting",b.NOTIFY_UPDATE_STAMPSET="notify_update_stampset",b.NOTIFY_DELETE_STAMPSET="notify_delete_stampset",b.NOTIFY_UPDATE_DOMAIN_BUILTIN_STAMP_SETTING="notify_update_domain_builtin_stampsetting",b.NOTIFY_FLOW_NOTIFICATION_BADGE="notify_flow_notification_badge",b.GET_FLOW_NOTIFICATION_BADGES_COMPLETED="get_flow_notification_badges_completed",b.GET_FLOW_NOTIFICATION_BADGES_FAILED="get_flow_notification_badges_failed",b.GET_DIRECT_APPS_COMPLETED="get_direct_apps_completed",b.GET_DIRECT_APPS_FAILED="get_direct_apps_failed",b.START_NOTIFICATION_FAILED="start_notification_failed",K.ANNOUNCEMENTS_KEY="-1",$.__meta__={fields:{api:{inject:null}}},$.NAME="AccountControlRequest",te.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},te.NAME="Conference",ie.__meta__={fields:{api:{inject:null}}},ie.NAME="Device",ae.__meta__={fields:{api:{inject:null}}},ae.NAME="Domain",se.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},se.NAME="FilePath",ue.__meta__={fields:{api:{inject:null}}},ue.NAME="FilePreview",ce.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},ce.NAME="LoadStampset",de.__meta__={fields:{api:{inject:null}}},de.NAME="ManageFriends",me.__meta__={fields:{api:{inject:null}}},me.NAME="Message",ge.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},ge.NAME="Note",ye.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},ye.NAME="Read",we.__meta__={fields:{api:{inject:null}}},we.NAME="ReloadData",Te.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},Te.NAME="Search",Ee.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},Ee.NAME="SelectTalk",be.__meta__={fields:{api:{inject:null}}},be.NAME="Send",ke.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},ke.NAME="SignIn",De.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},De.NAME="SignOut",Ce.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ce.NAME="Talk",Me.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Me.NAME="UpdateProfile",Fe.__meta__={fields:{api:{inject:null}}},Fe.NAME="UpdateUser",Re.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Re.NAME="UpdateUserPresences",Re.MAX_USERS_PER_API=100,xe.__meta__={fields:{routing:{inject:null}}},xe.NAME="Url",Qe.TalkAutoScrollDelay=1,Qe.TalkAutoScrollImmediately=2,Qe.TalkAutoScrollNone=3,Qe.TalksSortModeNewMessagesFirst="new_messages_first",Qe.TalksSortModeUnreadMessagesFirst="unread_messages_first",Qe.OLD_KEY_RIGHT_PANEL_OPENED="right_panel_opened",Qe.OLD_KEY_RIGHT_PANEL_WIDTH="right_panel_width",Qe.NAME="browser_settings",Xe.MAX_SIZE=72,$e.INCOMING_TIME=6e4,tt.DEFAULT_PRESENCE_EXPIRATION=3e5,it.DEFAULT_TTL=3600,it.DEFAULT_MAX_PARTICIPANTS=8,Ft.stagedFileInfosMaxId=0,Gt.TIMESTAMP_SHIFT=22,qt.MAX_READ_USER_IDS_COUNT=16,An.QUERY_DATE_TODAY="t",An.QUERY_DATE_YESTERDAY="-1d",An.QUERY_DATE_THREE_DAYS_BEFORE="-3d",Gn.HISTORY_TAB_NAME="stamp-history",di.SIXTY_MINUTES=new hi(0,36e5),di.FIFTEEN_MINUTES=new hi(0,9e5),Ki.PREFIX="note-",Ki.nextDummyId=new hi(-1,-1),Ji.CONTINUE_MARGIN_RATE=.1,sr.CHEKBOX_UNCHECKED="- [ ] ",sr.CHEKBOX_CHECKED="- [x] ",ur.TU_REG=new o("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),ur.XTU_REG=new o("ッ","gm"),dr.EMERGENCY=0,dr.ALERT=1,dr.CRITICAL=2,dr.ERROR=3,dr.WARNING=4,dr.NOTICE=5,dr.INFO=6,dr.DEBUG=7,dr.level=dr.getLogLevel(process.env.HUBOT_LOG_LEVEL),dr._d=7<=dr.level&&null!=console?console.log.bind(console):dr._nop,dr._i=6<=dr.level&&null!=console?console.info.bind(console):dr._nop,dr._w=4<=dr.level&&null!=console?console.warn.bind(console):dr._nop,dr._e=3<=dr.level&&null!=console?console.error.bind(console):dr._nop,yr.HIRAGANA_SMALL_A=12353,yr.HIRAGANA_NN=12435,yr.KATAKANA_SMALL_A=12449,Ar.NAME="accessTokenResolver",br.NAME="Proxy",kr.__meta__={fields:{settings:{inject:null},accountLoader:{inject:null},api:{inject:null}}},Cr.NAME="accountLoader",Mr.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null}}},Mr.NAME="broadcast",Fr.__meta__={fields:{wsApi:{inject:null},apiCaller:{inject:null},apiNote:{inject:null},settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},fileService:{inject:null},searchService:{inject:null},lastUsedAtUpdater:{inject:null}}},Fr.NAME="api",Fr.API_VERSION="1.122",Fr.UPDATE_VERSION="1.122_1",Fr.ACTIONS_COUNT_PER_API=20,Rr.__meta__={fields:{rpc:{inject:null}}},Rr.NAME="apiCaller",Rr.DELAY_FOR_DB_REPLICATION=500,Rr.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,Rr.API_TRY_COUNT=3,xr.__meta__={fields:{apiCaller:{inject:null},dataStore:{inject:null},settings:{inject:null}}},xr.NAME="apiNote",Ur.NAME="appState",Pr.__meta__={fields:{dataStore:{inject:null}}},Pr.NAME="dataFactory",Lr.NAME="dataStore",Lr.STORAGE_KEY_FOR_GENERAL="dataStore",Lr.STORAGE_KEY_FOR_TALKS="dataStoreTalks",Lr.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",Lr.STORAGE_KEY_FOR_USERS="dataStoreUsers",Lr.TYPE_FRIEND=0,Lr.TYPE_ACQUAINSTANCE=1,Lr.TYPE_NONE=2,Br.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Br.NAME="features",jr.NAME="fileService",Yr.__meta__={fields:{settings:{inject:null}}},zr.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},zr.NAME="keywordWatcher",zr.TALK_KEY_PREFIX="talk_",zr.ANNOUNCEMENT_KEY_PREFIX="announcement_",Wr.TEMP_HALF_SPACE="&SPACE",Wr.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",Qr.__meta__={fields:{settings:{inject:null}}},Qr.NAME="lastUsedAtUpdater",Qr.UPDATE_LAST_USED_AT_INTERVAL=6e5,Jr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Jr.NAME="limitations",Xr.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},Xr.NAME="rpc",Xr.lastMsgId=0,Zr.PING_INTERVAL_ON_CONNECTED=45e3,na.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},na.NAME="readStatusUpdater",ia.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},ia.NAME="routing",oa.__meta__={fields:{settings:{inject:null}}},oa.NAME="searchService",oa.LOAD_SIZE=20,oa.DUMMY_VALUE_FOR_SET=1,sa.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},api:{inject:null}}},sa.NAME="session",la.NAME="settings",la.KEY_ACCESS_TOKEN="access_token",la.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",la.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",la.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",la.KEY_INPUT_TEXT="input_text",la.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",la.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",la.KEY_SEARCH_HISTORIES="search_histories",la.KEY_MULTI_VIEW_MODE="multi_view_mode",la.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",la.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",la.KEY_IDFV="idfv",ua.__meta__={fields:{dataStore:{inject:null}}},ua.NAME="talksService",ca.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},ca.NAME="ThumbnailExpansion",_a.__meta__={fields:{dataStore:{inject:null}}},_a.NAME="userPresences",ha.__meta__={fields:{apiCaller:{inject:null}}},ha.NAME="wsApi",ba.NAME="Mediator",ka.__meta__={fields:{dataStore:{inject:null},api:{inject:null},hubotObject:{inject:null},messageEvent:{inject:null},sendQueue:{inject:null}}},ka.NAME="commandline",ka.DATA_SAVE_SPAN=5e3,Oa.__meta__={fields:{dataStore:{inject:null}}},Oa.NAME="hubotObject",Ma.__meta__={fields:{dataStore:{inject:null},hubotObject:{inject:null}}},Ma.NAME="messageEvent",Fa.minWaitMinute=1,Fa.maxWaitMinute=1440,Fa.SEND_EVENT_NAME="send",Ra.__meta__={fields:{messageEvent:{inject:null}}},Ra.NAME="sendQueue",Ra.MIN_SEND_SPAN_MESSAGE=550,Ra.MIN_SEND_SPAN_ANNOUNCE=5050,Ra.MAX_TEXT_LENGTH=1024,Ra.MAX_FIELD_COUNT=9,Ra.MAX_FIELD_LENGTH=64,Pa.INVALID_PARAMETER="INVALID_PARAMETER",Pa.FORBIDDEN="FORBIDDEN",Pa.NOT_FOUND="NOT_FOUND",Pa.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",Pa.CONFLICT="CONFLICT",Pa.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",Pa.UNKNOWN="UNKNOWN",za._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},Va.USE_CACHE=!1,Va.USE_ENUM_INDEX=!1,Va.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Ja.DEFAULT_RESOLVER=new Qa,Ja.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",no.count=0,mo.i64tmp=new hi(0,0),vo.__toStr={}.toString,Ao.FLOAT_SINGLE_MIN=1.401298464324817e-45,Ao.FLOAT_SINGLE_MAX=3.4028234663852886e38,Ao.FLOAT_DOUBLE_MIN=5e-324,Ao.FLOAT_DOUBLE_MAX=1.7976931348623157e308,a.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";var n={},i=function(){return vo.__string_rec(this,"")};function r(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 a=e.DirectAPI=function(){this.eventEmitter=new l};n.DirectAPI=a,a.__name__=["DirectAPI"],a.getInstance=function(){return null==a.instance&&(a.instance=new a),a.instance},a.main=function(){},a.prototype={setOptions:function(e){null!=e&&(Jo.host=e.host,Jo.endpoint=e.endpoint,Jo.accessToken=e.access_token,Jo.proxyURL=e.proxyURL,Jo.account=e.account,Jo.talkWithBot=e.talkWithBot,Jo.acceptableEventTimeDiff=e.acceptableEventTimeDiff,Jo.name=e.name,Jo.storagePath=e.storage_path,Jo.storageQuota=e.storage_quota,Jo.wsConfig=e.ws_config,null!=e.internalLogger&&dr.setInternalLogger(e.internalLogger)),dr.d("current settings",Jo),null==Jo.accessToken&&dr.e("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 hi(y.parseInt(a[1]),y.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 hi(y.parseInt(s[1]),y.parseInt(s[2]));else n=null}null!=n&&this.sendQueue.sendAnnouncement(n,t)},send:function(e,t){var n,i=e.room.split("_");i.length>2?n=new hi(y.parseInt(i[1]),y.parseInt(i[2])):n=null;null!=n&&null!=t&&this.sendQueue.sendMessage(n,t)},topic:function(e,t){var n,i=e.room.split("_");i.length>2?n=new hi(y.parseInt(i[1]),y.parseInt(i[2])):n=null;this.facade.sendNotification("Talk",Oe.UPDATE_FOR_HUBOT(n,t))},download:function(e,t,n){var i,r=null,a=null;"string"==typeof t?i=t:(i=t.url,r=t.path,a=t.name),null!=i?(null==a&&(a=Io.basename(i)),null==r&&(r=Io.join(wo.tmpdir(),a)),this.facade.sendNotification("FilePath",le.DOWNLOAD_PATH(i,r,n))):n(null,new Error("target URL is required"))},leave:function(e,t){var n,i,r=this,a=e.room.split("_");if(a.length>2){var o=new hi(y.parseInt(a[1]),y.parseInt(a[2]));n=o}else n=null;if(null==t)i=null;else{var s=t.id.split("_");if(s.length>2){var l=new hi(y.parseInt(s[1]),y.parseInt(s[2]));i=l}else i=null}qa.delay(function(){r.facade.sendNotification("Talk",Oe.DELETE_FOR_HUBOT(n,i))},500)},userForId:function(e,t){var n=U.fromNullableIdStr(t);return this.hubotObject.userObjectByIdStr(n,e)},userObjects:function(e){var t=U.fromNullableIdStr(e);return this.hubotObject.userObjects(t)},talkObjects:function(){return this.hubotObject.talkObjects()},domainObjects:function(){return this.hubotObject.domainObjects()},parseInt64:function(e){return La.parseInt64(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),La.stringifyInt64(e,t)},listen:function(){this.facade=b.getInstance(),this.api=vo.__cast(this.facade.retrieveProxy("api"),Fr),this.data=vo.__cast(this.facade.retrieveProxy("dataStore"),Lr),this.ID=new La,this.hubotObject=vo.__cast(this.facade.retrieveProxy("hubotObject"),Oa),this.sendQueue=vo.__cast(this.facade.retrieveProxy("sendQueue"),Ra);var e=vo.__cast(this.facade.retrieveProxy("fileService"),Hr);this.notes=new ma(new pa(this,this.api,e)),this.mention=new f,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__:a};var o=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};n.EReg=o,o.__name__=["EReg"],o.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);){if(!this.matchSub(e,n)){i+=y.string(u.substr(e,n,null));break}var r=this.matchedPos();if(i+=y.string(u.substr(e,n,r.pos-n)),i+=y.string(t(this)),0==r.len?(i+=y.string(u.substr(e,r.pos,1)),n=r.pos+1):n=r.pos+r.len,!this.r.global)break}return!this.r.global&&n>0&&n0?this.interval-(e-this.basetime):this.interval,Math.ceil(t/1e3)},createError:function(e){var t=this.max+" calls every "+Math.floor(this.interval/1e3)+" sec";return Ua.createTooManyRequestsError(t,this.calculateRetryAfter(e))},apply:function(e){var t=this;return new Promise(function(n,i){var r=t._now();if(t.max>0&&r-t.basetime>t.interval)t.basetime=r,t.count=1;else{if(!(t.max>0&&t.countt?1:-1},v.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__)},v.isEnumValue=function(e){return null!=e&&null!=e.__enum__},v.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var y=function(){};n.Std=y,y.__name__=["Std"],y.string=function(e){return vo.__string_rec(e,"")},y.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=u.cca(e,1)&&88!=u.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t};var S=function(){this.b=""};n.StringBuf=S,S.__name__=["StringBuf"],S.prototype={toString:function(){return this.b},__class__:S};var w=function(){};n.StringTools=w,w.__name__=["StringTools"],w.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},w.startsWith=function(e,t){return e.length>=t.length&&u.substr(e,0,t.length)==t},w.isSpace=function(e,t){var n=u.cca(e,t);return n>8&&n<14||32==n},w.ltrim=function(e){for(var t=e.length,n=0;n0?u.substr(e,n,t-n):e},w.rtrim=function(e){for(var t=e.length,n=0;n0?u.substr(e,0,t-n):e},w.trim=function(e){return w.ltrim(w.rtrim(e))},w.replace=function(e,t,n){return e.split(t).join(n)},w.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,(e>>>=4)>0;);if(null!=t)for(;n.lengtht;){var i=u.substr(e,0,t);n.push(i),e=u.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=n.ValueType={__ename__:["ValueType"],__constructs__:["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"]};T.TNull=["TNull",0],T.TNull.toString=i,T.TNull.__enum__=T,T.TInt=["TInt",1],T.TInt.toString=i,T.TInt.__enum__=T,T.TFloat=["TFloat",2],T.TFloat.toString=i,T.TFloat.__enum__=T,T.TBool=["TBool",3],T.TBool.toString=i,T.TBool.__enum__=T,T.TObject=["TObject",4],T.TObject.toString=i,T.TObject.__enum__=T,T.TFunction=["TFunction",5],T.TFunction.toString=i,T.TFunction.__enum__=T,T.TClass=function(e){var t=["TClass",6,e];return t.__enum__=T,t.toString=i,t},T.TEnum=function(e){var t=["TEnum",7,e];return t.__enum__=T,t.toString=i,t},T.TUnknown=["TUnknown",8],T.TUnknown.toString=i,T.TUnknown.__enum__=T,T.__empty_constructs__=[T.TNull,T.TInt,T.TFloat,T.TBool,T.TObject,T.TFunction,T.TUnknown];var N=function(){};n.Type=N,N.__name__=["Type"],N.getClassName=function(e){var t=e.__name__;return null==t?null:t.join(".")},N.getEnumName=function(e){return e.__ename__.join(".")},N.resolveClass=function(e){var t=n[e];return null!=t&&t.__name__?t:null},N.resolveEnum=function(e){var t=n[e];return null!=t&&t.__ename__?t:null},N.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 go("Too many arguments")}},N.createEmptyInstance=function(e){function t(){}return t.prototype=e.prototype,new t},N.createEnum=function(e,t,n){var i=v.field(e,t);if(null==i)throw new go("No such constructor "+t);if(v.isFunction(i)){if(null==n)throw new go("Constructor "+t+" need parameters");return i.apply(e,n)}if(null!=n&&0!=n.length)throw new go("Constructor "+t+" does not need parameters");return i},N.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=vo.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}},N.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));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():M.dateString(r,!1)},M.getDateStringForNotification=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():r.getMonth()+1+"/"+r.getDate()},M.datetimeStringIn11Chars=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296)),a=M.dateString(r,!1);return t.getFullYear()==r.getFullYear()&&(a+=" "+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()),a},M.timeString=function(e){if(null==e)return"";var t=e.high,n=e.low,i=new Date(4294967296*t+(n>=0?n:n+4294967296));return i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes()},M.datetimeString=function(e){if(null==e)return"";var t=parseFloat(Wa.toString(e)),n=new Date(t);return n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate()+" "+n.getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes()};var F=function(){};n["albero.FileDynamicHelper"]=F,F.__name__=["albero","FileDynamicHelper"],F.filterDeleted=function(e){return null==e?[]:e.filter(F.isNotDeleted)},F.isNotDeleted=function(e){return null==e.deleted||!e.deleted},F.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 H.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 R=function(){};n["albero.FileHelper"]=R,R.__name__=["albero","FileHelper"],R.createByteSizeStringWithUnit=function(e){if(null==e)return"0 B";for(var t,n=["","K","M","G","T"];;){var i=new hi(0,1024),r=t=Wa.divMod(e,i).quotient,a=new hi(0,0),o=r.high-a.high|0;if(o=0!=o?o:za.ucompare(r.low,a.low),!((r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0))break;e=t,n.shift()}return Wa.toString(e)+" "+n.shift()+"B"},R.extractFilenameExceptExtension=function(e){return new o("\\.(?=[^.]+$)","").split(e)[0]};var x=function(){};n["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 U=function(){};n["albero.Int64Helper"]=U,U.__name__=["albero","Int64Helper"],U.parse=function(e){if(!new o("^\\d+$","").match(e))return null;for(var t=new hi(0,0),n=new hi(0,10),i=0,r=e.length;i>>16,u=65535&n.low,c=n.low>>>16,_=za._mul(s,u),h=za._mul(l,u),d=za._mul(s,c),f=_,m=(za._mul(l,c)+(d>>>16)|0)+(h>>>16)|0;if(f=f+(d<<=16)|0,za.ucompare(f,d)<0){m++;m|=0}if(f=f+(h<<=16)|0,za.ucompare(f,h)<0){m++;m|=0}m=m+(za._mul(t.low,n.high)+za._mul(t.high,n.low)|0)|0;var p=new hi(m,f),g=new hi(0,y.parseInt(e.charAt(a))),v=p.high+g.high|0,S=p.low+g.low|0;if(za.ucompare(S,p.low)<0){v++;v|=0}t=new hi(v,S)}return t},U.getHigh=function(e){return e.high},U.getLow=function(e){return e.low},U.idStr=function(e){return"_"+e.high+"_"+e.low},U.makeFromIdStr=function(e){var t=new o("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new hi(y.parseInt(t.matched(1)),y.parseInt(t.matched(2))):null},U.fromNullableIdStr=function(e){return null!=e?U.makeFromIdStr(e):null},U.toStr=function(e){return Wa.toString(e)},U.isNeg=function(e){return e.high<0},U.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(za.ucompare(i,e.low)<0){n++;n|=0}return new hi(n,i)},U.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(za.ucompare(e.low,t.low)<0){n--;n|=0}return new hi(n,i)},U.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:za.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:t.high>=0?n:1},U.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},U.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},U.toFloat=function(e){var t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)},U.idStrToInt64=function(e){var t=e.split("_");return t.length>2?new hi(y.parseInt(t[1]),y.parseInt(t[2])):null},U.decrement=function(e){if(null==e)return null;var t=new hi(0,1),n=e.high-t.high|0,i=e.low-t.low|0;if(za.ucompare(e.low,t.low)<0){n--;n|=0}return new hi(n,i)},U.increment=function(e){if(null==e)return null;var t=new hi(0,1),n=e.high+t.high|0,i=e.low+t.low|0;if(za.ucompare(i,e.low)<0){n++;n|=0}return new hi(n,i)},U.unique=function(e){if(null==e)return[];for(var t=[],n=0,i=e.length;n>31,t)},U.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 hn(d.id,f))}}}else{for(var w=[],I=(u.iter(n),0);I0&&a.push(new hn(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:Me});var Fe=function(){Z.call(this)};n["albero.command.UpdateUserCommand"]=Fe,Fe.__name__=["albero","command","UpdateUserCommand"],Fe.__super__=Z,Fe.prototype=r(Z.prototype,{execute:function(e){var t=e.getBody();if(null!=t.profileImage){var n=t.profileImage;if(!w.startsWith(n.type,"image/"))return}this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:Fe});var Re=function(){Z.call(this)};n["albero.command.UpdateUserPresencesCommand"]=Re,Re.__name__=["albero","command","UpdateUserPresencesCommand"],Re.__super__=Z,Re.prototype=r(Z.prototype,{execute:function(e){var t=e.getBody().domainId,n=e.getBody().userIds;if(null!=t&&null!=n){var i=this.filterOnlyExpired(U.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 hi(i>>31,i);return e.filter(function(e){var i=H.map(t.userPresences.getUserPresence(e),function(e){return e.isExpired(n,r)});switch(i[1]){case 0:return i[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){for(var n=this,i=Promise.resolve([]),r=U.splitUsingMaxCount(t,100),a=0;a0?e.createAttachmentErrorMessageByNetwork(n):t.createAttachmentErrorMessageByDomain(n)},ze.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 hr.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return hr.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return hr.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return hr.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 hr.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return hr.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return hr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return hr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:return function(e){return new o("image.*","").match(e.type)};case 3:return function(e){return new o("image.*|video.*","").match(e.type)};case 4:return function(e){return new o("image.*|video.*|audio.*","").match(e.type)};default:return function(e){return!0}}},createDataTransferItemFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:var e=new o("image.*","");return function(t){return e.match(t.type)};case 3:var t=new o("image.*|video.*","");return function(e){return t.match(e.type)};case 4:var n=new o("image.*|video.*|audio.*","");return function(e){return n.match(e.type)};default:return function(e){return!0}}},__class__:ze};var We=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=qt.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)};n["albero.entity.Announcement"]=We,We.__name__=["albero","entity","Announcement"],We.prototype={getDisplayTextWithoutEscape:function(){return qt.getDisplayTextWithoutEscape(this.type,this.content)},getNotificatoinTextWithoutEscape:function(e){switch(null==e&&(e=this.userName),null==e&&(e=""),this.type[1]){case 1:case 7:return e+":"+this.getDisplayTextWithoutEscape();default:return dr.e("Unsupported announcement.type is detected. announcment:%o",this),qt.getUnsupportText()}},__class__:We};var Ke=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 We(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};n["albero.entity.AnnouncementStatus"]=Ke,Ke.__name__=["albero","entity","AnnouncementStatus"],Ke.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 a=!0;if(a){var u;if(null!=n){var c=o.high-n.high|0;c=0!=c?c:za.ucompare(o.low,n.low),u=(o.high<0?n.high<0?c:-1:n.high>=0?c:1)>0}else u=!0;u&&(n=o),++t}}null!=n&&this.read(n,t)},updateByAnnouncementDeletion:function(e){var t,n=!1;if(this.isUnread(e)&&(this.decrementUnreadCount(1),n=!0),null!=this.maxAnnouncementId){var i=this.maxAnnouncementId;t=null!=i&&null!=e&&i.high==e.high&&i.low==e.low}else t=!1;return t&&null!=this.maxAnnouncement&&(this.maxAnnouncement.type=Qt.deleted,this.maxAnnouncement.content="",n=!0),n},updateByAnnouncement:function(e){this.isNewMax(e.id)&&(this.maxAnnouncementId=e.id,this.maxAnnouncement=e),this.unreadCount++},updateByReadingAnnouncements:function(e){if(null==e||this.canRegardAnnouncementReadCountZero(e)){if(!Ve.isUnreadAnnouncementExisted(this))return!1;if(null==this.maxAnnouncementId)return!1;this.readAll()}else{var t=e.filter(Go(this,this.isUnread));if(0==t.length)return!1;this.read(t[t.length-1],t.length)}return!0},canRegardAnnouncementReadCountZero:function(e){var t=this.maxAnnouncementId,n=H.orNull(L.lastOption(e));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},read:function(e,t){this.maxReadAnnouncementId=e,this.decrementUnreadCount(t),dr.v("Announcement status is updated. [domainId, maxReadAnnoundementId, unreadCount]:",this.domainId,this.maxReadAnnouncementId,this.unreadCount)},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},readAll:function(){this.maxReadAnnouncementId=this.maxAnnouncementId,this.unreadCount=0},isUnread:function(e){if(null!=this.maxReadAnnouncementId){var t=this.maxReadAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:za.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:za.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},__class__:Ke};var Ve=function(){};n["albero.entity.AnnouncementStatusHelper"]=Ve,Ve.__name__=["albero","entity","AnnouncementStatusHelper"],Ve.isUnreadAnnouncementExisted=function(e){return null!=e&&(null!=e.maxAnnouncement&&e.isUnread(e.maxAnnouncement.id))},Ve.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var qe=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};n["albero.entity.AnnouncementStatusUpdate"]=qe,qe.__name__=["albero","entity","AnnouncementStatusUpdate"],qe.prototype={__class__:qe};var Qe=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.talkAutoScroll=1,this.talksSortMode="new_messages_first",this.talkRightPanelOpened=!0,this.talkRightPanelWidth=0,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.notificationIncludingMessageContent&&(this.notificationIncludingMessageContent=e.notificationIncludingMessageContent),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),null!=e.talkRightPanelOpened?this.talkRightPanelOpened=e.talkRightPanelOpened:this.talkRightPanelOpened=null==G.getItem("right_panel_opened"),null!=e.talkRightPanelWidth)this.talkRightPanelWidth=e.talkRightPanelWidth;else{var t=y.parseInt(G.getItem("right_panel_width"));this.talkRightPanelWidth=null==t?0:t}if(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 n=0,i=vo.__cast(e.userDataContainer,Array);ne.version},isStampsetEnabled:function(e){return c.has(this.allowCreateMessageStampCategories,e)},isStampCategoriesEmpty:function(){return 0==this.allowCreateMessageStampCategories.length},getCategoryIndex:function(e){return this.allowCreateMessageStampCategories.indexOf(e)},__class__:Ze};var $e=function(e){null!=e&&(this.userId=e.user_id,this.id=e.conference_id,this.domainId=e.domain_id,this.talkId=e.talk_id,this.messageId=e.message_id,this.createdAt=e.created_at,this.expiredAt=e.expired_at,this.participants=e.participants,this.skywayVersion=null==e.skyway_version?1:e.skyway_version)};n["albero.entity.Conference"]=$e,$e.__name__=["albero","entity","Conference"],$e.prototype={isIncomingExpired:function(){var e=this.createdAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)+$e.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__:$e};var et=function(){this.conferencesMap=new ao,this.talkIdConferenceIdMap=new ao};n["albero.entity.ConferenceStore"]=et,et.__name__=["albero","entity","ConferenceStore"],et.prototype={addConference:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.conferencesMap;null!=Xo[n]?i.setReserved(n,e):i.h[n]=e;var r=e.talkId,a="_"+r.high+"_"+r.low,o=this.talkIdConferenceIdMap;null!=Xo[a]?o.setReserved(a,n):o.h[a]=n},removeConference:function(e){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!=Xo[r]?a.getReserved(r):a.h[r])==n&&this.talkIdConferenceIdMap.remove(r)},getConferences:function(){return B.toValueArray(this.conferencesMap)},getConference:function(e){var t="_"+e.high+"_"+e.low,n=this.conferencesMap;return null!=Xo[t]?n.getReserved(t):n.h[t]},hasConferenceInTalk:function(e){if(null!=e){var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;return null!=Xo[t]?n.existsReserved(t):n.h.hasOwnProperty(t)}return!1},getConferenceIdInTalk:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap,i=null!=Xo[t]?n.getReserved(t):n.h[t];return null==i?null:U.makeFromIdStr(i)},getConferenceTalkIds:function(){return B.toKeyArray(this.talkIdConferenceIdMap).map(U.makeFromIdStr)},hasConference:function(){return this.talkIdConferenceIdMap.keys().hasNext()},__class__:et};var tt=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:tt.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=ze.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled)};n["albero.entity.Configuration"]=tt,tt.__name__=["albero","entity","Configuration"],tt.prototype={__class__:tt};var nt=function(e){this.contractConference=io.None,null!=e&&(this.id=e.contract_id,this.plan=new sn(e.plan),this.quota=new Tn(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=io.Some(new it(e.conference))))};n["albero.entity.Contract"]=nt,nt.__name__=["albero","entity","Contract"],nt.prototype={getMaxMessageContentLength:function(){return H.map(H.option(this.quota),function(e){return e.maxMessageContentLength})},getMaxTalkers:function(){return H.flatMap(H.option(this.quota),function(e){return H.option(e.maxTalkers)})},getMaxTalks:function(){return H.flatMap(H.option(this.quota),function(e){return H.option(e.maxTalks)})},isConferenceEnalbed:function(){return H.isDefined(this.contractConference)},isVideoEnalbed:function(){var e=H.map(this.contractConference,function(e){return e.videoEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},getConferenceTtl:function(){return H.map(this.contractConference,function(e){return e.ttl})},getConferenceMaxParticipants:function(){return H.map(this.contractConference,function(e){return e.maxConferenceParticipants})},isGroupConfenreceEnalbed:function(){var e=H.map(this.contractConference,function(e){return e.groupConferenceEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},isTargetOfPlanAd:function(){return null!=this.quota&&this.quota.withAd},isFreePlan:function(){return null!=this.plan&&this.plan.free},__class__:nt};var it=function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=it.DEFAULT_MAX_PARTICIPANTS,this.ttl=it.DEFAULT_TTL,this.videoEnabled=!1,null!=e&&(this.videoEnabled=e.video_enabled,this.ttl=e.ttl,this.maxConferenceParticipants=e.max_conference_participants,this.groupConferenceEnabled=e.group_conference_enabled)};n["albero.entity.ContractConference"]=it,it.__name__=["albero","entity","ContractConference"],it.prototype={__class__:it};var rt=function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?ot.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=rt.getLabelRoot();break;case 2:this.name=rt.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};n["albero.entity.Department"]=rt,rt.__name__=["albero","entity","Department"],rt.getLabelFree=function(){return hr.localize("Department.label_free")},rt.getLabelRoot=function(){return hr.localize("Department.label_root")},rt.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==ot.Root},isFree:function(){return this.nodeType==ot.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return ot.Root;case 2:return ot.Free;default:return ot.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(U.idStr)},__class__:rt};var at=function(){};n["albero.entity.DepartmentHelper"]=at,at.__name__=["albero","entity","DepartmentHelper"],at.getName=function(e){return null==e?null:e.name};var ot=n["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};ot.Normal=["Normal",0],ot.Normal.toString=i,ot.Normal.__enum__=ot,ot.Root=["Root",1],ot.Root.toString=i,ot.Root.__enum__=ot,ot.Free=["Free",2],ot.Free.toString=i,ot.Free.__enum__=ot,ot.__empty_constructs__=[ot.Normal,ot.Root,ot.Free];var st=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};n["albero.entity.DepartmentList"]=st,st.__name__=["albero","entity","DepartmentList"],st.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new rt(e)})},__class__:st};var lt=function(){this.departmentMap=new ao,this.rootDepartmentIdMap=new ao};n["albero.entity.DepartmentStore"]=lt,lt.__name__=["albero","entity","DepartmentStore"],lt.prototype={getDepartment:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.departmentMap;return null!=Xo[t]?n.getReserved(t):n.h[t]},setDepartment:function(e){if(null!=e.parentId){var t=this.getDepartment(e.parentId);null!=t&&(t.addChild(e.id),e.depth=t.depth+1)}var n=e.id,i="_"+n.high+"_"+n.low,r=this.departmentMap;null!=Xo[i]?r.setReserved(i,e):r.h[i]=e},clearDomainDepartment:function(e){var t=this,n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap,r=null!=Xo[n]?i.getReserved(n):i.h[n];null!=r&&(c.iter(this.getDepartmentsDescendantOrSelf(r),function(e){var n=e.id;t.departmentMap.remove("_"+n.high+"_"+n.low)}),this.rootDepartmentIdMap.remove(n))},getRootDepartmentId:function(e){var t="_"+e.high+"_"+e.low,n=this.rootDepartmentIdMap;return null!=Xo[t]?n.getReserved(t):n.h[t]},setRootDepartmentId:function(e,t){var n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap;null!=Xo[n]?i.setReserved(n,t):i.h[n]=t},setDepartmentUserCount:function(e){var t=this.getDepartment(e.departmentId);null!=t&&(t.userCount=e,t.userCountLoading=!1)},setUserCountLoading:function(e,t){var n=this.getDepartment(e);null!=n&&(n.userCountLoading=t)},isUserCountLoadingRequired:function(e){var t=this.getDepartment(e);return null==t||null==t.userCount&&!t.userCountLoading},clearDomainDepartmentUsers:function(e){var t=this.getRootDepartmentId(e);return null!=t&&(c.iter(this.getDepartmentsDescendantOrSelf(t),function(e){e.userCount=null,e.userIds=null,e.userCountLoading=!1}),!0)},setDepartmentUsers:function(e,t){var n=this.getDepartment(e);null!=n&&(n.userIds=t)},getDepartmentPath:function(e){return this.getDepartmentsAncestorOrSelf(e)},getDepartmentPathWithoutRoot:function(e){return this.getDepartmentPath(e).filter(function(e){return!e.isRoot()})},getDepartmentsAncestorOrSelf:function(e){var t=[];return this._getDepartmentsAncestorOrSelf(e,t),t},_getDepartmentsAncestorOrSelf:function(e,t){var n=this.getDepartment(e);null!=n&&(null!=n.parentId&&this._getDepartmentsAncestorOrSelf(n.parentId,t),t.push(n))},getDepartmentsDescendantOrSelf:function(e){var t=[];return this._getDepartmentsDescendantOrSelf(e,t),t},_getDepartmentsDescendantOrSelf:function(e,t){var n=this,i=this.getDepartment(e);null!=i&&(t.push(i),null!=i.childrenIds&&c.iter(i.childrenIds,function(e){n._getDepartmentsDescendantOrSelf(e,t)}))},__class__:lt};var ut=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};n["albero.entity.DepartmentUserCount"]=ut,ut.__name__=["albero","entity","DepartmentUserCount"],ut.prototype={__class__:ut};var ct=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};n["albero.entity.DepartmentUserCountList"]=ct,ct.__name__=["albero","entity","DepartmentUserCountList"],ct.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new ut(e)})},__class__:ct};var _t=function(e,t){if(null!=e){if(this.id=U.fromIntOrInt64(e.direct_app_id),this.uniqueKey=e.unique_key,this.appUrl=e.app_url,this.locales=new ao,null!=e.locales)for(var n=0,i=v.fields(e.locales);n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){return!!j.isEmpty(e)||(j.isEmpty(this.canonicalDisplayName)&&(this.canonicalDisplayName=yr.canonicalize(this.displayName),dr.v("create canonical display name from %s to %s.",this.canonicalDisplayName,this.displayName)),this.canonicalDisplayName.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&this.canonicalPhoneticDisplayName.indexOf(e)>-1)},matchNameOrPhoneticRoman:function(e){return!!this.matchNameOrPhonetic(e)||(j.isEmpty(this.canonicalDisplayNameRoman)&&(this.canonicalDisplayNameRoman=yr.canonicalizeForRoman(this.displayName),dr.v("create canonical display name(roman) from %s to %s.",this.canonicalDisplayNameRoman,this.displayName)),this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(j.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=yr.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1))},__class__:bt});var kt=function(e){this.values=e};n["albero.entity.Domains"]=kt,kt.__name__=["albero","entity","Domains"],kt.prototype={orderByName:function(){var e=L.sortAndReturn(this.values.map(Dt.fromDomain),Dt.compare).map(Dt.toDomain);return new kt(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?io.None:c.fold(this.values,function(e,t){switch(H.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:za.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0})[1]){case 0:return H.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:za.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return io.Some(e)}},io.None)},getDirectAppsIds:function(){if(null==this.values||0==this.values.length)return[];var e=new ao;return c.iter(this.values,function(t){c.iter(t.directAppsSetting.enabled,function(t){var n="_"+t.high+"_"+t.low;null!=Xo[n]?e.setReserved(n,t):e.h[n]=t})}),B.toValueArray(e)},__class__:kt};var Dt=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=yr.canonicalize(this.name)};n["albero.entity.DomainForSort"]=Dt,Dt.__name__=["albero","entity","DomainForSort"],Dt.fromDomain=function(e){return new Dt(e)},Dt.toDomain=function(e){return e.domain},Dt.compare=function(e,t){var n=j.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:j.compare(e.name,t.name)},Dt.prototype={__class__:Dt};var Ct=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new Ot(e.get_headers))};n["albero.entity.DownloadAuth"]=Ct,Ct.__name__=["albero","entity","DownloadAuth"],Ct.prototype={__class__:Ct};var Ot=function(e){this.rawData=e};n["albero.entity.DownloadAuthHeaders"]=Ot,Ot.__name__=["albero","entity","DownloadAuthHeaders"],Ot.prototype={__class__:Ot};var Mt=function(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version)};n["albero.entity.FavoriteTalkEvent"]=Mt,Mt.__name__=["albero","entity","FavoriteTalkEvent"],Mt.prototype={__class__:Mt};var Ft=function(e){this.uploadResult=Rt.NONE,this.preview=io.None,this.thumbnailDimension=io.None,null!=e&&(this.attachmentId=e.attachment_id,this.messageId=e.message_id,this.talkId=e.talk_id,this.id=e.file_id,this.userId=e.user_id,this.name=e.name,this.contentType=e.content_type,this.contentSize=e.content_size,this.url=e.url,this.thumbUrl=e.thumbnail_url,this.updatedAt=e.updated_at,this.file=e.file,this.localThumbInfo=e.localThumbInfo,this.thumbnailDimension=io.None,this.deleted=null!=e.deleted&&e.deleted,this.previewSupported=null!=e.preview_supported&&e.preview_supported)};n["albero.entity.FileInfo"]=Ft,Ft.__name__=["albero","entity","FileInfo"],Ft.fromMessageAndFile=function(e,t){var n=new Ft;return n.messageId=e.id,n.talkId=e.talkId,n.userId=e.userId,n.updatedAt=e.createdAt,n.id=t.file_id,n.name=t.name,n.contentType=t.content_type,n.contentSize=t.content_size,n.url=t.url,n.thumbUrl=t.thumbnail_url,n.thumbnailDimension=null==t.thumbnail_dimension?io.None:io.Some(new si(t.thumbnail_dimension)),n.deleted=null!=t.deleted&&t.deleted,n.file=t.file,n.localThumbInfo=t.localThumbInfo,n.previewSupported=t.preview_supported,n},Ft.fromMessageAndFileWithFileId=function(e,t,n){var i=Ft.fromMessageAndFile(e,t);return i.id=n,i},Ft.createUploadedFileInfo=function(e){var t=new Ft;return t.id=e.id,t.contentType=e.content_type,t.contentSize=e.content_size,t.url=e.url,t.name=e.name,t},Ft.createStagedFileInfo=function(e,t,n){var i=t,r=new Ft,a=new hi(0,--Ft.stagedFileInfosMaxId);return r.id=a,r.talkId=e,null!=t&&(r.contentType=i.type,r.contentSize=i.size,r.addLocalFile(t),r.name=i.name),null!=n&&r.addLocalThumbInfo(n),r},Ft.createStagedFileInfoFromDummyFile=function(e,t,n){var i=new Ft,r=new hi(0,--Ft.stagedFileInfosMaxId);return i.id=r,i.talkId=e,null!=t&&(i.contentType=t.type,i.contentSize=t.size,i.file=t,i.name=t.name),null!=n&&i.addLocalThumbInfo(n),i},Ft.prototype={isRemote:function(){return null==this.file},isUploaded:function(){if(this.isRemote())return!0;switch(this.uploadResult[1]){case 0:return!0;case 1:case 2:return!1}},isUploadFailed:function(){if(this.isRemote())return!1;switch(this.uploadResult[1]){case 1:return!0;case 0:case 2:return!1}},setUploadResult:function(e){this.uploadResult=e},isNotUploaded:function(){return!this.isUploaded()},hasThumb:function(){return null!=this.thumbUrl||this.hasLocalThumbInfo()},hasLocalThumbInfo:function(){return null!=this.localThumbInfo},hasLocalFile:function(){return null!=this.file},hasUrl:function(){return null!=this.url},isImage:function(){return w.startsWith(this.contentType,"image/")},isImageGif:function(){return w.startsWith(this.contentType,"image/gif")},isImageJpeg:function(){return w.startsWith(this.contentType,"image/jpeg")},isPdf:function(){return w.startsWith(this.contentType,"application/pdf")},isVideo:function(){return w.startsWith(this.contentType,"video/")},canDisplayAsThumb:function(){return!!this.hasThumb()||this.isImage()},getNoThumbText:function(){return null!=this.name?this.name:this.url},getUploadedFileData:function(){if(null==this.file){var e={url:this.url,content_type:this.contentType,content_size:this.contentSize,name:this.name,file_id:this.id};return null!=this.thumbUrl&&(e.thumbnail_url=this.thumbUrl),H.isDefined(this.thumbnailDimension)&&(e.thumbnail_dimension=H.get(this.thumbnailDimension)),e}var t=this.uploadResult;switch(t[1]){case 0:return t[2];case 1:case 2:return dr.e("file not uploaded."),null}},addLocalFile:function(e){this.file=e},addLocalThumbInfo:function(e){this.localThumbInfo=e},getUploadableFilePack:function(){return{file:this.file,thumb:this.localThumbInfo}},__class__:Ft};var Rt=n["albero.entity.UploadResult"]={__ename__:["albero","entity","UploadResult"],__constructs__:["SUCCESS","FAILUER","NONE"]};Rt.SUCCESS=function(e){var t=["SUCCESS",0,e];return t.__enum__=Rt,t.toString=i,t},Rt.FAILUER=["FAILUER",1],Rt.FAILUER.toString=i,Rt.FAILUER.__enum__=Rt,Rt.NONE=["NONE",2],Rt.NONE.toString=i,Rt.NONE.__enum__=Rt,Rt.__empty_constructs__=[Rt.FAILUER,Rt.NONE];var xt=function(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])};n["albero.entity.FileInfoDeletion"]=xt,xt.__name__=["albero","entity","FileInfoDeletion"],xt.prototype={__class__:xt};var Ut=function(){this.fileInfoMap=new ao,this.fileIdStrsMap=new ao,this.messageFileIdStrsMap=new ao,this.noteFileIdStrsMap=new ao,this.filePreviewMap=new ao};n["albero.entity.FileInfoStore"]=Ut,Ut.__name__=["albero","entity","FileInfoStore"],Ut.prototype={ensureStagedFileInfos:function(e){return this.ensureStagedFileIdStrs(e).map(U.makeFromIdStr).filter(function(e){return null!=e}).map(Go(this,this.getFileInfo))},moveStagedFile:function(e,t,n){var i=this.ensureStagedFileIdStrs(e);if(null!=i){var r=i[t];u.remove(i,r),i.splice(n,0,r)}},ensureStagedFileIdStrs:function(e){var t=e.toString(),n=this.fileIdStrsMap,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null==i){i=[];var r=this.fileIdStrsMap;null!=Xo[t]?r.setReserved(t,i):r.h[t]=i}return i},addStagedFileInfo:function(e,t,n,i){var r=Ft.createStagedFileInfo(e,n,i),a=r.id,o="_"+a.high+"_"+a.low,s=this.fileInfoMap;null!=Xo[o]?s.setReserved(o,r):s.h[o]=r;var l=r.id,u="_"+l.high+"_"+l.low;return this.ensureStagedFileIdStrs(t).push(u),r},replaceStagedFileInfo:function(e,t,n,i){var r=Ft.createStagedFileInfo(e.talkId,n,i);return this.replaceStagedFileInfoFromFileId(e.id,t,r),r},replaceStagedFileInfoFromFileId:function(e,t,n){var i=n.id,r="_"+i.high+"_"+i.low,a=this.fileInfoMap;null!=Xo[r]?a.setReserved(r,n):a.h[r]=n;var o=this.ensureStagedFileIdStrs(t),s=o.indexOf("_"+e.high+"_"+e.low);if(-1!=s){o.splice(s,1);var l=n.id;o.splice(s,0,"_"+l.high+"_"+l.low),this.removeStagedFileInfo(t,e)}},restoreStagedFile:function(e,t){var n=t.id,i="_"+n.high+"_"+n.low,r=this.fileInfoMap;null!=Xo[i]?r.setReserved(i,t):r.h[i]=t;var a=t.id,o="_"+a.high+"_"+a.low;this.ensureStagedFileIdStrs(e).push(o)},removeStagedFileInfo:function(e,t){var n="_"+t.high+"_"+t.low;u.remove(this.ensureStagedFileIdStrs(e),n);var i=this.fileInfoMap;(null!=Xo[n]?i.getReserved(n):i.h[n]).isRemote()||this.fileInfoMap.remove(n)},removeStagedFileInfos:function(e){for(var t=0,n=this.ensureStagedFileIdStrs(e);t>t,e.high<<32-t|e.low>>>t):new hi(e.high>>31,e.high>>t-32)},Gt.subTimestampPart=function(e,t){var n=Gt.timestamp(e),i=Gt.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(za.ucompare(n.low,i.low)<0){r--;r|=0}return new hi(r,a)},Gt.createForTest=function(e){var t=Gt.TIMESTAMP_SHIFT;return 0==(t&=63)?new hi(e.high,e.low):t<32?new hi(e.high<>>32-t,e.low<0||this.credential.ttl0?this.content.text:"";case 7:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 13:return[this.content.question,hr.localize("MessageStringMaker.yes"),hr.localize("MessageStringMaker.no")].join(" ");case 14:return e&&null!=this.content.response?this.content.response?hr.localize("MessageStringMaker.yes"):hr.localize("MessageStringMaker.no"):"";case 15:return null!=this.content.options?y.string(this.content.question)+" "+y.string(this.content.options.join(" ")):this.content.question;case 16:return e&&null!=this.content.response&&null!=this.content.options&&this.content.options.length>this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,hr.localize("MessageStringMaker.achieve"),hr.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?hr.localize("MessageStringMaker.achieve"):hr.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&this.content.text.length>0)return this.content.text;break;case 7:return hr.localize("Message.bookmark_label_deleted");case 8:return[hr.localize("Message.bookmark_label_note_shared"),new Ui(this.content).title].join(" ");case 10:return[hr.localize("Message.bookmark_label_note_created"),new Ui(this.content).title].join(" ");case 11:return[hr.localize("Message.bookmark_label_note_updated"),new Ui(this.content).title].join(" ");case 2:case 12:if(null!=this.content.text&&this.content.text.length>0)return[hr.localize("Message.bookmark_label_stamp"),this.content.text].join(" ");break;case 14:case 16:return[hr.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 13:case 15:return[hr.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 17:return[hr.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 18:return[this.content.done?hr.localize("Message.bookmark_label_completed"):hr.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 19:case 20:return[hr.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 21:return[hr.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 8:case 10:case 11:return new Ui(this.content);default:return null}},messageStringRaw:function(){switch(this.type[1]){case 0:return"";case 1:return this.content;case 3:case 4:return"";case 5:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 8:case 9:case 10:case 11:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 14:case 16:return"";case 13:case 15:return this.content.question;case 17:return this.content.title;case 18:return"";case 19:case 20:case 21:case 22:default:return""}},getContentsForNoteDelete:function(){return 9==this.type[1]?new Pi(this.content):null},getContentsForOriginalStamp:function(){return 12==this.type[1]?new Li(this.content):null},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()},isAllowedToShowSelectionMessageMenu:function(){return!(this.type!=Qt.text&&!this.isStampMessageWithText())||this.isTextMultipleFileWithText()},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()},isMatchCategory:function(e){switch(e[1]){case 0:return!!(this.isTextMessage()||this.isFileMessage()||this.isTextMultipleFile())||this.isStampMessageWithText();case 1:return!1}},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==Qt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==Qt.yesOrNo||this.type==Qt.yesOrNoReply||this.type==Qt.selectOne||this.type==Qt.selectOneReply||this.type==Qt.todo||this.type==Qt.todoDone||this.type==Qt.yesOrNoClosed||this.type==Qt.selectOneClosed||this.type==Qt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==Qt.selectOneReply||this.type==Qt.yesOrNoReply||this.type==Qt.todoDone},isClosedActionStampMessage:function(){return this.type==Qt.yesOrNoClosed||this.type==Qt.selectOneClosed||this.type==Qt.todoClosed},isTextMultipleFile:function(){return this.type==Qt.textMultipleFile},isSendingActionStampMessage:function(){return this.type==Qt.yesOrNo||this.type==Qt.selectOne||this.type==Qt.todo},isNoteMessage:function(){return this.type==Qt.noteShared||this.type==Qt.noteDeleted||this.type==Qt.noteCreated||this.type==Qt.noteUpdated},isNoteDeletedMessage:function(){return this.type==Qt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==Qt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==Qt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==Qt.stamp||this.type==Qt.originalStamp},isNotStampMessage:function(){return!this.isStampMessage()},isStampMessageWithText:function(){return!!this.isStampMessage()&&this.isNotObjectWithEmptyText()},isStampMessageWithEmptyText:function(){return!!this.isStampMessage()&&this.isObjectWithEmptyText()},isNotStampMessageWithEmptyText:function(){return!!this.isNotStampMessage()||this.isNotObjectWithEmptyText()},isObjectWithEmptyText:function(){return j.isEmpty(this.content.text)},isNotObjectWithEmptyText:function(){return!this.isObjectWithEmptyText()},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==Qt.text},isOpenConference:function(){return this.type==Qt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){return dr.i(this.type),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?io.Some(this.content.in_reply_to):io.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 U.notContains(t.readUserIds,e)});this.readUserIds=this.readUserIds.concat(n).slice(0,16)}},createReadCountText:function(){return this.readUserIds.length>=16?"15+":y.string(this.readUserIds.length)},hasNoReadUsers:function(){return 0==this.readUserIds.length},deleteFile:function(e){var t;switch(this.type[1]){case 4:t=[this.content];break;case 5:t=this.content.files;break;default:t=[]}if(0!=t.length){var n=c.find(t,function(t){var n=t.file_id,i=e.fileId;return null!=n&&null!=i&&n.high==i.high&&n.low==i.low});null!=n&&(n.deleted=!0)}},getQuestionTitle:function(){switch(this.type[1]){case 17:case 18:case 21:return null==this.content.title?"":this.content.title;case 13:case 14:case 15:case 16:case 19:case 20:return null==this.content.question?"":this.content.question;default:return""}},getChoiceCloseResponse:function(e){var t=hr.localize("QuestionHelper.close_answer")+"\n";if(null==this.content.responses)t+="...";else{var n=this.content.responses,i=this.content.last_response;if(0==Sn.closingTypeOf(this.content.closing_type)[1])t+=null!=i?hr.localize("QuestionHelper.last_response",{content:e(n[i].content),interpolation:{escapeValue:!1}}):hr.localize("QuestionHelper.no_answer");else{t+=null!=i?null==n?"":n.map(function(t){var n=null==t.count?0:t.count;return e(t.content)+": "+n+hr.localize("QuestionHelper.name")}).join("\n"):hr.localize("QuestionHelper.no_answer")}}return t},getTodoCloseResponse:function(){var e=hr.localize("QuestionHelper.close_task")+"\n";if(null==this.content.responses)e+="...";else{var t=this.content.responses,n=this.content.last_response;if(0==Sn.closingTypeOf(this.content.closing_type)[1]){e+=null!=n&&"DONE"==t[n].content?hr.localize("QuestionHelper.achieve_task"):hr.localize("QuestionHelper.not_achieve_task")}else{var i=0;if(null!=t)for(var r=0;r=0?n:1)>0}return!1},timeOveredOrNotExist:function(e,t){return null==e||this.timeOvered(e,t)},__class__:on};var sn=function(e){null!=e&&(this.name=e.plan_name,this.trial=!!e.trial,this.free=!!e.free)};n["albero.entity.Plan"]=sn,sn.__name__=["albero","entity","Plan"],sn.prototype={__class__:sn};var ln=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=vo.__cast(e.item_values,Array).map(function(e){return new _n(e)})))};n["albero.entity.Profile"]=ln,ln.__name__=["albero","entity","Profile"],ln.prototype={__class__:ln};var un=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=vo.__cast(e.item_definitions,Array);t=0?o:1)>0&&(this.updatedAt=i,this.maxResponseId=t,this.lastResponse=e,this.lastResponseUserId=n)},__class__:pn};var gn=n["albero.entity.QuestionFromType"]={__ename__:["albero","entity","QuestionFromType"],__constructs__:["fromSelf","fromOther"]};gn.fromSelf=["fromSelf",0],gn.fromSelf.toString=i,gn.fromSelf.__enum__=gn,gn.fromOther=["fromOther",1],gn.fromOther.toString=i,gn.fromOther.__enum__=gn,gn.__empty_constructs__=[gn.fromSelf,gn.fromOther];var vn=n["albero.entity.QuestionFilter"]={__ename__:["albero","entity","QuestionFilter"],__constructs__:["onlyClosed","onlyUnclosed","noFilter"]};vn.onlyClosed=["onlyClosed",0],vn.onlyClosed.toString=i,vn.onlyClosed.__enum__=vn,vn.onlyUnclosed=["onlyUnclosed",1],vn.onlyUnclosed.toString=i,vn.onlyUnclosed.__enum__=vn,vn.noFilter=["noFilter",2],vn.noFilter.toString=i,vn.noFilter.__enum__=vn,vn.__empty_constructs__=[vn.onlyClosed,vn.onlyUnclosed,vn.noFilter];var yn=n["albero.entity.QuestionClosingType"]={__ename__:["albero","entity","QuestionClosingType"],__constructs__:["any","all","unknown"]};yn.any=["any",0],yn.any.toString=i,yn.any.__enum__=yn,yn.all=["all",1],yn.all.toString=i,yn.all.__enum__=yn,yn.unknown=["unknown",2],yn.unknown.toString=i,yn.unknown.__enum__=yn,yn.__empty_constructs__=[yn.any,yn.all,yn.unknown];var Sn=function(){};n["albero.entity.QuestionClosingTypeHelper"]=Sn,Sn.__name__=["albero","entity","QuestionClosingTypeHelper"],Sn.closingTypeOf=function(e){switch(e){case 0:return yn.any;case 1:return yn.all;default:return yn.unknown}};var wn=function(e){this.content=e.content,this.count=null==e.count?0:e.count,this.userIds=null==e.user_ids?[]:e.user_ids};n["albero.entity.QuestionResponse"]=wn,wn.__name__=["albero","entity","QuestionResponse"],wn.prototype={add:function(e){this.contains(e)||(this.count+=1,this.userIds=this.userIds.concat([e]))},sub:function(e){this.contains(e)&&(this.count-=1,this.userIds=this.userIds.filter(function(t){return!(e.high==t.high&&e.low==t.low)}))},contains:function(e){return U.contains(this.userIds,e)},__class__:wn};var In=function(){this.questions=new ao};n["albero.entity.QuestionStore"]=In,In.__name__=["albero","entity","QuestionStore"],In.prototype={removeTalkQuestions:function(e){for(var t=this.getQuestions(e),n=0;n>>16,s=65535&t.low,l=t.low>>>16,u=za._mul(a,s),c=za._mul(o,s),_=za._mul(a,l),h=u,d=(za._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,za.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,za.ucompare(h,c)<0){d++;d|=0}d=d+(za._mul(e.low,t.high)+za._mul(e.high,t.low)|0)|0;var f=new hi(d,h),m=new hi(0,y.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(za.ucompare(g,f.low)<0){p++;p|=0}e=new hi(p,g)}return e},__class__:Ln};var Bn=function(e,t,n){this.stampsetId=e,this.id=t,this.illust=n};n["albero.entity.OriginalStamp"]=Bn,Bn.__name__=["albero","entity","OriginalStamp"],Bn.__interfaces__=[Pn],Bn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=U.makeFromIdStr(t.stampsetIdStr),i=U.makeFromIdStr(t.stampIdStr);return new Bn(n,i,t.illust)},Bn.fromPropsAndStampsetId=function(e,t){return new Bn(t,U.fromIntOrInt64(e.id),e.illust)},Bn.createKey=function(e){return"original__"+e.high+"_"+e.low},Bn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return Bn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new qt;return n.talkId=e,n.type=Qt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:Bn};var Hn=function(){this.stampsetStore=new ao,this.stampStore=new ao,this.stampKeyCategoryIdMap=new ao};n["albero.entity.StampStore"]=Hn,Hn.__name__=["albero","entity","StampStore"],Hn.prototype={addStampsets:function(e){for(var t=0;te.version},__class__:jn};var Yn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(U.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};n["albero.entity.StampsetSetting"]=Yn,Yn.__name__=["albero","entity","StampsetSetting"],Yn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new jn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(e){return null!=this.allowCreateMessageStampsetIds&&c.exists(this.allowCreateMessageStampsetIds,function(t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low})},containVisibleStampset:function(e){return c.exists(this.stampsetInfos,function(t){var n=t.stampsetId;return null!=e&&null!=n&&e.high==n.high&&e.low==n.low})},getSendableStampsetInfos:function(){var e=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(t){return e.containSendableStampset(t.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.map(function(t){return e.eqStampsetId(t)&&e.isNewerThan(t)?e:t})},deleteStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.filter(function(t){var n=t.stampsetId;return!(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(t){return!(null!=t&&null!=e&&t.high==e.high&&t.low==e.low)})},getStampsetIdsDiff:function(e){for(var t=new ao,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=0?r:1},Xn.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__:Xn};var Zn=function(e,t){this.paneType=e,this.talkSelection=t};n["albero.entity.TalkPaneSelection"]=Zn,Zn.__name__=["albero","entity","TalkPaneSelection"],Zn.createArrayForMultiPanes=function(e){return c.mapi(e,function(e,t){return new Zn(an.getMultiPaneType(e),t)})},Zn.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return Y.talks(e,z.single(this.talkSelection));case 1:var n=Go(t,t.getTalkSelection),i=e,r=an.getMultiPaneTypes().map(function(e){return n(i,e)});return r[0]=this.talkSelection,Y.talks(e,z.multi(r));case 2:var a=Go(t,t.getTalkSelection),o=e,s=an.getMultiPaneTypes().map(function(e){return a(o,e)});return s[1]=this.talkSelection,Y.talks(e,z.multi(s));case 3:var l=Go(t,t.getTalkSelection),u=e,c=an.getMultiPaneTypes().map(function(e){return l(u,e)});return c[2]=this.talkSelection,Y.talks(e,z.multi(c))}},getTalkIdOrNull:function(){return ni.getTalkIdOrNull(this.talkSelection)},__class__:Zn};var $n=function(){};n["albero.entity.ITalkSelectionGetter"]=$n,$n.__name__=["albero","entity","ITalkSelectionGetter"],$n.prototype={__class__:$n};var ei=function(e,t){this.domainId=e.domain_id,this.talkId=e.talk_id,this.type=t?fn.fromRawValue(e.type):mn.None,this.version=e.version};n["albero.entity.TalkPushNotificationEvent"]=ei,ei.__name__=["albero","entity","TalkPushNotificationEvent"],ei.prototype={__class__:ei};var ti=n["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};ti.NotSelected=["NotSelected",0],ti.NotSelected.toString=i,ti.NotSelected.__enum__=ti,ti.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=ti,n.toString=i,n},ti.AnnouncementsSelected=["AnnouncementsSelected",2],ti.AnnouncementsSelected.toString=i,ti.AnnouncementsSelected.__enum__=ti,ti.__empty_constructs__=[ti.NotSelected,ti.AnnouncementsSelected];var ni=function(){};n["albero.entity.TalkSelectionHelper"]=ni,ni.__name__=["albero","entity","TalkSelectionHelper"],ni.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=ni.getTalkIdOrNull(e),r=ni.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=ni.getMessageIdOrNull(e),o=ni.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},ni.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:e[3];var n=e[2],i=H.orNull(Jn.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==Qn.annoucements}},ni.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},ni.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return H.orNull(t);case 2:return null}},ni.toTalkSelectionStr=function(e){switch(e[1]){case 0:return"";case 1:var t=e[2];return"_"+t.high+"_"+t.low;case 2:return"announcement"}};var ii=function(e){this.unreadMentionCount=0,this.unreadCount=0,null!=e?(this.id=e.talk_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.unreadMentionCount=null!=e.unread_mention_count?e.unread_mention_count:0,this.maxMessageId=e.max_message_id,null!=e.max_message?this.maxMessage=new qt(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 dn(e.push_notification)):this.pushNotificationSetting=new dn};n["albero.entity.TalkStatus"]=ii,ii.__name__=["albero","entity","TalkStatus"],ii.prototype={update:function(e){var t=this,n=!1;return this.needIdUpdate(this.maxEveryoneReadMessageId,e.maxEveryoneReadMessageId)&&(this.maxEveryoneReadMessageId=e.maxEveryoneReadMessageId,n=!0),H.foreach(e.maxReadMessageId,function(e){t.needIdUpdate(t.maxReadMessageId,e)&&(t.maxReadMessageId=e,n=!0)}),n},updateByMessageDeletion:function(e){var t=!1;return this.isUnread(e.messageId)&&(this.decrementUnreadCount(1),e.isMention&&this.decrementUnreadMentionCount(1),t=!0),this.isMax(e.messageId)&&(null!=this.maxMessage&&(this.maxMessage.type=Qt.deleted),t=!0),t},updateByMessageReadStatusesUpdate:function(e){var t=e.messageIds,n=e.mentionMessageIds,i=t.filter(Go(this,this.isUnread));if(0==i.length)return!1;for(var r=i[0],a=0;a=0?s:1)<0&&(r=o),U.notContains(e.messageIdsExcludingUnreadCountTargets,o)&&(this.decrementUnreadCount(1),U.contains(n,o)&&this.decrementUnreadMentionCount(1))}return this.maxReadMessageId=r,!0},needIdUpdate:function(e,t){if(null!=t){if(null!=e){var n=e.high-t.high|0;return n=0!=n?n:za.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,n){this.maxReadMessageId=e,this.decrementUnreadCount(t),this.decrementUnreadMentionCount(n)},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},decrementUnreadMentionCount:function(e){this.unreadMentionCount-=e,this.unreadMentionCount<0&&(this.unreadMentionCount=0)},readAll:function(){this.maxReadMessageId=this.maxMessageId,this.unreadCount=0,this.unreadMentionCount=0},updateByMessage:function(e,t){this.isNewMax(e.id)&&(this.maxMessageId=e.id,this.maxMessage=e),e.isUnreadCountTarget&&(t?this.isUnread(e.id)&&this.readAll():(this.unreadCount++,e.mention&&this.unreadMentionCount++),this.talkOrderingTimestamp=e.createdAt)},updateByReadingMessages:function(e,t){var n=this;if(null==e||this.canRegardTalkReadCountZero(e)){if(!ri.isUnreadMesasgeExisted(this))return!1;if(null==this.maxMessageId)return!1;this.readAll()}else{var i=e.filter(function(e){return n.isUnread(e.id)});if(0==i.length)return!1;var r=i[i.length-1].id,a=i.filter(function(e){if(e.isUnreadCountTarget){var n=e.userId;return!(null!=n&&null!=t&&n.high==t.high&&n.low==t.low)}return!1}),o=a.filter(function(e){return e.mention});this.read(r,a.length,o.length)}return!0},updateByTalkPushNotificationEvent:function(e){return e.version>this.pushNotificationSetting.version&&(this.pushNotificationSetting=dn.createWithParams(e.type,e.version),!0)},canRegardTalkReadCountZero:function(e){var t=this.maxMessageId,n=H.orNull(L.lastOption(e.map(function(e){return e.id})));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},isMessageAcceptable:function(e,t){if(this.isUnread(e.id))return!0;var n=Gt.subTimestampPart(this.maxReadMessageId,e.id),i=n.high-t.high|0;return i=0!=i?i:za.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<=0},isUnread:function(e){if(null!=this.maxReadMessageId){var t=this.maxReadMessageId,n=t.high-e.high|0;return n=0!=n?n:za.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId,n=t.high-e.high|0;return n=0!=n?n:za.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isNotificationDisabled:function(){return this.pushNotificationSetting.isDisabled()},getNotificationType:function(){return this.pushNotificationSetting.type},__class__:ii};var ri=function(){};n["albero.entity.TalkStatusHelper"]=ri,ri.__name__=["albero","entity","TalkStatusHelper"],ri.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},ri.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},ri.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&e.isUnread(e.maxMessage.id))};var ai=function(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=H.option(e.max_read_message_id))};n["albero.entity.TalkStatusUpdate"]=ai,ai.__name__=["albero","entity","TalkStatusUpdate"],ai.prototype={__class__:ai};var oi=function(e,t,n){this.file=e,this.dimension=si.createWithSize(t,n),this.auth=null};n["albero.entity.ThumbInfo"]=oi,oi.__name__=["albero","entity","ThumbInfo"],oi.prototype={setAuth:function(e){this.auth=e},__class__:oi};var si=function(e){null!=e&&(this.width=e.width,this.height=e.height)};n["albero.entity.ThumbDimension"]=si,si.__name__=["albero","entity","ThumbDimension"],si.createWithSize=function(e,t){var n=new si;return n.width=e,n.height=t,n},si.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:si};var li=function(e,t,n){var i=new hi(0,0);this.domainId=i,this.domainId=e,this.oldSetting=t,this.newSetting=n};n["albero.entity.UpdateDomainStampSettingEvent"]=li,li.__name__=["albero","entity","UpdateDomainStampSettingEvent"],li.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:li};var ui=n["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL"]};ui.PROFILE_IMAGE=["PROFILE_IMAGE",0],ui.PROFILE_IMAGE.toString=i,ui.PROFILE_IMAGE.__enum__=ui,ui.MESSAGE=["MESSAGE",1],ui.MESSAGE.toString=i,ui.MESSAGE.__enum__=ui,ui.TALK_ICON=["TALK_ICON",2],ui.TALK_ICON.toString=i,ui.TALK_ICON.__enum__=ui,ui.THUMBNAIL=["THUMBNAIL",3],ui.THUMBNAIL.toString=i,ui.THUMBNAIL.__enum__=ui,ui.NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],ui.NOTE_ATTACHMENT.toString=i,ui.NOTE_ATTACHMENT.__enum__=ui,ui.NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],ui.NOTE_THUMBNAIL.toString=i,ui.NOTE_THUMBNAIL.__enum__=ui,ui.__empty_constructs__=[ui.PROFILE_IMAGE,ui.MESSAGE,ui.TALK_ICON,ui.THUMBNAIL,ui.NOTE_ATTACHMENT,ui.NOTE_THUMBNAIL];var ci=function(){};n["albero.entity.UploadUseTypeHelper"]=ci,ci.__name__=["albero","entity","UploadUseTypeHelper"],ci.getUseTypeInt=function(e){switch(e[1]){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4;case 4:return 5;case 5:return 6}};var _i=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))};n["albero.entity.UserIdentifier"]=_i,_i.__name__=["albero","entity","UserIdentifier"],_i.prototype={__class__:_i};var hi=function(e,t){this.high=e,this.low=t};n["haxe._Int64.___Int64"]=hi,hi.__name__=["haxe","_Int64","___Int64"],hi.prototype={__class__:hi};var di=function(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=H.option(e.last_used_at))};n["albero.entity.UserPresence"]=di,di.__name__=["albero","entity","UserPresence"],di.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(za.ucompare(t.low,e.low)<0){n--;n|=0}var r=new hi(n,i),a=di.SIXTY_MINUTES,o=r.high-a.high|0;if(o=0!=o?o:za.ucompare(r.low,a.low),(r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0)return fi.GT_60;var s=di.FIFTEEN_MINUTES,l=r.high-s.high|0;return l=0!=l?l:za.ucompare(r.low,s.low),(r.high<0?s.high<0?l:-1:s.high>=0?l:1)>0?fi.LT_OR_EQ_60:fi.LT_OR_EQ_15},di.prototype={toState:function(e){var t=e,n=H.map(this.lastUsedAtOpt,function(e){return di.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return fi.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(za.ucompare(e.low,n.low)<0){i--;i|=0}var a=new hi(i,r),o=a.high-t.high|0;return o=0!=o?o:za.ucompare(a.low,t.low),(a.high<0?t.high<0?o:-1:t.high>=0?o:1)>0},__class__:di};var fi=n["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};fi.LT_OR_EQ_15=["LT_OR_EQ_15",0],fi.LT_OR_EQ_15.toString=i,fi.LT_OR_EQ_15.__enum__=fi,fi.LT_OR_EQ_60=["LT_OR_EQ_60",1],fi.LT_OR_EQ_60.toString=i,fi.LT_OR_EQ_60.__enum__=fi,fi.GT_60=["GT_60",2],fi.GT_60.toString=i,fi.GT_60.__enum__=fi,fi.__empty_constructs__=[fi.LT_OR_EQ_15,fi.LT_OR_EQ_60,fi.GT_60];var mi=function(e){this.success=e};n["albero.entity.api.message.AddFavoriteMessageResult"]=mi,mi.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],mi.prototype={__class__:mi};var pi=function(e){this.success=e};n["albero.entity.api.message.DeleteFavoriteMessageResult"]=pi,pi.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],pi.prototype={__class__:pi};var gi=function(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r};n["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=gi,gi.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],gi.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:gi};var vi=function(e,t){var n=this;c.iter(t,function(t){var i=new yi(t),r=i.createdAt,a=e.high-r.high|0;a=0!=a?a:za.ucompare(e.low,r.low),(e.high<0?r.high<0?a:-1:r.high>=0?a:1)<0?n.messageCreatedAtNew=i:n.messageCreatedAtOld=i})};n["albero.entity.api.message.SearchMessagesAroundDateTimeResult"]=vi,vi.__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],vi.prototype={__class__:vi};var yi=function(e){this.messageId=e.message_id,this.createdAt=e.created_at};n["albero.entity.api.message.MessageCreatedAt"]=yi,yi.__name__=["albero","entity","api","message","MessageCreatedAt"],yi.prototype={__class__:yi};var Si=function(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n};n["albero.entity.api.note.CreateNoteError"]=Si,Si.__name__=["albero","entity","api","note","CreateNoteError"],Si.prototype={__class__:Si};var wi=function(e){this.note=new Yi(e),this.emitterKey=null};n["albero.entity.api.note.CreateNoteResult"]=wi,wi.__name__=["albero","entity","api","note","CreateNoteResult"],wi.prototype={updateWithEmitterKey:function(e){var t=new wi;return t.note=this.note,t.emitterKey=e,t},__class__:wi};var Ii=function(e){this.result=e};n["albero.entity.api.note.DeleteNoteResult"]=Ii,Ii.__name__=["albero","entity","api","note","DeleteNoteResult"],Ii.prototype={__class__:Ii};var Ti=function(e){this.note=new Yi(e)};n["albero.entity.api.note.GetNoteResult"]=Ti,Ti.__name__=["albero","entity","api","note","GetNoteResult"],Ti.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()},getLockedUserIdWithoutSelf:function(e){return this.note.getLockedUserIdWithoutSelf(e)},__class__:Ti};var Ni=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=L.asArray(e.contents).map(function(e){return new ar(e)}))};n["albero.entity.api.note.GetNoteStatusesResult"]=Ni,Ni.__name__=["albero","entity","api","note","GetNoteStatusesResult"],Ni.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:Ni};var Ei=function(e){this.note=new Yi(e)};n["albero.entity.api.note.UpdateNoteResult"]=Ei,Ei.__name__=["albero","entity","api","note","UpdateNoteResult"],Ei.prototype={__class__:Ei};var Ai=function(e){this.note=new Yi(e)};n["albero.entity.api.note.UpdateNoteSettingResult"]=Ai,Ai.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],Ai.prototype={__class__:Ai};var bi=function(){};n["albero.entity.file.DummyFileUtil"]=bi,bi.__name__=["albero","entity","file","DummyFileUtil"],bi.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob};var ki=function(e){null!=e&&(this.fileId=e.file_id,this.status=e.status,this.filePreviewFileId=e.file_preview_file_id,this.url=e.url,this.key=e.key)};n["albero.entity.file.FilePreview"]=ki,ki.__name__=["albero","entity","file","FilePreview"],ki.prototype={__class__:ki};var Di=function(){};n["albero.entity.file.StageType"]=Di,Di.__name__=["albero","entity","file","StageType"],Di.prototype={__class__:Di};var Ci=function(e,t){this.talkId=e,this.paneType=t};n["albero.entity.file.StageTypeTalk"]=Ci,Ci.__name__=["albero","entity","file","StageTypeTalk"],Ci.__interfaces__=[Di],Ci.prototype={toString:function(){var e=this.talkId;return"staged__"+e.high+"_"+e.low+an.toPanePrefix(this.paneType)},isForPane:function(e){return this.paneType==e},isForNote:function(){return!1},isForPreview:function(){return!1},__class__:Ci};var Oi=function(){};n["albero.entity.file.StageTypeNote"]=Oi,Oi.__name__=["albero","entity","file","StageTypeNote"],Oi.__interfaces__=[Di],Oi.prototype={toString:function(){return"staged_note_"},isForPane:function(e){return!1},isForNote:function(){return!0},isForPreview:function(){return!1},__class__:Oi};var Mi=function(){};n["albero.entity.message.IFavoriteMessageEvent"]=Mi,Mi.__name__=["albero","entity","message","IFavoriteMessageEvent"],Mi.prototype={__class__:Mi};var Fi=function(e){this.message=new qt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.AddFavoriteMessageEvent"]=Fi,Fi.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Fi.__interfaces__=[Mi],Fi.prototype={getMessage:function(){return this.message},getMessageId:function(){return this.message.id},isFavorite:function(){return!0},getDomainId:function(){return this.domainId},getTalkId:function(){return this.talkId},__class__:Fi};var Ri=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.DeleteFavoriteMessageEvent"]=Ri,Ri.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Ri.__interfaces__=[Mi],Ri.prototype={getMessageId:function(){return this.messageId},isFavorite:function(){return!1},__class__:Ri};var xi=function(){};n["albero.entity.message.IMessageContentForActionReply"]=xi,xi.__name__=["albero","entity","message","IMessageContentForActionReply"],xi.prototype={__class__:xi};var Ui=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.title=e.title,this.revision=e.revision,this.deleted=e.deleted,this.hasAttachments=!!e.has_attachments)};n["albero.entity.message.MessageContentForNote"]=Ui,Ui.__name__=["albero","entity","message","MessageContentForNote"],Ui.prototype={__class__:Ui};var Pi=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.title=e.title)};n["albero.entity.message.MessageContentForNoteDeleted"]=Pi,Pi.__name__=["albero","entity","message","MessageContentForNoteDeleted"],Pi.prototype={__class__:Pi};var Li=function(e){this.text=io.None,this.stampsetId=U.fromIntOrInt64(e.stampset_id),this.stampId=U.fromIntOrInt64(e.stamp_id),null!=e.text&&(this.text=io.Some(e.text))};n["albero.entity.message.MessageContentForOriginalStamp"]=Li,Li.__name__=["albero","entity","message","MessageContentForOriginalStamp"],Li.prototype={hasValidText:function(){return H.isDefined(this.getValidText())},getValidText:function(){return H.filter(this.text,j.isNotEmpty)},__class__:Li};var Bi=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.options=e.options,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForSelectOneReply"]=Bi,Bi.__name__=["albero","entity","message","MessageContentForSelectOneReply"],Bi.__interfaces__=[xi],Bi.prototype={getResponseIndex:function(){return this.response},__class__:Bi};var Hi=function(e){this.inReplyTo=e.in_reply_to,this.title=e.title,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.done=e.done,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForTodoReply"]=Hi,Hi.__name__=["albero","entity","message","MessageContentForTodoReply"],Hi.__interfaces__=[xi],Hi.prototype={getResponseIndex:function(){return this.done?0:1},__class__:Hi};var Gi=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.question=e.question,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForYesNoReply"]=Gi,Gi.__name__=["albero","entity","message","MessageContentForYesNoReply"],Gi.__interfaces__=[xi],Gi.prototype={getResponseIndex:function(){return this.response?0:1},__class__:Gi};var ji=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};n["albero.entity.message.MessageFavorite"]=ji,ji.__name__=["albero","entity","message","MessageFavorite"],ji.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:ji};var Yi=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new rr(e.setting),this.noteRevision=new nr(e.note_revision),this.noteLocked=new $i(e.locked))};n["albero.entity.note.Note"]=Yi,Yi.__name__=["albero","entity","note","Note"],Yi.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)},lock:function(e,t,n,i){this.noteRevision.revision==e&&this.noteLocked.lock(t,n,i)},unlock:function(e,t){this.noteRevision.revision==e&&this.noteLocked.unlock(t)},getLockedUserIdWithoutSelf:function(e){return this.noteLocked.getLockedUserIdWithoutSelf(e)},isSameTalkId:function(e){var t=this.talkId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low},__class__:Yi};var zi=n["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT","FILES"]};zi.TEXT=["TEXT",0],zi.TEXT.toString=i,zi.TEXT.__enum__=zi,zi.FILES=["FILES",1],zi.FILES.toString=i,zi.FILES.__enum__=zi,zi.__empty_constructs__=[zi.TEXT,zi.FILES];var Wi=function(){};n["albero.entity.note.NoteContentTypeHelper"]=Wi,Wi.__name__=["albero","entity","note","NoteContentTypeHelper"],Wi.createNoteContentType=function(e){if(null==e)return dr.e("no value."),null;switch(e){case 1:return zi.TEXT;case 5:return zi.FILES;default:return dr.e("value is not expected."),null}},Wi.getValue=function(e){if(null==e)return dr.e("no content type."),null;switch(e[1]){case 0:return 1;case 1:return 5}};var Ki=function(e){this.value=e};n["albero.entity.note.NoteId"]=Ki,Ki.__name__=["albero","entity","note","NoteId"],Ki.__interfaces__=[jt],Ki.createDummyId=function(){var e,t=Ki.nextDummyId,n=Ki.nextDummyId;if(null==n)e=null;else{var i=new hi(0,1),r=n.high-i.high|0,a=n.low-i.low|0;if(za.ucompare(n.low,i.low)<0){r--;r|=0}e=new hi(r,a)}return Ki.nextDummyId=e,new Ki(t)},Ki.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()},isDummy:function(){return this.value.high<0},__class__:Ki};var Vi=function(e,t,n,i,r,a,o){this.state=qi.SENDING,this.talkId=e,this.noteId=t,this.title=n,this.text=i,this.fileInfos=r,this.emitterKey=a,this.createMessage=null==o||o};n["albero.entity.note.NoteLocalEdit"]=Vi,Vi.__name__=["albero","entity","note","NoteLocalEdit"],Vi.prototype={hasEmitterKey:function(){return null!=this.emitterKey},getEmitterKey:function(){return this.emitterKey},setState:function(e){this.state=e},getTalkId:function(){return this.talkId},getNoteId:function(){return this.noteId},getTitle:function(){return this.title},getText:function(){return this.text},getContent:function(){switch(this.getContentType()[1]){case 0:return this.text;case 1:return{files:this.getUploadedFilesData(),text:null==this.text?"":this.text}}},getFileInfos:function(){return this.fileInfos},getState:function(){return this.state},isSending:function(){return this.state==qi.SENDING},isFailed:function(){switch(this.state[1]){case 0:case 6:return!1;case 1:case 2:case 3:case 4:case 5:return!0}},isForCreate:function(){return this.noteId.isDummy()},canNotSend:function(){return 0!=this.getUnuploadedFileInfos().length},getContentType:function(){return this.fileInfos.length>0?zi.FILES:zi.TEXT},getUnuploadedFileInfos:function(){return this.fileInfos.filter(function(e){return e.isNotUploaded()})},getUploadedFilesData:function(){return this.fileInfos.map(function(e){return e.getUploadedFileData()}).filter(function(e){return null!=e})},createNoteRevisionSummary:function(e){var t=new ir;return t.revision=0,t.contentType=this.getContentType(),t.title=this.title,t.contentSummary=this.text,t.createdBy=e,t.createdAt=M.nowAsInt64(),t.contentFiles=this.fileInfos,t},conflict:function(){this.state=qi.FAILED_BY_CONFLICT},deleted:function(){this.state=qi.FAILED_BY_NOT_FOUND},getCreateMessage:function(){return this.createMessage},__class__:Vi};var qi=n["albero.entity.note.NoteLocalEditState"]={__ename__:["albero","entity","note","NoteLocalEditState"],__constructs__:["SENDING","FAILED_BY_CONFLICT","FAILED_BY_NOT_FOUND","FAILED_BY_NOT_FOUND_FORWARDING","FAILED_BY_FILE","FAILED_BY_UNKNOWN","COMPLETED"]};qi.SENDING=["SENDING",0],qi.SENDING.toString=i,qi.SENDING.__enum__=qi,qi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",1],qi.FAILED_BY_CONFLICT.toString=i,qi.FAILED_BY_CONFLICT.__enum__=qi,qi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],qi.FAILED_BY_NOT_FOUND.toString=i,qi.FAILED_BY_NOT_FOUND.__enum__=qi,qi.FAILED_BY_NOT_FOUND_FORWARDING=["FAILED_BY_NOT_FOUND_FORWARDING",3],qi.FAILED_BY_NOT_FOUND_FORWARDING.toString=i,qi.FAILED_BY_NOT_FOUND_FORWARDING.__enum__=qi,qi.FAILED_BY_FILE=function(e,t){var n=["FAILED_BY_FILE",4,e,t];return n.__enum__=qi,n.toString=i,n},qi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",5],qi.FAILED_BY_UNKNOWN.toString=i,qi.FAILED_BY_UNKNOWN.__enum__=qi,qi.COMPLETED=["COMPLETED",6],qi.COMPLETED.toString=i,qi.COMPLETED.__enum__=qi,qi.__empty_constructs__=[qi.SENDING,qi.FAILED_BY_CONFLICT,qi.FAILED_BY_NOT_FOUND,qi.FAILED_BY_NOT_FOUND_FORWARDING,qi.FAILED_BY_UNKNOWN,qi.COMPLETED];var Qi=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.revision=e.revision,this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLockEvent"]=Qi,Qi.__name__=["albero","entity","note","NoteLockEvent"],Qi.prototype={__class__:Qi};var Ji=function(e){this.value=e};n["albero.entity.note.NoteLockExpiredAt"]=Ji,Ji.__name__=["albero","entity","note","NoteLockExpiredAt"],Ji.prototype={fromNow:function(){var e=this.value,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)-(new Date).getTime()|0},calcRelockDelay:function(){return.9*this.fromNow()|0},__class__:Ji};var Xi=n["albero.entity.note.NoteLockStateValue"]={__ename__:["albero","entity","note","NoteLockStateValue"],__constructs__:["FAILED_BY_CONFLICT","FAILED_BY_LOCKED","FAILED_BY_NOT_FOUND","FAILED_BY_UNKNOWN","COMPLETED","RELEASED"]};Xi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",0],Xi.FAILED_BY_CONFLICT.toString=i,Xi.FAILED_BY_CONFLICT.__enum__=Xi,Xi.FAILED_BY_LOCKED=function(e){var t=["FAILED_BY_LOCKED",1,e];return t.__enum__=Xi,t.toString=i,t},Xi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],Xi.FAILED_BY_NOT_FOUND.toString=i,Xi.FAILED_BY_NOT_FOUND.__enum__=Xi,Xi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",3],Xi.FAILED_BY_UNKNOWN.toString=i,Xi.FAILED_BY_UNKNOWN.__enum__=Xi,Xi.COMPLETED=function(e){var t=["COMPLETED",4,e];return t.__enum__=Xi,t.toString=i,t},Xi.RELEASED=["RELEASED",5],Xi.RELEASED.toString=i,Xi.RELEASED.__enum__=Xi,Xi.__empty_constructs__=[Xi.FAILED_BY_CONFLICT,Xi.FAILED_BY_NOT_FOUND,Xi.FAILED_BY_UNKNOWN,Xi.RELEASED];var Zi=function(e){this.value=e};n["albero.entity.note.NoteLockState"]=Zi,Zi.__name__=["albero","entity","note","NoteLockState"],Zi.prototype={isCompleted:function(){return 4==this.value[1]},getExpiredAtOrNull:function(){var e=this.value;return 4==e[1]?e[2]:null},isLockedByOther:function(){return 1==this.value[1]},getLockedUser:function(){var e=this.value;return 1==e[1]?e[2]:null},__class__:Zi};var $i=function(e){null!=e&&(this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLocked"]=$i,$i.__name__=["albero","entity","note","NoteLocked"],$i.prototype={lock:function(e,t,n){this.expiredAt=n,this.deviceId=t,this.userId=e},unlock:function(e){var t=this.userId;null!=t&&null!=e&&t.high==e.high&&t.low==e.low&&(this.expiredAt=null,this.userId=null,this.deviceId=null)},getLockedUserIdWithoutSelf:function(e){var t,n=this.deviceId;if(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)return null;if(null!=this.expiredAt){var i=this.expiredAt,r=i.high,a=i.low;t=4294967296*r+(a>=0?a:a+4294967296)<=(new Date).getTime()}else t=!0;return t?null:this.userId},__class__:$i};var er=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.talkId=e.talk_id,this.setting=new rr(e.setting))};n["albero.entity.note.NotePartialUpdateForSetting"]=er,er.__name__=["albero","entity","note","NotePartialUpdateForSetting"],er.prototype={__class__:er};var tr=function(e){null!=e&&(this.noteId=new Ki(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new ir(e.note_revision_summary))};n["albero.entity.note.NotePartialUpdateForSummary"]=tr,tr.__name__=["albero","entity","note","NotePartialUpdateForSummary"],tr.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:tr};var nr=function(e){if(this.contentFiles=[],null!=e){switch(this.revision=e.revision,this.title=e.title,this.contentType=Wi.createNoteContentType(e.content_type),this.contentType[1]){case 0:this.contentText=e.content;break;case 1:if(this.contentText=null==e.content.text?"":e.content.text,null!=e.content.files)for(var t=0,n=vo.__cast(e.content.files,Array);t=yr.HIRAGANA_SMALL_A&&o<=yr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(yr.KATAKANA_SMALL_A-yr.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},yr.katakanaToRoman=function(e){return(new ur).convert(e)},yr.normalize=function(e){return new Sr(null).normalize(e)},yr.normalizeForFile=function(e){return new Sr(null).normalizeForFile(e)},yr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Sr=function(e){this.beforeTask=null,this.beforeTask=e};n["albero.js.Normalizer"]=Sr,Sr.__name__=["albero","js","Normalizer"],Sr.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof go&&(e=e.val),dr.e("invalid character:",e),hr.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof go&&(e=e.val),dr.e("invalid character:",e),hr.localize("TextCanonicalizer.invalid")}},__class__:Sr};var wr=function(){};n["albero.js.WebSocket"]=wr,wr.__name__=["albero","js","WebSocket"],wr.prototype={__class__:wr};var Ir=function(){};n["albero.js.WebSocketFactory"]=Ir,Ir.__name__=["albero","js","WebSocketFactory"],Ir.newInstance=function(e,t){return new Tr(e,t)};var Tr=function(e,t){var n=this;this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong;var i=Jo.wsConfig,r=require("websocket").client;this.ws=new r(i),this.ws.on("connectFailed",Go(this,this.onError)),this.ws.on("connect",function(e){n.connection=e,e.on("error",Go(n,n.onError)),e.on("close",Go(n,n.onConnectionClose)),e.on("message",Go(n,n.onMessage)),e.on("pong",Go(n,n.onPong)),n.onOpen(null)});var a=null;null!=Jo.proxyURL&&(a={agent:gr.createAgent(Jo.proxyURL)}),this.ws.connect(e,null,null,null,a)};n["albero.js.WebSocketForNodeJs"]=Tr,Tr.__name__=["albero","js","WebSocketForNodeJs"],Tr.__interfaces__=[wr],Tr.prototype={onOpen:function(e){dr.i("WebSocket opened."),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryDataForHubot(e),this.onmessage(t)}},getBinaryDataForHubot:function(e){return oo.ofData(e.binaryData)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){dr.e("WebSocket error. event:",e),null!=this.onerror&&this.onerror()},onClose:function(e){this.removeAllEventListenersForHubot(),dr.i("WebSocket closed. "+y.string(e.code)+" "+y.string(e.reason)+" "+y.string(e.wasClean)),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},removeAllEventListenersForHubot:function(){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new No(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:Tr};var Nr=function(){};n["puremvc.interfaces.IProxy"]=Nr,Nr.__name__=["puremvc","interfaces","IProxy"],Nr.prototype={__class__:Nr};var Er=function(){};n["albero.proxy.AccessTokenResolverProxy"]=Er,Er.__name__=["albero","proxy","AccessTokenResolverProxy"],Er.__interfaces__=[Nr],Er.prototype={__class__:Er};var Ar=function(){};n["albero.proxy.AccessTokenResolverProxyFactory"]=Ar,Ar.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ar.newInstance=function(){return new kr("accessTokenResolver")};var br=function(e,t){Q.call(this),this.proxyName=null!=e?e:br.NAME,null!=t&&this.setData(t)};n["puremvc.patterns.proxy.Proxy"]=br,br.__name__=["puremvc","patterns","proxy","Proxy"],br.__interfaces__=[Nr],br.__super__=Q,br.prototype=r(Q.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:br});var kr=function(e){br.call(this,e)};n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=kr,kr.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],kr.__interfaces__=[Er],kr.__super__=br,kr.prototype=r(br.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=Jo.account?Jo.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__:kr});var Dr=function(){};n["albero.proxy.AccountLoaderProxy"]=Dr,Dr.__name__=["albero","proxy","AccountLoaderProxy"],Dr.__interfaces__=[Nr],Dr.prototype={__class__:Dr};var Cr=function(){};n["albero.proxy.AccountLoaderProxyFactory"]=Cr,Cr.__name__=["albero","proxy","AccountLoaderProxyFactory"],Cr.newInstance=function(){var e=N.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?N.createInstance(e,["accountLoader"]):new Or("accountLoader")};var Or=function(e){br.call(this,e)};n["albero.proxy.AccountLoaderProxyForHubot"]=Or,Or.__name__=["albero","proxy","AccountLoaderProxyForHubot"],Or.__interfaces__=[Dr],Or.__super__=br,Or.prototype=r(br.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 Pe(i,n))})}),null},__class__:Or});var Mr=function(){br.call(this,"broadcast")};n["albero.proxy.AlberoBroadcastProxy"]=Mr,Mr.__name__=["albero","proxy","AlberoBroadcastProxy"],Mr.__super__=br,Mr.prototype=r(br.prototype,{handleNotification:function(e,t){var n=this;switch(dr.v("Receive request from server. name:",e," body:",t),e){case"notify_add_account_control_request":var i=new je(t);this.dataStore.setAccountControlRequest(i),this.sendNotification(e,i);break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1]));break;case"notify_add_acquaintances":for(var r=t[1].map(Go(Bo=this.dataFactory,Bo.newAcquaintance)),a=0;at.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){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t){var n=this.dataStore.getTalk(e.talkId);if(null==n)return void dr.e("talk not found on change favorite talk.");(t=new ii).id=e.talkId,t.talkOrderingTimestamp=n.updatedAt}t.updateByTalkPushNotificationEvent(e)&&this.dataStore.setTalkStatus(t)},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new ii).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);null==t&&((t=new ii).id=e.talkId);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;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var t=this;if(!c.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);return null==n?(dr.e("talkStatus is not found."),null):(n.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(n),n)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new Ke).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:Mr});var Fr=function(){br.call(this,"api")};n["albero.proxy.AlberoServiceProxy"]=Fr,Fr.__name__=["albero","proxy","AlberoServiceProxy"],Fr.__super__=br,Fr.prototype=r(br.prototype,{getOSString:function(){return"bot","bot"},createAccessToken:function(e,t,n){var i=this,r=e.split("$"),a=this.settings.getOs(),o=this.settings.getIDFV(),s=function(e){dr.v("access token:",e),i.settings.setAccessToken(e),n(e)},l=function(e){i.sendNotification("Url",Ue.FORWARD(Y.error))};-1==e.indexOf("@")&&2==r.length?this.wsApi.createAccessTokenById(r[1],r[0],t,o,a).then(s,l):this.wsApi.createAccessToken(e,t,o,a).then(s,l)},authorizeDevice:function(e,t){var n=this,i=this.settings.getIDFV();this.wsApi.authorizeDevice(e,i).then(function(e){t()},function(e){n.apiCaller.handleServerErrorDefault(e)})},createSession:function(e,t){var n=this,i=this.getOSString();this.apiCaller.onSessionClear(),this.wsApi.createSession(e,"1.122",i).then(function(e){var i=M.nowAsInt64();e.passwordExpiration.isExpired(i)?n.sendNotification("password_expiration_overed"):(e.passwordExpiration.needWarning(i,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(M.oneDayAfterAsInt64()),n.sendNotification("password_expiration_warned")),n.apiCaller.onSessionCreated(),t(e),n.apiCaller.fireCallbacksWaitingForSession())},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",re.AUTHORIZE);n.apiCaller.handleServerErrorDefault(e)}n.settings.clearAccessToken(),n.sendNotification("Url",Ue.FORWARD(Y.error))})},startNotification:function(){var e=this;this.wsApi.startNotification().then(function(t){t||(e.dataStore.clear(!0),e.sendNotification("start_notification_failed"))},function(t){e.apiCaller.handleServerErrorDefault(t)})},resetNotification:function(e){var t=this;this.wsApi.resetNotification().then(e,function(e){t.apiCaller.handleServerErrorDefault(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.wsApi.createMessage(a,r.type,r.content).then(function(r){i.dataStore.setMessage(r),i.sendNotification("create_message_complete",[r,o.id]),i.forwardMessages(e,t,n+1),i.dataStore.removeMessage(o.id)},function(e){if(i.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=ta.toLocalError(Wt.SendingMessageConflicted,e);i.sendNotification("error_occurred",t)}else i.sendNotification("error_occurred",e)})}},deleteMessage:function(e,t){var n=this;this.wsApi.deleteMessage(e,t).then(function(e){},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=ta.toLocalError(Wt.DeletingMessageConflicted,e);return void n.sendNotification("error_occurred",t)}n.sendNotification("error_occurred",e)}})},updateReadStatuses:function(e,t){var n=this;this.wsApi.updateReadStatuses(e,t).then(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)},function(e){n.apiCaller.handleServerErrorDefault(e)})},searchMessagesAroundDateTime:function(e,t){return this.wsApi.searchMessagesAroundDateTime(e,t)},uploadV2:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a),this.prepareMessageFileAsync(n.file,n.thumb,e).then(function(e){r._createMessage(t,Qt.file,e,a,i)},function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return dr.w("WARNING method: upload",o),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMultiV2:function(e,t,n,i,r){var a=this,o=this.dataFactory.newDummyMultipleFileMessage(t,n,i);this.sendNotification("create_message_start",o);for(var s=Promise.resolve([]),l=0;l0&&(s.text=n),a._createMessage(t,Qt.textMultipleFile,s,o,r)}},function(e){a.sendNotification("create_message_fail",[e,o],r)})},uploadMultiForHubot:function(e,t,n,i){var r=this.dataStore.getTalk(e),a=n.map(function(e){return{file:e,thumb:null}});if(null==r){var o=this.dataFactory.newDummyMultipleFileMessage(e,t,a),s={code:400,message:"invalid talk_id (deleted talk)"};return dr.w("WARNING method: uploadMulti",s),void this.sendNotification("create_message_fail",[s,o],i)}this.uploadMultiV2(r.domainId,r.id,t,a,i)},prepareMessageFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,ui.THUMBNAIL,function(n){t.setAuth(n),e(io.Some(t))},function(t){e(io.None)}):e(io.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,ui.MESSAGE,function(n){var i=yr.normalizeForFile(e.name),a=F.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},prepareNoteFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,ui.NOTE_THUMBNAIL,function(n){t.setAuth(n),e(io.Some(t))},function(t){e(io.None)}):e(io.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,ui.NOTE_ATTACHMENT,function(n){var i=yr.normalizeForFile(e.name),a=F.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},uploadFile:function(e,t,n,i,r){var a=this,o=e,s=yr.normalizeForFile(o.name),l=o.type,u=o.size;this.wsApi.createUploadAuth(s,l,u,t,n).then(function(t){a.fileService.upload(t,l,e).then(function(e){i(t.rawValue)},function(e){dr.e("failed to upload: "+y.string(e));var t=new ea({code:null,detail:null,message:e});if(n!=ui.THUMBNAIL&&n!=ui.NOTE_THUMBNAIL&&n!=ui.NOTE_ATTACHMENT){var i=ta.toLocalError(Wt.GeneralFileError,t);a.sendNotification("error_occurred",i)}r(t)})},function(e){if(n!=ui.THUMBNAIL&&n!=ui.NOTE_THUMBNAIL&&n!=ui.NOTE_ATTACHMENT&&null!=e)if(502==e.code&&null!=e.detail){var t=U.fromIntOrInt64(e.detail.limit_max);if("file_size"==e.detail.limit_target){var i=ta.toLocalError(Wt.UploadSizeOvered(t),e);a.sendNotification("error_occurred",i)}else if("storage_size"==e.detail.limit_target){var o=ta.toLocalError(Wt.StorageSizeOvered(t),e);a.sendNotification("error_occurred",o)}}else a.sendNotification("error_occurred",e);r(e)})},createDownloadAuth:function(e,t,n,i,r){this.wsApi.createDownloadAuth(e,t,n).then(function(e){i(e)},function(e){r(e)})},deleteAttachment:function(e,t){var n=this;this.wsApi.deleteAttachment(e,t).then(function(e){},function(e){n.apiCaller.handleServerErrorDefault(e)})},getAttachments:function(e,t){var n=this;null==t&&(t={sinceId:null,maxId:null}),this.wsApi.getAttachments(e,20,t.sinceId,t.maxId).then(function(t){c.iter(t,function(e){n.dataStore.setTalkFileInfo(e,!0)}),n.sendNotification("get_file_responsed",{talkId:e,files:t})},function(e){n.apiCaller.handleServerErrorDefault(e)})},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,qt.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",[e,a],i),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,r=this.settings.getSelectedDomainId();if(null!=r){e=null==e?{sinceId:null,maxId:null}:e;var a=this.apiCaller,o=e.sinceId,s=e.maxId,l=nn.orderToInt(t);a.call("get_announcements",[r,20,o,s,l],function(e){var a=e.map(Go(Bo=i.dataFactory,Bo.newAnnouncement));i.sendNotification("notify_get_announcements",{domainId:r,announcements:a,sortOrder:t,callerKey:n})})}},getAnnouncementStatuses:function(e){var t=this;this.apiCaller.call("get_announcement_statuses",[],function(n){for(var i=0;i0&&400==e.code&&"invalid file_id"==e.message&&(a.setState(qi.FAILED_BY_NOT_FOUND_FORWARDING),o.dataStore.setNoteLocalEdit(a.getNoteId(),a)),null!=a&&400==e.code&&"invalid talk_id"==e.message){var i=Kt.getNoteForwardingForbiddenError(),r=ta.toLocalError(i,e);return o.sendNotification("error_occurred",r),Promise.reject(e)}return o.sendNotification("error_occurred",e),Promise.reject(e)})},updateNoteSetting:function(e,t,n){var i=this;return new Promise(function(r,a){i.apiCaller.call("update_note_setting",[e.value,t,n],function(e){r(new Ai(e))},a)}).then(function(e){return i.sendNotification("update_note_setting_completed",e),e},function(t){return 404==t.code?(i.dataStore.setNote(e,null),i.sendNotification("update_note_setting_failed_by_not_found",e),Promise.reject(t)):409==t.code&&"conflict"==t.message?(i.dataStore.setNote(e,null),i.sendNotification("update_note_setting_failed_by_conflict",e),Promise.reject(t)):409==t.code&&"locked by another user"==t.message&&null!=t.detail&&null!=t.detail.user_id&&null!=t.detail.device_id?(i.sendNotification("update_note_setting_failed_by_editing",e),Promise.reject(t)):(i.sendNotification("error_occurred",t),Promise.reject(t))})},updateNote:function(e,t,n,i,r,a,o){var s=this;return new Promise(function(o,l){var u=Wi.getValue(i);s.apiCaller.callApiReliable("update_note",[e.value,t,n,u,r,a],function(e){o(new Ei(e))},l,Go(s,s.retryTimeForCreateOrUpdateNoteFromError))}).then(function(t){return null!=o&&s.dataStore.setNoteLocalEdit(e,null),s.dataStore.setNote(e,t.note),s.sendNotification("update_note_completed",t),t},function(t){return 404==t.code?(null!=o?(o.setState(qi.FAILED_BY_NOT_FOUND),s.dataStore.setNoteLocalEdit(e,o)):s.dataStore.setNote(e,null),Promise.reject(t)):409==t.code&&"conflict"==t.message?(null!=o?(o.setState(qi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)):s.dataStore.setNote(e,null),Promise.reject(t)):409==t.code&&"locked by another user"==t.message&&null!=t.detail&&null!=t.detail.user_id&&null!=t.detail.device_id?(null!=o&&(o.setState(qi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)),Promise.reject(t)):(null!=o&&(o.setState(qi.FAILED_BY_UNKNOWN),s.dataStore.setNoteLocalEdit(e,o)),s.sendNotification("error_occurred",t),Promise.reject(t))})},deleteNote:function(e){var t=this;return new Promise(function(n,i){t.apiCaller.call("delete_note",[e.value],function(e){n(new Ii(e))},i)}).then(function(e){return t.sendNotification("delete_note_completed",e),e},function(n){return 404==n.code&&t.dataStore.setNote(e,null),t.sendNotification("error_occurred",n),Promise.reject(n)})},lockNote:function(e,t,n){var i=this;return new Promise(function(e,r){i.apiCaller.call("lock_note",[t.value,n],e,r)}).then(function(e){var r=i.dataStore.getNote(t);if(null!=r){var a=i.dataStore.me.id,o=i.settings.getDeviceId();r.lock(n,a,o,e)}return new Zi(Xi.COMPLETED(new Ji(e)))}).catch(function(n){if(400==n.code)return dr.v("invalid parameter."),i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN);if(403==n.code)return dr.v("forbidden."),i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN);if(404==n.code)return dr.v("note is not found."),i.dataStore.setNote(t,null),new Zi(Xi.FAILED_BY_NOT_FOUND);if(409==n.code&&"locked by another user"==n.message&&null!=n.detail&&null!=n.detail.user_id&&null!=n.detail.device_id){var r=i.dataStore.getUser(e,n.detail.user_id);return new Zi(Xi.FAILED_BY_LOCKED(r))}return 409==n.code&&"conflict"==n.message?(dr.v("conflict"),new Zi(Xi.FAILED_BY_CONFLICT)):(i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN))})},unlockNote:function(e,t,n){var i=this;return new Promise(function(e,r){i.apiCaller.call("unlock_note",[t.value,n],e,r)}).then(function(e){var r=i.dataStore.getNote(t);return null!=r&&r.unlock(n,i.dataStore.me.id),new Zi(Xi.RELEASED)}).catch(function(n){if(400==n.code)return dr.v("invalid parameter."),i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN);if(403==n.code)return dr.v("forbidden."),i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN);if(404==n.code)return dr.v("note is not found."),i.dataStore.setNote(t,null),new Zi(Xi.FAILED_BY_NOT_FOUND);if(409==n.code&&"conflict"==n.message)return new Zi(Xi.FAILED_BY_CONFLICT);if(409==n.code&&"locked by another user"==n.message&&null!=n.detail&&null!=n.detail.user_id&&null!=n.detail.device_id){var r=i.dataStore.getUser(e,n.detail.user_id);return new Zi(Xi.FAILED_BY_LOCKED(r))}return i.sendNotification("error_occurred",n),new Zi(Xi.FAILED_BY_UNKNOWN)})},retryTimeForCreateOrUpdateNoteFromError:function(e){return this.shouldRetryCreateOrUpdateNote(e)?io.Some(this.apiCaller.retryTimeForReplicationLag()):io.None},shouldRetryCreateOrUpdateNote:function(e){return null!=e.code&&(500==e.code?"Internal Error (IllegalStateException)"==e.message:400==e.code&&"invalid file_id"==e.message)},__class__:xr});var Ur=function(){br.call(this,"appState")};n["albero.proxy.AppStateProxy"]=Ur,Ur.__name__=["albero","proxy","AppStateProxy"],Ur.__super__=br,Ur.prototype=r(br.prototype,{start:function(){this.updateLastActivityAt(),this.checkInactiveInterval()},activateAppIfNeed:function(){this.updateLastActivityAt(),this.appState==k.Inactive&&this.setAppState(k.Active)},setAppState:function(e){dr.v("APP_STATE_CHANGED: ",e),this.appState=e,this.sendNotification("app_state_changed",this.appState)},updateLastActivityAt:function(){this.lastActivityAt=new Date},checkInactiveInterval:function(){this.checkInactive(),new qa(500).run=Go(this,this.checkInactive)},checkInactive:function(){this.appState!=k.Inactive&&((new Date).getTime()-this.lastActivityAt.getTime()<2e3||this.setAppState(k.Inactive))},__class__:Ur});var Pr=function(){var e=new hi(-1,-1);this.dummyFileId=e;var t=new hi(-1,-1);this.dummyMsgId=t,br.call(this,"dataFactory")};n["albero.proxy.DataFactoryProxy"]=Pr,Pr.__name__=["albero","proxy","DataFactoryProxy"],Pr.__super__=br,Pr.prototype=r(br.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 bt(e)},newDomain:function(e){return this.dataStore.setDomainIfLatest(new gt(e))},newDomainInvite:function(e){return this.dataStore.setDomainInvite(new Et(e))},newTalk:function(e){return this.dataStore.setTalk(new Kn(e))},newTalkStatus:function(e){return this.dataStore.setTalkStatus(new ii(e))},newDummyMessage:function(e,t,n){var i=this,r=new qt;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 hi(0,1),l=o.high-s.high|0,u=o.low-s.low|0;if(za.ucompare(o.low,s.low)<0){l--;l|=0}a=new hi(l,u)}this.dummyMsgId=a;var c=[];switch(r.type[1]){case 4:c=[this.createDummyFileInfo(r,r.content)];break;case 5:c=vo.__cast(r.content.files,Array).map(function(e){return i.createDummyFileInfo(r,e)})}return this.dataStore.setMessageWithFileInfos(r,c),r},newDummyFileMessage:function(e,t){var n=this.createFileInfoDynamic(t);return this.newDummyMessage(e,Qt.file,n)},newDummyMultipleFileMessage:function(e,t,n){var i=c.array(n.filter(function(e){return null!=e.file}).map(Go(this,this.createFileInfoDynamic)));return this.newDummyMessage(e,Qt.textMultipleFile,{text:t,files:i})},createFileInfoDynamic:function(e){var t=e.file;return{content_type:t.type,content_size:t.size,name:yr.normalizeForFile(t.name),file:t,localThumbInfo:e.thumb}},createDummyFileInfo:function(e,t){var n,i=Ft.fromMessageAndFileWithFileId(e,t,this.dummyFileId),r=this.dummyFileId;if(null==r)n=null;else{var a=new hi(0,1),o=r.high-a.high|0,s=r.low-a.low|0;if(za.ucompare(r.low,a.low)<0){o--;o|=0}n=new hi(o,s)}return this.dummyFileId=n,i},newQuestion:function(e){return this.dataStore.setQuestion(new pn(e))},newAnnouncement:function(e){return new We(e)},newAnnouncementStatus:function(e){return this.dataStore.setAnnouncementStatus(new Ke(e))},newAnnouncementStatusForDomain:function(e){var t=new Ke;return t.domainId=e,this.dataStore.setAnnouncementStatus(t)},newAccountControlRequest:function(e){return this.dataStore.setAccountControlRequest(new je(e))},newAccountControlGroup:function(e){return this.dataStore.setAccountControlGroup(new Le(e))},newUserPresence:function(e,t){var n=new di(e,t);return this.dataStore.setUserPresence(n),n},__class__:Pr});var Lr=function(){this.departmentStore=new lt,this.stampStore=new Hn,this.questionStore=new In,this.fileInfoStore=new Ut,this.messageStore=new en,this.conferenceStore=new et,this.solutionStore=new Un,this.directAppStore=new ft,this.flowNotificationBadgeStore=new Lt,br.call(this,"dataStore")};n["albero.proxy.DataStoreProxy"]=Lr,Lr.__name__=["albero","proxy","DataStoreProxy"],Lr.__super__=br,Lr.prototype=r(br.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!=Xo[i]?e.setReserved(i,u):e.h[i]=u}this.storageForUsers.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new ao);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=Xo[n]?i.setReserved(n,e):i.h[n]=e},getUserPresence:function(e){if(null==this.userPresences)return null;var t="_"+e.high+"_"+e.low,n=this.userPresences;return null!=Xo[t]?n.getReserved(t):n.h[t]},isDepartmentsChanged:function(e,t){return!U.eqArray(e.departments,t.departments)},setUsersIfLatest:function(e,t){var n=this.ensureDomainUserMap(e),i=Go(this,this.setUserIfLatest),r=n;c.iter(t,function(e){i(r,e)})},clearDomainUsers:function(e){this.users.remove("_"+e.high+"_"+e.low)&&this.storageForUsers.setDirtyFlag()},clearUsersDepartments:function(e){var t="_"+e.high+"_"+e.low,n=this.users,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new ro(i,i.arrayKeys());r.hasNext();){var a=r.next();a.user.departments=null,this.sendNotification("notify_update_user",a.user)}this.storageForUsers.setDirtyFlag()},removeFriend:function(e,t){var n="_"+e.high+"_"+e.low,i=this.users,r=null!=Xo[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=Xo[a]?r.getReserved(a):r.h[a];null!=o&&(o.type=2)}this.storageForUsers.setDirtyFlag()},removeAcquaintance:function(e,t){this.removeFriend(e,t)},getUser:function(e,t){if(null==t)return null;var n,i=new hi(0,0);if(t.high==i.high&&t.low==i.low)return null;if(null!=this.me){var r=this.me.id;n=null!=r&&null!=t&&r.high==t.high&&r.low==t.low}else n=!1;if(n)return this.me.toDomainUser(e);var a="_"+e.high+"_"+e.low,o=this.users,s=null!=Xo[a]?o.getReserved(a):o.h[a];if(null!=s){var l="_"+t.high+"_"+t.low,u=null!=Xo[l]?s.getReserved(l):s.h[l];if(null!=u)return u.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!=Xo[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new hi(0,0);if(t.high==i.high&&t.low==i.low)return null;var r=n.me.id;if(null!=r&&null!=t&&r.high==t.high&&r.low==t.low)return n.me.toDomainUser(e);var o="_"+t.high+"_"+t.low,s=null!=Xo[o]?a.getReserved(o):a.h[o];return null!=s?s.user:null});for(var o=[],s=a.arrayKeys(),l=new ro(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 ro(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!=Xo[t]?n.getReserved(t):n.h[t]},getValidPairTalk:function(e,t){var n=this;return null==this.me?null:c.find(this.getTalks(),function(i){if(!N.enumEq(i.type,qn.PairTalk))return!1;var r=i.domainId;return null!=r&&null!=t&&r.high==t.high&&r.low==t.low&&(!!c.exists(i.userIds,function(t){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})&&!!c.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!=Xo[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.storageForUsers.setDirtyFlag(),this.sendNotification("notify_update_user",s))}else{var m={type:2,user:s};null!=Xo[u]?r.setReserved(u,m):r.h[u]=m,this.storageForUsers.setDirtyFlag(),this.sendNotification("notify_update_user",s)}}return this.storageForTalks.setDirtyFlag(),e},getTalks:function(){for(var e=[],t=this.talks.keys();t.hasNext();){var n=t.next(),i=this.talks;e.push(null!=Xo[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){c.iter(e,Go(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}this.questionStore.removeTalkQuestions(e),this.talks.remove("_"+e.high+"_"+e.low),this.storageForTalks.setDirtyFlag()},getTalkStatuses:function(){for(var e=[],t=this.talkStatuses.keys();t.hasNext();){var n=t.next(),i=this.talks;if(null!=Xo[n]?i.existsReserved(n):i.h.hasOwnProperty(n)){var r=this.talkStatuses;e.push(null!=Xo[n]?r.getReserved(n):r.h[n])}}return e},getTalkStatus:function(e){var t="_"+e.high+"_"+e.low,n=this.talkStatuses;return null!=Xo[t]?n.getReserved(t):n.h[t]},setTalkStatus:function(e){var t=e.id,n="_"+t.high+"_"+t.low;if(null!=this.domainUnreadCounts){var i=this.talks,r=null!=Xo[n]?i.getReserved(n):i.h[n];if(null!=r){var a=r.domainId;this.domainUnreadCounts.remove("_"+a.high+"_"+a.low)}}var o=this.talkStatuses;return null!=Xo[n]?o.setReserved(n,e):o.h[n]=e,this.sendNotification("brand_badge_changed"),this.storageForTalkStatuses.setDirtyFlag(),e},removeTalkStatus:function(e){var t="_"+e.high+"_"+e.low;if(null!=this.domainUnreadCounts){var n=this.talks,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}this.talkStatuses.remove(t),this.storageForTalkStatuses.setDirtyFlag()},getDomains:function(){for(var e=[],t=this.domains,n=new ro(t,t.arrayKeys());n.hasNext();){var i=n.next();e.push(i)}return e},getDomain:function(e){var t="_"+e.high+"_"+e.low,n=this.domains;return null!=Xo[t]?n.getReserved(t):n.h[t]},setDomainIfLatest:function(e){var t,n=e.id,i="_"+n.high+"_"+n.low,r=this.domains,a=null!=Xo[i]?r.getReserved(i):r.h[i];if(null!=a){var o=e.updatedAt,s=a.updatedAt,l=o.high-s.high|0;l=0!=l?l:za.ucompare(o.low,s.low),t=(o.high<0?s.high<0?l:-1:s.high>=0?l:1)>=0}else t=!0;if(t){var u=this.domains;return null!=Xo[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!=Xo[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 ao,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=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(w.startsWith(n,"talk_")){var i=n.substring("talk_".length),r=U.makeFromIdStr(i);this.sendNotification("keyword_detaction_updated",{domainId:null,talkId:r,detected:!1,emphasis:e})}else if(w.startsWith(n,"announcement_")){var a=n.substring("announcement_".length),o=U.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!=Xo[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__:zr});var Wr=function(){};n["albero.proxy.KeywordParser"]=Wr,Wr.__name__=["albero","proxy","KeywordParser"],Wr.parse=function(e){var t=w.htmlEscape(e,!0),n=new o(""(.*?)"","g").map(t,function(e){return Wr.encodeSpace(e.matched(1))});return new o("[  ]","g").split(n).filter(j.isNotEmpty).map(Wr.decodeSpace).map(Wr.createParsedKeyword)},Wr.encodeSpace=function(e){return w.replace(w.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},Wr.decodeSpace=function(e){return w.replace(w.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},Wr.createParsedKeyword=function(e){var t=new o("\\[type:([A-Za-z]+)\\](.*)","g");if(t.match(e)){var n=t.matched(1),i=t.matched(2),r=qr.getKeywordTypeByMessageTypeString(n);if(r!=Vr.normal)return new Kr(r,i)}return new Kr(Vr.normal,e)};var Kr=function(e,t){this.type=e,this.word=t};n["albero.proxy.ParsedKeyword"]=Kr,Kr.__name__=["albero","proxy","ParsedKeyword"],Kr.prototype={__class__:Kr};var Vr=n["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};Vr.normal=["normal",0],Vr.normal.toString=i,Vr.normal.__enum__=Vr,Vr.selectOneReplyOnly=["selectOneReplyOnly",1],Vr.selectOneReplyOnly.toString=i,Vr.selectOneReplyOnly.__enum__=Vr,Vr.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],Vr.yesOrNoReplyOnly.toString=i,Vr.yesOrNoReplyOnly.__enum__=Vr,Vr.todoDoneOnly=["todoDoneOnly",3],Vr.todoDoneOnly.toString=i,Vr.todoDoneOnly.__enum__=Vr,Vr.__empty_constructs__=[Vr.normal,Vr.selectOneReplyOnly,Vr.yesOrNoReplyOnly,Vr.todoDoneOnly];var qr=function(){};n["albero.proxy.KeywordTypeHelper"]=qr,qr.__name__=["albero","proxy","KeywordTypeHelper"],qr.getKeywordType=function(e){return null!=e?qr.getKeywordTypeByMessageTypeString(qt.typeString(e)):Vr.normal},qr.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return Vr.selectOneReplyOnly;case"todoDone":return Vr.todoDoneOnly;case"yesOrNoReply":return Vr.yesOrNoReplyOnly}return Vr.normal},qr.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==Qt.selectOneReply;case 2:return e==Qt.yesOrNoReply;case 3:return e==Qt.todoDone}},qr.createFilterClassStringFromMessageType=function(e){return qr.createFilterClassString(qr.getKeywordType(e))},qr.createFilterClassString=function(e){return"keyword_type_"+y.string(e)};var Qr=function(){this.isCallingUpdateLastUsedAt=!1,br.call(this,"lastUsedAtUpdater")};n["albero.proxy.LastUsedAtUpdaterProxy"]=Qr,Qr.__name__=["albero","proxy","LastUsedAtUpdaterProxy"],Qr.__super__=br,Qr.prototype=r(br.prototype,{startPolling:function(e){var t=this;if(null==this.pollingTimer){var n,i=this.getLastUsedExpiredAt();if(null==i)n=0;else{var r=i.high,a=i.low;n=4294967296*r+(a>=0?a:a+4294967296)-(new Date).getTime()}n>0?qa.delay(function(){t.startPolling(e)},0|n):(this.isCallingUpdateLastUsedAt=!0,e(),this.pollingTimer=new qa(6e5),this.pollingTimer.run=function(){t.isCallingUpdateLastUsedAt||(t.isCallingUpdateLastUsedAt=!0,e())})}},stopPolling:function(){null!=this.pollingTimer&&(this.pollingTimer.stop(),this.pollingTimer=null)},getLastUsedExpiredAt:function(){return null!=this.lastUsedExpiredAtCache?this.lastUsedExpiredAtCache:this.settings.getLastUsedExpiredAt()},update:function(){this.lastUsedExpiredAtCache=M.afterAsInt64(6e5),this.settings.setLastUsedExpiredAt(this.lastUsedExpiredAtCache),this.isCallingUpdateLastUsedAt=!1},cancel:function(){this.isCallingUpdateLastUsedAt=!1},__class__:Qr});var Jr=function(){br.call(this,"limitations")};n["albero.proxy.LimitationsProxy"]=Jr,Jr.__name__=["albero","proxy","LimitationsProxy"],Jr.__super__=br,Jr.prototype=r(br.prototype,{getMaxTalkers:function(){var e=this,t=H.flatMap(H.flatMap(H.option(this.settings.getSelectedDomainId()),function(t){return H.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__:Jr});var Xr=function(){this.connectionStatus=D.Ok,br.call(this,"rpc"),this.responseHandlers=new to,this.connectionKeeper=new Zr(Go(this,this.ping))};n["albero.proxy.MsgPackRpcProxy"]=Xr,Xr.__name__=["albero","proxy","MsgPackRpcProxy"],Xr.__super__=br,Xr.prototype=r(br.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=Ir.newInstance(Jo.endpoint,{onopen:Go(this,this.onOpen),onmessage:Go(this,this.onMessage),onclose:Go(this,this.onClose),onpong:Go(this,this.onPong)}),Xr.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.close();var e=this.ws;return this.ws=null,Xr.pingAt=null,this.lastUsedAtUpdater.stopPolling(),e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=D.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){Xr.pingAt=null,dr.v("PONG "+y.string(e))},onMessage:function(e){var t=new Eo(e,!0).o,n=vo.__cast(t[0],zo);if(1==n&&4==t.length){var i=vo.__cast(t[1],zo),r=t[2],a=t[3],o=this.responseHandlers.h[i];if(null==o)return void dr.e("No ResponseHandler prepared. msgId:%s error:%s result:",i,r,a);dr.v("response received. method:",o.method," data:",t),null==r?o.onSuccess(a):(dr.e("Receive Error Response. method:",o.method," error:",r),o.onError(r)),this.responseHandlers.remove(i)}else if(0==n&&4==t.length){var s=vo.__cast(t[1],zo),l=vo.__cast(t[2],String),u=vo.__cast(t[3],Array);if(dr.v("request received. method:",l),0==u.length)return void dr.e("empty params.");if(this.broadcast.handleNotification(l,u[0]),null==this.ws)return void dr.e("websocket was finished.");dr.v("response sent. method:",l),this.ws.send(new Ao([1,s,null,!0]).o.getBytes())}},onClose:function(e,t,n){dr.i("onClose. code:"+e+", reason:"+t+", wasClean:"+(null==n?"null":""+n)),1001==e&&n||(this.connectionStatus=1e3!=e&&1005!=e||"concurrent access"!=t?1e3!=e&&1005!=e||"forcibly closed"!=t?D.Error:D.ForcibliyClosedError:D.ConcurrentAccessError,this.connectionStatus==D.ForcibliyClosedError?this.sendNotification("SignOut"):this.sendNotification("Url",Ue.FORWARD(Y.error))),this.finishWebSocket(),this.connectionKeeper.setConnected(!1)},restart:function(e){null==e&&(e=500);for(var t=this,n=this.finishWebSocket(),i=this.responseHandlers.keys();i.hasNext();){var r=i.next();this.responseHandlers.remove(r)}var a=null;a=function(){null==n||n.isClosed()?t.initWebSocket():qa.delay(a,100)},qa.delay(a,e)},call:function(e,t,n,i){if(null!=this.ws){null==t&&(t=[]),null==n&&(n=function(e){}),null==i&&(i=Go(this,this.onServerError));var r=Xr.lastMsgId++,a=this.responseHandlers,o=new $r(e,n,i);a.h[r]=o;var s=[0,r,e,t],l=new Ao(s).o.getBytes();this.ws.send(l),dr.v("send request. data:",s)}else dr.e("disconnected. data:",this.data)},ping:function(){switch(this.connectionStatus[1]){case 2:case 3:return}null==this.ws||this.ws.isClosed()?(this.restart(),dr.v("restart connection. "+Xr.pingAt+" "+y.string(null==this.ws||this.ws.isClosed()))):Xr.pingAt>0?(this.restart(),dr.v("restart connection. "+Xr.pingAt+" "+y.string(null==this.ws||this.ws.isClosed()))):(dr.v("before pingAt "+Xr.pingAt),this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),Xr.pingAt=(new Date).getTime(),dr.v("send ping")))},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__:Xr});var Zr=function(e){this.connected=!1,this.ping=e};n["albero.proxy._MsgPackRpcProxy.ConnectionKeeper"]=Zr,Zr.__name__=["albero","proxy","_MsgPackRpcProxy","ConnectionKeeper"],Zr.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 qa(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=qa.delay(r,n)}})(3e3)()}},deleteTimer:function(){null!=this.timer&&(this.timer.stop(),this.timer=null)},__class__:Zr};var $r=function(e,t,n){this.method=e,this.onSuccess=t,this.onError=n};n["albero.proxy._MsgPackRpcProxy.ResponseHandler"]=$r,$r.__name__=["albero","proxy","_MsgPackRpcProxy","ResponseHandler"],$r.prototype={__class__:$r};var ea=function(e){this.code=e.code,this.message=e.message,this.detail=e.detail};n["albero.proxy.Error"]=ea,ea.__name__=["albero","proxy","Error"],ea.prototype={__class__:ea};var ta=function(){};n["albero.proxy.ErrorConverter"]=ta,ta.__name__=["albero","proxy","ErrorConverter"],ta.toLocalError=function(e,t){return{code:t.code,message:t.message,detail:t.detail,localErrorType:e}};var na=function(){br.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new ao,this.updateReadAnnouncementStatusesTimers=new ao};n["albero.proxy.ReadStatusUpdaterProxy"]=na,na.__name__=["albero","proxy","ReadStatusUpdaterProxy"],na.__super__=br,na.prototype=r(br.prototype,{updateReadStatuses:function(e,t){var n=this,i=this.dataStore.getTalkStatus(e);if(null!=i&&i.updateByReadingMessages(t,this.dataStore.me.id)){this.dataStore.setTalkStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadStatusesTimers,o=null!=Xo[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadMessageId,l=qa.delay(function(){n.updateReadStatusesTimers.remove(r),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,s)},1e3),u=this.updateReadStatusesTimers;null!=Xo[r]?u.setReserved(r,l):u.h[r]=l}},updateAnnouncementReadStatus:function(e,t){var n=this,i=this.dataStore.getAnnouncementStatus(e);if(null!=i&&i.updateByReadingAnnouncements(t)){this.dataStore.setAnnouncementStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadAnnouncementStatusesTimers,o=null!=Xo[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadAnnouncementId;o=qa.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(r),n.api.updateAnnouncementReadStatus(e,s)},1e3);var l=this.updateReadAnnouncementStatusesTimers;null!=Xo[r]?l.setReserved(r,o):l.h[r]=o}},__class__:na});var ia=function(){br.call(this,"routing")};n["albero.proxy.RoutingProxy"]=ia,ia.__name__=["albero","proxy","RoutingProxy"],ia.__super__=br,ia.prototype=r(br.prototype,{onRegister:function(){},init:function(){null==this.router&&(this.router=new ra(this,this.settings,this.dataStore),this.sendNotification("first_routing_will_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.stop()},__class__:ia});var ra=function(e,t,n){this.proxy=e,this.settings=t,this.dataStore=n,this.urlConverterDelegate=new aa(t,n)};n["albero.proxy._RoutingProxy.LocalRouter"]=ra,ra.__name__=["albero","proxy","_RoutingProxy","LocalRouter"],ra.prototype={notify:function(e){var t=this.getDomainId(e);this.settings.setSelectedDomainId(t),this.proxy.sendNotification("current_page_changed",e)},forward:function(e){0!=e[1]&&this.notify(e)},redirect:function(e,t){},redirectWithHash:function(){},back:function(){this.notify(this.prev)},stop:function(){},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 7:return e[2];case 11:return e[2];default:return null}},parseFragment:function(e){return K.createUrls(e,this.urlConverterDelegate)},toFragment:function(e){return K.createFragment(e,this.urlConverterDelegate)},__class__:ra};var aa=function(e,t){this.settings=e,this.dataStore=t};n["albero.proxy.UrlConverterDelegate"]=aa,aa.__name__=["albero","proxy","UrlConverterDelegate"],aa.__interfaces__=[V],aa.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return H.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e;switch(H.flatMap(this.getLastSelectedDomainId(),Go(this,this.getDomain))[1]){case 0:e=H.flatMap(this.getLastSelectedDomainId(),Go(this,this.getDomain));break;case 1:e=this.getOldestDomain()}return H.map(e,function(e){return e.id})},getDomain:function(e){return H.option(this.dataStore.getDomain(e))},getOldestDomain:function(){return new kt(this.dataStore.getDomains()).getOldestDomain()},__class__:aa};var oa=function(){br.call(this,"searchService")};n["albero.proxy.SearchServiceProxy"]=oa,oa.__name__=["albero","proxy","SearchServiceProxy"],oa.__super__=br,oa.prototype=r(br.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 An(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 ao),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new ao);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(function(){(n+=1)==t.length&&i()}):i();var r=0,a=function(){2==(r+=1)&&e.api.getTalks(i)};e.api.getFriends(a),e.api.getAcquaintances(a)}),e.api.getAccountControlRequests(function(){e.api.getDomainInvites(i)}),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=L.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:za.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;tr[o])return!0;if(a[o]0,a=n.filter(function(e){return!e.isALL()}).map(function(e){return{user:{id:Ca.toIdStr(e.userIdNumStr)}}});return new Ca(e,t,r,i,a)},Ca.toIdStr=function(e){var t=U.parse(e);return"_"+t.high+"_"+t.low},Ca.prototype={__class__:Ca};var Oa=function(){br.call(this,"hubotObject")};n["albero_cli.proxy.HubotObjectProxy"]=Oa,Oa.__name__=["albero_cli","proxy","HubotObjectProxy"],Oa.__super__=br,Oa.prototype=r(br.prototype,{userObject:function(e){return ya.of(e).toCompatibleData()},meObject:function(e){return Sa.of(e).toCompatibleData()},userObjectByIdStr:function(e,t){var n,i=t.split("_");i.length>2?n=new hi(y.parseInt(i[1]),y.parseInt(i[2])):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!=Xo[l]?n.setReserved(l,a):n.h[l]=a)}return t},talkObject:function(e,t){var n=this.userObjectsByIds(e.domainId,e.userIds,t),i=this.domainObjectById(e.domainId,t);return Ta.create(e,n,i).toCompatibleData()},talkObjects:function(e){for(var t=new ao,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__:Oa});var Ma=function(){br.call(this,"messageEvent"),this.emitters=new ao};n["albero_cli.proxy.MessageEventProxy"]=Ma,Ma.__name__=["albero_cli","proxy","MessageEventProxy"],Ma.__super__=br,Ma.prototype=r(br.prototype,{registEmitter:function(e,t){Fa.factory=this;var n=Fa.createInstance(t);if(null!=n){var i=this.emitters;null!=Xo[e]?i.setReserved(e,n):i.h[e]=n}},noteCreated:function(e,t){var n=this.emitters,i=null!=Xo[t]?n.getReserved(t):n.h[t];if(null!=i&&(this.emitters.remove(t),null!=e)){var r=e.noteId.toString(),a=this.emitters;null!=Xo[r]?a.setReserved(r,i):a.h[r]=i,i.talk=this.dataStore.getTalk(e.talkId),i.setFirstReader(this.dataStore.me),i.onceOnSend(e),i.hasEventListener()||this.emitters.remove(r)}},messageCreated:function(e,t){var n=this.emitters,i=null!=Xo[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!=Xo[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!=Xo[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",Se.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!=Xo[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=U.makeFromIdStr(r),u=l.high-t.high|0;u=0!=u?u:za.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!=Xo[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!=Xo[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!=Xo[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__:Ma});var Fa=function(e){this.context=e,this.listeners=new ao,Object.defineProperty(this,"readUsers",{get:this.get_readUsers}),Object.defineProperty(this,"unreadUsers",{get:this.get_unreadUsers})};n["albero_cli.proxy.Emitter"]=Fa,Fa.__name__=["albero_cli","proxy","Emitter"],Fa.createInstance=function(e){for(var t=null,n=v.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(),U.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?[]:Fa.factory.hubotObject.userObjectsByIds(this.talk.domainId,e)},createNoteObjectForHubot:function(e){return Fa.factory.hubotObject.noteObject(e)},get_message:function(e){return Fa.factory.hubotObject.messageObject(e)},answer:function(e){var t,n=this,i=qt.typeOf(this.message.type),r=this.message.id.split("_");r.length>2?t=new hi(y.parseInt(r[1]),y.parseInt(r[2])):t=null;switch(i[1]){case 14:case 16:case 18:case 19:case 20:case 21:var a=this.message.content.in_reply_to;t=new hi(a.high,a.low)}var o=Ie.Question(t,function(t){var r=t.responses;switch(i[1]){case 13:case 14:case 19:var a=n.users(r[0].userIds),o=n.users(r[1].userIds);e(a,o);break;case 17:case 18:case 21:var s=n.users(r[0].userIds),l=n.users(r[1].userIds);e(s,l);break;case 15:case 16:case 20:var u=r.map(function(e){return n.users(e.userIds)});e(u)}});Fa.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=qa.delay(i,60*n.__readerTimerWait*1e3|0)):(t(!0),n.__readerTimer=null)},this.__readerTimer=qa.delay(i,60*this.__readerTimerWait*1e3|0)},stopTimer:function(){null!=this.__readerTimer&&(this.__readerTimer.stop(),this.__readerTimer=null)},__class__:Fa};var Ra=function(){br.call(this,"sendQueue"),this.sendCount=0,this.sendMsgQueue=new xa(this,550,new _r("sendQueueMessage")),this.sendAnnounceQueue=new xa(this,5050,new _r("sendQueueAnnounce"))};n["albero_cli.proxy.SendQueueProxy"]=Ra,Ra.__name__=["albero_cli","proxy","SendQueueProxy"],Ra.__super__=br,Ra.prototype=r(br.prototype,{restart:function(){this.sendMsgQueue.sendNext(),this.sendAnnounceQueue.sendNext()},retryAfter:function(e){this.sendMsgQueue.retryAfter(e),this.sendAnnounceQueue.retryAfter(e)},sendNextTalkMessage:function(){this.sendMsgQueue.sendNext()},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 hi(0,this.sendCount++);this.messageEvent.registEmitter("_"+i.high+"_"+i.low,n);var r=new qt;if(r.id=i,r.domainId=e,r.talkId=t,r.content=this.parseContent(n),r.type=this.detectType(r.content),r.type==Qt.unknown)return;if(r.type==Qt.file&&null!=r.content.path)return void this.sendFile(t,r.content,"_"+i.high+"_"+i.low);if(r.type==Qt.noteCreated)return void this.sendNote(t,r.content,"_"+i.high+"_"+i.low);r.type!=Qt.yesOrNo&&r.type!=Qt.selectOne||null!=r.content.listing||(r.content.listing=!1),this.applyLimitToMessage(r),this.pushQueue(r)}else for(var a=0,o=I.slice(n,1024);a2)a=new hi(y.parseInt(o[1]),y.parseInt(o[2]));else a=null}else if("close_yesno"==i||"close_select"==i||"close_task"==i){e.close=u.substr(i,6,null),i="in_reply_to";var s=r.split("_");if(s.length>2)a=new hi(y.parseInt(s[1]),y.parseInt(s[2]));else a=null}else"stampset_id"!=i&&"stamp_id"!=i||(a=La._from(r).toInt64());null!=a&&(e[i]=a)}else if(null!=r&&v.isObject(e)&&null!=r.high&&null!=r.low){var l=new hi(r.high,r.low);e[i]=l}}return 1==t.length&&null!=e.text?e.text:e},detectType:function(e){if(null==e)return Qt.unknown;if("string"==typeof e)return Qt.text;if(null!=e.stamp_set)return Qt.stamp;if(null!=e.stampset_id)return Qt.originalStamp;if(null!=e.lat)return Qt.geo;if(null!=e.file_id||null!=e.path)return Qt.file;if(null!=e.close){var t=e.close;if(v.deleteField(e,"close"),"yesno"==t)return Qt.yesOrNoClosed;if("select"==t)return Qt.selectOneClosed;if("task"==t)return Qt.todoClosed}else if(null!=e.in_reply_to){if("boolean"==typeof e.response)return Qt.yesOrNoReply;var n=e.response;if("number"==typeof n&&(0|n)===n)return Qt.selectOneReply;if(null!=e.done)return Qt.todoDone}else{if(null!=e.question)return null==e.options?Qt.yesOrNo:Qt.selectOne;if(null!=e.title)return Qt.todo;if(null!=e.note_title)return Qt.noteCreated}return Qt.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 13:case 15:var i=e.content.question;if(null!=i&&i.length>1024&&(e.content.question=i.substring(0,1024)),e.type==Qt.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 17:var l=e.content.title;null!=l&&l.length>1024&&(e.content.title=l.substring(0,1024))}},__class__:Ra});var xa=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)};n["albero_cli.proxy._SendQueueProxy.SendQueue"]=xa,xa.__name__=["albero_cli","proxy","_SendQueueProxy","SendQueue"],xa.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){var e=(new Date).getTime()-this.lastSendTime.getTime(),t=0|Math.max(this.sendSpan-e,100);qa.delay(Go(this,this.sendNotification),t)}else this.closeQueue()},retryAfter:function(e){this.sending&&null!=this.lastSendNode?(this.sendQueue.unshift(this.lastSendNode),this.saveQueue(),qa.delay(Go(this,this.sendNotification),e)):this.closeQueue()},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__:xa};var Ua=function(e,t,n){this.code=e,this.message=t,this.detail=n};n["albero_cli.value.ApiErrorResponse"]=Ua,Ua.__name__=["albero_cli","value","ApiErrorResponse"],Ua.of=function(e){switch(e.code){case 400:if("invalid parameter"==e.message)return new Ua(Pa.INVALID_PARAMETER);break;case 403:if("forbidden"==e.message)return new Ua(Pa.FORBIDDEN);break;case 404:if("not found"==e.message)return new Ua(Pa.NOT_FOUND);break;case 409:switch(e.message){case"conflict":return new Ua(Pa.CONFLICT);case"locked by another user":return new Ua(Pa.LOCKED_BY_ANOTHER_USER,null,{userId:e.detail.user_id})}break;case 429:return Ua.createTooManyRequestsError(e.message,e.detail.retry_after)}return dr.w("please contact us: error = "+y.string(e)),new Ua(Pa.UNKNOWN)},Ua.createInvalidParameterError=function(e){return new Ua(Pa.INVALID_PARAMETER,e)},Ua.createTooManyRequestsError=function(e,t){return new Ua(Pa.TOO_MANY_REQUESTS,e,{retryAfter:t})},Ua.prototype={__class__:Ua};var Pa=function(){};n["albero_cli.value.ApiErrorCode"]=Pa,Pa.__name__=["albero_cli","value","ApiErrorCode"];var La=function(){};n["albero_cli.value.IDUtil"]=La,La.__name__=["albero_cli","value","IDUtil"],La._from=function(e){if(null==e)return null;if("string"==typeof e){var t=La.parseInt64(e);if(null!=t)return new Ba(t)}if(null!=e.high&&null!=e.low){var n=La.parseInt64(La.stringifyInt64(e,!0));if(null!=n)return new Ba(n)}return null},La.parseInt64=function(e){return e.length>0&&"_"==e.charAt(0)?U.makeFromIdStr(e):U.parse(e)},La.stringifyInt64=function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:Wa.toString(e)},La.prototype={from:function(e){return La._from(e)},__class__:La};var Ba=function(e){this.value=e};n["albero_cli.value.ID"]=Ba,Ba.__name__=["albero_cli","value","ID"],Ba.prototype={toString:function(){return Wa.toString(this.value)},toDaabID:function(){var e=this.value;return"_"+e.high+"_"+e.low},toInt64:function(){return this.value},eq:function(e){if(this==e)return!0;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},__class__:Ba};var Ha=function(){};n["albero_cli.value.note.DeleteNoteResult"]=Ha,Ha.__name__=["albero_cli","value","note","DeleteNoteResult"],Ha.of=function(e){return new Ha},Ha.prototype={__class__:Ha};var Ga=function(e){this.note=e};n["albero_cli.value.note.GetNoteResult"]=Ga,Ga.__name__=["albero_cli","value","note","GetNoteResult"],Ga.of=function(e){return new Ga(Na.of(e.note))},Ga.prototype={__class__:Ga};var ja=function(e){this.note=e};n["albero_cli.value.note.UpdateNoteResult"]=ja,ja.__name__=["albero_cli","value","note","UpdateNoteResult"],ja.of=function(e){return new ja(Na.of(e.note))},ja.prototype={__class__:ja};var Ya=function(){};n["haxe.IMap"]=Ya,Ya.__name__=["haxe","IMap"],Ya.prototype={__class__:Ya};var za={};n["haxe._Int32.Int32_Impl_"]=za,za.__name__=["haxe","_Int32","Int32_Impl_"],za.ucompare=function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0};var Wa={};n["haxe._Int64.Int64_Impl_"]=Wa,Wa.__name__=["haxe","_Int64","Int64_Impl_"],Wa.toString=function(e){var t=e,n=new hi(0,0);if(t.high==n.high&&t.low==n.low)return"0";var i="",r=!1;t.high<0&&(r=!0);for(var a=new hi(0,10);;){var o=new hi(0,0);if(t.high==o.high&&t.low==o.low)break;var s=Wa.divMod(t,a);if(s.modulus.high<0){var l=s.modulus,u=~l.high,c=-l.low;if(0==c){u++;u|=0}i=new hi(u,c).low+i;var _=s.quotient,h=~_.high,d=-_.low;if(0==d){h++;h|=0}t=new hi(h,d)}else i=s.modulus.low+i,t=s.quotient}return r&&(i="-"+i),i},Wa.divMod=function(e,t){if(0==t.high)switch(t.low){case 0:throw new go("divide by zero");case 1:return{quotient:new hi(e.high,e.low),modulus:new hi(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 hi(r,a)}else{n=new hi(e.high,e.low)}if(t.high<0){var o=~t.high,s=-t.low;if(0==s){o++;o|=0}t=new hi(o,s)}else t=t;for(var l=new hi(0,0),u=new hi(0,1);!(t.high<0);){var c=za.ucompare(t.high,n.high),_=0!=c?c:za.ucompare(t.low,n.low),h=1;if(0==(h&=63))t=new hi(t.high,t.low);else if(h<32){t=new hi(t.high<>>32-h,t.low<>>32-d,u.low<=0)break}for(;;){var f=new hi(0,0);if(u.high==f.high&&u.low==f.low)break;var m=za.ucompare(n.high,t.high);if((0!=m?m:za.ucompare(n.low,t.low))>=0){l=new hi(l.high|u.high,l.low|u.low);var p=n.high-t.high|0,g=n.low-t.low|0;if(za.ucompare(n.low,t.low)<0){p--;p|=0}n=new hi(p,g)}var v=1;if(0==(v&=63))u=new hi(u.high,u.low);else if(v<32){u=new hi(u.high>>>v,u.high<<32-v|u.low>>>v)}else{u=new hi(0,u.high>>>v-32)}var y=1;if(0==(y&=63))t=new hi(t.high,t.low);else if(y<32){t=new hi(t.high>>>y,t.high<<32-y|t.low>>>y)}else{t=new hi(0,t.high>>>y-32)}}if(i){var S=~l.high,w=-l.low;if(0==w){S++;S|=0}l=new hi(S,w)}if(e.high<0){var I=~n.high,T=-n.low;if(0==T){I++;I|=0}n=new hi(I,T)}return{quotient:l,modulus:n}};var Ka=function(){};n["haxe.Int64Helper"]=Ka,Ka.__name__=["haxe","Int64Helper"],Ka.parseString=function(e){var t=new hi(0,10),n=new hi(0,0),i=new hi(0,1),r=!1,a=w.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s9)throw new go("NumberFormatError");var h=new hi(_>>31,_);if(r){var d=65535&i.low,f=i.low>>>16,m=65535&h.low,p=h.low>>>16,g=za._mul(d,m),v=za._mul(f,m),y=za._mul(d,p),S=g,I=(za._mul(f,p)+(y>>>16)|0)+(v>>>16)|0;if(S=S+(y<<=16)|0,za.ucompare(S,y)<0){I++;I|=0}if(S=S+(v<<=16)|0,za.ucompare(S,v)<0){I++;I|=0}I=I+(za._mul(i.low,h.high)+za._mul(i.high,h.low)|0)|0;var T=new hi(I,S),N=n.high-T.high|0,E=n.low-T.low|0;if(za.ucompare(n.low,T.low)<0){N--;N|=0}if(!((n=new hi(N,E)).high<0))throw new go("NumberFormatError: Underflow")}else{var A=65535&i.low,b=i.low>>>16,k=65535&h.low,D=h.low>>>16,C=za._mul(A,k),O=za._mul(b,k),M=za._mul(A,D),F=C,R=(za._mul(b,D)+(M>>>16)|0)+(O>>>16)|0;if(F=F+(M<<=16)|0,za.ucompare(F,M)<0){R++;R|=0}if(F=F+(O<<=16)|0,za.ucompare(F,O)<0){R++;R|=0}R=R+(za._mul(i.low,h.high)+za._mul(i.high,h.low)|0)|0;var x=new hi(R,F),U=n.high+x.high|0,P=n.low+x.low|0;if(za.ucompare(P,n.low)<0){U++;U|=0}if((n=new hi(U,P)).high<0)throw new go("NumberFormatError: Overflow")}var L=65535&i.low,B=i.low>>>16,H=65535&t.low,G=t.low>>>16,j=za._mul(L,H),Y=za._mul(B,H),z=za._mul(L,G),W=j,K=(za._mul(B,G)+(z>>>16)|0)+(Y>>>16)|0;if(W=W+(z<<=16)|0,za.ucompare(W,z)<0){K++;K|=0}if(W=W+(Y<<=16)|0,za.ucompare(W,Y)<0){K++;K|=0}K=K+(za._mul(i.low,t.high)+za._mul(i.high,t.low)|0)|0,i=new hi(K,W)}return n};var Va=function(){this.buf=new S,this.cache=[],this.useCache=Va.USE_CACHE,this.useEnumIndex=Va.USE_ENUM_INDEX,this.shash=new ao,this.scount=0};n["haxe.Serializer"]=Va,Va.__name__=["haxe","Serializer"],Va.run=function(e){var t=new Va;return t.serialize(e),t.toString()},Va.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Xo[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!=Xo[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;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+=y.string(h.getTime());break;case _:this.buf.b+="l";for(var d=e.h;null!=d;){var f=d.item;d=d.next;var m=f;this.serialize(m)}this.buf.b+="h";break;case to:this.buf.b+="q";for(var p=e,g=p.keys();g.hasNext();){var S=g.next();this.buf.b+=":",this.buf.b+=null==S?"null":""+S,this.serialize(p.h[S])}this.buf.b+="h";break;case no:this.buf.b+="M";for(var w=e,I=w.keys();I.hasNext();){var T=I.next(),E=v.field(T,"__id__");v.deleteField(T,"__id__"),this.serialize(T),T.__id__=E,this.serialize(w.h[T.__id__])}this.buf.b+="h";break;case ao:this.buf.b+="b";for(var A=e,b=A.keys();b.hasNext();){var k=b.next();this.serializeString(k),this.serialize(null!=Xo[k]?A.getReserved(k):A.h[k])}this.buf.b+="h";break;case oo:var D=e;this.buf.b+="s",this.buf.b+=y.string(Math.ceil(8*D.length/6)),this.buf.b+=":";var C=0,O=D.length-2,M=Va.BASE64_CODES;if(null==M){var F=Va.BASE64.length;M=new Array(F);for(var R=0,x=Va.BASE64.length;R>2]),this.buf.b+=String.fromCharCode(M[63&(P<<4|L>>4)]),this.buf.b+=String.fromCharCode(M[63&(L<<2|B>>6)]),this.buf.b+=String.fromCharCode(M[63&B])}if(C==O){var H=D.b[C++],G=D.b[C++];this.buf.b+=String.fromCharCode(M[H>>2]),this.buf.b+=String.fromCharCode(M[63&(H<<4|G>>4)]),this.buf.b+=String.fromCharCode(M[G<<2&63])}else if(C==O+1){var j=D.b[C++];this.buf.b+=String.fromCharCode(M[j>>2]),this.buf.b+=String.fromCharCode(M[j<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(N.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(N.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+=y.string(this.useEnumIndex?"j":"w"),this.serializeString(N.getEnumName(Y)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=y.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var z=e.length;this.buf.b+=y.string(z-2);for(var W=2,K=z;W57)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(u.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw new go("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new go("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 go("Invalid enum format");var n=this.readDigits();if(0==n)return N.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return N.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 go("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new go("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new go("Class not found "+r);var o=N.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new go("Invalid custom data");return o;case 77:var s=new no;this.cache.push(s);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var l=this.unserialize();s.set(l,this.unserialize())}return this.pos++,s;case 82:var c=this.readDigits();if(c<0||c>=this.scache.length)throw new go("Invalid string reference");return this.scache[c];case 97:this.buf;var h=[];for(this.cache.push(h);;){var d=this.buf.charCodeAt(this.pos);if(104==d){this.pos++;break}if(117==d){this.pos++;var f=this.readDigits();h[h.length+f-1]=null}else h.push(this.unserialize())}return h;case 98:var m=new ao;this.cache.push(m);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=Xo[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 go("Class not found "+v);var S=N.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(),I=this.resolver.resolveEnum(w);if(null==I)throw new go("Enum not found "+w);this.pos++;var T=this.readDigits(),E=I.__constructs__.slice()[T];if(null==E)throw new go("Unknown enum index "+w+"@"+T);var A=this.unserializeEnum(I,E);return this.cache.push(A),A;case 107:return NaN;case 108:var b=new _;this.cache.push(b);for(this.buf;104!=this.buf.charCodeAt(this.pos);)b.add(this.unserialize());return this.pos++,b;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 to;this.cache.push(D);this.buf;for(var C=this.buf.charCodeAt(this.pos++);58==C;){var O=this.readDigits(),M=this.unserialize();D.h[O]=M,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new go("Invalid IntMap format");return D;case 114:var F=this.readDigits();if(F<0||F>=this.cache.length)throw new go("Invalid reference");return this.cache[F];case 115:var R=this.readDigits(),x=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0))),G=0;P>4);var z=U[x.charCodeAt(P++)];H.b[G++]=255&(Y<<4|z>>2);var W=U[x.charCodeAt(P++)];H.b[G++]=255&(z<<6|W)}if(L>=2){var K=U[x.charCodeAt(P++)],V=U[x.charCodeAt(P++)];if(H.b[G++]=255&(K<<2|V>>4),3==L){var q=U[x.charCodeAt(P++)];H.b[G++]=255&(V<<4|q>>2)}}return this.pos+=R,this.cache.push(H),H;case 116:return!0;case 118:var Q;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))Q=u.strDate(u.substr(this.buf,this.pos,19)),this.pos+=19;else{var J=this.readFloat();Q=new Date(J)}return this.cache.push(Q),Q;case 119:var X=this.unserialize(),Z=this.resolver.resolveEnum(X);if(null==Z)throw new go("Enum not found "+X);var $=this.unserializeEnum(Z,this.unserialize());return this.cache.push($),$;case 120:throw go.wrap(this.unserialize());case 121:var ee=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 Za(e.left,e.key,e.value,new Za(e.right,t,n,i)):new Za(new Za(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Za(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 Za(new Za(e,t,n,i.left),i.key,i.value,i.right):new Za(new Za(e,t,n,i.left.left),i.left.key,i.left.value,new Za(i.left.right,i.key,i.value,i.right))}return new Za(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return v.compare(e,t)},__class__:Xa};var Za=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};n["haxe.ds.TreeNode"]=Za,Za.__name__=["haxe","ds","TreeNode"],Za.prototype={__class__:Za};var $a=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};$a.Left=function(e){var t=["Left",0,e];return t.__enum__=$a,t.toString=i,t},$a.Right=function(e){var t=["Right",1,e];return t.__enum__=$a,t.toString=i,t},$a.__empty_constructs__=[];var eo=function(){Xa.call(this)};n["haxe.ds.EnumValueMap"]=eo,eo.__name__=["haxe","ds","EnumValueMap"],eo.__interfaces__=[Ya],eo.__super__=Xa,eo.prototype=r(Xa.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 oo(new Uint8Array(t).buffer)},oo.ofData=function(e){var t=e.hxBytes;return null!=t?t:new oo(e)},oo.fastGet=function(e,t){return e.bytes[t]},oo.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new go(fo.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__:oo};var so=function(){this.b=[]};n["haxe.io.BytesBuffer"]=so,so.__name__=["haxe","io","BytesBuffer"],so.prototype={getBytes:function(){var e=new oo(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:so};var lo=function(){};n["haxe.io.Input"]=lo,lo.__name__=["haxe","io","Input"],lo.prototype={readByte:function(){throw new go("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new go(fo.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof go&&(e=e.val),!vo.__instanceof(e,ho))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new oo(new ArrayBuffer(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new go(fo.Blocked);n+=i,e-=i}return t},readFloat:function(){return mo.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?mo.i64ToDouble(t,e):mo.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__:lo};var uo=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 go(fo.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};n["haxe.io.BytesInput"]=uo,uo.__name__=["haxe","io","BytesInput"],uo.__super__=lo,uo.prototype=r(lo.prototype,{readByte:function(){if(0==this.len)throw new go(new ho);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new go(fo.OutsideBounds);if(0==this.len&&n>0)throw new go(new ho);this.lene.length)throw new go(fo.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 go(fo.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(mo.floatToI32(e))},writeDouble:function(e){var t=mo.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 go(fo.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new go(fo.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new go(fo.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__:co};var _o=function(){this.b=new so};n["haxe.io.BytesOutput"]=_o,_o.__name__=["haxe","io","BytesOutput"],_o.__super__=co,_o.prototype=r(co.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 go(fo.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)},mo.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},mo.i64ToDouble=function(e,t){var n=(t>>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)},mo.doubleToI64=function(e){var t=mo.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 po=function(){};n["haxe.rtti.Meta"]=po,po.__name__=["haxe","rtti","Meta"],po.getMeta=function(e){return e.__meta__},po.getFields=function(e){var t=po.getMeta(e);return null==t||null==t.fields?{}:t.fields};var go=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,go)};n["js._Boot.HaxeError"]=go,go.__name__=["js","_Boot","HaxeError"],go.wrap=function(e){return e instanceof Error?e:new go(e)},go.__super__=Error,go.prototype=r(Error.prototype,{__class__:go});var vo=function(){};n["js.Boot"]=vo,vo.__name__=["js","Boot"],vo.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=vo.__nativeClassName(e);return null!=n?vo.__resolveNativeClass(n):null},vo.__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?",":"")+vo.__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+" : "+vo.__string_rec(e[f],t));return m+="\n"+(t=t.substring(1))+"}";case"string":return e;default:return String(e)}},vo.__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 go&&(e=e.val),!vo.__instanceof(e,ho))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=v.fields(e),o=c.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 o=new Po(Go(e,e.handleNotification),e),s=0,l=a.length;s{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,r={};((t,n)=>{for(var i in n)e(t,i,{get:n[i],enumerable:!0})})(r,{codePointCount:()=>o,extractMentionParts:()=>h,findMentionSuggestionHint:()=>f,hasMentionPartForMeOrAll:()=>l,invalidateManualMentionMarkup:()=>c,parseMessageMention:()=>_,removeMentionMarkup:()=>u});var a=e=>Array.from(e),o=e=>a(e).length,s=/{@:(ALL|\d+),(\d+)}@/g,l=e=>h(e).some(({userIdNumStr:e})=>null===e||"ALL"===e),u=e=>_(e).map(t=>"mention"===t.type?t.mentionText:"normal"===t.type?e.substring(t.start,t.end):"").join(""),c=e=>e.replace(s,e=>e.substring(0,e.length-1)+" "),_=e=>{let t=0;const n=h(e).flatMap(e=>{const n=[];return t!==e.start&&n.push({type:"normal",start:t,end:e.start}),n.push(e),t=e.end,n});return e.length!==t&&n.push({type:"normal",start:t,end:e.length}),n},h=e=>{let t=0;return Array.from(e.matchAll(s)).flatMap(n=>{var i;const r=null!=(i=n.index)?i:0;if(r{const t=e.match(d);return null===t?null:{prev:t[1],atMarks:t[2],keyword:t[3]}};return(r=>((r,a,o,s)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of n(a))i.call(r,l)||l===o||e(r,l,{get:()=>a[l],enumerable:!(s=t(a,l))||s.enumerable});return r})(e({},"__esModule",{value:!0}),r))(r)})();var Yo=jo.exports;String.prototype.__class__=n.String=String,String.__name__=["String"],n.Array=Array,Array.__name__=["Array"],Date.prototype.__class__=n.Date=Date,Date.__name__=["Date"];var zo=n.Int={__name__:["Int"]},Wo=n.Dynamic={__name__:["Dynamic"]},Ko=n.Float=Number;Ko.__name__=["Float"];var Vo=n.Bool=Boolean;Vo.__ename__=["Bool"];var qo=n.Class={__name__:["Class"]},Qo={},Jo={},Xo={};b.APP_STATE_CHANGED="app_state_changed",b.ACCESS_TOKEN_CHANGED="access_token_changed",b.CURRENT_USER_CHANGED="current_user_changed",b.CONFIGURATION_CHANGED="configuration_changed",b.DOMAIN_SELECTION_CHANGED="domain_selection_changed",b.TALK_SELECTION_CHANGED="talk_selection_changed",b.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",b.USER_SELECTION_NEEDED="user_selection_needed",b.USER_SELECTION_CHANGED="user_selection_changed",b.FRIEND_SELECTION_NEEDED="friend_selection_needed",b.COMMON_STAMP_SET_LOADED="common_stamp_set_loaded",b.STAMP_SELECTION_STARTED="stamp_selection_started",b.STAMP_SELECTION_ENDED="stamp_selection_ended",b.STAMP_SELECTION_CHANGED="stamp_selection_changed",b.ACTION_SELECTION_CHANGED="action_selection_changed",b.CURRENT_PAGE_CHANGED="current_page_changed",b.CURRENT_PAGE_REASSIGNED="current_page_reassgined",b.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",b.NOTE_FILEINFO_SELECTION_CHANGED="note_fileinfo_selection_changed",b.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",b.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",b.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",b.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",b.CLOSE_FILEPREVIEW_MODAL="close_filepreview_modal",b.ERROR_OCCURRED="error_occurred",b.UNREAD_COUNT_CHANGED="brand_badge_changed",b.SEND_FORM_TOP_CHANGED="send_form_top_changed",b.SOLUTIONS_LOADED="solutions_loaded",b.RIGHT_PANE_OPENED="right_pane_opened",b.RIGHT_PANE_CLOSED="right_pane_closed",b.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",b.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",b.PHOTO_EDITOR_SAVED="photo_editor_saved",b.ICON_EDITOR_SAVED="icon_editor_saved",b.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",b.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",b.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",b.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",b.PRESENCES_UPDATED="presences_updated",b.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",b.START_NOTE_EDITING="start_note_editing",b.OPEN_EXISTING_PAIR_TALK_COMPLETED="open_existing_pair_talk_completed",b.FIRST_ROUTING_WILL_START="first_routing_will_start",b.SIGNED_OUT="signed_out",b.ROUTUNG_TALK_FALLBACK="routing_talk_fallback",b.ROUTUNG_DOMAIN_FALLBACK="routing_domain_fallback",b.TALKS_SORT_MODE_CHANGED="talks_sort_mode_changed",b.DATA_RECOVERING="data_recovering",b.DATA_RECOVERED="data_recovered",b.NOTIFY_UPDATE_USER="notify_update_user",b.NOTIFY_ADD_FRIEND="notify_add_friend",b.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",b.NOTIFY_ADD_ACQUAINTANCES="notify_add_acquaintances",b.NOTIFY_DELETE_FRIEND="notify_delete_friend",b.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",b.NOTIFY_DELETE_ACQUAINTANCES="notify_delete_acquaintances",b.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",b.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",b.GET_USERS_RESPONSED="get_users_responsed",b.GET_PROFILE_RESPONSED="get_profile_responsed",b.GET_PROFILE_ERRORED="get_profile_errored",b.UPDATE_USER_RESPONSED="update_user_responsed",b.UPDATE_USER_ERRORED="update_user_errored",b.UPDATE_PROFILE_RESPONSED="update_profile_responsed",b.UPDATE_PROFILE_ERRORED="update_profile_errored",b.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",b.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",b.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",b.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",b.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",b.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",b.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",b.GET_ME_RESPONSED="get_me_responsed",b.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",b.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",b.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",b.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",b.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",b.NOTIFY_JOIN_DOMAIN="notify_join_domain",b.NOTIFY_UPDATE_DOMAIN="notify_update_domain",b.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",b.NOTIFY_ADD_DOMAIN_MEMBERS="notify_add_domain_members",b.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",b.CREATE_PAIR_TALK_COMPLETE="create_pair_talk_complete",b.CREATE_PAIR_TALK_FAIL="create_pair_talk_fail",b.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",b.CREATE_GROUP_TALK_COMPLETE="create_group_talk_complete",b.CREATE_GROUP_TALK_FAIL="create_group_talk_fail",b.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",b.UPDATE_GROUP_TALK_COMPLETE="update_group_talk_complete",b.UPDATE_GROUP_TALK_FAIL="update_group_talk_fail",b.NOTIFY_ADD_TALKERS="notify_add_talkers",b.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",b.NOTIFY_DELETE_TALKER="notify_delete_talker",b.NOTIFY_DELETE_TALK="notify_delete_talk",b.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",b.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",b.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",b.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",b.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",b.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",b.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",b.ADD_TALKERS_SUCCEEDED="add_talkers_succeeded",b.ADD_TALKERS_FAILED="add_talkers_failed",b.NOTIFY_CREATE_MESSAGE="notify_create_message",b.NOTIFY_DELETE_MESSAGE="notify_delete_message",b.NOTIFY_GET_MESSAGES="notify_get_messages",b.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",b.CREATE_MESSAGE_START="create_message_start",b.CREATE_MESSAGE_COMPLETE="create_message_complete",b.CREATE_MESSAGE_FAIL="create_message_fail",b.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",b.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",b.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",b.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",b.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",b.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",b.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",b.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",b.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",b.CREATE_ANNOUNCEMENT_START="create_announcement_start",b.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",b.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",b.NOTIFY_UPDATE_QUESTION="notify_update_question",b.NOTIFY_GET_QUESTIONS="get_questions_responsed",b.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",b.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",b.GET_FILE_RESPONSED="get_file_responsed",b.GET_FILE_PREVIEW="get_file_preview",b.CREATE_FILE_PREVIEW="create_file_preview",b.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",b.GET_NOTE_LOADED="get_note_loaded",b.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",b.CREATE_NOTE_COMPLETED="create_note_completed",b.CREATE_NOTE_FAILED="create_note_failed",b.UPDATE_NOTE_LOCAL_EDIT="update_note_local_edit",b.CLEAR_NOTE_LOCAL_EDIT="clear_note_local_edit",b.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",b.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",b.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",b.UPDATE_NOTE_SETTING_FAILED_BY_EDITING="update_note_setting_failed_by_editing",b.UPDATE_NOTE_COMPLETED="update_note_completed",b.DELETE_NOTE_COMPLETED="delete_note_completed",b.NOTIFY_CREATE_NOTE="notify_create_note",b.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",b.NOTIFY_DELETE_NOTE="notify_delete_note",b.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",b.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",b.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",b.NOTIFY_LOCK_NOTE="notify_lock_note",b.NOTIFY_UNLOCK_NOTE="notify_unlock_note",b.NOTIFY_SEARCH_MESSAGES="notify_search_messages",b.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",b.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",b.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",b.NOTIFY_SEARCH_PREPARE="notify_search_prepare",b.NOTIFY_SEARCH_CLEAR="notify_search_clear",b.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",b.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",b.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",b.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",b.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",b.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",b.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",b.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",b.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",b.JOIN_CONFERENCE_CANCELED="join_conference_canceled",b.GET_CONFERENCE_PARTICIPANTS_RESPONSED="get_conference_participants_responsed",b.NOTIFY_OPEN_CONFERENCE="notify_open_conference",b.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",b.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",b.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",b.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",b.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",b.NOTIFY_UPDATE_DOMAIN_STAMP_SETTING="notify_update_domain_stampsetting",b.NOTIFY_UPDATE_STAMPSET="notify_update_stampset",b.NOTIFY_DELETE_STAMPSET="notify_delete_stampset",b.NOTIFY_UPDATE_DOMAIN_BUILTIN_STAMP_SETTING="notify_update_domain_builtin_stampsetting",b.NOTIFY_FLOW_NOTIFICATION_BADGE="notify_flow_notification_badge",b.GET_FLOW_NOTIFICATION_BADGES_COMPLETED="get_flow_notification_badges_completed",b.GET_FLOW_NOTIFICATION_BADGES_FAILED="get_flow_notification_badges_failed",b.GET_DIRECT_APPS_COMPLETED="get_direct_apps_completed",b.GET_DIRECT_APPS_FAILED="get_direct_apps_failed",b.START_NOTIFICATION_FAILED="start_notification_failed",K.ANNOUNCEMENTS_KEY="-1",$.__meta__={fields:{api:{inject:null}}},$.NAME="AccountControlRequest",te.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},te.NAME="Conference",ie.__meta__={fields:{api:{inject:null}}},ie.NAME="Device",ae.__meta__={fields:{api:{inject:null}}},ae.NAME="Domain",se.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},se.NAME="FilePath",ue.__meta__={fields:{api:{inject:null}}},ue.NAME="FilePreview",ce.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},ce.NAME="LoadStampset",de.__meta__={fields:{api:{inject:null}}},de.NAME="ManageFriends",me.__meta__={fields:{api:{inject:null}}},me.NAME="Message",ge.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},ge.NAME="Note",ye.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},ye.NAME="Read",we.__meta__={fields:{api:{inject:null}}},we.NAME="ReloadData",Te.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},Te.NAME="Search",Ee.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},Ee.NAME="SelectTalk",be.__meta__={fields:{api:{inject:null}}},be.NAME="Send",ke.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},ke.NAME="SignIn",De.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},De.NAME="SignOut",Ce.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ce.NAME="Talk",Me.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Me.NAME="UpdateProfile",Fe.__meta__={fields:{api:{inject:null}}},Fe.NAME="UpdateUser",Re.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Re.NAME="UpdateUserPresences",Re.MAX_USERS_PER_API=100,xe.__meta__={fields:{routing:{inject:null}}},xe.NAME="Url",Qe.TalkAutoScrollDelay=1,Qe.TalkAutoScrollImmediately=2,Qe.TalkAutoScrollNone=3,Qe.TalksSortModeNewMessagesFirst="new_messages_first",Qe.TalksSortModeUnreadMessagesFirst="unread_messages_first",Qe.OLD_KEY_RIGHT_PANEL_OPENED="right_panel_opened",Qe.OLD_KEY_RIGHT_PANEL_WIDTH="right_panel_width",Qe.NAME="browser_settings",Xe.MAX_SIZE=72,$e.INCOMING_TIME=6e4,tt.DEFAULT_PRESENCE_EXPIRATION=3e5,it.DEFAULT_TTL=3600,it.DEFAULT_MAX_PARTICIPANTS=8,Ft.stagedFileInfosMaxId=0,Gt.TIMESTAMP_SHIFT=22,qt.MAX_READ_USER_IDS_COUNT=16,An.QUERY_DATE_TODAY="t",An.QUERY_DATE_YESTERDAY="-1d",An.QUERY_DATE_THREE_DAYS_BEFORE="-3d",Gn.HISTORY_TAB_NAME="stamp-history",di.SIXTY_MINUTES=new hi(0,36e5),di.FIFTEEN_MINUTES=new hi(0,9e5),Ki.PREFIX="note-",Ki.nextDummyId=new hi(-1,-1),Ji.CONTINUE_MARGIN_RATE=.1,sr.CHEKBOX_UNCHECKED="- [ ] ",sr.CHEKBOX_CHECKED="- [x] ",ur.TU_REG=new o("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),ur.XTU_REG=new o("ッ","gm"),dr.EMERGENCY=0,dr.ALERT=1,dr.CRITICAL=2,dr.ERROR=3,dr.WARNING=4,dr.NOTICE=5,dr.INFO=6,dr.DEBUG=7,dr.level=dr.getLogLevel(process.env.HUBOT_LOG_LEVEL),dr._d=7<=dr.level&&null!=console?console.log.bind(console):dr._nop,dr._i=6<=dr.level&&null!=console?console.info.bind(console):dr._nop,dr._w=4<=dr.level&&null!=console?console.warn.bind(console):dr._nop,dr._e=3<=dr.level&&null!=console?console.error.bind(console):dr._nop,yr.HIRAGANA_SMALL_A=12353,yr.HIRAGANA_NN=12435,yr.KATAKANA_SMALL_A=12449,Ar.NAME="accessTokenResolver",br.NAME="Proxy",kr.__meta__={fields:{settings:{inject:null},accountLoader:{inject:null},api:{inject:null}}},Cr.NAME="accountLoader",Mr.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null}}},Mr.NAME="broadcast",Fr.__meta__={fields:{wsApi:{inject:null},apiCaller:{inject:null},apiNote:{inject:null},settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},fileService:{inject:null},searchService:{inject:null},lastUsedAtUpdater:{inject:null}}},Fr.NAME="api",Fr.API_VERSION="1.122",Fr.UPDATE_VERSION="1.122_1",Fr.ACTIONS_COUNT_PER_API=20,Rr.__meta__={fields:{rpc:{inject:null}}},Rr.NAME="apiCaller",Rr.DELAY_FOR_DB_REPLICATION=500,Rr.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,Rr.API_TRY_COUNT=3,xr.__meta__={fields:{apiCaller:{inject:null},dataStore:{inject:null},settings:{inject:null}}},xr.NAME="apiNote",Ur.NAME="appState",Pr.__meta__={fields:{dataStore:{inject:null}}},Pr.NAME="dataFactory",Lr.NAME="dataStore",Lr.STORAGE_KEY_FOR_GENERAL="dataStore",Lr.STORAGE_KEY_FOR_TALKS="dataStoreTalks",Lr.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",Lr.STORAGE_KEY_FOR_USERS="dataStoreUsers",Lr.TYPE_FRIEND=0,Lr.TYPE_ACQUAINSTANCE=1,Lr.TYPE_NONE=2,Br.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Br.NAME="features",jr.NAME="fileService",Yr.__meta__={fields:{settings:{inject:null}}},zr.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},zr.NAME="keywordWatcher",zr.TALK_KEY_PREFIX="talk_",zr.ANNOUNCEMENT_KEY_PREFIX="announcement_",Wr.TEMP_HALF_SPACE="&SPACE",Wr.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",Qr.__meta__={fields:{settings:{inject:null}}},Qr.NAME="lastUsedAtUpdater",Qr.UPDATE_LAST_USED_AT_INTERVAL=6e5,Jr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Jr.NAME="limitations",Xr.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},Xr.NAME="rpc",Xr.lastMsgId=0,Zr.PING_INTERVAL_ON_CONNECTED=45e3,na.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},na.NAME="readStatusUpdater",ia.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},ia.NAME="routing",oa.__meta__={fields:{settings:{inject:null}}},oa.NAME="searchService",oa.LOAD_SIZE=20,oa.DUMMY_VALUE_FOR_SET=1,sa.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},api:{inject:null}}},sa.NAME="session",la.NAME="settings",la.KEY_ACCESS_TOKEN="access_token",la.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",la.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",la.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",la.KEY_INPUT_TEXT="input_text",la.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",la.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",la.KEY_SEARCH_HISTORIES="search_histories",la.KEY_MULTI_VIEW_MODE="multi_view_mode",la.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",la.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",la.KEY_IDFV="idfv",ua.__meta__={fields:{dataStore:{inject:null}}},ua.NAME="talksService",ca.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},ca.NAME="ThumbnailExpansion",_a.__meta__={fields:{dataStore:{inject:null}}},_a.NAME="userPresences",ha.__meta__={fields:{apiCaller:{inject:null}}},ha.NAME="wsApi",ba.NAME="Mediator",ka.__meta__={fields:{dataStore:{inject:null},api:{inject:null},hubotObject:{inject:null},messageEvent:{inject:null},sendQueue:{inject:null}}},ka.NAME="commandline",ka.DATA_SAVE_SPAN=5e3,Oa.__meta__={fields:{dataStore:{inject:null}}},Oa.NAME="hubotObject",Ma.__meta__={fields:{dataStore:{inject:null},hubotObject:{inject:null}}},Ma.NAME="messageEvent",Fa.minWaitMinute=1,Fa.maxWaitMinute=1440,Fa.SEND_EVENT_NAME="send",Ra.__meta__={fields:{messageEvent:{inject:null}}},Ra.NAME="sendQueue",Ra.MIN_SEND_SPAN_MESSAGE=550,Ra.MIN_SEND_SPAN_ANNOUNCE=5050,Ra.MAX_TEXT_LENGTH=1024,Ra.MAX_FIELD_COUNT=9,Ra.MAX_FIELD_LENGTH=64,Pa.INVALID_PARAMETER="INVALID_PARAMETER",Pa.FORBIDDEN="FORBIDDEN",Pa.NOT_FOUND="NOT_FOUND",Pa.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",Pa.CONFLICT="CONFLICT",Pa.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",Pa.UNKNOWN="UNKNOWN",za._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},Va.USE_CACHE=!1,Va.USE_ENUM_INDEX=!1,Va.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Ja.DEFAULT_RESOLVER=new Qa,Ja.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",no.count=0,mo.i64tmp=new hi(0,0),vo.__toStr={}.toString,Ao.FLOAT_SINGLE_MIN=1.401298464324817e-45,Ao.FLOAT_SINGLE_MAX=3.4028234663852886e38,Ao.FLOAT_DOUBLE_MIN=5e-324,Ao.FLOAT_DOUBLE_MAX=1.7976931348623157e308,a.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 bbf9806..9b953d2 100755 --- a/lib/direct.min.js +++ b/lib/direct.min.js @@ -1 +1 @@ -!function(e,t){"use strict";var n={},i=function(){return Za.__string_rec(this,"")};function r(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 a=e.DirectAPI=function(){this.eventEmitter=new So};n.DirectAPI=a,a.__name__=["DirectAPI"],a.getInstance=function(){return null==a.instance&&(a.instance=new a),a.instance},a.main=function(){},a.prototype={setOptions:function(e){null!=e&&(xo.host=e.host,xo.endpoint=e.endpoint,xo.accessToken=e.access_token,xo.proxyURL=e.proxyURL,xo.account=e.account,xo.talkWithBot=e.talkWithBot,xo.acceptableEventTimeDiff=e.acceptableEventTimeDiff),_r._d("["+s.dateStr(new Date)+"] ","current settings",xo,"","",""),null==xo.accessToken&&_r._e("["+s.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return ya.parseInt64(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),ya.stringifyInt64(e,t)},listen:function(){this.facade=E.getInstance(),this.api=Za.__cast(this.facade.retrieveProxy("api"),br),this.data=Za.__cast(this.facade.retrieveProxy("dataStore"),Mr),this.ID=new ya;var e=Za.__cast(this.facade.retrieveProxy("fileService"),Rr);this.notes=new ua(new ca(this,this.api,e)),this.mention=new h,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__:a};var o=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};n.EReg=o,o.__name__=["EReg"],o.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);){if(!this.matchSub(e,n)){i+=g.string(s.substr(e,n,null));break}var r=this.matchedPos();if(i+=g.string(s.substr(e,n,r.pos-n)),i+=g.string(t(this)),0==r.len?(i+=g.string(s.substr(e,r.pos,1)),n=r.pos+1):n=r.pos+r.len,!this.r.global)break}return!this.r.global&&n>0&&n0?this.interval-(e-this.basetime):this.interval,Math.ceil(t/1e3)},createError:function(e){var t=this.max+" calls every "+Math.floor(this.interval/1e3)+" sec";return ga.createTooManyRequestsError(t,this.calculateRetryAfter(e))},apply:function(e){var t=this;return new Promise(function(n,i){var r=t._now();if(t.max>0&&r-t.basetime>t.interval)t.basetime=r,t.count=1;else{if(!(t.max>0&&t.countt?1:-1},p.isEnumValue=function(e){return null!=e&&null!=e.__enum__},p.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var g=function(){};n.Std=g,g.__name__=["Std"],g.string=function(e){return Za.__string_rec(e,"")},g.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=s.cca(e,1)&&88!=s.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t};var v=function(){this.b=""};n.StringBuf=v,v.__name__=["StringBuf"],v.prototype={toString:function(){return this.b},__class__:v};var y=function(){};n.StringTools=y,y.__name__=["StringTools"],y.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},y.startsWith=function(e,t){return e.length>=t.length&&s.substr(e,0,t.length)==t},y.isSpace=function(e,t){var n=s.cca(e,t);return n>8&&n<14||32==n},y.ltrim=function(e){for(var t=e.length,n=0;n0?s.substr(e,n,t-n):e},y.rtrim=function(e){for(var t=e.length,n=0;n0?s.substr(e,0,t-n):e},y.trim=function(e){return y.ltrim(y.rtrim(e))},y.replace=function(e,t,n){return e.split(t).join(n)},y.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,(e>>>=4)>0;);if(null!=t)for(;n.length=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():k.dateString(r,!1)},k.getDateStringForNotification=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():r.getMonth()+1+"/"+r.getDate()},k.datetimeStringIn11Chars=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296)),a=k.dateString(r,!1);return t.getFullYear()==r.getFullYear()&&(a+=" "+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()),a},k.timeString=function(e){if(null==e)return"";var t=e.high,n=e.low,i=new Date(4294967296*t+(n>=0?n:n+4294967296));return i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes()},k.datetimeString=function(e){if(null==e)return"";var t=parseFloat(Aa.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(){};n["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 P.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(){};n["albero.FileHelper"]=O,O.__name__=["albero","FileHelper"],O.createByteSizeStringWithUnit=function(e){if(null==e)return"0 B";for(var t,n=["","K","M","G","T"];;){var i=new ui(0,1024),r=t=Aa.divMod(e,i).quotient,a=new ui(0,0),o=r.high-a.high|0;if(o=0!=o?o:Na.ucompare(r.low,a.low),!((r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0))break;e=t,n.shift()}return Aa.toString(e)+" "+n.shift()+"B"},O.extractFilenameExceptExtension=function(e){return new o("\\.(?=[^.]+$)","").split(e)[0]};var M=function(){};n["albero.History"]=M,M.__name__=["albero","History"],M.replaceState=function(e,t,n){return null!=window.history&&(window.history.replaceState(e,t,n),!0)};var F=function(){};n["albero.Int64Helper"]=F,F.__name__=["albero","Int64Helper"],F.parse=function(e){if(!new o("^\\d+$","").match(e))return null;for(var t=new ui(0,0),n=new ui(0,10),i=0,r=e.length;i>>16,u=65535&n.low,c=n.low>>>16,_=Na._mul(s,u),h=Na._mul(l,u),d=Na._mul(s,c),f=_,m=(Na._mul(l,c)+(d>>>16)|0)+(h>>>16)|0;if(f=f+(d<<=16)|0,Na.ucompare(f,d)<0){m++;m|=0}if(f=f+(h<<=16)|0,Na.ucompare(f,h)<0){m++;m|=0}m=m+(Na._mul(t.low,n.high)+Na._mul(t.high,n.low)|0)|0;var p=new ui(m,f),v=new ui(0,g.parseInt(e.charAt(a))),y=p.high+v.high|0,S=p.low+v.low|0;if(Na.ucompare(S,p.low)<0){y++;y|=0}t=new ui(y,S)}return t},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 o("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new ui(g.parseInt(t.matched(1)),g.parseInt(t.matched(2))):null},F.fromNullableIdStr=function(e){return null!=e?F.makeFromIdStr(e):null},F.toStr=function(e){return Aa.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(Na.ucompare(i,e.low)<0){n++;n|=0}return new ui(n,i)},F.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Na.ucompare(e.low,t.low)<0){n--;n|=0}return new ui(n,i)},F.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Na.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("_");return t.length>2?new ui(g.parseInt(t[1]),g.parseInt(t[2])):null},F.decrement=function(e){if(null==e)return null;var t=new ui(0,1),n=e.high-t.high|0,i=e.low-t.low|0;if(Na.ucompare(e.low,t.low)<0){n--;n|=0}return new ui(n,i)},F.increment=function(e){if(null==e)return null;var t=new ui(0,1),n=e.high+t.high|0,i=e.low+t.low|0;if(Na.ucompare(i,e.low)<0){n++;n|=0}return new ui(n,i)},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 un(d.id,f))}}}else{for(var w=[],T=(s.iter(n),0);T0&&a.push(new un(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:ke});var Ce=function(){Q.call(this)};n["albero.command.UpdateUserCommand"]=Ce,Ce.__name__=["albero","command","UpdateUserCommand"],Ce.__super__=Q,Ce.prototype=r(Q.prototype,{execute:function(e){var t=e.getBody();if(null!=t.profileImage){var n=t.profileImage;if(!y.startsWith(n.type,"image/"))return}this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:Ce});var Oe=function(){Q.call(this)};n["albero.command.UpdateUserPresencesCommand"]=Oe,Oe.__name__=["albero","command","UpdateUserPresencesCommand"],Oe.__super__=Q,Oe.prototype=r(Q.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=k.nowAsInt64(),i=this.settings.getConfiguration().presenceExpiration,r=new ui(i>>31,i);return e.filter(function(e){var i=P.map(t.userPresences.getUserPresence(e),function(e){return e.isExpired(n,r)});switch(i[1]){case 0:return i[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){for(var n=this,i=Promise.resolve([]),r=F.splitUsingMaxCount(t,100),a=0;a0?e.createAttachmentErrorMessageByNetwork(n):t.createAttachmentErrorMessageByDomain(n)},Ge.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 cr.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return cr.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return cr.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return cr.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 cr.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return cr.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return cr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return cr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:return function(e){return new o("image.*","").match(e.type)};case 3:return function(e){return new o("image.*|video.*","").match(e.type)};case 4:return function(e){return new o("image.*|video.*|audio.*","").match(e.type)};default:return function(e){return!0}}},createDataTransferItemFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:var e=new o("image.*","");return function(t){return e.match(t.type)};case 3:var t=new o("image.*|video.*","");return function(e){return t.match(e.type)};case 4:var n=new o("image.*|video.*|audio.*","");return function(e){return n.match(e.type)};default:return function(e){return!0}}},__class__:Ge};var Ye=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=Wt.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)};n["albero.entity.Announcement"]=Ye,Ye.__name__=["albero","entity","Announcement"],Ye.prototype={getDisplayTextWithoutEscape:function(){return Wt.getDisplayTextWithoutEscape(this.type,this.content)},getNotificatoinTextWithoutEscape:function(e){switch(null==e&&(e=this.userName),null==e&&(e=""),this.type[1]){case 1:case 7:return e+":"+this.getDisplayTextWithoutEscape();default:return _r._e("["+s.dateStr(new Date)+"] ","Unsupported announcement.type is detected. announcment:%o",this,"","",""),Wt.getUnsupportText()}},__class__:Ye};var ze=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 Ye(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};n["albero.entity.AnnouncementStatus"]=ze,ze.__name__=["albero","entity","AnnouncementStatus"],ze.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 a=!0;if(a){var u;if(null!=n){var c=o.high-n.high|0;c=0!=c?c:Na.ucompare(o.low,n.low),u=(o.high<0?n.high<0?c:-1:n.high>=0?c:1)>0}else u=!0;u&&(n=o),++t}}null!=n&&this.read(n,t)},updateByAnnouncementDeletion:function(e){var t,n=!1;if(this.isUnread(e)&&(this.decrementUnreadCount(1),n=!0),null!=this.maxAnnouncementId){var i=this.maxAnnouncementId;t=null!=i&&null!=e&&i.high==e.high&&i.low==e.low}else t=!1;return t&&null!=this.maxAnnouncement&&(this.maxAnnouncement.type=jt.deleted,this.maxAnnouncement.content="",n=!0),n},updateByAnnouncement:function(e){this.isNewMax(e.id)&&(this.maxAnnouncementId=e.id,this.maxAnnouncement=e),this.unreadCount++},updateByReadingAnnouncements:function(e){if(null==e||this.canRegardAnnouncementReadCountZero(e)){if(!Ke.isUnreadAnnouncementExisted(this))return!1;if(null==this.maxAnnouncementId)return!1;this.readAll()}else{var t=e.filter(yo(this,this.isUnread));if(0==t.length)return!1;this.read(t[t.length-1],t.length)}return!0},canRegardAnnouncementReadCountZero:function(e){var t=this.maxAnnouncementId,n=P.orNull(x.lastOption(e));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},read:function(e,t){this.maxReadAnnouncementId=e,this.decrementUnreadCount(t);this.domainId,this.maxReadAnnouncementId,this.unreadCount},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},readAll:function(){this.maxReadAnnouncementId=this.maxAnnouncementId,this.unreadCount=0},isUnread:function(e){if(null!=this.maxReadAnnouncementId){var t=this.maxReadAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:Na.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:Na.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},__class__:ze};var Ke=function(){};n["albero.entity.AnnouncementStatusHelper"]=Ke,Ke.__name__=["albero","entity","AnnouncementStatusHelper"],Ke.isUnreadAnnouncementExisted=function(e){return null!=e&&(null!=e.maxAnnouncement&&e.isUnread(e.maxAnnouncement.id))},Ke.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var We=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};n["albero.entity.AnnouncementStatusUpdate"]=We,We.__name__=["albero","entity","AnnouncementStatusUpdate"],We.prototype={__class__:We};var je=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.talkAutoScroll=1,this.talksSortMode="new_messages_first",this.talkRightPanelOpened=!0,this.talkRightPanelWidth=0,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.notificationIncludingMessageContent&&(this.notificationIncludingMessageContent=e.notificationIncludingMessageContent),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),null!=e.talkRightPanelOpened?this.talkRightPanelOpened=e.talkRightPanelOpened:this.talkRightPanelOpened=null==L.getItem("right_panel_opened"),null!=e.talkRightPanelWidth)this.talkRightPanelWidth=e.talkRightPanelWidth;else{var t=g.parseInt(L.getItem("right_panel_width"));this.talkRightPanelWidth=null==t?0:t}if(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 n=0,i=Za.__cast(e.userDataContainer,Array);ne.version},isStampsetEnabled:function(e){return l.has(this.allowCreateMessageStampCategories,e)},isStampCategoriesEmpty:function(){return 0==this.allowCreateMessageStampCategories.length},getCategoryIndex:function(e){return this.allowCreateMessageStampCategories.indexOf(e)},__class__:Qe};var Je=function(e){null!=e&&(this.userId=e.user_id,this.id=e.conference_id,this.domainId=e.domain_id,this.talkId=e.talk_id,this.messageId=e.message_id,this.createdAt=e.created_at,this.expiredAt=e.expired_at,this.participants=e.participants,this.skywayVersion=null==e.skyway_version?1:e.skyway_version)};n["albero.entity.Conference"]=Je,Je.__name__=["albero","entity","Conference"],Je.prototype={isIncomingExpired:function(){var e=this.createdAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)+Je.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__:Je};var Xe=function(){this.conferencesMap=new Ha,this.talkIdConferenceIdMap=new Ha};n["albero.entity.ConferenceStore"]=Xe,Xe.__name__=["albero","entity","ConferenceStore"],Xe.prototype={addConference:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.conferencesMap;null!=Uo[n]?i.setReserved(n,e):i.h[n]=e;var r=e.talkId,a="_"+r.high+"_"+r.low,o=this.talkIdConferenceIdMap;null!=Uo[a]?o.setReserved(a,n):o.h[a]=n},removeConference:function(e){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!=Uo[r]?a.getReserved(r):a.h[r])==n&&this.talkIdConferenceIdMap.remove(r)},getConferences:function(){return U.toValueArray(this.conferencesMap)},getConference:function(e){var t="_"+e.high+"_"+e.low,n=this.conferencesMap;return null!=Uo[t]?n.getReserved(t):n.h[t]},hasConferenceInTalk:function(e){if(null!=e){var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;return null!=Uo[t]?n.existsReserved(t):n.h.hasOwnProperty(t)}return!1},getConferenceIdInTalk:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap,i=null!=Uo[t]?n.getReserved(t):n.h[t];return null==i?null:F.makeFromIdStr(i)},getConferenceTalkIds:function(){return U.toKeyArray(this.talkIdConferenceIdMap).map(F.makeFromIdStr)},hasConference:function(){return this.talkIdConferenceIdMap.keys().hasNext()},__class__:Xe};var Ze=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:Ze.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Ge.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled)};n["albero.entity.Configuration"]=Ze,Ze.__name__=["albero","entity","Configuration"],Ze.prototype={__class__:Ze};var $e=function(e){this.contractConference=La.None,null!=e&&(this.id=e.contract_id,this.plan=new rn(e.plan),this.quota=new Sn(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=La.Some(new et(e.conference))))};n["albero.entity.Contract"]=$e,$e.__name__=["albero","entity","Contract"],$e.prototype={getMaxMessageContentLength:function(){return P.map(P.option(this.quota),function(e){return e.maxMessageContentLength})},getMaxTalkers:function(){return P.flatMap(P.option(this.quota),function(e){return P.option(e.maxTalkers)})},getMaxTalks:function(){return P.flatMap(P.option(this.quota),function(e){return P.option(e.maxTalks)})},isConferenceEnalbed:function(){return P.isDefined(this.contractConference)},isVideoEnalbed:function(){var e=P.map(this.contractConference,function(e){return e.videoEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},getConferenceTtl:function(){return P.map(this.contractConference,function(e){return e.ttl})},getConferenceMaxParticipants:function(){return P.map(this.contractConference,function(e){return e.maxConferenceParticipants})},isGroupConfenreceEnalbed:function(){var e=P.map(this.contractConference,function(e){return e.groupConferenceEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},isTargetOfPlanAd:function(){return null!=this.quota&&this.quota.withAd},isFreePlan:function(){return null!=this.plan&&this.plan.free},__class__:$e};var et=function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=et.DEFAULT_MAX_PARTICIPANTS,this.ttl=et.DEFAULT_TTL,this.videoEnabled=!1,null!=e&&(this.videoEnabled=e.video_enabled,this.ttl=e.ttl,this.maxConferenceParticipants=e.max_conference_participants,this.groupConferenceEnabled=e.group_conference_enabled)};n["albero.entity.ContractConference"]=et,et.__name__=["albero","entity","ContractConference"],et.prototype={__class__:et};var tt=function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?it.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=tt.getLabelRoot();break;case 2:this.name=tt.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};n["albero.entity.Department"]=tt,tt.__name__=["albero","entity","Department"],tt.getLabelFree=function(){return cr.localize("Department.label_free")},tt.getLabelRoot=function(){return cr.localize("Department.label_root")},tt.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==it.Root},isFree:function(){return this.nodeType==it.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return it.Root;case 2:return it.Free;default:return it.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(F.idStr)},__class__:tt};var nt=function(){};n["albero.entity.DepartmentHelper"]=nt,nt.__name__=["albero","entity","DepartmentHelper"],nt.getName=function(e){return null==e?null:e.name};var it=n["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};it.Normal=["Normal",0],it.Normal.toString=i,it.Normal.__enum__=it,it.Root=["Root",1],it.Root.toString=i,it.Root.__enum__=it,it.Free=["Free",2],it.Free.toString=i,it.Free.__enum__=it,it.__empty_constructs__=[it.Normal,it.Root,it.Free];var rt=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};n["albero.entity.DepartmentList"]=rt,rt.__name__=["albero","entity","DepartmentList"],rt.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new tt(e)})},__class__:rt};var at=function(){this.departmentMap=new Ha,this.rootDepartmentIdMap=new Ha};n["albero.entity.DepartmentStore"]=at,at.__name__=["albero","entity","DepartmentStore"],at.prototype={getDepartment:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.departmentMap;return null!=Uo[t]?n.getReserved(t):n.h[t]},setDepartment:function(e){if(null!=e.parentId){var t=this.getDepartment(e.parentId);null!=t&&(t.addChild(e.id),e.depth=t.depth+1)}var n=e.id,i="_"+n.high+"_"+n.low,r=this.departmentMap;null!=Uo[i]?r.setReserved(i,e):r.h[i]=e},clearDomainDepartment:function(e){var t=this,n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap,r=null!=Uo[n]?i.getReserved(n):i.h[n];null!=r&&(l.iter(this.getDepartmentsDescendantOrSelf(r),function(e){var n=e.id;t.departmentMap.remove("_"+n.high+"_"+n.low)}),this.rootDepartmentIdMap.remove(n))},getRootDepartmentId:function(e){var t="_"+e.high+"_"+e.low,n=this.rootDepartmentIdMap;return null!=Uo[t]?n.getReserved(t):n.h[t]},setRootDepartmentId:function(e,t){var n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap;null!=Uo[n]?i.setReserved(n,t):i.h[n]=t},setDepartmentUserCount:function(e){var t=this.getDepartment(e.departmentId);null!=t&&(t.userCount=e,t.userCountLoading=!1)},setUserCountLoading:function(e,t){var n=this.getDepartment(e);null!=n&&(n.userCountLoading=t)},isUserCountLoadingRequired:function(e){var t=this.getDepartment(e);return null==t||null==t.userCount&&!t.userCountLoading},clearDomainDepartmentUsers:function(e){var t=this.getRootDepartmentId(e);return null!=t&&(l.iter(this.getDepartmentsDescendantOrSelf(t),function(e){e.userCount=null,e.userIds=null,e.userCountLoading=!1}),!0)},setDepartmentUsers:function(e,t){var n=this.getDepartment(e);null!=n&&(n.userIds=t)},getDepartmentPath:function(e){return this.getDepartmentsAncestorOrSelf(e)},getDepartmentPathWithoutRoot:function(e){return this.getDepartmentPath(e).filter(function(e){return!e.isRoot()})},getDepartmentsAncestorOrSelf:function(e){var t=[];return this._getDepartmentsAncestorOrSelf(e,t),t},_getDepartmentsAncestorOrSelf:function(e,t){var n=this.getDepartment(e);null!=n&&(null!=n.parentId&&this._getDepartmentsAncestorOrSelf(n.parentId,t),t.push(n))},getDepartmentsDescendantOrSelf:function(e){var t=[];return this._getDepartmentsDescendantOrSelf(e,t),t},_getDepartmentsDescendantOrSelf:function(e,t){var n=this,i=this.getDepartment(e);null!=i&&(t.push(i),null!=i.childrenIds&&l.iter(i.childrenIds,function(e){n._getDepartmentsDescendantOrSelf(e,t)}))},__class__:at};var ot=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};n["albero.entity.DepartmentUserCount"]=ot,ot.__name__=["albero","entity","DepartmentUserCount"],ot.prototype={__class__:ot};var st=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};n["albero.entity.DepartmentUserCountList"]=st,st.__name__=["albero","entity","DepartmentUserCountList"],st.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new ot(e)})},__class__:st};var lt=function(e,t){if(null!=e){if(this.id=F.fromIntOrInt64(e.direct_app_id),this.uniqueKey=e.unique_key,this.appUrl=e.app_url,this.locales=new Ha,null!=e.locales)for(var n=0,i=p.fields(e.locales);n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){if(B.isEmpty(e))return!0;if(B.isEmpty(this.canonicalDisplayName)){this.canonicalDisplayName=pr.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(B.isEmpty(this.canonicalDisplayNameRoman)){this.canonicalDisplayNameRoman=pr.canonicalizeForRoman(this.displayName);this.canonicalDisplayNameRoman,this.displayName}return this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(B.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=pr.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1)},__class__:Et});var Nt=function(e){this.values=e};n["albero.entity.Domains"]=Nt,Nt.__name__=["albero","entity","Domains"],Nt.prototype={orderByName:function(){var e=x.sortAndReturn(this.values.map(At.fromDomain),At.compare).map(At.toDomain);return new Nt(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?La.None:l.fold(this.values,function(e,t){switch(P.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:Na.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0})[1]){case 0:return P.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:Na.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return La.Some(e)}},La.None)},getDirectAppsIds:function(){if(null==this.values||0==this.values.length)return[];var e=new Ha;return l.iter(this.values,function(t){l.iter(t.directAppsSetting.enabled,function(t){var n="_"+t.high+"_"+t.low;null!=Uo[n]?e.setReserved(n,t):e.h[n]=t})}),U.toValueArray(e)},__class__:Nt};var At=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=pr.canonicalize(this.name)};n["albero.entity.DomainForSort"]=At,At.__name__=["albero","entity","DomainForSort"],At.fromDomain=function(e){return new At(e)},At.toDomain=function(e){return e.domain},At.compare=function(e,t){var n=B.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:B.compare(e.name,t.name)},At.prototype={__class__:At};var bt=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new Dt(e.get_headers))};n["albero.entity.DownloadAuth"]=bt,bt.__name__=["albero","entity","DownloadAuth"],bt.prototype={__class__:bt};var Dt=function(e){this.rawData=e};n["albero.entity.DownloadAuthHeaders"]=Dt,Dt.__name__=["albero","entity","DownloadAuthHeaders"],Dt.prototype={__class__:Dt};var kt=function(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version)};n["albero.entity.FavoriteTalkEvent"]=kt,kt.__name__=["albero","entity","FavoriteTalkEvent"],kt.prototype={__class__:kt};var Ct=function(e){this.uploadResult=Ot.NONE,this.preview=La.None,this.thumbnailDimension=La.None,null!=e&&(this.attachmentId=e.attachment_id,this.messageId=e.message_id,this.talkId=e.talk_id,this.id=e.file_id,this.userId=e.user_id,this.name=e.name,this.contentType=e.content_type,this.contentSize=e.content_size,this.url=e.url,this.thumbUrl=e.thumbnail_url,this.updatedAt=e.updated_at,this.file=e.file,this.localThumbInfo=e.localThumbInfo,this.thumbnailDimension=La.None,this.deleted=null!=e.deleted&&e.deleted,this.previewSupported=null!=e.preview_supported&&e.preview_supported)};n["albero.entity.FileInfo"]=Ct,Ct.__name__=["albero","entity","FileInfo"],Ct.fromMessageAndFile=function(e,t){var n=new Ct;return n.messageId=e.id,n.talkId=e.talkId,n.userId=e.userId,n.updatedAt=e.createdAt,n.id=t.file_id,n.name=t.name,n.contentType=t.content_type,n.contentSize=t.content_size,n.url=t.url,n.thumbUrl=t.thumbnail_url,n.thumbnailDimension=null==t.thumbnail_dimension?La.None:La.Some(new ri(t.thumbnail_dimension)),n.deleted=null!=t.deleted&&t.deleted,n.file=t.file,n.localThumbInfo=t.localThumbInfo,n.previewSupported=t.preview_supported,n},Ct.fromMessageAndFileWithFileId=function(e,t,n){var i=Ct.fromMessageAndFile(e,t);return i.id=n,i},Ct.createUploadedFileInfo=function(e){var t=new Ct;return t.id=e.id,t.contentType=e.content_type,t.contentSize=e.content_size,t.url=e.url,t.name=e.name,t},Ct.createStagedFileInfo=function(e,t,n){var i=t,r=new Ct,a=new ui(0,--Ct.stagedFileInfosMaxId);return r.id=a,r.talkId=e,null!=t&&(r.contentType=i.type,r.contentSize=i.size,r.addLocalFile(t),r.name=i.name),null!=n&&r.addLocalThumbInfo(n),r},Ct.createStagedFileInfoFromDummyFile=function(e,t,n){var i=new Ct,r=new ui(0,--Ct.stagedFileInfosMaxId);return i.id=r,i.talkId=e,null!=t&&(i.contentType=t.type,i.contentSize=t.size,i.file=t,i.name=t.name),null!=n&&i.addLocalThumbInfo(n),i},Ct.prototype={isRemote:function(){return null==this.file},isUploaded:function(){if(this.isRemote())return!0;switch(this.uploadResult[1]){case 0:return!0;case 1:case 2:return!1}},isUploadFailed:function(){if(this.isRemote())return!1;switch(this.uploadResult[1]){case 1:return!0;case 0:case 2:return!1}},setUploadResult:function(e){this.uploadResult=e},isNotUploaded:function(){return!this.isUploaded()},hasThumb:function(){return null!=this.thumbUrl||this.hasLocalThumbInfo()},hasLocalThumbInfo:function(){return null!=this.localThumbInfo},hasLocalFile:function(){return null!=this.file},hasUrl:function(){return null!=this.url},isImage:function(){return y.startsWith(this.contentType,"image/")},isImageGif:function(){return y.startsWith(this.contentType,"image/gif")},isImageJpeg:function(){return y.startsWith(this.contentType,"image/jpeg")},isPdf:function(){return y.startsWith(this.contentType,"application/pdf")},isVideo:function(){return y.startsWith(this.contentType,"video/")},canDisplayAsThumb:function(){return!!this.hasThumb()||this.isImage()},getNoThumbText:function(){return null!=this.name?this.name:this.url},getUploadedFileData:function(){if(null==this.file){var e={url:this.url,content_type:this.contentType,content_size:this.contentSize,name:this.name,file_id:this.id};return null!=this.thumbUrl&&(e.thumbnail_url=this.thumbUrl),P.isDefined(this.thumbnailDimension)&&(e.thumbnail_dimension=P.get(this.thumbnailDimension)),e}var t=this.uploadResult;switch(t[1]){case 0:return t[2];case 1:case 2:return _r._e("["+s.dateStr(new Date)+"] ","file not uploaded.","","","",""),null}},addLocalFile:function(e){this.file=e},addLocalThumbInfo:function(e){this.localThumbInfo=e},getUploadableFilePack:function(){return{file:this.file,thumb:this.localThumbInfo}},__class__:Ct};var Ot=n["albero.entity.UploadResult"]={__ename__:["albero","entity","UploadResult"],__constructs__:["SUCCESS","FAILUER","NONE"]};Ot.SUCCESS=function(e){var t=["SUCCESS",0,e];return t.__enum__=Ot,t.toString=i,t},Ot.FAILUER=["FAILUER",1],Ot.FAILUER.toString=i,Ot.FAILUER.__enum__=Ot,Ot.NONE=["NONE",2],Ot.NONE.toString=i,Ot.NONE.__enum__=Ot,Ot.__empty_constructs__=[Ot.FAILUER,Ot.NONE];var Mt=function(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])};n["albero.entity.FileInfoDeletion"]=Mt,Mt.__name__=["albero","entity","FileInfoDeletion"],Mt.prototype={__class__:Mt};var Ft=function(){this.fileInfoMap=new Ha,this.fileIdStrsMap=new Ha,this.messageFileIdStrsMap=new Ha,this.noteFileIdStrsMap=new Ha,this.filePreviewMap=new Ha};n["albero.entity.FileInfoStore"]=Ft,Ft.__name__=["albero","entity","FileInfoStore"],Ft.prototype={ensureStagedFileInfos:function(e){return this.ensureStagedFileIdStrs(e).map(F.makeFromIdStr).filter(function(e){return null!=e}).map(yo(this,this.getFileInfo))},moveStagedFile:function(e,t,n){var i=this.ensureStagedFileIdStrs(e);if(null!=i){var r=i[t];s.remove(i,r),i.splice(n,0,r)}},ensureStagedFileIdStrs:function(e){var t=e.toString(),n=this.fileIdStrsMap,i=null!=Uo[t]?n.getReserved(t):n.h[t];if(null==i){i=[];var r=this.fileIdStrsMap;null!=Uo[t]?r.setReserved(t,i):r.h[t]=i}return i},addStagedFileInfo:function(e,t,n,i){var r=Ct.createStagedFileInfo(e,n,i),a=r.id,o="_"+a.high+"_"+a.low,s=this.fileInfoMap;null!=Uo[o]?s.setReserved(o,r):s.h[o]=r;var l=r.id,u="_"+l.high+"_"+l.low;return this.ensureStagedFileIdStrs(t).push(u),r},replaceStagedFileInfo:function(e,t,n,i){var r=Ct.createStagedFileInfo(e.talkId,n,i);return this.replaceStagedFileInfoFromFileId(e.id,t,r),r},replaceStagedFileInfoFromFileId:function(e,t,n){var i=n.id,r="_"+i.high+"_"+i.low,a=this.fileInfoMap;null!=Uo[r]?a.setReserved(r,n):a.h[r]=n;var o=this.ensureStagedFileIdStrs(t),s=o.indexOf("_"+e.high+"_"+e.low);if(-1!=s){o.splice(s,1);var l=n.id;o.splice(s,0,"_"+l.high+"_"+l.low),this.removeStagedFileInfo(t,e)}},restoreStagedFile:function(e,t){var n=t.id,i="_"+n.high+"_"+n.low,r=this.fileInfoMap;null!=Uo[i]?r.setReserved(i,t):r.h[i]=t;var a=t.id,o="_"+a.high+"_"+a.low;this.ensureStagedFileIdStrs(e).push(o)},removeStagedFileInfo:function(e,t){var n="_"+t.high+"_"+t.low;s.remove(this.ensureStagedFileIdStrs(e),n);var i=this.fileInfoMap;(null!=Uo[n]?i.getReserved(n):i.h[n]).isRemote()||this.fileInfoMap.remove(n)},removeStagedFileInfos:function(e){for(var t=0,n=this.ensureStagedFileIdStrs(e);t>t,e.high<<32-t|e.low>>>t):new ui(e.high>>31,e.high>>t-32)},Lt.subTimestampPart=function(e,t){var n=Lt.timestamp(e),i=Lt.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(Na.ucompare(n.low,i.low)<0){r--;r|=0}return new ui(r,a)},Lt.createForTest=function(e){var t=Lt.TIMESTAMP_SHIFT;return 0==(t&=63)?new ui(e.high,e.low):t<32?new ui(e.high<>>32-t,e.low<0||this.credential.ttl0?this.content.text:"";case 7:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 13:return[this.content.question,cr.localize("MessageStringMaker.yes"),cr.localize("MessageStringMaker.no")].join(" ");case 14:return e&&null!=this.content.response?this.content.response?cr.localize("MessageStringMaker.yes"):cr.localize("MessageStringMaker.no"):"";case 15:return null!=this.content.options?g.string(this.content.question)+" "+g.string(this.content.options.join(" ")):this.content.question;case 16:return e&&null!=this.content.response&&null!=this.content.options&&this.content.options.length>this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,cr.localize("MessageStringMaker.achieve"),cr.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?cr.localize("MessageStringMaker.achieve"):cr.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&this.content.text.length>0)return this.content.text;break;case 7:return cr.localize("Message.bookmark_label_deleted");case 8:return[cr.localize("Message.bookmark_label_note_shared"),new Fi(this.content).title].join(" ");case 10:return[cr.localize("Message.bookmark_label_note_created"),new Fi(this.content).title].join(" ");case 11:return[cr.localize("Message.bookmark_label_note_updated"),new Fi(this.content).title].join(" ");case 2:case 12:if(null!=this.content.text&&this.content.text.length>0)return[cr.localize("Message.bookmark_label_stamp"),this.content.text].join(" ");break;case 14:case 16:return[cr.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 13:case 15:return[cr.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 17:return[cr.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 18:return[this.content.done?cr.localize("Message.bookmark_label_completed"):cr.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 19:case 20:return[cr.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 21:return[cr.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 8:case 10:case 11:return new Fi(this.content);default:return null}},messageStringRaw:function(){switch(this.type[1]){case 0:return"";case 1:return this.content;case 3:case 4:return"";case 5:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 8:case 9:case 10:case 11:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 14:case 16:return"";case 13:case 15:return this.content.question;case 17:return this.content.title;case 18:return"";case 19:case 20:case 21:case 22:default:return""}},getContentsForNoteDelete:function(){return 9==this.type[1]?new Ri(this.content):null},getContentsForOriginalStamp:function(){return 12==this.type[1]?new xi(this.content):null},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()},isAllowedToShowSelectionMessageMenu:function(){return!(this.type!=jt.text&&!this.isStampMessageWithText())||this.isTextMultipleFileWithText()},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()},isMatchCategory:function(e){switch(e[1]){case 0:return!!(this.isTextMessage()||this.isFileMessage()||this.isTextMultipleFile())||this.isStampMessageWithText();case 1:return!1}},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==jt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==jt.yesOrNo||this.type==jt.yesOrNoReply||this.type==jt.selectOne||this.type==jt.selectOneReply||this.type==jt.todo||this.type==jt.todoDone||this.type==jt.yesOrNoClosed||this.type==jt.selectOneClosed||this.type==jt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==jt.selectOneReply||this.type==jt.yesOrNoReply||this.type==jt.todoDone},isClosedActionStampMessage:function(){return this.type==jt.yesOrNoClosed||this.type==jt.selectOneClosed||this.type==jt.todoClosed},isTextMultipleFile:function(){return this.type==jt.textMultipleFile},isSendingActionStampMessage:function(){return this.type==jt.yesOrNo||this.type==jt.selectOne||this.type==jt.todo},isNoteMessage:function(){return this.type==jt.noteShared||this.type==jt.noteDeleted||this.type==jt.noteCreated||this.type==jt.noteUpdated},isNoteDeletedMessage:function(){return this.type==jt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==jt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==jt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==jt.stamp||this.type==jt.originalStamp},isNotStampMessage:function(){return!this.isStampMessage()},isStampMessageWithText:function(){return!!this.isStampMessage()&&this.isNotObjectWithEmptyText()},isStampMessageWithEmptyText:function(){return!!this.isStampMessage()&&this.isObjectWithEmptyText()},isNotStampMessageWithEmptyText:function(){return!!this.isNotStampMessage()||this.isNotObjectWithEmptyText()},isObjectWithEmptyText:function(){return B.isEmpty(this.content.text)},isNotObjectWithEmptyText:function(){return!this.isObjectWithEmptyText()},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==jt.text},isOpenConference:function(){return this.type==jt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){var e=this.type;return _r._i("["+s.dateStr(new Date)+"] ",e,"","","",""),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?La.Some(this.content.in_reply_to):La.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+":g.string(this.readUserIds.length)},hasNoReadUsers:function(){return 0==this.readUserIds.length},deleteFile:function(e){var t;switch(this.type[1]){case 4:t=[this.content];break;case 5:t=this.content.files;break;default:t=[]}if(0!=t.length){var n=l.find(t,function(t){var n=t.file_id,i=e.fileId;return null!=n&&null!=i&&n.high==i.high&&n.low==i.low});null!=n&&(n.deleted=!0)}},getQuestionTitle:function(){switch(this.type[1]){case 17:case 18:case 21:return null==this.content.title?"":this.content.title;case 13:case 14:case 15:case 16:case 19:case 20:return null==this.content.question?"":this.content.question;default:return""}},getChoiceCloseResponse:function(e){var t=cr.localize("QuestionHelper.close_answer")+"\n";if(null==this.content.responses)t+="...";else{var n=this.content.responses,i=this.content.last_response;if(0==gn.closingTypeOf(this.content.closing_type)[1])t+=null!=i?cr.localize("QuestionHelper.last_response",{content:e(n[i].content),interpolation:{escapeValue:!1}}):cr.localize("QuestionHelper.no_answer");else{t+=null!=i?null==n?"":n.map(function(t){var n=null==t.count?0:t.count;return e(t.content)+": "+n+cr.localize("QuestionHelper.name")}).join("\n"):cr.localize("QuestionHelper.no_answer")}}return t},getTodoCloseResponse:function(){var e=cr.localize("QuestionHelper.close_task")+"\n";if(null==this.content.responses)e+="...";else{var t=this.content.responses,n=this.content.last_response;if(0==gn.closingTypeOf(this.content.closing_type)[1]){e+=null!=n&&"DONE"==t[n].content?cr.localize("QuestionHelper.achieve_task"):cr.localize("QuestionHelper.not_achieve_task")}else{var i=0;if(null!=t)for(var r=0;r=0?n:1)>0}return!1},timeOveredOrNotExist:function(e,t){return null==e||this.timeOvered(e,t)},__class__:nn};var rn=function(e){null!=e&&(this.name=e.plan_name,this.trial=!!e.trial,this.free=!!e.free)};n["albero.entity.Plan"]=rn,rn.__name__=["albero","entity","Plan"],rn.prototype={__class__:rn};var an=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=Za.__cast(e.item_values,Array).map(function(e){return new ln(e)})))};n["albero.entity.Profile"]=an,an.__name__=["albero","entity","Profile"],an.prototype={__class__:an};var on=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=Za.__cast(e.item_definitions,Array);t=0?o:1)>0&&(this.updatedAt=i,this.maxResponseId=t,this.lastResponse=e,this.lastResponseUserId=n)},__class__:dn};var fn=n["albero.entity.QuestionFromType"]={__ename__:["albero","entity","QuestionFromType"],__constructs__:["fromSelf","fromOther"]};fn.fromSelf=["fromSelf",0],fn.fromSelf.toString=i,fn.fromSelf.__enum__=fn,fn.fromOther=["fromOther",1],fn.fromOther.toString=i,fn.fromOther.__enum__=fn,fn.__empty_constructs__=[fn.fromSelf,fn.fromOther];var mn=n["albero.entity.QuestionFilter"]={__ename__:["albero","entity","QuestionFilter"],__constructs__:["onlyClosed","onlyUnclosed","noFilter"]};mn.onlyClosed=["onlyClosed",0],mn.onlyClosed.toString=i,mn.onlyClosed.__enum__=mn,mn.onlyUnclosed=["onlyUnclosed",1],mn.onlyUnclosed.toString=i,mn.onlyUnclosed.__enum__=mn,mn.noFilter=["noFilter",2],mn.noFilter.toString=i,mn.noFilter.__enum__=mn,mn.__empty_constructs__=[mn.onlyClosed,mn.onlyUnclosed,mn.noFilter];var pn=n["albero.entity.QuestionClosingType"]={__ename__:["albero","entity","QuestionClosingType"],__constructs__:["any","all","unknown"]};pn.any=["any",0],pn.any.toString=i,pn.any.__enum__=pn,pn.all=["all",1],pn.all.toString=i,pn.all.__enum__=pn,pn.unknown=["unknown",2],pn.unknown.toString=i,pn.unknown.__enum__=pn,pn.__empty_constructs__=[pn.any,pn.all,pn.unknown];var gn=function(){};n["albero.entity.QuestionClosingTypeHelper"]=gn,gn.__name__=["albero","entity","QuestionClosingTypeHelper"],gn.closingTypeOf=function(e){switch(e){case 0:return pn.any;case 1:return pn.all;default:return pn.unknown}};var vn=function(e){this.content=e.content,this.count=null==e.count?0:e.count,this.userIds=null==e.user_ids?[]:e.user_ids};n["albero.entity.QuestionResponse"]=vn,vn.__name__=["albero","entity","QuestionResponse"],vn.prototype={add:function(e){this.contains(e)||(this.count+=1,this.userIds=this.userIds.concat([e]))},sub:function(e){this.contains(e)&&(this.count-=1,this.userIds=this.userIds.filter(function(t){return!(e.high==t.high&&e.low==t.low)}))},contains:function(e){return F.contains(this.userIds,e)},__class__:vn};var yn=function(){this.questions=new Ha};n["albero.entity.QuestionStore"]=yn,yn.__name__=["albero","entity","QuestionStore"],yn.prototype={removeTalkQuestions:function(e){for(var t=this.getQuestions(e),n=0;n>>16,s=65535&t.low,l=t.low>>>16,u=Na._mul(a,s),c=Na._mul(o,s),_=Na._mul(a,l),h=u,d=(Na._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,Na.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,Na.ucompare(h,c)<0){d++;d|=0}d=d+(Na._mul(e.low,t.high)+Na._mul(e.high,t.low)|0)|0;var f=new ui(d,h),m=new ui(0,g.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,v=f.low+m.low|0;if(Na.ucompare(v,f.low)<0){p++;p|=0}e=new ui(p,v)}return e},__class__:xn};var Un=function(e,t,n){this.stampsetId=e,this.id=t,this.illust=n};n["albero.entity.OriginalStamp"]=Un,Un.__name__=["albero","entity","OriginalStamp"],Un.__interfaces__=[Rn],Un.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=F.makeFromIdStr(t.stampsetIdStr),i=F.makeFromIdStr(t.stampIdStr);return new Un(n,i,t.illust)},Un.fromPropsAndStampsetId=function(e,t){return new Un(t,F.fromIntOrInt64(e.id),e.illust)},Un.createKey=function(e){return"original__"+e.high+"_"+e.low},Un.prototype={getImageUrl:function(){return this.illust},getKey:function(){return Un.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Wt;return n.talkId=e,n.type=jt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:Un};var Pn=function(){this.stampsetStore=new Ha,this.stampStore=new Ha,this.stampKeyCategoryIdMap=new Ha};n["albero.entity.StampStore"]=Pn,Pn.__name__=["albero","entity","StampStore"],Pn.prototype={addStampsets:function(e){for(var t=0;te.version},__class__:Bn};var Hn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(F.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};n["albero.entity.StampsetSetting"]=Hn,Hn.__name__=["albero","entity","StampsetSetting"],Hn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new Bn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(e){return null!=this.allowCreateMessageStampsetIds&&l.exists(this.allowCreateMessageStampsetIds,function(t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low})},containVisibleStampset:function(e){return l.exists(this.stampsetInfos,function(t){var n=t.stampsetId;return null!=e&&null!=n&&e.high==n.high&&e.low==n.low})},getSendableStampsetInfos:function(){var e=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(t){return e.containSendableStampset(t.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.map(function(t){return e.eqStampsetId(t)&&e.isNewerThan(t)?e:t})},deleteStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.filter(function(t){var n=t.stampsetId;return!(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(t){return!(null!=t&&null!=e&&t.high==e.high&&t.low==e.low)})},getStampsetIdsDiff:function(e){for(var t=new Ha,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=0?r:1},qn.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__:qn};var Qn=function(e,t){this.paneType=e,this.talkSelection=t};n["albero.entity.TalkPaneSelection"]=Qn,Qn.__name__=["albero","entity","TalkPaneSelection"],Qn.createArrayForMultiPanes=function(e){return l.mapi(e,function(e,t){return new Qn(tn.getMultiPaneType(e),t)})},Qn.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return H.talks(e,G.single(this.talkSelection));case 1:var n=yo(t,t.getTalkSelection),i=e,r=tn.getMultiPaneTypes().map(function(e){return n(i,e)});return r[0]=this.talkSelection,H.talks(e,G.multi(r));case 2:var a=yo(t,t.getTalkSelection),o=e,s=tn.getMultiPaneTypes().map(function(e){return a(o,e)});return s[1]=this.talkSelection,H.talks(e,G.multi(s));case 3:var l=yo(t,t.getTalkSelection),u=e,c=tn.getMultiPaneTypes().map(function(e){return l(u,e)});return c[2]=this.talkSelection,H.talks(e,G.multi(c))}},getTalkIdOrNull:function(){return $n.getTalkIdOrNull(this.talkSelection)},__class__:Qn};var Jn=function(){};n["albero.entity.ITalkSelectionGetter"]=Jn,Jn.__name__=["albero","entity","ITalkSelectionGetter"],Jn.prototype={__class__:Jn};var Xn=function(e,t){this.domainId=e.domain_id,this.talkId=e.talk_id,this.type=t?_n.fromRawValue(e.type):hn.None,this.version=e.version};n["albero.entity.TalkPushNotificationEvent"]=Xn,Xn.__name__=["albero","entity","TalkPushNotificationEvent"],Xn.prototype={__class__:Xn};var Zn=n["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};Zn.NotSelected=["NotSelected",0],Zn.NotSelected.toString=i,Zn.NotSelected.__enum__=Zn,Zn.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=Zn,n.toString=i,n},Zn.AnnouncementsSelected=["AnnouncementsSelected",2],Zn.AnnouncementsSelected.toString=i,Zn.AnnouncementsSelected.__enum__=Zn,Zn.__empty_constructs__=[Zn.NotSelected,Zn.AnnouncementsSelected];var $n=function(){};n["albero.entity.TalkSelectionHelper"]=$n,$n.__name__=["albero","entity","TalkSelectionHelper"],$n.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=$n.getTalkIdOrNull(e),r=$n.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=$n.getMessageIdOrNull(e),o=$n.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},$n.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:e[3];var n=e[2],i=P.orNull(Vn.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==jn.annoucements}},$n.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},$n.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return P.orNull(t);case 2:return null}},$n.toTalkSelectionStr=function(e){switch(e[1]){case 0:return"";case 1:var t=e[2];return"_"+t.high+"_"+t.low;case 2:return"announcement"}};var ei=function(e){this.unreadMentionCount=0,this.unreadCount=0,null!=e?(this.id=e.talk_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.unreadMentionCount=null!=e.unread_mention_count?e.unread_mention_count:0,this.maxMessageId=e.max_message_id,null!=e.max_message?this.maxMessage=new Wt(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 cn(e.push_notification)):this.pushNotificationSetting=new cn};n["albero.entity.TalkStatus"]=ei,ei.__name__=["albero","entity","TalkStatus"],ei.prototype={update:function(e){var t=this,n=!1;return this.needIdUpdate(this.maxEveryoneReadMessageId,e.maxEveryoneReadMessageId)&&(this.maxEveryoneReadMessageId=e.maxEveryoneReadMessageId,n=!0),P.foreach(e.maxReadMessageId,function(e){t.needIdUpdate(t.maxReadMessageId,e)&&(t.maxReadMessageId=e,n=!0)}),n},updateByMessageDeletion:function(e){var t=!1;return this.isUnread(e.messageId)&&(this.decrementUnreadCount(1),e.isMention&&this.decrementUnreadMentionCount(1),t=!0),this.isMax(e.messageId)&&(null!=this.maxMessage&&(this.maxMessage.type=jt.deleted),t=!0),t},updateByMessageReadStatusesUpdate:function(e){var t=e.messageIds,n=e.mentionMessageIds,i=t.filter(yo(this,this.isUnread));if(0==i.length)return!1;for(var r=i[0],a=0;a=0?s:1)<0&&(r=o),F.notContains(e.messageIdsExcludingUnreadCountTargets,o)&&(this.decrementUnreadCount(1),F.contains(n,o)&&this.decrementUnreadMentionCount(1))}return this.maxReadMessageId=r,!0},needIdUpdate:function(e,t){if(null!=t){if(null!=e){var n=e.high-t.high|0;return n=0!=n?n:Na.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,n){this.maxReadMessageId=e,this.decrementUnreadCount(t),this.decrementUnreadMentionCount(n)},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},decrementUnreadMentionCount:function(e){this.unreadMentionCount-=e,this.unreadMentionCount<0&&(this.unreadMentionCount=0)},readAll:function(){this.maxReadMessageId=this.maxMessageId,this.unreadCount=0,this.unreadMentionCount=0},updateByMessage:function(e,t){this.isNewMax(e.id)&&(this.maxMessageId=e.id,this.maxMessage=e),e.isUnreadCountTarget&&(t?this.isUnread(e.id)&&this.readAll():(this.unreadCount++,e.mention&&this.unreadMentionCount++),this.talkOrderingTimestamp=e.createdAt)},updateByReadingMessages:function(e,t){var n=this;if(null==e||this.canRegardTalkReadCountZero(e)){if(!ti.isUnreadMesasgeExisted(this))return!1;if(null==this.maxMessageId)return!1;this.readAll()}else{var i=e.filter(function(e){return n.isUnread(e.id)});if(0==i.length)return!1;var r=i[i.length-1].id,a=i.filter(function(e){if(e.isUnreadCountTarget){var n=e.userId;return!(null!=n&&null!=t&&n.high==t.high&&n.low==t.low)}return!1}),o=a.filter(function(e){return e.mention});this.read(r,a.length,o.length)}return!0},updateByTalkPushNotificationEvent:function(e){return e.version>this.pushNotificationSetting.version&&(this.pushNotificationSetting=cn.createWithParams(e.type,e.version),!0)},canRegardTalkReadCountZero:function(e){var t=this.maxMessageId,n=P.orNull(x.lastOption(e.map(function(e){return e.id})));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},isMessageAcceptable:function(e,t){if(this.isUnread(e.id))return!0;var n=Lt.subTimestampPart(this.maxReadMessageId,e.id),i=n.high-t.high|0;return i=0!=i?i:Na.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<=0},isUnread:function(e){if(null!=this.maxReadMessageId){var t=this.maxReadMessageId,n=t.high-e.high|0;return n=0!=n?n:Na.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId,n=t.high-e.high|0;return n=0!=n?n:Na.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isNotificationDisabled:function(){return this.pushNotificationSetting.isDisabled()},getNotificationType:function(){return this.pushNotificationSetting.type},__class__:ei};var ti=function(){};n["albero.entity.TalkStatusHelper"]=ti,ti.__name__=["albero","entity","TalkStatusHelper"],ti.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},ti.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},ti.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&e.isUnread(e.maxMessage.id))};var ni=function(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=P.option(e.max_read_message_id))};n["albero.entity.TalkStatusUpdate"]=ni,ni.__name__=["albero","entity","TalkStatusUpdate"],ni.prototype={__class__:ni};var ii=function(e,t,n){this.file=e,this.dimension=ri.createWithSize(t,n),this.auth=null};n["albero.entity.ThumbInfo"]=ii,ii.__name__=["albero","entity","ThumbInfo"],ii.prototype={setAuth:function(e){this.auth=e},__class__:ii};var ri=function(e){null!=e&&(this.width=e.width,this.height=e.height)};n["albero.entity.ThumbDimension"]=ri,ri.__name__=["albero","entity","ThumbDimension"],ri.createWithSize=function(e,t){var n=new ri;return n.width=e,n.height=t,n},ri.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:ri};var ai=function(e,t,n){var i=new ui(0,0);this.domainId=i,this.domainId=e,this.oldSetting=t,this.newSetting=n};n["albero.entity.UpdateDomainStampSettingEvent"]=ai,ai.__name__=["albero","entity","UpdateDomainStampSettingEvent"],ai.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:ai};var oi=n["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL"]};oi.PROFILE_IMAGE=["PROFILE_IMAGE",0],oi.PROFILE_IMAGE.toString=i,oi.PROFILE_IMAGE.__enum__=oi,oi.MESSAGE=["MESSAGE",1],oi.MESSAGE.toString=i,oi.MESSAGE.__enum__=oi,oi.TALK_ICON=["TALK_ICON",2],oi.TALK_ICON.toString=i,oi.TALK_ICON.__enum__=oi,oi.THUMBNAIL=["THUMBNAIL",3],oi.THUMBNAIL.toString=i,oi.THUMBNAIL.__enum__=oi,oi.NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],oi.NOTE_ATTACHMENT.toString=i,oi.NOTE_ATTACHMENT.__enum__=oi,oi.NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],oi.NOTE_THUMBNAIL.toString=i,oi.NOTE_THUMBNAIL.__enum__=oi,oi.__empty_constructs__=[oi.PROFILE_IMAGE,oi.MESSAGE,oi.TALK_ICON,oi.THUMBNAIL,oi.NOTE_ATTACHMENT,oi.NOTE_THUMBNAIL];var si=function(){};n["albero.entity.UploadUseTypeHelper"]=si,si.__name__=["albero","entity","UploadUseTypeHelper"],si.getUseTypeInt=function(e){switch(e[1]){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4;case 4:return 5;case 5:return 6}};var li=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))};n["albero.entity.UserIdentifier"]=li,li.__name__=["albero","entity","UserIdentifier"],li.prototype={__class__:li};var ui=function(e,t){this.high=e,this.low=t};n["haxe._Int64.___Int64"]=ui,ui.__name__=["haxe","_Int64","___Int64"],ui.prototype={__class__:ui};var ci=function(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=P.option(e.last_used_at))};n["albero.entity.UserPresence"]=ci,ci.__name__=["albero","entity","UserPresence"],ci.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(Na.ucompare(t.low,e.low)<0){n--;n|=0}var r=new ui(n,i),a=ci.SIXTY_MINUTES,o=r.high-a.high|0;if(o=0!=o?o:Na.ucompare(r.low,a.low),(r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0)return _i.GT_60;var s=ci.FIFTEEN_MINUTES,l=r.high-s.high|0;return l=0!=l?l:Na.ucompare(r.low,s.low),(r.high<0?s.high<0?l:-1:s.high>=0?l:1)>0?_i.LT_OR_EQ_60:_i.LT_OR_EQ_15},ci.prototype={toState:function(e){var t=e,n=P.map(this.lastUsedAtOpt,function(e){return ci.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return _i.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(Na.ucompare(e.low,n.low)<0){i--;i|=0}var a=new ui(i,r),o=a.high-t.high|0;return o=0!=o?o:Na.ucompare(a.low,t.low),(a.high<0?t.high<0?o:-1:t.high>=0?o:1)>0},__class__:ci};var _i=n["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};_i.LT_OR_EQ_15=["LT_OR_EQ_15",0],_i.LT_OR_EQ_15.toString=i,_i.LT_OR_EQ_15.__enum__=_i,_i.LT_OR_EQ_60=["LT_OR_EQ_60",1],_i.LT_OR_EQ_60.toString=i,_i.LT_OR_EQ_60.__enum__=_i,_i.GT_60=["GT_60",2],_i.GT_60.toString=i,_i.GT_60.__enum__=_i,_i.__empty_constructs__=[_i.LT_OR_EQ_15,_i.LT_OR_EQ_60,_i.GT_60];var hi=function(e){this.success=e};n["albero.entity.api.message.AddFavoriteMessageResult"]=hi,hi.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],hi.prototype={__class__:hi};var di=function(e){this.success=e};n["albero.entity.api.message.DeleteFavoriteMessageResult"]=di,di.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],di.prototype={__class__:di};var fi=function(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r};n["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=fi,fi.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],fi.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:fi};var mi=function(e,t){var n=this;l.iter(t,function(t){var i=new pi(t),r=i.createdAt,a=e.high-r.high|0;a=0!=a?a:Na.ucompare(e.low,r.low),(e.high<0?r.high<0?a:-1:r.high>=0?a:1)<0?n.messageCreatedAtNew=i:n.messageCreatedAtOld=i})};n["albero.entity.api.message.SearchMessagesAroundDateTimeResult"]=mi,mi.__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],mi.prototype={__class__:mi};var pi=function(e){this.messageId=e.message_id,this.createdAt=e.created_at};n["albero.entity.api.message.MessageCreatedAt"]=pi,pi.__name__=["albero","entity","api","message","MessageCreatedAt"],pi.prototype={__class__:pi};var gi=function(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n};n["albero.entity.api.note.CreateNoteError"]=gi,gi.__name__=["albero","entity","api","note","CreateNoteError"],gi.prototype={__class__:gi};var vi=function(e){this.note=new Hi(e),this.emitterKey=null};n["albero.entity.api.note.CreateNoteResult"]=vi,vi.__name__=["albero","entity","api","note","CreateNoteResult"],vi.prototype={updateWithEmitterKey:function(e){var t=new vi;return t.note=this.note,t.emitterKey=e,t},__class__:vi};var yi=function(e){this.result=e};n["albero.entity.api.note.DeleteNoteResult"]=yi,yi.__name__=["albero","entity","api","note","DeleteNoteResult"],yi.prototype={__class__:yi};var Si=function(e){this.note=new Hi(e)};n["albero.entity.api.note.GetNoteResult"]=Si,Si.__name__=["albero","entity","api","note","GetNoteResult"],Si.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()},getLockedUserIdWithoutSelf:function(e){return this.note.getLockedUserIdWithoutSelf(e)},__class__:Si};var wi=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=x.asArray(e.contents).map(function(e){return new nr(e)}))};n["albero.entity.api.note.GetNoteStatusesResult"]=wi,wi.__name__=["albero","entity","api","note","GetNoteStatusesResult"],wi.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:wi};var Ti=function(e){this.note=new Hi(e)};n["albero.entity.api.note.UpdateNoteResult"]=Ti,Ti.__name__=["albero","entity","api","note","UpdateNoteResult"],Ti.prototype={__class__:Ti};var Ii=function(e){this.note=new Hi(e)};n["albero.entity.api.note.UpdateNoteSettingResult"]=Ii,Ii.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],Ii.prototype={__class__:Ii};var Ei=function(){};n["albero.entity.file.DummyFileUtil"]=Ei,Ei.__name__=["albero","entity","file","DummyFileUtil"],Ei.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob};var Ni=function(e){null!=e&&(this.fileId=e.file_id,this.status=e.status,this.filePreviewFileId=e.file_preview_file_id,this.url=e.url,this.key=e.key)};n["albero.entity.file.FilePreview"]=Ni,Ni.__name__=["albero","entity","file","FilePreview"],Ni.prototype={__class__:Ni};var Ai=function(){};n["albero.entity.file.StageType"]=Ai,Ai.__name__=["albero","entity","file","StageType"],Ai.prototype={__class__:Ai};var bi=function(e,t){this.talkId=e,this.paneType=t};n["albero.entity.file.StageTypeTalk"]=bi,bi.__name__=["albero","entity","file","StageTypeTalk"],bi.__interfaces__=[Ai],bi.prototype={toString:function(){var e=this.talkId;return"staged__"+e.high+"_"+e.low+tn.toPanePrefix(this.paneType)},isForPane:function(e){return this.paneType==e},isForNote:function(){return!1},isForPreview:function(){return!1},__class__:bi};var Di=function(){};n["albero.entity.file.StageTypeNote"]=Di,Di.__name__=["albero","entity","file","StageTypeNote"],Di.__interfaces__=[Ai],Di.prototype={toString:function(){return"staged_note_"},isForPane:function(e){return!1},isForNote:function(){return!0},isForPreview:function(){return!1},__class__:Di};var ki=function(){};n["albero.entity.message.IFavoriteMessageEvent"]=ki,ki.__name__=["albero","entity","message","IFavoriteMessageEvent"],ki.prototype={__class__:ki};var Ci=function(e){this.message=new Wt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.AddFavoriteMessageEvent"]=Ci,Ci.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Ci.__interfaces__=[ki],Ci.prototype={getMessage:function(){return this.message},getMessageId:function(){return this.message.id},isFavorite:function(){return!0},getDomainId:function(){return this.domainId},getTalkId:function(){return this.talkId},__class__:Ci};var Oi=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.DeleteFavoriteMessageEvent"]=Oi,Oi.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Oi.__interfaces__=[ki],Oi.prototype={getMessageId:function(){return this.messageId},isFavorite:function(){return!1},__class__:Oi};var Mi=function(){};n["albero.entity.message.IMessageContentForActionReply"]=Mi,Mi.__name__=["albero","entity","message","IMessageContentForActionReply"],Mi.prototype={__class__:Mi};var Fi=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.title=e.title,this.revision=e.revision,this.deleted=e.deleted,this.hasAttachments=!!e.has_attachments)};n["albero.entity.message.MessageContentForNote"]=Fi,Fi.__name__=["albero","entity","message","MessageContentForNote"],Fi.prototype={__class__:Fi};var Ri=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.title=e.title)};n["albero.entity.message.MessageContentForNoteDeleted"]=Ri,Ri.__name__=["albero","entity","message","MessageContentForNoteDeleted"],Ri.prototype={__class__:Ri};var xi=function(e){this.text=La.None,this.stampsetId=F.fromIntOrInt64(e.stampset_id),this.stampId=F.fromIntOrInt64(e.stamp_id),null!=e.text&&(this.text=La.Some(e.text))};n["albero.entity.message.MessageContentForOriginalStamp"]=xi,xi.__name__=["albero","entity","message","MessageContentForOriginalStamp"],xi.prototype={hasValidText:function(){return P.isDefined(this.getValidText())},getValidText:function(){return P.filter(this.text,B.isNotEmpty)},__class__:xi};var Ui=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.options=e.options,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForSelectOneReply"]=Ui,Ui.__name__=["albero","entity","message","MessageContentForSelectOneReply"],Ui.__interfaces__=[Mi],Ui.prototype={getResponseIndex:function(){return this.response},__class__:Ui};var Pi=function(e){this.inReplyTo=e.in_reply_to,this.title=e.title,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.done=e.done,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForTodoReply"]=Pi,Pi.__name__=["albero","entity","message","MessageContentForTodoReply"],Pi.__interfaces__=[Mi],Pi.prototype={getResponseIndex:function(){return this.done?0:1},__class__:Pi};var Li=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.question=e.question,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForYesNoReply"]=Li,Li.__name__=["albero","entity","message","MessageContentForYesNoReply"],Li.__interfaces__=[Mi],Li.prototype={getResponseIndex:function(){return this.response?0:1},__class__:Li};var Bi=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};n["albero.entity.message.MessageFavorite"]=Bi,Bi.__name__=["albero","entity","message","MessageFavorite"],Bi.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:Bi};var Hi=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new tr(e.setting),this.noteRevision=new $i(e.note_revision),this.noteLocked=new Ji(e.locked))};n["albero.entity.note.Note"]=Hi,Hi.__name__=["albero","entity","note","Note"],Hi.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)},lock:function(e,t,n,i){this.noteRevision.revision==e&&this.noteLocked.lock(t,n,i)},unlock:function(e,t){this.noteRevision.revision==e&&this.noteLocked.unlock(t)},getLockedUserIdWithoutSelf:function(e){return this.noteLocked.getLockedUserIdWithoutSelf(e)},isSameTalkId:function(e){var t=this.talkId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low},__class__:Hi};var Gi=n["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT","FILES"]};Gi.TEXT=["TEXT",0],Gi.TEXT.toString=i,Gi.TEXT.__enum__=Gi,Gi.FILES=["FILES",1],Gi.FILES.toString=i,Gi.FILES.__enum__=Gi,Gi.__empty_constructs__=[Gi.TEXT,Gi.FILES];var Yi=function(){};n["albero.entity.note.NoteContentTypeHelper"]=Yi,Yi.__name__=["albero","entity","note","NoteContentTypeHelper"],Yi.createNoteContentType=function(e){if(null==e)return _r._e("["+s.dateStr(new Date)+"] ","no value.","","","",""),null;switch(e){case 1:return Gi.TEXT;case 5:return Gi.FILES;default:return _r._e("["+s.dateStr(new Date)+"] ","value is not expected.","","","",""),null}},Yi.getValue=function(e){if(null==e)return _r._e("["+s.dateStr(new Date)+"] ","no content type.","","","",""),null;switch(e[1]){case 0:return 1;case 1:return 5}};var zi=function(e){this.value=e};n["albero.entity.note.NoteId"]=zi,zi.__name__=["albero","entity","note","NoteId"],zi.__interfaces__=[Bt],zi.createDummyId=function(){var e,t=zi.nextDummyId,n=zi.nextDummyId;if(null==n)e=null;else{var i=new ui(0,1),r=n.high-i.high|0,a=n.low-i.low|0;if(Na.ucompare(n.low,i.low)<0){r--;r|=0}e=new ui(r,a)}return zi.nextDummyId=e,new zi(t)},zi.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()},isDummy:function(){return this.value.high<0},__class__:zi};var Ki=function(e,t,n,i,r,a,o){this.state=Wi.SENDING,this.talkId=e,this.noteId=t,this.title=n,this.text=i,this.fileInfos=r,this.emitterKey=a,this.createMessage=null==o||o};n["albero.entity.note.NoteLocalEdit"]=Ki,Ki.__name__=["albero","entity","note","NoteLocalEdit"],Ki.prototype={hasEmitterKey:function(){return null!=this.emitterKey},getEmitterKey:function(){return this.emitterKey},setState:function(e){this.state=e},getTalkId:function(){return this.talkId},getNoteId:function(){return this.noteId},getTitle:function(){return this.title},getText:function(){return this.text},getContent:function(){switch(this.getContentType()[1]){case 0:return this.text;case 1:return{files:this.getUploadedFilesData(),text:null==this.text?"":this.text}}},getFileInfos:function(){return this.fileInfos},getState:function(){return this.state},isSending:function(){return this.state==Wi.SENDING},isFailed:function(){switch(this.state[1]){case 0:case 6:return!1;case 1:case 2:case 3:case 4:case 5:return!0}},isForCreate:function(){return this.noteId.isDummy()},canNotSend:function(){return 0!=this.getUnuploadedFileInfos().length},getContentType:function(){return this.fileInfos.length>0?Gi.FILES:Gi.TEXT},getUnuploadedFileInfos:function(){return this.fileInfos.filter(function(e){return e.isNotUploaded()})},getUploadedFilesData:function(){return this.fileInfos.map(function(e){return e.getUploadedFileData()}).filter(function(e){return null!=e})},createNoteRevisionSummary:function(e){var t=new er;return t.revision=0,t.contentType=this.getContentType(),t.title=this.title,t.contentSummary=this.text,t.createdBy=e,t.createdAt=k.nowAsInt64(),t.contentFiles=this.fileInfos,t},conflict:function(){this.state=Wi.FAILED_BY_CONFLICT},deleted:function(){this.state=Wi.FAILED_BY_NOT_FOUND},getCreateMessage:function(){return this.createMessage},__class__:Ki};var Wi=n["albero.entity.note.NoteLocalEditState"]={__ename__:["albero","entity","note","NoteLocalEditState"],__constructs__:["SENDING","FAILED_BY_CONFLICT","FAILED_BY_NOT_FOUND","FAILED_BY_NOT_FOUND_FORWARDING","FAILED_BY_FILE","FAILED_BY_UNKNOWN","COMPLETED"]};Wi.SENDING=["SENDING",0],Wi.SENDING.toString=i,Wi.SENDING.__enum__=Wi,Wi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",1],Wi.FAILED_BY_CONFLICT.toString=i,Wi.FAILED_BY_CONFLICT.__enum__=Wi,Wi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],Wi.FAILED_BY_NOT_FOUND.toString=i,Wi.FAILED_BY_NOT_FOUND.__enum__=Wi,Wi.FAILED_BY_NOT_FOUND_FORWARDING=["FAILED_BY_NOT_FOUND_FORWARDING",3],Wi.FAILED_BY_NOT_FOUND_FORWARDING.toString=i,Wi.FAILED_BY_NOT_FOUND_FORWARDING.__enum__=Wi,Wi.FAILED_BY_FILE=function(e,t){var n=["FAILED_BY_FILE",4,e,t];return n.__enum__=Wi,n.toString=i,n},Wi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",5],Wi.FAILED_BY_UNKNOWN.toString=i,Wi.FAILED_BY_UNKNOWN.__enum__=Wi,Wi.COMPLETED=["COMPLETED",6],Wi.COMPLETED.toString=i,Wi.COMPLETED.__enum__=Wi,Wi.__empty_constructs__=[Wi.SENDING,Wi.FAILED_BY_CONFLICT,Wi.FAILED_BY_NOT_FOUND,Wi.FAILED_BY_NOT_FOUND_FORWARDING,Wi.FAILED_BY_UNKNOWN,Wi.COMPLETED];var ji=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.revision=e.revision,this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLockEvent"]=ji,ji.__name__=["albero","entity","note","NoteLockEvent"],ji.prototype={__class__:ji};var Vi=function(e){this.value=e};n["albero.entity.note.NoteLockExpiredAt"]=Vi,Vi.__name__=["albero","entity","note","NoteLockExpiredAt"],Vi.prototype={fromNow:function(){var e=this.value,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)-(new Date).getTime()|0},calcRelockDelay:function(){return.9*this.fromNow()|0},__class__:Vi};var qi=n["albero.entity.note.NoteLockStateValue"]={__ename__:["albero","entity","note","NoteLockStateValue"],__constructs__:["FAILED_BY_CONFLICT","FAILED_BY_LOCKED","FAILED_BY_NOT_FOUND","FAILED_BY_UNKNOWN","COMPLETED","RELEASED"]};qi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",0],qi.FAILED_BY_CONFLICT.toString=i,qi.FAILED_BY_CONFLICT.__enum__=qi,qi.FAILED_BY_LOCKED=function(e){var t=["FAILED_BY_LOCKED",1,e];return t.__enum__=qi,t.toString=i,t},qi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],qi.FAILED_BY_NOT_FOUND.toString=i,qi.FAILED_BY_NOT_FOUND.__enum__=qi,qi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",3],qi.FAILED_BY_UNKNOWN.toString=i,qi.FAILED_BY_UNKNOWN.__enum__=qi,qi.COMPLETED=function(e){var t=["COMPLETED",4,e];return t.__enum__=qi,t.toString=i,t},qi.RELEASED=["RELEASED",5],qi.RELEASED.toString=i,qi.RELEASED.__enum__=qi,qi.__empty_constructs__=[qi.FAILED_BY_CONFLICT,qi.FAILED_BY_NOT_FOUND,qi.FAILED_BY_UNKNOWN,qi.RELEASED];var Qi=function(e){this.value=e};n["albero.entity.note.NoteLockState"]=Qi,Qi.__name__=["albero","entity","note","NoteLockState"],Qi.prototype={isCompleted:function(){return 4==this.value[1]},getExpiredAtOrNull:function(){var e=this.value;return 4==e[1]?e[2]:null},isLockedByOther:function(){return 1==this.value[1]},getLockedUser:function(){var e=this.value;return 1==e[1]?e[2]:null},__class__:Qi};var Ji=function(e){null!=e&&(this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLocked"]=Ji,Ji.__name__=["albero","entity","note","NoteLocked"],Ji.prototype={lock:function(e,t,n){this.expiredAt=n,this.deviceId=t,this.userId=e},unlock:function(e){var t=this.userId;null!=t&&null!=e&&t.high==e.high&&t.low==e.low&&(this.expiredAt=null,this.userId=null,this.deviceId=null)},getLockedUserIdWithoutSelf:function(e){var t,n=this.deviceId;if(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)return null;if(null!=this.expiredAt){var i=this.expiredAt,r=i.high,a=i.low;t=4294967296*r+(a>=0?a:a+4294967296)<=(new Date).getTime()}else t=!0;return t?null:this.userId},__class__:Ji};var Xi=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.talkId=e.talk_id,this.setting=new tr(e.setting))};n["albero.entity.note.NotePartialUpdateForSetting"]=Xi,Xi.__name__=["albero","entity","note","NotePartialUpdateForSetting"],Xi.prototype={__class__:Xi};var Zi=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new er(e.note_revision_summary))};n["albero.entity.note.NotePartialUpdateForSummary"]=Zi,Zi.__name__=["albero","entity","note","NotePartialUpdateForSummary"],Zi.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:Zi};var $i=function(e){if(this.contentFiles=[],null!=e){switch(this.revision=e.revision,this.title=e.title,this.contentType=Yi.createNoteContentType(e.content_type),this.contentType[1]){case 0:this.contentText=e.content;break;case 1:if(this.contentText=null==e.content.text?"":e.content.text,null!=e.content.files)for(var t=0,n=Za.__cast(e.content.files,Array);t>2)),r+=g.string(a.charAt(63&(o<<4|s>>4))),r+=g.string(a.charAt(63&(s<<2|l>>6))),r+=g.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=g.string(a.charAt(u>>2)),r+=g.string(a.charAt(63&(u<<4|c>>4))),r+=g.string(a.charAt(c<<2&63))}else if(n==i+1){var _=t.b[n++];r+=g.string(a.charAt(_>>2)),r+=g.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},or.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=s.substr(e,0,t));var n=e.length,i=e,r=or.CODES;null==r&&(r=or.initCodes(),or.CODES=r);for(var a=0,o=3&n,l=a+(n-o),u=new Ga(new Po(3*(n>>2)+(o>=2?o-1:0))),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 m=r[i.charCodeAt(a++)],p=r[i.charCodeAt(a++)];if(u.b[c++]=255&(m<<2|p>>4),3==o){var g=r[i.charCodeAt(a++)];u.b[c++]=255&(p<<4|g>>2)}}return u};var sr=function(){};n["albero.js.KatakanaToRoman"]=sr,sr.__name__=["albero","js","KatakanaToRoman"],sr.assureConvertTable=function(){return null!=sr.convertTable?sr.convertTable:(sr.convertTable=new Ha,l.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=sr.convertTable,n=e[0],i=e[1];null!=Uo[n]?t.setReserved(n,i):t.h[n]=i}),sr.convertTable)},sr.matchNext=function(e,t){var n=sr.assureConvertTable();if(t+1=pr.HIRAGANA_SMALL_A&&o<=pr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(pr.KATAKANA_SMALL_A-pr.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},pr.katakanaToRoman=function(e){return(new sr).convert(e)},pr.normalize=function(e){return new gr(null).normalize(e)},pr.normalizeForFile=function(e){return new gr(null).normalizeForFile(e)},pr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var gr=function(e){this.beforeTask=null,this.beforeTask=e};n["albero.js.Normalizer"]=gr,gr.__name__=["albero","js","Normalizer"],gr.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Xa&&(e=e.val),_r._e("["+s.dateStr(new Date)+"] ","invalid character:",e,"","",""),cr.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Xa&&(e=e.val),_r._e("["+s.dateStr(new Date)+"] ","invalid character:",e,"","",""),cr.localize("TextCanonicalizer.invalid")}},__class__:gr};var vr=function(){};n["albero.js.WebSocket"]=vr,vr.__name__=["albero","js","WebSocket"],vr.prototype={__class__:vr};var yr=function(){};n["albero.js.WebSocketFactory"]=yr,yr.__name__=["albero","js","WebSocketFactory"],yr.newInstance=function(e,t){return new Sr(e,t)};var Sr=function(e,t){this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong,this.ws=new WebSocket(e),Ro.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=yo(this,this.onOpen),this.ws.onmessage=yo(this,this.onMessage),this.ws.onerror=yo(this,this.onError),this.ws.onclose=yo(this,this.onClose)};n["albero.js.WebSocketForBrowser"]=Sr,Sr.__name__=["albero","js","WebSocketForBrowser"],Sr.__interfaces__=[vr],Sr.prototype={onOpen:function(e){_r._i("["+s.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryData(e),this.onmessage(t)}},getBinaryData:function(e){return Ro.websocketsbinary?Ga.ofData(new Lo(e.data)):or.decode(e.data)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){_r._e("["+s.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+g.string(e.code)+" "+g.string(e.reason)+" "+g.string(e.wasClean);_r._i("["+s.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,this.ws.close()},send:function(e){Ro.websocketsbinary?this.ws.send(new Lo(e.b.bufferValue).buffer):this.ws.send(or.encode(e))},ping:function(e){this.send(new Ga(new Po(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Sr};var wr=function(){};n["puremvc.interfaces.IProxy"]=wr,wr.__name__=["puremvc","interfaces","IProxy"],wr.prototype={__class__:wr};var Tr=function(){};n["albero.proxy.AccessTokenResolverProxy"]=Tr,Tr.__name__=["albero","proxy","AccessTokenResolverProxy"],Tr.__interfaces__=[wr],Tr.prototype={__class__:Tr};var Ir=function(){};n["albero.proxy.AccessTokenResolverProxyFactory"]=Ir,Ir.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ir.newInstance=function(){return new Nr("accessTokenResolver")};var Er=function(e,t){j.call(this),this.proxyName=null!=e?e:Er.NAME,null!=t&&this.setData(t)};n["puremvc.patterns.proxy.Proxy"]=Er,Er.__name__=["puremvc","patterns","proxy","Proxy"],Er.__interfaces__=[wr],Er.__super__=j,Er.prototype=r(j.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Er});var Nr=function(e){Er.call(this,e)};n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Nr,Nr.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Nr.__interfaces__=[Tr],Nr.__super__=Er,Nr.prototype=r(Er.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=xo.account?xo.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Nr});var Ar=function(){Er.call(this,"broadcast")};n["albero.proxy.AlberoBroadcastProxy"]=Ar,Ar.__name__=["albero","proxy","AlberoBroadcastProxy"],Ar.__super__=Er,Ar.prototype=r(Er.prototype,{handleNotification:function(e,t){var n=this;switch(e){case"notify_add_account_control_request":var i=new Be(t);this.dataStore.setAccountControlRequest(i),this.sendNotification(e,i);break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1]));break;case"notify_add_acquaintances":for(var r=t[1].map(yo(go=this.dataFactory,go.newAcquaintance)),a=0;at.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){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t){var n=this.dataStore.getTalk(e.talkId);if(null==n)return void _r._e("["+s.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(t=new ei).id=e.talkId,t.talkOrderingTimestamp=n.updatedAt}t.updateByTalkPushNotificationEvent(e)&&this.dataStore.setTalkStatus(t)},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new ei).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);null==t&&((t=new ei).id=e.talkId);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;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var t=this;if(!l.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);return null==n?(_r._e("["+s.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(n.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(n),n)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new ze).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:Ar});var br=function(){Er.call(this,"api")};n["albero.proxy.AlberoServiceProxy"]=br,br.__name__=["albero","proxy","AlberoServiceProxy"],br.__super__=Er,br.prototype=r(Er.prototype,{getOSString:function(){return"bot","bot"},createAccessToken:function(e,t,n){var i=this,r=e.split("$"),a=this.settings.getOs(),o=this.settings.getIDFV(),s=function(e){i.settings.setAccessToken(e),n(e)},l=function(e){i.sendNotification("Url",Fe.FORWARD(H.error))};-1==e.indexOf("@")&&2==r.length?this.wsApi.createAccessTokenById(r[1],r[0],t,o,a).then(s,l):this.wsApi.createAccessToken(e,t,o,a).then(s,l)},authorizeDevice:function(e,t){var n=this,i=this.settings.getIDFV();this.wsApi.authorizeDevice(e,i).then(function(e){t()},function(e){n.apiCaller.handleServerErrorDefault(e)})},createSession:function(e,t){var n=this;this.apiCaller.onSessionClear(),this.wsApi.createSession(e,"1.122",null).then(function(e){var i=k.nowAsInt64();e.passwordExpiration.isExpired(i)?n.sendNotification("password_expiration_overed"):(e.passwordExpiration.needWarning(i,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(k.oneDayAfterAsInt64()),n.sendNotification("password_expiration_warned")),n.apiCaller.onSessionCreated(),t(e),n.apiCaller.fireCallbacksWaitingForSession())},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",te.AUTHORIZE);n.apiCaller.handleServerErrorDefault(e)}n.settings.clearAccessToken(),n.sendNotification("Url",Fe.FORWARD(H.error))})},startNotification:function(){var e=this;this.wsApi.startNotification().then(function(t){t||(e.dataStore.clear(!0),e.sendNotification("start_notification_failed"))},function(t){e.apiCaller.handleServerErrorDefault(t)})},resetNotification:function(e){var t=this;this.wsApi.resetNotification().then(e,function(e){t.apiCaller.handleServerErrorDefault(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.wsApi.createMessage(a,r.type,r.content).then(function(r){i.dataStore.setMessage(r),i.sendNotification("create_message_complete",[r,o.id]),i.forwardMessages(e,t,n+1),i.dataStore.removeMessage(o.id)},function(e){if(i.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Qr.toLocalError(Yt.SendingMessageConflicted,e);i.sendNotification("error_occurred",t)}else i.sendNotification("error_occurred",e)})}},deleteMessage:function(e,t){var n=this;this.wsApi.deleteMessage(e,t).then(function(e){},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=Qr.toLocalError(Yt.DeletingMessageConflicted,e);return void n.sendNotification("error_occurred",t)}n.sendNotification("error_occurred",e)}})},updateReadStatuses:function(e,t){var n=this;this.wsApi.updateReadStatuses(e,t).then(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)},function(e){n.apiCaller.handleServerErrorDefault(e)})},searchMessagesAroundDateTime:function(e,t){return this.wsApi.searchMessagesAroundDateTime(e,t)},uploadV2:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a),this.prepareMessageFileAsync(n.file,n.thumb,e).then(function(e){r._createMessage(t,jt.file,e,a,i)},function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return _r._w("["+s.dateStr(new Date)+"] ","WARNING method: upload",o,"","",""),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMultiV2:function(e,t,n,i,r){var a=this,o=this.dataFactory.newDummyMultipleFileMessage(t,n,i);this.sendNotification("create_message_start",o);for(var s=Promise.resolve([]),l=0;l0&&(s.text=n),a._createMessage(t,jt.textMultipleFile,s,o,r)}},function(e){a.sendNotification("create_message_fail",[e,o],r)})},uploadMultiForHubot:function(e,t,n,i){var r=this.dataStore.getTalk(e),a=n.map(function(e){return{file:e,thumb:null}});if(null==r){var o=this.dataFactory.newDummyMultipleFileMessage(e,t,a),l={code:400,message:"invalid talk_id (deleted talk)"};return _r._w("["+s.dateStr(new Date)+"] ","WARNING method: uploadMulti",l,"","",""),void this.sendNotification("create_message_fail",[l,o],i)}this.uploadMultiV2(r.domainId,r.id,t,a,i)},prepareMessageFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,oi.THUMBNAIL,function(n){t.setAuth(n),e(La.Some(t))},function(t){e(La.None)}):e(La.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,oi.MESSAGE,function(n){var i=pr.normalizeForFile(e.name),a=C.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},prepareNoteFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,oi.NOTE_THUMBNAIL,function(n){t.setAuth(n),e(La.Some(t))},function(t){e(La.None)}):e(La.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,oi.NOTE_ATTACHMENT,function(n){var i=pr.normalizeForFile(e.name),a=C.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},uploadFile:function(e,t,n,i,r){var a=this,o=e,l=pr.normalizeForFile(o.name),u=o.type,c=o.size;this.wsApi.createUploadAuth(l,u,c,t,n).then(function(t){a.fileService.upload(t,u,e).then(function(e){i(t.rawValue)},function(e){var t="failed to upload: "+g.string(e);_r._e("["+s.dateStr(new Date)+"] ",t,"","","","");var i=new qr({code:null,detail:null,message:e});if(n!=oi.THUMBNAIL&&n!=oi.NOTE_THUMBNAIL&&n!=oi.NOTE_ATTACHMENT){var o=Qr.toLocalError(Yt.GeneralFileError,i);a.sendNotification("error_occurred",o)}r(i)})},function(e){if(n!=oi.THUMBNAIL&&n!=oi.NOTE_THUMBNAIL&&n!=oi.NOTE_ATTACHMENT&&null!=e)if(502==e.code&&null!=e.detail){var t=F.fromIntOrInt64(e.detail.limit_max);if("file_size"==e.detail.limit_target){var i=Qr.toLocalError(Yt.UploadSizeOvered(t),e);a.sendNotification("error_occurred",i)}else if("storage_size"==e.detail.limit_target){var o=Qr.toLocalError(Yt.StorageSizeOvered(t),e);a.sendNotification("error_occurred",o)}}else a.sendNotification("error_occurred",e);r(e)})},createDownloadAuth:function(e,t,n,i,r){this.wsApi.createDownloadAuth(e,t,n).then(function(e){i(e)},function(e){r(e)})},deleteAttachment:function(e,t){var n=this;this.wsApi.deleteAttachment(e,t).then(function(e){},function(e){n.apiCaller.handleServerErrorDefault(e)})},getAttachments:function(e,t){var n=this;null==t&&(t={sinceId:null,maxId:null}),this.wsApi.getAttachments(e,20,t.sinceId,t.maxId).then(function(t){l.iter(t,function(e){n.dataStore.setTalkFileInfo(e,!0)}),n.sendNotification("get_file_responsed",{talkId:e,files:t})},function(e){n.apiCaller.handleServerErrorDefault(e)})},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,Wt.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",[e,a],i),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,r=this.settings.getSelectedDomainId();if(null!=r){e=null==e?{sinceId:null,maxId:null}:e;var a=this.apiCaller,o=e.sinceId,s=e.maxId,l=$t.orderToInt(t);a.call("get_announcements",[r,20,o,s,l],function(e){var a=e.map(yo(go=i.dataFactory,go.newAnnouncement));i.sendNotification("notify_get_announcements",{domainId:r,announcements:a,sortOrder:t,callerKey:n})})}},getAnnouncementStatuses:function(e){var t=this;this.apiCaller.call("get_announcement_statuses",[],function(n){for(var i=0;i0&&400==e.code&&"invalid file_id"==e.message&&(a.setState(Wi.FAILED_BY_NOT_FOUND_FORWARDING),o.dataStore.setNoteLocalEdit(a.getNoteId(),a)),null!=a&&400==e.code&&"invalid talk_id"==e.message){var i=zt.getNoteForwardingForbiddenError(),r=Qr.toLocalError(i,e);return o.sendNotification("error_occurred",r),Promise.reject(e)}return o.sendNotification("error_occurred",e),Promise.reject(e)})},updateNoteSetting:function(e,t,n){var i=this;return new Promise(function(r,a){i.apiCaller.call("update_note_setting",[e.value,t,n],function(e){r(new Ii(e))},a)}).then(function(e){return i.sendNotification("update_note_setting_completed",e),e},function(t){return 404==t.code?(i.dataStore.setNote(e,null),i.sendNotification("update_note_setting_failed_by_not_found",e),Promise.reject(t)):409==t.code&&"conflict"==t.message?(i.dataStore.setNote(e,null),i.sendNotification("update_note_setting_failed_by_conflict",e),Promise.reject(t)):409==t.code&&"locked by another user"==t.message&&null!=t.detail&&null!=t.detail.user_id&&null!=t.detail.device_id?(i.sendNotification("update_note_setting_failed_by_editing",e),Promise.reject(t)):(i.sendNotification("error_occurred",t),Promise.reject(t))})},updateNote:function(e,t,n,i,r,a,o){var s=this;return new Promise(function(o,l){var u=Yi.getValue(i);s.apiCaller.callApiReliable("update_note",[e.value,t,n,u,r,a],function(e){o(new Ti(e))},l,yo(s,s.retryTimeForCreateOrUpdateNoteFromError))}).then(function(t){return null!=o&&s.dataStore.setNoteLocalEdit(e,null),s.dataStore.setNote(e,t.note),s.sendNotification("update_note_completed",t),t},function(t){return 404==t.code?(null!=o?(o.setState(Wi.FAILED_BY_NOT_FOUND),s.dataStore.setNoteLocalEdit(e,o)):s.dataStore.setNote(e,null),Promise.reject(t)):409==t.code&&"conflict"==t.message?(null!=o?(o.setState(Wi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)):s.dataStore.setNote(e,null),Promise.reject(t)):409==t.code&&"locked by another user"==t.message&&null!=t.detail&&null!=t.detail.user_id&&null!=t.detail.device_id?(null!=o&&(o.setState(Wi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)),Promise.reject(t)):(null!=o&&(o.setState(Wi.FAILED_BY_UNKNOWN),s.dataStore.setNoteLocalEdit(e,o)),s.sendNotification("error_occurred",t),Promise.reject(t))})},deleteNote:function(e){var t=this;return new Promise(function(n,i){t.apiCaller.call("delete_note",[e.value],function(e){n(new yi(e))},i)}).then(function(e){return t.sendNotification("delete_note_completed",e),e},function(n){return 404==n.code&&t.dataStore.setNote(e,null),t.sendNotification("error_occurred",n),Promise.reject(n)})},lockNote:function(e,t,n){var i=this;return new Promise(function(e,r){i.apiCaller.call("lock_note",[t.value,n],e,r)}).then(function(e){var r=i.dataStore.getNote(t);if(null!=r){var a=i.dataStore.me.id,o=i.settings.getDeviceId();r.lock(n,a,o,e)}return new Qi(qi.COMPLETED(new Vi(e)))}).catch(function(n){if(400==n.code)return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN);if(403==n.code)return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN);if(404==n.code)return i.dataStore.setNote(t,null),new Qi(qi.FAILED_BY_NOT_FOUND);if(409==n.code&&"locked by another user"==n.message&&null!=n.detail&&null!=n.detail.user_id&&null!=n.detail.device_id){var r=i.dataStore.getUser(e,n.detail.user_id);return new Qi(qi.FAILED_BY_LOCKED(r))}return 409==n.code&&"conflict"==n.message?new Qi(qi.FAILED_BY_CONFLICT):(i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN))})},unlockNote:function(e,t,n){var i=this;return new Promise(function(e,r){i.apiCaller.call("unlock_note",[t.value,n],e,r)}).then(function(e){var r=i.dataStore.getNote(t);return null!=r&&r.unlock(n,i.dataStore.me.id),new Qi(qi.RELEASED)}).catch(function(n){if(400==n.code)return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN);if(403==n.code)return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN);if(404==n.code)return i.dataStore.setNote(t,null),new Qi(qi.FAILED_BY_NOT_FOUND);if(409==n.code&&"conflict"==n.message)return new Qi(qi.FAILED_BY_CONFLICT);if(409==n.code&&"locked by another user"==n.message&&null!=n.detail&&null!=n.detail.user_id&&null!=n.detail.device_id){var r=i.dataStore.getUser(e,n.detail.user_id);return new Qi(qi.FAILED_BY_LOCKED(r))}return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN)})},retryTimeForCreateOrUpdateNoteFromError:function(e){return this.shouldRetryCreateOrUpdateNote(e)?La.Some(this.apiCaller.retryTimeForReplicationLag()):La.None},shouldRetryCreateOrUpdateNote:function(e){return null!=e.code&&(500==e.code?"Internal Error (IllegalStateException)"==e.message:400==e.code&&"invalid file_id"==e.message)},__class__:kr});var Cr=function(){Er.call(this,"appState")};n["albero.proxy.AppStateProxy"]=Cr,Cr.__name__=["albero","proxy","AppStateProxy"],Cr.__super__=Er,Cr.prototype=r(Er.prototype,{start:function(){this.updateLastActivityAt(),this.checkInactiveInterval()},activateAppIfNeed:function(){this.updateLastActivityAt(),this.appState==N.Inactive&&this.setAppState(N.Active)},setAppState:function(e){this.appState=e,this.sendNotification("app_state_changed",this.appState)},updateLastActivityAt:function(){this.lastActivityAt=new Date},checkInactiveInterval:function(){this.checkInactive(),new ka(500).run=yo(this,this.checkInactive)},checkInactive:function(){this.appState!=N.Inactive&&((new Date).getTime()-this.lastActivityAt.getTime()<2e3||this.setAppState(N.Inactive))},__class__:Cr});var Or=function(){var e=new ui(-1,-1);this.dummyFileId=e;var t=new ui(-1,-1);this.dummyMsgId=t,Er.call(this,"dataFactory")};n["albero.proxy.DataFactoryProxy"]=Or,Or.__name__=["albero","proxy","DataFactoryProxy"],Or.__super__=Er,Or.prototype=r(Er.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 Et(e)},newDomain:function(e){return this.dataStore.setDomainIfLatest(new ft(e))},newDomainInvite:function(e){return this.dataStore.setDomainInvite(new Tt(e))},newTalk:function(e){return this.dataStore.setTalk(new zn(e))},newTalkStatus:function(e){return this.dataStore.setTalkStatus(new ei(e))},newDummyMessage:function(e,t,n){var i=this,r=new Wt;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 ui(0,1),l=o.high-s.high|0,u=o.low-s.low|0;if(Na.ucompare(o.low,s.low)<0){l--;l|=0}a=new ui(l,u)}this.dummyMsgId=a;var c=[];switch(r.type[1]){case 4:c=[this.createDummyFileInfo(r,r.content)];break;case 5:c=Za.__cast(r.content.files,Array).map(function(e){return i.createDummyFileInfo(r,e)})}return this.dataStore.setMessageWithFileInfos(r,c),r},newDummyFileMessage:function(e,t){var n=this.createFileInfoDynamic(t);return this.newDummyMessage(e,jt.file,n)},newDummyMultipleFileMessage:function(e,t,n){var i=l.array(n.filter(function(e){return null!=e.file}).map(yo(this,this.createFileInfoDynamic)));return this.newDummyMessage(e,jt.textMultipleFile,{text:t,files:i})},createFileInfoDynamic:function(e){var t=e.file;return{content_type:t.type,content_size:t.size,name:pr.normalizeForFile(t.name),file:t,localThumbInfo:e.thumb}},createDummyFileInfo:function(e,t){var n,i=Ct.fromMessageAndFileWithFileId(e,t,this.dummyFileId),r=this.dummyFileId;if(null==r)n=null;else{var a=new ui(0,1),o=r.high-a.high|0,s=r.low-a.low|0;if(Na.ucompare(r.low,a.low)<0){o--;o|=0}n=new ui(o,s)}return this.dummyFileId=n,i},newQuestion:function(e){return this.dataStore.setQuestion(new dn(e))},newAnnouncement:function(e){return new Ye(e)},newAnnouncementStatus:function(e){return this.dataStore.setAnnouncementStatus(new ze(e))},newAnnouncementStatusForDomain:function(e){var t=new ze;return t.domainId=e,this.dataStore.setAnnouncementStatus(t)},newAccountControlRequest:function(e){return this.dataStore.setAccountControlRequest(new Be(e))},newAccountControlGroup:function(e){return this.dataStore.setAccountControlGroup(new xe(e))},newUserPresence:function(e,t){var n=new ci(e,t);return this.dataStore.setUserPresence(n),n},__class__:Or});var Mr=function(){this.departmentStore=new at,this.stampStore=new Pn,this.questionStore=new yn,this.fileInfoStore=new Ft,this.messageStore=new Xt,this.conferenceStore=new Xe,this.solutionStore=new Fn,this.directAppStore=new _t,this.flowNotificationBadgeStore=new xt,Er.call(this,"dataStore")};n["albero.proxy.DataStoreProxy"]=Mr,Mr.__name__=["albero","proxy","DataStoreProxy"],Mr.__super__=Er,Mr.prototype=r(Er.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!=Uo[i]?e.setReserved(i,u):e.h[i]=u}this.storageForUsers.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new Ha);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=Uo[n]?i.setReserved(n,e):i.h[n]=e},getUserPresence:function(e){if(null==this.userPresences)return null;var t="_"+e.high+"_"+e.low,n=this.userPresences;return null!=Uo[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=yo(this,this.setUserIfLatest),r=n;l.iter(t,function(e){i(r,e)})},clearDomainUsers:function(e){this.users.remove("_"+e.high+"_"+e.low)&&this.storageForUsers.setDirtyFlag()},clearUsersDepartments:function(e){var t="_"+e.high+"_"+e.low,n=this.users,i=null!=Uo[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new Ba(i,i.arrayKeys());r.hasNext();){var a=r.next();a.user.departments=null,this.sendNotification("notify_update_user",a.user)}this.storageForUsers.setDirtyFlag()},removeFriend:function(e,t){var n="_"+e.high+"_"+e.low,i=this.users,r=null!=Uo[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=Uo[a]?r.getReserved(a):r.h[a];null!=o&&(o.type=2)}this.storageForUsers.setDirtyFlag()},removeAcquaintance:function(e,t){this.removeFriend(e,t)},getUser:function(e,t){if(null==t)return null;var n,i=new ui(0,0);if(t.high==i.high&&t.low==i.low)return null;if(null!=this.me){var r=this.me.id;n=null!=r&&null!=t&&r.high==t.high&&r.low==t.low}else n=!1;if(n)return this.me.toDomainUser(e);var a="_"+e.high+"_"+e.low,o=this.users,s=null!=Uo[a]?o.getReserved(a):o.h[a];if(null!=s){var l="_"+t.high+"_"+t.low,u=null!=Uo[l]?s.getReserved(l):s.h[l];if(null!=u)return u.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!=Uo[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new ui(0,0);if(t.high==i.high&&t.low==i.low)return null;var r=n.me.id;if(null!=r&&null!=t&&r.high==t.high&&r.low==t.low)return n.me.toDomainUser(e);var o="_"+t.high+"_"+t.low,s=null!=Uo[o]?a.getReserved(o):a.h[o];return null!=s?s.user:null});for(var o=[],s=a.arrayKeys(),l=new Ba(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 Ba(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!=Uo[t]?n.getReserved(t):n.h[t]},getValidPairTalk:function(e,t){var n=this;return null==this.me?null:l.find(this.getTalks(),function(i){if(!w.enumEq(i.type,Wn.PairTalk))return!1;var r=i.domainId;return null!=r&&null!=t&&r.high==t.high&&r.low==t.low&&(!!l.exists(i.userIds,function(t){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})&&!!l.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!=Uo[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.storageForUsers.setDirtyFlag(),this.sendNotification("notify_update_user",s))}else{var m={type:2,user:s};null!=Uo[u]?r.setReserved(u,m):r.h[u]=m,this.storageForUsers.setDirtyFlag(),this.sendNotification("notify_update_user",s)}}return this.storageForTalks.setDirtyFlag(),e},getTalks:function(){for(var e=[],t=this.talks.keys();t.hasNext();){var n=t.next(),i=this.talks;e.push(null!=Uo[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){l.iter(e,yo(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=Uo[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}this.questionStore.removeTalkQuestions(e),this.talks.remove("_"+e.high+"_"+e.low),this.storageForTalks.setDirtyFlag()},getTalkStatuses:function(){for(var e=[],t=this.talkStatuses.keys();t.hasNext();){var n=t.next(),i=this.talks;if(null!=Uo[n]?i.existsReserved(n):i.h.hasOwnProperty(n)){var r=this.talkStatuses;e.push(null!=Uo[n]?r.getReserved(n):r.h[n])}}return e},getTalkStatus:function(e){var t="_"+e.high+"_"+e.low,n=this.talkStatuses;return null!=Uo[t]?n.getReserved(t):n.h[t]},setTalkStatus:function(e){var t=e.id,n="_"+t.high+"_"+t.low;if(null!=this.domainUnreadCounts){var i=this.talks,r=null!=Uo[n]?i.getReserved(n):i.h[n];if(null!=r){var a=r.domainId;this.domainUnreadCounts.remove("_"+a.high+"_"+a.low)}}var o=this.talkStatuses;return null!=Uo[n]?o.setReserved(n,e):o.h[n]=e,this.sendNotification("brand_badge_changed"),this.storageForTalkStatuses.setDirtyFlag(),e},removeTalkStatus:function(e){var t="_"+e.high+"_"+e.low;if(null!=this.domainUnreadCounts){var n=this.talks,i=null!=Uo[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}this.talkStatuses.remove(t),this.storageForTalkStatuses.setDirtyFlag()},getDomains:function(){for(var e=[],t=this.domains,n=new Ba(t,t.arrayKeys());n.hasNext();){var i=n.next();e.push(i)}return e},getDomain:function(e){var t="_"+e.high+"_"+e.low,n=this.domains;return null!=Uo[t]?n.getReserved(t):n.h[t]},setDomainIfLatest:function(e){var t,n=e.id,i="_"+n.high+"_"+n.low,r=this.domains,a=null!=Uo[i]?r.getReserved(i):r.h[i];if(null!=a){var o=e.updatedAt,s=a.updatedAt,l=o.high-s.high|0;l=0!=l?l:Na.ucompare(o.low,s.low),t=(o.high<0?s.high<0?l:-1:s.high>=0?l:1)>=0}else t=!0;if(t){var u=this.domains;return null!=Uo[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!=Uo[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 Ha,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=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(y.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(y.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!=Uo[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__:Lr});var Br=function(){};n["albero.proxy.KeywordParser"]=Br,Br.__name__=["albero","proxy","KeywordParser"],Br.parse=function(e){var t=y.htmlEscape(e,!0),n=new o(""(.*?)"","g").map(t,function(e){return Br.encodeSpace(e.matched(1))});return new o("[  ]","g").split(n).filter(B.isNotEmpty).map(Br.decodeSpace).map(Br.createParsedKeyword)},Br.encodeSpace=function(e){return y.replace(y.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},Br.decodeSpace=function(e){return y.replace(y.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},Br.createParsedKeyword=function(e){var t=new o("\\[type:([A-Za-z]+)\\](.*)","g");if(t.match(e)){var n=t.matched(1),i=t.matched(2),r=Yr.getKeywordTypeByMessageTypeString(n);if(r!=Gr.normal)return new Hr(r,i)}return new Hr(Gr.normal,e)};var Hr=function(e,t){this.type=e,this.word=t};n["albero.proxy.ParsedKeyword"]=Hr,Hr.__name__=["albero","proxy","ParsedKeyword"],Hr.prototype={__class__:Hr};var Gr=n["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};Gr.normal=["normal",0],Gr.normal.toString=i,Gr.normal.__enum__=Gr,Gr.selectOneReplyOnly=["selectOneReplyOnly",1],Gr.selectOneReplyOnly.toString=i,Gr.selectOneReplyOnly.__enum__=Gr,Gr.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],Gr.yesOrNoReplyOnly.toString=i,Gr.yesOrNoReplyOnly.__enum__=Gr,Gr.todoDoneOnly=["todoDoneOnly",3],Gr.todoDoneOnly.toString=i,Gr.todoDoneOnly.__enum__=Gr,Gr.__empty_constructs__=[Gr.normal,Gr.selectOneReplyOnly,Gr.yesOrNoReplyOnly,Gr.todoDoneOnly];var Yr=function(){};n["albero.proxy.KeywordTypeHelper"]=Yr,Yr.__name__=["albero","proxy","KeywordTypeHelper"],Yr.getKeywordType=function(e){return null!=e?Yr.getKeywordTypeByMessageTypeString(Wt.typeString(e)):Gr.normal},Yr.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return Gr.selectOneReplyOnly;case"todoDone":return Gr.todoDoneOnly;case"yesOrNoReply":return Gr.yesOrNoReplyOnly}return Gr.normal},Yr.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==jt.selectOneReply;case 2:return e==jt.yesOrNoReply;case 3:return e==jt.todoDone}},Yr.createFilterClassStringFromMessageType=function(e){return Yr.createFilterClassString(Yr.getKeywordType(e))},Yr.createFilterClassString=function(e){return"keyword_type_"+g.string(e)};var zr=function(){this.isCallingUpdateLastUsedAt=!1,Er.call(this,"lastUsedAtUpdater")};n["albero.proxy.LastUsedAtUpdaterProxy"]=zr,zr.__name__=["albero","proxy","LastUsedAtUpdaterProxy"],zr.__super__=Er,zr.prototype=r(Er.prototype,{startPolling:function(e){var t=this;if(null==this.pollingTimer){var n,i=this.getLastUsedExpiredAt();if(null==i)n=0;else{var r=i.high,a=i.low;n=4294967296*r+(a>=0?a:a+4294967296)-(new Date).getTime()}n>0?ka.delay(function(){t.startPolling(e)},0|n):(this.isCallingUpdateLastUsedAt=!0,e(),this.pollingTimer=new ka(6e5),this.pollingTimer.run=function(){t.isCallingUpdateLastUsedAt||(t.isCallingUpdateLastUsedAt=!0,e())})}},stopPolling:function(){null!=this.pollingTimer&&(this.pollingTimer.stop(),this.pollingTimer=null)},getLastUsedExpiredAt:function(){return null!=this.lastUsedExpiredAtCache?this.lastUsedExpiredAtCache:this.settings.getLastUsedExpiredAt()},update:function(){this.lastUsedExpiredAtCache=k.afterAsInt64(6e5),this.settings.setLastUsedExpiredAt(this.lastUsedExpiredAtCache),this.isCallingUpdateLastUsedAt=!1},cancel:function(){this.isCallingUpdateLastUsedAt=!1},__class__:zr});var Kr=function(){Er.call(this,"limitations")};n["albero.proxy.LimitationsProxy"]=Kr,Kr.__name__=["albero","proxy","LimitationsProxy"],Kr.__super__=Er,Kr.prototype=r(Er.prototype,{getMaxTalkers:function(){var e=this,t=P.flatMap(P.flatMap(P.option(this.settings.getSelectedDomainId()),function(t){return P.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__:Kr});var Wr=function(){this.connectionStatus=A.Ok,Er.call(this,"rpc"),this.responseHandlers=new Ua,this.connectionKeeper=new jr(yo(this,this.ping))};n["albero.proxy.MsgPackRpcProxy"]=Wr,Wr.__name__=["albero","proxy","MsgPackRpcProxy"],Wr.__super__=Er,Wr.prototype=r(Er.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=yr.newInstance(xo.endpoint,{onopen:yo(this,this.onOpen),onmessage:yo(this,this.onMessage),onclose:yo(this,this.onClose),onpong:yo(this,this.onPong)}),Wr.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.close();var e=this.ws;return this.ws=null,Wr.pingAt=null,this.lastUsedAtUpdater.stopPolling(),e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=A.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){Wr.pingAt=null;g.string(e)},onMessage:function(e){var t=new no(e,!0).o,n=Za.__cast(t[0],Ao);if(1==n&&4==t.length){var i=Za.__cast(t[1],Ao),r=t[2],a=t[3],o=this.responseHandlers.h[i];if(null==o)return void _r._e("["+s.dateStr(new Date)+"] ","No ResponseHandler prepared. msgId:%s error:%s result:",i,r,a,"");o.method;if(null==r)o.onSuccess(a);else{var l=o.method;_r._e("["+s.dateStr(new Date)+"] ","Receive Error Response. method:",l," error:",r,""),o.onError(r)}this.responseHandlers.remove(i)}else if(0==n&&4==t.length){var u=Za.__cast(t[1],Ao),c=Za.__cast(t[2],String),_=Za.__cast(t[3],Array);if(0==_.length)return void _r._e("["+s.dateStr(new Date)+"] ","empty params.","","","","");if(this.broadcast.handleNotification(c,_[0]),null==this.ws)return void _r._e("["+s.dateStr(new Date)+"] ","websocket was finished.","","","","");this.ws.send(new io([1,u,null,!0]).o.getBytes())}},onClose:function(e,t,n){_r._i("["+s.dateStr(new Date)+"] ","onClose. code:"+e+", reason:"+t+", wasClean:"+(null==n?"null":""+n),"","","",""),1001==e&&n||(this.connectionStatus=1e3!=e&&1005!=e||"concurrent access"!=t?1e3!=e&&1005!=e||"forcibly closed"!=t?A.Error:A.ForcibliyClosedError:A.ConcurrentAccessError,this.connectionStatus==A.ForcibliyClosedError?this.sendNotification("SignOut"):this.sendNotification("Url",Fe.FORWARD(H.error))),this.finishWebSocket(),this.connectionKeeper.setConnected(!1)},restart:function(e){null==e&&(e=500);for(var t=this,n=this.finishWebSocket(),i=this.responseHandlers.keys();i.hasNext();){var r=i.next();this.responseHandlers.remove(r)}var a=null;a=function(){null==n||n.isClosed()?t.initWebSocket():ka.delay(a,100)},ka.delay(a,e)},call:function(e,t,n,i){if(null!=this.ws){null==t&&(t=[]),null==n&&(n=function(e){}),null==i&&(i=yo(this,this.onServerError));var r=Wr.lastMsgId++,a=this.responseHandlers,o=new Vr(e,n,i);a.h[r]=o;var l=new io([0,r,e,t]).o.getBytes();this.ws.send(l)}else{var u=this.data;_r._e("["+s.dateStr(new Date)+"] ","disconnected. data:",u,"","","")}},ping:function(){switch(this.connectionStatus[1]){case 2:case 3:return}if(null==this.ws||this.ws.isClosed()){this.restart();Wr.pingAt,g.string(null==this.ws||this.ws.isClosed())}else{Wr.pingAt;this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),Wr.pingAt=(new Date).getTime())}},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__:Wr});var jr=function(e){this.connected=!1,this.ping=e};n["albero.proxy._MsgPackRpcProxy.ConnectionKeeper"]=jr,jr.__name__=["albero","proxy","_MsgPackRpcProxy","ConnectionKeeper"],jr.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 ka(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=ka.delay(r,n)}})(3e3)()}},deleteTimer:function(){null!=this.timer&&(this.timer.stop(),this.timer=null)},__class__:jr};var Vr=function(e,t,n){this.method=e,this.onSuccess=t,this.onError=n};n["albero.proxy._MsgPackRpcProxy.ResponseHandler"]=Vr,Vr.__name__=["albero","proxy","_MsgPackRpcProxy","ResponseHandler"],Vr.prototype={__class__:Vr};var qr=function(e){this.code=e.code,this.message=e.message,this.detail=e.detail};n["albero.proxy.Error"]=qr,qr.__name__=["albero","proxy","Error"],qr.prototype={__class__:qr};var Qr=function(){};n["albero.proxy.ErrorConverter"]=Qr,Qr.__name__=["albero","proxy","ErrorConverter"],Qr.toLocalError=function(e,t){return{code:t.code,message:t.message,detail:t.detail,localErrorType:e}};var Jr=function(){Er.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new Ha,this.updateReadAnnouncementStatusesTimers=new Ha};n["albero.proxy.ReadStatusUpdaterProxy"]=Jr,Jr.__name__=["albero","proxy","ReadStatusUpdaterProxy"],Jr.__super__=Er,Jr.prototype=r(Er.prototype,{updateReadStatuses:function(e,t){var n=this,i=this.dataStore.getTalkStatus(e);if(null!=i&&i.updateByReadingMessages(t,this.dataStore.me.id)){this.dataStore.setTalkStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadStatusesTimers,o=null!=Uo[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadMessageId,l=ka.delay(function(){n.updateReadStatusesTimers.remove(r),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,s)},1e3),u=this.updateReadStatusesTimers;null!=Uo[r]?u.setReserved(r,l):u.h[r]=l}},updateAnnouncementReadStatus:function(e,t){var n=this,i=this.dataStore.getAnnouncementStatus(e);if(null!=i&&i.updateByReadingAnnouncements(t)){this.dataStore.setAnnouncementStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadAnnouncementStatusesTimers,o=null!=Uo[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadAnnouncementId;o=ka.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(r),n.api.updateAnnouncementReadStatus(e,s)},1e3);var l=this.updateReadAnnouncementStatusesTimers;null!=Uo[r]?l.setReserved(r,o):l.h[r]=o}},__class__:Jr});var Xr=function(){Er.call(this,"routing")};n["albero.proxy.RoutingProxy"]=Xr,Xr.__name__=["albero","proxy","RoutingProxy"],Xr.__super__=Er,Xr.prototype=r(Er.prototype,{onRegister:function(){},init:function(){null==this.router&&(this.router=new Zr(this,this.settings,this.dataStore),this.sendNotification("first_routing_will_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.stop()},__class__:Xr});var Zr=function(e,t,n){this.proxy=e,this.settings=t,this.dataStore=n,this.urlConverterDelegate=new $r(t,n)};n["albero.proxy._RoutingProxy.LocalRouter"]=Zr,Zr.__name__=["albero","proxy","_RoutingProxy","LocalRouter"],Zr.prototype={notify:function(e){var t=this.getDomainId(e);this.settings.setSelectedDomainId(t),this.proxy.sendNotification("current_page_changed",e)},forward:function(e){0!=e[1]&&this.notify(e)},redirect:function(e,t){},redirectWithHash:function(){},back:function(){this.notify(this.prev)},stop:function(){},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 7:return e[2];case 11: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__:Zr};var $r=function(e,t){this.settings=e,this.dataStore=t};n["albero.proxy.UrlConverterDelegate"]=$r,$r.__name__=["albero","proxy","UrlConverterDelegate"],$r.__interfaces__=[K],$r.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return P.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e;switch(P.flatMap(this.getLastSelectedDomainId(),yo(this,this.getDomain))[1]){case 0:e=P.flatMap(this.getLastSelectedDomainId(),yo(this,this.getDomain));break;case 1:e=this.getOldestDomain()}return P.map(e,function(e){return e.id})},getDomain:function(e){return P.option(this.dataStore.getDomain(e))},getOldestDomain:function(){return new Nt(this.dataStore.getDomains()).getOldestDomain()},__class__:$r};var ea=function(){Er.call(this,"searchService")};n["albero.proxy.SearchServiceProxy"]=ea,ea.__name__=["albero","proxy","SearchServiceProxy"],ea.__super__=Er,ea.prototype=r(Er.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 In(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 Ha),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new Ha);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(function(){(n+=1)==t.length&&i()}):i();var r=0,a=function(){2==(r+=1)&&e.api.getTalks(i)};e.api.getFriends(a),e.api.getAcquaintances(a)}),e.api.getAccountControlRequests(function(){e.api.getDomainInvites(i)}),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=x.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:Na.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;t0&&"_"==e.charAt(0)?F.makeFromIdStr(e):F.parse(e)},ya.stringifyInt64=function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:Aa.toString(e)},ya.prototype={from:function(e){return ya._from(e)},__class__:ya};var Sa=function(e){this.value=e};n["albero_cli.value.ID"]=Sa,Sa.__name__=["albero_cli","value","ID"],Sa.prototype={toString:function(){return Aa.toString(this.value)},toDaabID:function(){var e=this.value;return"_"+e.high+"_"+e.low},toInt64:function(){return this.value},eq:function(e){if(this==e)return!0;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},__class__:Sa};var wa=function(){};n["albero_cli.value.note.DeleteNoteResult"]=wa,wa.__name__=["albero_cli","value","note","DeleteNoteResult"],wa.of=function(e){return new wa},wa.prototype={__class__:wa};var Ta=function(e){this.note=e};n["albero_cli.value.note.GetNoteResult"]=Ta,Ta.__name__=["albero_cli","value","note","GetNoteResult"],Ta.of=function(e){return new Ta(ha.of(e.note))},Ta.prototype={__class__:Ta};var Ia=function(e){this.note=e};n["albero_cli.value.note.UpdateNoteResult"]=Ia,Ia.__name__=["albero_cli","value","note","UpdateNoteResult"],Ia.of=function(e){return new Ia(ha.of(e.note))},Ia.prototype={__class__:Ia};var Ea=function(){};n["haxe.IMap"]=Ea,Ea.__name__=["haxe","IMap"],Ea.prototype={__class__:Ea};var Na={};n["haxe._Int32.Int32_Impl_"]=Na,Na.__name__=["haxe","_Int32","Int32_Impl_"],Na.ucompare=function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0};var Aa={};n["haxe._Int64.Int64_Impl_"]=Aa,Aa.__name__=["haxe","_Int64","Int64_Impl_"],Aa.toString=function(e){var t=e,n=new ui(0,0);if(t.high==n.high&&t.low==n.low)return"0";var i="",r=!1;t.high<0&&(r=!0);for(var a=new ui(0,10);;){var o=new ui(0,0);if(t.high==o.high&&t.low==o.low)break;var s=Aa.divMod(t,a);if(s.modulus.high<0){var l=s.modulus,u=~l.high,c=-l.low;if(0==c){u++;u|=0}i=new ui(u,c).low+i;var _=s.quotient,h=~_.high,d=-_.low;if(0==d){h++;h|=0}t=new ui(h,d)}else i=s.modulus.low+i,t=s.quotient}return r&&(i="-"+i),i},Aa.divMod=function(e,t){if(0==t.high)switch(t.low){case 0:throw new Xa("divide by zero");case 1:return{quotient:new ui(e.high,e.low),modulus:new ui(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 ui(r,a)}else{n=new ui(e.high,e.low)}if(t.high<0){var o=~t.high,s=-t.low;if(0==s){o++;o|=0}t=new ui(o,s)}else t=t;for(var l=new ui(0,0),u=new ui(0,1);!(t.high<0);){var c=Na.ucompare(t.high,n.high),_=0!=c?c:Na.ucompare(t.low,n.low),h=1;if(0==(h&=63))t=new ui(t.high,t.low);else if(h<32){t=new ui(t.high<>>32-h,t.low<>>32-d,u.low<=0)break}for(;;){var f=new ui(0,0);if(u.high==f.high&&u.low==f.low)break;var m=Na.ucompare(n.high,t.high);if((0!=m?m:Na.ucompare(n.low,t.low))>=0){l=new ui(l.high|u.high,l.low|u.low);var p=n.high-t.high|0,g=n.low-t.low|0;if(Na.ucompare(n.low,t.low)<0){p--;p|=0}n=new ui(p,g)}var v=1;if(0==(v&=63))u=new ui(u.high,u.low);else if(v<32){u=new ui(u.high>>>v,u.high<<32-v|u.low>>>v)}else{u=new ui(0,u.high>>>v-32)}var y=1;if(0==(y&=63))t=new ui(t.high,t.low);else if(y<32){t=new ui(t.high>>>y,t.high<<32-y|t.low>>>y)}else{t=new ui(0,t.high>>>y-32)}}if(i){var S=~l.high,w=-l.low;if(0==w){S++;S|=0}l=new ui(S,w)}if(e.high<0){var T=~n.high,I=-n.low;if(0==I){T++;T|=0}n=new ui(T,I)}return{quotient:l,modulus:n}};var ba=function(){};n["haxe.Int64Helper"]=ba,ba.__name__=["haxe","Int64Helper"],ba.parseString=function(e){var t=new ui(0,10),n=new ui(0,0),i=new ui(0,1),r=!1,a=y.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,l=0,u=o;l9)throw new Xa("NumberFormatError");var h=new ui(_>>31,_);if(r){var d=65535&i.low,f=i.low>>>16,m=65535&h.low,p=h.low>>>16,g=Na._mul(d,m),v=Na._mul(f,m),S=Na._mul(d,p),w=g,T=(Na._mul(f,p)+(S>>>16)|0)+(v>>>16)|0;if(w=w+(S<<=16)|0,Na.ucompare(w,S)<0){T++;T|=0}if(w=w+(v<<=16)|0,Na.ucompare(w,v)<0){T++;T|=0}T=T+(Na._mul(i.low,h.high)+Na._mul(i.high,h.low)|0)|0;var I=new ui(T,w),E=n.high-I.high|0,N=n.low-I.low|0;if(Na.ucompare(n.low,I.low)<0){E--;E|=0}if(!((n=new ui(E,N)).high<0))throw new Xa("NumberFormatError: Underflow")}else{var A=65535&i.low,b=i.low>>>16,D=65535&h.low,k=h.low>>>16,C=Na._mul(A,D),O=Na._mul(b,D),M=Na._mul(A,k),F=C,R=(Na._mul(b,k)+(M>>>16)|0)+(O>>>16)|0;if(F=F+(M<<=16)|0,Na.ucompare(F,M)<0){R++;R|=0}if(F=F+(O<<=16)|0,Na.ucompare(F,O)<0){R++;R|=0}R=R+(Na._mul(i.low,h.high)+Na._mul(i.high,h.low)|0)|0;var x=new ui(R,F),U=n.high+x.high|0,P=n.low+x.low|0;if(Na.ucompare(P,n.low)<0){U++;U|=0}if((n=new ui(U,P)).high<0)throw new Xa("NumberFormatError: Overflow")}var L=65535&i.low,B=i.low>>>16,H=65535&t.low,G=t.low>>>16,Y=Na._mul(L,H),z=Na._mul(B,H),K=Na._mul(L,G),W=Y,j=(Na._mul(B,G)+(K>>>16)|0)+(z>>>16)|0;if(W=W+(K<<=16)|0,Na.ucompare(W,K)<0){j++;j|=0}if(W=W+(z<<=16)|0,Na.ucompare(W,z)<0){j++;j|=0}j=j+(Na._mul(i.low,t.high)+Na._mul(i.high,t.low)|0)|0,i=new ui(j,W)}return n};var Da=function(){this.buf=new v,this.cache=[],this.useCache=Da.USE_CACHE,this.useEnumIndex=Da.USE_ENUM_INDEX,this.shash=new Ha,this.scount=0};n["haxe.Serializer"]=Da,Da.__name__=["haxe","Serializer"],Da.run=function(e){var t=new Da;return t.serialize(e),t.toString()},Da.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Uo[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!=Uo[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=g.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[_]))}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+=g.string(h.getTime());break;case u:this.buf.b+="l";for(var d=e.h;null!=d;){var f=d.item;d=d.next;var m=f;this.serialize(m)}this.buf.b+="h";break;case Ua:this.buf.b+="q";for(var v=e,y=v.keys();y.hasNext();){var S=y.next();this.buf.b+=":",this.buf.b+=null==S?"null":""+S,this.serialize(v.h[S])}this.buf.b+="h";break;case Pa:this.buf.b+="M";for(var T=e,I=T.keys();I.hasNext();){var E=I.next(),N=p.field(E,"__id__");p.deleteField(E,"__id__"),this.serialize(E),E.__id__=N,this.serialize(T.h[E.__id__])}this.buf.b+="h";break;case Ha:this.buf.b+="b";for(var A=e,b=A.keys();b.hasNext();){var D=b.next();this.serializeString(D),this.serialize(null!=Uo[D]?A.getReserved(D):A.h[D])}this.buf.b+="h";break;case Ga:var k=e;this.buf.b+="s",this.buf.b+=g.string(Math.ceil(8*k.length/6)),this.buf.b+=":";var C=0,O=k.length-2,M=Da.BASE64_CODES;if(null==M){var F=Da.BASE64.length;M=new Array(F);for(var R=0,x=Da.BASE64.length;R>2]),this.buf.b+=String.fromCharCode(M[63&(P<<4|L>>4)]),this.buf.b+=String.fromCharCode(M[63&(L<<2|B>>6)]),this.buf.b+=String.fromCharCode(M[63&B])}if(C==O){var H=k.b[C++],G=k.b[C++];this.buf.b+=String.fromCharCode(M[H>>2]),this.buf.b+=String.fromCharCode(M[63&(H<<4|G>>4)]),this.buf.b+=String.fromCharCode(M[G<<2&63])}else if(C==O+1){var Y=k.b[C++];this.buf.b+=String.fromCharCode(M[Y>>2]),this.buf.b+=String.fromCharCode(M[Y<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(w.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(w.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var z=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=g.string(this.useEnumIndex?"j":"w"),this.serializeString(w.getEnumName(z)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=g.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var K=e.length;this.buf.b+=g.string(K-2);for(var W=2,j=K;W57)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(s.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw new Xa("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Xa("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 Xa("Invalid enum format");var n=this.readDigits();if(0==n)return w.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return w.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 Xa("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new Xa("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new Xa("Class not found "+r);var o=w.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new Xa("Invalid custom data");return o;case 77:var l=new Pa;this.cache.push(l);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var c=this.unserialize();l.set(c,this.unserialize())}return this.pos++,l;case 82:var _=this.readDigits();if(_<0||_>=this.scache.length)throw new Xa("Invalid string reference");return this.scache[_];case 97:this.buf;var h=[];for(this.cache.push(h);;){var d=this.buf.charCodeAt(this.pos);if(104==d){this.pos++;break}if(117==d){this.pos++;var f=this.readDigits();h[h.length+f-1]=null}else h.push(this.unserialize())}return h;case 98:var m=new Ha;this.cache.push(m);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=Uo[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 Xa("Class not found "+v);var S=w.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 T=this.unserialize(),I=this.resolver.resolveEnum(T);if(null==I)throw new Xa("Enum not found "+T);this.pos++;var E=this.readDigits(),N=I.__constructs__.slice()[E];if(null==N)throw new Xa("Unknown enum index "+T+"@"+E);var A=this.unserializeEnum(I,N);return this.cache.push(A),A;case 107:return NaN;case 108:var b=new u;this.cache.push(b);for(this.buf;104!=this.buf.charCodeAt(this.pos);)b.add(this.unserialize());return this.pos++,b;case 109:return-1/0;case 110:return null;case 111:var D={};return this.cache.push(D),this.unserializeObject(D),D;case 112:return 1/0;case 113:var k=new Ua;this.cache.push(k);this.buf;for(var C=this.buf.charCodeAt(this.pos++);58==C;){var O=this.readDigits(),M=this.unserialize();k.h[O]=M,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new Xa("Invalid IntMap format");return k;case 114:var F=this.readDigits();if(F<0||F>=this.cache.length)throw new Xa("Invalid reference");return this.cache[F];case 115:var R=this.readDigits(),x=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0))),G=0;P>4);var K=U[x.charCodeAt(P++)];H.b[G++]=255&(z<<4|K>>2);var W=U[x.charCodeAt(P++)];H.b[G++]=255&(K<<6|W)}if(L>=2){var j=U[x.charCodeAt(P++)],V=U[x.charCodeAt(P++)];if(H.b[G++]=255&(j<<2|V>>4),3==L){var q=U[x.charCodeAt(P++)];H.b[G++]=255&(V<<4|q>>2)}}return this.pos+=R,this.cache.push(H),H;case 116:return!0;case 118:var Q;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))Q=s.strDate(s.substr(this.buf,this.pos,19)),this.pos+=19;else{var J=this.readFloat();Q=new Date(J)}return this.cache.push(Q),Q;case 119:var X=this.unserialize(),Z=this.resolver.resolveEnum(X);if(null==Z)throw new Xa("Enum not found "+X);var $=this.unserializeEnum(Z,this.unserialize());return this.cache.push($),$;case 120:throw Xa.wrap(this.unserialize());case 121:var ee=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 Fa(e.left,e.key,e.value,new Fa(e.right,t,n,i)):new Fa(new Fa(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Fa(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 Fa(new Fa(e,t,n,i.left),i.key,i.value,i.right):new Fa(new Fa(e,t,n,i.left.left),i.left.key,i.left.value,new Fa(i.left.right,i.key,i.value,i.right))}return new Fa(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return p.compare(e,t)},__class__:Ma};var Fa=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};n["haxe.ds.TreeNode"]=Fa,Fa.__name__=["haxe","ds","TreeNode"],Fa.prototype={__class__:Fa};var Ra=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Ra.Left=function(e){var t=["Left",0,e];return t.__enum__=Ra,t.toString=i,t},Ra.Right=function(e){var t=["Right",1,e];return t.__enum__=Ra,t.toString=i,t},Ra.__empty_constructs__=[];var xa=function(){Ma.call(this)};n["haxe.ds.EnumValueMap"]=xa,xa.__name__=["haxe","ds","EnumValueMap"],xa.__interfaces__=[Ea],xa.__super__=Ma,xa.prototype=r(Ma.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 Ga(new Lo(t).buffer)},Ga.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ga(e)},Ga.fastGet=function(e,t){return e.bytes[t]},Ga.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Xa(qa.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__:Ga};var Ya=function(){this.b=[]};n["haxe.io.BytesBuffer"]=Ya,Ya.__name__=["haxe","io","BytesBuffer"],Ya.prototype={getBytes:function(){var e=new Ga(new Lo(this.b).buffer);return this.b=null,e},__class__:Ya};var za=function(){};n["haxe.io.Input"]=za,za.__name__=["haxe","io","Input"],za.prototype={readByte:function(){throw new Xa("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Xa(qa.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof Xa&&(e=e.val),!Za.__instanceof(e,Va))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new Ga(new Po(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new Xa(qa.Blocked);n+=i,e-=i}return t},readFloat:function(){return Qa.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?Qa.i64ToDouble(t,e):Qa.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__:za};var Ka=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 Xa(qa.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};n["haxe.io.BytesInput"]=Ka,Ka.__name__=["haxe","io","BytesInput"],Ka.__super__=za,Ka.prototype=r(za.prototype,{readByte:function(){if(0==this.len)throw new Xa(new Va);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Xa(qa.OutsideBounds);if(0==this.len&&n>0)throw new Xa(new Va);this.lene.length)throw new Xa(qa.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 Xa(qa.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(Qa.floatToI32(e))},writeDouble:function(e){var t=Qa.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 Xa(qa.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new Xa(qa.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new Xa(qa.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__:Wa};var ja=function(){this.b=new Ya};n["haxe.io.BytesOutput"]=ja,ja.__name__=["haxe","io","BytesOutput"],ja.__super__=Wa,ja.prototype=r(Wa.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 Xa(qa.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)},Qa.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},Qa.i64ToDouble=function(e,t){var n=(t>>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)},Qa.doubleToI64=function(e){var t=Qa.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 Ja=function(){};n["haxe.rtti.Meta"]=Ja,Ja.__name__=["haxe","rtti","Meta"],Ja.getMeta=function(e){return e.__meta__},Ja.getFields=function(e){var t=Ja.getMeta(e);return null==t||null==t.fields?{}:t.fields};var Xa=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,Xa)};n["js._Boot.HaxeError"]=Xa,Xa.__name__=["js","_Boot","HaxeError"],Xa.wrap=function(e){return e instanceof Error?e:new Xa(e)},Xa.__super__=Error,Xa.prototype=r(Error.prototype,{__class__:Xa});var Za=function(){};n["js.Boot"]=Za,Za.__name__=["js","Boot"],Za.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=Za.__nativeClassName(e);return null!=n?Za.__resolveNativeClass(n):null},Za.__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?",":"")+Za.__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+" : "+Za.__string_rec(e[f],t));return m+="\n"+(t=t.substring(1))+"}";case"string":return e;default:return String(e)}},Za.__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 Xa("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Xa("set() outside of range");for(var s=0,l=o.length;s223)return-256|n}}catch(e){if(e instanceof Xa&&(e=e.val),!Za.__instanceof(e,Va))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=p.fields(e),o=l.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 o=new mo(yo(e,e.handleNotification),e),s=0,l=a.length;s0&&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},So.prototype.on=So.prototype.addListener,So.prototype.once=function(e,t){if(!wo(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},So.prototype.removeListener=function(e,t){var n,i,r,a;if(!wo(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||wo(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(To(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},So.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(wo(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},So.prototype.listeners=function(e){return this._events&&this._events[e]?wo(this._events[e])?[this._events[e]]:this._events[e].slice():[]},So.listenerCount=function(e,t){return e._events&&e._events[t]?wo(e._events[t])?1:e._events[t].length:0};Co.exports;n.Math=Math;var Eo=Eo||{};Eo.exports=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,r={};((t,n)=>{for(var i in n)e(t,i,{get:n[i],enumerable:!0})})(r,{codePointCount:()=>o,extractMentionParts:()=>h,findMentionSuggestionHint:()=>f,hasMentionPartForMeOrAll:()=>l,invalidateManualMentionMarkup:()=>c,parseMessageMention:()=>_,removeMentionMarkup:()=>u});var a=e=>Array.from(e),o=e=>a(e).length,s=/{@:(ALL|\d+),(\d+)}@/g,l=e=>h(e).some(({userIdNumStr:e})=>null===e||"ALL"===e),u=e=>_(e).map(t=>"mention"===t.type?t.mentionText:"normal"===t.type?e.substring(t.start,t.end):"").join(""),c=e=>e.replace(s,e=>e.substring(0,e.length-1)+" "),_=e=>{let t=0;const n=h(e).flatMap(e=>{const n=[];return t!==e.start&&n.push({type:"normal",start:t,end:e.start}),n.push(e),t=e.end,n});return e.length!==t&&n.push({type:"normal",start:t,end:e.length}),n},h=e=>{let t=0;return Array.from(e.matchAll(s)).flatMap(n=>{var i;const r=null!=(i=n.index)?i:0;if(r{const t=e.match(d);return null===t?null:{prev:t[1],atMarks:t[2],keyword:t[3]}};return(r=>((r,a,o,s)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of n(a))i.call(r,l)||l===o||e(r,l,{get:()=>a[l],enumerable:!(s=t(a,l))||s.enumerable});return r})(e({},"__esModule",{value:!0}),r))(r)})();var No=Eo.exports;String.prototype.__class__=n.String=String,String.__name__=["String"],n.Array=Array,Array.__name__=["Array"],Date.prototype.__class__=n.Date=Date,Date.__name__=["Date"];var Ao=n.Int={__name__:["Int"]},bo=n.Dynamic={__name__:["Dynamic"]},Do=n.Float=Number;Do.__name__=["Float"];var ko=n.Bool=Boolean;ko.__ename__=["Bool"];var Co,Oo=n.Class={__name__:["Class"]},Mo={};(Co={}).exports=null,Co.exports={upload:function(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;for(var s in l.open("POST",t,!0),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 Fo=Co.exports,Ro={websocketsbinary:!0,audio:!1},xo={},Uo={},Po=t.ArrayBuffer||eo;null==Po.prototype.slice&&(Po.prototype.slice=eo.sliceImpl);var Lo=t.Uint8Array||to._new;E.APP_STATE_CHANGED="app_state_changed",E.ACCESS_TOKEN_CHANGED="access_token_changed",E.CURRENT_USER_CHANGED="current_user_changed",E.CONFIGURATION_CHANGED="configuration_changed",E.DOMAIN_SELECTION_CHANGED="domain_selection_changed",E.TALK_SELECTION_CHANGED="talk_selection_changed",E.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",E.USER_SELECTION_NEEDED="user_selection_needed",E.USER_SELECTION_CHANGED="user_selection_changed",E.FRIEND_SELECTION_NEEDED="friend_selection_needed",E.COMMON_STAMP_SET_LOADED="common_stamp_set_loaded",E.STAMP_SELECTION_STARTED="stamp_selection_started",E.STAMP_SELECTION_ENDED="stamp_selection_ended",E.STAMP_SELECTION_CHANGED="stamp_selection_changed",E.ACTION_SELECTION_CHANGED="action_selection_changed",E.CURRENT_PAGE_CHANGED="current_page_changed",E.CURRENT_PAGE_REASSIGNED="current_page_reassgined",E.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",E.NOTE_FILEINFO_SELECTION_CHANGED="note_fileinfo_selection_changed",E.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",E.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",E.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",E.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",E.CLOSE_FILEPREVIEW_MODAL="close_filepreview_modal",E.ERROR_OCCURRED="error_occurred",E.UNREAD_COUNT_CHANGED="brand_badge_changed",E.SEND_FORM_TOP_CHANGED="send_form_top_changed",E.SOLUTIONS_LOADED="solutions_loaded",E.RIGHT_PANE_OPENED="right_pane_opened",E.RIGHT_PANE_CLOSED="right_pane_closed",E.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",E.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",E.PHOTO_EDITOR_SAVED="photo_editor_saved",E.ICON_EDITOR_SAVED="icon_editor_saved",E.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",E.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",E.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",E.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",E.PRESENCES_UPDATED="presences_updated",E.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",E.START_NOTE_EDITING="start_note_editing",E.OPEN_EXISTING_PAIR_TALK_COMPLETED="open_existing_pair_talk_completed",E.FIRST_ROUTING_WILL_START="first_routing_will_start",E.SIGNED_OUT="signed_out",E.ROUTUNG_TALK_FALLBACK="routing_talk_fallback",E.ROUTUNG_DOMAIN_FALLBACK="routing_domain_fallback",E.TALKS_SORT_MODE_CHANGED="talks_sort_mode_changed",E.DATA_RECOVERING="data_recovering",E.DATA_RECOVERED="data_recovered",E.NOTIFY_UPDATE_USER="notify_update_user",E.NOTIFY_ADD_FRIEND="notify_add_friend",E.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",E.NOTIFY_ADD_ACQUAINTANCES="notify_add_acquaintances",E.NOTIFY_DELETE_FRIEND="notify_delete_friend",E.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",E.NOTIFY_DELETE_ACQUAINTANCES="notify_delete_acquaintances",E.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",E.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",E.GET_USERS_RESPONSED="get_users_responsed",E.GET_PROFILE_RESPONSED="get_profile_responsed",E.GET_PROFILE_ERRORED="get_profile_errored",E.UPDATE_USER_RESPONSED="update_user_responsed",E.UPDATE_USER_ERRORED="update_user_errored",E.UPDATE_PROFILE_RESPONSED="update_profile_responsed",E.UPDATE_PROFILE_ERRORED="update_profile_errored",E.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",E.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",E.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",E.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",E.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",E.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",E.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",E.GET_ME_RESPONSED="get_me_responsed",E.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",E.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",E.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",E.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",E.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",E.NOTIFY_JOIN_DOMAIN="notify_join_domain",E.NOTIFY_UPDATE_DOMAIN="notify_update_domain",E.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",E.NOTIFY_ADD_DOMAIN_MEMBERS="notify_add_domain_members",E.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",E.CREATE_PAIR_TALK_COMPLETE="create_pair_talk_complete",E.CREATE_PAIR_TALK_FAIL="create_pair_talk_fail",E.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",E.CREATE_GROUP_TALK_COMPLETE="create_group_talk_complete",E.CREATE_GROUP_TALK_FAIL="create_group_talk_fail",E.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",E.UPDATE_GROUP_TALK_COMPLETE="update_group_talk_complete",E.UPDATE_GROUP_TALK_FAIL="update_group_talk_fail",E.NOTIFY_ADD_TALKERS="notify_add_talkers",E.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",E.NOTIFY_DELETE_TALKER="notify_delete_talker",E.NOTIFY_DELETE_TALK="notify_delete_talk",E.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",E.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",E.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",E.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",E.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",E.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",E.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",E.ADD_TALKERS_SUCCEEDED="add_talkers_succeeded",E.ADD_TALKERS_FAILED="add_talkers_failed",E.NOTIFY_CREATE_MESSAGE="notify_create_message",E.NOTIFY_DELETE_MESSAGE="notify_delete_message",E.NOTIFY_GET_MESSAGES="notify_get_messages",E.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",E.CREATE_MESSAGE_START="create_message_start",E.CREATE_MESSAGE_COMPLETE="create_message_complete",E.CREATE_MESSAGE_FAIL="create_message_fail",E.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",E.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",E.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",E.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",E.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",E.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",E.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",E.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",E.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",E.CREATE_ANNOUNCEMENT_START="create_announcement_start",E.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",E.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",E.NOTIFY_UPDATE_QUESTION="notify_update_question",E.NOTIFY_GET_QUESTIONS="get_questions_responsed",E.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",E.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",E.GET_FILE_RESPONSED="get_file_responsed",E.GET_FILE_PREVIEW="get_file_preview",E.CREATE_FILE_PREVIEW="create_file_preview",E.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",E.GET_NOTE_LOADED="get_note_loaded",E.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",E.CREATE_NOTE_COMPLETED="create_note_completed",E.CREATE_NOTE_FAILED="create_note_failed",E.UPDATE_NOTE_LOCAL_EDIT="update_note_local_edit",E.CLEAR_NOTE_LOCAL_EDIT="clear_note_local_edit",E.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",E.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",E.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",E.UPDATE_NOTE_SETTING_FAILED_BY_EDITING="update_note_setting_failed_by_editing",E.UPDATE_NOTE_COMPLETED="update_note_completed",E.DELETE_NOTE_COMPLETED="delete_note_completed",E.NOTIFY_CREATE_NOTE="notify_create_note",E.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",E.NOTIFY_DELETE_NOTE="notify_delete_note",E.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",E.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",E.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",E.NOTIFY_LOCK_NOTE="notify_lock_note",E.NOTIFY_UNLOCK_NOTE="notify_unlock_note",E.NOTIFY_SEARCH_MESSAGES="notify_search_messages",E.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",E.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",E.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",E.NOTIFY_SEARCH_PREPARE="notify_search_prepare",E.NOTIFY_SEARCH_CLEAR="notify_search_clear",E.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",E.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",E.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",E.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",E.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",E.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",E.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",E.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",E.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",E.JOIN_CONFERENCE_CANCELED="join_conference_canceled",E.GET_CONFERENCE_PARTICIPANTS_RESPONSED="get_conference_participants_responsed",E.NOTIFY_OPEN_CONFERENCE="notify_open_conference",E.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",E.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",E.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",E.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",E.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",E.NOTIFY_UPDATE_DOMAIN_STAMP_SETTING="notify_update_domain_stampsetting",E.NOTIFY_UPDATE_STAMPSET="notify_update_stampset",E.NOTIFY_DELETE_STAMPSET="notify_delete_stampset",E.NOTIFY_UPDATE_DOMAIN_BUILTIN_STAMP_SETTING="notify_update_domain_builtin_stampsetting",E.NOTIFY_FLOW_NOTIFICATION_BADGE="notify_flow_notification_badge",E.GET_FLOW_NOTIFICATION_BADGES_COMPLETED="get_flow_notification_badges_completed",E.GET_FLOW_NOTIFICATION_BADGES_FAILED="get_flow_notification_badges_failed",E.GET_DIRECT_APPS_COMPLETED="get_direct_apps_completed",E.GET_DIRECT_APPS_FAILED="get_direct_apps_failed",E.START_NOTIFICATION_FAILED="start_notification_failed",z.ANNOUNCEMENTS_KEY="-1",J.__meta__={fields:{api:{inject:null}}},J.NAME="AccountControlRequest",Z.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Z.NAME="Conference",ee.__meta__={fields:{api:{inject:null}}},ee.NAME="Device",ne.__meta__={fields:{api:{inject:null}}},ne.NAME="Domain",re.__meta__={fields:{api:{inject:null}}},re.NAME="File",oe.__meta__={fields:{api:{inject:null}}},oe.NAME="FilePreview",se.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},se.NAME="LoadStampset",ce.__meta__={fields:{api:{inject:null}}},ce.NAME="ManageFriends",he.__meta__={fields:{api:{inject:null}}},he.NAME="Message",fe.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},fe.NAME="Note",pe.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},pe.NAME="Read",ve.__meta__={fields:{api:{inject:null}}},ve.NAME="ReloadData",Se.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},Se.NAME="Search",Te.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},Te.NAME="SelectTalk",Ee.__meta__={fields:{api:{inject:null}}},Ee.NAME="Send",Ne.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},Ne.NAME="SignIn",Ae.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},Ae.NAME="SignOut",be.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},be.NAME="Talk",ke.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},ke.NAME="UpdateProfile",Ce.__meta__={fields:{api:{inject:null}}},Ce.NAME="UpdateUser",Oe.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Oe.NAME="UpdateUserPresences",Oe.MAX_USERS_PER_API=100,Me.__meta__={fields:{routing:{inject:null}}},Me.NAME="Url",je.TalkAutoScrollDelay=1,je.TalkAutoScrollImmediately=2,je.TalkAutoScrollNone=3,je.TalksSortModeNewMessagesFirst="new_messages_first",je.TalksSortModeUnreadMessagesFirst="unread_messages_first",je.OLD_KEY_RIGHT_PANEL_OPENED="right_panel_opened",je.OLD_KEY_RIGHT_PANEL_WIDTH="right_panel_width",je.NAME="browser_settings",qe.MAX_SIZE=72,Je.INCOMING_TIME=6e4,Ze.DEFAULT_PRESENCE_EXPIRATION=3e5,et.DEFAULT_TTL=3600,et.DEFAULT_MAX_PARTICIPANTS=8,Ct.stagedFileInfosMaxId=0,Lt.TIMESTAMP_SHIFT=22,Wt.MAX_READ_USER_IDS_COUNT=16,In.QUERY_DATE_TODAY="t",In.QUERY_DATE_YESTERDAY="-1d",In.QUERY_DATE_THREE_DAYS_BEFORE="-3d",Ln.HISTORY_TAB_NAME="stamp-history",ci.SIXTY_MINUTES=new ui(0,36e5),ci.FIFTEEN_MINUTES=new ui(0,9e5),zi.PREFIX="note-",zi.nextDummyId=new ui(-1,-1),Vi.CONTINUE_MARGIN_RATE=.1,rr.CHEKBOX_UNCHECKED="- [ ] ",rr.CHEKBOX_CHECKED="- [x] ",or.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sr.TU_REG=new o("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),sr.XTU_REG=new o("ッ","gm"),_r.EMERGENCY=0,_r.ALERT=1,_r.CRITICAL=2,_r.ERROR=3,_r.WARNING=4,_r.NOTICE=5,_r.INFO=6,_r.DEBUG=7,_r.level=6,_r._d=_r._nop,_r._i=null!=console?console.info.bind(console):_r._nop,_r._w=null!=console?console.warn.bind(console):_r._nop,_r._e=null!=console?console.error.bind(console):_r._nop,pr.HIRAGANA_SMALL_A=12353,pr.HIRAGANA_NN=12435,pr.KATAKANA_SMALL_A=12449,Ir.NAME="accessTokenResolver",Er.NAME="Proxy",Nr.__meta__={fields:{settings:{inject:null},api:{inject:null}}},Ar.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null}}},Ar.NAME="broadcast",br.__meta__={fields:{wsApi:{inject:null},apiCaller:{inject:null},apiNote:{inject:null},settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},fileService:{inject:null},searchService:{inject:null},lastUsedAtUpdater:{inject:null}}},br.NAME="api",br.API_VERSION="1.122",br.UPDATE_VERSION="1.122_1",br.ACTIONS_COUNT_PER_API=20,Dr.__meta__={fields:{rpc:{inject:null}}},Dr.NAME="apiCaller",Dr.DELAY_FOR_DB_REPLICATION=500,Dr.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,Dr.API_TRY_COUNT=3,kr.__meta__={fields:{apiCaller:{inject:null},dataStore:{inject:null},settings:{inject:null}}},kr.NAME="apiNote",Cr.NAME="appState",Or.__meta__={fields:{dataStore:{inject:null}}},Or.NAME="dataFactory",Mr.NAME="dataStore",Mr.STORAGE_KEY_FOR_GENERAL="dataStore",Mr.STORAGE_KEY_FOR_TALKS="dataStoreTalks",Mr.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",Mr.STORAGE_KEY_FOR_USERS="dataStoreUsers",Mr.TYPE_FRIEND=0,Mr.TYPE_ACQUAINSTANCE=1,Mr.TYPE_NONE=2,Fr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Fr.NAME="features",Ur.NAME="fileService",Pr.__meta__={fields:{settings:{inject:null}}},Lr.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},Lr.NAME="keywordWatcher",Lr.TALK_KEY_PREFIX="talk_",Lr.ANNOUNCEMENT_KEY_PREFIX="announcement_",Br.TEMP_HALF_SPACE="&SPACE",Br.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",zr.__meta__={fields:{settings:{inject:null}}},zr.NAME="lastUsedAtUpdater",zr.UPDATE_LAST_USED_AT_INTERVAL=6e5,Kr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Kr.NAME="limitations",Wr.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},Wr.NAME="rpc",Wr.lastMsgId=0,jr.PING_INTERVAL_ON_CONNECTED=45e3,Jr.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},Jr.NAME="readStatusUpdater",Xr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Xr.NAME="routing",ea.__meta__={fields:{settings:{inject:null}}},ea.NAME="searchService",ea.LOAD_SIZE=20,ea.DUMMY_VALUE_FOR_SET=1,ta.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},api:{inject:null}}},ta.NAME="session",na.NAME="settings",na.KEY_ACCESS_TOKEN="access_token",na.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",na.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",na.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",na.KEY_INPUT_TEXT="input_text",na.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",na.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",na.KEY_SEARCH_HISTORIES="search_histories",na.KEY_MULTI_VIEW_MODE="multi_view_mode",na.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",na.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",na.KEY_IDFV="idfv",ia.__meta__={fields:{dataStore:{inject:null}}},ia.NAME="talksService",ra.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},ra.NAME="ThumbnailExpansion",aa.__meta__={fields:{dataStore:{inject:null}}},aa.NAME="userPresences",oa.__meta__={fields:{apiCaller:{inject:null}}},oa.NAME="wsApi",ma.NAME="Mediator",pa.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},pa.NAME="commandline",pa.DATA_SAVE_SPAN=5e3,va.INVALID_PARAMETER="INVALID_PARAMETER",va.FORBIDDEN="FORBIDDEN",va.NOT_FOUND="NOT_FOUND",va.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",va.CONFLICT="CONFLICT",va.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",va.UNKNOWN="UNKNOWN",Na._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},Da.USE_CACHE=!1,Da.USE_ENUM_INDEX=!1,Da.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Oa.DEFAULT_RESOLVER=new Ca,Oa.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Pa.count=0,Qa.i64tmp=new ui(0,0),Za.__toStr={}.toString,to.BYTES_PER_ELEMENT=1,io.FLOAT_SINGLE_MIN=1.401298464324817e-45,io.FLOAT_SINGLE_MAX=3.4028234663852886e38,io.FLOAT_DOUBLE_MIN=5e-324,io.FLOAT_DOUBLE_MAX=1.7976931348623157e308,a.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";var n={},i=function(){return Za.__string_rec(this,"")};function r(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 a=e.DirectAPI=function(){this.eventEmitter=new So};n.DirectAPI=a,a.__name__=["DirectAPI"],a.getInstance=function(){return null==a.instance&&(a.instance=new a),a.instance},a.main=function(){},a.prototype={setOptions:function(e){null!=e&&(xo.host=e.host,xo.endpoint=e.endpoint,xo.accessToken=e.access_token,xo.proxyURL=e.proxyURL,xo.account=e.account,xo.talkWithBot=e.talkWithBot,xo.acceptableEventTimeDiff=e.acceptableEventTimeDiff),_r._d("["+s.dateStr(new Date)+"] ","current settings",xo,"","",""),null==xo.accessToken&&_r._e("["+s.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return ya.parseInt64(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),ya.stringifyInt64(e,t)},listen:function(){this.facade=E.getInstance(),this.api=Za.__cast(this.facade.retrieveProxy("api"),br),this.data=Za.__cast(this.facade.retrieveProxy("dataStore"),Mr),this.ID=new ya;var e=Za.__cast(this.facade.retrieveProxy("fileService"),Rr);this.notes=new ua(new ca(this,this.api,e)),this.mention=new h,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__:a};var o=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};n.EReg=o,o.__name__=["EReg"],o.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);){if(!this.matchSub(e,n)){i+=g.string(s.substr(e,n,null));break}var r=this.matchedPos();if(i+=g.string(s.substr(e,n,r.pos-n)),i+=g.string(t(this)),0==r.len?(i+=g.string(s.substr(e,r.pos,1)),n=r.pos+1):n=r.pos+r.len,!this.r.global)break}return!this.r.global&&n>0&&n0?this.interval-(e-this.basetime):this.interval,Math.ceil(t/1e3)},createError:function(e){var t=this.max+" calls every "+Math.floor(this.interval/1e3)+" sec";return ga.createTooManyRequestsError(t,this.calculateRetryAfter(e))},apply:function(e){var t=this;return new Promise(function(n,i){var r=t._now();if(t.max>0&&r-t.basetime>t.interval)t.basetime=r,t.count=1;else{if(!(t.max>0&&t.countt?1:-1},p.isEnumValue=function(e){return null!=e&&null!=e.__enum__},p.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var g=function(){};n.Std=g,g.__name__=["Std"],g.string=function(e){return Za.__string_rec(e,"")},g.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=s.cca(e,1)&&88!=s.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t};var v=function(){this.b=""};n.StringBuf=v,v.__name__=["StringBuf"],v.prototype={toString:function(){return this.b},__class__:v};var y=function(){};n.StringTools=y,y.__name__=["StringTools"],y.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},y.startsWith=function(e,t){return e.length>=t.length&&s.substr(e,0,t.length)==t},y.isSpace=function(e,t){var n=s.cca(e,t);return n>8&&n<14||32==n},y.ltrim=function(e){for(var t=e.length,n=0;n0?s.substr(e,n,t-n):e},y.rtrim=function(e){for(var t=e.length,n=0;n0?s.substr(e,0,t-n):e},y.trim=function(e){return y.ltrim(y.rtrim(e))},y.replace=function(e,t,n){return e.split(t).join(n)},y.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,(e>>>=4)>0;);if(null!=t)for(;n.length=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():k.dateString(r,!1)},k.getDateStringForNotification=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():r.getMonth()+1+"/"+r.getDate()},k.datetimeStringIn11Chars=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296)),a=k.dateString(r,!1);return t.getFullYear()==r.getFullYear()&&(a+=" "+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()),a},k.timeString=function(e){if(null==e)return"";var t=e.high,n=e.low,i=new Date(4294967296*t+(n>=0?n:n+4294967296));return i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes()},k.datetimeString=function(e){if(null==e)return"";var t=parseFloat(Aa.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(){};n["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 P.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(){};n["albero.FileHelper"]=O,O.__name__=["albero","FileHelper"],O.createByteSizeStringWithUnit=function(e){if(null==e)return"0 B";for(var t,n=["","K","M","G","T"];;){var i=new ui(0,1024),r=t=Aa.divMod(e,i).quotient,a=new ui(0,0),o=r.high-a.high|0;if(o=0!=o?o:Na.ucompare(r.low,a.low),!((r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0))break;e=t,n.shift()}return Aa.toString(e)+" "+n.shift()+"B"},O.extractFilenameExceptExtension=function(e){return new o("\\.(?=[^.]+$)","").split(e)[0]};var M=function(){};n["albero.History"]=M,M.__name__=["albero","History"],M.replaceState=function(e,t,n){return null!=window.history&&(window.history.replaceState(e,t,n),!0)};var F=function(){};n["albero.Int64Helper"]=F,F.__name__=["albero","Int64Helper"],F.parse=function(e){if(!new o("^\\d+$","").match(e))return null;for(var t=new ui(0,0),n=new ui(0,10),i=0,r=e.length;i>>16,u=65535&n.low,c=n.low>>>16,_=Na._mul(s,u),h=Na._mul(l,u),d=Na._mul(s,c),f=_,m=(Na._mul(l,c)+(d>>>16)|0)+(h>>>16)|0;if(f=f+(d<<=16)|0,Na.ucompare(f,d)<0){m++;m|=0}if(f=f+(h<<=16)|0,Na.ucompare(f,h)<0){m++;m|=0}m=m+(Na._mul(t.low,n.high)+Na._mul(t.high,n.low)|0)|0;var p=new ui(m,f),v=new ui(0,g.parseInt(e.charAt(a))),y=p.high+v.high|0,S=p.low+v.low|0;if(Na.ucompare(S,p.low)<0){y++;y|=0}t=new ui(y,S)}return t},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 o("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new ui(g.parseInt(t.matched(1)),g.parseInt(t.matched(2))):null},F.fromNullableIdStr=function(e){return null!=e?F.makeFromIdStr(e):null},F.toStr=function(e){return Aa.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(Na.ucompare(i,e.low)<0){n++;n|=0}return new ui(n,i)},F.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Na.ucompare(e.low,t.low)<0){n--;n|=0}return new ui(n,i)},F.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Na.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("_");return t.length>2?new ui(g.parseInt(t[1]),g.parseInt(t[2])):null},F.decrement=function(e){if(null==e)return null;var t=new ui(0,1),n=e.high-t.high|0,i=e.low-t.low|0;if(Na.ucompare(e.low,t.low)<0){n--;n|=0}return new ui(n,i)},F.increment=function(e){if(null==e)return null;var t=new ui(0,1),n=e.high+t.high|0,i=e.low+t.low|0;if(Na.ucompare(i,e.low)<0){n++;n|=0}return new ui(n,i)},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 un(d.id,f))}}}else{for(var w=[],T=(s.iter(n),0);T0&&a.push(new un(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:ke});var Ce=function(){Q.call(this)};n["albero.command.UpdateUserCommand"]=Ce,Ce.__name__=["albero","command","UpdateUserCommand"],Ce.__super__=Q,Ce.prototype=r(Q.prototype,{execute:function(e){var t=e.getBody();if(null!=t.profileImage){var n=t.profileImage;if(!y.startsWith(n.type,"image/"))return}this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:Ce});var Oe=function(){Q.call(this)};n["albero.command.UpdateUserPresencesCommand"]=Oe,Oe.__name__=["albero","command","UpdateUserPresencesCommand"],Oe.__super__=Q,Oe.prototype=r(Q.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=k.nowAsInt64(),i=this.settings.getConfiguration().presenceExpiration,r=new ui(i>>31,i);return e.filter(function(e){var i=P.map(t.userPresences.getUserPresence(e),function(e){return e.isExpired(n,r)});switch(i[1]){case 0:return i[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){for(var n=this,i=Promise.resolve([]),r=F.splitUsingMaxCount(t,100),a=0;a0?e.createAttachmentErrorMessageByNetwork(n):t.createAttachmentErrorMessageByDomain(n)},Ge.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 cr.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return cr.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return cr.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return cr.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 cr.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return cr.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return cr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return cr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:return function(e){return new o("image.*","").match(e.type)};case 3:return function(e){return new o("image.*|video.*","").match(e.type)};case 4:return function(e){return new o("image.*|video.*|audio.*","").match(e.type)};default:return function(e){return!0}}},createDataTransferItemFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:var e=new o("image.*","");return function(t){return e.match(t.type)};case 3:var t=new o("image.*|video.*","");return function(e){return t.match(e.type)};case 4:var n=new o("image.*|video.*|audio.*","");return function(e){return n.match(e.type)};default:return function(e){return!0}}},__class__:Ge};var Ye=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=Wt.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)};n["albero.entity.Announcement"]=Ye,Ye.__name__=["albero","entity","Announcement"],Ye.prototype={getDisplayTextWithoutEscape:function(){return Wt.getDisplayTextWithoutEscape(this.type,this.content)},getNotificatoinTextWithoutEscape:function(e){switch(null==e&&(e=this.userName),null==e&&(e=""),this.type[1]){case 1:case 7:return e+":"+this.getDisplayTextWithoutEscape();default:return _r._e("["+s.dateStr(new Date)+"] ","Unsupported announcement.type is detected. announcment:%o",this,"","",""),Wt.getUnsupportText()}},__class__:Ye};var ze=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 Ye(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};n["albero.entity.AnnouncementStatus"]=ze,ze.__name__=["albero","entity","AnnouncementStatus"],ze.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 a=!0;if(a){var u;if(null!=n){var c=o.high-n.high|0;c=0!=c?c:Na.ucompare(o.low,n.low),u=(o.high<0?n.high<0?c:-1:n.high>=0?c:1)>0}else u=!0;u&&(n=o),++t}}null!=n&&this.read(n,t)},updateByAnnouncementDeletion:function(e){var t,n=!1;if(this.isUnread(e)&&(this.decrementUnreadCount(1),n=!0),null!=this.maxAnnouncementId){var i=this.maxAnnouncementId;t=null!=i&&null!=e&&i.high==e.high&&i.low==e.low}else t=!1;return t&&null!=this.maxAnnouncement&&(this.maxAnnouncement.type=jt.deleted,this.maxAnnouncement.content="",n=!0),n},updateByAnnouncement:function(e){this.isNewMax(e.id)&&(this.maxAnnouncementId=e.id,this.maxAnnouncement=e),this.unreadCount++},updateByReadingAnnouncements:function(e){if(null==e||this.canRegardAnnouncementReadCountZero(e)){if(!Ke.isUnreadAnnouncementExisted(this))return!1;if(null==this.maxAnnouncementId)return!1;this.readAll()}else{var t=e.filter(yo(this,this.isUnread));if(0==t.length)return!1;this.read(t[t.length-1],t.length)}return!0},canRegardAnnouncementReadCountZero:function(e){var t=this.maxAnnouncementId,n=P.orNull(x.lastOption(e));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},read:function(e,t){this.maxReadAnnouncementId=e,this.decrementUnreadCount(t);this.domainId,this.maxReadAnnouncementId,this.unreadCount},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},readAll:function(){this.maxReadAnnouncementId=this.maxAnnouncementId,this.unreadCount=0},isUnread:function(e){if(null!=this.maxReadAnnouncementId){var t=this.maxReadAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:Na.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:Na.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},__class__:ze};var Ke=function(){};n["albero.entity.AnnouncementStatusHelper"]=Ke,Ke.__name__=["albero","entity","AnnouncementStatusHelper"],Ke.isUnreadAnnouncementExisted=function(e){return null!=e&&(null!=e.maxAnnouncement&&e.isUnread(e.maxAnnouncement.id))},Ke.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var We=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};n["albero.entity.AnnouncementStatusUpdate"]=We,We.__name__=["albero","entity","AnnouncementStatusUpdate"],We.prototype={__class__:We};var je=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.talkAutoScroll=1,this.talksSortMode="new_messages_first",this.talkRightPanelOpened=!0,this.talkRightPanelWidth=0,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.notificationIncludingMessageContent&&(this.notificationIncludingMessageContent=e.notificationIncludingMessageContent),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),null!=e.talkRightPanelOpened?this.talkRightPanelOpened=e.talkRightPanelOpened:this.talkRightPanelOpened=null==L.getItem("right_panel_opened"),null!=e.talkRightPanelWidth)this.talkRightPanelWidth=e.talkRightPanelWidth;else{var t=g.parseInt(L.getItem("right_panel_width"));this.talkRightPanelWidth=null==t?0:t}if(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 n=0,i=Za.__cast(e.userDataContainer,Array);ne.version},isStampsetEnabled:function(e){return l.has(this.allowCreateMessageStampCategories,e)},isStampCategoriesEmpty:function(){return 0==this.allowCreateMessageStampCategories.length},getCategoryIndex:function(e){return this.allowCreateMessageStampCategories.indexOf(e)},__class__:Qe};var Je=function(e){null!=e&&(this.userId=e.user_id,this.id=e.conference_id,this.domainId=e.domain_id,this.talkId=e.talk_id,this.messageId=e.message_id,this.createdAt=e.created_at,this.expiredAt=e.expired_at,this.participants=e.participants,this.skywayVersion=null==e.skyway_version?1:e.skyway_version)};n["albero.entity.Conference"]=Je,Je.__name__=["albero","entity","Conference"],Je.prototype={isIncomingExpired:function(){var e=this.createdAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)+Je.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__:Je};var Xe=function(){this.conferencesMap=new Ha,this.talkIdConferenceIdMap=new Ha};n["albero.entity.ConferenceStore"]=Xe,Xe.__name__=["albero","entity","ConferenceStore"],Xe.prototype={addConference:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.conferencesMap;null!=Uo[n]?i.setReserved(n,e):i.h[n]=e;var r=e.talkId,a="_"+r.high+"_"+r.low,o=this.talkIdConferenceIdMap;null!=Uo[a]?o.setReserved(a,n):o.h[a]=n},removeConference:function(e){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!=Uo[r]?a.getReserved(r):a.h[r])==n&&this.talkIdConferenceIdMap.remove(r)},getConferences:function(){return U.toValueArray(this.conferencesMap)},getConference:function(e){var t="_"+e.high+"_"+e.low,n=this.conferencesMap;return null!=Uo[t]?n.getReserved(t):n.h[t]},hasConferenceInTalk:function(e){if(null!=e){var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;return null!=Uo[t]?n.existsReserved(t):n.h.hasOwnProperty(t)}return!1},getConferenceIdInTalk:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap,i=null!=Uo[t]?n.getReserved(t):n.h[t];return null==i?null:F.makeFromIdStr(i)},getConferenceTalkIds:function(){return U.toKeyArray(this.talkIdConferenceIdMap).map(F.makeFromIdStr)},hasConference:function(){return this.talkIdConferenceIdMap.keys().hasNext()},__class__:Xe};var Ze=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:Ze.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Ge.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled)};n["albero.entity.Configuration"]=Ze,Ze.__name__=["albero","entity","Configuration"],Ze.prototype={__class__:Ze};var $e=function(e){this.contractConference=La.None,null!=e&&(this.id=e.contract_id,this.plan=new rn(e.plan),this.quota=new Sn(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=La.Some(new et(e.conference))))};n["albero.entity.Contract"]=$e,$e.__name__=["albero","entity","Contract"],$e.prototype={getMaxMessageContentLength:function(){return P.map(P.option(this.quota),function(e){return e.maxMessageContentLength})},getMaxTalkers:function(){return P.flatMap(P.option(this.quota),function(e){return P.option(e.maxTalkers)})},getMaxTalks:function(){return P.flatMap(P.option(this.quota),function(e){return P.option(e.maxTalks)})},isConferenceEnalbed:function(){return P.isDefined(this.contractConference)},isVideoEnalbed:function(){var e=P.map(this.contractConference,function(e){return e.videoEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},getConferenceTtl:function(){return P.map(this.contractConference,function(e){return e.ttl})},getConferenceMaxParticipants:function(){return P.map(this.contractConference,function(e){return e.maxConferenceParticipants})},isGroupConfenreceEnalbed:function(){var e=P.map(this.contractConference,function(e){return e.groupConferenceEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},isTargetOfPlanAd:function(){return null!=this.quota&&this.quota.withAd},isFreePlan:function(){return null!=this.plan&&this.plan.free},__class__:$e};var et=function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=et.DEFAULT_MAX_PARTICIPANTS,this.ttl=et.DEFAULT_TTL,this.videoEnabled=!1,null!=e&&(this.videoEnabled=e.video_enabled,this.ttl=e.ttl,this.maxConferenceParticipants=e.max_conference_participants,this.groupConferenceEnabled=e.group_conference_enabled)};n["albero.entity.ContractConference"]=et,et.__name__=["albero","entity","ContractConference"],et.prototype={__class__:et};var tt=function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?it.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=tt.getLabelRoot();break;case 2:this.name=tt.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};n["albero.entity.Department"]=tt,tt.__name__=["albero","entity","Department"],tt.getLabelFree=function(){return cr.localize("Department.label_free")},tt.getLabelRoot=function(){return cr.localize("Department.label_root")},tt.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==it.Root},isFree:function(){return this.nodeType==it.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return it.Root;case 2:return it.Free;default:return it.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(F.idStr)},__class__:tt};var nt=function(){};n["albero.entity.DepartmentHelper"]=nt,nt.__name__=["albero","entity","DepartmentHelper"],nt.getName=function(e){return null==e?null:e.name};var it=n["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};it.Normal=["Normal",0],it.Normal.toString=i,it.Normal.__enum__=it,it.Root=["Root",1],it.Root.toString=i,it.Root.__enum__=it,it.Free=["Free",2],it.Free.toString=i,it.Free.__enum__=it,it.__empty_constructs__=[it.Normal,it.Root,it.Free];var rt=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};n["albero.entity.DepartmentList"]=rt,rt.__name__=["albero","entity","DepartmentList"],rt.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new tt(e)})},__class__:rt};var at=function(){this.departmentMap=new Ha,this.rootDepartmentIdMap=new Ha};n["albero.entity.DepartmentStore"]=at,at.__name__=["albero","entity","DepartmentStore"],at.prototype={getDepartment:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.departmentMap;return null!=Uo[t]?n.getReserved(t):n.h[t]},setDepartment:function(e){if(null!=e.parentId){var t=this.getDepartment(e.parentId);null!=t&&(t.addChild(e.id),e.depth=t.depth+1)}var n=e.id,i="_"+n.high+"_"+n.low,r=this.departmentMap;null!=Uo[i]?r.setReserved(i,e):r.h[i]=e},clearDomainDepartment:function(e){var t=this,n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap,r=null!=Uo[n]?i.getReserved(n):i.h[n];null!=r&&(l.iter(this.getDepartmentsDescendantOrSelf(r),function(e){var n=e.id;t.departmentMap.remove("_"+n.high+"_"+n.low)}),this.rootDepartmentIdMap.remove(n))},getRootDepartmentId:function(e){var t="_"+e.high+"_"+e.low,n=this.rootDepartmentIdMap;return null!=Uo[t]?n.getReserved(t):n.h[t]},setRootDepartmentId:function(e,t){var n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap;null!=Uo[n]?i.setReserved(n,t):i.h[n]=t},setDepartmentUserCount:function(e){var t=this.getDepartment(e.departmentId);null!=t&&(t.userCount=e,t.userCountLoading=!1)},setUserCountLoading:function(e,t){var n=this.getDepartment(e);null!=n&&(n.userCountLoading=t)},isUserCountLoadingRequired:function(e){var t=this.getDepartment(e);return null==t||null==t.userCount&&!t.userCountLoading},clearDomainDepartmentUsers:function(e){var t=this.getRootDepartmentId(e);return null!=t&&(l.iter(this.getDepartmentsDescendantOrSelf(t),function(e){e.userCount=null,e.userIds=null,e.userCountLoading=!1}),!0)},setDepartmentUsers:function(e,t){var n=this.getDepartment(e);null!=n&&(n.userIds=t)},getDepartmentPath:function(e){return this.getDepartmentsAncestorOrSelf(e)},getDepartmentPathWithoutRoot:function(e){return this.getDepartmentPath(e).filter(function(e){return!e.isRoot()})},getDepartmentsAncestorOrSelf:function(e){var t=[];return this._getDepartmentsAncestorOrSelf(e,t),t},_getDepartmentsAncestorOrSelf:function(e,t){var n=this.getDepartment(e);null!=n&&(null!=n.parentId&&this._getDepartmentsAncestorOrSelf(n.parentId,t),t.push(n))},getDepartmentsDescendantOrSelf:function(e){var t=[];return this._getDepartmentsDescendantOrSelf(e,t),t},_getDepartmentsDescendantOrSelf:function(e,t){var n=this,i=this.getDepartment(e);null!=i&&(t.push(i),null!=i.childrenIds&&l.iter(i.childrenIds,function(e){n._getDepartmentsDescendantOrSelf(e,t)}))},__class__:at};var ot=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};n["albero.entity.DepartmentUserCount"]=ot,ot.__name__=["albero","entity","DepartmentUserCount"],ot.prototype={__class__:ot};var st=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};n["albero.entity.DepartmentUserCountList"]=st,st.__name__=["albero","entity","DepartmentUserCountList"],st.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new ot(e)})},__class__:st};var lt=function(e,t){if(null!=e){if(this.id=F.fromIntOrInt64(e.direct_app_id),this.uniqueKey=e.unique_key,this.appUrl=e.app_url,this.locales=new Ha,null!=e.locales)for(var n=0,i=p.fields(e.locales);n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){if(B.isEmpty(e))return!0;if(B.isEmpty(this.canonicalDisplayName)){this.canonicalDisplayName=pr.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(B.isEmpty(this.canonicalDisplayNameRoman)){this.canonicalDisplayNameRoman=pr.canonicalizeForRoman(this.displayName);this.canonicalDisplayNameRoman,this.displayName}return this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(B.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=pr.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1)},__class__:Et});var Nt=function(e){this.values=e};n["albero.entity.Domains"]=Nt,Nt.__name__=["albero","entity","Domains"],Nt.prototype={orderByName:function(){var e=x.sortAndReturn(this.values.map(At.fromDomain),At.compare).map(At.toDomain);return new Nt(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?La.None:l.fold(this.values,function(e,t){switch(P.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:Na.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0})[1]){case 0:return P.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:Na.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return La.Some(e)}},La.None)},getDirectAppsIds:function(){if(null==this.values||0==this.values.length)return[];var e=new Ha;return l.iter(this.values,function(t){l.iter(t.directAppsSetting.enabled,function(t){var n="_"+t.high+"_"+t.low;null!=Uo[n]?e.setReserved(n,t):e.h[n]=t})}),U.toValueArray(e)},__class__:Nt};var At=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=pr.canonicalize(this.name)};n["albero.entity.DomainForSort"]=At,At.__name__=["albero","entity","DomainForSort"],At.fromDomain=function(e){return new At(e)},At.toDomain=function(e){return e.domain},At.compare=function(e,t){var n=B.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:B.compare(e.name,t.name)},At.prototype={__class__:At};var bt=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new Dt(e.get_headers))};n["albero.entity.DownloadAuth"]=bt,bt.__name__=["albero","entity","DownloadAuth"],bt.prototype={__class__:bt};var Dt=function(e){this.rawData=e};n["albero.entity.DownloadAuthHeaders"]=Dt,Dt.__name__=["albero","entity","DownloadAuthHeaders"],Dt.prototype={__class__:Dt};var kt=function(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version)};n["albero.entity.FavoriteTalkEvent"]=kt,kt.__name__=["albero","entity","FavoriteTalkEvent"],kt.prototype={__class__:kt};var Ct=function(e){this.uploadResult=Ot.NONE,this.preview=La.None,this.thumbnailDimension=La.None,null!=e&&(this.attachmentId=e.attachment_id,this.messageId=e.message_id,this.talkId=e.talk_id,this.id=e.file_id,this.userId=e.user_id,this.name=e.name,this.contentType=e.content_type,this.contentSize=e.content_size,this.url=e.url,this.thumbUrl=e.thumbnail_url,this.updatedAt=e.updated_at,this.file=e.file,this.localThumbInfo=e.localThumbInfo,this.thumbnailDimension=La.None,this.deleted=null!=e.deleted&&e.deleted,this.previewSupported=null!=e.preview_supported&&e.preview_supported)};n["albero.entity.FileInfo"]=Ct,Ct.__name__=["albero","entity","FileInfo"],Ct.fromMessageAndFile=function(e,t){var n=new Ct;return n.messageId=e.id,n.talkId=e.talkId,n.userId=e.userId,n.updatedAt=e.createdAt,n.id=t.file_id,n.name=t.name,n.contentType=t.content_type,n.contentSize=t.content_size,n.url=t.url,n.thumbUrl=t.thumbnail_url,n.thumbnailDimension=null==t.thumbnail_dimension?La.None:La.Some(new ri(t.thumbnail_dimension)),n.deleted=null!=t.deleted&&t.deleted,n.file=t.file,n.localThumbInfo=t.localThumbInfo,n.previewSupported=t.preview_supported,n},Ct.fromMessageAndFileWithFileId=function(e,t,n){var i=Ct.fromMessageAndFile(e,t);return i.id=n,i},Ct.createUploadedFileInfo=function(e){var t=new Ct;return t.id=e.id,t.contentType=e.content_type,t.contentSize=e.content_size,t.url=e.url,t.name=e.name,t},Ct.createStagedFileInfo=function(e,t,n){var i=t,r=new Ct,a=new ui(0,--Ct.stagedFileInfosMaxId);return r.id=a,r.talkId=e,null!=t&&(r.contentType=i.type,r.contentSize=i.size,r.addLocalFile(t),r.name=i.name),null!=n&&r.addLocalThumbInfo(n),r},Ct.createStagedFileInfoFromDummyFile=function(e,t,n){var i=new Ct,r=new ui(0,--Ct.stagedFileInfosMaxId);return i.id=r,i.talkId=e,null!=t&&(i.contentType=t.type,i.contentSize=t.size,i.file=t,i.name=t.name),null!=n&&i.addLocalThumbInfo(n),i},Ct.prototype={isRemote:function(){return null==this.file},isUploaded:function(){if(this.isRemote())return!0;switch(this.uploadResult[1]){case 0:return!0;case 1:case 2:return!1}},isUploadFailed:function(){if(this.isRemote())return!1;switch(this.uploadResult[1]){case 1:return!0;case 0:case 2:return!1}},setUploadResult:function(e){this.uploadResult=e},isNotUploaded:function(){return!this.isUploaded()},hasThumb:function(){return null!=this.thumbUrl||this.hasLocalThumbInfo()},hasLocalThumbInfo:function(){return null!=this.localThumbInfo},hasLocalFile:function(){return null!=this.file},hasUrl:function(){return null!=this.url},isImage:function(){return y.startsWith(this.contentType,"image/")},isImageGif:function(){return y.startsWith(this.contentType,"image/gif")},isImageJpeg:function(){return y.startsWith(this.contentType,"image/jpeg")},isPdf:function(){return y.startsWith(this.contentType,"application/pdf")},isVideo:function(){return y.startsWith(this.contentType,"video/")},canDisplayAsThumb:function(){return!!this.hasThumb()||this.isImage()},getNoThumbText:function(){return null!=this.name?this.name:this.url},getUploadedFileData:function(){if(null==this.file){var e={url:this.url,content_type:this.contentType,content_size:this.contentSize,name:this.name,file_id:this.id};return null!=this.thumbUrl&&(e.thumbnail_url=this.thumbUrl),P.isDefined(this.thumbnailDimension)&&(e.thumbnail_dimension=P.get(this.thumbnailDimension)),e}var t=this.uploadResult;switch(t[1]){case 0:return t[2];case 1:case 2:return _r._e("["+s.dateStr(new Date)+"] ","file not uploaded.","","","",""),null}},addLocalFile:function(e){this.file=e},addLocalThumbInfo:function(e){this.localThumbInfo=e},getUploadableFilePack:function(){return{file:this.file,thumb:this.localThumbInfo}},__class__:Ct};var Ot=n["albero.entity.UploadResult"]={__ename__:["albero","entity","UploadResult"],__constructs__:["SUCCESS","FAILUER","NONE"]};Ot.SUCCESS=function(e){var t=["SUCCESS",0,e];return t.__enum__=Ot,t.toString=i,t},Ot.FAILUER=["FAILUER",1],Ot.FAILUER.toString=i,Ot.FAILUER.__enum__=Ot,Ot.NONE=["NONE",2],Ot.NONE.toString=i,Ot.NONE.__enum__=Ot,Ot.__empty_constructs__=[Ot.FAILUER,Ot.NONE];var Mt=function(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])};n["albero.entity.FileInfoDeletion"]=Mt,Mt.__name__=["albero","entity","FileInfoDeletion"],Mt.prototype={__class__:Mt};var Ft=function(){this.fileInfoMap=new Ha,this.fileIdStrsMap=new Ha,this.messageFileIdStrsMap=new Ha,this.noteFileIdStrsMap=new Ha,this.filePreviewMap=new Ha};n["albero.entity.FileInfoStore"]=Ft,Ft.__name__=["albero","entity","FileInfoStore"],Ft.prototype={ensureStagedFileInfos:function(e){return this.ensureStagedFileIdStrs(e).map(F.makeFromIdStr).filter(function(e){return null!=e}).map(yo(this,this.getFileInfo))},moveStagedFile:function(e,t,n){var i=this.ensureStagedFileIdStrs(e);if(null!=i){var r=i[t];s.remove(i,r),i.splice(n,0,r)}},ensureStagedFileIdStrs:function(e){var t=e.toString(),n=this.fileIdStrsMap,i=null!=Uo[t]?n.getReserved(t):n.h[t];if(null==i){i=[];var r=this.fileIdStrsMap;null!=Uo[t]?r.setReserved(t,i):r.h[t]=i}return i},addStagedFileInfo:function(e,t,n,i){var r=Ct.createStagedFileInfo(e,n,i),a=r.id,o="_"+a.high+"_"+a.low,s=this.fileInfoMap;null!=Uo[o]?s.setReserved(o,r):s.h[o]=r;var l=r.id,u="_"+l.high+"_"+l.low;return this.ensureStagedFileIdStrs(t).push(u),r},replaceStagedFileInfo:function(e,t,n,i){var r=Ct.createStagedFileInfo(e.talkId,n,i);return this.replaceStagedFileInfoFromFileId(e.id,t,r),r},replaceStagedFileInfoFromFileId:function(e,t,n){var i=n.id,r="_"+i.high+"_"+i.low,a=this.fileInfoMap;null!=Uo[r]?a.setReserved(r,n):a.h[r]=n;var o=this.ensureStagedFileIdStrs(t),s=o.indexOf("_"+e.high+"_"+e.low);if(-1!=s){o.splice(s,1);var l=n.id;o.splice(s,0,"_"+l.high+"_"+l.low),this.removeStagedFileInfo(t,e)}},restoreStagedFile:function(e,t){var n=t.id,i="_"+n.high+"_"+n.low,r=this.fileInfoMap;null!=Uo[i]?r.setReserved(i,t):r.h[i]=t;var a=t.id,o="_"+a.high+"_"+a.low;this.ensureStagedFileIdStrs(e).push(o)},removeStagedFileInfo:function(e,t){var n="_"+t.high+"_"+t.low;s.remove(this.ensureStagedFileIdStrs(e),n);var i=this.fileInfoMap;(null!=Uo[n]?i.getReserved(n):i.h[n]).isRemote()||this.fileInfoMap.remove(n)},removeStagedFileInfos:function(e){for(var t=0,n=this.ensureStagedFileIdStrs(e);t>t,e.high<<32-t|e.low>>>t):new ui(e.high>>31,e.high>>t-32)},Lt.subTimestampPart=function(e,t){var n=Lt.timestamp(e),i=Lt.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(Na.ucompare(n.low,i.low)<0){r--;r|=0}return new ui(r,a)},Lt.createForTest=function(e){var t=Lt.TIMESTAMP_SHIFT;return 0==(t&=63)?new ui(e.high,e.low):t<32?new ui(e.high<>>32-t,e.low<0||this.credential.ttl0?this.content.text:"";case 7:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 13:return[this.content.question,cr.localize("MessageStringMaker.yes"),cr.localize("MessageStringMaker.no")].join(" ");case 14:return e&&null!=this.content.response?this.content.response?cr.localize("MessageStringMaker.yes"):cr.localize("MessageStringMaker.no"):"";case 15:return null!=this.content.options?g.string(this.content.question)+" "+g.string(this.content.options.join(" ")):this.content.question;case 16:return e&&null!=this.content.response&&null!=this.content.options&&this.content.options.length>this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,cr.localize("MessageStringMaker.achieve"),cr.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?cr.localize("MessageStringMaker.achieve"):cr.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&this.content.text.length>0)return this.content.text;break;case 7:return cr.localize("Message.bookmark_label_deleted");case 8:return[cr.localize("Message.bookmark_label_note_shared"),new Fi(this.content).title].join(" ");case 10:return[cr.localize("Message.bookmark_label_note_created"),new Fi(this.content).title].join(" ");case 11:return[cr.localize("Message.bookmark_label_note_updated"),new Fi(this.content).title].join(" ");case 2:case 12:if(null!=this.content.text&&this.content.text.length>0)return[cr.localize("Message.bookmark_label_stamp"),this.content.text].join(" ");break;case 14:case 16:return[cr.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 13:case 15:return[cr.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 17:return[cr.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 18:return[this.content.done?cr.localize("Message.bookmark_label_completed"):cr.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 19:case 20:return[cr.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 21:return[cr.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 8:case 10:case 11:return new Fi(this.content);default:return null}},messageStringRaw:function(){switch(this.type[1]){case 0:return"";case 1:return this.content;case 3:case 4:return"";case 5:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 8:case 9:case 10:case 11:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 14:case 16:return"";case 13:case 15:return this.content.question;case 17:return this.content.title;case 18:return"";case 19:case 20:case 21:case 22:default:return""}},getContentsForNoteDelete:function(){return 9==this.type[1]?new Ri(this.content):null},getContentsForOriginalStamp:function(){return 12==this.type[1]?new xi(this.content):null},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()},isAllowedToShowSelectionMessageMenu:function(){return!(this.type!=jt.text&&!this.isStampMessageWithText())||this.isTextMultipleFileWithText()},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()},isMatchCategory:function(e){switch(e[1]){case 0:return!!(this.isTextMessage()||this.isFileMessage()||this.isTextMultipleFile())||this.isStampMessageWithText();case 1:return!1}},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==jt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==jt.yesOrNo||this.type==jt.yesOrNoReply||this.type==jt.selectOne||this.type==jt.selectOneReply||this.type==jt.todo||this.type==jt.todoDone||this.type==jt.yesOrNoClosed||this.type==jt.selectOneClosed||this.type==jt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==jt.selectOneReply||this.type==jt.yesOrNoReply||this.type==jt.todoDone},isClosedActionStampMessage:function(){return this.type==jt.yesOrNoClosed||this.type==jt.selectOneClosed||this.type==jt.todoClosed},isTextMultipleFile:function(){return this.type==jt.textMultipleFile},isSendingActionStampMessage:function(){return this.type==jt.yesOrNo||this.type==jt.selectOne||this.type==jt.todo},isNoteMessage:function(){return this.type==jt.noteShared||this.type==jt.noteDeleted||this.type==jt.noteCreated||this.type==jt.noteUpdated},isNoteDeletedMessage:function(){return this.type==jt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==jt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==jt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==jt.stamp||this.type==jt.originalStamp},isNotStampMessage:function(){return!this.isStampMessage()},isStampMessageWithText:function(){return!!this.isStampMessage()&&this.isNotObjectWithEmptyText()},isStampMessageWithEmptyText:function(){return!!this.isStampMessage()&&this.isObjectWithEmptyText()},isNotStampMessageWithEmptyText:function(){return!!this.isNotStampMessage()||this.isNotObjectWithEmptyText()},isObjectWithEmptyText:function(){return B.isEmpty(this.content.text)},isNotObjectWithEmptyText:function(){return!this.isObjectWithEmptyText()},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==jt.text},isOpenConference:function(){return this.type==jt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){var e=this.type;return _r._i("["+s.dateStr(new Date)+"] ",e,"","","",""),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?La.Some(this.content.in_reply_to):La.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+":g.string(this.readUserIds.length)},hasNoReadUsers:function(){return 0==this.readUserIds.length},deleteFile:function(e){var t;switch(this.type[1]){case 4:t=[this.content];break;case 5:t=this.content.files;break;default:t=[]}if(0!=t.length){var n=l.find(t,function(t){var n=t.file_id,i=e.fileId;return null!=n&&null!=i&&n.high==i.high&&n.low==i.low});null!=n&&(n.deleted=!0)}},getQuestionTitle:function(){switch(this.type[1]){case 17:case 18:case 21:return null==this.content.title?"":this.content.title;case 13:case 14:case 15:case 16:case 19:case 20:return null==this.content.question?"":this.content.question;default:return""}},getChoiceCloseResponse:function(e){var t=cr.localize("QuestionHelper.close_answer")+"\n";if(null==this.content.responses)t+="...";else{var n=this.content.responses,i=this.content.last_response;if(0==gn.closingTypeOf(this.content.closing_type)[1])t+=null!=i?cr.localize("QuestionHelper.last_response",{content:e(n[i].content),interpolation:{escapeValue:!1}}):cr.localize("QuestionHelper.no_answer");else{t+=null!=i?null==n?"":n.map(function(t){var n=null==t.count?0:t.count;return e(t.content)+": "+n+cr.localize("QuestionHelper.name")}).join("\n"):cr.localize("QuestionHelper.no_answer")}}return t},getTodoCloseResponse:function(){var e=cr.localize("QuestionHelper.close_task")+"\n";if(null==this.content.responses)e+="...";else{var t=this.content.responses,n=this.content.last_response;if(0==gn.closingTypeOf(this.content.closing_type)[1]){e+=null!=n&&"DONE"==t[n].content?cr.localize("QuestionHelper.achieve_task"):cr.localize("QuestionHelper.not_achieve_task")}else{var i=0;if(null!=t)for(var r=0;r=0?n:1)>0}return!1},timeOveredOrNotExist:function(e,t){return null==e||this.timeOvered(e,t)},__class__:nn};var rn=function(e){null!=e&&(this.name=e.plan_name,this.trial=!!e.trial,this.free=!!e.free)};n["albero.entity.Plan"]=rn,rn.__name__=["albero","entity","Plan"],rn.prototype={__class__:rn};var an=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=Za.__cast(e.item_values,Array).map(function(e){return new ln(e)})))};n["albero.entity.Profile"]=an,an.__name__=["albero","entity","Profile"],an.prototype={__class__:an};var on=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=Za.__cast(e.item_definitions,Array);t=0?o:1)>0&&(this.updatedAt=i,this.maxResponseId=t,this.lastResponse=e,this.lastResponseUserId=n)},__class__:dn};var fn=n["albero.entity.QuestionFromType"]={__ename__:["albero","entity","QuestionFromType"],__constructs__:["fromSelf","fromOther"]};fn.fromSelf=["fromSelf",0],fn.fromSelf.toString=i,fn.fromSelf.__enum__=fn,fn.fromOther=["fromOther",1],fn.fromOther.toString=i,fn.fromOther.__enum__=fn,fn.__empty_constructs__=[fn.fromSelf,fn.fromOther];var mn=n["albero.entity.QuestionFilter"]={__ename__:["albero","entity","QuestionFilter"],__constructs__:["onlyClosed","onlyUnclosed","noFilter"]};mn.onlyClosed=["onlyClosed",0],mn.onlyClosed.toString=i,mn.onlyClosed.__enum__=mn,mn.onlyUnclosed=["onlyUnclosed",1],mn.onlyUnclosed.toString=i,mn.onlyUnclosed.__enum__=mn,mn.noFilter=["noFilter",2],mn.noFilter.toString=i,mn.noFilter.__enum__=mn,mn.__empty_constructs__=[mn.onlyClosed,mn.onlyUnclosed,mn.noFilter];var pn=n["albero.entity.QuestionClosingType"]={__ename__:["albero","entity","QuestionClosingType"],__constructs__:["any","all","unknown"]};pn.any=["any",0],pn.any.toString=i,pn.any.__enum__=pn,pn.all=["all",1],pn.all.toString=i,pn.all.__enum__=pn,pn.unknown=["unknown",2],pn.unknown.toString=i,pn.unknown.__enum__=pn,pn.__empty_constructs__=[pn.any,pn.all,pn.unknown];var gn=function(){};n["albero.entity.QuestionClosingTypeHelper"]=gn,gn.__name__=["albero","entity","QuestionClosingTypeHelper"],gn.closingTypeOf=function(e){switch(e){case 0:return pn.any;case 1:return pn.all;default:return pn.unknown}};var vn=function(e){this.content=e.content,this.count=null==e.count?0:e.count,this.userIds=null==e.user_ids?[]:e.user_ids};n["albero.entity.QuestionResponse"]=vn,vn.__name__=["albero","entity","QuestionResponse"],vn.prototype={add:function(e){this.contains(e)||(this.count+=1,this.userIds=this.userIds.concat([e]))},sub:function(e){this.contains(e)&&(this.count-=1,this.userIds=this.userIds.filter(function(t){return!(e.high==t.high&&e.low==t.low)}))},contains:function(e){return F.contains(this.userIds,e)},__class__:vn};var yn=function(){this.questions=new Ha};n["albero.entity.QuestionStore"]=yn,yn.__name__=["albero","entity","QuestionStore"],yn.prototype={removeTalkQuestions:function(e){for(var t=this.getQuestions(e),n=0;n>>16,s=65535&t.low,l=t.low>>>16,u=Na._mul(a,s),c=Na._mul(o,s),_=Na._mul(a,l),h=u,d=(Na._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,Na.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,Na.ucompare(h,c)<0){d++;d|=0}d=d+(Na._mul(e.low,t.high)+Na._mul(e.high,t.low)|0)|0;var f=new ui(d,h),m=new ui(0,g.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,v=f.low+m.low|0;if(Na.ucompare(v,f.low)<0){p++;p|=0}e=new ui(p,v)}return e},__class__:xn};var Un=function(e,t,n){this.stampsetId=e,this.id=t,this.illust=n};n["albero.entity.OriginalStamp"]=Un,Un.__name__=["albero","entity","OriginalStamp"],Un.__interfaces__=[Rn],Un.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=F.makeFromIdStr(t.stampsetIdStr),i=F.makeFromIdStr(t.stampIdStr);return new Un(n,i,t.illust)},Un.fromPropsAndStampsetId=function(e,t){return new Un(t,F.fromIntOrInt64(e.id),e.illust)},Un.createKey=function(e){return"original__"+e.high+"_"+e.low},Un.prototype={getImageUrl:function(){return this.illust},getKey:function(){return Un.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Wt;return n.talkId=e,n.type=jt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:Un};var Pn=function(){this.stampsetStore=new Ha,this.stampStore=new Ha,this.stampKeyCategoryIdMap=new Ha};n["albero.entity.StampStore"]=Pn,Pn.__name__=["albero","entity","StampStore"],Pn.prototype={addStampsets:function(e){for(var t=0;te.version},__class__:Bn};var Hn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(F.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};n["albero.entity.StampsetSetting"]=Hn,Hn.__name__=["albero","entity","StampsetSetting"],Hn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new Bn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(e){return null!=this.allowCreateMessageStampsetIds&&l.exists(this.allowCreateMessageStampsetIds,function(t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low})},containVisibleStampset:function(e){return l.exists(this.stampsetInfos,function(t){var n=t.stampsetId;return null!=e&&null!=n&&e.high==n.high&&e.low==n.low})},getSendableStampsetInfos:function(){var e=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(t){return e.containSendableStampset(t.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.map(function(t){return e.eqStampsetId(t)&&e.isNewerThan(t)?e:t})},deleteStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.filter(function(t){var n=t.stampsetId;return!(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(t){return!(null!=t&&null!=e&&t.high==e.high&&t.low==e.low)})},getStampsetIdsDiff:function(e){for(var t=new Ha,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=0?r:1},qn.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__:qn};var Qn=function(e,t){this.paneType=e,this.talkSelection=t};n["albero.entity.TalkPaneSelection"]=Qn,Qn.__name__=["albero","entity","TalkPaneSelection"],Qn.createArrayForMultiPanes=function(e){return l.mapi(e,function(e,t){return new Qn(tn.getMultiPaneType(e),t)})},Qn.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return H.talks(e,G.single(this.talkSelection));case 1:var n=yo(t,t.getTalkSelection),i=e,r=tn.getMultiPaneTypes().map(function(e){return n(i,e)});return r[0]=this.talkSelection,H.talks(e,G.multi(r));case 2:var a=yo(t,t.getTalkSelection),o=e,s=tn.getMultiPaneTypes().map(function(e){return a(o,e)});return s[1]=this.talkSelection,H.talks(e,G.multi(s));case 3:var l=yo(t,t.getTalkSelection),u=e,c=tn.getMultiPaneTypes().map(function(e){return l(u,e)});return c[2]=this.talkSelection,H.talks(e,G.multi(c))}},getTalkIdOrNull:function(){return $n.getTalkIdOrNull(this.talkSelection)},__class__:Qn};var Jn=function(){};n["albero.entity.ITalkSelectionGetter"]=Jn,Jn.__name__=["albero","entity","ITalkSelectionGetter"],Jn.prototype={__class__:Jn};var Xn=function(e,t){this.domainId=e.domain_id,this.talkId=e.talk_id,this.type=t?_n.fromRawValue(e.type):hn.None,this.version=e.version};n["albero.entity.TalkPushNotificationEvent"]=Xn,Xn.__name__=["albero","entity","TalkPushNotificationEvent"],Xn.prototype={__class__:Xn};var Zn=n["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};Zn.NotSelected=["NotSelected",0],Zn.NotSelected.toString=i,Zn.NotSelected.__enum__=Zn,Zn.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=Zn,n.toString=i,n},Zn.AnnouncementsSelected=["AnnouncementsSelected",2],Zn.AnnouncementsSelected.toString=i,Zn.AnnouncementsSelected.__enum__=Zn,Zn.__empty_constructs__=[Zn.NotSelected,Zn.AnnouncementsSelected];var $n=function(){};n["albero.entity.TalkSelectionHelper"]=$n,$n.__name__=["albero","entity","TalkSelectionHelper"],$n.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=$n.getTalkIdOrNull(e),r=$n.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=$n.getMessageIdOrNull(e),o=$n.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},$n.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:e[3];var n=e[2],i=P.orNull(Vn.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==jn.annoucements}},$n.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},$n.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return P.orNull(t);case 2:return null}},$n.toTalkSelectionStr=function(e){switch(e[1]){case 0:return"";case 1:var t=e[2];return"_"+t.high+"_"+t.low;case 2:return"announcement"}};var ei=function(e){this.unreadMentionCount=0,this.unreadCount=0,null!=e?(this.id=e.talk_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.unreadMentionCount=null!=e.unread_mention_count?e.unread_mention_count:0,this.maxMessageId=e.max_message_id,null!=e.max_message?this.maxMessage=new Wt(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 cn(e.push_notification)):this.pushNotificationSetting=new cn};n["albero.entity.TalkStatus"]=ei,ei.__name__=["albero","entity","TalkStatus"],ei.prototype={update:function(e){var t=this,n=!1;return this.needIdUpdate(this.maxEveryoneReadMessageId,e.maxEveryoneReadMessageId)&&(this.maxEveryoneReadMessageId=e.maxEveryoneReadMessageId,n=!0),P.foreach(e.maxReadMessageId,function(e){t.needIdUpdate(t.maxReadMessageId,e)&&(t.maxReadMessageId=e,n=!0)}),n},updateByMessageDeletion:function(e){var t=!1;return this.isUnread(e.messageId)&&(this.decrementUnreadCount(1),e.isMention&&this.decrementUnreadMentionCount(1),t=!0),this.isMax(e.messageId)&&(null!=this.maxMessage&&(this.maxMessage.type=jt.deleted),t=!0),t},updateByMessageReadStatusesUpdate:function(e){var t=e.messageIds,n=e.mentionMessageIds,i=t.filter(yo(this,this.isUnread));if(0==i.length)return!1;for(var r=i[0],a=0;a=0?s:1)<0&&(r=o),F.notContains(e.messageIdsExcludingUnreadCountTargets,o)&&(this.decrementUnreadCount(1),F.contains(n,o)&&this.decrementUnreadMentionCount(1))}return this.maxReadMessageId=r,!0},needIdUpdate:function(e,t){if(null!=t){if(null!=e){var n=e.high-t.high|0;return n=0!=n?n:Na.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,n){this.maxReadMessageId=e,this.decrementUnreadCount(t),this.decrementUnreadMentionCount(n)},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},decrementUnreadMentionCount:function(e){this.unreadMentionCount-=e,this.unreadMentionCount<0&&(this.unreadMentionCount=0)},readAll:function(){this.maxReadMessageId=this.maxMessageId,this.unreadCount=0,this.unreadMentionCount=0},updateByMessage:function(e,t){this.isNewMax(e.id)&&(this.maxMessageId=e.id,this.maxMessage=e),e.isUnreadCountTarget&&(t?this.isUnread(e.id)&&this.readAll():(this.unreadCount++,e.mention&&this.unreadMentionCount++),this.talkOrderingTimestamp=e.createdAt)},updateByReadingMessages:function(e,t){var n=this;if(null==e||this.canRegardTalkReadCountZero(e)){if(!ti.isUnreadMesasgeExisted(this))return!1;if(null==this.maxMessageId)return!1;this.readAll()}else{var i=e.filter(function(e){return n.isUnread(e.id)});if(0==i.length)return!1;var r=i[i.length-1].id,a=i.filter(function(e){if(e.isUnreadCountTarget){var n=e.userId;return!(null!=n&&null!=t&&n.high==t.high&&n.low==t.low)}return!1}),o=a.filter(function(e){return e.mention});this.read(r,a.length,o.length)}return!0},updateByTalkPushNotificationEvent:function(e){return e.version>this.pushNotificationSetting.version&&(this.pushNotificationSetting=cn.createWithParams(e.type,e.version),!0)},canRegardTalkReadCountZero:function(e){var t=this.maxMessageId,n=P.orNull(x.lastOption(e.map(function(e){return e.id})));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},isMessageAcceptable:function(e,t){if(this.isUnread(e.id))return!0;var n=Lt.subTimestampPart(this.maxReadMessageId,e.id),i=n.high-t.high|0;return i=0!=i?i:Na.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<=0},isUnread:function(e){if(null!=this.maxReadMessageId){var t=this.maxReadMessageId,n=t.high-e.high|0;return n=0!=n?n:Na.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId,n=t.high-e.high|0;return n=0!=n?n:Na.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isNotificationDisabled:function(){return this.pushNotificationSetting.isDisabled()},getNotificationType:function(){return this.pushNotificationSetting.type},__class__:ei};var ti=function(){};n["albero.entity.TalkStatusHelper"]=ti,ti.__name__=["albero","entity","TalkStatusHelper"],ti.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},ti.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},ti.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&e.isUnread(e.maxMessage.id))};var ni=function(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=P.option(e.max_read_message_id))};n["albero.entity.TalkStatusUpdate"]=ni,ni.__name__=["albero","entity","TalkStatusUpdate"],ni.prototype={__class__:ni};var ii=function(e,t,n){this.file=e,this.dimension=ri.createWithSize(t,n),this.auth=null};n["albero.entity.ThumbInfo"]=ii,ii.__name__=["albero","entity","ThumbInfo"],ii.prototype={setAuth:function(e){this.auth=e},__class__:ii};var ri=function(e){null!=e&&(this.width=e.width,this.height=e.height)};n["albero.entity.ThumbDimension"]=ri,ri.__name__=["albero","entity","ThumbDimension"],ri.createWithSize=function(e,t){var n=new ri;return n.width=e,n.height=t,n},ri.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:ri};var ai=function(e,t,n){var i=new ui(0,0);this.domainId=i,this.domainId=e,this.oldSetting=t,this.newSetting=n};n["albero.entity.UpdateDomainStampSettingEvent"]=ai,ai.__name__=["albero","entity","UpdateDomainStampSettingEvent"],ai.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:ai};var oi=n["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL"]};oi.PROFILE_IMAGE=["PROFILE_IMAGE",0],oi.PROFILE_IMAGE.toString=i,oi.PROFILE_IMAGE.__enum__=oi,oi.MESSAGE=["MESSAGE",1],oi.MESSAGE.toString=i,oi.MESSAGE.__enum__=oi,oi.TALK_ICON=["TALK_ICON",2],oi.TALK_ICON.toString=i,oi.TALK_ICON.__enum__=oi,oi.THUMBNAIL=["THUMBNAIL",3],oi.THUMBNAIL.toString=i,oi.THUMBNAIL.__enum__=oi,oi.NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],oi.NOTE_ATTACHMENT.toString=i,oi.NOTE_ATTACHMENT.__enum__=oi,oi.NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],oi.NOTE_THUMBNAIL.toString=i,oi.NOTE_THUMBNAIL.__enum__=oi,oi.__empty_constructs__=[oi.PROFILE_IMAGE,oi.MESSAGE,oi.TALK_ICON,oi.THUMBNAIL,oi.NOTE_ATTACHMENT,oi.NOTE_THUMBNAIL];var si=function(){};n["albero.entity.UploadUseTypeHelper"]=si,si.__name__=["albero","entity","UploadUseTypeHelper"],si.getUseTypeInt=function(e){switch(e[1]){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4;case 4:return 5;case 5:return 6}};var li=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))};n["albero.entity.UserIdentifier"]=li,li.__name__=["albero","entity","UserIdentifier"],li.prototype={__class__:li};var ui=function(e,t){this.high=e,this.low=t};n["haxe._Int64.___Int64"]=ui,ui.__name__=["haxe","_Int64","___Int64"],ui.prototype={__class__:ui};var ci=function(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=P.option(e.last_used_at))};n["albero.entity.UserPresence"]=ci,ci.__name__=["albero","entity","UserPresence"],ci.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(Na.ucompare(t.low,e.low)<0){n--;n|=0}var r=new ui(n,i),a=ci.SIXTY_MINUTES,o=r.high-a.high|0;if(o=0!=o?o:Na.ucompare(r.low,a.low),(r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0)return _i.GT_60;var s=ci.FIFTEEN_MINUTES,l=r.high-s.high|0;return l=0!=l?l:Na.ucompare(r.low,s.low),(r.high<0?s.high<0?l:-1:s.high>=0?l:1)>0?_i.LT_OR_EQ_60:_i.LT_OR_EQ_15},ci.prototype={toState:function(e){var t=e,n=P.map(this.lastUsedAtOpt,function(e){return ci.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return _i.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(Na.ucompare(e.low,n.low)<0){i--;i|=0}var a=new ui(i,r),o=a.high-t.high|0;return o=0!=o?o:Na.ucompare(a.low,t.low),(a.high<0?t.high<0?o:-1:t.high>=0?o:1)>0},__class__:ci};var _i=n["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};_i.LT_OR_EQ_15=["LT_OR_EQ_15",0],_i.LT_OR_EQ_15.toString=i,_i.LT_OR_EQ_15.__enum__=_i,_i.LT_OR_EQ_60=["LT_OR_EQ_60",1],_i.LT_OR_EQ_60.toString=i,_i.LT_OR_EQ_60.__enum__=_i,_i.GT_60=["GT_60",2],_i.GT_60.toString=i,_i.GT_60.__enum__=_i,_i.__empty_constructs__=[_i.LT_OR_EQ_15,_i.LT_OR_EQ_60,_i.GT_60];var hi=function(e){this.success=e};n["albero.entity.api.message.AddFavoriteMessageResult"]=hi,hi.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],hi.prototype={__class__:hi};var di=function(e){this.success=e};n["albero.entity.api.message.DeleteFavoriteMessageResult"]=di,di.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],di.prototype={__class__:di};var fi=function(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r};n["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=fi,fi.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],fi.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:fi};var mi=function(e,t){var n=this;l.iter(t,function(t){var i=new pi(t),r=i.createdAt,a=e.high-r.high|0;a=0!=a?a:Na.ucompare(e.low,r.low),(e.high<0?r.high<0?a:-1:r.high>=0?a:1)<0?n.messageCreatedAtNew=i:n.messageCreatedAtOld=i})};n["albero.entity.api.message.SearchMessagesAroundDateTimeResult"]=mi,mi.__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],mi.prototype={__class__:mi};var pi=function(e){this.messageId=e.message_id,this.createdAt=e.created_at};n["albero.entity.api.message.MessageCreatedAt"]=pi,pi.__name__=["albero","entity","api","message","MessageCreatedAt"],pi.prototype={__class__:pi};var gi=function(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n};n["albero.entity.api.note.CreateNoteError"]=gi,gi.__name__=["albero","entity","api","note","CreateNoteError"],gi.prototype={__class__:gi};var vi=function(e){this.note=new Hi(e),this.emitterKey=null};n["albero.entity.api.note.CreateNoteResult"]=vi,vi.__name__=["albero","entity","api","note","CreateNoteResult"],vi.prototype={updateWithEmitterKey:function(e){var t=new vi;return t.note=this.note,t.emitterKey=e,t},__class__:vi};var yi=function(e){this.result=e};n["albero.entity.api.note.DeleteNoteResult"]=yi,yi.__name__=["albero","entity","api","note","DeleteNoteResult"],yi.prototype={__class__:yi};var Si=function(e){this.note=new Hi(e)};n["albero.entity.api.note.GetNoteResult"]=Si,Si.__name__=["albero","entity","api","note","GetNoteResult"],Si.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()},getLockedUserIdWithoutSelf:function(e){return this.note.getLockedUserIdWithoutSelf(e)},__class__:Si};var wi=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=x.asArray(e.contents).map(function(e){return new nr(e)}))};n["albero.entity.api.note.GetNoteStatusesResult"]=wi,wi.__name__=["albero","entity","api","note","GetNoteStatusesResult"],wi.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:wi};var Ti=function(e){this.note=new Hi(e)};n["albero.entity.api.note.UpdateNoteResult"]=Ti,Ti.__name__=["albero","entity","api","note","UpdateNoteResult"],Ti.prototype={__class__:Ti};var Ii=function(e){this.note=new Hi(e)};n["albero.entity.api.note.UpdateNoteSettingResult"]=Ii,Ii.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],Ii.prototype={__class__:Ii};var Ei=function(){};n["albero.entity.file.DummyFileUtil"]=Ei,Ei.__name__=["albero","entity","file","DummyFileUtil"],Ei.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob};var Ni=function(e){null!=e&&(this.fileId=e.file_id,this.status=e.status,this.filePreviewFileId=e.file_preview_file_id,this.url=e.url,this.key=e.key)};n["albero.entity.file.FilePreview"]=Ni,Ni.__name__=["albero","entity","file","FilePreview"],Ni.prototype={__class__:Ni};var Ai=function(){};n["albero.entity.file.StageType"]=Ai,Ai.__name__=["albero","entity","file","StageType"],Ai.prototype={__class__:Ai};var bi=function(e,t){this.talkId=e,this.paneType=t};n["albero.entity.file.StageTypeTalk"]=bi,bi.__name__=["albero","entity","file","StageTypeTalk"],bi.__interfaces__=[Ai],bi.prototype={toString:function(){var e=this.talkId;return"staged__"+e.high+"_"+e.low+tn.toPanePrefix(this.paneType)},isForPane:function(e){return this.paneType==e},isForNote:function(){return!1},isForPreview:function(){return!1},__class__:bi};var Di=function(){};n["albero.entity.file.StageTypeNote"]=Di,Di.__name__=["albero","entity","file","StageTypeNote"],Di.__interfaces__=[Ai],Di.prototype={toString:function(){return"staged_note_"},isForPane:function(e){return!1},isForNote:function(){return!0},isForPreview:function(){return!1},__class__:Di};var ki=function(){};n["albero.entity.message.IFavoriteMessageEvent"]=ki,ki.__name__=["albero","entity","message","IFavoriteMessageEvent"],ki.prototype={__class__:ki};var Ci=function(e){this.message=new Wt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.AddFavoriteMessageEvent"]=Ci,Ci.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Ci.__interfaces__=[ki],Ci.prototype={getMessage:function(){return this.message},getMessageId:function(){return this.message.id},isFavorite:function(){return!0},getDomainId:function(){return this.domainId},getTalkId:function(){return this.talkId},__class__:Ci};var Oi=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.DeleteFavoriteMessageEvent"]=Oi,Oi.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Oi.__interfaces__=[ki],Oi.prototype={getMessageId:function(){return this.messageId},isFavorite:function(){return!1},__class__:Oi};var Mi=function(){};n["albero.entity.message.IMessageContentForActionReply"]=Mi,Mi.__name__=["albero","entity","message","IMessageContentForActionReply"],Mi.prototype={__class__:Mi};var Fi=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.title=e.title,this.revision=e.revision,this.deleted=e.deleted,this.hasAttachments=!!e.has_attachments)};n["albero.entity.message.MessageContentForNote"]=Fi,Fi.__name__=["albero","entity","message","MessageContentForNote"],Fi.prototype={__class__:Fi};var Ri=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.title=e.title)};n["albero.entity.message.MessageContentForNoteDeleted"]=Ri,Ri.__name__=["albero","entity","message","MessageContentForNoteDeleted"],Ri.prototype={__class__:Ri};var xi=function(e){this.text=La.None,this.stampsetId=F.fromIntOrInt64(e.stampset_id),this.stampId=F.fromIntOrInt64(e.stamp_id),null!=e.text&&(this.text=La.Some(e.text))};n["albero.entity.message.MessageContentForOriginalStamp"]=xi,xi.__name__=["albero","entity","message","MessageContentForOriginalStamp"],xi.prototype={hasValidText:function(){return P.isDefined(this.getValidText())},getValidText:function(){return P.filter(this.text,B.isNotEmpty)},__class__:xi};var Ui=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.options=e.options,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForSelectOneReply"]=Ui,Ui.__name__=["albero","entity","message","MessageContentForSelectOneReply"],Ui.__interfaces__=[Mi],Ui.prototype={getResponseIndex:function(){return this.response},__class__:Ui};var Pi=function(e){this.inReplyTo=e.in_reply_to,this.title=e.title,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.done=e.done,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForTodoReply"]=Pi,Pi.__name__=["albero","entity","message","MessageContentForTodoReply"],Pi.__interfaces__=[Mi],Pi.prototype={getResponseIndex:function(){return this.done?0:1},__class__:Pi};var Li=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.question=e.question,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForYesNoReply"]=Li,Li.__name__=["albero","entity","message","MessageContentForYesNoReply"],Li.__interfaces__=[Mi],Li.prototype={getResponseIndex:function(){return this.response?0:1},__class__:Li};var Bi=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};n["albero.entity.message.MessageFavorite"]=Bi,Bi.__name__=["albero","entity","message","MessageFavorite"],Bi.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:Bi};var Hi=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new tr(e.setting),this.noteRevision=new $i(e.note_revision),this.noteLocked=new Ji(e.locked))};n["albero.entity.note.Note"]=Hi,Hi.__name__=["albero","entity","note","Note"],Hi.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)},lock:function(e,t,n,i){this.noteRevision.revision==e&&this.noteLocked.lock(t,n,i)},unlock:function(e,t){this.noteRevision.revision==e&&this.noteLocked.unlock(t)},getLockedUserIdWithoutSelf:function(e){return this.noteLocked.getLockedUserIdWithoutSelf(e)},isSameTalkId:function(e){var t=this.talkId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low},__class__:Hi};var Gi=n["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT","FILES"]};Gi.TEXT=["TEXT",0],Gi.TEXT.toString=i,Gi.TEXT.__enum__=Gi,Gi.FILES=["FILES",1],Gi.FILES.toString=i,Gi.FILES.__enum__=Gi,Gi.__empty_constructs__=[Gi.TEXT,Gi.FILES];var Yi=function(){};n["albero.entity.note.NoteContentTypeHelper"]=Yi,Yi.__name__=["albero","entity","note","NoteContentTypeHelper"],Yi.createNoteContentType=function(e){if(null==e)return _r._e("["+s.dateStr(new Date)+"] ","no value.","","","",""),null;switch(e){case 1:return Gi.TEXT;case 5:return Gi.FILES;default:return _r._e("["+s.dateStr(new Date)+"] ","value is not expected.","","","",""),null}},Yi.getValue=function(e){if(null==e)return _r._e("["+s.dateStr(new Date)+"] ","no content type.","","","",""),null;switch(e[1]){case 0:return 1;case 1:return 5}};var zi=function(e){this.value=e};n["albero.entity.note.NoteId"]=zi,zi.__name__=["albero","entity","note","NoteId"],zi.__interfaces__=[Bt],zi.createDummyId=function(){var e,t=zi.nextDummyId,n=zi.nextDummyId;if(null==n)e=null;else{var i=new ui(0,1),r=n.high-i.high|0,a=n.low-i.low|0;if(Na.ucompare(n.low,i.low)<0){r--;r|=0}e=new ui(r,a)}return zi.nextDummyId=e,new zi(t)},zi.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()},isDummy:function(){return this.value.high<0},__class__:zi};var Ki=function(e,t,n,i,r,a,o){this.state=Wi.SENDING,this.talkId=e,this.noteId=t,this.title=n,this.text=i,this.fileInfos=r,this.emitterKey=a,this.createMessage=null==o||o};n["albero.entity.note.NoteLocalEdit"]=Ki,Ki.__name__=["albero","entity","note","NoteLocalEdit"],Ki.prototype={hasEmitterKey:function(){return null!=this.emitterKey},getEmitterKey:function(){return this.emitterKey},setState:function(e){this.state=e},getTalkId:function(){return this.talkId},getNoteId:function(){return this.noteId},getTitle:function(){return this.title},getText:function(){return this.text},getContent:function(){switch(this.getContentType()[1]){case 0:return this.text;case 1:return{files:this.getUploadedFilesData(),text:null==this.text?"":this.text}}},getFileInfos:function(){return this.fileInfos},getState:function(){return this.state},isSending:function(){return this.state==Wi.SENDING},isFailed:function(){switch(this.state[1]){case 0:case 6:return!1;case 1:case 2:case 3:case 4:case 5:return!0}},isForCreate:function(){return this.noteId.isDummy()},canNotSend:function(){return 0!=this.getUnuploadedFileInfos().length},getContentType:function(){return this.fileInfos.length>0?Gi.FILES:Gi.TEXT},getUnuploadedFileInfos:function(){return this.fileInfos.filter(function(e){return e.isNotUploaded()})},getUploadedFilesData:function(){return this.fileInfos.map(function(e){return e.getUploadedFileData()}).filter(function(e){return null!=e})},createNoteRevisionSummary:function(e){var t=new er;return t.revision=0,t.contentType=this.getContentType(),t.title=this.title,t.contentSummary=this.text,t.createdBy=e,t.createdAt=k.nowAsInt64(),t.contentFiles=this.fileInfos,t},conflict:function(){this.state=Wi.FAILED_BY_CONFLICT},deleted:function(){this.state=Wi.FAILED_BY_NOT_FOUND},getCreateMessage:function(){return this.createMessage},__class__:Ki};var Wi=n["albero.entity.note.NoteLocalEditState"]={__ename__:["albero","entity","note","NoteLocalEditState"],__constructs__:["SENDING","FAILED_BY_CONFLICT","FAILED_BY_NOT_FOUND","FAILED_BY_NOT_FOUND_FORWARDING","FAILED_BY_FILE","FAILED_BY_UNKNOWN","COMPLETED"]};Wi.SENDING=["SENDING",0],Wi.SENDING.toString=i,Wi.SENDING.__enum__=Wi,Wi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",1],Wi.FAILED_BY_CONFLICT.toString=i,Wi.FAILED_BY_CONFLICT.__enum__=Wi,Wi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],Wi.FAILED_BY_NOT_FOUND.toString=i,Wi.FAILED_BY_NOT_FOUND.__enum__=Wi,Wi.FAILED_BY_NOT_FOUND_FORWARDING=["FAILED_BY_NOT_FOUND_FORWARDING",3],Wi.FAILED_BY_NOT_FOUND_FORWARDING.toString=i,Wi.FAILED_BY_NOT_FOUND_FORWARDING.__enum__=Wi,Wi.FAILED_BY_FILE=function(e,t){var n=["FAILED_BY_FILE",4,e,t];return n.__enum__=Wi,n.toString=i,n},Wi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",5],Wi.FAILED_BY_UNKNOWN.toString=i,Wi.FAILED_BY_UNKNOWN.__enum__=Wi,Wi.COMPLETED=["COMPLETED",6],Wi.COMPLETED.toString=i,Wi.COMPLETED.__enum__=Wi,Wi.__empty_constructs__=[Wi.SENDING,Wi.FAILED_BY_CONFLICT,Wi.FAILED_BY_NOT_FOUND,Wi.FAILED_BY_NOT_FOUND_FORWARDING,Wi.FAILED_BY_UNKNOWN,Wi.COMPLETED];var ji=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.revision=e.revision,this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLockEvent"]=ji,ji.__name__=["albero","entity","note","NoteLockEvent"],ji.prototype={__class__:ji};var Vi=function(e){this.value=e};n["albero.entity.note.NoteLockExpiredAt"]=Vi,Vi.__name__=["albero","entity","note","NoteLockExpiredAt"],Vi.prototype={fromNow:function(){var e=this.value,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)-(new Date).getTime()|0},calcRelockDelay:function(){return.9*this.fromNow()|0},__class__:Vi};var qi=n["albero.entity.note.NoteLockStateValue"]={__ename__:["albero","entity","note","NoteLockStateValue"],__constructs__:["FAILED_BY_CONFLICT","FAILED_BY_LOCKED","FAILED_BY_NOT_FOUND","FAILED_BY_UNKNOWN","COMPLETED","RELEASED"]};qi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",0],qi.FAILED_BY_CONFLICT.toString=i,qi.FAILED_BY_CONFLICT.__enum__=qi,qi.FAILED_BY_LOCKED=function(e){var t=["FAILED_BY_LOCKED",1,e];return t.__enum__=qi,t.toString=i,t},qi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],qi.FAILED_BY_NOT_FOUND.toString=i,qi.FAILED_BY_NOT_FOUND.__enum__=qi,qi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",3],qi.FAILED_BY_UNKNOWN.toString=i,qi.FAILED_BY_UNKNOWN.__enum__=qi,qi.COMPLETED=function(e){var t=["COMPLETED",4,e];return t.__enum__=qi,t.toString=i,t},qi.RELEASED=["RELEASED",5],qi.RELEASED.toString=i,qi.RELEASED.__enum__=qi,qi.__empty_constructs__=[qi.FAILED_BY_CONFLICT,qi.FAILED_BY_NOT_FOUND,qi.FAILED_BY_UNKNOWN,qi.RELEASED];var Qi=function(e){this.value=e};n["albero.entity.note.NoteLockState"]=Qi,Qi.__name__=["albero","entity","note","NoteLockState"],Qi.prototype={isCompleted:function(){return 4==this.value[1]},getExpiredAtOrNull:function(){var e=this.value;return 4==e[1]?e[2]:null},isLockedByOther:function(){return 1==this.value[1]},getLockedUser:function(){var e=this.value;return 1==e[1]?e[2]:null},__class__:Qi};var Ji=function(e){null!=e&&(this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLocked"]=Ji,Ji.__name__=["albero","entity","note","NoteLocked"],Ji.prototype={lock:function(e,t,n){this.expiredAt=n,this.deviceId=t,this.userId=e},unlock:function(e){var t=this.userId;null!=t&&null!=e&&t.high==e.high&&t.low==e.low&&(this.expiredAt=null,this.userId=null,this.deviceId=null)},getLockedUserIdWithoutSelf:function(e){var t,n=this.deviceId;if(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)return null;if(null!=this.expiredAt){var i=this.expiredAt,r=i.high,a=i.low;t=4294967296*r+(a>=0?a:a+4294967296)<=(new Date).getTime()}else t=!0;return t?null:this.userId},__class__:Ji};var Xi=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.talkId=e.talk_id,this.setting=new tr(e.setting))};n["albero.entity.note.NotePartialUpdateForSetting"]=Xi,Xi.__name__=["albero","entity","note","NotePartialUpdateForSetting"],Xi.prototype={__class__:Xi};var Zi=function(e){null!=e&&(this.noteId=new zi(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new er(e.note_revision_summary))};n["albero.entity.note.NotePartialUpdateForSummary"]=Zi,Zi.__name__=["albero","entity","note","NotePartialUpdateForSummary"],Zi.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:Zi};var $i=function(e){if(this.contentFiles=[],null!=e){switch(this.revision=e.revision,this.title=e.title,this.contentType=Yi.createNoteContentType(e.content_type),this.contentType[1]){case 0:this.contentText=e.content;break;case 1:if(this.contentText=null==e.content.text?"":e.content.text,null!=e.content.files)for(var t=0,n=Za.__cast(e.content.files,Array);t>2)),r+=g.string(a.charAt(63&(o<<4|s>>4))),r+=g.string(a.charAt(63&(s<<2|l>>6))),r+=g.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=g.string(a.charAt(u>>2)),r+=g.string(a.charAt(63&(u<<4|c>>4))),r+=g.string(a.charAt(c<<2&63))}else if(n==i+1){var _=t.b[n++];r+=g.string(a.charAt(_>>2)),r+=g.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},or.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=s.substr(e,0,t));var n=e.length,i=e,r=or.CODES;null==r&&(r=or.initCodes(),or.CODES=r);for(var a=0,o=3&n,l=a+(n-o),u=new Ga(new Po(3*(n>>2)+(o>=2?o-1:0))),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 m=r[i.charCodeAt(a++)],p=r[i.charCodeAt(a++)];if(u.b[c++]=255&(m<<2|p>>4),3==o){var g=r[i.charCodeAt(a++)];u.b[c++]=255&(p<<4|g>>2)}}return u};var sr=function(){};n["albero.js.KatakanaToRoman"]=sr,sr.__name__=["albero","js","KatakanaToRoman"],sr.assureConvertTable=function(){return null!=sr.convertTable?sr.convertTable:(sr.convertTable=new Ha,l.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=sr.convertTable,n=e[0],i=e[1];null!=Uo[n]?t.setReserved(n,i):t.h[n]=i}),sr.convertTable)},sr.matchNext=function(e,t){var n=sr.assureConvertTable();if(t+1=pr.HIRAGANA_SMALL_A&&o<=pr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(pr.KATAKANA_SMALL_A-pr.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},pr.katakanaToRoman=function(e){return(new sr).convert(e)},pr.normalize=function(e){return new gr(null).normalize(e)},pr.normalizeForFile=function(e){return new gr(null).normalizeForFile(e)},pr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var gr=function(e){this.beforeTask=null,this.beforeTask=e};n["albero.js.Normalizer"]=gr,gr.__name__=["albero","js","Normalizer"],gr.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Xa&&(e=e.val),_r._e("["+s.dateStr(new Date)+"] ","invalid character:",e,"","",""),cr.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Xa&&(e=e.val),_r._e("["+s.dateStr(new Date)+"] ","invalid character:",e,"","",""),cr.localize("TextCanonicalizer.invalid")}},__class__:gr};var vr=function(){};n["albero.js.WebSocket"]=vr,vr.__name__=["albero","js","WebSocket"],vr.prototype={__class__:vr};var yr=function(){};n["albero.js.WebSocketFactory"]=yr,yr.__name__=["albero","js","WebSocketFactory"],yr.newInstance=function(e,t){return new Sr(e,t)};var Sr=function(e,t){this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong,this.ws=new WebSocket(e),Ro.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=yo(this,this.onOpen),this.ws.onmessage=yo(this,this.onMessage),this.ws.onerror=yo(this,this.onError),this.ws.onclose=yo(this,this.onClose)};n["albero.js.WebSocketForBrowser"]=Sr,Sr.__name__=["albero","js","WebSocketForBrowser"],Sr.__interfaces__=[vr],Sr.prototype={onOpen:function(e){_r._i("["+s.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryData(e),this.onmessage(t)}},getBinaryData:function(e){return Ro.websocketsbinary?Ga.ofData(new Lo(e.data)):or.decode(e.data)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){_r._e("["+s.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+g.string(e.code)+" "+g.string(e.reason)+" "+g.string(e.wasClean);_r._i("["+s.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,this.ws.close()},send:function(e){Ro.websocketsbinary?this.ws.send(new Lo(e.b.bufferValue).buffer):this.ws.send(or.encode(e))},ping:function(e){this.send(new Ga(new Po(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Sr};var wr=function(){};n["puremvc.interfaces.IProxy"]=wr,wr.__name__=["puremvc","interfaces","IProxy"],wr.prototype={__class__:wr};var Tr=function(){};n["albero.proxy.AccessTokenResolverProxy"]=Tr,Tr.__name__=["albero","proxy","AccessTokenResolverProxy"],Tr.__interfaces__=[wr],Tr.prototype={__class__:Tr};var Ir=function(){};n["albero.proxy.AccessTokenResolverProxyFactory"]=Ir,Ir.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ir.newInstance=function(){return new Nr("accessTokenResolver")};var Er=function(e,t){j.call(this),this.proxyName=null!=e?e:Er.NAME,null!=t&&this.setData(t)};n["puremvc.patterns.proxy.Proxy"]=Er,Er.__name__=["puremvc","patterns","proxy","Proxy"],Er.__interfaces__=[wr],Er.__super__=j,Er.prototype=r(j.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Er});var Nr=function(e){Er.call(this,e)};n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Nr,Nr.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Nr.__interfaces__=[Tr],Nr.__super__=Er,Nr.prototype=r(Er.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=xo.account?xo.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Nr});var Ar=function(){Er.call(this,"broadcast")};n["albero.proxy.AlberoBroadcastProxy"]=Ar,Ar.__name__=["albero","proxy","AlberoBroadcastProxy"],Ar.__super__=Er,Ar.prototype=r(Er.prototype,{handleNotification:function(e,t){var n=this;switch(e){case"notify_add_account_control_request":var i=new Be(t);this.dataStore.setAccountControlRequest(i),this.sendNotification(e,i);break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1]));break;case"notify_add_acquaintances":for(var r=t[1].map(yo(go=this.dataFactory,go.newAcquaintance)),a=0;at.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){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t){var n=this.dataStore.getTalk(e.talkId);if(null==n)return void _r._e("["+s.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(t=new ei).id=e.talkId,t.talkOrderingTimestamp=n.updatedAt}t.updateByTalkPushNotificationEvent(e)&&this.dataStore.setTalkStatus(t)},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new ei).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);null==t&&((t=new ei).id=e.talkId);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;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var t=this;if(!l.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);return null==n?(_r._e("["+s.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(n.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(n),n)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new ze).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:Ar});var br=function(){Er.call(this,"api")};n["albero.proxy.AlberoServiceProxy"]=br,br.__name__=["albero","proxy","AlberoServiceProxy"],br.__super__=Er,br.prototype=r(Er.prototype,{getOSString:function(){return"bot","bot"},createAccessToken:function(e,t,n){var i=this,r=e.split("$"),a=this.settings.getOs(),o=this.settings.getIDFV(),s=function(e){i.settings.setAccessToken(e),n(e)},l=function(e){i.sendNotification("Url",Fe.FORWARD(H.error))};-1==e.indexOf("@")&&2==r.length?this.wsApi.createAccessTokenById(r[1],r[0],t,o,a).then(s,l):this.wsApi.createAccessToken(e,t,o,a).then(s,l)},authorizeDevice:function(e,t){var n=this,i=this.settings.getIDFV();this.wsApi.authorizeDevice(e,i).then(function(e){t()},function(e){n.apiCaller.handleServerErrorDefault(e)})},createSession:function(e,t){var n=this;this.apiCaller.onSessionClear(),this.wsApi.createSession(e,"1.122",null).then(function(e){var i=k.nowAsInt64();e.passwordExpiration.isExpired(i)?n.sendNotification("password_expiration_overed"):(e.passwordExpiration.needWarning(i,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(k.oneDayAfterAsInt64()),n.sendNotification("password_expiration_warned")),n.apiCaller.onSessionCreated(),t(e),n.apiCaller.fireCallbacksWaitingForSession())},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",te.AUTHORIZE);n.apiCaller.handleServerErrorDefault(e)}n.settings.clearAccessToken(),n.sendNotification("Url",Fe.FORWARD(H.error))})},startNotification:function(){var e=this;this.wsApi.startNotification().then(function(t){t||(e.dataStore.clear(!0),e.sendNotification("start_notification_failed"))},function(t){e.apiCaller.handleServerErrorDefault(t)})},resetNotification:function(e){var t=this;this.wsApi.resetNotification().then(e,function(e){t.apiCaller.handleServerErrorDefault(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.wsApi.createMessage(a,r.type,r.content).then(function(r){i.dataStore.setMessage(r),i.sendNotification("create_message_complete",[r,o.id]),i.forwardMessages(e,t,n+1),i.dataStore.removeMessage(o.id)},function(e){if(i.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Qr.toLocalError(Yt.SendingMessageConflicted,e);i.sendNotification("error_occurred",t)}else i.sendNotification("error_occurred",e)})}},deleteMessage:function(e,t){var n=this;this.wsApi.deleteMessage(e,t).then(function(e){},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=Qr.toLocalError(Yt.DeletingMessageConflicted,e);return void n.sendNotification("error_occurred",t)}n.sendNotification("error_occurred",e)}})},updateReadStatuses:function(e,t){var n=this;this.wsApi.updateReadStatuses(e,t).then(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)},function(e){n.apiCaller.handleServerErrorDefault(e)})},searchMessagesAroundDateTime:function(e,t){return this.wsApi.searchMessagesAroundDateTime(e,t)},uploadV2:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a),this.prepareMessageFileAsync(n.file,n.thumb,e).then(function(e){r._createMessage(t,jt.file,e,a,i)},function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return _r._w("["+s.dateStr(new Date)+"] ","WARNING method: upload",o,"","",""),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMultiV2:function(e,t,n,i,r){var a=this,o=this.dataFactory.newDummyMultipleFileMessage(t,n,i);this.sendNotification("create_message_start",o);for(var s=Promise.resolve([]),l=0;l0&&(s.text=n),a._createMessage(t,jt.textMultipleFile,s,o,r)}},function(e){a.sendNotification("create_message_fail",[e,o],r)})},uploadMultiForHubot:function(e,t,n,i){var r=this.dataStore.getTalk(e),a=n.map(function(e){return{file:e,thumb:null}});if(null==r){var o=this.dataFactory.newDummyMultipleFileMessage(e,t,a),l={code:400,message:"invalid talk_id (deleted talk)"};return _r._w("["+s.dateStr(new Date)+"] ","WARNING method: uploadMulti",l,"","",""),void this.sendNotification("create_message_fail",[l,o],i)}this.uploadMultiV2(r.domainId,r.id,t,a,i)},prepareMessageFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,oi.THUMBNAIL,function(n){t.setAuth(n),e(La.Some(t))},function(t){e(La.None)}):e(La.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,oi.MESSAGE,function(n){var i=pr.normalizeForFile(e.name),a=C.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},prepareNoteFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,oi.NOTE_THUMBNAIL,function(n){t.setAuth(n),e(La.Some(t))},function(t){e(La.None)}):e(La.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,oi.NOTE_ATTACHMENT,function(n){var i=pr.normalizeForFile(e.name),a=C.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},uploadFile:function(e,t,n,i,r){var a=this,o=e,l=pr.normalizeForFile(o.name),u=o.type,c=o.size;this.wsApi.createUploadAuth(l,u,c,t,n).then(function(t){a.fileService.upload(t,u,e).then(function(e){i(t.rawValue)},function(e){var t="failed to upload: "+g.string(e);_r._e("["+s.dateStr(new Date)+"] ",t,"","","","");var i=new qr({code:null,detail:null,message:e});if(n!=oi.THUMBNAIL&&n!=oi.NOTE_THUMBNAIL&&n!=oi.NOTE_ATTACHMENT){var o=Qr.toLocalError(Yt.GeneralFileError,i);a.sendNotification("error_occurred",o)}r(i)})},function(e){if(n!=oi.THUMBNAIL&&n!=oi.NOTE_THUMBNAIL&&n!=oi.NOTE_ATTACHMENT&&null!=e)if(502==e.code&&null!=e.detail){var t=F.fromIntOrInt64(e.detail.limit_max);if("file_size"==e.detail.limit_target){var i=Qr.toLocalError(Yt.UploadSizeOvered(t),e);a.sendNotification("error_occurred",i)}else if("storage_size"==e.detail.limit_target){var o=Qr.toLocalError(Yt.StorageSizeOvered(t),e);a.sendNotification("error_occurred",o)}}else a.sendNotification("error_occurred",e);r(e)})},createDownloadAuth:function(e,t,n,i,r){this.wsApi.createDownloadAuth(e,t,n).then(function(e){i(e)},function(e){r(e)})},deleteAttachment:function(e,t){var n=this;this.wsApi.deleteAttachment(e,t).then(function(e){},function(e){n.apiCaller.handleServerErrorDefault(e)})},getAttachments:function(e,t){var n=this;null==t&&(t={sinceId:null,maxId:null}),this.wsApi.getAttachments(e,20,t.sinceId,t.maxId).then(function(t){l.iter(t,function(e){n.dataStore.setTalkFileInfo(e,!0)}),n.sendNotification("get_file_responsed",{talkId:e,files:t})},function(e){n.apiCaller.handleServerErrorDefault(e)})},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,Wt.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",[e,a],i),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,r=this.settings.getSelectedDomainId();if(null!=r){e=null==e?{sinceId:null,maxId:null}:e;var a=this.apiCaller,o=e.sinceId,s=e.maxId,l=$t.orderToInt(t);a.call("get_announcements",[r,20,o,s,l],function(e){var a=e.map(yo(go=i.dataFactory,go.newAnnouncement));i.sendNotification("notify_get_announcements",{domainId:r,announcements:a,sortOrder:t,callerKey:n})})}},getAnnouncementStatuses:function(e){var t=this;this.apiCaller.call("get_announcement_statuses",[],function(n){for(var i=0;i0&&400==e.code&&"invalid file_id"==e.message&&(a.setState(Wi.FAILED_BY_NOT_FOUND_FORWARDING),o.dataStore.setNoteLocalEdit(a.getNoteId(),a)),null!=a&&400==e.code&&"invalid talk_id"==e.message){var i=zt.getNoteForwardingForbiddenError(),r=Qr.toLocalError(i,e);return o.sendNotification("error_occurred",r),Promise.reject(e)}return o.sendNotification("error_occurred",e),Promise.reject(e)})},updateNoteSetting:function(e,t,n){var i=this;return new Promise(function(r,a){i.apiCaller.call("update_note_setting",[e.value,t,n],function(e){r(new Ii(e))},a)}).then(function(e){return i.sendNotification("update_note_setting_completed",e),e},function(t){return 404==t.code?(i.dataStore.setNote(e,null),i.sendNotification("update_note_setting_failed_by_not_found",e),Promise.reject(t)):409==t.code&&"conflict"==t.message?(i.dataStore.setNote(e,null),i.sendNotification("update_note_setting_failed_by_conflict",e),Promise.reject(t)):409==t.code&&"locked by another user"==t.message&&null!=t.detail&&null!=t.detail.user_id&&null!=t.detail.device_id?(i.sendNotification("update_note_setting_failed_by_editing",e),Promise.reject(t)):(i.sendNotification("error_occurred",t),Promise.reject(t))})},updateNote:function(e,t,n,i,r,a,o){var s=this;return new Promise(function(o,l){var u=Yi.getValue(i);s.apiCaller.callApiReliable("update_note",[e.value,t,n,u,r,a],function(e){o(new Ti(e))},l,yo(s,s.retryTimeForCreateOrUpdateNoteFromError))}).then(function(t){return null!=o&&s.dataStore.setNoteLocalEdit(e,null),s.dataStore.setNote(e,t.note),s.sendNotification("update_note_completed",t),t},function(t){return 404==t.code?(null!=o?(o.setState(Wi.FAILED_BY_NOT_FOUND),s.dataStore.setNoteLocalEdit(e,o)):s.dataStore.setNote(e,null),Promise.reject(t)):409==t.code&&"conflict"==t.message?(null!=o?(o.setState(Wi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)):s.dataStore.setNote(e,null),Promise.reject(t)):409==t.code&&"locked by another user"==t.message&&null!=t.detail&&null!=t.detail.user_id&&null!=t.detail.device_id?(null!=o&&(o.setState(Wi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)),Promise.reject(t)):(null!=o&&(o.setState(Wi.FAILED_BY_UNKNOWN),s.dataStore.setNoteLocalEdit(e,o)),s.sendNotification("error_occurred",t),Promise.reject(t))})},deleteNote:function(e){var t=this;return new Promise(function(n,i){t.apiCaller.call("delete_note",[e.value],function(e){n(new yi(e))},i)}).then(function(e){return t.sendNotification("delete_note_completed",e),e},function(n){return 404==n.code&&t.dataStore.setNote(e,null),t.sendNotification("error_occurred",n),Promise.reject(n)})},lockNote:function(e,t,n){var i=this;return new Promise(function(e,r){i.apiCaller.call("lock_note",[t.value,n],e,r)}).then(function(e){var r=i.dataStore.getNote(t);if(null!=r){var a=i.dataStore.me.id,o=i.settings.getDeviceId();r.lock(n,a,o,e)}return new Qi(qi.COMPLETED(new Vi(e)))}).catch(function(n){if(400==n.code)return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN);if(403==n.code)return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN);if(404==n.code)return i.dataStore.setNote(t,null),new Qi(qi.FAILED_BY_NOT_FOUND);if(409==n.code&&"locked by another user"==n.message&&null!=n.detail&&null!=n.detail.user_id&&null!=n.detail.device_id){var r=i.dataStore.getUser(e,n.detail.user_id);return new Qi(qi.FAILED_BY_LOCKED(r))}return 409==n.code&&"conflict"==n.message?new Qi(qi.FAILED_BY_CONFLICT):(i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN))})},unlockNote:function(e,t,n){var i=this;return new Promise(function(e,r){i.apiCaller.call("unlock_note",[t.value,n],e,r)}).then(function(e){var r=i.dataStore.getNote(t);return null!=r&&r.unlock(n,i.dataStore.me.id),new Qi(qi.RELEASED)}).catch(function(n){if(400==n.code)return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN);if(403==n.code)return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN);if(404==n.code)return i.dataStore.setNote(t,null),new Qi(qi.FAILED_BY_NOT_FOUND);if(409==n.code&&"conflict"==n.message)return new Qi(qi.FAILED_BY_CONFLICT);if(409==n.code&&"locked by another user"==n.message&&null!=n.detail&&null!=n.detail.user_id&&null!=n.detail.device_id){var r=i.dataStore.getUser(e,n.detail.user_id);return new Qi(qi.FAILED_BY_LOCKED(r))}return i.sendNotification("error_occurred",n),new Qi(qi.FAILED_BY_UNKNOWN)})},retryTimeForCreateOrUpdateNoteFromError:function(e){return this.shouldRetryCreateOrUpdateNote(e)?La.Some(this.apiCaller.retryTimeForReplicationLag()):La.None},shouldRetryCreateOrUpdateNote:function(e){return null!=e.code&&(500==e.code?"Internal Error (IllegalStateException)"==e.message:400==e.code&&"invalid file_id"==e.message)},__class__:kr});var Cr=function(){Er.call(this,"appState")};n["albero.proxy.AppStateProxy"]=Cr,Cr.__name__=["albero","proxy","AppStateProxy"],Cr.__super__=Er,Cr.prototype=r(Er.prototype,{start:function(){this.updateLastActivityAt(),this.checkInactiveInterval()},activateAppIfNeed:function(){this.updateLastActivityAt(),this.appState==N.Inactive&&this.setAppState(N.Active)},setAppState:function(e){this.appState=e,this.sendNotification("app_state_changed",this.appState)},updateLastActivityAt:function(){this.lastActivityAt=new Date},checkInactiveInterval:function(){this.checkInactive(),new ka(500).run=yo(this,this.checkInactive)},checkInactive:function(){this.appState!=N.Inactive&&((new Date).getTime()-this.lastActivityAt.getTime()<2e3||this.setAppState(N.Inactive))},__class__:Cr});var Or=function(){var e=new ui(-1,-1);this.dummyFileId=e;var t=new ui(-1,-1);this.dummyMsgId=t,Er.call(this,"dataFactory")};n["albero.proxy.DataFactoryProxy"]=Or,Or.__name__=["albero","proxy","DataFactoryProxy"],Or.__super__=Er,Or.prototype=r(Er.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 Et(e)},newDomain:function(e){return this.dataStore.setDomainIfLatest(new ft(e))},newDomainInvite:function(e){return this.dataStore.setDomainInvite(new Tt(e))},newTalk:function(e){return this.dataStore.setTalk(new zn(e))},newTalkStatus:function(e){return this.dataStore.setTalkStatus(new ei(e))},newDummyMessage:function(e,t,n){var i=this,r=new Wt;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 ui(0,1),l=o.high-s.high|0,u=o.low-s.low|0;if(Na.ucompare(o.low,s.low)<0){l--;l|=0}a=new ui(l,u)}this.dummyMsgId=a;var c=[];switch(r.type[1]){case 4:c=[this.createDummyFileInfo(r,r.content)];break;case 5:c=Za.__cast(r.content.files,Array).map(function(e){return i.createDummyFileInfo(r,e)})}return this.dataStore.setMessageWithFileInfos(r,c),r},newDummyFileMessage:function(e,t){var n=this.createFileInfoDynamic(t);return this.newDummyMessage(e,jt.file,n)},newDummyMultipleFileMessage:function(e,t,n){var i=l.array(n.filter(function(e){return null!=e.file}).map(yo(this,this.createFileInfoDynamic)));return this.newDummyMessage(e,jt.textMultipleFile,{text:t,files:i})},createFileInfoDynamic:function(e){var t=e.file;return{content_type:t.type,content_size:t.size,name:pr.normalizeForFile(t.name),file:t,localThumbInfo:e.thumb}},createDummyFileInfo:function(e,t){var n,i=Ct.fromMessageAndFileWithFileId(e,t,this.dummyFileId),r=this.dummyFileId;if(null==r)n=null;else{var a=new ui(0,1),o=r.high-a.high|0,s=r.low-a.low|0;if(Na.ucompare(r.low,a.low)<0){o--;o|=0}n=new ui(o,s)}return this.dummyFileId=n,i},newQuestion:function(e){return this.dataStore.setQuestion(new dn(e))},newAnnouncement:function(e){return new Ye(e)},newAnnouncementStatus:function(e){return this.dataStore.setAnnouncementStatus(new ze(e))},newAnnouncementStatusForDomain:function(e){var t=new ze;return t.domainId=e,this.dataStore.setAnnouncementStatus(t)},newAccountControlRequest:function(e){return this.dataStore.setAccountControlRequest(new Be(e))},newAccountControlGroup:function(e){return this.dataStore.setAccountControlGroup(new xe(e))},newUserPresence:function(e,t){var n=new ci(e,t);return this.dataStore.setUserPresence(n),n},__class__:Or});var Mr=function(){this.departmentStore=new at,this.stampStore=new Pn,this.questionStore=new yn,this.fileInfoStore=new Ft,this.messageStore=new Xt,this.conferenceStore=new Xe,this.solutionStore=new Fn,this.directAppStore=new _t,this.flowNotificationBadgeStore=new xt,Er.call(this,"dataStore")};n["albero.proxy.DataStoreProxy"]=Mr,Mr.__name__=["albero","proxy","DataStoreProxy"],Mr.__super__=Er,Mr.prototype=r(Er.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!=Uo[i]?e.setReserved(i,u):e.h[i]=u}this.storageForUsers.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new Ha);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=Uo[n]?i.setReserved(n,e):i.h[n]=e},getUserPresence:function(e){if(null==this.userPresences)return null;var t="_"+e.high+"_"+e.low,n=this.userPresences;return null!=Uo[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=yo(this,this.setUserIfLatest),r=n;l.iter(t,function(e){i(r,e)})},clearDomainUsers:function(e){this.users.remove("_"+e.high+"_"+e.low)&&this.storageForUsers.setDirtyFlag()},clearUsersDepartments:function(e){var t="_"+e.high+"_"+e.low,n=this.users,i=null!=Uo[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new Ba(i,i.arrayKeys());r.hasNext();){var a=r.next();a.user.departments=null,this.sendNotification("notify_update_user",a.user)}this.storageForUsers.setDirtyFlag()},removeFriend:function(e,t){var n="_"+e.high+"_"+e.low,i=this.users,r=null!=Uo[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=Uo[a]?r.getReserved(a):r.h[a];null!=o&&(o.type=2)}this.storageForUsers.setDirtyFlag()},removeAcquaintance:function(e,t){this.removeFriend(e,t)},getUser:function(e,t){if(null==t)return null;var n,i=new ui(0,0);if(t.high==i.high&&t.low==i.low)return null;if(null!=this.me){var r=this.me.id;n=null!=r&&null!=t&&r.high==t.high&&r.low==t.low}else n=!1;if(n)return this.me.toDomainUser(e);var a="_"+e.high+"_"+e.low,o=this.users,s=null!=Uo[a]?o.getReserved(a):o.h[a];if(null!=s){var l="_"+t.high+"_"+t.low,u=null!=Uo[l]?s.getReserved(l):s.h[l];if(null!=u)return u.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!=Uo[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new ui(0,0);if(t.high==i.high&&t.low==i.low)return null;var r=n.me.id;if(null!=r&&null!=t&&r.high==t.high&&r.low==t.low)return n.me.toDomainUser(e);var o="_"+t.high+"_"+t.low,s=null!=Uo[o]?a.getReserved(o):a.h[o];return null!=s?s.user:null});for(var o=[],s=a.arrayKeys(),l=new Ba(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 Ba(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!=Uo[t]?n.getReserved(t):n.h[t]},getValidPairTalk:function(e,t){var n=this;return null==this.me?null:l.find(this.getTalks(),function(i){if(!w.enumEq(i.type,Wn.PairTalk))return!1;var r=i.domainId;return null!=r&&null!=t&&r.high==t.high&&r.low==t.low&&(!!l.exists(i.userIds,function(t){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})&&!!l.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!=Uo[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.storageForUsers.setDirtyFlag(),this.sendNotification("notify_update_user",s))}else{var m={type:2,user:s};null!=Uo[u]?r.setReserved(u,m):r.h[u]=m,this.storageForUsers.setDirtyFlag(),this.sendNotification("notify_update_user",s)}}return this.storageForTalks.setDirtyFlag(),e},getTalks:function(){for(var e=[],t=this.talks.keys();t.hasNext();){var n=t.next(),i=this.talks;e.push(null!=Uo[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){l.iter(e,yo(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=Uo[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}this.questionStore.removeTalkQuestions(e),this.talks.remove("_"+e.high+"_"+e.low),this.storageForTalks.setDirtyFlag()},getTalkStatuses:function(){for(var e=[],t=this.talkStatuses.keys();t.hasNext();){var n=t.next(),i=this.talks;if(null!=Uo[n]?i.existsReserved(n):i.h.hasOwnProperty(n)){var r=this.talkStatuses;e.push(null!=Uo[n]?r.getReserved(n):r.h[n])}}return e},getTalkStatus:function(e){var t="_"+e.high+"_"+e.low,n=this.talkStatuses;return null!=Uo[t]?n.getReserved(t):n.h[t]},setTalkStatus:function(e){var t=e.id,n="_"+t.high+"_"+t.low;if(null!=this.domainUnreadCounts){var i=this.talks,r=null!=Uo[n]?i.getReserved(n):i.h[n];if(null!=r){var a=r.domainId;this.domainUnreadCounts.remove("_"+a.high+"_"+a.low)}}var o=this.talkStatuses;return null!=Uo[n]?o.setReserved(n,e):o.h[n]=e,this.sendNotification("brand_badge_changed"),this.storageForTalkStatuses.setDirtyFlag(),e},removeTalkStatus:function(e){var t="_"+e.high+"_"+e.low;if(null!=this.domainUnreadCounts){var n=this.talks,i=null!=Uo[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}this.talkStatuses.remove(t),this.storageForTalkStatuses.setDirtyFlag()},getDomains:function(){for(var e=[],t=this.domains,n=new Ba(t,t.arrayKeys());n.hasNext();){var i=n.next();e.push(i)}return e},getDomain:function(e){var t="_"+e.high+"_"+e.low,n=this.domains;return null!=Uo[t]?n.getReserved(t):n.h[t]},setDomainIfLatest:function(e){var t,n=e.id,i="_"+n.high+"_"+n.low,r=this.domains,a=null!=Uo[i]?r.getReserved(i):r.h[i];if(null!=a){var o=e.updatedAt,s=a.updatedAt,l=o.high-s.high|0;l=0!=l?l:Na.ucompare(o.low,s.low),t=(o.high<0?s.high<0?l:-1:s.high>=0?l:1)>=0}else t=!0;if(t){var u=this.domains;return null!=Uo[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!=Uo[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 Ha,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=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(y.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(y.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!=Uo[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__:Lr});var Br=function(){};n["albero.proxy.KeywordParser"]=Br,Br.__name__=["albero","proxy","KeywordParser"],Br.parse=function(e){var t=y.htmlEscape(e,!0),n=new o(""(.*?)"","g").map(t,function(e){return Br.encodeSpace(e.matched(1))});return new o("[  ]","g").split(n).filter(B.isNotEmpty).map(Br.decodeSpace).map(Br.createParsedKeyword)},Br.encodeSpace=function(e){return y.replace(y.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},Br.decodeSpace=function(e){return y.replace(y.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},Br.createParsedKeyword=function(e){var t=new o("\\[type:([A-Za-z]+)\\](.*)","g");if(t.match(e)){var n=t.matched(1),i=t.matched(2),r=Yr.getKeywordTypeByMessageTypeString(n);if(r!=Gr.normal)return new Hr(r,i)}return new Hr(Gr.normal,e)};var Hr=function(e,t){this.type=e,this.word=t};n["albero.proxy.ParsedKeyword"]=Hr,Hr.__name__=["albero","proxy","ParsedKeyword"],Hr.prototype={__class__:Hr};var Gr=n["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};Gr.normal=["normal",0],Gr.normal.toString=i,Gr.normal.__enum__=Gr,Gr.selectOneReplyOnly=["selectOneReplyOnly",1],Gr.selectOneReplyOnly.toString=i,Gr.selectOneReplyOnly.__enum__=Gr,Gr.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],Gr.yesOrNoReplyOnly.toString=i,Gr.yesOrNoReplyOnly.__enum__=Gr,Gr.todoDoneOnly=["todoDoneOnly",3],Gr.todoDoneOnly.toString=i,Gr.todoDoneOnly.__enum__=Gr,Gr.__empty_constructs__=[Gr.normal,Gr.selectOneReplyOnly,Gr.yesOrNoReplyOnly,Gr.todoDoneOnly];var Yr=function(){};n["albero.proxy.KeywordTypeHelper"]=Yr,Yr.__name__=["albero","proxy","KeywordTypeHelper"],Yr.getKeywordType=function(e){return null!=e?Yr.getKeywordTypeByMessageTypeString(Wt.typeString(e)):Gr.normal},Yr.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return Gr.selectOneReplyOnly;case"todoDone":return Gr.todoDoneOnly;case"yesOrNoReply":return Gr.yesOrNoReplyOnly}return Gr.normal},Yr.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==jt.selectOneReply;case 2:return e==jt.yesOrNoReply;case 3:return e==jt.todoDone}},Yr.createFilterClassStringFromMessageType=function(e){return Yr.createFilterClassString(Yr.getKeywordType(e))},Yr.createFilterClassString=function(e){return"keyword_type_"+g.string(e)};var zr=function(){this.isCallingUpdateLastUsedAt=!1,Er.call(this,"lastUsedAtUpdater")};n["albero.proxy.LastUsedAtUpdaterProxy"]=zr,zr.__name__=["albero","proxy","LastUsedAtUpdaterProxy"],zr.__super__=Er,zr.prototype=r(Er.prototype,{startPolling:function(e){var t=this;if(null==this.pollingTimer){var n,i=this.getLastUsedExpiredAt();if(null==i)n=0;else{var r=i.high,a=i.low;n=4294967296*r+(a>=0?a:a+4294967296)-(new Date).getTime()}n>0?ka.delay(function(){t.startPolling(e)},0|n):(this.isCallingUpdateLastUsedAt=!0,e(),this.pollingTimer=new ka(6e5),this.pollingTimer.run=function(){t.isCallingUpdateLastUsedAt||(t.isCallingUpdateLastUsedAt=!0,e())})}},stopPolling:function(){null!=this.pollingTimer&&(this.pollingTimer.stop(),this.pollingTimer=null)},getLastUsedExpiredAt:function(){return null!=this.lastUsedExpiredAtCache?this.lastUsedExpiredAtCache:this.settings.getLastUsedExpiredAt()},update:function(){this.lastUsedExpiredAtCache=k.afterAsInt64(6e5),this.settings.setLastUsedExpiredAt(this.lastUsedExpiredAtCache),this.isCallingUpdateLastUsedAt=!1},cancel:function(){this.isCallingUpdateLastUsedAt=!1},__class__:zr});var Kr=function(){Er.call(this,"limitations")};n["albero.proxy.LimitationsProxy"]=Kr,Kr.__name__=["albero","proxy","LimitationsProxy"],Kr.__super__=Er,Kr.prototype=r(Er.prototype,{getMaxTalkers:function(){var e=this,t=P.flatMap(P.flatMap(P.option(this.settings.getSelectedDomainId()),function(t){return P.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__:Kr});var Wr=function(){this.connectionStatus=A.Ok,Er.call(this,"rpc"),this.responseHandlers=new Ua,this.connectionKeeper=new jr(yo(this,this.ping))};n["albero.proxy.MsgPackRpcProxy"]=Wr,Wr.__name__=["albero","proxy","MsgPackRpcProxy"],Wr.__super__=Er,Wr.prototype=r(Er.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=yr.newInstance(xo.endpoint,{onopen:yo(this,this.onOpen),onmessage:yo(this,this.onMessage),onclose:yo(this,this.onClose),onpong:yo(this,this.onPong)}),Wr.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.close();var e=this.ws;return this.ws=null,Wr.pingAt=null,this.lastUsedAtUpdater.stopPolling(),e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=A.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){Wr.pingAt=null;g.string(e)},onMessage:function(e){var t=new no(e,!0).o,n=Za.__cast(t[0],Ao);if(1==n&&4==t.length){var i=Za.__cast(t[1],Ao),r=t[2],a=t[3],o=this.responseHandlers.h[i];if(null==o)return void _r._e("["+s.dateStr(new Date)+"] ","No ResponseHandler prepared. msgId:%s error:%s result:",i,r,a,"");o.method;if(null==r)o.onSuccess(a);else{var l=o.method;_r._e("["+s.dateStr(new Date)+"] ","Receive Error Response. method:",l," error:",r,""),o.onError(r)}this.responseHandlers.remove(i)}else if(0==n&&4==t.length){var u=Za.__cast(t[1],Ao),c=Za.__cast(t[2],String),_=Za.__cast(t[3],Array);if(0==_.length)return void _r._e("["+s.dateStr(new Date)+"] ","empty params.","","","","");if(this.broadcast.handleNotification(c,_[0]),null==this.ws)return void _r._e("["+s.dateStr(new Date)+"] ","websocket was finished.","","","","");this.ws.send(new io([1,u,null,!0]).o.getBytes())}},onClose:function(e,t,n){_r._i("["+s.dateStr(new Date)+"] ","onClose. code:"+e+", reason:"+t+", wasClean:"+(null==n?"null":""+n),"","","",""),1001==e&&n||(this.connectionStatus=1e3!=e&&1005!=e||"concurrent access"!=t?1e3!=e&&1005!=e||"forcibly closed"!=t?A.Error:A.ForcibliyClosedError:A.ConcurrentAccessError,this.connectionStatus==A.ForcibliyClosedError?this.sendNotification("SignOut"):this.sendNotification("Url",Fe.FORWARD(H.error))),this.finishWebSocket(),this.connectionKeeper.setConnected(!1)},restart:function(e){null==e&&(e=500);for(var t=this,n=this.finishWebSocket(),i=this.responseHandlers.keys();i.hasNext();){var r=i.next();this.responseHandlers.remove(r)}var a=null;a=function(){null==n||n.isClosed()?t.initWebSocket():ka.delay(a,100)},ka.delay(a,e)},call:function(e,t,n,i){if(null!=this.ws){null==t&&(t=[]),null==n&&(n=function(e){}),null==i&&(i=yo(this,this.onServerError));var r=Wr.lastMsgId++,a=this.responseHandlers,o=new Vr(e,n,i);a.h[r]=o;var l=new io([0,r,e,t]).o.getBytes();this.ws.send(l)}else{var u=this.data;_r._e("["+s.dateStr(new Date)+"] ","disconnected. data:",u,"","","")}},ping:function(){switch(this.connectionStatus[1]){case 2:case 3:return}if(null==this.ws||this.ws.isClosed()){this.restart();Wr.pingAt,g.string(null==this.ws||this.ws.isClosed())}else{Wr.pingAt;this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),Wr.pingAt=(new Date).getTime())}},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__:Wr});var jr=function(e){this.connected=!1,this.ping=e};n["albero.proxy._MsgPackRpcProxy.ConnectionKeeper"]=jr,jr.__name__=["albero","proxy","_MsgPackRpcProxy","ConnectionKeeper"],jr.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 ka(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=ka.delay(r,n)}})(3e3)()}},deleteTimer:function(){null!=this.timer&&(this.timer.stop(),this.timer=null)},__class__:jr};var Vr=function(e,t,n){this.method=e,this.onSuccess=t,this.onError=n};n["albero.proxy._MsgPackRpcProxy.ResponseHandler"]=Vr,Vr.__name__=["albero","proxy","_MsgPackRpcProxy","ResponseHandler"],Vr.prototype={__class__:Vr};var qr=function(e){this.code=e.code,this.message=e.message,this.detail=e.detail};n["albero.proxy.Error"]=qr,qr.__name__=["albero","proxy","Error"],qr.prototype={__class__:qr};var Qr=function(){};n["albero.proxy.ErrorConverter"]=Qr,Qr.__name__=["albero","proxy","ErrorConverter"],Qr.toLocalError=function(e,t){return{code:t.code,message:t.message,detail:t.detail,localErrorType:e}};var Jr=function(){Er.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new Ha,this.updateReadAnnouncementStatusesTimers=new Ha};n["albero.proxy.ReadStatusUpdaterProxy"]=Jr,Jr.__name__=["albero","proxy","ReadStatusUpdaterProxy"],Jr.__super__=Er,Jr.prototype=r(Er.prototype,{updateReadStatuses:function(e,t){var n=this,i=this.dataStore.getTalkStatus(e);if(null!=i&&i.updateByReadingMessages(t,this.dataStore.me.id)){this.dataStore.setTalkStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadStatusesTimers,o=null!=Uo[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadMessageId,l=ka.delay(function(){n.updateReadStatusesTimers.remove(r),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,s)},1e3),u=this.updateReadStatusesTimers;null!=Uo[r]?u.setReserved(r,l):u.h[r]=l}},updateAnnouncementReadStatus:function(e,t){var n=this,i=this.dataStore.getAnnouncementStatus(e);if(null!=i&&i.updateByReadingAnnouncements(t)){this.dataStore.setAnnouncementStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadAnnouncementStatusesTimers,o=null!=Uo[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadAnnouncementId;o=ka.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(r),n.api.updateAnnouncementReadStatus(e,s)},1e3);var l=this.updateReadAnnouncementStatusesTimers;null!=Uo[r]?l.setReserved(r,o):l.h[r]=o}},__class__:Jr});var Xr=function(){Er.call(this,"routing")};n["albero.proxy.RoutingProxy"]=Xr,Xr.__name__=["albero","proxy","RoutingProxy"],Xr.__super__=Er,Xr.prototype=r(Er.prototype,{onRegister:function(){},init:function(){null==this.router&&(this.router=new Zr(this,this.settings,this.dataStore),this.sendNotification("first_routing_will_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.stop()},__class__:Xr});var Zr=function(e,t,n){this.proxy=e,this.settings=t,this.dataStore=n,this.urlConverterDelegate=new $r(t,n)};n["albero.proxy._RoutingProxy.LocalRouter"]=Zr,Zr.__name__=["albero","proxy","_RoutingProxy","LocalRouter"],Zr.prototype={notify:function(e){var t=this.getDomainId(e);this.settings.setSelectedDomainId(t),this.proxy.sendNotification("current_page_changed",e)},forward:function(e){0!=e[1]&&this.notify(e)},redirect:function(e,t){},redirectWithHash:function(){},back:function(){this.notify(this.prev)},stop:function(){},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 7:return e[2];case 11: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__:Zr};var $r=function(e,t){this.settings=e,this.dataStore=t};n["albero.proxy.UrlConverterDelegate"]=$r,$r.__name__=["albero","proxy","UrlConverterDelegate"],$r.__interfaces__=[K],$r.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return P.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e;switch(P.flatMap(this.getLastSelectedDomainId(),yo(this,this.getDomain))[1]){case 0:e=P.flatMap(this.getLastSelectedDomainId(),yo(this,this.getDomain));break;case 1:e=this.getOldestDomain()}return P.map(e,function(e){return e.id})},getDomain:function(e){return P.option(this.dataStore.getDomain(e))},getOldestDomain:function(){return new Nt(this.dataStore.getDomains()).getOldestDomain()},__class__:$r};var ea=function(){Er.call(this,"searchService")};n["albero.proxy.SearchServiceProxy"]=ea,ea.__name__=["albero","proxy","SearchServiceProxy"],ea.__super__=Er,ea.prototype=r(Er.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 In(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 Ha),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new Ha);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(function(){(n+=1)==t.length&&i()}):i();var r=0,a=function(){2==(r+=1)&&e.api.getTalks(i)};e.api.getFriends(a),e.api.getAcquaintances(a)}),e.api.getAccountControlRequests(function(){e.api.getDomainInvites(i)}),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=x.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:Na.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;t0&&"_"==e.charAt(0)?F.makeFromIdStr(e):F.parse(e)},ya.stringifyInt64=function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:Aa.toString(e)},ya.prototype={from:function(e){return ya._from(e)},__class__:ya};var Sa=function(e){this.value=e};n["albero_cli.value.ID"]=Sa,Sa.__name__=["albero_cli","value","ID"],Sa.prototype={toString:function(){return Aa.toString(this.value)},toDaabID:function(){var e=this.value;return"_"+e.high+"_"+e.low},toInt64:function(){return this.value},eq:function(e){if(this==e)return!0;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},__class__:Sa};var wa=function(){};n["albero_cli.value.note.DeleteNoteResult"]=wa,wa.__name__=["albero_cli","value","note","DeleteNoteResult"],wa.of=function(e){return new wa},wa.prototype={__class__:wa};var Ta=function(e){this.note=e};n["albero_cli.value.note.GetNoteResult"]=Ta,Ta.__name__=["albero_cli","value","note","GetNoteResult"],Ta.of=function(e){return new Ta(ha.of(e.note))},Ta.prototype={__class__:Ta};var Ia=function(e){this.note=e};n["albero_cli.value.note.UpdateNoteResult"]=Ia,Ia.__name__=["albero_cli","value","note","UpdateNoteResult"],Ia.of=function(e){return new Ia(ha.of(e.note))},Ia.prototype={__class__:Ia};var Ea=function(){};n["haxe.IMap"]=Ea,Ea.__name__=["haxe","IMap"],Ea.prototype={__class__:Ea};var Na={};n["haxe._Int32.Int32_Impl_"]=Na,Na.__name__=["haxe","_Int32","Int32_Impl_"],Na.ucompare=function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0};var Aa={};n["haxe._Int64.Int64_Impl_"]=Aa,Aa.__name__=["haxe","_Int64","Int64_Impl_"],Aa.toString=function(e){var t=e,n=new ui(0,0);if(t.high==n.high&&t.low==n.low)return"0";var i="",r=!1;t.high<0&&(r=!0);for(var a=new ui(0,10);;){var o=new ui(0,0);if(t.high==o.high&&t.low==o.low)break;var s=Aa.divMod(t,a);if(s.modulus.high<0){var l=s.modulus,u=~l.high,c=-l.low;if(0==c){u++;u|=0}i=new ui(u,c).low+i;var _=s.quotient,h=~_.high,d=-_.low;if(0==d){h++;h|=0}t=new ui(h,d)}else i=s.modulus.low+i,t=s.quotient}return r&&(i="-"+i),i},Aa.divMod=function(e,t){if(0==t.high)switch(t.low){case 0:throw new Xa("divide by zero");case 1:return{quotient:new ui(e.high,e.low),modulus:new ui(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 ui(r,a)}else{n=new ui(e.high,e.low)}if(t.high<0){var o=~t.high,s=-t.low;if(0==s){o++;o|=0}t=new ui(o,s)}else t=t;for(var l=new ui(0,0),u=new ui(0,1);!(t.high<0);){var c=Na.ucompare(t.high,n.high),_=0!=c?c:Na.ucompare(t.low,n.low),h=1;if(0==(h&=63))t=new ui(t.high,t.low);else if(h<32){t=new ui(t.high<>>32-h,t.low<>>32-d,u.low<=0)break}for(;;){var f=new ui(0,0);if(u.high==f.high&&u.low==f.low)break;var m=Na.ucompare(n.high,t.high);if((0!=m?m:Na.ucompare(n.low,t.low))>=0){l=new ui(l.high|u.high,l.low|u.low);var p=n.high-t.high|0,g=n.low-t.low|0;if(Na.ucompare(n.low,t.low)<0){p--;p|=0}n=new ui(p,g)}var v=1;if(0==(v&=63))u=new ui(u.high,u.low);else if(v<32){u=new ui(u.high>>>v,u.high<<32-v|u.low>>>v)}else{u=new ui(0,u.high>>>v-32)}var y=1;if(0==(y&=63))t=new ui(t.high,t.low);else if(y<32){t=new ui(t.high>>>y,t.high<<32-y|t.low>>>y)}else{t=new ui(0,t.high>>>y-32)}}if(i){var S=~l.high,w=-l.low;if(0==w){S++;S|=0}l=new ui(S,w)}if(e.high<0){var T=~n.high,I=-n.low;if(0==I){T++;T|=0}n=new ui(T,I)}return{quotient:l,modulus:n}};var ba=function(){};n["haxe.Int64Helper"]=ba,ba.__name__=["haxe","Int64Helper"],ba.parseString=function(e){var t=new ui(0,10),n=new ui(0,0),i=new ui(0,1),r=!1,a=y.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,l=0,u=o;l9)throw new Xa("NumberFormatError");var h=new ui(_>>31,_);if(r){var d=65535&i.low,f=i.low>>>16,m=65535&h.low,p=h.low>>>16,g=Na._mul(d,m),v=Na._mul(f,m),S=Na._mul(d,p),w=g,T=(Na._mul(f,p)+(S>>>16)|0)+(v>>>16)|0;if(w=w+(S<<=16)|0,Na.ucompare(w,S)<0){T++;T|=0}if(w=w+(v<<=16)|0,Na.ucompare(w,v)<0){T++;T|=0}T=T+(Na._mul(i.low,h.high)+Na._mul(i.high,h.low)|0)|0;var I=new ui(T,w),E=n.high-I.high|0,N=n.low-I.low|0;if(Na.ucompare(n.low,I.low)<0){E--;E|=0}if(!((n=new ui(E,N)).high<0))throw new Xa("NumberFormatError: Underflow")}else{var A=65535&i.low,b=i.low>>>16,D=65535&h.low,k=h.low>>>16,C=Na._mul(A,D),O=Na._mul(b,D),M=Na._mul(A,k),F=C,R=(Na._mul(b,k)+(M>>>16)|0)+(O>>>16)|0;if(F=F+(M<<=16)|0,Na.ucompare(F,M)<0){R++;R|=0}if(F=F+(O<<=16)|0,Na.ucompare(F,O)<0){R++;R|=0}R=R+(Na._mul(i.low,h.high)+Na._mul(i.high,h.low)|0)|0;var x=new ui(R,F),U=n.high+x.high|0,P=n.low+x.low|0;if(Na.ucompare(P,n.low)<0){U++;U|=0}if((n=new ui(U,P)).high<0)throw new Xa("NumberFormatError: Overflow")}var L=65535&i.low,B=i.low>>>16,H=65535&t.low,G=t.low>>>16,Y=Na._mul(L,H),z=Na._mul(B,H),K=Na._mul(L,G),W=Y,j=(Na._mul(B,G)+(K>>>16)|0)+(z>>>16)|0;if(W=W+(K<<=16)|0,Na.ucompare(W,K)<0){j++;j|=0}if(W=W+(z<<=16)|0,Na.ucompare(W,z)<0){j++;j|=0}j=j+(Na._mul(i.low,t.high)+Na._mul(i.high,t.low)|0)|0,i=new ui(j,W)}return n};var Da=function(){this.buf=new v,this.cache=[],this.useCache=Da.USE_CACHE,this.useEnumIndex=Da.USE_ENUM_INDEX,this.shash=new Ha,this.scount=0};n["haxe.Serializer"]=Da,Da.__name__=["haxe","Serializer"],Da.run=function(e){var t=new Da;return t.serialize(e),t.toString()},Da.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Uo[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!=Uo[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=g.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[_]))}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+=g.string(h.getTime());break;case u:this.buf.b+="l";for(var d=e.h;null!=d;){var f=d.item;d=d.next;var m=f;this.serialize(m)}this.buf.b+="h";break;case Ua:this.buf.b+="q";for(var v=e,y=v.keys();y.hasNext();){var S=y.next();this.buf.b+=":",this.buf.b+=null==S?"null":""+S,this.serialize(v.h[S])}this.buf.b+="h";break;case Pa:this.buf.b+="M";for(var T=e,I=T.keys();I.hasNext();){var E=I.next(),N=p.field(E,"__id__");p.deleteField(E,"__id__"),this.serialize(E),E.__id__=N,this.serialize(T.h[E.__id__])}this.buf.b+="h";break;case Ha:this.buf.b+="b";for(var A=e,b=A.keys();b.hasNext();){var D=b.next();this.serializeString(D),this.serialize(null!=Uo[D]?A.getReserved(D):A.h[D])}this.buf.b+="h";break;case Ga:var k=e;this.buf.b+="s",this.buf.b+=g.string(Math.ceil(8*k.length/6)),this.buf.b+=":";var C=0,O=k.length-2,M=Da.BASE64_CODES;if(null==M){var F=Da.BASE64.length;M=new Array(F);for(var R=0,x=Da.BASE64.length;R>2]),this.buf.b+=String.fromCharCode(M[63&(P<<4|L>>4)]),this.buf.b+=String.fromCharCode(M[63&(L<<2|B>>6)]),this.buf.b+=String.fromCharCode(M[63&B])}if(C==O){var H=k.b[C++],G=k.b[C++];this.buf.b+=String.fromCharCode(M[H>>2]),this.buf.b+=String.fromCharCode(M[63&(H<<4|G>>4)]),this.buf.b+=String.fromCharCode(M[G<<2&63])}else if(C==O+1){var Y=k.b[C++];this.buf.b+=String.fromCharCode(M[Y>>2]),this.buf.b+=String.fromCharCode(M[Y<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(w.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(w.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var z=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=g.string(this.useEnumIndex?"j":"w"),this.serializeString(w.getEnumName(z)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=g.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var K=e.length;this.buf.b+=g.string(K-2);for(var W=2,j=K;W57)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(s.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw new Xa("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Xa("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 Xa("Invalid enum format");var n=this.readDigits();if(0==n)return w.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return w.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 Xa("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new Xa("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new Xa("Class not found "+r);var o=w.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new Xa("Invalid custom data");return o;case 77:var l=new Pa;this.cache.push(l);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var c=this.unserialize();l.set(c,this.unserialize())}return this.pos++,l;case 82:var _=this.readDigits();if(_<0||_>=this.scache.length)throw new Xa("Invalid string reference");return this.scache[_];case 97:this.buf;var h=[];for(this.cache.push(h);;){var d=this.buf.charCodeAt(this.pos);if(104==d){this.pos++;break}if(117==d){this.pos++;var f=this.readDigits();h[h.length+f-1]=null}else h.push(this.unserialize())}return h;case 98:var m=new Ha;this.cache.push(m);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=Uo[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 Xa("Class not found "+v);var S=w.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 T=this.unserialize(),I=this.resolver.resolveEnum(T);if(null==I)throw new Xa("Enum not found "+T);this.pos++;var E=this.readDigits(),N=I.__constructs__.slice()[E];if(null==N)throw new Xa("Unknown enum index "+T+"@"+E);var A=this.unserializeEnum(I,N);return this.cache.push(A),A;case 107:return NaN;case 108:var b=new u;this.cache.push(b);for(this.buf;104!=this.buf.charCodeAt(this.pos);)b.add(this.unserialize());return this.pos++,b;case 109:return-1/0;case 110:return null;case 111:var D={};return this.cache.push(D),this.unserializeObject(D),D;case 112:return 1/0;case 113:var k=new Ua;this.cache.push(k);this.buf;for(var C=this.buf.charCodeAt(this.pos++);58==C;){var O=this.readDigits(),M=this.unserialize();k.h[O]=M,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new Xa("Invalid IntMap format");return k;case 114:var F=this.readDigits();if(F<0||F>=this.cache.length)throw new Xa("Invalid reference");return this.cache[F];case 115:var R=this.readDigits(),x=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0))),G=0;P>4);var K=U[x.charCodeAt(P++)];H.b[G++]=255&(z<<4|K>>2);var W=U[x.charCodeAt(P++)];H.b[G++]=255&(K<<6|W)}if(L>=2){var j=U[x.charCodeAt(P++)],V=U[x.charCodeAt(P++)];if(H.b[G++]=255&(j<<2|V>>4),3==L){var q=U[x.charCodeAt(P++)];H.b[G++]=255&(V<<4|q>>2)}}return this.pos+=R,this.cache.push(H),H;case 116:return!0;case 118:var Q;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))Q=s.strDate(s.substr(this.buf,this.pos,19)),this.pos+=19;else{var J=this.readFloat();Q=new Date(J)}return this.cache.push(Q),Q;case 119:var X=this.unserialize(),Z=this.resolver.resolveEnum(X);if(null==Z)throw new Xa("Enum not found "+X);var $=this.unserializeEnum(Z,this.unserialize());return this.cache.push($),$;case 120:throw Xa.wrap(this.unserialize());case 121:var ee=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 Fa(e.left,e.key,e.value,new Fa(e.right,t,n,i)):new Fa(new Fa(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Fa(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 Fa(new Fa(e,t,n,i.left),i.key,i.value,i.right):new Fa(new Fa(e,t,n,i.left.left),i.left.key,i.left.value,new Fa(i.left.right,i.key,i.value,i.right))}return new Fa(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return p.compare(e,t)},__class__:Ma};var Fa=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};n["haxe.ds.TreeNode"]=Fa,Fa.__name__=["haxe","ds","TreeNode"],Fa.prototype={__class__:Fa};var Ra=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Ra.Left=function(e){var t=["Left",0,e];return t.__enum__=Ra,t.toString=i,t},Ra.Right=function(e){var t=["Right",1,e];return t.__enum__=Ra,t.toString=i,t},Ra.__empty_constructs__=[];var xa=function(){Ma.call(this)};n["haxe.ds.EnumValueMap"]=xa,xa.__name__=["haxe","ds","EnumValueMap"],xa.__interfaces__=[Ea],xa.__super__=Ma,xa.prototype=r(Ma.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 Ga(new Lo(t).buffer)},Ga.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ga(e)},Ga.fastGet=function(e,t){return e.bytes[t]},Ga.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Xa(qa.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__:Ga};var Ya=function(){this.b=[]};n["haxe.io.BytesBuffer"]=Ya,Ya.__name__=["haxe","io","BytesBuffer"],Ya.prototype={getBytes:function(){var e=new Ga(new Lo(this.b).buffer);return this.b=null,e},__class__:Ya};var za=function(){};n["haxe.io.Input"]=za,za.__name__=["haxe","io","Input"],za.prototype={readByte:function(){throw new Xa("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Xa(qa.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof Xa&&(e=e.val),!Za.__instanceof(e,Va))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new Ga(new Po(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new Xa(qa.Blocked);n+=i,e-=i}return t},readFloat:function(){return Qa.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?Qa.i64ToDouble(t,e):Qa.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__:za};var Ka=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 Xa(qa.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};n["haxe.io.BytesInput"]=Ka,Ka.__name__=["haxe","io","BytesInput"],Ka.__super__=za,Ka.prototype=r(za.prototype,{readByte:function(){if(0==this.len)throw new Xa(new Va);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Xa(qa.OutsideBounds);if(0==this.len&&n>0)throw new Xa(new Va);this.lene.length)throw new Xa(qa.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 Xa(qa.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(Qa.floatToI32(e))},writeDouble:function(e){var t=Qa.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 Xa(qa.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new Xa(qa.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new Xa(qa.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__:Wa};var ja=function(){this.b=new Ya};n["haxe.io.BytesOutput"]=ja,ja.__name__=["haxe","io","BytesOutput"],ja.__super__=Wa,ja.prototype=r(Wa.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 Xa(qa.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)},Qa.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},Qa.i64ToDouble=function(e,t){var n=(t>>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)},Qa.doubleToI64=function(e){var t=Qa.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 Ja=function(){};n["haxe.rtti.Meta"]=Ja,Ja.__name__=["haxe","rtti","Meta"],Ja.getMeta=function(e){return e.__meta__},Ja.getFields=function(e){var t=Ja.getMeta(e);return null==t||null==t.fields?{}:t.fields};var Xa=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,Xa)};n["js._Boot.HaxeError"]=Xa,Xa.__name__=["js","_Boot","HaxeError"],Xa.wrap=function(e){return e instanceof Error?e:new Xa(e)},Xa.__super__=Error,Xa.prototype=r(Error.prototype,{__class__:Xa});var Za=function(){};n["js.Boot"]=Za,Za.__name__=["js","Boot"],Za.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=Za.__nativeClassName(e);return null!=n?Za.__resolveNativeClass(n):null},Za.__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?",":"")+Za.__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+" : "+Za.__string_rec(e[f],t));return m+="\n"+(t=t.substring(1))+"}";case"string":return e;default:return String(e)}},Za.__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 Xa("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Xa("set() outside of range");for(var s=0,l=o.length;s223)return-256|n}}catch(e){if(e instanceof Xa&&(e=e.val),!Za.__instanceof(e,Va))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=p.fields(e),o=l.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 o=new mo(yo(e,e.handleNotification),e),s=0,l=a.length;s0&&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},So.prototype.on=So.prototype.addListener,So.prototype.once=function(e,t){if(!wo(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},So.prototype.removeListener=function(e,t){var n,i,r,a;if(!wo(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||wo(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(To(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},So.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(wo(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},So.prototype.listeners=function(e){return this._events&&this._events[e]?wo(this._events[e])?[this._events[e]]:this._events[e].slice():[]},So.listenerCount=function(e,t){return e._events&&e._events[t]?wo(e._events[t])?1:e._events[t].length:0};Co.exports;n.Math=Math;var Eo=Eo||{};Eo.exports=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,r={};((t,n)=>{for(var i in n)e(t,i,{get:n[i],enumerable:!0})})(r,{codePointCount:()=>o,extractMentionParts:()=>h,findMentionSuggestionHint:()=>f,hasMentionPartForMeOrAll:()=>l,invalidateManualMentionMarkup:()=>c,parseMessageMention:()=>_,removeMentionMarkup:()=>u});var a=e=>Array.from(e),o=e=>a(e).length,s=/{@:(ALL|\d+),(\d+)}@/g,l=e=>h(e).some(({userIdNumStr:e})=>null===e||"ALL"===e),u=e=>_(e).map(t=>"mention"===t.type?t.mentionText:"normal"===t.type?e.substring(t.start,t.end):"").join(""),c=e=>e.replace(s,e=>e.substring(0,e.length-1)+" "),_=e=>{let t=0;const n=h(e).flatMap(e=>{const n=[];return t!==e.start&&n.push({type:"normal",start:t,end:e.start}),n.push(e),t=e.end,n});return e.length!==t&&n.push({type:"normal",start:t,end:e.length}),n},h=e=>{let t=0;return Array.from(e.matchAll(s)).flatMap(n=>{var i;const r=null!=(i=n.index)?i:0;if(r{const t=e.match(d);return null===t?null:{prev:t[1],atMarks:t[2],keyword:t[3]}};return(r=>((r,a,o,s)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of n(a))i.call(r,l)||l===o||e(r,l,{get:()=>a[l],enumerable:!(s=t(a,l))||s.enumerable});return r})(e({},"__esModule",{value:!0}),r))(r)})();var No=Eo.exports;String.prototype.__class__=n.String=String,String.__name__=["String"],n.Array=Array,Array.__name__=["Array"],Date.prototype.__class__=n.Date=Date,Date.__name__=["Date"];var Ao=n.Int={__name__:["Int"]},bo=n.Dynamic={__name__:["Dynamic"]},Do=n.Float=Number;Do.__name__=["Float"];var ko=n.Bool=Boolean;ko.__ename__=["Bool"];var Co,Oo=n.Class={__name__:["Class"]},Mo={};(Co={}).exports=null,Co.exports={upload:function(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;for(var s in l.open("POST",t,!0),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 Fo=Co.exports,Ro={websocketsbinary:!0,audio:!1},xo={},Uo={},Po=t.ArrayBuffer||eo;null==Po.prototype.slice&&(Po.prototype.slice=eo.sliceImpl);var Lo=t.Uint8Array||to._new;E.APP_STATE_CHANGED="app_state_changed",E.ACCESS_TOKEN_CHANGED="access_token_changed",E.CURRENT_USER_CHANGED="current_user_changed",E.CONFIGURATION_CHANGED="configuration_changed",E.DOMAIN_SELECTION_CHANGED="domain_selection_changed",E.TALK_SELECTION_CHANGED="talk_selection_changed",E.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",E.USER_SELECTION_NEEDED="user_selection_needed",E.USER_SELECTION_CHANGED="user_selection_changed",E.FRIEND_SELECTION_NEEDED="friend_selection_needed",E.COMMON_STAMP_SET_LOADED="common_stamp_set_loaded",E.STAMP_SELECTION_STARTED="stamp_selection_started",E.STAMP_SELECTION_ENDED="stamp_selection_ended",E.STAMP_SELECTION_CHANGED="stamp_selection_changed",E.ACTION_SELECTION_CHANGED="action_selection_changed",E.CURRENT_PAGE_CHANGED="current_page_changed",E.CURRENT_PAGE_REASSIGNED="current_page_reassgined",E.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",E.NOTE_FILEINFO_SELECTION_CHANGED="note_fileinfo_selection_changed",E.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",E.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",E.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",E.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",E.CLOSE_FILEPREVIEW_MODAL="close_filepreview_modal",E.ERROR_OCCURRED="error_occurred",E.UNREAD_COUNT_CHANGED="brand_badge_changed",E.SEND_FORM_TOP_CHANGED="send_form_top_changed",E.SOLUTIONS_LOADED="solutions_loaded",E.RIGHT_PANE_OPENED="right_pane_opened",E.RIGHT_PANE_CLOSED="right_pane_closed",E.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",E.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",E.PHOTO_EDITOR_SAVED="photo_editor_saved",E.ICON_EDITOR_SAVED="icon_editor_saved",E.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",E.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",E.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",E.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",E.PRESENCES_UPDATED="presences_updated",E.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",E.START_NOTE_EDITING="start_note_editing",E.OPEN_EXISTING_PAIR_TALK_COMPLETED="open_existing_pair_talk_completed",E.FIRST_ROUTING_WILL_START="first_routing_will_start",E.SIGNED_OUT="signed_out",E.ROUTUNG_TALK_FALLBACK="routing_talk_fallback",E.ROUTUNG_DOMAIN_FALLBACK="routing_domain_fallback",E.TALKS_SORT_MODE_CHANGED="talks_sort_mode_changed",E.DATA_RECOVERING="data_recovering",E.DATA_RECOVERED="data_recovered",E.NOTIFY_UPDATE_USER="notify_update_user",E.NOTIFY_ADD_FRIEND="notify_add_friend",E.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",E.NOTIFY_ADD_ACQUAINTANCES="notify_add_acquaintances",E.NOTIFY_DELETE_FRIEND="notify_delete_friend",E.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",E.NOTIFY_DELETE_ACQUAINTANCES="notify_delete_acquaintances",E.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",E.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",E.GET_USERS_RESPONSED="get_users_responsed",E.GET_PROFILE_RESPONSED="get_profile_responsed",E.GET_PROFILE_ERRORED="get_profile_errored",E.UPDATE_USER_RESPONSED="update_user_responsed",E.UPDATE_USER_ERRORED="update_user_errored",E.UPDATE_PROFILE_RESPONSED="update_profile_responsed",E.UPDATE_PROFILE_ERRORED="update_profile_errored",E.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",E.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",E.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",E.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",E.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",E.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",E.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",E.GET_ME_RESPONSED="get_me_responsed",E.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",E.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",E.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",E.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",E.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",E.NOTIFY_JOIN_DOMAIN="notify_join_domain",E.NOTIFY_UPDATE_DOMAIN="notify_update_domain",E.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",E.NOTIFY_ADD_DOMAIN_MEMBERS="notify_add_domain_members",E.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",E.CREATE_PAIR_TALK_COMPLETE="create_pair_talk_complete",E.CREATE_PAIR_TALK_FAIL="create_pair_talk_fail",E.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",E.CREATE_GROUP_TALK_COMPLETE="create_group_talk_complete",E.CREATE_GROUP_TALK_FAIL="create_group_talk_fail",E.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",E.UPDATE_GROUP_TALK_COMPLETE="update_group_talk_complete",E.UPDATE_GROUP_TALK_FAIL="update_group_talk_fail",E.NOTIFY_ADD_TALKERS="notify_add_talkers",E.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",E.NOTIFY_DELETE_TALKER="notify_delete_talker",E.NOTIFY_DELETE_TALK="notify_delete_talk",E.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",E.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",E.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",E.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",E.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",E.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",E.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",E.ADD_TALKERS_SUCCEEDED="add_talkers_succeeded",E.ADD_TALKERS_FAILED="add_talkers_failed",E.NOTIFY_CREATE_MESSAGE="notify_create_message",E.NOTIFY_DELETE_MESSAGE="notify_delete_message",E.NOTIFY_GET_MESSAGES="notify_get_messages",E.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",E.CREATE_MESSAGE_START="create_message_start",E.CREATE_MESSAGE_COMPLETE="create_message_complete",E.CREATE_MESSAGE_FAIL="create_message_fail",E.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",E.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",E.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",E.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",E.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",E.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",E.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",E.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",E.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",E.CREATE_ANNOUNCEMENT_START="create_announcement_start",E.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",E.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",E.NOTIFY_UPDATE_QUESTION="notify_update_question",E.NOTIFY_GET_QUESTIONS="get_questions_responsed",E.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",E.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",E.GET_FILE_RESPONSED="get_file_responsed",E.GET_FILE_PREVIEW="get_file_preview",E.CREATE_FILE_PREVIEW="create_file_preview",E.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",E.GET_NOTE_LOADED="get_note_loaded",E.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",E.CREATE_NOTE_COMPLETED="create_note_completed",E.CREATE_NOTE_FAILED="create_note_failed",E.UPDATE_NOTE_LOCAL_EDIT="update_note_local_edit",E.CLEAR_NOTE_LOCAL_EDIT="clear_note_local_edit",E.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",E.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",E.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",E.UPDATE_NOTE_SETTING_FAILED_BY_EDITING="update_note_setting_failed_by_editing",E.UPDATE_NOTE_COMPLETED="update_note_completed",E.DELETE_NOTE_COMPLETED="delete_note_completed",E.NOTIFY_CREATE_NOTE="notify_create_note",E.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",E.NOTIFY_DELETE_NOTE="notify_delete_note",E.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",E.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",E.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",E.NOTIFY_LOCK_NOTE="notify_lock_note",E.NOTIFY_UNLOCK_NOTE="notify_unlock_note",E.NOTIFY_SEARCH_MESSAGES="notify_search_messages",E.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",E.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",E.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",E.NOTIFY_SEARCH_PREPARE="notify_search_prepare",E.NOTIFY_SEARCH_CLEAR="notify_search_clear",E.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",E.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",E.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",E.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",E.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",E.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",E.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",E.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",E.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",E.JOIN_CONFERENCE_CANCELED="join_conference_canceled",E.GET_CONFERENCE_PARTICIPANTS_RESPONSED="get_conference_participants_responsed",E.NOTIFY_OPEN_CONFERENCE="notify_open_conference",E.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",E.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",E.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",E.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",E.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",E.NOTIFY_UPDATE_DOMAIN_STAMP_SETTING="notify_update_domain_stampsetting",E.NOTIFY_UPDATE_STAMPSET="notify_update_stampset",E.NOTIFY_DELETE_STAMPSET="notify_delete_stampset",E.NOTIFY_UPDATE_DOMAIN_BUILTIN_STAMP_SETTING="notify_update_domain_builtin_stampsetting",E.NOTIFY_FLOW_NOTIFICATION_BADGE="notify_flow_notification_badge",E.GET_FLOW_NOTIFICATION_BADGES_COMPLETED="get_flow_notification_badges_completed",E.GET_FLOW_NOTIFICATION_BADGES_FAILED="get_flow_notification_badges_failed",E.GET_DIRECT_APPS_COMPLETED="get_direct_apps_completed",E.GET_DIRECT_APPS_FAILED="get_direct_apps_failed",E.START_NOTIFICATION_FAILED="start_notification_failed",z.ANNOUNCEMENTS_KEY="-1",J.__meta__={fields:{api:{inject:null}}},J.NAME="AccountControlRequest",Z.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Z.NAME="Conference",ee.__meta__={fields:{api:{inject:null}}},ee.NAME="Device",ne.__meta__={fields:{api:{inject:null}}},ne.NAME="Domain",re.__meta__={fields:{api:{inject:null}}},re.NAME="File",oe.__meta__={fields:{api:{inject:null}}},oe.NAME="FilePreview",se.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},se.NAME="LoadStampset",ce.__meta__={fields:{api:{inject:null}}},ce.NAME="ManageFriends",he.__meta__={fields:{api:{inject:null}}},he.NAME="Message",fe.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},fe.NAME="Note",pe.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},pe.NAME="Read",ve.__meta__={fields:{api:{inject:null}}},ve.NAME="ReloadData",Se.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},Se.NAME="Search",Te.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},Te.NAME="SelectTalk",Ee.__meta__={fields:{api:{inject:null}}},Ee.NAME="Send",Ne.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},Ne.NAME="SignIn",Ae.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},Ae.NAME="SignOut",be.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},be.NAME="Talk",ke.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},ke.NAME="UpdateProfile",Ce.__meta__={fields:{api:{inject:null}}},Ce.NAME="UpdateUser",Oe.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Oe.NAME="UpdateUserPresences",Oe.MAX_USERS_PER_API=100,Me.__meta__={fields:{routing:{inject:null}}},Me.NAME="Url",je.TalkAutoScrollDelay=1,je.TalkAutoScrollImmediately=2,je.TalkAutoScrollNone=3,je.TalksSortModeNewMessagesFirst="new_messages_first",je.TalksSortModeUnreadMessagesFirst="unread_messages_first",je.OLD_KEY_RIGHT_PANEL_OPENED="right_panel_opened",je.OLD_KEY_RIGHT_PANEL_WIDTH="right_panel_width",je.NAME="browser_settings",qe.MAX_SIZE=72,Je.INCOMING_TIME=6e4,Ze.DEFAULT_PRESENCE_EXPIRATION=3e5,et.DEFAULT_TTL=3600,et.DEFAULT_MAX_PARTICIPANTS=8,Ct.stagedFileInfosMaxId=0,Lt.TIMESTAMP_SHIFT=22,Wt.MAX_READ_USER_IDS_COUNT=16,In.QUERY_DATE_TODAY="t",In.QUERY_DATE_YESTERDAY="-1d",In.QUERY_DATE_THREE_DAYS_BEFORE="-3d",Ln.HISTORY_TAB_NAME="stamp-history",ci.SIXTY_MINUTES=new ui(0,36e5),ci.FIFTEEN_MINUTES=new ui(0,9e5),zi.PREFIX="note-",zi.nextDummyId=new ui(-1,-1),Vi.CONTINUE_MARGIN_RATE=.1,rr.CHEKBOX_UNCHECKED="- [ ] ",rr.CHEKBOX_CHECKED="- [x] ",or.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sr.TU_REG=new o("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),sr.XTU_REG=new o("ッ","gm"),_r.EMERGENCY=0,_r.ALERT=1,_r.CRITICAL=2,_r.ERROR=3,_r.WARNING=4,_r.NOTICE=5,_r.INFO=6,_r.DEBUG=7,_r.level=6,_r._d=_r._nop,_r._i=null!=console?console.info.bind(console):_r._nop,_r._w=null!=console?console.warn.bind(console):_r._nop,_r._e=null!=console?console.error.bind(console):_r._nop,pr.HIRAGANA_SMALL_A=12353,pr.HIRAGANA_NN=12435,pr.KATAKANA_SMALL_A=12449,Ir.NAME="accessTokenResolver",Er.NAME="Proxy",Nr.__meta__={fields:{settings:{inject:null},api:{inject:null}}},Ar.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null}}},Ar.NAME="broadcast",br.__meta__={fields:{wsApi:{inject:null},apiCaller:{inject:null},apiNote:{inject:null},settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},fileService:{inject:null},searchService:{inject:null},lastUsedAtUpdater:{inject:null}}},br.NAME="api",br.API_VERSION="1.122",br.UPDATE_VERSION="1.122_1",br.ACTIONS_COUNT_PER_API=20,Dr.__meta__={fields:{rpc:{inject:null}}},Dr.NAME="apiCaller",Dr.DELAY_FOR_DB_REPLICATION=500,Dr.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,Dr.API_TRY_COUNT=3,kr.__meta__={fields:{apiCaller:{inject:null},dataStore:{inject:null},settings:{inject:null}}},kr.NAME="apiNote",Cr.NAME="appState",Or.__meta__={fields:{dataStore:{inject:null}}},Or.NAME="dataFactory",Mr.NAME="dataStore",Mr.STORAGE_KEY_FOR_GENERAL="dataStore",Mr.STORAGE_KEY_FOR_TALKS="dataStoreTalks",Mr.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",Mr.STORAGE_KEY_FOR_USERS="dataStoreUsers",Mr.TYPE_FRIEND=0,Mr.TYPE_ACQUAINSTANCE=1,Mr.TYPE_NONE=2,Fr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Fr.NAME="features",Ur.NAME="fileService",Pr.__meta__={fields:{settings:{inject:null}}},Lr.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},Lr.NAME="keywordWatcher",Lr.TALK_KEY_PREFIX="talk_",Lr.ANNOUNCEMENT_KEY_PREFIX="announcement_",Br.TEMP_HALF_SPACE="&SPACE",Br.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",zr.__meta__={fields:{settings:{inject:null}}},zr.NAME="lastUsedAtUpdater",zr.UPDATE_LAST_USED_AT_INTERVAL=6e5,Kr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Kr.NAME="limitations",Wr.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},Wr.NAME="rpc",Wr.lastMsgId=0,jr.PING_INTERVAL_ON_CONNECTED=45e3,Jr.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},Jr.NAME="readStatusUpdater",Xr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Xr.NAME="routing",ea.__meta__={fields:{settings:{inject:null}}},ea.NAME="searchService",ea.LOAD_SIZE=20,ea.DUMMY_VALUE_FOR_SET=1,ta.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},api:{inject:null}}},ta.NAME="session",na.NAME="settings",na.KEY_ACCESS_TOKEN="access_token",na.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",na.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",na.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",na.KEY_INPUT_TEXT="input_text",na.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",na.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",na.KEY_SEARCH_HISTORIES="search_histories",na.KEY_MULTI_VIEW_MODE="multi_view_mode",na.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",na.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",na.KEY_IDFV="idfv",ia.__meta__={fields:{dataStore:{inject:null}}},ia.NAME="talksService",ra.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},ra.NAME="ThumbnailExpansion",aa.__meta__={fields:{dataStore:{inject:null}}},aa.NAME="userPresences",oa.__meta__={fields:{apiCaller:{inject:null}}},oa.NAME="wsApi",ma.NAME="Mediator",pa.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},pa.NAME="commandline",pa.DATA_SAVE_SPAN=5e3,va.INVALID_PARAMETER="INVALID_PARAMETER",va.FORBIDDEN="FORBIDDEN",va.NOT_FOUND="NOT_FOUND",va.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",va.CONFLICT="CONFLICT",va.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",va.UNKNOWN="UNKNOWN",Na._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},Da.USE_CACHE=!1,Da.USE_ENUM_INDEX=!1,Da.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Oa.DEFAULT_RESOLVER=new Ca,Oa.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Pa.count=0,Qa.i64tmp=new ui(0,0),Za.__toStr={}.toString,to.BYTES_PER_ELEMENT=1,io.FLOAT_SINGLE_MIN=1.401298464324817e-45,io.FLOAT_SINGLE_MAX=3.4028234663852886e38,io.FLOAT_DOUBLE_MIN=5e-324,io.FLOAT_DOUBLE_MAX=1.7976931348623157e308,a.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 From ebe91334275281c85466a563dc62f7c619eb3ce7 Mon Sep 17 00:00:00 2001 From: "sho.kuroda" Date: Wed, 13 Mar 2024 13:50:27 +0900 Subject: [PATCH 2/2] chore: bump up version to 2.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9d7909..b81bb91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "direct-js", - "version": "2.2.0", + "version": "2.3.0", "description": "Low-level javascript library for direct", "author": "L is B corp.", "license": "MIT",