var HW={D:"low",V:"medium",b:"high"};var JZ={V:"Normal",D:"Personal",r:"Private",b:"Company-Confidential"};var bX={H:0,r:4096,S:8192,h:16384,D:32768,q:65536,o:131072,V:262144,b:524288,l:1048576};var fW={D:"OPENMAIL",b:"SMTP",V:"MAPIPDL"};function yY(){this.r=null;this.K=bX.H;this.p=false;this.P=false;this.d=false;this.G=false;this.l=true;}function Z2(){return this.r;}yY.prototype.C=Z2;function uV(){return this.K;}yY.prototype.f=uV;function te(b,V){if(V){this.K|=b;}else{this.K&=~b;}}yY.prototype.S=te;function TQ(b){return ((this.K&b)!=0);}yY.prototype.W=TQ;function pH(b,V,D){if(hv(R7.D)){var r="Storing flags: "+V+" - messages: ";var H="";for(var S=0,len=b.length;S<len;S++){var h=b[S];H+=h.n();if(len<S+1){H+=",";}}qQ(r+H,R7.D);}var l=new X2.S(nW("soapmail"),false);var o=l.D("store",ax);var h=b[0];var q=h.C();var e="UIDVALIDITY("+q.Ws()+")";var d=0;var f=new Array();for(var S=0,len=b.length;S<len;S++){h=b[S];IZ.b(f,h.n());if((V&bX.o)!=0){if(h.W(bX.o)&&!D){d++;}else{if(!h.W(bX.o)&&D){d--;}}}h.S(V,D);}if(f.length==0){return ;}if(q.d8!=-1){q.d8+=d;}e+=f.join(",");o.D("mailbox",q.R());o.D("flags",V);o.D("command",D?"+":"-");o.D("messageset",e);l.b.add("no.report.faults",true);l.V.d();}yY.Q=pH;function f7(){return this.p;}yY.prototype.I=f7;function sA(){return this.P;}yY.prototype.H=sA;function zL(){return this.d;}yY.prototype.c=zL;function n8(){return this.G;}yY.prototype.L=n8;function Rj(){this.G=true;}yY.prototype.D=Rj;function ia(){this.G=false;}yY.prototype.N=ia;function Ir(){}yY.prototype.n=Ir;function dq(){}yY.prototype.Z=dq;function p3(){}yY.prototype.y=p3;function Tp(){}yY.prototype.V=Tp;function YX(){}yY.prototype.b=YX;function uo(){}yY.prototype.j=uo;function p1(){}yY.prototype.A=p1;function ZR(){}yY.prototype.h=ZR;function KB(){}yY.prototype.B=KB;function dv(){}yY.prototype.a=dv;function ti(){return this.B();}yY.prototype.s=ti;function xA(){return this.a();}yY.prototype.R=xA;function TH(){}yY.prototype.x=TH;function Mn(){}yY.prototype.t=Mn;function gu(){}yY.prototype.U=gu;function oO(){}yY.prototype.M=oO;function SZ(){}yY.prototype.w=SZ;function XG(){}yY.prototype.q=XG;function ie(){return (this.n()==null);}yY.prototype.X=ie;function kR(){var b=this.r;if(!b.c()){return true;}var V=b.SS();if(V==null){return false;}if((V&A9.e)==0&&((V&A9.V)==0||!this.W(bX.l))){return false;}return true;}yY.prototype.o=kR;function j9(){var b=this.r;if(!b.c()){return true;}if(!this.X()){if(!this.o()){return false;}}return b.p4();}yY.prototype.Y=j9;function Cv(){var b=null;function V(h,l){var o=h.D();var q=o.getElementsByTagName("headers").item(0);b=QM.o(q);}qQ("Getting full headers, message: "+this.n(),R7.D);var D=new X2.S(nW("soapmail"),false,V);D.b.add("no.report.faults",true);var r=D.D("getFullHeader",ax);var H=this.r;r.D("select",H.R());var S=r.D("message");S.setAttribute("UID",this.n());D.V.d();return b;}yY.prototype.F=Cv;function Kv(){}yY.prototype.e=Kv;function Aw(b){}yY.prototype.E=Aw;function P7(){this.O();this.p4=null;this.a4=null;this.i=false;}P7.prototype=XE(yY.prototype);P7.prototype.superClass=yY;P7.prototype.constructor=P7;P7.prototype.O=yY;function vR(){var b=new P7();b.p4=QM.K.createElement("message");return b;}P7.Ne=vR;function Sy(b,V,D){var r=new P7();r.p4=b;r.r=D?D.C():V;r.a4=D;if(D){r.l=false;r.p4.setAttribute("uid",D.n());}r.K=parseInt(b.getAttribute("flags"),10);return r;}P7.jU=Sy;function io(){return (this.a4!=null);}P7.prototype.T8=io;function xk(){return this.i;}P7.prototype.fT=xk;function JC(){this.i=true;}P7.prototype.kM=JC;function Mu(){var b=parseInt(this.p4.getAttribute("uid"),10);return isNaN(b)?null:b;}P7.prototype.n=Mu;function d9(b){this.p4.setAttribute("uid",b);}P7.prototype.rm=d9;function gS(){var b=this.p4.getAttribute("msgid");if(b==null||b.strip()==""){return this.p4.getAttribute("msgID");}else{return b;}}P7.prototype.Z=gS;function aT(){var b=this.p4.getAttribute("priority");if(b==null){b=HW.V;}return b;}P7.prototype.y=aT;function Mr(b){this.p4.setAttribute("priority",b);}P7.prototype.J=Mr;function Ci(){var b=this.p4.getAttribute("sensitivity");if(b==null){b=JZ.V;}return b;}P7.prototype.V=Ci;function ju(b){if(b==null||b==JZ.V){this.p4.removeAttribute("sensitivity");}else{this.p4.setAttribute("sensitivity",b);}}P7.prototype.z4=ju;function Gs(){return this.p4.getAttribute("sensitivityPrompt");}P7.prototype.T=Gs;function KJ(b){this.p4.setAttribute("sensitivityPrompt",b);}P7.prototype.Fh=KJ;function wV(){return this.p4.getAttribute("sensitivityBlock");}P7.prototype.Yu=wV;function E8(b){this.p4.setAttribute("sensitivityBlock",b);}P7.prototype.ZH=E8;function D0(){if(this.T8()){var V=this.m();return V.length>0;}else{return this.W(bX.V);}}P7.prototype.b=D0;function nQ(b){this.S(bX.V,b);}P7.prototype.SS=nQ;function HY(){return this.p4.getAttribute("subject");}P7.prototype.A=HY;function i4(){return this.p4.getAttribute("strippedSubject");}P7.prototype.h=i4;function mK(b){this.p4.setAttribute("subject",b);this.p4.setAttribute("strippedSubject",nf(b));}P7.prototype.k=mK;function cv(){var b=this.p4.getAttribute("received");if(b==null){return null;}var V=parseInt(b,10);return isNaN(V)?null:V;}P7.prototype.R=cv;function wg(){var b=this.R();return b?new Date(b):null;}P7.prototype.s=wg;function hk(){var b=this.p4.getAttribute("sent");if(b==null){return null;}var V=parseInt(b,10);return isNaN(V)?null:V;}P7.prototype.a=hk;function CE(){var b=this.a();return b?new Date(b):null;}P7.prototype.B=CE;function xt(b){var V=b.getTime();this.p4.setAttribute("sent",V);}P7.prototype.Km=xt;function Tw(){var b=QM.r(this.p4,"size","1024");b=parseInt(b,10);return isNaN(b)?null:b;}P7.prototype.x=Tw;function GM(b){QM.p(this.p4,"size",b);this.p4.setAttribute("sizeDisplay",b+strings.kilobytes_unit);}P7.prototype.Fe=GM;function wi(){return this.p4.getAttribute("sizeDisplay");}P7.prototype.h8=wi;function uC(b){this.p4.setAttribute("deliveryReceipt",b.toString());}P7.prototype.d8=uC;function Bu(b){this.p4.setAttribute("returnReceipt",b.toString());}P7.prototype.c6=Bu;function ul(){return this.p4.getAttribute("messageClass");}P7.prototype.t=ul;function wE(b){this.p4.setAttribute("messageClass",b);}P7.prototype.sa=wE;function pn(){var b=QM.r(this.p4,"preview");if(b==null||b.strip()==""){return null;}return b;}P7.prototype.j=pn;function yZ(){var b=QM.S(this.p4,"from",false);if(b==null){return null;}var V=QM.r(b,"phrase");var D=QM.r(b,"addr");var r=this.p4.getAttribute("fromOmAddress");return new KC(V,D,r);}P7.prototype.U=yZ;function vQ(b){if(b){var V=this.U();return (V!=null?V.q():"");}else{return this.p4.getAttribute("fromDisplay");}}P7.prototype.M=vQ;function sH(b){var V=QM.S(this.p4,"from",true);var D=b.o();if(D!=null){QM.p(V,"phrase",D);}var r=b.S();QM.p(V,"addr",r);}P7.prototype.Jz=sH;function Ah(){var b=QM.S(this.p4,"sender",false);if(b==null){return null;}var V=QM.r(b,"phrase");var D=QM.r(b,"addr");var r=this.p4.getAttribute("senderOmAddress");return new KC(V,D,r);}P7.prototype.w=Ah;function k5(b){var V=QM.S(this.p4,"sender",true);var D=b.o();if(D!=null){QM.p(V,"phrase",D);}var r=b.S();QM.p(V,"addr",r);}P7.prototype.KK=k5;function mG(){var b=QM.S(this.p4,"replyto",false);if(b==null){return null;}var V=QM.r(b,"phrase");var D=QM.r(b,"addr");return new KC(V,D);}P7.prototype.lm=mG;function Bf(b){var V=QM.S(this.p4,"replyto",true);var D=b.o();if(D!=null){QM.p(V,"phrase",D);}var r=b.S();QM.p(V,"addr",r);}P7.prototype.lc=Bf;function Mz(b){this.p4.setAttribute("In-Reply-To",b);}P7.prototype.SD=Mz;function Rn(){return QM.r(this.p4,"messageNotification");}P7.prototype.ZD=Rn;function tk(){var b=QM.S(this.p4,"to",false);return (b!=null?Lx.H(b):null);}P7.prototype.A9=tk;function mb(b,V){if(b){var D=this.A9();return (D!=null?D.r(b,V):"");}else{var r=this.p4.getAttribute("toDisplay");return r!=null?r:"";}}P7.prototype.Pb=mb;function vO(){var b=QM.S(this.p4,"cc",false);return (b!=null?Lx.H(b):null);}P7.prototype.pB=vO;function kf(){var b=QM.S(this.p4,"bcc",false);return (b!=null?Lx.H(b):null);}P7.prototype.U6=kf;function Pg(){var b=new Array();var V=this.A9();if(V){b=b.concat(V.V());}var D=this.pB();if(D){b=b.concat(D.V());}var r=this.U6();if(r){b=b.concat(r.V());}for(var H=0;H<b.length;H++){var S=b[H];for(var h=H+1;h<b.length;h++){var l=b[h];if(l.S().toLowerCase()==S.S().toLowerCase()){b=IZ.e(b,h);h--;}}}return b;}P7.prototype.z=Pg;function Z6(b,V,D,r){if(this.p||!this.l){return ;}var H=this.r;qQ("Loading body for msg: "+this.n(),R7.D);var S=new X2.S(nW("soapmail"),b,ps(this,this.v),ps(this,this.fG));S.b.add("onSuccessFn",V);S.b.add("onErrorFn",D);S.b.add("onDeletedFn",r);S.b.add("no.report.faults",true);var h=S.D("fetchMessageBody",ax);h.D("select",H.R());h.D("search",this.n());this.p=true;S.V.d();}P7.prototype.q=Z6;function SV(b,V){var D=b.D();var r=D.getElementsByTagName("message").item(0);this.p=false;if(r.getAttribute("deleted")=="true"){this.d=true;var H=this.r;H.I(this);var S=V.item("onDeletedFn");if(S){S(this);}return ;}var h=r.getAttribute("fromOmAddress");if(h){this.p4.setAttribute("fromOmAddress",h);}var l=r.getAttribute("senderOmAddress");if(l){this.p4.setAttribute("senderOmAddress",l);}var o=QM.S(r,"body",false);this.p4.appendChild(o);var q=QM.S(r,"parts",false);var e=QM.o(q);var d=/^\(\d+ (\d+) \((.*)\)\)$/;var f=e.match(d);var N=f[2];var p=/BODY\[([^\]]+)\] \{\d+\}/g;if(N!=null&&N.strip()!=""){var B=N.match(p);var K=B.length;var C=/\d([\.]*\d+)*/;for(var W=0;W<K;W++){var t=B[W];var Y=t.match(C);var a=Y[0];var Z=QM.q(this.p4,".//part[@partSpec = \""+a+"\"] | .//body[@partSpec = \""+a+"\"]");var A=QM.q(r,".//part[@partSpec = \""+a+"\"]");var I=QM.o(A);QM.N(Z,I);}}this.l=false;var L=V.item("onSuccessFn");if(L){L(this);}}P7.prototype.v=SV;function py(b,V){qQ("Failure loading message!",R7.r);if(hv(R7.D)){var D=QM.B(b.getBody());if(null!=D){qQ("Load body failure on message with response:\n"+D,R7.D);}else{qQ("Load body failure, and response cannot be serialized.",R7.D);}}this.p=false;this.P=true;var r=V.item("onErrorFn");if(r){r(this);}}P7.prototype.fG=py;function oc(b,V,D,r){var H=V.childNodes;var S=H.length;for(var h=0;h<S;h++){var l=H.item(h);if(l.nodeName!="part"){return null;}var o=P7.qt(b,l,D,r);if(o!=null){return o;}var q=Ri.B(l,b);if(q.e()==D&&q.o()==r){return q;}}}P7.qt=oc;function c4(b,V){var D=QM.S(this.p4,"body",false);if(D==null){return null;}return P7.qt(this,D,b,V);}P7.prototype.u=c4;function Na(){var b=this;function V(H,S){var h=Ri.B(H,b);if(h.e()=="text"&&(h.o()=="html"||h.o()=="plain")&&h.b()!="attachment"){IZ.b(S,h);}else{if(h.e()=="multipart"){if(h.o()=="alternative"){var l=P7.qt(b,H,"text","html");if(l){IZ.b(S,l);}else{var o=P7.qt(b,H,"text","plain");if(o){IZ.b(S,o);}}}else{if(h.o()=="mixed"){var q=H.childNodes;var e=q.length;for(var d=0;d<e;d++){var f=H.childNodes.item(d);if(f.nodeName!="part"){continue;}var N=Ri.B(f,b);if(N.e()=="multipart"){V(f,S);}else{if(N.b()!="attachment"){IZ.b(S,N);}}}}else{for(var d=0;d<H.childNodes.length;d++){var f=H.childNodes.item(d);V(f,S);}}}}}}var D=QM.S(this.p4,"body",false);if(D==null){return null;}var r=new Array();V(D,r);return r;}P7.prototype.bO=Na;function Y5(){var b=QM.S(this.p4,"body",false);if(b==null){return null;}var V=Ri.B(b,this);if(V.o()=="scalix-properties"){return V;}var D=QM.q(b,".//part[@subtype = \"scalix-properties\"]");return D!=null?Ri.B(D,this):null;}P7.prototype.wY=Y5;function np(){var b=QM.S(this.p4,"body",true);return Ri.B(b,this);}P7.prototype.Ws=np;function oe(){var b=this;function V(H,S){var h=Ri.B(H,b);if(h.e()=="message"&&h.o()=="rfc822"){IZ.b(S,h);}else{if(H.hasChildNodes()){for(var l=0;l<H.childNodes.length;l++){var o=H.childNodes.item(l);if(o.nodeType!=ud.q){continue;}V(o,S);}}else{if(h.b()=="attachment"){IZ.b(S,h);}}}}var D=new Array();var r=QM.S(this.p4,"body",false);if(r!=null){V(r,D);}return D;}P7.prototype.m=oe;function Ha(b){var V=QM.S(this.p4,"body",false);if(V==null){return null;}var D=Ri.B(V,this);if(D.V()==b){return D;}var r=QM.q(V,".//part[@partSpec = \""+b+"\"]");return (r!=null?Ri.B(r,this):null);}P7.prototype.Pp=Ha;function Jj(b){var V=QM.S(this.p4,"body",false);if(V==null){return null;}var D=Ri.B(V,this);if(D.q()==b){return D;}var r=QM.q(V,".//part[@cid = \""+b+"\"]");return (r!=null?Ri.B(r,this):null);}P7.prototype.U1=Jj;function r5(){return this.p4.getAttribute("attachid");}P7.prototype.e=r5;function He(b){this.p4.setAttribute("attachid",b);}P7.prototype.E=He;function Gw(b,V,D){this.D();if(b==null){b=true;}qQ("Saving message.",R7.D);var r=new X2.S(nW("soapmail"),b,ps(this,this.e6),ps(this,this.rl));var H=r.D("save",ax);var S=QM.K.createElement("messages");S.appendChild(this.p4.cloneNode(true));H.h(S);r.b.add("onSuccessFn",V);r.b.add("onErrorFn",D);r.b.add("no.report.faults",true);r.V.d();}P7.prototype.wB=Gw;function F0(b,V){var D=b.D().getElementsByTagName("result");var r=D.item(0);var H=parseInt(r.getAttribute("newuid"),10);this.rm(H);this.N();var S=V.item("onSuccessFn");if(S){S(this);}}P7.prototype.e6=F0;function Fu(b,V){this.N();var D=V.item("onErrorFn");if(D){D(this);}}P7.prototype.rl=Fu;function Ri(){this.l=null;this.N=null;}function Gq(b){var V=new Ri();V.N=b.N;V.l=b.l.ownerDocument.createElement("part");b.l.appendChild(V.l);return V;}Ri.K=Gq;function Fi(b,V){var D=new Ri();D.l=b;D.N=V;return D;}Ri.B=Fi;function nC(){return this.l.getAttribute("type");}Ri.prototype.e=nC;function YI(b){this.l.setAttribute("type",b);}Ri.prototype.D=YI;function FX(){return this.l.getAttribute("subtype");}Ri.prototype.o=FX;function Cr(b){this.l.setAttribute("subtype",b);}Ri.prototype.h=Cr;function s3(){return this.l.getAttribute("partSpec");}Ri.prototype.V=s3;function y2(){return this.l.getAttribute("disposition");}Ri.prototype.b=y2;function bf(b){this.l.setAttribute("disposition",b);}Ri.prototype.p=bf;function oG(){if(this.e()=="message"&&this.o()=="rfc822"){var b=this.l.firstChild;if(b){return P7.jU(b,null,this.N);}else{return null;}}else{return QM.o(this.l);}}Ri.prototype.H=oG;function vb(b){QM.N(this.l,b);}Ri.prototype.r=vb;function sM(){return this.l.getAttribute("cid");}Ri.prototype.q=sM;function sx(b){this.l.setAttribute("cid",b);}Ri.prototype.S=sx;function z2(){return this.l.getAttribute("filename");}Ri.prototype.f=z2;function RC(b){this.l.setAttribute("filename",b);}Ri.prototype.d=RC;function Lx(){this.b=null;}function p7(b,V){var D=new Lx();D.b=b.p4.ownerDocument.createElement(V);b.p4.appendChild(D.b);return D;}Lx.S=p7;function IW(b){var V=new Lx();V.b=b;return V;}Lx.H=IW;function wc(b,V){var r=this.b.ownerDocument.createElement("recipient");this.b.appendChild(r);var H=b.o();if(H!=null){QM.p(r,"phrase",H);}if(V==fW.D){var S=b.r();if(S!=null){var h=QM.S(r,"addr",true);QM.N(h,S);h.setAttribute("type","OPENMAIL");}}else{var S=b.S();if(S!=null){QM.p(r,"addr",S);}}}Lx.prototype.D=wc;function xK(){var b=new Array();var D=this.b.getElementsByTagName("recipient");for(var r=0,len=D.length;r<len;r++){var H=D.item(r);var S=QM.r(H,"phrase");var h=QM.r(H,"addr");IZ.b(b,new KC(S,h));}return b;}Lx.prototype.V=xK;function OR(b,V){var D=new Array();var H=this.V();for(var S=0,len1=H.length;S<len1;S++){var h=H[S];var l=h.S();var o=false;if(V!=null){for(var q=0,len2=V.length;q<len2;q++){var e=V[q];if(e.S().toLowerCase()==l.toLowerCase()){o=true;break;}}}if(!o){var d=h.o();if(!d){d=h.S();}IZ.b(D,b?h.q():d);}}return D.join(" ; ");}Lx.prototype.r=OR;function gv(b){var V=b.U();return V!=null?V.o():null;}function PX(b){var V=b.U();return V!=null?V.S():null;}function IY(b){var V=b.U();return V!=null?V.r():null;}function kN(b){var V=b.w();return V!=null?V.o():null;}function jC(b){var V=b.w();return V!=null?V.S():null;}function zv(b){var V=b.w();return V!=null?V.r():null;}function Qj(b,V){var D=b.U();if(D==null){return "";}var r=b.w();var H=false;if(r!=null){var S=D.S();var h=r.S();H=(S.toLowerCase()!=h.toLowerCase());}var l=new Array();var o;var q;o=D.o();if(!o){o=D.S();}if(H&&r!=null){q=r.o();if(!q){q=r.S();}l[0]=V?D.q():o;l[1]=V?r.q():q;}else{if(D){l[0]=V?D.q():o;}}return l;}function hB(b,V){if(b!=null&&il(b,P7)){var D=b;return D.M(V);}else{return "";}}function IK(b,V,D){if(b!=null&&il(b,P7)){var r=b;return r.Pb(V,D);}else{if(b!=null&&il(b,br)){var H=b;return H.O();}else{return "";}}}function eD(b){return b.A9();}function bU(b,V,D){if(il(b,P7)){var r=b;var H=r.pB();return (H!=null?H.r(V,D):"");}else{if(il(b,br)){var S=b;return S.tJ();}else{return "";}}}function jr(b){return b.pB();}function xJ(b,V,D){if(il(b,P7)){var r=b;var H=r.U6();return (H!=null?H.r(V,D):"");}else{if(il(b,br)){var S=b;return S.getDisplayBcc();}else{return "";}}}function Te(b){return b.A();}function qL(b){return b.j();}function Fa(b){return b.h();}function kl(b){return b.R();}function zF(b){return b.a();}function E4(b){function V(l){var o=1;if(l!=null){o=Math.round(l/1024);if(o==0&&l>0){o=1;}}return o;}if(il(b,P7)){var D=b;return D.h8();}else{if(il(b,br)){var r=b;var H=V(r.x());return H+strings.kilobytes_unit;}else{if(il(b,xT)){var S=b;var H=V(S.x());return H+strings.kilobytes_unit;}else{if(il(b,Gp)){var h=b;var H=V(h.x());return H+strings.kilobytes_unit;}}}}}function Zn(b){var V=b.C();if(V!=null){return V.R();}else{return "";}}function nf(b){return b==null?"":b.replace(/^\s*\w{1,3}:\s*/i,"");}function Bq(b){switch(b){case JZ.V:return strings.sensitivity_value_normal;break;case JZ.D:return strings.sensitivity_value_personal;break;case JZ.r:return strings.sensitivity_value_private;break;case JZ.b:return strings.sensitivity_value_confidential;break;default:return strings.sensitivity_value_normal;}return strings.sensitivity_value_normal;}