From 095ab7e33d87b207c5a2869f9593a1773dc1d281 Mon Sep 17 00:00:00 2001 From: lisb-jenkins Date: Fri, 9 May 2025 09:17:49 +0000 Subject: [PATCH] Update lib/*.js --- 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 a96b2b2..f10ef29 100755 --- a/lib/direct-node.min.js +++ b/lib/direct-node.min.js @@ -1 +1 @@ -!function(y,S){function s(){return G.__string_rec(this,"")}var t={};function e(e,t){function n(){}n.prototype=e;var i,r=new n;for(i in t)r[i]=t[i];return t.toString!==Object.prototype.toString&&(r.toString=t.toString),r}function v(e,t){this.r=new RegExp(e,t.split("u").join(""))}function T(){}function I(){}function N(){}function x(){}function A(){}function b(){}function M(){}function C(e){Rn.call(this,e)}function W(){}function K(){}function V(){}function q(){}function Q(){}function X(){}function J(){}function Z(){}function $(){}function ee(){}function te(){}function ne(){}function ie(){}function re(){}function oe(e,t,n){this.email=e,this.pass=t,this.accessToken=n}function se(e){null!=e&&(this.id=e.id,this.group=new Ai(e.group),this.profilePolicy=new bi(e.profile_policy))}function ae(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ai(e.group)),null!=e.profile_policy)&&(this.profilePolicy=new bi(e.profile_policy))}function le(e){null!=e&&(this.id=D.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}function ue(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 ki(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id,null==this.maxReadAnnouncementId)&&0==this.unreadCount&&(this.maxReadAnnouncementId=this.maxAnnouncementId)}function ce(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)}function _e(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.notificationPopupTime=5,this.talkAutoScroll=1,this.legacyNoteEnabled=!1,this.leaveTalksEnabled=!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,this.domainsSortMode="name_order_asc",this.appLeftPanelOpened=!1,this.appLeftPanelWidth=0,this.scheduledMessageDefaultTimeStr="09:00",null!=e){var t;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.notificationPopupTime&&(this.notificationPopupTime=e.notificationPopupTime),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.legacyNoteEnabled&&(this.legacyNoteEnabled=e.legacyNoteEnabled),null!=e.leaveTalksEnabled&&(this.leaveTalksEnabled=e.leaveTalksEnabled),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),this.talkRightPanelOpened=null!=e.talkRightPanelOpened?e.talkRightPanelOpened:null==o.getItem("right_panel_opened"),null!=e.talkRightPanelWidth?this.talkRightPanelWidth=e.talkRightPanelWidth:(t=P.parseInt(o.getItem("right_panel_width")),this.talkRightPanelWidth=null==t?0:t),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=G.__cast(e.userDataContainer,Array);n=e.length);){if(!this.matchSub(e,n)){i+=P.string(U.substr(e,n,null));break}var r=this.matchedPos(),i=(i+=P.string(U.substr(e,n,r.pos-n)))+P.string(t(this)),n=0==r.len?(i+=P.string(U.substr(e,r.pos,1)),r.pos+1):r.pos+r.len;if(!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},I.startsWith=function(e,t){return e.length>=t.length&&U.substr(e,0,t.length)==t},I.isSpace=function(e,t){e=U.cca(e,t);return 8>>=4););if(null!=t)for(;n.lengthn;){var t=U.substr(e,0,n);i.push(t),e=U.substr(e,n,null)}0n&&(t(r),r=""),0=this.length)throw new H("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new H("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 H("Invalid enum format");var n=this.readDigits();if(0==n)return x.createEnum(e,t);for(var i=[];0=this.scache.length)throw new H("Invalid string reference");return this.scache[t];case 97:this.buf;var r=[];for(this.cache.push(r);;){var o=this.buf.charCodeAt(this.pos);if(104==o){this.pos++;break}117==o?(this.pos++,o=this.readDigits(),r[r.length+o-1]=null):r.push(this.unserialize())}return r;case 98:var s=new B;for(this.cache.push(s),this.buf;104!=this.buf.charCodeAt(this.pos);){var a=this.unserialize(),l=this.unserialize();null!=Y[a]?s.setReserved(a,l):s.h[a]=l}return this.pos++,s;case 99:e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new H("Class not found "+e);e=x.createEmptyInstance(t);return this.cache.push(e),this.unserializeObject(e),e;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:t=this.unserialize(),e=this.resolver.resolveEnum(t);if(null==e)throw new H("Enum not found "+t);this.pos++;var u=this.readDigits(),c=e.__constructs__.slice()[u];if(null==c)throw new H("Unknown enum index "+t+"@"+u);t=this.unserializeEnum(e,c);return this.cache.push(t),t;case 107:return NaN;case 108:var _=new Tn;for(this.cache.push(_),this.buf;104!=this.buf.charCodeAt(this.pos);)_.add(this.unserialize());return this.pos++,_;case 109:return-1/0;case 110:return null;case 111:u={};return this.cache.push(u),this.unserializeObject(u),u;case 112:return 1/0;case 113:for(var h=new Zs,d=(this.cache.push(h),this.buf,this.buf.charCodeAt(this.pos++));58==d;){var f=this.readDigits(),m=this.unserialize();h.h[f]=m,d=this.buf.charCodeAt(this.pos++)}if(104!=d)throw new H("Invalid IntMap format");return h;case 114:e=this.readDigits();if(e<0||e>=this.cache.length)throw new H("Invalid reference");return this.cache[e];case 115:var c=this.readDigits(),p=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=t?t-1:0))),T=0;y>4),g[p.charCodeAt(y++)]),E=(v.b[T++]=255&(E<<4|I>>2),g[p.charCodeAt(y++)]);v.b[T++]=255&(I<<6|E)}return 2<=t&&(u=g[p.charCodeAt(y++)],e=g[p.charCodeAt(y++)],v.b[T++]=255&(u<<2|e>>4),3==t)&&(u=g[p.charCodeAt(y++)],v.b[T++]=255&(e<<4|u>>2)),this.pos+=c,this.cache.push(v),v;case 116:return!0;case 118:return 48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4)?(w=U.strDate(U.substr(this.buf,this.pos,19)),this.pos+=19):(t=this.readFloat(),w=new Date(t)),this.cache.push(w),w;case 119:e=this.unserialize(),u=this.resolver.resolveEnum(e);if(null==u)throw new H("Enum not found "+e);c=this.unserializeEnum(u,this.unserialize());return this.cache.push(c),c;case 120:throw H.wrap(this.unserialize());case 121:t=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>>16,l=65535&n.low,u=n.low>>>16,c=w._mul(s,l),l=w._mul(a,l),s=w._mul(s,u),a=(w._mul(a,u)+(s>>>16)|0)+(l>>>16)|0,a=(s<<=16,w.ucompare(u=c+s|0,s)<0&&(a++,a|=0),l<<=16,w.ucompare(u=u+l|0,l)<0&&(a++,a|=0),a+(w._mul(t.low,n.high)+w._mul(t.high,n.low)|0)|0),c=new E(a,u),s=_.make(0,P.parseInt(e.charAt(o))),l=c.high+s.high|0,a=c.low+s.low|0;w.ucompare(a,c.low)<0&&(l++,l|=0);t=new E(l,a)}return t},D.getHigh=function(e){return e.high},D.getLow=function(e){return e.low},D.idStr=function(e){return"_"+e.high+"_"+e.low},D.makeFromIdStr=function(e){var t=new v("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?_.make(P.parseInt(t.matched(1)),P.parseInt(t.matched(2))):null},D.fromNullableIdStr=function(e){return null!=e?D.makeFromIdStr(e):null},D.toStr=function(e){return Ys.toString(e)},D.isNeg=function(e){return e.high<0},D.add=function(e,t){var n=e.high+t.high|0,t=e.low+t.low|0;return w.ucompare(t,e.low)<0&&(n++,n|=0),new E(n,t)},D.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;return w.ucompare(e.low,t.low)<0&&(n--,n|=0),new E(n,i)},D.compare=function(e,t){var n=e.high-t.high|0;return 0==n&&(n=w.ucompare(e.low,t.low)),e.high<0?t.high<0?n:-1:0<=t.high?n:1},D.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},D.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},D.toFloat=function(e){var t=4294967296,n=e.high,e=e.low;return n*t+(0<=e?e:e+t)},D.idStrToInt64=function(e){e=e.split("_");return 2>31,e))},D.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=h.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(n,e){for(var i=this,t=Promise.resolve([]),r=D.splitUsingMaxCount(e,100),o=0;oe.version},isStampsetEnabled:function(e){return k.has(this.allowCreateMessageStampCategories,e)},isStampCategoriesEmpty:function(){return 0==this.allowCreateMessageStampCategories.length},getCategoryIndex:function(e){return this.allowCreateMessageStampCategories.indexOf(e)},__class__:xi},(t["albero.entity.Conference"]=he).__name__=["albero","entity","Conference"],he.prototype={isIncomingExpired:function(){var e=this.createdAt,t=4294967296,n=e.high,e=e.low;return n*t+(0<=e?e:e+t)+he.INCOMING_TIME<(new Date).getTime()},isExpired:function(){var e=this.expiredAt,t=4294967296,n=e.high,e=e.low;return n*t+(0<=e?e:e+t)<(new Date).getTime()},__class__:he},function(){this.conferencesMap=new B,this.talkIdConferenceIdMap=new B}),Li=((t["albero.entity.ConferenceStore"]=Ui).__name__=["albero","entity","ConferenceStore"],Ui.prototype={addConference:function(e){var t=e.id,t="_"+t.high+"_"+t.low,n=this.conferencesMap,n=(null!=Y[t]?n.setReserved(t,e):n.h[t]=e,e.talkId),e="_"+n.high+"_"+n.low,n=this.talkIdConferenceIdMap;null!=Y[e]?n.setReserved(e,t):n.h[e]=t},removeConference:function(e){var t=e.id,t="_"+t.high+"_"+t.low,e=(this.conferencesMap.remove(t),e.talkId),e="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;(null!=Y[e]?n.getReserved(e):n.h[e])==t&&this.talkIdConferenceIdMap.remove(e)},getConferences:function(){return X.toValueArray(this.conferencesMap)},getConference:function(e){var e="_"+e.high+"_"+e.low,t=this.conferencesMap;return null!=Y[e]?t.getReserved(e):t.h[e]},hasConferenceInTalk:function(e){var t;return null!=e&&(e="_"+e.high+"_"+e.low,t=this.talkIdConferenceIdMap,null!=Y[e]?t.existsReserved(e):t.h.hasOwnProperty(e))},getConferenceIdInTalk:function(e){var t;return null==e||(e="_"+e.high+"_"+e.low,t=this.talkIdConferenceIdMap,null==(t=null!=Y[e]?t.getReserved(e):t.h[e]))?null:D.makeFromIdStr(t)},getConferenceTalkIds:function(){return X.toKeyArray(this.talkIdConferenceIdMap).map(D.makeFromIdStr)},hasConference:function(){return this.talkIdConferenceIdMap.keys().hasNext()},__class__:Ui},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:Li.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Ci.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled,this.updateLastUsedAtInterval=null!=e.update_last_used_at_interval?e.update_last_used_at_interval:Li.DEFAULT_PRESENCE_EXPIRATION)}),Pi=((t["albero.entity.Configuration"]=Li).__name__=["albero","entity","Configuration"],Li.prototype={__class__:Li},function(e){this.contractConference=m.None,null!=e&&(this.id=e.contract_id,this.plan=new yr(e.plan),this.quota=new Rr(e.quota),this.solutionIds=e.solution_ids,null!=e.conference)&&(this.contractConference=m.Some(new Bi(e.conference)))}),Bi=((t["albero.entity.Contract"]=Pi).__name__=["albero","entity","Contract"],Pi.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__:Pi},function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=Bi.DEFAULT_MAX_PARTICIPANTS,this.ttl=Bi.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)}),Hi=((t["albero.entity.ContractConference"]=Bi).__name__=["albero","entity","ContractConference"],Bi.prototype={__class__:Bi},function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?Gi.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=Hi.getLabelRoot();break;case 2:this.name=Hi.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}}),Gi=((t["albero.entity.Department"]=Hi).__name__=["albero","entity","Department"],Hi.getLabelFree=function(){return c.localize("Department.label_free")},Hi.getLabelRoot=function(){return c.localize("Department.label_root")},Hi.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==Gi.Root},isFree:function(){return this.nodeType==Gi.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return Gi.Root;case 2:return Gi.Free;default:return Gi.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(D.idStr)},__class__:Hi},(t["albero.entity.DepartmentHelper"]=de).__name__=["albero","entity","DepartmentHelper"],de.getName=function(e){return null==e?null:e.name},t["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]}),ji=(Gi.Normal=["Normal",0],Gi.Normal.toString=s,(Gi.Normal.__enum__=Gi).Root=["Root",1],Gi.Root.toString=s,(Gi.Root.__enum__=Gi).Free=["Free",2],Gi.Free.toString=s,(Gi.Free.__enum__=Gi).__empty_constructs__=[Gi.Normal,Gi.Root,Gi.Free],(t["albero.entity.DepartmentList"]=fe).__name__=["albero","entity","DepartmentList"],fe.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new Hi(e)})},__class__:fe},function(){this.departmentMap=new B,this.rootDepartmentIdMap=new B}),zi=((t["albero.entity.DepartmentStore"]=ji).__name__=["albero","entity","DepartmentStore"],ji.prototype={getDepartment:function(e){var t;return null==e?null:(e="_"+e.high+"_"+e.low,t=this.departmentMap,null!=Y[e]?t.getReserved(e):t.h[e])},setDepartment:function(e){null!=e.parentId&&null!=(t=this.getDepartment(e.parentId))&&(t.addChild(e.id),e.depth=t.depth+1);var t=e.id,t="_"+t.high+"_"+t.low,n=this.departmentMap;null!=Y[t]?n.setReserved(t,e):n.h[t]=e},clearDomainDepartment:function(e){var t=this,e="_"+e.high+"_"+e.low,n=this.rootDepartmentIdMap,n=null!=Y[e]?n.getReserved(e):n.h[e];null!=n&&(k.iter(this.getDepartmentsDescendantOrSelf(n),function(e){e=e.id;t.departmentMap.remove("_"+e.high+"_"+e.low)}),this.rootDepartmentIdMap.remove(e))},getRootDepartmentId:function(e){var e="_"+e.high+"_"+e.low,t=this.rootDepartmentIdMap;return null!=Y[e]?t.getReserved(e):t.h[e]},setRootDepartmentId:function(e,t){var e="_"+e.high+"_"+e.low,n=this.rootDepartmentIdMap;null!=Y[e]?n.setReserved(e,t):n.h[e]=t},setDepartmentUserCount:function(e){var t=this.getDepartment(e.departmentId);null!=t&&(t.userCount=e,t.userCountLoading=!1)},setUserCountLoading:function(e,t){e=this.getDepartment(e);null!=e&&(e.userCountLoading=t)},isUserCountLoadingRequired:function(e){e=this.getDepartment(e);return null==e||null==e.userCount&&!e.userCountLoading},clearDomainDepartmentUsers:function(e){e=this.getRootDepartmentId(e);return null!=e&&(k.iter(this.getDepartmentsDescendantOrSelf(e),function(e){e.userCount=null,e.userIds=null,e.userCountLoading=!1}),!0)},setDepartmentUsers:function(e,t){e=this.getDepartment(e);null!=e&&(e.userIds=t)},isInDepartment:function(e){e=this.getDepartment(e);return null!=e&&!e.isFree()},getDepartmentPath:function(e){return this.getDepartmentsAncestorOrSelf(e)},getDepartmentPathWithoutRoot:function(e){return this.getDepartmentPath(e).filter(function(e){return!e.isRoot()})},getDepartmentPathSlashSeparatedIfNeeded:function(e){return this.getDepartmentPathWithoutRoot(e).map(de.getName).filter(xn.isNotEmpty).join("/")},getDepartmentsAncestorOrSelf:function(e){var t=[];return this._getDepartmentsAncestorOrSelf(e,t),t},_getDepartmentsAncestorOrSelf:function(e,t){e=this.getDepartment(e);null!=e&&(null!=e.parentId&&this._getDepartmentsAncestorOrSelf(e.parentId,t),t.push(e))},getDepartmentsDescendantOrSelf:function(e){var t=[];return this._getDepartmentsDescendantOrSelf(e,t),t},_getDepartmentsDescendantOrSelf:function(e,t){var n=this,e=this.getDepartment(e);null!=e&&(t.push(e),null!=e.childrenIds)&&k.iter(e.childrenIds,function(e){n._getDepartmentsDescendantOrSelf(e,t)})},__class__:ji},(t["albero.entity.DepartmentUserCount"]=me).__name__=["albero","entity","DepartmentUserCount"],me.prototype={__class__:me},(t["albero.entity.DepartmentUserCountList"]=pe).__name__=["albero","entity","DepartmentUserCountList"],pe.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new me(e)})},__class__:pe},(t["albero.entity.DirectApp"]=ge).__name__=["albero","entity","DirectApp"],ge.prototype={getLinkFeature:function(){return k.find(this.features,function(e){return e.isLink()})},getMessageExtensionFeature:function(){return k.find(this.features,function(e){return e.isMessageMenuExtension()})},getLocalizedLabel:function(e,t){var n=this.locales,n=null!=Y[t]?n.getReserved(t):n.h[t];return null==n||null==(t=n.getResourceText(e))?"":t},__class__:ge},function(e){this.map=new B;for(var t=0,n=L.fields(e);t>t,e.high<<32-t|e.low>>>t):new E(e.high>>31,e.high>>t-32)},Ae.subTimestampPart=function(e,t){var e=Ae.timestamp(e),t=Ae.timestamp(t),n=e.high-t.high|0,i=e.low-t.low|0;return w.ucompare(e.low,t.low)<0&&(n--,n|=0),new E(n,i)},Ae.createForTest=function(e){var t=Ae.TIMESTAMP_SHIFT;return 0==(t&=63)?new E(e.high,e.low):t<32?new E(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,c.localize("MessageStringMaker.achieve"),c.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?c.localize("MessageStringMaker.achieve"):c.localize("MessageStringMaker.remand"):"";default:return""}},messageStringForCompactMessage:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,a=65535&t.low,l=t.low>>>16,u=w._mul(o,a),a=w._mul(s,a),o=w._mul(o,l),s=(w._mul(s,l)+(o>>>16)|0)+(a>>>16)|0,s=(o<<=16,w.ucompare(l=u+o|0,o)<0&&(s++,s|=0),a<<=16,w.ucompare(l=l+a|0,a)<0&&(s++,s|=0),s+(w._mul(e.low,t.high)+w._mul(e.high,t.low)|0)|0),u=new E(s,l),o=_.make(0,P.parseInt(this.commonStampId.charAt(r))),a=u.high+o.high|0,s=u.low+o.low|0;w.ucompare(s,u.low)<0&&(a++,a|=0);e=new E(a,s)}return e},__class__:ze},(t["albero.entity.OriginalStamp"]=Ye).__name__=["albero","entity","OriginalStamp"],Ye.__interfaces__=[je],Ye.fromJson=function(e){var t,n;return null==e.originalStamp||null==(e=e.originalStamp).stampsetIdStr||null==e.stampIdStr?null:(t=D.makeFromIdStr(e.stampsetIdStr),n=D.makeFromIdStr(e.stampIdStr),new Ye(t,n,e.illust))},Ye.fromPropsAndStampsetId=function(e,t){return new Ye(t,D.fromIntOrInt64(e.id),e.illust)},Ye.createKey=function(e){return"original__"+e.high+"_"+e.low},Ye.prototype={getImageUrl:function(){return this.illust},getKey:function(){return Ye.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 O;return n.talkId=e,n.type=d.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:Ye},function(){this.stampsetStore=new B,this.stampStore=new B,this.stampKeyCategoryIdMap=new B}),zr=((t["albero.entity.StampStore"]=jr).__name__=["albero","entity","StampStore"],jr.prototype={addStampsets:function(e){for(var t=0;te.version},__class__:We},function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(D.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))}),a=((t["albero.entity.StampsetSetting"]=Yr).__name__=["albero","entity","StampsetSetting"],Yr.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new We(e)})},isForwardForbidden:function(e){e=e.getContentsForOriginalStamp(),e=null==e?null:e.stampsetId;return null!=e&&!this.containSendableStampset(e)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&k.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(t){return k.exists(this.stampsetInfos,function(e){e=e.stampsetId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos||null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.filter(function(e){e=e.stampsetId;return!(null!=e&&null!=t&&e.high==t.high&&e.low==t.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=t&&e.high==t.high&&e.low==t.low)})},getStampsetIdsDiff:function(e){for(var t=new B,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;ithis.pushNotificationSetting.version&&(this.pushNotificationSetting=wr.createWithParams(e.type,e.version),!0)},isMessageAcceptable:function(e,t){var n;return!!this.isUnread(e.id)||(0==(n=(e=Ae.subTimestampPart(this.maxReadMessageId,e.id)).high-t.high|0)&&(n=w.ucompare(e.low,t.low)),(e.high<0?t.high<0?n:-1:0<=t.high?n:1)<=0)},isUnread:function(e){var t,n;return null==this.maxReadMessageId||(0==(n=(t=this.maxReadMessageId).high-e.high|0)&&(n=w.ucompare(t.low,e.low)),(t.high<0?e.high<0?n:-1:0<=e.high?n:1)<0)},isMax:function(e){var t;return null!=this.maxMessageId&&null!=(t=this.maxMessageId)&&null!=e&&t.high==e.high&&t.low==e.low},isNewMax:function(e){var t,n;return null==this.maxMessageId||(0==(n=(t=this.maxMessageId).high-e.high|0)&&(n=w.ucompare(t.low,e.low)),(t.high<0?e.high<0?n:-1:0<=e.high?n:1)<0)},isNotificationDisabled:function(){return this.pushNotificationSetting.isDisabled()},getNotificationType:function(){return this.pushNotificationSetting.type},hasUnreadMessage:function(){return null!=this.maxMessage&&this.isUnread(this.maxMessage.id)},clearReadingMessages:function(){this.readingMessages=null},__class__:Xe},(t["albero.entity.TalkStatusHelper"]=Je).__name__=["albero","entity","TalkStatusHelper"],Je.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},Je.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},Je.isUnreadMesasgeExisted=function(e){return null!=e&&e.hasUnreadMessage()},(t["albero.entity.TalkStatusUpdate"]=Ze).__name__=["albero","entity","TalkStatusUpdate"],Ze.prototype={__class__:Ze},(t["albero.entity.ThumbInfo"]=$e).__name__=["albero","entity","ThumbInfo"],$e.prototype={setAuth:function(e){this.auth=e},__class__:$e},function(e){null!=e&&(this.width=e.width,this.height=e.height)}),u=((t["albero.entity.ThumbDimension"]=$r).__name__=["albero","entity","ThumbDimension"],$r.createWithSize=function(e,t){var n=new $r;return n.width=e,n.height=t,n},$r.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:$r},(t["albero.entity.UpdateDomainStampSettingEvent"]=et).__name__=["albero","entity","UpdateDomainStampSettingEvent"],et.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:et},t["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL","SCHEDULE_MESSAGE"]}),E=(u.PROFILE_IMAGE=["PROFILE_IMAGE",0],u.PROFILE_IMAGE.toString=s,(u.PROFILE_IMAGE.__enum__=u).MESSAGE=["MESSAGE",1],u.MESSAGE.toString=s,(u.MESSAGE.__enum__=u).TALK_ICON=["TALK_ICON",2],u.TALK_ICON.toString=s,(u.TALK_ICON.__enum__=u).THUMBNAIL=["THUMBNAIL",3],u.THUMBNAIL.toString=s,(u.THUMBNAIL.__enum__=u).NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],u.NOTE_ATTACHMENT.toString=s,(u.NOTE_ATTACHMENT.__enum__=u).NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],u.NOTE_THUMBNAIL.toString=s,(u.NOTE_THUMBNAIL.__enum__=u).SCHEDULE_MESSAGE=["SCHEDULE_MESSAGE",6],u.SCHEDULE_MESSAGE.toString=s,(u.SCHEDULE_MESSAGE.__enum__=u).__empty_constructs__=[u.PROFILE_IMAGE,u.MESSAGE,u.TALK_ICON,u.THUMBNAIL,u.NOTE_ATTACHMENT,u.NOTE_THUMBNAIL,u.SCHEDULE_MESSAGE],(t["albero.entity.UploadUseTypeHelper"]=tt).__name__=["albero","entity","UploadUseTypeHelper"],tt.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;case 6:return 1}},(t["albero.entity.UserIdentifier"]=nt).__name__=["albero","entity","UserIdentifier"],nt.prototype={__class__:nt},function(e,t){this.high=e,this.low=t}),eo=((t["haxe._Int64.___Int64"]=E).__name__=["haxe","_Int64","___Int64"],E.prototype={__class__:E},(t["albero.entity.UserPresence"]=it).__name__=["albero","entity","UserPresence"],it.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;w.ucompare(t.low,e.low)<0&&(n--,n|=0);var t=new E(n,i),e=it.SIXTY_MINUTES,n=t.high-e.high|0;return 0==n&&(n=w.ucompare(t.low,e.low)),0<(t.high<0?e.high<0?n:-1:0<=e.high?n:1)?eo.GT_60:(0==(e=t.high-(i=it.FIFTEEN_MINUTES).high|0)&&(e=w.ucompare(t.low,i.low)),0<(t.high<0?i.high<0?e:-1:0<=i.high?e:1)?eo.LT_OR_EQ_60:eo.LT_OR_EQ_15)},it.prototype={toState:function(e){var t=e,n=h.map(this.lastUsedAtOpt,function(e){return it.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return eo.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;w.ucompare(e.low,n.low)<0&&(i--,i|=0);e=new E(i,r),n=e.high-t.high|0;return 0==n&&(n=w.ucompare(e.low,t.low)),0<(e.high<0?t.high<0?n:-1:0<=t.high?n:1)},__class__:it},t["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]}),to=(eo.LT_OR_EQ_15=["LT_OR_EQ_15",0],eo.LT_OR_EQ_15.toString=s,(eo.LT_OR_EQ_15.__enum__=eo).LT_OR_EQ_60=["LT_OR_EQ_60",1],eo.LT_OR_EQ_60.toString=s,(eo.LT_OR_EQ_60.__enum__=eo).GT_60=["GT_60",2],eo.GT_60.toString=s,(eo.GT_60.__enum__=eo).__empty_constructs__=[eo.LT_OR_EQ_15,eo.LT_OR_EQ_60,eo.GT_60],(t["albero.entity.api.message.AddFavoriteMessageResult"]=rt).__name__=["albero","entity","api","message","AddFavoriteMessageResult"],rt.prototype={__class__:rt},(t["albero.entity.api.message.DeleteFavoriteMessageResult"]=ot).__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],ot.prototype={__class__:ot},(t["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=st).__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],st.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:st},(t["albero.entity.api.message.GetScheduledMessagesResultWithParams"]=at).__name__=["albero","entity","api","message","GetScheduledMessagesResultWithParams"],at.prototype={__class__:at},(t["albero.entity.api.message.SearchMessagesAroundDateTimeResult"]=lt).__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],lt.prototype={__class__:lt},function(e){this.messageId=e.message_id,this.createdAt=e.created_at}),no=((t["albero.entity.api.message.MessageCreatedAt"]=to).__name__=["albero","entity","api","message","MessageCreatedAt"],to.prototype={__class__:to},function(e){this.noteRaw=e}),io=((t["albero.entity.api.note.CompressedNote"]=no).__name__=["albero","entity","api","note","CompressedNote"],no.prototype={uncompress:function(){var n=this,e=this.getCompressedContentRaw();return(new Z).run(e).then(function(e){var t=L.copy(n.noteRaw.note_revision),e=(t.content=e,L.copy(n.noteRaw));return e.note_revision=t,e})},getCompressedContentRaw:function(){return null==this.noteRaw||null==this.noteRaw.note_revision?null:this.noteRaw.note_revision.content},__class__:no},(t["albero.entity.api.note.CreateNoteError"]=ut).__name__=["albero","entity","api","note","CreateNoteError"],ut.prototype={__class__:ut},(t["albero.entity.api.note.CreateNoteResult"]=ct).__name__=["albero","entity","api","note","CreateNoteResult"],ct.prototype={updateWithEmitterKey:function(e){var t=new ct;return t.note=this.note,t.emitterKey=e,t},__class__:ct},(t["albero.entity.api.note.CreateNoteResultCompressed"]=_t).__name__=["albero","entity","api","note","CreateNoteResultCompressed"],_t.prototype={uncompress:function(){return this.compressedNote.uncompress().then(function(e){return new ct(e)})},__class__:_t},(t["albero.entity.api.note.DeleteNoteResult"]=ht).__name__=["albero","entity","api","note","DeleteNoteResult"],ht.prototype={__class__:ht},(t["albero.entity.api.note.GetNoteResult"]=dt).__name__=["albero","entity","api","note","GetNoteResult"],dt.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__:dt},(t["albero.entity.api.note.GetNoteResultCompressed"]=ft).__name__=["albero","entity","api","note","GetNoteResultCompressed"],ft.prototype={uncompress:function(){return this.compressedNote.uncompress().then(function(e){return new dt(e)})},__class__:ft},(t["albero.entity.api.note.GetNoteStatusesResult"]=mt).__name__=["albero","entity","api","note","GetNoteStatusesResult"],mt.prototype={isNotEmptyNoteStatuses:function(){return 0=Oo.HIRAGANA_SMALL_A&&s<=Oo.HIRAGANA_NN&&(n=(n+=e.substring(t,o))+String.fromCharCode(s+(Oo.KATAKANA_SMALL_A-Oo.HIRAGANA_SMALL_A)),t=1+o)}return n+=e.substring(t,e.length)},Oo.katakanaToRoman=function(e){return(new jt).convert(e)},Oo.normalize=function(e){return new Fo(null).normalize(e)},Oo.normalizeForFile=function(e){return new Fo(null).normalizeForFile(e)},Oo.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")},function(e){this.beforeTask=null,this.beforeTask=e}),xo=((t["albero.js.Normalizer"]=Fo).__name__=["albero","js","Normalizer"],Fo.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof H&&(e=e.val),F.e("invalid character:",e),c.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof H&&(e=e.val),F.e("invalid character:",e),c.localize("TextCanonicalizer.invalid")}},__class__:Fo},(t["albero.js.WebSocket"]=Kt).__name__=["albero","js","WebSocket"],Kt.prototype={__class__:Kt},(t["albero.js.WebSocketFactory"]=Vt).__name__=["albero","js","WebSocketFactory"],Vt.newInstance=function(e,t){return new xo(e,t)},function(e,t){var n=this,t=(this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong,Wa.wsConfig),i=require("websocket").client,i=(this.ws=new i(t),this.ws.on("connectFailed",z(this,this.onError)),this.ws.on("connect",function(e){(n.connection=e).on("error",z(n,n.onError)),e.on("close",z(n,n.onConnectionClose)),e.on("message",z(n,n.onMessage)),e.on("pong",z(n,n.onPong)),n.onOpen(null)}),null);null!=Wa.proxyURL&&(i={agent:Ro.createAgent(Wa.proxyURL)}),this.ws.connect(e,null,null,null,i)}),Uo=((t["albero.js.WebSocketForNodeJs"]=xo).__name__=["albero","js","WebSocketForNodeJs"],xo.__interfaces__=[Kt],xo.prototype={onOpen:function(e){F.i("WebSocket opened."),null!=this.onopen&&this.onopen()},onMessage:function(e){var t;null!=this.onmessage&&(t=null,t=this.getBinaryDataForHubot(e),this.onmessage(t))},getBinaryDataForHubot:function(e){return ta.ofData(e.binaryData)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){F.e("WebSocket error. event:",e),null!=this.onerror&&this.onerror()},onClose:function(e){this.removeAllEventListenersForHubot(),F.i("WebSocket closed. "+P.string(e.code)+" "+P.string(e.reason)+" "+P.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(){var e;this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,this.isClosed()||(e=this.connection,this.onConnectionClose(1e3,"Normal connection closure"),e.close())},send:function(e){this.isClosed()||this.connection.sendBytes(new fa(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:xo},(t["puremvc.interfaces.IProxy"]=qt).__name__=["puremvc","interfaces","IProxy"],qt.prototype={__class__:qt},(t["albero.proxy.AccessTokenResolverProxy"]=Qt).__name__=["albero","proxy","AccessTokenResolverProxy"],Qt.__interfaces__=[qt],Qt.prototype={__class__:Qt},function(){}),l=((t["albero.proxy.AccessTokenResolverProxyFactory"]=Uo).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Uo.newInstance=function(){return new Lo("accessTokenResolver")},function(e,t){Ln.call(this),this.proxyName=null!=e?e:l.NAME,null!=t&&this.setData(t)}),Lo=((t["puremvc.patterns.proxy.Proxy"]=l).__name__=["puremvc","patterns","proxy","Proxy"],l.__interfaces__=[qt],l.__super__=Ln,l.prototype=e(Ln.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:l}),function(e){l.call(this,e)}),Po=((t["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Lo).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Lo.__interfaces__=[Qt],Lo.__super__=l,Lo.prototype=e(l.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();null!=n?t(n):null!=(n=null!=Wa.account?Wa.account.split(":"):null)&&2==n.length?this.api.createAccessToken(n[0],n[1],t):null!=(e=null==e?this.accountLoader.load():e)&&(null!=e.accessToken?(this.settings.setAccessToken(e.accessToken),t(e.accessToken)):this.api.createAccessToken(e.email,e.pass,t))},__class__:Lo}),(t["albero.proxy.AccountLoaderProxy"]=Xt).__name__=["albero","proxy","AccountLoaderProxy"],Xt.__interfaces__=[qt],Xt.prototype={__class__:Xt},function(){}),Bo=((t["albero.proxy.AccountLoaderProxyFactory"]=Po).__name__=["albero","proxy","AccountLoaderProxyFactory"],Po.newInstance=function(){var e=x.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?x.createInstance(e,["accountLoader"]):new Bo("accountLoader")},function(e){l.call(this,e)}),Ho=((t["albero.proxy.AccountLoaderProxyForHubot"]=Bo).__name__=["albero","proxy","AccountLoaderProxyForHubot"],Bo.__interfaces__=[Xt],Bo.__super__=l,Bo.prototype=e(l.prototype,{load:function(){var i=this,t=require("read");return t({prompt:"Email: "},function(e,n){t({prompt:"Password: ",silent:!0},function(e,t){i.sendNotification("SignIn",new oe(n,t))})}),null},__class__:Bo}),function(){l.call(this,"broadcast")}),Go=((t["albero.proxy.AlberoBroadcastProxy"]=Ho).__name__=["albero","proxy","AlberoBroadcastProxy"],Ho.__super__=l,Ho.prototype=e(l.prototype,{handleNotification:function(e,t){var n=this;switch(F.v("Receive request from server. name:",e," body:",t),e){case"notify_add_account_control_request":var i=new le(t);this.dataStore.setAccountControlRequest(i),this.sendNotification(e,i);break;case"notify_add_acquaintance":var i=new ve(t[1]);this.dataStore.addAcquaintance(i),this.sendNotification(e,i);break;case"notify_add_acquaintances":i=t[1].map(function(e){return new ve(e)});k.iter(i,z(j=this.dataStore,j.addAcquaintance)),this.api.sendAddAcquaintanceNotifications(i),this.sendNotification(e,i);break;case"notify_add_domain_invite":i=new Se(t);this.dataStore.setDomainInvite(i),this.sendNotification(e,i);break;case"notify_add_favorite_message":i=new Mt(t);this.dataStore.addFavoriteMessage(i),this.sendNotification(e,i);break;case"notify_add_favorite_talk":i=new Ee(t);this.updateTalkStatusByFavoriteTalkEvent(i),this.sendNotification(e,i);break;case"notify_add_friend":i=new ve(t[1]);this.dataStore.addFriend(i),this.sendNotification(e,i);break;case"notify_add_talkers":i=new Kr(t);null==this.dataStore.getTalk(i.id)&&this.sendNotification("notify_add_talkers_including_me",i),this.dataStore.setTalk(i),this.sendNotification(e,i);break;case"notify_close_conference":i=new he(t);this.dataStore.removeConference(i),this.updateTalkStatusByConferenceClosedEvent(i),this.sendNotification(e,i);break;case"notify_conference_participant_join":var i=t[3],r=t[4],o=this.dataStore;null!=o.me&&null!=(o=o.me.id)&&null!=r&&o.high==r.high&&o.low==r.low&&this.dataStore.addReactedConfereceId(i),this.sendNotification(e,t);break;case"notify_conference_participant_reject":var o=t[3];this.dataStore.addReactedConfereceId(o),this.sendNotification(e,t);break;case"notify_create_announcement":var r=new ki(t);this.dataStore.setAnnouncement(r),this.keywordWatcher.onAnnouncementCreated(r),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(r)),this.sendNotification(e,r);break;case"notify_create_message":var s=new O(t),i=(this.dataStore.setMessage(s),this.keywordWatcher.onMessageCreated(s),this.newTalkStatusByMessage(s));switch(null!=i&&this.sendNotification("notify_update_local_talk_status",i),s.type[1]){case 0:var a=s.content,l=null;switch(a.type){case"delete_talker":l=a.deleted_user_id;break;case"hide_pair_talk":l=a.user_id}if(null==l)return void this.sendNotification(e,s);for(var u=s.talkId,c=this.dataStore.getQuestions(u,l),_=0;_t.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t,n=this.dataStore.getTalkStatus(e.talkId);null!=n&&null!=n.maxMessage&&(t=n.maxMessage.id,e=e.messageId,null!=t)&&null!=e&&t.high==e.high&&t.low==e.low&&(n.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(n))},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 F.e("talk not found on change favorite talk.");(t=new Xe).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 Xe).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),n=(null==t&&((t=new Xe).id=e.talkId),this.dataStore),i=e.userId;return n=null!=n.me&&null!=(n=n.me.id)&&null!=i&&n.high==i.high&&n.low==i.low,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,n=this;return k.exists(e.readUserIds,function(e){var t=n.dataStore;return null!=t.me&&null!=(t=t.me.id)&&null!=e&&t.high==e.high&&t.low==e.low})?null==(t=this.dataStore.getTalkStatus(e.talkId))?(F.e("talkStatus is not found."),null):(t.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(t),t):null},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new ue).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=ue.fromDomainId(e),this.dataStore.setAnnouncementStatus(t)),t},__class__:Ho}),function(){l.call(this,"api")}),jo=((t["albero.proxy.AlberoServiceProxy"]=Go).__name__=["albero","proxy","AlberoServiceProxy"],Go.__super__=l,Go.prototype=e(l.prototype,{getOSString:function(){return"bot"},createAccessToken:function(e,t,n){function i(e){F.v("access token:",e),o.settings.setAccessToken(e),n(e)}function r(e){o.sendNotification("Url",Ni.FORWARD(g.error))}var o=this,s=e.split("$"),a=this.settings.getOs(),l=this.settings.getIDFV();(-1==e.indexOf("@")&&2==s.length?this.wsApi.createAccessTokenById(s[1],s[0],t,l,a):this.wsApi.createAccessToken(e,t,l,a)).then(i,r)},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,n){var i=this,t=this.getOSString();this.apiCaller.onSessionClear(),this.wsApi.createSession(e,"1.128",t).then(function(e){var t=W.nowAsInt64();e.passwordExpiration.isExpired(t)?i.sendNotification("password_expiration_overed"):(e.passwordExpiration.needWarning(t,i.settings.getPasswordWarningSkipUntil())&&(i.settings.setPasswordWarningSkipUntil(W.oneDayAfterAsInt64()),i.sendNotification("password_expiration_warned")),i.apiCaller.onSessionCreated(),n(e),i.apiCaller.fireCallbacksWaitingForSession())},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void i.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void i.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void i.sendNotification("Device",Yn.AUTHORIZE);(400==e.code&&"older version specified"==e.message||401==e.code&&"bad token"==e.message||401==e.code&&"invalid token"==e.message)&&i.settings.clearAccessToken(),i.apiCaller.handleServerErrorDefault(e)}i.sendNotification("Url",Ni.FORWARD(g.error))})},startNotification:function(){var t=this;this.wsApi.startNotification().then(function(e){e||(t.dataStore.clear(!0),t.sendNotification("start_notification_failed"))},function(e){t.apiCaller.handleServerErrorDefault(e)})},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=n.length||(e=n[i],r=t.id,o=this.dataFactory.newDummyMessage(r,e.type,e.content),this.sendNotification("create_message_start",o),this.wsApi.createMessage(r,e.type,e.content).then(function(e){s.dataStore.setMessage(e),s.sendNotification("create_message_complete",[e,o.id]),s.forwardMessages(t,n,i+1),s.dataStore.removeMessage(o.id)},function(e){var t;s.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code?(t=ls.toLocalError(R.SendingMessageConflicted,e),s.sendNotification("error_occurred",t)):s.sendNotification("error_occurred",e)}))},deleteMessage:function(e,t){var n=this;this.wsApi.deleteMessage(e,t).then(function(e){},function(e){var t;null!=e&&((403!=e.code||"frozen domain"!=e.message)&&409==e.code&&"conflict"==e.message?(t=ls.toLocalError(R.DeletingMessageConflicted,e),n.sendNotification("error_occurred",t)):n.sendNotification("error_occurred",e))})},updateReadStatuses:function(n,i){var r=this;this.wsApi.updateReadStatuses(n,i).then(function(e){var t=r.dataStore.getTalkStatus(n);null!=t&&(t.updateByReadingMessagesFinished(i),r.sendNotification("notify_update_local_talk_status",t))},function(e){var t=r.dataStore.getTalkStatus(n);null!=t&&(t.updateByReadingMessagesCanceled(i),r.dataStore.setTalkStatus(t),r.sendNotification("notify_update_local_talk_status",t)),r.apiCaller.handleServerErrorDefault(e)})},searchMessagesAroundDateTime:function(e,t){return this.wsApi.searchMessagesAroundDateTime(e,t)},uploadV2:function(e,t,n,i){var r=this,o=At.toFileInfoDynamic(n),s=this.dataFactory.newDummyMessage(t,d.file,o);this.sendNotification("create_message_start",s),this.prepareMessageFileAsync(n,e,!1).then(function(e){r._createMessage(t,d.file,e,s,i).catch(function(e){})},function(e){r.sendNotification("create_message_fail",[e,s],i)})},uploadForHubot:function(e,t,n){var i,r=this.dataStore.getTalk(e),t={file:t,thumb:null};null==r?(i=At.toFileInfoDynamic(t),e=this.dataFactory.newDummyMessage(e,d.file,i),F.w("WARNING method: upload",i={code:400,message:"invalid talk_id (deleted talk)"}),this.sendNotification("create_message_fail",[i,e],n)):this.uploadV2(r.domainId,r.id,t,n)},uploadMultiV2:function(e,t,n,i,r){var o=this,s=At.toFileInfoDynamicArray(i),a=this.dataFactory.newDummyMessage(t,d.textMultipleFile,{text:n,files:s});this.sendNotification("create_message_start",a),this.prepareMessageFilesAsync(e,n,i,!1).then(function(e){o._createMessage(t,d.textMultipleFile,e,a,r).catch(function(e){})},function(e){o.sendNotification("create_message_fail",[e,a],r)})},uploadMultiForHubot:function(e,t,n,i){var r,o=this.dataStore.getTalk(e),n=n.map(function(e){return{file:e,thumb:null}});null==o?(r=At.toFileInfoDynamicArray(n),e=this.dataFactory.newDummyMessage(e,d.textMultipleFile,{text:t,files:r}),F.w("WARNING method: uploadMulti",r={code:400,message:"invalid talk_id (deleted talk)"}),this.sendNotification("create_message_fail",[r,e],i)):this.uploadMultiV2(o.domainId,o.id,t,n,i)},validateFileName:function(t){var n=I.replace(t.name,"$","__");if(n==t.name)return t;try{return t.name=n,t}catch(e){var i=t.slice(0,t.size,t.type);return new File([i],n,{type:t.type})}},prepareMessageFilesAsync:function(n,t,i,r){for(var o=this,e=Promise.resolve([]),s=0;se.version?n:(n=this.accountControlRequests,null!=Y[t]?n.setReserved(t,e):n.h[t]=e,this.storage.setDirtyFlag(),e)},removeAccountControlRequest:function(e){e="_"+e.high+"_"+e.low;this.accountControlRequests.remove(e),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new B,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){var t,n,i;null!=this.accountControlGroup&&(n=this.accountControlGroup.id,t=e.id,null!=n)&&null!=t&&n.high==t.high&&n.low==t.low&&(null!=(n=e.group)&&this.accountControlGroup.group.versionr[s])return!0;if(o[s]p.MAX_CONTENT_BYTES?{ok:!1,errorType:"limit",message:"Content length must be less than or equal to "+p.MAX_CONTENT_BYTES+" bytes, but the actual length is "+e.length+" bytes."}:Ka.validateXml(e)},p.hasPathField=function(e){return k.foreach(e,function(e){return!p.isStringNullOrEmpty(e.path)})},p.validateUpdateNoteInput=function(e,t){if(0==Object.keys(e).length)return Xs.Left("'update' function must not be called with no update fields.");if(null!=e.note_title){if("string"!=typeof e.note_title)return Xs.Left("'note_title' must be specified as String type.");if(0==e.note_title.length)return Xs.Left("'note_title' must not be empty.")}if(null!=e.note_content_type)return Xs.Left("'note_content_type' must not be specified. It cannot be changed.");if(null!=e.note_content){if("string"!=typeof e.note_content)return Xs.Left("'note_content' must be specified as String type.");if(0==e.note_content.length)return Xs.Left("'note_content' must not be empty.");if(t==po.getValue(mo.RICH_TEXT)){t=p.validateXmlContent(e);if(0===t[1])return Xs.Left(t[2])}}t=null;if(null!=e.note_attachments){if(!(e.note_attachments instanceof Array&&null==e.note_attachments.__enum__&&p.all(e.note_attachments,p.isValidAsAttachment)))return Xs.Left("'note_attachments' is an invalid value: "+JSON.stringify(e.note_attachments));t=p.toUpdateNoteAttachmentArray(e.note_attachments)}return Xs.Right({title:e.note_title,content:e.note_content,attachments:t})},p.isValidAsAttachment=function(e){return p.isStringNullOrEmpty(e.url)?!p.isStringNullOrEmpty(e.path):!p.isStringNullOrEmpty(e.id)&&!p.isStringNullOrEmpty(e.name)&&null!=e.content_size&&!p.isStringNullOrEmpty(e.content_type)},p.toUpdateNoteAttachmentArray=function(e){var n=Bs.parseInt64;return k.array(k.map(e,function(e){var t;return p.isStringNullOrEmpty(e.url)?vs.LocalFileAttachment(e):((t=null==e?null:JSON.parse(JSON.stringify(e))).id=n(e.id),vs.RemoteFileAttachment(t))}))},p.validateUpdateNoteOptions=function(e){var t={notify_talk_members_of_update:!0};if(null!=e&&null!=e.notify_talk_members_of_update){if("boolean"!=typeof e.notify_talk_members_of_update)return Xs.Left("'notify_talk_members_of_update' must be of Bool type.");t.notify_talk_members_of_update=e.notify_talk_members_of_update}return Xs.Right(t)},p.all=function(e,t){return k.foreach(e,t)},p.isStringNullOrEmpty=function(e){return null==e||0==e.length},p.prototype={__class__:p},(t["albero_cli.INotes"]=$t).__name__=["albero_cli","INotes"],$t.prototype={__class__:$t},function(e,t){this.delegate=e;e=null!=t?t:{max:24,interval:12e4};this.ratelimit=new An(e.max,e.interval)}),Is=((t["albero_cli.LimitedNotes"]=Ts).__name__=["albero_cli","LimitedNotes"],Ts.__interfaces__=[$t],Ts.prototype={limit:function(e){return this.ratelimit.apply(e)},get:function(e){var t=this;return this.limit(function(){return t.delegate.get(e)})},update:function(e,t,n){var i=this;return this.limit(function(){return i.delegate.update(e,t,n)})},delete:function(e){var t=this;return this.limit(function(){return t.delegate.delete(e)})},validateXml:function(e){return this.delegate.validateXml(e)},on:function(e,t){return this.delegate.on(e,t)},off:function(e,t){return this.delegate.off(e,t)},__class__:Ts},function(e,t,n){this.utils=e,this.api=t,this.fileService=n}),Es=((t["albero_cli.Notes"]=Is).__name__=["albero_cli","Notes"],Is.__interfaces__=[$t],Is.prototype={toNoteId:function(e){return new go(this.utils.parseInt64(e.id))},handleResponse:function(n,i,r){return function(e,t){null!=e?(e=Ls.of(e),i(e)):(e=r(t),n(e))}},get:function(e){var i=this,r=this.toNoteId(e);return new Promise(function(e,t){var n=i.api,e=i.handleResponse(e,t,js.of);n.getNote(r,e)})},update:function(e,t,n){var i=p.validateUpdateNoteInput(t,e.noteRevision.contentType);switch(i[1]){case 0:return Promise.reject(Ls.createInvalidParameterError(i[2]));case 1:var r=i[2],o=p.validateUpdateNoteOptions(n);switch(o[1]){case 0:return Promise.reject(Ls.createInvalidParameterError(o[2]));case 1:return this.updateNote(e,r,o[2])}}},delete:function(e){var i=this,r=this.toNoteId(e);return new Promise(function(e,t){var n=i.api,e=i.handleResponse(e,t,Gs.of);n.deleteNote(r,e)})},updateNote:function(e,t,n){var r=this,i=e.talkId_i64,o=new go(e.id_i64),s=this.mergeNoteObject(e,t),a=this.createNoteLocalEdit(i,o,s,null),l=n.notify_talk_members_of_update;return new Promise(function(e,t){var n=r.api,i=s.currentRevision,e=r.handleResponse(e,t,zs.of);n.updateNoteV2(o,i,a,l,e)})},mergeNoteObject:function(e,t){e={title:e.noteRevision.title,contentType:e.noteRevision.contentType,content:e.noteRevision.contentText,attachments:p.toUpdateNoteAttachmentArray(e.get_attachments()),currentRevision:e.noteRevision.revision};return null!=t.title&&(e.title=t.title),null!=t.content&&(e.content=t.content),null!=t.attachments&&(e.attachments=t.attachments),e},createNoteLocalEdit:function(e,t,n,i){var r=this.createNoteAttachmentFileInfoList(n.attachments),o=n.contentType==po.getValue(mo.RICH_TEXT);return new yo(e,t,n.title,n.content,r,i,null,o)},createNoteAttachmentFileInfoList:function(e){for(var t=[],n=0;n>>31,t.low<<1);if(a=new E(a.high<<1|a.low>>>31,a.low<<1),0<=l)break}for(;;){var u=new E(0,0);if(a.high==u.high&&a.low==u.low)break;var c,u=w.ucompare(n.high,t.high);0<=(0!=u?u:w.ucompare(n.low,t.low))&&(s=new E(s.high|a.high,s.low|a.low),u=n.high-t.high|0,c=n.low-t.low|0,w.ucompare(n.low,t.low)<0&&(u--,u|=0),n=new E(u,c)),a=new E(a.high>>>1,a.high<<31|a.low>>>1);t=new E(t.high>>>1,t.high<<31|t.low>>>1)}return i&&(o=~s.high,0==(r=-s.low)&&(o++,o|=0),s=new E(o,r)),e.high<0&&(i=~n.high,0==(o=-n.low)&&(i++,i|=0),n=new E(i,o)),{quotient:s,modulus:n}},function(){}),Ks=((t["haxe.Int64Helper"]=Ws).__name__=["haxe","Int64Helper"],Ws.parseString=function(e){for(var t=new E(0,10),n=new E(0,0),i=new E(0,1),r=!1,o=I.trim(e),s=("-"==o.charAt(0)&&(r=!0,o=o.substring(1,o.length)),o.length),a=0,l=s;a>31,u);if(r){var c=65535&i.low,_=i.low>>>16,h=65535&u.low,d=u.low>>>16,f=w._mul(c,h),h=w._mul(_,h),c=w._mul(c,d),_=(w._mul(_,d)+(c>>>16)|0)+(h>>>16)|0,f=(c<<=16,w.ucompare(d=f+c|0,c)<0&&(_++,_|=0),h<<=16,w.ucompare(d=d+h|0,h)<0&&(_++,_|=0),_=_+(w._mul(i.low,u.high)+w._mul(i.high,u.low)|0)|0,new E(_,d)),c=n.high-f.high|0,h=n.low-f.low|0;if(w.ucompare(n.low,f.low)<0&&(c--,c|=0),!((n=new E(c,h)).high<0))throw new H("NumberFormatError: Underflow")}else{var _=65535&i.low,d=i.low>>>16,f=65535&u.low,c=u.low>>>16,h=w._mul(_,f),m=w._mul(d,f),p=w._mul(_,c),g=(w._mul(d,c)+(p>>>16)|0)+(m>>>16)|0,p=(p<<=16,w.ucompare(y=h+p|0,p)<0&&(g++,g|=0),m<<=16,w.ucompare(y=y+m|0,m)<0&&(g++,g|=0),g=g+(w._mul(i.low,u.high)+w._mul(i.high,u.low)|0)|0,new E(g,y)),m=n.high+p.high|0,u=n.low+p.low|0;if(w.ucompare(u,n.low)<0&&(m++,m|=0),(n=new E(m,u)).high<0)throw new H("NumberFormatError: Overflow")}var g=65535&i.low,y=i.low>>>16,p=65535&t.low,m=t.low>>>16,u=w._mul(g,p),S=w._mul(y,p),v=w._mul(g,m),T=(w._mul(y,m)+(v>>>16)|0)+(S>>>16)|0,T=(v<<=16,w.ucompare(u=u+v|0,v)<0&&(T++,T|=0),S<<=16,w.ucompare(u=u+S|0,S)<0&&(T++,T|=0),T+(w._mul(i.low,t.high)+w._mul(i.high,t.low)|0)|0),i=new E(T,u)}return n},function(){this.buf=new bn,this.cache=[],this.useCache=Ks.USE_CACHE,this.useEnumIndex=Ks.USE_ENUM_INDEX,this.shash=new B,this.scount=0}),Vs=((t["haxe.Serializer"]=Ks).__name__=["haxe","Serializer"],Ks.run=function(e){var t=new Ks;return t.serialize(e),t.toString()},Ks.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t,n=this.shash,n=null!=Y[e]?n.getReserved(e):n.h[e];null!=n?(this.buf.b+="R",this.buf.b+=null==n?"null":""+n):(n=this.shash,t=this.scount++,null!=Y[e]?n.setReserved(e,t):n.h[e]=t,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=P.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e)},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(N[63&(C<<4|k>>4)]),this.buf.b+=String.fromCharCode(N[63&(k<<2|D>>6)]),this.buf.b+=String.fromCharCode(N[63&D])}E==w?(l=I.b[E++],T=I.b[E++],this.buf.b+=String.fromCharCode(N[l>>2]),this.buf.b+=String.fromCharCode(N[63&(l<<4|T>>4)]),this.buf.b+=String.fromCharCode(N[T<<2&63])):E==1+w&&(l=I.b[E++],this.buf.b+=String.fromCharCode(N[l>>2]),this.buf.b+=String.fromCharCode(N[l<<4&63]));break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(x.getClassName(i)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(x.getClassName(i)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:n=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=P.string(this.useEnumIndex?"j":"w"),this.serializeString(x.getEnumName(n)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=P.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";for(var n=e.length,R=(this.buf.b+=P.string(n-2),2),O=n;R=(null==(r=e.right)?0:r._height)?new Qs(e.left,e.key,e.value,new Qs(e.right,t,n,i)):new Qs(new Qs(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Qs(e.right.right,t,n,i)):o+2(null==(r=i.left)?0:r._height)?new Qs(new Qs(e,t,n,i.left),i.key,i.value,i.right):new Qs(new Qs(e,t,n,i.left.left),i.left.key,i.left.value,new Qs(i.left.right,i.key,i.value,i.right)):new Qs(e,t,n,i,(s(null==t?0:t._height)?null==(n=this.left)?0:n._height:null==(i=this.right)?0:i._height,this._height=e+1):this._height=r}),Xs=((t["haxe.ds.TreeNode"]=Qs).__name__=["haxe","ds","TreeNode"],Qs.prototype={__class__:Qs},t["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]}),Js=(Xs.Left=function(e){e=["Left",0,e];return e.__enum__=Xs,e.toString=s,e},Xs.Right=function(e){e=["Right",1,e];return e.__enum__=Xs,e.toString=s,e},Xs.__empty_constructs__=[],function(){qs.call(this)}),Zs=((t["haxe.ds.EnumValueMap"]=Js).__name__=["haxe","ds","EnumValueMap"],Js.__interfaces__=[un],Js.__super__=qs,Js.prototype=e(qs.prototype,{compare:function(e,t){var n=e[1]-t[1];return 0!=n?n:(n=e.slice(2),e=t.slice(2),0==n.length&&0==e.length?0:this.compareArgs(n,e))},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new ta(new Uint8Array(t).buffer)},ta.ofData=function(e){var t=e.hxBytes;return null!=t?t:new ta(e)},ta.fastGet=function(e,t){return e.bytes[t]},ta.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new H(sa.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,o=e,s=e+t;o>10)))+r(1023&a|56320)}return n},toString:function(){return this.getString(0,this.length)},__class__:ta},function(){this.b=[]}),ia=((t["haxe.io.BytesBuffer"]=na).__name__=["haxe","io","BytesBuffer"],na.prototype={getBytes:function(){var e=new ta(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:na},(t["haxe.io.Input"]=cn).__name__=["haxe","io","Input"],cn.prototype={readByte:function(){throw new H("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||e.lengthe.length)throw new H(sa.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}),ra=((t["haxe.io.BytesInput"]=ia).__name__=["haxe","io","BytesInput"],ia.__super__=cn,ia.prototype=e(cn.prototype,{readByte:function(){if(0==this.len)throw new H(new oa);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new H(sa.OutsideBounds);if(0==this.len&&0e.length)throw new H(sa.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:_n},function(){this.b=new na}),oa=((t["haxe.io.BytesOutput"]=ra).__name__=["haxe","io","BytesOutput"],ra.__super__=_n,ra.prototype=e(_n.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 H(sa.OutsideBounds);i.b;for(var r=e.b,o=t,s=t+n;o>>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)},aa.floatToI32=function(e){var t,n;return 0==e?0:(n=e<0?-e:e,(t=Math.floor(Math.log(n)/.6931471805599453))<-127?t=-127:128>20&2047)-1023,e=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==e&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*e)*Math.pow(2,n)},aa.doubleToI64=function(e){var t,n,i,r=aa.i64tmp;return 0==e?(r.low=0,r.high=0):isFinite(e)?(n=e<0?-e:e,t=Math.floor(Math.log(n)/.6931471805599453),i=(n=Math.round(4503599627370496*(n/Math.pow(2,t)-1)))/4294967296|0,r.low=0|n,r.high=(e<0?-2147483648:0)|t+1023<<20|i):0";var n=typeof e;switch(n="function"==n&&(e.__name__||e.__ename__)?"object":n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];for(var i=e[0]+"(",r=(t+="\t",2),o=e.length;r{for(var n in t)wa(e,n,{get:t[n],enumerable:!0})})(y={},{codePointCount:()=>Ca,extractMentionParts:()=>xa,findMentionSuggestionHint:()=>La,hasMentionPartForMeOrAll:()=>Da,invalidateManualMentionMarkup:()=>Oa,parseMessageMention:()=>Fa,removeMentionMarkup:()=>Ra}),Ma=e=>Array.from(e),Ca=e=>Ma(e).length,ka=/{@:(ALL|\d+),(\d+)}@/g,Da=e=>xa(e).some(({userIdNumStr:e})=>null===e||"ALL"===e),Ra=t=>Fa(t).map(e=>"mention"===e.type?e.mentionText:"normal"===e.type?t.substring(e.start,e.end):"").join(""),Oa=e=>e.replace(ka,e=>e.substring(0,e.length-1)+" "),Fa=e=>{let n=0;var t=xa(e).flatMap(e=>{var t=[];return n!==e.start&&t.push({type:"normal",start:n,end:e.start}),t.push(e),n=e.end,t});return e.length!==n&&t.push({type:"normal",start:n,end:e.length}),t},xa=o=>{let s=0;return Array.from(o.matchAll(ka)).flatMap(e=>{var t,n,i,r=null!=(r=e.index)?r:0;return r{e=e.match(Ua);return null===e?null:{prev:e[1],atMarks:e[2],keyword:e[3]}},y=y,((t,n,i,r)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let e of Aa(n))ba.call(t,e)||e===i||wa(t,e,{get:()=>n[e],enumerable:!(r=Na(n,e))||r.enumerable});return t})(wa({},"__esModule",{value:!0}),y)),Jn.exports),Ba=((String.prototype.__class__=t.String=String).__name__=["String"],(t.Array=Array).__name__=["Array"],(Date.prototype.__class__=t.Date=Date).__name__=["Date"],t.Int={__name__:["Int"]}),Ha=t.Dynamic={__name__:["Dynamic"]},Ga=t.Float=Number,ja=(Ga.__name__=["Float"],t.Bool=Boolean),za=(ja.__ename__=["Bool"],t.Class={__name__:["Class"]}),Ya={},Wa={},y={},Ka=(y.exports=(()=>{var e=require("fs");let r=require("libxmljs");var t=require("path");let n=e=>e.namespace()?.href()??"",s=e=>`{${n(e)}}`+e.name();t=t.resolve(__dirname,"./note-richtext.v1.xsd"),e=r.parseXml(e.readFileSync(t,{encoding:"utf-8"}),{baseUrl:t});let i=new Map;function o(e){var t=Number(e.root().getAttribute("version")?.value()),n=i.get(t);return n?e.validate(n)?{ok:!0}:{ok:!1,errorType:"xsd",message:e.validationErrors.map(e=>e.message.trim()).join(" ")}:{ok:!1,errorType:"version",message:`The note version ${t} is not supported by this package. Please use one of the following values: `+Array.from(i.keys()).join(",")}}i.set(1,e);let a=new Map;function l(e){try{return function n(e,i,r){for(var o of e.childNodes())if("element"===o.type()){if(!i.includes(o.name()))throw new Error(`Element '${s(o)}': This element is not allowed at '${o.path()}'.`);{let t=r.get(o.name())??[],e=[...i].filter(e=>t.includes(e))??[];n(o,e,r)}}}(e.root(),a.get(e.root().name()),a),{ok:!0}}catch(e){return{ok:!1,errorType:"descendant",message:e.message}}}a.set("note",["textsize","color","b","link","u","strike","checkbox"]),a.set("textsize",["color","b","link","u","strike"]),a.set("color",["textsize","b","link","u","strike"]),a.set("b",["textsize","color","link","u","strike"]),a.set("link",["textsize","b","strike"]),a.set("u",["textsize","color","b","link","strike"]),a.set("strike",["textsize","color","b","link","u"]),a.set("checkbox",["color","b","link","u","strike"]);let u=e=>"element"===e.type(),c=e=>"element"===e.type()&&"checkbox"===e.name(),_=e=>"element"===e.type()&&"link"===e.name(),h=e=>"element"===e.type()&&["textsize","color","b","link","u","strike"].includes(e.name());function d(e,t,n,i){for(var r of e.childNodes())t(r)&&(n(r)&&i.push(r),d(r,t,n,i))}function f(e){var t=[];d(e.root(),u,_,t);try{for(var n of t){var i=n.text();if(null==i||""===i)throw new Error(`Element '${s(n)}': This element must not be empty. (element path: ${n.path()})`);if(/\r|\n/.test(i))throw new Error(`Element '${s(n)}': This element must not contain a new line. (element path: ${n.path()})`);var r=n.attrs().filter(e=>"url"===e.name())[0].value();if(!/^[\x20-\x7E]+$/.test(r))throw new Error(`Element '${s(n)}': The attribute 'url' must be URL-encoded or must be converted by Punycode if it's an IDN. (element path: ${n.path()})`)}return{ok:!0}}catch(e){return{ok:!1,errorType:"link",message:e.message}}}function m(e){var t=[];d(e.root(),u,c,t);try{for(var n of t)if(/\r|\n/.test(n.text()))throw new Error(`Element '${s(n)}': This element must not contain a new line. (element path: ${n.path()})`);return{ok:!0}}catch(e){return{ok:!1,errorType:"checkbox",message:e.message}}}function p(e){var t=[];d(e.root(),u,h,t);try{for(var n of t){var i=n.text();if(null==i||""===i)throw new Error(`Element '${s(n)}': This element must not be empty. (element path: ${n.path()})`)}return{ok:!0}}catch(e){return{ok:!1,errorType:"text-decorator",message:e.message}}}return{validateXml:function(e){let t;try{t=r.parseXml(e).doc()}catch(e){return{ok:!1,errorType:"parse",message:e.message}}let n={ok:!0};var i;for(i of[o,l,f,m,p])if(!(n=i(t)).ok)break;return n}}})(),y.exports),Y={};i.APP_STATE_CHANGED="app_state_changed",i.ACCESS_TOKEN_CHANGED="access_token_changed",i.CURRENT_USER_CHANGED="current_user_changed",i.CONFIGURATION_CHANGED="configuration_changed",i.DOMAIN_SELECTION_CHANGED="domain_selection_changed",i.TALK_SELECTION_CHANGED="talk_selection_changed",i.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",i.USER_SELECTION_NEEDED="user_selection_needed",i.USER_SELECTION_CHANGED="user_selection_changed",i.FRIEND_SELECTION_NEEDED="friend_selection_needed",i.COMMON_STAMP_SET_LOADED="common_stamp_set_loaded",i.STAMP_SELECTION_STARTED="stamp_selection_started",i.STAMP_SELECTION_ENDED="stamp_selection_ended",i.STAMP_SELECTION_CHANGED="stamp_selection_changed",i.ACTION_SELECTION_CHANGED="action_selection_changed",i.CURRENT_PAGE_CHANGED="current_page_changed",i.CURRENT_PAGE_REASSIGNED="current_page_reassgined",i.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",i.NOTE_FILEINFO_SELECTION_CHANGED="note_fileinfo_selection_changed",i.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",i.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",i.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",i.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",i.CLOSE_FILEPREVIEW_MODAL="close_filepreview_modal",i.ERROR_OCCURRED="error_occurred",i.UNREAD_COUNT_CHANGED="brand_badge_changed",i.SEND_FORM_TOP_CHANGED="send_form_top_changed",i.SOLUTIONS_LOADED="solutions_loaded",i.RIGHT_PANE_OPENED="right_pane_opened",i.RIGHT_PANE_CLOSED="right_pane_closed",i.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",i.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",i.PHOTO_EDITOR_SAVED="photo_editor_saved",i.ICON_EDITOR_SAVED="icon_editor_saved",i.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",i.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",i.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",i.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",i.PRESENCES_UPDATED="presences_updated",i.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",i.START_NOTE_EDITING="start_note_editing",i.OPEN_EXISTING_PAIR_TALK_COMPLETED="open_existing_pair_talk_completed",i.FIRST_ROUTING_WILL_START="first_routing_will_start",i.SIGNED_OUT="signed_out",i.ROUTUNG_TALK_FALLBACK="routing_talk_fallback",i.ROUTUNG_DOMAIN_FALLBACK="routing_domain_fallback",i.TALKS_SORT_MODE_CHANGED="talks_sort_mode_changed",i.RESERVE_SCHEDULED_MESSAGE_EDITING="reserve_scheduled_message_editing",i.DATA_RECOVERING="data_recovering",i.DATA_RECOVERED="data_recovered",i.NOTIFY_UPDATE_USER="notify_update_user",i.NOTIFY_ADD_FRIEND="notify_add_friend",i.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",i.NOTIFY_ADD_ACQUAINTANCES="notify_add_acquaintances",i.NOTIFY_DELETE_FRIEND="notify_delete_friend",i.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",i.NOTIFY_DELETE_ACQUAINTANCES="notify_delete_acquaintances",i.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",i.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",i.GET_USERS_RESPONSED="get_users_responsed",i.GET_PROFILE_RESPONSED="get_profile_responsed",i.GET_PROFILE_ERRORED="get_profile_errored",i.UPDATE_USER_RESPONSED="update_user_responsed",i.UPDATE_USER_ERRORED="update_user_errored",i.UPDATE_PROFILE_RESPONSED="update_profile_responsed",i.UPDATE_PROFILE_ERRORED="update_profile_errored",i.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",i.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",i.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",i.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",i.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",i.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",i.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",i.GET_ME_RESPONSED="get_me_responsed",i.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",i.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",i.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",i.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",i.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",i.NOTIFY_JOIN_DOMAIN="notify_join_domain",i.NOTIFY_UPDATE_DOMAIN="notify_update_domain",i.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",i.NOTIFY_ADD_DOMAIN_MEMBERS="notify_add_domain_members",i.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",i.CREATE_PAIR_TALK_COMPLETE="create_pair_talk_complete",i.CREATE_PAIR_TALK_FAIL="create_pair_talk_fail",i.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",i.CREATE_GROUP_TALK_COMPLETE="create_group_talk_complete",i.CREATE_GROUP_TALK_FAIL="create_group_talk_fail",i.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",i.UPDATE_GROUP_TALK_COMPLETE="update_group_talk_complete",i.UPDATE_GROUP_TALK_FAIL="update_group_talk_fail",i.NOTIFY_ADD_TALKERS="notify_add_talkers",i.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",i.NOTIFY_DELETE_TALKER="notify_delete_talker",i.NOTIFY_DELETE_TALK="notify_delete_talk",i.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",i.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",i.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",i.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",i.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",i.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",i.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",i.ADD_TALKERS_SUCCEEDED="add_talkers_succeeded",i.ADD_TALKERS_FAILED="add_talkers_failed",i.NOTIFY_CREATE_MESSAGE="notify_create_message",i.NOTIFY_DELETE_MESSAGE="notify_delete_message",i.NOTIFY_GET_MESSAGES="notify_get_messages",i.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",i.CREATE_MESSAGE_START="create_message_start",i.CREATE_MESSAGE_COMPLETE="create_message_complete",i.CREATE_MESSAGE_FAIL="create_message_fail",i.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",i.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",i.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",i.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",i.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",i.NOTIFY_SCHEDULE_MESSAGE="notify_schedule_message",i.NOTIFY_PROCESSED_SCHEDULED_MESSAGE="notify_processed_scheduled_message",i.NOTIFY_DELETE_SCHEDULED_MESSAGE="notify_delete_scheduled_message",i.GET_SCHEDULED_MESSAGES_COMPLETED="get_scheduled_messages_completed",i.GET_SCHEDULED_MESSAGES_FAILED="get_scheduled_messages_failed",i.DELETE_SCHEDULED_MESSAGES_COMPLETED="delete_scheduled_messages_completed",i.SCHEDULE_MESSAGE_STARTED="schedule_message_started",i.SCHEDULE_MESSAGE_COMPLETED="schedule_message_completed",i.SCHEDULE_MESSAGE_FAILED="schedule_message_faileed",i.RESCHEDULE_MESSAGE_STARTED="reschedule_message_started",i.RESCHEDULE_MESSAGE_COMPLETED="reschedule_message_completed",i.RESCHEDULE_MESSAGE_FAILED="reschedule_message_failed",i.NOTIFY_UPDATE_MESSAGE_REACTIONS="notify_update_message_reactions",i.GET_MESSAGE_REACTION_SUMMARIES_COMPLETED="get_message_reaction_summaries_completed",i.GET_MESSAGE_REACTION_SUMMARIES_FAILED="get_message_reaction_summaries_failed",i.SET_MESSAGE_REACTION_COMPLETED="set_message_reaction_completed",i.SET_MESSAGE_REACTION_FAILED="set_message_reaction_failed",i.RESET_MESSAGE_REACTION_COMPLETED="reset_message_reaction_completed",i.RESET_MESSAGE_REACTION_FAILED="reset_message_reaction_failed",i.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",i.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",i.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",i.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",i.CREATE_ANNOUNCEMENT_START="create_announcement_start",i.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",i.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",i.NOTIFY_UPDATE_QUESTION="notify_update_question",i.NOTIFY_GET_QUESTIONS="get_questions_responsed",i.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",i.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",i.GET_FILE_RESPONSED="get_file_responsed",i.GET_FILE_PREVIEW="get_file_preview",i.CREATE_FILE_PREVIEW="create_file_preview",i.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",i.GET_NOTE_LOADED="get_note_loaded",i.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",i.CREATE_NOTE_COMPLETED="create_note_completed",i.CREATE_NOTE_FAILED="create_note_failed",i.UPDATE_NOTE_LOCAL_EDIT="update_note_local_edit",i.CLEAR_NOTE_LOCAL_EDIT="clear_note_local_edit",i.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",i.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",i.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",i.UPDATE_NOTE_SETTING_FAILED_BY_EDITING="update_note_setting_failed_by_editing",i.UPDATE_NOTE_COMPLETED="update_note_completed",i.DELETE_NOTE_COMPLETED="delete_note_completed",i.NOTIFY_CREATE_NOTE="notify_create_note",i.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",i.NOTIFY_DELETE_NOTE="notify_delete_note",i.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",i.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",i.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",i.NOTIFY_LOCK_NOTE="notify_lock_note",i.NOTIFY_UNLOCK_NOTE="notify_unlock_note",i.NOTIFY_SEARCH_MESSAGES="notify_search_messages",i.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",i.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",i.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",i.NOTIFY_SEARCH_PREPARE="notify_search_prepare",i.NOTIFY_SEARCH_CLEAR="notify_search_clear",i.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",i.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",i.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",i.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",i.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",i.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",i.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",i.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",i.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",i.JOIN_CONFERENCE_CANCELED="join_conference_canceled",i.GET_CONFERENCE_PARTICIPANTS_RESPONSED="get_conference_participants_responsed",i.NOTIFY_OPEN_CONFERENCE="notify_open_conference",i.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",i.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",i.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",i.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",i.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",i.NOTIFY_UPDATE_DOMAIN_STAMP_SETTING="notify_update_domain_stampsetting",i.NOTIFY_UPDATE_STAMPSET="notify_update_stampset",i.NOTIFY_DELETE_STAMPSET="notify_delete_stampset",i.NOTIFY_UPDATE_DOMAIN_BUILTIN_STAMP_SETTING="notify_update_domain_builtin_stampsetting",i.NOTIFY_FLOW_NOTIFICATION_BADGE="notify_flow_notification_badge",i.GET_FLOW_NOTIFICATION_BADGES_COMPLETED="get_flow_notification_badges_completed",i.GET_FLOW_NOTIFICATION_BADGES_FAILED="get_flow_notification_badges_failed",i.GET_DIRECT_APPS_COMPLETED="get_direct_apps_completed",i.GET_DIRECT_APPS_FAILED="get_direct_apps_failed",i.START_NOTIFICATION_FAILED="start_notification_failed",Rn.DEFAULT_RESOLVER=new Dn,Rn.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",_.accessMode=On.Disabled,te.ANNOUNCEMENTS_KEY="-1",Bn.__meta__={fields:{api:{inject:null}}},Bn.NAME="AccountControlRequest",Gn.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Gn.NAME="Conference",zn.__meta__={fields:{api:{inject:null}}},zn.NAME="Device",Wn.__meta__={fields:{api:{inject:null}}},Wn.NAME="Domain",Vn.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},Vn.NAME="FilePath",Qn.__meta__={fields:{api:{inject:null}}},Qn.NAME="FilePreview",Xn.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Xn.NAME="LoadStampset",$n.__meta__={fields:{api:{inject:null}}},$n.NAME="ManageFriends",ei.__meta__={fields:{api:{inject:null}}},ei.NAME="Message",ni.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},ni.NAME="MessageReaction",ri.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},ri.NAME="Note",si.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},si.NAME="Read",li.__meta__={fields:{api:{inject:null}}},li.NAME="ReloadData",ci.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},ci.NAME="ScheduleMessage",hi.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},hi.NAME="Search",fi.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},fi.NAME="SelectTalk",pi.__meta__={fields:{api:{inject:null}}},pi.NAME="Send",gi.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},gi.NAME="SignIn",yi.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},yi.NAME="SignOut",Si.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Si.NAME="Talk",Ti.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ti.NAME="UpdateProfile",Ii.__meta__={fields:{api:{inject:null}}},Ii.NAME="UpdateUser",Ei.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Ei.NAME="UpdateUserPresences",Ei.MAX_USERS_PER_API=100,wi.__meta__={fields:{routing:{inject:null}}},wi.NAME="Url",_e.TalkAutoScrollDelay=1,_e.TalkAutoScrollImmediately=2,_e.TalkAutoScrollNone=3,_e.NotificationPopupTime5Sec=5,_e.TalksSortModeNewMessagesFirst="new_messages_first",_e.TalksSortModeUnreadMessagesFirst="unread_messages_first",_e.TalksSortModeOldMessagesFirst="old_messages_first",_e.DomainsSortModeNameOrderAsc="name_order_asc",_e.OLD_KEY_RIGHT_PANEL_OPENED="right_panel_opened",_e.OLD_KEY_RIGHT_PANEL_WIDTH="right_panel_width",_e.OLD_KEY_APP_LEFT_PANEL_OPENED="app_left_panel_opened",_e.NAME="browser_settings",Fi.MAX_SIZE=72,he.INCOMING_TIME=6e4,Li.DEFAULT_PRESENCE_EXPIRATION=3e5,Li.DEFAULT_UPDATE_LAST_USED_AT_INTERVAL=6e5,Bi.DEFAULT_TTL=3600,Bi.DEFAULT_MAX_PARTICIPANTS=8,rr.stagedFileInfosMaxId=0,Ae.TIMESTAMP_SHIFT=22,O.MAX_READ_USER_IDS_COUNT=16,Pe.QUERY_DATE_TODAY="t",Pe.QUERY_DATE_YESTERDAY="-1d",Pe.QUERY_DATE_THREE_DAYS_BEFORE="-3d",zr.HISTORY_TAB_NAME="stamp-history",it.SIXTY_MINUTES=new E(0,36e5),it.FIFTEEN_MINUTES=new E(0,9e5),go.PREFIX="note-",go.nextDummyId=new E(-1,-1),Ot.CONTINUE_MARGIN_RATE=.1,Pt.CHEKBOX_UNCHECKED="- [ ] ",Pt.CHEKBOX_CHECKED="- [x] ",jt.TU_REG=new v("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),jt.XTU_REG=new v("ッ","gm"),F.EMERGENCY=0,F.ALERT=1,F.CRITICAL=2,F.ERROR=3,F.WARNING=4,F.NOTICE=5,F.INFO=6,F.DEBUG=7,F.level=F.getLogLevel(process.env.HUBOT_LOG_LEVEL),F._d=7<=F.level&&null!=console?console.log.bind(console):F._nop,F._i=6<=F.level&&null!=console?console.info.bind(console):F._nop,F._w=4<=F.level&&null!=console?console.warn.bind(console):F._nop,F._e=3<=F.level&&null!=console?console.error.bind(console):F._nop,Oo.HIRAGANA_SMALL_A=12353,Oo.HIRAGANA_NN=12435,Oo.KATAKANA_SMALL_A=12449,Uo.NAME="accessTokenResolver",l.NAME="Proxy",Lo.__meta__={fields:{settings:{inject:null},accountLoader:{inject:null},api:{inject:null}}},Po.NAME="accountLoader",Ho.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},keywordWatcher:{inject:null}}},Ho.NAME="broadcast",Go.__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}}},Go.NAME="api",Go.API_VERSION="1.128",Go.UPDATE_VERSION="1.128_0",Go.ACTIONS_COUNT_PER_API=20,jo.__meta__={fields:{rpc:{inject:null}}},jo.NAME="apiCaller",jo.DELAY_FOR_DB_REPLICATION=500,jo.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,jo.API_TRY_COUNT=3,zo.__meta__={fields:{dataStore:{inject:null},settings:{inject:null},wsApi:{inject:null}}},zo.NAME="apiNote",Yo.NAME="appState",Wo.__meta__={fields:{dataStore:{inject:null}}},Wo.NAME="dataFactory",Ko.NAME="dataStore",Ko.STORAGE_KEY_FOR_GENERAL="dataStore",Ko.STORAGE_KEY_FOR_TALKS="dataStoreTalks",Ko.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",Ko.STORAGE_KEY_FOR_USERS="dataStoreUsers",Ko.TYPE_FRIEND=0,Ko.TYPE_ACQUAINSTANCE=1,Ko.TYPE_NONE=2,Vo.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Vo.NAME="features",Qo.NAME="fileService",Xo.__meta__={fields:{settings:{inject:null}}},Jo.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},Jo.NAME="keywordWatcher",Jo.TALK_KEY_PREFIX="talk_",Jo.ANNOUNCEMENT_KEY_PREFIX="announcement_",Zo.TEMP_HALF_SPACE="&SPACE",Zo.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",ns.__meta__={fields:{settings:{inject:null}}},ns.NAME="lastUsedAtUpdater",is.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},is.NAME="limitations",rs.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},rs.NAME="rpc",rs.lastMsgId=0,os.PING_INTERVAL_ON_CONNECTED=45e3,cs.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},cs.NAME="readStatusUpdater",_s.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},_s.NAME="routing",fs.__meta__={fields:{settings:{inject:null}}},fs.NAME="searchService",fs.LOAD_SIZE=20,fs.DUMMY_VALUE_FOR_SET=1,ms.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},api:{inject:null}}},ms.NAME="session",ps.NAME="settings",ps.KEY_ACCESS_TOKEN="access_token",ps.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",ps.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",ps.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",ps.KEY_INPUT_TEXT="input_text",ps.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",ps.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",ps.KEY_SEARCH_HISTORIES="search_histories",ps.KEY_MULTI_VIEW_MODE="multi_view_mode",ps.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",ps.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",ps.KEY_IDFV="idfv",gs.__meta__={fields:{dataStore:{inject:null}}},gs.NAME="talksService",ys.__meta__={fields:{dataStore:{inject:null}}},ys.NAME="userPresences",Ss.__meta__={fields:{apiCaller:{inject:null}}},Ss.NAME="wsApi",p.MAX_CONTENT_BYTES=1e5,p.NOTE_EVENT_NAMES=["created","updated","deleted"],Ns.CONTENT_TYPE_XML="xml",Ns.CONTENT_TYPE_TEXT="text",Ms.NAME="Mediator",Cs.__meta__={fields:{dataStore:{inject:null},api:{inject:null},hubotObject:{inject:null},messageEvent:{inject:null},sendQueue:{inject:null}}},Cs.NAME="commandline",Cs.DATA_SAVE_SPAN=5e3,Rs.__meta__={fields:{dataStore:{inject:null}}},Rs.NAME="hubotObject",Os.__meta__={fields:{dataStore:{inject:null},hubotObject:{inject:null}}},Os.NAME="messageEvent",Fs.minWaitMinute=1,Fs.maxWaitMinute=1440,Fs.SEND_EVENT_NAME="send",xs.__meta__={fields:{messageEvent:{inject:null}}},xs.NAME="sendQueue",xs.MIN_SEND_SPAN_MESSAGE=550,xs.MIN_SEND_SPAN_ANNOUNCE=5050,xs.MAX_TEXT_LENGTH=1024,xs.MAX_FIELD_COUNT=9,xs.MAX_FIELD_LENGTH=64,Ps.INVALID_PARAMETER="INVALID_PARAMETER",Ps.FORBIDDEN="FORBIDDEN",Ps.NOT_FOUND="NOT_FOUND",Ps.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",Ps.CONFLICT="CONFLICT",Ps.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",Ps.CLIENT_UPGRADE_REQUIRED="CLIENT_UPGRADE_REQUIRED",Ps.UNKNOWN="UNKNOWN",w._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},Ks.USE_CACHE=!1,Ks.USE_ENUM_INDEX=!1,Ks.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",$s.count=0,aa.i64tmp=new E(0,0),G.__toStr={}.toString,pa.FLOAT_SINGLE_MIN=1401298464324817e-60,pa.FLOAT_SINGLE_MAX=34028234663852886e22,pa.FLOAT_DOUBLE_MIN=5e-324,pa.FLOAT_DOUBLE_MAX=17976931348623157e292,yn.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 To.__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&&(ts.host=e.host,ts.endpoint=e.endpoint,ts.accessToken=e.access_token,ts.proxyURL=e.proxyURL,ts.account=e.account,ts.talkWithBot=e.talkWithBot,ts.acceptableEventTimeDiff=e.acceptableEventTimeDiff,ts.name=e.name,ts.storagePath=e.storage_path,ts.storageQuota=e.storage_quota,ts.wsConfig=e.ws_config,null!=e.internalLogger&&yr.setInternalLogger(e.internalLogger)),yr.d("current settings",ts),null==ts.accessToken&&yr.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 mi(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 mi(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 mi(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 mi(y.parseInt(i[1]),y.parseInt(i[2])):n=null;this.facade.sendNotification("Talk",Fe.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=bo.basename(i)),null==r&&(r=bo.join(Ao.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 mi(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 mi(y.parseInt(s[1]),y.parseInt(s[2]));i=l}else i=null}$a.delay(function(){r.facade.sendNotification("Talk",Fe.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 ja.parseInt64(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),ja.stringifyInt64(e,t)},listen:function(){this.facade=b.getInstance(),this.api=To.__cast(this.facade.retrieveProxy("api"),Br),this.data=To.__cast(this.facade.retrieveProxy("dataStore"),Yr),this.ID=new ja,this.hubotObject=To.__cast(this.facade.retrieveProxy("hubotObject"),Ua),this.sendQueue=To.__cast(this.facade.retrieveProxy("sendQueue"),Ba);var e=To.__cast(this.facade.retrieveProxy("fileService"),Kr);this.notes=new Sa(new wa(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 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},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 To.__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 E=function(){};n.Type=E,E.__name__=["Type"],E.getClassName=function(e){var t=e.__name__;return null==t?null:t.join(".")},E.getEnumName=function(e){return e.__ename__.join(".")},E.resolveClass=function(e){var t=n[e];return null!=t&&t.__name__?t:null},E.resolveEnum=function(e){var t=n[e];return null!=t&&t.__ename__?t:null},E.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 Io("Too many arguments")}},E.createEmptyInstance=function(e){function t(){}return t.prototype=e.prototype,new t},E.createEnum=function(e,t,n){var i=v.field(e,t);if(null==i)throw new Io("No such constructor "+t);if(v.isFunction(i)){if(null==n)throw new Io("Constructor "+t+" need parameters");return i.apply(e,n)}if(null!=n&&0!=n.length)throw new Io("Constructor "+t+" does not need parameters");return i},E.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=To.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}},E.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():O.dateString(r,!1)},O.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()},O.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=O.dateString(r,!1);return t.getFullYear()==r.getFullYear()&&(a+=" "+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()),a},O.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()},O.datetimeString=function(e){if(null==e)return"";var t=parseFloat(Ja.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 mi(0,1024),r=t=Ja.divMod(e,i).quotient,a=new mi(0,0),o=r.high-a.high|0;if(o=0!=o?o:Qa.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 Ja.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 mi(0,0),n=new mi(0,10),i=0,r=e.length;i>>16,u=65535&n.low,c=n.low>>>16,_=Qa._mul(s,u),h=Qa._mul(l,u),d=Qa._mul(s,c),f=_,m=(Qa._mul(l,c)+(d>>>16)|0)+(h>>>16)|0;if(f=f+(d<<=16)|0,Qa.ucompare(f,d)<0){m++;m|=0}if(f=f+(h<<=16)|0,Qa.ucompare(f,h)<0){m++;m|=0}m=m+(Qa._mul(t.low,n.high)+Qa._mul(t.high,n.low)|0)|0;var p=new mi(m,f),g=new mi(0,y.parseInt(e.charAt(a))),v=p.high+g.high|0,S=p.low+g.low|0;if(Qa.ucompare(S,p.low)<0){v++;v|=0}t=new mi(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 mi(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 Ja.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(Qa.ucompare(i,e.low)<0){n++;n|=0}return new mi(n,i)},U.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Qa.ucompare(e.low,t.low)<0){n--;n|=0}return new mi(n,i)},U.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Qa.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 mi(y.parseInt(t[1]),y.parseInt(t[2])):null},U.decrement=function(e){if(null==e)return null;var t=new mi(0,1),n=e.high-t.high|0,i=e.low-t.low|0;if(Qa.ucompare(e.low,t.low)<0){n--;n|=0}return new mi(n,i)},U.increment=function(e){if(null==e)return null;var t=new mi(0,1),n=e.high+t.high|0,i=e.low+t.low|0;if(Qa.ucompare(i,e.low)<0){n++;n|=0}return new mi(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 mn(d.id,f))}}}else{for(var w=[],I=(u.iter(n),0);I0&&a.push(new mn(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:Re});var xe=function(){Z.call(this)};n["albero.command.UpdateUserCommand"]=xe,xe.__name__=["albero","command","UpdateUserCommand"],xe.__super__=Z,xe.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__:xe});var Ue=function(){Z.call(this)};n["albero.command.UpdateUserPresencesCommand"]=Ue,Ue.__name__=["albero","command","UpdateUserPresencesCommand"],Ue.__super__=Z,Ue.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=O.nowAsInt64(),i=this.settings.getConfiguration().presenceExpiration,r=new mi(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)},Ke.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 vr.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return vr.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return vr.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return vr.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 vr.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return vr.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return vr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return vr.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__:Ke};var Ve=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=Xt.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"]=Ve,Ve.__name__=["albero","entity","Announcement"],Ve.prototype={getDisplayTextWithoutEscape:function(){return Xt.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 yr.e("Unsupported announcement.type is detected. announcment:%o",this),Xt.getUnsupportText()}},__class__:Ve};var qe=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 Ve(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};n["albero.entity.AnnouncementStatus"]=qe,qe.__name__=["albero","entity","AnnouncementStatus"],qe.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:Qa.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=Zt.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(!Qe.isUnreadAnnouncementExisted(this))return!1;if(null==this.maxAnnouncementId)return!1;this.readAll()}else{var t=e.filter(Ko(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),yr.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:Qa.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:Qa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},__class__:qe};var Qe=function(){};n["albero.entity.AnnouncementStatusHelper"]=Qe,Qe.__name__=["albero","entity","AnnouncementStatusHelper"],Qe.isUnreadAnnouncementExisted=function(e){return null!=e&&(null!=e.maxAnnouncement&&e.isUnread(e.maxAnnouncement.id))},Qe.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var Je=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};n["albero.entity.AnnouncementStatusUpdate"]=Je,Je.__name__=["albero","entity","AnnouncementStatusUpdate"],Je.prototype={__class__:Je};var Xe=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.notificationPopupTime=5,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,this.domainsSortMode="name_order_asc",this.appLeftPanelOpened=!1,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.notificationPopupTime&&(this.notificationPopupTime=e.notificationPopupTime),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=To.__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__:et};var tt=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"]=tt,tt.__name__=["albero","entity","Conference"],tt.prototype={isIncomingExpired:function(){var e=this.createdAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)+tt.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__:tt};var nt=function(){this.conferencesMap=new co,this.talkIdConferenceIdMap=new co};n["albero.entity.ConferenceStore"]=nt,nt.__name__=["albero","entity","ConferenceStore"],nt.prototype={addConference:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.conferencesMap;null!=ns[n]?i.setReserved(n,e):i.h[n]=e;var r=e.talkId,a="_"+r.high+"_"+r.low,o=this.talkIdConferenceIdMap;null!=ns[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!=ns[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!=ns[t]?n.getReserved(t):n.h[t]},hasConferenceInTalk:function(e){if(null!=e){var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;return null!=ns[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!=ns[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__:nt};var it=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:it.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Ke.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled)};n["albero.entity.Configuration"]=it,it.__name__=["albero","entity","Configuration"],it.prototype={__class__:it};var rt=function(e){this.contractConference=lo.None,null!=e&&(this.id=e.contract_id,this.plan=new cn(e.plan),this.quota=new An(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=lo.Some(new at(e.conference))))};n["albero.entity.Contract"]=rt,rt.__name__=["albero","entity","Contract"],rt.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__:rt};var at=function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=at.DEFAULT_MAX_PARTICIPANTS,this.ttl=at.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"]=at,at.__name__=["albero","entity","ContractConference"],at.prototype={__class__:at};var ot=function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?lt.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=ot.getLabelRoot();break;case 2:this.name=ot.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};n["albero.entity.Department"]=ot,ot.__name__=["albero","entity","Department"],ot.getLabelFree=function(){return vr.localize("Department.label_free")},ot.getLabelRoot=function(){return vr.localize("Department.label_root")},ot.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==lt.Root},isFree:function(){return this.nodeType==lt.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return lt.Root;case 2:return lt.Free;default:return lt.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(U.idStr)},__class__:ot};var st=function(){};n["albero.entity.DepartmentHelper"]=st,st.__name__=["albero","entity","DepartmentHelper"],st.getName=function(e){return null==e?null:e.name};var lt=n["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};lt.Normal=["Normal",0],lt.Normal.toString=i,lt.Normal.__enum__=lt,lt.Root=["Root",1],lt.Root.toString=i,lt.Root.__enum__=lt,lt.Free=["Free",2],lt.Free.toString=i,lt.Free.__enum__=lt,lt.__empty_constructs__=[lt.Normal,lt.Root,lt.Free];var ut=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};n["albero.entity.DepartmentList"]=ut,ut.__name__=["albero","entity","DepartmentList"],ut.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new ot(e)})},__class__:ut};var ct=function(){this.departmentMap=new co,this.rootDepartmentIdMap=new co};n["albero.entity.DepartmentStore"]=ct,ct.__name__=["albero","entity","DepartmentStore"],ct.prototype={getDepartment:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.departmentMap;return null!=ns[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!=ns[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!=ns[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!=ns[t]?n.getReserved(t):n.h[t]},setRootDepartmentId:function(e,t){var n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap;null!=ns[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__:ct};var _t=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};n["albero.entity.DepartmentUserCount"]=_t,_t.__name__=["albero","entity","DepartmentUserCount"],_t.prototype={__class__:_t};var ht=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};n["albero.entity.DepartmentUserCountList"]=ht,ht.__name__=["albero","entity","DepartmentUserCountList"],ht.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new _t(e)})},__class__:ht};var dt=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 co,null!=e.locales)for(var n=0,i=v.fields(e.locales);n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){return!!z.isEmpty(e)||(z.isEmpty(this.canonicalDisplayName)&&(this.canonicalDisplayName=Nr.canonicalize(this.displayName),yr.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)||(z.isEmpty(this.canonicalDisplayNameRoman)&&(this.canonicalDisplayNameRoman=Nr.canonicalizeForRoman(this.displayName),yr.v("create canonical display name(roman) from %s to %s.",this.canonicalDisplayNameRoman,this.displayName)),this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(z.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=Nr.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1))},__class__:kt});var Ct=function(e){this.values=e};n["albero.entity.Domains"]=Ct,Ct.__name__=["albero","entity","Domains"],Ct.prototype={orderByName:function(){var e=L.sortAndReturn(this.values.map(Mt.fromDomain),Mt.compare).map(Mt.toDomain);return new Ct(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?lo.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:Qa.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:Qa.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return lo.Some(e)}},lo.None)},getDirectAppsIds:function(){if(null==this.values||0==this.values.length)return[];var e=new co;return c.iter(this.values,function(t){c.iter(t.directAppsSetting.enabled,function(t){var n="_"+t.high+"_"+t.low;null!=ns[n]?e.setReserved(n,t):e.h[n]=t})}),B.toValueArray(e)},__class__:Ct};var Mt=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=Nr.canonicalize(this.name)};n["albero.entity.DomainForSort"]=Mt,Mt.__name__=["albero","entity","DomainForSort"],Mt.fromDomain=function(e){return new Mt(e)},Mt.toDomain=function(e){return e.domain},Mt.compare=function(e,t){var n=z.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:z.compare(e.name,t.name)},Mt.prototype={__class__:Mt};var Ot=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new Ft(e.get_headers))};n["albero.entity.DownloadAuth"]=Ot,Ot.__name__=["albero","entity","DownloadAuth"],Ot.prototype={__class__:Ot};var Ft=function(e){this.rawData=e};n["albero.entity.DownloadAuthHeaders"]=Ft,Ft.__name__=["albero","entity","DownloadAuthHeaders"],Ft.prototype={__class__:Ft};var Rt=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"]=Rt,Rt.__name__=["albero","entity","FavoriteTalkEvent"],Rt.prototype={__class__:Rt};var xt=function(e){this.uploadResult=Ut.NONE,this.preview=lo.None,this.thumbnailDimension=lo.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=lo.None,this.deleted=null!=e.deleted&&e.deleted,this.previewSupported=null!=e.preview_supported&&e.preview_supported)};n["albero.entity.FileInfo"]=xt,xt.__name__=["albero","entity","FileInfo"],xt.fromMessageAndFile=function(e,t){var n=new xt;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?lo.None:lo.Some(new ci(t.thumbnail_dimension)),n.deleted=null!=t.deleted&&t.deleted,n.file=t.file,n.localThumbInfo=t.localThumbInfo,n.previewSupported=t.preview_supported,n},xt.fromScheduledMessageFileContent=function(e){var t=new xt;return t.id=e.file_id,t.name=e.name,t.contentType=e.content_type,t.contentSize=e.content_size,t.url=e.url,t.thumbUrl=e.thumbnail_url,t.thumbnailDimension=null==e.thumbnail_dimension?lo.None:lo.Some(new ci(e.thumbnail_dimension)),t.deleted=null!=e.deleted&&e.deleted,t.file=e.file,t.localThumbInfo=e.localThumbInfo,t.previewSupported=e.preview_supported,t},xt.fromMessageAndFileWithFileId=function(e,t,n){var i=xt.fromMessageAndFile(e,t);return i.id=n,i},xt.createUploadedFileInfo=function(e){var t=new xt;return t.id=e.id,t.contentType=e.content_type,t.contentSize=e.content_size,t.url=e.url,t.name=e.name,t},xt.createStagedFileInfo=function(e,t,n){var i=t,r=new xt,a=new mi(0,--xt.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},xt.createStagedFileInfoFromDummyFile=function(e,t,n){var i=new xt,r=new mi(0,--xt.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},xt.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 yr.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__:xt};var Ut=n["albero.entity.UploadResult"]={__ename__:["albero","entity","UploadResult"],__constructs__:["SUCCESS","FAILUER","NONE"]};Ut.SUCCESS=function(e){var t=["SUCCESS",0,e];return t.__enum__=Ut,t.toString=i,t},Ut.FAILUER=["FAILUER",1],Ut.FAILUER.toString=i,Ut.FAILUER.__enum__=Ut,Ut.NONE=["NONE",2],Ut.NONE.toString=i,Ut.NONE.__enum__=Ut,Ut.__empty_constructs__=[Ut.FAILUER,Ut.NONE];var Pt=function(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])};n["albero.entity.FileInfoDeletion"]=Pt,Pt.__name__=["albero","entity","FileInfoDeletion"],Pt.prototype={__class__:Pt};var Lt=function(){this.fileInfoMap=new co,this.fileIdStrsMap=new co,this.messageFileIdStrsMap=new co,this.noteFileIdStrsMap=new co,this.filePreviewMap=new co,this.scheduledMessageFileIdStrsMap=new co};n["albero.entity.FileInfoStore"]=Lt,Lt.__name__=["albero","entity","FileInfoStore"],Lt.prototype={ensureStagedFileInfos:function(e){return this.ensureStagedFileIdStrs(e).map(U.makeFromIdStr).filter(function(e){return null!=e}).map(Ko(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!=ns[t]?n.getReserved(t):n.h[t];if(null==i){i=[];var r=this.fileIdStrsMap;null!=ns[t]?r.setReserved(t,i):r.h[t]=i}return i},addStagedFileInfo:function(e,t,n,i){var r=xt.createStagedFileInfo(e,n,i),a=r.id,o="_"+a.high+"_"+a.low,s=this.fileInfoMap;null!=ns[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=xt.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!=ns[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!=ns[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!=ns[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 mi(e.high>>31,e.high>>t-32)},jt.subTimestampPart=function(e,t){var n=jt.timestamp(e),i=jt.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(Qa.ucompare(n.low,i.low)<0){r--;r|=0}return new mi(r,a)},jt.createForTest=function(e){var t=jt.TIMESTAMP_SHIFT;return 0==(t&=63)?new mi(e.high,e.low):t<32?new mi(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,vr.localize("MessageStringMaker.yes"),vr.localize("MessageStringMaker.no")].join(" ");case 14:return e&&null!=this.content.response?this.content.response?vr.localize("MessageStringMaker.yes"):vr.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,vr.localize("MessageStringMaker.achieve"),vr.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?vr.localize("MessageStringMaker.achieve"):vr.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForCompactMessage: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 vr.localize("Message.bookmark_label_deleted");case 8:return[vr.localize("Message.bookmark_label_note_shared"),new Hi(this.content).title].join(" ");case 10:return[vr.localize("Message.bookmark_label_note_created"),new Hi(this.content).title].join(" ");case 11:return[vr.localize("Message.bookmark_label_note_updated"),new Hi(this.content).title].join(" ");case 2:case 12:return null!=this.content.text&&this.content.text.length>0?[vr.localize("Message.bookmark_label_stamp"),this.content.text].join(" "):vr.localize("Message.bookmark_label_stamp");case 14:case 16:return[vr.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 13:case 15:return[vr.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 17:return[vr.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 18:return[this.content.done?vr.localize("Message.bookmark_label_completed"):vr.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 19:case 20:return[vr.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 21:return[vr.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 8:case 10:case 11:return new Hi(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 Gi(this.content):null},getContentsForOriginalStamp:function(){return 12==this.type[1]?new zi(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!=Zt.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()},isAllowedToCopyLink:function(){return!(!this.isNotSystemMessage()||!this.isNotDeletedMessage())&&this.isNotStampMessageWithEmptyText()},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==Zt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==Zt.yesOrNo||this.type==Zt.yesOrNoReply||this.type==Zt.selectOne||this.type==Zt.selectOneReply||this.type==Zt.todo||this.type==Zt.todoDone||this.type==Zt.yesOrNoClosed||this.type==Zt.selectOneClosed||this.type==Zt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==Zt.selectOneReply||this.type==Zt.yesOrNoReply||this.type==Zt.todoDone},isClosedActionStampMessage:function(){return this.type==Zt.yesOrNoClosed||this.type==Zt.selectOneClosed||this.type==Zt.todoClosed},isTextMultipleFile:function(){return this.type==Zt.textMultipleFile},isSendingActionStampMessage:function(){return this.type==Zt.yesOrNo||this.type==Zt.selectOne||this.type==Zt.todo},isNoteMessage:function(){return this.type==Zt.noteShared||this.type==Zt.noteDeleted||this.type==Zt.noteCreated||this.type==Zt.noteUpdated},isNoteDeletedMessage:function(){return this.type==Zt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==Zt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==Zt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==Zt.stamp||this.type==Zt.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 z.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==Zt.text},isOpenConference:function(){return this.type==Zt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){return yr.i(this.type),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?lo.Some(this.content.in_reply_to):lo.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=vr.localize("QuestionHelper.close_answer")+"\n";if(null==this.content.responses)t+="...";else{var n=this.content.responses,i=this.content.last_response;if(0==Tn.closingTypeOf(this.content.closing_type)[1])t+=null!=i?vr.localize("QuestionHelper.last_response",{content:e(n[i].content),interpolation:{escapeValue:!1}}):vr.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+vr.localize("QuestionHelper.name")}).join("\n"):vr.localize("QuestionHelper.no_answer")}}return t},getTodoCloseResponse:function(){var e=vr.localize("QuestionHelper.close_task")+"\n";if(null==this.content.responses)e+="...";else{var t=this.content.responses,n=this.content.last_response;if(0==Tn.closingTypeOf(this.content.closing_type)[1]){e+=null!=n&&"DONE"==t[n].content?vr.localize("QuestionHelper.achieve_task"):vr.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__:un};var cn=function(e){null!=e&&(this.name=e.plan_name,this.trial=!!e.trial,this.free=!!e.free)};n["albero.entity.Plan"]=cn,cn.__name__=["albero","entity","Plan"],cn.prototype={__class__:cn};var _n=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=To.__cast(e.item_values,Array).map(function(e){return new fn(e)})))};n["albero.entity.Profile"]=_n,_n.__name__=["albero","entity","Profile"],_n.prototype={__class__:_n};var hn=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=To.__cast(e.item_definitions,Array);t=0?o:1)>0&&(this.updatedAt=i,this.maxResponseId=t,this.lastResponse=e,this.lastResponseUserId=n)},__class__:yn};var Sn=n["albero.entity.QuestionFromType"]={__ename__:["albero","entity","QuestionFromType"],__constructs__:["fromSelf","fromOther"]};Sn.fromSelf=["fromSelf",0],Sn.fromSelf.toString=i,Sn.fromSelf.__enum__=Sn,Sn.fromOther=["fromOther",1],Sn.fromOther.toString=i,Sn.fromOther.__enum__=Sn,Sn.__empty_constructs__=[Sn.fromSelf,Sn.fromOther];var wn=n["albero.entity.QuestionFilter"]={__ename__:["albero","entity","QuestionFilter"],__constructs__:["onlyClosed","onlyUnclosed","noFilter"]};wn.onlyClosed=["onlyClosed",0],wn.onlyClosed.toString=i,wn.onlyClosed.__enum__=wn,wn.onlyUnclosed=["onlyUnclosed",1],wn.onlyUnclosed.toString=i,wn.onlyUnclosed.__enum__=wn,wn.noFilter=["noFilter",2],wn.noFilter.toString=i,wn.noFilter.__enum__=wn,wn.__empty_constructs__=[wn.onlyClosed,wn.onlyUnclosed,wn.noFilter];var In=n["albero.entity.QuestionClosingType"]={__ename__:["albero","entity","QuestionClosingType"],__constructs__:["any","all","unknown"]};In.any=["any",0],In.any.toString=i,In.any.__enum__=In,In.all=["all",1],In.all.toString=i,In.all.__enum__=In,In.unknown=["unknown",2],In.unknown.toString=i,In.unknown.__enum__=In,In.__empty_constructs__=[In.any,In.all,In.unknown];var Tn=function(){};n["albero.entity.QuestionClosingTypeHelper"]=Tn,Tn.__name__=["albero","entity","QuestionClosingTypeHelper"],Tn.closingTypeOf=function(e){switch(e){case 0:return In.any;case 1:return In.all;default:return In.unknown}};var En=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"]=En,En.__name__=["albero","entity","QuestionResponse"],En.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__:En};var Nn=function(){this.questions=new co};n["albero.entity.QuestionStore"]=Nn,Nn.__name__=["albero","entity","QuestionStore"],Nn.prototype={removeTalkQuestions:function(e){for(var t=this.getQuestions(e),n=0;n>>16,s=65535&t.low,l=t.low>>>16,u=Qa._mul(a,s),c=Qa._mul(o,s),_=Qa._mul(a,l),h=u,d=(Qa._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,Qa.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,Qa.ucompare(h,c)<0){d++;d|=0}d=d+(Qa._mul(e.low,t.high)+Qa._mul(e.high,t.low)|0)|0;var f=new mi(d,h),m=new mi(0,y.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(Qa.ucompare(g,f.low)<0){p++;p|=0}e=new mi(p,g)}return e},__class__:Gn};var zn=function(e,t,n){this.stampsetId=e,this.id=t,this.illust=n};n["albero.entity.OriginalStamp"]=zn,zn.__name__=["albero","entity","OriginalStamp"],zn.__interfaces__=[Hn],zn.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 zn(n,i,t.illust)},zn.fromPropsAndStampsetId=function(e,t){return new zn(t,U.fromIntOrInt64(e.id),e.illust)},zn.createKey=function(e){return"original__"+e.high+"_"+e.low},zn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return zn.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 Xt;return n.talkId=e,n.type=Zt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:zn};var jn=function(){this.stampsetStore=new co,this.stampStore=new co,this.stampKeyCategoryIdMap=new co};n["albero.entity.StampStore"]=jn,jn.__name__=["albero","entity","StampStore"],jn.prototype={addStampsets:function(e){for(var t=0;te.version},__class__:Wn};var Kn=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"]=Kn,Kn.__name__=["albero","entity","StampsetSetting"],Kn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new Wn(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 co,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=0?r:1},ei.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__:ei};var ti=function(e,t){this.paneType=e,this.talkSelection=t};n["albero.entity.TalkPaneSelection"]=ti,ti.__name__=["albero","entity","TalkPaneSelection"],ti.createArrayForMultiPanes=function(e){return c.mapi(e,function(e,t){return new ti(ln.getMultiPaneType(e),t)})},ti.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return j.talks(e,Y.single(this.talkSelection));case 1:var n=Ko(t,t.getTalkSelection),i=e,r=ln.getMultiPaneTypes().map(function(e){return n(i,e)});return r[0]=this.talkSelection,j.talks(e,Y.multi(r));case 2:var a=Ko(t,t.getTalkSelection),o=e,s=ln.getMultiPaneTypes().map(function(e){return a(o,e)});return s[1]=this.talkSelection,j.talks(e,Y.multi(s));case 3:var l=Ko(t,t.getTalkSelection),u=e,c=ln.getMultiPaneTypes().map(function(e){return l(u,e)});return c[2]=this.talkSelection,j.talks(e,Y.multi(c))}},getTalkIdOrNull:function(){return ai.getTalkIdOrNull(this.talkSelection)},__class__:ti};var ni=function(){};n["albero.entity.ITalkSelectionGetter"]=ni,ni.__name__=["albero","entity","ITalkSelectionGetter"],ni.prototype={__class__:ni};var ii=function(e,t){this.domainId=e.domain_id,this.talkId=e.talk_id,this.type=t?gn.fromRawValue(e.type):vn.None,this.version=e.version};n["albero.entity.TalkPushNotificationEvent"]=ii,ii.__name__=["albero","entity","TalkPushNotificationEvent"],ii.prototype={__class__:ii};var ri=n["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};ri.NotSelected=["NotSelected",0],ri.NotSelected.toString=i,ri.NotSelected.__enum__=ri,ri.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=ri,n.toString=i,n},ri.AnnouncementsSelected=["AnnouncementsSelected",2],ri.AnnouncementsSelected.toString=i,ri.AnnouncementsSelected.__enum__=ri,ri.__empty_constructs__=[ri.NotSelected,ri.AnnouncementsSelected];var ai=function(){};n["albero.entity.TalkSelectionHelper"]=ai,ai.__name__=["albero","entity","TalkSelectionHelper"],ai.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=ai.getTalkIdOrNull(e),r=ai.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=ai.getMessageIdOrNull(e),o=ai.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},ai.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:e[3];var n=e[2],i=H.orNull($n.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==Zn.annoucements}},ai.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},ai.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return H.orNull(t);case 2:return null}},ai.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 oi=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 Xt(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 pn(e.push_notification)):this.pushNotificationSetting=new pn};n["albero.entity.TalkStatus"]=oi,oi.__name__=["albero","entity","TalkStatus"],oi.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=Zt.deleted),t=!0),t},updateByMessageReadStatusesUpdate:function(e){var t=e.messageIds,n=e.mentionMessageIds,i=t.filter(Ko(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:Qa.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(!si.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=pn.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=jt.subTimestampPart(this.maxReadMessageId,e.id),i=n.high-t.high|0;return i=0!=i?i:Qa.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:Qa.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:Qa.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__:oi};var si=function(){};n["albero.entity.TalkStatusHelper"]=si,si.__name__=["albero","entity","TalkStatusHelper"],si.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},si.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},si.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&e.isUnread(e.maxMessage.id))};var li=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"]=li,li.__name__=["albero","entity","TalkStatusUpdate"],li.prototype={__class__:li};var ui=function(e,t,n){this.file=e,this.dimension=ci.createWithSize(t,n),this.auth=null};n["albero.entity.ThumbInfo"]=ui,ui.__name__=["albero","entity","ThumbInfo"],ui.prototype={setAuth:function(e){this.auth=e},__class__:ui};var ci=function(e){null!=e&&(this.width=e.width,this.height=e.height)};n["albero.entity.ThumbDimension"]=ci,ci.__name__=["albero","entity","ThumbDimension"],ci.createWithSize=function(e,t){var n=new ci;return n.width=e,n.height=t,n},ci.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:ci};var _i=function(e,t,n){var i=new mi(0,0);this.domainId=i,this.domainId=e,this.oldSetting=t,this.newSetting=n};n["albero.entity.UpdateDomainStampSettingEvent"]=_i,_i.__name__=["albero","entity","UpdateDomainStampSettingEvent"],_i.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:_i};var hi=n["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL","SCHEDULE_MESSAGE"]};hi.PROFILE_IMAGE=["PROFILE_IMAGE",0],hi.PROFILE_IMAGE.toString=i,hi.PROFILE_IMAGE.__enum__=hi,hi.MESSAGE=["MESSAGE",1],hi.MESSAGE.toString=i,hi.MESSAGE.__enum__=hi,hi.TALK_ICON=["TALK_ICON",2],hi.TALK_ICON.toString=i,hi.TALK_ICON.__enum__=hi,hi.THUMBNAIL=["THUMBNAIL",3],hi.THUMBNAIL.toString=i,hi.THUMBNAIL.__enum__=hi,hi.NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],hi.NOTE_ATTACHMENT.toString=i,hi.NOTE_ATTACHMENT.__enum__=hi,hi.NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],hi.NOTE_THUMBNAIL.toString=i,hi.NOTE_THUMBNAIL.__enum__=hi,hi.SCHEDULE_MESSAGE=["SCHEDULE_MESSAGE",6],hi.SCHEDULE_MESSAGE.toString=i,hi.SCHEDULE_MESSAGE.__enum__=hi,hi.__empty_constructs__=[hi.PROFILE_IMAGE,hi.MESSAGE,hi.TALK_ICON,hi.THUMBNAIL,hi.NOTE_ATTACHMENT,hi.NOTE_THUMBNAIL,hi.SCHEDULE_MESSAGE];var di=function(){};n["albero.entity.UploadUseTypeHelper"]=di,di.__name__=["albero","entity","UploadUseTypeHelper"],di.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;case 6:return 1}};var fi=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"]=fi,fi.__name__=["albero","entity","UserIdentifier"],fi.prototype={__class__:fi};var mi=function(e,t){this.high=e,this.low=t};n["haxe._Int64.___Int64"]=mi,mi.__name__=["haxe","_Int64","___Int64"],mi.prototype={__class__:mi};var pi=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"]=pi,pi.__name__=["albero","entity","UserPresence"],pi.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(Qa.ucompare(t.low,e.low)<0){n--;n|=0}var r=new mi(n,i),a=pi.SIXTY_MINUTES,o=r.high-a.high|0;if(o=0!=o?o:Qa.ucompare(r.low,a.low),(r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0)return gi.GT_60;var s=pi.FIFTEEN_MINUTES,l=r.high-s.high|0;return l=0!=l?l:Qa.ucompare(r.low,s.low),(r.high<0?s.high<0?l:-1:s.high>=0?l:1)>0?gi.LT_OR_EQ_60:gi.LT_OR_EQ_15},pi.prototype={toState:function(e){var t=e,n=H.map(this.lastUsedAtOpt,function(e){return pi.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return gi.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(Qa.ucompare(e.low,n.low)<0){i--;i|=0}var a=new mi(i,r),o=a.high-t.high|0;return o=0!=o?o:Qa.ucompare(a.low,t.low),(a.high<0?t.high<0?o:-1:t.high>=0?o:1)>0},__class__:pi};var gi=n["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};gi.LT_OR_EQ_15=["LT_OR_EQ_15",0],gi.LT_OR_EQ_15.toString=i,gi.LT_OR_EQ_15.__enum__=gi,gi.LT_OR_EQ_60=["LT_OR_EQ_60",1],gi.LT_OR_EQ_60.toString=i,gi.LT_OR_EQ_60.__enum__=gi,gi.GT_60=["GT_60",2],gi.GT_60.toString=i,gi.GT_60.__enum__=gi,gi.__empty_constructs__=[gi.LT_OR_EQ_15,gi.LT_OR_EQ_60,gi.GT_60];var vi=function(e){this.success=e};n["albero.entity.api.message.AddFavoriteMessageResult"]=vi,vi.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],vi.prototype={__class__:vi};var yi=function(e){this.success=e};n["albero.entity.api.message.DeleteFavoriteMessageResult"]=yi,yi.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],yi.prototype={__class__:yi};var Si=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"]=Si,Si.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],Si.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:Si};var wi=function(e,t,n){this.domainId=e,this.talkId=t,this.marker=n.marker,this.nextMarker=n.nextMarker,this.contents=null==n.contents?[]:To.__cast(n.contents,Array).map(function(e){return new Vi(e)})};n["albero.entity.api.message.GetScheduledMessagesResultWithParams"]=wi,wi.__name__=["albero","entity","api","message","GetScheduledMessagesResultWithParams"],wi.prototype={__class__:wi};var Ii=function(e,t){var n=this;c.iter(t,function(t){var i=new Ti(t),r=i.createdAt,a=e.high-r.high|0;a=0!=a?a:Qa.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"]=Ii,Ii.__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],Ii.prototype={__class__:Ii};var Ti=function(e){this.messageId=e.message_id,this.createdAt=e.created_at};n["albero.entity.api.message.MessageCreatedAt"]=Ti,Ti.__name__=["albero","entity","api","message","MessageCreatedAt"],Ti.prototype={__class__:Ti};var Ei=function(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n};n["albero.entity.api.note.CreateNoteError"]=Ei,Ei.__name__=["albero","entity","api","note","CreateNoteError"],Ei.prototype={__class__:Ei};var Ni=function(e){this.note=new Qi(e),this.emitterKey=null};n["albero.entity.api.note.CreateNoteResult"]=Ni,Ni.__name__=["albero","entity","api","note","CreateNoteResult"],Ni.prototype={updateWithEmitterKey:function(e){var t=new Ni;return t.note=this.note,t.emitterKey=e,t},__class__:Ni};var Ai=function(e){this.result=e};n["albero.entity.api.note.DeleteNoteResult"]=Ai,Ai.__name__=["albero","entity","api","note","DeleteNoteResult"],Ai.prototype={__class__:Ai};var bi=function(e){this.note=new Qi(e)};n["albero.entity.api.note.GetNoteResult"]=bi,bi.__name__=["albero","entity","api","note","GetNoteResult"],bi.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__:bi};var Di=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=L.asArray(e.contents).map(function(e){return new _r(e)}))};n["albero.entity.api.note.GetNoteStatusesResult"]=Di,Di.__name__=["albero","entity","api","note","GetNoteStatusesResult"],Di.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:Di};var ki=function(e){this.note=new Qi(e)};n["albero.entity.api.note.UpdateNoteResult"]=ki,ki.__name__=["albero","entity","api","note","UpdateNoteResult"],ki.prototype={__class__:ki};var Ci=function(e){this.note=new Qi(e)};n["albero.entity.api.note.UpdateNoteSettingResult"]=Ci,Ci.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],Ci.prototype={__class__:Ci};var Mi=function(){};n["albero.entity.file.DummyFileUtil"]=Mi,Mi.__name__=["albero","entity","file","DummyFileUtil"],Mi.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob};var Oi=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"]=Oi,Oi.__name__=["albero","entity","file","FilePreview"],Oi.prototype={__class__:Oi};var Fi=function(){};n["albero.entity.file.StageType"]=Fi,Fi.__name__=["albero","entity","file","StageType"],Fi.prototype={__class__:Fi};var Ri=function(e,t){this.talkId=e,this.paneType=t};n["albero.entity.file.StageTypeTalk"]=Ri,Ri.__name__=["albero","entity","file","StageTypeTalk"],Ri.__interfaces__=[Fi],Ri.prototype={toString:function(){var e=this.talkId;return"staged__"+e.high+"_"+e.low+ln.toPanePrefix(this.paneType)},isForPane:function(e){return this.paneType==e},isForNote:function(){return!1},isForPreview:function(){return!1},__class__:Ri};var xi=function(){};n["albero.entity.file.StageTypeNote"]=xi,xi.__name__=["albero","entity","file","StageTypeNote"],xi.__interfaces__=[Fi],xi.prototype={toString:function(){return"staged_note_"},isForPane:function(e){return!1},isForNote:function(){return!0},isForPreview:function(){return!1},__class__:xi};var Ui=function(){};n["albero.entity.message.IFavoriteMessageEvent"]=Ui,Ui.__name__=["albero","entity","message","IFavoriteMessageEvent"],Ui.prototype={__class__:Ui};var Pi=function(e){this.message=new Xt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.AddFavoriteMessageEvent"]=Pi,Pi.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Pi.__interfaces__=[Ui],Pi.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__:Pi};var Li=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.DeleteFavoriteMessageEvent"]=Li,Li.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Li.__interfaces__=[Ui],Li.prototype={getMessageId:function(){return this.messageId},getTalkId:function(){return this.talkId},getDomainId:function(){return this.domainId},isFavorite:function(){return!1},__class__:Li};var Bi=function(){};n["albero.entity.message.IMessageContentForActionReply"]=Bi,Bi.__name__=["albero","entity","message","IMessageContentForActionReply"],Bi.prototype={__class__:Bi};var Hi=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"]=Hi,Hi.__name__=["albero","entity","message","MessageContentForNote"],Hi.prototype={__class__:Hi};var Gi=function(e){null!=e&&(this.noteId=new Zi(e.note_id),this.title=e.title)};n["albero.entity.message.MessageContentForNoteDeleted"]=Gi,Gi.__name__=["albero","entity","message","MessageContentForNoteDeleted"],Gi.prototype={__class__:Gi};var zi=function(e){this.text=lo.None,this.stampsetId=U.fromIntOrInt64(e.stampset_id),this.stampId=U.fromIntOrInt64(e.stamp_id),null!=e.text&&(this.text=lo.Some(e.text))};n["albero.entity.message.MessageContentForOriginalStamp"]=zi,zi.__name__=["albero","entity","message","MessageContentForOriginalStamp"],zi.prototype={hasValidText:function(){return H.isDefined(this.getValidText())},getValidText:function(){return H.filter(this.text,z.isNotEmpty)},__class__:zi};var ji=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"]=ji,ji.__name__=["albero","entity","message","MessageContentForSelectOneReply"],ji.__interfaces__=[Bi],ji.prototype={getResponseIndex:function(){return this.response},__class__:ji};var Yi=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"]=Yi,Yi.__name__=["albero","entity","message","MessageContentForTodoReply"],Yi.__interfaces__=[Bi],Yi.prototype={getResponseIndex:function(){return this.done?0:1},__class__:Yi};var Wi=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"]=Wi,Wi.__name__=["albero","entity","message","MessageContentForYesNoReply"],Wi.__interfaces__=[Bi],Wi.prototype={getResponseIndex:function(){return this.response?0:1},__class__:Wi};var Ki=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"]=Ki,Ki.__name__=["albero","entity","message","MessageFavorite"],Ki.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:Ki};var Vi=function(e){this.isDummy=!1,null!=e&&(this.id=e.scheduled_message_id,this.createMessageAt=e.create_message_at,this.talkId=e.talk_id,this.type=Xt.typeOf(e.type),this.content=e.content)};n["albero.entity.message.ScheduledMessage"]=Vi,Vi.__name__=["albero","entity","message","ScheduledMessage"],Vi.fromParams=function(e){var t=new Vi(null);return t.id=e.id,t.createMessageAt=e.createMessageAt,t.talkId=e.talkId,t.type=e.type,t.content=e.content,t},Vi.fromNotifyScheduleMessage=function(e){var t=new Vi(null);return t.id=e.id,t.talkId=e.talkId,t.createMessageAt=O.oneDayAfterAsInt64(),t.type=Zt.text,t.content="",t.isDummy=!0,t},Vi.compare=function(e,t){var n=e.createMessageAt,i=t.createMessageAt,r=n.high-i.high|0;r=0!=r?r:Qa.ucompare(n.low,i.low);var a=n.high<0?i.high<0?r:-1:i.high>=0?r:1;if(0!=a)return a;var o=e.id,s=t.id,l=o.high-s.high|0;return l=0!=l?l:Qa.ucompare(o.low,s.low),o.high<0?s.high<0?l:-1:s.high>=0?l:1},Vi.prototype={__class__:Vi};var qi=function(){this.scheduledMessages=new co};n["albero.entity.message.ScheduledMessageStore"]=qi,qi.__name__=["albero","entity","message","ScheduledMessageStore"],qi.prototype={getScheduledMessage:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.scheduledMessages;return null!=ns[t]?n.getReserved(t):n.h[t]},getScheduledMessages:function(){return c.array(this.scheduledMessages)},setScheduledMessage:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.scheduledMessages;null!=ns[n]?i.setReserved(n,e):i.h[n]=e},removeScheduledMessage:function(e){var t="_"+e.high+"_"+e.low,n=this.scheduledMessages,i=null!=ns[t]?n.getReserved(t):n.h[t];return this.scheduledMessages.remove(t),i},__class__:qi};var Qi=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 cr(e.setting),this.noteRevision=new lr(e.note_revision),this.noteLocked=new ar(e.locked))};n["albero.entity.note.Note"]=Qi,Qi.__name__=["albero","entity","note","Note"],Qi.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__:Qi};var Ji=n["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT","FILES"]};Ji.TEXT=["TEXT",0],Ji.TEXT.toString=i,Ji.TEXT.__enum__=Ji,Ji.FILES=["FILES",1],Ji.FILES.toString=i,Ji.FILES.__enum__=Ji,Ji.__empty_constructs__=[Ji.TEXT,Ji.FILES];var Xi=function(){};n["albero.entity.note.NoteContentTypeHelper"]=Xi,Xi.__name__=["albero","entity","note","NoteContentTypeHelper"],Xi.createNoteContentType=function(e){if(null==e)return yr.e("no value."),null;switch(e){case 1:return Ji.TEXT;case 5:return Ji.FILES;default:return yr.e("value is not expected."),null}},Xi.getValue=function(e){if(null==e)return yr.e("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__=[Yt],Zi.createDummyId=function(){var e,t=Zi.nextDummyId,n=Zi.nextDummyId;if(null==n)e=null;else{var i=new mi(0,1),r=n.high-i.high|0,a=n.low-i.low|0;if(Qa.ucompare(n.low,i.low)<0){r--;r|=0}e=new mi(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 $i=function(e,t,n,i,r,a,o){this.state=er.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"]=$i,$i.__name__=["albero","entity","note","NoteLocalEdit"],$i.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==er.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?Ji.FILES:Ji.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 ur;return t.revision=0,t.contentType=this.getContentType(),t.title=this.title,t.contentSummary=this.text,t.createdBy=e,t.createdAt=O.nowAsInt64(),t.contentFiles=this.fileInfos,t},conflict:function(){this.state=er.FAILED_BY_CONFLICT},deleted:function(){this.state=er.FAILED_BY_NOT_FOUND},getCreateMessage:function(){return this.createMessage},__class__:$i};var er=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"]};er.SENDING=["SENDING",0],er.SENDING.toString=i,er.SENDING.__enum__=er,er.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",1],er.FAILED_BY_CONFLICT.toString=i,er.FAILED_BY_CONFLICT.__enum__=er,er.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],er.FAILED_BY_NOT_FOUND.toString=i,er.FAILED_BY_NOT_FOUND.__enum__=er,er.FAILED_BY_NOT_FOUND_FORWARDING=["FAILED_BY_NOT_FOUND_FORWARDING",3],er.FAILED_BY_NOT_FOUND_FORWARDING.toString=i,er.FAILED_BY_NOT_FOUND_FORWARDING.__enum__=er,er.FAILED_BY_FILE=function(e,t){var n=["FAILED_BY_FILE",4,e,t];return n.__enum__=er,n.toString=i,n},er.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",5],er.FAILED_BY_UNKNOWN.toString=i,er.FAILED_BY_UNKNOWN.__enum__=er,er.COMPLETED=["COMPLETED",6],er.COMPLETED.toString=i,er.COMPLETED.__enum__=er,er.__empty_constructs__=[er.SENDING,er.FAILED_BY_CONFLICT,er.FAILED_BY_NOT_FOUND,er.FAILED_BY_NOT_FOUND_FORWARDING,er.FAILED_BY_UNKNOWN,er.COMPLETED];var tr=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"]=tr,tr.__name__=["albero","entity","note","NoteLockEvent"],tr.prototype={__class__:tr};var nr=function(e){this.value=e};n["albero.entity.note.NoteLockExpiredAt"]=nr,nr.__name__=["albero","entity","note","NoteLockExpiredAt"],nr.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__:nr};var ir=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"]};ir.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",0],ir.FAILED_BY_CONFLICT.toString=i,ir.FAILED_BY_CONFLICT.__enum__=ir,ir.FAILED_BY_LOCKED=function(e){var t=["FAILED_BY_LOCKED",1,e];return t.__enum__=ir,t.toString=i,t},ir.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],ir.FAILED_BY_NOT_FOUND.toString=i,ir.FAILED_BY_NOT_FOUND.__enum__=ir,ir.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",3],ir.FAILED_BY_UNKNOWN.toString=i,ir.FAILED_BY_UNKNOWN.__enum__=ir,ir.COMPLETED=function(e){var t=["COMPLETED",4,e];return t.__enum__=ir,t.toString=i,t},ir.RELEASED=["RELEASED",5],ir.RELEASED.toString=i,ir.RELEASED.__enum__=ir,ir.__empty_constructs__=[ir.FAILED_BY_CONFLICT,ir.FAILED_BY_NOT_FOUND,ir.FAILED_BY_UNKNOWN,ir.RELEASED];var rr=function(e){this.value=e};n["albero.entity.note.NoteLockState"]=rr,rr.__name__=["albero","entity","note","NoteLockState"],rr.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__:rr};var ar=function(e){null!=e&&(this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLocked"]=ar,ar.__name__=["albero","entity","note","NoteLocked"],ar.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__:ar};var or=function(e){null!=e&&(this.noteId=new Zi(e.note_id),this.talkId=e.talk_id,this.setting=new cr(e.setting))};n["albero.entity.note.NotePartialUpdateForSetting"]=or,or.__name__=["albero","entity","note","NotePartialUpdateForSetting"],or.prototype={__class__:or};var sr=function(e){null!=e&&(this.noteId=new Zi(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new ur(e.note_revision_summary))};n["albero.entity.note.NotePartialUpdateForSummary"]=sr,sr.__name__=["albero","entity","note","NotePartialUpdateForSummary"],sr.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:sr};var lr=function(e){if(this.contentFiles=[],null!=e){switch(this.revision=e.revision,this.title=e.title,this.contentType=Xi.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=To.__cast(e.content.files,Array);t=Nr.HIRAGANA_SMALL_A&&o<=Nr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Nr.KATAKANA_SMALL_A-Nr.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},Nr.katakanaToRoman=function(e){return(new mr).convert(e)},Nr.normalize=function(e){return new Ar(null).normalize(e)},Nr.normalizeForFile=function(e){return new Ar(null).normalizeForFile(e)},Nr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ar=function(e){this.beforeTask=null,this.beforeTask=e};n["albero.js.Normalizer"]=Ar,Ar.__name__=["albero","js","Normalizer"],Ar.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Io&&(e=e.val),yr.e("invalid character:",e),vr.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Io&&(e=e.val),yr.e("invalid character:",e),vr.localize("TextCanonicalizer.invalid")}},__class__:Ar};var br=function(){};n["albero.js.WebSocket"]=br,br.__name__=["albero","js","WebSocket"],br.prototype={__class__:br};var Dr=function(){};n["albero.js.WebSocketFactory"]=Dr,Dr.__name__=["albero","js","WebSocketFactory"],Dr.newInstance=function(e,t){return new kr(e,t)};var kr=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=ts.wsConfig,r=require("websocket").client;this.ws=new r(i),this.ws.on("connectFailed",Ko(this,this.onError)),this.ws.on("connect",function(e){n.connection=e,e.on("error",Ko(n,n.onError)),e.on("close",Ko(n,n.onConnectionClose)),e.on("message",Ko(n,n.onMessage)),e.on("pong",Ko(n,n.onPong)),n.onOpen(null)});var a=null;null!=ts.proxyURL&&(a={agent:Tr.createAgent(ts.proxyURL)}),this.ws.connect(e,null,null,null,a)};n["albero.js.WebSocketForNodeJs"]=kr,kr.__name__=["albero","js","WebSocketForNodeJs"],kr.__interfaces__=[br],kr.prototype={onOpen:function(e){yr.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 _o.ofData(e.binaryData)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){yr.e("WebSocket error. event:",e),null!=this.onerror&&this.onerror()},onClose:function(e){this.removeAllEventListenersForHubot(),yr.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 ko(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:kr};var Cr=function(){};n["puremvc.interfaces.IProxy"]=Cr,Cr.__name__=["puremvc","interfaces","IProxy"],Cr.prototype={__class__:Cr};var Mr=function(){};n["albero.proxy.AccessTokenResolverProxy"]=Mr,Mr.__name__=["albero","proxy","AccessTokenResolverProxy"],Mr.__interfaces__=[Cr],Mr.prototype={__class__:Mr};var Or=function(){};n["albero.proxy.AccessTokenResolverProxyFactory"]=Or,Or.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Or.newInstance=function(){return new Rr("accessTokenResolver")};var Fr=function(e,t){Q.call(this),this.proxyName=null!=e?e:Fr.NAME,null!=t&&this.setData(t)};n["puremvc.patterns.proxy.Proxy"]=Fr,Fr.__name__=["puremvc","patterns","proxy","Proxy"],Fr.__interfaces__=[Cr],Fr.__super__=Q,Fr.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__:Fr});var Rr=function(e){Fr.call(this,e)};n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Rr,Rr.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Rr.__interfaces__=[Mr],Rr.__super__=Fr,Rr.prototype=r(Fr.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ts.account?ts.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__:Rr});var xr=function(){};n["albero.proxy.AccountLoaderProxy"]=xr,xr.__name__=["albero","proxy","AccountLoaderProxy"],xr.__interfaces__=[Cr],xr.prototype={__class__:xr};var Ur=function(){};n["albero.proxy.AccountLoaderProxyFactory"]=Ur,Ur.__name__=["albero","proxy","AccountLoaderProxyFactory"],Ur.newInstance=function(){var e=E.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?E.createInstance(e,["accountLoader"]):new Pr("accountLoader")};var Pr=function(e){Fr.call(this,e)};n["albero.proxy.AccountLoaderProxyForHubot"]=Pr,Pr.__name__=["albero","proxy","AccountLoaderProxyForHubot"],Pr.__interfaces__=[xr],Pr.__super__=Fr,Pr.prototype=r(Fr.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 Be(i,n))})}),null},__class__:Pr});var Lr=function(){Fr.call(this,"broadcast")};n["albero.proxy.AlberoBroadcastProxy"]=Lr,Lr.__name__=["albero","proxy","AlberoBroadcastProxy"],Lr.__super__=Fr,Lr.prototype=r(Fr.prototype,{handleNotification:function(e,t){var n=this;switch(yr.v("Receive request from server. name:",e," body:",t),e){case"notify_add_account_control_request":var i=new Ye(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":var r=t[1].map(Ko(Yo=this.dataFactory,Yo.newAcquaintance));this.api.sendAddAcquaintanceNotifications(r),this.sendNotification(e,r);break;case"notify_add_domain_invite":var a=new bt(t);this.dataStore.setDomainInvite(a),this.sendNotification(e,a);break;case"notify_add_favorite_message":var o=new Pi(t);this.dataStore.addFavoriteMessage(o),this.sendNotification(e,o);break;case"notify_add_favorite_talk":var s=new Rt(t);this.updateTalkStatusByFavoriteTalkEvent(s),this.sendNotification(e,s);break;case"notify_add_friend":this.sendNotification(e,this.dataFactory.newFriend(t[1]));break;case"notify_add_talkers":var l=new Qn(t);null==this.dataStore.getTalk(l.id)&&this.sendNotification("notify_add_talkers_including_me",l),this.dataStore.setTalk(l),this.sendNotification(e,l);break;case"notify_close_conference":var u=new tt(t);this.dataStore.removeConference(u),this.updateTalkStatusByConferenceClosedEvent(u),this.sendNotification(e,u);break;case"notify_conference_participant_join":var _,h=t[3],d=t[4],f=this.dataStore;if(null!=f.me){var m=f.me.id;_=null!=m&&null!=d&&m.high==d.high&&m.low==d.low}else _=!1;_&&this.dataStore.addReactedConfereceId(h),this.sendNotification(e,t);break;case"notify_conference_participant_reject":var p=t[3];this.dataStore.addReactedConfereceId(p),this.sendNotification(e,t);break;case"notify_create_announcement":var g=new Ve(t);this.keywordWatcher.onAnnouncementCreated(g),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(g)),this.sendNotification(e,g);break;case"notify_create_message":var v=new Xt(t);this.dataStore.setMessage(v),this.keywordWatcher.onMessageCreated(v);var y=this.newTalkStatusByMessage(v);switch(null!=y&&this.sendNotification("notify_update_local_talk_status",y),v.type[1]){case 0:var S=v.content,w=null;switch(S.type){case"delete_talker":w=S.deleted_user_id;break;case"hide_pair_talk":w=S.user_id}if(null==w)return void this.sendNotification(e,v);for(var I=v.talkId,T=this.dataStore.getQuestions(I,w),E=0;Et.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 yr.e("talk not found on change favorite talk.");(t=new oi).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 oi).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 oi).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?(yr.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 qe).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__:Lr});var Br=function(){Fr.call(this,"api")};n["albero.proxy.AlberoServiceProxy"]=Br,Br.__name__=["albero","proxy","AlberoServiceProxy"],Br.__super__=Fr,Br.prototype=r(Fr.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){yr.v("access token:",e),i.settings.setAccessToken(e),n(e)},l=function(e){i.sendNotification("Url",Le.FORWARD(j.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.123",i).then(function(e){var i=O.nowAsInt64();e.passwordExpiration.isExpired(i)?n.sendNotification("password_expiration_overed"):(e.passwordExpiration.needWarning(i,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(O.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",Le.FORWARD(j.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=sa.toLocalError(Vt.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=sa.toLocalError(Vt.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,!1).then(function(e){r._createMessage(t,Zt.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 yr.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),this.prepareMessageFilesAsync(e,n,i,!1).then(function(e){a._createMessage(t,Zt.textMultipleFile,e,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 yr.w("WARNING method: uploadMulti",s),void this.sendNotification("create_message_fail",[s,o],i)}this.uploadMultiV2(r.domainId,r.id,t,a,i)},validateFileName:function(e){var t=w.replace(e.name,"$","__");if(t==e.name)return e;try{return e.name=t,e}catch(r){var n=e,i=n.slice(0,n.size,n.type);return new File([i],t,{type:n.type})}},prepareMessageFilesAsync:function(e,t,n,i){for(var r=this,a=Promise.resolve([]),o=0;o0&&(i.text=t),Promise.resolve(i)})},prepareMessageFileAsync:function(e,t,n,i){var r=this;return e=this.validateFileName(e),new Promise(function(e,i){null!=t?r.uploadFile(t.file,n,hi.THUMBNAIL,function(n){t.setAuth(n),e(lo.Some(t))},function(t){e(lo.None)}):e(lo.None)}).then(function(t){return new Promise(function(a,o){var s=i?hi.SCHEDULE_MESSAGE:hi.MESSAGE;r.uploadFile(e,n,s,function(n){var i=Nr.normalizeForFile(e.name),r=F.createFileInfoDynamic(e,i,t,n);a(r)},o)})})},prepareNoteFileAsync:function(e,t,n){var i=this;return e=this.validateFileName(e),new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,hi.NOTE_THUMBNAIL,function(n){t.setAuth(n),e(lo.Some(t))},function(t){e(lo.None)}):e(lo.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,hi.NOTE_ATTACHMENT,function(n){var i=Nr.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=Nr.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){yr.e("failed to upload: "+y.string(e));var t=new oa({code:null,detail:null,message:e});if(n!=hi.THUMBNAIL&&n!=hi.NOTE_THUMBNAIL&&n!=hi.NOTE_ATTACHMENT){var i=n==hi.SCHEDULE_MESSAGE?Vt.ScheduleMessageFailed(qt.GeneralFileError):Vt.GeneralFileError,o=sa.toLocalError(i,t);a.sendNotification("error_occurred",o)}r(t)})},function(e){if(n!=hi.THUMBNAIL&&n!=hi.NOTE_THUMBNAIL&&n!=hi.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=n==hi.SCHEDULE_MESSAGE?Vt.ScheduleMessageFailed(qt.UploadSizeOvered(t)):Vt.UploadSizeOvered(t),o=sa.toLocalError(i,e);a.sendNotification("error_occurred",o)}else if("storage_size"==e.detail.limit_target){var s=n==hi.SCHEDULE_MESSAGE?Vt.ScheduleMessageFailed(qt.StorageSizeOvered(t)):Vt.StorageSizeOvered(t),l=sa.toLocalError(s,e);a.sendNotification("error_occurred",l)}}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.wsApi.createAnnouncement(e,t,n).then(function(e){r.sendNotification("create_announcement_complete",[e,a.id],i)},function(e){r.sendNotification("create_announcement_fail",a),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,r=this.settings.getSelectedDomainId();null!=r&&(e=null==e?{sinceId:null,maxId:null}:e,this.wsApi.getAnnouncements(r,20,e,t).then(function(e){i.sendNotification("notify_get_announcements",{domainId:r,announcements:e,sortOrder:t,callerKey:n})},function(e){i.apiCaller.handleServerErrorDefault(e)}))},getAnnouncementStatuses:function(e){var t=this;this.wsApi.getAnnouncementStatuses().then(function(n){c.iter(n,function(e){t.dataStore.setAnnouncementStatus(e),t.sendAnnouncementStatusNotification(e)}),null!=e&&e()},function(e){t.apiCaller.handleServerErrorDefault(e)})},getAnnouncementStatus:function(e,t){var n=this;this.wsApi.getAnnouncementStatus(e).then(function(e){n.dataStore.setAnnouncementStatus(e),n.sendAnnouncementStatusNotification(e),null!=t&&t()},function(e){n.apiCaller.handleServerErrorDefault(e)})},updateAnnouncementReadStatus:function(e,t){var n=this;this.wsApi.updateAnnouncementReadStatus(e,t).then(function(i){var r,a=n.dataStore.getAnnouncementStatus(e);if(null!=a){var o=a.maxReadAnnouncementId;r=null!=o&&null!=t&&o.high==t.high&&o.low==t.low}else r=!1;r&&n.sendAnnouncementStatusNotification(a)},function(e){n.apiCaller.handleServerErrorDefault(e)})},getQuestions:function(e,t,n,i){var r=this,a=this.settings.getSelectedDomainId(),o=null;null!=e&&(a=e.domainId,o=e.id);var s=H.orNull(yn.filterToOpBool(n));i=null==i?{sinceId:null,maxId:null}:i,this.wsApi.getQuestions(a,o,t,s,20,i).then(function(e){c.iter(e,Ko(Yo=r.dataStore,Yo.setQuestion)),r.sendNotification("get_questions_responsed",{domainId:a,talkId:o,questions:e,fromType:t,filter:n})},function(e){r.apiCaller.handleServerErrorDefault(e)})},getQuestion:function(e,t){var n=this;this.wsApi.getQuestion(e).then(function(e){n.dataStore.setQuestion(e),n.sendNotification("notify_update_question",e),null!=t&&t(e)},function(e){n.apiCaller.handleServerErrorDefault(e)})},searchMessages:function(e,t,n,i){var r=this;this.searchService.prepareForSearching(e,n),this.apiCaller.call("search_messages",[e.domainId,e.talkId,e.getQueryText(),t,n],function(t){r.searchService.isRecentParams(e)&&r.searchService.isSearching()&&r.searchService.saveSearchMessagesResult(new Dn(t)),null!=i&&i()},function(a){r.searchService.notifySearchMessagesFail(),400!=a.code||null==n?r.sendNotification("error_occurred",a):r.searchMessages(e,t,null,i)})},searchAttachments:function(e,t,n,i){var r=this;this.searchService.prepareForSearching(e,n),this.apiCaller.call("search_attachments",[e.domainId,e.talkId,e.getQueryText(),t,n],function(t){r.searchService.isRecentParams(e)&&r.searchService.isSearching()&&r.searchService.saveSearchAttachmentsResult(new bn(t)),null!=i&&i()},function(a){r.searchService.notifySearchAttachmentsFail(),400!=a.code||null==n?r.sendNotification("error_occurred",a):r.searchAttachments(e,t,null,i)})},startUpdateLastUsedAtIfNeed:function(){this.lastUsedAtUpdater.startPolling(Ko(this,this.updateLastUsedAt))},updateLastUsedAt:function(){var e=this;try{this.apiCaller.call("update_last_used_at",[],function(t){e.lastUsedAtUpdater.update()},function(t){e.lastUsedAtUpdater.cancel(),e.apiCaller.handleServerErrorDefault(t)})}catch(e){this.lastUsedAtUpdater.cancel()}},addFavoriteTalk:function(e,t){this.apiCaller.call("add_favorite_talk",[e,t])},deleteFavoriteTalk:function(e,t){this.apiCaller.call("delete_favorite_talk",[e,t])},disablePushNotification:function(e,t){this.apiCaller.call("disable_push_notification",[e,t])},enablePushNotification:function(e,t,n){this.apiCaller.call("enable_push_notification",[e,t,gn.toRawValue(n)])},getSolutions:function(e,t){var n=this;c.iter(t,Ko(Yo=this.dataStore,Yo.addLoadingSolutionId)),this.wsApi.getSolutions(e,t).then(function(e){c.iter(e,Ko(Yo=n.dataStore,Yo.setSolution)),c.iter(t,Ko(Yo=n.dataStore,Yo.removeLoadingSolutionId)),n.sendNotification("solutions_loaded")},function(e){c.iter(t,Ko(Yo=n.dataStore,Yo.removeLoadingSolutionId)),n.apiCaller.handleServerErrorDefault(e)})},getPresences:function(e,t){var n=this;return this.wsApi.getPresences(e,t).then(function(e){return c.iter(e,Ko(Yo=n.dataStore,Yo.setUserPresence)),n.sendNotification("presences_updated",t),Promise.resolve(t)},function(e){return n.apiCaller.handleServerErrorDefault(e),Promise.reject(e)})},joinConference:function(e,t){var n=this;this.apiCaller.call("join_conference",[e,t],function(t){var i=new Wt(t);n.sendNotification("join_conference_responsed",{talkId:e,joinConference:i})},function(e){n.sendNotification("join_conference_canceled",e)})},rejectConference:function(e){var t=this;this.apiCaller.call("reject_conference",[e],function(e){},function(e){404!=e.code?409!=e.code?t.sendNotification("error_occurred",e):yr.v("joined."):yr.v("conference not found.")})},leaveConference:function(e){var t=this;this.apiCaller.call("leave_conference",[e],function(e){},function(e){404!=e.code?t.sendNotification("error_occurred",e):yr.v("conference not found.")})},getConferences:function(){var e=this;this.wsApi.getConferences().then(function(t){c.iter(t,function(t){e.dataStore.addConference(t),e.sendNotification("notify_open_conference",t)}),e.dataStore.filterReactedConferenceIds(t.filter(function(t){return!e.dataStore.isReactedConferenceId(t.id)}).map(function(e){return e.id}))},function(t){e.apiCaller.handleServerErrorDefault(t)})},getConferenceParticipants:function(e){var t=this;this.apiCaller.call("get_conference_participants",[e],function(n){var i=t.dataStore.getConference(e);null!=i&&(i.participants=n,t.sendNotification("get_conference_participants_responsed",i))})},getNoteStatuses:function(e,t){var n=this.settings.getSelectedDomainId();this.apiNote.getNoteStatuses(n,e,t).catch(function(e){yr.v("getNoteStatuses error:",e)})},getNote:function(e,t){var n=null!=t?t:function(e,t){};this.apiNote.getNote(e).then(function(e){n(null,e)}).catch(function(e){yr.v("getNote error:",e),n(e,null)})},createNote:function(e,t,n,i,r){yr.w("'createNote' is deprecated, please use 'res.send' instead."),this.apiNote.createNote(e,t,n,i,r).catch(function(e){yr.v("createNote error:",e)})},createNoteV2:function(e,t,n,i){var r=this,a=this.dataStore.getTalk(t.getTalkId());if(null!=a){var o=a.domainId,s=t.getNoteId();this.dataStore.setNoteLocalEdit(s,t);for(var l=Promise.resolve(),u=0,c=t.getUnuploadedFileInfos();u0&&400==e.code&&"invalid file_id"==e.message&&(a.setState(er.FAILED_BY_NOT_FOUND_FORWARDING),o.dataStore.setNoteLocalEdit(a.getNoteId(),a)),null!=a&&400==e.code&&"invalid talk_id"==e.message){var i=Qt.getNoteForwardingForbiddenError(),r=sa.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 Ci(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=Xi.getValue(i);s.apiCaller.callApiReliable("update_note",[e.value,t,n,u,r,a],function(e){o(new ki(e))},l,Ko(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(er.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(er.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(er.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)),Promise.reject(t)):(null!=o&&(o.setState(er.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 Ai(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 rr(ir.COMPLETED(new nr(e)))}).catch(function(n){if(400==n.code)return yr.v("invalid parameter."),i.sendNotification("error_occurred",n),new rr(ir.FAILED_BY_UNKNOWN);if(403==n.code)return yr.v("forbidden."),i.sendNotification("error_occurred",n),new rr(ir.FAILED_BY_UNKNOWN);if(404==n.code)return yr.v("note is not found."),i.dataStore.setNote(t,null),new rr(ir.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 rr(ir.FAILED_BY_LOCKED(r))}return 409==n.code&&"conflict"==n.message?(yr.v("conflict"),new rr(ir.FAILED_BY_CONFLICT)):(i.sendNotification("error_occurred",n),new rr(ir.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 rr(ir.RELEASED)}).catch(function(n){if(400==n.code)return yr.v("invalid parameter."),i.sendNotification("error_occurred",n),new rr(ir.FAILED_BY_UNKNOWN);if(403==n.code)return yr.v("forbidden."),i.sendNotification("error_occurred",n),new rr(ir.FAILED_BY_UNKNOWN);if(404==n.code)return yr.v("note is not found."),i.dataStore.setNote(t,null),new rr(ir.FAILED_BY_NOT_FOUND);if(409==n.code&&"conflict"==n.message)return new rr(ir.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 rr(ir.FAILED_BY_LOCKED(r))}return i.sendNotification("error_occurred",n),new rr(ir.FAILED_BY_UNKNOWN)})},retryTimeForCreateOrUpdateNoteFromError:function(e){return this.shouldRetryCreateOrUpdateNote(e)?lo.Some(this.apiCaller.retryTimeForReplicationLag()):lo.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__:Gr});var zr=function(){Fr.call(this,"appState")};n["albero.proxy.AppStateProxy"]=zr,zr.__name__=["albero","proxy","AppStateProxy"],zr.__super__=Fr,zr.prototype=r(Fr.prototype,{start:function(){this.updateLastActivityAt(),this.checkInactiveInterval()},activateAppIfNeed:function(){this.updateLastActivityAt(),this.appState==D.Inactive&&this.setAppState(D.Active)},setAppState:function(e){yr.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 $a(500).run=Ko(this,this.checkInactive)},checkInactive:function(){this.appState!=D.Inactive&&((new Date).getTime()-this.lastActivityAt.getTime()<2e3||this.setAppState(D.Inactive))},__class__:zr});var jr=function(){var e=new mi(-1,-1);this.dummyFileId=e;var t=new mi(-1,-1);this.dummyMsgId=t,Fr.call(this,"dataFactory")};n["albero.proxy.DataFactoryProxy"]=jr,jr.__name__=["albero","proxy","DataFactoryProxy"],jr.__super__=Fr,jr.prototype=r(Fr.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 kt(e)},newDummyMessage:function(e,t,n,i){var r=this,a=new Xt;a.id=this.dummyMsgId,a.userId=this.dataStore.me.id,a.talkId=e,a.type=t,a.content=n,a.scheduleAt=i;var o,s=this.dummyMsgId;if(null==s)o=null;else{var l=new mi(0,1),u=s.high-l.high|0,c=s.low-l.low|0;if(Qa.ucompare(s.low,l.low)<0){u--;u|=0}o=new mi(u,c)}this.dummyMsgId=o;var _=[];switch(a.type[1]){case 4:_=[this.createDummyFileInfo(a,a.content)];break;case 5:_=To.__cast(a.content.files,Array).map(function(e){return r.createDummyFileInfo(a,e)})}return this.dataStore.setMessageWithFileInfos(a,_),a},newDummyFileMessage:function(e,t,n){var i=this.createFileInfoDynamic(t);return this.newDummyMessage(e,Zt.file,i,n)},newDummyMultipleFileMessage:function(e,t,n,i){var r=c.array(n.filter(function(e){return null!=e.file}).map(Ko(this,this.createFileInfoDynamic)));return this.newDummyMessage(e,Zt.textMultipleFile,{text:t,files:r},i)},createFileInfoDynamic:function(e){var t=e.file;return{content_type:t.type,content_size:t.size,name:Nr.normalizeForFile(t.name),file:t,localThumbInfo:e.thumb}},createDummyFileInfo:function(e,t){var n,i=xt.fromMessageAndFileWithFileId(e,t,this.dummyFileId),r=this.dummyFileId;if(null==r)n=null;else{var a=new mi(0,1),o=r.high-a.high|0,s=r.low-a.low|0;if(Qa.ucompare(r.low,a.low)<0){o--;o|=0}n=new mi(o,s)}return this.dummyFileId=n,i},newAnnouncementStatusForDomain:function(e){var t=new qe;return t.domainId=e,this.dataStore.setAnnouncementStatus(t)},__class__:jr});var Yr=function(){this.departmentStore=new ct,this.stampStore=new jn,this.questionStore=new Nn,this.fileInfoStore=new Lt,this.scheduledMessageStore=new qi,this.messageStore=new rn,this.conferenceStore=new nt,this.solutionStore=new Bn,this.directAppStore=new pt,this.flowNotificationBadgeStore=new Ht,Fr.call(this,"dataStore")};n["albero.proxy.DataStoreProxy"]=Yr,Yr.__name__=["albero","proxy","DataStoreProxy"],Yr.__super__=Fr,Yr.prototype=r(Fr.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!=ns[i]?e.setReserved(i,u):e.h[i]=u}this.storageForUsers.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new co);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=ns[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!=ns[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=Ko(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!=ns[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new uo(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!=ns[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=ns[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 mi(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!=ns[a]?o.getReserved(a):o.h[a];if(null!=s){var l="_"+t.high+"_"+t.low,u=null!=ns[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!=ns[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new mi(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!=ns[o]?a.getReserved(o):a.h[o];return null!=s?s.user:null});for(var o=[],s=a.arrayKeys(),l=new uo(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 uo(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!=ns[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(!E.enumEq(i.type,Xn.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!=ns[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!=ns[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!=ns[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){c.iter(e,Ko(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=ns[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!=ns[n]?i.existsReserved(n):i.h.hasOwnProperty(n)){var r=this.talkStatuses;e.push(null!=ns[n]?r.getReserved(n):r.h[n])}}return e},getTalkStatus:function(e){var t="_"+e.high+"_"+e.low,n=this.talkStatuses;return null!=ns[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!=ns[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!=ns[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!=ns[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 uo(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!=ns[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!=ns[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:Qa.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!=ns[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!=ns[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 co,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!=ns[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__:Jr});var Xr=function(){};n["albero.proxy.KeywordParser"]=Xr,Xr.__name__=["albero","proxy","KeywordParser"],Xr.parse=function(e){var t=w.htmlEscape(e,!0),n=new o(""(.*?)"","g").map(t,function(e){return Xr.encodeSpace(e.matched(1))});return new o("[  ]","g").split(n).filter(z.isNotEmpty).map(Xr.decodeSpace).map(Xr.createParsedKeyword)},Xr.encodeSpace=function(e){return w.replace(w.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},Xr.decodeSpace=function(e){return w.replace(w.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},Xr.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=ea.getKeywordTypeByMessageTypeString(n);if(r!=$r.normal)return new Zr(r,i)}return new Zr($r.normal,e)};var Zr=function(e,t){this.type=e,this.word=t};n["albero.proxy.ParsedKeyword"]=Zr,Zr.__name__=["albero","proxy","ParsedKeyword"],Zr.prototype={__class__:Zr};var $r=n["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};$r.normal=["normal",0],$r.normal.toString=i,$r.normal.__enum__=$r,$r.selectOneReplyOnly=["selectOneReplyOnly",1],$r.selectOneReplyOnly.toString=i,$r.selectOneReplyOnly.__enum__=$r,$r.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],$r.yesOrNoReplyOnly.toString=i,$r.yesOrNoReplyOnly.__enum__=$r,$r.todoDoneOnly=["todoDoneOnly",3],$r.todoDoneOnly.toString=i,$r.todoDoneOnly.__enum__=$r,$r.__empty_constructs__=[$r.normal,$r.selectOneReplyOnly,$r.yesOrNoReplyOnly,$r.todoDoneOnly];var ea=function(){};n["albero.proxy.KeywordTypeHelper"]=ea,ea.__name__=["albero","proxy","KeywordTypeHelper"],ea.getKeywordType=function(e){return null!=e?ea.getKeywordTypeByMessageTypeString(Xt.typeString(e)):$r.normal},ea.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return $r.selectOneReplyOnly;case"todoDone":return $r.todoDoneOnly;case"yesOrNoReply":return $r.yesOrNoReplyOnly}return $r.normal},ea.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==Zt.selectOneReply;case 2:return e==Zt.yesOrNoReply;case 3:return e==Zt.todoDone}},ea.createFilterClassStringFromMessageType=function(e){return ea.createFilterClassString(ea.getKeywordType(e))},ea.createFilterClassString=function(e){return"keyword_type_"+y.string(e)};var ta=function(){this.isCallingUpdateLastUsedAt=!1,Fr.call(this,"lastUsedAtUpdater")};n["albero.proxy.LastUsedAtUpdaterProxy"]=ta,ta.__name__=["albero","proxy","LastUsedAtUpdaterProxy"],ta.__super__=Fr,ta.prototype=r(Fr.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?$a.delay(function(){t.startPolling(e)},0|n):(this.isCallingUpdateLastUsedAt=!0,e(),this.pollingTimer=new $a(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=O.afterAsInt64(6e5),this.settings.setLastUsedExpiredAt(this.lastUsedExpiredAtCache),this.isCallingUpdateLastUsedAt=!1},cancel:function(){this.isCallingUpdateLastUsedAt=!1},__class__:ta});var na=function(){Fr.call(this,"limitations")};n["albero.proxy.LimitationsProxy"]=na,na.__name__=["albero","proxy","LimitationsProxy"],na.__super__=Fr,na.prototype=r(Fr.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__:na});var ia=function(){this.connectionStatus=k.Ok,Fr.call(this,"rpc"),this.responseHandlers=new oo,this.connectionKeeper=new ra(Ko(this,this.ping))};n["albero.proxy.MsgPackRpcProxy"]=ia,ia.__name__=["albero","proxy","MsgPackRpcProxy"],ia.__super__=Fr,ia.prototype=r(Fr.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=Dr.newInstance(ts.endpoint,{onopen:Ko(this,this.onOpen),onmessage:Ko(this,this.onMessage),onclose:Ko(this,this.onClose),onpong:Ko(this,this.onPong)}),ia.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.close();var e=this.ws;return this.ws=null,ia.pingAt=null,this.lastUsedAtUpdater.stopPolling(),e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=k.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){ia.pingAt=null,yr.v("PONG "+y.string(e))},onMessage:function(e){var t=new Co(e,!0).o,n=To.__cast(t[0],Qo);if(1==n&&4==t.length){var i=To.__cast(t[1],Qo),r=t[2],a=t[3],o=this.responseHandlers.h[i];if(null==o)return void yr.e("No ResponseHandler prepared. msgId:%s error:%s result:",i,r,a);yr.v("response received. method:",o.method," data:",t),null==r?o.onSuccess(a):(yr.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=To.__cast(t[1],Qo),l=To.__cast(t[2],String),u=To.__cast(t[3],Array);if(yr.v("request received. method:",l),0==u.length)return void yr.e("empty params.");if(this.broadcast.handleNotification(l,u[0]),null==this.ws)return void yr.e("websocket was finished.");yr.v("response sent. method:",l),this.ws.send(new Mo([1,s,null,!0]).o.getBytes())}},onClose:function(e,t,n){yr.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?k.Error:k.ForcibliyClosedError:k.ConcurrentAccessError,this.connectionStatus==k.ForcibliyClosedError?this.sendNotification("SignOut"):this.sendNotification("Url",Le.FORWARD(j.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():$a.delay(a,100)},$a.delay(a,e)},call:function(e,t,n,i){if(null!=this.ws){null==t&&(t=[]),null==n&&(n=function(e){}),null==i&&(i=Ko(this,this.onServerError));var r=ia.lastMsgId++,a=this.responseHandlers,o=new aa(e,n,i);a.h[r]=o;var s=[0,r,e,t],l=new Mo(s).o.getBytes();this.ws.send(l),yr.v("send request. data:",s)}else yr.e("disconnected. data:",this.data)},ping:function(){switch(this.connectionStatus[1]){case 2:case 3:return}null==this.ws||this.ws.isClosed()?(this.restart(),yr.v("restart connection. "+ia.pingAt+" "+y.string(null==this.ws||this.ws.isClosed()))):ia.pingAt>0?(this.restart(),yr.v("restart connection. "+ia.pingAt+" "+y.string(null==this.ws||this.ws.isClosed()))):(yr.v("before pingAt "+ia.pingAt),this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),ia.pingAt=(new Date).getTime(),yr.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__:ia});var ra=function(e){this.connected=!1,this.ping=e};n["albero.proxy._MsgPackRpcProxy.ConnectionKeeper"]=ra,ra.__name__=["albero","proxy","_MsgPackRpcProxy","ConnectionKeeper"],ra.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 $a(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=$a.delay(r,n)}})(3e3)()}},deleteTimer:function(){null!=this.timer&&(this.timer.stop(),this.timer=null)},__class__:ra};var aa=function(e,t,n){this.method=e,this.onSuccess=t,this.onError=n};n["albero.proxy._MsgPackRpcProxy.ResponseHandler"]=aa,aa.__name__=["albero","proxy","_MsgPackRpcProxy","ResponseHandler"],aa.prototype={__class__:aa};var oa=function(e){this.code=e.code,this.message=e.message,this.detail=e.detail};n["albero.proxy.Error"]=oa,oa.__name__=["albero","proxy","Error"],oa.prototype={__class__:oa};var sa=function(){};n["albero.proxy.ErrorConverter"]=sa,sa.__name__=["albero","proxy","ErrorConverter"],sa.toLocalError=function(e,t){return{code:t.code,message:t.message,detail:t.detail,localErrorType:e}};var la=function(){Fr.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new co,this.updateReadAnnouncementStatusesTimers=new co};n["albero.proxy.ReadStatusUpdaterProxy"]=la,la.__name__=["albero","proxy","ReadStatusUpdaterProxy"],la.__super__=Fr,la.prototype=r(Fr.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!=ns[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadMessageId,l=$a.delay(function(){n.updateReadStatusesTimers.remove(r),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,s)},1e3),u=this.updateReadStatusesTimers;null!=ns[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!=ns[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadAnnouncementId;o=$a.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(r),n.api.updateAnnouncementReadStatus(e,s)},1e3);var l=this.updateReadAnnouncementStatusesTimers;null!=ns[r]?l.setReserved(r,o):l.h[r]=o}},__class__:la});var ua=function(){Fr.call(this,"routing")};n["albero.proxy.RoutingProxy"]=ua,ua.__name__=["albero","proxy","RoutingProxy"],ua.__super__=Fr,ua.prototype=r(Fr.prototype,{onRegister:function(){},init:function(){null==this.router&&(this.router=new ca(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__:ua});var ca=function(e,t,n){this.proxy=e,this.settings=t,this.dataStore=n,this.urlConverterDelegate=new _a(t,n)};n["albero.proxy._RoutingProxy.LocalRouter"]=ca,ca.__name__=["albero","proxy","_RoutingProxy","LocalRouter"],ca.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 8:return e[2];case 12:return e[2];case 13: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__:ca};var _a=function(e,t){this.settings=e,this.dataStore=t};n["albero.proxy.UrlConverterDelegate"]=_a,_a.__name__=["albero","proxy","UrlConverterDelegate"],_a.__interfaces__=[V],_a.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return H.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e;switch(H.flatMap(this.getLastSelectedDomainId(),Ko(this,this.getDomain))[1]){case 0:e=H.flatMap(this.getLastSelectedDomainId(),Ko(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 Ct(this.dataStore.getDomains()).getOldestDomain()},__class__:_a};var ha=function(){Fr.call(this,"searchService")};n["albero.proxy.SearchServiceProxy"]=ha,ha.__name__=["albero","proxy","SearchServiceProxy"],ha.__super__=Fr,ha.prototype=r(Fr.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 kn(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 co),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new co);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(i):i();var t=0,n=function(){2==(t+=1)&&e.api.getTalks(i)};e.api.getFriends(n),e.api.getAcquaintances(n)}),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:Qa.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:xa.toIdStr(e.userIdNumStr)}}});return new xa(e,t,r,i,a)},xa.toIdStr=function(e){var t=U.parse(e);return"_"+t.high+"_"+t.low},xa.prototype={__class__:xa};var Ua=function(){Fr.call(this,"hubotObject")};n["albero_cli.proxy.HubotObjectProxy"]=Ua,Ua.__name__=["albero_cli","proxy","HubotObjectProxy"],Ua.__super__=Fr,Ua.prototype=r(Fr.prototype,{userObject:function(e){return Ea.of(e).toCompatibleData()},meObject:function(e){return Na.of(e).toCompatibleData()},userObjectByIdStr:function(e,t){var n,i=t.split("_");i.length>2?n=new mi(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!=ns[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 Da.create(e,n,i).toCompatibleData()},talkObjects:function(e){for(var t=new co,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__:Ua});var Pa=function(){Fr.call(this,"messageEvent"),this.emitters=new co};n["albero_cli.proxy.MessageEventProxy"]=Pa,Pa.__name__=["albero_cli","proxy","MessageEventProxy"],Pa.__super__=Fr,Pa.prototype=r(Fr.prototype,{registEmitter:function(e,t){La.factory=this;var n=La.createInstance(t);if(null!=n){var i=this.emitters;null!=ns[e]?i.setReserved(e,n):i.h[e]=n}},noteCreated:function(e,t){var n=this.emitters,i=null!=ns[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!=ns[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!=ns[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!=ns[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!=ns[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!=ns[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:Qa.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!=ns[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!=ns[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!=ns[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__:Pa});var La=function(e){this.context=e,this.listeners=new co,Object.defineProperty(this,"readUsers",{get:this.get_readUsers}),Object.defineProperty(this,"unreadUsers",{get:this.get_unreadUsers})};n["albero_cli.proxy.Emitter"]=La,La.__name__=["albero_cli","proxy","Emitter"],La.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?[]:La.factory.hubotObject.userObjectsByIds(this.talk.domainId,e)},createNoteObjectForHubot:function(e){return La.factory.hubotObject.noteObject(e)},get_message:function(e){return La.factory.hubotObject.messageObject(e)},answer:function(e){var t,n=this,i=Xt.typeOf(this.message.type),r=this.message.id.split("_");r.length>2?t=new mi(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 mi(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)}});La.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=$a.delay(i,60*n.__readerTimerWait*1e3|0)):(t(!0),n.__readerTimer=null)},this.__readerTimer=$a.delay(i,60*this.__readerTimerWait*1e3|0)},stopTimer:function(){null!=this.__readerTimer&&(this.__readerTimer.stop(),this.__readerTimer=null)},__class__:La};var Ba=function(){Fr.call(this,"sendQueue"),this.sendCount=0,this.sendMsgQueue=new Ha(this,550,new gr("sendQueueMessage")),this.sendAnnounceQueue=new Ha(this,5050,new gr("sendQueueAnnounce"))};n["albero_cli.proxy.SendQueueProxy"]=Ba,Ba.__name__=["albero_cli","proxy","SendQueueProxy"],Ba.__super__=Fr,Ba.prototype=r(Fr.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 mi(0,this.sendCount++);this.messageEvent.registEmitter("_"+i.high+"_"+i.low,n);var r=new Xt;if(r.id=i,r.domainId=e,r.talkId=t,r.content=this.parseContent(n),r.type=this.detectType(r.content),r.type==Zt.unknown)return;if(r.type==Zt.file&&null!=r.content.path)return void this.sendFile(t,r.content,"_"+i.high+"_"+i.low);if(r.type==Zt.noteCreated)return void this.sendNote(t,r.content,"_"+i.high+"_"+i.low);r.type!=Zt.yesOrNo&&r.type!=Zt.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 mi(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 mi(y.parseInt(s[1]),y.parseInt(s[2]));else a=null}else"stampset_id"!=i&&"stamp_id"!=i||(a=ja._from(r).toInt64());null!=a&&(e[i]=a)}else if(null!=r&&v.isObject(e)&&null!=r.high&&null!=r.low){var l=new mi(r.high,r.low);e[i]=l}}return 1==t.length&&null!=e.text?e.text:e},detectType:function(e){if(null==e)return Zt.unknown;if("string"==typeof e)return Zt.text;if(null!=e.stamp_set)return Zt.stamp;if(null!=e.stampset_id)return Zt.originalStamp;if(null!=e.lat)return Zt.geo;if(null!=e.file_id||null!=e.path)return Zt.file;if(null!=e.close){var t=e.close;if(v.deleteField(e,"close"),"yesno"==t)return Zt.yesOrNoClosed;if("select"==t)return Zt.selectOneClosed;if("task"==t)return Zt.todoClosed}else if(null!=e.in_reply_to){if("boolean"==typeof e.response)return Zt.yesOrNoReply;var n=e.response;if("number"==typeof n&&(0|n)===n)return Zt.selectOneReply;if(null!=e.done)return Zt.todoDone}else{if(null!=e.question)return null==e.options?Zt.yesOrNo:Zt.selectOne;if(null!=e.title)return Zt.todo;if(null!=e.note_title)return Zt.noteCreated}return Zt.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==Zt.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__:Ba});var Ha=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"]=Ha,Ha.__name__=["albero_cli","proxy","_SendQueueProxy","SendQueue"],Ha.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);$a.delay(Ko(this,this.sendNotification),t)}else this.closeQueue()},retryAfter:function(e){this.sending&&null!=this.lastSendNode?(this.sendQueue.unshift(this.lastSendNode),this.saveQueue(),$a.delay(Ko(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__:Ha};var Ga=function(e,t,n){this.code=e,this.message=t,this.detail=n};n["albero_cli.value.ApiErrorResponse"]=Ga,Ga.__name__=["albero_cli","value","ApiErrorResponse"],Ga.of=function(e){switch(e.code){case 400:if("invalid parameter"==e.message)return new Ga(za.INVALID_PARAMETER);break;case 403:if("forbidden"==e.message)return new Ga(za.FORBIDDEN);break;case 404:if("not found"==e.message)return new Ga(za.NOT_FOUND);break;case 409:switch(e.message){case"conflict":return new Ga(za.CONFLICT);case"locked by another user":return new Ga(za.LOCKED_BY_ANOTHER_USER,null,{userId:e.detail.user_id})}break;case 429:return Ga.createTooManyRequestsError(e.message,e.detail.retry_after)}return yr.w("please contact us: error = "+y.string(e)),new Ga(za.UNKNOWN)},Ga.createInvalidParameterError=function(e){return new Ga(za.INVALID_PARAMETER,e)},Ga.createTooManyRequestsError=function(e,t){return new Ga(za.TOO_MANY_REQUESTS,e,{retryAfter:t})},Ga.prototype={__class__:Ga};var za=function(){};n["albero_cli.value.ApiErrorCode"]=za,za.__name__=["albero_cli","value","ApiErrorCode"];var ja=function(){};n["albero_cli.value.IDUtil"]=ja,ja.__name__=["albero_cli","value","IDUtil"],ja._from=function(e){if(null==e)return null;if("string"==typeof e){var t=ja.parseInt64(e);if(null!=t)return new Ya(t)}if(null!=e.high&&null!=e.low){var n=ja.parseInt64(ja.stringifyInt64(e,!0));if(null!=n)return new Ya(n)}return null},ja.parseInt64=function(e){return e.length>0&&"_"==e.charAt(0)?U.makeFromIdStr(e):U.parse(e)},ja.stringifyInt64=function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:Ja.toString(e)},ja.prototype={from:function(e){return ja._from(e)},__class__:ja};var Ya=function(e){this.value=e};n["albero_cli.value.ID"]=Ya,Ya.__name__=["albero_cli","value","ID"],Ya.prototype={toString:function(){return Ja.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__:Ya};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 Ka=function(e){this.note=e};n["albero_cli.value.note.GetNoteResult"]=Ka,Ka.__name__=["albero_cli","value","note","GetNoteResult"],Ka.of=function(e){return new Ka(ka.of(e.note))},Ka.prototype={__class__:Ka};var Va=function(e){this.note=e};n["albero_cli.value.note.UpdateNoteResult"]=Va,Va.__name__=["albero_cli","value","note","UpdateNoteResult"],Va.of=function(e){return new Va(ka.of(e.note))},Va.prototype={__class__:Va};var qa=function(){};n["haxe.IMap"]=qa,qa.__name__=["haxe","IMap"],qa.prototype={__class__:qa};var Qa={};n["haxe._Int32.Int32_Impl_"]=Qa,Qa.__name__=["haxe","_Int32","Int32_Impl_"],Qa.ucompare=function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0};var Ja={};n["haxe._Int64.Int64_Impl_"]=Ja,Ja.__name__=["haxe","_Int64","Int64_Impl_"],Ja.toString=function(e){var t=e,n=new mi(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 mi(0,10);;){var o=new mi(0,0);if(t.high==o.high&&t.low==o.low)break;var s=Ja.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 mi(u,c).low+i;var _=s.quotient,h=~_.high,d=-_.low;if(0==d){h++;h|=0}t=new mi(h,d)}else i=s.modulus.low+i,t=s.quotient}return r&&(i="-"+i),i},Ja.divMod=function(e,t){if(0==t.high)switch(t.low){case 0:throw new Io("divide by zero");case 1:return{quotient:new mi(e.high,e.low),modulus:new mi(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 mi(r,a)}else{n=new mi(e.high,e.low)}if(t.high<0){var o=~t.high,s=-t.low;if(0==s){o++;o|=0}t=new mi(o,s)}else t=t;for(var l=new mi(0,0),u=new mi(0,1);!(t.high<0);){var c=Qa.ucompare(t.high,n.high),_=0!=c?c:Qa.ucompare(t.low,n.low),h=1;if(0==(h&=63))t=new mi(t.high,t.low);else if(h<32){t=new mi(t.high<>>32-h,t.low<>>32-d,u.low<=0)break}for(;;){var f=new mi(0,0);if(u.high==f.high&&u.low==f.low)break;var m=Qa.ucompare(n.high,t.high);if((0!=m?m:Qa.ucompare(n.low,t.low))>=0){l=new mi(l.high|u.high,l.low|u.low);var p=n.high-t.high|0,g=n.low-t.low|0;if(Qa.ucompare(n.low,t.low)<0){p--;p|=0}n=new mi(p,g)}var v=1;if(0==(v&=63))u=new mi(u.high,u.low);else if(v<32){u=new mi(u.high>>>v,u.high<<32-v|u.low>>>v)}else{u=new mi(0,u.high>>>v-32)}var y=1;if(0==(y&=63))t=new mi(t.high,t.low);else if(y<32){t=new mi(t.high>>>y,t.high<<32-y|t.low>>>y)}else{t=new mi(0,t.high>>>y-32)}}if(i){var S=~l.high,w=-l.low;if(0==w){S++;S|=0}l=new mi(S,w)}if(e.high<0){var I=~n.high,T=-n.low;if(0==T){I++;I|=0}n=new mi(I,T)}return{quotient:l,modulus:n}};var Xa=function(){};n["haxe.Int64Helper"]=Xa,Xa.__name__=["haxe","Int64Helper"],Xa.parseString=function(e){var t=new mi(0,10),n=new mi(0,0),i=new mi(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 Io("NumberFormatError");var h=new mi(_>>31,_);if(r){var d=65535&i.low,f=i.low>>>16,m=65535&h.low,p=h.low>>>16,g=Qa._mul(d,m),v=Qa._mul(f,m),y=Qa._mul(d,p),S=g,I=(Qa._mul(f,p)+(y>>>16)|0)+(v>>>16)|0;if(S=S+(y<<=16)|0,Qa.ucompare(S,y)<0){I++;I|=0}if(S=S+(v<<=16)|0,Qa.ucompare(S,v)<0){I++;I|=0}I=I+(Qa._mul(i.low,h.high)+Qa._mul(i.high,h.low)|0)|0;var T=new mi(I,S),E=n.high-T.high|0,N=n.low-T.low|0;if(Qa.ucompare(n.low,T.low)<0){E--;E|=0}if(!((n=new mi(E,N)).high<0))throw new Io("NumberFormatError: Underflow")}else{var A=65535&i.low,b=i.low>>>16,D=65535&h.low,k=h.low>>>16,C=Qa._mul(A,D),M=Qa._mul(b,D),O=Qa._mul(A,k),F=C,R=(Qa._mul(b,k)+(O>>>16)|0)+(M>>>16)|0;if(F=F+(O<<=16)|0,Qa.ucompare(F,O)<0){R++;R|=0}if(F=F+(M<<=16)|0,Qa.ucompare(F,M)<0){R++;R|=0}R=R+(Qa._mul(i.low,h.high)+Qa._mul(i.high,h.low)|0)|0;var x=new mi(R,F),U=n.high+x.high|0,P=n.low+x.low|0;if(Qa.ucompare(P,n.low)<0){U++;U|=0}if((n=new mi(U,P)).high<0)throw new Io("NumberFormatError: Overflow")}var L=65535&i.low,B=i.low>>>16,H=65535&t.low,G=t.low>>>16,z=Qa._mul(L,H),j=Qa._mul(B,H),Y=Qa._mul(L,G),W=z,K=(Qa._mul(B,G)+(Y>>>16)|0)+(j>>>16)|0;if(W=W+(Y<<=16)|0,Qa.ucompare(W,Y)<0){K++;K|=0}if(W=W+(j<<=16)|0,Qa.ucompare(W,j)<0){K++;K|=0}K=K+(Qa._mul(i.low,t.high)+Qa._mul(i.high,t.low)|0)|0,i=new mi(K,W)}return n};var Za=function(){this.buf=new S,this.cache=[],this.useCache=Za.USE_CACHE,this.useEnumIndex=Za.USE_ENUM_INDEX,this.shash=new co,this.scount=0};n["haxe.Serializer"]=Za,Za.__name__=["haxe","Serializer"],Za.run=function(e){var t=new Za;return t.serialize(e),t.toString()},Za.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=ns[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!=ns[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 oo: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 so:this.buf.b+="M";for(var w=e,I=w.keys();I.hasNext();){var T=I.next(),N=v.field(T,"__id__");v.deleteField(T,"__id__"),this.serialize(T),T.__id__=N,this.serialize(w.h[T.__id__])}this.buf.b+="h";break;case co:this.buf.b+="b";for(var A=e,b=A.keys();b.hasNext();){var D=b.next();this.serializeString(D),this.serialize(null!=ns[D]?A.getReserved(D):A.h[D])}this.buf.b+="h";break;case _o:var k=e;this.buf.b+="s",this.buf.b+=y.string(Math.ceil(8*k.length/6)),this.buf.b+=":";var C=0,M=k.length-2,O=Za.BASE64_CODES;if(null==O){var F=Za.BASE64.length;O=new Array(F);for(var R=0,x=Za.BASE64.length;R>2]),this.buf.b+=String.fromCharCode(O[63&(P<<4|L>>4)]),this.buf.b+=String.fromCharCode(O[63&(L<<2|B>>6)]),this.buf.b+=String.fromCharCode(O[63&B])}if(C==M){var H=k.b[C++],G=k.b[C++];this.buf.b+=String.fromCharCode(O[H>>2]),this.buf.b+=String.fromCharCode(O[63&(H<<4|G>>4)]),this.buf.b+=String.fromCharCode(O[G<<2&63])}else if(C==M+1){var z=k.b[C++];this.buf.b+=String.fromCharCode(O[z>>2]),this.buf.b+=String.fromCharCode(O[z<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(E.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(E.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var j=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=y.string(this.useEnumIndex?"j":"w"),this.serializeString(E.getEnumName(j)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=y.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var Y=e.length;this.buf.b+=y.string(Y-2);for(var W=2,K=Y;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 Io("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Io("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 Io("Invalid enum format");var n=this.readDigits();if(0==n)return E.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return E.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 Io("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new Io("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new Io("Class not found "+r);var o=E.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new Io("Invalid custom data");return o;case 77:var s=new so;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 Io("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 co;this.cache.push(m);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=ns[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 Io("Class not found "+v);var S=E.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 Io("Enum not found "+w);this.pos++;var T=this.readDigits(),N=I.__constructs__.slice()[T];if(null==N)throw new Io("Unknown enum index "+w+"@"+T);var A=this.unserializeEnum(I,N);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 D={};return this.cache.push(D),this.unserializeObject(D),D;case 112:return 1/0;case 113:var k=new oo;this.cache.push(k);this.buf;for(var C=this.buf.charCodeAt(this.pos++);58==C;){var M=this.readDigits(),O=this.unserialize();k.h[M]=O,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new Io("Invalid IntMap format");return k;case 114:var F=this.readDigits();if(F<0||F>=this.cache.length)throw new Io("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 Y=U[x.charCodeAt(P++)];H.b[G++]=255&(j<<4|Y>>2);var W=U[x.charCodeAt(P++)];H.b[G++]=255&(Y<<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 Io("Enum not found "+X);var $=this.unserializeEnum(Z,this.unserialize());return this.cache.push($),$;case 120:throw Io.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 io(e.left,e.key,e.value,new io(e.right,t,n,i)):new io(new io(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new io(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 io(new io(e,t,n,i.left),i.key,i.value,i.right):new io(new io(e,t,n,i.left.left),i.left.key,i.left.value,new io(i.left.right,i.key,i.value,i.right))}return new io(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return v.compare(e,t)},__class__:no};var io=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"]=io,io.__name__=["haxe","ds","TreeNode"],io.prototype={__class__:io};var ro=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};ro.Left=function(e){var t=["Left",0,e];return t.__enum__=ro,t.toString=i,t},ro.Right=function(e){var t=["Right",1,e];return t.__enum__=ro,t.toString=i,t},ro.__empty_constructs__=[];var ao=function(){no.call(this)};n["haxe.ds.EnumValueMap"]=ao,ao.__name__=["haxe","ds","EnumValueMap"],ao.__interfaces__=[qa],ao.__super__=no,ao.prototype=r(no.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 _o(new Uint8Array(t).buffer)},_o.ofData=function(e){var t=e.hxBytes;return null!=t?t:new _o(e)},_o.fastGet=function(e,t){return e.bytes[t]},_o.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Io(yo.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__:_o};var ho=function(){this.b=[]};n["haxe.io.BytesBuffer"]=ho,ho.__name__=["haxe","io","BytesBuffer"],ho.prototype={getBytes:function(){var e=new _o(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:ho};var fo=function(){};n["haxe.io.Input"]=fo,fo.__name__=["haxe","io","Input"],fo.prototype={readByte:function(){throw new Io("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Io(yo.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof Io&&(e=e.val),!To.__instanceof(e,vo))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new _o(new ArrayBuffer(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new Io(yo.Blocked);n+=i,e-=i}return t},readFloat:function(){return So.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?So.i64ToDouble(t,e):So.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__:fo};var mo=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 Io(yo.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};n["haxe.io.BytesInput"]=mo,mo.__name__=["haxe","io","BytesInput"],mo.__super__=fo,mo.prototype=r(fo.prototype,{readByte:function(){if(0==this.len)throw new Io(new vo);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Io(yo.OutsideBounds);if(0==this.len&&n>0)throw new Io(new vo);this.lene.length)throw new Io(yo.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 Io(yo.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(So.floatToI32(e))},writeDouble:function(e){var t=So.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 Io(yo.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new Io(yo.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new Io(yo.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__:po};var go=function(){this.b=new ho};n["haxe.io.BytesOutput"]=go,go.__name__=["haxe","io","BytesOutput"],go.__super__=po,go.prototype=r(po.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 Io(yo.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)},So.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},So.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)},So.doubleToI64=function(e){var t=So.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 wo=function(){};n["haxe.rtti.Meta"]=wo,wo.__name__=["haxe","rtti","Meta"],wo.getMeta=function(e){return e.__meta__},wo.getFields=function(e){var t=wo.getMeta(e);return null==t||null==t.fields?{}:t.fields};var Io=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,Io)};n["js._Boot.HaxeError"]=Io,Io.__name__=["js","_Boot","HaxeError"],Io.wrap=function(e){return e instanceof Error?e:new Io(e)},Io.__super__=Error,Io.prototype=r(Error.prototype,{__class__:Io});var To=function(){};n["js.Boot"]=To,To.__name__=["js","Boot"],To.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=To.__nativeClassName(e);return null!=n?To.__resolveNativeClass(n):null},To.__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?",":"")+To.__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+" : "+To.__string_rec(e[f],t));return m+="\n"+(t=t.substring(1))+"}";case"string":return e;default:return String(e)}},To.__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 Io&&(e=e.val),!To.__instanceof(e,vo))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 zo(Ko(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 qo=Vo.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 Qo=n.Int={__name__:["Int"]},Jo=n.Dynamic={__name__:["Dynamic"]},Xo=n.Float=Number;Xo.__name__=["Float"];var Zo=n.Bool=Boolean;Zo.__ename__=["Bool"];var $o=n.Class={__name__:["Class"]},es={},ts={},ns={};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_SCHEDULE_MESSAGE="notify_schedule_message",b.NOTIFY_PROCESSED_SCHEDULED_MESSAGE="notify_processed_scheduled_message",b.NOTIFY_DELETE_SCHEDULED_MESSAGE="notify_delete_scheduled_message",b.GET_SCHEDULED_MESSAGES_COMPLETED="get_scheduled_messages_completed",b.GET_SCHEDULED_MESSAGES_FAILED="get_scheduled_messages_failed",b.DELETE_SCHEDULED_MESSAGES_COMPLETED="delete_scheduled_messages_completed",b.SCHEDULE_MESSAGE_STARTED="schedule_message_started",b.SCHEDULE_MESSAGE_COMPLETED="schedule_message_completed",b.SCHEDULE_MESSAGE_FAILED="schedule_message_faileed",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:{dataStore:{inject:null},api:{inject:null}}},Te.NAME="ScheduleMessage",Ne.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},Ne.NAME="Search",be.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},be.NAME="SelectTalk",ke.__meta__={fields:{api:{inject:null}}},ke.NAME="Send",Ce.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},Ce.NAME="SignIn",Me.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},Me.NAME="SignOut",Oe.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Oe.NAME="Talk",Re.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Re.NAME="UpdateProfile",xe.__meta__={fields:{api:{inject:null}}},xe.NAME="UpdateUser",Ue.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Ue.NAME="UpdateUserPresences",Ue.MAX_USERS_PER_API=100,Pe.__meta__={fields:{routing:{inject:null}}},Pe.NAME="Url",Xe.TalkAutoScrollDelay=1,Xe.TalkAutoScrollImmediately=2,Xe.TalkAutoScrollNone=3,Xe.NotificationPopupTime5Sec=5,Xe.TalksSortModeNewMessagesFirst="new_messages_first",Xe.TalksSortModeUnreadMessagesFirst="unread_messages_first",Xe.TalksSortModeOldMessagesFirst="old_messages_first",Xe.DomainsSortModeNameOrderAsc="name_order_asc",Xe.OLD_KEY_RIGHT_PANEL_OPENED="right_panel_opened",Xe.OLD_KEY_RIGHT_PANEL_WIDTH="right_panel_width",Xe.OLD_KEY_APP_LEFT_PANEL_OPENED="app_left_panel_opened",Xe.NAME="browser_settings",$e.MAX_SIZE=72,tt.INCOMING_TIME=6e4,it.DEFAULT_PRESENCE_EXPIRATION=3e5,at.DEFAULT_TTL=3600,at.DEFAULT_MAX_PARTICIPANTS=8,xt.stagedFileInfosMaxId=0,jt.TIMESTAMP_SHIFT=22,Xt.MAX_READ_USER_IDS_COUNT=16,kn.QUERY_DATE_TODAY="t",kn.QUERY_DATE_YESTERDAY="-1d",kn.QUERY_DATE_THREE_DAYS_BEFORE="-3d",Yn.HISTORY_TAB_NAME="stamp-history",pi.SIXTY_MINUTES=new mi(0,36e5),pi.FIFTEEN_MINUTES=new mi(0,9e5),Zi.PREFIX="note-",Zi.nextDummyId=new mi(-1,-1),nr.CONTINUE_MARGIN_RATE=.1,dr.CHEKBOX_UNCHECKED="- [ ] ",dr.CHEKBOX_CHECKED="- [x] ",mr.TU_REG=new o("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),mr.XTU_REG=new o("ッ","gm"),yr.EMERGENCY=0,yr.ALERT=1,yr.CRITICAL=2,yr.ERROR=3,yr.WARNING=4,yr.NOTICE=5,yr.INFO=6,yr.DEBUG=7,yr.level=yr.getLogLevel(process.env.HUBOT_LOG_LEVEL),yr._d=7<=yr.level&&null!=console?console.log.bind(console):yr._nop,yr._i=6<=yr.level&&null!=console?console.info.bind(console):yr._nop,yr._w=4<=yr.level&&null!=console?console.warn.bind(console):yr._nop,yr._e=3<=yr.level&&null!=console?console.error.bind(console):yr._nop,Nr.HIRAGANA_SMALL_A=12353,Nr.HIRAGANA_NN=12435,Nr.KATAKANA_SMALL_A=12449,Or.NAME="accessTokenResolver",Fr.NAME="Proxy",Rr.__meta__={fields:{settings:{inject:null},accountLoader:{inject:null},api:{inject:null}}},Ur.NAME="accountLoader",Lr.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null}}},Lr.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.123",Br.UPDATE_VERSION="1.123_1",Br.ACTIONS_COUNT_PER_API=20,Hr.__meta__={fields:{rpc:{inject:null}}},Hr.NAME="apiCaller",Hr.DELAY_FOR_DB_REPLICATION=500,Hr.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,Hr.API_TRY_COUNT=3,Gr.__meta__={fields:{apiCaller:{inject:null},dataStore:{inject:null},settings:{inject:null}}},Gr.NAME="apiNote",zr.NAME="appState",jr.__meta__={fields:{dataStore:{inject:null}}},jr.NAME="dataFactory",Yr.NAME="dataStore",Yr.STORAGE_KEY_FOR_GENERAL="dataStore",Yr.STORAGE_KEY_FOR_TALKS="dataStoreTalks",Yr.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",Yr.STORAGE_KEY_FOR_USERS="dataStoreUsers",Yr.TYPE_FRIEND=0,Yr.TYPE_ACQUAINSTANCE=1,Yr.TYPE_NONE=2,Wr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Wr.NAME="features",qr.NAME="fileService",Qr.__meta__={fields:{settings:{inject:null}}},Jr.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},Jr.NAME="keywordWatcher",Jr.TALK_KEY_PREFIX="talk_",Jr.ANNOUNCEMENT_KEY_PREFIX="announcement_",Xr.TEMP_HALF_SPACE="&SPACE",Xr.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",ta.__meta__={fields:{settings:{inject:null}}},ta.NAME="lastUsedAtUpdater",ta.UPDATE_LAST_USED_AT_INTERVAL=6e5,na.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},na.NAME="limitations",ia.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},ia.NAME="rpc",ia.lastMsgId=0,ra.PING_INTERVAL_ON_CONNECTED=45e3,la.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},la.NAME="readStatusUpdater",ua.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},ua.NAME="routing",ha.__meta__={fields:{settings:{inject:null}}},ha.NAME="searchService",ha.LOAD_SIZE=20,ha.DUMMY_VALUE_FOR_SET=1,da.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},api:{inject:null}}},da.NAME="session",fa.NAME="settings",fa.KEY_ACCESS_TOKEN="access_token",fa.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",fa.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",fa.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",fa.KEY_INPUT_TEXT="input_text",fa.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",fa.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",fa.KEY_SEARCH_HISTORIES="search_histories",fa.KEY_MULTI_VIEW_MODE="multi_view_mode",fa.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",fa.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",fa.KEY_IDFV="idfv",ma.__meta__={fields:{dataStore:{inject:null}}},ma.NAME="talksService",pa.__meta__={fields:{dataStore:{inject:null}}},pa.NAME="userPresences",ga.__meta__={fields:{apiCaller:{inject:null}}},ga.NAME="wsApi",Oa.NAME="Mediator",Fa.__meta__={fields:{dataStore:{inject:null},api:{inject:null},hubotObject:{inject:null},messageEvent:{inject:null},sendQueue:{inject:null}}},Fa.NAME="commandline",Fa.DATA_SAVE_SPAN=5e3,Ua.__meta__={fields:{dataStore:{inject:null}}},Ua.NAME="hubotObject",Pa.__meta__={fields:{dataStore:{inject:null},hubotObject:{inject:null}}},Pa.NAME="messageEvent",La.minWaitMinute=1,La.maxWaitMinute=1440,La.SEND_EVENT_NAME="send",Ba.__meta__={fields:{messageEvent:{inject:null}}},Ba.NAME="sendQueue",Ba.MIN_SEND_SPAN_MESSAGE=550,Ba.MIN_SEND_SPAN_ANNOUNCE=5050,Ba.MAX_TEXT_LENGTH=1024,Ba.MAX_FIELD_COUNT=9,Ba.MAX_FIELD_LENGTH=64,za.INVALID_PARAMETER="INVALID_PARAMETER",za.FORBIDDEN="FORBIDDEN",za.NOT_FOUND="NOT_FOUND",za.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",za.CONFLICT="CONFLICT",za.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",za.UNKNOWN="UNKNOWN",Qa._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},Za.USE_CACHE=!1,Za.USE_ENUM_INDEX=!1,Za.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",to.DEFAULT_RESOLVER=new eo,to.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",so.count=0,So.i64tmp=new mi(0,0),To.__toStr={}.toString,Mo.FLOAT_SINGLE_MIN=1.401298464324817e-45,Mo.FLOAT_SINGLE_MAX=3.4028234663852886e38,Mo.FLOAT_DOUBLE_MIN=5e-324,Mo.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 d31572a..0a682a0 100755 --- a/lib/direct.min.js +++ b/lib/direct.min.js @@ -1 +1 @@ -!function(S,y){function o(){return G.__string_rec(this,"")}var t={};function e(e,t){function n(){}n.prototype=e;var i,r=new n;for(i in t)r[i]=t[i];return t.toString!==Object.prototype.toString&&(r.toString=t.toString),r}function v(e,t){this.r=new RegExp(e,t.split("u").join(""))}function C(){}function T(){}function N(e,t){this.basetime=0,this.count=0,this.max=e,this.interval=t}function U(){}function A(){this.b=""}function w(){}function x(){}function b(){}function M(){(M.instance=this).initializeFacade()}function D(){}function K(){}function j(){}function V(e){this.buf=e,this.length=e.length,this.pos=0,this.scache=[],this.cache=[],null==(e=V.DEFAULT_RESOLVER)&&(e=new j,V.DEFAULT_RESOLVER=e),this.resolver=e}function q(e){V.call(this,e)}function X(){}function Q(){}function J(){}function Z(){}function $(){}function ee(){}function te(){}function ne(){}function ie(){}function a(){}function re(){}function oe(){}function ae(){}function se(){}function le(){}function ue(){this.facade=M.getInstance()}function ce(){}function _e(){ue.call(this)}function n(){_e.call(this),l.getInstance().autoBind(this)}function he(e,t,n){this.email=e,this.pass=t,this.accessToken=n}function de(e){null!=e&&(this.id=e.id,this.group=new $i(e.group),this.profilePolicy=new er(e.profile_policy))}function fe(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new $i(e.group)),null!=e.profile_policy)&&(this.profilePolicy=new er(e.profile_policy))}function me(e){null!=e&&(this.id=k.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}function pe(e){this.value=e}function ge(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=O.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)}function Se(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 ge(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id,null==this.maxReadAnnouncementId)&&0==this.unreadCount&&(this.maxReadAnnouncementId=this.maxAnnouncementId)}function ye(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)}function ve(){this.announcements=new B}function Te(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.notificationPopupTime=5,this.talkAutoScroll=1,this.legacyNoteEnabled=!1,this.leaveTalksEnabled=!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,this.domainsSortMode="name_order_asc",this.appLeftPanelOpened=!1,this.appLeftPanelWidth=0,this.scheduledMessageDefaultTimeStr="09:00",null!=e){var t;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.notificationPopupTime&&(this.notificationPopupTime=e.notificationPopupTime),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.legacyNoteEnabled&&(this.legacyNoteEnabled=e.legacyNoteEnabled),null!=e.leaveTalksEnabled&&(this.leaveTalksEnabled=e.leaveTalksEnabled),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),this.talkRightPanelOpened=null!=e.talkRightPanelOpened?e.talkRightPanelOpened:null==a.getItem("right_panel_opened"),null!=e.talkRightPanelWidth?this.talkRightPanelWidth=e.talkRightPanelWidth:(t=P.parseInt(a.getItem("right_panel_width")),this.talkRightPanelWidth=null==t?0:t),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=G.__cast(e.userDataContainer,Array);ne.length)throw new H(Ha.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}function Kn(){}function jn(){this.b=new zn}function Vn(e){if(e instanceof Array&&null==e.__enum__)this.a=e,this.byteLength=e.length;else{this.a=[];for(var t=0,n=e;t=e.length);){if(!this.matchSub(e,n)){i+=P.string(L.substr(e,n,null));break}var r=this.matchedPos(),i=(i+=P.string(L.substr(e,n,r.pos-n)))+P.string(t(this)),n=0==r.len?(i+=P.string(L.substr(e,r.pos,1)),r.pos+1):r.pos+r.len;if(!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},w.startsWith=function(e,t){return e.length>=t.length&&L.substr(e,0,t.length)==t},w.isSpace=function(e,t){e=L.cca(e,t);return 8>>=4););if(null!=t)for(;n.length=this.length)throw new H("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new H("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 H("Invalid enum format");var n=this.readDigits();if(0==n)return x.createEnum(e,t);for(var i=[];0=this.scache.length)throw new H("Invalid string reference");return this.scache[t];case 97:this.buf;var r=[];for(this.cache.push(r);;){var o=this.buf.charCodeAt(this.pos);if(104==o){this.pos++;break}117==o?(this.pos++,o=this.readDigits(),r[r.length+o-1]=null):r.push(this.unserialize())}return r;case 98:var a=new B;for(this.cache.push(a),this.buf;104!=this.buf.charCodeAt(this.pos);){var s=this.unserialize(),l=this.unserialize();null!=W[s]?a.setReserved(s,l):a.h[s]=l}return this.pos++,a;case 99:e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new H("Class not found "+e);e=x.createEmptyInstance(t);return this.cache.push(e),this.unserializeObject(e),e;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:t=this.unserialize(),e=this.resolver.resolveEnum(t);if(null==e)throw new H("Enum not found "+t);this.pos++;var u=this.readDigits(),c=e.__constructs__.slice()[u];if(null==c)throw new H("Unknown enum index "+t+"@"+u);t=this.unserializeEnum(e,c);return this.cache.push(t),t;case 107:return NaN;case 108:var _=new ni;for(this.cache.push(_),this.buf;104!=this.buf.charCodeAt(this.pos);)_.add(this.unserialize());return this.pos++,_;case 109:return-1/0;case 110:return null;case 111:u={};return this.cache.push(u),this.unserializeObject(u),u;case 112:return 1/0;case 113:for(var h=new Ua,d=(this.cache.push(h),this.buf,this.buf.charCodeAt(this.pos++));58==d;){var f=this.readDigits(),m=this.unserialize();h.h[f]=m,d=this.buf.charCodeAt(this.pos++)}if(104!=d)throw new H("Invalid IntMap format");return h;case 114:e=this.readDigits();if(e<0||e>=this.cache.length)throw new H("Invalid reference");return this.cache[e];case 115:var c=this.readDigits(),p=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=t?t-1:0))),T=0;S>4),g[p.charCodeAt(S++)]),E=(v.b[T++]=255&(E<<4|w>>2),g[p.charCodeAt(S++)]);v.b[T++]=255&(w<<6|E)}return 2<=t&&(u=g[p.charCodeAt(S++)],e=g[p.charCodeAt(S++)],v.b[T++]=255&(u<<2|e>>4),3==t)&&(u=g[p.charCodeAt(S++)],v.b[T++]=255&(e<<4|u>>2)),this.pos+=c,this.cache.push(v),v;case 116:return!0;case 118:return 48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4)?(I=L.strDate(L.substr(this.buf,this.pos,19)),this.pos+=19):(t=this.readFloat(),I=new Date(t)),this.cache.push(I),I;case 119:e=this.unserialize(),u=this.resolver.resolveEnum(e);if(null==u)throw new H("Enum not found "+e);c=this.unserializeEnum(u,this.unserialize());return this.cache.push(c),c;case 120:throw H.wrap(this.unserialize());case 121:t=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>>16,l=65535&n.low,u=n.low>>>16,c=I._mul(a,l),l=I._mul(s,l),a=I._mul(a,u),s=(I._mul(s,u)+(a>>>16)|0)+(l>>>16)|0,s=(a<<=16,I.ucompare(u=c+a|0,a)<0&&(s++,s|=0),l<<=16,I.ucompare(u=u+l|0,l)<0&&(s++,s|=0),s+(I._mul(t.low,n.high)+I._mul(t.high,n.low)|0)|0),c=new E(s,u),a=_.make(0,P.parseInt(e.charAt(o))),l=c.high+a.high|0,s=c.low+a.low|0;I.ucompare(s,c.low)<0&&(l++,l|=0);t=new E(l,s)}return t},k.getHigh=function(e){return e.high},k.getLow=function(e){return e.low},k.idStr=function(e){return"_"+e.high+"_"+e.low},k.makeFromIdStr=function(e){var t=new v("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?_.make(P.parseInt(t.matched(1)),P.parseInt(t.matched(2))):null},k.fromNullableIdStr=function(e){return null!=e?k.makeFromIdStr(e):null},k.toStr=function(e){return Ma.toString(e)},k.isNeg=function(e){return e.high<0},k.add=function(e,t){var n=e.high+t.high|0,t=e.low+t.low|0;return I.ucompare(t,e.low)<0&&(n++,n|=0),new E(n,t)},k.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;return I.ucompare(e.low,t.low)<0&&(n--,n|=0),new E(n,i)},k.compare=function(e,t){var n=e.high-t.high|0;return 0==n&&(n=I.ucompare(e.low,t.low)),e.high<0?t.high<0?n:-1:0<=t.high?n:1},k.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},k.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},k.toFloat=function(e){var t=4294967296,n=e.high,e=e.low;return n*t+(0<=e?e:e+t)},k.idStrToInt64=function(e){e=e.split("_");return 2>31,e))},k.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=h.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(n,e){for(var i=this,t=Promise.resolve([]),r=k.splitUsingMaxCount(e,100),o=0;oe.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__:we},(t["albero.entity.Conference"]=Ee).__name__=["albero","entity","Conference"],Ee.prototype={isIncomingExpired:function(){var e=this.createdAt,t=4294967296,n=e.high,e=e.low;return n*t+(0<=e?e:e+t)+Ee.INCOMING_TIME<(new Date).getTime()},isExpired:function(){var e=this.expiredAt,t=4294967296,n=e.high,e=e.low;return n*t+(0<=e?e:e+t)<(new Date).getTime()},__class__:Ee},(t["albero.entity.ConferenceStore"]=Ie).__name__=["albero","entity","ConferenceStore"],Ie.prototype={addConference:function(e){var t=e.id,t="_"+t.high+"_"+t.low,n=this.conferencesMap,n=(null!=W[t]?n.setReserved(t,e):n.h[t]=e,e.talkId),e="_"+n.high+"_"+n.low,n=this.talkIdConferenceIdMap;null!=W[e]?n.setReserved(e,t):n.h[e]=t},removeConference:function(e){var t=e.id,t="_"+t.high+"_"+t.low,e=(this.conferencesMap.remove(t),e.talkId),e="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;(null!=W[e]?n.getReserved(e):n.h[e])==t&&this.talkIdConferenceIdMap.remove(e)},getConferences:function(){return te.toValueArray(this.conferencesMap)},getConference:function(e){var e="_"+e.high+"_"+e.low,t=this.conferencesMap;return null!=W[e]?t.getReserved(e):t.h[e]},hasConferenceInTalk:function(e){var t;return null!=e&&(e="_"+e.high+"_"+e.low,t=this.talkIdConferenceIdMap,null!=W[e]?t.existsReserved(e):t.h.hasOwnProperty(e))},getConferenceIdInTalk:function(e){var t;return null==e||(e="_"+e.high+"_"+e.low,t=this.talkIdConferenceIdMap,null==(t=null!=W[e]?t.getReserved(e):t.h[e]))?null:k.makeFromIdStr(t)},getConferenceTalkIds:function(){return te.toKeyArray(this.talkIdConferenceIdMap).map(k.makeFromIdStr)},hasConference:function(){return this.talkIdConferenceIdMap.keys().hasNext()},__class__:Ie},(t["albero.entity.Configuration"]=Ne).__name__=["albero","entity","Configuration"],Ne.prototype={__class__:Ne},(t["albero.entity.Contract"]=Ae).__name__=["albero","entity","Contract"],Ae.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__:Ae},function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=or.DEFAULT_MAX_PARTICIPANTS,this.ttl=or.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)}),ar=((t["albero.entity.ContractConference"]=or).__name__=["albero","entity","ContractConference"],or.prototype={__class__:or},(t["albero.entity.Department"]=be).__name__=["albero","entity","Department"],be.getLabelFree=function(){return p.localize("Department.label_free")},be.getLabelRoot=function(){return p.localize("Department.label_root")},be.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==ar.Root},isFree:function(){return this.nodeType==ar.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return ar.Root;case 2:return ar.Free;default:return ar.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(k.idStr)},__class__:be},(t["albero.entity.DepartmentHelper"]=Me).__name__=["albero","entity","DepartmentHelper"],Me.getName=function(e){return null==e?null:e.name},t["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]}),sr=(ar.Normal=["Normal",0],ar.Normal.toString=o,(ar.Normal.__enum__=ar).Root=["Root",1],ar.Root.toString=o,(ar.Root.__enum__=ar).Free=["Free",2],ar.Free.toString=o,(ar.Free.__enum__=ar).__empty_constructs__=[ar.Normal,ar.Root,ar.Free],(t["albero.entity.DepartmentList"]=De).__name__=["albero","entity","DepartmentList"],De.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new be(e)})},__class__:De},(t["albero.entity.DepartmentStore"]=Ce).__name__=["albero","entity","DepartmentStore"],Ce.prototype={getDepartment:function(e){var t;return null==e?null:(e="_"+e.high+"_"+e.low,t=this.departmentMap,null!=W[e]?t.getReserved(e):t.h[e])},setDepartment:function(e){null!=e.parentId&&null!=(t=this.getDepartment(e.parentId))&&(t.addChild(e.id),e.depth=t.depth+1);var t=e.id,t="_"+t.high+"_"+t.low,n=this.departmentMap;null!=W[t]?n.setReserved(t,e):n.h[t]=e},clearDomainDepartment:function(e){var t=this,e="_"+e.high+"_"+e.low,n=this.rootDepartmentIdMap,n=null!=W[e]?n.getReserved(e):n.h[e];null!=n&&(C.iter(this.getDepartmentsDescendantOrSelf(n),function(e){e=e.id;t.departmentMap.remove("_"+e.high+"_"+e.low)}),this.rootDepartmentIdMap.remove(e))},getRootDepartmentId:function(e){var e="_"+e.high+"_"+e.low,t=this.rootDepartmentIdMap;return null!=W[e]?t.getReserved(e):t.h[e]},setRootDepartmentId:function(e,t){var e="_"+e.high+"_"+e.low,n=this.rootDepartmentIdMap;null!=W[e]?n.setReserved(e,t):n.h[e]=t},setDepartmentUserCount:function(e){var t=this.getDepartment(e.departmentId);null!=t&&(t.userCount=e,t.userCountLoading=!1)},setUserCountLoading:function(e,t){e=this.getDepartment(e);null!=e&&(e.userCountLoading=t)},isUserCountLoadingRequired:function(e){e=this.getDepartment(e);return null==e||null==e.userCount&&!e.userCountLoading},clearDomainDepartmentUsers:function(e){e=this.getRootDepartmentId(e);return null!=e&&(C.iter(this.getDepartmentsDescendantOrSelf(e),function(e){e.userCount=null,e.userIds=null,e.userCountLoading=!1}),!0)},setDepartmentUsers:function(e,t){e=this.getDepartment(e);null!=e&&(e.userIds=t)},isInDepartment:function(e){e=this.getDepartment(e);return null!=e&&!e.isFree()},getDepartmentPath:function(e){return this.getDepartmentsAncestorOrSelf(e)},getDepartmentPathWithoutRoot:function(e){return this.getDepartmentPath(e).filter(function(e){return!e.isRoot()})},getDepartmentPathSlashSeparatedIfNeeded:function(e){return this.getDepartmentPathWithoutRoot(e).map(Me.getName).filter(ci.isNotEmpty).join("/")},getDepartmentsAncestorOrSelf:function(e){var t=[];return this._getDepartmentsAncestorOrSelf(e,t),t},_getDepartmentsAncestorOrSelf:function(e,t){e=this.getDepartment(e);null!=e&&(null!=e.parentId&&this._getDepartmentsAncestorOrSelf(e.parentId,t),t.push(e))},getDepartmentsDescendantOrSelf:function(e){var t=[];return this._getDepartmentsDescendantOrSelf(e,t),t},_getDepartmentsDescendantOrSelf:function(e,t){var n=this,e=this.getDepartment(e);null!=e&&(t.push(e),null!=e.childrenIds)&&C.iter(e.childrenIds,function(e){n._getDepartmentsDescendantOrSelf(e,t)})},__class__:Ce},(t["albero.entity.DepartmentUserCount"]=ke).__name__=["albero","entity","DepartmentUserCount"],ke.prototype={__class__:ke},(t["albero.entity.DepartmentUserCountList"]=Re).__name__=["albero","entity","DepartmentUserCountList"],Re.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new ke(e)})},__class__:Re},(t["albero.entity.DirectApp"]=Oe).__name__=["albero","entity","DirectApp"],Oe.prototype={getLinkFeature:function(){return C.find(this.features,function(e){return e.isLink()})},getMessageExtensionFeature:function(){return C.find(this.features,function(e){return e.isMessageMenuExtension()})},getLocalizedLabel:function(e,t){var n=this.locales,n=null!=W[t]?n.getReserved(t):n.h[t];return null==n||null==(t=n.getResourceText(e))?"":t},__class__:Oe},function(e){this.map=new B;for(var t=0,n=U.fields(e);t>t,e.high<<32-t|e.low>>>t):new E(e.high>>31,e.high>>t-32)},Xe.subTimestampPart=function(e,t){var e=Xe.timestamp(e),t=Xe.timestamp(t),n=e.high-t.high|0,i=e.low-t.low|0;return I.ucompare(e.low,t.low)<0&&(n--,n|=0),new E(n,i)},Xe.createForTest=function(e){var t=Xe.TIMESTAMP_SHIFT;return 0==(t&=63)?new E(e.high,e.low):t<32?new E(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,p.localize("MessageStringMaker.achieve"),p.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?p.localize("MessageStringMaker.achieve"):p.localize("MessageStringMaker.remand"):"";default:return""}},messageStringForCompactMessage:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=I._mul(o,s),s=I._mul(a,s),o=I._mul(o,l),a=(I._mul(a,l)+(o>>>16)|0)+(s>>>16)|0,a=(o<<=16,I.ucompare(l=u+o|0,o)<0&&(a++,a|=0),s<<=16,I.ucompare(l=l+s|0,s)<0&&(a++,a|=0),a+(I._mul(e.low,t.high)+I._mul(e.high,t.low)|0)|0),u=new E(a,l),o=_.make(0,P.parseInt(this.commonStampId.charAt(r))),s=u.high+o.high|0,a=u.low+o.low|0;I.ucompare(a,u.low)<0&&(s++,s|=0);e=new E(s,a)}return e},__class__:yt},(t["albero.entity.OriginalStamp"]=vt).__name__=["albero","entity","OriginalStamp"],vt.__interfaces__=[St],vt.fromJson=function(e){var t,n;return null==e.originalStamp||null==(e=e.originalStamp).stampsetIdStr||null==e.stampIdStr?null:(t=k.makeFromIdStr(e.stampsetIdStr),n=k.makeFromIdStr(e.stampIdStr),new vt(t,n,e.illust))},vt.fromPropsAndStampsetId=function(e,t){return new vt(t,k.fromIntOrInt64(e.id),e.illust)},vt.createKey=function(e){return"original__"+e.high+"_"+e.low},vt.prototype={getImageUrl:function(){return this.illust},getKey:function(){return vt.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 O;return n.talkId=e,n.type=c.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:vt},(t["albero.entity.StampStore"]=Tt).__name__=["albero","entity","StampStore"],Tt.prototype={addStampsets:function(e){for(var t=0;te.version},__class__:wt},function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(k.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))}),d=((t["albero.entity.StampsetSetting"]=Vr).__name__=["albero","entity","StampsetSetting"],Vr.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new wt(e)})},isForwardForbidden:function(e){e=e.getContentsForOriginalStamp(),e=null==e?null:e.stampsetId;return null!=e&&!this.containSendableStampset(e)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&C.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(t){return C.exists(this.stampsetInfos,function(e){e=e.stampsetId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos||null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.filter(function(e){e=e.stampsetId;return!(null!=e&&null!=t&&e.high==t.high&&e.low==t.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=t&&e.high==t.high&&e.low==t.low)})},getStampsetIdsDiff:function(e){for(var t=new B,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;ithis.pushNotificationSetting.version&&(this.pushNotificationSetting=st.createWithParams(e.type,e.version),!0)},isMessageAcceptable:function(e,t){var n;return!!this.isUnread(e.id)||(0==(n=(e=Xe.subTimestampPart(this.maxReadMessageId,e.id)).high-t.high|0)&&(n=I.ucompare(e.low,t.low)),(e.high<0?t.high<0?n:-1:0<=t.high?n:1)<=0)},isUnread:function(e){var t,n;return null==this.maxReadMessageId||(0==(n=(t=this.maxReadMessageId).high-e.high|0)&&(n=I.ucompare(t.low,e.low)),(t.high<0?e.high<0?n:-1:0<=e.high?n:1)<0)},isMax:function(e){var t;return null!=this.maxMessageId&&null!=(t=this.maxMessageId)&&null!=e&&t.high==e.high&&t.low==e.low},isNewMax:function(e){var t,n;return null==this.maxMessageId||(0==(n=(t=this.maxMessageId).high-e.high|0)&&(n=I.ucompare(t.low,e.low)),(t.high<0?e.high<0?n:-1:0<=e.high?n:1)<0)},isNotificationDisabled:function(){return this.pushNotificationSetting.isDisabled()},getNotificationType:function(){return this.pushNotificationSetting.type},hasUnreadMessage:function(){return null!=this.maxMessage&&this.isUnread(this.maxMessage.id)},clearReadingMessages:function(){this.readingMessages=null},__class__:bt},(t["albero.entity.TalkStatusHelper"]=Mt).__name__=["albero","entity","TalkStatusHelper"],Mt.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},Mt.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},Mt.isUnreadMesasgeExisted=function(e){return null!=e&&e.hasUnreadMessage()},(t["albero.entity.TalkStatusUpdate"]=Dt).__name__=["albero","entity","TalkStatusUpdate"],Dt.prototype={__class__:Dt},(t["albero.entity.ThumbInfo"]=Ct).__name__=["albero","entity","ThumbInfo"],Ct.prototype={setAuth:function(e){this.auth=e},__class__:Ct},function(e){null!=e&&(this.width=e.width,this.height=e.height)}),f=((t["albero.entity.ThumbDimension"]=no).__name__=["albero","entity","ThumbDimension"],no.createWithSize=function(e,t){var n=new no;return n.width=e,n.height=t,n},no.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:no},(t["albero.entity.UpdateDomainStampSettingEvent"]=kt).__name__=["albero","entity","UpdateDomainStampSettingEvent"],kt.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:kt},t["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL","SCHEDULE_MESSAGE"]}),E=(f.PROFILE_IMAGE=["PROFILE_IMAGE",0],f.PROFILE_IMAGE.toString=o,(f.PROFILE_IMAGE.__enum__=f).MESSAGE=["MESSAGE",1],f.MESSAGE.toString=o,(f.MESSAGE.__enum__=f).TALK_ICON=["TALK_ICON",2],f.TALK_ICON.toString=o,(f.TALK_ICON.__enum__=f).THUMBNAIL=["THUMBNAIL",3],f.THUMBNAIL.toString=o,(f.THUMBNAIL.__enum__=f).NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],f.NOTE_ATTACHMENT.toString=o,(f.NOTE_ATTACHMENT.__enum__=f).NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],f.NOTE_THUMBNAIL.toString=o,(f.NOTE_THUMBNAIL.__enum__=f).SCHEDULE_MESSAGE=["SCHEDULE_MESSAGE",6],f.SCHEDULE_MESSAGE.toString=o,(f.SCHEDULE_MESSAGE.__enum__=f).__empty_constructs__=[f.PROFILE_IMAGE,f.MESSAGE,f.TALK_ICON,f.THUMBNAIL,f.NOTE_ATTACHMENT,f.NOTE_THUMBNAIL,f.SCHEDULE_MESSAGE],(t["albero.entity.UploadUseTypeHelper"]=Rt).__name__=["albero","entity","UploadUseTypeHelper"],Rt.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;case 6:return 1}},(t["albero.entity.UserIdentifier"]=Ot).__name__=["albero","entity","UserIdentifier"],Ot.prototype={__class__:Ot},function(e,t){this.high=e,this.low=t}),io=((t["haxe._Int64.___Int64"]=E).__name__=["haxe","_Int64","___Int64"],E.prototype={__class__:E},(t["albero.entity.UserPresence"]=Ft).__name__=["albero","entity","UserPresence"],Ft.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;I.ucompare(t.low,e.low)<0&&(n--,n|=0);var t=new E(n,i),e=Ft.SIXTY_MINUTES,n=t.high-e.high|0;return 0==n&&(n=I.ucompare(t.low,e.low)),0<(t.high<0?e.high<0?n:-1:0<=e.high?n:1)?io.GT_60:(0==(e=t.high-(i=Ft.FIFTEEN_MINUTES).high|0)&&(e=I.ucompare(t.low,i.low)),0<(t.high<0?i.high<0?e:-1:0<=i.high?e:1)?io.LT_OR_EQ_60:io.LT_OR_EQ_15)},Ft.prototype={toState:function(e){var t=e,n=h.map(this.lastUsedAtOpt,function(e){return Ft.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return io.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;I.ucompare(e.low,n.low)<0&&(i--,i|=0);e=new E(i,r),n=e.high-t.high|0;return 0==n&&(n=I.ucompare(e.low,t.low)),0<(e.high<0?t.high<0?n:-1:0<=t.high?n:1)},__class__:Ft},t["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]}),ro=(io.LT_OR_EQ_15=["LT_OR_EQ_15",0],io.LT_OR_EQ_15.toString=o,(io.LT_OR_EQ_15.__enum__=io).LT_OR_EQ_60=["LT_OR_EQ_60",1],io.LT_OR_EQ_60.toString=o,(io.LT_OR_EQ_60.__enum__=io).GT_60=["GT_60",2],io.GT_60.toString=o,(io.GT_60.__enum__=io).__empty_constructs__=[io.LT_OR_EQ_15,io.LT_OR_EQ_60,io.GT_60],(t["albero.entity.api.message.AddFavoriteMessageResult"]=Ut).__name__=["albero","entity","api","message","AddFavoriteMessageResult"],Ut.prototype={__class__:Ut},(t["albero.entity.api.message.DeleteFavoriteMessageResult"]=xt).__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],xt.prototype={__class__:xt},(t["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=Lt).__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],Lt.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:Lt},(t["albero.entity.api.message.GetScheduledMessagesResultWithParams"]=Pt).__name__=["albero","entity","api","message","GetScheduledMessagesResultWithParams"],Pt.prototype={__class__:Pt},(t["albero.entity.api.message.SearchMessagesAroundDateTimeResult"]=Bt).__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],Bt.prototype={__class__:Bt},function(e){this.messageId=e.message_id,this.createdAt=e.created_at}),oo=((t["albero.entity.api.message.MessageCreatedAt"]=ro).__name__=["albero","entity","api","message","MessageCreatedAt"],ro.prototype={__class__:ro},(t["albero.entity.api.note.CompressedNote"]=Ht).__name__=["albero","entity","api","note","CompressedNote"],Ht.prototype={uncompress:function(){var n=this,e=this.getCompressedContentRaw();return(new ie).run(e).then(function(e){var t=U.copy(n.noteRaw.note_revision),e=(t.content=e,U.copy(n.noteRaw));return e.note_revision=t,e})},getCompressedContentRaw:function(){return null==this.noteRaw||null==this.noteRaw.note_revision?null:this.noteRaw.note_revision.content},__class__:Ht},(t["albero.entity.api.note.CreateNoteError"]=Gt).__name__=["albero","entity","api","note","CreateNoteError"],Gt.prototype={__class__:Gt},(t["albero.entity.api.note.CreateNoteResult"]=zt).__name__=["albero","entity","api","note","CreateNoteResult"],zt.prototype={updateWithEmitterKey:function(e){var t=new zt;return t.note=this.note,t.emitterKey=e,t},__class__:zt},(t["albero.entity.api.note.CreateNoteResultCompressed"]=Yt).__name__=["albero","entity","api","note","CreateNoteResultCompressed"],Yt.prototype={uncompress:function(){return this.compressedNote.uncompress().then(function(e){return new zt(e)})},__class__:Yt},(t["albero.entity.api.note.DeleteNoteResult"]=Wt).__name__=["albero","entity","api","note","DeleteNoteResult"],Wt.prototype={__class__:Wt},(t["albero.entity.api.note.GetNoteResult"]=Kt).__name__=["albero","entity","api","note","GetNoteResult"],Kt.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__:Kt},(t["albero.entity.api.note.GetNoteResultCompressed"]=jt).__name__=["albero","entity","api","note","GetNoteResultCompressed"],jt.prototype={uncompress:function(){return this.compressedNote.uncompress().then(function(e){return new Kt(e)})},__class__:jt},(t["albero.entity.api.note.GetNoteStatusesResult"]=Vt).__name__=["albero","entity","api","note","GetNoteStatusesResult"],Vt.prototype={isNotEmptyNoteStatuses:function(){return 0>2)))+P.string(a.charAt(63&(s<<4|l>>4))))+P.string(a.charAt(63&(l<<2|u>>6))))+P.string(a.charAt(63&u));i==r?(e=n.b[i++],t=n.b[i++],o=(o=(o+=P.string(a.charAt(e>>2)))+P.string(a.charAt(63&(e<<4|t>>4))))+P.string(a.charAt(t<<2&63))):i==1+r&&(e=n.b[i++],o=(o+=P.string(a.charAt(e>>2)))+P.string(a.charAt(e<<4&63)));var c=o;switch(c.length%4){case 2:c+="==";break;case 3:c+="="}return c},Nn.decode=function(e){for(var t,n=e.length-1,n=("="==e.charAt(n)&&("="==e.charAt(n-1)&&--n,e=L.substr(e,0,n)),e.length),i=e,r=Nn.CODES,o=(null==r&&(r=Nn.initCodes(),Nn.CODES=r),0),e=3&n,a=o+(n-e),s=new Pa(new Ds(3*(n>>2)+(2<=e?e-1:0))),l=0;o>4),r[i.charCodeAt(o++)]),c=(s.b[l++]=255&(c<<4|u>>2),r[i.charCodeAt(o++)]);s.b[l++]=255&(u<<6|c)}return 2<=e&&(n=r[i.charCodeAt(o++)],t=r[i.charCodeAt(o++)],s.b[l++]=255&(n<<2|t>>4),3==e)&&(n=r[i.charCodeAt(o++)],s.b[l++]=255&(t<<4|n>>2)),s},(t["albero.js.KatakanaToRoman"]=An).__name__=["albero","js","KatakanaToRoman"],An.assureConvertTable=function(){return null==An.convertTable&&(An.convertTable=new B,C.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=An.convertTable,n=e[0],e=e[1];null!=W[n]?t.setReserved(n,e):t.h[n]=e})),An.convertTable},An.matchNext=function(e,t){var n=An.assureConvertTable();if(t+1=Co.HIRAGANA_SMALL_A&&a<=Co.HIRAGANA_NN&&(n=(n+=e.substring(t,o))+String.fromCharCode(a+(Co.KATAKANA_SMALL_A-Co.HIRAGANA_SMALL_A)),t=1+o)}return n+=e.substring(t,e.length)},Co.katakanaToRoman=function(e){return(new An).convert(e)},Co.normalize=function(e){return new ko(null).normalize(e)},Co.normalizeForFile=function(e){return new ko(null).normalizeForFile(e)},Co.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")},function(e){this.beforeTask=null,this.beforeTask=e}),Ro=((t["albero.js.Normalizer"]=ko).__name__=["albero","js","Normalizer"],ko.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof H&&(e=e.val),F._e("["+L.dateStr(new Date)+"] ","invalid character:",e,"","",""),p.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof H&&(e=e.val),F._e("["+L.dateStr(new Date)+"] ","invalid character:",e,"","",""),p.localize("TextCanonicalizer.invalid")}},__class__:ko},(t["albero.js.WebSocket"]=Cn).__name__=["albero","js","WebSocket"],Cn.prototype={__class__:Cn},(t["albero.js.WebSocketFactory"]=kn).__name__=["albero","js","WebSocketFactory"],kn.newInstance=function(e,t){return new Ro(e,t)},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),Ns.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=Y(this,this.onOpen),this.ws.onmessage=Y(this,this.onMessage),this.ws.onerror=Y(this,this.onError),this.ws.onclose=Y(this,this.onClose)}),Oo=((t["albero.js.WebSocketForBrowser"]=Ro).__name__=["albero","js","WebSocketForBrowser"],Ro.__interfaces__=[Cn],Ro.prototype={onOpen:function(e){F._i("["+L.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){var t;null!=this.onmessage&&(t=null,t=this.getBinaryData(e),this.onmessage(t))},getBinaryData:function(e){return Ns.websocketsbinary?Pa.ofData(new Cs(e.data)):Nn.decode(e.data)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){F._e("["+L.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+P.string(e.code)+" "+P.string(e.reason)+" "+P.string(e.wasClean);F._i("["+L.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){Ns.websocketsbinary?this.ws.send(new Cs(e.b.bufferValue).buffer):this.ws.send(Nn.encode(e))},ping:function(e){this.send(new Pa(new Ds(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Ro},(t["puremvc.interfaces.IProxy"]=Rn).__name__=["puremvc","interfaces","IProxy"],Rn.prototype={__class__:Rn},(t["albero.proxy.AccessTokenResolverProxy"]=On).__name__=["albero","proxy","AccessTokenResolverProxy"],On.__interfaces__=[Rn],On.prototype={__class__:On},function(){}),Fo=((t["albero.proxy.AccessTokenResolverProxyFactory"]=Oo).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Oo.newInstance=function(){return new Fo("accessTokenResolver")},(t["puremvc.patterns.proxy.Proxy"]=i).__name__=["puremvc","patterns","proxy","Proxy"],i.__interfaces__=[Rn],i.__super__=ue,i.prototype=e(ue.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:i}),function(e){i.call(this,e)}),Uo=((t["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Fo).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Fo.__interfaces__=[On],Fo.__super__=i,Fo.prototype=e(i.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();null!=n?t(n):null!=(n=null!=As.account?As.account.split(":"):null)&&2==n.length&&this.api.createAccessToken(n[0],n[1],t)},__class__:Fo}),function(){i.call(this,"broadcast")}),xo=((t["albero.proxy.AlberoBroadcastProxy"]=Uo).__name__=["albero","proxy","AlberoBroadcastProxy"],Uo.__super__=i,Uo.prototype=e(i.prototype,{handleNotification:function(e,t){var n=this;switch(e){case"notify_add_account_control_request":var i=new me(t);this.dataStore.setAccountControlRequest(i),this.sendNotification(e,i);break;case"notify_add_acquaintance":var i=new He(t[1]);this.dataStore.addAcquaintance(i),this.sendNotification(e,i);break;case"notify_add_acquaintances":i=t[1].map(function(e){return new He(e)});C.iter(i,Y(z=this.dataStore,z.addAcquaintance)),this.api.sendAddAcquaintanceNotifications(i),this.sendNotification(e,i);break;case"notify_add_domain_invite":i=new Pe(t);this.dataStore.setDomainInvite(i),this.sendNotification(e,i);break;case"notify_add_favorite_message":i=new sn(t);this.dataStore.addFavoriteMessage(i),this.sendNotification(e,i);break;case"notify_add_favorite_talk":i=new Ye(t);this.updateTalkStatusByFavoriteTalkEvent(i),this.sendNotification(e,i);break;case"notify_add_friend":i=new He(t[1]);this.dataStore.addFriend(i),this.sendNotification(e,i);break;case"notify_add_talkers":i=new Xr(t);null==this.dataStore.getTalk(i.id)&&this.sendNotification("notify_add_talkers_including_me",i),this.dataStore.setTalk(i),this.sendNotification(e,i);break;case"notify_close_conference":i=new Ee(t);this.dataStore.removeConference(i),this.updateTalkStatusByConferenceClosedEvent(i),this.sendNotification(e,i);break;case"notify_conference_participant_join":var i=t[3],r=t[4],o=this.dataStore;null!=o.me&&null!=(o=o.me.id)&&null!=r&&o.high==r.high&&o.low==r.low&&this.dataStore.addReactedConfereceId(i),this.sendNotification(e,t);break;case"notify_conference_participant_reject":var o=t[3];this.dataStore.addReactedConfereceId(o),this.sendNotification(e,t);break;case"notify_create_announcement":var r=new ge(t);this.dataStore.setAnnouncement(r),this.keywordWatcher.onAnnouncementCreated(r),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(r)),this.sendNotification(e,r);break;case"notify_create_message":var a=new O(t),i=(this.dataStore.setMessage(a),this.keywordWatcher.onMessageCreated(a),this.newTalkStatusByMessage(a));switch(null!=i&&this.sendNotification("notify_update_local_talk_status",i),a.type[1]){case 0:var s=a.content,l=null;switch(s.type){case"delete_talker":l=s.deleted_user_id;break;case"hide_pair_talk":l=s.user_id}if(null==l)return void this.sendNotification(e,a);for(var u=a.talkId,c=this.dataStore.getQuestions(u,l),_=0;_t.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t,n=this.dataStore.getTalkStatus(e.talkId);null!=n&&null!=n.maxMessage&&(t=n.maxMessage.id,e=e.messageId,null!=t)&&null!=e&&t.high==e.high&&t.low==e.low&&(n.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(n))},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 F._e("["+L.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(t=new bt).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 bt).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),n=(null==t&&((t=new bt).id=e.talkId),this.dataStore),i=e.userId;return n=null!=n.me&&null!=(n=n.me.id)&&null!=i&&n.high==i.high&&n.low==i.low,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,n=this;return C.exists(e.readUserIds,function(e){var t=n.dataStore;return null!=t.me&&null!=(t=t.me.id)&&null!=e&&t.high==e.high&&t.low==e.low})?null==(t=this.dataStore.getTalkStatus(e.talkId))?(F._e("["+L.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(t.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(t),t):null},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new Se).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=Se.fromDomainId(e),this.dataStore.setAnnouncementStatus(t)),t},__class__:Uo}),function(){i.call(this,"api")}),Lo=((t["albero.proxy.AlberoServiceProxy"]=xo).__name__=["albero","proxy","AlberoServiceProxy"],xo.__super__=i,xo.prototype=e(i.prototype,{getOSString:function(){return"bot"},createAccessToken:function(e,t,n){function i(e){o.settings.setAccessToken(e),n(e)}function r(e){o.sendNotification("Url",Zi.FORWARD(u.error))}var o=this,a=e.split("$"),s=this.settings.getOs(),l=this.settings.getIDFV();(-1==e.indexOf("@")&&2==a.length?this.wsApi.createAccessTokenById(a[1],a[0],t,l,s):this.wsApi.createAccessToken(e,t,l,s)).then(i,r)},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,n){var i=this;this.apiCaller.onSessionClear(),this.wsApi.createSession(e,"1.128",null).then(function(e){var t=X.nowAsInt64();e.passwordExpiration.isExpired(t)?i.sendNotification("password_expiration_overed"):(e.passwordExpiration.needWarning(t,i.settings.getPasswordWarningSkipUntil())&&(i.settings.setPasswordWarningSkipUntil(X.oneDayAfterAsInt64()),i.sendNotification("password_expiration_warned")),i.apiCaller.onSessionCreated(),n(e),i.apiCaller.fireCallbacksWaitingForSession())},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void i.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void i.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void i.sendNotification("Device",gi.AUTHORIZE);(400==e.code&&"older version specified"==e.message||401==e.code&&"bad token"==e.message||401==e.code&&"invalid token"==e.message)&&i.settings.clearAccessToken(),i.apiCaller.handleServerErrorDefault(e)}i.sendNotification("Url",Zi.FORWARD(u.error))})},startNotification:function(){var t=this;this.wsApi.startNotification().then(function(e){e||(t.dataStore.clear(!0),t.sendNotification("start_notification_failed"))},function(e){t.apiCaller.handleServerErrorDefault(e)})},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=n.length||(e=n[i],r=t.id,o=this.dataFactory.newDummyMessage(r,e.type,e.content),this.sendNotification("create_message_start",o),this.wsApi.createMessage(r,e.type,e.content).then(function(e){a.dataStore.setMessage(e),a.sendNotification("create_message_complete",[e,o.id]),a.forwardMessages(t,n,i+1),a.dataStore.removeMessage(o.id)},function(e){var t;a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code?(t=ia.toLocalError(R.SendingMessageConflicted,e),a.sendNotification("error_occurred",t)):a.sendNotification("error_occurred",e)}))},deleteMessage:function(e,t){var n=this;this.wsApi.deleteMessage(e,t).then(function(e){},function(e){var t;null!=e&&((403!=e.code||"frozen domain"!=e.message)&&409==e.code&&"conflict"==e.message?(t=ia.toLocalError(R.DeletingMessageConflicted,e),n.sendNotification("error_occurred",t)):n.sendNotification("error_occurred",e))})},updateReadStatuses:function(n,i){var r=this;this.wsApi.updateReadStatuses(n,i).then(function(e){var t=r.dataStore.getTalkStatus(n);null!=t&&(t.updateByReadingMessagesFinished(i),r.sendNotification("notify_update_local_talk_status",t))},function(e){var t=r.dataStore.getTalkStatus(n);null!=t&&(t.updateByReadingMessagesCanceled(i),r.dataStore.setTalkStatus(t),r.sendNotification("notify_update_local_talk_status",t)),r.apiCaller.handleServerErrorDefault(e)})},searchMessagesAroundDateTime:function(e,t){return this.wsApi.searchMessagesAroundDateTime(e,t)},uploadV2:function(e,t,n,i){var r=this,o=on.toFileInfoDynamic(n),a=this.dataFactory.newDummyMessage(t,c.file,o);this.sendNotification("create_message_start",a),this.prepareMessageFileAsync(n,e,!1).then(function(e){r._createMessage(t,c.file,e,a,i).catch(function(e){})},function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i,r=this.dataStore.getTalk(e),t={file:t,thumb:null};null==r?(i=on.toFileInfoDynamic(t),e=this.dataFactory.newDummyMessage(e,c.file,i),i={code:400,message:"invalid talk_id (deleted talk)"},F._w("["+L.dateStr(new Date)+"] ","WARNING method: upload",i,"","",""),this.sendNotification("create_message_fail",[i,e],n)):this.uploadV2(r.domainId,r.id,t,n)},uploadMultiV2:function(e,t,n,i,r){var o=this,a=on.toFileInfoDynamicArray(i),s=this.dataFactory.newDummyMessage(t,c.textMultipleFile,{text:n,files:a});this.sendNotification("create_message_start",s),this.prepareMessageFilesAsync(e,n,i,!1).then(function(e){o._createMessage(t,c.textMultipleFile,e,s,r).catch(function(e){})},function(e){o.sendNotification("create_message_fail",[e,s],r)})},uploadMultiForHubot:function(e,t,n,i){var r,o=this.dataStore.getTalk(e),n=n.map(function(e){return{file:e,thumb:null}});null==o?(r=on.toFileInfoDynamicArray(n),e=this.dataFactory.newDummyMessage(e,c.textMultipleFile,{text:t,files:r}),r={code:400,message:"invalid talk_id (deleted talk)"},F._w("["+L.dateStr(new Date)+"] ","WARNING method: uploadMulti",r,"","",""),this.sendNotification("create_message_fail",[r,e],i)):this.uploadMultiV2(o.domainId,o.id,t,n,i)},validateFileName:function(t){var n=w.replace(t.name,"$","__");if(n==t.name)return t;try{return t.name=n,t}catch(e){var i=t.slice(0,t.size,t.type);return new File([i],n,{type:t.type})}},prepareMessageFilesAsync:function(n,t,i,r){for(var o=this,e=Promise.resolve([]),a=0;ae.version?n:(n=this.accountControlRequests,null!=W[t]?n.setReserved(t,e):n.h[t]=e,this.storage.setDirtyFlag(),e)},removeAccountControlRequest:function(e){e="_"+e.high+"_"+e.low;this.accountControlRequests.remove(e),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new B,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){var t,n,i;null!=this.accountControlGroup&&(n=this.accountControlGroup.id,t=e.id,null!=n)&&null!=t&&n.high==t.high&&n.low==t.low&&(null!=(n=e.group)&&this.accountControlGroup.group.versions.MAX_CONTENT_BYTES?{ok:!1,errorType:"limit",message:"Content length must be less than or equal to "+s.MAX_CONTENT_BYTES+" bytes, but the actual length is "+e.length+" bytes."}:Ms.validateXml(e)},s.hasPathField=function(e){return C.foreach(e,function(e){return!s.isStringNullOrEmpty(e.path)})},s.validateUpdateNoteInput=function(e,t){if(0==Object.keys(e).length)return Oa.Left("'update' function must not be called with no update fields.");if(null!=e.note_title){if("string"!=typeof e.note_title)return Oa.Left("'note_title' must be specified as String type.");if(0==e.note_title.length)return Oa.Left("'note_title' must not be empty.")}if(null!=e.note_content_type)return Oa.Left("'note_content_type' must not be specified. It cannot be changed.");if(null!=e.note_content){if("string"!=typeof e.note_content)return Oa.Left("'note_content' must be specified as String type.");if(0==e.note_content.length)return Oa.Left("'note_content' must not be empty.");if(t==hn.getValue(po.RICH_TEXT)){t=s.validateXmlContent(e);if(0===t[1])return Oa.Left(t[2])}}t=null;if(null!=e.note_attachments){if(!(e.note_attachments instanceof Array&&null==e.note_attachments.__enum__&&s.all(e.note_attachments,s.isValidAsAttachment)))return Oa.Left("'note_attachments' is an invalid value: "+JSON.stringify(e.note_attachments));t=s.toUpdateNoteAttachmentArray(e.note_attachments)}return Oa.Right({title:e.note_title,content:e.note_content,attachments:t})},s.isValidAsAttachment=function(e){return s.isStringNullOrEmpty(e.url)?!s.isStringNullOrEmpty(e.path):!s.isStringNullOrEmpty(e.id)&&!s.isStringNullOrEmpty(e.name)&&null!=e.content_size&&!s.isStringNullOrEmpty(e.content_type)},s.toUpdateNoteAttachmentArray=function(e){var n=Ea.parseInt64;return C.array(C.map(e,function(e){var t;return s.isStringNullOrEmpty(e.url)?ma.LocalFileAttachment(e):((t=null==e?null:JSON.parse(JSON.stringify(e))).id=n(e.id),ma.RemoteFileAttachment(t))}))},s.validateUpdateNoteOptions=function(e){var t={notify_talk_members_of_update:!0};if(null!=e&&null!=e.notify_talk_members_of_update){if("boolean"!=typeof e.notify_talk_members_of_update)return Oa.Left("'notify_talk_members_of_update' must be of Bool type.");t.notify_talk_members_of_update=e.notify_talk_members_of_update}return Oa.Right(t)},s.all=function(e,t){return C.foreach(e,t)},s.isStringNullOrEmpty=function(e){return null==e||0==e.length},s.prototype={__class__:s},(t["albero_cli.INotes"]=xn).__name__=["albero_cli","INotes"],xn.prototype={__class__:xn},function(e,t){this.delegate=e;e=null!=t?t:{max:24,interval:12e4};this.ratelimit=new N(e.max,e.interval)}),ga=((t["albero_cli.LimitedNotes"]=pa).__name__=["albero_cli","LimitedNotes"],pa.__interfaces__=[xn],pa.prototype={limit:function(e){return this.ratelimit.apply(e)},get:function(e){var t=this;return this.limit(function(){return t.delegate.get(e)})},update:function(e,t,n){var i=this;return this.limit(function(){return i.delegate.update(e,t,n)})},delete:function(e){var t=this;return this.limit(function(){return t.delegate.delete(e)})},validateXml:function(e){return this.delegate.validateXml(e)},on:function(e,t){return this.delegate.on(e,t)},off:function(e,t){return this.delegate.off(e,t)},__class__:pa},function(e,t,n){this.utils=e,this.api=t,this.fileService=n}),Sa=((t["albero_cli.Notes"]=ga).__name__=["albero_cli","Notes"],ga.__interfaces__=[xn],ga.prototype={toNoteId:function(e){return new go(this.utils.parseInt64(e.id))},handleResponse:function(n,i,r){return function(e,t){null!=e?(e=Ta.of(e),i(e)):(e=r(t),n(e))}},get:function(e){var i=this,r=this.toNoteId(e);return new Promise(function(e,t){var n=i.api,e=i.handleResponse(e,t,Aa.of);n.getNote(r,e)})},update:function(e,t,n){var i=s.validateUpdateNoteInput(t,e.noteRevision.contentType);switch(i[1]){case 0:return Promise.reject(Ta.createInvalidParameterError(i[2]));case 1:var r=i[2],o=s.validateUpdateNoteOptions(n);switch(o[1]){case 0:return Promise.reject(Ta.createInvalidParameterError(o[2]));case 1:return this.updateNote(e,r,o[2])}}},delete:function(e){var i=this,r=this.toNoteId(e);return new Promise(function(e,t){var n=i.api,e=i.handleResponse(e,t,Na.of);n.deleteNote(r,e)})},updateNote:function(e,t,n){var r=this,i=e.talkId_i64,o=new go(e.id_i64),a=this.mergeNoteObject(e,t),s=this.createNoteLocalEdit(i,o,a,null),l=n.notify_talk_members_of_update;return new Promise(function(e,t){var n=r.api,i=a.currentRevision,e=r.handleResponse(e,t,ba.of);n.updateNoteV2(o,i,s,l,e)})},mergeNoteObject:function(e,t){e={title:e.noteRevision.title,contentType:e.noteRevision.contentType,content:e.noteRevision.contentText,attachments:s.toUpdateNoteAttachmentArray(e.get_attachments()),currentRevision:e.noteRevision.revision};return null!=t.title&&(e.title=t.title),null!=t.content&&(e.content=t.content),null!=t.attachments&&(e.attachments=t.attachments),e},createNoteLocalEdit:function(e,t,n,i){var r=this.createNoteAttachmentFileInfoList(n.attachments),o=n.contentType==hn.getValue(po.RICH_TEXT);return new So(e,t,n.title,n.content,r,i,null,o)},createNoteAttachmentFileInfoList:function(e){for(var t=[],n=0;n>>31,t.low<<1);if(s=new E(s.high<<1|s.low>>>31,s.low<<1),0<=l)break}for(;;){var u=new E(0,0);if(s.high==u.high&&s.low==u.low)break;var c,u=I.ucompare(n.high,t.high);0<=(0!=u?u:I.ucompare(n.low,t.low))&&(a=new E(a.high|s.high,a.low|s.low),u=n.high-t.high|0,c=n.low-t.low|0,I.ucompare(n.low,t.low)<0&&(u--,u|=0),n=new E(u,c)),s=new E(s.high>>>1,s.high<<31|s.low>>>1);t=new E(t.high>>>1,t.high<<31|t.low>>>1)}return i&&(o=~a.high,0==(r=-a.low)&&(o++,o|=0),a=new E(o,r)),e.high<0&&(i=~n.high,0==(o=-n.low)&&(i++,i|=0),n=new E(i,o)),{quotient:a,modulus:n}},function(){}),Ca=((t["haxe.Int64Helper"]=Da).__name__=["haxe","Int64Helper"],Da.parseString=function(e){for(var t=new E(0,10),n=new E(0,0),i=new E(0,1),r=!1,o=w.trim(e),a=("-"==o.charAt(0)&&(r=!0,o=o.substring(1,o.length)),o.length),s=0,l=a;s>31,u);if(r){var c=65535&i.low,_=i.low>>>16,h=65535&u.low,d=u.low>>>16,f=I._mul(c,h),h=I._mul(_,h),c=I._mul(c,d),_=(I._mul(_,d)+(c>>>16)|0)+(h>>>16)|0,f=(c<<=16,I.ucompare(d=f+c|0,c)<0&&(_++,_|=0),h<<=16,I.ucompare(d=d+h|0,h)<0&&(_++,_|=0),_=_+(I._mul(i.low,u.high)+I._mul(i.high,u.low)|0)|0,new E(_,d)),c=n.high-f.high|0,h=n.low-f.low|0;if(I.ucompare(n.low,f.low)<0&&(c--,c|=0),!((n=new E(c,h)).high<0))throw new H("NumberFormatError: Underflow")}else{var _=65535&i.low,d=i.low>>>16,f=65535&u.low,c=u.low>>>16,h=I._mul(_,f),m=I._mul(d,f),p=I._mul(_,c),g=(I._mul(d,c)+(p>>>16)|0)+(m>>>16)|0,p=(p<<=16,I.ucompare(S=h+p|0,p)<0&&(g++,g|=0),m<<=16,I.ucompare(S=S+m|0,m)<0&&(g++,g|=0),g=g+(I._mul(i.low,u.high)+I._mul(i.high,u.low)|0)|0,new E(g,S)),m=n.high+p.high|0,u=n.low+p.low|0;if(I.ucompare(u,n.low)<0&&(m++,m|=0),(n=new E(m,u)).high<0)throw new H("NumberFormatError: Overflow")}var g=65535&i.low,S=i.low>>>16,p=65535&t.low,m=t.low>>>16,u=I._mul(g,p),y=I._mul(S,p),v=I._mul(g,m),T=(I._mul(S,m)+(v>>>16)|0)+(y>>>16)|0,T=(v<<=16,I.ucompare(u=u+v|0,v)<0&&(T++,T|=0),y<<=16,I.ucompare(u=u+y|0,y)<0&&(T++,T|=0),T+(I._mul(i.low,t.high)+I._mul(i.high,t.low)|0)|0),i=new E(T,u)}return n},function(){this.buf=new A,this.cache=[],this.useCache=Ca.USE_CACHE,this.useEnumIndex=Ca.USE_ENUM_INDEX,this.shash=new B,this.scount=0}),ka=((t["haxe.Serializer"]=Ca).__name__=["haxe","Serializer"],Ca.run=function(e){var t=new Ca;return t.serialize(e),t.toString()},Ca.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t,n=this.shash,n=null!=W[e]?n.getReserved(e):n.h[e];null!=n?(this.buf.b+="R",this.buf.b+=null==n?"null":""+n):(n=this.shash,t=this.scount++,null!=W[e]?n.setReserved(e,t):n.h[e]=t,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=P.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e)},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(N[63&(D<<4|C>>4)]),this.buf.b+=String.fromCharCode(N[63&(C<<2|k>>6)]),this.buf.b+=String.fromCharCode(N[63&k])}E==I?(l=w.b[E++],T=w.b[E++],this.buf.b+=String.fromCharCode(N[l>>2]),this.buf.b+=String.fromCharCode(N[63&(l<<4|T>>4)]),this.buf.b+=String.fromCharCode(N[T<<2&63])):E==1+I&&(l=w.b[E++],this.buf.b+=String.fromCharCode(N[l>>2]),this.buf.b+=String.fromCharCode(N[l<<4&63]));break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(x.getClassName(i)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(x.getClassName(i)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:n=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=P.string(this.useEnumIndex?"j":"w"),this.serializeString(x.getEnumName(n)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=P.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";for(var n=e.length,R=(this.buf.b+=P.string(n-2),2),O=n;R=(null==(r=e.right)?0:r._height)?new Ra(e.left,e.key,e.value,new Ra(e.right,t,n,i)):new Ra(new Ra(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Ra(e.right.right,t,n,i)):o+2(null==(r=i.left)?0:r._height)?new Ra(new Ra(e,t,n,i.left),i.key,i.value,i.right):new Ra(new Ra(e,t,n,i.left.left),i.left.key,i.left.value,new Ra(i.left.right,i.key,i.value,i.right)):new Ra(e,t,n,i,(a(null==t?0:t._height)?null==(n=this.left)?0:n._height:null==(i=this.right)?0:i._height,this._height=e+1):this._height=r}),Oa=((t["haxe.ds.TreeNode"]=Ra).__name__=["haxe","ds","TreeNode"],Ra.prototype={__class__:Ra},t["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]}),Fa=(Oa.Left=function(e){e=["Left",0,e];return e.__enum__=Oa,e.toString=o,e},Oa.Right=function(e){e=["Right",1,e];return e.__enum__=Oa,e.toString=o,e},Oa.__empty_constructs__=[],function(){Gn.call(this)}),Ua=((t["haxe.ds.EnumValueMap"]=Fa).__name__=["haxe","ds","EnumValueMap"],Fa.__interfaces__=[Hn],Fa.__super__=Gn,Fa.prototype=e(Gn.prototype,{compare:function(e,t){var n=e[1]-t[1];return 0!=n?n:(n=e.slice(2),e=t.slice(2),0==n.length&&0==e.length?0:this.compareArgs(n,e))},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new Pa(new Cs(t).buffer)},Pa.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Pa(e)},Pa.fastGet=function(e,t){return e.bytes[t]},Pa.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new H(Ha.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,o=e,a=e+t;o>10)))+r(1023&s|56320)}return n},toString:function(){return this.getString(0,this.length)},__class__:Pa},(t["haxe.io.BytesBuffer"]=zn).__name__=["haxe","io","BytesBuffer"],zn.prototype={getBytes:function(){var e=new Pa(new Cs(this.b).buffer);return this.b=null,e},__class__:zn},(t["haxe.io.Input"]=Yn).__name__=["haxe","io","Input"],Yn.prototype={readByte:function(){throw new H("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||e.lengthe.length)throw new H(Ha.OutsideBounds);if(0==this.len&&0e.length)throw new H(Ha.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:Kn},(t["haxe.io.BytesOutput"]=jn).__name__=["haxe","io","BytesOutput"],jn.__super__=Kn,jn.prototype=e(Kn.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 H(Ha.OutsideBounds);i.b;for(var r=e.b,o=t,a=t+n;o>>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)},Ga.floatToI32=function(e){var t,n;return 0==e?0:(n=e<0?-e:e,(t=Math.floor(Math.log(n)/.6931471805599453))<-127?t=-127:128>20&2047)-1023,e=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==e&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*e)*Math.pow(2,n)},Ga.doubleToI64=function(e){var t,n,i,r=Ga.i64tmp;return 0==e?(r.low=0,r.high=0):isFinite(e)?(n=e<0?-e:e,t=Math.floor(Math.log(n)/.6931471805599453),i=(n=Math.round(4503599627370496*(n/Math.pow(2,t)-1)))/4294967296|0,r.low=0|n,r.high=(e<0?-2147483648:0)|t+1023<<20|i):0";var n=typeof e;switch(n="function"==n&&(e.__name__||e.__ename__)?"object":n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];for(var i=e[0]+"(",r=(t+="\t",2),o=e.length;rthis.byteLength)throw new H("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new H("set() outside of range");for(var s=0,l=a.length;st&&(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;throw TypeError("listener must be a function")},$a.prototype.once=function(e,t){var n;if(es(t))return n=!1,i.listener=t,this.on(e,i),this;throw TypeError("listener must be a function");function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}},$a.prototype.removeListener=function(e,t){var n,i,r,o;if(!es(t))throw TypeError("listener must be a function");if(this._events&&this._events[e])if(r=(n=this._events[e]).length,i=-1,n===t||es(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(ts(n)){for(o=r;0{for(var n in t)is(e,n,{get:t[n],enumerable:!0})})(bs={},{codePointCount:()=>ls,extractMentionParts:()=>fs,findMentionSuggestionHint:()=>ps,hasMentionPartForMeOrAll:()=>cs,invalidateManualMentionMarkup:()=>hs,parseMessageMention:()=>ds,removeMentionMarkup:()=>_s}),ss=e=>Array.from(e),ls=e=>ss(e).length,us=/{@:(ALL|\d+),(\d+)}@/g,cs=e=>fs(e).some(({userIdNumStr:e})=>null===e||"ALL"===e),_s=t=>ds(t).map(e=>"mention"===e.type?e.mentionText:"normal"===e.type?t.substring(e.start,e.end):"").join(""),hs=e=>e.replace(us,e=>e.substring(0,e.length-1)+" "),ds=e=>{let n=0;var t=fs(e).flatMap(e=>{var t=[];return n!==e.start&&t.push({type:"normal",start:n,end:e.start}),t.push(e),n=e.end,t});return e.length!==n&&t.push({type:"normal",start:n,end:e.length}),t},fs=o=>{let a=0;return Array.from(o.matchAll(us)).flatMap(e=>{var t,n,i,r=null!=(r=e.index)?r:0;return r{e=e.match(ms);return null===e?null:{prev:e[1],atMarks:e[2],keyword:e[3]}},bs=bs,((t,n,i,r)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let e of os(n))as.call(t,e)||e===i||is(t,e,{get:()=>n[e],enumerable:!(r=rs(n,e))||r.enumerable});return t})(is({},"__esModule",{value:!0}),bs)),S.exports),Ss=((String.prototype.__class__=t.String=String).__name__=["String"],(t.Array=Array).__name__=["Array"],(Date.prototype.__class__=t.Date=Date).__name__=["Date"],t.Int={__name__:["Int"]}),ys=t.Dynamic={__name__:["Dynamic"]},vs=t.Float=Number,Ts=(vs.__name__=["Float"],t.Bool=Boolean),ws=(Ts.__ename__=["Bool"],t.Class={__name__:["Class"]}),Es={};(Ii={exports:null}).exports={upload:function(e){var t=e.url,n=e.headers,i=e.data,r=e.files,o=e.complete,a=new FormData;for(s in i)i.hasOwnProperty(s)&&a.append(s,i[s]);for(s in r)r.hasOwnProperty(s)&&a.append(s,r[s]);var s,l=new XMLHttpRequest;for(s in l.open("POST",t,!0),n)n.hasOwnProperty(s)&&l.setRequestHeader(s,n[s]);return l.onload=function(e){4===l.readyState&&o(200===l.status,l)},l.onerror=function(e){o(!1,l)},l.send(a),l}};var Is=Ii.exports,Ns={websocketsbinary:!0,audio:!1},As={},bs={},Ms=(bs.exports=(()=>{var e=require("fs");let r=require("libxmljs");var t=require("path");let n=e=>e.namespace()?.href()??"",a=e=>`{${n(e)}}`+e.name();t=t.resolve(__dirname,"./note-richtext.v1.xsd"),e=r.parseXml(e.readFileSync(t,{encoding:"utf-8"}),{baseUrl:t});let i=new Map;function o(e){var t=Number(e.root().getAttribute("version")?.value()),n=i.get(t);return n?e.validate(n)?{ok:!0}:{ok:!1,errorType:"xsd",message:e.validationErrors.map(e=>e.message.trim()).join(" ")}:{ok:!1,errorType:"version",message:`The note version ${t} is not supported by this package. Please use one of the following values: `+Array.from(i.keys()).join(",")}}i.set(1,e);let s=new Map;function l(e){try{return function n(e,i,r){for(var o of e.childNodes())if("element"===o.type()){if(!i.includes(o.name()))throw new Error(`Element '${a(o)}': This element is not allowed at '${o.path()}'.`);{let t=r.get(o.name())??[],e=[...i].filter(e=>t.includes(e))??[];n(o,e,r)}}}(e.root(),s.get(e.root().name()),s),{ok:!0}}catch(e){return{ok:!1,errorType:"descendant",message:e.message}}}s.set("note",["textsize","color","b","link","u","strike","checkbox"]),s.set("textsize",["color","b","link","u","strike"]),s.set("color",["textsize","b","link","u","strike"]),s.set("b",["textsize","color","link","u","strike"]),s.set("link",["textsize","b","strike"]),s.set("u",["textsize","color","b","link","strike"]),s.set("strike",["textsize","color","b","link","u"]),s.set("checkbox",["color","b","link","u","strike"]);let u=e=>"element"===e.type(),c=e=>"element"===e.type()&&"checkbox"===e.name(),_=e=>"element"===e.type()&&"link"===e.name(),h=e=>"element"===e.type()&&["textsize","color","b","link","u","strike"].includes(e.name());function d(e,t,n,i){for(var r of e.childNodes())t(r)&&(n(r)&&i.push(r),d(r,t,n,i))}function f(e){var t=[];d(e.root(),u,_,t);try{for(var n of t){var i=n.text();if(null==i||""===i)throw new Error(`Element '${a(n)}': This element must not be empty. (element path: ${n.path()})`);if(/\r|\n/.test(i))throw new Error(`Element '${a(n)}': This element must not contain a new line. (element path: ${n.path()})`);var r=n.attrs().filter(e=>"url"===e.name())[0].value();if(!/^[\x20-\x7E]+$/.test(r))throw new Error(`Element '${a(n)}': The attribute 'url' must be URL-encoded or must be converted by Punycode if it's an IDN. (element path: ${n.path()})`)}return{ok:!0}}catch(e){return{ok:!1,errorType:"link",message:e.message}}}function m(e){var t=[];d(e.root(),u,c,t);try{for(var n of t)if(/\r|\n/.test(n.text()))throw new Error(`Element '${a(n)}': This element must not contain a new line. (element path: ${n.path()})`);return{ok:!0}}catch(e){return{ok:!1,errorType:"checkbox",message:e.message}}}function p(e){var t=[];d(e.root(),u,h,t);try{for(var n of t){var i=n.text();if(null==i||""===i)throw new Error(`Element '${a(n)}': This element must not be empty. (element path: ${n.path()})`)}return{ok:!0}}catch(e){return{ok:!1,errorType:"text-decorator",message:e.message}}}return{validateXml:function(e){let t;try{t=r.parseXml(e).doc()}catch(e){return{ok:!1,errorType:"parse",message:e.message}}let n={ok:!0};var i;for(i of[o,l,f,m,p])if(!(n=i(t)).ok)break;return n}}})(),bs.exports),W={},Ds=y.ArrayBuffer||Vn,Cs=(null==Ds.prototype.slice&&(Ds.prototype.slice=Vn.sliceImpl),y.Uint8Array||qn._new);l.APP_STATE_CHANGED="app_state_changed",l.ACCESS_TOKEN_CHANGED="access_token_changed",l.CURRENT_USER_CHANGED="current_user_changed",l.CONFIGURATION_CHANGED="configuration_changed",l.DOMAIN_SELECTION_CHANGED="domain_selection_changed",l.TALK_SELECTION_CHANGED="talk_selection_changed",l.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",l.USER_SELECTION_NEEDED="user_selection_needed",l.USER_SELECTION_CHANGED="user_selection_changed",l.FRIEND_SELECTION_NEEDED="friend_selection_needed",l.COMMON_STAMP_SET_LOADED="common_stamp_set_loaded",l.STAMP_SELECTION_STARTED="stamp_selection_started",l.STAMP_SELECTION_ENDED="stamp_selection_ended",l.STAMP_SELECTION_CHANGED="stamp_selection_changed",l.ACTION_SELECTION_CHANGED="action_selection_changed",l.CURRENT_PAGE_CHANGED="current_page_changed",l.CURRENT_PAGE_REASSIGNED="current_page_reassgined",l.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",l.NOTE_FILEINFO_SELECTION_CHANGED="note_fileinfo_selection_changed",l.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",l.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",l.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",l.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",l.CLOSE_FILEPREVIEW_MODAL="close_filepreview_modal",l.ERROR_OCCURRED="error_occurred",l.UNREAD_COUNT_CHANGED="brand_badge_changed",l.SEND_FORM_TOP_CHANGED="send_form_top_changed",l.SOLUTIONS_LOADED="solutions_loaded",l.RIGHT_PANE_OPENED="right_pane_opened",l.RIGHT_PANE_CLOSED="right_pane_closed",l.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",l.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",l.PHOTO_EDITOR_SAVED="photo_editor_saved",l.ICON_EDITOR_SAVED="icon_editor_saved",l.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",l.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",l.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",l.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",l.PRESENCES_UPDATED="presences_updated",l.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",l.START_NOTE_EDITING="start_note_editing",l.OPEN_EXISTING_PAIR_TALK_COMPLETED="open_existing_pair_talk_completed",l.FIRST_ROUTING_WILL_START="first_routing_will_start",l.SIGNED_OUT="signed_out",l.ROUTUNG_TALK_FALLBACK="routing_talk_fallback",l.ROUTUNG_DOMAIN_FALLBACK="routing_domain_fallback",l.TALKS_SORT_MODE_CHANGED="talks_sort_mode_changed",l.RESERVE_SCHEDULED_MESSAGE_EDITING="reserve_scheduled_message_editing",l.DATA_RECOVERING="data_recovering",l.DATA_RECOVERED="data_recovered",l.NOTIFY_UPDATE_USER="notify_update_user",l.NOTIFY_ADD_FRIEND="notify_add_friend",l.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",l.NOTIFY_ADD_ACQUAINTANCES="notify_add_acquaintances",l.NOTIFY_DELETE_FRIEND="notify_delete_friend",l.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",l.NOTIFY_DELETE_ACQUAINTANCES="notify_delete_acquaintances",l.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",l.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",l.GET_USERS_RESPONSED="get_users_responsed",l.GET_PROFILE_RESPONSED="get_profile_responsed",l.GET_PROFILE_ERRORED="get_profile_errored",l.UPDATE_USER_RESPONSED="update_user_responsed",l.UPDATE_USER_ERRORED="update_user_errored",l.UPDATE_PROFILE_RESPONSED="update_profile_responsed",l.UPDATE_PROFILE_ERRORED="update_profile_errored",l.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",l.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",l.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",l.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",l.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",l.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",l.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",l.GET_ME_RESPONSED="get_me_responsed",l.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",l.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",l.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",l.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",l.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",l.NOTIFY_JOIN_DOMAIN="notify_join_domain",l.NOTIFY_UPDATE_DOMAIN="notify_update_domain",l.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",l.NOTIFY_ADD_DOMAIN_MEMBERS="notify_add_domain_members",l.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",l.CREATE_PAIR_TALK_COMPLETE="create_pair_talk_complete",l.CREATE_PAIR_TALK_FAIL="create_pair_talk_fail",l.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",l.CREATE_GROUP_TALK_COMPLETE="create_group_talk_complete",l.CREATE_GROUP_TALK_FAIL="create_group_talk_fail",l.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",l.UPDATE_GROUP_TALK_COMPLETE="update_group_talk_complete",l.UPDATE_GROUP_TALK_FAIL="update_group_talk_fail",l.NOTIFY_ADD_TALKERS="notify_add_talkers",l.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",l.NOTIFY_DELETE_TALKER="notify_delete_talker",l.NOTIFY_DELETE_TALK="notify_delete_talk",l.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",l.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",l.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",l.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",l.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",l.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",l.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",l.ADD_TALKERS_SUCCEEDED="add_talkers_succeeded",l.ADD_TALKERS_FAILED="add_talkers_failed",l.NOTIFY_CREATE_MESSAGE="notify_create_message",l.NOTIFY_DELETE_MESSAGE="notify_delete_message",l.NOTIFY_GET_MESSAGES="notify_get_messages",l.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",l.CREATE_MESSAGE_START="create_message_start",l.CREATE_MESSAGE_COMPLETE="create_message_complete",l.CREATE_MESSAGE_FAIL="create_message_fail",l.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",l.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",l.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",l.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",l.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",l.NOTIFY_SCHEDULE_MESSAGE="notify_schedule_message",l.NOTIFY_PROCESSED_SCHEDULED_MESSAGE="notify_processed_scheduled_message",l.NOTIFY_DELETE_SCHEDULED_MESSAGE="notify_delete_scheduled_message",l.GET_SCHEDULED_MESSAGES_COMPLETED="get_scheduled_messages_completed",l.GET_SCHEDULED_MESSAGES_FAILED="get_scheduled_messages_failed",l.DELETE_SCHEDULED_MESSAGES_COMPLETED="delete_scheduled_messages_completed",l.SCHEDULE_MESSAGE_STARTED="schedule_message_started",l.SCHEDULE_MESSAGE_COMPLETED="schedule_message_completed",l.SCHEDULE_MESSAGE_FAILED="schedule_message_faileed",l.RESCHEDULE_MESSAGE_STARTED="reschedule_message_started",l.RESCHEDULE_MESSAGE_COMPLETED="reschedule_message_completed",l.RESCHEDULE_MESSAGE_FAILED="reschedule_message_failed",l.NOTIFY_UPDATE_MESSAGE_REACTIONS="notify_update_message_reactions",l.GET_MESSAGE_REACTION_SUMMARIES_COMPLETED="get_message_reaction_summaries_completed",l.GET_MESSAGE_REACTION_SUMMARIES_FAILED="get_message_reaction_summaries_failed",l.SET_MESSAGE_REACTION_COMPLETED="set_message_reaction_completed",l.SET_MESSAGE_REACTION_FAILED="set_message_reaction_failed",l.RESET_MESSAGE_REACTION_COMPLETED="reset_message_reaction_completed",l.RESET_MESSAGE_REACTION_FAILED="reset_message_reaction_failed",l.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",l.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",l.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",l.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",l.CREATE_ANNOUNCEMENT_START="create_announcement_start",l.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",l.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",l.NOTIFY_UPDATE_QUESTION="notify_update_question",l.NOTIFY_GET_QUESTIONS="get_questions_responsed",l.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",l.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",l.GET_FILE_RESPONSED="get_file_responsed",l.GET_FILE_PREVIEW="get_file_preview",l.CREATE_FILE_PREVIEW="create_file_preview",l.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",l.GET_NOTE_LOADED="get_note_loaded",l.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",l.CREATE_NOTE_COMPLETED="create_note_completed",l.CREATE_NOTE_FAILED="create_note_failed",l.UPDATE_NOTE_LOCAL_EDIT="update_note_local_edit",l.CLEAR_NOTE_LOCAL_EDIT="clear_note_local_edit",l.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",l.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",l.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",l.UPDATE_NOTE_SETTING_FAILED_BY_EDITING="update_note_setting_failed_by_editing",l.UPDATE_NOTE_COMPLETED="update_note_completed",l.DELETE_NOTE_COMPLETED="delete_note_completed",l.NOTIFY_CREATE_NOTE="notify_create_note",l.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",l.NOTIFY_DELETE_NOTE="notify_delete_note",l.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",l.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",l.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",l.NOTIFY_LOCK_NOTE="notify_lock_note",l.NOTIFY_UNLOCK_NOTE="notify_unlock_note",l.NOTIFY_SEARCH_MESSAGES="notify_search_messages",l.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",l.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",l.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",l.NOTIFY_SEARCH_PREPARE="notify_search_prepare",l.NOTIFY_SEARCH_CLEAR="notify_search_clear",l.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",l.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",l.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",l.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",l.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",l.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",l.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",l.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",l.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",l.JOIN_CONFERENCE_CANCELED="join_conference_canceled",l.GET_CONFERENCE_PARTICIPANTS_RESPONSED="get_conference_participants_responsed",l.NOTIFY_OPEN_CONFERENCE="notify_open_conference",l.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",l.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",l.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",l.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",l.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",l.NOTIFY_UPDATE_DOMAIN_STAMP_SETTING="notify_update_domain_stampsetting",l.NOTIFY_UPDATE_STAMPSET="notify_update_stampset",l.NOTIFY_DELETE_STAMPSET="notify_delete_stampset",l.NOTIFY_UPDATE_DOMAIN_BUILTIN_STAMP_SETTING="notify_update_domain_builtin_stampsetting",l.NOTIFY_FLOW_NOTIFICATION_BADGE="notify_flow_notification_badge",l.GET_FLOW_NOTIFICATION_BADGES_COMPLETED="get_flow_notification_badges_completed",l.GET_FLOW_NOTIFICATION_BADGES_FAILED="get_flow_notification_badges_failed",l.GET_DIRECT_APPS_COMPLETED="get_direct_apps_completed",l.GET_DIRECT_APPS_FAILED="get_direct_apps_failed",l.START_NOTIFICATION_FAILED="start_notification_failed",V.DEFAULT_RESOLVER=new j,V.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",_.accessMode=ui.Disabled,ae.ANNOUNCEMENTS_KEY="-1",hi.__meta__={fields:{api:{inject:null}}},hi.NAME="AccountControlRequest",fi.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},fi.NAME="Conference",pi.__meta__={fields:{api:{inject:null}}},pi.NAME="Device",Si.__meta__={fields:{api:{inject:null}}},Si.NAME="Domain",vi.__meta__={fields:{api:{inject:null}}},vi.NAME="File",wi.__meta__={fields:{api:{inject:null}}},wi.NAME="FilePreview",Ei.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ei.NAME="LoadStampset",Ai.__meta__={fields:{api:{inject:null}}},Ai.NAME="ManageFriends",bi.__meta__={fields:{api:{inject:null}}},bi.NAME="Message",Di.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},Di.NAME="MessageReaction",ki.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},ki.NAME="Note",Oi.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},Oi.NAME="Read",Ui.__meta__={fields:{api:{inject:null}}},Ui.NAME="ReloadData",Li.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},Li.NAME="ScheduleMessage",Bi.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},Bi.NAME="Search",Gi.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},Gi.NAME="SelectTalk",Yi.__meta__={fields:{api:{inject:null}}},Yi.NAME="Send",Wi.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},Wi.NAME="SignIn",Ki.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},Ki.NAME="SignOut",ji.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},ji.NAME="Talk",qi.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},qi.NAME="UpdateProfile",Xi.__meta__={fields:{api:{inject:null}}},Xi.NAME="UpdateUser",Qi.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Qi.NAME="UpdateUserPresences",Qi.MAX_USERS_PER_API=100,Ji.__meta__={fields:{routing:{inject:null}}},Ji.NAME="Url",Te.TalkAutoScrollDelay=1,Te.TalkAutoScrollImmediately=2,Te.TalkAutoScrollNone=3,Te.NotificationPopupTime5Sec=5,Te.TalksSortModeNewMessagesFirst="new_messages_first",Te.TalksSortModeUnreadMessagesFirst="unread_messages_first",Te.TalksSortModeOldMessagesFirst="old_messages_first",Te.DomainsSortModeNameOrderAsc="name_order_asc",Te.OLD_KEY_RIGHT_PANEL_OPENED="right_panel_opened",Te.OLD_KEY_RIGHT_PANEL_WIDTH="right_panel_width",Te.OLD_KEY_APP_LEFT_PANEL_OPENED="app_left_panel_opened",Te.NAME="browser_settings",rr.MAX_SIZE=72,Ee.INCOMING_TIME=6e4,Ne.DEFAULT_PRESENCE_EXPIRATION=3e5,Ne.DEFAULT_UPDATE_LAST_USED_AT_INTERVAL=6e5,or.DEFAULT_TTL=3600,or.DEFAULT_MAX_PARTICIPANTS=8,Sr.stagedFileInfosMaxId=0,Xe.TIMESTAMP_SHIFT=22,O.MAX_READ_USER_IDS_COUNT=16,dt.QUERY_DATE_TODAY="t",dt.QUERY_DATE_YESTERDAY="-1d",dt.QUERY_DATE_THREE_DAYS_BEFORE="-3d",jr.HISTORY_TAB_NAME="stamp-history",Ft.SIXTY_MINUTES=new E(0,36e5),Ft.FIFTEEN_MINUTES=new E(0,9e5),go.PREFIX="note-",go.nextDummyId=new E(-1,-1),fn.CONTINUE_MARGIN_RATE=.1,yn.CHEKBOX_UNCHECKED="- [ ] ",yn.CHEKBOX_CHECKED="- [x] ",Nn.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",An.TU_REG=new v("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),An.XTU_REG=new v("ッ","gm"),F.EMERGENCY=0,F.ALERT=1,F.CRITICAL=2,F.ERROR=3,F.WARNING=4,F.NOTICE=5,F.INFO=6,F.DEBUG=7,F.level=6,F._d=F._nop,F._i=null!=console?console.info.bind(console):F._nop,F._w=null!=console?console.warn.bind(console):F._nop,F._e=null!=console?console.error.bind(console):F._nop,Co.HIRAGANA_SMALL_A=12353,Co.HIRAGANA_NN=12435,Co.KATAKANA_SMALL_A=12449,Oo.NAME="accessTokenResolver",i.NAME="Proxy",Fo.__meta__={fields:{settings:{inject:null},api:{inject:null}}},Uo.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},keywordWatcher:{inject:null}}},Uo.NAME="broadcast",xo.__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}}},xo.NAME="api",xo.API_VERSION="1.128",xo.UPDATE_VERSION="1.128_0",xo.ACTIONS_COUNT_PER_API=20,Lo.__meta__={fields:{rpc:{inject:null}}},Lo.NAME="apiCaller",Lo.DELAY_FOR_DB_REPLICATION=500,Lo.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,Lo.API_TRY_COUNT=3,Po.__meta__={fields:{dataStore:{inject:null},settings:{inject:null},wsApi:{inject:null}}},Po.NAME="apiNote",Bo.NAME="appState",Ho.__meta__={fields:{dataStore:{inject:null}}},Ho.NAME="dataFactory",Go.NAME="dataStore",Go.STORAGE_KEY_FOR_GENERAL="dataStore",Go.STORAGE_KEY_FOR_TALKS="dataStoreTalks",Go.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",Go.STORAGE_KEY_FOR_USERS="dataStoreUsers",Go.TYPE_FRIEND=0,Go.TYPE_ACQUAINSTANCE=1,Go.TYPE_NONE=2,zo.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},zo.NAME="features",Wo.NAME="fileService",Ko.__meta__={fields:{settings:{inject:null}}},jo.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},jo.NAME="keywordWatcher",jo.TALK_KEY_PREFIX="talk_",jo.ANNOUNCEMENT_KEY_PREFIX="announcement_",Vo.TEMP_HALF_SPACE="&SPACE",Vo.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",Jo.__meta__={fields:{settings:{inject:null}}},Jo.NAME="lastUsedAtUpdater",Zo.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Zo.NAME="limitations",$o.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},$o.NAME="rpc",$o.lastMsgId=0,ea.PING_INTERVAL_ON_CONNECTED=45e3,oa.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},oa.NAME="readStatusUpdater",aa.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},aa.NAME="routing",ua.__meta__={fields:{settings:{inject:null}}},ua.NAME="searchService",ua.LOAD_SIZE=20,ua.DUMMY_VALUE_FOR_SET=1,ca.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},api:{inject:null}}},ca.NAME="session",_a.NAME="settings",_a.KEY_ACCESS_TOKEN="access_token",_a.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",_a.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",_a.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",_a.KEY_INPUT_TEXT="input_text",_a.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",_a.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",_a.KEY_SEARCH_HISTORIES="search_histories",_a.KEY_MULTI_VIEW_MODE="multi_view_mode",_a.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",_a.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",_a.KEY_IDFV="idfv",ha.__meta__={fields:{dataStore:{inject:null}}},ha.NAME="talksService",da.__meta__={fields:{dataStore:{inject:null}}},da.NAME="userPresences",fa.__meta__={fields:{apiCaller:{inject:null}}},fa.NAME="wsApi",s.MAX_CONTENT_BYTES=1e5,s.NOTE_EVENT_NAMES=["created","updated","deleted"],Sa.CONTENT_TYPE_XML="xml",Sa.CONTENT_TYPE_TEXT="text",Bn.NAME="Mediator",va.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},va.NAME="commandline",va.DATA_SAVE_SPAN=5e3,wa.INVALID_PARAMETER="INVALID_PARAMETER",wa.FORBIDDEN="FORBIDDEN",wa.NOT_FOUND="NOT_FOUND",wa.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",wa.CONFLICT="CONFLICT",wa.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",wa.CLIENT_UPGRADE_REQUIRED="CLIENT_UPGRADE_REQUIRED",wa.UNKNOWN="UNKNOWN",I._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},Ca.USE_CACHE=!1,Ca.USE_ENUM_INDEX=!1,Ca.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",xa.count=0,Ga.i64tmp=new E(0,0),G.__toStr={}.toString,qn.BYTES_PER_ELEMENT=1,Ka.FLOAT_SINGLE_MIN=1401298464324817e-60,Ka.FLOAT_SINGLE_MAX=34028234663852886e22,Ka.FLOAT_DOUBLE_MIN=5e-324,Ka.FLOAT_DOUBLE_MAX=17976931348623157e292,ti.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 io.__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 No};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&&(Go.host=e.host,Go.endpoint=e.endpoint,Go.accessToken=e.access_token,Go.proxyURL=e.proxyURL,Go.account=e.account,Go.talkWithBot=e.talkWithBot,Go.acceptableEventTimeDiff=e.acceptableEventTimeDiff),gr._d("["+s.dateStr(new Date)+"] ","current settings",Go,"","",""),null==Go.accessToken&&gr._e("["+s.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return Ea.parseInt64(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),Ea.stringifyInt64(e,t)},listen:function(){this.facade=E.getInstance(),this.api=io.__cast(this.facade.retrieveProxy("api"),Fr),this.data=io.__cast(this.facade.retrieveProxy("dataStore"),Lr),this.ID=new Ea;var e=io.__cast(this.facade.retrieveProxy("fileService"),Gr);this.notes=new fa(new ma(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 Ta.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 io.__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 S=function(){};n.StringTools=S,S.__name__=["StringTools"],S.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},S.startsWith=function(e,t){return e.length>=t.length&&s.substr(e,0,t.length)==t},S.isSpace=function(e,t){var n=s.cca(e,t);return n>8&&n<14||32==n},S.ltrim=function(e){for(var t=e.length,n=0;n0?s.substr(e,n,t-n):e},S.rtrim=function(e){for(var t=e.length,n=0;n0?s.substr(e,0,t-n):e},S.trim=function(e){return S.ltrim(S.rtrim(e))},S.replace=function(e,t,n){return e.split(t).join(n)},S.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():C.dateString(r,!1)},C.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()},C.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=C.dateString(r,!1);return t.getFullYear()==r.getFullYear()&&(a+=" "+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()),a},C.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()},C.datetimeString=function(e){if(null==e)return"";var t=parseFloat(Ma.toString(e)),n=new Date(t);return n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate()+" "+n.getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes()};var k=function(){};n["albero.FileDynamicHelper"]=k,k.__name__=["albero","FileDynamicHelper"],k.filterDeleted=function(e){return null==e?[]:e.filter(k.isNotDeleted)},k.isNotDeleted=function(e){return null==e.deleted||!e.deleted},k.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 M=function(){};n["albero.FileHelper"]=M,M.__name__=["albero","FileHelper"],M.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=Ma.divMod(e,i).quotient,a=new hi(0,0),o=r.high-a.high|0;if(o=0!=o?o:ka.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 Ma.toString(e)+" "+n.shift()+"B"},M.extractFilenameExceptExtension=function(e){return new o("\\.(?=[^.]+$)","").split(e)[0]};var O=function(){};n["albero.History"]=O,O.__name__=["albero","History"],O.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 hi(0,0),n=new hi(0,10),i=0,r=e.length;i>>16,u=65535&n.low,c=n.low>>>16,_=ka._mul(s,u),h=ka._mul(l,u),d=ka._mul(s,c),f=_,m=(ka._mul(l,c)+(d>>>16)|0)+(h>>>16)|0;if(f=f+(d<<=16)|0,ka.ucompare(f,d)<0){m++;m|=0}if(f=f+(h<<=16)|0,ka.ucompare(f,h)<0){m++;m|=0}m=m+(ka._mul(t.low,n.high)+ka._mul(t.high,n.low)|0)|0;var p=new hi(m,f),v=new hi(0,g.parseInt(e.charAt(a))),S=p.high+v.high|0,y=p.low+v.low|0;if(ka.ucompare(y,p.low)<0){S++;S|=0}t=new hi(S,y)}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 hi(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 Ma.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(ka.ucompare(i,e.low)<0){n++;n|=0}return new hi(n,i)},F.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(ka.ucompare(e.low,t.low)<0){n--;n|=0}return new hi(n,i)},F.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:ka.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 hi(g.parseInt(t[1]),g.parseInt(t[2])):null},F.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(ka.ucompare(e.low,t.low)<0){n--;n|=0}return new hi(n,i)},F.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(ka.ucompare(i,e.low)<0){n++;n|=0}return new hi(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 hn(d.id,f))}}}else{for(var w=[],T=(s.iter(n),0);T0&&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 Oe=function(){Q.call(this)};n["albero.command.UpdateUserCommand"]=Oe,Oe.__name__=["albero","command","UpdateUserCommand"],Oe.__super__=Q,Oe.prototype=r(Q.prototype,{execute:function(e){var t=e.getBody();if(null!=t.profileImage){var n=t.profileImage;if(!S.startsWith(n.type,"image/"))return}this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:Oe});var Fe=function(){Q.call(this)};n["albero.command.UpdateUserPresencesCommand"]=Fe,Fe.__name__=["albero","command","UpdateUserPresencesCommand"],Fe.__super__=Q,Fe.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=C.nowAsInt64(),i=this.settings.getConfiguration().presenceExpiration,r=new hi(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)},Ye.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 pr.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return pr.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return pr.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return pr.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 pr.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return pr.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return pr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return pr.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__:Ye};var Ke=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"]=Ke,Ke.__name__=["albero","entity","Announcement"],Ke.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 gr._e("["+s.dateStr(new Date)+"] ","Unsupported announcement.type is detected. announcment:%o",this,"","",""),qt.getUnsupportText()}},__class__:Ke};var We=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 Ke(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};n["albero.entity.AnnouncementStatus"]=We,We.__name__=["albero","entity","AnnouncementStatus"],We.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:ka.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(!je.isUnreadAnnouncementExisted(this))return!1;if(null==this.maxAnnouncementId)return!1;this.readAll()}else{var t=e.filter(Eo(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(U.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:ka.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:ka.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},__class__:We};var je=function(){};n["albero.entity.AnnouncementStatusHelper"]=je,je.__name__=["albero","entity","AnnouncementStatusHelper"],je.isUnreadAnnouncementExisted=function(e){return null!=e&&(null!=e.maxAnnouncement&&e.isUnread(e.maxAnnouncement.id))},je.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var Ve=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};n["albero.entity.AnnouncementStatusUpdate"]=Ve,Ve.__name__=["albero","entity","AnnouncementStatusUpdate"],Ve.prototype={__class__:Ve};var qe=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.notificationPopupTime=5,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,this.domainsSortMode="name_order_asc",this.appLeftPanelOpened=!1,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.notificationPopupTime&&(this.notificationPopupTime=e.notificationPopupTime),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=io.__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__:Xe};var Ze=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"]=Ze,Ze.__name__=["albero","entity","Conference"],Ze.prototype={isIncomingExpired:function(){var e=this.createdAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)+Ze.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__:Ze};var $e=function(){this.conferencesMap=new Wa,this.talkIdConferenceIdMap=new Wa};n["albero.entity.ConferenceStore"]=$e,$e.__name__=["albero","entity","ConferenceStore"],$e.prototype={addConference:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.conferencesMap;null!=Ho[n]?i.setReserved(n,e):i.h[n]=e;var r=e.talkId,a="_"+r.high+"_"+r.low,o=this.talkIdConferenceIdMap;null!=Ho[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!=Ho[r]?a.getReserved(r):a.h[r])==n&&this.talkIdConferenceIdMap.remove(r)},getConferences:function(){return x.toValueArray(this.conferencesMap)},getConference:function(e){var t="_"+e.high+"_"+e.low,n=this.conferencesMap;return null!=Ho[t]?n.getReserved(t):n.h[t]},hasConferenceInTalk:function(e){if(null!=e){var t="_"+e.high+"_"+e.low,n=this.talkIdConferenceIdMap;return null!=Ho[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!=Ho[t]?n.getReserved(t):n.h[t];return null==i?null:F.makeFromIdStr(i)},getConferenceTalkIds:function(){return x.toKeyArray(this.talkIdConferenceIdMap).map(F.makeFromIdStr)},hasConference:function(){return this.talkIdConferenceIdMap.keys().hasNext()},__class__:$e};var et=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:et.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Ye.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled)};n["albero.entity.Configuration"]=et,et.__name__=["albero","entity","Configuration"],et.prototype={__class__:et};var tt=function(e){this.contractConference=Ya.None,null!=e&&(this.id=e.contract_id,this.plan=new sn(e.plan),this.quota=new In(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=Ya.Some(new nt(e.conference))))};n["albero.entity.Contract"]=tt,tt.__name__=["albero","entity","Contract"],tt.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__:tt};var nt=function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=nt.DEFAULT_MAX_PARTICIPANTS,this.ttl=nt.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"]=nt,nt.__name__=["albero","entity","ContractConference"],nt.prototype={__class__:nt};var it=function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?at.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=it.getLabelRoot();break;case 2:this.name=it.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};n["albero.entity.Department"]=it,it.__name__=["albero","entity","Department"],it.getLabelFree=function(){return pr.localize("Department.label_free")},it.getLabelRoot=function(){return pr.localize("Department.label_root")},it.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==at.Root},isFree:function(){return this.nodeType==at.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return at.Root;case 2:return at.Free;default:return at.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(F.idStr)},__class__:it};var rt=function(){};n["albero.entity.DepartmentHelper"]=rt,rt.__name__=["albero","entity","DepartmentHelper"],rt.getName=function(e){return null==e?null:e.name};var at=n["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};at.Normal=["Normal",0],at.Normal.toString=i,at.Normal.__enum__=at,at.Root=["Root",1],at.Root.toString=i,at.Root.__enum__=at,at.Free=["Free",2],at.Free.toString=i,at.Free.__enum__=at,at.__empty_constructs__=[at.Normal,at.Root,at.Free];var ot=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};n["albero.entity.DepartmentList"]=ot,ot.__name__=["albero","entity","DepartmentList"],ot.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new it(e)})},__class__:ot};var st=function(){this.departmentMap=new Wa,this.rootDepartmentIdMap=new Wa};n["albero.entity.DepartmentStore"]=st,st.__name__=["albero","entity","DepartmentStore"],st.prototype={getDepartment:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.departmentMap;return null!=Ho[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!=Ho[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!=Ho[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!=Ho[t]?n.getReserved(t):n.h[t]},setRootDepartmentId:function(e,t){var n="_"+e.high+"_"+e.low,i=this.rootDepartmentIdMap;null!=Ho[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__:st};var lt=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};n["albero.entity.DepartmentUserCount"]=lt,lt.__name__=["albero","entity","DepartmentUserCount"],lt.prototype={__class__:lt};var ut=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};n["albero.entity.DepartmentUserCountList"]=ut,ut.__name__=["albero","entity","DepartmentUserCountList"],ut.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new lt(e)})},__class__:ut};var ct=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 Wa,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=Tr.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=Tr.canonicalizeForRoman(this.displayName);this.canonicalDisplayNameRoman,this.displayName}return this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(B.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=Tr.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1)},__class__:At});var bt=function(e){this.values=e};n["albero.entity.Domains"]=bt,bt.__name__=["albero","entity","Domains"],bt.prototype={orderByName:function(){var e=U.sortAndReturn(this.values.map(Dt.fromDomain),Dt.compare).map(Dt.toDomain);return new bt(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?Ya.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:ka.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:ka.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return Ya.Some(e)}},Ya.None)},getDirectAppsIds:function(){if(null==this.values||0==this.values.length)return[];var e=new Wa;return l.iter(this.values,function(t){l.iter(t.directAppsSetting.enabled,function(t){var n="_"+t.high+"_"+t.low;null!=Ho[n]?e.setReserved(n,t):e.h[n]=t})}),x.toValueArray(e)},__class__:bt};var Dt=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=Tr.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=B.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:B.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 kt(e.get_headers))};n["albero.entity.DownloadAuth"]=Ct,Ct.__name__=["albero","entity","DownloadAuth"],Ct.prototype={__class__:Ct};var kt=function(e){this.rawData=e};n["albero.entity.DownloadAuthHeaders"]=kt,kt.__name__=["albero","entity","DownloadAuthHeaders"],kt.prototype={__class__:kt};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 Ot=function(e){this.uploadResult=Ft.NONE,this.preview=Ya.None,this.thumbnailDimension=Ya.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=Ya.None,this.deleted=null!=e.deleted&&e.deleted,this.previewSupported=null!=e.preview_supported&&e.preview_supported)};n["albero.entity.FileInfo"]=Ot,Ot.__name__=["albero","entity","FileInfo"],Ot.fromMessageAndFile=function(e,t){var n=new Ot;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?Ya.None:Ya.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},Ot.fromScheduledMessageFileContent=function(e){var t=new Ot;return t.id=e.file_id,t.name=e.name,t.contentType=e.content_type,t.contentSize=e.content_size,t.url=e.url,t.thumbUrl=e.thumbnail_url,t.thumbnailDimension=null==e.thumbnail_dimension?Ya.None:Ya.Some(new si(e.thumbnail_dimension)),t.deleted=null!=e.deleted&&e.deleted,t.file=e.file,t.localThumbInfo=e.localThumbInfo,t.previewSupported=e.preview_supported,t},Ot.fromMessageAndFileWithFileId=function(e,t,n){var i=Ot.fromMessageAndFile(e,t);return i.id=n,i},Ot.createUploadedFileInfo=function(e){var t=new Ot;return t.id=e.id,t.contentType=e.content_type,t.contentSize=e.content_size,t.url=e.url,t.name=e.name,t},Ot.createStagedFileInfo=function(e,t,n){var i=t,r=new Ot,a=new hi(0,--Ot.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},Ot.createStagedFileInfoFromDummyFile=function(e,t,n){var i=new Ot,r=new hi(0,--Ot.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},Ot.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 S.startsWith(this.contentType,"image/")},isImageGif:function(){return S.startsWith(this.contentType,"image/gif")},isImageJpeg:function(){return S.startsWith(this.contentType,"image/jpeg")},isPdf:function(){return S.startsWith(this.contentType,"application/pdf")},isVideo:function(){return S.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 gr._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__:Ot};var Ft=n["albero.entity.UploadResult"]={__ename__:["albero","entity","UploadResult"],__constructs__:["SUCCESS","FAILUER","NONE"]};Ft.SUCCESS=function(e){var t=["SUCCESS",0,e];return t.__enum__=Ft,t.toString=i,t},Ft.FAILUER=["FAILUER",1],Ft.FAILUER.toString=i,Ft.FAILUER.__enum__=Ft,Ft.NONE=["NONE",2],Ft.NONE.toString=i,Ft.NONE.__enum__=Ft,Ft.__empty_constructs__=[Ft.FAILUER,Ft.NONE];var Rt=function(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])};n["albero.entity.FileInfoDeletion"]=Rt,Rt.__name__=["albero","entity","FileInfoDeletion"],Rt.prototype={__class__:Rt};var Ut=function(){this.fileInfoMap=new Wa,this.fileIdStrsMap=new Wa,this.messageFileIdStrsMap=new Wa,this.noteFileIdStrsMap=new Wa,this.filePreviewMap=new Wa,this.scheduledMessageFileIdStrsMap=new Wa};n["albero.entity.FileInfoStore"]=Ut,Ut.__name__=["albero","entity","FileInfoStore"],Ut.prototype={ensureStagedFileInfos:function(e){return this.ensureStagedFileIdStrs(e).map(F.makeFromIdStr).filter(function(e){return null!=e}).map(Eo(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!=Ho[t]?n.getReserved(t):n.h[t];if(null==i){i=[];var r=this.fileIdStrsMap;null!=Ho[t]?r.setReserved(t,i):r.h[t]=i}return i},addStagedFileInfo:function(e,t,n,i){var r=Ot.createStagedFileInfo(e,n,i),a=r.id,o="_"+a.high+"_"+a.low,s=this.fileInfoMap;null!=Ho[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=Ot.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!=Ho[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!=Ho[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!=Ho[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(ka.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,pr.localize("MessageStringMaker.yes"),pr.localize("MessageStringMaker.no")].join(" ");case 14:return e&&null!=this.content.response?this.content.response?pr.localize("MessageStringMaker.yes"):pr.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,pr.localize("MessageStringMaker.achieve"),pr.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?pr.localize("MessageStringMaker.achieve"):pr.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForCompactMessage: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 pr.localize("Message.bookmark_label_deleted");case 8:return[pr.localize("Message.bookmark_label_note_shared"),new Pi(this.content).title].join(" ");case 10:return[pr.localize("Message.bookmark_label_note_created"),new Pi(this.content).title].join(" ");case 11:return[pr.localize("Message.bookmark_label_note_updated"),new Pi(this.content).title].join(" ");case 2:case 12:return null!=this.content.text&&this.content.text.length>0?[pr.localize("Message.bookmark_label_stamp"),this.content.text].join(" "):pr.localize("Message.bookmark_label_stamp");case 14:case 16:return[pr.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 13:case 15:return[pr.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 17:return[pr.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 18:return[this.content.done?pr.localize("Message.bookmark_label_completed"):pr.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 19:case 20:return[pr.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 21:return[pr.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 8:case 10:case 11:return new Pi(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 Li(this.content):null},getContentsForOriginalStamp:function(){return 12==this.type[1]?new Bi(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()},isAllowedToCopyLink:function(){return!(!this.isNotSystemMessage()||!this.isNotDeletedMessage())&&this.isNotStampMessageWithEmptyText()},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 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==Qt.text},isOpenConference:function(){return this.type==Qt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){var e=this.type;return gr._i("["+s.dateStr(new Date)+"] ",e,"","","",""),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?Ya.Some(this.content.in_reply_to):Ya.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=pr.localize("QuestionHelper.close_answer")+"\n";if(null==this.content.responses)t+="...";else{var n=this.content.responses,i=this.content.last_response;if(0==yn.closingTypeOf(this.content.closing_type)[1])t+=null!=i?pr.localize("QuestionHelper.last_response",{content:e(n[i].content),interpolation:{escapeValue:!1}}):pr.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+pr.localize("QuestionHelper.name")}).join("\n"):pr.localize("QuestionHelper.no_answer")}}return t},getTodoCloseResponse:function(){var e=pr.localize("QuestionHelper.close_task")+"\n";if(null==this.content.responses)e+="...";else{var t=this.content.responses,n=this.content.last_response;if(0==yn.closingTypeOf(this.content.closing_type)[1]){e+=null!=n&&"DONE"==t[n].content?pr.localize("QuestionHelper.achieve_task"):pr.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=io.__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=io.__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 Sn=n["albero.entity.QuestionClosingType"]={__ename__:["albero","entity","QuestionClosingType"],__constructs__:["any","all","unknown"]};Sn.any=["any",0],Sn.any.toString=i,Sn.any.__enum__=Sn,Sn.all=["all",1],Sn.all.toString=i,Sn.all.__enum__=Sn,Sn.unknown=["unknown",2],Sn.unknown.toString=i,Sn.unknown.__enum__=Sn,Sn.__empty_constructs__=[Sn.any,Sn.all,Sn.unknown];var yn=function(){};n["albero.entity.QuestionClosingTypeHelper"]=yn,yn.__name__=["albero","entity","QuestionClosingTypeHelper"],yn.closingTypeOf=function(e){switch(e){case 0:return Sn.any;case 1:return Sn.all;default:return Sn.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 F.contains(this.userIds,e)},__class__:wn};var Tn=function(){this.questions=new Wa};n["albero.entity.QuestionStore"]=Tn,Tn.__name__=["albero","entity","QuestionStore"],Tn.prototype={removeTalkQuestions:function(e){for(var t=this.getQuestions(e),n=0;n>>16,s=65535&t.low,l=t.low>>>16,u=ka._mul(a,s),c=ka._mul(o,s),_=ka._mul(a,l),h=u,d=(ka._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,ka.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,ka.ucompare(h,c)<0){d++;d|=0}d=d+(ka._mul(e.low,t.high)+ka._mul(e.high,t.low)|0)|0;var f=new hi(d,h),m=new hi(0,g.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,v=f.low+m.low|0;if(ka.ucompare(v,f.low)<0){p++;p|=0}e=new hi(p,v)}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=F.makeFromIdStr(t.stampsetIdStr),i=F.makeFromIdStr(t.stampIdStr);return new Bn(n,i,t.illust)},Bn.fromPropsAndStampsetId=function(e,t){return new Bn(t,F.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 Gn=function(){this.stampsetStore=new Wa,this.stampStore=new Wa,this.stampKeyCategoryIdMap=new Wa};n["albero.entity.StampStore"]=Gn,Gn.__name__=["albero","entity","StampStore"],Gn.prototype={addStampsets:function(e){for(var t=0;te.version},__class__:zn};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(F.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 zn(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 Wa,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 l.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 G.talks(e,H.single(this.talkSelection));case 1:var n=Eo(t,t.getTalkSelection),i=e,r=an.getMultiPaneTypes().map(function(e){return n(i,e)});return r[0]=this.talkSelection,G.talks(e,H.multi(r));case 2:var a=Eo(t,t.getTalkSelection),o=e,s=an.getMultiPaneTypes().map(function(e){return a(o,e)});return s[1]=this.talkSelection,G.talks(e,H.multi(s));case 3:var l=Eo(t,t.getTalkSelection),u=e,c=an.getMultiPaneTypes().map(function(e){return l(u,e)});return c[2]=this.talkSelection,G.talks(e,H.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=P.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 P.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),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=Qt.deleted),t=!0),t},updateByMessageReadStatusesUpdate:function(e){var t=e.messageIds,n=e.mentionMessageIds,i=t.filter(Eo(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:ka.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=P.orNull(U.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:ka.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:ka.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:ka.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=P.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","SCHEDULE_MESSAGE"]};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.SCHEDULE_MESSAGE=["SCHEDULE_MESSAGE",6],ui.SCHEDULE_MESSAGE.toString=i,ui.SCHEDULE_MESSAGE.__enum__=ui,ui.__empty_constructs__=[ui.PROFILE_IMAGE,ui.MESSAGE,ui.TALK_ICON,ui.THUMBNAIL,ui.NOTE_ATTACHMENT,ui.NOTE_THUMBNAIL,ui.SCHEDULE_MESSAGE];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;case 6:return 1}};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=P.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(ka.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:ka.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:ka.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=P.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(ka.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:ka.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,n){this.domainId=e,this.talkId=t,this.marker=n.marker,this.nextMarker=n.nextMarker,this.contents=null==n.contents?[]:io.__cast(n.contents,Array).map(function(e){return new Ki(e)})};n["albero.entity.api.message.GetScheduledMessagesResultWithParams"]=vi,vi.__name__=["albero","entity","api","message","GetScheduledMessagesResultWithParams"],vi.prototype={__class__:vi};var Si=function(e,t){var n=this;l.iter(t,function(t){var i=new yi(t),r=i.createdAt,a=e.high-r.high|0;a=0!=a?a:ka.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"]=Si,Si.__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],Si.prototype={__class__:Si};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 wi=function(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n};n["albero.entity.api.note.CreateNoteError"]=wi,wi.__name__=["albero","entity","api","note","CreateNoteError"],wi.prototype={__class__:wi};var Ti=function(e){this.note=new ji(e),this.emitterKey=null};n["albero.entity.api.note.CreateNoteResult"]=Ti,Ti.__name__=["albero","entity","api","note","CreateNoteResult"],Ti.prototype={updateWithEmitterKey:function(e){var t=new Ti;return t.note=this.note,t.emitterKey=e,t},__class__:Ti};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 Ei=function(e){this.note=new ji(e)};n["albero.entity.api.note.GetNoteResult"]=Ei,Ei.__name__=["albero","entity","api","note","GetNoteResult"],Ei.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__:Ei};var Ni=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=U.asArray(e.contents).map(function(e){return new lr(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 Ai=function(e){this.note=new ji(e)};n["albero.entity.api.note.UpdateNoteResult"]=Ai,Ai.__name__=["albero","entity","api","note","UpdateNoteResult"],Ai.prototype={__class__:Ai};var bi=function(e){this.note=new ji(e)};n["albero.entity.api.note.UpdateNoteSettingResult"]=bi,bi.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],bi.prototype={__class__:bi};var Di=function(){};n["albero.entity.file.DummyFileUtil"]=Di,Di.__name__=["albero","entity","file","DummyFileUtil"],Di.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob};var Ci=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"]=Ci,Ci.__name__=["albero","entity","file","FilePreview"],Ci.prototype={__class__:Ci};var ki=function(){};n["albero.entity.file.StageType"]=ki,ki.__name__=["albero","entity","file","StageType"],ki.prototype={__class__:ki};var Mi=function(e,t){this.talkId=e,this.paneType=t};n["albero.entity.file.StageTypeTalk"]=Mi,Mi.__name__=["albero","entity","file","StageTypeTalk"],Mi.__interfaces__=[ki],Mi.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__:Mi};var Oi=function(){};n["albero.entity.file.StageTypeNote"]=Oi,Oi.__name__=["albero","entity","file","StageTypeNote"],Oi.__interfaces__=[ki],Oi.prototype={toString:function(){return"staged_note_"},isForPane:function(e){return!1},isForNote:function(){return!0},isForPreview:function(){return!1},__class__:Oi};var Fi=function(){};n["albero.entity.message.IFavoriteMessageEvent"]=Fi,Fi.__name__=["albero","entity","message","IFavoriteMessageEvent"],Fi.prototype={__class__:Fi};var Ri=function(e){this.message=new qt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.AddFavoriteMessageEvent"]=Ri,Ri.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Ri.__interfaces__=[Fi],Ri.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__:Ri};var Ui=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.DeleteFavoriteMessageEvent"]=Ui,Ui.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Ui.__interfaces__=[Fi],Ui.prototype={getMessageId:function(){return this.messageId},getTalkId:function(){return this.talkId},getDomainId:function(){return this.domainId},isFavorite:function(){return!1},__class__:Ui};var xi=function(){};n["albero.entity.message.IMessageContentForActionReply"]=xi,xi.__name__=["albero","entity","message","IMessageContentForActionReply"],xi.prototype={__class__:xi};var Pi=function(e){null!=e&&(this.noteId=new Qi(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"]=Pi,Pi.__name__=["albero","entity","message","MessageContentForNote"],Pi.prototype={__class__:Pi};var Li=function(e){null!=e&&(this.noteId=new Qi(e.note_id),this.title=e.title)};n["albero.entity.message.MessageContentForNoteDeleted"]=Li,Li.__name__=["albero","entity","message","MessageContentForNoteDeleted"],Li.prototype={__class__:Li};var Bi=function(e){this.text=Ya.None,this.stampsetId=F.fromIntOrInt64(e.stampset_id),this.stampId=F.fromIntOrInt64(e.stamp_id),null!=e.text&&(this.text=Ya.Some(e.text))};n["albero.entity.message.MessageContentForOriginalStamp"]=Bi,Bi.__name__=["albero","entity","message","MessageContentForOriginalStamp"],Bi.prototype={hasValidText:function(){return P.isDefined(this.getValidText())},getValidText:function(){return P.filter(this.text,B.isNotEmpty)},__class__:Bi};var Gi=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"]=Gi,Gi.__name__=["albero","entity","message","MessageContentForSelectOneReply"],Gi.__interfaces__=[xi],Gi.prototype={getResponseIndex:function(){return this.response},__class__:Gi};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 zi=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"]=zi,zi.__name__=["albero","entity","message","MessageContentForYesNoReply"],zi.__interfaces__=[xi],zi.prototype={getResponseIndex:function(){return this.response?0:1},__class__:zi};var Yi=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"]=Yi,Yi.__name__=["albero","entity","message","MessageFavorite"],Yi.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:Yi};var Ki=function(e){this.isDummy=!1,null!=e&&(this.id=e.scheduled_message_id,this.createMessageAt=e.create_message_at,this.talkId=e.talk_id,this.type=qt.typeOf(e.type),this.content=e.content)};n["albero.entity.message.ScheduledMessage"]=Ki,Ki.__name__=["albero","entity","message","ScheduledMessage"],Ki.fromParams=function(e){var t=new Ki(null);return t.id=e.id,t.createMessageAt=e.createMessageAt,t.talkId=e.talkId,t.type=e.type,t.content=e.content,t},Ki.fromNotifyScheduleMessage=function(e){var t=new Ki(null);return t.id=e.id,t.talkId=e.talkId,t.createMessageAt=C.oneDayAfterAsInt64(),t.type=Qt.text,t.content="",t.isDummy=!0,t},Ki.compare=function(e,t){var n=e.createMessageAt,i=t.createMessageAt,r=n.high-i.high|0;r=0!=r?r:ka.ucompare(n.low,i.low);var a=n.high<0?i.high<0?r:-1:i.high>=0?r:1;if(0!=a)return a;var o=e.id,s=t.id,l=o.high-s.high|0;return l=0!=l?l:ka.ucompare(o.low,s.low),o.high<0?s.high<0?l:-1:s.high>=0?l:1},Ki.prototype={__class__:Ki};var Wi=function(){this.scheduledMessages=new Wa};n["albero.entity.message.ScheduledMessageStore"]=Wi,Wi.__name__=["albero","entity","message","ScheduledMessageStore"],Wi.prototype={getScheduledMessage:function(e){if(null==e)return null;var t="_"+e.high+"_"+e.low,n=this.scheduledMessages;return null!=Ho[t]?n.getReserved(t):n.h[t]},getScheduledMessages:function(){return l.array(this.scheduledMessages)},setScheduledMessage:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.scheduledMessages;null!=Ho[n]?i.setReserved(n,e):i.h[n]=e},removeScheduledMessage:function(e){var t="_"+e.high+"_"+e.low,n=this.scheduledMessages,i=null!=Ho[t]?n.getReserved(t):n.h[t];return this.scheduledMessages.remove(t),i},__class__:Wi};var ji=function(e){null!=e&&(this.noteId=new Qi(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new sr(e.setting),this.noteRevision=new ar(e.note_revision),this.noteLocked=new nr(e.locked))};n["albero.entity.note.Note"]=ji,ji.__name__=["albero","entity","note","Note"],ji.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__:ji};var Vi=n["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT","FILES"]};Vi.TEXT=["TEXT",0],Vi.TEXT.toString=i,Vi.TEXT.__enum__=Vi,Vi.FILES=["FILES",1],Vi.FILES.toString=i,Vi.FILES.__enum__=Vi,Vi.__empty_constructs__=[Vi.TEXT,Vi.FILES];var qi=function(){};n["albero.entity.note.NoteContentTypeHelper"]=qi,qi.__name__=["albero","entity","note","NoteContentTypeHelper"],qi.createNoteContentType=function(e){if(null==e)return gr._e("["+s.dateStr(new Date)+"] ","no value.","","","",""),null;switch(e){case 1:return Vi.TEXT;case 5:return Vi.FILES;default:return gr._e("["+s.dateStr(new Date)+"] ","value is not expected.","","","",""),null}},qi.getValue=function(e){if(null==e)return gr._e("["+s.dateStr(new Date)+"] ","no content type.","","","",""),null;switch(e[1]){case 0:return 1;case 1:return 5}};var Qi=function(e){this.value=e};n["albero.entity.note.NoteId"]=Qi,Qi.__name__=["albero","entity","note","NoteId"],Qi.__interfaces__=[Ht],Qi.createDummyId=function(){var e,t=Qi.nextDummyId,n=Qi.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(ka.ucompare(n.low,i.low)<0){r--;r|=0}e=new hi(r,a)}return Qi.nextDummyId=e,new Qi(t)},Qi.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__:Qi};var Ji=function(e,t,n,i,r,a,o){this.state=Xi.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"]=Ji,Ji.__name__=["albero","entity","note","NoteLocalEdit"],Ji.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==Xi.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?Vi.FILES:Vi.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 or;return t.revision=0,t.contentType=this.getContentType(),t.title=this.title,t.contentSummary=this.text,t.createdBy=e,t.createdAt=C.nowAsInt64(),t.contentFiles=this.fileInfos,t},conflict:function(){this.state=Xi.FAILED_BY_CONFLICT},deleted:function(){this.state=Xi.FAILED_BY_NOT_FOUND},getCreateMessage:function(){return this.createMessage},__class__:Ji};var Xi=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"]};Xi.SENDING=["SENDING",0],Xi.SENDING.toString=i,Xi.SENDING.__enum__=Xi,Xi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",1],Xi.FAILED_BY_CONFLICT.toString=i,Xi.FAILED_BY_CONFLICT.__enum__=Xi,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_NOT_FOUND_FORWARDING=["FAILED_BY_NOT_FOUND_FORWARDING",3],Xi.FAILED_BY_NOT_FOUND_FORWARDING.toString=i,Xi.FAILED_BY_NOT_FOUND_FORWARDING.__enum__=Xi,Xi.FAILED_BY_FILE=function(e,t){var n=["FAILED_BY_FILE",4,e,t];return n.__enum__=Xi,n.toString=i,n},Xi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",5],Xi.FAILED_BY_UNKNOWN.toString=i,Xi.FAILED_BY_UNKNOWN.__enum__=Xi,Xi.COMPLETED=["COMPLETED",6],Xi.COMPLETED.toString=i,Xi.COMPLETED.__enum__=Xi,Xi.__empty_constructs__=[Xi.SENDING,Xi.FAILED_BY_CONFLICT,Xi.FAILED_BY_NOT_FOUND,Xi.FAILED_BY_NOT_FOUND_FORWARDING,Xi.FAILED_BY_UNKNOWN,Xi.COMPLETED];var Zi=function(e){null!=e&&(this.noteId=new Qi(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"]=Zi,Zi.__name__=["albero","entity","note","NoteLockEvent"],Zi.prototype={__class__:Zi};var $i=function(e){this.value=e};n["albero.entity.note.NoteLockExpiredAt"]=$i,$i.__name__=["albero","entity","note","NoteLockExpiredAt"],$i.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__:$i};var er=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"]};er.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",0],er.FAILED_BY_CONFLICT.toString=i,er.FAILED_BY_CONFLICT.__enum__=er,er.FAILED_BY_LOCKED=function(e){var t=["FAILED_BY_LOCKED",1,e];return t.__enum__=er,t.toString=i,t},er.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],er.FAILED_BY_NOT_FOUND.toString=i,er.FAILED_BY_NOT_FOUND.__enum__=er,er.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",3],er.FAILED_BY_UNKNOWN.toString=i,er.FAILED_BY_UNKNOWN.__enum__=er,er.COMPLETED=function(e){var t=["COMPLETED",4,e];return t.__enum__=er,t.toString=i,t},er.RELEASED=["RELEASED",5],er.RELEASED.toString=i,er.RELEASED.__enum__=er,er.__empty_constructs__=[er.FAILED_BY_CONFLICT,er.FAILED_BY_NOT_FOUND,er.FAILED_BY_UNKNOWN,er.RELEASED];var tr=function(e){this.value=e};n["albero.entity.note.NoteLockState"]=tr,tr.__name__=["albero","entity","note","NoteLockState"],tr.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__:tr};var nr=function(e){null!=e&&(this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLocked"]=nr,nr.__name__=["albero","entity","note","NoteLocked"],nr.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__:nr};var ir=function(e){null!=e&&(this.noteId=new Qi(e.note_id),this.talkId=e.talk_id,this.setting=new sr(e.setting))};n["albero.entity.note.NotePartialUpdateForSetting"]=ir,ir.__name__=["albero","entity","note","NotePartialUpdateForSetting"],ir.prototype={__class__:ir};var rr=function(e){null!=e&&(this.noteId=new Qi(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new or(e.note_revision_summary))};n["albero.entity.note.NotePartialUpdateForSummary"]=rr,rr.__name__=["albero","entity","note","NotePartialUpdateForSummary"],rr.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:rr};var ar=function(e){if(this.contentFiles=[],null!=e){switch(this.revision=e.revision,this.title=e.title,this.contentType=qi.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=io.__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},hr.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=hr.CODES;null==r&&(r=hr.initCodes(),hr.CODES=r);for(var a=0,o=3&n,l=a+(n-o),u=new ja(new zo(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 dr=function(){};n["albero.js.KatakanaToRoman"]=dr,dr.__name__=["albero","js","KatakanaToRoman"],dr.assureConvertTable=function(){return null!=dr.convertTable?dr.convertTable:(dr.convertTable=new Wa,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=dr.convertTable,n=e[0],i=e[1];null!=Ho[n]?t.setReserved(n,i):t.h[n]=i}),dr.convertTable)},dr.matchNext=function(e,t){var n=dr.assureConvertTable();if(t+1=Tr.HIRAGANA_SMALL_A&&o<=Tr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Tr.KATAKANA_SMALL_A-Tr.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},Tr.katakanaToRoman=function(e){return(new dr).convert(e)},Tr.normalize=function(e){return new Ir(null).normalize(e)},Tr.normalizeForFile=function(e){return new Ir(null).normalizeForFile(e)},Tr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ir=function(e){this.beforeTask=null,this.beforeTask=e};n["albero.js.Normalizer"]=Ir,Ir.__name__=["albero","js","Normalizer"],Ir.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof no&&(e=e.val),gr._e("["+s.dateStr(new Date)+"] ","invalid character:",e,"","",""),pr.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof no&&(e=e.val),gr._e("["+s.dateStr(new Date)+"] ","invalid character:",e,"","",""),pr.localize("TextCanonicalizer.invalid")}},__class__:Ir};var Er=function(){};n["albero.js.WebSocket"]=Er,Er.__name__=["albero","js","WebSocket"],Er.prototype={__class__:Er};var Nr=function(){};n["albero.js.WebSocketFactory"]=Nr,Nr.__name__=["albero","js","WebSocketFactory"],Nr.newInstance=function(e,t){return new Ar(e,t)};var Ar=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),Bo.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=Eo(this,this.onOpen),this.ws.onmessage=Eo(this,this.onMessage),this.ws.onerror=Eo(this,this.onError),this.ws.onclose=Eo(this,this.onClose)};n["albero.js.WebSocketForBrowser"]=Ar,Ar.__name__=["albero","js","WebSocketForBrowser"],Ar.__interfaces__=[Er],Ar.prototype={onOpen:function(e){gr._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 Bo.websocketsbinary?ja.ofData(new Yo(e.data)):hr.decode(e.data)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){gr._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);gr._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){Bo.websocketsbinary?this.ws.send(new Yo(e.b.bufferValue).buffer):this.ws.send(hr.encode(e))},ping:function(e){this.send(new ja(new zo(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Ar};var br=function(){};n["puremvc.interfaces.IProxy"]=br,br.__name__=["puremvc","interfaces","IProxy"],br.prototype={__class__:br};var Dr=function(){};n["albero.proxy.AccessTokenResolverProxy"]=Dr,Dr.__name__=["albero","proxy","AccessTokenResolverProxy"],Dr.__interfaces__=[br],Dr.prototype={__class__:Dr};var Cr=function(){};n["albero.proxy.AccessTokenResolverProxyFactory"]=Cr,Cr.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Cr.newInstance=function(){return new Mr("accessTokenResolver")};var kr=function(e,t){j.call(this),this.proxyName=null!=e?e:kr.NAME,null!=t&&this.setData(t)};n["puremvc.patterns.proxy.Proxy"]=kr,kr.__name__=["puremvc","patterns","proxy","Proxy"],kr.__interfaces__=[br],kr.__super__=j,kr.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__:kr});var Mr=function(e){kr.call(this,e)};n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Mr,Mr.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Mr.__interfaces__=[Dr],Mr.__super__=kr,Mr.prototype=r(kr.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=Go.account?Go.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Mr});var Or=function(){kr.call(this,"broadcast")};n["albero.proxy.AlberoBroadcastProxy"]=Or,Or.__name__=["albero","proxy","AlberoBroadcastProxy"],Or.__super__=kr,Or.prototype=r(kr.prototype,{handleNotification:function(e,t){var n=this;switch(e){case"notify_add_account_control_request":var i=new He(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":var r=t[1].map(Eo(To=this.dataFactory,To.newAcquaintance));this.api.sendAddAcquaintanceNotifications(r),this.sendNotification(e,r);break;case"notify_add_domain_invite":var a=new Et(t);this.dataStore.setDomainInvite(a),this.sendNotification(e,a);break;case"notify_add_favorite_message":var o=new Ri(t);this.dataStore.addFavoriteMessage(o),this.sendNotification(e,o);break;case"notify_add_favorite_talk":var u=new Mt(t);this.updateTalkStatusByFavoriteTalkEvent(u),this.sendNotification(e,u);break;case"notify_add_friend":this.sendNotification(e,this.dataFactory.newFriend(t[1]));break;case"notify_add_talkers":var c=new jn(t);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(e,c);break;case"notify_close_conference":var _=new Ze(t);this.dataStore.removeConference(_),this.updateTalkStatusByConferenceClosedEvent(_),this.sendNotification(e,_);break;case"notify_conference_participant_join":var h,d=t[3],f=t[4],m=this.dataStore;if(null!=m.me){var p=m.me.id;h=null!=p&&null!=f&&p.high==f.high&&p.low==f.low}else h=!1;h&&this.dataStore.addReactedConfereceId(d),this.sendNotification(e,t);break;case"notify_conference_participant_reject":var g=t[3];this.dataStore.addReactedConfereceId(g),this.sendNotification(e,t);break;case"notify_create_announcement":var v=new Ke(t);this.keywordWatcher.onAnnouncementCreated(v),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(v)),this.sendNotification(e,v);break;case"notify_create_message":var S=new qt(t);this.dataStore.setMessage(S),this.keywordWatcher.onMessageCreated(S);var y=this.newTalkStatusByMessage(S);switch(null!=y&&this.sendNotification("notify_update_local_talk_status",y),S.type[1]){case 0:var w=S.content,T=null;switch(w.type){case"delete_talker":T=w.deleted_user_id;break;case"hide_pair_talk":T=w.user_id}if(null==T)return void this.sendNotification(e,S);for(var I=S.talkId,E=this.dataStore.getQuestions(I,T),N=0;Nt.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t){var n=this.dataStore.getTalk(e.talkId);if(null==n)return void gr._e("["+s.dateStr(new Date)+"] ","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(!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?(gr._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 We).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__:Or});var Fr=function(){kr.call(this,"api")};n["albero.proxy.AlberoServiceProxy"]=Fr,Fr.__name__=["albero","proxy","AlberoServiceProxy"],Fr.__super__=kr,Fr.prototype=r(kr.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",Ue.FORWARD(G.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.123",null).then(function(e){var i=C.nowAsInt64();e.passwordExpiration.isExpired(i)?n.sendNotification("password_expiration_overed"):(e.passwordExpiration.needWarning(i,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(C.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",Ue.FORWARD(G.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(Kt.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(Kt.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,!1).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 gr._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),this.prepareMessageFilesAsync(e,n,i,!1).then(function(e){a._createMessage(t,Qt.textMultipleFile,e,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 gr._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)},validateFileName:function(e){var t=S.replace(e.name,"$","__");if(t==e.name)return e;try{return e.name=t,e}catch(r){var n=e,i=n.slice(0,n.size,n.type);return new File([i],t,{type:n.type})}},prepareMessageFilesAsync:function(e,t,n,i){for(var r=this,a=Promise.resolve([]),o=0;o0&&(i.text=t),Promise.resolve(i)})},prepareMessageFileAsync:function(e,t,n,i){var r=this;return e=this.validateFileName(e),new Promise(function(e,i){null!=t?r.uploadFile(t.file,n,ui.THUMBNAIL,function(n){t.setAuth(n),e(Ya.Some(t))},function(t){e(Ya.None)}):e(Ya.None)}).then(function(t){return new Promise(function(a,o){var s=i?ui.SCHEDULE_MESSAGE:ui.MESSAGE;r.uploadFile(e,n,s,function(n){var i=Tr.normalizeForFile(e.name),r=k.createFileInfoDynamic(e,i,t,n);a(r)},o)})})},prepareNoteFileAsync:function(e,t,n){var i=this;return e=this.validateFileName(e),new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,ui.NOTE_THUMBNAIL,function(n){t.setAuth(n),e(Ya.Some(t))},function(t){e(Ya.None)}):e(Ya.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,ui.NOTE_ATTACHMENT,function(n){var i=Tr.normalizeForFile(e.name),a=k.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},uploadFile:function(e,t,n,i,r){var a=this,o=e,l=Tr.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);gr._e("["+s.dateStr(new Date)+"] ",t,"","","","");var i=new ea({code:null,detail:null,message:e});if(n!=ui.THUMBNAIL&&n!=ui.NOTE_THUMBNAIL&&n!=ui.NOTE_ATTACHMENT){var o=n==ui.SCHEDULE_MESSAGE?Kt.ScheduleMessageFailed(Wt.GeneralFileError):Kt.GeneralFileError,l=ta.toLocalError(o,i);a.sendNotification("error_occurred",l)}r(i)})},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=F.fromIntOrInt64(e.detail.limit_max);if("file_size"==e.detail.limit_target){var i=n==ui.SCHEDULE_MESSAGE?Kt.ScheduleMessageFailed(Wt.UploadSizeOvered(t)):Kt.UploadSizeOvered(t),o=ta.toLocalError(i,e);a.sendNotification("error_occurred",o)}else if("storage_size"==e.detail.limit_target){var s=n==ui.SCHEDULE_MESSAGE?Kt.ScheduleMessageFailed(Wt.StorageSizeOvered(t)):Kt.StorageSizeOvered(t),l=ta.toLocalError(s,e);a.sendNotification("error_occurred",l)}}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.wsApi.createAnnouncement(e,t,n).then(function(e){r.sendNotification("create_announcement_complete",[e,a.id],i)},function(e){r.sendNotification("create_announcement_fail",a),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,r=this.settings.getSelectedDomainId();null!=r&&(e=null==e?{sinceId:null,maxId:null}:e,this.wsApi.getAnnouncements(r,20,e,t).then(function(e){i.sendNotification("notify_get_announcements",{domainId:r,announcements:e,sortOrder:t,callerKey:n})},function(e){i.apiCaller.handleServerErrorDefault(e)}))},getAnnouncementStatuses:function(e){var t=this;this.wsApi.getAnnouncementStatuses().then(function(n){l.iter(n,function(e){t.dataStore.setAnnouncementStatus(e),t.sendAnnouncementStatusNotification(e)}),null!=e&&e()},function(e){t.apiCaller.handleServerErrorDefault(e)})},getAnnouncementStatus:function(e,t){var n=this;this.wsApi.getAnnouncementStatus(e).then(function(e){n.dataStore.setAnnouncementStatus(e),n.sendAnnouncementStatusNotification(e),null!=t&&t()},function(e){n.apiCaller.handleServerErrorDefault(e)})},updateAnnouncementReadStatus:function(e,t){var n=this;this.wsApi.updateAnnouncementReadStatus(e,t).then(function(i){var r,a=n.dataStore.getAnnouncementStatus(e);if(null!=a){var o=a.maxReadAnnouncementId;r=null!=o&&null!=t&&o.high==t.high&&o.low==t.low}else r=!1;r&&n.sendAnnouncementStatusNotification(a)},function(e){n.apiCaller.handleServerErrorDefault(e)})},getQuestions:function(e,t,n,i){var r=this,a=this.settings.getSelectedDomainId(),o=null;null!=e&&(a=e.domainId,o=e.id);var s=P.orNull(pn.filterToOpBool(n));i=null==i?{sinceId:null,maxId:null}:i,this.wsApi.getQuestions(a,o,t,s,20,i).then(function(e){l.iter(e,Eo(To=r.dataStore,To.setQuestion)),r.sendNotification("get_questions_responsed",{domainId:a,talkId:o,questions:e,fromType:t,filter:n})},function(e){r.apiCaller.handleServerErrorDefault(e)})},getQuestion:function(e,t){var n=this;this.wsApi.getQuestion(e).then(function(e){n.dataStore.setQuestion(e),n.sendNotification("notify_update_question",e),null!=t&&t(e)},function(e){n.apiCaller.handleServerErrorDefault(e)})},searchMessages:function(e,t,n,i){var r=this;this.searchService.prepareForSearching(e,n),this.apiCaller.call("search_messages",[e.domainId,e.talkId,e.getQueryText(),t,n],function(t){r.searchService.isRecentParams(e)&&r.searchService.isSearching()&&r.searchService.saveSearchMessagesResult(new Nn(t)),null!=i&&i()},function(a){r.searchService.notifySearchMessagesFail(),400!=a.code||null==n?r.sendNotification("error_occurred",a):r.searchMessages(e,t,null,i)})},searchAttachments:function(e,t,n,i){var r=this;this.searchService.prepareForSearching(e,n),this.apiCaller.call("search_attachments",[e.domainId,e.talkId,e.getQueryText(),t,n],function(t){r.searchService.isRecentParams(e)&&r.searchService.isSearching()&&r.searchService.saveSearchAttachmentsResult(new En(t)),null!=i&&i()},function(a){r.searchService.notifySearchAttachmentsFail(),400!=a.code||null==n?r.sendNotification("error_occurred",a):r.searchAttachments(e,t,null,i)})},startUpdateLastUsedAtIfNeed:function(){this.lastUsedAtUpdater.startPolling(Eo(this,this.updateLastUsedAt))},updateLastUsedAt:function(){var e=this;try{this.apiCaller.call("update_last_used_at",[],function(t){e.lastUsedAtUpdater.update()},function(t){e.lastUsedAtUpdater.cancel(),e.apiCaller.handleServerErrorDefault(t)})}catch(e){this.lastUsedAtUpdater.cancel()}},addFavoriteTalk:function(e,t){this.apiCaller.call("add_favorite_talk",[e,t])},deleteFavoriteTalk:function(e,t){this.apiCaller.call("delete_favorite_talk",[e,t])},disablePushNotification:function(e,t){this.apiCaller.call("disable_push_notification",[e,t])},enablePushNotification:function(e,t,n){this.apiCaller.call("enable_push_notification",[e,t,fn.toRawValue(n)])},getSolutions:function(e,t){var n=this;l.iter(t,Eo(To=this.dataStore,To.addLoadingSolutionId)),this.wsApi.getSolutions(e,t).then(function(e){l.iter(e,Eo(To=n.dataStore,To.setSolution)),l.iter(t,Eo(To=n.dataStore,To.removeLoadingSolutionId)),n.sendNotification("solutions_loaded")},function(e){l.iter(t,Eo(To=n.dataStore,To.removeLoadingSolutionId)),n.apiCaller.handleServerErrorDefault(e)})},getPresences:function(e,t){var n=this;return this.wsApi.getPresences(e,t).then(function(e){return l.iter(e,Eo(To=n.dataStore,To.setUserPresence)),n.sendNotification("presences_updated",t),Promise.resolve(t)},function(e){return n.apiCaller.handleServerErrorDefault(e),Promise.reject(e)})},joinConference:function(e,t){var n=this;this.apiCaller.call("join_conference",[e,t],function(t){var i=new zt(t);n.sendNotification("join_conference_responsed",{talkId:e,joinConference:i})},function(e){n.sendNotification("join_conference_canceled",e)})},rejectConference:function(e){var t=this;this.apiCaller.call("reject_conference",[e],function(e){},function(e){404!=e.code&&409!=e.code&&t.sendNotification("error_occurred",e)})},leaveConference:function(e){var t=this;this.apiCaller.call("leave_conference",[e],function(e){},function(e){404!=e.code&&t.sendNotification("error_occurred",e)})},getConferences:function(){var e=this;this.wsApi.getConferences().then(function(t){l.iter(t,function(t){e.dataStore.addConference(t),e.sendNotification("notify_open_conference",t)}),e.dataStore.filterReactedConferenceIds(t.filter(function(t){return!e.dataStore.isReactedConferenceId(t.id)}).map(function(e){return e.id}))},function(t){e.apiCaller.handleServerErrorDefault(t)})},getConferenceParticipants:function(e){var t=this;this.apiCaller.call("get_conference_participants",[e],function(n){var i=t.dataStore.getConference(e);null!=i&&(i.participants=n,t.sendNotification("get_conference_participants_responsed",i))})},getNoteStatuses:function(e,t){var n=this.settings.getSelectedDomainId();this.apiNote.getNoteStatuses(n,e,t).catch(function(e){})},getNote:function(e,t){var n=null!=t?t:function(e,t){};this.apiNote.getNote(e).then(function(e){n(null,e)}).catch(function(e){n(e,null)})},createNote:function(e,t,n,i,r){gr._w("["+s.dateStr(new Date)+"] ","'createNote' is deprecated, please use 'res.send' instead.","","","",""),this.apiNote.createNote(e,t,n,i,r).catch(function(e){})},createNoteV2:function(e,t,n,i){var r=this,a=this.dataStore.getTalk(t.getTalkId());if(null!=a){var o=a.domainId,s=t.getNoteId();this.dataStore.setNoteLocalEdit(s,t);for(var l=Promise.resolve(),u=0,c=t.getUnuploadedFileInfos();u0&&400==e.code&&"invalid file_id"==e.message&&(a.setState(Xi.FAILED_BY_NOT_FOUND_FORWARDING),o.dataStore.setNoteLocalEdit(a.getNoteId(),a)),null!=a&&400==e.code&&"invalid talk_id"==e.message){var i=jt.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 bi(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=qi.getValue(i);s.apiCaller.callApiReliable("update_note",[e.value,t,n,u,r,a],function(e){o(new Ai(e))},l,Eo(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(Xi.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(Xi.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(Xi.FAILED_BY_CONFLICT),s.dataStore.setNoteLocalEdit(e,o)),Promise.reject(t)):(null!=o&&(o.setState(Xi.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 tr(er.COMPLETED(new $i(e)))}).catch(function(n){if(400==n.code)return i.sendNotification("error_occurred",n),new tr(er.FAILED_BY_UNKNOWN);if(403==n.code)return i.sendNotification("error_occurred",n),new tr(er.FAILED_BY_UNKNOWN);if(404==n.code)return i.dataStore.setNote(t,null),new tr(er.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 tr(er.FAILED_BY_LOCKED(r))}return 409==n.code&&"conflict"==n.message?new tr(er.FAILED_BY_CONFLICT):(i.sendNotification("error_occurred",n),new tr(er.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 tr(er.RELEASED)}).catch(function(n){if(400==n.code)return i.sendNotification("error_occurred",n),new tr(er.FAILED_BY_UNKNOWN);if(403==n.code)return i.sendNotification("error_occurred",n),new tr(er.FAILED_BY_UNKNOWN);if(404==n.code)return i.dataStore.setNote(t,null),new tr(er.FAILED_BY_NOT_FOUND);if(409==n.code&&"conflict"==n.message)return new tr(er.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 tr(er.FAILED_BY_LOCKED(r))}return i.sendNotification("error_occurred",n),new tr(er.FAILED_BY_UNKNOWN)})},retryTimeForCreateOrUpdateNoteFromError:function(e){return this.shouldRetryCreateOrUpdateNote(e)?Ya.Some(this.apiCaller.retryTimeForReplicationLag()):Ya.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__:Ur});var xr=function(){kr.call(this,"appState")};n["albero.proxy.AppStateProxy"]=xr,xr.__name__=["albero","proxy","AppStateProxy"],xr.__super__=kr,xr.prototype=r(kr.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 Ra(500).run=Eo(this,this.checkInactive)},checkInactive:function(){this.appState!=N.Inactive&&((new Date).getTime()-this.lastActivityAt.getTime()<2e3||this.setAppState(N.Inactive))},__class__:xr});var Pr=function(){var e=new hi(-1,-1);this.dummyFileId=e;var t=new hi(-1,-1);this.dummyMsgId=t,kr.call(this,"dataFactory")};n["albero.proxy.DataFactoryProxy"]=Pr,Pr.__name__=["albero","proxy","DataFactoryProxy"],Pr.__super__=kr,Pr.prototype=r(kr.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 At(e)},newDummyMessage:function(e,t,n,i){var r=this,a=new qt;a.id=this.dummyMsgId,a.userId=this.dataStore.me.id,a.talkId=e,a.type=t,a.content=n,a.scheduleAt=i;var o,s=this.dummyMsgId;if(null==s)o=null;else{var l=new hi(0,1),u=s.high-l.high|0,c=s.low-l.low|0;if(ka.ucompare(s.low,l.low)<0){u--;u|=0}o=new hi(u,c)}this.dummyMsgId=o;var _=[];switch(a.type[1]){case 4:_=[this.createDummyFileInfo(a,a.content)];break;case 5:_=io.__cast(a.content.files,Array).map(function(e){return r.createDummyFileInfo(a,e)})}return this.dataStore.setMessageWithFileInfos(a,_),a},newDummyFileMessage:function(e,t,n){var i=this.createFileInfoDynamic(t);return this.newDummyMessage(e,Qt.file,i,n)},newDummyMultipleFileMessage:function(e,t,n,i){var r=l.array(n.filter(function(e){return null!=e.file}).map(Eo(this,this.createFileInfoDynamic)));return this.newDummyMessage(e,Qt.textMultipleFile,{text:t,files:r},i)},createFileInfoDynamic:function(e){var t=e.file;return{content_type:t.type,content_size:t.size,name:Tr.normalizeForFile(t.name),file:t,localThumbInfo:e.thumb}},createDummyFileInfo:function(e,t){var n,i=Ot.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(ka.ucompare(r.low,a.low)<0){o--;o|=0}n=new hi(o,s)}return this.dummyFileId=n,i},newAnnouncementStatusForDomain:function(e){var t=new We;return t.domainId=e,this.dataStore.setAnnouncementStatus(t)},__class__:Pr});var Lr=function(){this.departmentStore=new st,this.stampStore=new Gn,this.questionStore=new Tn,this.fileInfoStore=new Ut,this.scheduledMessageStore=new Wi,this.messageStore=new en,this.conferenceStore=new $e,this.solutionStore=new xn,this.directAppStore=new dt,this.flowNotificationBadgeStore=new Pt,kr.call(this,"dataStore")};n["albero.proxy.DataStoreProxy"]=Lr,Lr.__name__=["albero","proxy","DataStoreProxy"],Lr.__super__=kr,Lr.prototype=r(kr.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!=Ho[i]?e.setReserved(i,u):e.h[i]=u}this.storageForUsers.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new Wa);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=Ho[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!=Ho[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=Eo(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!=Ho[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new Ka(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!=Ho[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=Ho[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!=Ho[a]?o.getReserved(a):o.h[a];if(null!=s){var l="_"+t.high+"_"+t.low,u=null!=Ho[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!=Ho[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!=Ho[o]?a.getReserved(o):a.h[o];return null!=s?s.user:null});for(var o=[],s=a.arrayKeys(),l=new Ka(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 Ka(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!=Ho[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,qn.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!=Ho[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!=Ho[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!=Ho[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){l.iter(e,Eo(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=Ho[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!=Ho[n]?i.existsReserved(n):i.h.hasOwnProperty(n)){var r=this.talkStatuses;e.push(null!=Ho[n]?r.getReserved(n):r.h[n])}}return e},getTalkStatus:function(e){var t="_"+e.high+"_"+e.low,n=this.talkStatuses;return null!=Ho[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!=Ho[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!=Ho[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!=Ho[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 Ka(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!=Ho[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!=Ho[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:ka.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!=Ho[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!=Ho[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 Wa,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(S.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(S.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!=Ho[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__:Kr});var Wr=function(){};n["albero.proxy.KeywordParser"]=Wr,Wr.__name__=["albero","proxy","KeywordParser"],Wr.parse=function(e){var t=S.htmlEscape(e,!0),n=new o(""(.*?)"","g").map(t,function(e){return Wr.encodeSpace(e.matched(1))});return new o("[  ]","g").split(n).filter(B.isNotEmpty).map(Wr.decodeSpace).map(Wr.createParsedKeyword)},Wr.encodeSpace=function(e){return S.replace(S.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},Wr.decodeSpace=function(e){return S.replace(S.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 jr(r,i)}return new jr(Vr.normal,e)};var jr=function(e,t){this.type=e,this.word=t};n["albero.proxy.ParsedKeyword"]=jr,jr.__name__=["albero","proxy","ParsedKeyword"],jr.prototype={__class__:jr};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_"+g.string(e)};var Qr=function(){this.isCallingUpdateLastUsedAt=!1,kr.call(this,"lastUsedAtUpdater")};n["albero.proxy.LastUsedAtUpdaterProxy"]=Qr,Qr.__name__=["albero","proxy","LastUsedAtUpdaterProxy"],Qr.__super__=kr,Qr.prototype=r(kr.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?Ra.delay(function(){t.startPolling(e)},0|n):(this.isCallingUpdateLastUsedAt=!0,e(),this.pollingTimer=new Ra(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=C.afterAsInt64(6e5),this.settings.setLastUsedExpiredAt(this.lastUsedExpiredAtCache),this.isCallingUpdateLastUsedAt=!1},cancel:function(){this.isCallingUpdateLastUsedAt=!1},__class__:Qr});var Jr=function(){kr.call(this,"limitations")};n["albero.proxy.LimitationsProxy"]=Jr,Jr.__name__=["albero","proxy","LimitationsProxy"],Jr.__super__=kr,Jr.prototype=r(kr.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__:Jr});var Xr=function(){this.connectionStatus=A.Ok,kr.call(this,"rpc"),this.responseHandlers=new Ha,this.connectionKeeper=new Zr(Eo(this,this.ping))};n["albero.proxy.MsgPackRpcProxy"]=Xr,Xr.__name__=["albero","proxy","MsgPackRpcProxy"],Xr.__super__=kr,Xr.prototype=r(kr.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=Nr.newInstance(Go.endpoint,{onopen:Eo(this,this.onOpen),onmessage:Eo(this,this.onMessage),onclose:Eo(this,this.onClose),onpong:Eo(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=A.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){Xr.pingAt=null;g.string(e)},onMessage:function(e){var t=new so(e,!0).o,n=io.__cast(t[0],Mo);if(1==n&&4==t.length){var i=io.__cast(t[1],Mo),r=t[2],a=t[3],o=this.responseHandlers.h[i];if(null==o)return void gr._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;gr._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=io.__cast(t[1],Mo),c=io.__cast(t[2],String),_=io.__cast(t[3],Array);if(0==_.length)return void gr._e("["+s.dateStr(new Date)+"] ","empty params.","","","","");if(this.broadcast.handleNotification(c,_[0]),null==this.ws)return void gr._e("["+s.dateStr(new Date)+"] ","websocket was finished.","","","","");this.ws.send(new lo([1,u,null,!0]).o.getBytes())}},onClose:function(e,t,n){gr._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",Ue.FORWARD(G.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():Ra.delay(a,100)},Ra.delay(a,e)},call:function(e,t,n,i){if(null!=this.ws){null==t&&(t=[]),null==n&&(n=function(e){}),null==i&&(i=Eo(this,this.onServerError));var r=Xr.lastMsgId++,a=this.responseHandlers,o=new $r(e,n,i);a.h[r]=o;var l=new lo([0,r,e,t]).o.getBytes();this.ws.send(l)}else{var u=this.data;gr._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();Xr.pingAt,g.string(null==this.ws||this.ws.isClosed())}else{Xr.pingAt;this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),Xr.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__: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 Ra(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=Ra.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(){kr.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new Wa,this.updateReadAnnouncementStatusesTimers=new Wa};n["albero.proxy.ReadStatusUpdaterProxy"]=na,na.__name__=["albero","proxy","ReadStatusUpdaterProxy"],na.__super__=kr,na.prototype=r(kr.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!=Ho[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadMessageId,l=Ra.delay(function(){n.updateReadStatusesTimers.remove(r),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,s)},1e3),u=this.updateReadStatusesTimers;null!=Ho[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!=Ho[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadAnnouncementId;o=Ra.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(r),n.api.updateAnnouncementReadStatus(e,s)},1e3);var l=this.updateReadAnnouncementStatusesTimers;null!=Ho[r]?l.setReserved(r,o):l.h[r]=o}},__class__:na});var ia=function(){kr.call(this,"routing")};n["albero.proxy.RoutingProxy"]=ia,ia.__name__=["albero","proxy","RoutingProxy"],ia.__super__=kr,ia.prototype=r(kr.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 8:return e[2];case 12:return e[2];case 13:return e[2];default:return null}},parseFragment:function(e){return Y.createUrls(e,this.urlConverterDelegate)},toFragment:function(e){return Y.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__=[K],aa.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return P.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e;switch(P.flatMap(this.getLastSelectedDomainId(),Eo(this,this.getDomain))[1]){case 0:e=P.flatMap(this.getLastSelectedDomainId(),Eo(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 bt(this.dataStore.getDomains()).getOldestDomain()},__class__:aa};var oa=function(){kr.call(this,"searchService")};n["albero.proxy.SearchServiceProxy"]=oa,oa.__name__=["albero","proxy","SearchServiceProxy"],oa.__super__=kr,oa.prototype=r(kr.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 Wa),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new Wa);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(i):i();var t=0,n=function(){2==(t+=1)&&e.api.getTalks(i)};e.api.getFriends(n),e.api.getAcquaintances(n)}),e.api.getAccountControlRequests(function(){e.api.getDomainInvites(i)}),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=U.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:ka.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)},Ea.stringifyInt64=function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:Ma.toString(e)},Ea.prototype={from:function(e){return Ea._from(e)},__class__:Ea};var Na=function(e){this.value=e};n["albero_cli.value.ID"]=Na,Na.__name__=["albero_cli","value","ID"],Na.prototype={toString:function(){return Ma.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__:Na};var Aa=function(){};n["albero_cli.value.note.DeleteNoteResult"]=Aa,Aa.__name__=["albero_cli","value","note","DeleteNoteResult"],Aa.of=function(e){return new Aa},Aa.prototype={__class__:Aa};var ba=function(e){this.note=e};n["albero_cli.value.note.GetNoteResult"]=ba,ba.__name__=["albero_cli","value","note","GetNoteResult"],ba.of=function(e){return new ba(ga.of(e.note))},ba.prototype={__class__:ba};var Da=function(e){this.note=e};n["albero_cli.value.note.UpdateNoteResult"]=Da,Da.__name__=["albero_cli","value","note","UpdateNoteResult"],Da.of=function(e){return new Da(ga.of(e.note))},Da.prototype={__class__:Da};var Ca=function(){};n["haxe.IMap"]=Ca,Ca.__name__=["haxe","IMap"],Ca.prototype={__class__:Ca};var ka={};n["haxe._Int32.Int32_Impl_"]=ka,ka.__name__=["haxe","_Int32","Int32_Impl_"],ka.ucompare=function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0};var Ma={};n["haxe._Int64.Int64_Impl_"]=Ma,Ma.__name__=["haxe","_Int64","Int64_Impl_"],Ma.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=Ma.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},Ma.divMod=function(e,t){if(0==t.high)switch(t.low){case 0:throw new no("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=ka.ucompare(t.high,n.high),_=0!=c?c:ka.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=ka.ucompare(n.high,t.high);if((0!=m?m:ka.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(ka.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 S=1;if(0==(S&=63))t=new hi(t.high,t.low);else if(S<32){t=new hi(t.high>>>S,t.high<<32-S|t.low>>>S)}else{t=new hi(0,t.high>>>S-32)}}if(i){var y=~l.high,w=-l.low;if(0==w){y++;y|=0}l=new hi(y,w)}if(e.high<0){var T=~n.high,I=-n.low;if(0==I){T++;T|=0}n=new hi(T,I)}return{quotient:l,modulus:n}};var Oa=function(){};n["haxe.Int64Helper"]=Oa,Oa.__name__=["haxe","Int64Helper"],Oa.parseString=function(e){var t=new hi(0,10),n=new hi(0,0),i=new hi(0,1),r=!1,a=S.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 no("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=ka._mul(d,m),v=ka._mul(f,m),y=ka._mul(d,p),w=g,T=(ka._mul(f,p)+(y>>>16)|0)+(v>>>16)|0;if(w=w+(y<<=16)|0,ka.ucompare(w,y)<0){T++;T|=0}if(w=w+(v<<=16)|0,ka.ucompare(w,v)<0){T++;T|=0}T=T+(ka._mul(i.low,h.high)+ka._mul(i.high,h.low)|0)|0;var I=new hi(T,w),E=n.high-I.high|0,N=n.low-I.low|0;if(ka.ucompare(n.low,I.low)<0){E--;E|=0}if(!((n=new hi(E,N)).high<0))throw new no("NumberFormatError: Underflow")}else{var A=65535&i.low,b=i.low>>>16,D=65535&h.low,C=h.low>>>16,k=ka._mul(A,D),M=ka._mul(b,D),O=ka._mul(A,C),F=k,R=(ka._mul(b,C)+(O>>>16)|0)+(M>>>16)|0;if(F=F+(O<<=16)|0,ka.ucompare(F,O)<0){R++;R|=0}if(F=F+(M<<=16)|0,ka.ucompare(F,M)<0){R++;R|=0}R=R+(ka._mul(i.low,h.high)+ka._mul(i.high,h.low)|0)|0;var U=new hi(R,F),x=n.high+U.high|0,P=n.low+U.low|0;if(ka.ucompare(P,n.low)<0){x++;x|=0}if((n=new hi(x,P)).high<0)throw new no("NumberFormatError: Overflow")}var L=65535&i.low,B=i.low>>>16,G=65535&t.low,H=t.low>>>16,z=ka._mul(L,G),Y=ka._mul(B,G),K=ka._mul(L,H),W=z,j=(ka._mul(B,H)+(K>>>16)|0)+(Y>>>16)|0;if(W=W+(K<<=16)|0,ka.ucompare(W,K)<0){j++;j|=0}if(W=W+(Y<<=16)|0,ka.ucompare(W,Y)<0){j++;j|=0}j=j+(ka._mul(i.low,t.high)+ka._mul(i.high,t.low)|0)|0,i=new hi(j,W)}return n};var Fa=function(){this.buf=new v,this.cache=[],this.useCache=Fa.USE_CACHE,this.useEnumIndex=Fa.USE_ENUM_INDEX,this.shash=new Wa,this.scount=0};n["haxe.Serializer"]=Fa,Fa.__name__=["haxe","Serializer"],Fa.run=function(e){var t=new Fa;return t.serialize(e),t.toString()},Fa.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Ho[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!=Ho[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 Ha:this.buf.b+="q";for(var v=e,S=v.keys();S.hasNext();){var y=S.next();this.buf.b+=":",this.buf.b+=null==y?"null":""+y,this.serialize(v.h[y])}this.buf.b+="h";break;case za: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 Wa:this.buf.b+="b";for(var A=e,b=A.keys();b.hasNext();){var D=b.next();this.serializeString(D),this.serialize(null!=Ho[D]?A.getReserved(D):A.h[D])}this.buf.b+="h";break;case ja:var C=e;this.buf.b+="s",this.buf.b+=g.string(Math.ceil(8*C.length/6)),this.buf.b+=":";var k=0,M=C.length-2,O=Fa.BASE64_CODES;if(null==O){var F=Fa.BASE64.length;O=new Array(F);for(var R=0,U=Fa.BASE64.length;R>2]),this.buf.b+=String.fromCharCode(O[63&(P<<4|L>>4)]),this.buf.b+=String.fromCharCode(O[63&(L<<2|B>>6)]),this.buf.b+=String.fromCharCode(O[63&B])}if(k==M){var G=C.b[k++],H=C.b[k++];this.buf.b+=String.fromCharCode(O[G>>2]),this.buf.b+=String.fromCharCode(O[63&(G<<4|H>>4)]),this.buf.b+=String.fromCharCode(O[H<<2&63])}else if(k==M+1){var z=C.b[k++];this.buf.b+=String.fromCharCode(O[z>>2]),this.buf.b+=String.fromCharCode(O[z<<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 Y=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(Y)),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 no("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new no("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 no("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 no("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new no("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new no("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 no("Invalid custom data");return o;case 77:var l=new za;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 no("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 Wa;this.cache.push(m);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=Ho[p]?m.setReserved(p,g):m.h[p]=g}return this.pos++,m;case 99:var v=this.unserialize(),S=this.resolver.resolveClass(v);if(null==S)throw new no("Class not found "+v);var y=w.createEmptyInstance(S);return this.cache.push(y),this.unserializeObject(y),y;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 no("Enum not found "+T);this.pos++;var E=this.readDigits(),N=I.__constructs__.slice()[E];if(null==N)throw new no("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 C=new Ha;this.cache.push(C);this.buf;for(var k=this.buf.charCodeAt(this.pos++);58==k;){var M=this.readDigits(),O=this.unserialize();C.h[M]=O,k=this.buf.charCodeAt(this.pos++)}if(104!=k)throw new no("Invalid IntMap format");return C;case 114:var F=this.readDigits();if(F<0||F>=this.cache.length)throw new no("Invalid reference");return this.cache[F];case 115:var R=this.readDigits(),U=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0))),H=0;P>4);var K=x[U.charCodeAt(P++)];G.b[H++]=255&(Y<<4|K>>2);var W=x[U.charCodeAt(P++)];G.b[H++]=255&(K<<6|W)}if(L>=2){var j=x[U.charCodeAt(P++)],V=x[U.charCodeAt(P++)];if(G.b[H++]=255&(j<<2|V>>4),3==L){var q=x[U.charCodeAt(P++)];G.b[H++]=255&(V<<4|q>>2)}}return this.pos+=R,this.cache.push(G),G;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 no("Enum not found "+X);var $=this.unserializeEnum(Z,this.unserialize());return this.cache.push($),$;case 120:throw no.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 La(e.left,e.key,e.value,new La(e.right,t,n,i)):new La(new La(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new La(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 La(new La(e,t,n,i.left),i.key,i.value,i.right):new La(new La(e,t,n,i.left.left),i.left.key,i.left.value,new La(i.left.right,i.key,i.value,i.right))}return new La(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return p.compare(e,t)},__class__:Pa};var La=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"]=La,La.__name__=["haxe","ds","TreeNode"],La.prototype={__class__:La};var Ba=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Ba.Left=function(e){var t=["Left",0,e];return t.__enum__=Ba,t.toString=i,t},Ba.Right=function(e){var t=["Right",1,e];return t.__enum__=Ba,t.toString=i,t},Ba.__empty_constructs__=[];var Ga=function(){Pa.call(this)};n["haxe.ds.EnumValueMap"]=Ga,Ga.__name__=["haxe","ds","EnumValueMap"],Ga.__interfaces__=[Ca],Ga.__super__=Pa,Ga.prototype=r(Pa.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 ja(new Yo(t).buffer)},ja.ofData=function(e){var t=e.hxBytes;return null!=t?t:new ja(e)},ja.fastGet=function(e,t){return e.bytes[t]},ja.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new no($a.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__:ja};var Va=function(){this.b=[]};n["haxe.io.BytesBuffer"]=Va,Va.__name__=["haxe","io","BytesBuffer"],Va.prototype={getBytes:function(){var e=new ja(new Yo(this.b).buffer);return this.b=null,e},__class__:Va};var qa=function(){};n["haxe.io.Input"]=qa,qa.__name__=["haxe","io","Input"],qa.prototype={readByte:function(){throw new no("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new no($a.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof no&&(e=e.val),!io.__instanceof(e,Za))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new ja(new zo(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new no($a.Blocked);n+=i,e-=i}return t},readFloat:function(){return eo.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?eo.i64ToDouble(t,e):eo.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__:qa};var Qa=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 no($a.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};n["haxe.io.BytesInput"]=Qa,Qa.__name__=["haxe","io","BytesInput"],Qa.__super__=qa,Qa.prototype=r(qa.prototype,{readByte:function(){if(0==this.len)throw new no(new Za);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new no($a.OutsideBounds);if(0==this.len&&n>0)throw new no(new Za);this.lene.length)throw new no($a.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 no($a.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(eo.floatToI32(e))},writeDouble:function(e){var t=eo.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 no($a.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new no($a.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new no($a.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__:Ja};var Xa=function(){this.b=new Va};n["haxe.io.BytesOutput"]=Xa,Xa.__name__=["haxe","io","BytesOutput"],Xa.__super__=Ja,Xa.prototype=r(Ja.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 no($a.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)},eo.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},eo.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)},eo.doubleToI64=function(e){var t=eo.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 to=function(){};n["haxe.rtti.Meta"]=to,to.__name__=["haxe","rtti","Meta"],to.getMeta=function(e){return e.__meta__},to.getFields=function(e){var t=to.getMeta(e);return null==t||null==t.fields?{}:t.fields};var no=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,no)};n["js._Boot.HaxeError"]=no,no.__name__=["js","_Boot","HaxeError"],no.wrap=function(e){return e instanceof Error?e:new no(e)},no.__super__=Error,no.prototype=r(Error.prototype,{__class__:no});var io=function(){};n["js.Boot"]=io,io.__name__=["js","Boot"],io.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=io.__nativeClassName(e);return null!=n?io.__resolveNativeClass(n):null},io.__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?",":"")+io.__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+" : "+io.__string_rec(e[f],t));return m+="\n"+(t=t.substring(1))+"}";case"string":return e;default:return String(e)}},io.__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 no("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new no("set() outside of range");for(var s=0,l=o.length;s223)return-256|n}}catch(e){if(e instanceof no&&(e=e.val),!io.__instanceof(e,Za))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 yo(Eo(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},No.prototype.on=No.prototype.addListener,No.prototype.once=function(e,t){if(!Ao(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},No.prototype.removeListener=function(e,t){var n,i,r,a;if(!Ao(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||Ao(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(bo(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},No.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(Ao(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},No.prototype.listeners=function(e){return this._events&&this._events[e]?Ao(this._events[e])?[this._events[e]]:this._events[e].slice():[]},No.listenerCount=function(e,t){return e._events&&e._events[t]?Ao(e._events[t])?1:e._events[t].length:0};Uo.exports;n.Math=Math;var Co=Co||{};Co.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 ko=Co.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 Mo=n.Int={__name__:["Int"]},Oo=n.Dynamic={__name__:["Dynamic"]},Fo=n.Float=Number;Fo.__name__=["Float"];var Ro=n.Bool=Boolean;Ro.__ename__=["Bool"];var Uo,xo=n.Class={__name__:["Class"]},Po={};(Uo={}).exports=null,Uo.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 Lo=Uo.exports,Bo={websocketsbinary:!0,audio:!1},Go={},Ho={},zo=t.ArrayBuffer||ao;null==zo.prototype.slice&&(zo.prototype.slice=ao.sliceImpl);var Yo=t.Uint8Array||oo._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_SCHEDULE_MESSAGE="notify_schedule_message",E.NOTIFY_PROCESSED_SCHEDULED_MESSAGE="notify_processed_scheduled_message",E.NOTIFY_DELETE_SCHEDULED_MESSAGE="notify_delete_scheduled_message",E.GET_SCHEDULED_MESSAGES_COMPLETED="get_scheduled_messages_completed",E.GET_SCHEDULED_MESSAGES_FAILED="get_scheduled_messages_failed",E.DELETE_SCHEDULED_MESSAGES_COMPLETED="delete_scheduled_messages_completed",E.SCHEDULE_MESSAGE_STARTED="schedule_message_started",E.SCHEDULE_MESSAGE_COMPLETED="schedule_message_completed",E.SCHEDULE_MESSAGE_FAILED="schedule_message_faileed",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",Y.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",ye.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},ye.NAME="ScheduleMessage",Te.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},Te.NAME="Search",Ee.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},Ee.NAME="SelectTalk",Ae.__meta__={fields:{api:{inject:null}}},Ae.NAME="Send",be.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},be.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",Oe.__meta__={fields:{api:{inject:null}}},Oe.NAME="UpdateUser",Fe.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Fe.NAME="UpdateUserPresences",Fe.MAX_USERS_PER_API=100,Re.__meta__={fields:{routing:{inject:null}}},Re.NAME="Url",qe.TalkAutoScrollDelay=1,qe.TalkAutoScrollImmediately=2,qe.TalkAutoScrollNone=3,qe.NotificationPopupTime5Sec=5,qe.TalksSortModeNewMessagesFirst="new_messages_first",qe.TalksSortModeUnreadMessagesFirst="unread_messages_first",qe.TalksSortModeOldMessagesFirst="old_messages_first",qe.DomainsSortModeNameOrderAsc="name_order_asc",qe.OLD_KEY_RIGHT_PANEL_OPENED="right_panel_opened",qe.OLD_KEY_RIGHT_PANEL_WIDTH="right_panel_width",qe.OLD_KEY_APP_LEFT_PANEL_OPENED="app_left_panel_opened",qe.NAME="browser_settings",Je.MAX_SIZE=72,Ze.INCOMING_TIME=6e4,et.DEFAULT_PRESENCE_EXPIRATION=3e5,nt.DEFAULT_TTL=3600,nt.DEFAULT_MAX_PARTICIPANTS=8,Ot.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",Hn.HISTORY_TAB_NAME="stamp-history",di.SIXTY_MINUTES=new hi(0,36e5),di.FIFTEEN_MINUTES=new hi(0,9e5),Qi.PREFIX="note-",Qi.nextDummyId=new hi(-1,-1),$i.CONTINUE_MARGIN_RATE=.1,cr.CHEKBOX_UNCHECKED="- [ ] ",cr.CHEKBOX_CHECKED="- [x] ",hr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dr.TU_REG=new o("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),dr.XTU_REG=new o("ッ","gm"),gr.EMERGENCY=0,gr.ALERT=1,gr.CRITICAL=2,gr.ERROR=3,gr.WARNING=4,gr.NOTICE=5,gr.INFO=6,gr.DEBUG=7,gr.level=6,gr._d=gr._nop,gr._i=null!=console?console.info.bind(console):gr._nop,gr._w=null!=console?console.warn.bind(console):gr._nop,gr._e=null!=console?console.error.bind(console):gr._nop,Tr.HIRAGANA_SMALL_A=12353,Tr.HIRAGANA_NN=12435,Tr.KATAKANA_SMALL_A=12449,Cr.NAME="accessTokenResolver",kr.NAME="Proxy",Mr.__meta__={fields:{settings:{inject:null},api:{inject:null}}},Or.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null}}},Or.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.123",Fr.UPDATE_VERSION="1.123_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,Ur.__meta__={fields:{apiCaller:{inject:null},dataStore:{inject:null},settings:{inject:null}}},Ur.NAME="apiNote",xr.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",zr.NAME="fileService",Yr.__meta__={fields:{settings:{inject:null}}},Kr.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},Kr.NAME="keywordWatcher",Kr.TALK_KEY_PREFIX="talk_",Kr.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:{dataStore:{inject:null}}},ca.NAME="userPresences",_a.__meta__={fields:{apiCaller:{inject:null}}},_a.NAME="wsApi",ya.NAME="Mediator",wa.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},wa.NAME="commandline",wa.DATA_SAVE_SPAN=5e3,Ia.INVALID_PARAMETER="INVALID_PARAMETER",Ia.FORBIDDEN="FORBIDDEN",Ia.NOT_FOUND="NOT_FOUND",Ia.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",Ia.CONFLICT="CONFLICT",Ia.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",Ia.UNKNOWN="UNKNOWN",ka._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},Fa.USE_CACHE=!1,Fa.USE_ENUM_INDEX=!1,Fa.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",xa.DEFAULT_RESOLVER=new Ua,xa.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",za.count=0,eo.i64tmp=new hi(0,0),io.__toStr={}.toString,oo.BYTES_PER_ELEMENT=1,lo.FLOAT_SINGLE_MIN=1.401298464324817e-45,lo.FLOAT_SINGLE_MAX=3.4028234663852886e38,lo.FLOAT_DOUBLE_MIN=5e-324,lo.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