(function(){var a=Ext.Button.prototype.onClick;Ext.override(Ext.Button,{onClick:function(b){b=new Ext.EventObjectImpl(b);this.focus();a.call(this,b);this.isDestroyed||this.blur()},template:new Ext.Template('<div id="{4}" class="x-btn {3}"><div class="{1}">','<em class="{2}" unselectable="on"><button type="{0}"></button></em>',"</div></div>")})})();
(function(){var a=Ext.Component.prototype.initComponent,b=Ext.Component.prototype.destroy;Ext.override(Ext.Component,{stateful:false,statefulRelativeDimensions:true,statefulName:undefined,initComponent:function(){if(this.stateful!==false){if(!this.stateId)this.stateId=Ext.id(null,"state-");Ext.state.Manager.register(this)}a.apply(this,arguments)},getStateName:function(){var c=this.statefulName;c||(c=this.getXType().match(/(?:zarafa\.)?(.*)/)[1]);return c},destroy:function(){if(this.plugins)for(var c in this.plugins){var f=
this.plugins[c];f instanceof Ext.util.Observable&&f.purgeListeners()}this.stateful!==false&&Ext.state.Manager.unregister(this);b.apply(this,arguments)}})})();(function(){Ext.override(Ext.Container,{bufferResize:false})})();
(function(){Ext.Element.addMethods({addUnits:function(a){if(Ext.isEmpty(a)||a=="auto")a=a||"";else if(isNaN(a))a="";else/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i.test(a)||(a+=this.defaultUnit||"px");return a},swallowEvent:function(a,b){var c=this,f=b===true?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(a)){Ext.each(a,function(j){c.on(j,f,this)});return c}c.on(a,f,this);return c},swallowEventHandler:function(a){a.stopPropagation()},swallowEventHandlerPreventDefault:function(a){a.stopPropagation();
a.preventDefault()},spitOutEvent:function(a,b){var c=this,f=b===true?this.swallowEventHandlerPreventDefault:this.swallowEventHandler;if(Ext.isArray(a)){Ext.each(a,function(j){c.un(j,f,this)});return c}c.un(a,f,this);return c},selectable:function(){this.dom.unselectable="off";return this.spitOutEvent("selectstart",true).applyStyles("-moz-user-select:text;-khtml-user-select:text;").removeClass("x-unselectable")},clearClass:function(){this.dom.className=""}})})();
(function(){Ext.apply(Ext.EventManager,function(){function a(d){var g=false,e=0,i=A.length,m=false,k;if(d){if(d.getElementById||d.navigator){for(;e<i;++e){k=A[e];try{if(k.el===d){g=k.id;break}}catch(l){}}if(!g){g=Ext.id(d);A.push({id:g,el:d});m=true}}else g=Ext.id(d);if(!Ext.elCache[g]){Ext.Element.addToCache(new Ext.Element(d),g);if(m)Ext.elCache[g].skipGC=true}}return g}function b(d,g,e,i,m,k){d=Ext.getDom(d);var l=a(d);l=Ext.elCache[l].events;var o;o=u.on(d,g,m);l[g]=l[g]||[];l[g].push([e,m,k,
o,i]);if(d.addEventListener&&g=="mousewheel"){var p=["DOMMouseScroll",m,false];d.addEventListener.apply(d,p);Ext.EventManager.addListener(B,"unload",function(){d.removeEventListener.apply(d,p)})}d==r&&g=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.addListener(m)}function c(){if(window!=top)return false;try{r.documentElement.doScroll("left")}catch(d){return false}n();return true}function f(){if(Ext.isIE&&c())return true;if(r.readyState==F){n();return true}x||(y=setTimeout(arguments.callee,
2));return false}function j(){C||(C=Ext.query("style, link[rel=stylesheet]"));if(C.length==r.styleSheets.length){n();return true}x||(y=setTimeout(arguments.callee,2));return false}function h(){r.removeEventListener(z,arguments.callee,false);j()}function n(){if(!x){x=true;y&&clearTimeout(y);G&&r.removeEventListener(z,n,false);Ext.isIE&&f.bindIE&&r.detachEvent("onreadystatechange",f);u.un(B,"load",arguments.callee)}if(s&&!Ext.isReady){Ext.isReady=true;s.fire();s.listeners=[]}}function t(d,g){return function(){var e=
Ext.toArray(arguments);g.target==Ext.EventObject.setEvent(e[0]).target&&d.apply(this,e)}}function w(d,g,e){return function(i){e.delay(g.buffer,d,null,[new Ext.EventObjectImpl(i)])}}function H(d,g,e,i,m){return function(k){Ext.EventManager.removeListener(g,e,i,m);d(k)}}function I(d,g,e){return function(i){var m=new Ext.util.DelayedTask(d);if(!e.tasks)e.tasks=[];e.tasks.push(m);m.delay(g.delay||10,d,null,[new Ext.EventObjectImpl(i)])}}function D(d,g,e,i,m){function k(q){if(Ext){q=Ext.EventObject.setEvent(q);
var E;if(l.delegate){if(!(E=q.getTarget(l.delegate,o)))return}else E=q.target;l.stopEvent&&q.stopEvent();l.preventDefault&&q.preventDefault();l.stopPropagation&&q.stopPropagation();if(l.normalized===false)q=q.browserEvent;i.call(m||o,q,E,l)}}var l=!e||typeof e=="boolean"?{}:e,o=Ext.getDom(d),p;i=i||l.fn;m=m||l.scope;if(!o)throw'Error listening for "'+g+'". Element "'+d+"\" doesn't exist.";if(l.target)k=t(k,l);if(l.delay)k=I(k,l,i);if(l.single)k=H(k,o,g,i,m);if(l.buffer){p=new Ext.util.DelayedTask(k);
k=w(k,l,p)}b(o,g,i,p,k,m);return k}var s,y,x=false,G=Ext.isGecko||Ext.isWebKit||Ext.isSafari,u=Ext.lib.Event,r=document,B=window,z="DOMContentLoaded",F="complete",J=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,A=[],C,v={addListener:function(d,g,e,i,m){if(typeof g=="object"){var k;for(k in g){e=g[k];J.test(k)||(Ext.isFunction(e)?D(d,k,g,e,g.scope):D(d,k,e))}}else D(d,g,m,e,i)},removeListener:function(d,g,e,i){d=Ext.getDom(d);var m=a(d),k=d&&Ext.elCache[m].events[g]||
[],l,o,p;l=0;for(o=k.length;l<o;l++)if(Ext.isArray(p=k[l])&&p[0]==e&&(!i||p[2]==i)){p[4]&&p[4].cancel();if(i=e.tasks&&e.tasks.length){for(;i--;)e.tasks[i].cancel();delete e.tasks}e=p[1];u.un(d,g,u.extAdapter?p[3]:e);e&&d.addEventListener&&g=="mousewheel"&&d.removeEventListener("DOMMouseScroll",e,false);e&&d==r&&g=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.removeListener(e);k.splice(l,1);k.length===0&&delete Ext.elCache[m].events[g];for(i in Ext.elCache[m].events)return false;Ext.elCache[m].events=
{};return false}},removeAll:function(d){d=Ext.getDom(d);var g=a(d),e=(Ext.elCache[g]||{}).events||{},i,m,k,l,o,p,q;for(l in e)if(e.hasOwnProperty(l)){i=e[l];m=0;for(k=i.length;m<k;m++){o=i[m];o[4]&&o[4].cancel();if(o[0].tasks&&(p=o[0].tasks.length)){for(;p--;)o[0].tasks[p].cancel();delete o.tasks}q=o[1];u.un(d,l,u.extAdapter?o[3]:q);d.addEventListener&&q&&l=="mousewheel"&&d.removeEventListener("DOMMouseScroll",q,false);q&&d==r&&l=="mousedown"&&Ext.EventManager.stoppedMouseDownEvent.removeListener(q)}}if(Ext.elCache[g])Ext.elCache[g].events=
{}},getListeners:function(d,g){d=Ext.getDom(d);var e=a(d);return(e=(Ext.elCache[e]||{}).events||{})&&e[g]?e[g]:null},purgeElement:function(d,g,e){d=Ext.getDom(d);var i=a(d);i=(Ext.elCache[i]||{}).events||{};var m,k;if(e){if(i&&i.hasOwnProperty(e)){m=i[e];i=0;for(k=m.length;i<k;i++)Ext.EventManager.removeListener(d,e,m[i][0])}}else Ext.EventManager.removeAll(d);if(g&&d&&d.childNodes){i=0;for(k=d.childNodes.length;i<k;i++)Ext.EventManager.purgeElement(d.childNodes[i],g,e)}},_unload:function(){var d;
for(d in Ext.elCache)Ext.EventManager.removeAll(d);delete Ext.elCache;delete Ext.Element._flyweights;var g,e,i=Ext.lib.Ajax;typeof i.conn=="object"?g=i.conn:g={};for(e in g)(d=g[e])&&i.abort({conn:d,tId:e})},onDocumentReady:function(d,g,e){if(Ext.isReady){s||(s=new Ext.util.Event);s.addListener(d,g,e);s.fire();s.listeners=[]}else{if(!s){s||(s=new Ext.util.Event);G&&r.addEventListener(z,n,false);if(Ext.isIE){if(!f()){f.bindIE=true;r.attachEvent("onreadystatechange",f)}}else if(Ext.isOpera)r.readyState==
F&&j()||r.addEventListener(z,h,false);else Ext.isWebKit&&f();u.on(B,"load",n)}e=e||{};e.delay=e.delay||1;s.addListener(d,g,e)}},fireDocReady:n};v.on=v.addListener;v.un=v.removeListener;v.stoppedMouseDownEvent=new Ext.util.Event;return v}())})();(function(){Ext.apply(Ext.EventObjectImpl.prototype,{SEMI_COLON:186,EQUAL_SIGN:187,COMMA:188,DASH:189,PERIOD:190,FORWARD_SLASH:191,OPEN_BRACKET:219,BACK_SLASH:220,CLOSE_BRACKET:221,SINGLE_QUOTE:222})})();
(function(){Ext.apply(Ext.Fx,{fxUnwrap:function(a,b,c){var f=this.dom;Ext.fly(f).clearPositioning();Ext.fly(f).setPositioning(b);if(!c.wrap)if(b=Ext.fly(a).dom.parentNode){b.insertBefore(f,a);Ext.fly(a).remove()}}});Ext.Element.addMethods(Ext.Fx)})();
(function(){var a=Ext.TabPanel.prototype.onStripMouseDown;Ext.override(Ext.TabPanel,{itemTpl:new Ext.Template('<li class="{cls}" id="{id}">','<a href="#" class="x-tab-strip-focus"></a>','<a class="x-tab-strip-close"></a>','<a class="x-tab-right">','<em class="x-tab-left">','<span class="x-tab-strip-inner">','<span class="x-tab-strip-text {iconCls}">{text}</span>',"</span>","</em>","</a>","</li>",{disableFormats:true,compiled:true}),onStripMouseDown:function(b){var c=new Ext.EventObjectImpl(b);b=this.findTargets(b);
if(b.el)(b=Ext.get(b.el).child("a.x-tab-strip-focus"))&&b.focus();a.call(this,c)}})})();(function(){var a=Ext.Tip.prototype.doAutoWidth;Ext.override(Ext.Tip,{doAutoWidth:function(){a.call(this,Ext.isIE?1:0)}})})();(function(){var a=Ext.Toolbar.TextItem.prototype.onRender;Ext.override(Ext.Toolbar.TextItem,{onRender:function(){a.apply(this,arguments);this.el&&this.el.unselectable()}})})();
(function(){var a=Ext.data.Node.prototype.appendChild,b=Ext.data.Node.prototype.removeChild;Ext.override(Ext.data.Node,{appendChild:function(){this.leaf=false;return a.apply(this,arguments)},removeChild:function(){var c=b.apply(this,arguments);if(!this.hasChildNodes())this.leaf=true;return c}})})();
(function(){var a=function(b){return b!==undefined&&b!==null&&b!==""?parseInt(b,10):this.useNull?null:0};Ext.data.Types.INT.convert=a;Ext.data.Types.INTEGER.convert=a;a=function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(b,10):this.useNull?null:0};Ext.data.Types.FLOAT.convert=a;Ext.data.Types.NUMBER.convert=a})();Ext.override(Ext.dd.DD,{scroll:false});(function(){Ext.apply(Ext.dd.DragDropMgr,{getGroupDDById:function(a,b){if(this.ids[a]&&this.ids[a][b])return this.ids[a][b];return null}})})();
(function(){var a=Ext.dd.DragSource.prototype.onDragOver,b=Ext.dd.DragSource.prototype.onDragOut,c=Ext.dd.DragSource.prototype.onDragDrop;Ext.override(Ext.dd.DragSource,{onDragEnter:function(f,j){this.cachedTarget&&this.onDragOut(f,this.cachedTarget.id);var h;if((this.cachedTarget=h=this.ddGroup?Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,j):Ext.dd.DragDropMgr.getDDById(j))&&this.beforeDragEnter(h,f,j)!==false){h.isNotifyTarget?this.proxy.setStatus(h.notifyEnter(this,f,this.dragData)):this.proxy.setStatus(this.dropAllowed);
this.afterDragEnter&&this.afterDragEnter(h,f,j)}},onDragOver:function(f,j){this.cachedTarget||this.onDragEnter(f,j);this.cachedTarget=this.cachedTarget||Ext.dd.DragDropMgr.getGroupDDById(this.ddGroup,j);return a.apply(this,arguments)},onDragOut:function(){if(this.cachedTarget)return b.apply(this,arguments)},onDragDrop:function(){if(this.cachedTarget)return c.apply(this,arguments)}})})();
(function(){Ext.override(Ext.form.BasicForm,{updateRecord:function(a){a.beginEdit();var b,c;a.fields.each(function(f){if(b=this.findField(f.name)){c=b.getValue();if(Ext.type(c)!==false&&c.getGroupValue)c=c.getGroupValue();else if(b.isSingleValued!==true&&b.eachItem){c=[];b.eachItem(function(j){c.push(j.getValue())})}a.set(f.name,c)}},this);a.endEdit();return this},setValues:function(a){if(Ext.isArray(a))for(var b=0,c=a.length;b<c;b++){var f=a[b],j=this.findField(f.id);if(j)if(!j.hasFocus||j.originalValue==
j.el.dom.value){j.setValue(f.value);if(this.trackResetOnLoad)j.originalValue=j.getValue()}}else for(c in a)if(!Ext.isFunction(a[c])&&(b=this.findField(c)))if(!b.hasFocus||b.originalValue==b.el.dom.value){b.setValue(a[c]);if(this.trackResetOnLoad)b.originalValue=b.getValue()}return this}})})();
(function(){var a=Ext.form.Checkbox.prototype.onRender;Ext.override(Ext.form.Checkbox,{onRender:function(){a.apply(this,arguments);this.wrap.addClass("x-form-item");if(this.boxLabel&&this.el){var b=Ext.query(".x-form-cb-label",this.el.parent().dom)[0];b&&Ext.get(b).unselectable()}}})})();
(function(){var a=Ext.form.ComboBox.prototype.initList;Ext.override(Ext.form.ComboBox,{initList:function(){if(!this.tpl)this.tpl='<tpl for="."><div class="x-combo-list-item">{'+this.displayField+":htmlEncode}</div></tpl>";a.apply(this,arguments)}})})();(function(){var a=Ext.form.DateField.prototype.getValue;Ext.override(Ext.form.DateField,{getValue:function(){var b=a.apply(this,arguments);return Ext.isEmpty(b)?null:b},processValue:function(b){return Ext.isEmpty(b)?"":b}})})();
(function(){Ext.override(Ext.form.DisplayField,{cls:"x-form-item"})})();(function(){Ext.override(Ext.form.FormPanel,{labelAlign:"right"})})();
(function(){var a=Ext.form.HtmlEditor.prototype.createToolbar,b=Ext.form.HtmlEditor.prototype.initEditor;Ext.override(Ext.form.HtmlEditor,{createToolbar:function(){a.apply(this,arguments);this.getToolbar().layout.overflowTabIndex=-1;if(this.enableFont&&!Ext.isSafari2){var c=Ext.DomQuery.select(".x-font-select",this.tb.getEl().dom);Ext.isEmpty(c)||c[0].setAttribute("tabindex","-1")}},onFirstFocus:function(){this.activated=true;this.disableItems(this.readOnly);this.fireEvent("activate",this)},fixKeys:function(){if(Ext.isIE)return function(c){var f=
c.getKey(),j=this.getDoc(),h;if(f==c.TAB){c.stopEvent();f=this.win.getSelection();if(f.getRangeAt&&f.rangeCount){h=f.getRangeAt(0);h.deleteContents();c=j.createElement("div");c.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;";j=j.createDocumentFragment();for(var n,t;n=c.firstChild;)t=j.appendChild(n);h.insertNode(j);if(t){h=h.cloneRange();h.setStartAfter(t);h.collapse(true);f.removeAllRanges();f.addRange(h)}}this.deferFocus()}else if(f==c.ENTER){f=this.win.getSelection();if(f.getRangeAt&&f.rangeCount){h=f.getRangeAt(0);
h.deleteContents();n=h.commonAncestorContainer;if(!n||n.nodeName.toLowerCase()!="li"&&n.parentNode.nodeName.toLowerCase()!="li"){c.stopEvent();c=j.createElement("div");c.innerHTML="<br />";for(j=j.createDocumentFragment();n=c.firstChild;)t=j.appendChild(n);h.insertNode(j);if(t){h=h.cloneRange();h.setStartAfter(t);h.collapse(false);f.removeAllRanges();f.addRange(h)}}}}};else if(Ext.isOpera)return function(c){if(c.getKey()==c.TAB){c.stopEvent();this.win.focus();this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");
this.deferFocus()}};else if(Ext.isWebKit)return function(c){if(c.getKey()==c.TAB){c.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}}}(),initEditor:function(){b.apply(this,arguments);this.getWin().addEventListener("dragover",Zarafa.onWindowDragDrop,false);this.getWin().addEventListener("drop",Zarafa.onWindowDragDrop,false)}})})();
(function(){var a=Ext.form.Label.prototype.onRender;Ext.override(Ext.form.Label,{cls:"x-form-item-label",onRender:function(){a.apply(this,arguments);this.positionEl=this.el.wrap({cls:"x-form-item"});this.el.unselectable()}})})();(function(){var a=/^(100?|\d?\d)?%?$/;Ext.apply(Ext.form.VTypes,{percentage:function(b){return a.test(b)},percentageText:_("Value must be between 0% to 100%")})})();
(function(){var a=Ext.grid.GridPanel.prototype.onClick;Ext.override(Ext.grid.GridPanel,{onClick:function(){a.apply(this,arguments);this.view.focusEl.focus()}})})();(function(){Ext.override(Ext.grid.GridView,{getColumnWidth:function(a){a=this.cm.getColumnWidth(a);var b=this.borderWidth;return Ext.isNumber(a)?Ext.isBorderBox?a+"px":Math.max(a-b,0)+"px":a}})})();
(function(){var a=Ext.layout.BorderLayout.Region.prototype.beforeCollapse,b=Ext.layout.BorderLayout.Region.prototype.onExpand;Ext.override(Ext.layout.BorderLayout.Region,{beforeCollapse:function(){this.splitEl&&this.splitEl.addClass("x-hide-display");a.apply(this,arguments)},onExpand:function(){this.splitEl&&this.splitEl.removeClass("x-hide-display");b.apply(this,arguments)}})})();
(function(){var a=Ext.layout.ToolbarLayout.prototype.configureItem,b=Ext.layout.ToolbarLayout.prototype.hideItem,c=Ext.layout.ToolbarLayout.prototype.unhideItem,f=Ext.layout.ToolbarLayout.prototype.onLayout,j=Ext.layout.ToolbarLayout.prototype.addComponentToMenu;Ext.override(Ext.layout.ToolbarLayout,{triggerWidth:41,overflowTabIndex:undefined,onLayout:function(h){f.apply(this,arguments);h.items.each(function(n){Ext.isFunction(n.doLayout)&&n.doLayout()},this);this.overflowTabIndex&&this.more&&Ext.get(this.more.el).child("button").set({tabIndex:this.overflowTabIndex})},
configureItem:function(h){var n=this.container,t=n.getLayoutTarget();a.apply(this,arguments);h.on("show",function(w){w.xtbHidden!==true&&this.onLayout(n,t)},this);h.on("hide",function(w){w.xtbHidden!==true&&this.onLayout(n,t)},this)},hideItem:function(h){var n=this;b.apply(this,arguments);h.xtbOrigShow=h.show;h.show=function(){h.xtbOrigShow(true);h.xtbWidth=h.getPositionEl().dom.parentNode.offsetWidth;h.xtbOrigHide(false)};h.xtbOrigHide=h.hide;h.hide=function(){n.unhideItem(h);h.hide()}},unhideItem:function(h){h.show=
h.xtbOrigShow;delete h.xtbOrigShow;h.hide=h.xtbOrigHide;delete h.xtbOrigHide;delete h.xtbWidth;c.apply(this,arguments)},addComponentToMenu:function(h,n){if(n.xtbHidden===true||n.hidden!==true)j.apply(this,arguments)}})})();(function(){var a=Ext.layout.boxOverflow.Menu.prototype.addComponentToMenu;Ext.override(Ext.layout.boxOverflow.Menu,{addComponentToMenu:function(b,c){if(c.xtbHidden===true||c.hidden!==true)a.apply(this,arguments)}})})();
(function(){Ext.apply(Ext.state.Manager,{components:new Ext.util.MixedCollection(false,function(a){return a.getStateId()}),register:function(a){this.components.add(a)},unregister:function(a){this.components.remove(a)},getComponent:function(a){return this.components.get(a)}})})();
(function(){var a=Ext.tree.TreeEditor.prototype.bindScroll,b=Ext.tree.TreeEditor.prototype.fitToTree;Ext.override(Ext.tree.TreeEditor,{fitToTree:function(){this.tree&&this.tree.isDestroyed!==true&&b.apply(this,arguments)},bindScroll:function(){this.tree&&this.tree.isDestroyed!==true&&a.apply(this,arguments)}})})();(function(){Ext.override(Ext.tree.TreeSorter,{doSort:function(a){a.childNodes&&a.sort(this.sortFn)}})})();
(function(){Ext.apply(Ext.util.Format,{fileSize:function(a){Ext.isNumber(a)||(a=0);if(a<1024)return String.format(ngettext("{0} byte","{0} bytes",a),a);a=parseFloat((a/1024).toFixed(1));if(a<1024)return String.format(ngettext("{0} KB","{0} KB",a),a);a=parseFloat((a/1024).toFixed(1));if(a<1024)return String.format(ngettext("{0} MB","{0} MB",a),a);a=parseFloat((a/1024).toFixed(1));if(a<1024)return String.format(ngettext("{0} GB","{0} GB",a),a);a=parseFloat((a/1024).toFixed(1));return String.format(ngettext("{0} TB",
"{0} TB",a),a)},percentage:function(a,b){Ext.isDefined(b)||(b=2);return(a*100).toFixed(b)+"%"},duration:function(a,b){b=Ext.isDefined(b)?b:0;if(a<60)return String.format(ngettext("{0} minute","{0} minutes",a),a);a=parseFloat((a/60).toFixed(b));if(a<24)return String.format(ngettext("{0} hour","{0} hours",a),a);a=parseFloat((a/24).toFixed(b));if(a<7)return String.format(ngettext("{0} day","{0} days",a),a);a=parseFloat((a/7).toFixed(b));return String.format(ngettext("{0} week","{0} weeks",a),a)},indent:function(a,
b){for(var c=(Ext.isDefined(a)?a:1)*(Ext.isDefined(b)?b:4),f="",j=0;j<c;j++)f+="&nbsp;";return f},elide:function(a,b,c){b=b||0;c=Ext.isDefined(c)?c:b;if(b===0&&c===0)return a;if(a&&a.length>b+c)return a.substr(0,b)+"..."+a.substr(a.length-c);return a},htmlEncodeUndef:function(){return this.htmlEncode(this.undef.apply(this,arguments))},defaultValue:function(a,b){return Ext.value(a,b)},htmlEncodeDefaultValue:function(){return this.htmlEncode(this.defaultValue.apply(this,arguments))},htmlEncodeElide:function(){return this.htmlEncode(this.elide.apply(this,
arguments))},htmlEncodeEllipsis:function(){return this.htmlEncode(this.ellipsis.apply(this,arguments))},basename:function(a){return a.split("\\").pop()},htmlEncodeBasename:function(){return this.htmlEncode(this.basename.apply(this,arguments))},sensitivityString:function(a){return Zarafa.core.mapi.Sensitivity.getDisplayName(a)},importanceString:function(a){return Zarafa.core.mapi.Importance.getDisplayName(a)},meetingStatusString:function(a){return Zarafa.core.mapi.MeetingStatus.getDisplayName(a)},
responseStatusString:function(a){return Zarafa.core.mapi.ResponseStatus.getDisplayName(a)},taskStatusString:function(a){return Zarafa.core.mapi.TaskStatus.getDisplayName(a)},busyStatusString:function(a){return Zarafa.core.mapi.BusyStatus.getDisplayName(a)}})})();
(function(){Ext.override(Ext.ux.Spinner,{initSpinner:function(){this.field.addEvents({spin:true,spinup:true,spindown:true});this.keyNav=new Ext.KeyNav(this.el,{up:function(a){a.preventDefault();this.onSpinUp()},down:function(a){a.preventDefault();this.onSpinDown()},pageUp:function(a){a.preventDefault();this.onSpinUpAlternate()},pageDown:function(a){a.preventDefault();this.onSpinDownAlternate()},scope:this});this.field.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});this.field.mon(this.trigger,
{mouseover:this.onMouseOver,mouseout:this.onMouseOut,mousemove:this.onMouseMove,mousedown:this.onMouseDown,mouseup:this.onMouseUp,scope:this,preventDefault:true});this.field.mon(this.wrap,"mousewheel",this.handleMouseWheel,this);this.dd.setXConstraint(0,0,10);this.dd.setYConstraint(1500,1500,10);this.dd.endDrag=this.endDrag.createDelegate(this);this.dd.startDrag=this.startDrag.createDelegate(this);this.dd.onDrag=this.onDrag.createDelegate(this)}})})();
(function(){Ext.override(Ext.ux.grid.CheckColumn,{onMouseDown:function(a,b){if(Ext.fly(b).hasClass(this.createId())){a.stopEvent();var c=this.grid.store.getAt(this.grid.getView().findRowIndex(b));c.set(this.dataIndex,!c.data[this.dataIndex]);c.save()}}})})();Ext.namespace("Zarafa.util");
Zarafa.util.Translations={msg:_("The quick brown fox jumps over the lazy dog"),SplitTranslation:function(a,b){if(!Ext.isDefined(b))return a;var c=a.indexOf(b);if(c==-1)return a;for(var f=c-1;a[f]==" "&&f>=0;)f--;for(c=c+b.length;a[c]==" "&&c<a.length;)c++;return[a.substr(0,f+1),a.substr(c)]},MultiSplitTranslation:function(a,b){Ext.isArray(b)||(b=[b]);var c=new Ext.util.MixedCollection;c.add(a);for(var f=0;f<b.length;f++)c.each(function(j,h){var n=Zarafa.util.Translations.SplitTranslation(j,b[f]);
if(!Ext.isArray(n))return true;c.removeAt(h);if(!Ext.isEmpty(n[0])){c.insert(h,n[0]);h++}c.insert(h,b[f]);h++;Ext.isEmpty(n[1])||c.insert(h,n[1]);return false});return c.getRange()}};
(function(){Ext.apply(Date,{dayNames:[_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday")],monthNames:[_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December")]});Ext.PagingToolbar.tmpPageText=Zarafa.util.Translations.SplitTranslation(_("Page {A} of {0}"),"{A}");Ext.override(Ext.PagingToolbar,{displayMsg:_("Displaying messages {0} - {1} of {2}"),emptyMsg:_("No messages to display"),
beforePageText:Ext.PagingToolbar.tmpPageText[0],afterPageText:Ext.PagingToolbar.tmpPageText[1],firstText:_("First Page"),prevText:_("Previous Page"),nextText:_("Next Page"),lastText:_("Last Page"),refreshText:_("Refresh")});delete Ext.PagingToolbar.tmpPageText;Ext.override(Ext.DatePicker,{todayText:_("Today"),okText:"&nbsp;"+_("OK")+"&nbsp;",cancelText:_("Cancel"),todayTip:_("{0} (Spacebar)"),minText:_("This date is before the minimum date"),maxText:_("This date is after the maximum date"),format:_("d/m/Y"),
disabledDaysText:_("Disabled"),disabledDatesText:_("Disabled"),nextText:_("Next Month (Control+Right)"),prevText:_("Previous Month (Control+Left)"),monthYearText:_("Choose a month (Control+Up/Down to move years)"),monthNames:Date.monthNames,dayNames:Date.dayNames});Ext.override(Ext.form.HtmlEditor,{createLinkText:_("Please enter the URL for the link")+":",buttonTips:{bold:{title:_("Bold (Ctrl+B) text"),text:_("Make the selected text bold."),cls:"x-html-editor-tip"},italic:{title:_("Italic (Ctrl+I)"),
text:_("Make the selected text italic."),cls:"x-html-editor-tip"},underline:{title:_("Underline (Ctrl+U)"),text:_("Underline the selected text."),cls:"x-html-editor-tip"},increasefontsize:{title:_("Grow Text"),text:_("Increase the font size."),cls:"x-html-editor-tip"},decreasefontsize:{title:_("Shrink Text"),text:_("Decrease the font size."),cls:"x-html-editor-tip"},backcolor:{title:_("Text Highlight Color"),text:_("Change the background color of the selected text."),cls:"x-html-editor-tip"},forecolor:{title:_("Font Color"),
text:_("Change the color of the selected text."),cls:"x-html-editor-tip"},justifyleft:{title:_("Align Text Left"),text:_("Align text to the left."),cls:"x-html-editor-tip"},justifycenter:{title:_("Center Text"),text:_("Center text in the editor."),cls:"x-html-editor-tip"},justifyright:{title:_("Align Text Right"),text:_("Align text to the right."),cls:"x-html-editor-tip"},insertunorderedlist:{title:_("Bullet List"),text:_("Start a bulleted list."),cls:"x-html-editor-tip"},insertorderedlist:{title:_("Numbered List"),
text:_("Start a numbered list."),cls:"x-html-editor-tip"},createlink:{title:_("Hyperlink"),text:_("Make the selected text a hyperlink."),cls:"x-html-editor-tip"},sourceedit:{title:_("Source Edit"),text:_("Switch to source editing mode."),cls:"x-html-editor-tip"}}});Ext.override(Ext.grid.GridView,{sortAscText:_("Sort Ascending"),sortDescText:_("Sort Descending"),columnsText:_("Columns")});Ext.override(Ext.grid.GroupingView,{groupByText:_("Group By This Field"),showGroupsText:_("Show in Groups"),emptyGroupText:_("(None)")});
Ext.MessageBox.buttonText.ok=_("Ok");Ext.MessageBox.buttonText.cancel=_("Cancel");Ext.MessageBox.buttonText.yes=_("Yes");Ext.MessageBox.buttonText.no=_("No");Ext.override(Ext.LoadMask,{msg:_("Loading")+"..."});Ext.override(Ext.form.ComboBox,{loadingText:_("Loading")+"..."});Ext.override(Ext.form.Field,{invalidText:_("The value in this field is invalid")});Ext.override(Ext.form.TextField,{minLengthText:_("The minimum length for this field is {0}"),maxLengthText:_("The maximum length for this field is {0}"),
blankText:_("This field is required")});Ext.override(Ext.form.NumberField,{minText:_("The minimum value for this field is {0}"),maxText:_("The maximum value for this field is {0}"),nanText:_("{0} is not a valid number")});Ext.override(Ext.form.DateField,{format:_("d/m/Y"),disabledDaysText:_("Disabled"),disabledDatesText:_("Disabled"),minText:_("The date in this field must be equal to or after {0}"),maxText:_("The date in this field must be equal to or before {0}"),invalidText:_("{0} is not a valid date - it must be in the format {1}")});
Ext.override(Ext.form.CheckboxGroup,{blankText:_("You must select at least one item in this group")});Ext.override(Ext.form.RadioGroup,{blankText:_("You must select one item in this group")});Ext.override(Ext.form.TimeField,{minText:_("The time in this field must be equal to or after {0}"),maxText:_("The time in this field must be equal to or before {0}"),invalidText:_("{0} is not a valid time"),format:_("G:i")});Ext.override(Ext.grid.GridView,{sortAscText:_("Sort Ascending"),sortDescText:_("Sort Descending"),
columnsText:_("Columns")});Ext.override(Ext.grid.PropertyColumnModel,{nameText:_("Name"),valueText:_("Value"),dateFormat:_("d/m/Y"),trueText:_("true"),falseText:_("false")});Ext.override(Ext.form.VTypes,{emailText:_('This field should be an e-mail address in the format "user@example.com"'),urlText:String.format(_('This field should be a URL in the format "{0}"'),"http://www.example.com"),alphaText:_("This field should only contain letters and _"),alphanumText:_("This field should only contain letters, numbers and _")})})();
(function(){var a=Ext.DatePicker.prototype.onRender,b=Ext.DatePicker.prototype.initComponent;Ext.override(Ext.DatePicker,{width:"auto",initComponent:function(){this.startDay=Ext.isDefined(this.initialConfig.startDay)?this.startDay:container.getSettingsModel().get("zarafa/v1/main/week_start");b.apply(this,arguments)},onRender:function(){a.apply(this,arguments);this.getEl().down("table").applyStyles({width:this.width})}})})();
