Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / ext-all.js
index 74c6e3c..3b70d0b 100644 (file)
@@ -1,11 +1,15 @@
 /*
- * Ext JS Library 3.2.1
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-Ext.DomHelper=function(){var w=null,k=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,m=/^table|tbody|tr|td$/i,d=/tag|children|cn|html$/i,s=/td|tr|tbody/i,o=/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,u=/end/i,r,n="afterbegin",p="afterend",c="beforebegin",q="beforeend",a="<table>",i="</table>",b=a+"<tbody>",j="</tbody>"+i,l=b+"<tr>",v="</tr>"+j;function h(A,C,B,D,z,x){var y=r.insertHtml(D,Ext.getDom(A),t(C));return B?Ext.get(y,true):y}function t(D){var z="",y,C,B,x,E;if(typeof D=="string"){z=D}else{if(Ext.isArray(D)){for(var A=0;A<D.length;A++){if(D[A]){z+=t(D[A])}}}else{z+="<"+(D.tag=D.tag||"div");for(y in D){C=D[y];if(!d.test(y)){if(typeof C=="object"){z+=" "+y+'="';for(B in C){z+=B+":"+C[B]+";"}z+='"'}else{z+=" "+({cls:"class",htmlFor:"for"}[y]||y)+'="'+C+'"'}}}if(k.test(D.tag)){z+="/>"}else{z+=">";if((E=D.children||D.cn)){z+=t(E)}else{if(D.html){z+=D.html}}z+="</"+D.tag+">"}}}return z}function g(E,B,A,C){w.innerHTML=[B,A,C].join("");var x=-1,z=w,y;while(++x<E){z=z.firstChild}if(y=z.nextSibling){var D=document.createDocumentFragment();while(z){y=z.nextSibling;D.appendChild(z);z=y}z=D}return z}function e(x,y,A,z){var B,C;w=w||document.createElement("div");if(x=="td"&&(y==n||y==q)||!s.test(x)&&(y==c||y==p)){return}C=y==c?A:y==p?A.nextSibling:y==n?A.firstChild:null;if(y==c||y==p){A=A.parentNode}if(x=="td"||(x=="tr"&&(y==q||y==n))){B=g(4,l,z,v)}else{if((x=="tbody"&&(y==q||y==n))||(x=="tr"&&(y==c||y==p))){B=g(3,b,z,j)}else{B=g(2,a,z,i)}}A.insertBefore(B,C);return B}r={markup:function(x){return t(x)},applyStyles:function(A,B){if(B){var y=0,x,z,C;A=Ext.fly(A);if(typeof B=="function"){B=B.call()}if(typeof B=="string"){while((C=o.exec(B))){A.setStyle(C[1],C[2])}}else{if(typeof B=="object"){A.setStyle(B)}}}},insertHtml:function(C,x,D){var B={},z,F,E,G,A,y;C=C.toLowerCase();B[c]=["BeforeBegin","previousSibling"];B[p]=["AfterEnd","nextSibling"];if(x.insertAdjacentHTML){if(m.test(x.tagName)&&(y=e(x.tagName.toLowerCase(),C,x,D))){return y}B[n]=["AfterBegin","firstChild"];B[q]=["BeforeEnd","lastChild"];if((z=B[C])){x.insertAdjacentHTML(z[0],D);return x[z[1]]}}else{E=x.ownerDocument.createRange();F="setStart"+(u.test(C)?"After":"Before");if(B[C]){E[F](x);G=E.createContextualFragment(D);x.parentNode.insertBefore(G,C==c?x:x.nextSibling);return x[(C==c?"previous":"next")+"Sibling"]}else{A=(C==n?"first":"last")+"Child";if(x.firstChild){E[F](x[A]);G=E.createContextualFragment(D);if(C==n){x.insertBefore(G,x.firstChild)}else{x.appendChild(G)}}else{x.innerHTML=D}return x[A]}}throw'Illegal insertion point -> "'+C+'"'},insertBefore:function(x,z,y){return h(x,z,y,c)},insertAfter:function(x,z,y){return h(x,z,y,p,"nextSibling")},insertFirst:function(x,z,y){return h(x,z,y,n,"firstChild")},append:function(x,z,y){return h(x,z,y,q,"",true)},overwrite:function(x,z,y){x=Ext.getDom(x);x.innerHTML=t(z);return y?Ext.get(x.firstChild):x.firstChild},createHtml:t};return r}();Ext.apply(Ext.DomHelper,function(){var e,a="afterbegin",h="afterend",i="beforebegin",d="beforeend",b=/tag|children|cn|html$/i;function g(m,p,n,q,l,j){m=Ext.getDom(m);var k;if(e.useDom){k=c(p,null);if(j){m.appendChild(k)}else{(l=="firstChild"?m:m.parentNode).insertBefore(k,m[l]||m)}}else{k=Ext.DomHelper.insertHtml(q,m,Ext.DomHelper.createHtml(p))}return n?Ext.get(k,true):k}function c(j,r){var k,u=document,p,s,m,t;if(Ext.isArray(j)){k=u.createDocumentFragment();for(var q=0,n=j.length;q<n;q++){c(j[q],k)}}else{if(typeof j=="string"){k=u.createTextNode(j)}else{k=u.createElement(j.tag||"div");p=!!k.setAttribute;for(var s in j){if(!b.test(s)){m=j[s];if(s=="cls"){k.className=m}else{if(p){k.setAttribute(s,m)}else{k[s]=m}}}}Ext.DomHelper.applyStyles(k,j.style);if((t=j.children||j.cn)){c(t,k)}else{if(j.html){k.innerHTML=j.html}}}}if(r){r.appendChild(k)}return k}e={createTemplate:function(k){var j=Ext.DomHelper.createHtml(k);return new Ext.Template(j)},useDom:false,insertBefore:function(j,l,k){return g(j,l,k,i)},insertAfter:function(j,l,k){return g(j,l,k,h,"nextSibling")},insertFirst:function(j,l,k){return g(j,l,k,a,"firstChild")},append:function(j,l,k){return g(j,l,k,d,"",true)},createDom:c};return e}());Ext.Template=function(h){var j=this,c=arguments,e=[],d;if(Ext.isArray(h)){h=h.join("")}else{if(c.length>1){for(var g=0,b=c.length;g<b;g++){d=c[g];if(typeof d=="object"){Ext.apply(j,d)}else{e.push(d)}}h=e.join("")}}j.html=h;if(j.compiled){j.compile()}};Ext.Template.prototype={re:/\{([\w-]+)\}/g,applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(c,d){return a[d]!==undefined?a[d]:""})},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'"}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.apply(Ext.Template.prototype,{disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,argsRe:/^\s*['"](.*)["']\s*$/,compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,applyTemplate:function(b){var g=this,a=g.disableFormats!==true,e=Ext.util.Format,c=g;if(g.compiled){return g.compiled(b)}function d(j,l,p,k){if(p&&a){if(p.substr(0,5)=="this."){return c.call(p.substr(5),b[l],b)}else{if(k){var o=g.argsRe;k=k.split(",");for(var n=0,h=k.length;n<h;n++){k[n]=k[n].replace(o,"$1")}k=[b[l]].concat(k)}else{k=[b[l]]}return e[p].apply(e,k)}}else{return b[l]!==undefined?b[l]:""}}return g.html.replace(g.re,d)},compile:function(){var me=this,fm=Ext.util.Format,useF=me.disableFormats!==true,sep=Ext.isGecko?"+":",",body;function fn(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"}if(Ext.isGecko){body="this.compiled = function(values){ return '"+me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn)+"';};"}else{body=["this.compiled = function(values){ return ['"];body.push(me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return me},call:function(c,b,a){return this[c](b,a)}});Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var result=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){result[++ri]=ci}}return result}function byId(cs,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var result=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){result[++ri]=ci;return result}}return result}function byAttribute(cs,attr,value,op,custom){var result=[],ri=-1,useGetStyle=custom=="{",fn=Ext.DomQuery.operators[op],a,innerHTML;for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}innerHTML=ci.innerHTML;if(innerHTML!==null&&innerHTML!==undefined){if(useGetStyle){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}}else{a=ci.getAttribute(attr)}if((fn&&fn(a,value))||(!fn&&a)){result[++ri]=ci}}return result}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2}if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2)}for(var i=0;i<len1;i++){c1[i]._qdiff=d}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],mode,lastPath,matchers=Ext.DomQuery.matchers,matchersLn=matchers.length,modeMatch,lmode=path.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';path=path.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(path&&lastPath!=path){lastPath=path;var tokenMatch=path.match(tagTokenRe);if(type=="select"){if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}else{if(path.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}}while(!(modeMatch=path.match(modeRe))){var matched=false;for(var j=0;j<matchersLn;j++){var t=matchers[j];var m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});path=path.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+path+'"'}}if(modeMatch[1]){fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";';path=path.replace(modeMatch[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},jsSelect:function(path,root,type){root=root||document;if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var subPath=paths[i].replace(trimRe,"");if(!cache[subPath]){cache[subPath]=Ext.DomQuery.compile(subPath);if(!cache[subPath]){throw subPath+" is not a valid selector"}}var result=cache[subPath](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{var cs=root.querySelectorAll(path);return Ext.toArray(cs)}catch(ex){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};(function(){var h=Ext.util,j=Ext.each,g=true,i=false;h.Observable=function(){var k=this,l=k.events;if(k.listeners){k.on(k.listeners);delete k.listeners}k.events=l||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var k=Array.prototype.slice.call(arguments,0),m=k[0].toLowerCase(),n=this,l=g,p=n.events[m],s,o,r;if(n.eventsSuspended===g){if(o=n.eventQueue){o.push(k)}}else{if(typeof p=="object"){if(p.bubble){if(p.fire.apply(p,k.slice(1))===i){return i}r=n.getBubbleTarget&&n.getBubbleTarget();if(r&&r.enableBubble){s=r.events[m];if(!s||typeof s!="object"||!s.bubble){r.enableBubble(m)}return r.fireEvent.apply(r,k)}}else{k.shift();l=p.fire.apply(p,k)}}}return l},addListener:function(m,q,s,l){var p=this,n,t,r,k;if(typeof m=="object"){l=m;for(n in l){t=l[n];if(!p.filterOptRe.test(n)){p.addListener(n,t.fn||t,t.scope||l.scope,t.fn?t:l)}}}else{m=m.toLowerCase();k=p.events[m]||g;if(typeof k=="boolean"){p.events[m]=k=new h.Event(p,m)}k.addListener(q,s,typeof l=="object"?l:{})}},removeListener:function(k,m,l){var n=this.events[k.toLowerCase()];if(typeof n=="object"){n.removeListener(m,l)}},purgeListeners:function(){var m=this.events,k,l;for(l in m){k=m[l];if(typeof k=="object"){k.clearListeners()}}},addEvents:function(n){var m=this;m.events=m.events||{};if(typeof n=="string"){var k=arguments,l=k.length;while(l--){m.events[k[l]]=m.events[k[l]]||g}}else{Ext.applyIf(m.events,n)}},hasListener:function(k){var l=this.events[k.toLowerCase()];return typeof l=="object"&&l.listeners.length>0},suspendEvents:function(k){this.eventsSuspended=g;if(k&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var k=this,l=k.eventQueue||[];k.eventsSuspended=i;delete k.eventQueue;j(l,function(m){k.fireEvent.apply(k,m)})}};var d=h.Observable.prototype;d.on=d.addListener;d.un=d.removeListener;h.Observable.releaseCapture=function(k){k.fireEvent=d.fireEvent};function e(l,m,k){return function(){if(m.target==arguments[0]){l.apply(k,Array.prototype.slice.call(arguments,0))}}}function b(n,p,k,m){k.task=new h.DelayedTask();return function(){k.task.delay(p.buffer,n,m,Array.prototype.slice.call(arguments,0))}}function c(m,n,l,k){return function(){n.removeListener(l,k);return m.apply(k,arguments)}}function a(n,p,k,m){return function(){var l=new h.DelayedTask();if(!k.tasks){k.tasks=[]}k.tasks.push(l);l.delay(p.delay||10,n,m,Array.prototype.slice.call(arguments,0))}}h.Event=function(l,k){this.name=k;this.obj=l;this.listeners=[]};h.Event.prototype={addListener:function(o,n,m){var p=this,k;n=n||p.obj;if(!p.isListening(o,n)){k=p.createListener(o,n,m);if(p.firing){p.listeners=p.listeners.slice(0)}p.listeners.push(k)}},createListener:function(p,n,q){q=q||{},n=n||this.obj;var k={fn:p,scope:n,options:q},m=p;if(q.target){m=e(m,q,n)}if(q.delay){m=a(m,q,k,n)}if(q.single){m=c(m,this,p,n)}if(q.buffer){m=b(m,q,k,n)}k.fireFn=m;return k},findListener:function(o,n){var p=this.listeners,m=p.length,k;n=n||this.obj;while(m--){k=p[m];if(k){if(k.fn==o&&k.scope==n){return m}}}return -1},isListening:function(l,k){return this.findListener(l,k)!=-1},removeListener:function(r,q){var p,m,n,s=this,o=i;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel()}delete m.tasks}s.listeners.splice(p,1);o=g}return o},clearListeners:function(){var n=this,k=n.listeners,m=k.length;while(m--){n.removeListener(k[m].fn,k[m].scope)}},fire:function(){var q=this,p=q.listeners,k=p.length,o=0,m;if(k>0){q.firing=g;var n=Array.prototype.slice.call(arguments,0);for(;o<k;o++){m=p[o];if(m&&m.fireFn.apply(m.scope||q.obj||window,n)===i){return(q.firing=i)}}}q.firing=i;return g}}})();Ext.apply(Ext.util.Observable.prototype,function(){function a(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if((c=l.apply(k||h,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[j]=function(){var l=Array.prototype.slice.call(arguments,0),k;d=c=undefined;g=false;for(var m=0,e=i.before.length;m<e;m++){k=i.before[m];b(k.fn,k.scope,l);if(g){return d}}if((c=i.originalFn.apply(h,l))!==undefined){d=c}for(var m=0,e=i.after.length;m<e;m++){k=i.after[m];b(k.fn,k.scope,l);if(g){return d}}return d}}return i}return{beforeMethod:function(d,c,b){a.call(this,d).before.push({fn:c,scope:b})},afterMethod:function(d,c,b){a.call(this,d).after.push({fn:c,scope:b})},removeMethodListener:function(j,g,d){var h=this.getMethodEvent(j);for(var c=0,b=h.before.length;c<b;c++){if(h.before[c].fn==g&&h.before[c].scope==d){h.before.splice(c,1);return}}for(var c=0,b=h.after.length;c<b;c++){if(h.after[c].fn==g&&h.after[c].scope==d){h.after.splice(c,1);return}}},relayEvents:function(j,e){var h=this;function g(i){return function(){return h.fireEvent.apply(h,[i].concat(Array.prototype.slice.call(arguments,0)))}}for(var d=0,b=e.length;d<b;d++){var c=e[d];h.events[c]=h.events[c]||true;j.on(c,g(c),h)}},enableBubble:function(e){var g=this;if(!Ext.isEmpty(e)){e=Ext.isArray(e)?e:Array.prototype.slice.call(arguments,0);for(var d=0,b=e.length;d<b;d++){var c=e[d];c=c.toLowerCase();var h=g.events[c]||true;if(typeof h=="boolean"){h=new Ext.util.Event(g,c);g.events[c]=h}h.bubble=true}}}}}());Ext.util.Observable.capture=function(c,b,a){c.fireEvent=c.fireEvent.createInterceptor(b,a)};Ext.util.Observable.observeClass=function(b,a){if(b){if(!b.fireEvent){Ext.apply(b,new Ext.util.Observable());Ext.util.Observable.capture(b.prototype,b.fireEvent,b)}if(typeof a=="object"){b.on(a)}return b}};Ext.EventManager=function(){var z,p,j=false,l=Ext.isGecko||Ext.isWebKit||Ext.isSafari,o=Ext.lib.Event,q=Ext.lib.Dom,c=document,A=window,r="DOMContentLoaded",t="complete",g=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,u=[];function n(E){var H=false,D=0,C=u.length,H=false,F=false,G;if(E){if(E.getElementById||E.navigator){for(;D<C;++D){G=u[D];if(G.el===E){H=G.id;break}}if(!H){H=Ext.id(E);u.push({id:H,el:E});F=true}}else{H=Ext.id(E)}if(!Ext.elCache[H]){Ext.Element.addToCache(new Ext.Element(E),H);if(F){Ext.elCache[H].skipGC=true}}}return H}function m(E,G,J,F,D,L){E=Ext.getDom(E);var C=n(E),K=Ext.elCache[C].events,H;H=o.on(E,G,D);K[G]=K[G]||[];K[G].push([J,D,L,H,F]);if(E.addEventListener&&G=="mousewheel"){var I=["DOMMouseScroll",D,false];E.addEventListener.apply(E,I);Ext.EventManager.addListener(A,"unload",function(){E.removeEventListener.apply(E,I)})}if(E==c&&G=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.addListener(D)}}function d(){if(window!=top){return false}try{c.documentElement.doScroll("left")}catch(C){return false}b();return true}function B(C){if(Ext.isIE&&d()){return true}if(c.readyState==t){b();return true}j||(p=setTimeout(arguments.callee,2));return false}var k;function i(C){k||(k=Ext.query("style, link[rel=stylesheet]"));if(k.length==c.styleSheets.length){b();return true}j||(p=setTimeout(arguments.callee,2));return false}function y(C){c.removeEventListener(r,arguments.callee,false);i()}function b(C){if(!j){j=true;if(p){clearTimeout(p)}if(l){c.removeEventListener(r,b,false)}if(Ext.isIE&&B.bindIE){c.detachEvent("onreadystatechange",B)}o.un(A,"load",arguments.callee)}if(z&&!Ext.isReady){Ext.isReady=true;z.fire();z.listeners=[]}}function a(){z||(z=new Ext.util.Event());if(l){c.addEventListener(r,b,false)}if(Ext.isIE){if(!B()){B.bindIE=true;c.attachEvent("onreadystatechange",B)}}else{if(Ext.isOpera){(c.readyState==t&&i())||c.addEventListener(r,y,false)}else{if(Ext.isWebKit){B()}}}o.on(A,"load",b)}function x(C,D){return function(){var E=Ext.toArray(arguments);if(D.target==Ext.EventObject.setEvent(E[0]).target){C.apply(this,E)}}}function w(D,E,C){return function(F){C.delay(E.buffer,D,null,[new Ext.EventObjectImpl(F)])}}function s(G,F,C,E,D){return function(H){Ext.EventManager.removeListener(F,C,E,D);G(H)}}function e(D,E,C){return function(G){var F=new Ext.util.DelayedTask(D);if(!C.tasks){C.tasks=[]}C.tasks.push(F);F.delay(E.delay||10,D,null,[new Ext.EventObjectImpl(G)])}}function h(H,G,C,J,K){var D=(!C||typeof C=="boolean")?{}:C,E=Ext.getDom(H),F;J=J||D.fn;K=K||D.scope;if(!E){throw'Error listening for "'+G+'". Element "'+H+"\" doesn't exist."}function I(M){if(!Ext){return}M=Ext.EventObject.setEvent(M);var L;if(D.delegate){if(!(L=M.getTarget(D.delegate,E))){return}}else{L=M.target}if(D.stopEvent){M.stopEvent()}if(D.preventDefault){M.preventDefault()}if(D.stopPropagation){M.stopPropagation()}if(D.normalized){M=M.browserEvent}J.call(K||E,M,L,D)}if(D.target){I=x(I,D)}if(D.delay){I=e(I,D,J)}if(D.single){I=s(I,E,G,J,K)}if(D.buffer){F=new Ext.util.DelayedTask(I);I=w(I,D,F)}m(E,G,J,F,I,K);return I}var v={addListener:function(E,C,G,F,D){if(typeof C=="object"){var J=C,H,I;for(H in J){I=J[H];if(!g.test(H)){if(Ext.isFunction(I)){h(E,H,J,I,J.scope)}else{h(E,H,I)}}}}else{h(E,C,D,G,F)}},removeListener:function(E,I,M,N){E=Ext.getDom(E);var C=n(E),K=E&&(Ext.elCache[C].events)[I]||[],D,H,F,G,J,L;for(H=0,J=K.length;H<J;H++){if(Ext.isArray(L=K[H])&&L[0]==M&&(!N||L[2]==N)){if(L[4]){L[4].cancel()}G=M.tasks&&M.tasks.length;if(G){while(G--){M.tasks[G].cancel()}delete M.tasks}D=L[1];o.un(E,I,o.extAdapter?L[3]:D);if(D&&E.addEventListener&&I=="mousewheel"){E.removeEventListener("DOMMouseScroll",D,false)}if(D&&E==c&&I=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.removeListener(D)}K.splice(H,1);if(K.length===0){delete Ext.elCache[C].events[I]}for(G in Ext.elCache[C].events){return false}Ext.elCache[C].events={};return false}}},removeAll:function(E){E=Ext.getDom(E);var D=n(E),J=Ext.elCache[D]||{},M=J.events||{},I,H,K,F,L,G,C;for(F in M){if(M.hasOwnProperty(F)){I=M[F];for(H=0,K=I.length;H<K;H++){L=I[H];if(L[4]){L[4].cancel()}if(L[0].tasks&&(G=L[0].tasks.length)){while(G--){L[0].tasks[G].cancel()}delete L.tasks}C=L[1];o.un(E,F,o.extAdapter?L[3]:C);if(E.addEventListener&&C&&F=="mousewheel"){E.removeEventListener("DOMMouseScroll",C,false)}if(C&&E==c&&F=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.removeListener(C)}}}}if(Ext.elCache[D]){Ext.elCache[D].events={}}},getListeners:function(F,C){F=Ext.getDom(F);var H=n(F),D=Ext.elCache[H]||{},G=D.events||{},E=[];if(G&&G[C]){return G[C]}else{return null}},purgeElement:function(E,C,G){E=Ext.getDom(E);var D=n(E),J=Ext.elCache[D]||{},K=J.events||{},F,I,H;if(G){if(K&&K.hasOwnProperty(G)){I=K[G];for(F=0,H=I.length;F<H;F++){Ext.EventManager.removeListener(E,G,I[F][0])}}}else{Ext.EventManager.removeAll(E)}if(C&&E&&E.childNodes){for(F=0,H=E.childNodes.length;F<H;F++){Ext.EventManager.purgeElement(E.childNodes[F],C,G)}}},_unload:function(){var C;for(C in Ext.elCache){Ext.EventManager.removeAll(C)}delete Ext.elCache;delete Ext.Element._flyweights;var G,D,F,E=Ext.lib.Ajax;(typeof E.conn=="object")?D=E.conn:D={};for(F in D){G=D[F];if(G){E.abort({conn:G,tId:F})}}},onDocumentReady:function(E,D,C){if(Ext.isReady){z||(z=new Ext.util.Event());z.addListener(E,D,C);z.fire();z.listeners=[]}else{if(!z){a()}C=C||{};C.delay=C.delay||1;z.addListener(E,D,C)}},fireDocReady:b};v.on=v.addListener;v.un=v.removeListener;v.stoppedMouseDownEvent=new Ext.util.Event();return v}();Ext.onReady=Ext.EventManager.onDocumentReady;(function(){var a=function(){var c=document.body||document.getElementsByTagName("body")[0];if(!c){return false}var b=[" ",Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":(Ext.isIE7?"ext-ie7":"ext-ie8")):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isWebKit?"ext-webkit":""];if(Ext.isSafari){b.push("ext-safari "+(Ext.isSafari2?"ext-safari2":(Ext.isSafari3?"ext-safari3":"ext-safari4")))}else{if(Ext.isChrome){b.push("ext-chrome")}}if(Ext.isMac){b.push("ext-mac")}if(Ext.isLinux){b.push("ext-linux")}if(Ext.isStrict||Ext.isBorderBox){var d=c.parentNode;if(d){d.className+=Ext.isStrict?" ext-strict":" ext-border-box"}}c.className+=b.join(" ");return true};if(!a()){Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},c=Ext.isIE?{1:0,4:1,2:2}:(Ext.isWebKit?{1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(d){if(d){this.setEvent(d.browserEvent||d)}};Ext.EventObjectImpl.prototype={setEvent:function(g){var d=this;if(g==d||(g&&g.browserEvent)){return g}d.browserEvent=g;if(g){d.button=g.button?c[g.button]:(g.which?g.which-1:-1);if(g.type=="click"&&d.button==-1){d.button=0}d.type=g.type;d.shiftKey=g.shiftKey;d.ctrlKey=g.ctrlKey||g.metaKey||false;d.altKey=g.altKey;d.keyCode=g.keyCode;d.charCode=g.charCode;d.target=b.getTarget(g);d.xy=b.getXY(g)}else{d.button=-1;d.shiftKey=false;d.ctrlKey=false;d.altKey=false;d.keyCode=0;d.charCode=0;d.target=null;d.xy=[0,0]}return d},stopEvent:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopEvent(d.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopPropagation(d.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(d){return Ext.isSafari?(a[d]||d):d},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(e,g,d){return e?Ext.fly(this.target).findParent(e,g,d):(d?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var d=this.browserEvent;var g=0;if(d.wheelDelta){g=d.wheelDelta/120}else{if(d.detail){g=-d.detail/3}}return g},within:function(g,h,d){if(g){var e=this[h?"getRelatedTarget":"getTarget"]();return e&&((d?(e==Ext.getDom(g)):false)||Ext.fly(g).contains(e))}return false}};return new Ext.EventObjectImpl()}();Ext.apply(Ext.EventManager,function(){var c,j,e,b,a=Ext.lib.Dom,i=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,h=0,g=0,d=Ext.isWebKit?Ext.num(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1])>=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{doResizeEvent:function(){var l=a.getViewHeight(),k=a.getViewWidth();if(g!=l||h!=k){c.fire(h=k,g=l)}},onWindowResize:function(m,l,k){if(!c){c=new Ext.util.Event();j=new Ext.util.DelayedTask(this.doResizeEvent);Ext.EventManager.on(window,"resize",this.fireWindowResize,this)}c.addListener(m,l,k)},fireWindowResize:function(){if(c){j.delay(100)}},onTextResize:function(n,m,k){if(!e){e=new Ext.util.Event();var l=new Ext.Element(document.createElement("div"));l.dom.className="x-text-resize";l.dom.innerHTML="X";l.appendTo(document.body);b=l.dom.offsetHeight;setInterval(function(){if(l.dom.offsetHeight!=b){e.fire(b,b=l.dom.offsetHeight)}},this.textResizeInterval)}e.addListener(n,m,k)},removeResizeListener:function(l,k){if(c){c.removeListener(l,k)}},fireResize:function(){if(c){c.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,useKeydown:d}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});(function(){var j=document;Ext.Element=function(o,p){var q=typeof o=="string"?j.getElementById(o):o,r;if(!q){return null}r=q.id;if(!p&&r&&Ext.elCache[r]){return Ext.elCache[r].el}this.dom=q;this.id=r||Ext.id(q)};var a=Ext.lib.Dom,g=Ext.DomHelper,m=Ext.lib.Event,e=Ext.lib.Anim,h=Ext.Element,b=Ext.elCache;h.prototype={set:function(t,q){var r=this.dom,p,s,q=(q!==false)&&!!r.setAttribute;for(p in t){if(t.hasOwnProperty(p)){s=t[p];if(p=="style"){g.applyStyles(r,s)}else{if(p=="cls"){r.className=s}else{if(q){r.setAttribute(p,s)}else{r[p]=s}}}}}return this},defaultUnit:"px",is:function(o){return Ext.DomQuery.is(this.dom,o)},focus:function(r,q){var o=this,q=q||o.dom;try{if(Number(r)){o.focus.defer(r,null,[null,q])}else{q.focus()}}catch(p){}return o},blur:function(){try{this.dom.blur()}catch(o){}return this},getValue:function(o){var p=this.dom.value;return o?parseInt(p,10):p},addListener:function(o,r,q,p){Ext.EventManager.on(this.dom,o,r,q||this,p);return this},removeListener:function(o,q,p){Ext.EventManager.removeListener(this.dom,o,q,p||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this},addUnits:function(o){if(o===""||o=="auto"||o===undefined){o=o||""}else{if(!isNaN(o)||!k.test(o)){o=o+(this.defaultUnit||"px")}}return o},load:function(p,q,o){Ext.Ajax.request(Ext.apply({params:q,url:p.url||p,callback:o,el:this.dom,indicatorText:p.indicatorText||""},Ext.isObject(p)?p:{}));return this},isBorderBox:function(){return i[(this.dom.tagName||"").toLowerCase()]||Ext.isBorderBox},remove:function(){var o=this,p=o.dom;if(p){delete o.dom;Ext.removeNode(p)}},hover:function(p,o,r,q){var s=this;s.on("mouseenter",p,r||s.dom,q);s.on("mouseleave",o,r||s.dom,q);return s},contains:function(o){return !o?false:Ext.lib.Dom.isAncestor(this.dom,o.dom?o.dom:o)},getAttributeNS:function(p,o){return this.getAttribute(o,p)},getAttribute:Ext.isIE?function(o,q){var r=this.dom,p=typeof r[q+":"+o];if(["undefined","unknown"].indexOf(p)==-1){return r[q+":"+o]}return r[o]}:function(o,p){var q=this.dom;return q.getAttributeNS(p,o)||q.getAttribute(p+":"+o)||q.getAttribute(o)||q[o]},update:function(o){if(this.dom){this.dom.innerHTML=o}return this}};var n=h.prototype;h.addMethods=function(p){Ext.apply(n,p)};n.on=n.addListener;n.un=n.removeListener;n.autoBoxAdjust=true;var k=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,d;h.get=function(p){var o,s,r;if(!p){return null}if(typeof p=="string"){if(!(s=j.getElementById(p))){return null}if(b[p]&&b[p].el){o=b[p].el;o.dom=s}else{o=h.addToCache(new h(s))}return o}else{if(p.tagName){if(!(r=p.id)){r=Ext.id(p)}if(b[r]&&b[r].el){o=b[r].el;o.dom=p}else{o=h.addToCache(new h(p))}return o}else{if(p instanceof h){if(p!=d){if(Ext.isIE&&(p.id==undefined||p.id=="")){p.dom=p.dom}else{p.dom=j.getElementById(p.id)||p.dom}}return p}else{if(p.isComposite){return p}else{if(Ext.isArray(p)){return h.select(p)}else{if(p==j){if(!d){var q=function(){};q.prototype=h.prototype;d=new q();d.dom=j}return d}}}}}}return null};h.addToCache=function(o,p){p=p||o.id;b[p]={el:o,data:{},events:{}};return o};h.data=function(p,o,q){p=h.get(p);if(!p){return null}var r=b[p.id].data;if(arguments.length==2){return r[o]}else{return(r[o]=q)}};function l(){if(!Ext.enableGarbageCollector){clearInterval(h.collectorThreadId)}else{var p,r,u,s;for(p in b){s=b[p];if(s.skipGC){continue}r=s.el;u=r.dom;if(!u||!u.parentNode||(!u.offsetParent&&!j.getElementById(p))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(u)}delete b[p]}}if(Ext.isIE){var q={};for(p in b){q[p]=b[p]}b=Ext.elCache=q}}}h.collectorThreadId=setInterval(l,30000);var c=function(){};c.prototype=h.prototype;h.Flyweight=function(o){this.dom=o};h.Flyweight.prototype=new c();h.Flyweight.prototype.isFlyweight=true;h._flyweights={};h.fly=function(q,o){var p=null;o=o||"_global";if(q=Ext.getDom(q)){(h._flyweights[o]=h._flyweights[o]||new h.Flyweight()).dom=q;p=h._flyweights[o]}return p};Ext.get=h.get;Ext.fly=h.fly;var i=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){i.button=1}})();Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(g){g.stopPropagation();if(b){g.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(g){d.on(g,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,g=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(g){var a=g.nextSibling;if(g.nodeType==3&&!/\S/.test(g.nodeValue)){e.removeChild(g)}else{g.nodeIndex=++c}g=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){if(!this.dom){return this}html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=Ext.id(),dom=this.dom;html+='<span id="'+id+'"></span>';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(a,e,d){a=(typeof a=="object")?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.addMethods({getAnchorXY:function(e,l,q){e=(e||"tl").toLowerCase();q=q||{};var k=this,b=k.dom==document.body||k.dom==document,n=q.width||b?Ext.lib.Dom.getViewWidth():k.getWidth(),i=q.height||b?Ext.lib.Dom.getViewHeight():k.getHeight(),p,a=Math.round,c=k.getXY(),m=k.getScroll(),j=b?m.left:!l?c[0]:0,g=b?m.top:!l?c[1]:0,d={c:[a(n*0.5),a(i*0.5)],t:[a(n*0.5),0],l:[0,a(i*0.5)],r:[n,a(i*0.5)],b:[a(n*0.5),i],tl:[0,0],bl:[0,i],br:[n,i],tr:[n,0]};p=d[e];return[p[0]+j,p[1]+g]},anchorTo:function(b,h,c,a,k,l){var i=this,e=i.dom,j=!Ext.isEmpty(k),d=function(){Ext.fly(e).alignTo(b,h,c,a);Ext.callback(l,Ext.fly(e))},g=this.getAnchor();this.removeAnchor();Ext.apply(g,{fn:d,scroll:j});Ext.EventManager.onWindowResize(d,null);if(j){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(k)?k:50})}d.call(i);return i},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignToXY:function(g,A,B){g=Ext.get(g);if(!g||!g.dom){throw"Element.alignToXY with an element that doesn't exist"}B=B||[0,0];A=(!A||A=="?"?"tl-bl?":(!/-/.test(A)&&A!==""?"tl-"+A:A||"tl-bl")).toLowerCase();var K=this,H=K.dom,M,L,n,l,s,F,v,t=Ext.lib.Dom.getViewWidth()-10,G=Ext.lib.Dom.getViewHeight()-10,b,i,j,k,u,z,N=document,J=N.documentElement,q=N.body,E=(J.scrollLeft||q.scrollLeft||0)+5,D=(J.scrollTop||q.scrollTop||0)+5,I=false,e="",a="",C=A.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!C){throw"Element.alignTo with an invalid alignment "+A}e=C[1];a=C[2];I=!!C[3];M=K.getAnchorXY(e,true);L=g.getAnchorXY(a,false);n=L[0]-M[0]+B[0];l=L[1]-M[1]+B[1];if(I){s=K.getWidth();F=K.getHeight();v=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);j=a.charAt(0);k=a.charAt(a.length-1);u=((b=="t"&&j=="b")||(b=="b"&&j=="t"));z=((i=="r"&&k=="l")||(i=="l"&&k=="r"));if(n+s>t+E){n=z?v.left-s:t+E-s}if(n<E){n=z?v.right:E}if(l+F>G+D){l=u?v.top-F:G+D-F}if(l<D){l=u?v.bottom:D}}return[n,l]},alignTo:function(c,a,e,b){var d=this;return d.setXY(d.getAlignToXY(c,a,e),d.preanim&&!!b?d.preanim(arguments,3):false)},adjustForConstraints:function(c,a,b){return this.getConstrainToXY(a||document,false,b,c)||c},getConstrainToXY:function(b,a,c,e){var d={top:0,left:0,bottom:0,right:0};return function(i,z,k,m){i=Ext.get(i);k=k?Ext.applyIf(k,d):d;var v,C,u=0,t=0;if(i.dom==document.body||i.dom==document){v=Ext.lib.Dom.getViewWidth();C=Ext.lib.Dom.getViewHeight()}else{v=i.dom.clientWidth;C=i.dom.clientHeight;if(!z){var r=i.getXY();u=r[0];t=r[1]}}var q=i.getScroll();u+=k.left+q.left;t+=k.top+q.top;v-=k.right;C-=k.bottom;var A=u+v;var g=t+C;var j=m||(!z?this.getXY():[this.getLeft(true),this.getTop(true)]);var o=j[0],n=j[1];var p=this.dom.offsetWidth,B=this.dom.offsetHeight;var l=false;if((o+p)>A){o=A-p;l=true}if((n+B)>g){n=g-B;l=true}if(o<u){o=u;l=true}if(n<t){n=t;l=true}return l?[o,n]:false}}(),getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(a){return this.alignTo(a||document,"c-c")}});Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(m,l,h){var j=this.dom,g=document.body,k=0,i;if(Ext.isGecko&&Object.prototype.toString.call(j)=="[object XULElement]"){return null}l=l||50;if(isNaN(l)){i=Ext.getDom(l);l=Number.MAX_VALUE}while(j&&j.nodeType==1&&k<l&&j!=g&&j!=i){if(e.is(j,m)){return h?a(j):j}k++;j=j.parentNode}return null},findParentNode:function(j,i,g){var h=Ext.fly(this.dom.parentNode,"_internal");return h?h.findParent(j,i,g):null},up:function(h,g){return this.findParentNode(h,g,true)},select:function(g){return Ext.Element.select(g,this.dom)},query:function(g){return e.select(g,this.dom)},child:function(g,h){var i=e.selectNode(g,this.dom);return h?i:a(i)},down:function(g,h){var i=e.selectNode(" > "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j}j=j[h]}return null}}}());Ext.Element.addMethods({select:function(a,b){return Ext.Element.select(a,b,this.dom)}});Ext.Element.addMethods(function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{appendChild:function(d){return a(d).appendTo(this)},appendTo:function(d){c(d).appendChild(this.dom);return this},insertBefore:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d);return this},insertAfter:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d.nextSibling);return this},insertFirst:function(e,d){e=e||{};if(e.nodeType||e.dom||typeof e=="string"){e=c(e);this.dom.insertBefore(e,this.dom.firstChild);return !d?a(e):e}else{return this.createChild(e,this.dom.firstChild,d)}},replace:function(d){d=a(d);this.insertBefore(d);d.remove();return this},replaceWith:function(d){var e=this;if(d.nodeType||d.dom||typeof d=="string"){d=c(d);e.dom.parentNode.insertBefore(d,e.dom)}else{d=b.insertBefore(e.dom,d)}delete Ext.elCache[e.id];Ext.removeNode(e.dom);e.id=Ext.id(e.dom=d);Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e);return e},createChild:function(e,d,g){e=e||{tag:"div"};return d?b.insertBefore(d,e,g!==true):b[!this.dom.firstChild?"overwrite":"append"](this.dom,e,g!==true)},wrap:function(d,e){var g=b.insertBefore(this.dom,d||{tag:"div"},!e);g.dom?g.dom.appendChild(this.dom):g.appendChild(this.dom);return g},insertHtml:function(e,g,d){var h=b.insertHtml(e,this.dom,g);return d?Ext.get(h):h}}}());Ext.apply(Ext.Element.prototype,function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{insertSibling:function(i,g,h){var j=this,e,d=(g||"before").toLowerCase()=="after",k;if(Ext.isArray(i)){k=j;Ext.each(i,function(l){e=Ext.fly(k,"_internal").insertSibling(l,g,h);if(d){k=e}});return e}i=i||{};if(i.nodeType||i.dom){e=j.dom.parentNode.insertBefore(c(i),d?j.dom.nextSibling:j.dom);if(!h){e=a(e)}}else{if(d&&!j.dom.nextSibling){e=b.append(j.dom.parentNode,i,!h)}else{e=b[d?"insertAfter":"insertBefore"](j.dom,i,!h)}}return e}}}());Ext.Element.addMethods(function(){var i={},z=/(-[a-z])/gi,c={},t=document.defaultView,w=Ext.isIE?"styleFloat":"cssFloat",E=/alpha\(opacity=(.*)\)/i,m=/^\s+|\s+$/g,v=/\s+/,b=/\w/g,C=Ext.Element,e="padding",d="margin",A="border",u="-left",r="-right",y="-top",p="-bottom",k="-width",s=Math,B="hidden",g="isClipped",l="overflow",o="overflow-x",n="overflow-y",D="originalClip",j={l:A+u+k,r:A+r+k,t:A+y+k,b:A+p+k},h={l:e+u,r:e+r,t:e+y,b:e+p},a={l:d+u,r:d+r,t:d+y,b:d+p},F=Ext.Element.data;function q(G,H){return H.charAt(1).toUpperCase()}function x(G){return i[G]||(i[G]=G=="float"?w:G.replace(z,q))}return{adjustWidth:function(G){var H=this;var I=(typeof G=="number");if(I&&H.autoBoxAdjust&&!H.isBorderBox()){G-=(H.getBorderWidth("lr")+H.getPadding("lr"))}return(I&&G<0)?0:G},adjustHeight:function(G){var H=this;var I=(typeof G=="number");if(I&&H.autoBoxAdjust&&!H.isBorderBox()){G-=(H.getBorderWidth("tb")+H.getPadding("tb"))}return(I&&G<0)?0:G},addClass:function(K){var L=this,J,G,I,H=[];if(!Ext.isArray(K)){if(typeof K=="string"&&!this.hasClass(K)){L.dom.className+=" "+K}}else{for(J=0,G=K.length;J<G;J++){I=K[J];if(typeof I=="string"&&(" "+L.dom.className+" ").indexOf(" "+I+" ")==-1){H.push(I)}}if(H.length){L.dom.className+=" "+H.join(" ")}}return L},removeClass:function(L){var M=this,K,H,G,J,I;if(!Ext.isArray(L)){L=[L]}if(M.dom&&M.dom.className){I=M.dom.className.replace(m,"").split(v);for(K=0,G=L.length;K<G;K++){J=L[K];if(typeof J=="string"){J=J.replace(m,"");H=I.indexOf(J);if(H!=-1){I.splice(H,1)}}}M.dom.className=I.join(" ")}return M},radioClass:function(J){var K=this.dom.parentNode.childNodes,H,I,G;J=Ext.isArray(J)?J:[J];for(I=0,G=K.length;I<G;I++){H=K[I];if(H&&H.nodeType==1){Ext.fly(H,"_internal").removeClass(J)}}return this.addClass(J)},toggleClass:function(G){return this.hasClass(G)?this.removeClass(G):this.addClass(G)},hasClass:function(G){return G&&(" "+this.dom.className+" ").indexOf(" "+G+" ")!=-1},replaceClass:function(H,G){return this.removeClass(H).addClass(G)},isStyle:function(G,H){return this.getStyle(G)==H},getStyle:function(){return t&&t.getComputedStyle?function(M){var J=this.dom,G,I,H,K,L=Ext.isWebKit,K;if(J==document){return null}M=x(M);if(L&&/marginRight/.test(M)){K=this.getStyle("display");J.style.display="inline-block"}H=(G=J.style[M])?G:(I=t.getComputedStyle(J,""))?I[M]:null;if(L){if(H=="rgba(0, 0, 0, 0)"){H="transparent"}else{if(K){J.style.display=K}}}return H}:function(K){var I=this.dom,G,H;if(I==document){return null}if(K=="opacity"){if(I.style.filter.match){if(G=I.style.filter.match(E)){var J=parseFloat(G[1]);if(!isNaN(J)){return J?J/100:0}}}return 1}K=x(K);return I.style[K]||((H=I.currentStyle)?H[K]:null)}}(),getColor:function(G,H,L){var J=this.getStyle(G),I=(typeof L!="undefined")?L:"#",K;if(!J||/transparent|inherit/.test(J)){return H}if(/^r/.test(J)){Ext.each(J.slice(4,J.length-1).split(","),function(M){K=parseInt(M,10);I+=(K<16?"0":"")+K.toString(16)})}else{J=J.replace("#","");I+=J.length==3?J.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):J}return(I.length>5?I.toLowerCase():H)},setStyle:function(K,J){var H,I,G;if(typeof K!="object"){H={};H[K]=J;K=H}for(I in K){J=K[I];I=="opacity"?this.setOpacity(J):this.dom.style[x(I)]=J}return this},setOpacity:function(H,G){var K=this,I=K.dom.style;if(!G||!K.anim){if(Ext.isIE){var J=H<1?"alpha(opacity="+H*100+")":"",L=I.filter.replace(E,"").replace(m,"");I.zoom=1;I.filter=L+(L.length>0?" ":"")+J}else{I.opacity=H}}else{K.anim({opacity:{to:H}},K.preanim(arguments,1),null,0.35,"easeIn")}return K},clearOpacity:function(){var G=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(G.filter)){G.filter=G.filter.replace(E,"").replace(m,"")}}else{G.opacity=G["-moz-opacity"]=G["-khtml-opacity"]=""}return this},getHeight:function(I){var H=this,K=H.dom,J=Ext.isIE&&H.isStyle("display","none"),G=s.max(K.offsetHeight,J?0:K.clientHeight)||0;G=!I?G:G-H.getBorderWidth("tb")-H.getPadding("tb");return G<0?0:G},getWidth:function(H){var I=this,K=I.dom,J=Ext.isIE&&I.isStyle("display","none"),G=s.max(K.offsetWidth,J?0:K.clientWidth)||0;G=!H?G:G-I.getBorderWidth("lr")-I.getPadding("lr");return G<0?0:G},setWidth:function(H,G){var I=this;H=I.adjustWidth(H);!G||!I.anim?I.dom.style.width=I.addUnits(H):I.anim({width:{to:H}},I.preanim(arguments,1));return I},setHeight:function(G,H){var I=this;G=I.adjustHeight(G);!H||!I.anim?I.dom.style.height=I.addUnits(G):I.anim({height:{to:G}},I.preanim(arguments,1));return I},getBorderWidth:function(G){return this.addStyles(G,j)},getPadding:function(G){return this.addStyles(G,h)},clip:function(){var G=this,H=G.dom;if(!F(H,g)){F(H,g,true);F(H,D,{o:G.getStyle(l),x:G.getStyle(o),y:G.getStyle(n)});G.setStyle(l,B);G.setStyle(o,B);G.setStyle(n,B)}return G},unclip:function(){var G=this,I=G.dom;if(F(I,g)){F(I,g,false);var H=F(I,D);if(H.o){G.setStyle(l,H.o)}if(H.x){G.setStyle(o,H.x)}if(H.y){G.setStyle(n,H.y)}}return G},addStyles:function(N,M){var K=0,L=N.match(b),J,I,H,G=L.length;for(H=0;H<G;H++){J=L[H];I=J&&parseInt(this.getStyle(M[J]),10);if(I){K+=s.abs(I)}}return K},margins:a}}());Ext.Element.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';Ext.Element.addMethods(function(){var a="_internal",b=/(\d+\.?\d+)px/;return{applyStyles:function(c){Ext.DomHelper.applyStyles(this.dom,c);return this},getStyles:function(){var c={};Ext.each(arguments,function(d){c[d]=this.getStyle(d)},this);return c},setOverflow:function(c){var d=this.dom;if(c=="auto"&&Ext.isMac&&Ext.isGecko2){d.style.overflow="hidden";(function(){d.style.overflow="auto"}).defer(1)}else{d.style.overflow=c}},boxWrap:function(c){c=c||"x-box";var d=Ext.get(this.insertHtml("beforeBegin","<div class='"+c+"'>"+String.format(Ext.Element.boxMarkup,c)+"</div>"));Ext.DomQuery.selectNode("."+c+"-mc",d.dom).appendChild(this.dom);return d},setSize:function(e,c,d){var g=this;if(typeof e=="object"){c=e.height;e=e.width}e=g.adjustWidth(e);c=g.adjustHeight(c);if(!d||!g.anim){g.dom.style.width=g.addUnits(e);g.dom.style.height=g.addUnits(c)}else{g.anim({width:{to:e},height:{to:c}},g.preanim(arguments,2))}return g},getComputedHeight:function(){var d=this,c=Math.max(d.dom.offsetHeight,d.dom.clientHeight);if(!c){c=parseFloat(d.getStyle("height"))||0;if(!d.isBorderBox()){c+=d.getFrameWidth("tb")}}return c},getComputedWidth:function(){var c=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!c){c=parseFloat(this.getStyle("width"))||0;if(!this.isBorderBox()){c+=this.getFrameWidth("lr")}}return c},getFrameWidth:function(d,c){return c&&this.isBorderBox()?0:(this.getPadding(d)+this.getBorderWidth(d))},addClassOnOver:function(c){this.hover(function(){Ext.fly(this,a).addClass(c)},function(){Ext.fly(this,a).removeClass(c)});return this},addClassOnFocus:function(c){this.on("focus",function(){Ext.fly(this,a).addClass(c)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(c)},this.dom);return this},addClassOnClick:function(c){var d=this.dom;this.on("mousedown",function(){Ext.fly(d,a).addClass(c);var g=Ext.getDoc(),e=function(){Ext.fly(d,a).removeClass(c);g.removeListener("mouseup",e)};g.on("mouseup",e)});return this},getViewSize:function(){var g=document,h=this.dom,c=(h==g||h==g.body);if(c){var e=Ext.lib.Dom;return{width:e.getViewWidth(),height:e.getViewHeight()}}else{return{width:h.clientWidth,height:h.clientHeight}}},getStyleSize:function(){var j=this,c,i,l=document,m=this.dom,e=(m==l||m==l.body),g=m.style;if(e){var k=Ext.lib.Dom;return{width:k.getViewWidth(),height:k.getViewHeight()}}if(g.width&&g.width!="auto"){c=parseFloat(g.width);if(j.isBorderBox()){c-=j.getFrameWidth("lr")}}if(g.height&&g.height!="auto"){i=parseFloat(g.height);if(j.isBorderBox()){i-=j.getFrameWidth("tb")}}return{width:c||j.getWidth(true),height:i||j.getHeight(true)}},getSize:function(c){return{width:this.getWidth(c),height:this.getHeight(c)}},repaint:function(){var c=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(c).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(d){var e=this,c,g={t:"top",l:"left",r:"right",b:"bottom"},h={};if(!d){for(c in e.margins){h[g[c]]=parseFloat(e.getStyle(e.margins[c]))||0}return h}else{return e.addStyles.call(e,d,e.margins)}}}}());(function(){var a=Ext.lib.Dom,b="left",g="right",d="top",i="bottom",h="position",c="static",e="relative",j="auto",k="z-index";Ext.Element.addMethods({getX:function(){return a.getX(this.dom)},getY:function(){return a.getY(this.dom)},getXY:function(){return a.getXY(this.dom)},getOffsetsTo:function(l){var n=this.getXY(),m=Ext.fly(l,"_internal").getXY();return[n[0]-m[0],n[1]-m[1]]},setX:function(l,m){return this.setXY([l,this.getY()],this.animTest(arguments,m,1))},setY:function(m,l){return this.setXY([this.getX(),m],this.animTest(arguments,l,1))},setLeft:function(l){this.setStyle(b,this.addUnits(l));return this},setTop:function(l){this.setStyle(d,this.addUnits(l));return this},setRight:function(l){this.setStyle(g,this.addUnits(l));return this},setBottom:function(l){this.setStyle(i,this.addUnits(l));return this},setXY:function(n,l){var m=this;if(!l||!m.anim){a.setXY(m.dom,n)}else{m.anim({points:{to:n}},m.preanim(arguments,1),"motion")}return m},setLocation:function(l,n,m){return this.setXY([l,n],this.animTest(arguments,m,2))},moveTo:function(l,n,m){return this.setXY([l,n],this.animTest(arguments,m,2))},getLeft:function(l){return !l?this.getX():parseInt(this.getStyle(b),10)||0},getRight:function(l){var m=this;return !l?m.getX()+m.getWidth():(m.getLeft(true)+m.getWidth())||0},getTop:function(l){return !l?this.getY():parseInt(this.getStyle(d),10)||0},getBottom:function(l){var m=this;return !l?m.getY()+m.getHeight():(m.getTop(true)+m.getHeight())||0},position:function(p,o,l,n){var m=this;if(!p&&m.isStyle(h,c)){m.setStyle(h,e)}else{if(p){m.setStyle(h,p)}}if(o){m.setStyle(k,o)}if(l||n){m.setXY([l||false,n||false])}},clearPositioning:function(l){l=l||"";this.setStyle({left:l,right:l,top:l,bottom:l,"z-index":"",position:c});return this},getPositioning:function(){var m=this.getStyle(b);var n=this.getStyle(d);return{position:this.getStyle(h),left:m,right:m?"":this.getStyle(g),top:n,bottom:n?"":this.getStyle(i),"z-index":this.getStyle(k)}},setPositioning:function(l){var n=this,m=n.dom.style;n.setStyle(l);if(l.right==j){m.right=""}if(l.bottom==j){m.bottom=""}return n},translatePoints:function(m,u){u=isNaN(m[1])?u:m[1];m=isNaN(m[0])?m:m[0];var q=this,r=q.isStyle(h,e),s=q.getXY(),n=parseInt(q.getStyle(b),10),p=parseInt(q.getStyle(d),10);n=!isNaN(n)?n:(r?0:q.dom.offsetLeft);p=!isNaN(p)?p:(r?0:q.dom.offsetTop);return{left:(m-s[0]+n),top:(u-s[1]+p)}},animTest:function(m,l,n){return !!l&&this.preanim?this.preanim(m,n):false}})})();Ext.Element.addMethods({setBox:function(e,g,b){var d=this,a=e.width,c=e.height;if((g&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(j,p){var m=this,v,e,o,d=m.getBorderWidth,q=m.getPadding,g,a,u,n;if(!p){v=m.getXY()}else{e=parseInt(m.getStyle("left"),10)||0;o=parseInt(m.getStyle("top"),10)||0;v=[e,o]}var c=m.dom,s=c.offsetWidth,i=c.offsetHeight,k;if(!j){k={x:v[0],y:v[1],0:v[0],1:v[1],width:s,height:i}}else{g=d.call(m,"l")+q.call(m,"l");a=d.call(m,"r")+q.call(m,"r");u=d.call(m,"t")+q.call(m,"t");n=d.call(m,"b")+q.call(m,"b");k={x:v[0]+g,y:v[1]+u,0:v[0]+g,1:v[1]+u,width:s-(g+a),height:i-(u+n)}}k.right=k.x+k.width;k.bottom=k.y+k.height;return k},move:function(j,b,c){var g=this,m=g.getXY(),k=m[0],i=m[1],d=[k-b,i],l=[k+b,i],h=[k,i-b],a=[k,i+b],e={l:d,left:d,r:l,right:l,t:h,top:h,up:h,b:a,bottom:a,down:a};j=j.toLowerCase();g.moveTo(e[j][0],e[j][1],g.animTest.call(g,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,g,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,g)}else{e.anim({points:{to:[b,g]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.addMethods({scrollTo:function(b,d,a){var e=/top/i.test(b),c=this,g=c.dom,h;if(!a||!c.anim){h="scroll"+(e?"Top":"Left"),g[h]=d}else{h="scroll"+(e?"Left":"Top"),c.anim({scroll:{to:e?[g[h],d]:[d,g[h]]}},c.preanim(arguments,2),"scroll")}return c},scrollIntoView:function(e,i){var p=Ext.getDom(e)||Ext.getBody().dom,h=this.dom,g=this.getOffsetsTo(p),k=g[0]+p.scrollLeft,u=g[1]+p.scrollTop,q=u+h.offsetHeight,d=k+h.offsetWidth,a=p.clientHeight,m=parseInt(p.scrollTop,10),s=parseInt(p.scrollLeft,10),j=m+a,n=s+p.clientWidth;if(h.offsetHeight>a||u<m){p.scrollTop=u}else{if(q>j){p.scrollTop=q-a}}p.scrollTop=p.scrollTop;if(i!==false){if(h.offsetWidth>p.clientWidth||k<s){p.scrollLeft=k}else{if(d>n){p.scrollLeft=d-p.clientWidth}}p.scrollLeft=p.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.preanim(arguments,2))}return c}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.addMethods(function(){var h="visibility",d="display",b="hidden",k="offsets",j="none",a="originalDisplay",c="visibilityMode",e=Ext.Element.DISPLAY,g=Ext.Element.data,i=function(n){var m=g(n,a);if(m===undefined){g(n,a,m="")}return m},l=function(o){var n=g(o,c);if(n===undefined){g(o,c,n=1)}return n};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(m){g(this.dom,c,m);return this},animate:function(n,p,o,q,m){this.anim(n,{duration:p,callback:o,easing:q},m);return this},anim:function(p,q,n,s,o,m){n=n||"run";q=q||{};var r=this,t=Ext.lib.Anim[n](r.dom,p,(q.duration||s)||0.35,(q.easing||o)||"easeOut",function(){if(m){m.call(r)}if(q.callback){q.callback.call(q.scope||r,r,q)}},r);q.anim=t;return t},preanim:function(m,n){return !m[n]?false:(typeof m[n]=="object"?m[n]:{duration:m[n+1],callback:m[n+2],easing:m[n+3]})},isVisible:function(){return !this.isStyle(h,b)&&!this.isStyle(d,j)},setVisible:function(r,o){var p=this,n,m,s,q=p.dom;if(typeof o=="string"){n=o==d;m=o==h;s=o==k;o=false}else{n=l(this.dom)==e;m=!n}if(!o||!p.anim){if(n){p.setDisplayed(r)}else{if(s){if(!r){p.hideModeStyles={position:p.getStyle("position"),top:p.getStyle("top"),left:p.getStyle("left")};p.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{p.applyStyles(p.hideModeStyles||{position:"",top:"",left:""})}}else{p.fixDisplay();q.style.visibility=r?"visible":b}}}else{if(r){p.setOpacity(0.01);p.setVisible(true)}p.anim({opacity:{to:(r?1:0)}},p.preanim(arguments,1),null,0.35,"easeIn",function(){if(!r){q.style[n?d:h]=(n)?j:b;Ext.fly(q).setOpacity(1)}})}return p},toggle:function(m){var n=this;n.setVisible(!n.isVisible(),n.preanim(arguments,0));return n},setDisplayed:function(m){if(typeof m=="boolean"){m=m?i(this.dom):j}this.setStyle(d,m);return this},fixDisplay:function(){var m=this;if(m.isStyle(d,j)){m.setStyle(h,b);m.setStyle(d,i(this.dom));if(m.isStyle(d,j)){m.setStyle(d,"block")}}},hide:function(m){if(typeof m=="string"){this.setVisible(false,m);return this}this.setVisible(false,this.preanim(arguments,0));return this},show:function(m){if(typeof m=="string"){this.setVisible(true,m);return this}this.setVisible(true,this.preanim(arguments,0));return this}}}());Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c="x-masked",g="x-masked-relative",e=Ext.Element.data;return{isVisible:function(i){var j=!this.isStyle(d,a)&&!this.isStyle(b,h),k=this.dom.parentNode;if(i!==true||!j){return j}while(k&&!/^body/i.test(k.tagName)){if(!Ext.fly(k,"_isVisible").isVisible()){return false}k=k.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(j,n){var p=this,l=p.dom,o=Ext.DomHelper,m="ext-el-mask-msg",i,q;if(!/^body/i.test(l.tagName)&&p.getStyle("position")=="static"){p.addClass(g)}if((i=e(l,"maskMsg"))){i.remove()}if((i=e(l,"mask"))){i.remove()}q=o.append(l,{cls:"ext-el-mask"},true);e(l,"mask",q);p.addClass(c);q.setDisplayed(true);if(typeof j=="string"){var k=o.append(l,{cls:m,cn:{tag:"div"}},true);e(l,"maskMsg",k);k.dom.className=n?m+" "+n:m;k.dom.firstChild.innerHTML=j;k.setDisplayed(true);k.center(p)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&p.getStyle("height")=="auto"){q.setSize(undefined,p.getHeight())}return q},unmask:function(){var k=this,l=k.dom,i=e(l,"mask"),j=e(l,"maskMsg");if(i){if(j){j.remove();e(l,"maskMsg",undefined)}i.remove();e(l,"mask",undefined)}k.removeClass([c,g])},isMasked:function(){var i=e(this.dom,"mask");return i&&i.isVisible()},createShim:function(){var i=document.createElement("iframe"),j;i.frameBorder="0";i.className="ext-shim";i.src=Ext.SSL_SECURE_URL;j=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));j.autoBoxAdjust=false;return j}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(typeof b!="object"||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{}},p=function(B){d.dom=B;d.id=Ext.id(B);return d},c=function(B){if(!v[B]){v[B]=[]}return v[B]},b=function(C,B){v[C]=B};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C])},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E)}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z)}R[ac]=R[ab]="0";if(aa){Y.width=aa}if(W){Y.height=W}if(T){Y.points=T}return Y}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P)});return J},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D)}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R}if(T){P[T]=Q}return P}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M)});return H},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H)}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I)});return F},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F)}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G)}).defer(100)})});return D},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H)}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I)});return F},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K)};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx()}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H)}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop()}}}I()});return D},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({})},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({})}}});return this},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity()}p(C).afterFx(D)})});return B},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity()}p(D).afterFx(E)})});return C},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]}}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]}}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D)})});return this},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C)}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M]},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L)});return G},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k)}else{b(E,[])}}}return C},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k}return t}return k},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block},queueFx:function(E,B){var C=p(this.dom);if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx()}}else{B.call(C)}}return C},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY()}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative")}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B)}}return C},fxUnwrap:function(C,F,E){var D=this.dom;p(D).clearPositioning();p(D).setPositioning(F);if(!E.wrap){var B=p(C).dom.parentNode;B.insertBefore(D,C);p(C).remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(C){var B=this.dom,D=B.id;if(C.afterStyle){p(B).setStyle(C.afterStyle)}if(C.afterCls){p(B).addClass(C.afterCls)}if(C.remove==k){p(B).remove()}if(C.callback){C.callback.call(C.scope,p(B))}if(!C.concurrent){c(D).shift();p(B).nextFx()}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(typeof d=="string"){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c<a;++c){g.push(e.transformElement(d[c]))}return e},invoke:function(g,b){var h=this,d=h.elements,a=d.length,j,c;for(c=0;c<a;c++){j=d[c];if(j){Ext.Element.prototype[g].apply(h.getElement(j),b)}}return h},item:function(b){var d=this,c=d.elements[b],a=null;if(c){a=d.getElement(c)}return a},addListener:function(b,j,h,g){var d=this.elements,a=d.length,c,k;for(c=0;c<a;c++){k=d[c];if(k){Ext.EventManager.on(k,b,j,h||k,g)}}return this},each:function(g,d){var h=this,c=h.elements,a=c.length,b,j;for(b=0;b<a;b++){j=c[b];if(j){j=this.getElement(j);if(g.call(d||j,j,h,b)===false){break}}}return h},fill:function(a){var b=this;b.elements=[];b.add(a);return b},filter:function(a){var b=[],d=this,e=d.elements,c=Ext.isFunction(a)?a:function(g){return g.is(a)};d.each(function(j,g,h){if(c(j,h)!==false){b[b.length]=d.transformElement(j)}});d.elements=b;return d},indexOf:function(a){return this.elements.indexOf(this.transformElement(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;(function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(Ext.isFunction(b[c])){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}})();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(g,1)}});return this}});Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(b,a){this.elements=[];this.add(b,a)},getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var b="beforerequest",e="requestcomplete",d="requestexception",h=undefined,c="load",i="POST",a="GET",g=window;Ext.data.Connection=function(j){Ext.apply(this,j);this.addEvents(b,e,d);Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(n){var s=this;if(s.fireEvent(b,s,n)){if(n.el){if(!Ext.isEmpty(n.indicatorText)){s.indicatorText='<div class="loading-indicator">'+n.indicatorText+"</div>"}if(s.indicatorText){Ext.getDom(n.el).innerHTML=s.indicatorText}n.success=(Ext.isFunction(n.success)?n.success:function(){}).createInterceptor(function(o){Ext.getDom(n.el).innerHTML=o.responseText})}var l=n.params,k=n.url||s.url,j,q={success:s.handleResponse,failure:s.handleFailure,scope:s,argument:{options:n},timeout:n.timeout||s.timeout},m,t;if(Ext.isFunction(l)){l=l.call(n.scope||g,n)}l=Ext.urlEncode(s.extraParams,Ext.isObject(l)?Ext.urlEncode(l):l);if(Ext.isFunction(k)){k=k.call(n.scope||g,n)}if((m=Ext.getDom(n.form))){k=k||m.action;if(n.isUpload||/multipart\/form-data/i.test(m.getAttribute("enctype"))){return s.doFormUpload.call(s,n,l,k)}t=Ext.lib.Ajax.serializeForm(m);l=l?(l+"&"+t):t}j=n.method||s.method||((l||n.xmlData||n.jsonData)?i:a);if(j===a&&(s.disableCaching&&n.disableCaching!==false)||n.disableCaching===true){var r=n.disableCachingParam||s.disableCachingParam;k=Ext.urlAppend(k,r+"="+(new Date().getTime()))}n.headers=Ext.apply(n.headers||{},s.defaultHeaders||{});if(n.autoAbort===true||s.autoAbort){s.abort()}if((j==a||n.xmlData||n.jsonData)&&l){k=Ext.urlAppend(k,l);l=""}return(s.transId=Ext.lib.Ajax.request(j,k,q,l,n))}else{return n.callback?n.callback.apply(n.scope,[n,h,h]):null}},isLoading:function(j){return j?Ext.lib.Ajax.isCallInProgress(j):!!this.transId},abort:function(j){if(j||this.isLoading()){Ext.lib.Ajax.abort(j||this.transId)}},handleResponse:function(j){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(e,this,j,k);if(k.success){k.success.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,true,j)}},handleFailure:function(j,l){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(d,this,j,k,l);if(k.failure){k.failure.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,false,j)}},doFormUpload:function(q,j,k){var l=Ext.id(),v=document,r=v.createElement("iframe"),m=Ext.getDom(q.form),u=[],t,p="multipart/form-data",n={target:m.target,method:m.method,encoding:m.encoding,enctype:m.enctype,action:m.action};Ext.fly(r).set({id:l,name:l,cls:"x-hidden",src:Ext.SSL_SECURE_URL});v.body.appendChild(r);if(Ext.isIE){document.frames[l].name=l}Ext.fly(m).set({target:l,method:i,enctype:p,encoding:p,action:k||n.action});Ext.iterate(Ext.urlDecode(j,false),function(w,o){t=v.createElement("input");Ext.fly(t).set({type:"hidden",value:o,name:w});m.appendChild(t);u.push(t)});function s(){var x=this,w={responseText:"",responseXML:null,argument:q.argument},A,z;try{A=r.contentWindow.document||r.contentDocument||g.frames[l].document;if(A){if(A.body){if(/textarea/i.test((z=A.body.firstChild||{}).tagName)){w.responseText=z.value}else{w.responseText=A.body.innerHTML}}w.responseXML=A.XMLDocument||A}}catch(y){}Ext.EventManager.removeListener(r,c,s,x);x.fireEvent(e,x,w,q);function o(D,C,B){if(Ext.isFunction(D)){D.apply(C,B)}}o(q.success,q.scope,[w,q]);o(q.callback,q.scope,[q,true,w]);if(!x.debugUploads){setTimeout(function(){Ext.removeNode(r)},100)}}Ext.EventManager.on(r,c,s,this);m.submit();Ext.fly(m).set(n);Ext.each(u,function(o){Ext.removeNode(o)})}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(h){var i=this;i.transaction=null;if(h.argument.form&&h.argument.reset){try{h.argument.form.reset()}catch(j){}}if(i.loadScripts){i.renderer.render(i.el,h,i,g.createDelegate(i,[h]))}else{i.renderer.render(i.el,h,i);g.call(i,h)}}function g(h,i,j){this.fireEvent(i||d,this.el,h);if(Ext.isFunction(h.argument.callback)){h.argument.callback.call(h.argument.scope,this.el,Ext.isEmpty(j)?true:false,h,h.argument.options)}}function e(h){g.call(this,h,c,!!(this.transaction=null))}return{constructor:function(i,h){var j=this;i=Ext.get(i);if(!h&&i.updateManager){return i.updateManager}j.el=i;j.defaultUrl=null;j.addEvents(b,d,c);Ext.apply(j,Ext.Updater.defaults);j.transaction=null;j.refreshDelegate=j.refresh.createDelegate(j);j.updateDelegate=j.update.createDelegate(j);j.formUpdateDelegate=(j.formUpdate||function(){}).createDelegate(j);j.renderer=j.renderer||j.getDefaultRenderer();Ext.Updater.superclass.constructor.call(j)},setRenderer:function(h){this.renderer=h},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(h){this.defaultUrl=h},getEl:function(){return this.el},update:function(i,n,p,l){var k=this,h,j;if(k.fireEvent(b,k.el,i,n)!==false){if(Ext.isObject(i)){h=i;i=h.url;n=n||h.params;p=p||h.callback;l=l||h.discardUrl;j=h.scope;if(!Ext.isEmpty(h.nocache)){k.disableCaching=h.nocache}if(!Ext.isEmpty(h.text)){k.indicatorText='<div class="loading-indicator">'+h.text+"</div>"}if(!Ext.isEmpty(h.scripts)){k.loadScripts=h.scripts}if(!Ext.isEmpty(h.timeout)){k.timeout=h.timeout}}k.showLoading();if(!l){k.defaultUrl=i}if(Ext.isFunction(i)){i=i.call(k)}var m=Ext.apply({},{url:i,params:(Ext.isFunction(n)&&j)?n.createDelegate(j):n,success:a,failure:e,scope:k,callback:undefined,timeout:(k.timeout*1000),disableCaching:k.disableCaching,argument:{options:h,url:i,form:null,callback:p,scope:j||window,params:n}},h);k.transaction=Ext.Ajax.request(m)}},formUpdate:function(k,h,j,l){var i=this;if(i.fireEvent(b,i.el,k,h)!==false){if(Ext.isFunction(h)){h=h.call(i)}k=Ext.getDom(k);i.transaction=Ext.Ajax.request({form:k,url:h,success:a,failure:e,scope:i,timeout:(i.timeout*1000),argument:{url:h,form:k,callback:l,reset:j}});i.showLoading.defer(1,i)}},startAutoRefresh:function(i,j,l,m,h){var k=this;if(h){k.update(j||k.defaultUrl,l,m,true)}if(k.autoRefreshProcId){clearInterval(k.autoRefreshProcId)}k.autoRefreshProcId=setInterval(k.update.createDelegate(k,[j||k.defaultUrl,l,m,true]),i*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(h){if(this.defaultUrl){this.update(this.defaultUrl,null,h,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'<div class="loading-indicator">Loading...</div>',loadScripts:false,sslBlankUrl:Ext.SSL_SECURE_URL};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g<d;++g){var j=k.charAt(g);h.push(j=="T"?"'T'":Date.getFormatCode(j))}return h.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(o,c,n,k,g,j,e){k=k||0;g=g||0;j=j||0;e=e||0;var l=new Date(o,c-1,n,k,g,j,e);return o==l.getFullYear()&&c==l.getMonth()+1&&n==l.getDate()&&k==l.getHours()&&g==l.getMinutes()&&j==l.getSeconds()&&e==l.getMilliseconds()},parseDate:function(d,g,c){var e=Date.parseFunctions;if(e[g]==null){Date.createParser(g)}return e[g](d,Ext.isDefined(c)?c:Date.useStrict)},getFormatCode:function(d){var c=Date.formatCodes[d];if(c){c=typeof c=="function"?c():c;Date.formatCodes[d]=c}return c||("'"+String.escape(d)+"'")},createFormat:function(h){var g=[],c=false,e="";for(var d=0;d<h.length;++d){e=h.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;g.push("'"+String.escape(e)+"'")}else{g.push(Date.getFormatCode(e))}}}Date.formatFunctions[h]=new Function("return "+g.join("+"))},createParser:function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Date.defaults,","results = String(input).match(Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = (new Date()).clearTime();","y = Ext.num(y, Ext.num(def.y, dt.getFullYear()));","m = Ext.num(m, Ext.num(def.m - 1, dt.getMonth()));","d = Ext.num(d, Ext.num(def.d, dt.getDate()));","h  = Ext.num(h, Ext.num(def.h, dt.getHours()));","i  = Ext.num(i, Ext.num(def.i, dt.getMinutes()));","s  = Ext.num(s, Ext.num(def.s, dt.getSeconds()));","ms = Ext.num(ms, Ext.num(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = new Date(y, 0, 1, h, i, s, ms);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y, m, d, h, i, s, ms);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(m){var e=Date.parseRegexes.length,n=1,g=[],l=[],k=false,d="";for(var j=0;j<m.length;++j){d=m.charAt(j);if(!k&&d=="\\"){k=true}else{if(k){k=false;l.push(String.escape(d))}else{var h=a(d,n);n+=h.g;l.push(h.s);if(h.g&&h.c){g.push(h.c)}}}}Date.parseRegexes[e]=new RegExp("^"+l.join("")+"$");Date.parseFunctions[m]=new Function("input","strict",b(c,e,g.join("")))}}(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var c=[],d=0;d<7;c.push(Date.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var c=[],d=0;d<12;c.push(Date.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return a("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM)"},g:function(){return a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g<d;++g){e.push(c[g].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}})}());Ext.apply(Date.prototype,{dateFormat:function(a){if(Date.formatFunctions[a]==null){Date.createFormat(a)}return Date.formatFunctions[a].call(this)},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(a){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var b=0,e=this.clone(),a=this.getMonth(),c;for(c=0,e.setDate(1),e.setMonth(0);c<a;e.setMonth(++c)){b+=e.getDaysInMonth()}return b+this.getDate()-1},getWeekOfYear:function(){var a=86400000,b=7*a;return function(){var d=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/a,c=Math.floor(d/7),e=new Date(c*b).getUTCFullYear();return c-Math.floor(Date.UTC(e,0,7)/b)+1}}(),isLeapYear:function(){var a=this.getFullYear();return !!((a&3)==0&&(a%100||(a%400==0&&a)))},getFirstDayOfMonth:function(){var a=(this.getDay()-(this.getDate()-1))%7;return(a<0)?(a+7):a},getLastDayOfMonth:function(){return this.getLastDateOfMonth().getDay()},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1)},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth())},getDaysInMonth:function(){var a=[31,28,31,30,31,30,31,31,30,31,30,31];return function(){var b=this.getMonth();return b==1&&this.isLeapYear()?29:a[b]}}(),getSuffix:function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(){return new Date(this.getTime())},isDST:function(){return new Date(this.getFullYear(),0,1).getTimezoneOffset()!=this.getTimezoneOffset()},clearTime:function(g){if(g){return this.clone().clearTime()}var b=this.getDate();this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);if(this.getDate()!=b){for(var a=1,e=this.add(Date.HOUR,a);e.getDate()!=b;a++,e=this.add(Date.HOUR,a)){}this.setDate(b);this.setHours(e.getHours())}return this},add:function(b,c){var e=this.clone();if(!b||c===0){return e}switch(b.toLowerCase()){case Date.MILLI:e.setMilliseconds(this.getMilliseconds()+c);break;case Date.SECOND:e.setSeconds(this.getSeconds()+c);break;case Date.MINUTE:e.setMinutes(this.getMinutes()+c);break;case Date.HOUR:e.setHours(this.getHours()+c);break;case Date.DAY:e.setDate(this.getDate()+c);break;case Date.MONTH:var a=this.getDate();if(a>28){a=Math.min(a,this.getFirstDateOfMonth().add("mo",c).getLastDateOfMonth().getDate())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},between:function(c,a){var b=this.getTime();return c.getTime()<=b&&b<=a.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.MixedCollection=function(b,a){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=b===true;if(a){this.getKey=a}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(b,c){if(arguments.length==1){c=arguments[0];b=this.getKey(c)}if(typeof b!="undefined"&&b!==null){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d<a;d++){this.add(b[d])}}else{for(var c in e){if(this.allowFunctions||typeof e[c]!="function"){this.add(c,e[c])}}}},each:function(e,d){var b=[].concat(this.items);for(var c=0,a=b.length;c<a;c++){if(e.call(d||b[c],b[c],c,a)===false){break}}},eachKey:function(d,c){for(var b=0,a=this.keys.length;b<a;b++){d.call(c||window,this.keys[b],this.items[b],b,a)}},find:function(d,c){for(var b=0,a=this.items.length;b<a;b++){if(d.call(c||window,this.items[b],this.keys[b])){return this.items[b]}}return null},insert:function(a,b,c){if(arguments.length==2){c=arguments[1];b=this.getKey(c)}if(this.containsKey(b)){this.suspendEvents();this.removeKey(b);this.resumeEvents()}if(a>=this.length){return this.add(b,c)}this.length++;this.items.splice(a,0,c);if(typeof b!="undefined"&&b!==null){this.map[b]=c}this.keys.splice(a,0,b);this.fireEvent("add",a,c,b);return c},remove:function(a){return this.removeAt(this.indexOf(a))},removeAt:function(a){if(a<this.length&&a>=0){this.length--;var c=this.items[a];this.items.splice(a,1);var b=this.keys[a];if(typeof b!="undefined"){delete this.map[b]}this.keys.splice(a,1);this.fireEvent("remove",c,b);return c}return false},removeKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return this.items.indexOf(a)},indexOfKey:function(a){return this.keys.indexOf(a)},item:function(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return typeof c!="function"||this.allowFunctions?c:null},itemAt:function(a){return this.items[a]},key:function(a){return this.map[a]},contains:function(a){return this.indexOf(a)!=-1},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(k,a,j){var d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],l=this.keys,g=this.items;j=j||function(i,c){return i-c};for(d=0,e=g.length;d<e;d++){h[h.length]={key:l[d],value:g[d],index:d}}h.sort(function(i,c){var m=j(i[k],c[k])*b;if(m===0){m=(i.index<c.index?-1:1)}return m});for(d=0,e=h.length;d<e;d++){g[d]=h[d].value;l[d]=h[d].key}this.fireEvent("sort",this)},sort:function(a,b){this._sort("value",a,b)},reorder:function(d){this.suspendEvents();var b=this.items,c=0,g=b.length,a=[],e=[];for(oldIndex in d){a[d[oldIndex]]=b[oldIndex]}for(c=0;c<g;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<g;c++){if(a[c]==undefined){a[c]=e.shift()}}this.clear();this.addAll(a);this.resumeEvents();this.fireEvent("sort",this)},keySort:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})},getRange:function(e,a){var b=this.items;if(b.length<1){return[]}e=e||0;a=Math.min(typeof a=="undefined"?this.length-1:a,this.length-1);var c,d=[];if(e<=a){for(c=e;c<=a;c++){d[d.length]=b[c]}}else{for(c=e;c>=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(g,e){var h=new Ext.util.MixedCollection();h.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c<a;c++){if(g.call(e||this,d[c],b[c])){h.add(b[c],d[c])}}return h},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(g,e,h){var b=this.keys,d=this.items;for(var c=(h||0),a=d.length;c<a;c++){if(g.call(e||this,d[c],b[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.escapeRe;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var e=new Ext.util.MixedCollection();var b=this.keys,d=this.items;for(var c=0,a=d.length;c<a;c++){e.add(b[c],d[c])}e.getKey=this.getKey;return e}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.util.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!o.getElementsByTagName){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(doEncode(i),":",v===null?"null":doEncode(v));b=true}}}}a.push("}");return a.join("")}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'},encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode}return ec(o)}}();this.decode=function(){var dc;return function(json){if(!dc){dc=isNative()?JSON.parse:doDecode}return dc(json)}}()})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;Ext.util.Format=function(){var trimRe=/^\s+|\s+$/g,stripTagsRE=/<\/?[^>]+>/gi,stripScriptsRe=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,nl2brRe=/\r?\n/g;return{ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2),index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{return value.substr(0,len-3)+"..."}}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},htmlDecode:function(value){return !value?value:String(value).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split("."),whole=ps[0],sub=ps[1]?"."+ps[1]:".00",r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTags:function(v){return !v?v:String(v).replace(stripTagsRE,"")},stripScripts:function(v){return !v?v:String(v).replace(stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1<psplit.length){v=v.toFixed(psplit[1].length)}else{if(2<psplit.length){throw ("NumberFormatException: invalid format, formats should have no more than 1 period: "+format)}else{v=v.toFixed(0)}}var fnum=v.toString();psplit=fnum.split(".");if(hasComma){var cnum=psplit[0],parr=[],j=cnum.length,m=Math.floor(j/3),n=cnum.length%3||3;for(var i=0;i<j;i+=n){if(i!=0){n=3}parr[parr.length]=cnum.substr(i,n);m-=1}fnum=parr.join(comma);if(psplit[1]){fnum+=dec+psplit[1]}}else{if(psplit[1]){fnum=psplit[0]+dec+psplit[1]}}return(neg?"-":"")+format.replace(/[\d,?\.?]+/,fnum)},numberRenderer:function(format){return function(v){return Ext.util.Format.number(v,format)}},plural:function(v,s,p){return v+" "+(v==1?s:(p?p:s+"s"))},nl2br:function(v){return Ext.isEmpty(v)?"":v.replace(nl2brRe,"<br/>")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var y=this,j=y.html,q=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^<tpl\b[^>]*?for="(.*?)"/,v=/^<tpl\b[^>]*?if="(.*?)"/,x=/^<tpl\b[^>]*?exec="(.*?)"/,r,p=0,k=[],o="values",w="parent",l="xindex",n="xcount",e="return ",c="with(values){ ";j=["<tpl>",j,"</tpl>"].join("");while((r=j.match(q))){var b=r[0].match(d),a=r[0].match(v),A=r[0].match(x),g=null,h=null,t=null,z=b&&b[1]?b[1]:"";if(a){g=a&&a[1]?a[1]:null;if(g){h=new Function(o,w,l,n,c+e+(Ext.util.Format.htmlDecode(g))+"; }")}}if(A){g=A&&A[1]?A[1]:null;if(g){t=new Function(o,w,l,n,c+(Ext.util.Format.htmlDecode(g))+"; }")}}if(z){switch(z){case".":z=new Function(o,w,c+e+o+"; }");break;case"..":z=new Function(o,w,c+e+w+"; }");break;default:z=new Function(o,w,c+e+z+"; }")}}k.push({id:p,target:z,exec:t,test:h,body:r[1]||""});j=j.replace(r[0],"{xtpl"+p+"}");++p}for(var u=k.length-1;u>=0;--u){y.compileTpl(k[u])}y.master=k[k.length-1];y.tpls=k};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,k,j,d,c){var h=this,g,m=h.tpls[a],l,b=[];if((m.test&&!m.test.call(h,k,j,d,c))||(m.exec&&m.exec.call(h,k,j,d,c))){return""}l=m.target?m.target.call(h,k,j):k;g=l.length;j=m.target?k:j;if(m.target&&Ext.isArray(l)){for(var e=0,g=l.length;e<g;e++){b[b.length]=m.compiled.call(h,l[e],j,e+1,g)}return b.join("")}return m.compiled.call(h,l,j,d,c)},compileTpl:function(tpl){var fm=Ext.util.Format,useF=this.disableFormats!==true,sep=Ext.isGecko?"+":",",body;function fn(m,name,format,args,math){if(name.substr(0,4)=="xtpl"){return"'"+sep+"this.applySubTemplate("+name.substr(4)+", values, parent, xindex, xcount)"+sep+"'"}var v;if(name==="."){v="values"}else{if(name==="#"){v="xindex"}else{if(name.indexOf(".")!=-1){v=name}else{v="values['"+name+"']"}}}if(math){v="("+v+math+")"}if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="("+v+" === undefined ? '' : "}return"'"+sep+format+v+args+")"+sep+"'"}function codeFn(m,code){return"'"+sep+"("+code.replace(/\\'/g,"'")+")"+sep+"'"}if(Ext.isGecko){body="tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};"}else{body=["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];body.push(tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn));body.push("'].join('');};");body=body.join("")}eval(body);return this},applyTemplate:function(a){return this.master.compiled.call(this,a,{},1,1)},compile:function(){return this}});Ext.XTemplate.prototype.apply=Ext.XTemplate.prototype.applyTemplate;Ext.XTemplate.from=function(a){a=Ext.getDom(a);return new Ext.XTemplate(a.value||a.innerHTML)};Ext.util.CSS=function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,g){return g.charAt(1).toUpperCase()};return{createStyleSheet:function(i,l){var h;var g=c.getElementsByTagName("head")[0];var k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=c.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(h,e){this.removeStyleSheet(h);var g=c.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",h);g.setAttribute("href",e);c.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(h){if(!d){d={}}try{var k=h.cssRules||h.rules;for(var g=k.length-1;g>=0;--g){d[k[g].selectorText.toLowerCase()]=k[g]}}catch(i){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets;for(var j=0,g=k.length;j<g;j++){try{this.cacheStyleSheet(k[j])}catch(l){}}}return d},getRule:function(e,h){var g=this.getRules(h);if(!Ext.isArray(e)){return g[e.toLowerCase()]}for(var j=0;j<e.length;j++){if(g[e[j]]){return g[e[j].toLowerCase()]}}return null},updateRule:function(e,j,h){if(!Ext.isArray(e)){var k=this.getRule(e);if(k){k.style[j.replace(b,a)]=h;return true}}else{for(var g=0;g<e.length;g++){if(this.updateRule(e[g],j,h)){return true}}}return false}}}();Ext.util.ClickRepeater=function(b,a){this.el=Ext.get(b);this.el.unselectable();Ext.apply(this,a);this.addEvents("mousedown","click","mouseup");if(!this.disabled){this.disabled=true;this.enable()}if(this.handler){this.on("click",this.handler,this.scope||this)}Ext.util.ClickRepeater.superclass.constructor.call(this)};Ext.extend(Ext.util.ClickRepeater,Ext.util.Observable,{interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressClass){this.el.removeClass(this.pressClass)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.purgeListeners()},handleDblClick:function(){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this);this.fireEvent("click",this)},handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this);this.fireEvent("click",this);if(this.accelerate){this.delay=400}this.timer=this.click.defer(this.delay||this.interval,this)},click:function(){this.fireEvent("click",this);this.timer=this.click.defer(this.accelerate?this.easeOutExpo(this.mousedownTime.getElapsed(),400,-390,12000):this.interval,this)},easeOutExpo:function(e,a,h,g){return(e==g)?a+h:h*(-Math.pow(2,-10*e/g)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressClass){this.el.removeClass(this.pressClass)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressClass){this.el.addClass(this.pressClass)}this.click()},handleMouseUp:function(){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this)}});Ext.KeyNav=function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(!this.disabled){this.disabled=true;this.enable()}};Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,relay:function(c){var a=c.getKey();var b=this.keyToHandler[a];if(b&&this[b]){if(this.doRelay(c,this[b],b)!==true){c[this.defaultEventAction]()}}},doRelay:function(c,b,a){return b.call(this.scope||this,c)},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},stopKeyUp:function(b){var a=b.getKey();if(a>=37&&a<=40){b.stopEvent()}},destroy:function(){this.disable()},enable:function(){if(this.disabled){if(Ext.isSafari2){this.el.on("keyup",this.stopKeyUp,this)}this.el.on(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=false}},disable:function(){if(!this.disabled){if(Ext.isSafari2){this.el.un("keyup",this.stopKeyUp,this)}this.el.un(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};Ext.KeyMap=function(c,b,a){this.el=Ext.get(c);this.eventName=a||"keydown";this.bindings=[];if(b){this.addBinding(b)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(b){if(Ext.isArray(b)){Ext.each(b,function(j){this.addBinding(j)},this);return}var k=b.key,g=b.fn||b.handler,l=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof k=="string"){var h=[];var e=k.toUpperCase();for(var c=0,d=e.length;c<d;c++){h.push(e.charCodeAt(c))}k=h}var a=Ext.isArray(k);var i=function(o){if(this.checkModifiers(b,o)){var m=o.getKey();if(a){for(var n=0,j=k.length;n<j;n++){if(k[n]==m){if(this.stopEvent){o.stopEvent()}g.call(l||window,m,o);return}}}else{if(m==k){if(this.stopEvent){o.stopEvent()}g.call(l||window,m,o)}}}};this.bindings.push(i)},checkModifiers:function(b,h){var j,d,g=["shift","ctrl","alt"];for(var c=0,a=g.length;c<a;++c){d=g[c];j=b[d];if(!(j===undefined||(j===h[d+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(typeof b=="object"&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},handleKeyDown:function(g){if(this.enabled){var c=this.bindings;for(var d=0,a=c.length;d<a;d++){c[d].call(this,g)}}},isEnabled:function(){return this.enabled},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.handleKeyDown,this);this.enabled=true}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.handleKeyDown,this);this.enabled=false}},setDisabled:function(a){this[a?"disable":"enable"]()}};Ext.util.TextMetrics=function(){var a;return{measure:function(b,c,d){if(!a){a=Ext.util.TextMetrics.Instance(b,d)}a.bind(b);a.setFixedWidth(d||"auto");return a.getSize(c)},createInstance:function(b,c){return Ext.util.TextMetrics.Instance(b,c)}}}();Ext.util.TextMetrics.Instance=function(b,d){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.position("absolute");c.setLeftTop(-1000,-1000);c.hide();if(d){c.setWidth(d)}var a={getSize:function(g){c.update(g);var e=c.getSize();c.update("");return e},bind:function(e){c.setStyle(Ext.fly(e).getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(e){c.setWidth(e)},getWidth:function(e){c.dom.style.width="auto";return this.getSize(e).width},getHeight:function(e){return this.getSize(e).height}};a.bind(b);return a};Ext.Element.addMethods({getTextWidth:function(c,b,a){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width).constrain(b||0,a||1000000)}});Ext.util.Cookies={set:function(c,e){var a=arguments;var i=arguments.length;var b=(i>2)?a[2]:null;var h=(i>3)?a[3]:"/";var d=(i>4)?a[4]:null;var g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;var c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return Ext.util.Cookies.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a){if(Ext.util.Cookies.get(a)){document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT"}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}};Ext.handleError=function(a){throw a};Ext.Error=function(a){this.message=(this.lang[a])?this.lang[a]:a};Ext.Error.prototype=new Error();Ext.apply(Ext.Error.prototype,{lang:{},name:"Ext.Error",getName:function(){return this.name},getMessage:function(){return this.message},toJson:function(){return Ext.encode(this)}});Ext.ComponentMgr=function(){var c=new Ext.util.MixedCollection();var b={};var a={};return{register:function(d){c.add(d)},unregister:function(d){c.remove(d)},get:function(d){return c.get(d)},onAvailable:function(g,e,d){c.on("add",function(h,i){if(i.id==g){e.call(d||i,i);c.un("add",e,d)}})},all:c,types:b,ptypes:a,isRegistered:function(d){return b[d]!==undefined},isPluginRegistered:function(d){return a[d]!==undefined},registerType:function(e,d){b[e]=d;d.xtype=e},create:function(d,e){return d.render?d:new b[d.xtype||e](d)},registerPlugin:function(e,d){a[e]=d;d.ptype=e},createPlugin:function(e,g){var d=a[e.ptype||g];if(d.init){return d}else{return new d(e)}}}}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin;Ext.create=Ext.ComponentMgr.create;Ext.Component=function(b){b=b||{};if(b.initialConfig){if(b.isAction){this.baseAction=b}b=b.initialConfig}else{if(b.tagName||b.dom||Ext.isString(b)){b={applyTo:b,id:b.id||b}}}this.initialConfig=b;Ext.apply(this,b);this.addEvents("added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave");this.getId();Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);if(this.baseAction){this.baseAction.addComponent(this)}this.initComponent();if(this.plugins){if(Ext.isArray(this.plugins)){for(var c=0,a=this.plugins.length;c<a;c++){this.plugins[c]=this.initPlugin(this.plugins[c])}}else{this.plugins=this.initPlugin(this.plugins)}}if(this.stateful!==false){this.initState()}if(this.applyTo){this.applyToMarkup(this.applyTo);delete this.applyTo}else{if(this.renderTo){this.render(this.renderTo);delete this.renderTo}}};Ext.Component.AUTO_ID=1000;Ext.extend(Ext.Component,Ext.util.Observable,{disabled:false,hidden:false,autoEl:"div",disabledClass:"x-item-disabled",allowDomMove:true,autoShow:false,hideMode:"display",hideParent:false,rendered:false,tplWriteMode:"overwrite",bubbleEvents:[],ctype:"Ext.Component",actionMode:"el",getActionEl:function(){return this[this.actionMode]},initPlugin:function(a){if(a.ptype&&!Ext.isFunction(a.init)){a=Ext.ComponentMgr.createPlugin(a)}else{if(Ext.isString(a)){a=Ext.ComponentMgr.createPlugin({ptype:a})}}a.init(this);return a},initComponent:function(){if(this.listeners){this.on(this.listeners);delete this.listeners}this.enableBubble(this.bubbleEvents)},render:function(b,a){if(!this.rendered&&this.fireEvent("beforerender",this)!==false){if(!b&&this.el){this.el=Ext.get(this.el);b=this.el.dom.parentNode;this.allowDomMove=false}this.container=Ext.get(b);if(this.ctCls){this.container.addClass(this.ctCls)}this.rendered=true;if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}this.onRender(this.container,a||null);if(this.autoShow){this.el.removeClass(["x-hidden","x-hide-"+this.hideMode])}if(this.cls){this.el.addClass(this.cls);delete this.cls}if(this.style){this.el.applyStyles(this.style);delete this.style}if(this.overCls){this.el.addClassOnOver(this.overCls)}this.fireEvent("render",this);var c=this.getContentTarget();if(this.html){c.update(Ext.DomHelper.markup(this.html));delete this.html}if(this.contentEl){var d=Ext.getDom(this.contentEl);Ext.fly(d).removeClass(["x-hidden","x-hide-display"]);c.appendChild(d)}if(this.tpl){if(!this.tpl.compile){this.tpl=new Ext.XTemplate(this.tpl)}if(this.data){this.tpl[this.tplWriteMode](c,this.data);delete this.data}}this.afterRender(this.container);if(this.hidden){this.doHide()}if(this.disabled){this.disable(true)}if(this.stateful!==false){this.initStateEvents()}this.fireEvent("afterrender",this)}return this},update:function(b,d,a){var c=this.getContentTarget();if(this.tpl&&typeof b!=="string"){this.tpl[this.tplWriteMode](c,b||{})}else{var e=Ext.isObject(b)?Ext.DomHelper.markup(b):b;c.update(e,d,a)}},onAdded:function(a,b){this.ownerCt=a;this.initRef();this.fireEvent("added",this,a,b)},onRemoved:function(){this.removeRef();this.fireEvent("removed",this,this.ownerCt);delete this.ownerCt},initRef:function(){if(this.ref&&!this.refOwner){var d=this.ref.split("/"),c=d.length,b=0,a=this;while(a&&b<c){a=a.ownerCt;++b}if(a){a[this.refName=d[--b]]=this;this.refOwner=a}}},removeRef:function(){if(this.refOwner&&this.refName){delete this.refOwner[this.refName];delete this.refOwner}},initState:function(){if(Ext.state.Manager){var b=this.getStateId();if(b){var a=Ext.state.Manager.get(b);if(a){if(this.fireEvent("beforestaterestore",this,a)!==false){this.applyState(Ext.apply({},a));this.fireEvent("staterestore",this,a)}}}}},getStateId:function(){return this.stateId||((/^(ext-comp-|ext-gen)/).test(String(this.id))?null:this.id)},initStateEvents:function(){if(this.stateEvents){for(var a=0,b;b=this.stateEvents[a];a++){this.on(b,this.saveState,this,{delay:100})}}},applyState:function(a){if(a){Ext.apply(this,a)}},getState:function(){return null},saveState:function(){if(Ext.state.Manager&&this.stateful!==false){var b=this.getStateId();if(b){var a=this.getState();if(this.fireEvent("beforestatesave",this,a)!==false){Ext.state.Manager.set(b,a);this.fireEvent("statesave",this,a)}}}},applyToMarkup:function(a){this.allowDomMove=false;this.el=Ext.get(a);this.render(this.el.dom.parentNode)},addClass:function(a){if(this.el){this.el.addClass(a)}else{this.cls=this.cls?this.cls+" "+a:a}return this},removeClass:function(a){if(this.el){this.el.removeClass(a)}else{if(this.cls){this.cls=this.cls.split(" ").remove(a).join(" ")}}return this},onRender:function(b,a){if(!this.el&&this.autoEl){if(Ext.isString(this.autoEl)){this.el=document.createElement(this.autoEl)}else{var c=document.createElement("div");Ext.DomHelper.overwrite(c,this.autoEl);this.el=c.firstChild}if(!this.el.id){this.el.id=this.getId()}}if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false){b.dom.insertBefore(this.el.dom,a);if(c){Ext.removeNode(c);c=null}}}},getAutoCreate:function(){var a=Ext.isObject(this.autoCreate)?this.autoCreate:Ext.apply({},this.defaultAutoCreate);if(this.id&&!a.id){a.id=this.id}return a},afterRender:Ext.emptyFn,destroy:function(){if(!this.isDestroyed){if(this.fireEvent("beforedestroy",this)!==false){this.destroying=true;this.beforeDestroy();if(this.ownerCt&&this.ownerCt.remove){this.ownerCt.remove(this,false)}if(this.rendered){this.el.remove();if(this.actionMode=="container"||this.removeMode=="container"){this.container.remove()}}if(this.focusTask&&this.focusTask.cancel){this.focusTask.cancel()}this.onDestroy();Ext.ComponentMgr.unregister(this);this.fireEvent("destroy",this);this.purgeListeners();this.destroying=false;this.isDestroyed=true}}},deleteMembers:function(){var b=arguments;for(var c=0,a=b.length;c<a;++c){delete this[b[c]]}},beforeDestroy:Ext.emptyFn,onDestroy:Ext.emptyFn,getEl:function(){return this.el},getContentTarget:function(){return this.el},getId:function(){return this.id||(this.id="ext-comp-"+(++Ext.Component.AUTO_ID))},getItemId:function(){return this.itemId||this.getId()},focus:function(b,a){if(a){this.focusTask=new Ext.util.DelayedTask(this.focus,this,[b,false]);this.focusTask.delay(Ext.isNumber(a)?a:10);return}if(this.rendered&&!this.isDestroyed){this.el.focus();if(b===true){this.el.dom.select()}}return this},blur:function(){if(this.rendered){this.el.blur()}return this},disable:function(a){if(this.rendered){this.onDisable()}this.disabled=true;if(a!==true){this.fireEvent("disable",this)}return this},onDisable:function(){this.getActionEl().addClass(this.disabledClass);this.el.dom.disabled=true},enable:function(){if(this.rendered){this.onEnable()}this.disabled=false;this.fireEvent("enable",this);return this},onEnable:function(){this.getActionEl().removeClass(this.disabledClass);this.el.dom.disabled=false},setDisabled:function(a){return this[a?"disable":"enable"]()},show:function(){if(this.fireEvent("beforeshow",this)!==false){this.hidden=false;if(this.autoRender){this.render(Ext.isBoolean(this.autoRender)?Ext.getBody():this.autoRender)}if(this.rendered){this.onShow()}this.fireEvent("show",this)}return this},onShow:function(){this.getVisibilityEl().removeClass("x-hide-"+this.hideMode)},hide:function(){if(this.fireEvent("beforehide",this)!==false){this.doHide();this.fireEvent("hide",this)}return this},doHide:function(){this.hidden=true;if(this.rendered){this.onHide()}},onHide:function(){this.getVisibilityEl().addClass("x-hide-"+this.hideMode)},getVisibilityEl:function(){return this.hideParent?this.container:this.getActionEl()},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(){return this.rendered&&this.getVisibilityEl().isVisible()},cloneConfig:function(b){b=b||{};var c=b.id||Ext.id();var a=Ext.applyIf(b,this.initialConfig);a.id=c;return new this.constructor(a)},getXType:function(){return this.constructor.xtype},isXType:function(b,a){if(Ext.isFunction(b)){b=b.xtype}else{if(Ext.isObject(b)){b=b.constructor.xtype}}return !a?("/"+this.getXTypes()+"/").indexOf("/"+b+"/")!=-1:this.constructor.xtype==b},getXTypes:function(){var a=this.constructor;if(!a.xtypes){var d=[],b=this;while(b&&b.constructor.xtype){d.unshift(b.constructor.xtype);b=b.constructor.superclass}a.xtypeChain=d;a.xtypes=d.join("/")}return a.xtypes},findParentBy:function(a){for(var b=this.ownerCt;(b!=null)&&!a(b,this);b=b.ownerCt){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.findParentBy(function(b){return b.constructor.xtype===a})},getPositionEl:function(){return this.positionEl||this.el},purgeListeners:function(){Ext.Component.superclass.purgeListeners.call(this);if(this.mons){this.on("beforedestroy",this.clearMons,this,{single:true})}},clearMons:function(){Ext.each(this.mons,function(a){a.item.un(a.ename,a.fn,a.scope)},this);this.mons=[]},createMons:function(){if(!this.mons){this.mons=[];this.on("beforedestroy",this.clearMons,this,{single:true})}},mon:function(g,b,d,c,a){this.createMons();if(Ext.isObject(b)){var j=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;var i=b;for(var h in i){if(j.test(h)){continue}if(Ext.isFunction(i[h])){this.mons.push({item:g,ename:h,fn:i[h],scope:i.scope});g.on(h,i[h],i.scope,i)}else{this.mons.push({item:g,ename:h,fn:i[h],scope:i.scope});g.on(h,i[h])}}return}this.mons.push({item:g,ename:b,fn:d,scope:c});g.on(b,d,c,a)},mun:function(h,c,g,e){var j,d;this.createMons();for(var b=0,a=this.mons.length;b<a;++b){d=this.mons[b];if(h===d.item&&c==d.ename&&g===d.fn&&e===d.scope){this.mons.splice(b,1);h.un(c,g,e);j=true;break}}return j},nextSibling:function(){if(this.ownerCt){var a=this.ownerCt.items.indexOf(this);if(a!=-1&&a+1<this.ownerCt.items.getCount()){return this.ownerCt.items.itemAt(a+1)}}return null},previousSibling:function(){if(this.ownerCt){var a=this.ownerCt.items.indexOf(this);if(a>0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=Ext.extend(Object,{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;c<a;c++){d[c][e].apply(d[c],b)}},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){this.items.remove(a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||window,arguments)}});(function(){Ext.Layer=function(d,c){d=d||{};var e=Ext.DomHelper;var h=d.parentEl,g=h?Ext.getDom(h):document.body;if(c){this.dom=Ext.getDom(c)}if(!this.dom){var i=d.dh||{tag:"div",cls:"x-layer"};this.dom=e.append(g,i)}if(d.cls){this.addClass(d.cls)}this.constrain=d.constrain!==false;this.setVisibilityMode(Ext.Element.VISIBILITY);if(d.id){this.id=this.dom.id=d.id}else{this.id=Ext.id(this.dom)}this.zindex=d.zindex||this.getZIndex();this.position("absolute",this.zindex);if(d.shadow){this.shadowOffset=d.shadowOffset||4;this.shadow=new Ext.Shadow({offset:this.shadowOffset,mode:d.shadow})}else{this.shadowOffset=0}this.useShim=d.shim!==false&&Ext.useShims;this.useDisplay=d.useDisplay;this.hide()};var a=Ext.Element.prototype;var b=[];Ext.extend(Ext.Layer,Ext.Element,{getZIndex:function(){return this.zindex||parseInt((this.getShim()||this).getStyle("z-index"),10)||11000},getShim:function(){if(!this.useShim){return null}if(this.shim){return this.shim}var d=b.shift();if(!d){d=this.createShim();d.enableDisplayMode("block");d.dom.style.display="none";d.dom.style.visibility="visible"}var c=this.dom.parentNode;if(d.dom.parentNode!=c){c.insertBefore(d.dom,this.dom)}d.setStyle("z-index",this.getZIndex()-2);this.shim=d;return d},hideShim:function(){if(this.shim){this.shim.setDisplayed(false);b.push(this.shim);delete this.shim}},disableShadow:function(){if(this.shadow){this.shadowDisabled=true;this.shadow.hide();this.lastShadowOffset=this.shadowOffset;this.shadowOffset=0}},enableShadow:function(c){if(this.shadow){this.shadowDisabled=false;this.shadowOffset=this.lastShadowOffset;delete this.lastShadowOffset;if(c){this.sync(true)}}},sync:function(d){var n=this.shadow;if(!this.updating&&this.isVisible()&&(n||this.useShim)){var i=this.getShim(),m=this.getWidth(),j=this.getHeight(),e=this.getLeft(true),o=this.getTop(true);if(n&&!this.shadowDisabled){if(d&&!n.isVisible()){n.show(this)}else{n.realign(e,o,m,j)}if(i){if(d){i.show()}var k=n.el.getXY(),g=i.dom.style,c=n.el.getSize();g.left=(k[0])+"px";g.top=(k[1])+"px";g.width=(c.width)+"px";g.height=(c.height)+"px"}}else{if(i){if(d){i.show()}i.setSize(m,j);i.setLeftTop(e,o)}}}},destroy:function(){this.hideShim();if(this.shadow){this.shadow.hide()}this.removeAllListeners();Ext.removeNode(this.dom);delete this.dom},remove:function(){this.destroy()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(c){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var j=Ext.lib.Dom.getViewWidth(),d=Ext.lib.Dom.getViewHeight();var o=Ext.getDoc().getScroll();var n=this.getXY();var k=n[0],i=n[1];var c=this.shadowOffset;var l=this.dom.offsetWidth+c,e=this.dom.offsetHeight+c;var g=false;if((k+l)>j+o.left){k=j-l-c;g=true}if((i+e)>d+o.top){i=d-e-c;g=true}if(k<o.left){k=o.left;g=true}if(i<o.top){i=o.top;g=true}if(g){if(this.avoidY){var m=this.avoidY;if(i<=m&&(i+e)>=m){i=m-e-5}}n=[k,i];this.storeXY(n);a.setXY.call(this,n);this.sync()}}return this},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){a.setXY.call(this,this.lastXY)}else{if(this.lastLT){a.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(i,h,k,l,j){if(i){this.showAction()}if(h&&i){var g=function(){this.sync(true);if(l){l()}}.createDelegate(this);a.setVisible.call(this,true,true,k,g,j)}else{if(!i){this.hideUnders(true)}var g=l;if(h){g=function(){this.hideAction();if(l){l()}}.createDelegate(this)}a.setVisible.call(this,i,h,k,g,j);if(i){this.sync(true)}else{if(!h){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(j,h,k,l,i){this.fixDisplay();this.beforeAction();this.storeXY(j);var g=this.createCB(l);a.setXY.call(this,j,h,k,g,i);if(!h){g()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(g,h,j,k,i){this.setXY([g,this.getY()],h,j,k,i);return this},setY:function(k,g,i,j,h){this.setXY([this.getX(),k],g,i,j,h);return this},setSize:function(j,k,i,m,n,l){this.beforeAction();var g=this.createCB(n);a.setSize.call(this,j,k,i,m,g,l);if(!i){g()}return this},setWidth:function(i,h,k,l,j){this.beforeAction();var g=this.createCB(l);a.setWidth.call(this,i,h,k,g,j);if(!h){g()}return this},setHeight:function(j,i,l,m,k){this.beforeAction();var g=this.createCB(m);a.setHeight.call(this,j,i,l,g,k);if(!i){g()}return this},setBounds:function(o,m,p,i,n,k,l,j){this.beforeAction();var g=this.createCB(l);if(!n){this.storeXY([o,m]);a.setXY.call(this,[o,m]);a.setSize.call(this,p,i,n,k,g,j);g()}else{a.setBounds.call(this,o,m,p,i,n,k,g,j)}return this},setZIndex:function(c){this.zindex=c;this.setStyle("z-index",c+2);if(this.shadow){this.shadow.setZIndex(c+1)}if(this.shim){this.shim.setStyle("z-index",c)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=this.offset,c={h:0};var b=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":c.w=0;c.l=c.t=e;c.t-=1;if(Ext.isIE){c.l-=this.offset+b;c.t-=this.offset+b;c.w-=b;c.h-=b;c.t+=1}break;case"sides":c.w=(e*2);c.l=-e;c.t=e-1;if(Ext.isIE){c.l-=(this.offset-b);c.t-=this.offset+b;c.l+=1;c.w-=(this.offset-b)*2;c.w-=b+1;c.h-=1}break;case"frame":c.w=c.h=(e*2);c.l=c.t=-e;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(this.offset-b);c.t-=(this.offset-b);c.l+=1;c.w-=(this.offset+b+1);c.h-=(this.offset+b);c.h+=1}break}this.adjusts=c};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(a){a=Ext.get(a);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=a.dom){this.el.insertBefore(a)}}this.el.setStyle("z-index",this.zIndex||parseInt(a.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(a.getLeft(true),a.getTop(true),a.getWidth(),a.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,r,q,g){if(!this.el){return}var n=this.adjusts,k=this.el.dom,u=k.style;var i=0;u.left=(b+n.l)+"px";u.top=(r+n.t)+"px";var p=(q+n.w),e=(g+n.h),j=p+"px",o=e+"px";if(u.width!=j||u.height!=o){u.width=j;u.height=o;if(!Ext.isIE){var m=k.childNodes;var c=Math.max(0,(p-12))+"px";m[0].childNodes[1].style.width=c;m[1].childNodes[1].style.width=c;m[2].childNodes[1].style.width=c;m[1].style.height=Math.max(0,(e-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}}};Ext.Shadow.Pool=function(){var b=[];var a=Ext.isIE?'<div class="x-ie-shadow"></div>':'<div class="x-shadow"><div class="xst"><div class="xstl"></div><div class="xstc"></div><div class="xstr"></div></div><div class="xsc"><div class="xsml"></div><div class="xsmc"></div><div class="xsmr"></div></div><div class="xsb"><div class="xsbl"></div><div class="xsbc"></div><div class="xsbr"></div></div></div>';return{pull:function(){var c=b.shift();if(!c){c=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,a));c.autoBoxAdjust=false}return c},push:function(c){b.push(c)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(b,d){if(typeof b=="object"){d=b.height;b=b.width}if(Ext.isDefined(b)&&Ext.isDefined(this.boxMinWidth)&&(b<this.boxMinWidth)){b=this.boxMinWidth}if(Ext.isDefined(d)&&Ext.isDefined(this.boxMinHeight)&&(d<this.boxMinHeight)){d=this.boxMinHeight}if(Ext.isDefined(b)&&Ext.isDefined(this.boxMaxWidth)&&(b>this.boxMaxWidth)){b=this.boxMaxWidth}if(Ext.isDefined(d)&&Ext.isDefined(this.boxMaxHeight)&&(d>this.boxMaxHeight)){d=this.boxMaxHeight}if(!this.boxReady){this.width=b;this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d),g=c.width,a=c.height,e;if(g!==undefined||a!==undefined){e=this.getResizeEl();if(!this.deferHeight&&g!==undefined&&a!==undefined){e.setSize(g,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(g!==undefined){e.setWidth(g)}}}this.onResize(g,a,b,d);this.fireEvent("resize",this,g,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getResizeEl:function(){return this.resizeEl||this.el},setAutoScroll:function(a){if(this.rendered){this.getContentTarget().setOverflow(a?"auto":"")}this.autoScroll=a;return this},setPosition:function(a,g){if(a&&typeof a[1]=="number"){g=a[1];a=a[0]}this.x=a;this.y=g;if(!this.boxReady){return this}var b=this.adjustPosition(a,g);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().translatePoints(a,c);this.setPosition(b.left,b.top);return this},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}this.boxReady=true;Ext.isDefined(this.autoScroll)&&this.setAutoScroll(this.autoScroll);this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:"&#160;"},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);delete this.overlay}var a;if(this.orientation==Ext.SplitBar.HORIZONTAL){a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?b[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-b[0])}else{a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?b[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-b[1])}a=Math.min(Math.max(a,this.activeMinSize),this.activeMaxSize);if(a!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,a)!==false){this.adapter.setElementSize(this,a);this.fireEvent("moved",this,a);this.fireEvent("resize",this,a)}}},getAdapter:function(){return this.adapter},setAdapter:function(a){this.adapter=a;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(a){this.minSize=a},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(a){this.maxSize=a},setCurrentSize:function(b){var a=this.animate;this.animate=false;this.adapter.setElementSize(this,b);this.animate=a},destroy:function(a){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});Ext.SplitBar.createProxy=function(b){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.unselectable();var a="x-splitbar-proxy";c.addClass(a+" "+(b==Ext.SplitBar.HORIZONTAL?a+"-h":a+"-v"));return c.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(a){},getElementSize:function(a){if(a.orientation==Ext.SplitBar.HORIZONTAL){return a.resizingEl.getWidth()}else{return a.resizingEl.getHeight()}},setElementSize:function(b,a,c){if(b.orientation==Ext.SplitBar.HORIZONTAL){if(!b.animate){b.resizingEl.setWidth(a);if(c){c(b,a)}}else{b.resizingEl.setWidth(a,true,0.1,c,"easeOut")}}else{if(!b.animate){b.resizingEl.setHeight(a);if(c){c(b,a)}}else{b.resizingEl.setHeight(a,true,0.1,c,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(a){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(a)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(a){this.basic.init(a)},getElementSize:function(a){return this.basic.getElementSize(a)},setElementSize:function(b,a,c){this.basic.setElementSize(b,a,this.moveSplitter.createDelegate(this,[b]))},moveSplitter:function(a){var b=Ext.SplitBar;switch(a.placement){case b.LEFT:a.el.setX(a.resizingEl.getRight());break;case b.RIGHT:a.el.setStyle("right",(this.container.getWidth()-a.resizingEl.getLeft())+"px");break;case b.TOP:a.el.setY(a.resizingEl.getBottom());break;case b.BOTTOM:a.el.setY(a.resizingEl.getTop()-a.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;Ext.Container=Ext.extend(Ext.BoxComponent,{bufferResize:50,autoDestroy:true,forceLayout:false,defaultType:"panel",resizeEvent:"resize",bubbleEvents:["add","remove"],initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var a=this.items;if(a){delete this.items;this.add(a)}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(a){if(this.layout&&this.layout!=a){this.layout.setContainer(null)}this.layout=a;this.initItems();a.setContainer(this)},afterRender:function(){Ext.Container.superclass.afterRender.call(this);if(!this.layout){this.layout="auto"}if(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}if(Ext.isString(this.layout)){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined){var a=this.activeItem;delete this.activeItem;this.layout.setActiveItem(a)}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(b){this.initItems();var e=arguments.length>1;if(e||Ext.isArray(b)){var a=[];Ext.each(e?arguments:b,function(h){a.push(this.add(h))},this);return a}var g=this.lookupComponent(this.applyDefaults(b));var d=this.items.length;if(this.fireEvent("beforeadd",this,g,d)!==false&&this.onBeforeAdd(g)!==false){this.items.add(g);g.onAdded(this,d);this.onAdd(g);this.fireEvent("add",this,g,d)}return g},onAdd:function(a){},onAdded:function(a,b){this.ownerCt=a;this.initRef();this.cascade(function(d){d.initRef()});this.fireEvent("added",this,a,b)},insert:function(h,g){this.initItems();var e=arguments,d=e.length;if(d>2){var b=[];for(var j=d-1;j>=1;--j){b.push(this.insert(h,e[j]))}return b}var k=this.lookupComponent(this.applyDefaults(g));h=Math.min(h,this.items.length);if(this.fireEvent("beforeadd",this,k,h)!==false&&this.onBeforeAdd(k)!==false){if(k.ownerCt==this){this.items.remove(k)}this.items.insert(h,k);k.onAdded(this,h);this.onAdd(k);this.fireEvent("add",this,k,h)}return k},applyDefaults:function(b){var a=this.defaults;if(a){if(Ext.isFunction(a)){a=a.call(this,b)}if(Ext.isString(b)){b=Ext.ComponentMgr.get(b);Ext.apply(b,a)}else{if(!b.events){Ext.applyIf(b,a)}else{Ext.apply(b,a)}}}return b},onBeforeAdd:function(a){if(a.ownerCt){a.ownerCt.remove(a,false)}if(this.hideBorders===true){a.border=(a.border===true)}},remove:function(a,b){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.doRemove(d,b);this.fireEvent("remove",this,d)}return d},onRemove:function(a){},doRemove:function(e,d){var b=this.layout,a=b&&this.rendered;if(a){b.onRemove(e)}this.items.remove(e);e.onRemoved();this.onRemove(e);if(d===true||(d!==false&&this.autoDestroy)){e.destroy()}if(a){b.afterRemove(e)}},removeAll:function(c){this.initItems();var e,g=[],b=[];this.items.each(function(h){g.push(h)});for(var d=0,a=g.length;d<a;++d){e=g[d];this.remove(e,c);if(e.ownerCt!==this){b.push(e)}}return b},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.items.get(a)},lookupComponent:function(a){if(Ext.isString(a)){return Ext.ComponentMgr.get(a)}else{if(!a.events){return this.createComponent(a)}}return a},createComponent:function(a,d){if(a.render){return a}var b=Ext.create(Ext.apply({ownerCt:this},a),d||this.defaultType);delete b.initialConfig.ownerCt;delete b.ownerCt;return b},canLayout:function(){var a=this.getVisibilityEl();return a&&a.dom&&!a.isStyle("display","none")},doLayout:function(g,e){var k=this.rendered,j=e||this.forceLayout;if(this.collapsed||!this.canLayout()){this.deferLayout=this.deferLayout||!g;if(!j){return}g=g&&!this.deferLayout}else{delete this.deferLayout}if(k&&this.layout){this.layout.layout()}if(g!==true&&this.items){var d=this.items.items;for(var b=0,a=d.length;b<a;b++){var h=d[b];if(h.doLayout){h.doLayout(false,j)}}}if(k){this.onLayout(g,j)}this.hasLayout=true;delete this.forceLayout},onLayout:Ext.emptyFn,shouldBufferLayout:function(){var a=this.hasLayout;if(this.ownerCt){return a?!this.hasLayoutPending():false}return a},hasLayoutPending:function(){var a=false;this.ownerCt.bubble(function(b){if(b.layoutPending){a=true;return false}});return a},onShow:function(){Ext.Container.superclass.onShow.call(this);if(Ext.isDefined(this.deferLayout)){delete this.deferLayout;this.doLayout(true)}},getLayout:function(){if(!this.layout){var a=new Ext.layout.AutoLayout(this.layoutConfig);this.setLayout(a)}return this.layout},beforeDestroy:function(){var a;if(this.items){while(a=this.items.first()){this.doRemove(a,true)}}if(this.monitorResize){Ext.EventManager.removeResizeListener(this.doLayout,this)}Ext.destroy(this.layout);Ext.Container.superclass.beforeDestroy.call(this)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.ownerCt}return this},cascade:function(g,e,b){if(g.apply(e||this,b||[this])!==false){if(this.items){var d=this.items.items;for(var c=0,a=d.length;c<a;c++){if(d[c].cascade){d[c].cascade(g,e,b)}else{g.apply(e||d[c],b||[d[c]])}}}}return this},findById:function(c){var a,b=this;this.cascade(function(d){if(b!=d&&d.id===c){a=d;return false}});return a||null},findByType:function(b,a){return this.findBy(function(d){return d.isXType(b,a)})},find:function(b,a){return this.findBy(function(d){return d[b]===a})},findBy:function(d,c){var a=[],b=this;this.cascade(function(e){if(b!=e&&d.call(c||e,e,b)===true){a.push(e)}});return a},get:function(a){return this.items.get(a)}});Ext.Container.LAYOUTS={};Ext.reg("container",Ext.Container);Ext.layout.ContainerLayout=Ext.extend(Object,{monitorResize:false,activeItem:null,constructor:function(a){this.id=Ext.id(null,"ext-layout-");Ext.apply(this,a)},type:"container",IEMeasureHack:function(k,g){var a=k.dom.childNodes,b=a.length,n,m=[],l,h,j;for(h=0;h<b;h++){n=a[h];l=Ext.get(n);if(l){m[h]=l.getStyle("display");l.setStyle({display:"none"})}}j=k?k.getViewSize(g):{};for(h=0;h<b;h++){n=a[h];l=Ext.get(n);if(l){l.setStyle({display:m[h]})}}return j},getLayoutTargetSize:Ext.EmptyFn,layout:function(){var a=this.container,b=a.getLayoutTarget();if(!(this.hasLayout||Ext.isEmpty(this.targetCls))){b.addClass(this.targetCls)}this.onLayout(a,b);a.fireEvent("afterlayout",a,this)},onLayout:function(a,b){this.renderAll(a,b)},isValidParent:function(b,a){return a&&b.getPositionEl().dom.parentNode==(a.dom||a)},renderAll:function(e,g){var b=e.items.items,d,h,a=b.length;for(d=0;d<a;d++){h=b[d];if(h&&(!h.rendered||!this.isValidParent(h,g))){this.renderItem(h,d,g)}}},renderItem:function(d,a,b){if(d){if(!d.rendered){d.render(b,a);this.configureItem(d,a)}else{if(!this.isValidParent(d,b)){if(Ext.isNumber(a)){a=b.dom.childNodes[a]}b.dom.insertBefore(d.getPositionEl().dom,a||null);d.container=b;this.configureItem(d,a)}}}},getRenderedItems:function(g){var e=g.getLayoutTarget(),h=g.items.items,a=h.length,d,j,b=[];for(d=0;d<a;d++){if((j=h[d]).rendered&&this.isValidParent(j,e)){b.push(j)}}return b},configureItem:function(d,a){if(this.extraCls){var b=d.getPositionEl?d.getPositionEl():d;b.addClass(this.extraCls)}if(d.doLayout&&this.forceLayout){d.doLayout()}if(this.renderHidden&&d!=this.activeItem){d.hide()}},onRemove:function(b){if(this.activeItem==b){delete this.activeItem}if(b.rendered&&this.extraCls){var a=b.getPositionEl?b.getPositionEl():b;a.removeClass(this.extraCls)}},afterRemove:function(a){if(a.removeRestore){a.removeMode="container";delete a.removeRestore}},onResize:function(){var c=this.container,a;if(c.collapsed){return}if(a=c.bufferResize&&c.shouldBufferLayout()){if(!this.resizeTask){this.resizeTask=new Ext.util.DelayedTask(this.runLayout,this);this.resizeBuffer=Ext.isNumber(a)?a:50}c.layoutPending=true;this.resizeTask.delay(this.resizeBuffer)}else{this.runLayout()}},runLayout:function(){var a=this.container;this.layout();a.onLayout();delete a.layoutPending},setContainer:function(b){if(this.monitorResize&&b!=this.container){var a=this.container;if(a){a.un(a.resizeEvent,this.onResize,this)}if(b){b.on(b.resizeEvent,this.onResize,this)}}this.container=b},parseMargins:function(b){if(Ext.isNumber(b)){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:parseInt(c[0],10)||0,right:parseInt(c[1],10)||0,bottom:parseInt(c[2],10)||0,left:parseInt(c[3],10)||0}},fieldTpl:(function(){var a=new Ext.Template('<div class="x-form-item {itemCls}" tabIndex="-1">','<label for="{id}" style="{labelStyle}" class="x-form-item-label">{label}{labelSeparator}</label>','<div class="x-form-element" id="x-form-el-{id}" style="{elementStyle}">','</div><div class="{clearCls}"></div>',"</div>");a.disableFormats=true;return a.compile()})(),destroy:function(){if(this.resizeTask&&this.resizeTask.cancel){this.resizeTask.cancel()}if(!Ext.isEmpty(this.targetCls)){var a=this.container.getLayoutTarget();if(a){a.removeClass(this.targetCls)}}}});Ext.layout.AutoLayout=Ext.extend(Ext.layout.ContainerLayout,{type:"auto",monitorResize:true,onLayout:function(d,g){Ext.layout.AutoLayout.superclass.onLayout.call(this,d,g);var e=this.getRenderedItems(d),a=e.length,b,h;for(b=0;b<a;b++){h=e[b];if(h.doLayout){h.doLayout(true)}}}});Ext.Container.LAYOUTS.auto=Ext.layout.AutoLayout;Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"fit",getLayoutTargetSize:function(){var a=this.container.getLayoutTarget();if(!a){return{}}return a.getStyleSize()},onLayout:function(a,b){Ext.layout.FitLayout.superclass.onLayout.call(this,a,b);if(!a.collapsed){this.setItemSize(this.activeItem||a.items.itemAt(0),this.getLayoutTargetSize())}},setItemSize:function(b,a){if(b&&a.height>0){b.setSize(a)}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,layoutOnCardChange:false,renderHidden:true,type:"card",setActiveItem:function(d){var a=this.activeItem,b=this.container;d=b.getComponent(d);if(d&&a!=d){if(a){a.hide();if(a.hidden!==true){return false}a.fireEvent("deactivate",a)}var c=d.doLayout&&(this.layoutOnCardChange||!d.rendered);this.activeItem=d;delete d.deferLayout;d.show();this.layout();if(c){d.doLayout()}d.fireEvent("activate",d)}},renderAll:function(a,b){if(this.deferredRender){this.renderItem(this.activeItem,undefined,b)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,a,b)}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,getLayoutTargetSize:function(){var a=this.container.getLayoutTarget();if(!a){return{}}return a.getStyleSize()},onLayout:function(m,p){Ext.layout.AnchorLayout.superclass.onLayout.call(this,m,p);var v=this.getLayoutTargetSize();var t=v.width,l=v.height;if(t<20&&l<20){return}var d,r;if(m.anchorSize){if(typeof m.anchorSize=="number"){d=m.anchorSize}else{d=m.anchorSize.width;r=m.anchorSize.height}}else{d=m.initialConfig.width;r=m.initialConfig.height}var o=this.getRenderedItems(m),n=o.length,j,q,s,g,b,e,u,k=[];for(j=0;j<n;j++){q=o[j];e=q.getPositionEl();if(!q.anchor&&q.items&&!Ext.isNumber(q.width)&&!(Ext.isIE6&&Ext.isStrict)){q.anchor=this.defaultAnchor}if(q.anchor){s=q.anchorSpec;if(!s){u=q.anchor.split(" ");q.anchorSpec=s={right:this.parseAnchor(u[0],q.initialConfig.width,d),bottom:this.parseAnchor(u[1],q.initialConfig.height,r)}}g=s.right?this.adjustWidthAnchor(s.right(t)-e.getMargins("lr"),q):undefined;b=s.bottom?this.adjustHeightAnchor(s.bottom(l)-e.getMargins("tb"),q):undefined;if(g||b){k.push({comp:q,width:g||undefined,height:b||undefined})}}}for(j=0,n=k.length;j<n;j++){q=k[j];q.comp.setSize(q.width,q.height)}},parseAnchor:function(c,h,b){if(c&&c!="none"){var e;if(this.parseAnchorRE.test(c)){var g=b-h;return function(a){if(a!==e){e=a;return a-g}}}else{if(c.indexOf("%")!=-1){var d=parseFloat(c.replace("%",""))*0.01;return function(a){if(a!==e){e=a;return Math.floor(a*d)}}}else{c=parseInt(c,10);if(!isNaN(c)){return function(a){if(a!==e){e=a;return a+c}}}}}}return false},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b}});Ext.Container.LAYOUTS.anchor=Ext.layout.AnchorLayout;Ext.layout.ColumnLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"column",extraCls:"x-column",scrollOffset:0,targetCls:"x-column-layout-ct",isValidParent:function(b,a){return this.innerCt&&b.getPositionEl().dom.parentNode==this.innerCt.dom},getLayoutTargetSize:function(){var b=this.container.getLayoutTarget(),a;if(b){a=b.getViewSize();if(Ext.isIE&&Ext.isStrict&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},renderAll:function(a,b){if(!this.innerCt){this.innerCt=b.createChild({cls:"x-column-inner"});this.innerCt.createChild({cls:"x-clear"})}Ext.layout.ColumnLayout.superclass.renderAll.call(this,a,this.innerCt)},onLayout:function(e,k){var g=e.items.items,j=g.length,n,b,a,o=[];this.renderAll(e,k);var r=this.getLayoutTargetSize();if(r.width<1&&r.height<1){return}var p=r.width-this.scrollOffset,d=r.height,q=p;this.innerCt.setWidth(p);for(b=0;b<j;b++){n=g[b];a=n.getPositionEl().getMargins("lr");o[b]=a;if(!n.columnWidth){q-=(n.getWidth()+a)}}q=q<0?0:q;for(b=0;b<j;b++){n=g[b];a=o[b];if(n.columnWidth){n.setSize(Math.floor(n.columnWidth*q)-a)}}if(Ext.isIE){if(b=k.getStyle("overflow")&&b!="hidden"&&!this.adjustmentPass){var l=this.getLayoutTargetSize();if(l.width!=r.width){this.adjustmentPass=true;this.onLayout(e,k)}}}delete this.adjustmentPass}});Ext.Container.LAYOUTS.column=Ext.layout.ColumnLayout;Ext.layout.BorderLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,rendered:false,type:"border",targetCls:"x-border-layout-ct",getLayoutTargetSize:function(){var a=this.container.getLayoutTarget();return a?a.getViewSize():{}},onLayout:function(g,I){var j,B,F,o,x=g.items.items,C=x.length;if(!this.rendered){j=[];for(B=0;B<C;B++){F=x[B];o=F.region;if(F.collapsed){j.push(F)}F.collapsed=false;if(!F.rendered){F.render(I,B);F.getPositionEl().addClass("x-border-panel")}this[o]=o!="center"&&F.split?new Ext.layout.BorderLayout.SplitRegion(this,F.initialConfig,o):new Ext.layout.BorderLayout.Region(this,F.initialConfig,o);this[o].render(I,F)}this.rendered=true}var v=this.getLayoutTargetSize();if(v.width<20||v.height<20){if(j){this.restoreCollapsed=j}return}else{if(this.restoreCollapsed){j=this.restoreCollapsed;delete this.restoreCollapsed}}var t=v.width,D=v.height,r=t,A=D,p=0,q=0,y=this.north,u=this.south,l=this.west,E=this.east,F=this.center,H,z,d,G;if(!F&&Ext.layout.BorderLayout.WARN!==false){throw"No center region defined in BorderLayout "+g.id}if(y&&y.isVisible()){H=y.getSize();z=y.getMargins();H.width=t-(z.left+z.right);H.x=z.left;H.y=z.top;p=H.height+H.y+z.bottom;A-=p;y.applyLayout(H)}if(u&&u.isVisible()){H=u.getSize();z=u.getMargins();H.width=t-(z.left+z.right);H.x=z.left;G=(H.height+z.top+z.bottom);H.y=D-G+z.top;A-=G;u.applyLayout(H)}if(l&&l.isVisible()){H=l.getSize();z=l.getMargins();H.height=A-(z.top+z.bottom);H.x=z.left;H.y=p+z.top;d=(H.width+z.left+z.right);q+=d;r-=d;l.applyLayout(H)}if(E&&E.isVisible()){H=E.getSize();z=E.getMargins();H.height=A-(z.top+z.bottom);d=(H.width+z.left+z.right);H.x=t-d+z.left;H.y=p+z.top;r-=d;E.applyLayout(H)}if(F){z=F.getMargins();var k={x:q+z.left,y:p+z.top,width:r-(z.left+z.right),height:A-(z.top+z.bottom)};F.applyLayout(k)}if(j){for(B=0,C=j.length;B<C;B++){j[B].collapse(false)}}if(Ext.isIE&&Ext.isStrict){I.repaint()}if(B=I.getStyle("overflow")&&B!="hidden"&&!this.adjustmentPass){var a=this.getLayoutTargetSize();if(a.width!=v.width||a.height!=v.height){this.adjustmentPass=true;this.onLayout(g,I)}}delete this.adjustmentPass},destroy:function(){var b=["north","south","east","west"],a,c;for(a=0;a<b.length;a++){c=this[b[a]];if(c){if(c.destroy){c.destroy()}else{if(c.split){c.split.destroy(true)}}}}Ext.layout.BorderLayout.superclass.destroy.call(this)}});Ext.layout.BorderLayout.Region=function(b,a,c){Ext.apply(this,a);this.layout=b;this.position=c;this.state={};if(typeof this.margins=="string"){this.margins=this.layout.parseMargins(this.margins)}this.margins=Ext.applyIf(this.margins||{},this.defaultMargins);if(this.collapsible){if(typeof this.cmargins=="string"){this.cmargins=this.layout.parseMargins(this.cmargins)}if(this.collapseMode=="mini"&&!this.cmargins){this.cmargins={left:0,top:0,right:0,bottom:0}}else{this.cmargins=Ext.applyIf(this.cmargins||{},c=="north"||c=="south"?this.defaultNSCMargins:this.defaultEWCMargins)}}};Ext.layout.BorderLayout.Region.prototype={collapsible:false,split:false,floatable:true,minWidth:50,minHeight:50,defaultMargins:{left:0,top:0,right:0,bottom:0},defaultNSCMargins:{left:5,top:5,right:5,bottom:5},defaultEWCMargins:{left:5,top:0,right:5,bottom:0},floatingZIndex:100,isCollapsed:false,render:function(b,c){this.panel=c;c.el.enableDisplayMode();this.targetEl=b;this.el=c.el;var a=c.getState,d=this.position;c.getState=function(){return Ext.apply(a.call(c)||{},this.state)}.createDelegate(this);if(d!="center"){c.allowQueuedExpand=false;c.on({beforecollapse:this.beforeCollapse,collapse:this.onCollapse,beforeexpand:this.beforeExpand,expand:this.onExpand,hide:this.onHide,show:this.onShow,scope:this});if(this.collapsible||this.floatable){c.collapseEl="el";c.slideAnchor=this.getSlideAnchor()}if(c.tools&&c.tools.toggle){c.tools.toggle.addClass("x-tool-collapse-"+d);c.tools.toggle.addClassOnOver("x-tool-collapse-"+d+"-over")}}},getCollapsedEl:function(){if(!this.collapsedEl){if(!this.toolTemplate){var b=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:"&#160;"});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){var a=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);a.addClassOnOver("x-tool-expand-"+this.position+"-over");a.on("click",this.onExpandClick,this,{stopEvent:true})}if(this.floatable!==false||this.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this)}}}return this.collapsedEl},onExpandClick:function(a){if(this.isSlid){this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(a){this.panel.collapse()},beforeCollapse:function(c,a){this.lastAnim=a;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();var b=this.panel.getEl();this.originalZIndex=b.getStyle("z-index");b.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(a){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(a){if(this.isSlid){this.afterSlideIn()}var b=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,b.getHeight())}else{this.panel.setSize(b.getWidth(),undefined)}b.hide();b.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",this.floatingZIndex)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",this.originalZIndex);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(a){if(this.isSlid){a.stopPropagation();this.slideIn()}else{a.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(a){this.panel=a},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(a){var b=this.getCollapsedEl();b.setLeftTop(a.x,a.y);b.setSize(a.width,a.height)},applyLayout:function(a){if(this.isCollapsed){this.applyLayoutCollapsed(a)}else{this.panel.setPosition(a.x,a.y);this.panel.setSize(a.width,a.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){this.autoHideSlideTask=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(a){if(!a.within(this.el,true)){this.autoHideSlideTask.delay(500)}},mouseover:function(a){this.autoHideSlideTask.cancel()},scope:this}}this.el.on(this.autoHideHd);this.collapsedEl.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover);this.collapsedEl.un("mouseout",this.autoHideHd.mouseout);this.collapsedEl.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return}this.isSlid=true;var b=this.panel.tools,c,a;if(b&&b.toggle){b.toggle.hide()}this.el.show();a=this.panel.collapsed;this.panel.collapsed=false;if(this.position=="east"||this.position=="west"){c=this.panel.deferHeight;this.panel.deferHeight=false;this.panel.setSize(undefined,this.collapsedEl.getHeight());this.panel.deferHeight=c}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.panel.collapsed=a;this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}},destroy:function(){if(this.autoHideSlideTask&&this.autoHideSlideTask.cancel){this.autoHideSlideTask.cancel()}Ext.destroy(this.miniCollapsedEl,this.collapsedEl)}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:"&#160;",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:"&#160;"});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;this.split.placement=b.placement;this.split.getMaximumSize=this[b.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[b.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[b.maxProp];if(c.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var a=this.panel.getSize();if(this.position=="north"||this.position=="south"){a.height+=this.splitEl.dom.offsetHeight}else{a.width+=this.splitEl.dom.offsetWidth}return a},getHMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getWidth()+a.el.getWidth())-a.getMinWidth())},getVMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getHeight()+a.el.getHeight())-a.getMinHeight())},onSplitMove:function(b,a){var c=this.panel.getSize();this.lastSplitSize=a;if(this.position=="north"||this.position=="south"){this.panel.setSize(c.width,a);this.state.height=a}else{this.panel.setSize(a,c.height);this.state.width=a}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",trackLabels:false,type:"form",onRemove:function(d){Ext.layout.FormLayout.superclass.onRemove.call(this,d);if(this.trackLabels){d.un("show",this.onFieldShow,this);d.un("hide",this.onFieldHide,this)}var b=d.getPositionEl(),a=d.getItemCt&&d.getItemCt();if(d.rendered&&a){if(b&&b.dom){b.insertAfter(a)}Ext.destroy(a);Ext.destroyMembers(d,"label","itemCt");if(d.customItemCt){Ext.destroyMembers(d,"getItemCt","customItemCt")}}},setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){Ext.apply(this,{labelStyle:"display:none",elementStyle:"padding-left:0;",labelAdjust:0})}else{this.labelSeparator=a.labelSeparator||this.labelSeparator;a.labelWidth=a.labelWidth||100;if(Ext.isNumber(a.labelWidth)){var b=Ext.isNumber(a.labelPad)?a.labelPad:5;Ext.apply(this,{labelAdjust:a.labelWidth+b,labelStyle:"width:"+a.labelWidth+"px;",elementStyle:"padding-left:"+(a.labelWidth+b)+"px"})}if(a.labelAlign=="top"){Ext.apply(this,{labelStyle:"width:auto;",labelAdjust:0,elementStyle:"padding-left:0;"})}}},isHide:function(a){return a.hideLabel||this.container.hideLabels},onFieldShow:function(a){a.getItemCt().removeClass("x-hide-"+a.hideMode);if(a.isComposite){a.doLayout()}},onFieldHide:function(a){a.getItemCt().addClass("x-hide-"+a.hideMode)},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d<a;++d){if(c[d]){b+=c[d];if(b.substr(-1,1)!=";"){b+=";"}}}return b},renderItem:function(e,a,d){if(e&&(e.isFormField||e.fieldLabel)&&e.inputType!="hidden"){var b=this.getTemplateArgs(e);if(Ext.isNumber(a)){a=d.dom.childNodes[a]||null}if(a){e.itemCt=this.fieldTpl.insertBefore(a,b,true)}else{e.itemCt=this.fieldTpl.append(d,b,true)}if(!e.getItemCt){Ext.apply(e,{getItemCt:function(){return e.itemCt},customItemCt:true})}e.label=e.getItemCt().child("label.x-form-item-label");if(!e.rendered){e.render("x-form-el-"+e.id)}else{if(!this.isValidParent(e,d)){Ext.fly("x-form-el-"+e.id).appendChild(e.getPositionEl())}}if(this.trackLabels){if(e.hidden){this.onFieldHide(e)}e.on({scope:this,show:this.onFieldShow,hide:this.onFieldHide})}this.configureItem(e)}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)}},getTemplateArgs:function(b){var a=!b.fieldLabel||b.hideLabel;return{id:b.id,label:b.fieldLabel,itemCls:(b.itemCls||this.container.itemCls||"")+(b.hideLabel?" x-hide-label":""),clearCls:b.clearCls||"x-form-clear-left",labelStyle:this.getLabelStyle(b.labelStyle),elementStyle:this.elementStyle||"",labelSeparator:a?"":(Ext.isDefined(b.labelSeparator)?b.labelSeparator:this.labelSeparator)}},adjustWidthAnchor:function(a,d){if(d.label&&!this.isHide(d)&&(this.container.labelAlign!="top")){var b=Ext.isIE6||(Ext.isIE&&!Ext.isStrict);return a-this.labelAdjust+(b?-3:0)}return a},adjustHeightAnchor:function(a,b){if(b.label&&!this.isHide(b)&&(this.container.labelAlign=="top")){return a-b.label.getHeight()}return a},isValidParent:function(b,a){return a&&this.container.getEl().contains(b.getPositionEl())}});Ext.Container.LAYOUTS.form=Ext.layout.FormLayout;Ext.layout.AccordionLayout=Ext.extend(Ext.layout.FitLayout,{fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:false,sequence:false,activeOnTop:false,type:"accordion",renderItem:function(a){if(this.animate===false){a.animCollapse=false}a.collapsible=true;if(this.autoWidth){a.autoWidth=true}if(this.titleCollapse){a.titleCollapse=true}if(this.hideCollapseTool){a.hideCollapseTool=true}if(this.collapseFirst!==undefined){a.collapseFirst=this.collapseFirst}if(!this.activeItem&&!a.collapsed){this.setActiveItem(a,true)}else{if(this.activeItem&&this.activeItem!=a){a.collapsed=true}}Ext.layout.AccordionLayout.superclass.renderItem.apply(this,arguments);a.header.addClass("x-accordion-hd");a.on("beforeexpand",this.beforeExpand,this)},onRemove:function(a){Ext.layout.AccordionLayout.superclass.onRemove.call(this,a);if(a.rendered){a.header.removeClass("x-accordion-hd")}a.un("beforeexpand",this.beforeExpand,this)},beforeExpand:function(c,b){var a=this.activeItem;if(a){if(this.sequence){delete this.activeItem;if(!a.collapsed){a.collapse({callback:function(){c.expand(b||true)},scope:this});return false}}else{a.collapse(this.animate)}}this.setActive(c);if(this.activeOnTop){c.el.dom.parentNode.insertBefore(c.el.dom,c.el.dom.parentNode.firstChild)}this.layout()},setItemSize:function(g,e){if(this.fill&&g){var d=0,c,b=this.getRenderedItems(this.container),a=b.length,h;for(c=0;c<a;c++){if((h=b[c])!=g&&!h.hidden){d+=h.header.getHeight()}}e.height-=d;g.setSize(e)}},setActiveItem:function(a){this.setActive(a,true)},setActive:function(c,b){var a=this.activeItem;c=this.container.getComponent(c);if(a!=c){if(c.rendered&&c.collapsed&&b){c.expand()}else{if(a){a.fireEvent("deactivate",a)}this.activeItem=c;c.fireEvent("activate",c)}}}});Ext.Container.LAYOUTS.accordion=Ext.layout.AccordionLayout;Ext.layout.Accordion=Ext.layout.AccordionLayout;Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,type:"table",targetCls:"x-table-layout-ct",tableAttrs:null,setContainer:function(a){Ext.layout.TableLayout.superclass.setContainer.call(this,a);this.currentRow=0;this.currentColumn=0;this.cells=[]},onLayout:function(d,g){var e=d.items.items,a=e.length,h,b;if(!this.table){g.addClass("x-table-layout-ct");this.table=g.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}this.renderAll(d,g)},getRow:function(a){var b=this.table.tBodies[0].childNodes[a];if(!b){b=document.createElement("tr");this.table.tBodies[0].appendChild(b)}return b},getNextCell:function(j){var a=this.getNextNonSpan(this.currentColumn,this.currentRow);var g=this.currentColumn=a[0],e=this.currentRow=a[1];for(var i=e;i<e+(j.rowspan||1);i++){if(!this.cells[i]){this.cells[i]=[]}for(var d=g;d<g+(j.colspan||1);d++){this.cells[i][d]=true}}var h=document.createElement("td");if(j.cellId){h.id=j.cellId}var b="x-table-layout-cell";if(j.cellCls){b+=" "+j.cellCls}h.className=b;if(j.colspan){h.colSpan=j.colspan}if(j.rowspan){h.rowSpan=j.rowspan}this.getRow(e).appendChild(h);return h},getNextNonSpan:function(a,c){var b=this.columns;while((b&&a>=b)||(this.cells[c]&&this.cells[c][a])){if(b&&a>=b){c++;a=0}else{a++}}return[a,c]},renderItem:function(e,a,d){if(!this.table){this.table=d.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}if(e&&!e.rendered){e.render(this.getNextCell(e));this.configureItem(e,a)}else{if(e&&!this.isValidParent(e,d)){var b=this.getNextCell(e);b.insertBefore(e.getPositionEl().dom,null);e.container=Ext.get(b);this.configureItem(e,a)}}},isValidParent:function(b,a){return b.getPositionEl().up("table",5).dom.parentNode===(a.dom||a)}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",type:"absolute",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,type:"box",scrollOffset:0,extraCls:"x-box-item",targetCls:"x-box-layout-ct",innerCls:"x-box-inner",constructor:function(a){Ext.layout.BoxLayout.superclass.constructor.call(this,a);if(Ext.isString(this.defaultMargins)){this.defaultMargins=this.parseMargins(this.defaultMargins)}},onLayout:function(a,d){Ext.layout.BoxLayout.superclass.onLayout.call(this,a,d);var b=this.getVisibleItems(a),c=this.getLayoutTargetSize();this.layoutTargetLastSize=c;this.childBoxCache=this.calculateChildBoxes(b,c);this.updateInnerCtSize(c,this.childBoxCache);this.updateChildBoxes(this.childBoxCache.boxes);this.handleTargetOverflow(c,a,d)},updateChildBoxes:function(c){for(var b=0,e=c.length;b<e;b++){var d=c[b],a=d.component;if(d.dirtySize){a.setSize(d.width,d.height)}if(isNaN(d.left)||isNaN(d.top)){continue}a.setPosition(d.left,d.top)}},updateInnerCtSize:Ext.emptyFn,handleTargetOverflow:function(d,a,c){var e=c.getStyle("overflow");if(e&&e!="hidden"&&!this.adjustmentPass){var b=this.getLayoutTargetSize();if(b.width!=d.width||b.height!=d.height){this.adjustmentPass=true;this.onLayout(a,c)}}delete this.adjustmentPass},isValidParent:function(b,a){return this.innerCt&&b.getPositionEl().dom.parentNode==this.innerCt.dom},getVisibleItems:function(g){var g=g||this.container,e=g.getLayoutTarget(),h=g.items.items,a=h.length,d,j,b=[];for(d=0;d<a;d++){if((j=h[d]).rendered&&this.isValidParent(j,e)&&j.hidden!==true&&j.collapsed!==true){b.push(j)}}return b},renderAll:function(a,b){if(!this.innerCt){this.innerCt=b.createChild({cls:this.innerCls});this.padding=this.parseMargins(this.padding)}Ext.layout.BoxLayout.superclass.renderAll.call(this,a,this.innerCt)},getLayoutTargetSize:function(){var b=this.container.getLayoutTarget(),a;if(b){a=b.getViewSize();if(Ext.isIE&&Ext.isStrict&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},renderItem:function(a){if(Ext.isString(a.margins)){a.margins=this.parseMargins(a.margins)}else{if(!a.margins){a.margins=this.defaultMargins}}Ext.layout.BoxLayout.superclass.renderItem.apply(this,arguments)}});Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",type:"vbox",updateInnerCtSize:function(b,d){var c=b.height,a=d.meta.maxWidth+this.padding.left+this.padding.right;if(this.align=="stretch"){a=b.width}else{if(this.align=="center"){a=Math.max(b.width,a)}}this.innerCt.setSize(a||undefined,c||undefined)},calculateChildBoxes:function(w,e){var k=w.length,u=this.padding,y=u.top,p=u.left,q=y+u.bottom,a=p+u.right,x=e.width-this.scrollOffset,v=e.height,A=Math.max(0,x-a),l=this.pack=="start",m=this.pack=="center",n=this.pack=="end",I=0,E=0,z=0,j=[],h,d,g,b,t,C,B,s,F,G,D;for(B=0;B<k;B++){h=w[B];g=h.height;d=h.width;C=!h.hasLayout&&Ext.isFunction(h.doLayout);if(!Ext.isNumber(g)){if(h.flex&&!g){z+=h.flex}else{if(!g&&C){h.doLayout()}b=h.getSize();d=b.width;g=b.height}}t=h.margins;I+=(g||0)+t.top+t.bottom;if(!Ext.isNumber(d)){if(C){h.doLayout()}d=h.getWidth()}E=Math.max(E,d+t.left+t.right);j.push({component:h,height:g||undefined,width:d||undefined})}var c=Math.max(0,(v-I-q));if(m){y+=c/2}else{if(n){y+=c}}var o=c,H=z;for(B=0;B<k;B++){h=w[B];s=j[B];t=h.margins;G=t.left+t.right;y+=t.top;if(l&&h.flex&&!h.height){F=Math.ceil((h.flex/H)*o);o-=F;H-=h.flex;s.height=F;s.dirtySize=true}s.left=p+t.left;s.top=y;switch(this.align){case"stretch":D=A-G;s.width=D.constrain(h.minWidth||0,h.maxWidth||1000000);s.dirtySize=true;break;case"stretchmax":D=E-G;s.width=D.constrain(h.minWidth||0,h.maxWidth||1000000);s.dirtySize=true;break;case"center":var r=A-s.width-G;if(r>0){s.left=p+G+(r/2)}}y+=s.height+t.bottom}return{boxes:j,meta:{maxWidth:E}}}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",type:"hbox",updateInnerCtSize:function(b,d){var a=b.width,c=d.meta.maxHeight+this.padding.top+this.padding.bottom;if(this.align=="stretch"){c=b.height}else{if(this.align=="middle"){c=Math.max(b.height,c)}}this.innerCt.setSize(a||undefined,c||undefined)},calculateChildBoxes:function(z,e){var n=z.length,x=this.padding,C=x.top,r=x.left,s=C+x.bottom,a=r+x.right,B=e.width-this.scrollOffset,y=e.height,h=Math.max(0,y-s),o=this.pack=="start",p=this.pack=="center",q=this.pack=="end",I=0,A=0,D=0,m=[],l,d,g,c,w,F,E,v,H,j,t;for(E=0;E<n;E++){l=z[E];g=l.height;d=l.width;F=!l.hasLayout&&Ext.isFunction(l.doLayout);if(!Ext.isNumber(d)){if(l.flex&&!d){D+=l.flex}else{if(!d&&F){l.doLayout()}c=l.getSize();d=c.width;g=c.height}}w=l.margins;I+=(d||0)+w.left+w.right;if(!Ext.isNumber(g)){if(F){l.doLayout()}g=l.getHeight()}A=Math.max(A,g+w.top+w.bottom);m.push({component:l,height:g||undefined,width:d||undefined})}var b=Math.max(0,(B-I-a));if(p){r+=b/2}else{if(q){r+=b}}var k=b,G=D;for(E=0;E<n;E++){l=z[E];v=m[E];w=l.margins;j=w.top+w.bottom;r+=w.left;if(o&&l.flex&&!l.width){H=Math.ceil((l.flex/G)*k);k-=H;G-=l.flex;v.width=H;v.dirtySize=true}v.left=r;v.top=C+w.top;switch(this.align){case"stretch":t=h-j;v.height=t.constrain(l.minHeight||0,l.maxHeight||1000000);v.dirtySize=true;break;case"stretchmax":t=A-j;v.height=t.constrain(l.minHeight||0,l.maxHeight||1000000);v.dirtySize=true;break;case"middle":var u=h-v.height-j;if(u>0){v.top=C+j+(u/2)}}r+=v.width+w.right}return{boxes:m,meta:{maxHeight:A}}}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"toolbar",triggerWidth:18,noItemsMenuText:'<div class="x-toolbar-no-items">(None)</div>',lastOverflow:false,tableHTML:['<table cellspacing="0" class="x-toolbar-ct">',"<tbody>","<tr>",'<td class="x-toolbar-left" align="{0}">','<table cellspacing="0">',"<tbody>",'<tr class="x-toolbar-left-row"></tr>',"</tbody>","</table>","</td>",'<td class="x-toolbar-right" align="right">','<table cellspacing="0" class="x-toolbar-right-ct">',"<tbody>","<tr>","<td>",'<table cellspacing="0">',"<tbody>",'<tr class="x-toolbar-right-row"></tr>',"</tbody>","</table>","</td>","<td>",'<table cellspacing="0">',"<tbody>",'<tr class="x-toolbar-extras-row"></tr>',"</tbody>","</table>","</td>","</tr>","</tbody>","</table>","</td>","</tr>","</tbody>","</table>"].join(""),onLayout:function(e,j){if(!this.leftTr){var h=e.buttonAlign=="center"?"center":"left";j.addClass("x-toolbar-layout-ct");j.insertHtml("beforeEnd",String.format(this.tableHTML,h));this.leftTr=j.child("tr.x-toolbar-left-row",true);this.rightTr=j.child("tr.x-toolbar-right-row",true);this.extrasTr=j.child("tr.x-toolbar-extras-row",true);if(this.hiddenItem==undefined){this.hiddenItems=[]}}var k=e.buttonAlign=="right"?this.rightTr:this.leftTr,l=e.items.items,d=0;for(var b=0,g=l.length,m;b<g;b++,d++){m=l[b];if(m.isFill){k=this.rightTr;d=-1}else{if(!m.rendered){m.render(this.insertCell(m,k,d))}else{if(!m.xtbHidden&&!this.isValidParent(m,k.childNodes[d])){var a=this.insertCell(m,k,d);a.appendChild(m.getPositionEl().dom);m.container=Ext.get(a)}}}}this.cleanup(this.leftTr);this.cleanup(this.rightTr);this.cleanup(this.extrasTr);this.fitToSize(j)},cleanup:function(b){var e=b.childNodes,a,d;for(a=e.length-1;a>=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,b,a){var d=document.createElement("td");d.className="x-toolbar-cell";b.insertBefore(d,b.childNodes[a]||null);return d},hideItem:function(a){this.hiddenItems.push(a);a.xtbHidden=true;a.xtbWidth=a.getPositionEl().dom.parentNode.offsetWidth;a.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddenItems.remove(a)},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getPositionEl().dom.parentNode.offsetWidth},fitToSize:function(k){if(this.container.enableOverflow===false){return}var b=k.dom.clientWidth,j=k.dom.firstChild.offsetWidth,m=b-this.triggerWidth,a=this.lastWidth||0,c=this.hiddenItems,e=c.length!=0,n=b>=a;this.lastWidth=b;if(j>b||(e&&n)){var l=this.container.items.items,h=l.length,d=0,o;for(var g=0;g<h;g++){o=l[g];if(!o.isFill){d+=this.getItemWidth(o);if(d>m){if(!(o.hidden||o.xtbHidden)){this.hideItem(o)}}else{if(o.xtbHidden){this.unhideItem(o)}}}}}e=c.length!=0;if(e){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(b,a){if(a instanceof Ext.Toolbar.Separator){b.add("-")}else{if(Ext.isFunction(a.isXType)){if(a.isXType("splitbutton")){b.add(this.createMenuConfig(a,true))}else{if(a.isXType("button")){b.add(this.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(c){this.addComponentToMenu(b,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){delete b.menu})}},beforeMoreShow:function(h){var b=this.container.items.items,a=b.length,g,e;var c=function(j,i){return j.isXType("buttongroup")&&!(i instanceof Ext.Toolbar.Separator)};this.clearMenu();h.removeAll();for(var d=0;d<a;d++){g=b[d];if(g.xtbHidden){if(e&&(c(g,e)||c(e,g))){h.add("-")}this.addComponentToMenu(h,g);e=g}}if(h.items.length<1){h.add(this.noItemsMenuText)}},initMore:function(){if(!this.more){this.moreMenu=new Ext.menu.Menu({ownerCt:this.container,listeners:{beforeshow:this.beforeMoreShow,scope:this}});this.more=new Ext.Button({iconCls:"x-toolbar-more-icon",cls:"x-toolbar-more",menu:this.moreMenu,ownerCt:this.container});var a=this.insertCell(this.more,this.extrasTr,100);this.more.render(a)}},destroy:function(){Ext.destroy(this.more,this.moreMenu);delete this.leftTr;delete this.rightTr;delete this.extrasTr;Ext.layout.ToolbarLayout.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.toolbar=Ext.layout.ToolbarLayout;Ext.layout.MenuLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"menu",setContainer:function(a){this.monitorResize=!a.floating;a.on("autosize",this.doAutoSize,this);Ext.layout.MenuLayout.superclass.setContainer.call(this,a)},renderItem:function(g,b,e){if(!this.itemTpl){this.itemTpl=Ext.layout.MenuLayout.prototype.itemTpl=new Ext.XTemplate('<li id="{itemId}" class="{itemCls}">','<tpl if="needsIcon">','<img src="{icon}" class="{iconCls}"/>',"</tpl>","</li>")}if(g&&!g.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(g);g.render(g.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));g.positionEl.menuItemId=g.getItemId();if(!d.isMenuItem&&d.needsIcon){g.positionEl.addClass("x-menu-list-item-indent")}this.configureItem(g,b)}else{if(g&&!this.isValidParent(g,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(g.getActionEl().dom,b||null)}}},getItemArgs:function(b){var a=b instanceof Ext.menu.Item;return{isMenuItem:a,needsIcon:!a&&(b.icon||b.iconCls),icon:b.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(b.iconCls||""),itemId:"x-menu-el-"+b.id,itemCls:"x-menu-list-item "}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){Ext.layout.MenuLayout.superclass.onLayout.call(this,a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(a,b){this.fireEvent("resize",this,a,b,a,b)}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",preventBodyReset:false,padding:undefined,resizeEvent:"bodyresize",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}this.toolbars=[];if(this.tbar){this.elements+=",tbar";this.topToolbar=this.createToolbar(this.tbar);this.tbar=null}if(this.bbar){this.elements+=",bbar";this.bottomToolbar=this.createToolbar(this.bbar);this.bbar=null}if(this.header===true){this.elements+=",header";this.header=null}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";this.footer=null}if(this.buttons){this.fbar=this.buttons;this.buttons=null}if(this.fbar){this.createFbar(this.fbar)}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createFbar:function(b){var a=this.minButtonWidth;this.elements+=",footer";this.fbar=this.createToolbar(b,{buttonAlign:this.buttonAlign,toolbarCls:"x-panel-fbar",enableOverflow:false,defaults:function(d){return{minWidth:d.minWidth||a}}});this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this);this.buttons=this.fbar.items.items},createToolbar:function(b,c){var a;if(Ext.isArray(b)){b={items:b}}a=b.events?Ext.apply(b,c):this.createComponent(Ext.apply({},b,c),"toolbar");this.toolbars.push(a);return a},createElement:function(a,c){if(this[a]){c.appendChild(this[a].dom);return}if(a==="bwrap"||this.elements.indexOf(a)!=-1){if(this[a+"Cfg"]){this[a]=Ext.fly(c).createChild(this[a+"Cfg"])}else{var b=document.createElement("div");b.className=this[a+"Cls"];this[a]=Ext.get(c.appendChild(b))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(g,e){Ext.Panel.superclass.onRender.call(this,g,e);this.createClasses();var a=this.el,h=a.dom,k,i;if(this.collapsible&&!this.hideCollapseTool){this.tools=this.tools?this.tools.slice(0):[];this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.tools){i=this.tools;this.elements+=(this.header!==false)?",header":""}this.tools={};a.addClass(this.baseCls);if(h.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var j=this.bwrap?this.bwrap:a;this.tbar=j.down("."+this.tbarCls);this.body=j.down("."+this.bodyCls);this.bbar=j.down("."+this.bbarCls);this.footer=j.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){a.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",h.firstChild.firstChild.firstChild);this.createElement("bwrap",h);k=this.bwrap.dom;var c=h.childNodes[1],b=h.childNodes[2];k.appendChild(c);k.appendChild(b);var l=k.firstChild.firstChild.firstChild;this.createElement("tbar",l);this.createElement("body",l);this.createElement("bbar",l);this.createElement("footer",k.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}this.ft=Ext.get(this.bwrap.dom.lastChild);this.mc=Ext.get(l)}else{this.createElement("header",h);this.createElement("bwrap",h);k=this.bwrap.dom;this.createElement("tbar",k);this.createElement("body",k);this.createElement("bbar",k);this.createElement("footer",k);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(Ext.isDefined(this.padding)){this.body.setStyle("padding",this.body.addUnits(this.padding))}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+"</span>";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible&&this.titleCollapse&&this.header){this.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}if(i){this.addTool.apply(this,i)}if(this.fbar){this.footer.addClass("x-panel-btns");this.fbar.ownerCt=this;this.fbar.render(this.footer);this.footer.createChild({cls:"x-clear"})}if(this.tbar&&this.topToolbar){this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar)}},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var e=this.header,c=e.child("img.x-panel-inline-icon");if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{var d=e.child("span."+this.headerTextCls);if(d){Ext.DomHelper.insertBefore(d.dom,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.apply({},a,{shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined}),this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},getFooterToolbar:function(){return this.fbar},addButton:function(a,c,b){if(!this.fbar){this.createFbar([])}if(c){if(Ext.isString(a)){a={text:a}}a=Ext.apply({handler:c,scope:b},a)}return this.fbar.add(a)},addTool:function(){if(!this.rendered){if(!this.tools){this.tools=[]}Ext.each(arguments,function(a){this.tools.push(a)},this);return}if(!this[this.toolTarget]){return}if(!this.toolTemplate){var h=new Ext.Template('<div class="x-tool x-tool-{id}">&#160;</div>');h.disableFormats=true;h.compile();Ext.Panel.prototype.toolTemplate=h}for(var g=0,d=arguments,c=d.length;g<c;g++){var b=d[g];if(!this.tools[b.id]){var j="x-tool-"+b.id+"-over";var e=this.toolTemplate.insertFirst(this[this.toolTarget],b,true);this.tools[b.id]=e;e.enableDisplayMode("block");this.mon(e,"click",this.createToolHandler(e,b,j,this));if(b.on){this.mon(e,b.on)}if(b.hidden){e.hide()}if(b.qtip){if(Ext.isObject(b.qtip)){Ext.QuickTips.register(Ext.apply({target:e.id},b.qtip))}else{e.dom.qtip=b.qtip}}e.addClassOnOver(j)}}},onLayout:function(b,a){Ext.Panel.superclass.onLayout.apply(this,arguments);if(this.hasLayout&&this.toolbars.length>0){Ext.each(this.toolbars,function(c){c.doLayout(undefined,a)});this.syncHeight()}},syncHeight:function(){var b=this.toolbarHeight,c=this.body,a=this.lastSize.height,d;if(this.autoHeight||!Ext.isDefined(a)||a=="auto"){return}if(b!=this.getToolbarHeight()){b=Math.max(0,a-this.getFrameHeight());c.setHeight(b);d=c.getSize();this.toolbarHeight=this.getToolbarHeight();this.onBodyResize(d.width,d.height)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(g){c.removeClass(d);if(a.stopEvent!==false){g.stopEvent()}if(a.handler){a.handler.call(a.scope||c,g,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}Ext.Panel.superclass.afterRender.call(this);if(this.collapsed){this.collapsed=false;this.collapse(false)}this.initEvents()},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}if(this.toolbars.length>0){Ext.each(this.toolbars,function(a){a.doLayout();a.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this);this.syncHeight()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},beforeEffect:function(a){if(this.floating){this.el.beforeAction()}if(a!==false){this.el.addClass("x-panel-animated")}},afterEffect:function(a){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(c,b,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,c)},collapse:function(b){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.beforeEffect(a);this.onCollapse(a,b);return this},onCollapse:function(a,b){if(a){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide(this.hideMode);this.afterCollapse(false)}},afterCollapse:function(a){this.collapsed=true;this.el.addClass(this.collapsedCls);if(a!==false){this[this.collapseEl].hide(this.hideMode)}this.afterEffect(a);this.cascade(function(b){if(b.lastSize){b.lastSize={width:undefined,height:undefined}}});this.fireEvent("collapse",this)},expand:function(b){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect(a);this.onExpand(a,b);return this},onExpand:function(a,b){if(a){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show(this.hideMode);this.afterExpand(false)}},afterExpand:function(a){this.collapsed=false;if(a!==false){this[this.collapseEl].show(this.hideMode)}this.afterEffect(a);if(this.deferLayout){delete this.deferLayout;this.doLayout(true)}this.fireEvent("expand",this)},toggleCollapse:function(a){this[this.collapsed?"expand":"collapse"](a);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(g,d,c,e){var a=g,b=d;if(Ext.isDefined(a)||Ext.isDefined(b)){if(!this.collapsed){if(Ext.isNumber(a)){this.body.setWidth(a=this.adjustBodyWidth(a-this.getFrameWidth()))}else{if(a=="auto"){a=this.body.setWidth("auto").dom.offsetWidth}else{a=this.body.dom.offsetWidth}}if(this.tbar){this.tbar.setWidth(a);if(this.topToolbar){this.topToolbar.setSize(a)}}if(this.bbar){this.bbar.setWidth(a);if(this.bottomToolbar){this.bottomToolbar.setSize(a);if(Ext.isIE){this.bbar.setStyle("position","static");this.bbar.setStyle("position","")}}}if(this.footer){this.footer.setWidth(a);if(this.fbar){this.fbar.setSize(Ext.isIE?(a-this.footer.getFrameWidth("lr")):"auto")}}if(Ext.isNumber(b)){b=Math.max(0,b-this.getFrameHeight());this.body.setHeight(b)}else{if(b=="auto"){this.body.setHeight(b)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:a,height:b};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height)},this,{single:true})}}this.onBodyResize(a,b)}this.syncShadow();Ext.Panel.superclass.onResize.call(this,g,d,c,e)},onBodyResize:function(a,b){this.fireEvent("bodyresize",this,a,b)},getToolbarHeight:function(){var a=0;if(this.rendered){Ext.each(this.toolbars,function(b){a+=b.getHeight()},this)}return a},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");if(this.frame){var a=this.bwrap.dom.firstChild;b+=(Ext.fly(a).getFrameWidth("l")+Ext.fly(a.firstChild).getFrameWidth("r"));b+=this.mc.getFrameWidth("lr")}return b},getFrameHeight:function(){var a=Math.max(0,this.getHeight()-this.body.getHeight());if(isNaN(a)){a=0}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.body.getHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},getContentTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){Ext.Panel.superclass.beforeDestroy.call(this);if(this.header){this.header.removeAllListeners()}if(this.tools){for(var a in this.tools){Ext.destroy(this.tools[a])}}if(this.toolbars.length>0){Ext.each(this.toolbars,function(b){b.un("afterlayout",this.syncHeight,this);b.un("remove",this.syncHeight,this)},this)}if(Ext.isArray(this.buttons)){while(this.buttons.length){Ext.destroy(this.buttons[0])}}if(this.rendered){Ext.destroy(this.ft,this.header,this.footer,this.tbar,this.bbar,this.body,this.mc,this.bwrap,this.dd);if(this.fbar){Ext.destroy(this.fbar,this.fbar.el)}}Ext.destroy(this.toolbars)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{this.field=b}Ext.Editor.superclass.constructor.call(this,a)};Ext.extend(Ext.Editor,Ext.Component,{allowBlur:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(b,a){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:b,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.inEditor=true;this.mon(this.field,{scope:this,blur:this.onBlur,specialkey:this.onSpecialKey});if(this.field.grow){this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1})}this.field.render(this.el).show();this.field.getEl().dom.name="";if(this.swallowKeys){this.field.el.swallowEvent(["keypress","keydown"])}},onSpecialKey:function(g,d){var b=d.getKey(),a=this.completeOnEnter&&b==d.ENTER,c=this.cancelOnEsc&&b==d.ESC;if(a||c){d.stopEvent();if(a){this.completeEdit()}else{this.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}}this.fireEvent("specialkey",g,d)},startEdit:function(b,c){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(b);var a=c!==undefined?c:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,a)!==false){this.startValue=a;this.field.reset();this.field.setValue(a);this.realign(true);this.editing=true;this.show()}},doAutoSize:function(){if(this.autoSize){var b=this.boundEl.getSize(),a=this.field.getSize();switch(this.autoSize){case"width":this.setSize(b.width,a.height);break;case"height":this.setSize(a.width,b.height);break;case"none":this.setSize(a.width,a.height);break;default:this.setSize(b.width,b.height)}}},setSize:function(a,b){delete this.field.lastSize;this.field.setSize(a,b);if(this.el){if(Ext.isGecko2||Ext.isOpera){this.el.setSize(a,b)}this.el.sync()}},realign:function(a){if(a===true){this.doAutoSize()}this.el.alignTo(this.boundEl,this.alignment,this.offsets)},completeEdit:function(a){if(!this.editing){return}if(this.field.assertValue){this.field.assertValue()}var b=this.getValue();if(!this.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);this.fireEvent("complete",this,b,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show().focus(false,true);this.fireEvent("startedit",this.boundEl,this.startValue)},cancelEdit:function(a){if(this.editing){var b=this.getValue();this.setValue(this.startValue);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){if(this.allowBlur===true&&this.editing&&this.selectSameEditor!==true){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return}this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){Ext.destroyMembers(this,"field");delete this.parentEl;delete this.boundEl}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=Ext.extend(Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],initComponent:function(){Ext.ColorPalette.superclass.initComponent.call(this);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}},onRender:function(b,a){this.autoEl={tag:"div",cls:this.itemCls};Ext.ColorPalette.superclass.onRender.call(this,b,a);var c=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on">&#160;</span></em></a></tpl>');c.overwrite(this.el,this.colors);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var a=this.value;this.value=null;this.select(a,true)}},handleClick:function(b,a){b.preventDefault();if(!this.disabled){var d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.toUpperCase())}},select:function(b,a){b=b.replace("#","");if(b!=this.value||this.allowReselect){var c=this.el;if(this.value){c.child("a.color-"+this.value).removeClass("x-color-palette-sel")}c.child("a.color-"+b).addClass("x-color-palette-sel");this.value=b;if(a!==true){this.fireEvent("select",this,b)}}}});Ext.reg("colorpalette",Ext.ColorPalette);Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:"&#160;OK&#160;",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,focusOnSelect:true,initHour:12,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime(true):new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){if(Ext.isArray(a)){this.disabledDates=a;this.disabledDatesRE=null}else{this.disabledDatesRE=a}this.initDisabledDays();this.update(this.value,true)},setDisabledDays:function(a){this.disabledDays=a;this.update(this.value,true)},setMinDate:function(a){this.minDate=a;this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;this.update(this.value,true)},setValue:function(a){this.value=a.clearTime(true);this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['<table cellspacing="0">','<tr><td class="x-date-left"><a href="#" title="',this.prevText,'">&#160;</a></td><td class="x-date-middle" align="center"></td><td class="x-date-right"><a href="#" title="',this.nextText,'">&#160;</a></td></tr>','<tr><td colspan="3"><table class="x-date-inner" cellspacing="0"><thead><tr>'],c=this.dayNames,h;for(h=0;h<7;h++){var k=this.startDay+h;if(k>6){k=k-7}a.push("<th><span>",c[k].substr(0,1),"</span></th>")}a[a.length]="</tr></thead><tbody><tr>";for(h=0;h<42;h++){if(h%7===0&&h!==0){a[a.length]="</tr><tr>"}a[a.length]='<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>'}a.push("</tr></tbody></table></td></tr>",this.showToday?'<tr><td colspan="3" class="x-date-bottom" align="center"></td></tr>':"",'</table><div class="x-date-mp"></div>');var j=document.createElement("div");j.className="x-date-picker";j.innerHTML=a.join("");e.dom.insertBefore(j,b);this.el=Ext.get(j);this.eventEl=Ext.get(j.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:"&#160;",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var g=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,g),tooltip:String.format(this.todayTip,g),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var a=['<table border="0" cellspacing="0">'];for(var b=0;b<6;b++){a.push('<tr><td class="x-date-mp-month"><a href="#">',Date.getShortMonthName(b),"</a></td>",'<td class="x-date-mp-month x-date-mp-sep"><a href="#">',Date.getShortMonthName(b+6),"</a></td>",b===0?'<td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-prev"></a></td><td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-next"></a></td></tr>':'<td class="x-date-mp-year"><a href="#"></a></td><td class="x-date-mp-year"><a href="#"></a></td></tr>')}a.push('<tr class="x-date-mp-btns"><td colspan="4"><button type="button" class="x-date-mp-ok">',this.okText,'</button><button type="button" class="x-date-mp-cancel">',this.cancelText,"</button></td></tr>","</table>");this.monthPicker.update(a.join(""));this.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(g,b){g.stopEvent();var c=new Ext.Element(b),a;if(c.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(c.is("button.x-date-mp-ok")){var h=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(h.getMonth()!=this.mpSelMonth){h=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(h);this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelMonth=a.dom.xmonth}else{if((a=c.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelYear=a.dom.xyear}else{if(c.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(c.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasClass("x-date-disabled")){this.cancelFocus=this.focusOnSelect===false;this.setValue(new Date(a.dateValue));delete this.cancelFocus;this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)}},update:function(G,A){if(this.rendered){var a=this.activeDate,p=this.isVisible();this.activeDate=G;if(!A&&a&&this.el){var o=G.getTime();if(a.getMonth()==G.getMonth()&&a.getFullYear()==G.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==o){d.addClass("x-date-selected");if(p&&!this.cancelFocus){Ext.fly(d.dom.firstChild).focus(50)}return false}},this);return}}var k=G.getDaysInMonth(),q=G.getFirstDateOfMonth(),g=q.getDay()-this.startDay;if(g<0){g+=7}k+=g;var B=G.add("mo",-1),h=B.getDaysInMonth()-g,e=this.cells.elements,r=this.textNodes,D=(new Date(B.getFullYear(),B.getMonth(),h,this.initHour)),C=new Date().clearTime().getTime(),v=G.clearTime(true).getTime(),u=this.minDate?this.minDate.clearTime(true):Number.NEGATIVE_INFINITY,y=this.maxDate?this.maxDate.clearTime(true):Number.POSITIVE_INFINITY,F=this.disabledDatesRE,s=this.disabledDatesText,I=this.disabledDays?this.disabledDays.join(""):false,E=this.disabledDaysText,z=this.format;if(this.showToday){var m=new Date().clearTime(),c=(m<u||m>y||(F&&z&&F.test(m.dateFormat(z)))||(I&&I.indexOf(m.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var l=function(J,d){d.title="";var i=D.clearTime(true).getTime();d.firstChild.dateValue=i;if(i==C){d.className+=" x-date-today";d.title=J.todayText}if(i==v){d.className+=" x-date-selected";if(p){Ext.fly(d.firstChild).focus(50)}}if(i<u){d.className=" x-date-disabled";d.title=J.minText;return}if(i>y){d.className=" x-date-disabled";d.title=J.maxText;return}if(I){if(I.indexOf(D.getDay())!=-1){d.title=E;d.className=" x-date-disabled"}}if(F&&z){var w=D.dateFormat(z);if(F.test(w)){d.title=s.replace("%0",w);d.className=" x-date-disabled"}}};var x=0;for(;x<g;x++){r[x].innerHTML=(++h);D.setDate(D.getDate()+1);e[x].className="x-date-prevday";l(this,e[x])}for(;x<k;x++){var b=x-g+1;r[x].innerHTML=(b);D.setDate(D.getDate()+1);e[x].className="x-date-active";l(this,e[x])}var H=0;for(;x<42;x++){r[x].innerHTML=(++H);D.setDate(D.getDate()+1);e[x].className="x-date-nextday";l(this,e[x])}this.mbtn.setText(this.monthNames[G.getMonth()]+" "+G.getFullYear());if(!this.internalRender){var j=this.el.dom.firstChild,n=j.offsetWidth;this.el.setWidth(n+this.el.getBorderWidth("lr"));Ext.fly(j).setWidth(n);this.internalRender=true;if(Ext.isOpera&&!this.secondPass){j.rows[0].cells[1].style.width=(n-(j.rows[0].cells[0].offsetWidth+j.rows[0].cells[2].offsetWidth))+"px";this.secondPass=true;this.update.defer(10,this,[G])}}}},beforeDestroy:function(){if(this.rendered){Ext.destroy(this.keyNav,this.monthPicker,this.eventEl,this.mbtn,this.nextRepeater,this.prevRepeater,this.cells.el,this.todayBtn);delete this.textNodes;delete this.cells.elements}}});Ext.reg("datepicker",Ext.DatePicker);Ext.LoadMask=function(c,b){this.el=Ext.get(c);Ext.apply(this,b);if(this.store){this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad});this.removeMask=Ext.value(this.removeMask,false)}else{var a=this.el.getUpdater();a.showLoadIndicator=false;a.on({scope:this,beforeupdate:this.onBeforeLoad,update:this.onLoad,failure:this.onLoad});this.removeMask=Ext.value(this.removeMask,true)}};Ext.LoadMask.prototype={msg:"Loading...",msgCls:"x-mask-loading",disabled:false,disable:function(){this.disabled=true},enable:function(){this.disabled=false},onLoad:function(){this.el.unmask(this.removeMask)},onBeforeLoad:function(){if(!this.disabled){this.el.mask(this.msg,this.msgCls)}},show:function(){this.onBeforeLoad()},hide:function(){this.onLoad()},destroy:function(){if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoad,this)}else{var a=this.el.getUpdater();a.un("beforeupdate",this.onBeforeLoad,this);a.un("update",this.onLoad,this);a.un("failure",this.onLoad,this)}}};Ext.ns("Ext.slider");Ext.slider.Thumb=Ext.extend(Object,{constructor:function(a){Ext.apply(this,a||{},{cls:"x-slider-thumb",constrain:false});Ext.slider.Thumb.superclass.constructor.call(this,a);if(this.slider.vertical){Ext.apply(this,Ext.slider.Thumb.Vertical)}},render:function(){this.el=this.slider.innerEl.insertFirst({cls:this.cls});this.initEvents()},enable:function(){this.disabled=false;this.el.removeClass(this.slider.disabledClass)},disable:function(){this.disabled=true;this.el.addClass(this.slider.disabledClass)},initEvents:function(){var a=this.el;a.addClassOnOver("x-slider-thumb-over");this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeDragStart.createDelegate(this),onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(a)},onBeforeDragStart:function(a){if(this.disabled){return false}else{this.slider.promoteThumb(this);return true}},onDragStart:function(a){this.el.addClass("x-slider-thumb-drag");this.dragging=true;this.dragStartValue=this.value;this.slider.fireEvent("dragstart",this.slider,a,this)},onDrag:function(g){var c=this.slider,b=this.index,d=this.getNewValue();if(this.constrain){var a=c.thumbs[b+1],h=c.thumbs[b-1];if(h!=undefined&&d<=h.value){d=h.value}if(a!=undefined&&d>=a.value){d=a.value}}c.setValue(b,d,false);c.fireEvent("drag",c,g,this)},getNewValue:function(){var a=this.slider,b=a.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(a.reverseValue(b.left),a.decimalPrecision)},onDragEnd:function(c){var a=this.slider,b=this.value;this.el.removeClass("x-slider-thumb-drag");this.dragging=false;a.fireEvent("dragend",a,c);if(this.dragStartValue!=b){a.fireEvent("changecomplete",a,b,this)}}});Ext.slider.MultiSlider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,constrainThumbs:true,topThumbZIndex:10000,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue}this.thumbs=[];Ext.slider.MultiSlider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.values==undefined||Ext.isEmpty(this.values)){this.values=[0]}var a=this.values;for(var b=0;b<a.length;b++){this.addThumb(a[b])}if(this.vertical){Ext.apply(this,Ext.slider.Vertical)}},addThumb:function(b){var a=new Ext.slider.Thumb({value:b,slider:this,index:this.thumbs.length,constrain:this.constrainThumbs});this.thumbs.push(a);if(this.rendered){a.render()}},promoteThumb:function(d){var a=this.thumbs,g,b;for(var e=0,c=a.length;e<c;e++){b=a[e];if(b==d){g=this.topThumbZIndex}else{g=""}b.el.setStyle("zIndex",g)}},onRender:function(){this.autoEl={cls:"x-slider "+(this.vertical?"x-slider-vert":"x-slider-horz"),cn:{cls:"x-slider-end",cn:{cls:"x-slider-inner",cn:[{tag:"a",cls:"x-slider-focus",href:"#",tabIndex:"-1",hidefocus:"on"}]}}};Ext.slider.MultiSlider.superclass.onRender.apply(this,arguments);this.endEl=this.el.first();this.innerEl=this.endEl.first();this.focusEl=this.innerEl.child(".x-slider-focus");for(var b=0;b<this.thumbs.length;b++){this.thumbs[b].render()}var a=this.innerEl.child(".x-slider-thumb");this.halfThumb=(this.vertical?a.getHeight():a.getWidth())/2;this.initEvents()},initEvents:function(){this.mon(this.el,{scope:this,mousedown:this.onMouseDown,keydown:this.onKeyDown});this.focusEl.swallowEvent("click",true)},onMouseDown:function(d){if(this.disabled){return}var c=false;for(var b=0;b<this.thumbs.length;b++){c=c||d.target==this.thumbs[b].el.dom}if(this.clickToChange&&!c){var a=this.innerEl.translatePoints(d.getXY());this.onClickChange(a)}this.focus()},onClickChange:function(c){if(c.top>this.clickRange[0]&&c.top<this.clickRange[1]){var a=this.getNearest(c,"left"),b=a.index;this.setValue(b,Ext.util.Format.round(this.reverseValue(c.left),this.decimalPrecision),undefined,true)}},getNearest:function(k,b){var m=b=="top"?this.innerEl.getHeight()-k[b]:k[b],g=this.reverseValue(m),j=(this.maxValue-this.minValue)+5,e=0,c=null;for(var d=0;d<this.thumbs.length;d++){var a=this.thumbs[d],l=a.value,h=Math.abs(l-g);if(Math.abs(h<=j)){c=a;e=d;j=h}}return c},onKeyDown:function(b){if(this.disabled||this.thumbs.length!==1){b.preventDefault();return}var a=b.getKey(),c;switch(a){case b.UP:case b.RIGHT:b.stopEvent();c=b.ctrlKey?this.maxValue:this.getValue(0)+this.keyIncrement;this.setValue(0,c,undefined,true);break;case b.DOWN:case b.LEFT:b.stopEvent();c=b.ctrlKey?this.minValue:this.getValue(0)-this.keyIncrement;this.setValue(0,c,undefined,true);break;default:b.preventDefault()}},doSnap:function(b){if(!(this.increment&&b)){return b}var d=b,c=this.increment,a=b%c;if(a!=0){d-=a;if(a*2>=c){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.slider.MultiSlider.superclass.afterRender.apply(this,arguments);for(var c=0;c<this.thumbs.length;c++){var b=this.thumbs[c];if(b.value!==undefined){var a=this.normalizeValue(b.value);if(a!==b.value){this.setValue(c,a,false)}else{this.moveThumb(c,this.translateValue(a),false)}}}},getRatio:function(){var a=this.innerEl.getWidth(),b=this.maxValue-this.minValue;return b==0?a:(a/b)},normalizeValue:function(a){a=this.doSnap(a);a=Ext.util.Format.round(a,this.decimalPrecision);a=a.constrain(this.minValue,this.maxValue);return a},setMinValue:function(e){this.minValue=e;var d=0,b=this.thumbs,a=b.length,c;for(;d<a;++d){c=b[d];c.value=c.value<e?e:c.value}this.syncThumb()},setMaxValue:function(e){this.maxValue=e;var d=0,b=this.thumbs,a=b.length,c;for(;d<a;++d){c=b[d];c.value=c.value>e?e:c.value}this.syncThumb()},setValue:function(d,c,b,g){var a=this.thumbs[d],e=a.el;c=this.normalizeValue(c);if(c!==a.value&&this.fireEvent("beforechange",this,c,a.value,a)!==false){a.value=c;if(this.rendered){this.moveThumb(d,this.translateValue(c),b!==false);this.fireEvent("change",this,c,a);if(g){this.fireEvent("changecomplete",this,c,a)}}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},moveThumb:function(d,c,b){var a=this.thumbs[d].el;if(!b||this.animate===false){a.setLeft(c)}else{a.shift({left:c,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onResize:function(c,e){var b=this.thumbs,a=b.length,d=0;for(;d<a;++d){b[d].el.stopFx()}this.innerEl.setWidth(c-(this.el.getPadding("l")+this.endEl.getPadding("r")));this.syncThumb();Ext.slider.MultiSlider.superclass.onResize.apply(this,arguments)},onDisable:function(){Ext.slider.MultiSlider.superclass.onDisable.call(this);for(var b=0;b<this.thumbs.length;b++){var a=this.thumbs[b],c=a.el;a.disable();if(Ext.isIE){var d=c.getXY();c.hide();this.innerEl.addClass(this.disabledClass).dom.disabled=true;if(!this.thumbHolder){this.thumbHolder=this.endEl.createChild({cls:"x-slider-thumb "+this.disabledClass})}this.thumbHolder.show().setXY(d)}}},onEnable:function(){Ext.slider.MultiSlider.superclass.onEnable.call(this);for(var b=0;b<this.thumbs.length;b++){var a=this.thumbs[b],c=a.el;a.enable();if(Ext.isIE){this.innerEl.removeClass(this.disabledClass).dom.disabled=false;if(this.thumbHolder){this.thumbHolder.hide()}c.show();this.syncThumb()}}},syncThumb:function(){if(this.rendered){for(var a=0;a<this.thumbs.length;a++){this.moveThumb(a,this.translateValue(this.thumbs[a].value))}}},getValue:function(a){return this.thumbs[a].value},getValues:function(){var a=[];for(var b=0;b<this.thumbs.length;b++){a.push(this.thumbs[b].value)}return a},beforeDestroy:function(){Ext.destroyMembers(this,"endEl","innerEl","thumb","halfThumb","focusEl","tracker","thumbHolder");Ext.slider.MultiSlider.superclass.beforeDestroy.call(this)}});Ext.reg("multislider",Ext.slider.MultiSlider);Ext.slider.SingleSlider=Ext.extend(Ext.slider.MultiSlider,{constructor:function(a){a=a||{};Ext.applyIf(a,{values:[a.value||0]});Ext.slider.SingleSlider.superclass.constructor.call(this,a)},getValue:function(){return Ext.slider.SingleSlider.superclass.getValue.call(this,0)},setValue:function(d,b){var c=Ext.toArray(arguments),a=c.length;if(a==1||(a<=3&&typeof arguments[1]!="number")){c.unshift(0)}return Ext.slider.SingleSlider.superclass.setValue.apply(this,c)},syncThumb:function(){return Ext.slider.SingleSlider.superclass.syncThumb.apply(this,[0].concat(arguments))},getNearest:function(){return this.thumbs[0]}});Ext.Slider=Ext.slider.SingleSlider;Ext.reg("slider",Ext.slider.SingleSlider);Ext.slider.Vertical={onResize:function(a,b){this.innerEl.setHeight(b-(this.el.getPadding("t")+this.endEl.getPadding("b")));this.syncThumb()},getRatio:function(){var b=this.innerEl.getHeight(),a=this.maxValue-this.minValue;return b/a},moveThumb:function(d,c,b){var a=this.thumbs[d],e=a.el;if(!b||this.animate===false){e.setBottom(c)}else{e.shift({bottom:c,stopFx:true,duration:0.35})}},onClickChange:function(c){if(c.left>this.clickRange[0]&&c.left<this.clickRange[1]){var a=this.getNearest(c,"top"),b=a.index,d=this.minValue+this.reverseValue(this.innerEl.getHeight()-c.top);this.setValue(b,Ext.util.Format.round(d,this.decimalPrecision),undefined,true)}}};Ext.slider.Thumb.Vertical={getNewValue:function(){var b=this.slider,c=b.innerEl,d=c.translatePoints(this.tracker.getXY()),a=c.getHeight()-d.top;return b.minValue+Ext.util.Format.round(a/b.getRatio(),b.decimalPrecision)}};Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",animate:false,waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update")},onRender:function(d,a){var c=new Ext.Template('<div class="{cls}-wrap">','<div class="{cls}-inner">','<div class="{cls}-bar">','<div class="{cls}-text">',"<div>&#160;</div>","</div>","</div>",'<div class="{cls}-text {cls}-text-back">',"<div>&#160;</div>","</div>","</div>","</div>");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered&&!this.isDestroyed){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;c-=1;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||"&#160;";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}this.clearTimer();if(a===true){this.hide()}return this},clearTimer:function(){if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}},onDestroy:function(){this.clearTimer();if(this.rendered){if(this.textEl.isComposite){this.textEl.clear()}Ext.destroyMembers(this,"textEl","progressBar","textTopEl")}Ext.ProgressBar.superclass.onDestroy.call(this)}});Ext.reg("progress",Ext.ProgressBar);(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(j,h,o){if(Ext.isNumber(h)){h={left:h,right:h,top:h,bottom:h}}h=h||this.defaultPadding;var l=Ext.get(this.getEl()).getBox(),d=Ext.get(j),n=d.getScroll(),k,e=d.dom;if(e==document.body){k={x:n.left,y:n.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var m=d.getXY();k={x:m[0],y:m[1],width:e.clientWidth,height:e.clientHeight}}var i=l.y-k.y,g=l.x-k.x;this.resetConstraints();this.setXConstraint(g-(h.left||0),k.width-g-l.width-(h.right||0),this.xTickSize);this.setYConstraint(i-(h.top||0),k.height-i-l.height-(h.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,g,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!g&&0!==g){this.padding=[e,c,e,c]}else{this.padding=[e,c,g,d]}}},setInitPosition:function(g,e){var h=this.getEl();if(!this.DDM.verifyEl(h)){return}var d=g||0;var c=e||0;var i=b.getXY(h);this.initPageX=i[0]-d;this.initPageY=i[1]-c;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(g,d){if(this.primaryButtonOnly&&g.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(g),Ext.lib.Event.getPageY(g));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(g)){this.setStartPosition();this.b4MouseDown(g);this.onMouseDown(g);this.DDM.handleMouseDown(g,this);this.DDM.stopEvent(g)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e<c;++e){if(this.invalidHandleClasses[e]==d){delete this.invalidHandleClasses[e]}}},isValidHandleChild:function(h){var g=true;var k;try{k=h.nodeName.toUpperCase()}catch(j){k=h.nodeName}g=g&&!this.invalidHandleTypes[k];g=g&&!this.invalidHandleIds[h.id];for(var d=0,c=this.invalidHandleClasses.length;g&&d<c;++d){g=!Ext.fly(h).hasClass(this.invalidHandleClasses[d])}return g},setXTicks:function(g,c){this.xTicks=[];this.xTickSize=c;var e={};for(var d=this.initPageX;d>=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(g,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(k,g){if(!g){return k}else{if(g[0]>=k){return g[0]}else{for(var d=0,c=g.length;d<c;++d){var e=d+1;if(g[e]&&g[e]>=k){var j=k-g[d];var h=g[e]-k;return(h>j)?g[d]:g[e]}}return g[g.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var g=this.ids[e][b];if(!this.isTypeOfDD(g)){continue}g[d].apply(g,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&this.ids[b][c.id]){delete this.ids[b][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,b){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][b]=b},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(h,c){var g=[];for(var e in h.groups){for(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){g[g.length]=b}}}return g},isLegalTarget:function(g,e){var c=this.getRelated(g,true);for(var d=0,b=c.length;d<b;++d){if(c[d].id==e.id){return true}}return false},isTypeOfDD:function(b){return(b&&b.__ygDragDrop)},isHandle:function(c,b){return(this.handleIds[c]&&this.handleIds[c][b])},getDDById:function(c){for(var b in this.ids){if(this.ids[b][c]){return this.ids[b][c]}}return null},handleMouseDown:function(d,c){if(Ext.QuickTips){Ext.QuickTips.disable()}if(this.dragCurrent){this.handleMouseUp(d)}this.currentTarget=d.getTarget();this.dragCurrent=c;var b=c.getEl();this.startX=d.getPageX();this.startY=d.getPageY();this.deltaX=this.startX-b.offsetLeft;this.deltaY=this.startY-b.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var e=Ext.dd.DDM;e.startDrag(e.startX,e.startY)},this.clickTimeThresh)},startDrag:function(b,c){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(b,c);this.dragCurrent.startDrag(b,c)}this.dragThreshMet=true},handleMouseUp:function(b){if(Ext.QuickTips){Ext.QuickTips.enable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(b,true)}else{}this.stopDrag(b);this.stopEvent(b)},stopEvent:function(b){if(this.stopPropagation){b.stopPropagation()}if(this.preventDefault){b.preventDefault()}},stopDrag:function(b){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(b);this.dragCurrent.endDrag(b)}this.dragCurrent.onMouseUp(b)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(d){if(!this.dragCurrent){return true}if(Ext.isIE&&(d.button!==0&&d.button!==1&&d.button!==2)){this.stopEvent(d);return this.handleMouseUp(d)}if(!this.dragThreshMet){var c=Math.abs(this.startX-d.getPageX());var b=Math.abs(this.startY-d.getPageY());if(c>this.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(n,o){var q=this.dragCurrent;if(!q||q.isLocked()){return}var r=n.getPoint();var b=[];var g=[];var l=[];var j=[];var d=[];for(var h in this.dragOvers){var c=this.dragOvers[h];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(r,c,this.mode)){g.push(c)}b[h]=true;delete this.dragOvers[h]}for(var p in q.groups){if("string"!=typeof p){continue}for(h in this.ids[p]){var k=this.ids[p][h];if(!this.isTypeOfDD(k)){continue}if(k.isTarget&&!k.isLocked()&&((k!=q)||(q.ignoreSelf===false))){if(this.isOverTarget(r,k,this.mode)){if(o){j.push(k)}else{if(!b[k.id]){d.push(k)}else{l.push(k)}this.dragOvers[k.id]=k}}}}}if(this.mode){if(g.length){q.b4DragOut(n,g);q.onDragOut(n,g)}if(d.length){q.onDragEnter(n,d)}if(l.length){q.b4DragOver(n,l);q.onDragOver(n,l)}if(j.length){q.b4DragDrop(n,j);q.onDragDrop(n,j)}}else{var m=0;for(h=0,m=g.length;h<m;++h){q.b4DragOut(n,g[h].id);q.onDragOut(n,g[h].id)}for(h=0,m=d.length;h<m;++h){q.onDragEnter(n,d[h].id)}for(h=0,m=l.length;h<m;++h){q.b4DragOver(n,l[h].id);q.onDragOver(n,l[h].id)}for(h=0,m=j.length;h<m;++h){q.b4DragDrop(n,j[h].id);q.onDragDrop(n,j[h].id)}}if(o&&!j.length){q.onInvalidDrop(n)}},getBestMatch:function(d){var g=null;var c=d.length;if(c==1){g=d[0]}else{for(var e=0;e<c;++e){var b=d[e];if(b.cursorIsOver){g=b;break}else{if(!g||g.overlap.getArea()<b.overlap.getArea()){g=b}}}}return g},refreshCache:function(c){for(var b in c){if("string"!=typeof b){continue}for(var d in this.ids[b]){var e=this.ids[b][d];if(this.isTypeOfDD(e)){var g=this.getLocation(e);if(g){this.locationCache[e.id]=g}else{delete this.locationCache[e.id]}}}}},verifyEl:function(c){if(c){var b;if(Ext.isIE){try{b=c.offsetParent}catch(d){}}else{b=c.offsetParent}if(b){return true}}return false},getLocation:function(j){if(!this.isTypeOfDD(j)){return null}var h=j.getEl(),n,g,d,p,o,q,c,m,i;try{n=Ext.lib.Dom.getXY(h)}catch(k){}if(!n){return null}g=n[0];d=g+h.offsetWidth;p=n[1];o=p+h.offsetHeight;q=p-j.padding[0];c=d+j.padding[1];m=o+j.padding[2];i=g-j.padding[3];return new Ext.lib.Region(q,c,m,i)},isOverTarget:function(k,b,d){var g=this.locationCache[b.id];if(!g||!this.useCache){g=this.getLocation(b);this.locationCache[b.id]=g}if(!g){return false}b.cursorIsOver=g.contains(k);var j=this.dragCurrent;if(!j||!j.getTargetCoord||(!d&&!j.constrainX&&!j.constrainY)){return b.cursorIsOver}b.overlap=null;var h=j.getTargetCoord(k.x,k.y);var c=j.getDragEl();var e=new Ext.lib.Region(h.y,h.x+c.offsetWidth,h.y+c.offsetHeight,h.x);var i=e.intersect(g);if(i){b.overlap=i;return(d)?true:b.cursorIsOver}else{return false}},_onUnload:function(c,b){Ext.dd.DragDropMgr.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var b in this.elementCache){delete this.elementCache[b]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(c){var b=this.elementCache[c];if(!b||!b.el){b=this.elementCache[c]=new this.ElementWrapper(Ext.getDom(c))}return b},getElement:function(b){return Ext.getDom(b)},getCss:function(c){var b=Ext.getDom(c);return(b)?b.style:null},ElementWrapper:function(b){this.el=b||null;this.id=this.el&&b.id;this.css=this.el&&b.style},getPosX:function(b){return Ext.lib.Dom.getX(b)},getPosY:function(b){return Ext.lib.Dom.getY(b)},swapNode:function(d,b){if(d.swapNode){d.swapNode(b)}else{var e=b.parentNode;var c=b.nextSibling;if(c==d){e.insertBefore(d,b)}else{if(b==d.nextSibling){e.insertBefore(b,d)}else{d.parentNode.replaceChild(b,d);e.insertBefore(d,c)}}}},getScroll:function(){var d,b,e=document.documentElement,c=document.body;if(e&&(e.scrollTop||e.scrollLeft)){d=e.scrollTop;b=e.scrollLeft}else{if(c){d=c.scrollTop;b=c.scrollLeft}else{}}return{top:d,left:b}},getStyle:function(c,b){return Ext.fly(c).getStyle(b)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(b,d){var c=Ext.lib.Dom.getXY(d);Ext.lib.Dom.setXY(b,c)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){var b=Ext.dd.DDM;if(Ext.lib.Event&&document){b._onLoad()}else{if(b._timeoutCount>2000){}else{setTimeout(b._addListeners,10);if(document&&document.body){b._timeoutCount+=1}}}},handleWasClicked:function(b,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,h,g){var e=this.getTargetCoord(h,g);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var i=[e.x,e.y];b.setXY(i);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var p=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var j=e+k;var o=m+l;var i=(n+p-k-this.deltaY);var g=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&i<c){window.scrollTo(d,p+a)}if(k<p&&p>0&&k-p<c){window.scrollTo(d,p-a)}if(o>b&&g<c){window.scrollTo(d+a,p)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,p)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=Ext.extend(Ext.util.Observable,{active:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}Ext.dd.DragTracker.superclass.constructor.call(this,a)},initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this)},onMouseDown:function(c,b){if(this.fireEvent("mousedown",this,c)!==false&&this.onBeforeStart(c)!==false){this.startXY=this.lastXY=c.getXY();this.dragTarget=this.delegate?b:this.el.dom;if(this.preventDefault!==false){c.preventDefault()}var a=Ext.getDoc();a.on("mouseup",this.onMouseUp,this);a.on("mousemove",this.onMouseMove,this);a.on("selectstart",this.stopSelect,this);if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this)}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart()}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc();b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();var a=this.active;this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c);var a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var i={};var h=function(l){b=null;a()};var j=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var l=Ext.dd.ScrollManager;var m=i.el.ddScrollConfig?i.el.ddScrollConfig.increment:l.increment;if(!l.animate){if(i.el.scroll(i.dir,m)){j()}}else{i.el.scroll(i.dir,m,true,l.animDuration,j)}}};var a=function(){if(i.id){clearInterval(i.id)}i.id=0;i.el=null;i.dir=""};var g=function(m,l){a();i.el=m;i.dir=l;var n=(m.ddScrollConfig&&m.ddScrollConfig.frequency)?m.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;i.id=setInterval(d,n)};var k=function(o,q){if(q||!c.dragCurrent){return}var s=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;s.refreshCache()}var t=Ext.lib.Event.getXY(o);var u=new Ext.lib.Point(t[0],t[1]);for(var m in e){var n=e[m],l=n._region;var p=n.ddScrollConfig?n.ddScrollConfig:s;if(l&&l.contains(u)&&n.isScrollable()){if(l.bottom-u.y<=p.vthresh){if(i.el!=n){g(n,"down")}return}else{if(l.right-u.x<=p.hthresh){if(i.el!=n){g(n,"left")}return}else{if(u.y-l.top<=p.vthresh){if(i.el!=n){g(n,"up")}return}else{if(u.x-l.left<=p.hthresh){if(i.el!=n){g(n,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(k,c);c.stopDrag=c.stopDrag.createSequence(h,c);return{register:function(n){if(Ext.isArray(n)){for(var m=0,l=n.length;m<l;m++){this.register(n[m])}}else{n=Ext.get(n);e[n.id]=n}},unregister:function(n){if(Ext.isArray(n)){for(var m=0,l=n.length;m<l;m++){this.unregister(n[m])}}else{n=Ext.get(n);delete e[n.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,refreshCache:function(){for(var l in e){if(typeof e[l]=="object"){e[l]._region=e[l].getRegion()}}}}}();Ext.dd.Registry=function(){var d={};var b={};var a=0;var c=function(g,e){if(typeof g=="string"){return g}var h=g.id;if(!h&&e!==false){h="extdd-"+(++a);g.id=h}return h};return{register:function(j,k){k=k||{};if(typeof j=="string"){j=document.getElementById(j)}k.ddel=j;d[c(j)]=k;if(k.isHandle!==false){b[k.ddel.id]=k}if(k.handles){var h=k.handles;for(var g=0,e=h.length;g<e;g++){b[c(h[g])]=k}}},unregister:function(j){var l=c(j,false);var k=d[l];if(k){delete d[l];if(k.handles){var h=k.handles;for(var g=0,e=h.length;g<e;g++){delete b[c(h[g],false)]}}}},getHandle:function(e){if(typeof e!="string"){e=e.id}return b[e]},getHandleFromEvent:function(h){var g=Ext.lib.Event.getTarget(h);return g?b[g.id]:null},getTarget:function(e){if(typeof e!="string"){e=e.id}return d[e]},getTargetFromEvent:function(h){var g=Ext.lib.Event.getTarget(h);return g?d[g.id]||b[g.id]:null}}}();Ext.dd.StatusProxy=function(a){Ext.apply(this,a);this.id=this.id||Ext.id();this.el=new Ext.Layer({dh:{id:this.id,tag:"div",cls:"x-dd-drag-proxy "+this.dropNotAllowed,children:[{tag:"div",cls:"x-dd-drop-icon"},{tag:"div",cls:"x-dd-drag-ghost"}]},shadow:!a||a.shadow!==false});this.ghost=Ext.get(this.el.dom.childNodes[1]);this.dropStatus=this.dropNotAllowed};Ext.dd.StatusProxy.prototype={dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceClass(this.dropStatus,a);this.dropStatus=a}},reset:function(a){this.el.dom.className="x-dd-drag-proxy "+this.dropNotAllowed;this.dropStatus=this.dropNotAllowed;if(a){this.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(a){this.el.hide();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},show:function(){this.el.show()},sync:function(){this.el.sync()},repair:function(b,c,a){this.callback=c;this.scope=a;if(b&&this.animRepair!==false){this.el.addClass("x-dd-drag-repair");this.el.hideUnders(true);this.anim=this.el.shift({duration:this.repairDuration||0.5,easing:"easeOut",xy:b,stopFx:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback=="function"){this.callback.call(this.scope||this)}this.callback=null;this.scope=null},destroy:function(){Ext.destroy(this.ghost,this.el)}};Ext.dd.DragSource=function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy()}Ext.dd.DragSource.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true});this.dragging=false};Ext.extend(Ext.dd.DragSource,Ext.dd.DDProxy,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropMgr.getDDById(d);this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);this.proxy.sync()},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(d);if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){if(Ext.enableFx){this.el.highlight(this.hlColor||"c3daf9")}this.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,startDrag:function(a,b){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){Ext.dd.DragSource.superclass.destroy.call(this);Ext.destroy(this.proxy)}});Ext.dd.DropTarget=function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}Ext.dd.DropTarget.superclass.constructor.call(this,this.el.dom,this.ddGroup||this.group,{isTarget:true})};Ext.extend(Ext.dd.DropTarget,Ext.dd.DDTarget,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addClass(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeClass(this.overClass)}},notifyDrop:function(a,c,b){return false}});Ext.dd.DragZone=function(b,a){Ext.dd.DragZone.superclass.constructor.call(this,b,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}};Ext.extend(Ext.dd.DragZone,Ext.dd.DragSource,{getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){if(Ext.enableFx){Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9")}this.dragging=false},getRepairXY:function(a){return Ext.Element.fly(this.dragData.ddel).getXY()}});Ext.dd.DropZone=function(b,a){Ext.dd.DropZone.superclass.constructor.call(this,b,a)};Ext.extend(Ext.dd.DropZone,Ext.dd.DropTarget,{getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.Element.addMethods({initDD:function(c,b,d){var a=new Ext.dd.DD(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDProxy:function(c,b,d){var a=new Ext.dd.DDProxy(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDTarget:function(c,b,d){var a=new Ext.dd.DDTarget(Ext.id(this.dom),c,b);return Ext.apply(a,d)}});Ext.data.Api=(function(){var a={};return{actions:{create:"create",read:"read",update:"update",destroy:"destroy"},restActions:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"},isAction:function(b){return(Ext.data.Api.actions[b])?true:false},getVerb:function(b){if(a[b]){return a[b]}for(var c in this.actions){if(this.actions[c]===b){a[b]=c;break}}return(a[b]!==undefined)?a[b]:null},isValid:function(b){var e=[];var d=this.actions;for(var c in b){if(!(c in d)){e.push(c)}}return(!e.length)?true:e},hasUniqueUrl:function(c,g){var b=(c.api[g])?c.api[g].url:null;var e=true;for(var d in c.api){if((e=(d===g)?true:(c.api[d].url!=b)?true:false)===false){break}}return e},prepare:function(b){if(!b.api){b.api={}}for(var d in this.actions){var c=this.actions[d];b.api[c]=b.api[c]||b.url||b.directFn;if(typeof(b.api[c])=="string"){b.api[c]={url:b.api[c],method:(b.restful===true)?Ext.data.Api.restActions[c]:undefined}}}},restify:function(b){b.restful=true;for(var c in this.restActions){b.api[this.actions[c]].method||(b.api[this.actions[c]].method=this.restActions[c])}b.onWrite=b.onWrite.createInterceptor(function(i,j,g,e){var d=j.reader;var h=new Ext.data.Response({action:i,raw:g});switch(g.status){case 200:return true;break;case 201:if(Ext.isEmpty(h.raw.responseText)){h.success=true}else{return true}break;case 204:h.success=true;h.data=null;break;default:return true;break}if(h.success===true){this.fireEvent("write",this,i,h.data,h,e,j.request.arg)}else{this.fireEvent("exception",this,"remote",i,j,h,e)}j.request.callback.call(j.request.scope,h.data,h,h.success);return false},b)}}})();Ext.data.Response=function(b,a){Ext.apply(this,b,{raw:a})};Ext.data.Response.prototype={message:null,success:false,status:null,root:null,raw:null,getMessage:function(){return this.message},getSuccess:function(){return this.success},getStatus:function(){return this.status},getRoot:function(){return this.root},getRawResponse:function(){return this.raw}};Ext.data.Api.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.Api"});Ext.apply(Ext.data.Api.Error.prototype,{lang:{"action-url-undefined":"No fallback url defined for this action.  When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.",invalid:"received an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions","invalid-url":"Invalid url.  Please review your proxy configuration.",execute:'Attempted to execute an unknown action.  Valid API actions are defined in Ext.data.Api.actions"'}});Ext.data.SortTypes={none:function(a){return a},stripTagsRE:/<\/?[^>]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(g){return g.name});for(var b=0,a=e.length;b<a;b++){d.fields.add(new Ext.data.Field(e[b]))}c.getField=function(g){return d.fields.get(g)};return c};Ext.data.Record.PREFIX="ext-record";Ext.data.Record.AUTO_ID=1;Ext.data.Record.EDIT="edit";Ext.data.Record.REJECT="reject";Ext.data.Record.COMMIT="commit";Ext.data.Record.id=function(a){a.phantom=true;return[Ext.data.Record.PREFIX,"-",Ext.data.Record.AUTO_ID++].join("")};Ext.data.Record.prototype={dirty:false,editing:false,error:null,modified:null,phantom:false,join:function(a){this.store=a},set:function(a,c){var b=Ext.isPrimitive(c)?String:Ext.encode;if(b(this.data[a])==b(c)){return}this.dirty=true;if(!this.modified){this.modified={}}if(this.modified[a]===undefined){this.modified[a]=this.data[a]}this.data[a]=c;if(!this.editing){this.afterEdit()}},afterEdit:function(){if(this.store!=undefined&&typeof this.store.afterEdit=="function"){this.store.afterEdit(this)}},afterReject:function(){if(this.store){this.store.afterReject(this)}},afterCommit:function(){if(this.store){this.store.afterCommit(this)}},get:function(a){return this.data[a]},beginEdit:function(){this.editing=true;this.modified=this.modified||{}},cancelEdit:function(){this.editing=false;delete this.modified},endEdit:function(){this.editing=false;if(this.dirty){this.afterEdit()}},reject:function(b){var a=this.modified;for(var c in a){if(typeof a[c]!="function"){this.data[c]=a[c]}}this.dirty=false;delete this.modified;this.editing=false;if(b!==true){this.afterReject()}},commit:function(a){this.dirty=false;delete this.modified;this.editing=false;if(a!==true){this.afterCommit()}},getChanges:function(){var a=this.modified,b={};for(var c in a){if(a.hasOwnProperty(c)){b[c]=this.data[c]}}return b},hasError:function(){return this.error!==null},clearError:function(){this.error=null},copy:function(a){return new this.constructor(Ext.apply({},this.data),a||this.id)},isModified:function(a){return !!(this.modified&&this.modified.hasOwnProperty(a))},isValid:function(){return this.fields.find(function(a){return(a.allowBlank===false&&Ext.isEmpty(this.data[a.name]))?true:false},this)?false:true},markDirty:function(){this.dirty=true;if(!this.modified){this.modified={}}this.fields.each(function(a){this.modified[a.name]=this.data[a.name]},this)}};Ext.StoreMgr=Ext.apply(new Ext.util.MixedCollection(),{register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(e){if(Ext.isArray(e)){var b=["field1"],d=!Ext.isArray(e[0]);if(!d){for(var c=2,a=e[0].length;c<=a;++c){b.push("field"+c)}}return new Ext.data.ArrayStore({fields:b,data:e,expandData:d,autoDestroy:true,autoCreated:true})}return Ext.isObject(e)?(e.events?e:Ext.create(e,"store")):this.get(e)},getKey:function(a){return a.storeId}});Ext.data.Store=Ext.extend(Ext.util.Observable,{writer:undefined,remoteSort:false,autoDestroy:false,pruneModifiedRecords:false,lastOptions:null,autoSave:true,batch:true,restful:false,paramNames:undefined,defaultParamNames:{start:"start",limit:"limit",sort:"sort",dir:"dir"},isDestroyed:false,hasMultiSort:false,batchKey:"_ext_batch_",constructor:function(a){this.data=new Ext.util.MixedCollection(false);this.data.getKey=function(b){return b.id};this.removed=[];if(a&&a.data){this.inlineData=a.data;delete a.data}Ext.apply(this,a);this.baseParams=Ext.isObject(this.baseParams)?this.baseParams:{};this.paramNames=Ext.applyIf(this.paramNames||{},this.defaultParamNames);if((this.url||this.api)&&!this.proxy){this.proxy=new Ext.data.HttpProxy({url:this.url,api:this.api})}if(this.restful===true&&this.proxy){this.batch=false;Ext.data.Api.restify(this.proxy)}if(this.reader){if(!this.recordType){this.recordType=this.reader.recordType}if(this.reader.onMetaChange){this.reader.onMetaChange=this.reader.onMetaChange.createSequence(this.onMetaChange,this)}if(this.writer){if(this.writer instanceof (Ext.data.DataWriter)===false){this.writer=this.buildWriter(this.writer)}this.writer.meta=this.reader.meta;this.pruneModifiedRecords=true}}if(this.recordType){this.fields=this.recordType.prototype.fields}this.modified=[];this.addEvents("datachanged","metachange","add","remove","update","clear","exception","beforeload","load","loadexception","beforewrite","write","beforesave","save");if(this.proxy){this.relayEvents(this.proxy,["loadexception","exception"])}if(this.writer){this.on({scope:this,add:this.createRecords,remove:this.destroyRecord,update:this.updateRecord,clear:this.onClear})}this.sortToggle={};if(this.sortField){this.setDefaultSort(this.sortField,this.sortDir)}else{if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction)}}Ext.data.Store.superclass.constructor.call(this);if(this.id){this.storeId=this.id;delete this.id}if(this.storeId){Ext.StoreMgr.register(this)}if(this.inlineData){this.loadData(this.inlineData);delete this.inlineData}else{if(this.autoLoad){this.load.defer(10,this,[typeof this.autoLoad=="object"?this.autoLoad:undefined])}}this.batchCounter=0;this.batches={}},buildWriter:function(b){var a=undefined,c=(b.format||"json").toLowerCase();switch(c){case"json":a=Ext.data.JsonWriter;break;case"xml":a=Ext.data.XmlWriter;break;default:a=Ext.data.JsonWriter}return new a(b)},destroy:function(){if(!this.isDestroyed){if(this.storeId){Ext.StoreMgr.unregister(this)}this.clearData();this.data=null;Ext.destroy(this.proxy);this.reader=this.writer=null;this.purgeListeners();this.isDestroyed=true}},add:function(b){b=[].concat(b);if(b.length<1){return}for(var d=0,a=b.length;d<a;d++){b[d].join(this)}var c=this.data.length;this.data.addAll(b);if(this.snapshot){this.snapshot.addAll(b)}this.fireEvent("add",this,b,c)},addSorted:function(a){var b=this.findInsertIndex(a);this.insert(b,a)},remove:function(a){if(Ext.isArray(a)){Ext.each(a,function(c){this.remove(c)},this);return}var b=this.data.indexOf(a);if(b>-1){a.join(null);this.data.removeAt(b)}if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}if(b>-1){this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(b){var a=[];this.each(function(c){a.push(c)});this.clearData();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}if(b!==true){this.fireEvent("clear",this,a)}},onClear:function(b,a){Ext.each(a,function(d,c){this.destroyRecord(this,d,c)},this)},insert:function(c,b){b=[].concat(b);for(var d=0,a=b.length;d<a;d++){this.data.insert(c,b[d]);b[d].join(this)}if(this.snapshot){this.snapshot.addAll(b)}this.fireEvent("add",this,b,c)},indexOf:function(a){return this.data.indexOf(a)},indexOfId:function(a){return this.data.indexOfKey(a)},getById:function(a){return(this.snapshot||this.data).key(a)},getAt:function(a){return this.data.itemAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},storeOptions:function(a){a=Ext.apply({},a);delete a.callback;delete a.scope;this.lastOptions=a},clearData:function(){this.data.each(function(a){a.join(null)});this.data.clear()},load:function(b){b=Ext.apply({},b);this.storeOptions(b);if(this.sortInfo&&this.remoteSort){var a=this.paramNames;b.params=Ext.apply({},b.params);b.params[a.sort]=this.sortInfo.field;b.params[a.dir]=this.sortInfo.direction}try{return this.execute("read",null,b)}catch(c){this.handleException(c);return false}},updateRecord:function(b,a,c){if(c==Ext.data.Record.EDIT&&this.autoSave===true&&(!a.phantom||(a.phantom&&a.isValid()))){this.save()}},createRecords:function(c,b,d){for(var e=0,a=b.length;e<a;e++){if(b[e].phantom&&b[e].isValid()){b[e].markDirty();this.modified.push(b[e])}}if(this.autoSave===true){this.save()}},destroyRecord:function(b,a,c){if(this.modified.indexOf(a)!=-1){this.modified.remove(a)}if(!a.phantom){this.removed.push(a);a.lastIndex=c;if(this.autoSave===true){this.save()}}},execute:function(e,a,c,b){if(!Ext.data.Api.isAction(e)){throw new Ext.data.Api.Error("execute",e)}c=Ext.applyIf(c||{},{params:{}});if(b!==undefined){this.addToBatch(b)}var d=true;if(e==="read"){d=this.fireEvent("beforeload",this,c);Ext.applyIf(c.params,this.baseParams)}else{if(this.writer.listful===true&&this.restful!==true){a=(Ext.isArray(a))?a:[a]}else{if(Ext.isArray(a)&&a.length==1){a=a.shift()}}if((d=this.fireEvent("beforewrite",this,e,a,c))!==false){this.writer.apply(c.params,this.baseParams,e,a)}}if(d!==false){if(this.writer&&this.proxy.url&&!this.proxy.restful&&!Ext.data.Api.hasUniqueUrl(this.proxy,e)){c.params.xaction=e}this.proxy.request(Ext.data.Api.actions[e],a,c.params,this.reader,this.createCallback(e,a,b),this,c)}return d},save:function(){if(!this.writer){throw new Ext.data.Store.Error("writer-undefined")}var h=[],j,k,e,c={};if(this.removed.length){h.push(["destroy",this.removed])}var b=[].concat(this.getModifiedRecords());if(b.length){var g=[];for(var d=b.length-1;d>=0;d--){if(b[d].phantom===true){var a=b.splice(d,1).shift();if(a.isValid()){g.push(a)}}else{if(!b[d].isValid()){b.splice(d,1)}}}if(g.length){h.push(["create",g])}if(b.length){h.push(["update",b])}}j=h.length;if(j){e=++this.batchCounter;for(var d=0;d<j;++d){k=h[d];c[k[0]]=k[1]}if(this.fireEvent("beforesave",this,c)!==false){for(var d=0;d<j;++d){k=h[d];this.doTransaction(k[0],k[1],e)}return e}}return -1},doTransaction:function(e,b,c){function g(h){try{this.execute(e,h,undefined,c)}catch(i){this.handleException(i)}}if(this.batch===false){for(var d=0,a=b.length;d<a;d++){g.call(this,b[d])}}else{g.call(this,b)}},addToBatch:function(c){var a=this.batches,d=this.batchKey+c,e=a[d];if(!e){a[d]=e={id:c,count:0,data:{}}}++e.count},removeFromBatch:function(d,h,g){var c=this.batches,e=this.batchKey+d,i=c[e],g,a;if(i){a=i.data[h]||[];i.data[h]=a.concat(g);if(i.count===1){g=i.data;delete c[e];this.fireEvent("save",this,d,g)}else{--i.count}}},createCallback:function(c,a,b){var d=Ext.data.Api.actions;return(c=="read")?this.loadRecords:function(g,e,h){this["on"+Ext.util.Format.capitalize(c)+"Records"](h,a,[].concat(g));if(h===true){this.fireEvent("write",this,c,g,e,a)}this.removeFromBatch(b,c,g)}},clearModified:function(a){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d<a;d++){this.reMap(b[d])}}else{delete this.data.map[b._phid];this.data.map[b.id]=b;var c=this.data.keys.indexOf(b._phid);this.data.keys.splice(c,1,b.id);delete b._phid}},onCreateRecords:function(d,a,b){if(d===true){try{this.reader.realize(a,b);this.reMap(a)}catch(c){this.handleException(c);if(Ext.isArray(a)){this.onCreateRecords(d,a,b)}}}},onUpdateRecords:function(d,a,b){if(d===true){try{this.reader.update(a,b)}catch(c){this.handleException(c);if(Ext.isArray(a)){this.onUpdateRecords(d,a,b)}}}},onDestroyRecords:function(e,b,d){b=(b instanceof Ext.data.Record)?[b]:[].concat(b);for(var c=0,a=b.length;c<a;c++){this.removed.splice(this.removed.indexOf(b[c]),1)}if(e===false){for(c=b.length-1;c>=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(h,b,g){if(this.isDestroyed===true){return}if(!h||g===false){if(g!==false){this.fireEvent("load",this,[],b)}if(b.callback){b.callback.call(b.scope||this,[],b,false,h)}return}var e=h.records,d=h.totalRecords||e.length;if(!b||b.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(var c=0,a=e.length;c<a;c++){e[c].join(this)}if(this.snapshot){this.data=this.snapshot;delete this.snapshot}this.clearData();this.data.addAll(e);this.totalLength=d;this.applySort();this.fireEvent("datachanged",this)}else{this.totalLength=Math.max(d,this.data.length+e.length);this.add(e)}this.fireEvent("load",this,e,b);if(b.callback){b.callback.call(b.scope||this,e,b,true)}},loadData:function(c,a){var b=this.reader.readRecords(c);this.loadRecords(b,{add:a},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if((this.sortInfo||this.multiSortInfo)&&!this.remoteSort){this.sortData()}},sortData:function(){var a=this.hasMultiSort?this.multiSortInfo:this.sortInfo,k=a.direction||"ASC",h=a.sorters,c=[];if(!this.hasMultiSort){h=[{direction:k,field:a.field}]}for(var d=0,b=h.length;d<b;d++){c.push(this.createSortFunction(h[d].field,h[d].direction))}if(c.length==0){return}var g=k.toUpperCase()=="DESC"?-1:1;var e=function(n,m){var l=c[0].call(this,n,m);if(c.length>1){for(var p=1,o=c.length;p<o;p++){l=l||c[p].call(this,n,m)}}return g*l};this.data.sort(k,e);if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(k,e)}},createSortFunction:function(c,b){b=b||"ASC";var a=b.toUpperCase()=="DESC"?-1:1;var d=this.fields.get(c).sortType;return function(g,e){var i=d(g.data[c]),h=d(e.data[c]);return a*(i>h?1:(i<h?-1:0))}},setDefaultSort:function(b,a){a=a?a.toUpperCase():"ASC";this.sortInfo={field:b,direction:a};this.sortToggle[b]=a},sort:function(b,a){if(Ext.isArray(arguments[0])){return this.multiSort.call(this,b,a)}else{return this.singleSort(b,a)}},singleSort:function(g,c){var e=this.fields.get(g);if(!e){return false}var b=e.name,a=this.sortInfo||null,d=this.sortToggle?this.sortToggle[b]:null;if(!c){if(a&&a.field==b){c=(this.sortToggle[b]||"ASC").toggle("ASC","DESC")}else{c=e.sortDir}}this.sortToggle[b]=c;this.sortInfo={field:b,direction:c};this.hasMultiSort=false;if(this.remoteSort){if(!this.load(this.lastOptions)){if(d){this.sortToggle[b]=d}if(a){this.sortInfo=a}}}else{this.applySort();this.fireEvent("datachanged",this)}},multiSort:function(b,a){this.hasMultiSort=true;a=a||"ASC";if(this.multiSortInfo&&a==this.multiSortInfo.direction){a=a.toggle("ASC","DESC")}this.multiSortInfo={sorters:b,direction:a};if(this.remoteSort){this.singleSort(b[0].field,b[0].direction)}else{this.applySort();this.fireEvent("datachanged",this)}},each:function(b,a){this.data.each(b,a)},getModifiedRecords:function(){return this.modified},sum:function(e,g,a){var c=this.data.items,b=0;g=g||0;a=(a||a===0)?a:c.length-1;for(var d=g;d<=a;d++){b+=(c[d].data[e]||0)}return b},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c,false)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(g){return c.test(g.data[d])}},createMultipleFilterFn:function(a){return function(b){var k=true;for(var d=0,c=a.length;d<c;d++){var h=a[d],g=h.fn,e=h.scope;k=k&&g.call(e,b)}return k}},filter:function(n,m,h,k,e){if(Ext.isObject(n)){n=[n]}if(Ext.isArray(n)){var b=[];for(var g=0,d=n.length;g<d;g++){var a=n[g],c=a.fn,o=a.scope||this;if(!Ext.isFunction(c)){c=this.createFilterFn(a.property,a.value,a.anyMatch,a.caseSensitive,a.exactMatch)}b.push({fn:c,scope:o})}var l=this.createMultipleFilterFn(b)}else{var l=this.createFilterFn(n,m,h,k,e)}return l?this.filterBy(l):this.clearFilter()},filterBy:function(b,a){this.snapshot=this.snapshot||this.data;this.data=this.queryBy(b,a||this);this.fireEvent("datachanged",this)},clearFilter:function(a){if(this.isFiltered()){this.data=this.snapshot;delete this.snapshot;if(a!==true){this.fireEvent("datachanged",this)}}},isFiltered:function(){return !!this.snapshot&&this.snapshot!=this.data},query:function(d,c,e,a){var b=this.createFilterFn(d,c,e,a);return b?this.queryBy(b):this.data.clone()},queryBy:function(b,a){var c=this.snapshot||this.data;return c.filterBy(b,a||this)},find:function(d,c,g,e,a){var b=this.createFilterFn(d,c,e,a);return b?this.data.findIndexBy(b,null,g):-1},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.get(b)===a},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(j,k,b){var h=(b===true&&this.snapshot)?this.snapshot.items:this.data.items;var m,n,a=[],c={};for(var e=0,g=h.length;e<g;e++){m=h[e].data[j];n=String(m);if((k||!Ext.isEmpty(m))&&!c[n]){c[n]=true;a[a.length]=m}}return a},afterEdit:function(a){if(this.modified.indexOf(a)==-1){this.modified.push(a)}this.fireEvent("update",this,a,Ext.data.Record.EDIT)},afterReject:function(a){this.modified.remove(a);this.fireEvent("update",this,a,Ext.data.Record.REJECT)},afterCommit:function(a){this.modified.remove(a);this.fireEvent("update",this,a,Ext.data.Record.COMMIT)},commitChanges:function(){var b=this.modified.slice(0);this.modified=[];for(var c=0,a=b.length;c<a;c++){b[c].commit()}},rejectChanges:function(){var b=this.modified.slice(0);this.modified=[];for(var c=0,a=b.length;c<a;c++){b[c].reject()}var b=this.removed.slice(0).reverse();this.removed=[];for(var c=0,a=b.length;c<a;c++){this.insert(b[c].lastIndex||0,b[c]);b[c].reject()}},onMetaChange:function(a){this.recordType=this.reader.recordType;this.fields=this.recordType.prototype.fields;delete this.snapshot;if(this.reader.meta.sortInfo){this.sortInfo=this.reader.meta.sortInfo}else{if(this.sortInfo&&!this.fields.get(this.sortInfo.field)){delete this.sortInfo}}if(this.writer){this.writer.meta=this.reader.meta}this.modified=[];this.fireEvent("metachange",this,this.reader.meta)},findInsertIndex:function(a){this.suspendEvents();var c=this.data.clone();this.data.add(a);this.applySort();var b=this.data.indexOf(a);this.data=c;this.resumeEvents();return b},setBaseParam:function(a,b){this.baseParams=this.baseParams||{};this.baseParams[a]=b}});Ext.reg("store",Ext.data.Store);Ext.data.Store.Error=Ext.extend(Ext.Error,{name:"Ext.data.Store"});Ext.apply(Ext.data.Store.Error.prototype,{lang:{"writer-undefined":"Attempted to execute a write-action without a DataWriter installed."}});Ext.data.Field=Ext.extend(Object,{constructor:function(b){if(Ext.isString(b)){b={name:b}}Ext.apply(this,b);var d=Ext.data.Types,a=this.sortType,c;if(this.type){if(Ext.isString(this.type)){this.type=Ext.data.Types[this.type.toUpperCase()]||d.AUTO}}else{this.type=d.AUTO}if(Ext.isString(a)){this.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){this.sortType=this.type.sortType}}if(!this.convert){this.convert=this.type.convert}},dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true});Ext.data.DataReader=function(a,b){this.meta=a;this.recordType=Ext.isArray(b)?Ext.data.Record.create(b):b;if(this.recordType){this.buildExtractors()}};Ext.data.DataReader.prototype={getTotal:Ext.emptyFn,getRoot:Ext.emptyFn,getMessage:Ext.emptyFn,getSuccess:Ext.emptyFn,getId:Ext.emptyFn,buildExtractors:Ext.emptyFn,extractValues:Ext.emptyFn,realize:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.realize(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.realize(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){throw new Ext.data.DataReader.Error("realize",a)}a.phantom=false;a._phid=a.id;a.id=this.getId(c);a.data=c;a.commit()}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(this.isData(c)){a.data=Ext.apply(a.data,c)}a.commit()}},extractData:function(k,a){var j=(this instanceof Ext.data.JsonReader)?"json":"node";var c=[];if(this.isData(k)&&!(this instanceof Ext.data.XmlReader)){k=[k]}var h=this.recordType.prototype.fields,o=h.items,m=h.length,c=[];if(a===true){var l=this.recordType;for(var e=0;e<k.length;e++){var b=k[e];var g=new l(this.extractValues(b,o,m),this.getId(b));g[j]=b;c.push(g)}}else{for(var e=0;e<k.length;e++){var d=this.extractValues(k[e],o,m);d[this.meta.idProperty]=this.getId(k[e]);c.push(d)}}return c},isData:function(a){return(a&&Ext.isObject(a)&&!Ext.isEmpty(this.getId(a)))?true:false},onMetaChange:function(a){delete this.ef;this.meta=a;this.recordType=Ext.data.Record.create(a.fields);this.buildExtractors()}};Ext.data.DataReader.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.DataReader"});Ext.apply(Ext.data.DataReader.Error.prototype,{lang:{update:"#update received invalid data from server.  Please see docs for DataReader#update and review your DataReader configuration.",realize:"#realize was called with invalid remote-data.  Please see the docs for DataReader#realize and review your DataReader configuration.","invalid-response":"#readResponse received an invalid response from the server."}});Ext.data.DataWriter=function(a){Ext.apply(this,a)};Ext.data.DataWriter.prototype={writeAllFields:false,listful:false,apply:function(e,g,d,a){var c=[],b=d+"Record";if(Ext.isArray(a)){Ext.each(a,function(h){c.push(this[b](h))},this)}else{if(a instanceof Ext.data.Record){c=this[b](a)}}this.render(e,g,c)},render:Ext.emptyFn,updateRecord:Ext.emptyFn,createRecord:Ext.emptyFn,destroyRecord:Ext.emptyFn,toHash:function(g,c){var e=g.fields.map,d={},b=(this.writeAllFields===false&&g.phantom===false)?g.getChanges():g.data,a;Ext.iterate(b,function(i,h){if((a=e[i])){d[a.mapping?a.mapping:a.name]=h}});if(g.phantom){if(g.fields.containsKey(this.meta.idProperty)&&Ext.isEmpty(g.data[this.meta.idProperty])){delete d[this.meta.idProperty]}}else{d[this.meta.idProperty]=g.id}return d},toArray:function(b){var a=[];Ext.iterate(b,function(d,c){a.push({name:d,value:c})},this);return a}};Ext.data.DataProxy=function(a){a=a||{};this.api=a.api;this.url=a.url;this.restful=a.restful;this.listeners=a.listeners;this.prettyUrls=a.prettyUrls;this.addEvents("exception","beforeload","load","loadexception","beforewrite","write");Ext.data.DataProxy.superclass.constructor.call(this);try{Ext.data.Api.prepare(this)}catch(b){if(b instanceof Ext.data.Api.Error){b.toConsole()}}Ext.data.DataProxy.relayEvents(this,["beforewrite","write","exception"])};Ext.extend(Ext.data.DataProxy,Ext.util.Observable,{restful:false,setApi:function(){if(arguments.length==1){var a=Ext.data.Api.isValid(arguments[0]);if(a===true){this.api=arguments[0]}else{throw new Ext.data.Api.Error("invalid",a)}}else{if(arguments.length==2){if(!Ext.data.Api.isAction(arguments[0])){throw new Ext.data.Api.Error("invalid",arguments[0])}this.api[arguments[0]]=arguments[1]}}Ext.data.Api.prepare(this)},isApiAction:function(a){return(this.api[a])?true:false},request:function(e,b,g,a,h,d,c){if(!this.api[e]&&!this.load){throw new Ext.data.DataProxy.Error("action-undefined",e)}g=g||{};if((e===Ext.data.Api.actions.read)?this.fireEvent("beforeload",this,g):this.fireEvent("beforewrite",this,e,b,g)!==false){this.doRequest.apply(this,arguments)}else{h.call(d||this,null,c,false)}},load:null,doRequest:function(e,b,g,a,h,d,c){this.load(g,a,h,d,c)},onRead:Ext.emptyFn,onWrite:Ext.emptyFn,buildUrl:function(d,b){b=b||null;var c=(this.conn&&this.conn.url)?this.conn.url:(this.api[d])?this.api[d].url:this.url;if(!c){throw new Ext.data.Api.Error("invalid-url",d)}var e=null;var a=c.match(/(.*)(\.json|\.xml|\.html)$/);if(a){e=a[2];c=a[1]}if((this.restful===true||this.prettyUrls===true)&&b instanceof Ext.data.Record&&!b.phantom){c+="/"+b.id}return(e===null)?c:c+e},destroy:function(){this.purgeListeners()}});Ext.apply(Ext.data.DataProxy,Ext.util.Observable.prototype);Ext.util.Observable.call(Ext.data.DataProxy);Ext.data.DataProxy.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.DataProxy"});Ext.apply(Ext.data.DataProxy.Error.prototype,{lang:{"action-undefined":"DataProxy attempted to execute an API-action but found an undefined url / function.  Please review your Proxy url/api-configuration.","api-invalid":"Recieved an invalid API-configuration.  Please ensure your proxy API-configuration contains only the actions from Ext.data.Api.actions."}});Ext.data.Request=function(a){Ext.apply(this,a)};Ext.data.Request.prototype={action:undefined,rs:undefined,params:undefined,callback:Ext.emptyFn,scope:undefined,reader:undefined};Ext.data.Response=function(a){Ext.apply(this,a)};Ext.data.Response.prototype={action:undefined,success:undefined,message:undefined,data:undefined,raw:undefined,records:undefined};Ext.data.ScriptTagProxy=function(a){Ext.apply(this,a);Ext.data.ScriptTagProxy.superclass.constructor.call(this,a);this.head=document.getElementsByTagName("head")[0]};Ext.data.ScriptTagProxy.TRANS_ID=1000;Ext.extend(Ext.data.ScriptTagProxy,Ext.data.DataProxy,{timeout:30000,callbackParam:"callback",nocache:true,doRequest:function(e,g,d,h,j,k,l){var c=Ext.urlEncode(Ext.apply(d,this.extraParams));var b=this.buildUrl(e,g);if(!b){throw new Ext.data.Api.Error("invalid-url",b)}b=Ext.urlAppend(b,c);if(this.nocache){b=Ext.urlAppend(b,"_dc="+(new Date().getTime()))}var a=++Ext.data.ScriptTagProxy.TRANS_ID;var m={id:a,action:e,cb:"stcCallback"+a,scriptId:"stcScript"+a,params:d,arg:l,url:b,callback:j,scope:k,reader:h};window[m.cb]=this.createCallback(e,g,m);b+=String.format("&{0}={1}",this.callbackParam,m.cb);if(this.autoAbort!==false){this.abort()}m.timeoutId=this.handleFailure.defer(this.timeout,this,[m]);var i=document.createElement("script");i.setAttribute("src",b);i.setAttribute("type","text/javascript");i.setAttribute("id",m.scriptId);this.head.appendChild(i);this.trans=m},createCallback:function(d,b,c){var a=this;return function(e){a.trans=false;a.destroyTrans(c,true);if(d===Ext.data.Api.actions.read){a.onRead.call(a,d,c,e)}else{a.onWrite.call(a,d,c,e,b)}}},onRead:function(d,c,b){var a;try{a=c.reader.readRecords(b)}catch(g){this.fireEvent("loadexception",this,c,b,g);this.fireEvent("exception",this,"response",d,c,b,g);c.callback.call(c.scope||window,null,c.arg,false);return}if(a.success===false){this.fireEvent("loadexception",this,c,b);this.fireEvent("exception",this,"remote",d,c,b,null)}else{this.fireEvent("load",this,b,c.arg)}c.callback.call(c.scope||window,a,c.arg,a.success)},onWrite:function(h,g,c,b){var a=g.reader;try{var d=a.readResponse(h,c)}catch(i){this.fireEvent("exception",this,"response",h,g,d,i);g.callback.call(g.scope||window,null,d,false);return}if(!d.success===true){this.fireEvent("exception",this,"remote",h,g,d,b);g.callback.call(g.scope||window,null,d,false);return}this.fireEvent("write",this,h,d.data,d,b,g.arg);g.callback.call(g.scope||window,d.data,d,true)},isLoading:function(){return this.trans?true:false},abort:function(){if(this.isLoading()){this.destroyTrans(this.trans)}},destroyTrans:function(b,a){this.head.removeChild(document.getElementById(b.scriptId));clearTimeout(b.timeoutId);if(a){window[b.cb]=undefined;try{delete window[b.cb]}catch(c){}}else{window[b.cb]=function(){window[b.cb]=undefined;try{delete window[b.cb]}catch(d){}}}},handleFailure:function(a){this.trans=false;this.destroyTrans(a,false);if(a.action===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,null,a.arg)}this.fireEvent("exception",this,"response",a.action,{response:null,options:a.arg});a.callback.call(a.scope||window,null,a.arg,false)},destroy:function(){this.abort();Ext.data.ScriptTagProxy.superclass.destroy.call(this)}});Ext.data.HttpProxy=function(a){Ext.data.HttpProxy.superclass.constructor.call(this,a);this.conn=a;this.conn.url=null;this.useAjax=!a||!a.events;var c=Ext.data.Api.actions;this.activeRequest={};for(var b in c){this.activeRequest[c[b]]=undefined}};Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.useAjax?Ext.Ajax:this.conn},setUrl:function(a,b){this.conn.url=a;if(b===true){this.url=a;this.api=null;Ext.data.Api.prepare(this)}},doRequest:function(g,d,i,c,b,e,a){var h={method:(this.api[g])?this.api[g]["method"]:undefined,request:{callback:b,scope:e,arg:a},reader:c,callback:this.createCallback(g,d),scope:this};if(i.jsonData){h.jsonData=i.jsonData}else{if(i.xmlData){h.xmlData=i.xmlData}else{h.params=i||{}}}this.conn.url=this.buildUrl(g,d);if(this.useAjax){Ext.applyIf(h,this.conn);if(this.activeRequest[g]){}this.activeRequest[g]=Ext.Ajax.request(h)}else{this.conn.request(h)}this.conn.url=null},createCallback:function(b,a){return function(e,d,c){this.activeRequest[b]=undefined;if(!d){if(b===Ext.data.Api.actions.read){this.fireEvent("loadexception",this,e,c)}this.fireEvent("exception",this,"response",b,e,c);e.request.callback.call(e.request.scope,null,e.request.arg,false);return}if(b===Ext.data.Api.actions.read){this.onRead(b,e,c)}else{this.onWrite(b,e,c,a)}}},onRead:function(d,h,b){var a;try{a=h.reader.read(b)}catch(g){this.fireEvent("loadexception",this,h,b,g);this.fireEvent("exception",this,"response",d,h,b,g);h.request.callback.call(h.request.scope,null,h.request.arg,false);return}if(a.success===false){this.fireEvent("loadexception",this,h,b);var c=h.reader.readResponse(d,b);this.fireEvent("exception",this,"remote",d,h,c,null)}else{this.fireEvent("load",this,h,h.request.arg)}h.request.callback.call(h.request.scope,a,h.request.arg,a.success)},onWrite:function(g,i,c,b){var a=i.reader;var d;try{d=a.readResponse(g,c)}catch(h){this.fireEvent("exception",this,"response",g,i,c,h);i.request.callback.call(i.request.scope,null,i.request.arg,false);return}if(d.success===true){this.fireEvent("write",this,g,d.data,d,b,i.request.arg)}else{this.fireEvent("exception",this,"remote",g,i,d,b)}i.request.callback.call(i.request.scope,d.data,d,d.success)},destroy:function(){if(!this.useAjax){this.conn.abort()}else{if(this.activeRequest){var b=Ext.data.Api.actions;for(var a in b){if(this.activeRequest[b[a]]){Ext.Ajax.abort(this.activeRequest[b[a]])}}}}Ext.data.HttpProxy.superclass.destroy.call(this)}});Ext.data.MemoryProxy=function(b){var a={};a[Ext.data.Api.actions.read]=true;Ext.data.MemoryProxy.superclass.constructor.call(this,{api:a});this.data=b};Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{doRequest:function(b,c,a,d,h,i,j){a=a||{};var k;try{k=d.readRecords(this.data)}catch(g){this.fireEvent("loadexception",this,null,j,g);this.fireEvent("exception",this,"response",b,j,null,g);h.call(i,null,j,false);return}h.call(i,k,j,true)}});Ext.data.Types=new function(){var a=Ext.data.SortTypes;Ext.apply(this,{stripRe:/[\$,%]/g,AUTO:{convert:function(b){return b},sortType:a.none,type:"auto"},STRING:{convert:function(b){return(b===undefined||b===null)?"":String(b)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):0},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):0},sortType:a.none,type:"float"},BOOL:{convert:function(b){return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Date.parseDate(c,d)}var b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(this,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})};Ext.data.JsonWriter=Ext.extend(Ext.data.DataWriter,{encode:true,encodeDelete:false,constructor:function(a){Ext.data.JsonWriter.superclass.constructor.call(this,a)},render:function(c,d,b){if(this.encode===true){Ext.apply(c,d);c[this.meta.root]=Ext.encode(b)}else{var a=Ext.apply({},d);a[this.meta.root]=b;c.jsonData=a}},createRecord:function(a){return this.toHash(a)},updateRecord:function(a){return this.toHash(a)},destroyRecord:function(b){if(this.encodeDelete){var a={};a[this.meta.idProperty]=b.id;return a}else{return b.id}}});Ext.data.JsonReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:"id",successProperty:"success",totalProperty:"total"});Ext.data.JsonReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(a){var b=a.responseText;var c=Ext.decode(b);if(!c){throw {message:"JsonReader.read: Json object not found"}}return this.readRecords(c)},readResponse:function(e,b){var g=(b.responseText!==undefined)?Ext.decode(b.responseText):b;if(!g){throw new Ext.data.JsonReader.Error("response")}var a=this.getRoot(g);if(e===Ext.data.Api.actions.create){var d=Ext.isDefined(a);if(d&&Ext.isEmpty(a)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!d){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}var c=new Ext.data.Response({action:e,success:this.getSuccess(g),data:(a)?this.extractData(a,false):[],message:this.getMessage(g),raw:g});if(Ext.isEmpty(c.success)){throw new Ext.data.JsonReader.Error("successProperty-response",this.meta.successProperty)}return c},readRecords:function(a){this.jsonData=a;if(a.metaData){this.onMetaChange(a.metaData)}var m=this.meta,h=this.recordType,b=h.prototype.fields,l=b.items,i=b.length,j;var g=this.getRoot(a),e=g.length,d=e,k=true;if(m.totalProperty){j=parseInt(this.getTotal(a),10);if(!isNaN(j)){d=j}}if(m.successProperty){j=this.getSuccess(a);if(j===false||j==="false"){k=false}}return{success:k,records:this.extractData(g,true),totalRecords:d}},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.createAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.createAccessor(l.successProperty)}if(l.messageProperty){this.getMessage=this.createAccessor(l.messageProperty)}this.getRoot=l.root?this.createAccessor(l.root):function(g){return g};if(l.id||l.idProperty){var d=this.createAccessor(l.id||l.idProperty);this.getId=function(i){var g=d(i);return(g===undefined||g==="")?null:g}}else{this.getId=function(){return null}}var c=[];for(var b=0;b<j;b++){e=k[b];var a=(e.mapping!==undefined&&e.mapping!==null)?e.mapping:e.name;c.push(this.createAccessor(a))}this.ef=c},simpleAccess:function(b,a){return b[a]},createAccessor:function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}var b=String(c).search(a);if(b>=0){return new Function("obj","return obj"+(b>0?".":"")+c)}return function(d){return d[c]}}}(),extractValues:function(h,d,a){var g,c={};for(var e=0;e<a;e++){g=d[e];var b=this.ef[e](h);c[g.name]=g.convert((b!==undefined)?b:g.defaultValue,h)}return c}});Ext.data.JsonReader.Error=Ext.extend(Ext.Error,{constructor:function(b,a){this.arg=a;Ext.Error.call(this,b)},name:"Ext.data.JsonReader"});Ext.apply(Ext.data.JsonReader.Error.prototype,{lang:{response:"An error occurred while json-decoding your server response","successProperty-response":'Could not locate your "successProperty" in your server response.  Please review your JsonReader config to ensure the config-property "successProperty" matches the property in your server-response.  See the JsonReader docs.',"root-undefined-config":'Your JsonReader was configured without a "root" property.  Please review your JsonReader config and make sure to define the root property.  See the JsonReader docs.',"idProperty-undefined":'Your JsonReader was configured without an "idProperty"  Please review your JsonReader configuration and ensure the "idProperty" is set (e.g.: "id").  See the JsonReader docs.',"root-empty":'Data was expected to be returned by the server in the "root" property of the response.  Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response.  See JsonReader docs.'}});Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(r){this.arrayData=r;var l=this.meta,d=l?Ext.num(l.idIndex,l.id):null,b=this.recordType,q=b.prototype.fields,z=[],e=true,g;var u=this.getRoot(r);for(var y=0,A=u.length;y<A;y++){var t=u[y],a={},p=((d||d===0)&&t[d]!==undefined&&t[d]!==""?t[d]:null);for(var x=0,m=q.length;x<m;x++){var B=q.items[x],w=B.mapping!==undefined&&B.mapping!==null?B.mapping:x;g=t[w]!==undefined?t[w]:B.defaultValue;g=B.convert(g,t);a[B.name]=g}var c=new b(a,p);c.json=t;z[z.length]=c}var h=z.length;if(l.totalProperty){g=parseInt(this.getTotal(r),10);if(!isNaN(g)){h=g}}if(l.successProperty){g=this.getSuccess(r);if(g===false||g==="false"){e=false}}return{success:e,records:z,totalRecords:h}}});Ext.data.ArrayStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.ArrayStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.ArrayReader(a)}))},loadData:function(e,b){if(this.expandData===true){var d=[];for(var c=0,a=e.length;c<a;c++){d[d.length]=[e[c]]}e=d}Ext.data.ArrayStore.superclass.loadData.call(this,e,b)}});Ext.reg("arraystore",Ext.data.ArrayStore);Ext.data.SimpleStore=Ext.data.ArrayStore;Ext.reg("simplestore",Ext.data.SimpleStore);Ext.data.JsonStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.JsonReader(a)}))}});Ext.reg("jsonstore",Ext.data.JsonStore);Ext.data.XmlWriter=function(a){Ext.data.XmlWriter.superclass.constructor.apply(this,arguments);this.tpl=(typeof(this.tpl)==="string")?new Ext.XTemplate(this.tpl).compile():this.tpl.compile()};Ext.extend(Ext.data.XmlWriter,Ext.data.DataWriter,{documentRoot:"xrequest",forceDocumentRoot:false,root:"records",xmlVersion:"1.0",xmlEncoding:"ISO-8859-15",tpl:'<tpl for="."><\u003fxml version="{version}" encoding="{encoding}"\u003f><tpl if="documentRoot"><{documentRoot}><tpl for="baseParams"><tpl for="."><{name}>{value}</{name}</tpl></tpl></tpl><tpl if="records.length&gt;1"><{root}></tpl><tpl for="records"><{parent.record}><tpl for="."><{name}>{value}</{name}></tpl></{parent.record}></tpl><tpl if="records.length&gt;1"></{root}></tpl><tpl if="documentRoot"></{documentRoot}></tpl></tpl>',render:function(b,c,a){c=this.toArray(c);b.xmlData=this.tpl.applyTemplate({version:this.xmlVersion,encoding:this.xmlEncoding,documentRoot:(c.length>0||this.forceDocumentRoot===true)?this.documentRoot:false,record:this.meta.record,root:this.root,baseParams:c,records:(Ext.isArray(a[0]))?a:[a]})},createRecord:function(a){return this.toArray(this.toHash(a))},updateRecord:function(a){return this.toArray(this.toHash(a))},destroyRecord:function(b){var a={};a[this.meta.idProperty]=b.id;return this.toArray(a)}});Ext.data.XmlReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:a.idProperty||a.idPath||a.id,successProperty:a.successProperty||a.success});Ext.data.XmlReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b){throw {message:"XmlReader.read: XML Document not available"}}return this.readRecords(b)},readRecords:function(d){this.xmlData=d;var a=d.documentElement||d,c=Ext.DomQuery,g=0,e=true;if(this.meta.totalProperty){g=this.getTotal(a,0)}if(this.meta.successProperty){e=this.getSuccess(a)}var b=this.extractData(c.select(this.meta.record,a),true);return{success:e,records:b,totalRecords:g||b.length}},readResponse:function(e,a){var d=Ext.DomQuery,g=a.responseXML;var b=new Ext.data.Response({action:e,success:this.getSuccess(g),message:this.getMessage(g),data:this.extractData(d.select(this.meta.record,g)||d.select(this.meta.root,g),false),raw:g});if(Ext.isEmpty(b.success)){throw new Ext.data.DataReader.Error("successProperty-response",this.meta.successProperty)}if(e===Ext.data.Api.actions.create){var c=Ext.isDefined(b.data);if(c&&Ext.isEmpty(b.data)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!c){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}return b},getSuccess:function(){return true},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.createAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.createAccessor(l.successProperty)}if(l.messageProperty){this.getMessage=this.createAccessor(l.messageProperty)}this.getRoot=function(g){return(!Ext.isEmpty(g[this.meta.record]))?g[this.meta.record]:g[this.meta.root]};if(l.idPath||l.idProperty){var d=this.createAccessor(l.idPath||l.idProperty);this.getId=function(g){var i=d(g)||g.id;return(i===undefined||i==="")?null:i}}else{this.getId=function(){return null}}var c=[];for(var b=0;b<j;b++){e=k[b];var a=(e.mapping!==undefined&&e.mapping!==null)?e.mapping:e.name;c.push(this.createAccessor(a))}this.ef=c},createAccessor:function(){var a=Ext.DomQuery;return function(b){switch(b){case this.meta.totalProperty:return function(c,d){return a.selectNumber(b,c,d)};break;case this.meta.successProperty:return function(d,e){var c=a.selectValue(b,d,true);var g=c!==false&&c!=="false";return g};break;default:return function(c,d){return a.selectValue(b,c,d)};break}}}(),extractValues:function(h,d,a){var g,c={};for(var e=0;e<a;e++){g=d[e];var b=this.ef[e](h);c[g.name]=g.convert((b!==undefined)?b:g.defaultValue,h)}return c}});Ext.data.XmlStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.XmlStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.XmlReader(a)}))}});Ext.reg("xmlstore",Ext.data.XmlStore);Ext.data.GroupingStore=Ext.extend(Ext.data.Store,{constructor:function(d){d=d||{};this.hasMultiSort=true;this.multiSortInfo=this.multiSortInfo||{sorters:[]};var e=this.multiSortInfo.sorters,c=d.groupField||this.groupField,b=d.sortInfo||this.sortInfo,a=d.groupDir||this.groupDir;if(c){e.push({field:c,direction:a})}if(b){e.push(b)}Ext.data.GroupingStore.superclass.constructor.call(this,d);this.addEvents("groupchange");this.applyGroupField()},remoteGroup:false,groupOnSort:false,groupDir:"ASC",clearGrouping:function(){this.groupField=false;if(this.remoteGroup){if(this.baseParams){delete this.baseParams.groupBy;delete this.baseParams.groupDir}var a=this.lastOptions;if(a&&a.params){delete a.params.groupBy;delete a.params.groupDir}this.reload()}else{this.sort();this.fireEvent("datachanged",this)}},groupBy:function(d,a,c){c=c?(String(c).toUpperCase()=="DESC"?"DESC":"ASC"):this.groupDir;if(this.groupField==d&&this.groupDir==c&&!a){return}sorters=this.multiSortInfo.sorters;if(sorters.length>0&&sorters[0].field==this.groupField){sorters.shift()}this.groupField=d;this.groupDir=c;this.applyGroupField();var b=function(){this.fireEvent("groupchange",this,this.getGroupState())};if(this.groupOnSort){this.sort(d,c);b.call(this);return}if(this.remoteGroup){this.on("load",b,this,{single:true});this.reload()}else{this.sort(sorters);b.call(this)}},sort:function(h,c){if(this.remoteSort){return Ext.data.GroupingStore.superclass.sort.call(this,h,c)}var g=[];if(Ext.isArray(arguments[0])){g=arguments[0]}else{if(h==undefined){g=this.sortInfo?[this.sortInfo]:[]}else{var e=this.fields.get(h);if(!e){return false}var b=e.name,a=this.sortInfo||null,d=this.sortToggle?this.sortToggle[b]:null;if(!c){if(a&&a.field==b){c=(this.sortToggle[b]||"ASC").toggle("ASC","DESC")}else{c=e.sortDir}}this.sortToggle[b]=c;this.sortInfo={field:b,direction:c};g=[this.sortInfo]}}if(this.groupField){g.unshift({direction:this.groupDir,field:this.groupField})}return this.multiSort.call(this,g,c)},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}Ext.apply(this.baseParams,{groupBy:this.groupField,groupDir:this.groupDir});var a=this.lastOptions;if(a&&a.params){a.params.groupDir=this.groupDir;delete a.params.groupBy}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);return true}else{if(a===true){this.fireEvent("datachanged",this)}return false}},getGroupState:function(){return this.groupOnSort&&this.groupField!==false?(this.sortInfo?this.sortInfo.field:undefined):this.groupField}});Ext.reg("groupingstore",Ext.data.GroupingStore);Ext.data.DirectProxy=function(a){Ext.apply(this,a);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}Ext.data.DirectProxy.superclass.constructor.call(this,a)};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(b,c,a,e,k,l,n){var j=[],h=this.api[b]||this.directFn;switch(b){case Ext.data.Api.actions.create:j.push(a.jsonData);break;case Ext.data.Api.actions.read:if(h.directCfg.method.len>0){if(this.paramOrder){for(var d=0,g=this.paramOrder.length;d<g;d++){j.push(a[this.paramOrder[d]])}}else{if(this.paramsAsHash){j.push(a)}}}break;case Ext.data.Api.actions.update:j.push(a.jsonData);break;case Ext.data.Api.actions.destroy:j.push(a.jsonData);break}var m={params:a||{},request:{callback:k,scope:l,arg:n},reader:e};j.push(this.createCallback(b,c,m),this);h.apply(window,j)},createCallback:function(d,a,b){var c=this;return function(e,g){if(!g.status){if(d===Ext.data.Api.actions.read){c.fireEvent("loadexception",c,b,g,null)}c.fireEvent("exception",c,"remote",d,b,g,null);b.request.callback.call(b.request.scope,null,b.request.arg,false);return}if(d===Ext.data.Api.actions.read){c.onRead(d,b,e,g)}else{c.onWrite(d,b,e,g,a)}}},onRead:function(g,e,a,d){var b;try{b=e.reader.readRecords(a)}catch(c){this.fireEvent("loadexception",this,e,d,c);this.fireEvent("exception",this,"response",g,e,d,c);e.request.callback.call(e.request.scope,null,e.request.arg,false);return}this.fireEvent("load",this,d,e.request.arg);e.request.callback.call(e.request.scope,b,e.request.arg,true)},onWrite:function(g,d,a,c,b){var e=d.reader.extractData(d.reader.getRoot(a),false);var h=d.reader.getSuccess(a);h=(h!==false);if(h){this.fireEvent("write",this,g,e,c,b,d.request.arg)}else{this.fireEvent("exception",this,"remote",g,d,a,b)}d.request.callback.call(d.request.scope,e,c,h)}});Ext.data.DirectStore=Ext.extend(Ext.data.Store,{constructor:function(a){var b=Ext.apply({},{batchTransactions:false},a);Ext.data.DirectStore.superclass.constructor.call(this,Ext.apply(b,{proxy:Ext.isDefined(b.proxy)?b.proxy:new Ext.data.DirectProxy(Ext.copyTo({},b,"paramOrder,paramsAsHash,directFn,api")),reader:(!Ext.isDefined(b.reader)&&b.fields)?new Ext.data.JsonReader(Ext.copyTo({},b,"totalProperty,root,idProperty"),b.fields):b.reader}))}});Ext.reg("directstore",Ext.data.DirectStore);Ext.Direct=Ext.extend(Ext.util.Observable,{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"},constructor:function(){this.addEvents("event","exception");this.transactions={};this.providers={}},addProvider:function(e){var c=arguments;if(c.length>1){for(var d=0,b=c.length;d<b;d++){this.addProvider(c[d])}return}if(!e.events){e=new Ext.Direct.PROVIDERS[e.type](e)}e.id=e.id||Ext.id();this.providers[e.id]=e;e.on("data",this.onProviderData,this);e.on("exception",this.onProviderException,this);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return this.providers[a]},removeProvider:function(b){var a=b.id?b:this.providers[b];a.un("data",this.onProviderData,this);a.un("exception",this.onProviderException,this);delete this.providers[a.id];return a},addTransaction:function(a){this.transactions[a.tid]=a;return a},removeTransaction:function(a){delete this.transactions[a.tid||a];return a},getTransaction:function(a){return this.transactions[a.tid||a]},onProviderData:function(d,c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.onProviderData(d,c[b])}return}if(c.name&&c.name!="event"&&c.name!="exception"){this.fireEvent(c.name,c)}else{if(c.type=="exception"){this.fireEvent("exception",c)}}this.fireEvent("event",c,d)},createEvent:function(a,b){return new Ext.Direct.eventTypes[a.type](Ext.apply(a,b))}});Ext.Direct=new Ext.Direct();Ext.Direct.TID=1;Ext.Direct.PROVIDERS={};Ext.Direct.Transaction=function(a){Ext.apply(this,a);this.tid=++Ext.Direct.TID;this.retryCount=0};Ext.Direct.Transaction.prototype={send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++;this.send()},getProvider:function(){return this.provider}};Ext.Direct.Event=function(a){Ext.apply(this,a)};Ext.Direct.Event.prototype={status:true,getData:function(){return this.data}};Ext.Direct.RemotingEvent=Ext.extend(Ext.Direct.Event,{type:"rpc",getTransaction:function(){return this.transaction||Ext.Direct.getTransaction(this.tid)}});Ext.Direct.ExceptionEvent=Ext.extend(Ext.Direct.RemotingEvent,{status:false,type:"exception"});Ext.Direct.eventTypes={rpc:Ext.Direct.RemotingEvent,event:Ext.Direct.Event,exception:Ext.Direct.ExceptionEvent};Ext.direct.Provider=Ext.extend(Ext.util.Observable,{priority:1,constructor:function(a){Ext.apply(this,a);this.addEvents("connect","disconnect","data","exception");Ext.direct.Provider.superclass.constructor.call(this,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.direct.JsonProvider=Ext.extend(Ext.direct.Provider,{parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(typeof a.responseText=="object"){return a.responseText}return Ext.decode(a.responseText)}return null},getEvents:function(j){var g=null;try{g=this.parseResponse(j)}catch(h){var d=new Ext.Direct.ExceptionEvent({data:h,xhr:j,code:Ext.Direct.exceptions.PARSE,message:"Error parsing json response: \n\n "+g});return[d]}var c=[];if(Ext.isArray(g)){for(var b=0,a=g.length;b<a;b++){c.push(Ext.Direct.createEvent(g[b]))}}else{c.push(Ext.Direct.createEvent(g))}return c}});Ext.direct.PollingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:3,interval:3000,constructor:function(a){Ext.direct.PollingProvider.superclass.constructor.call(this,a);this.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){if(this.url&&!this.pollTask){this.pollTask=Ext.TaskMgr.start({run:function(){if(this.fireEvent("beforepoll",this)!==false){if(typeof this.url=="function"){this.url(this.baseParams)}else{Ext.Ajax.request({url:this.url,callback:this.onData,scope:this,params:this.baseParams})}}},interval:this.interval,scope:this});this.fireEvent("connect",this)}else{if(!this.url){throw"Error initializing PollingProvider, no url configured."}}},disconnect:function(){if(this.pollTask){Ext.TaskMgr.stop(this.pollTask);delete this.pollTask;this.fireEvent("disconnect",this)}},onData:function(d,j,h){if(j){var c=this.getEvents(h);for(var b=0,a=c.length;b<a;b++){var g=c[b];this.fireEvent("data",this,g)}}else{var g=new Ext.Direct.ExceptionEvent({data:g,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:h});this.fireEvent("data",this,g)}}});Ext.Direct.PROVIDERS.polling=Ext.direct.PollingProvider;Ext.direct.RemotingProvider=Ext.extend(Ext.direct.JsonProvider,{enableBuffer:10,maxRetries:1,timeout:undefined,constructor:function(a){Ext.direct.RemotingProvider.superclass.constructor.call(this,a);this.addEvents("beforecall","call");this.namespace=(Ext.isString(this.namespace))?Ext.ns(this.namespace):this.namespace||window;this.transactions={};this.callBuffer=[]},initAPI:function(){var h=this.actions;for(var j in h){var d=this.namespace[j]||(this.namespace[j]={}),e=h[j];for(var g=0,b=e.length;g<b;g++){var a=e[g];d[a.name]=this.createMethod(j,a)}}},isConnected:function(){return !!this.connected},connect:function(){if(this.url){this.initAPI();this.connected=true;this.fireEvent("connect",this)}else{if(!this.url){throw"Error initializing RemotingProvider, no url configured."}}},disconnect:function(){if(this.connected){this.connected=false;this.fireEvent("disconnect",this)}},onData:function(a,h,j){if(h){var k=this.getEvents(j);for(var b=0,c=k.length;b<c;b++){var d=k[b],l=this.getTransaction(d);this.fireEvent("data",this,d);if(l){this.doCallback(l,d,true);Ext.Direct.removeTransaction(l)}}}else{var g=[].concat(a.ts);for(var b=0,c=g.length;b<c;b++){var l=this.getTransaction(g[b]);if(l&&l.retryCount<this.maxRetries){l.retry()}else{var d=new Ext.Direct.ExceptionEvent({data:d,transaction:l,code:Ext.Direct.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:j});this.fireEvent("data",this,d);if(l){this.doCallback(l,d,false);Ext.Direct.removeTransaction(l)}}}}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.tid}},doSend:function(d){var g={url:this.url,callback:this.onData,scope:this,ts:d,timeout:this.timeout},b;if(Ext.isArray(d)){b=[];for(var c=0,a=d.length;c<a;c++){b.push(this.getCallData(d[c]))}}else{b=this.getCallData(d)}if(this.enableUrlEncode){var e={};e[Ext.isString(this.enableUrlEncode)?this.enableUrlEncode:"data"]=Ext.encode(b);g.params=e}else{g.jsonData=b}Ext.Ajax.request(g)},combineAndSend:function(){var a=this.callBuffer.length;if(a>0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(Ext.isNumber(this.enableBuffer)?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(i,a,b){var h=null,e=b[a.len],g=b[a.len+1];if(a.len!==0){h=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:i,method:a.name,data:h,cb:g&&Ext.isFunction(e)?e.createDelegate(g):e});if(this.fireEvent("beforecall",this,d)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d)}},doForm:function(j,b,g,i,e){var d=new Ext.Direct.Transaction({provider:this,action:j,method:b.name,args:[g,i,e],cb:e&&Ext.isFunction(i)?i.createDelegate(e):i,isForm:true});if(this.fireEvent("beforecall",this,d)!==false){Ext.Direct.addTransaction(d);var a=String(g.getAttribute("enctype")).toLowerCase()=="multipart/form-data",h={extTID:d.tid,extAction:j,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(g),isUpload:a,params:i&&Ext.isObject(i.params)?Ext.apply(h,i.params):h});this.fireEvent("call",this,d);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,g,c){this.doForm(d,a,e,g,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,g){var d=g.status?"success":"failure";if(c&&c.cb){var b=c.cb,a=Ext.isDefined(g.result)?g.result:g.data;if(Ext.isFunction(b)){b(a,g)}else{Ext.callback(b[d],b.scope,[a,g]);Ext.callback(b.callback,b.scope,[a,g])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider;Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var g=e.resizeChild.getSize();this.el.setSize(g.width,g.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var k=this.el.getStyle("position");if(k!="absolute"&&k!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var o=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var j=0,l=o.length;j<l;j++){if(o[j]&&c[o[j]]){var n=c[o[j]];this[n]=new Ext.Resizable.Handle(this,n,this.disableTrackOver,this.transparent,this.handleCls)}}this.corner=this.southeast;if(this.handles.indexOf("n")!=-1||this.handles.indexOf("w")!=-1){this.updateBox=true}this.activeHandle=null;if(this.resizeChild){if(typeof this.resizeChild=="boolean"){this.resizeChild=Ext.get(this.el.dom.firstChild,true)}else{this.resizeChild=Ext.get(this.resizeChild,true)}}if(this.adjustments=="auto"){var b=this.resizeChild;var m=this.west,h=this.east,a=this.north,o=this.south;if(b&&(m||a)){b.position("relative");b.setLeft(m?m.el.getWidth():0);b.setTop(a?a.el.getHeight():0)}this.adjustments=[(h?-h.el.getWidth():0)+(m?-m.el.getWidth():0),(a?-a.el.getHeight():0)+(o?-o.el.getHeight():0)-1]}if(this.draggable){this.dd=this.dynamic?this.el.initDD(null):this.el.initDDProxy(null,{dragElId:this.proxy.id});this.dd.setHandleElId(this.resizeChild?this.resizeChild.id:this.el.id);if(this.constrainTo){this.dd.constrainTo(this.constrainTo)}}this.addEvents("beforeresize","resize");if(this.width!==null&&this.height!==null){this.resizeTo(this.width,this.height)}else{this.updateChildSize()}if(Ext.isIE){this.el.dom.style.zoom=1}Ext.Resizable.superclass.constructor.call(this)},adjustments:[0,0],animate:false,disableTrackOver:false,draggable:false,duration:0.35,dynamic:false,easing:"easeOutStrong",enabled:true,handles:false,multiDirectional:false,height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:5,minWidth:5,maxHeight:10000,maxWidth:10000,minX:0,minY:0,pinned:false,preserveRatio:false,resizeChild:false,transparent:false,resizeTo:function(b,a){this.el.setSize(b,a);this.updateChildSize();this.fireEvent("resize",this,b,a,null)},startSizing:function(c,b){this.fireEvent("beforeresize",this,c);if(this.enabled){if(!this.overlay){this.overlay=this.el.createProxy({tag:"div",cls:"x-resizable-overlay",html:"&#160;"},Ext.getBody());this.overlay.unselectable();this.overlay.enableDisplayMode("block");this.overlay.on({scope:this,mousemove:this.onMouseMove,mouseup:this.onMouseUp})}this.overlay.setStyle("cursor",b.el.getStyle("cursor"));this.resizing=true;this.startBox=this.el.getBox();this.startPoint=c.getXY();this.offsets=[(this.startBox.x+this.startBox.width)-this.startPoint[0],(this.startBox.y+this.startBox.height)-this.startPoint[1]];this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();if(this.constrainTo){var a=Ext.get(this.constrainTo);this.resizeRegion=a.getRegion().adjust(a.getFrameWidth("t"),a.getFrameWidth("l"),-a.getFrameWidth("b"),-a.getFrameWidth("r"))}this.proxy.setStyle("visibility","hidden");this.proxy.show();this.proxy.setBox(this.startBox);if(!this.dynamic){this.proxy.setStyle("visibility","visible")}}},onMouseDown:function(a,b){if(this.enabled){b.stopEvent();this.activeHandle=a;this.startSizing(b,a)}},onMouseUp:function(b){this.activeHandle=null;var a=this.resizeElement();this.resizing=false;this.handleOut();this.overlay.hide();this.proxy.hide();this.fireEvent("resize",this,a.width,a.height,b)},updateChildSize:function(){if(this.resizeChild){var d=this.el;var e=this.resizeChild;var c=this.adjustments;if(d.dom.offsetWidth){var a=d.getSize(true);e.setSize(a.width+c[0],a.height+c[1])}if(Ext.isIE){setTimeout(function(){if(d.dom.offsetWidth){var g=d.getSize(true);e.setSize(g.width+c[0],g.height+c[1])}},10)}}},snap:function(c,e,b){if(!e||!c){return c}var d=c;var a=c%e;if(a>0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}if(this.draggable&&this.constrainTo){this.dd.resetConstraints();this.dd.constrainTo(this.constrainTo)}return a},constrain:function(b,c,a,d){if(b-c<a){c=b-a}else{if(b-c>d){c=b-d}}return c},onMouseMove:function(z){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(z.getPoint())){return}var t=this.curSize||this.startBox,l=this.startBox.x,k=this.startBox.y,c=l,b=k,m=t.width,u=t.height,d=m,o=u,n=this.minWidth,A=this.minHeight,s=this.maxWidth,D=this.maxHeight,i=this.widthIncrement,a=this.heightIncrement,B=z.getXY(),r=-(this.startPoint[0]-Math.max(this.minX,B[0])),p=-(this.startPoint[1]-Math.max(this.minY,B[1])),j=this.activeHandle.position,E,g;switch(j){case"east":m+=r;m=Math.min(Math.max(n,m),s);break;case"south":u+=p;u=Math.min(Math.max(A,u),D);break;case"southeast":m+=r;u+=p;m=Math.min(Math.max(n,m),s);u=Math.min(Math.max(A,u),D);break;case"north":p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"west":r=this.constrain(m,r,n,s);l+=r;m-=r;break;case"northeast":m+=r;m=Math.min(Math.max(n,m),s);p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"northwest":r=this.constrain(m,r,n,s);p=this.constrain(u,p,A,D);k+=p;u-=p;l+=r;m-=r;break;case"southwest":r=this.constrain(m,r,n,s);u+=p;u=Math.min(Math.max(A,u),D);l+=r;m-=r;break}var q=this.snap(m,i,n);var C=this.snap(u,a,A);if(q!=m||C!=u){switch(j){case"northeast":k-=C-u;break;case"north":k-=C-u;break;case"southwest":l-=q-m;break;case"west":l-=q-m;break;case"northwest":l-=q-m;k-=C-u;break}m=q;u=C}if(this.preserveRatio){switch(j){case"southeast":case"east":u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);break;case"south":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"northeast":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"north":E=m;m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);l+=(E-m)/2;break;case"southwest":u=o*(m/d);u=Math.min(Math.max(A,u),D);E=m;m=d*(u/o);l+=E-m;break;case"west":g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);k+=(g-u)/2;E=m;m=d*(u/o);l+=E-m;break;case"northwest":E=m;g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);k+=g-u;l+=E-m;break}}this.proxy.setBounds(l,k,m,u);if(this.dynamic){this.resizeElement()}}catch(v){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=Ext.extend(Object,{constructor:function(d,g,c,e,a){if(!this.tpl){var b=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});b.compile();Ext.Resizable.Handle.prototype.tpl=b}this.position=g;this.rz=d;this.el=this.tpl.append(d.el.dom,[this.position],true);this.el.unselectable();if(e){this.el.setOpacity(0)}if(!Ext.isEmpty(a)){this.el.addClass(a)}this.el.on("mousedown",this.onMouseDown,this);if(!c){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}},afterResize:function(a){},onMouseDown:function(a){this.rz.onMouseDown(this,a)},onMouseOver:function(a){this.rz.handleOver(this,a)},onMouseOut:function(a){this.rz.handleOut(this,a)},destroy:function(){Ext.destroy(this.el);this.el=null}});Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,initHidden:undefined,hidden:true,elements:"header,body",frame:true,floating:true,initComponent:function(){this.initTools();Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(Ext.isDefined(this.initHidden)){this.hidden=this.initHidden}if(this.hidden===false){this.hidden=true;this.show()}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},onRender:function(b,a){Ext.Window.superclass.onRender.call(this,b,a);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:"&#160;"});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide();this.mon(this.mask,"click",this.focus,this)}if(this.maximizable){this.mon(this.header,"dblclick",this.toggleMaximize,this)}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction,handleCls:"x-window-handle"});this.resizer.window=this;this.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var a=this.getKeyMap();a.on(27,this.onEsc,this);a.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){if(this.rendered){this.hide();this.clearAnchor();Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask)}Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager){this.manager.unregister(this)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true})}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var a=this.proxy.getBox();this.proxy.hide();this.window.handleResize(a);return a},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(b){var a=this.resizeBox;if(a.x!=b.x||a.y!=b.y){this.updateBox(b)}else{this.setSize(b);if(Ext.isIE6&&Ext.isStrict){this.doLayout()}}this.focus();this.updateHandles();this.saveState()},focus:function(){var e=this.focusEl,a=this.defaultButton,c=typeof a,d,b;if(Ext.isDefined(a)){if(Ext.isNumber(a)&&this.fbar){e=this.fbar.items.get(a)}else{if(Ext.isString(a)){e=Ext.getCmp(a)}else{e=a}}d=e.getEl();b=Ext.getDom(this.container);if(d&&b){if(!Ext.lib.Region.getRegion(b).contains(Ext.lib.Region.getRegion(d.dom))){return}}}e=e||this.focusEl;e.focus.defer(10,e)},setAnimateTarget:function(a){a=Ext.get(a);this.animateTarget=a},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var a=this.el.getAlignToXY(this.container,"c-c");var b=this.el.translatePoints(a[0],a[1]);this.x=this.x===undefined?b.left:this.x;this.y=this.y===undefined?b.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(c,a,b){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return this}if(this.fireEvent("beforeshow",this)===false){return this}if(a){this.on("show",a,b,{single:true})}this.hidden=false;if(Ext.isDefined(c)){this.setAnimateTarget(c)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}return this},afterShow:function(b){if(this.isDestroyed){return false}this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}this.onShow();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var a=this.getBox();this.el.setStyle("display","none");this.proxy.shift(Ext.apply(a,{callback:this.afterShow.createDelegate(this,[true],false),scope:this,easing:"easeNone",duration:0.25,opacity:0.5}))},hide:function(c,a,b){if(this.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.keyMap){this.keyMap.disable()}this.onHide();this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var a=this.getBox(false);this.proxy.setBox(a);this.el.hide();this.proxy.shift(Ext.apply(this.animateTarget.getBox(),{callback:this.afterHide,scope:this,duration:0.25,easing:"easeNone",opacity:0}))},onShow:Ext.emptyFn,onHide:Ext.emptyFn,onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var a=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var b;if(this.constrain){b={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var a=this.getSize();b={right:-(a.width-100),bottom:-(a.height-25)}}var c=this.el.getConstrainToXY(this.container,true,b);if(c){this.setPosition(c[0],c[1])}}},ghost:function(a){var c=this.createGhost(a);var b=this.getBox(true);c.setLeftTop(b.x,b.y);c.setWidth(b.width);this.el.hide();this.activeGhost=c;return c},unghost:function(b,a){if(!this.activeGhost){return}if(b!==false){this.el.show();this.focus.defer(10,this);if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}}if(a!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this);return this},close:function(){if(this.fireEvent("beforeclose",this)!==false){if(this.hidden){this.doClose()}else{this.hide(null,this.doClose,this)}}},doClose:function(){this.fireEvent("close",this);this.destroy()},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();this.tools.restore.show()}this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock()}if(this.collapsible){this.tools.toggle.hide()}this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}return this},restore:function(){if(this.maximized){var a=this.tools;this.el.removeClass("x-window-maximized");if(a.restore){a.restore.hide()}if(a.maximize){a.maximize.show()}this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock()}if(this.collapsible&&a.toggle){a.toggle.show()}this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize(false);this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){this.clearAnchor();this.anchorTarget={el:c,alignment:e,offsets:d};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}return this.doAnchor()},doAnchor:function(){var a=this.anchorTarget;this.alignTo(a.el,a.alignment,a.offsets);return this},clearAnchor:function(){if(this.anchorTarget){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this);delete this.anchorTarget}return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){this.focus()}}return this},setActive:function(a){if(a){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a[0],a[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=function(a){this.win=a;Ext.Window.DD.superclass.constructor.call(this,a.el.id,"WindowDD-"+a.id);this.setHandleElId(a.header.id);this.scroll=false};Ext.extend(Ext.Window.DD,Ext.dd.DD,{moveOnly:true,headerOffsets:[100,25],startDrag:function(){var a=this.win;this.proxy=a.ghost();if(a.constrain!==false){var c=a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.constrainHeader!==false){var b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b.width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(a){this.alignElWithMouse(this.proxy,a.getPageX(),a.getPageY())},endDrag:function(a){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var g={};var d=[];var e=null;var c=function(j,i){return(!j._lastAccess||j._lastAccess<i._lastAccess)?-1:1};var h=function(){var l=d,j=l.length;if(j>0){l.sort(c);var k=l[0].manager.zseed;for(var m=0;m<j;m++){var n=l[m];if(n&&!n.hidden){n.setZIndex(k+(m*10))}}}a()};var b=function(i){if(i!=e){if(e){e.setActive(false)}e=i;if(i){i.setActive(true)}}};var a=function(){for(var j=d.length-1;j>=0;--j){if(!d[j].hidden){b(d[j]);return}}b(null)};return{zseed:9000,register:function(i){if(i.manager){i.manager.unregister(i)}i.manager=this;g[i.id]=i;d.push(i);i.on("hide",a)},unregister:function(i){delete i.manager;delete g[i.id];i.un("hide",a);d.remove(i)},get:function(i){return typeof i=="object"?i:g[i]},bringToFront:function(i){i=this.get(i);if(i!=e){i._lastAccess=new Date().getTime();h();return true}return false},sendToBack:function(i){i=this.get(i);i._lastAccess=-(new Date().getTime());h();return i},hideAll:function(){for(var i in g){if(g[i]&&typeof g[i]!="function"&&g[i].isVisible()){g[i].hide()}}},getActive:function(){return e},getBy:function(l,k){var m=[];for(var j=d.length-1;j>=0;--j){var n=d[j];if(l.call(k||n,n)!==false){m.push(n)}}return m},each:function(j,i){for(var k in g){if(g[k]&&typeof g[k]!="function"){if(j.call(i||g[k],g[k])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var u,b,q,t,h,l,s,a,n,p,j,g,r,v,o,i="",d="",m=["ok","yes","no","cancel"];var c=function(x){r[x].blur();if(u.isVisible()){u.hide();w();Ext.callback(b.fn,b.scope||window,[x,v.dom.value,b],1)}};var w=function(){if(b&&b.cls){u.el.removeClass(b.cls)}n.reset()};var e=function(z,x,y){if(b&&b.closable!==false){u.hide();w()}if(y){y.stopEvent()}};var k=function(x){var z=0,y;if(!x){Ext.each(m,function(A){r[A].hide()});return z}u.footer.dom.style.display="";Ext.iterate(r,function(A,B){y=x[A];if(y){B.show();B.setText(Ext.isString(y)?y:Ext.MessageBox.buttonText[A]);z+=B.getEl().getWidth()+15}else{B.hide()}});return z};return{getDialog:function(x){if(!u){var z=[];r={};Ext.each(m,function(A){z.push(r[A]=new Ext.Button({text:this.buttonText[A],handler:c.createCallback(A),hideMode:"offsets"}))},this);u=new Ext.Window({autoCreate:true,title:x,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){c("no")}else{c("cancel")}},fbar:new Ext.Toolbar({items:z,enableOverflow:false})});u.render(document.body);u.getEl().addClass("x-window-dlg");q=u.mask;h=u.body.createChild({html:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><div class="ext-mb-fix-cursor"><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div></div>'});j=Ext.get(h.dom.firstChild);var y=h.dom.childNodes[1];l=Ext.get(y.firstChild);s=Ext.get(y.childNodes[2].firstChild);s.enableDisplayMode();s.addKeyListener([10,13],function(){if(u.isVisible()&&b&&b.buttons){if(b.buttons.ok){c("ok")}else{if(b.buttons.yes){c("yes")}}}});a=Ext.get(y.childNodes[2].childNodes[1]);a.enableDisplayMode();n=new Ext.ProgressBar({renderTo:h});h.createChild({cls:"x-clear"})}return u},updateText:function(A){if(!u.isVisible()&&!b.width){u.setSize(this.maxWidth,100)}l.update(A||"&#160;");var y=d!=""?(j.getWidth()+j.getMargins("lr")):0,C=l.getWidth()+l.getMargins("lr"),z=u.getFrameWidth("lr"),B=u.body.getFrameWidth("lr"),x;if(Ext.isIE&&y>0){y+=3}x=Math.max(Math.min(b.width||y+C+z+B,b.maxWidth||this.maxWidth),Math.max(b.minWidth||this.minWidth,o||0));if(b.prompt===true){v.setWidth(x-y-z-B)}if(b.progress===true||b.wait===true){n.setSize(x-y-z-B)}if(Ext.isIE&&x==o){x+=4}u.setSize(x,"auto").center();return this},updateProgress:function(y,x,z){n.updateProgress(y,x);if(z){this.updateText(z)}return this},isVisible:function(){return u&&u.isVisible()},hide:function(){var x=u?u.activeGhost:null;if(this.isVisible()||x){u.hide();w();if(x){u.unghost(false,false)}}return this},show:function(A){if(this.isVisible()){this.hide()}b=A;var B=this.getDialog(b.title||"&#160;");B.setTitle(b.title||"&#160;");var x=(b.closable!==false&&b.progress!==true&&b.wait!==true);B.tools.close.setDisplayed(x);v=s;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){s.hide();a.show();a.setHeight(Ext.isNumber(b.multiline)?b.multiline:this.defaultTextHeight);v=a}else{s.show();a.hide()}}else{s.hide();a.hide()}v.dom.value=b.value||"";if(b.prompt){B.focusEl=v}else{var z=b.buttons;var y=null;if(z&&z.ok){y=r.ok}else{if(z&&z.yes){y=r.yes}}if(y){B.focusEl=y}}if(b.iconCls){B.setIconClass(b.iconCls)}this.setIcon(Ext.isDefined(b.icon)?b.icon:i);o=k(b.buttons);n.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.cls){B.el.addClass(b.cls)}B.proxyDrag=b.proxyDrag===true;B.modal=b.modal!==false;B.mask=b.modal!==false?q:false;if(!B.isVisible()){document.body.appendChild(u.el.dom);B.setAnimateTarget(b.animEl);B.on("show",function(){if(x===true){B.keyMap.enable()}else{B.keyMap.disable()}},this,{single:true});B.show(b.animEl)}if(b.wait===true){n.wait(b.waitConfig)}return this},setIcon:function(x){if(!u){i=x;return}i=undefined;if(x&&x!=""){j.removeClass("x-hidden");j.replaceClass(d,x);h.addClass("x-dlg-icon");d=x}else{j.replaceClass(d,"x-hidden");h.removeClass("x-dlg-icon");d=""}return this},progress:function(z,y,x){this.show({title:z,msg:y,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:x});return this},wait:function(z,y,x){this.show({title:y,msg:z,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:x});return this},alert:function(A,z,y,x){this.show({title:A,msg:z,buttons:this.OK,fn:y,scope:x,minWidth:this.minWidth});return this},confirm:function(A,z,y,x){this.show({title:A,msg:z,buttons:this.YESNO,fn:y,scope:x,icon:this.QUESTION,minWidth:this.minWidth});return this},prompt:function(C,B,z,y,x,A){this.show({title:C,msg:B,buttons:this.OKCANCEL,fn:z,minWidth:this.minPromptWidth,scope:y,prompt:true,multiline:x,value:A});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;Ext.dd.PanelProxy=function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)};Ext.dd.PanelProxy.prototype={insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(undefined,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}};Ext.Panel.DD=function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=new Ext.dd.PanelProxy(b,a);Ext.Panel.DD.superclass.constructor.call(this,b.el,a);var c=b.header;if(c){this.setHandleElId(c.id)}(c?c:this.panel.body).setStyle("cursor","move");this.scroll=false};Ext.extend(Ext.Panel.DD,Ext.dd.DragSource,{showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.state.Provider=function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)};Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){delete this.state[a];this.fireEvent("statechange",this,a,null)},set:function(a,b){this.state[a]=b;this.fireEvent("statechange",this,a,b)},decodeValue:function(b){var e=/^(a|n|d|b|s|o)\:(.*)$/;var g=e.exec(unescape(b));if(!g||!g[1]){return}var d=g[1];var a=g[2];switch(d){case"n":return parseFloat(a);case"d":return new Date(Date.parse(a));case"b":return(a=="1");case"a":var c=[];if(a!=""){Ext.each(a.split("^"),function(h){c.push(this.decodeValue(h))},this)}return c;case"o":var c={};if(a!=""){Ext.each(a.split("^"),function(i){var h=i.split("=");c[h[0]]=this.decodeValue(h[1])},this)}return c;default:return a}},encodeValue:function(c){var b;if(typeof c=="number"){b="n:"+c}else{if(typeof c=="boolean"){b="b:"+(c?"1":"0")}else{if(Ext.isDate(c)){b="d:"+c.toGMTString()}else{if(Ext.isArray(c)){var g="";for(var e=0,a=c.length;e<a;e++){g+=this.encodeValue(c[e]);if(e!=a-1){g+="^"}}b="a:"+g}else{if(typeof c=="object"){var g="";for(var d in c){if(typeof c[d]!="function"&&c[d]!==undefined){g+=d+"="+this.encodeValue(c[d])+"^"}}b="o:"+g.substring(0,g.length-1)}else{b="s:"+c}}}}}return escape(b)}});Ext.state.Manager=function(){var a=new Ext.state.Provider();return{setProvider:function(b){a=b},get:function(c,b){return a.get(c,b)},set:function(b,c){a.set(b,c)},clear:function(b){a.clear(b)},getProvider:function(){return a}}}();Ext.state.CookieProvider=function(a){Ext.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Ext.apply(this,a);this.state=this.readCookies()};Ext.extend(Ext.state.CookieProvider,Ext.state.Provider,{set:function(a,b){if(typeof b=="undefined"||b===null){this.clear(a);return}this.setCookie(a,b);Ext.state.CookieProvider.superclass.set.call(this,a,b)},clear:function(a){this.clearCookie(a);Ext.state.CookieProvider.superclass.clear.call(this,a)},readCookies:function(){var d={};var h=document.cookie+";";var b=/\s?(.*?)=(.*?);/g;var g;while((g=b.exec(h))!=null){var a=g[1];var e=g[2];if(a&&a.substring(0,3)=="ys-"){d[a.substr(3)]=this.decodeValue(e)}}return d},setCookie:function(a,b){document.cookie="ys-"+a+"="+this.encodeValue(b)+((this.expires==null)?"":("; expires="+this.expires.toGMTString()))+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"")},clearCookie:function(a){document.cookie="ys-"+a+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"")}});Ext.DataView=Ext.extend(Ext.BoxComponent,{selectedClass:"x-view-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,last:false,initComponent:function(){Ext.DataView.superclass.initComponent.call(this);if(Ext.isString(this.tpl)||Ext.isArray(this.tpl)){this.tpl=new Ext.XTemplate(this.tpl)}this.addEvents("beforeclick","click","mouseenter","mouseleave","containerclick","dblclick","contextmenu","containercontextmenu","selectionchange","beforeselect");this.store=Ext.StoreMgr.lookup(this.store);this.all=new Ext.CompositeElementLite();this.selected=new Ext.CompositeElementLite()},afterRender:function(){Ext.DataView.superclass.afterRender.call(this);this.mon(this.getTemplateTarget(),{click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this});if(this.overClass||this.trackOver){this.mon(this.getTemplateTarget(),{mouseover:this.onMouseOver,mouseout:this.onMouseOut,scope:this})}if(this.store){this.bindStore(this.store,true)}},refresh:function(){this.clearSelections(false,true);var b=this.getTemplateTarget();b.update("");var a=this.store.getRange();if(a.length<1){if(!this.deferEmptyText||this.hasSkippedEmptyText){b.update(this.emptyText)}this.all.clear()}else{this.tpl.overwrite(b,this.collectData(a,0));this.all.fill(Ext.query(this.itemSelector,b.dom));this.updateIndexes(0)}this.hasSkippedEmptyText=true},getTemplateTarget:function(){return this.el},prepareData:function(a){return a},collectData:function(b,e){var d=[];for(var c=0,a=b.length;c<a;c++){d[d.length]=this.prepareData(b[c].data,e+c,b[c])}return d},bufferRender:function(a){var b=document.createElement("div");this.tpl.overwrite(b,this.collectData(a));return Ext.query(this.itemSelector,b)},onUpdate:function(g,a){var b=this.store.indexOf(a);if(b>-1){var e=this.isSelected(b);var c=this.all.elements[b];var d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)}},onAdd:function(g,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),h,b=this.all.elements;if(e<this.all.getCount()){h=this.all.item(e).insertSibling(c,"before",true);b.splice.apply(b,[e,0].concat(c))}else{h=this.all.last().insertSibling(c,"after",true);b.push.apply(b,c)}this.updateIndexes(e)},onRemove:function(c,a,b){this.deselect(b);this.all.removeElement(b,true);this.updateIndexes(b);if(this.store.getCount()===0){this.refresh()}},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(d,c){var b=this.all.elements;d=d||0;c=c||((c===0)?0:(b.length-1));for(var a=d;a<=c;a++){b[a].viewIndex=a}},getStore:function(){return this.store},bindStore:function(a,b){if(!b&&this.store){if(a!==this.store&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("datachanged",this.onDataChanged,this);this.store.un("add",this.onAdd,this);this.store.un("remove",this.onRemove,this);this.store.un("update",this.onUpdate,this);this.store.un("clear",this.refresh,this)}if(!a){this.store=null}}if(a){a=Ext.StoreMgr.lookup(a);a.on({scope:this,beforeload:this.onBeforeLoad,datachanged:this.onDataChanged,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.refresh})}this.store=a;if(a){this.refresh()}},onDataChanged:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemFromChild:function(a){return Ext.fly(a).findParent(this.itemSelector,this.getTemplateTarget())},onClick:function(c){var b=c.getTarget(this.itemSelector,this.getTemplateTarget());if(b){var a=this.indexOf(b);if(this.onItemClick(b,a,c)!==false){this.fireEvent("click",this,a,b,c)}}else{if(this.fireEvent("containerclick",this,c)!==false){this.onContainerClick(c)}}},onContainerClick:function(a){this.clearSelections()},onContextMenu:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a){this.fireEvent("contextmenu",this,this.indexOf(a),a,b)}else{this.fireEvent("containercontextmenu",this,b)}},onDblClick:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a){this.fireEvent("dblclick",this,this.indexOf(a),a,b)}},onMouseOver:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a&&a!==this.lastItem){this.lastItem=a;Ext.fly(a).addClass(this.overClass);this.fireEvent("mouseenter",this,this.indexOf(a),a,b)}},onMouseOut:function(a){if(this.lastItem){if(!a.within(this.lastItem,true,true)){Ext.fly(this.lastItem).removeClass(this.overClass);this.fireEvent("mouseleave",this,this.indexOf(this.lastItem),this.lastItem,a);delete this.lastItem}}},onItemClick:function(b,a,c){if(this.fireEvent("beforeclick",this,a,b,c)===false){return false}if(this.multiSelect){this.doMultiSelection(b,a,c);c.preventDefault()}else{if(this.singleSelect){this.doSingleSelection(b,a,c);c.preventDefault()}}return true},doSingleSelection:function(b,a,c){if(c.ctrlKey&&this.isSelected(a)){this.deselect(a)}else{this.select(a,false)}},doMultiSelection:function(c,a,d){if(d.shiftKey&&this.last!==false){var b=this.last;this.selectRange(b,a,d.ctrlKey);this.last=b}else{if((d.ctrlKey||this.simpleSelect)&&this.isSelected(a)){this.deselect(a)}else{this.select(a,d.ctrlKey||d.shiftKey||this.simpleSelect)}}},getSelectionCount:function(){return this.selected.getCount()},getSelectedNodes:function(){return this.selected.elements},getSelectedIndexes:function(){var b=[],d=this.selected.elements;for(var c=0,a=d.length;c<a;c++){b.push(d[c].viewIndex)}return b},getSelectedRecords:function(){var d=[],c=this.selected.elements;for(var b=0,a=c.length;b<a;b++){d[d.length]=this.store.getAt(c[b].viewIndex)}return d},getRecords:function(b){var e=[],d=b;for(var c=0,a=d.length;c<a;c++){e[e.length]=this.store.getAt(d[c].viewIndex)}return e},getRecord:function(a){return this.store.getAt(a.viewIndex)},clearSelections:function(a,b){if((this.multiSelect||this.singleSelect)&&this.selected.getCount()>0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,g,b){if(Ext.isArray(d)){if(!g){this.clearSelections(true)}for(var c=0,a=d.length;c<a;c++){this.select(d[c],true,true)}if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}else{var e=this.getNode(d);if(!g){this.clearSelections(true)}if(e&&!this.isSelected(e)){if(this.fireEvent("beforeselect",this,e,this.selected.elements)!==false){Ext.fly(e).addClass(this.selectedClass);this.selected.add(e);this.last=e.viewIndex;if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}}}},selectRange:function(c,a,b){if(!b){this.clearSelections(true)}this.select(this.getNodes(c,a),true)},getNode:function(b){if(Ext.isString(b)){return document.getElementById(b)}else{if(Ext.isNumber(b)){return this.all.elements[b]}else{if(b instanceof Ext.data.Record){var a=this.store.indexOf(b);return this.all.elements[a]}}}return b},getNodes:function(e,a){var d=this.all.elements;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;var b=[],c;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+"</div>");this.all.clear()}},onDestroy:function(){this.all.clear();this.selected.clear();Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.list.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:undefined,columnResize:true,columnSort:true,maxWidth:Ext.isIE?99:100,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.list.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.list.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('<div class="x-list-header"><div class="x-list-header-inner">','<tpl for="columns">','<div style="width:{[values.width*100]}%;text-align:{align};"><em unselectable="on" id="',this.id,'-xlhd-{#}">',"{header}","</em></div>","</tpl>",'<div class="x-clear"></div>',"</div></div>",'<div class="x-list-body"><div class="x-list-body-inner">',"</div></div>")}if(!this.tpl){this.tpl=new Ext.XTemplate('<tpl for="rows">',"<dl>",'<tpl for="parent.columns">','<dt style="width:{[values.width*100]}%;text-align:{align};">','<em unselectable="on"<tpl if="cls"> class="{cls}</tpl>">',"{[values.tpl.apply(parent)]}","</em></dt>","</tpl>",'<div class="x-clear"></div>',"</dl>","</tpl>")}var l=this.columns,h=0,k=0,m=l.length,b=[];for(var g=0;g<m;g++){var n=l[g];if(!n.isColumn){n.xtype=n.xtype?(/^lv/.test(n.xtype)?n.xtype:"lv"+n.xtype):"lvcolumn";n=Ext.create(n)}if(n.width){h+=n.width*100;k++}b.push(n)}l=this.columns=b;if(k<m){var d=m-k;if(h<this.maxWidth){var a=((this.maxWidth-h)/d)/100;for(var e=0;e<m;e++){var n=l[e];if(!n.width){n.width=a}}}}Ext.list.ListView.superclass.initComponent.call(this)},onRender:function(){this.autoEl={cls:"x-list-wrap"};Ext.list.ListView.superclass.onRender.apply(this,arguments);this.internalTpl.overwrite(this.el,{columns:this.columns});this.innerBody=Ext.get(this.el.dom.childNodes[1].firstChild);this.innerHd=Ext.get(this.el.dom.firstChild.firstChild);if(this.hideHeaders){this.el.dom.firstChild.style.display="none"}},getTemplateTarget:function(){return this.innerBody},collectData:function(){var a=Ext.list.ListView.superclass.collectData.apply(this,arguments);return{columns:this.columns,rows:a}},verifyInternalSize:function(){if(this.lastSize){this.onResize(this.lastSize.width,this.lastSize.height)}},onResize:function(b,d){var e=this.innerBody.dom;var g=this.innerHd.dom;if(!e){return}var c=e.parentNode;if(Ext.isNumber(b)){var a=b-Ext.num(this.scrollOffset,Ext.getScrollBarWidth());if(this.reserveScrollOffset||((c.offsetWidth-c.clientWidth)>10)){e.style.width=a+"px";g.style.width=a+"px"}else{e.style.width=b+"px";g.style.width=b+"px";setTimeout(function(){if((c.offsetWidth-c.clientWidth)>10){e.style.width=a+"px";g.style.width=a+"px"}},10)}}if(Ext.isNumber(d)){c.style.height=(d-g.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.list.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(e){e=e.dom||e;var a=e.parentNode,d=a.parentNode.childNodes;for(var b=0,g;g=d[b];b++){if(g==a){return b}}return -1},setHdWidths:function(){var c=this.innerHd.dom.getElementsByTagName("div");for(var b=0,d=this.columns,a=d.length;b<a;b++){c[b].style.width=(d[b].width*100)+"%"}}});Ext.reg("listview",Ext.list.ListView);Ext.ListView=Ext.list.ListView;Ext.list.Column=Ext.extend(Object,{isColumn:true,align:"left",header:"",width:null,cls:"",constructor:function(a){if(!a.tpl){a.tpl=new Ext.XTemplate("{"+a.dataIndex+"}")}else{if(Ext.isString(a.tpl)){a.tpl=new Ext.XTemplate(a.tpl)}}Ext.apply(this,a)}});Ext.reg("lvcolumn",Ext.list.Column);Ext.list.NumberColumn=Ext.extend(Ext.list.Column,{format:"0,000.00",constructor:function(a){a.tpl=a.tpl||new Ext.XTemplate("{"+a.dataIndex+':number("'+(a.format||this.format)+'")}');Ext.list.NumberColumn.superclass.constructor.call(this,a)}});Ext.reg("lvnumbercolumn",Ext.list.NumberColumn);Ext.list.DateColumn=Ext.extend(Ext.list.Column,{format:"m/d/Y",constructor:function(a){a.tpl=a.tpl||new Ext.XTemplate("{"+a.dataIndex+':date("'+(a.format||this.format)+'")}');Ext.list.DateColumn.superclass.constructor.call(this,a)}});Ext.reg("lvdatecolumn",Ext.list.DateColumn);Ext.list.BooleanColumn=Ext.extend(Ext.list.Column,{trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(e){e.tpl=e.tpl||new Ext.XTemplate("{"+e.dataIndex+":this.format}");var b=this.trueText,d=this.falseText,a=this.undefinedText;e.tpl.format=function(c){if(c===undefined){return a}if(!c||c==="false"){return d}return b};Ext.list.DateColumn.superclass.constructor.call(this,e)}});Ext.reg("lvbooleancolumn",Ext.list.BooleanColumn);Ext.list.ColumnResizer=Ext.extend(Ext.util.Observable,{minPct:0.05,constructor:function(a){Ext.apply(this,a);Ext.list.ColumnResizer.superclass.constructor.call(this)},init:function(a){this.view=a;a.on("render",this.initEvents,this)},initEvents:function(a){a.mon(a.innerHd,"mousemove",this.handleHdMove,this);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeStart.createDelegate(this),onStart:this.onStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(a.innerHd);a.on("beforedestroy",this.tracker.destroy,this.tracker)},handleHdMove:function(j,g){var b=5,a=j.getPageX(),i=j.getTarget("em",3,true);if(i){var h=i.getRegion(),d=i.dom.style,c=i.dom.parentNode;if(a-h.left<=b&&c!=c.parentNode.firstChild){this.activeHd=Ext.get(c.previousSibling.firstChild);d.cursor=Ext.isWebKit?"e-resize":"col-resize"}else{if(h.right-a<=b&&c!=c.parentNode.lastChild.previousSibling){this.activeHd=i;d.cursor=Ext.isWebKit?"w-resize":"col-resize"}else{delete this.activeHd;d.cursor=""}}}},onBeforeStart:function(a){this.dragHd=this.activeHd;return !!this.dragHd},onStart:function(c){this.view.disableHeaders=true;this.proxy=this.view.el.createChild({cls:"x-list-resizer"});this.proxy.setHeight(this.view.el.getHeight());var a=this.tracker.getXY()[0],b=this.view.innerHd.getWidth();this.hdX=this.dragHd.getX();this.hdIndex=this.view.findHeaderIndex(this.dragHd);this.proxy.setX(this.hdX);this.proxy.setWidth(a-this.hdX);this.minWidth=b*this.minPct;this.maxWidth=b-(this.minWidth*(this.view.columns.length-1-this.hdIndex))},onDrag:function(b){var a=this.tracker.getXY()[0];this.proxy.setWidth((a-this.hdX).constrain(this.minWidth,this.maxWidth))},onEnd:function(m){var k=this.proxy.getWidth();this.proxy.remove();var j=this.hdIndex,o=this.view,h=o.columns,l=h.length,q=this.view.innerHd.getWidth(),g=this.minPct*100,r=Math.ceil((k*o.maxWidth)/q),p=(h[j].width*100)-r,a=Math.floor(p/(l-1-j)),n=p-(a*(l-1-j));for(var d=j+1;d<l;d++){var c=(h[d].width*100)+a,b=Math.max(g,c);if(c!=b){n+=c-b}h[d].width=b/100}h[j].width=r/100;h[j+1].width+=(n/100);delete this.dragHd;o.setHdWidths();o.refresh();setTimeout(function(){o.disableHeaders=false},100)}});Ext.ListView.ColumnResizer=Ext.list.ColumnResizer;Ext.list.Sorter=Ext.extend(Ext.util.Observable,{sortClasses:["sort-asc","sort-desc"],constructor:function(a){Ext.apply(this,a);Ext.list.Sorter.superclass.constructor.call(this)},init:function(a){this.view=a;a.on("render",this.initEvents,this)},initEvents:function(a){a.mon(a.innerHd,"click",this.onHdClick,this);a.innerHd.setStyle("cursor","pointer");a.mon(a.store,"datachanged",this.updateSortState,this);this.updateSortState.defer(10,this,[a.store])},updateSortState:function(c){var g=c.getSortState();if(!g){return}this.sortState=g;var e=this.view.columns,h=-1;for(var d=0,a=e.length;d<a;d++){if(e[d].dataIndex==g.field){h=d;break}}if(h!=-1){var b=g.direction;this.updateSortIcon(h,b)}},updateSortIcon:function(b,a){var d=this.sortClasses;var c=this.view.innerHd.select("em").removeClass(d);c.item(b).addClass(d[a=="DESC"?1:0])},onHdClick:function(c){var b=c.getTarget("em",3);if(b&&!this.view.disableHeaders){var a=this.view.findHeaderIndex(b);this.view.store.sort(this.view.columns[a].dataIndex)}}});Ext.ListView.Sorter=Ext.list.Sorter;Ext.TabPanel=Ext.extend(Ext.Panel,{deferredRender:true,tabWidth:120,minTabWidth:30,resizeTabs:false,enableTabScroll:false,scrollIncrement:0,scrollRepeatInterval:400,scrollDuration:0.35,animScroll:true,tabPosition:"top",baseCls:"x-tab-panel",autoTabs:false,autoTabSelector:"div.x-tab",activeTab:undefined,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:"__",itemCls:"x-tab-item",elements:"body",headerAsText:false,frame:false,hideBorders:true,initComponent:function(){this.frame=false;Ext.TabPanel.superclass.initComponent.call(this);this.addEvents("beforetabchange","tabchange","contextmenu");this.setLayout(new Ext.layout.CardLayout(Ext.apply({layoutOnCardChange:this.layoutOnTabChange,deferredRender:this.deferredRender},this.layoutConfig)));if(this.tabPosition=="top"){this.elements+=",header";this.stripTarget="header"}else{this.elements+=",footer";this.stripTarget="footer"}if(!this.stack){this.stack=Ext.TabPanel.AccessStack()}this.initItems()},onRender:function(c,a){Ext.TabPanel.superclass.onRender.call(this,c,a);if(this.plain){var g=this.tabPosition=="top"?"header":"footer";this[g].addClass("x-tab-panel-"+g+"-plain")}var b=this[this.stripTarget];this.stripWrap=b.createChild({cls:"x-tab-strip-wrap",cn:{tag:"ul",cls:"x-tab-strip x-tab-strip-"+this.tabPosition}});var e=(this.tabPosition=="bottom"?this.stripWrap:null);b.createChild({cls:"x-tab-strip-spacer"},e);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:"li",cls:"x-tab-edge",cn:[{tag:"span",cls:"x-tab-strip-text",cn:"&#160;"}]});this.strip.createChild({cls:"x-clear"});this.body.addClass("x-tab-panel-body-"+this.tabPosition);if(!this.itemTpl){var d=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close"></a>','<a class="x-tab-right" href="#"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>',"</em></a></li>");d.disableFormats=true;d.compile();Ext.TabPanel.prototype.itemTpl=d}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}if(this.activeTab!==undefined){var a=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.mon(this.strip,{scope:this,mousedown:this.onStripMouseDown,contextmenu:this.onStripContextMenu});if(this.enableTabScroll){this.mon(this.strip,"mousewheel",this.onWheel,this)}},findTargets:function(c){var b=null,a=c.getTarget("li:not(.x-tab-edge)",this.strip);if(a){b=this.getComponent(a.id.split(this.idDelimiter)[1]);if(b.disabled){return{close:null,item:null,el:null}}}return{close:c.getTarget(".x-tab-strip-close",this.strip),item:b,el:a}},onStripMouseDown:function(b){if(b.button!==0){return}b.preventDefault();var a=this.findTargets(b);if(a.close){if(a.item.fireEvent("beforeclose",a.item)!==false){a.item.fireEvent("close",a.item);this.remove(a.item)}return}if(a.item&&a.item!=this.activeTab){this.setActiveTab(a.item)}},onStripContextMenu:function(b){b.preventDefault();var a=this.findTargets(b);if(a.item){this.fireEvent("contextmenu",this,a.item,b)}},readTabs:function(d){if(d===true){this.items.each(function(h){this.remove(h)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b<a;b++){var e=c[b],g=e.getAttribute("title");e.removeAttribute("title");this.add({title:g,contentEl:e})}},initTab:function(d,b){var e=this.strip.dom.childNodes[b],g=this.getTemplateArgs(d),c=e?this.itemTpl.insertBefore(e,g):this.itemTpl.append(this.strip,g),a="x-tab-strip-over",h=Ext.get(c);h.hover(function(){if(!d.disabled){h.addClass(a)}},function(){h.removeClass(a)});if(d.tabTip){h.child("span.x-tab-strip-text",true).qtip=d.tabTip}d.tabEl=c;h.select("a").on("click",function(i){if(!i.getPageX()){this.onStripMouseDown(i)}},this,{preventDefault:true});d.on({scope:this,disable:this.onItemDisabled,enable:this.onItemEnabled,titlechange:this.onItemTitleChanged,iconchange:this.onItemIconChanged,beforeshow:this.onBeforeShowItem})},getTemplateArgs:function(b){var a=b.closable?"x-tab-strip-closable":"";if(b.disabled){a+=" x-item-disabled"}if(b.iconCls){a+=" x-tab-with-icon"}if(b.tabCls){a+=" "+b.tabCls}return{id:this.id+this.idDelimiter+b.getItemId(),text:b.title,cls:a,iconCls:b.iconCls||""}},onAdd:function(b){Ext.TabPanel.superclass.onAdd.call(this,b);if(this.rendered){var a=this.items;this.initTab(b,a.indexOf(b));this.delegateUpdates()}},onBeforeAdd:function(b){var a=b.events?(this.items.containsKey(b.getItemId())?b:null):this.items.get(b);if(a){this.setActiveTab(b);return false}Ext.TabPanel.superclass.onBeforeAdd.apply(this,arguments);var c=b.elements;b.elements=c?c.replace(",header",""):c;b.border=(b.border===true)},onRemove:function(d){var b=Ext.get(d.tabEl);if(b){b.select("a").removeAllListeners();Ext.destroy(b)}Ext.TabPanel.superclass.onRemove.call(this,d);this.stack.remove(d);delete d.tabEl;d.un("disable",this.onItemDisabled,this);d.un("enable",this.onItemEnabled,this);d.un("titlechange",this.onItemTitleChanged,this);d.un("iconchange",this.onItemIconChanged,this);d.un("beforeshow",this.onBeforeShowItem,this);if(d==this.activeTab){var a=this.stack.next();if(a){this.setActiveTab(a)}else{if(this.items.getCount()>0){this.setActiveTab(0)}else{this.setActiveTab(null)}}}if(!this.destroying){this.delegateUpdates()}},onBeforeShowItem:function(a){if(a!=this.activeTab){this.setActiveTab(a);return false}},onItemDisabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).addClass("x-item-disabled")}this.stack.remove(b)},onItemEnabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).removeClass("x-item-disabled")}},onItemTitleChanged:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).child("span.x-tab-strip-text",true).innerHTML=b.title}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){b=Ext.get(b);b.child("span.x-tab-strip-text").replaceClass(c,a);b[Ext.isEmpty(a)?"removeClass":"addClass"]("x-tab-with-icon")}},getTabEl:function(a){var b=this.getComponent(a);return b?b.tabEl:null},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=true},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates()},hideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="none";this.delegateUpdates()}this.stack.remove(b)},unhideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="";this.delegateUpdates()}},delegateUpdates:function(){if(this.suspendUpdates){return}if(this.resizeTabs&&this.rendered){this.autoSizeTabs()}if(this.enableTabScroll&&this.rendered){this.autoScrollTabs()}},autoSizeTabs:function(){var h=this.items.length,b=this.tabPosition!="bottom"?"header":"footer",c=this[b].dom.offsetWidth,a=this[b].dom.clientWidth;if(!this.resizeTabs||h<1||!a){return}var k=Math.max(Math.min(Math.floor((a-4)/h)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=k;var m=this.strip.query("li:not(.x-tab-edge)");for(var e=0,j=m.length;e<j;e++){var l=m[e],n=Ext.fly(l).child(".x-tab-strip-inner",true),g=l.offsetWidth,d=n.offsetWidth;n.style.width=(k-(g-d))+"px"}},adjustBodyWidth:function(a){if(this.header){this.header.setWidth(a)}if(this.footer){this.footer.setWidth(a)}return a},setActiveTab:function(c){c=this.getComponent(c);if(this.fireEvent("beforetabchange",this,c,this.activeTab)===false){return}if(!this.rendered){this.activeTab=c;return}if(this.activeTab!=c){if(this.activeTab){var a=this.getTabEl(this.activeTab);if(a){Ext.fly(a).removeClass("x-tab-strip-active")}}this.activeTab=c;if(c){var b=this.getTabEl(c);Ext.fly(b).addClass("x-tab-strip-active");this.stack.add(c);this.layout.setActiveItem(c);if(this.scrolling){this.scrollToTab(c,this.animScroll)}}this.fireEvent("tabchange",this,c)}},getActiveTab:function(){return this.activeTab||null},getItem:function(a){return this.getComponent(a)},autoScrollTabs:function(){this.pos=this.tabPosition=="bottom"?this.footer:this.header;var h=this.items.length,d=this.pos.dom.offsetWidth,c=this.pos.dom.clientWidth,g=this.stripWrap,e=g.dom,b=e.offsetWidth,i=this.getScrollPos(),a=this.edge.getOffsetsTo(this.stripWrap)[0]+i;if(!this.enableTabScroll||h<1||b<20){return}if(a<=c){e.scrollLeft=0;g.setWidth(c);if(this.scrolling){this.scrolling=false;this.pos.removeClass("x-tab-scrolling");this.scrollLeft.hide();this.scrollRight.hide();if(Ext.isAir||Ext.isWebKit){e.style.marginLeft="";e.style.marginRight=""}}}else{if(!this.scrolling){this.pos.addClass("x-tab-scrolling");if(Ext.isAir||Ext.isWebKit){e.style.marginLeft="18px";e.style.marginRight="18px"}}c-=g.getMargins("lr");g.setWidth(c>20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(i>(a-c)){e.scrollLeft=a-c}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var c=this.stripWrap.dom.offsetHeight;var a=this.pos.insertFirst({cls:"x-tab-scroller-left"});a.setHeight(c);a.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=a;var b=this.pos.insertFirst({cls:"x-tab-scroller-right"});b.setHeight(c);b.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=b},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(e,a){if(!e){return}var c=this.getTabEl(e),h=this.getScrollPos(),d=this.getScrollArea(),g=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+h,b=g+c.offsetWidth;if(g<h){this.scrollTo(g,a)}else{if(b>(h+d)){this.scrollTo(b-d,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(g){var h=g.getWheelDelta()*this.wheelIncrement*-1;g.stopEvent();var i=this.getScrollPos(),c=i+h,a=this.getScrollWidth()-this.getScrollArea();var b=Math.max(0,Math.min(a,c));if(b!=i){this.scrollTo(b,false)}},onScrollRight:function(){var a=this.getScrollWidth()-this.getScrollArea(),c=this.getScrollPos(),b=Math.min(a,c+this.getScrollIncrement());if(b!=c){this.scrollTo(b,this.animScroll)}},onScrollLeft:function(){var b=this.getScrollPos(),a=Math.max(0,b-this.getScrollIncrement());if(a!=b){this.scrollTo(a,this.animScroll)}},updateScrollButtons:function(){var a=this.getScrollPos();this.scrollLeft[a===0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[a>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")},beforeDestroy:function(){Ext.destroy(this.leftRepeater,this.rightRepeater);this.deleteMembers("strip","edge","scrollLeft","scrollRight","stripWrap");this.activeTab=null;Ext.TabPanel.superclass.beforeDestroy.apply(this)}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var a=[];return{add:function(b){a.push(b);if(a.length>10){a.shift()}},remove:function(e){var d=[];for(var c=0,b=a.length;c<b;c++){if(a[c]!=e){d.push(a[c])}}a=d},next:function(){return a.pop()}}};Ext.Button=Ext.extend(Ext.BoxComponent,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:"button",menuClassTarget:"tr:nth(2)",clickEvent:"click",handleMouseEvents:true,tooltipType:"qtip",buttonSelector:"button:first-child",scale:"small",iconAlign:"left",arrowAlign:"right",initComponent:function(){Ext.Button.superclass.initComponent.call(this);this.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)}if(Ext.isString(this.toggleGroup)){this.enableToggle=true}},getTemplateArgs:function(){return[this.type,"x-btn-"+this.scale+" x-btn-icon-"+this.scale+"-"+this.iconAlign,this.getMenuClass(),this.cls,this.id]},setButtonClass:function(){if(this.useSetClass){if(!Ext.isEmpty(this.oldCls)){this.el.removeClass([this.oldCls,"x-btn-pressed"])}this.oldCls=(this.iconCls||this.icon)?(this.text?"x-btn-text-icon":"x-btn-icon"):"x-btn-noicon";this.el.addClass([this.oldCls,this.pressed?"x-btn-pressed":null])}},getMenuClass:function(){return this.menu?(this.arrowAlign!="bottom"?"x-btn-arrow":"x-btn-arrow-bottom"):""},onRender:function(c,a){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table id="{4}" cellspacing="0" class="x-btn {3}"><tbody class="{1}">','<tr><td class="x-btn-tl"><i>&#160;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-ml"><i>&#160;</i></td><td class="x-btn-mc"><em class="{2}" unselectable="on"><button type="{0}"></button></em></td><td class="x-btn-mr"><i>&#160;</i></td></tr>','<tr><td class="x-btn-bl"><i>&#160;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&#160;</i></td></tr>',"</tbody></table>");Ext.Button.buttonTemplate.compile()}this.template=Ext.Button.buttonTemplate}var b,d=this.getTemplateArgs();if(a){b=this.template.insertBefore(a,d,true)}else{b=this.template.append(c,d,true)}this.btnEl=b.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});this.initButtonEl(b,this.btnEl);Ext.ButtonToggleMgr.register(this)},initButtonEl:function(b,c){this.el=b;this.setIcon(this.icon);this.setText(this.text);this.setIconClass(this.iconCls);if(Ext.isDefined(this.tabIndex)){c.dom.tabIndex=this.tabIndex}if(this.tooltip){this.setTooltip(this.tooltip,true)}if(this.handleMouseEvents){this.mon(b,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown})}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide})}if(this.repeat){var a=new Ext.util.ClickRepeater(b,Ext.isObject(this.repeat)?this.repeat:{});this.mon(a,"click",this.onClick,this)}this.mon(b,this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.useSetClass=true;this.setButtonClass();this.doc=Ext.getDoc();this.doAutoWidth()},setIconClass:function(a){this.iconCls=a;if(this.el){this.btnEl.dom.className="";this.btnEl.addClass(["x-btn-text",a||""]);this.setButtonClass()}return this},setTooltip:function(b,a){if(this.rendered){if(!a){this.clearTip()}if(Ext.isObject(b)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},b));this.tooltip=b}else{this.btnEl.dom[this.tooltipType]=b}}else{this.tooltip=b}return this},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl)}},beforeDestroy:function(){if(this.rendered){this.clearTip()}if(this.menu&&this.destroyMenu!==false){Ext.destroy(this.menu)}Ext.destroy(this.repeater)},onDestroy:function(){if(this.rendered){this.doc.un("mouseover",this.monitorMouseOver,this);this.doc.un("mouseup",this.onMouseUp,this);delete this.doc;delete this.btnEl;Ext.ButtonToggleMgr.unregister(this)}Ext.Button.superclass.onDestroy.call(this)},doAutoWidth:function(){if(this.autoWidth!==false&&this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var a=this.btnEl;if(a&&a.getWidth()>20){a.clip();a.setWidth(Ext.util.TextMetrics.measure(a,this.text).width+a.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()<this.minWidth){this.el.setWidth(this.minWidth)}}}},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(a){this.text=a;if(this.el){this.btnEl.update(a||"&#160;");this.setButtonClass()}this.doAutoWidth();return this},setIcon:function(a){this.icon=a;if(this.el){this.btnEl.setStyle("background-image",a?"url("+a+")":"");this.setButtonClass()}return this},getText:function(){return this.text},toggle:function(b,a){b=b===undefined?!this.pressed:!!b;if(b!=this.pressed){if(this.rendered){this.el[b?"addClass":"removeClass"]("x-btn-pressed")}this.pressed=b;if(!a){this.fireEvent("toggle",this,b);if(this.toggleHandler){this.toggleHandler.call(this.scope||this,this,b)}}}return this},onDisable:function(){this.onDisableChange(true)},onEnable:function(){this.onDisableChange(false)},onDisableChange:function(a){if(this.el){if(!Ext.isIE6||!this.text){this.el[a?"addClass":"removeClass"](this.disabledClass)}this.el.dom.disabled=a}this.disabled=a},showMenu:function(){if(this.rendered&&this.menu){if(this.tooltip){Ext.QuickTips.getQuickTip().cancelShow(this.btnEl)}if(this.menu.isVisible()){this.menu.hide()}this.menu.ownerCt=this;this.menu.show(this.el,this.menuAlign)}return this},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){return this.menu&&this.menu.ownerCt==this&&this.menu.isVisible()},onClick:function(a){if(a){a.preventDefault()}if(a.button!==0){return}if(!this.disabled){if(this.enableToggle&&(this.allowDepress!==false||!this.pressed)){this.toggle()}if(this.menu&&!this.hasVisibleMenu()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("click",this,a);if(this.handler){this.handler.call(this.scope||this,this,a)}}},isMenuTriggerOver:function(b,a){return this.menu&&!a},isMenuTriggerOut:function(b,a){return this.menu&&!a},onMouseOver:function(b){if(!this.disabled){var a=b.within(this.el,true);if(!a){this.el.addClass("x-btn-over");if(!this.monitoringMouseOver){this.doc.on("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=true}this.fireEvent("mouseover",this,b)}if(this.isMenuTriggerOver(b,a)){this.fireEvent("menutriggerover",this,this.menu,b)}}},monitorMouseOver:function(a){if(a.target!=this.el.dom&&!a.within(this.el)){if(this.monitoringMouseOver){this.doc.un("mouseover",this.monitorMouseOver,this);this.monitoringMouseOver=false}this.onMouseOut(a)}},onMouseOut:function(b){var a=b.within(this.el)&&b.target!=this.el.dom;this.el.removeClass("x-btn-over");this.fireEvent("mouseout",this,b);if(this.isMenuTriggerOut(b,a)){this.fireEvent("menutriggerout",this,this.menu,b)}},focus:function(){this.btnEl.focus()},blur:function(){this.btnEl.blur()},onFocus:function(a){if(!this.disabled){this.el.addClass("x-btn-focus")}},onBlur:function(a){this.el.removeClass("x-btn-focus")},getClickEl:function(b,a){return this.el},onMouseDown:function(a){if(!this.disabled&&a.button===0){this.getClickEl(a).addClass("x-btn-click");this.doc.on("mouseup",this.onMouseUp,this)}},onMouseUp:function(a){if(a.button===0){this.getClickEl(a,true).removeClass("x-btn-click");this.doc.un("mouseup",this.onMouseUp,this)}},onMenuShow:function(a){if(this.menu.ownerCt==this){this.menu.ownerCt=this;this.ignoreNextClick=0;this.el.addClass("x-btn-menu-active");this.fireEvent("menushow",this,this.menu)}},onMenuHide:function(a){if(this.menu.ownerCt==this){this.el.removeClass("x-btn-menu-active");this.ignoreNextClick=this.restoreClick.defer(250,this);this.fireEvent("menuhide",this,this.menu);delete this.menu.ownerCt}},restoreClick:function(){this.ignoreNextClick=0}});Ext.reg("button",Ext.Button);Ext.ButtonToggleMgr=function(){var a={};function b(e,j){if(j){var h=a[e.toggleGroup];for(var d=0,c=h.length;d<c;d++){if(h[d]!=e){h[d].toggle(false)}}}}return{register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){d.remove(c);c.un("toggle",b)}},getPressed:function(h){var e=a[h];if(e){for(var d=0,c=e.length;d<c;d++){if(e[d].pressed===true){return e[d]}}}return null}}}();Ext.SplitButton=Ext.extend(Ext.Button,{arrowSelector:"em",split:true,initComponent:function(){Ext.SplitButton.superclass.initComponent.call(this);this.addEvents("arrowclick")},onRender:function(){Ext.SplitButton.superclass.onRender.apply(this,arguments);if(this.arrowTooltip){this.el.child(this.arrowSelector).dom[this.tooltipType]=this.arrowTooltip}},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},getMenuClass:function(){return"x-btn-split"+(this.arrowAlign=="bottom"?"-bottom":"")},isClickOnArrow:function(c){if(this.arrowAlign!="bottom"){var b=this.el.child("em.x-btn-split");var a=b.getRegion().right-b.getPadding("r");return c.getPageX()>a}else{return c.getPageY()>this.btnEl.getRegion().bottom}},onClick:function(b,a){b.preventDefault();if(!this.disabled){if(this.isClickOnArrow(b)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("arrowclick",this,b);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,b)}}else{if(this.enableToggle){this.toggle()}this.fireEvent("click",this,b);if(this.handler){this.handler.call(this.scope||this,this,b)}}}},isMenuTriggerOver:function(a){return this.menu&&a.target.tagName==this.arrowSelector},isMenuTriggerOut:function(b,a){return this.menu&&b.target.tagName!=this.arrowSelector}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(a){if(a&&this.showText===true){var b="";if(this.prependText){b+=this.prependText}b+=a.text;return b}return undefined},setActiveItem:function(c,a){if(!Ext.isObject(c)){c=this.menu.getComponent(c)}if(c){if(!this.rendered){this.text=this.getItemText(c);this.iconCls=c.iconCls}else{var b=this.getItemText(c);if(b){this.setText(b)}this.setIconClass(c.iconCls)}this.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(this.forceIcon){this.setIconClass(this.forceIcon)}if(!a){this.fireEvent("change",this,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var a=0;Ext.each(this.items,function(c,b){Ext.apply(c,{group:c.group||this.id,itemIndex:b,checkHandler:this.checkHandler,scope:this,checked:c.checked||false});this.menu.items.push(c);if(c.checked){a=b}},this);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this);this.setActiveItem(a,true)},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var a=this.menu;a.render();if(!a.hasLayout){a.doLayout()}var d,b;for(var c=1;c<this.itemCount;c++){d=(this.activeItem.itemIndex+c)%this.itemCount;b=a.items.itemAt(d);if(!b.disabled){b.setChecked(true);break}}}});Ext.reg("cycle",Ext.CycleButton);Ext.Toolbar=function(a){if(Ext.isArray(a)){a={items:a,layout:"toolbar"}}else{a=Ext.apply({layout:"toolbar"},a);if(a.buttons){a.items=a.buttons}}Ext.Toolbar.superclass.constructor.call(this,a)};(function(){var a=Ext.Toolbar;Ext.extend(a,Ext.Container,{defaultType:"button",enableOverflow:false,trackMenus:true,internalDefaults:{removeMode:"container",hideParent:true},toolbarCls:"x-toolbar",initComponent:function(){a.superclass.initComponent.call(this);this.addEvents("overflowchange")},onRender:function(c,b){if(!this.el){if(!this.autoCreate){this.autoCreate={cls:this.toolbarCls+" x-small-editor"}}this.el=c.createChild(Ext.apply({id:this.id},this.autoCreate),b);Ext.Toolbar.superclass.onRender.apply(this,arguments)}},lookupComponent:function(b){if(Ext.isString(b)){if(b=="-"){b=new a.Separator()}else{if(b==" "){b=new a.Spacer()}else{if(b=="->"){b=new a.Fill()}else{b=new a.TextItem(b)}}}this.applyDefaults(b)}else{if(b.isFormField||b.render){b=this.createComponent(b)}else{if(b.tag){b=new a.Item({autoEl:b})}else{if(b.tagName){b=new a.Item({el:b})}else{if(Ext.isObject(b)){b=b.xtype?this.createComponent(b):this.constructButton(b)}}}}}return b},applyDefaults:function(e){if(!Ext.isString(e)){e=Ext.Toolbar.superclass.applyDefaults.call(this,e);var b=this.internalDefaults;if(e.events){Ext.applyIf(e.initialConfig,b);Ext.apply(e,b)}else{Ext.applyIf(e,b)}}return e},addSeparator:function(){return this.add(new a.Separator())},addSpacer:function(){return this.add(new a.Spacer())},addFill:function(){this.add(new a.Fill())},addElement:function(b){return this.addItem(new a.Item({el:b}))},addItem:function(b){return this.add.apply(this,arguments)},addButton:function(c){if(Ext.isArray(c)){var e=[];for(var d=0,b=c.length;d<b;d++){e.push(this.addButton(c[d]))}return e}return this.add(this.constructButton(c))},addText:function(b){return this.addItem(new a.TextItem(b))},addDom:function(b){return this.add(new a.Item({autoEl:b}))},addField:function(b){return this.add(b)},insertButton:function(c,g){if(Ext.isArray(g)){var e=[];for(var d=0,b=g.length;d<b;d++){e.push(this.insertButton(c+d,g[d]))}return e}return Ext.Toolbar.superclass.insert.call(this,c,g)},trackMenu:function(c,b){if(this.trackMenus&&c.menu){var d=b?"mun":"mon";this[d](c,"menutriggerover",this.onButtonTriggerOver,this);this[d](c,"menushow",this.onButtonMenuShow,this);this[d](c,"menuhide",this.onButtonMenuHide,this)}},constructButton:function(d){var c=d.events?d:this.createComponent(d,d.split?"splitbutton":this.defaultType);return c},onAdd:function(b){Ext.Toolbar.superclass.onAdd.call(this);this.trackMenu(b);if(this.disabled){b.disable()}},onRemove:function(b){Ext.Toolbar.superclass.onRemove.call(this);this.trackMenu(b,true)},onDisable:function(){this.items.each(function(b){if(b.disable){b.disable()}})},onEnable:function(){this.items.each(function(b){if(b.enable){b.enable()}})},onButtonTriggerOver:function(b){if(this.activeMenuBtn&&this.activeMenuBtn!=b){this.activeMenuBtn.hideMenu();b.showMenu();this.activeMenuBtn=b}},onButtonMenuShow:function(b){this.activeMenuBtn=b},onButtonMenuHide:function(b){delete this.activeMenuBtn}});Ext.reg("toolbar",Ext.Toolbar);a.Item=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg("tbitem",a.Item);a.Separator=Ext.extend(a.Item,{onRender:function(c,b){this.el=c.createChild({tag:"span",cls:"xtb-sep"},b)}});Ext.reg("tbseparator",a.Separator);a.Spacer=Ext.extend(a.Item,{onRender:function(c,b){this.el=c.createChild({tag:"div",cls:"xtb-spacer",style:this.width?"width:"+this.width+"px":""},b)}});Ext.reg("tbspacer",a.Spacer);a.Fill=Ext.extend(a.Item,{render:Ext.emptyFn,isFill:true});Ext.reg("tbfill",a.Fill);a.TextItem=Ext.extend(a.Item,{constructor:function(b){a.TextItem.superclass.constructor.call(this,Ext.isString(b)?{text:b}:b)},onRender:function(c,b){this.autoEl={cls:"xtb-text",html:this.text||""};a.TextItem.superclass.onRender.call(this,c,b)},setText:function(b){if(this.rendered){this.el.update(b)}else{this.text=b}}});Ext.reg("tbtext",a.TextItem);a.Button=Ext.extend(Ext.Button,{});a.SplitButton=Ext.extend(Ext.SplitButton,{});Ext.reg("tbbutton",a.Button);Ext.reg("tbsplit",a.SplitButton)})();Ext.ButtonGroup=Ext.extend(Ext.Panel,{baseCls:"x-btn-group",layout:"table",defaultType:"button",frame:true,internalDefaults:{removeMode:"container",hideParent:true},initComponent:function(){this.layoutConfig=this.layoutConfig||{};Ext.applyIf(this.layoutConfig,{columns:this.columns});if(!this.title){this.addClass("x-btn-group-notitle")}this.on("afterlayout",this.onAfterLayout,this);Ext.ButtonGroup.superclass.initComponent.call(this)},applyDefaults:function(b){b=Ext.ButtonGroup.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}return b},onAfterLayout:function(){var a=this.body.getFrameWidth("lr")+this.body.dom.firstChild.offsetWidth;this.body.setWidth(a);this.el.setWidth(a+this.getFrameWidth())}});Ext.reg("buttongroup",Ext.ButtonGroup);(function(){var a=Ext.Toolbar;Ext.PagingToolbar=Ext.extend(Ext.Toolbar,{pageSize:20,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",initComponent:function(){var c=[this.first=new a.Button({tooltip:this.firstText,overflowText:this.firstText,iconCls:"x-tbar-page-first",disabled:true,handler:this.moveFirst,scope:this}),this.prev=new a.Button({tooltip:this.prevText,overflowText:this.prevText,iconCls:"x-tbar-page-prev",disabled:true,handler:this.movePrevious,scope:this}),"-",this.beforePageText,this.inputItem=new Ext.form.NumberField({cls:"x-tbar-page-number",allowDecimals:false,allowNegative:false,enableKeyEvents:true,selectOnFocus:true,submitValue:false,listeners:{scope:this,keydown:this.onPagingKeyDown,blur:this.onPagingBlur}}),this.afterTextItem=new a.TextItem({text:String.format(this.afterPageText,1)}),"-",this.next=new a.Button({tooltip:this.nextText,overflowText:this.nextText,iconCls:"x-tbar-page-next",disabled:true,handler:this.moveNext,scope:this}),this.last=new a.Button({tooltip:this.lastText,overflowText:this.lastText,iconCls:"x-tbar-page-last",disabled:true,handler:this.moveLast,scope:this}),"-",this.refresh=new a.Button({tooltip:this.refreshText,overflowText:this.refreshText,iconCls:"x-tbar-loading",handler:this.doRefresh,scope:this})];var b=this.items||this.buttons||[];if(this.prependButtons){this.items=b.concat(c)}else{this.items=c.concat(b)}delete this.buttons;if(this.displayInfo){this.items.push("->");this.items.push(this.displayItem=new a.TextItem({}))}Ext.PagingToolbar.superclass.initComponent.call(this);this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});this.cursor=0;this.bindStore(this.store,true)},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var c=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());this.displayItem.setText(c)}},onLoad:function(b,e,j){if(!this.rendered){this.dsLoaded=[b,e,j];return}var g=this.getParams();this.cursor=(j.params&&j.params[g.start])?j.params[g.start]:0;var i=this.getPageData(),c=i.activePage,h=i.pages;this.afterTextItem.setText(String.format(this.afterPageText,i.pages));this.inputItem.setValue(c);this.first.setDisabled(c==1);this.prev.setDisabled(c==1);this.next.setDisabled(c==h);this.last.setDisabled(c==h);this.refresh.enable();this.updateInfo();this.fireEvent("change",this,i)},getPageData:function(){var b=this.store.getTotalCount();return{total:b,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:b<this.pageSize?1:Math.ceil(b/this.pageSize)}},changePage:function(b){this.doLoad(((b-1)*this.pageSize).constrain(0,this.store.getTotalCount()))},onLoadError:function(){if(!this.rendered){return}this.refresh.enable()},readPage:function(e){var b=this.inputItem.getValue(),c;if(!b||isNaN(c=parseInt(b,10))){this.inputItem.setValue(e.activePage);return false}return c},onPagingFocus:function(){this.inputItem.select()},onPagingBlur:function(b){this.inputItem.setValue(this.getPageData().activePage)},onPagingKeyDown:function(i,h){var c=h.getKey(),j=this.getPageData(),g;if(c==h.RETURN){h.stopEvent();g=this.readPage(j);if(g!==false){g=Math.min(Math.max(1,g),j.pages)-1;this.doLoad(g*this.pageSize)}}else{if(c==h.HOME||c==h.END){h.stopEvent();g=c==h.HOME?1:j.pages;i.setValue(g)}else{if(c==h.UP||c==h.PAGEUP||c==h.DOWN||c==h.PAGEDOWN){h.stopEvent();if((g=this.readPage(j))){var b=h.shiftKey?10:1;if(c==h.DOWN||c==h.PAGEDOWN){b*=-1}g+=b;if(g>=1&g<=j.pages){i.setValue(g)}}}}}},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(d){var c={},b=this.getParams();c[b.start]=d;c[b.limit]=this.pageSize;if(this.fireEvent("beforechange",this,c)!==false){this.store.load({params:c})}},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var c=this.store.getTotalCount(),b=c%this.pageSize;this.doLoad(b?(c-b):c-this.pageSize)},doRefresh:function(){this.doLoad(this.cursor)},bindStore:function(c,d){var b;if(!d&&this.store){if(c!==this.store&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.beforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this)}if(!c){this.store=null}}if(c){c=Ext.StoreMgr.lookup(c);c.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});b=true}this.store=c;if(b){this.onLoad(c,null,{})}},unbind:function(b){this.bindStore(null)},bind:function(b){this.bindStore(b)},onDestroy:function(){this.bindStore(null);Ext.PagingToolbar.superclass.onDestroy.call(this)}})})();Ext.reg("paging",Ext.PagingToolbar);Ext.History=(function(){var e,c;var k=false;var d;function g(){var l=top.location.href,m=l.indexOf("#");return m>=0?l.substr(m+1):null}function a(){c.value=d}function h(l){d=l;Ext.History.fireEvent("change",l)}function i(m){var l=['<html><body><div id="state">',Ext.util.Format.htmlEncode(m),"</div></body></html>"].join("");try{var o=e.contentWindow.document;o.open();o.write(l);o.close();return true}catch(n){return false}}function b(){if(!e.contentWindow||!e.contentWindow.document){setTimeout(b,10);return}var o=e.contentWindow.document;var m=o.getElementById("state");var l=m?m.innerText:null;var n=g();setInterval(function(){o=e.contentWindow.document;m=o.getElementById("state");var q=m?m.innerText:null;var p=g();if(q!==l){l=q;h(l);top.location.hash=l;n=l;a()}else{if(p!==n){n=p;i(p)}}},50);k=true;Ext.History.fireEvent("ready",Ext.History)}function j(){d=c.value?c.value:g();if(Ext.isIE){b()}else{var l=g();setInterval(function(){var m=g();if(m!==l){l=m;h(l);a()}},50);k=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(m,l){if(k){Ext.callback(m,l,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(m,l)});return}c=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){e=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(m){this.on("ready",m,l,{single:true})}j()},add:function(l,m){if(m!==false){if(this.getToken()==l){return true}}if(Ext.isIE){return i(l)}else{top.location.hash=l;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return k?d:g()}}})();Ext.apply(Ext.History,new Ext.util.Observable());Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,closeAction:"hide",initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header"}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this[this.closeAction],scope:this})}},showAt:function(a){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth()}if(this.constrainPosition){a=this.el.adjustForConstraints(a)}this.setPagePosition(a[0],a[1])},doAutoWidth:function(a){a=a||0;var b=this.body.getTextWidth();if(this.title){b=Math.max(b,this.header.child("span").getTextWidth(this.title))}b+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr")+a;this.setWidth(b.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}},showBy:function(a,b){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});Ext.reg("tip",Ext.Tip);Ext.Tip.DD=function(b,a){Ext.apply(this,a);this.tip=b;Ext.Tip.DD.superclass.constructor.call(this,b.el.id,"WindowDD-"+b.id);this.setHandleElId(b.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(a){this.tip.el.enableShadow(true)}});Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,constrainPosition:false,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget(this.target);this.origAnchor=this.anchor},onRender:function(b,a){Ext.ToolTip.superclass.onRender.call(this,b,a);this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this);this.anchorEl.setStyle("z-index",this.el.getZIndex()+1)},initTarget:function(c){var a;if((a=Ext.get(c))){if(this.target){var b=Ext.get(this.target);this.mun(b,"mouseover",this.onTargetOver,this);this.mun(b,"mouseout",this.onTargetOut,this);this.mun(b,"mousemove",this.onMouseMove,this)}this.mon(a,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this});this.target=a}if(this.anchor){this.anchorTarget=this.target}},onMouseMove:function(b){var a=this.delegate?b.getTarget(this.delegate):this.triggerElement=true;if(a){this.targetXY=b.getXY();if(a===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(b)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},getTargetXY:function(){if(this.delegate){this.anchorTarget=this.triggerElement}if(this.anchor){this.targetCounter++;var c=this.getOffsets(),l=(this.anchorToTarget&&!this.trackMouse)?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY,a=Ext.lib.Dom.getViewWidth()-5,h=Ext.lib.Dom.getViewHeight()-5,i=document.documentElement,e=document.body,k=(i.scrollLeft||e.scrollLeft||0)+5,j=(i.scrollTop||e.scrollTop||0)+5,b=[l[0]+c[0],l[1]+c[1]],g=this.getSize();this.anchorEl.removeClass(this.anchorCls);if(this.targetCounter<2){if(b[0]<k){if(this.anchorToTarget){this.defaultAlign="l-r";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="left";return this.getTargetXY()}if(b[0]+g.width>a){if(this.anchorToTarget){this.defaultAlign="r-l";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="right";return this.getTargetXY()}if(b[1]<j){if(this.anchorToTarget){this.defaultAlign="t-b";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="top";return this.getTargetXY()}if(b[1]+g.height>h){if(this.anchorToTarget){this.defaultAlign="b-t";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="bottom";return this.getTargetXY()}}this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl.addClass(this.anchorCls);this.targetCounter=0;return b}else{var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]}},getMouseOffset:function(){var a=this.anchor?[0,0]:[15,18];if(this.mouseOffset){a[0]+=this.mouseOffset[0];a[1]+=this.mouseOffset[1]}return a},getAnchorPosition:function(){if(this.anchor){this.tipAnchor=this.anchor.charAt(0)}else{var a=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!a){throw"AnchorTip.defaultAlign is invalid"}this.tipAnchor=a[1].charAt(0)}switch(this.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var b,a=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-this.anchorOffset,30];break;case"b":b=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":b=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:b=[25,-13-this.anchorOffset];break}}var c=this.getMouseOffset();b[0]+=c[0];b[1]+=c[1];return b},onTargetOver:function(b){if(this.disabled||b.within(this.target.dom,true)){return}var a=b.getTarget(this.delegate);if(a){this.triggerElement=a;this.clearTimer("hide");this.targetXY=b.getXY();this.delayShow()}},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()<this.quickShowInterval){this.show()}else{this.showTimer=this.show.defer(this.showDelay,this)}}else{if(!this.hidden&&this.autoHide!==false){this.show()}}},onTargetOut:function(a){if(this.disabled||a.within(this.target.dom,true)){return}this.clearTimer("show");if(this.autoHide!==false){this.delayHide()}},delayHide:function(){if(!this.hidden&&!this.hideTimer){this.hideTimer=this.hide.defer(this.hideDelay,this)}},hide:function(){this.clearTimer("dismiss");this.lastActive=new Date();if(this.anchorEl){this.anchorEl.hide()}Ext.ToolTip.superclass.hide.call(this);delete this.triggerElement},show:function(){if(this.anchor){this.showAt([-1000,-1000]);this.origConstrainPosition=this.constrainPosition;this.constrainPosition=false;this.anchor=this.origAnchor}this.showAt(this.getTargetXY());if(this.anchor){this.syncAnchor();this.anchorEl.show();this.constrainPosition=this.origConstrainPosition}else{this.anchorEl.hide()}},showAt:function(a){this.lastActive=new Date();this.clearTimers();Ext.ToolTip.superclass.showAt.call(this,a);if(this.dismissDelay&&this.autoHide!==false){this.dismissTimer=this.hide.defer(this.dismissDelay,this)}if(this.anchor&&!this.anchorEl.isVisible()){this.syncAnchor();this.anchorEl.show()}},syncAnchor:function(){var a,b,c;switch(this.tipAnchor.charAt(0)){case"t":a="b";b="tl";c=[20+this.anchorOffset,2];break;case"r":a="l";b="tr";c=[-2,11+this.anchorOffset];break;case"b":a="t";b="bl";c=[20+this.anchorOffset,-2];break;default:a="r";b="tl";c=[2,11+this.anchorOffset];break}this.anchorEl.alignTo(this.el,a+"-"+b,c)},setPagePosition:function(a,b){Ext.ToolTip.superclass.setPagePosition.call(this,a,b);if(this.anchor){this.syncAnchor()}},clearTimer:function(a){a=a+"Timer";clearTimeout(this[a]);delete this[a]},clearTimers:function(){this.clearTimer("show");this.clearTimer("dismiss");this.clearTimer("hide")},onShow:function(){Ext.ToolTip.superclass.onShow.call(this);Ext.getDoc().on("mousedown",this.onDocMouseDown,this)},onHide:function(){Ext.ToolTip.superclass.onHide.call(this);Ext.getDoc().un("mousedown",this.onDocMouseDown,this)},onDocMouseDown:function(a){if(this.autoHide!==true&&!this.closable&&!a.within(this.el.dom)){this.disable();this.doEnable.defer(100,this)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.clearTimers();this.hide()},adjustPosition:function(a,d){if(this.contstrainPosition){var c=this.targetXY[1],b=this.getSize().height;if(d<=c&&(d+b)>=c){d=c-b-5}}return{x:a,y:d}},beforeDestroy:function(){this.clearTimers();Ext.destroy(this.anchorEl);delete this.anchorEl;delete this.target;delete this.anchorTarget;delete this.triggerElement;Ext.ToolTip.superclass.beforeDestroy.call(this)},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);Ext.ToolTip.superclass.onDestroy.call(this)}});Ext.reg("tooltip",Ext.ToolTip);Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(e){var h=Ext.isArray(e)?e:arguments;for(var g=0,a=h.length;g<a;g++){var l=h[g];var k=l.target;if(k){if(Ext.isArray(k)){for(var d=0,b=k.length;d<b;d++){this.targets[Ext.id(k[d])]=l}}else{this.targets[Ext.id(k)]=l}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(b){var a=this.activeTarget;b=Ext.get(b).dom;if(this.isVisible()){if(a&&a.el==b){this.hide()}}else{if(a&&a.el==b){this.clearTimer("show")}}},getTipCfg:function(d){var b=d.getTarget(),c,a;if(this.interceptTitles&&b.title&&Ext.isString(b.title)){c=b.title;b.qtip=c;b.removeAttribute("title");d.preventDefault()}else{a=this.tagConfig;c=b.qtip||Ext.fly(b).getAttribute(a.attribute,a.namespace)}return c},onTargetOver:function(i){if(this.disabled){return}this.targetXY=i.getXY();var c=i.getTarget();if(!c||c.nodeType!==1||c==document||c==document.body){return}if(this.activeTarget&&((c==this.activeTarget.el)||Ext.fly(this.activeTarget.el).contains(c))){this.clearTimer("hide");this.show();return}if(c&&this.targets[c.id]){this.activeTarget=this.targets[c.id];this.activeTarget.el=c;this.anchor=this.activeTarget.anchor;if(this.anchor){this.anchorTarget=c}this.delayShow();return}var g,h=Ext.fly(c),b=this.tagConfig,d=b.namespace;if(g=this.getTipCfg(i)){var a=h.getAttribute(b.hide,d);this.activeTarget={el:c,text:g,width:h.getAttribute(b.width,d),autoHide:a!="user"&&a!=="false",title:h.getAttribute(b.title,d),cls:h.getAttribute(b.cls,d),align:h.getAttribute(b.align,d)};this.anchor=h.getAttribute(b.anchor,d);if(this.anchor){this.anchorTarget=c}this.delayShow()}},onTargetOut:function(a){if(this.activeTarget&&a.within(this.activeTarget.el)&&!this.getTipCfg(a)){return}this.clearTimer("show");if(this.autoHide!==false){this.delayHide()}},showAt:function(b){var a=this.activeTarget;if(a){if(!this.rendered){this.render(Ext.getBody());this.activeTarget=a}if(a.width){this.setWidth(a.width);this.body.setWidth(this.adjustBodyWidth(a.width-this.getFrameWidth()));this.measureWidth=false}else{this.measureWidth=true}this.setTitle(a.title||"");this.body.update(a.text);this.autoHide=a.autoHide;this.dismissDelay=a.dismissDelay||this.dismissDelay;if(this.lastCls){this.el.removeClass(this.lastCls);delete this.lastCls}if(a.cls){this.el.addClass(a.cls);this.lastCls=a.cls}if(this.anchor){this.constrainPosition=false}else{if(a.align){b=this.el.getAlignToXY(a.el,a.align);this.constrainPosition=false}else{this.constrainPosition=true}}}Ext.QuickTip.superclass.showAt.call(this,b)},hide:function(){delete this.activeTarget;Ext.QuickTip.superclass.hide.call(this)}});Ext.reg("quicktip",Ext.QuickTip);Ext.QuickTips=function(){var b,a=[];return{init:function(c){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.QuickTips.init(c)});return}b=new Ext.QuickTip({elements:"header,body"});if(c!==false){b.render(Ext.getBody())}}},enable:function(){if(b){a.pop();if(a.length<1){b.enable()}}},disable:function(){if(b){b.disable()}a.push(1)},isEnabled:function(){return b!==undefined&&!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}();Ext.slider.Tip=Ext.extend(Ext.Tip,{minWidth:10,offsets:[0,-10],init:function(a){a.on({scope:this,dragstart:this.onSlide,drag:this.onSlide,dragend:this.hide,destroy:this.destroy})},onSlide:function(b,c,a){this.show();this.body.update(this.getText(a));this.doAutoWidth();this.el.alignTo(a.el,"b-t?",this.offsets)},getText:function(a){return String(a.value)}});Ext.ux.SliderTip=Ext.slider.Tip;Ext.tree.TreePanel=Ext.extend(Ext.Panel,{rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,pathSeparator:"/",bubbleEvents:[],initComponent:function(){Ext.tree.TreePanel.superclass.initComponent.call(this);if(!this.eventModel){this.eventModel=new Ext.tree.TreeEventModel(this)}var a=this.loader;if(!a){a=new Ext.tree.TreeLoader({dataUrl:this.dataUrl,requestMethod:this.requestMethod})}else{if(Ext.isObject(a)&&!a.load){a=new Ext.tree.TreeLoader(a)}}this.loader=a;this.nodeHash={};if(this.root){var b=this.root;delete this.root;this.setRootNode(b)}this.addEvents("append","remove","movenode","insert","beforeappend","beforeremove","beforemovenode","beforeinsert","beforeload","load","textchange","beforeexpandnode","beforecollapsenode","expandnode","disabledchange","collapsenode","beforeclick","click","containerclick","checkchange","beforedblclick","dblclick","containerdblclick","contextmenu","containercontextmenu","beforechildrenrendered","startdrag","enddrag","dragdrop","beforenodedrop","nodedrop","nodedragover");if(this.singleExpand){this.on("beforeexpandnode",this.restrictExpand,this)}},proxyNodeEvent:function(c,b,a,h,g,e,d){if(c=="collapse"||c=="expand"||c=="beforecollapse"||c=="beforeexpand"||c=="move"||c=="beforemove"){c=c+"node"}return this.fireEvent(c,b,a,h,g,e,d)},getRootNode:function(){return this.root},setRootNode:function(b){this.destroyRoot();if(!b.render){b=this.loader.createNode(b)}this.root=b;b.ownerTree=this;b.isRoot=true;this.registerNode(b);if(!this.rootVisible){var a=b.attributes.uiProvider;b.ui=a?new a(b):new Ext.tree.RootTreeNodeUI(b)}if(this.innerCt){this.clearInnerCt();this.renderRoot()}return b},clearInnerCt:function(){this.innerCt.update("")},renderRoot:function(){this.root.render();if(!this.rootVisible){this.root.renderChildren()}},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(a){this.nodeHash[a.id]=a},unregisterNode:function(a){delete this.nodeHash[a.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"},restrictExpand:function(a){var b=a.parentNode;if(b){if(b.expandedChild&&b.expandedChild.parentNode==b){b.expandedChild.collapse()}b.expandedChild=a}},getChecked:function(b,c){c=c||this.root;var d=[];var e=function(){if(this.attributes.checked){d.push(!b?this:(b=="id"?this.id:this.attributes[b]))}};c.cascade(e);return d},getLoader:function(){return this.loader},expandAll:function(){this.root.expand(true)},collapseAll:function(){this.root.collapse(true)},getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.tree.DefaultSelectionModel()}return this.selModel},expandPath:function(g,a,h){a=a||"id";var d=g.split(this.pathSeparator);var c=this.root;if(c.attributes[a]!=d[1]){if(h){h(false,null)}return}var b=1;var e=function(){if(++b==d.length){if(h){h(true,c)}return}var i=c.findChild(a,d[b]);if(!i){if(h){h(false,c)}return}c=i;i.expand(false,false,e)};c.expand(false,false,e)},selectPath:function(e,a,g){a=a||"id";var c=e.split(this.pathSeparator),b=c.pop();if(c.length>1){var d=function(i,h){if(i&&h){var j=h.findChild(a,b);if(j){j.select();if(g){g(true,j)}}else{if(g){g(false,j)}}}else{if(g){g(false,j)}}};this.expandPath(c.join(this.pathSeparator),a,d)}else{this.root.select();if(g){g(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(b,a){Ext.tree.TreePanel.superclass.onRender.call(this,b,a);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.renderRoot()},beforeDestroy:function(){if(this.rendered){Ext.dd.ScrollManager.unregister(this.body);Ext.destroy(this.dropZone,this.dragZone)}this.destroyRoot();Ext.destroy(this.loader);this.nodeHash=this.root=this.loader=null;Ext.tree.TreePanel.superclass.beforeDestroy.call(this)},destroyRoot:function(){if(this.root&&this.root.destroy){this.root.destroy(true)}}});Ext.tree.TreePanel.nodeTypes={};Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(a){this.tree=a;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var a=this.tree;if(a.trackMouseOver!==false){a.mon(a.innerCt,{scope:this,mouseover:this.delegateOver,mouseout:this.delegateOut})}a.mon(a.getTreeEl(),{scope:this,click:this.delegateClick,dblclick:this.delegateDblClick,contextmenu:this.delegateContextMenu})},getNode:function(b){var a;if(a=b.getTarget(".x-tree-node-el",10)){var c=Ext.fly(a,"_treeEvents").getAttribute("tree-node-id","ext");if(c){return this.tree.getNodeById(c)}}return null},getNodeTarget:function(b){var a=b.getTarget(".x-tree-node-icon",1);if(!a){a=b.getTarget(".x-tree-node-el",6)}return a},delegateOut:function(b,a){if(!this.beforeEvent(b)){return}if(b.getTarget(".x-tree-ec-icon",1)){var c=this.getNode(b);this.onIconOut(b,c);if(c==this.lastEcOver){delete this.lastEcOver}}if((a=this.getNodeTarget(b))&&!b.within(a,true)){this.onNodeOut(b,this.getNode(b))}},delegateOver:function(b,a){if(!this.beforeEvent(b)){return}if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on("mouseover",this.trackExit,this);this.trackingDoc=true}if(this.lastEcOver){this.onIconOut(b,this.lastEcOver);delete this.lastEcOver}if(b.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(b);this.onIconOver(b,this.lastEcOver)}if(a=this.getNodeTarget(b)){this.onNodeOver(b,this.getNode(b))}},trackExit:function(a){if(this.lastOverNode){if(this.lastOverNode.ui&&!a.within(this.lastOverNode.ui.getEl())){this.onNodeOut(a,this.lastOverNode)}delete this.lastOverNode;Ext.getBody().un("mouseover",this.trackExit,this);this.trackingDoc=false}},delegateClick:function(b,a){if(this.beforeEvent(b)){if(b.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(b,this.getNode(b))}else{if(b.getTarget(".x-tree-ec-icon",1)){this.onIconClick(b,this.getNode(b))}else{if(this.getNodeTarget(b)){this.onNodeClick(b,this.getNode(b))}}}}else{this.checkContainerEvent(b,"click")}},delegateDblClick:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeDblClick(b,this.getNode(b))}}else{this.checkContainerEvent(b,"dblclick")}},delegateContextMenu:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeContextMenu(b,this.getNode(b))}}else{this.checkContainerEvent(b,"contextmenu")}},checkContainerEvent:function(b,a){if(this.disabled){b.stopEvent();return false}this.onContainerEvent(b,a)},onContainerEvent:function(b,a){this.tree.fireEvent("container"+a,this.tree,b)},onNodeClick:function(b,a){a.ui.onClick(b)},onNodeOver:function(b,a){this.lastOverNode=a;a.ui.onOver(b)},onNodeOut:function(b,a){a.ui.onOut(b)},onIconOver:function(b,a){a.ui.addClass("x-tree-ec-over")},onIconOut:function(b,a){a.ui.removeClass("x-tree-ec-over")},onIconClick:function(b,a){a.ui.ecClick(b)},onCheckboxClick:function(b,a){a.ui.onCheckChange(b)},onNodeDblClick:function(b,a){a.ui.onDblClick(b)},onNodeContextMenu:function(b,a){a.ui.onContextMenu(b)},beforeEvent:function(b){var a=this.getNode(b);if(this.disabled||!a||!a.ui){b.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,a);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){this.select(a)},select:function(c,a){if(!Ext.fly(c.ui.wrap).isVisible()&&a){return a.call(this,c)}var b=this.selNode;if(c==b){c.ui.onSelectedChange(true)}else{if(this.fireEvent("beforeselect",this,c,b)!==false){if(b&&b.ui){b.ui.onSelectedChange(false)}this.selNode=c;c.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,c,b)}}return c},unselect:function(b,a){if(this.selNode==b){this.clearSelections(a)}},clearSelections:function(a){var b=this.selNode;if(b){b.ui.onSelectedChange(false);this.selNode=null;if(a!==true){this.fireEvent("selectionchange",this,null)}}return b},getSelectedNode:function(){return this.selNode},isSelected:function(a){return this.selNode==a},selectPrevious:function(a){if(!(a=a||this.selNode||this.lastSelNode)){return null}var c=a.previousSibling;if(c){if(!c.isExpanded()||c.childNodes.length<1){return this.select(c,this.selectPrevious)}else{var b=c.lastChild;while(b&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()&&b.childNodes.length>0){b=b.lastChild}return this.select(b,this.selectPrevious)}}else{if(a.parentNode&&(this.tree.rootVisible||!a.parentNode.isRoot)){return this.select(a.parentNode,this.selectPrevious)}}return null},selectNext:function(b){if(!(b=b||this.selNode||this.lastSelNode)){return null}if(b.firstChild&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()){return this.select(b.firstChild,this.selectNext)}else{if(b.nextSibling){return this.select(b.nextSibling,this.selectNext)}else{if(b.parentNode){var a=null;b.parentNode.bubble(function(){if(this.nextSibling){a=this.getOwnerTree().selModel.select(this.nextSibling,this.selectNext);return false}});return a}}}return null},onKeyDown:function(c){var b=this.selNode||this.lastSelNode;var d=this;if(!b){return}var a=c.getKey();switch(a){case c.DOWN:c.stopEvent();this.selectNext();break;case c.UP:c.stopEvent();this.selectPrevious();break;case c.RIGHT:c.preventDefault();if(b.hasChildNodes()){if(!b.isExpanded()){b.expand()}else{if(b.firstChild){this.select(b.firstChild,c)}}}break;case c.LEFT:c.preventDefault();if(b.hasChildNodes()&&b.isExpanded()){b.collapse()}else{if(b.parentNode&&(this.tree.rootVisible||b.parentNode!=this.tree.getRootNode())){this.select(b.parentNode,c)}}break}}});Ext.tree.MultiSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,a);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){if(b.ctrlKey&&this.isSelected(a)){this.unselect(a)}else{this.select(a,b,b.ctrlKey)}},select:function(a,c,b){if(b!==true){this.clearSelections(true)}if(this.isSelected(a)){this.lastSelNode=a;return a}this.selNodes.push(a);this.selMap[a.id]=a;this.lastSelNode=a;a.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return a},unselect:function(b){if(this.selMap[b.id]){b.ui.onSelectedChange(false);var c=this.selNodes;var a=c.indexOf(b);if(a!=-1){this.selNodes.splice(a,1)}delete this.selMap[b.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(b){var d=this.selNodes;if(d.length>0){for(var c=0,a=d.length;c<a;c++){d[c].ui.onSelectedChange(false)}this.selNodes=[];this.selMap={};if(b!==true){this.fireEvent("selectionchange",this,this.selNodes)}}},isSelected:function(a){return this.selMap[a.id]?true:false},getSelectedNodes:function(){return this.selNodes.concat([])},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});Ext.data.Tree=function(a){this.nodeHash={};this.root=null;if(a){this.setRootNode(a)}this.addEvents("append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert");Ext.data.Tree.superclass.constructor.call(this)};Ext.extend(Ext.data.Tree,Ext.util.Observable,{pathSeparator:"/",proxyNodeEvent:function(){return this.fireEvent.apply(this,arguments)},getRootNode:function(){return this.root},setRootNode:function(a){this.root=a;a.ownerTree=this;a.isRoot=true;this.registerNode(a);return a},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(a){this.nodeHash[a.id]=a},unregisterNode:function(a){delete this.nodeHash[a.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"}});Ext.data.Node=function(a){this.attributes=a||{};this.leaf=this.attributes.leaf;this.id=this.attributes.id;if(!this.id){this.id=Ext.id(null,"xnode-");this.attributes.id=this.id}this.childNodes=[];if(!this.childNodes.indexOf){this.childNodes.indexOf=function(d){for(var c=0,b=this.length;c<b;c++){if(this[c]==d){return c}}return -1}}this.parentNode=null;this.firstChild=null;this.lastChild=null;this.previousSibling=null;this.nextSibling=null;this.addEvents({append:true,remove:true,move:true,insert:true,beforeappend:true,beforeremove:true,beforemove:true,beforeinsert:true});this.listeners=this.attributes.listeners;Ext.data.Node.superclass.constructor.call(this)};Ext.extend(Ext.data.Node,Ext.util.Observable,{fireEvent:function(b){if(Ext.data.Node.superclass.fireEvent.apply(this,arguments)===false){return false}var a=this.getOwnerTree();if(a){if(a.proxyNodeEvent.apply(a,arguments)===false){return false}}return true},isLeaf:function(){return this.leaf===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},isLast:function(){return(!this.parentNode?true:this.parentNode.lastChild==this)},isFirst:function(){return(!this.parentNode?true:this.parentNode.firstChild==this)},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(e){var g=false;if(Ext.isArray(e)){g=e}else{if(arguments.length>1){g=arguments}}if(g){for(var d=0,a=g.length;d<a;d++){this.appendChild(g[d])}}else{if(this.fireEvent("beforeappend",this.ownerTree,this,e)===false){return false}var b=this.childNodes.length;var c=e.parentNode;if(c){if(e.fireEvent("beforemove",e.getOwnerTree(),e,c,this,b)===false){return false}c.removeChild(e)}b=this.childNodes.length;if(b===0){this.setFirstChild(e)}this.childNodes.push(e);e.parentNode=this;var h=this.childNodes[b-1];if(h){e.previousSibling=h;h.nextSibling=e}else{e.previousSibling=null}e.nextSibling=null;this.setLastChild(e);e.setOwnerTree(this.getOwnerTree());this.fireEvent("append",this.ownerTree,this,e,b);if(c){e.fireEvent("move",this.ownerTree,e,c,this,b)}return e}},removeChild:function(c,b){var a=this.childNodes.indexOf(c);if(a==-1){return false}if(this.fireEvent("beforeremove",this.ownerTree,this,c)===false){return false}this.childNodes.splice(a,1);if(c.previousSibling){c.previousSibling.nextSibling=c.nextSibling}if(c.nextSibling){c.nextSibling.previousSibling=c.previousSibling}if(this.firstChild==c){this.setFirstChild(c.nextSibling)}if(this.lastChild==c){this.setLastChild(c.previousSibling)}this.fireEvent("remove",this.ownerTree,this,c);if(b){c.destroy(true)}else{c.clear()}return c},clear:function(a){this.setOwnerTree(null,a);this.parentNode=this.previousSibling=this.nextSibling=null;if(a){this.firstChild=this.lastChild=null}},destroy:function(a){if(a===true){this.purgeListeners();this.clear(true);Ext.each(this.childNodes,function(b){b.destroy(true)});this.childNodes=null}else{this.remove(true)}},insertBefore:function(d,a){if(!a){return this.appendChild(d)}if(d==a){return false}if(this.fireEvent("beforeinsert",this.ownerTree,this,d,a)===false){return false}var b=this.childNodes.indexOf(a);var c=d.parentNode;var e=b;if(c==this&&this.childNodes.indexOf(d)<b){e--}if(c){if(d.fireEvent("beforemove",d.getOwnerTree(),d,c,this,b,a)===false){return false}c.removeChild(d)}if(e===0){this.setFirstChild(d)}this.childNodes.splice(e,0,d);d.parentNode=this;var g=this.childNodes[e-1];if(g){d.previousSibling=g;g.nextSibling=d}else{d.previousSibling=null}d.nextSibling=a;a.previousSibling=d;d.setOwnerTree(this.getOwnerTree());this.fireEvent("insert",this.ownerTree,this,d,a);if(c){d.fireEvent("move",this.ownerTree,d,c,this,e,a)}return d},remove:function(a){if(this.parentNode){this.parentNode.removeChild(this,a)}return this},removeAll:function(a){var c=this.childNodes,b;while((b=c[0])){this.removeChild(b,a)}return this},item:function(a){return this.childNodes[a]},replaceChild:function(a,c){var b=c?c.nextSibling:null;this.removeChild(c);this.insertBefore(a,b);return c},indexOf:function(a){return this.childNodes.indexOf(a)},getOwnerTree:function(){if(!this.ownerTree){var a=this;while(a){if(a.ownerTree){this.ownerTree=a.ownerTree;break}a=a.parentNode}}return this.ownerTree},getDepth:function(){var b=0;var a=this;while(a.parentNode){++b;a=a.parentNode}return b},setOwnerTree:function(a,b){if(a!=this.ownerTree){if(this.ownerTree){this.ownerTree.unregisterNode(this)}this.ownerTree=a;if(b!==true){Ext.each(this.childNodes,function(c){c.setOwnerTree(a)})}if(a){a.registerNode(this)}}},setId:function(b){if(b!==this.id){var a=this.ownerTree;if(a){a.unregisterNode(this)}this.id=this.attributes.id=b;if(a){a.registerNode(this)}this.onIdChange(b)}},onIdChange:Ext.emptyFn,getPath:function(c){c=c||"id";var e=this.parentNode;var a=[this.attributes[c]];while(e){a.unshift(e.attributes[c]);e=e.parentNode}var d=this.getOwnerTree().pathSeparator;return d+a.join(d)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascade:function(g,e,b){if(g.apply(e||this,b||[this])!==false){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].cascade(g,e,b)}}},eachChild:function(g,e,b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){if(g.apply(e||this,b||[d[c]])===false){break}}},findChild:function(b,c,a){return this.findChildBy(function(){return this.attributes[b]==c},null,a)},findChildBy:function(h,g,b){var e=this.childNodes,a=e.length,d=0,j,c;for(;d<a;d++){j=e[d];if(h.call(g||j,j)===true){return j}else{if(b){c=j.findChildBy(h,g,b);if(c!=null){return c}}}}return null},sort:function(e,d){var c=this.childNodes;var a=c.length;if(a>0){var g=d?function(){e.apply(d,arguments)}:e;c.sort(g);for(var b=0;b<a;b++){var h=c[b];h.previousSibling=c[b-1];h.nextSibling=c[b+1];if(b===0){this.setFirstChild(h)}if(b==a-1){this.setLastChild(h)}}}},contains:function(a){return a.isAncestor(this)},isAncestor:function(a){var b=this.parentNode;while(b){if(b==a){return true}b=b.parentNode}return false},toString:function(){return"[Node"+(this.id?" "+this.id:"")+"]"}});Ext.tree.TreeNode=function(a){a=a||{};if(Ext.isString(a)){a={text:a}}this.childrenRendered=false;this.rendered=false;Ext.tree.TreeNode.superclass.constructor.call(this,a);this.expanded=a.expanded===true;this.isTarget=a.isTarget!==false;this.draggable=a.draggable!==false&&a.allowDrag!==false;this.allowChildren=a.allowChildren!==false&&a.allowDrop!==false;this.text=a.text;this.disabled=a.disabled===true;this.hidden=a.hidden===true;this.addEvents("textchange","beforeexpand","beforecollapse","expand","disabledchange","collapse","beforeclick","click","checkchange","beforedblclick","dblclick","contextmenu","beforechildrenrendered");var b=this.attributes.uiProvider||this.defaultUI||Ext.tree.TreeNodeUI;this.ui=new b(this)};Ext.extend(Ext.tree.TreeNode,Ext.data.Node,{preventHScroll:true,isExpanded:function(){return this.expanded},getUI:function(){return this.ui},getLoader:function(){var a;return this.loader||((a=this.getOwnerTree())&&a.loader?a.loader:(this.loader=new Ext.tree.TreeLoader()))},setFirstChild:function(a){var b=this.firstChild;Ext.tree.TreeNode.superclass.setFirstChild.call(this,a);if(this.childrenRendered&&b&&a!=b){b.renderIndent(true,true)}if(this.rendered){this.renderIndent(true,true)}},setLastChild:function(b){var a=this.lastChild;Ext.tree.TreeNode.superclass.setLastChild.call(this,b);if(this.childrenRendered&&a&&b!=a){a.renderIndent(true,true)}if(this.rendered){this.renderIndent(true,true)}},appendChild:function(b){if(!b.render&&!Ext.isArray(b)){b=this.getLoader().createNode(b)}var a=Ext.tree.TreeNode.superclass.appendChild.call(this,b);if(a&&this.childrenRendered){a.render()}this.ui.updateExpandIcon();return a},removeChild:function(b,a){this.ownerTree.getSelectionModel().unselect(b);Ext.tree.TreeNode.superclass.removeChild.apply(this,arguments);if(!a){if(b.ui.rendered){b.ui.remove()}if(this.childNodes.length<1){this.collapse(false,false)}else{this.ui.updateExpandIcon()}if(!this.firstChild&&!this.isHiddenRoot()){this.childrenRendered=false}}return b},insertBefore:function(c,a){if(!c.render){c=this.getLoader().createNode(c)}var b=Ext.tree.TreeNode.superclass.insertBefore.call(this,c,a);if(b&&a&&this.childrenRendered){c.render()}this.ui.updateExpandIcon();return b},setText:function(b){var a=this.text;this.text=this.attributes.text=b;if(this.rendered){this.ui.onTextChange(this,b,a)}this.fireEvent("textchange",this,b,a)},select:function(){var a=this.getOwnerTree();if(a){a.getSelectionModel().select(this)}},unselect:function(a){var b=this.getOwnerTree();if(b){b.getSelectionModel().unselect(this,a)}},isSelected:function(){var a=this.getOwnerTree();return a?a.getSelectionModel().isSelected(this):false},expand:function(a,c,d,b){if(!this.expanded){if(this.fireEvent("beforeexpand",this,a,c)===false){return}if(!this.childrenRendered){this.renderChildren()}this.expanded=true;if(!this.isHiddenRoot()&&(this.getOwnerTree().animate&&c!==false)||c){this.ui.animExpand(function(){this.fireEvent("expand",this);this.runCallback(d,b||this,[this]);if(a===true){this.expandChildNodes(true)}}.createDelegate(this));return}else{this.ui.expand();this.fireEvent("expand",this);this.runCallback(d,b||this,[this])}}else{this.runCallback(d,b||this,[this])}if(a===true){this.expandChildNodes(true)}},runCallback:function(a,c,b){if(Ext.isFunction(a)){a.apply(c,b)}},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible},collapse:function(b,g,h,e){if(this.expanded&&!this.isHiddenRoot()){if(this.fireEvent("beforecollapse",this,b,g)===false){return}this.expanded=false;if((this.getOwnerTree().animate&&g!==false)||g){this.ui.animCollapse(function(){this.fireEvent("collapse",this);this.runCallback(h,e||this,[this]);if(b===true){this.collapseChildNodes(true)}}.createDelegate(this));return}else{this.ui.collapse();this.fireEvent("collapse",this);this.runCallback(h,e||this,[this])}}else{if(!this.expanded){this.runCallback(h,e||this,[this])}}if(b===true){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].collapse(true,false)}}},delayedExpand:function(a){if(!this.expandProcId){this.expandProcId=this.expand.defer(a,this)}},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId)}this.expandProcId=false},toggle:function(){if(this.expanded){this.collapse()}else{this.expand()}},ensureVisible:function(c,b){var a=this.getOwnerTree();a.expandPath(this.parentNode?this.parentNode.getPath():this.getPath(),false,function(){var d=a.getNodeById(this.id);a.getTreeEl().scrollChildIntoView(d.ui.anchor);this.runCallback(c,b||this,[this])}.createDelegate(this))},expandChildNodes:function(b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].expand(b)}},collapseChildNodes:function(b){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].collapse(b)}},disable:function(){this.disabled=true;this.unselect();if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,true)}this.fireEvent("disabledchange",this,true)},enable:function(){this.disabled=false;if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,false)}this.fireEvent("disabledchange",this,false)},renderChildren:function(b){if(b!==false){this.fireEvent("beforechildrenrendered",this)}var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].render(true)}this.childrenRendered=true},sort:function(e,d){Ext.tree.TreeNode.superclass.sort.apply(this,arguments);if(this.childrenRendered){var c=this.childNodes;for(var b=0,a=c.length;b<a;b++){c[b].render(true)}}},render:function(a){this.ui.render(a);if(!this.rendered){this.getOwnerTree().registerNode(this);this.rendered=true;if(this.expanded){this.expanded=false;this.expand(false,false)}}},renderIndent:function(b,e){if(e){this.ui.childIndent=null}this.ui.renderIndent();if(b===true&&this.childrenRendered){var d=this.childNodes;for(var c=0,a=d.length;c<a;c++){d[c].renderIndent(true,e)}}},beginUpdate:function(){this.childrenRendered=false},endUpdate:function(){if(this.expanded&&this.rendered){this.renderChildren()}},destroy:function(a){if(a===true){this.unselect(true)}Ext.tree.TreeNode.superclass.destroy.call(this,a);Ext.destroy(this.ui,this.loader);this.ui=this.loader=null},onIdChange:function(a){this.ui.onIdChange(a)}});Ext.tree.TreePanel.nodeTypes.node=Ext.tree.TreeNode;Ext.tree.AsyncTreeNode=function(a){this.loaded=a&&a.loaded===true;this.loading=false;Ext.tree.AsyncTreeNode.superclass.constructor.apply(this,arguments);this.addEvents("beforeload","load")};Ext.extend(Ext.tree.AsyncTreeNode,Ext.tree.TreeNode,{expand:function(b,e,h,c){if(this.loading){var g;var d=function(){if(!this.loading){clearInterval(g);this.expand(b,e,h,c)}}.createDelegate(this);g=setInterval(d,200);return}if(!this.loaded){if(this.fireEvent("beforeload",this)===false){return}this.loading=true;this.ui.beforeLoad(this);var a=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();if(a){a.load(this,this.loadComplete.createDelegate(this,[b,e,h,c]),this);return}}Ext.tree.AsyncTreeNode.superclass.expand.call(this,b,e,h,c)},isLoading:function(){return this.loading},loadComplete:function(a,c,d,b){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(a,c,d,b)},isLoaded:function(){return this.loaded},hasChildNodes:function(){if(!this.isLeaf()&&!this.loaded){return true}else{return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)}},reload:function(b,a){this.collapse(false,false);while(this.firstChild){this.removeChild(this.firstChild).destroy()}this.childrenRendered=false;this.loaded=false;if(this.isHiddenRoot()){this.expanded=false}this.expand(false,false,b,a)}});Ext.tree.TreePanel.nodeTypes.async=Ext.tree.AsyncTreeNode;Ext.tree.TreeNodeUI=function(a){this.node=a;this.rendered=false;this.animating=false;this.wasLeaf=true;this.ecc="x-tree-ec-icon x-tree-elbow";this.emptyIcon=Ext.BLANK_IMAGE_URL};Ext.tree.TreeNodeUI.prototype={removeChild:function(a){if(this.rendered){this.ctNode.removeChild(a.ui.getEl())}},beforeLoad:function(){this.addClass("x-tree-node-loading")},afterLoad:function(){this.removeClass("x-tree-node-loading")},onTextChange:function(b,c,a){if(this.rendered){this.textNode.innerHTML=c}},onDisableChange:function(a,b){this.disabled=b;if(this.checkbox){this.checkbox.disabled=b}if(b){this.addClass("x-tree-node-disabled")}else{this.removeClass("x-tree-node-disabled")}},onSelectedChange:function(a){if(a){this.focus();this.addClass("x-tree-selected")}else{this.removeClass("x-tree-selected")}},onMove:function(a,h,e,g,d,b){this.childIndent=null;if(this.rendered){var i=g.ui.getContainer();if(!i){this.holder=document.createElement("div");this.holder.appendChild(this.wrap);return}var c=b?b.ui.getEl():null;if(c){i.insertBefore(this.wrap,c)}else{i.appendChild(this.wrap)}this.node.renderIndent(true,e!=g)}},addClass:function(a){if(this.elNode){Ext.fly(this.elNode).addClass(a)}},removeClass:function(a){if(this.elNode){Ext.fly(this.elNode).removeClass(a)}},remove:function(){if(this.rendered){this.holder=document.createElement("div");this.holder.appendChild(this.wrap)}},fireEvent:function(){return this.node.fireEvent.apply(this.node,arguments)},initEvents:function(){this.node.on("move",this.onMove,this);if(this.node.disabled){this.onDisableChange(this.node,true)}if(this.node.hidden){this.hide()}var b=this.node.getOwnerTree();var a=b.enableDD||b.enableDrag||b.enableDrop;if(a&&(!this.node.isRoot||b.rootVisible)){Ext.dd.Registry.register(this.elNode,{node:this.node,handles:this.getDDHandles(),isHandle:false})}},getDDHandles:function(){return[this.iconNode,this.textNode,this.elNode]},hide:function(){this.node.hidden=true;if(this.wrap){this.wrap.style.display="none"}},show:function(){this.node.hidden=false;if(this.wrap){this.wrap.style.display=""}},onContextMenu:function(a){if(this.node.hasListener("contextmenu")||this.node.getOwnerTree().hasListener("contextmenu")){a.preventDefault();this.focus();this.fireEvent("contextmenu",this.node,a)}},onClick:function(c){if(this.dropping){c.stopEvent();return}if(this.fireEvent("beforeclick",this.node,c)!==false){var b=c.getTarget("a");if(!this.disabled&&this.node.attributes.href&&b){this.fireEvent("click",this.node,c);return}else{if(b&&c.ctrlKey){c.stopEvent()}}c.preventDefault();if(this.disabled){return}if(this.node.attributes.singleClickExpand&&!this.animating&&this.node.isExpandable()){this.node.toggle()}this.fireEvent("click",this.node,c)}else{c.stopEvent()}},onDblClick:function(a){a.preventDefault();if(this.disabled){return}if(this.fireEvent("beforedblclick",this.node,a)!==false){if(this.checkbox){this.toggleCheck()}if(!this.animating&&this.node.isExpandable()){this.node.toggle()}this.fireEvent("dblclick",this.node,a)}},onOver:function(a){this.addClass("x-tree-node-over")},onOut:function(a){this.removeClass("x-tree-node-over")},onCheckChange:function(){var a=this.checkbox.checked;this.checkbox.defaultChecked=a;this.node.attributes.checked=a;this.fireEvent("checkchange",this.node,a)},ecClick:function(a){if(!this.animating&&this.node.isExpandable()){this.node.toggle()}},startDrop:function(){this.dropping=true},endDrop:function(){setTimeout(function(){this.dropping=false}.createDelegate(this),50)},expand:function(){this.updateExpandIcon();this.ctNode.style.display=""},focus:function(){if(!this.node.preventHScroll){try{this.anchor.focus()}catch(c){}}else{try{var b=this.node.getOwnerTree().getTreeEl().dom;var a=b.scrollLeft;this.anchor.focus();b.scrollLeft=a}catch(c){}}},toggleCheck:function(b){var a=this.checkbox;if(a){a.checked=(b===undefined?!a.checked:b);this.onCheckChange()}},blur:function(){try{this.anchor.blur()}catch(a){}},animExpand:function(b){var a=Ext.get(this.ctNode);a.stopFx();if(!this.node.isExpandable()){this.updateExpandIcon();this.ctNode.style.display="";Ext.callback(b);return}this.animating=true;this.updateExpandIcon();a.slideIn("t",{callback:function(){this.animating=false;Ext.callback(b)},scope:this,duration:this.node.ownerTree.duration||0.25})},highlight:function(){var a=this.node.getOwnerTree();Ext.fly(this.wrap).highlight(a.hlColor||"C3DAF9",{endColor:a.hlBaseColor})},collapse:function(){this.updateExpandIcon();this.ctNode.style.display="none"},animCollapse:function(b){var a=Ext.get(this.ctNode);a.enableDisplayMode("block");a.stopFx();this.animating=true;this.updateExpandIcon();a.slideOut("t",{callback:function(){this.animating=false;Ext.callback(b)},scope:this,duration:this.node.ownerTree.duration||0.25})},getContainer:function(){return this.ctNode},getEl:function(){return this.wrap},appendDDGhost:function(a){a.appendChild(this.elNode.cloneNode(true))},getDDRepairXY:function(){return Ext.lib.Dom.getXY(this.iconNode)},onRender:function(){this.render()},render:function(c){var e=this.node,b=e.attributes;var d=e.parentNode?e.parentNode.ui.getContainer():e.ownerTree.innerCt.dom;if(!this.rendered){this.rendered=true;this.renderElements(e,b,d,c);if(b.qtip){if(this.textNode.setAttributeNS){this.textNode.setAttributeNS("ext","qtip",b.qtip);if(b.qtipTitle){this.textNode.setAttributeNS("ext","qtitle",b.qtipTitle)}}else{this.textNode.setAttribute("ext:qtip",b.qtip);if(b.qtipTitle){this.textNode.setAttribute("ext:qtitle",b.qtipTitle)}}}else{if(b.qtipCfg){b.qtipCfg.target=Ext.id(this.textNode);Ext.QuickTips.register(b.qtipCfg)}}this.initEvents();if(!this.node.expanded){this.updateExpandIcon(true)}}else{if(c===true){d.appendChild(this.wrap)}}},renderElements:function(e,k,j,l){this.indentMarkup=e.parentNode?e.parentNode.ui.getChildIndent():"";var g=Ext.isBoolean(k.checked),b,c=k.href?k.href:Ext.isGecko?"":"#",d=['<li class="x-tree-node"><div ext:tree-node-id="',e.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ',k.cls,'" unselectable="on">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow" />','<img src="',k.icon||this.emptyIcon,'" class="x-tree-node-icon',(k.icon?" x-tree-node-inline-icon":""),(k.iconCls?" "+k.iconCls:""),'" unselectable="on" />',g?('<input class="x-tree-node-cb" type="checkbox" '+(k.checked?'checked="checked" />':"/>")):"",'<a hidefocus="on" class="x-tree-node-anchor" href="',c,'" tabIndex="1" ',k.hrefTarget?' target="'+k.hrefTarget+'"':"",'><span unselectable="on">',e.text,"</span></a></div>",'<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>"].join("");if(l!==true&&e.nextSibling&&(b=e.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,d)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",j,d)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var i=this.elNode.childNodes;this.indentNode=i[0];this.ecNode=i[1];this.iconNode=i[2];var h=3;if(g){this.checkbox=i[3];this.checkbox.defaultChecked=this.checkbox.checked;h++}this.anchor=i[h];this.textNode=i[h].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var g=this.node,d,c,a=g.isLast()?"x-tree-elbow-end":"x-tree-elbow",e=g.hasChildNodes();if(e||g.attributes.expandable){if(g.expanded){a+="-minus";d="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";d="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=d||this.c2!=c){Ext.fly(this.elNode).replaceClass(d,c);this.c1=d;this.c2=c}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-collapsed");delete this.c1;delete this.c2;this.wasLeaf=true}}var b="x-tree-ec-icon "+a;if(this.ecc!=b){this.ecNode.className=b;this.ecc=b}}},onIdChange:function(a){if(this.rendered){this.elNode.setAttribute("ext:tree-node-id",a)}},getChildIndent:function(){if(!this.childIndent){var a=[],b=this.node;while(b){if(!b.isRoot||(b.isRoot&&b.ownerTree.rootVisible)){if(!b.isLast()){a.unshift('<img src="'+this.emptyIcon+'" class="x-tree-elbow-line" />')}else{a.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon" />')}}b=b.parentNode}this.childIndent=a.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var a="",b=this.node.parentNode;if(b){a=b.ui.getChildIndent()}if(this.indentMarkup!=a){this.indentNode.innerHTML=a;this.indentMarkup=a}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}Ext.each(["textnode","anchor","checkbox","indentNode","ecNode","iconNode","elNode","ctNode","wrap","holder"],function(a){if(this[a]){Ext.fly(this[a]).remove();delete this[a]}},this);delete this.node}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var a=this.node.ownerTree.innerCt.dom;this.node.expanded=true;a.innerHTML='<div class="x-tree-root-node"></div>';this.wrap=this.ctNode=a.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeLoader=function(a){this.baseParams={};Ext.apply(this,a);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,paramOrder:undefined,paramsAsHash:false,nodeParameter:"node",directFn:undefined,load:function(b,c,a){if(this.clearOnLoad){while(b.firstChild){b.removeChild(b.firstChild)}}if(this.doPreload(b)){this.runCallback(c,a||b,[b])}else{if(this.directFn||this.dataUrl||this.url){this.requestData(b,c,a||b)}}},doPreload:function(d){if(d.attributes.children){if(d.childNodes.length<1){var c=d.attributes.children;d.beginUpdate();for(var b=0,a=c.length;b<a;b++){var e=d.appendChild(this.createNode(c[b]));if(this.preloadChildren){this.doPreload(e)}}d.endUpdate()}return true}return false},getParams:function(g){var e=Ext.apply({},this.baseParams),h=this.nodeParameter,b=this.paramOrder;h&&(e[h]=g.id);if(this.directFn){var c=[g.id];if(b){if(h&&b.indexOf(h)>-1){c=[]}for(var d=0,a=b.length;d<a;d++){c.push(e[b[d]])}}else{if(this.paramsAsHash){c=[e]}}return c}else{return e}},requestData:function(c,d,b){if(this.fireEvent("beforeload",this,c,d)!==false){if(this.directFn){var a=this.getParams(c);a.push(this.processDirectResponse.createDelegate(this,[{callback:d,node:c,scope:b}],true));this.directFn.apply(window,a)}else{this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:d,node:c,scope:b},params:this.getParams(c)})}}else{this.runCallback(d,b||c,[])}},processDirectResponse:function(a,b,c){if(b.status){this.handleResponse({responseData:Ext.isArray(a)?a:null,responseText:a,argument:c})}else{this.handleFailure({argument:c})}},runCallback:function(a,c,b){if(Ext.isFunction(a)){a.apply(c,b)}},isLoading:function(){return !!this.transId},abort:function(){if(this.isLoading()){Ext.Ajax.abort(this.transId)}},createNode:function(attr){if(this.baseAttrs){Ext.applyIf(attr,this.baseAttrs)}if(this.applyLoader!==false&&!attr.loader){attr.loader=this}if(Ext.isString(attr.uiProvider)){attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider)}if(attr.nodeType){return new Ext.tree.TreePanel.nodeTypes[attr.nodeType](attr)}else{return attr.leaf?new Ext.tree.TreeNode(attr):new Ext.tree.AsyncTreeNode(attr)}},processResponse:function(d,c,k,l){var m=d.responseText;try{var a=d.responseData||Ext.decode(m);c.beginUpdate();for(var g=0,h=a.length;g<h;g++){var b=this.createNode(a[g]);if(b){c.appendChild(b)}}c.endUpdate();this.runCallback(k,l||c,[c])}catch(j){this.handleFailure(d)}},handleResponse:function(c){this.transId=false;var b=c.argument;this.processResponse(c,b.node,b.callback,b.scope);this.fireEvent("load",this,b.node,c)},handleFailure:function(c){this.transId=false;var b=c.argument;this.fireEvent("loadexception",this,b.node,c);this.runCallback(b.callback,b.scope||b.node,[b.node])},destroy:function(){this.abort();this.purgeListeners()}});Ext.tree.TreeFilter=function(a,b){this.tree=a;this.filtered={};Ext.apply(this,b)};Ext.tree.TreeFilter.prototype={clearBlank:false,reverse:false,autoClear:false,remove:false,filter:function(d,a,b){a=a||"text";var c;if(typeof d=="string"){var e=d.length;if(e==0&&this.clearBlank){this.clear();return}d=d.toLowerCase();c=function(g){return g.attributes[a].substr(0,e).toLowerCase()==d}}else{if(d.exec){c=function(g){return d.test(g.attributes[a])}}else{throw"Illegal filter type, must be string or regex"}}this.filterBy(c,null,b)},filterBy:function(d,c,b){b=b||this.tree.root;if(this.autoClear){this.clear()}var a=this.filtered,i=this.reverse;var e=function(k){if(k==b){return true}if(a[k.id]){return false}var j=d.call(c||k,k);if(!j||i){a[k.id]=k;k.ui.hide();return false}return true};b.cascade(e);if(this.remove){for(var h in a){if(typeof h!="function"){var g=a[h];if(g&&g.parentNode){g.parentNode.removeChild(g)}}}}},clear:function(){var b=this.tree;var a=this.filtered;for(var d in a){if(typeof d!="function"){var c=a[d];if(c){c.ui.show()}}}this.filtered={}}};Ext.tree.TreeSorter=function(b,c){Ext.apply(this,c);b.on("beforechildrenrendered",this.doSort,this);b.on("append",this.updateSort,this);b.on("insert",this.updateSort,this);b.on("textchange",this.updateSortParent,this);var e=this.dir&&this.dir.toLowerCase()=="desc";var g=this.property||"text";var h=this.sortType;var a=this.folderSort;var d=this.caseSensitive===true;var i=this.leafAttr||"leaf";this.sortFn=function(k,j){if(a){if(k.attributes[i]&&!j.attributes[i]){return 1}if(!k.attributes[i]&&j.attributes[i]){return -1}}var m=h?h(k):(d?k.attributes[g]:k.attributes[g].toUpperCase());var l=h?h(j):(d?j.attributes[g]:j.attributes[g].toUpperCase());if(m<l){return e?+1:-1}else{if(m>l){return e?-1:+1}else{return 0}}}};Ext.tree.TreeSorter.prototype={doSort:function(a){a.sort(this.sortFn)},compareNodes:function(b,a){return(b.text.toUpperCase()>a.text.toUpperCase()?1:-1)},updateSort:function(a,b){if(b.childrenRendered){this.doSort.defer(1,this,[b])}},updateSortParent:function(a){var b=a.parentNode;if(b&&b.childrenRendered){this.doSort.defer(1,this,[b])}}};if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(a,b){this.allowParentInsert=b.allowParentInsert||false;this.allowContainerDrop=b.allowContainerDrop||false;this.appendOnly=b.appendOnly||false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.getTreeEl(),b);this.tree=a;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(a){if(a.hasChildNodes()&&!a.isExpanded()){a.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(a){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(a,k,i,d,c){if(!a||!c){return false}var g=a.node;var h=c.node;if(!(g&&g.isTarget&&k)){return false}if(k=="append"&&g.allowChildren===false){return false}if((k=="above"||k=="below")&&(g.parentNode&&g.parentNode.allowChildren===false)){return false}if(h&&(g==h||h.contains(g))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=g;b.data=c;b.point=k;b.source=i;b.rawEvent=d;b.dropNode=h;b.cancel=false;var j=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&j!==false},getDropPoint:function(h,g,l){var m=g.node;if(m.isRoot){return m.allowChildren!==false?"append":false}var c=g.ddel;var o=Ext.lib.Dom.getY(c),j=o+c.offsetHeight;var i=Ext.lib.Event.getPageY(h);var k=m.allowChildren===false||m.isLeaf();if(this.appendOnly||m.parentNode.allowChildren===false){return k?false:"append"}var d=false;if(!this.allowParentInsert){d=m.hasChildNodes()&&m.isExpanded()}var a=(j-o)/(k?2:3);if(i>=o&&i<(o+a)){return"above"}else{if(!d&&(k||i>=j-a&&i<=j)){return"below"}else{return"append"}}},onNodeEnter:function(d,a,c,b){this.cancelExpand()},onContainerOver:function(a,c,b){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,c,b)){return this.dropAllowed}return this.dropNotAllowed},onNodeOver:function(b,i,h,g){var k=this.getDropPoint(h,b,i);var c=b.node;if(!this.expandProcId&&k=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(k!="append"){this.cancelExpand()}}var d=this.dropNotAllowed;if(this.isValidDropPoint(b,k,i,h,g)){if(k){var a=b.ddel;var j;if(k=="above"){d=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";j="x-tree-drag-insert-above"}else{if(k=="below"){d=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";j="x-tree-drag-insert-below"}else{d="x-tree-drop-ok-append";j="x-tree-drag-append"}}if(this.lastInsertClass!=j){Ext.fly(a).replaceClass(this.lastInsertClass,j);this.lastInsertClass=j}}}return d},onNodeOut:function(d,a,c,b){this.cancelExpand();this.removeDropIndicators(d)},onNodeDrop:function(i,b,h,d){var a=this.getDropPoint(h,i,b);var g=i.node;g.ui.startDrop();if(!this.isValidDropPoint(i,a,b,h,d)){g.ui.endDrop();return false}var c=d.node||(b.getTreeNode?b.getTreeNode(d,g,a,h):null);return this.processDrop(g,d,a,b,h,c)},onContainerDrop:function(a,g,c){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,g,c)){var d=this.tree.getRootNode();d.ui.startDrop();var b=c.node||(a.getTreeNode?a.getTreeNode(c,d,"append",g):null);return this.processDrop(d,c,"append",a,g,b)}return false},processDrop:function(j,h,b,a,i,d){var g={tree:this.tree,target:j,data:h,point:b,source:a,rawEvent:i,dropNode:d,cancel:!d,dropStatus:false};var c=this.tree.fireEvent("beforenodedrop",g);if(c===false||g.cancel===true||!g.dropNode){j.ui.endDrop();return g.dropStatus}j=g.target;if(b=="append"&&!j.isExpanded()){j.expand(false,null,function(){this.completeDrop(g)}.createDelegate(this))}else{this.completeDrop(g)}return true},completeDrop:function(h){var d=h.dropNode,e=h.point,c=h.target;if(!Ext.isArray(d)){d=[d]}var g;for(var b=0,a=d.length;b<a;b++){g=d[b];if(e=="above"){c.parentNode.insertBefore(g,c)}else{if(e=="below"){c.parentNode.insertBefore(g,c.nextSibling)}else{c.appendChild(g)}}}g.ui.focus();if(Ext.enableFx&&this.tree.hlDrop){g.ui.highlight()}c.ui.endDrop();this.tree.fireEvent("nodedrop",h)},afterNodeMoved:function(a,c,g,d,b){if(Ext.enableFx&&this.tree.hlDrop){b.ui.focus();b.ui.highlight()}this.tree.fireEvent("nodedrop",this.tree,d,c,a,g)},getTree:function(){return this.tree},removeDropIndicators:function(b){if(b&&b.ddel){var a=b.ddel;Ext.fly(a).removeClass(["x-tree-drag-insert-above","x-tree-drag-insert-below","x-tree-drag-append"]);this.lastInsertClass="_noclass"}},beforeDragDrop:function(b,a,c){this.cancelExpand();return true},afterRepair:function(a){if(a&&Ext.enableFx){a.node.ui.highlight()}this.hideProxy()}})}if(Ext.dd.DragZone){Ext.tree.TreeDragZone=function(a,b){Ext.tree.TreeDragZone.superclass.constructor.call(this,a.innerCt,b);this.tree=a};Ext.extend(Ext.tree.TreeDragZone,Ext.dd.DragZone,{ddGroup:"TreeDD",onBeforeDrag:function(a,b){var c=a.node;return c&&c.draggable&&!c.disabled},onInitDrag:function(b){var a=this.dragData;this.tree.getSelectionModel().select(a.node);this.tree.eventModel.disable();this.proxy.update("");a.node.ui.appendDDGhost(this.proxy.ghost.dom);this.tree.fireEvent("startdrag",this.tree,a.node,b)},getRepairXY:function(b,a){return a.node.ui.getDDRepairXY()},onEndDrag:function(a,b){this.tree.eventModel.enable.defer(100,this.tree.eventModel);this.tree.fireEvent("enddrag",this.tree,a.node,b)},onValidDrop:function(a,b,c){this.tree.fireEvent("dragdrop",this.tree,this.dragData.node,a,b);this.hideProxy()},beforeInvalidDrop:function(a,c){var b=this.tree.getSelectionModel();b.clearSelections();b.select(this.dragData.node)},afterRepair:function(){if(Ext.enableFx&&this.tree.hlDrop){Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9")}this.dragging=false}})}Ext.tree.TreeEditor=function(a,c,b){c=c||{};var d=c.events?c:new Ext.form.TextField(c);Ext.tree.TreeEditor.superclass.constructor.call(this,d,b);this.tree=a;if(!a.rendered){a.on("render",this.initEditor,this)}else{this.initEditor(a)}};Ext.extend(Ext.tree.TreeEditor,Ext.Editor,{alignment:"l-l",autoSize:false,hideEl:false,cls:"x-small-editor x-tree-editor",shim:false,shadow:"frame",maxWidth:250,editDelay:350,initEditor:function(a){a.on({scope:this,beforeclick:this.beforeNodeClick,dblclick:this.onNodeDblClick});this.on({scope:this,complete:this.updateNode,beforestartedit:this.fitToTree,specialkey:this.onSpecialKey});this.on("startedit",this.bindScroll,this,{delay:10})},fitToTree:function(b,c){var e=this.tree.getTreeEl().dom,d=c.dom;if(e.scrollLeft>d.offsetLeft){e.scrollLeft=d.offsetLeft}var a=Math.min(this.maxWidth,(e.clientWidth>20?e.clientWidth:e.offsetWidth)-Math.max(0,d.offsetLeft-e.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,c){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){Ext.fly(a.ui.getEl()).scrollIntoView(this.tree.body)}var b=a.text||"";if(!Ext.isGecko&&Ext.isEmpty(a.text)){a.setText("&#160;")}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,b]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(a,b){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(a)){b.stopEvent();return this.triggerEdit(a)}},onNodeDblClick:function(a,b){clearTimeout(this.autoEditTimer)},updateNode:function(a,b){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(b)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui)}},onSpecialKey:function(c,b){var a=b.getKey();if(a==b.ESC){b.stopEvent();this.cancelEdit()}else{if(a==b.ENTER&&!b.hasModifier()){b.stopEvent();this.completeEdit()}}},onDestroy:function(){clearTimeout(this.autoEditTimer);Ext.tree.TreeEditor.superclass.onDestroy.call(this);var a=this.tree;a.un("beforeclick",this.beforeNodeClick,this);a.un("dblclick",this.onNodeDblClick,this)}});
-/* SWFObject v2.2 <http://code.google.com/p/swfobject/> 
-    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+
+This file is part of Ext JS 4
+
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
+
 */
-var swfobject=function(){var E="undefined",s="object",T="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",r="application/x-shockwave-flash",S="SWFObjectExprInst",y="onreadystatechange",P=window,k=document,u=navigator,U=false,V=[i],p=[],O=[],J=[],m,R,F,C,K=false,a=false,o,H,n=true,N=function(){var ab=typeof k.getElementById!=E&&typeof k.getElementsByTagName!=E&&typeof k.createElement!=E,ai=u.userAgent.toLowerCase(),Z=u.platform.toLowerCase(),af=Z?/win/.test(Z):/win/.test(ai),ad=Z?/mac/.test(Z):/mac/.test(ai),ag=/webkit/.test(ai)?parseFloat(ai.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,Y=!+"\v1",ah=[0,0,0],ac=null;if(typeof u.plugins!=E&&typeof u.plugins[T]==s){ac=u.plugins[T].description;if(ac&&!(typeof u.mimeTypes!=E&&u.mimeTypes[r]&&!u.mimeTypes[r].enabledPlugin)){U=true;Y=false;ac=ac.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ah[0]=parseInt(ac.replace(/^(.*)\..*$/,"$1"),10);ah[1]=parseInt(ac.replace(/^.*\.(.*)\s.*$/,"$1"),10);ah[2]=/[a-zA-Z]/.test(ac)?parseInt(ac.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof P.ActiveXObject!=E){try{var ae=new ActiveXObject(X);if(ae){ac=ae.GetVariable("$version");if(ac){Y=true;ac=ac.split(" ")[1].split(",");ah=[parseInt(ac[0],10),parseInt(ac[1],10),parseInt(ac[2],10)]}}}catch(aa){}}}return{w3:ab,pv:ah,wk:ag,ie:Y,win:af,mac:ad}}(),l=function(){if(!N.w3){return}if((typeof k.readyState!=E&&k.readyState=="complete")||(typeof k.readyState==E&&(k.getElementsByTagName("body")[0]||k.body))){g()}if(!K){if(typeof k.addEventListener!=E){k.addEventListener("DOMContentLoaded",g,false)}if(N.ie&&N.win){k.attachEvent(y,function(){if(k.readyState=="complete"){k.detachEvent(y,arguments.callee);g()}});if(P==top){(function(){if(K){return}try{k.documentElement.doScroll("left")}catch(Y){setTimeout(arguments.callee,0);return}g()})()}}if(N.wk){(function(){if(K){return}if(!/loaded|complete/.test(k.readyState)){setTimeout(arguments.callee,0);return}g()})()}t(g)}}();function g(){if(K){return}try{var aa=k.getElementsByTagName("body")[0].appendChild(D("span"));aa.parentNode.removeChild(aa)}catch(ab){return}K=true;var Y=V.length;for(var Z=0;Z<Y;Z++){V[Z]()}}function L(Y){if(K){Y()}else{V[V.length]=Y}}function t(Z){if(typeof P.addEventListener!=E){P.addEventListener("load",Z,false)}else{if(typeof k.addEventListener!=E){k.addEventListener("load",Z,false)}else{if(typeof P.attachEvent!=E){j(P,"onload",Z)}else{if(typeof P.onload=="function"){var Y=P.onload;P.onload=function(){Y();Z()}}else{P.onload=Z}}}}}function i(){if(U){W()}else{I()}}function W(){var Y=k.getElementsByTagName("body")[0];var ab=D(s);ab.setAttribute("type",r);var aa=Y.appendChild(ab);if(aa){var Z=0;(function(){if(typeof aa.GetVariable!=E){var ac=aa.GetVariable("$version");if(ac){ac=ac.split(" ")[1].split(",");N.pv=[parseInt(ac[0],10),parseInt(ac[1],10),parseInt(ac[2],10)]}}else{if(Z<10){Z++;setTimeout(arguments.callee,10);return}}Y.removeChild(ab);aa=null;I()})()}else{I()}}function I(){var ah=p.length;if(ah>0){for(var ag=0;ag<ah;ag++){var Z=p[ag].id;var ac=p[ag].callbackFn;var ab={success:false,id:Z};if(N.pv[0]>0){var af=c(Z);if(af){if(G(p[ag].swfVersion)&&!(N.wk&&N.wk<312)){x(Z,true);if(ac){ab.success=true;ab.ref=A(Z);ac(ab)}}else{if(p[ag].expressInstall&&B()){var aj={};aj.data=p[ag].expressInstall;aj.width=af.getAttribute("width")||"0";aj.height=af.getAttribute("height")||"0";if(af.getAttribute("class")){aj.styleclass=af.getAttribute("class")}if(af.getAttribute("align")){aj.align=af.getAttribute("align")}var ai={};var Y=af.getElementsByTagName("param");var ad=Y.length;for(var ae=0;ae<ad;ae++){if(Y[ae].getAttribute("name").toLowerCase()!="movie"){ai[Y[ae].getAttribute("name")]=Y[ae].getAttribute("value")}}Q(aj,ai,Z,ac)}else{q(af);if(ac){ac(ab)}}}}}else{x(Z,true);if(ac){var aa=A(Z);if(aa&&typeof aa.SetVariable!=E){ab.success=true;ab.ref=aa}ac(ab)}}}}}function A(ab){var Y=null;var Z=c(ab);if(Z&&Z.nodeName=="OBJECT"){if(typeof Z.SetVariable!=E){Y=Z}else{var aa=Z.getElementsByTagName(s)[0];if(aa){Y=aa}}}return Y}function B(){return !a&&G("6.0.65")&&(N.win||N.mac)&&!(N.wk&&N.wk<312)}function Q(ab,ac,Y,aa){a=true;F=aa||null;C={success:false,id:Y};var af=c(Y);if(af){if(af.nodeName=="OBJECT"){m=h(af);R=null}else{m=af;R=Y}ab.id=S;if(typeof ab.width==E||(!/%$/.test(ab.width)&&parseInt(ab.width,10)<310)){ab.width="310"}if(typeof ab.height==E||(!/%$/.test(ab.height)&&parseInt(ab.height,10)<137)){ab.height="137"}k.title=k.title.slice(0,47)+" - Flash Player Installation";var ae=N.ie&&N.win?"ActiveX":"PlugIn",ad="MMredirectURL="+P.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ae+"&MMdoctitle="+k.title;if(typeof ac.flashvars!=E){ac.flashvars+="&"+ad}else{ac.flashvars=ad}if(N.ie&&N.win&&af.readyState!=4){var Z=D("div");Y+="SWFObjectNew";Z.setAttribute("id",Y);af.parentNode.insertBefore(Z,af);af.style.display="none";(function(){if(af.readyState==4){af.parentNode.removeChild(af)}else{setTimeout(arguments.callee,10)}})()}v(ab,ac,Y)}}function q(Z){if(N.ie&&N.win&&Z.readyState!=4){var Y=D("div");Z.parentNode.insertBefore(Y,Z);Y.parentNode.replaceChild(h(Z),Y);Z.style.display="none";(function(){if(Z.readyState==4){Z.parentNode.removeChild(Z)}else{setTimeout(arguments.callee,10)}})()}else{Z.parentNode.replaceChild(h(Z),Z)}}function h(ad){var ab=D("div");if(N.win&&N.ie){ab.innerHTML=ad.innerHTML}else{var Z=ad.getElementsByTagName(s)[0];if(Z){var ae=Z.childNodes;if(ae){var Y=ae.length;for(var aa=0;aa<Y;aa++){if(!(ae[aa].nodeType==1&&ae[aa].nodeName=="PARAM")&&!(ae[aa].nodeType==8)){ab.appendChild(ae[aa].cloneNode(true))}}}}}return ab}function v(aj,ah,Z){var Y,ab=c(Z);if(N.wk&&N.wk<312){return Y}if(ab){if(typeof aj.id==E){aj.id=Z}if(N.ie&&N.win){var ai="";for(var af in aj){if(aj[af]!=Object.prototype[af]){if(af.toLowerCase()=="data"){ah.movie=aj[af]}else{if(af.toLowerCase()=="styleclass"){ai+=' class="'+aj[af]+'"'}else{if(af.toLowerCase()!="classid"){ai+=" "+af+'="'+aj[af]+'"'}}}}}var ag="";for(var ae in ah){if(ah[ae]!=Object.prototype[ae]){ag+='<param name="'+ae+'" value="'+ah[ae]+'" />'}}ab.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ai+">"+ag+"</object>";O[O.length]=aj.id;Y=c(aj.id)}else{var aa=D(s);aa.setAttribute("type",r);for(var ad in aj){if(aj[ad]!=Object.prototype[ad]){if(ad.toLowerCase()=="styleclass"){aa.setAttribute("class",aj[ad])}else{if(ad.toLowerCase()!="classid"){aa.setAttribute(ad,aj[ad])}}}}for(var ac in ah){if(ah[ac]!=Object.prototype[ac]&&ac.toLowerCase()!="movie"){e(aa,ac,ah[ac])}}ab.parentNode.replaceChild(aa,ab);Y=aa}}return Y}function e(aa,Y,Z){var ab=D("param");ab.setAttribute("name",Y);ab.setAttribute("value",Z);aa.appendChild(ab)}function z(Z){var Y=c(Z);if(Y&&Y.nodeName=="OBJECT"){if(N.ie&&N.win){Y.style.display="none";(function(){if(Y.readyState==4){b(Z)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.removeChild(Y)}}}function b(aa){var Z=c(aa);if(Z){for(var Y in Z){if(typeof Z[Y]=="function"){Z[Y]=null}}Z.parentNode.removeChild(Z)}}function c(aa){var Y=null;try{Y=k.getElementById(aa)}catch(Z){}return Y}function D(Y){return k.createElement(Y)}function j(aa,Y,Z){aa.attachEvent(Y,Z);J[J.length]=[aa,Y,Z]}function G(aa){var Z=N.pv,Y=aa.split(".");Y[0]=parseInt(Y[0],10);Y[1]=parseInt(Y[1],10)||0;Y[2]=parseInt(Y[2],10)||0;return(Z[0]>Y[0]||(Z[0]==Y[0]&&Z[1]>Y[1])||(Z[0]==Y[0]&&Z[1]==Y[1]&&Z[2]>=Y[2]))?true:false}function w(ad,Z,ae,ac){if(N.ie&&N.mac){return}var ab=k.getElementsByTagName("head")[0];if(!ab){return}var Y=(ae&&typeof ae=="string")?ae:"screen";if(ac){o=null;H=null}if(!o||H!=Y){var aa=D("style");aa.setAttribute("type","text/css");aa.setAttribute("media",Y);o=ab.appendChild(aa);if(N.ie&&N.win&&typeof k.styleSheets!=E&&k.styleSheets.length>0){o=k.styleSheets[k.styleSheets.length-1]}H=Y}if(N.ie&&N.win){if(o&&typeof o.addRule==s){o.addRule(ad,Z)}}else{if(o&&typeof k.createTextNode!=E){o.appendChild(k.createTextNode(ad+" {"+Z+"}"))}}}function x(aa,Y){if(!n){return}var Z=Y?"visible":"hidden";if(K&&c(aa)){c(aa).style.visibility=Z}else{w("#"+aa,"visibility:"+Z)}}function M(Z){var aa=/[\\\"<>\.;]/;var Y=aa.exec(Z)!=null;return Y&&typeof encodeURIComponent!=E?encodeURIComponent(Z):Z}var d=function(){if(N.ie&&N.win){window.attachEvent("onunload",function(){var ad=J.length;for(var ac=0;ac<ad;ac++){J[ac][0].detachEvent(J[ac][1],J[ac][2])}var aa=O.length;for(var ab=0;ab<aa;ab++){z(O[ab])}for(var Z in N){N[Z]=null}N=null;for(var Y in swfobject){swfobject[Y]=null}swfobject=null})}}();return{registerObject:function(ac,Y,ab,aa){if(N.w3&&ac&&Y){var Z={};Z.id=ac;Z.swfVersion=Y;Z.expressInstall=ab;Z.callbackFn=aa;p[p.length]=Z;x(ac,false)}else{if(aa){aa({success:false,id:ac})}}},getObjectById:function(Y){if(N.w3){return A(Y)}},embedSWF:function(ac,ai,af,ah,Z,ab,aa,ae,ag,ad){var Y={success:false,id:ai};if(N.w3&&!(N.wk&&N.wk<312)&&ac&&ai&&af&&ah&&Z){x(ai,false);L(function(){af+="";ah+="";var ak={};if(ag&&typeof ag===s){for(var am in ag){ak[am]=ag[am]}}ak.data=ac;ak.width=af;ak.height=ah;var an={};if(ae&&typeof ae===s){for(var al in ae){an[al]=ae[al]}}if(aa&&typeof aa===s){for(var aj in aa){if(typeof an.flashvars!=E){an.flashvars+="&"+aj+"="+aa[aj]}else{an.flashvars=aj+"="+aa[aj]}}}if(G(Z)){var ao=v(ak,an,ai);if(ak.id==ai){x(ai,true)}Y.success=true;Y.ref=ao}else{if(ab&&B()){ak.data=ab;Q(ak,an,ai,ad);return}else{x(ai,true)}}if(ad){ad(Y)}})}else{if(ad){ad(Y)}}},switchOffAutoHideShow:function(){n=false},ua:N,getFlashPlayerVersion:function(){return{major:N.pv[0],minor:N.pv[1],release:N.pv[2]}},hasFlashPlayerVersion:G,createSWF:function(aa,Z,Y){if(N.w3){return v(aa,Z,Y)}else{return undefined}},showExpressInstall:function(aa,ab,Y,Z){if(N.w3&&B()){Q(aa,ab,Y,Z)}},removeSWF:function(Y){if(N.w3){z(Y)}},createCSS:function(ab,aa,Z,Y){if(N.w3){w(ab,aa,Z,Y)}},addDomLoadEvent:L,addLoadEvent:t,getQueryParamValue:function(ab){var aa=k.location.search||k.location.hash;if(aa){if(/\?/.test(aa)){aa=aa.split("?")[1]}if(ab==null){return M(aa)}var Z=aa.split("&");for(var Y=0;Y<Z.length;Y++){if(Z[Y].substring(0,Z[Y].indexOf("="))==ab){return M(Z[Y].substring((Z[Y].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var Y=c(S);if(Y&&m){Y.parentNode.replaceChild(m,Y);if(R){x(R,true);if(N.ie&&N.win){m.style.display="block"}}if(F){F(C)}}a=false}}}}();Ext.FlashComponent=Ext.extend(Ext.BoxComponent,{flashVersion:"9.0.115",backgroundColor:"#ffffff",wmode:"opaque",flashVars:undefined,flashParams:undefined,url:undefined,swfId:undefined,swfWidth:"100%",swfHeight:"100%",expressInstall:false,initComponent:function(){Ext.FlashComponent.superclass.initComponent.call(this);this.addEvents("initialize")},onRender:function(){Ext.FlashComponent.superclass.onRender.apply(this,arguments);var b=Ext.apply({allowScriptAccess:"always",bgcolor:this.backgroundColor,wmode:this.wmode},this.flashParams),a=Ext.apply({allowedDomain:document.location.hostname,YUISwfId:this.getId(),YUIBridgeCallback:"Ext.FlashEventProxy.onEvent"},this.flashVars);new swfobject.embedSWF(this.url,this.id,this.swfWidth,this.swfHeight,this.flashVersion,this.expressInstall?Ext.FlashComponent.EXPRESS_INSTALL_URL:undefined,a,b);this.swf=Ext.getDom(this.id);this.el=Ext.get(this.swf)},getSwfId:function(){return this.swfId||(this.swfId="extswf"+(++Ext.Component.AUTO_ID))},getId:function(){return this.id||(this.id="extflashcmp"+(++Ext.Component.AUTO_ID))},onFlashEvent:function(a){switch(a.type){case"swfReady":this.initSwf();return;case"log":return}a.component=this;this.fireEvent(a.type.toLowerCase().replace(/event$/,""),a)},initSwf:function(){this.onSwfReady(!!this.isInitialized);this.isInitialized=true;this.fireEvent("initialize",this)},beforeDestroy:function(){if(this.rendered){swfobject.removeSWF(this.swf.id)}Ext.FlashComponent.superclass.beforeDestroy.call(this)},onSwfReady:Ext.emptyFn});Ext.FlashComponent.EXPRESS_INSTALL_URL="http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf";Ext.reg("flash",Ext.FlashComponent);Ext.FlashEventProxy={onEvent:function(c,b){var a=Ext.getCmp(c);if(a){a.onFlashEvent(b)}else{arguments.callee.defer(10,this,[c,b])}}};Ext.chart.Chart=Ext.extend(Ext.FlashComponent,{refreshBuffer:100,chartStyle:{padding:10,animationEnabled:true,font:{name:"Tahoma",color:4473924,size:11},dataTip:{padding:5,border:{color:10075112,size:1},background:{color:14346230,alpha:0.9},font:{name:"Tahoma",color:1393291,size:10,bold:true}}},extraStyle:null,seriesStyles:null,disableCaching:Ext.isIE||Ext.isOpera,disableCacheParam:"_dc",initComponent:function(){Ext.chart.Chart.superclass.initComponent.call(this);if(!this.url){this.url=Ext.chart.Chart.CHART_URL}if(this.disableCaching){this.url=Ext.urlAppend(this.url,String.format("{0}={1}",this.disableCacheParam,new Date().getTime()))}this.addEvents("itemmouseover","itemmouseout","itemclick","itemdoubleclick","itemdragstart","itemdrag","itemdragend","beforerefresh","refresh");this.store=Ext.StoreMgr.lookup(this.store)},setStyle:function(a,b){this.swf.setStyle(a,Ext.encode(b))},setStyles:function(a){this.swf.setStyles(Ext.encode(a))},setSeriesStyles:function(b){this.seriesStyles=b;var a=[];Ext.each(b,function(c){a.push(Ext.encode(c))});this.swf.setSeriesStyles(a)},setCategoryNames:function(a){this.swf.setCategoryNames(a)},setLegendRenderer:function(c,b){var a=this;b=b||a;a.removeFnProxy(a.legendFnName);a.legendFnName=a.createFnProxy(function(d){return c.call(b,d)});a.swf.setLegendLabelFunction(a.legendFnName)},setTipRenderer:function(c,b){var a=this;b=b||a;a.removeFnProxy(a.tipFnName);a.tipFnName=a.createFnProxy(function(h,e,g){var d=a.store.getAt(e);return c.call(b,a,d,e,g)});a.swf.setDataTipFunction(a.tipFnName)},setSeries:function(a){this.series=a;this.refresh()},bindStore:function(a,b){if(!b&&this.store){if(a!==this.store&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("datachanged",this.refresh,this);this.store.un("add",this.delayRefresh,this);this.store.un("remove",this.delayRefresh,this);this.store.un("update",this.delayRefresh,this);this.store.un("clear",this.refresh,this)}}if(a){a=Ext.StoreMgr.lookup(a);a.on({scope:this,datachanged:this.refresh,add:this.delayRefresh,remove:this.delayRefresh,update:this.delayRefresh,clear:this.refresh})}this.store=a;if(a&&!b){this.refresh()}},onSwfReady:function(b){Ext.chart.Chart.superclass.onSwfReady.call(this,b);var a;this.swf.setType(this.type);if(this.chartStyle){this.setStyles(Ext.apply({},this.extraStyle,this.chartStyle))}if(this.categoryNames){this.setCategoryNames(this.categoryNames)}if(this.tipRenderer){a=this.getFunctionRef(this.tipRenderer);this.setTipRenderer(a.fn,a.scope)}if(this.legendRenderer){a=this.getFunctionRef(this.legendRenderer);this.setLegendRenderer(a.fn,a.scope)}if(!b){this.bindStore(this.store,true)}this.refresh.defer(10,this)},delayRefresh:function(){if(!this.refreshTask){this.refreshTask=new Ext.util.DelayedTask(this.refresh,this)}this.refreshTask.delay(this.refreshBuffer)},refresh:function(){if(this.fireEvent("beforerefresh",this)!==false){var m=false;var k=[],c=this.store.data.items;for(var g=0,l=c.length;g<l;g++){k[g]=c[g].data}var e=[];var d=0;var n=null;var h=0;if(this.series){d=this.series.length;for(h=0;h<d;h++){n=this.series[h];var b={};for(var a in n){if(a=="style"&&n.style!==null){b.style=Ext.encode(n.style);m=true}else{b[a]=n[a]}}e.push(b)}}if(d>0){for(h=0;h<d;h++){n=e[h];if(!n.type){n.type=this.type}n.dataProvider=k}}else{e.push({type:this.type,dataProvider:k})}this.swf.setDataProvider(e);if(this.seriesStyles){this.setSeriesStyles(this.seriesStyles)}this.fireEvent("refresh",this)}},createFnProxy:function(a){var b="extFnProxy"+(++Ext.chart.Chart.PROXY_FN_ID);Ext.chart.Chart.proxyFunction[b]=a;return"Ext.chart.Chart.proxyFunction."+b},removeFnProxy:function(a){if(!Ext.isEmpty(a)){a=a.replace("Ext.chart.Chart.proxyFunction.","");delete Ext.chart.Chart.proxyFunction[a]}},getFunctionRef:function(a){if(Ext.isFunction(a)){return{fn:a,scope:this}}else{return{fn:a.fn,scope:a.scope||this}}},onDestroy:function(){if(this.refreshTask&&this.refreshTask.cancel){this.refreshTask.cancel()}Ext.chart.Chart.superclass.onDestroy.call(this);this.bindStore(null);this.removeFnProxy(this.tipFnName);this.removeFnProxy(this.legendFnName)}});Ext.reg("chart",Ext.chart.Chart);Ext.chart.Chart.PROXY_FN_ID=0;Ext.chart.Chart.proxyFunction={};Ext.chart.Chart.CHART_URL="http://yui.yahooapis.com/2.8.0/build/charts/assets/charts.swf";Ext.chart.PieChart=Ext.extend(Ext.chart.Chart,{type:"pie",onSwfReady:function(a){Ext.chart.PieChart.superclass.onSwfReady.call(this,a);this.setDataField(this.dataField);this.setCategoryField(this.categoryField)},setDataField:function(a){this.dataField=a;this.swf.setDataField(a)},setCategoryField:function(a){this.categoryField=a;this.swf.setCategoryField(a)}});Ext.reg("piechart",Ext.chart.PieChart);Ext.chart.CartesianChart=Ext.extend(Ext.chart.Chart,{onSwfReady:function(a){Ext.chart.CartesianChart.superclass.onSwfReady.call(this,a);this.labelFn=[];if(this.xField){this.setXField(this.xField)}if(this.yField){this.setYField(this.yField)}if(this.xAxis){this.setXAxis(this.xAxis)}if(this.xAxes){this.setXAxes(this.xAxes)}if(this.yAxis){this.setYAxis(this.yAxis)}if(this.yAxes){this.setYAxes(this.yAxes)}if(Ext.isDefined(this.constrainViewport)){this.swf.setConstrainViewport(this.constrainViewport)}},setXField:function(a){this.xField=a;this.swf.setHorizontalField(a)},setYField:function(a){this.yField=a;this.swf.setVerticalField(a)},setXAxis:function(a){this.xAxis=this.createAxis("xAxis",a);this.swf.setHorizontalAxis(this.xAxis)},setXAxes:function(c){var b;for(var a=0;a<c.length;a++){b=this.createAxis("xAxis"+a,c[a]);this.swf.setHorizontalAxis(b)}},setYAxis:function(a){this.yAxis=this.createAxis("yAxis",a);this.swf.setVerticalAxis(this.yAxis)},setYAxes:function(c){var b;for(var a=0;a<c.length;a++){b=this.createAxis("yAxis"+a,c[a]);this.swf.setVerticalAxis(b)}},createAxis:function(b,d){var e=Ext.apply({},d),c,a;if(this[b]){a=this[b].labelFunction;this.removeFnProxy(a);this.labelFn.remove(a)}if(e.labelRenderer){c=this.getFunctionRef(e.labelRenderer);e.labelFunction=this.createFnProxy(function(g){return c.fn.call(c.scope,g)});delete e.labelRenderer;this.labelFn.push(e.labelFunction)}if(b.indexOf("xAxis")>-1&&e.position=="left"){e.position="bottom"}return e},onDestroy:function(){Ext.chart.CartesianChart.superclass.onDestroy.call(this);Ext.each(this.labelFn,function(a){this.removeFnProxy(a)},this)}});Ext.reg("cartesianchart",Ext.chart.CartesianChart);Ext.chart.LineChart=Ext.extend(Ext.chart.CartesianChart,{type:"line"});Ext.reg("linechart",Ext.chart.LineChart);Ext.chart.ColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"column"});Ext.reg("columnchart",Ext.chart.ColumnChart);Ext.chart.StackedColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackcolumn"});Ext.reg("stackedcolumnchart",Ext.chart.StackedColumnChart);Ext.chart.BarChart=Ext.extend(Ext.chart.CartesianChart,{type:"bar"});Ext.reg("barchart",Ext.chart.BarChart);Ext.chart.StackedBarChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackbar"});Ext.reg("stackedbarchart",Ext.chart.StackedBarChart);Ext.chart.Axis=function(a){Ext.apply(this,a)};Ext.chart.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true,labelSpacing:2};Ext.chart.NumericAxis=Ext.extend(Ext.chart.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear",roundMajorUnit:true,calculateByLabelSize:true,position:"left",adjustMaximumByMajorUnit:true,adjustMinimumByMajorUnit:true});Ext.chart.TimeAxis=Ext.extend(Ext.chart.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true,stackingEnabled:false,calculateByLabelSize:true});Ext.chart.CategoryAxis=Ext.extend(Ext.chart.Axis,{type:"category",categoryNames:null,calculateCategoryCount:false});Ext.chart.Series=function(a){Ext.apply(this,a)};Ext.chart.Series.prototype={type:null,displayName:null};Ext.chart.CartesianSeries=Ext.extend(Ext.chart.Series,{xField:null,yField:null,showInLegend:true,axis:"primary"});Ext.chart.ColumnSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"column"});Ext.chart.LineSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"line"});Ext.chart.BarSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"bar"});Ext.chart.PieSeries=Ext.extend(Ext.chart.Series,{type:"pie",dataField:null,categoryField:null});Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,enableScrolling:true,maxHeight:null,scrollIncrement:24,showSeparator:true,defaultOffsets:[0,0],plain:false,floating:true,zIndex:15000,hidden:true,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:true,defaultType:"menuitem",bufferResize:false,initComponent:function(){if(Ext.isArray(this.initialConfig)){Ext.apply(this,{items:this.initialConfig})}this.addEvents("click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);if(this.floating){Ext.EventManager.onWindowResize(this.hide,this)}else{if(this.initialConfig.hidden!==false){this.hidden=false}this.internalDefaults={hideOnClick:false}}Ext.menu.Menu.superclass.initComponent.call(this);if(this.autoLayout){var a=this.doLayout.createDelegate(this,[]);this.on({add:a,remove:a})}},getLayoutTarget:function(){return this.ul},onRender:function(b,a){if(!b){b=Ext.getBody()}var c={id:this.getId(),cls:"x-menu "+((this.floating)?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};if(this.floating){this.el=new Ext.Layer({shadow:this.shadow,dh:c,constrain:false,parentEl:b,zindex:this.zIndex})}else{this.el=b.createChild(c)}Ext.menu.Menu.superclass.onRender.call(this,b,a);if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}this.focusEl=this.el.child("a.x-menu-focus");this.ul=this.el.child("ul.x-menu-list");this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut});if(this.enableScrolling){this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})}},findTargetItem:function(b){var a=b.getTarget(".x-menu-list-item",this.ul,true);if(a&&a.menuItemId){return this.items.get(a.menuItemId)}},onClick:function(b){var a=this.findTargetItem(b);if(a){if(a.isFormField){this.setActiveItem(a)}else{if(a instanceof Ext.menu.BaseItem){if(a.menu&&this.ignoreParentClicks){a.expandMenu();b.preventDefault()}else{if(a.onClick){a.onClick(b);this.fireEvent("click",this,a,b)}}}}}},setActiveItem:function(a,b){if(a!=this.activeItem){this.deactivateActive();if((this.activeItem=a).isFormField){a.focus()}else{a.activate(b)}}else{if(b){a.expandMenu()}}},deactivateActive:function(){var b=this.activeItem;if(b){if(b.isFormField){if(b.collapse){b.collapse()}}else{b.deactivate()}delete this.activeItem}},tryActivate:function(g,e){var b=this.items;for(var c=g,a=b.length;c>=0&&c<a;c+=e){var d=b.get(c);if(!d.disabled&&(d.canActivate||d.isFormField)){this.setActiveItem(d,false);return d}}return false},onMouseOver:function(b){var a=this.findTargetItem(b);if(a){if(a.canActivate&&!a.disabled){this.setActiveItem(a,true)}}this.over=true;this.fireEvent("mouseover",this,b,a)},onMouseOut:function(b){var a=this.findTargetItem(b);if(a){if(a==this.activeItem&&a.shouldDeactivate&&a.shouldDeactivate(b)){this.activeItem.deactivate();delete this.activeItem}}this.over=false;this.fireEvent("mouseout",this,b,a)},onScroll:function(d,b){if(d){d.stopEvent()}var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");a.scrollTop+=this.scrollIncrement*(c?-1:1);if(c?a.scrollTop<=0:a.scrollTop+this.activeMax>=a.scrollHeight){this.onScrollerOut(null,b)}},onScrollerIn:function(d,b){var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");if(c?a.scrollTop>0:a.scrollTop+this.activeMax<a.scrollHeight){Ext.fly(b).addClass(["x-menu-item-active","x-menu-scroller-active"])}},onScrollerOut:function(b,a){Ext.fly(a).removeClass(["x-menu-item-active","x-menu-scroller-active"])},show:function(b,c,a){if(this.floating){this.parentMenu=a;if(!this.el){this.render();this.doLayout(false,true)}this.showAt(this.el.getAlignToXY(b,c||this.defaultAlign,this.defaultOffsets),a)}else{Ext.menu.Menu.superclass.show.call(this)}},showAt:function(b,a){if(this.fireEvent("beforeshow",this)!==false){this.parentMenu=a;if(!this.el){this.render()}if(this.enableScrolling){this.el.setXY(b);b[1]=this.constrainScroll(b[1]);b=[this.el.adjustForConstraints(b)[0],b[1]]}else{b=this.el.adjustForConstraints(b)}this.el.setXY(b);this.el.show();Ext.menu.Menu.superclass.onShow.call(this);if(Ext.isIE){this.fireEvent("autosize",this);if(!Ext.isIE8){this.el.repaint()}}this.hidden=false;this.focus();this.fireEvent("show",this)}},constrainScroll:function(i){var b,d=this.ul.setHeight("auto").getHeight(),a=i,h,e,g,c;if(this.floating){e=Ext.fly(this.el.dom.parentNode);g=e.getScroll().top;c=e.getViewSize().height;h=i-g;b=this.maxHeight?this.maxHeight:c-h;if(d>c){b=c;a=i-h}else{if(b<d){a=i-(d-b);b=d}}}else{b=this.getHeight()}if(this.maxHeight){b=Math.min(this.maxHeight,b)}if(d>b&&b>0){this.activeMax=b-this.scrollerHeight*2-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0);this.ul.setHeight(this.activeMax);this.createScrollers();this.el.select(".x-menu-scroller").setDisplayed("")}else{this.ul.setHeight(d);this.el.select(".x-menu-scroller").setDisplayed("none")}this.ul.dom.scrollTop=0;return a},createScrollers:function(){if(!this.scroller){this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:"&#160;"}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:"&#160;"})};this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],false)}});this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],false)}})}},onLayout:function(){if(this.isVisible()){if(this.enableScrolling){this.constrainScroll(this.el.getTop())}if(this.floating){this.el.sync()}}},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){if(!this.isDestroyed){this.deepHide=a;Ext.menu.Menu.superclass.hide.call(this);delete this.deepHide}},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this);this.deactivateActive();if(this.el&&this.floating){this.el.hide()}var a=this.parentMenu;if(this.deepHide===true&&a){if(a.floating){a.hide(true)}else{a.deactivateActive()}}},lookupComponent:function(a){if(Ext.isString(a)){a=(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.TextItem(a);this.applyDefaults(a)}else{if(Ext.isObject(a)){a=this.getMenuItem(a)}else{if(a.tagName||a.el){a=new Ext.BoxComponent({el:a})}}}return a},applyDefaults:function(b){if(!Ext.isString(b)){b=Ext.menu.Menu.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(a){if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}}return b},getMenuItem:function(a){if(!a.isXType){if(!a.xtype&&Ext.isBoolean(a.checked)){return new Ext.menu.CheckItem(a)}return Ext.create(a,this.defaultType)}return a},addSeparator:function(){return this.add(new Ext.menu.Separator())},addElement:function(a){return this.add(new Ext.menu.BaseItem({el:a}))},addItem:function(a){return this.add(a)},addMenuItem:function(a){return this.add(this.getMenuItem(a))},addText:function(a){return this.add(new Ext.menu.TextItem(a))},onDestroy:function(){Ext.EventManager.removeResizeListener(this.hide,this);var a=this.parentMenu;if(a&&a.activeChild==this){delete a.activeChild}delete this.parentMenu;Ext.menu.Menu.superclass.onDestroy.call(this);Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable()}var b=this.scroller;if(b){Ext.destroy(b.topRepeater,b.bottomRepeater,b.top,b.bottom)}Ext.destroy(this.el,this.focusEl,this.ul)}});Ext.reg("menu",Ext.menu.Menu);Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function a(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)-1,-1)){c.tryActivate(c.items.length-1,-1)}}function b(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)+1,1)){c.tryActivate(0,1)}}return{constructor:function(c){Ext.menu.MenuNav.superclass.constructor.call(this,c.el);this.scope=this.menu=c},doRelay:function(g,d){var c=g.getKey();if(this.menu.activeItem&&this.menu.activeItem.isFormField&&c!=g.TAB){return false}if(!this.menu.activeItem&&g.isNavKeyPress()&&c!=g.SPACE&&c!=g.RETURN){this.menu.tryActivate(0,1);return false}return d.call(this.scope||this,g,this.menu)},tab:function(d,c){d.stopEvent();if(d.shiftKey){a(d,c)}else{b(d,c)}},up:a,down:b,right:function(d,c){if(c.activeItem){c.activeItem.expandMenu(true)}},left:function(d,c){c.hide();if(c.parentMenu&&c.parentMenu.activeItem){c.parentMenu.activeItem.activate()}},enter:function(d,c){if(c.activeItem){d.stopPropagation();c.activeItem.onClick(d);c.fireEvent("click",this,c.activeItem);return true}}}}());Ext.menu.MenuMgr=function(){var g,d,c={},a=false,l=new Date();function n(){g={};d=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(d.length>0){i()}})}function i(){if(d&&d.length>0){var o=d.clone();o.each(function(p){p.hide()});return true}return false}function e(o){d.remove(o);if(d.length<1){Ext.getDoc().un("mousedown",m);a=false}}function k(o){var p=d.last();l=new Date();d.add(o);if(!a){Ext.getDoc().on("mousedown",m);a=true}if(o.parentMenu){o.getEl().setZIndex(parseInt(o.parentMenu.getEl().getStyle("z-index"),10)+3);o.parentMenu.activeChild=o}else{if(p&&!p.isDestroyed&&p.isVisible()){o.getEl().setZIndex(parseInt(p.getEl().getStyle("z-index"),10)+3)}}}function b(o){if(o.activeChild){o.activeChild.hide()}if(o.autoHideTimer){clearTimeout(o.autoHideTimer);delete o.autoHideTimer}}function h(o){var p=o.parentMenu;if(!p&&!o.allowOtherMenus){i()}else{if(p&&p.activeChild){p.activeChild.hide()}}}function m(o){if(l.getElapsed()>50&&d.length>0&&!o.getTarget(".x-menu")){i()}}function j(p,s){if(s){var r=c[p.group];for(var q=0,o=r.length;q<o;q++){if(r[q]!=p){r[q].setChecked(false)}}}}return{hideAll:function(){return i()},register:function(o){if(!g){n()}g[o.id]=o;o.on({beforehide:b,hide:e,beforeshow:h,show:k})},get:function(o){if(typeof o=="string"){if(!g){return null}return g[o]}else{if(o.events){return o}else{if(typeof o.length=="number"){return new Ext.menu.Menu({items:o})}else{return Ext.create(o,"menu")}}}},unregister:function(o){delete g[o.id];o.un("beforehide",b);o.un("hide",e);o.un("beforeshow",h);o.un("show",k)},registerCheckable:function(o){var p=o.group;if(p){if(!c[p]){c[p]=[]}c[p].push(o);o.on("beforecheckchange",j)}},unregisterCheckable:function(o){var p=o.group;if(p){c[p].remove(o);o.un("beforecheckchange",j)}},getCheckedItem:function(q){var r=c[q];if(r){for(var p=0,o=r.length;p<o;p++){if(r[p].checked){return r[p]}}}return null},setCheckedItem:function(q,s){var r=c[q];if(r){for(var p=0,o=r.length;p<o;p++){if(r[p].id==s){r[p].setChecked(true)}}}return null}}}();Ext.menu.BaseItem=Ext.extend(Ext.Component,{canActivate:false,activeClass:"x-menu-item-active",hideOnClick:true,clickHideDelay:1,ctype:"Ext.menu.BaseItem",actionMode:"container",initComponent:function(){Ext.menu.BaseItem.superclass.initComponent.call(this);this.addEvents("click","activate","deactivate");if(this.handler){this.on("click",this.handler,this.scope)}},onRender:function(b,a){Ext.menu.BaseItem.superclass.onRender.apply(this,arguments);if(this.ownerCt&&this.ownerCt instanceof Ext.menu.Menu){this.parentMenu=this.ownerCt}else{this.container.addClass("x-menu-list-item");this.mon(this.el,{scope:this,click:this.onClick,mouseenter:this.activate,mouseleave:this.deactivate})}},setHandler:function(b,a){if(this.handler){this.un("click",this.handler,this.scope)}this.on("click",this.handler=b,this.scope=a)},onClick:function(a){if(!this.disabled&&this.fireEvent("click",this,a)!==false&&(this.parentMenu&&this.parentMenu.fireEvent("itemclick",this,a)!==false)){this.handleClick(a)}else{a.stopEvent()}},activate:function(){if(this.disabled){return false}var a=this.container;a.addClass(this.activeClass);this.region=a.getRegion().adjust(2,2,-2,-2);this.fireEvent("activate",this);return true},deactivate:function(){this.container.removeClass(this.activeClass);this.fireEvent("deactivate",this)},shouldDeactivate:function(a){return !this.region||!this.region.contains(a.getPoint())},handleClick:function(b){var a=this.parentMenu;if(this.hideOnClick){if(a.floating){a.hide.defer(this.clickHideDelay,a,[true])}else{a.deactivateActive()}}},expandMenu:Ext.emptyFn,hideMenu:Ext.emptyFn});Ext.reg("menubaseitem",Ext.menu.BaseItem);Ext.menu.TextItem=Ext.extend(Ext.menu.BaseItem,{hideOnClick:false,itemCls:"x-menu-text",constructor:function(a){if(typeof a=="string"){a={text:a}}Ext.menu.TextItem.superclass.constructor.call(this,a)},onRender:function(){var a=document.createElement("span");a.className=this.itemCls;a.innerHTML=this.text;this.el=a;Ext.menu.TextItem.superclass.onRender.apply(this,arguments)}});Ext.reg("menutextitem",Ext.menu.TextItem);Ext.menu.Separator=Ext.extend(Ext.menu.BaseItem,{itemCls:"x-menu-sep",hideOnClick:false,activeClass:"",onRender:function(a){var b=document.createElement("span");b.className=this.itemCls;b.innerHTML="&#160;";this.el=b;a.addClass("x-menu-sep-li");Ext.menu.Separator.superclass.onRender.apply(this,arguments)}});Ext.reg("menuseparator",Ext.menu.Separator);Ext.menu.Item=Ext.extend(Ext.menu.BaseItem,{itemCls:"x-menu-item",canActivate:true,showDelay:200,hideDelay:200,ctype:"Ext.menu.Item",initComponent:function(){Ext.menu.Item.superclass.initComponent.call(this);if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu);this.menu.ownerCt=this}},onRender:function(d,b){if(!this.itemTpl){this.itemTpl=Ext.menu.Item.prototype.itemTpl=new Ext.XTemplate('<a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}"','<tpl if="hrefTarget">',' target="{hrefTarget}"',"</tpl>",">",'<img src="{icon}" class="x-menu-item-icon {iconCls}"/>','<span class="x-menu-item-text">{text}</span>',"</a>")}var c=this.getTemplateArgs();this.el=b?this.itemTpl.insertBefore(b,c,true):this.itemTpl.append(d,c,true);this.iconEl=this.el.child("img.x-menu-item-icon");this.textEl=this.el.child(".x-menu-item-text");if(!this.href){this.mon(this.el,"click",Ext.emptyFn,null,{preventDefault:true})}Ext.menu.Item.superclass.onRender.call(this,d,b)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||"&#160;"}},setText:function(a){this.text=a||"&#160;";if(this.rendered){this.textEl.update(this.text);this.parentMenu.layout.doAutoSize()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.iconEl.replaceClass(b,this.iconCls)}},beforeDestroy:function(){if(this.menu){delete this.menu.ownerCt;this.menu.destroy()}Ext.menu.Item.superclass.beforeDestroy.call(this)},handleClick:function(a){if(!this.href){a.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(a){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(a){this.expandMenu()}}return true},shouldDeactivate:function(a){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,a)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(a.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(a){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[a])}else{if(this.menu.isVisible()&&a){this.menu.tryActivate(0,1)}}}},deferExpand:function(a){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(a){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;if(this.menu.over){this.parentMenu.setActiveItem(this,false)}else{this.menu.hide()}}});Ext.reg("menuitem",Ext.menu.Item);Ext.menu.CheckItem=Ext.extend(Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",initComponent:function(){Ext.menu.CheckItem.superclass.initComponent.call(this);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)},onRender:function(a){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(b,a){var c=a===true;if(this.checked!=b&&(c||this.fireEvent("beforecheckchange",this,b)!==false)){if(this.container){this.container[b?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=b;if(!c){this.fireEvent("checkchange",this,b)}}},handleClick:function(a){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});Ext.reg("menucheckitem",Ext.menu.CheckItem);Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,pickerId:null,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this);if(this.strict=(Ext.isIE7&&Ext.isStrict)){this.on("show",this.onShow,this,{single:true,delay:20})}Ext.apply(this,{plain:true,showSeparator:false,items:this.picker=new Ext.DatePicker(Ext.applyIf({internalRender:this.strict||!Ext.isIE,ctCls:"x-menu-date-item",id:this.pickerId},this.initialConfig))});this.picker.purgeListeners();Ext.menu.DateMenu.superclass.initComponent.call(this);this.relayEvents(this.picker,["select"]);this.on("show",this.picker.focus,this.picker);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}},onBeforeShow:function(){if(this.picker){this.picker.hideMonthPicker(true)}},onShow:function(){var a=this.picker.getEl();a.setWidth(a.getWidth())}});Ext.reg("datemenu",Ext.menu.DateMenu);Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,cls:"x-color-menu",paletteId:null,initComponent:function(){Ext.apply(this,{plain:true,showSeparator:false,items:this.palette=new Ext.ColorPalette(Ext.applyIf({id:this.paletteId},this.initialConfig))});this.palette.purgeListeners();Ext.menu.ColorMenu.superclass.initComponent.call(this);this.relayEvents(this.palette,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}}});Ext.reg("colormenu",Ext.menu.ColorMenu);Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,submitValue:true,isFormField:true,msgDisplay:"",hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:this.name||this.id||""},onRender:function(c,a){if(!this.el){var b=this.getAutoCreate();if(!b.name){b.name=this.name||this.id}if(this.inputType){b.type=this.inputType}this.autoEl=b}Ext.form.Field.superclass.onRender.call(this,c,a);if(this.submitValue===false){this.el.dom.removeAttribute("name")}var d=this.el.dom.type;if(d){if(d=="password"){d="text"}this.el.addClass("x-form-"+d)}if(this.readOnly){this.setReadOnly(true)}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls])},getItemCt:function(){return this.itemCt},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled||!this.rendered){return false}return String(this.getValue())!==String(this.originalValue)},setReadOnly:function(a){if(this.rendered){this.el.dom.readOnly=a}this.readOnly=a},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,a)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.mon(this.el,Ext.EventManager.useKeydown?"keydown":"keypress",this.fireKey,this);this.mon(this.el,"focus",this.onFocus,this);this.mon(this.el,"blur",this.onBlur,this,this.inEditor?{buffer:10}:null)},preFocus:Ext.emptyFn,onFocus:function(){this.preFocus();if(this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&(this.validateOnBlur||this.validationEvent=="blur")){this.validate()}var a=this.getValue();if(String(a)!==String(this.startValue)){this.fireEvent("change",this,a,this.startValue)}this.fireEvent("blur",this);this.postBlur()},postBlur:Ext.emptyFn,isValid:function(a){if(this.disabled){return true}var c=this.preventMark;this.preventMark=a===true;var b=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=c;return b},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(a){return a},validateValue:function(b){var a=this.getErrors(b)[0];if(a==undefined){return true}else{this.markInvalid(a);return false}},getErrors:function(){return[]},getActiveError:function(){return this.activeError||""},markInvalid:function(c){if(this.rendered&&!this.preventMark){c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}}this.setActiveError(c)},clearInvalid:function(){if(this.rendered&&!this.preventMark){this.el.removeClass(this.invalidClass);var a=this.getMessageHandler();if(a){a.clear(this)}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML="";b.style.display="none"}}}}this.unsetActiveError()},setActiveError:function(b,a){this.activeError=b;if(a!==true){this.fireEvent("invalid",this,b)}},unsetActiveError:function(a){delete this.activeError;if(a!==true){this.fireEvent("valid",this)}},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget]},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true)},alignErrorEl:function(){this.errorEl.setWidth(this.getErrorCt().getWidth(true)-20)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},getRawValue:function(){var a=this.rendered?this.el.getValue():Ext.value(this.value,"");if(a===this.emptyText){a=""}return a},getValue:function(){if(!this.rendered){return this.value}var a=this.el.getValue();if(a===this.emptyText||a===undefined){a=""}return a},setRawValue:function(a){return this.rendered?(this.el.dom.value=(Ext.isEmpty(a)?"":a)):""},setValue:function(a){this.value=a;if(this.rendered){this.el.dom.value=(Ext.isEmpty(a)?"":a);this.validate()}return this},append:function(a){this.setValue([this.getValue(),a].join(""))}});Ext.form.MessageTargets={qtip:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.qtip=b;a.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(a){a.el.removeClass(a.invalidClass);a.el.dom.qtip=""}},title:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.title=b},clear:function(a){a.el.dom.title=""}},under:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorEl){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorEl=a.createChild({cls:"x-form-invalid-msg"});b.on("resize",b.alignErrorEl,b);b.on("destroy",function(){Ext.destroy(this.errorEl)},b)}b.alignErrorEl();b.errorEl.update(c);Ext.form.Field.msgFx[b.msgFx].show(b.errorEl,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorEl){Ext.form.Field.msgFx[a.msgFx].hide(a.errorEl,a)}else{a.el.dom.title=""}}},side:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorIcon){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorIcon=a.createChild({cls:"x-form-invalid-icon"});if(b.ownerCt){b.ownerCt.on("afterlayout",b.alignErrorIcon,b);b.ownerCt.on("expand",b.alignErrorIcon,b)}b.on("resize",b.alignErrorIcon,b);b.on("destroy",function(){Ext.destroy(this.errorIcon)},b)}b.alignErrorIcon();b.errorIcon.dom.qtip=c;b.errorIcon.dom.qclass="x-form-invalid-tip";b.errorIcon.show()},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorIcon){a.errorIcon.dom.qtip="";a.errorIcon.hide()}else{a.el.dom.title=""}}}};Ext.form.Field.msgFx={normal:{show:function(a,b){a.setDisplayed("block")},hide:function(a,b){a.setDisplayed(false).update("")}},slide:{show:function(a,b){a.slideIn("t",{stopFx:true})},hide:function(a,b){a.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(a,b){a.fixDisplay();a.alignTo(b.el,"tl-tr");a.slideIn("l",{stopFx:true})},hide:function(a,b){a.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field);Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.mon(this.el,"keyup",this.filterValidation,this)}else{if(this.validationEvent!==false&&this.validationEvent!="blur"){this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.mon(this.el,"mousedown",this.onMouseDown,this);if(this.emptyText){this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.mon(this.el,"keypress",this.filterKeys,this)}if(this.grow){this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50});this.mon(this.el,"click",this.autoSize,this)}if(this.enableKeyEvents){this.mon(this.el,{scope:this,keyup:this.onKeyUp,keydown:this.onKeyDown,keypress:this.onKeyPress})}},onMouseDown:function(a){if(!this.hasFocus){this.mon(this.el,"mouseup",Ext.emptyFn,this,{single:true,preventDefault:true})}},processValue:function(a){if(this.stripCharsRe){var b=a.replace(this.stripCharsRe,"");if(b!==a){this.setRawValue(b);return b}}return a},filterValidation:function(a){if(!a.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on"}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable=""}},onKeyUpBuffered:function(a){if(this.doAutoSize(a)){this.autoSize()}},doAutoSize:function(a){return !a.isNavKeyPress()},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){var a=this.el;if(this.emptyText){if(a.dom.value==this.emptyText){this.setRawValue("")}a.removeClass(this.emptyClass)}if(this.selectOnFocus){a.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(b){if(b.ctrlKey){return}var a=b.getKey();if(Ext.isGecko&&(b.isNavKeyPress()||a==b.BACKSPACE||(a==b.DELETE&&b.button==-1))){return}var c=String.fromCharCode(b.getCharCode());if(!Ext.isGecko&&b.isSpecialKey()&&!c){return}if(!this.maskRe.test(c)){b.stopEvent()}},setValue:function(a){if(this.emptyText&&this.el&&!Ext.isEmpty(a)){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize();return this},getErrors:function(a){var d=Ext.form.TextField.superclass.getErrors.apply(this,arguments);a=a||this.processValue(this.getRawValue());if(Ext.isFunction(this.validator)){var c=this.validator(a);if(c!==true){d.push(c)}}if(a.length<1||a===this.emptyText){if(this.allowBlank){return d}else{d.push(this.blankText)}}if(!this.allowBlank&&(a.length<1||a===this.emptyText)){d.push(this.blankText)}if(a.length<this.minLength){d.push(String.format(this.minLengthText,this.minLength))}if(a.length>this.maxLength){d.push(String.format(this.maxLengthText,this.maxLength))}if(this.vtype){var b=Ext.form.VTypes;if(!b[this.vtype](a,this)){d.push(this.vtypeText||b[this.vtype+"Text"])}}if(this.regex&&!this.regex.test(a)){d.push(this.regexText)}return d},selectText:function(h,a){var c=this.getRawValue();var e=false;if(c.length>0){h=h===undefined?0:h;a=a===undefined?c.length:a;var g=this.el.dom;if(g.setSelectionRange){g.setSelectionRange(h,a)}else{if(g.createTextRange){var b=g.createTextRange();b.moveStart("character",h);b.moveEnd("character",a-c.length);b.select()}}e=Ext.isGecko||Ext.isOpera}else{e=true}if(e){this.focus()}},autoSize:function(){if(!this.grow||!this.rendered){return}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var c=this.el;var b=c.dom.value;var e=document.createElement("div");e.appendChild(document.createTextNode(b));b=e.innerHTML;Ext.removeNode(e);e=null;b+="&#160;";var a=Math.min(this.growMax,Math.max(this.metrics.getWidth(b)+10,this.growMin));this.el.setWidth(a);this.fireEvent("autosize",this,a)},onDestroy:function(){if(this.validationTask){this.validationTask.cancel();this.validationTask=null}Ext.form.TextField.superclass.onDestroy.call(this)}});Ext.reg("textfield",Ext.form.TextField);Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,editable:true,readOnly:false,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,actionMode:"wrap",defaultTriggerWidth:17,onResize:function(a,c){Ext.form.TriggerField.superclass.onResize.call(this,a,c);var b=this.getTriggerWidth();if(Ext.isNumber(a)){this.el.setWidth(a-b)}this.wrap.setWidth(this.el.getWidth()+b)},getTriggerWidth:function(){var a=this.trigger.getWidth();if(!this.hideTrigger&&!this.readOnly&&a===0){a=this.defaultTriggerWidth}return a},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},onRender:function(b,a){this.doc=Ext.isIE?Ext.getBody():Ext.getDoc();Ext.form.TriggerField.superclass.onRender.call(this,b,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-field-trigger-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}this.resizeEl=this.positionEl=this.wrap},getWidth:function(){return(this.el.getWidth()+this.trigger.getWidth())},updateEditState:function(){if(this.rendered){if(this.readOnly){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this);this.trigger.setDisplayed(false)}else{if(!this.editable){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mon(this.el,"click",this.onTriggerClick,this)}else{this.el.dom.readOnly=false;this.el.removeClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this)}this.trigger.setDisplayed(!this.hideTrigger)}this.onResize(this.width||this.wrap.getWidth())}},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateEditState()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateEditState()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateEditState()}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);this.updateEditState()},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){Ext.destroy(this.trigger,this.wrap);if(this.mimicing){this.doc.un("mousedown",this.mimicBlur,this)}delete this.doc;Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass(this.wrapFocusClass);this.mimicing=true;this.doc.on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.on("specialkey",this.checkTab,this)}}},checkTab:function(a,b){if(b.getKey()==b.TAB){this.triggerBlur()}},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.wrap.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;this.doc.un("mousedown",this.mimicBlur,this);if(this.monitorTab&&this.el){this.un("specialkey",this.checkTab,this)}Ext.form.TriggerField.superclass.onBlur.call(this);if(this.wrap){this.wrap.removeClass(this.wrapFocusClass)}},beforeBlur:Ext.emptyFn,validateBlur:function(a){return true},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(a){return this.triggers[a]},initTrigger:function(){var a=this.trigger.select(".x-form-trigger",true);var b=this;a.each(function(d,g,c){var e="Trigger"+(c+1);d.hide=function(){var h=b.wrap.getWidth();this.dom.style.display="none";b.el.setWidth(h-b.trigger.getWidth());this["hidden"+e]=true};d.show=function(){var h=b.wrap.getWidth();this.dom.style.display="";b.el.setWidth(h-b.trigger.getWidth());this["hidden"+e]=false};if(this["hide"+e]){d.dom.style.display="none";this["hidden"+e]=true}this.mon(d,"click",this["on"+e+"Click"],this,{preventDefault:true});d.addClassOnOver("x-form-trigger-over");d.addClassOnClick("x-form-trigger-click")},this);this.triggers=a.elements},getTriggerWidth:function(){var a=0;Ext.each(this.triggers,function(d,c){var e="Trigger"+(c+1),b=d.getWidth();if(b===0&&!this["hidden"+e]){a+=this.defaultTriggerWidth}else{a+=b}},this);return a},onDestroy:function(){Ext.destroy(this.triggers);Ext.form.TwinTriggerField.superclass.onDestroy.call(this)},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});Ext.reg("trigger",Ext.form.TriggerField);Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1000,growAppend:"&#160;\n&#160;",enterIsSpecial:false,preventScrollbars:false,onRender:function(b,a){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"}}Ext.form.TextArea.superclass.onRender.call(this,b,a);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});if(this.preventScrollbars){this.el.setStyle("overflow","hidden")}this.el.setHeight(this.growMin)}},onDestroy:function(){Ext.removeNode(this.textSizeEl);Ext.form.TextArea.superclass.onDestroy.call(this)},fireKey:function(a){if(a.isSpecialKey()&&(this.enterIsSpecial||(a.getKey()!=a.ENTER||a.hasModifier()))){this.fireEvent("specialkey",this,a)}},doAutoSize:function(a){return !a.isNavKeyPress()||a.getKey()==a.ENTER},autoSize:function(){if(!this.grow||!this.textSizeEl){return}var c=this.el,a=Ext.util.Format.htmlEncode(c.dom.value),d=this.textSizeEl,b;Ext.fly(d).setWidth(this.el.getWidth());if(a.length<1){a="&#160;&#160;"}else{a+=this.growAppend;if(Ext.isIE){a=a.replace(/\n/g,"&#160;<br />")}}d.innerHTML=a;b=Math.min(this.growMax,Math.max(d.offsetHeight,this.growMin));if(b!=this.lastHeight){this.lastHeight=b;this.el.setHeight(b);this.fireEvent("autosize",this,b)}}});Ext.reg("textarea",Ext.form.TextArea);Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,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",baseChars:"0123456789",initEvents:function(){var a=this.baseChars+"";if(this.allowDecimals){a+=this.decimalSeparator}if(this.allowNegative){a+="-"}this.maskRe=new RegExp("["+Ext.escapeRe(a)+"]");Ext.form.NumberField.superclass.initEvents.call(this)},getErrors:function(b){var c=Ext.form.NumberField.superclass.getErrors.apply(this,arguments);b=b||this.processValue(this.getRawValue());if(b.length<1){return c}b=String(b).replace(this.decimalSeparator,".");if(isNaN(b)){c.push(String.format(this.nanText,b))}var a=this.parseValue(b);if(a<this.minValue){c.push(String.format(this.minText,this.minValue))}if(a>this.maxValue){c.push(String.format(this.maxText,this.maxValue))}return c},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(a){a=Ext.isNumber(a)?a:parseFloat(String(a).replace(this.decimalSeparator,"."));a=isNaN(a)?"":String(a).replace(".",this.decimalSeparator);return Ext.form.NumberField.superclass.setValue.call(this,a)},setMinValue:function(a){this.minValue=Ext.num(a,Number.NEGATIVE_INFINITY)},setMaxValue:function(a){this.maxValue=Ext.num(a,Number.MAX_VALUE)},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?"":a},fixPrecision:function(b){var a=isNaN(b);if(!this.allowDecimals||this.decimalPrecision==-1||a||!b){return a?"":b}return parseFloat(parseFloat(b).toFixed(this.decimalPrecision))},beforeBlur:function(){var a=this.parseValue(this.getRawValue());if(!Ext.isEmpty(a)){this.setValue(this.fixPrecision(a))}}});Ext.reg("numberfield",Ext.form.NumberField);Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",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}",triggerClass:"x-form-date-trigger",showToday:true,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initTime:"12",initTimeFormat:"H",safeParse:function(b,c){if(/[gGhH]/.test(c.replace(/(\\.)/g,""))){return Date.parseDate(b,c)}else{var a=Date.parseDate(b+" "+this.initTime,c+" "+this.initTimeFormat);if(a){return a.clearTime()}}},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);this.addEvents("select");if(Ext.isString(this.minValue)){this.minValue=this.parseDate(this.minValue)}if(Ext.isString(this.maxValue)){this.maxValue=this.parseDate(this.maxValue)}this.disabledDatesRE=null;this.initDisabledDays()},initEvents:function(){Ext.form.DateField.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{down:function(a){this.onTriggerClick()},scope:this,forceKeyDown:true})},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){this.disabledDates=a;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE)}},setDisabledDays:function(a){this.disabledDays=a;if(this.menu){this.menu.picker.setDisabledDays(a)}},setMinValue:function(a){this.minValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMinDate(this.minValue)}},setMaxValue:function(a){this.maxValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMaxDate(this.maxValue)}},getErrors:function(e){var h=Ext.form.DateField.superclass.getErrors.apply(this,arguments);e=this.formatDate(e||this.processValue(this.getRawValue()));if(e.length<1){return h}var c=e;e=this.parseDate(e);if(!e){h.push(String.format(this.invalidText,c,this.format));return h}var g=e.getTime();if(this.minValue&&g<this.minValue.getTime()){h.push(String.format(this.minText,this.formatDate(this.minValue)))}if(this.maxValue&&g>this.maxValue.getTime()){h.push(String.format(this.maxText,this.formatDate(this.maxValue)))}if(this.disabledDays){var a=e.getDay();for(var b=0;b<this.disabledDays.length;b++){if(a===this.disabledDays[b]){h.push(this.disabledDaysText);break}}}var d=this.formatDate(e);if(this.disabledDatesRE&&this.disabledDatesRE.test(d)){h.push(String.format(this.disabledDatesText,d))}return h},validateBlur:function(){return !this.menu||!this.menu.isVisible()},getValue:function(){return this.parseDate(Ext.form.DateField.superclass.getValue.call(this))||""},setValue:function(a){return Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},parseDate:function(g){if(!g||Ext.isDate(g)){return g}var b=this.safeParse(g,this.format),c=this.altFormats,e=this.altFormatsArray;if(!b&&c){e=e||c.split("|");for(var d=0,a=e.length;d<a&&!b;d++){b=this.safeParse(g,e[d])}}return b},onDestroy:function(){Ext.destroy(this.menu,this.keyNav);Ext.form.DateField.superclass.onDestroy.call(this)},formatDate:function(a){return Ext.isDate(a)?a.dateFormat(this.format):a},onTriggerClick:function(){if(this.disabled){return}if(this.menu==null){this.menu=new Ext.menu.DateMenu({hideOnClick:false,focusOnSelect:false})}this.onFocus();Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.disabledDatesRE,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,minText:String.format(this.minText,this.formatDate(this.minValue)),maxText:String.format(this.maxText,this.formatDate(this.maxValue))});this.menu.picker.setValue(this.getValue()||new Date());this.menu.show(this.el,"tl-bl?");this.menuEvents("on")},menuEvents:function(a){this.menu[a]("select",this.onSelect,this);this.menu[a]("hide",this.onMenuHide,this);this.menu[a]("show",this.onFocus,this)},onSelect:function(a,b){this.setValue(b);this.fireEvent("select",this,b);this.menu.hide()},onMenuHide:function(){this.focus(false,60);this.menuEvents("un")},beforeBlur:function(){var a=this.parseDate(this.getRawValue());if(a){this.setValue(a)}}});Ext.reg("datefield",Ext.form.DateField);Ext.form.DisplayField=Ext.extend(Ext.form.Field,{validationEvent:false,validateOnBlur:false,defaultAutoCreate:{tag:"div"},fieldClass:"x-form-display-field",htmlEncode:false,initEvents:Ext.emptyFn,isValid:function(){return true},validate:function(){return true},getRawValue:function(){var a=this.rendered?this.el.dom.innerHTML:Ext.value(this.value,"");if(a===this.emptyText){a=""}if(this.htmlEncode){a=Ext.util.Format.htmlDecode(a)}return a},getValue:function(){return this.getRawValue()},getName:function(){return this.name},setRawValue:function(a){if(this.htmlEncode){a=Ext.util.Format.htmlEncode(a)}return this.rendered?(this.el.dom.innerHTML=(Ext.isEmpty(a)?"":a)):(this.value=a)},setValue:function(a){this.setRawValue(a);return this}});Ext.reg("displayfield",Ext.form.DisplayField);Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:"",selectedClass:"x-combo-selected",listEmptyText:"",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,minHeight:90,triggerAction:"query",minChars:4,autoSelect:true,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:"query",loadingText:"Loading...",resizable:false,handleHeight:8,allQuery:"",mode:"remote",minListWidth:70,forceSelection:false,typeAheadDelay:250,lazyInit:true,clearFilterOnReset:true,submitValue:undefined,initComponent:function(){Ext.form.ComboBox.superclass.initComponent.call(this);this.addEvents("expand","collapse","beforeselect","select","beforequery");if(this.transform){var c=Ext.getDom(this.transform);if(!this.hiddenName){this.hiddenName=c.name}if(!this.store){this.mode="local";var j=[],e=c.options;for(var b=0,a=e.length;b<a;b++){var h=e[b],g=(h.hasAttribute?h.hasAttribute("value"):h.getAttributeNode("value").specified)?h.value:h.text;if(h.selected&&Ext.isEmpty(this.value,true)){this.value=g}j.push([g,h.text])}this.store=new Ext.data.ArrayStore({id:0,fields:["value","text"],data:j,autoDestroy:true});this.valueField="value";this.displayField="text"}c.name=Ext.id();if(!this.lazyRender){this.target=true;this.el=Ext.DomHelper.insertBefore(c,this.autoCreate||this.defaultAutoCreate);this.render(this.el.parentNode,c)}Ext.removeNode(c)}else{if(this.store){this.store=Ext.StoreMgr.lookup(this.store);if(this.store.autoCreated){this.displayField=this.valueField="field1";if(!this.store.expandData){this.displayField="field2"}this.mode="local"}}}this.selectedIndex=-1;if(this.mode=="local"){if(!Ext.isDefined(this.initialConfig.queryDelay)){this.queryDelay=10}if(!Ext.isDefined(this.initialConfig.minChars)){this.minChars=0}}},onRender:function(b,a){if(this.hiddenName&&!Ext.isDefined(this.submitValue)){this.submitValue=false}Ext.form.ComboBox.superclass.onRender.call(this,b,a);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:(this.hiddenId||this.hiddenName)},"before",true)}if(Ext.isGecko){this.el.dom.setAttribute("autocomplete","off")}if(!this.lazyInit){this.initList()}else{this.on("focus",this.initList,this,{single:true})}},initValue:function(){Ext.form.ComboBox.superclass.initValue.call(this);if(this.hiddenField){this.hiddenField.value=Ext.value(Ext.isDefined(this.hiddenValue)?this.hiddenValue:this.value,"")}},getParentZIndex:function(){var a;if(this.ownerCt){this.findParentBy(function(b){a=parseInt(b.getPositionEl().getStyle("z-index"),10);return !!a})}return a},initList:function(){if(!this.list){var a="x-combo-list",d=Ext.getDom(this.getListParent()||Ext.getBody()),b=parseInt(Ext.fly(d).getStyle("z-index"),10);if(!b){b=this.getParentZIndex()}this.list=new Ext.Layer({parentEl:d,shadow:this.shadow,cls:[a,this.listClass].join(" "),constrain:false,zindex:(b||12000)+5});var c=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setSize(c,0);this.list.swallowEvent("mousewheel");this.assetHeight=0;if(this.syncFont!==false){this.list.setStyle("font-size",this.el.getStyle("font-size"))}if(this.title){this.header=this.list.createChild({cls:a+"-hd",html:this.title});this.assetHeight+=this.header.getHeight()}this.innerList=this.list.createChild({cls:a+"-inner"});this.mon(this.innerList,"mouseover",this.onViewOver,this);this.mon(this.innerList,"mousemove",this.onViewMove,this);this.innerList.setWidth(c-this.list.getFrameWidth("lr"));if(this.pageSize){this.footer=this.list.createChild({cls:a+"-ft"});this.pageTb=new Ext.PagingToolbar({store:this.store,pageSize:this.pageSize,renderTo:this.footer});this.assetHeight+=this.footer.getHeight()}if(!this.tpl){this.tpl='<tpl for="."><div class="'+a+'-item">{'+this.displayField+"}</div></tpl>"}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+a+"-item",emptyText:this.listEmptyText,deferEmptyText:false});this.mon(this.view,{containerclick:this.onViewClick,click:this.onViewClick,scope:this});this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.mon(this.resizer,"resize",function(i,e,g){this.maxHeight=g-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=e;this.innerList.setWidth(e-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},getListParent:function(){return document.body},getStore:function(){return this.store},bindStore:function(a,b){if(this.store&&!b){if(this.store!==a&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.collapse,this)}if(!a){this.store=null;if(this.view){this.view.bindStore(null)}if(this.pageTb){this.pageTb.bindStore(null)}}}if(a){if(!b){this.lastQuery=null;if(this.pageTb){this.pageTb.bindStore(a)}}this.store=Ext.StoreMgr.lookup(a);this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse});if(this.view){this.view.bindStore(a)}}},reset:function(){Ext.form.ComboBox.superclass.reset.call(this);if(this.clearFilterOnReset&&this.mode=="local"){this.store.clearFilter()}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{up:function(a){this.inKeyMode=true;this.selectPrev()},down:function(a){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},enter:function(a){this.onViewClick()},esc:function(a){this.collapse()},tab:function(a){if(this.forceSelection===true){this.collapse()}else{this.onViewClick(false)}return true},scope:this,doRelay:function(c,b,a){if(a=="down"||this.scope.isExpanded()){var d=Ext.KeyNav.prototype.doRelay.apply(this,arguments);if(!Ext.isIE&&Ext.EventManager.useKeydown){this.scope.fireKey(c)}return d}return true},forceKeyDown:true,defaultEventAction:"stopEvent"});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(!this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this)}},onDestroy:function(){if(this.dqTask){this.dqTask.cancel();this.dqTask=null}this.bindStore(null);Ext.destroy(this.resizer,this.view,this.pageTb,this.list);Ext.destroyMembers(this,"hiddenField");Ext.form.ComboBox.superclass.onDestroy.call(this)},fireKey:function(a){if(!this.isExpanded()){Ext.form.ComboBox.superclass.fireKey.call(this,a)}},onResize:function(a,b){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(!isNaN(a)&&this.isVisible()&&this.list){this.doResize(a)}else{this.bufferSize=a}},doResize:function(a){if(!Ext.isDefined(this.listWidth)){var b=Math.max(a,this.minListWidth);this.list.setWidth(b);this.innerList.setWidth(b-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},onBeforeLoad:function(){if(!this.hasFocus){return}this.innerList.update(this.loadingText?'<div class="loading-indicator">'+this.loadingText+"</div>":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return}if(this.store.getCount()>0||this.listEmptyText){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(this.autoSelect!==false&&!this.selectByValue(this.value,true)){this.select(0,true)}}else{if(this.autoSelect!==false){this.selectNext()}if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.collapse()}},onTypeAhead:function(){if(this.store.getCount()>0){var b=this.store.getAt(0);var c=b.data[this.displayField];var a=c.length;var d=this.getRawValue().length;if(d!=a){this.setRawValue(c);this.selectText(d,c.length)}}},assertValue:function(){var b=this.getRawValue(),a=this.findRecord(this.displayField,b);if(!a&&this.forceSelection){if(b.length>0&&b!=this.emptyText){this.el.dom.value=Ext.value(this.lastSelectionText,"");this.applyEmptyText()}else{this.clearValue()}}else{if(a){if(b==a.get(this.displayField)&&this.value==a.get(this.valueField)){return}b=a.get(this.valueField||this.displayField)}this.setValue(b)}},onSelect:function(a,b){if(this.fireEvent("beforeselect",this,a,b)!==false){this.setValue(a.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,a,b)}},getName:function(){var a=this.hiddenField;return a&&a.name?a.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this)},getValue:function(){if(this.valueField){return Ext.isDefined(this.value)?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(a){var c=a;if(this.valueField){var b=this.findRecord(this.valueField,a);if(b){c=b.data[this.displayField]}else{if(Ext.isDefined(this.valueNotFoundText)){c=this.valueNotFoundText}}}this.lastSelectionText=c;if(this.hiddenField){this.hiddenField.value=Ext.value(a,"")}Ext.form.ComboBox.superclass.setValue.call(this,c);this.value=a;return this},findRecord:function(c,b){var a;if(this.store.getCount()>0){this.store.each(function(d){if(d.data[c]==b){a=d;return false}})}return a},onViewMove:function(b,a){this.inKeyMode=false},onViewOver:function(d,b){if(this.inKeyMode){return}var c=this.view.findItemFromChild(b);if(c){var a=this.view.indexOf(c);this.select(a,false)}},onViewClick:function(b){var a=this.view.getSelectedIndexes()[0],c=this.store,d=c.getAt(a);if(d){this.onSelect(d,a)}else{this.collapse()}if(b!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var b=this.innerList.dom,e=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight,c=Math.max(b.clientHeight,b.offsetHeight,b.scrollHeight),a=this.getPosition()[1]-Ext.getBody().getScroll().top,g=Ext.lib.Dom.getViewHeight()-a-this.getSize().height,d=Math.max(a,g,this.minHeight||0)-this.list.shadowOffset-e-5;c=Math.min(c,d,this.maxHeight);this.innerList.setHeight(c);this.list.beginUpdate();this.list.setHeight(c+e);this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.endUpdate()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(a,c){if(!Ext.isEmpty(a,true)){var b=this.findRecord(this.valueField||this.displayField,a);if(b){this.select(this.store.indexOf(b),c);return true}}return false},select:function(a,c){this.selectedIndex=a;this.view.select(a);if(c!==false){var b=this.view.getNode(a);if(b){this.innerList.scrollChildIntoView(b,false)}}},selectNext:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex<a-1){this.select(this.selectedIndex+1)}}}},selectPrev:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!==0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(b){var a=b.getKey();if(this.editable!==false&&this.readOnly!==true&&(a==b.BACKSPACE||!b.isSpecialKey())){this.lastKey=a;this.dqTask.delay(this.queryDelay)}Ext.form.ComboBox.superclass.onKeyUp.call(this,b)},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},beforeBlur:function(){this.assertValue()},postBlur:function(){Ext.form.ComboBox.superclass.postBlur.call(this);this.collapse();this.inKeyMode=false},doQuery:function(c,b){c=Ext.isEmpty(c)?"":c;var a={query:c,forceAll:b,combo:this,cancel:false};if(this.fireEvent("beforequery",a)===false||a.cancel){return false}c=a.query;b=a.forceAll;if(b===true||(c.length>=this.minChars)){if(this.lastQuery!==c){this.lastQuery=c;if(this.mode=="local"){this.selectedIndex=-1;if(b){this.store.clearFilter()}else{this.store.filter(this.displayField,c)}this.onLoad()}else{this.store.baseParams[this.queryParam]=c;this.store.load({params:this.getParams(c)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(a){var b={};if(this.pageSize){b.start=0;b.limit=this.pageSize}return b},collapse:function(){if(!this.isExpanded()){return}this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(a){if(!this.isDestroyed&&!a.within(this.wrap)&&!a.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return}if(this.title||this.pageSize){this.assetHeight=0;if(this.title){this.assetHeight+=this.header.getHeight()}if(this.pageSize){this.assetHeight+=this.footer.getHeight()}}if(this.bufferSize){this.doResize(this.bufferSize);delete this.bufferSize}this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));var b=Ext.getDom(this.getListParent()||Ext.getBody()),a=parseInt(Ext.fly(b).getStyle("z-index"),10);if(!a){a=this.getParentZIndex()}if(a){this.list.setZIndex(a+5)}this.list.show();if(Ext.isGecko2){this.innerList.setOverflow("auto")}this.mon(Ext.getDoc(),{scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf});this.fireEvent("expand",this)},onTriggerClick:function(){if(this.readOnly||this.disabled){return}if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox);Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,boxLabel:"&#160;",defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.mon(this.el,{scope:this,click:this.onClick,change:this.onClick})},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(b,a){Ext.form.Checkbox.superclass.onRender.call(this,b,a);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}if(Ext.isIE){this.wrap.repaint()}this.resizeEl=this.positionEl=this.wrap},onDestroy:function(){Ext.destroy(this.wrap);Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:function(){this.originalValue=this.getValue()},getValue:function(){if(this.rendered){return this.el.dom.checked}return this.checked},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(a){var b=this.checked;this.checked=(a===true||a==="true"||a=="1"||String(a).toLowerCase()=="on");if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}if(b!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked)}}return this}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change");this.on("change",this.validate,this);Ext.form.CheckboxGroup.superclass.initComponent.call(this)},onRender:function(j,g){if(!this.el){var p={autoEl:{id:this.id},cls:this.groupCls,layout:"column",renderTo:j,bufferResize:false};var a={xtype:"container",defaultType:this.defaultType,layout:"form",defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(p,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var e=0,m=this.items.length;e<m;e++){Ext.applyIf(this.items[e],a)}}else{var d,n=[];if(typeof this.columns=="string"){this.columns=this.items.length}if(!Ext.isArray(this.columns)){var k=[];for(var e=0;e<this.columns;e++){k.push((100/this.columns)*0.01)}this.columns=k}d=this.columns.length;for(var e=0;e<d;e++){var b=Ext.apply({items:[]},a);b[this.columns[e]<=1?"columnWidth":"width"]=this.columns[e];if(this.defaults){b.defaults=Ext.apply(b.defaults||{},this.defaults)}n.push(b)}if(this.vertical){var r=Math.ceil(this.items.length/d),o=0;for(var e=0,m=this.items.length;e<m;e++){if(e>0&&e%r==0){o++}if(this.items[e].fieldLabel){this.items[e].hideLabel=false}n[o].items.push(this.items[e])}}else{for(var e=0,m=this.items.length;e<m;e++){var q=e%d;if(this.items[e].fieldLabel){this.items[e].hideLabel=false}n[q].items.push(this.items[e])}}Ext.apply(p,{layoutConfig:{columns:d},items:n})}this.panel=new Ext.Container(p);this.panel.ownerCt=this;this.el=this.panel.getEl();if(this.forId&&this.itemCls){var c=this.el.up(this.itemCls).child("label",true);if(c){c.setAttribute("htmlFor",this.forId)}}var h=this.panel.findBy(function(i){return i.isFormField},this);this.items=new Ext.util.MixedCollection();this.items.addAll(h)}Ext.form.CheckboxGroup.superclass.onRender.call(this,j,g)},initValue:function(){if(this.value){this.setValue.apply(this,this.buffered?this.value:[this.value]);delete this.buffered;delete this.value}},afterRender:function(){Ext.form.CheckboxGroup.superclass.afterRender.call(this);this.eachItem(function(a){a.on("check",this.fireChecked,this);a.inGroup=true})},doLayout:function(){if(this.rendered){this.panel.forceLayout=this.ownerCt.forceLayout;this.panel.doLayout()}},fireChecked:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});this.fireEvent("change",this,a)},getErrors:function(){var b=Ext.form.CheckboxGroup.superclass.getErrors.apply(this,arguments);if(!this.allowBlank){var a=true;this.eachItem(function(c){if(c.checked){return(a=false)}});if(a){b.push(this.blankText)}}return b},isDirty:function(){if(this.disabled||!this.rendered){return false}var a=false;this.eachItem(function(b){if(b.isDirty()){a=true;return false}});return a},setReadOnly:function(a){if(this.rendered){this.eachItem(function(b){b.setReadOnly(a)})}this.readOnly=a},onDisable:function(){this.eachItem(function(a){a.disable()})},onEnable:function(){this.eachItem(function(a){a.enable()})},onResize:function(a,b){this.panel.setSize(a,b);this.panel.doLayout()},reset:function(){if(this.originalValue){this.eachItem(function(a){if(a.setValue){a.setValue(false);a.originalValue=a.getValue()}});this.resetOriginal=true;this.setValue(this.originalValue);delete this.resetOriginal}else{this.eachItem(function(a){if(a.reset){a.reset()}})}(function(){this.clearInvalid()}).defer(50,this)},setValue:function(){if(this.rendered){this.onSetValue.apply(this,arguments)}else{this.buffered=true;this.value=arguments}return this},onSetValue:function(d,c){if(arguments.length==1){if(Ext.isArray(d)){Ext.each(d,function(h,e){if(Ext.isObject(h)&&h.setValue){h.setValue(true);if(this.resetOriginal===true){h.originalValue=h.getValue()}}else{var g=this.items.itemAt(e);if(g){g.setValue(h)}}},this)}else{if(Ext.isObject(d)){for(var a in d){var b=this.getBox(a);if(b){b.setValue(d[a])}}}else{this.setValueForItem(d)}}}else{var b=this.getBox(d);if(b){b.setValue(c)}}},beforeDestroy:function(){Ext.destroy(this.panel);Ext.form.CheckboxGroup.superclass.beforeDestroy.call(this)},setValueForItem:function(a){a=String(a).split(",");this.eachItem(function(b){if(a.indexOf(b.inputValue)>-1){b.setValue(true)}})},getBox:function(b){var a=null;this.eachItem(function(c){if(b==c||c.dataIndex==b||c.id==b||c.getName()==b){a=c;return false}});return a},getValue:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});return a},eachItem:function(b,a){if(this.items&&this.items.each){this.items.each(b,a||this)}},getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn});Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);Ext.form.CompositeField=Ext.extend(Ext.form.Field,{defaultMargins:"0 5 0 0",skipLastItemMargin:true,isComposite:true,combineErrors:true,initComponent:function(){var e=[],a=this.items,d;for(var c=0,b=a.length;c<b;c++){d=a[c];e.push(d.fieldLabel);Ext.apply(d,this.defaults);if(!(c==b-1&&this.skipLastItemMargin)){Ext.applyIf(d,{margins:this.defaultMargins})}}this.fieldLabel=this.fieldLabel||this.buildLabel(e);this.fieldErrors=new Ext.util.MixedCollection(true,function(g){return g.field});this.fieldErrors.on({scope:this,add:this.updateInvalidMark,remove:this.updateInvalidMark,replace:this.updateInvalidMark});Ext.form.CompositeField.superclass.initComponent.apply(this,arguments)},onRender:function(d,b){if(!this.el){var e=this.innerCt=new Ext.Container({layout:"hbox",renderTo:d,items:this.items,cls:"x-form-composite",defaultMargins:"0 3 0 0"});this.el=e.getEl();var a=e.findBy(function(g){return g.isFormField},this);this.items=new Ext.util.MixedCollection();this.items.addAll(a);if(this.combineErrors){this.eachItem(function(g){Ext.apply(g,{markInvalid:this.onFieldMarkInvalid.createDelegate(this,[g],0),clearInvalid:this.onFieldClearInvalid.createDelegate(this,[g],0)})})}var c=this.el.parent().parent().child("label",true);if(c){c.setAttribute("for",this.items.items[0].id)}}Ext.form.CompositeField.superclass.onRender.apply(this,arguments)},onFieldMarkInvalid:function(d,c){var b=d.getName(),a={field:b,error:c};this.fieldErrors.replace(b,a);d.el.addClass(d.invalidClass)},onFieldClearInvalid:function(a){this.fieldErrors.removeKey(a.getName());a.el.removeClass(a.invalidClass)},updateInvalidMark:function(){var a=Ext.isIE6&&Ext.isStrict;if(this.fieldErrors.length==0){this.clearInvalid();if(a){this.clearInvalid.defer(50,this)}}else{var b=this.buildCombinedErrorMessage(this.fieldErrors.items);this.sortErrors();this.markInvalid(b);if(a){this.markInvalid(b)}}},validateValue:function(){var a=true;this.eachItem(function(b){if(!b.isValid()){a=false}});return a},buildCombinedErrorMessage:function(e){var d=[],b;for(var c=0,a=e.length;c<a;c++){b=e[c];d.push(String.format("{0}: {1}",b.field,b.error))}return d.join("<br />")},sortErrors:function(){var a=this.items;this.fieldErrors.sort("ASC",function(g,d){var c=function(b){return function(i){return i.getName()==b}};var h=a.findIndexBy(c(g.field)),e=a.findIndexBy(c(d.field));return h<e?-1:1})},reset:function(){this.eachItem(function(a){a.reset()});(function(){this.clearInvalid()}).defer(50,this)},clearInvalidChildren:function(){this.eachItem(function(a){a.clearInvalid()})},buildLabel:function(a){return a.join(", ")},isDirty:function(){if(this.disabled||!this.rendered){return false}var a=false;this.eachItem(function(b){if(b.isDirty()){a=true;return false}});return a},eachItem:function(b,a){if(this.items&&this.items.each){this.items.each(b,a||this)}},onResize:function(e,c,a,d){var b=this.innerCt;if(this.rendered&&b.rendered){b.setSize(e,c)}Ext.form.CompositeField.superclass.onResize.apply(this,arguments)},doLayout:function(c,b){if(this.rendered){var a=this.innerCt;a.forceLayout=this.ownerCt.forceLayout;a.doLayout(c,b)}},beforeDestroy:function(){Ext.destroy(this.innerCt);Ext.form.CompositeField.superclass.beforeDestroy.call(this)},setReadOnly:function(a){a=a||true;if(this.rendered){this.eachItem(function(b){b.setReadOnly(a)})}this.readOnly=a},onShow:function(){Ext.form.CompositeField.superclass.onShow.call(this);this.doLayout()},onDisable:function(){this.eachItem(function(a){a.disable()})},onEnable:function(){this.eachItem(function(a){a.enable()})}});Ext.reg("compositefield",Ext.form.CompositeField);Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,getGroupValue:function(){var a=this.el.up("form")||Ext.getBody();var b=a.child("input[name="+this.el.dom.name+"]:checked",true);return b?b.value:null},onClick:function(){if(this.el.dom.checked!=this.checked){var a=this.getCheckEl().select("input[name="+this.el.dom.name+"]");a.each(function(b){if(b.dom.id==this.id){this.setValue(true)}else{Ext.getCmp(b.dom.id).setValue(false)}},this)}},setValue:function(a){if(typeof a=="boolean"){Ext.form.Radio.superclass.setValue.call(this,a)}else{if(this.rendered){var b=this.getCheckEl().child("input[name="+this.el.dom.name+"][value="+a+"]",true);if(b){Ext.getCmp(b.id).setValue(true)}}}return this},getCheckEl:function(){if(this.inGroup){return this.el.up(".x-form-radio-group")}return this.el.up("form")||Ext.getBody()}});Ext.reg("radio",Ext.form.Radio);Ext.form.RadioGroup=Ext.extend(Ext.form.CheckboxGroup,{allowBlank:true,blankText:"You must select one item in this group",defaultType:"radio",groupCls:"x-form-radio-group",getValue:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});return a},onSetValue:function(c,b){if(arguments.length>1){var a=this.getBox(c);if(a){a.setValue(b);if(a.checked){this.eachItem(function(d){if(d!==a){d.setValue(false)}})}}}else{this.setValueForItem(c)}},setValueForItem:function(a){a=String(a).split(",")[0];this.eachItem(function(b){b.setValue(a==b.inputValue)})},fireChecked:function(){if(!this.checkTask){this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this)}this.checkTask.delay(10)},bufferChecked:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});this.fireEvent("change",this,a)},onDestroy:function(){if(this.checkTask){this.checkTask.cancel();this.checkTask=null}Ext.form.RadioGroup.superclass.onDestroy.call(this)}});Ext.reg("radiogroup",Ext.form.RadioGroup);Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=Ext.extend(Ext.util.Observable,{constructor:function(b,a){Ext.apply(this,a);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}this.items=new Ext.util.MixedCollection(false,function(c){return c.getItemId()});this.addEvents("beforeaction","actionfailed","actioncomplete");if(b){this.initEl(b)}Ext.form.BasicForm.superclass.constructor.call(this)},timeout:30,paramOrder:undefined,paramsAsHash:false,waitTitle:"Please Wait...",activeAction:null,trackResetOnLoad:false,initEl:function(a){this.el=Ext.get(a);this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this)}this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(a){a.stopEvent()},destroy:function(a){if(a!==true){this.items.each(function(b){Ext.destroy(b)});Ext.destroy(this.el)}this.items.clear();this.purgeListeners()},isValid:function(){var a=true;this.items.each(function(b){if(!b.validate()){a=false}});return a},isDirty:function(){var a=false;this.items.each(function(b){if(b.isDirty()){a=true;return false}});return a},doAction:function(b,a){if(Ext.isString(b)){b=new Ext.form.Action.ACTION_TYPES[b](this,a)}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);b.run.defer(100,b)}return this},submit:function(b){b=b||{};if(this.standardSubmit){var a=b.clientValidation===false||this.isValid();if(a){var c=this.el.dom;if(this.url&&Ext.isEmpty(c.action)){c.action=this.url}c.submit()}return a}var d=String.format("{0}submit",this.api?"direct":"");this.doAction(d,b);return this},load:function(a){var b=String.format("{0}load",this.api?"direct":"");this.doAction(b,a);return this},updateRecord:function(b){b.beginEdit();var a=b.fields;a.each(function(c){var d=this.findField(c.name);if(d){b.set(c.name,d.getValue())}},this);b.endEdit();return this},loadRecord:function(a){this.setValues(a.data);return this},beforeAction:function(a){this.items.each(function(c){if(c.isFormField&&c.syncValue){c.syncValue()}});var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.mask(b.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(b.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(b.waitMsg,b.waitTitle||this.waitTitle)}}}},afterAction:function(a,c){this.activeAction=null;var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(c){if(b.reset){this.reset()}Ext.callback(b.success,b.scope,[this,a]);this.fireEvent("actioncomplete",this,a)}else{Ext.callback(b.failure,b.scope,[this,a]);this.fireEvent("actionfailed",this,a)}},findField:function(c){var b=this.items.get(c);if(!Ext.isObject(b)){var a=function(d){if(d.isFormField){if(d.dataIndex==c||d.id==c||d.getName()==c){b=d;return false}else{if(d.isComposite&&d.rendered){return d.items.each(a)}}}};this.items.each(a)}return b||null},markInvalid:function(h){if(Ext.isArray(h)){for(var c=0,a=h.length;c<a;c++){var b=h[c];var d=this.findField(b.id);if(d){d.markInvalid(b.msg)}}}else{var e,g;for(g in h){if(!Ext.isFunction(h[g])&&(e=this.findField(g))){e.markInvalid(h[g])}}}return this},setValues:function(c){if(Ext.isArray(c)){for(var d=0,a=c.length;d<a;d++){var b=c[d];var e=this.findField(b.id);if(e){e.setValue(b.value);if(this.trackResetOnLoad){e.originalValue=e.getValue()}}}}else{var g,h;for(h in c){if(!Ext.isFunction(c[h])&&(g=this.findField(h))){g.setValue(c[h]);if(this.trackResetOnLoad){g.originalValue=g.getValue()}}}}return this},getValues:function(b){var a=Ext.lib.Ajax.serializeForm(this.el.dom);if(b===true){return a}return Ext.urlDecode(a)},getFieldValues:function(a){var d={},e,b,c;this.items.each(function(g){if(a!==true||g.isDirty()){e=g.getName();b=d[e];c=g.getValue();if(Ext.isDefined(b)){if(Ext.isArray(b)){d[e].push(c)}else{d[e]=[b,c]}}else{d[e]=c}}});return d},clearInvalid:function(){this.items.each(function(a){a.clearInvalid()});return this},reset:function(){this.items.each(function(a){a.reset()});return this},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this},remove:function(a){this.items.remove(a);return this},cleanDestroyed:function(){this.items.filterBy(function(a){return !!a.isDestroyed}).each(this.remove,this)},render:function(){this.items.each(function(a){if(a.isFormField&&!a.rendered&&document.getElementById(a.id)){a.applyToMarkup(a.id)}});return this},applyToFields:function(a){this.items.each(function(b){Ext.apply(b,a)});return this},applyIfToFields:function(a){this.items.each(function(b){Ext.applyIf(b,a)});return this},callFieldMethod:function(b,a){a=a||[];this.items.each(function(c){if(Ext.isFunction(c[b])){c[b].apply(c,a)}});return this}});Ext.BasicForm=Ext.form.BasicForm;Ext.FormPanel=Ext.extend(Ext.Panel,{minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,layout:"form",initComponent:function(){this.form=this.createForm();Ext.FormPanel.superclass.initComponent.call(this);this.bodyCfg={tag:"form",cls:this.baseCls+"-body",method:this.method||"POST",id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype="multipart/form-data"}this.initItems();this.addEvents("clientvalidation");this.relayEvents(this.form,["beforeaction","actionfailed","actioncomplete"])},createForm:function(){var a=Ext.applyIf({listeners:{}},this.initialConfig);return new Ext.form.BasicForm(null,a)},initFields:function(){var c=this.form;var a=this;var b=function(d){if(a.isField(d)){c.add(d)}else{if(d.findBy&&d!=a){a.applySettings(d);if(d.items&&d.items.each){d.items.each(b,this)}}}};this.items.each(b,this)},applySettings:function(b){var a=b.ownerCt;Ext.applyIf(b,{labelAlign:a.labelAlign,labelWidth:a.labelWidth,itemCls:a.itemCls})},getLayoutTarget:function(){return this.form.el},getForm:function(){return this.form},onRender:function(b,a){this.initFields();Ext.FormPanel.superclass.onRender.call(this,b,a);this.form.initEl(this.body)},beforeDestroy:function(){this.stopMonitoring();this.form.destroy(true);Ext.FormPanel.superclass.beforeDestroy.call(this)},isField:function(a){return !!a.setValue&&!!a.getValue&&!!a.markInvalid&&!!a.clearInvalid},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.on({scope:this,add:this.onAddEvent,remove:this.onRemoveEvent});if(this.monitorValid){this.startMonitoring()}},onAdd:function(a){Ext.FormPanel.superclass.onAdd.call(this,a);this.processAdd(a)},onAddEvent:function(a,b){if(a!==this){this.processAdd(b)}},processAdd:function(a){if(this.isField(a)){this.form.add(a)}else{if(a.findBy){this.applySettings(a);this.form.add.apply(this.form,a.findBy(this.isField))}}},onRemove:function(a){Ext.FormPanel.superclass.onRemove.call(this,a);this.processRemove(a)},onRemoveEvent:function(a,b){if(a!==this){this.processRemove(b)}},processRemove:function(a){if(!this.destroying){if(this.isField(a)){this.form.remove(a)}else{if(a.findBy){Ext.each(a.findBy(this.isField),this.form.remove,this.form);if(a.isDestroyed){this.form.cleanDestroyed()}}}}},startMonitoring:function(){if(!this.validTask){this.validTask=new Ext.util.TaskRunner();this.validTask.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){if(this.validTask){this.validTask.stopAll();this.validTask=null}},load:function(){this.form.load.apply(this.form,arguments)},onDisable:function(){Ext.FormPanel.superclass.onDisable.call(this);if(this.form){this.form.items.each(function(){this.disable()})}},onEnable:function(){Ext.FormPanel.superclass.onEnable.call(this);if(this.form){this.form.items.each(function(){this.enable()})}},bindHandler:function(){var e=true;this.form.items.each(function(g){if(!g.isValid(true)){e=false;return false}});if(this.fbar){var b=this.fbar.items.items;for(var d=0,a=b.length;d<a;d++){var c=b[d];if(c.formBind===true&&c.disabled===e){c.setDisabled(!e)}}}this.fireEvent("clientvalidation",this,e)}});Ext.reg("form",Ext.FormPanel);Ext.form.FormPanel=Ext.FormPanel;Ext.form.FieldSet=Ext.extend(Ext.Panel,{baseCls:"x-fieldset",layout:"form",animCollapse:false,onRender:function(b,a){if(!this.el){this.el=document.createElement("fieldset");this.el.id=this.id;if(this.title||this.header||this.checkboxToggle){this.el.appendChild(document.createElement("legend")).className=this.baseCls+"-header"}}Ext.form.FieldSet.superclass.onRender.call(this,b,a);if(this.checkboxToggle){var c=typeof this.checkboxToggle=="object"?this.checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+"-checkbox"};this.checkbox=this.header.insertFirst(c);this.checkbox.dom.checked=!this.collapsed;this.mon(this.checkbox,"click",this.onCheckClick,this)}},onCollapse:function(a,b){if(this.checkbox){this.checkbox.dom.checked=false}Ext.form.FieldSet.superclass.onCollapse.call(this,a,b)},onExpand:function(a,b){if(this.checkbox){this.checkbox.dom.checked=true}Ext.form.FieldSet.superclass.onExpand.call(this,a,b)},onCheckClick:function(){this[this.checkbox.dom.checked?"expand":"collapse"]()}});Ext.reg("fieldset",Ext.form.FieldSet);Ext.form.HtmlEditor=Ext.extend(Ext.form.Field,{enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&#160;":"&#8203;",actionMode:"wrap",validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Ext.emptyFn,iframePad:3,hideMode:"offsets",defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange")},createFontOptions:function(){var d=[],b=this.fontFamilies,c,g;for(var e=0,a=b.length;e<a;e++){c=b[e];g=c.toLowerCase();d.push('<option value="',g,'" style="font-family:',c,';"',(this.defaultFont==g?' selected="true">':">"),c,"</option>")}return d.join("")},createToolbar:function(e){var c=[];var a=Ext.QuickTips&&Ext.QuickTips.isEnabled();function d(j,h,i){return{itemId:j,cls:"x-btn-icon",iconCls:"x-edit-"+j,enableToggle:h!==false,scope:e,handler:i||e.relayBtnCmd,clickEvent:"mousedown",tooltip:a?e.buttonTips[j]||undefined:undefined,overflowText:e.buttonTips[j].title||undefined,tabIndex:-1}}if(this.enableFont&&!Ext.isSafari2){var g=new Ext.Toolbar.Item({autoEl:{tag:"select",cls:"x-font-select",html:this.createFontOptions()}});c.push(g,"-")}if(this.enableFormat){c.push(d("bold"),d("italic"),d("underline"))}if(this.enableFontSize){c.push("-",d("increasefontsize",false,this.adjustFont),d("decreasefontsize",false,this.adjustFont))}if(this.enableColors){c.push("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.forecolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,listeners:{scope:this,select:function(i,h){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.backcolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,listeners:{scope:this,select:function(i,h){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",h);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}}},clickEvent:"mousedown"})})}if(this.enableAlignments){c.push("-",d("justifyleft"),d("justifycenter"),d("justifyright"))}if(!Ext.isSafari2){if(this.enableLinks){c.push("-",d("createlink",false,this.createLink))}if(this.enableLists){c.push("-",d("insertorderedlist"),d("insertunorderedlist"))}if(this.enableSourceEdit){c.push("-",d("sourceedit",true,function(h){this.toggleSourceEdit(!this.sourceEditMode)}))}}var b=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild,items:c});if(g){this.fontSelect=g.el;this.mon(this.fontSelect,"change",function(){var h=this.fontSelect.dom.value;this.relayCmd("fontname",h);this.deferFocus()},this)}this.mon(b.el,"click",function(h){h.preventDefault()});this.tb=b;this.tb.doLayout()},onDisable:function(){this.wrap.mask();Ext.form.HtmlEditor.superclass.onDisable.call(this)},onEnable:function(){this.wrap.unmask();Ext.form.HtmlEditor.superclass.onEnable.call(this)},setReadOnly:function(b){Ext.form.HtmlEditor.superclass.setReadOnly.call(this,b);if(this.initialized){if(Ext.isIE){this.getEditorBody().contentEditable=!b}else{this.setDesignMode(!b)}var a=this.getEditorBody();if(a){a.style.cursor=this.readOnly?"default":"text"}this.disableItems(b)}},getDocMarkup:function(){var a=Ext.fly(this.iframe).getHeight()-this.iframePad*2;return String.format('<html><head><style type="text/css">body{border: 0; margin: 0; padding: {0}px; height: {1}px; cursor: text}</style></head><body></body></html>',this.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document)},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(b,a){Ext.form.HtmlEditor.superclass.onRender.call(this,b,a);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.disableItems(true);this.tb.doLayout();this.createIFrame();if(!this.width){var c=this.el.getSize();this.setSize(c.width,this.height||c.height)}this.resizeEl=this.positionEl=this.wrap},createIFrame:function(){var a=document.createElement("iframe");a.name=Ext.id();a.frameBorder="0";a.style.overflow="auto";this.wrap.dom.appendChild(a);this.iframe=a;this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);var b=this.getDoc();this.win=this.getWin();b.open();b.write(this.getDocMarkup());b.close();var a={run:function(){var c=this.getDoc();if(c.body||c.readyState=="complete"){Ext.TaskMgr.stop(a);this.setDesignMode(true);this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(a)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var a=this.getDoc();if(!a){return}if(!a.editorInitialized||this.getDesignMode()!="on"){this.initFrame()}}},setDesignMode:function(b){var a;if(a=this.getDoc()){if(this.readOnly){b=false}a.designMode=(/on|true/i).test(String(b).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();if(!a){return""}return String(a.designMode).toLowerCase()},disableItems:function(a){if(this.fontSelect){this.fontSelect.dom.disabled=a}this.tb.items.each(function(b){if(b.getItemId()!="sourceedit"){b.setDisabled(a)}})},onResize:function(b,c){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(Ext.isNumber(b)){var e=b-this.wrap.getFrameWidth("lr");this.el.setWidth(e);this.tb.setWidth(e);this.iframe.style.width=Math.max(e,0)+"px"}if(Ext.isNumber(c)){var a=c-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(a);this.iframe.style.height=Math.max(a,0)+"px";var d=this.getEditorBody();if(d){d.style.height=Math.max((a-(this.iframePad*2)),0)+"px"}}}},toggleSourceEdit:function(c){var e,b,a;if(c===undefined){c=!this.sourceEditMode}this.sourceEditMode=c===true;var d=this.tb.getComponent("sourceedit");if(d.pressed!==this.sourceEditMode){d.toggle(this.sourceEditMode);if(!d.xtbHidden){return}}if(this.sourceEditMode){a=this.getSize();e=Ext.get(this.iframe).getHeight();this.disableItems(true);this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus();this.el.dom.style.height=e+"px"}else{b=parseInt(this.el.dom.style.height,10);if(this.initialized){this.disableItems(this.readOnly)}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus();this.setSize(a);this.iframe.style.height=b+"px"}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!="http://"){this.relayCmd("createlink",a)}},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(a){Ext.form.HtmlEditor.superclass.setValue.call(this,a);this.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)==this.defaultValue.replace(/\D/g,"")){a=a.substring(1)}return a},syncValue:function(){if(this.initialized){var d=this.getEditorBody();var c=d.innerHTML;if(Ext.isWebKit){var b=d.getAttribute("style");var a=b.match(/text-align:(.*?);/i);if(a&&a[1]){c='<div style="'+a[0]+'">'+c+"</div>"}}c=this.cleanHtml(c);if(this.fireEvent("beforesync",this,c)!==false){this.el.dom.value=c;this.fireEvent("sync",this,c)}}},getValue:function(){this[this.sourceEditMode?"pushValue":"syncValue"]();return Ext.form.HtmlEditor.superclass.getValue.call(this)},pushValue:function(){if(this.initialized){var a=this.el.dom.value;if(!this.activated&&a.length<1){a=this.defaultValue}if(this.fireEvent("beforepush",this,a)!==false){this.getEditorBody().innerHTML=a;if(Ext.isGecko){this.setDesignMode(false);this.setDesignMode(true)}this.fireEvent("push",this,a)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){try{var c=this.getEditorBody(),a=this.el.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),g,b;a["background-attachment"]="fixed";c.bgProperties="fixed";Ext.DomHelper.applyStyles(c,a);g=this.getDoc();if(g){try{Ext.EventManager.removeAll(g)}catch(d){}}b=this.onEditorEvent.createDelegate(this);Ext.EventManager.on(g,{mousedown:b,dblclick:b,click:b,keyup:b,buffer:100});if(Ext.isGecko){Ext.EventManager.on(g,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isWebKit||Ext.isOpera){Ext.EventManager.on(g,"keydown",this.fixKeys,this)}g.editorInitialized=true;this.initialized=true;this.pushValue();this.setReadOnly(this.readOnly);this.fireEvent("initialize",this)}catch(d){}},onDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask)}if(this.rendered){Ext.destroy(this.tb);var b=this.getDoc();if(b){try{Ext.EventManager.removeAll(b);for(var c in b){delete b[c]}}catch(a){}}if(this.wrap){this.wrap.dom.innerHTML="";this.wrap.remove()}}if(this.el){this.el.removeAllListeners();this.el.remove()}this.purgeListeners()},onFirstFocus:function(){this.activated=true;this.disableItems(this.readOnly);if(Ext.isGecko){this.win.focus();var a=this.win.getSelection();if(!a.focusNode||a.focusNode.nodeType!=3){var b=a.getRangeAt(0);b.selectNodeContents(this.getEditorBody());b.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(c){}}this.fireEvent("activate",this)},adjustFont:function(b){var d=b.getItemId()=="increasefontsize"?1:-1,c=this.getDoc(),a=parseInt(c.queryCommandValue("FontSize")||2,10);if((Ext.isSafari&&!Ext.isSafari2)||Ext.isChrome||Ext.isAir){if(a<=10){a=1+d}else{if(a<=13){a=2+d}else{if(a<=16){a=3+d}else{if(a<=18){a=4+d}else{if(a<=24){a=5+d}else{a=6+d}}}}}a=a.constrain(1,6)}else{if(Ext.isSafari){d*=2}a=Math.max(1,a+d)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",a)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){if(this.readOnly){return}if(!this.activated){this.onFirstFocus();return}var b=this.tb.items.map,c=this.getDoc();if(this.enableFont&&!Ext.isSafari2){var a=(c.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(a!=this.fontSelect.dom.value){this.fontSelect.dom.value=a}}if(this.enableFormat){b.bold.toggle(c.queryCommandState("bold"));b.italic.toggle(c.queryCommandState("italic"));b.underline.toggle(c.queryCommandState("underline"))}if(this.enableAlignments){b.justifyleft.toggle(c.queryCommandState("justifyleft"));b.justifycenter.toggle(c.queryCommandState("justifycenter"));b.justifyright.toggle(c.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){b.insertorderedlist.toggle(c.queryCommandState("insertorderedlist"));b.insertunorderedlist.toggle(c.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){(function(){this.focus();this.execCmd(b,a);this.updateToolbar()}).defer(10,this)},execCmd:function(b,a){var c=this.getDoc();c.execCommand(b,false,a===undefined?null:a);this.syncValue()},applyCommand:function(b){if(b.ctrlKey){var d=b.getCharCode(),a;if(d>0){d=String.fromCharCode(d);switch(d){case"b":a="bold";break;case"i":a="italic";break;case"u":a="underline";break}if(a){this.win.focus();this.execCmd(a);this.deferFocus();b.preventDefault()}}}},insertAtCursor:function(c){if(!this.activated){return}if(Ext.isIE){this.win.focus();var b=this.getDoc(),a=b.selection.createRange();if(a){a.pasteHTML(c);this.syncValue();this.deferFocus()}}else{this.win.focus();this.execCmd("InsertHTML",c);this.deferFocus()}},fixKeys:function(){if(Ext.isIE){return function(g){var a=g.getKey(),d=this.getDoc(),b;if(a==g.TAB){g.stopEvent();b=d.selection.createRange();if(b){b.collapse(true);b.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus()}}else{if(a==g.ENTER){b=d.selection.createRange();if(b){var c=b.parentElement();if(!c||c.tagName.toLowerCase()!="li"){g.stopEvent();b.pasteHTML("<br />");b.collapse(false);b.select()}}}}}}else{if(Ext.isOpera){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.win.focus();this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus()}}}else{if(Ext.isWebKit){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}else{if(a==b.ENTER){b.stopEvent();this.execCmd("InsertHtml","<br /><br />");this.deferFocus()}}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",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.reg("htmleditor",Ext.form.HtmlEditor);Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:undefined,maxValue:undefined,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 A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initDateFormat:"j/n/Y",initComponent:function(){if(Ext.isDefined(this.minValue)){this.setMinValue(this.minValue,true)}if(Ext.isDefined(this.maxValue)){this.setMaxValue(this.maxValue,true)}if(!this.store){this.generateStore(true)}Ext.form.TimeField.superclass.initComponent.call(this)},setMinValue:function(b,a){this.setLimit(b,true,a);return this},setMaxValue:function(b,a){this.setLimit(b,false,a);return this},generateStore:function(b){var c=this.minValue||new Date(this.initDate).clearTime(),a=this.maxValue||new Date(this.initDate).clearTime().add("mi",(24*60)-1),d=[];while(c<=a){d.push(c.dateFormat(this.format));c=c.add("mi",this.increment)}this.bindStore(d,b)},setLimit:function(b,g,a){var e;if(Ext.isString(b)){e=this.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){var c=new Date(this.initDate).clearTime();c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());this[g?"minValue":"maxValue"]=c;if(!a){this.generateStore()}}},getValue:function(){var a=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(a))||""},setValue:function(a){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},validateValue:Ext.form.DateField.prototype.validateValue,formatDate:Ext.form.DateField.prototype.formatDate,parseDate:function(h){if(!h||Ext.isDate(h)){return h}var j=this.initDate+" ",g=this.initDateFormat+" ",b=Date.parseDate(j+h,g+this.format),c=this.altFormats;if(!b&&c){if(!this.altFormatsArray){this.altFormatsArray=c.split("|")}for(var e=0,d=this.altFormatsArray,a=d.length;e<a&&!b;e++){b=Date.parseDate(j+h,g+d[e])}}return b}});Ext.reg("timefield",Ext.form.TimeField);Ext.form.SliderField=Ext.extend(Ext.form.Field,{useTips:true,tipText:null,actionMode:"wrap",initComponent:function(){var b=Ext.copyTo({id:this.id+"-slider"},this.initialConfig,["vertical","minValue","maxValue","decimalPrecision","keyIncrement","increment","clickToChange","animate"]);if(this.useTips){var a=this.tipText?{getText:this.tipText}:{};b.plugins=[new Ext.slider.Tip(a)]}this.slider=new Ext.Slider(b);Ext.form.SliderField.superclass.initComponent.call(this)},onRender:function(b,a){this.autoCreate={id:this.id,name:this.name,type:"hidden",tag:"input"};Ext.form.SliderField.superclass.onRender.call(this,b,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.resizeEl=this.positionEl=this.wrap;this.slider.render(this.wrap)},onResize:function(b,c,d,a){Ext.form.SliderField.superclass.onResize.call(this,b,c,d,a);this.slider.setSize(b,c)},initEvents:function(){Ext.form.SliderField.superclass.initEvents.call(this);this.slider.on("change",this.onChange,this)},onChange:function(b,a){this.setValue(a,undefined,true)},onEnable:function(){Ext.form.SliderField.superclass.onEnable.call(this);this.slider.enable()},onDisable:function(){Ext.form.SliderField.superclass.onDisable.call(this);this.slider.disable()},beforeDestroy:function(){Ext.destroy(this.slider);Ext.form.SliderField.superclass.beforeDestroy.call(this)},alignErrorIcon:function(){this.errorIcon.alignTo(this.slider.el,"tl-tr",[2,0])},setMinValue:function(a){this.slider.setMinValue(a);return this},setMaxValue:function(a){this.slider.setMaxValue(a);return this},setValue:function(c,b,a){if(!a){this.slider.setValue(c,b)}return Ext.form.SliderField.superclass.setValue.call(this,this.slider.getValue())},getValue:function(){return this.slider.getValue()}});Ext.reg("sliderfield",Ext.form.SliderField);Ext.form.Label=Ext.extend(Ext.BoxComponent,{onRender:function(b,a){if(!this.el){this.el=document.createElement("label");this.el.id=this.getId();this.el.innerHTML=this.text?Ext.util.Format.htmlEncode(this.text):(this.html||"");if(this.forId){this.el.setAttribute("for",this.forId)}}Ext.form.Label.superclass.onRender.call(this,b,a)},setText:function(a,b){var c=b===false;this[!c?"text":"html"]=a;delete this[c?"text":"html"];if(this.rendered){this.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(a):a}return this}});Ext.reg("label",Ext.form.Label);Ext.form.Action=function(b,a){this.form=b;this.options=a||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",run:function(a){},success:function(a){},handleResponse:function(a){},failure:function(a){this.response=a;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}this.result=this.handleResponse(a);return this.result},getUrl:function(c){var a=this.options.url||this.form.url||this.form.el.dom.action;if(c){var b=this.getParams();if(b){a=Ext.urlAppend(a,b)}}return a},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var a=this.form.baseParams;var b=this.options.params;if(b){if(typeof b=="object"){b=Ext.urlEncode(Ext.applyIf(b,a))}else{if(typeof b=="string"&&a){b+="&"+Ext.urlEncode(a)}}}else{if(a){b=Ext.urlEncode(a)}}return b},createCallback:function(a){var a=a||{};return{success:this.success,failure:this.failure,scope:this,timeout:(a.timeout*1000)||(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(b,a){Ext.form.Action.Submit.superclass.constructor.call(this,b,a)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var d=this.options,e=this.getMethod(),c=e=="GET";if(d.clientValidation===false||this.form.isValid()){if(d.submitEmptyText===false){var a=this.form.items,b=[];a.each(function(g){if(g.el.getValue()==g.emptyText){b.push(g);g.el.dom.value=""}})}Ext.Ajax.request(Ext.apply(this.createCallback(d),{form:this.form.el.dom,url:this.getUrl(c),method:e,headers:d.headers,params:!c?this.getParams():null,isUpload:this.form.fileUpload}));if(d.submitEmptyText===false){Ext.each(b,function(g){if(g.applyEmptyText){g.applyEmptyText()}})}}else{if(d.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(b){var a=this.processResponse(b);if(a===true||a.success){this.form.afterAction(this,true);return}if(a.errors){this.form.markInvalid(a.errors)}this.failureType=Ext.form.Action.SERVER_INVALID;this.form.afterAction(this,false)},handleResponse:function(c){if(this.form.errorReader){var b=this.form.errorReader.read(c);var g=[];if(b.records){for(var d=0,a=b.records.length;d<a;d++){var e=b.records[d];g[d]=e.data}}if(g.length<1){g=null}return{success:b.success,errors:g}}return Ext.decode(c.responseText)}});Ext.form.Action.Load=function(b,a){Ext.form.Action.Load.superclass.constructor.call(this,b,a);this.reader=this.form.reader};Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(this.options),{method:this.getMethod(),url:this.getUrl(false),headers:this.options.headers,params:this.getParams()}))},success:function(b){var a=this.processResponse(b);if(a===true||!a.success||!a.data){this.failureType=Ext.form.Action.LOAD_FAILURE;this.form.afterAction(this,false);return}this.form.clearInvalid();this.form.setValues(a.data);this.form.afterAction(this,true)},handleResponse:function(b){if(this.form.reader){var a=this.form.reader.read(b);var c=a.records&&a.records[0]?a.records[0].data:null;return{success:a.success,data:c}}return Ext.decode(b.responseText)}});Ext.form.Action.DirectLoad=Ext.extend(Ext.form.Action.Load,{constructor:function(b,a){Ext.form.Action.DirectLoad.superclass.constructor.call(this,b,a)},type:"directload",run:function(){var a=this.getParams();a.push(this.success,this);this.form.api.load.apply(window,a)},getParams:function(){var c=[],h={};var e=this.form.baseParams;var g=this.options.params;Ext.apply(h,g,e);var b=this.form.paramOrder;if(b){for(var d=0,a=b.length;d<a;d++){c.push(h[b[d]])}}else{if(this.form.paramsAsHash){c.push(h)}}return c},processResponse:function(a){this.result=a;return a},success:function(a,b){if(b.type==Ext.Direct.exceptions.SERVER){a={}}Ext.form.Action.DirectLoad.superclass.success.call(this,a)}});Ext.form.Action.DirectSubmit=Ext.extend(Ext.form.Action.Submit,{constructor:function(b,a){Ext.form.Action.DirectSubmit.superclass.constructor.call(this,b,a)},type:"directsubmit",run:function(){var a=this.options;if(a.clientValidation===false||this.form.isValid()){this.success.params=this.getParams();this.form.api.submit(this.form.el.dom,this.success,this)}else{if(a.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},getParams:function(){var c={};var a=this.form.baseParams;var b=this.options.params;Ext.apply(c,b,a);return c},processResponse:function(a){this.result=a;return a},success:function(a,b){if(b.type==Ext.Direct.exceptions.SERVER){a={}}Ext.form.Action.DirectSubmit.superclass.success.call(this,a)}});Ext.form.Action.ACTION_TYPES={load:Ext.form.Action.Load,submit:Ext.form.Action.Submit,directload:Ext.form.Action.DirectLoad,directsubmit:Ext.form.Action.DirectSubmit};Ext.form.VTypes=function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}();Ext.grid.GridPanel=Ext.extend(Ext.Panel,{autoExpandColumn:false,autoExpandMax:1000,autoExpandMin:50,columnLines:false,ddText:"{0} selected row{1}",deferRowRender:true,enableColumnHide:true,enableColumnMove:true,enableDragDrop:false,enableHdMenu:true,loadMask:false,minColumnWidth:25,stripeRows:false,trackMouseOver:true,stateEvents:["columnmove","columnresize","sortchange","groupchange"],view:null,bubbleEvents:[],rendered:false,viewReady:false,initComponent:function(){Ext.grid.GridPanel.superclass.initComponent.call(this);if(this.columnLines){this.cls=(this.cls||"")+" x-grid-with-col-lines"}this.autoScroll=false;this.autoWidth=false;if(Ext.isArray(this.columns)){this.colModel=new Ext.grid.ColumnModel(this.columns);delete this.columns}if(this.ds){this.store=this.ds;delete this.ds}if(this.cm){this.colModel=this.cm;delete this.cm}if(this.sm){this.selModel=this.sm;delete this.sm}this.store=Ext.StoreMgr.lookup(this.store);this.addEvents("click","dblclick","contextmenu","mousedown","mouseup","mouseover","mouseout","keypress","keydown","cellmousedown","rowmousedown","headermousedown","groupmousedown","rowbodymousedown","containermousedown","cellclick","celldblclick","rowclick","rowdblclick","headerclick","headerdblclick","groupclick","groupdblclick","containerclick","containerdblclick","rowbodyclick","rowbodydblclick","rowcontextmenu","cellcontextmenu","headercontextmenu","groupcontextmenu","containercontextmenu","rowbodycontextmenu","bodyscroll","columnresize","columnmove","sortchange","groupchange","reconfigure","viewready")},onRender:function(d,a){Ext.grid.GridPanel.superclass.onRender.apply(this,arguments);var e=this.getGridEl();this.el.addClass("x-grid-panel");this.mon(e,{scope:this,mousedown:this.onMouseDown,click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu});this.relayEvents(e,["mousedown","mouseup","mouseover","mouseout","keypress","keydown"]);var b=this.getView();b.init(this);b.render();this.getSelectionModel().init(this)},initEvents:function(){Ext.grid.GridPanel.superclass.initEvents.call(this);if(this.loadMask){this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({store:this.store},this.loadMask))}},initStateEvents:function(){Ext.grid.GridPanel.superclass.initStateEvents.call(this);this.mon(this.colModel,"hiddenchange",this.saveState,this,{delay:100})},applyState:function(a){var l=this.colModel,g=a.columns,k=this.store,m,h,j;if(g){for(var d=0,e=g.length;d<e;d++){m=g[d];h=l.getColumnById(m.id);if(h){h.hidden=m.hidden;h.width=m.width;j=l.getIndexById(m.id);if(j!=d){l.moveColumn(j,d)}}}}if(k){m=a.sort;if(m){k[k.remoteSort?"setDefaultSort":"sort"](m.field,m.direction)}m=a.group;if(k.groupBy){if(m){k.groupBy(m)}else{k.clearGrouping()}}}var b=Ext.apply({},a);delete b.columns;delete b.sort;Ext.grid.GridPanel.superclass.applyState.call(this,b)},getState:function(){var g={columns:[]},b=this.store,e,a;for(var d=0,h;(h=this.colModel.config[d]);d++){g.columns[d]={id:h.id,width:h.width};if(h.hidden){g.columns[d].hidden=true}}if(b){e=b.getSortState();if(e){g.sort=e}if(b.getGroupState){a=b.getGroupState();if(a){g.group=a}}}return g},afterRender:function(){Ext.grid.GridPanel.superclass.afterRender.call(this);var a=this.view;this.on("bodyresize",a.layout,a);a.layout();if(this.deferRowRender){if(!this.deferRowRenderTask){this.deferRowRenderTask=new Ext.util.DelayedTask(a.afterRender,this.view)}this.deferRowRenderTask.delay(10)}else{a.afterRender()}this.viewReady=true},reconfigure:function(a,b){var c=this.rendered;if(c){if(this.loadMask){this.loadMask.destroy();this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({},{store:a},this.initialConfig.loadMask))}}if(this.view){this.view.initData(a,b)}this.store=a;this.colModel=b;if(c){this.view.refresh(true)}this.fireEvent("reconfigure",this,a,b)},onDestroy:function(){if(this.deferRowRenderTask&&this.deferRowRenderTask.cancel){this.deferRowRenderTask.cancel()}if(this.rendered){Ext.destroy(this.view,this.loadMask)}else{if(this.store&&this.store.autoDestroy){this.store.destroy()}}Ext.destroy(this.colModel,this.selModel);this.store=this.selModel=this.colModel=this.view=this.loadMask=null;Ext.grid.GridPanel.superclass.onDestroy.call(this)},processEvent:function(a,b){this.view.processEvent(a,b)},onClick:function(a){this.processEvent("click",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onContextMenu:function(b,a){this.processEvent("contextmenu",b)},onDblClick:function(a){this.processEvent("dblclick",a)},walkCells:function(k,c,b,e,j){var i=this.colModel,g=i.getColumnCount(),a=this.store,h=a.getCount(),d=true;if(b<0){if(c<0){k--;d=false}while(k>=0){if(!d){c=g-1}d=false;while(c>=0){if(e.call(j||this,k,c,i)===true){return[k,c]}c--}k--}}else{if(c>=g){k++;d=false}while(k<h){if(!d){c=0}d=false;while(c<g){if(e.call(j||this,k,c,i)===true){return[k,c]}c++}k++}}return null},getGridEl:function(){return this.body},stopEditing:Ext.emptyFn,getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.grid.RowSelectionModel(this.disableSelection?{selectRow:Ext.emptyFn}:null)}return this.selModel},getStore:function(){return this.store},getColumnModel:function(){return this.colModel},getView:function(){if(!this.view){this.view=new Ext.grid.GridView(this.viewConfig)}return this.view},getDragDropText:function(){var a=this.selModel.getCount();return String.format(this.ddText,a,a==1?"":"s")}});Ext.reg("grid",Ext.grid.GridPanel);Ext.grid.GridView=Ext.extend(Ext.util.Observable,{deferEmptyText:true,scrollOffset:undefined,autoFill:false,forceFit:false,sortClasses:["sort-asc","sort-desc"],sortAscText:"Sort Ascending",sortDescText:"Sort Descending",columnsText:"Columns",selectedRowClass:"x-grid3-row-selected",borderWidth:2,tdClass:"x-grid3-cell",hdCls:"x-grid3-hd",markDirty:true,cellSelectorDepth:4,rowSelectorDepth:10,rowBodySelectorDepth:10,cellSelector:"td.x-grid3-cell",rowSelector:"div.x-grid3-row",rowBodySelector:"div.x-grid3-row-body",firstRowCls:"x-grid3-row-first",lastRowCls:"x-grid3-row-last",rowClsRe:/(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g,constructor:function(a){Ext.apply(this,a);this.addEvents("beforerowremoved","beforerowsinserted","beforerefresh","rowremoved","rowsinserted","rowupdated","refresh");Ext.grid.GridView.superclass.constructor.call(this)},initTemplates:function(){var c=this.templates||{};if(!c.master){c.master=new Ext.Template('<div class="x-grid3" hidefocus="true">','<div class="x-grid3-viewport">','<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset" style="{ostyle}">{header}</div></div><div class="x-clear"></div></div>','<div class="x-grid3-scroller"><div class="x-grid3-body" style="{bstyle}">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>',"</div>",'<div class="x-grid3-resize-marker">&#160;</div>','<div class="x-grid3-resize-proxy">&#160;</div>',"</div>")}if(!c.header){c.header=new Ext.Template('<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">','<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>',"</table>")}if(!c.hcell){c.hcell=new Ext.Template('<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id} {css}" style="{style}"><div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">',this.grid.enableHdMenu?'<a class="x-grid3-hd-btn" href="#"></a>':"",'{value}<img class="x-grid3-sort-icon" src="',Ext.BLANK_IMAGE_URL,'" />',"</div></td>")}if(!c.body){c.body=new Ext.Template("{rows}")}if(!c.row){c.row=new Ext.Template('<div class="x-grid3-row {alt}" style="{tstyle}"><table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody><tr>{cells}</tr>",(this.enableRowBody?'<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>':""),"</tbody></table></div>")}if(!c.cell){c.cell=new Ext.Template('<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>','<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>',"</td>")}for(var a in c){var b=c[a];if(b&&Ext.isFunction(b.compile)&&!b.compiled){b.disableFormats=true;b.compile()}}this.templates=c;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(a){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=a;return this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var c=Ext.Element;var b=this.grid.getGridEl().dom.firstChild;var a=b.childNodes;this.el=new c(b);this.mainWrap=new c(a[0]);this.mainHd=new c(this.mainWrap.dom.firstChild);if(this.grid.hideHeaders){this.mainHd.setDisplayed(false)}this.innerHd=this.mainHd.dom.firstChild;this.scroller=new c(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new c(this.scroller.dom.firstChild);this.focusEl=new c(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new c(a[1]);this.resizeProxy=new c(a[2])},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(a){if(!a){return false}return this.fly(a).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(c,b){var a=this.findCell(c);if(a&&(!b||this.fly(a).hasClass(b))){return this.getCellIndex(a)}return false},getCellIndex:function(b){if(b){var a=b.className.match(this.colRe);if(a&&a[1]){return this.cm.getIndexById(a[1])}}return false},findHeaderCell:function(b){var a=this.findCell(b);return a&&this.fly(a).hasClass(this.hdCls)?a:null},findHeaderIndex:function(a){return this.findCellIndex(a,this.hdCls)},findRow:function(a){if(!a){return false}return this.fly(a).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(a){var b=this.findRow(a);return b?b.rowIndex:false},findRowBody:function(a){if(!a){return false}return this.fly(a).findParent(this.rowBodySelector,this.rowBodySelectorDepth)},getRow:function(a){return this.getRows()[a]},getCell:function(b,a){return this.getRow(b).getElementsByTagName("td")[a]},getHeaderCell:function(a){return this.mainHd.dom.getElementsByTagName("td")[a]},addRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).addClass(a)}},removeRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).removeClass(a)}},removeRow:function(a){Ext.removeNode(this.getRow(a));this.syncFocusEl(a)},removeRows:function(c,a){var b=this.mainBody.dom;for(var d=c;d<=a;d++){Ext.removeNode(b.childNodes[c])}this.syncFocusEl(c)},getScrollState:function(){var a=this.scroller.dom;return{left:a.scrollLeft,top:a.scrollTop}},restoreScroll:function(a){var b=this.scroller.dom;b.scrollLeft=a.left;b.scrollTop=a.top},scrollToTop:function(){this.scroller.dom.scrollTop=0;this.scroller.dom.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var a=this.scroller.dom;this.grid.fireEvent("bodyscroll",a.scrollLeft,a.scrollTop)},syncHeaderScroll:function(){var a=this.scroller.dom;this.innerHd.scrollLeft=a.scrollLeft;this.innerHd.scrollLeft=a.scrollLeft},updateSortIcon:function(b,a){var d=this.sortClasses;var c=this.mainHd.select("td").removeClass(d);c.item(b).addClass(d[a=="DESC"?1:0])},updateAllColumnWidths:function(){var d=this.getTotalWidth(),l=this.cm.getColumnCount(),g=[],e,b;for(b=0;b<l;b++){g[b]=this.getColumnWidth(b)}this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=d;this.mainBody.dom.style.width=d;for(b=0;b<l;b++){var c=this.getHeaderCell(b);c.style.width=g[b]}var k=this.getRows(),m,h;for(b=0,e=k.length;b<e;b++){m=k[b];m.style.width=d;if(m.firstChild){m.firstChild.style.width=d;h=m.firstChild.rows[0];for(var a=0;a<l;a++){h.childNodes[a].style.width=g[a]}}}this.onAllColumnWidthsUpdated(g,d)},updateColumnWidth:function(b,a){var j=this.getColumnWidth(b);var e=this.getTotalWidth();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=e;this.mainBody.dom.style.width=e;var d=this.getHeaderCell(b);d.style.width=j;var h=this.getRows(),k;for(var c=0,g=h.length;c<g;c++){k=h[c];k.style.width=e;if(k.firstChild){k.firstChild.style.width=e;k.firstChild.rows[0].childNodes[b].style.width=j}}this.onColumnWidthUpdated(b,j,e)},updateColumnHidden:function(a,e){var d=this.getTotalWidth();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=d;this.mainBody.dom.style.width=d;var h=e?"none":"";var c=this.getHeaderCell(a);c.style.display=h;var j=this.getRows(),k;for(var b=0,g=j.length;b<g;b++){k=j[b];k.style.width=d;if(k.firstChild){k.firstChild.style.width=d;k.firstChild.rows[0].childNodes[a].style.display=h}}this.onColumnHiddenUpdated(a,e,d);delete this.lastViewWidth;this.layout()},doRender:function(d,v,m,a,r,t){var e=this.templates,c=e.cell,y=e.row,o=r-1;var b="width:"+this.getTotalWidth()+";";var k=[],l=[],n={tstyle:b},q={},h,g;for(var s=0,w=v.length;s<w;s++){g=v[s];l=[];var p=s+a;for(var u=0;u<r;u++){h=d[u];q.id=h.id;q.css=u===0?"x-grid3-cell-first ":(u==o?"x-grid3-cell-last ":"");q.attr=q.cellAttr="";q.style=h.style;q.value=h.renderer.call(h.scope,g.data[h.name],q,g,p,u,m);if(Ext.isEmpty(q.value)){q.value="&#160;"}if(this.markDirty&&g.dirty&&Ext.isDefined(g.modified[h.name])){q.css+=" x-grid3-dirty-cell"}l[l.length]=c.apply(q)}var x=[];if(t&&((p+1)%2===0)){x[0]="x-grid3-row-alt"}if(g.dirty){x[1]=" x-grid3-dirty-row"}n.cols=r;if(this.getRowClass){x[2]=this.getRowClass(g,p,n,m)}n.alt=x.join(" ");n.cells=l.join("");k[k.length]=y.apply(n)}return k.join("")},processRows:function(b,g){if(!this.ds||this.ds.getCount()<1){return}var e=this.getRows(),a=e.length,c,d;g=g||!this.grid.stripeRows;b=b||0;for(c=0;c<a;c++){d=e[c];if(d){d.rowIndex=c;if(!g){d.className=d.className.replace(this.rowClsRe," ");if((c+1)%2===0){d.className+=" x-grid3-row-alt"}}}}if(b===0){Ext.fly(e[0]).addClass(this.firstRowCls)}Ext.fly(e[e.length-1]).addClass(this.lastRowCls)},afterRender:function(){if(!this.ds||!this.cm){return}this.mainBody.dom.innerHTML=this.renderRows()||"&#160;";this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText()}this.grid.fireEvent("viewready",this.grid)},renderUI:function(){var c=this.templates,e=this.renderHeaders(),a=c.body.apply({rows:"&#160;"});var b=c.master.apply({body:a,header:e,ostyle:"width:"+this.getOffsetWidth()+";",bstyle:"width:"+this.getTotalWidth()+";"});var d=this.grid;d.getGridEl().dom.innerHTML=b;this.initElements();Ext.fly(this.innerHd).on("click",this.handleHdDown,this);this.mainHd.on({scope:this,mouseover:this.handleHdOver,mouseout:this.handleHdOut,mousemove:this.handleHdMove});this.scroller.on("scroll",this.syncScroll,this);if(d.enableColumnResize!==false){this.splitZone=new Ext.grid.GridView.SplitDragZone(d,this.mainHd.dom)}if(d.enableColumnMove){this.columnDrag=new Ext.grid.GridView.ColumnDragZone(d,this.innerHd);this.columnDrop=new Ext.grid.HeaderDropZone(d,this.mainHd.dom)}if(d.enableHdMenu!==false){this.hmenu=new Ext.menu.Menu({id:d.id+"-hctx"});this.hmenu.add({itemId:"asc",text:this.sortAscText,cls:"xg-hmenu-sort-asc"},{itemId:"desc",text:this.sortDescText,cls:"xg-hmenu-sort-desc"});if(d.enableColumnHide!==false){this.colMenu=new Ext.menu.Menu({id:d.id+"-hcols-menu"});this.colMenu.on({scope:this,beforeshow:this.beforeColMenuShow,itemclick:this.handleHdMenuClick});this.hmenu.add("-",{itemId:"columns",hideOnClick:false,text:this.columnsText,menu:this.colMenu,iconCls:"x-cols-icon"})}this.hmenu.on("itemclick",this.handleHdMenuClick,this)}if(d.trackMouseOver){this.mainBody.on({scope:this,mouseover:this.onRowOver,mouseout:this.onRowOut})}if(d.enableDragDrop||d.enableDrag){this.dragZone=new Ext.grid.GridDragZone(d,{ddGroup:d.ddGroup||"GridDD"})}this.updateHeaderSortState()},processEvent:function(c,i){var d=i.getTarget(),h=this.grid,k=this.findHeaderIndex(d);h.fireEvent(c,i);if(k!==false){h.fireEvent("header"+c,h,k,i)}else{var j=this.findRowIndex(d),b,a;if(j!==false){h.fireEvent("row"+c,h,j,i);b=this.findCellIndex(d);if(b!==false){h.fireEvent("cell"+c,h,j,b,i)}else{a=this.findRowBody(d);if(a){h.fireEvent("rowbody"+c,h,j,i)}}}else{h.fireEvent("container"+c,h,i)}}},layout:function(){if(!this.mainBody){return}var d=this.grid;var i=d.getGridEl();var a=i.getSize(true);var b=a.width;if(!d.hideHeaders&&(b<20||a.height<20)){return}if(d.autoHeight){this.scroller.dom.style.overflow="visible";if(Ext.isWebKit){this.scroller.dom.style.position="static"}}else{this.el.setSize(a.width,a.height);var h=this.mainHd.getHeight();var e=a.height-(h);this.scroller.setSize(b,e);if(this.innerHd){this.innerHd.style.width=(b)+"px"}}if(this.forceFit){if(this.lastViewWidth!=b){this.fitColumns(false,false);this.lastViewWidth=b}}else{this.autoExpand();this.syncHeaderScroll()}this.onLayout(b,e)},onLayout:function(a,b){},onColumnWidthUpdated:function(c,a,b){},onAllColumnWidthsUpdated:function(a,b){},onColumnHiddenUpdated:function(b,c,a){},updateColumnText:function(a,b){},afterMove:function(a){},init:function(a){this.grid=a;this.initTemplates();this.initData(a.store,a.colModel);this.initUI(a)},getColumnId:function(a){return this.cm.getColumnId(a)},getOffsetWidth:function(){return(this.cm.getTotalWidth()+this.getScrollOffset())+"px"},getScrollOffset:function(){return Ext.num(this.scrollOffset,Ext.getScrollBarWidth())},renderHeaders:function(){var c=this.cm,h=this.templates,e=h.hcell,b=[],j={},a=c.getColumnCount(),g=a-1;for(var d=0;d<a;d++){j.id=c.getColumnId(d);j.value=c.getColumnHeader(d)||"";j.style=this.getColumnStyle(d,true);j.tooltip=this.getColumnTooltip(d);j.css=d===0?"x-grid3-cell-first ":(d==g?"x-grid3-cell-last ":"");if(c.config[d].align=="right"){j.istyle="padding-right:16px"}else{delete j.istyle}b[b.length]=e.apply(j)}return h.header.apply({cells:b.join(""),tstyle:"width:"+this.getTotalWidth()+";"})},getColumnTooltip:function(a){var b=this.cm.getColumnTooltip(a);if(b){if(Ext.QuickTips.isEnabled()){return'ext:qtip="'+b+'"'}else{return'title="'+b+'"'}}return""},beforeUpdate:function(){this.grid.stopEditing(true)},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();this.innerHd.firstChild.style.width=this.getOffsetWidth();this.innerHd.firstChild.firstChild.style.width=this.getTotalWidth()},focusRow:function(a){this.focusCell(a,0,false)},focusCell:function(c,a,b){this.syncFocusEl(this.ensureVisible(c,a,b));if(Ext.isGecko){this.focusEl.focus()}else{this.focusEl.focus.defer(1,this.focusEl)}},resolveCell:function(h,d,g){if(!Ext.isNumber(h)){h=h.rowIndex}if(!this.ds){return null}if(h<0||h>=this.ds.getCount()){return null}d=(d!==undefined?d:0);var c=this.getRow(h),a=this.cm,e=a.getColumnCount(),b;if(!(g===false&&d===0)){while(d<e&&a.isHidden(d)){d++}b=this.getCell(h,d)}return{row:c,cell:b}},getResolvedXY:function(a){if(!a){return null}var b=this.scroller.dom,e=a.cell,d=a.row;return e?Ext.fly(e).getXY():[this.el.getX(),Ext.fly(d).getY()]},syncFocusEl:function(d,a,c){var b=d;if(!Ext.isArray(b)){d=Math.min(d,Math.max(0,this.getRows().length-1));if(isNaN(d)){return}b=this.getResolvedXY(this.resolveCell(d,a,c))}this.focusEl.setXY(b||this.scroller.getXY())},ensureVisible:function(t,g,e){var r=this.resolveCell(t,g,e);if(!r||!r.row){return}var k=r.row,h=r.cell,n=this.scroller.dom,s=0,d=k,o=this.el.dom;while(d&&d!=o){s+=d.offsetTop;d=d.offsetParent}s-=this.mainHd.dom.offsetHeight;o=parseInt(n.scrollTop,10);var q=s+k.offsetHeight,a=n.clientHeight,m=o+a;if(s<o){n.scrollTop=s}else{if(q>m){n.scrollTop=q-a}}if(e!==false){var l=parseInt(h.offsetLeft,10);var j=l+h.offsetWidth;var i=parseInt(n.scrollLeft,10);var b=i+n.clientWidth;if(l<i){n.scrollLeft=l}else{if(j>b){n.scrollLeft=j-n.clientWidth}}}return this.getResolvedXY(r)},insertRows:function(a,i,e,h){var d=a.getCount()-1;if(!h&&i===0&&e>=d){this.fireEvent("beforerowsinserted",this,i,e);this.refresh();this.fireEvent("rowsinserted",this,i,e)}else{if(!h){this.fireEvent("beforerowsinserted",this,i,e)}var b=this.renderRows(i,e),g=this.getRow(i);if(g){if(i===0){Ext.fly(this.getRow(0)).removeClass(this.firstRowCls)}Ext.DomHelper.insertHtml("beforeBegin",g,b)}else{var c=this.getRow(d-1);if(c){Ext.fly(c).removeClass(this.lastRowCls)}Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,b)}if(!h){this.fireEvent("rowsinserted",this,i,e);this.processRows(i)}else{if(i===0||i>=d){Ext.fly(this.getRow(i)).addClass(i===0?this.firstRowCls:this.lastRowCls)}}}this.syncFocusEl(i)},deleteRows:function(a,c,b){if(a.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,c,b);this.removeRows(c,b);this.processRows(c);this.fireEvent("rowsdeleted",this,c,b)}},getColumnStyle:function(a,c){var b=!c?(this.cm.config[a].css||""):"";b+="width:"+this.getColumnWidth(a)+";";if(this.cm.isHidden(a)){b+="display:none;"}var d=this.cm.config[a].align;if(d){b+="text-align:"+d+";"}return b},getColumnWidth:function(b){var a=this.cm.getColumnWidth(b);if(Ext.isNumber(a)){return(Ext.isBorderBox||(Ext.isWebKit&&!Ext.isSafari2)?a:(a-this.borderWidth>0?a-this.borderWidth:0))+"px"}return a},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(d,h,j){var q=this.cm,k;var l=q.getTotalWidth(false);var a=this.grid.getGridEl().getWidth(true)-this.getScrollOffset();if(a<20){return}var e=a-l;if(e===0){return false}var m=q.getColumnCount(true);var s=m-(Ext.isNumber(j)?1:0);if(s===0){s=1;j=undefined}var r=q.getColumnCount();var o=[];var n=0;var c=0;var p;for(k=0;k<r;k++){if(!q.isHidden(k)&&!q.isFixed(k)&&k!==j){p=q.getColumnWidth(k);o.push(k);n=k;o.push(p);c+=p}}var b=(a-q.getTotalWidth())/c;while(o.length){p=o.pop();k=o.pop();q.setColumnWidth(k,Math.max(this.grid.minColumnWidth,Math.floor(p+p*b)),true)}if((l=q.getTotalWidth(false))>a){var g=s!=m?j:n;q.setColumnWidth(g,Math.max(1,q.getColumnWidth(g)-(l-a)),true)}if(d!==true){this.updateAllColumnWidths()}return true},autoExpand:function(b){var i=this.grid,a=this.cm;if(!this.userResized&&i.autoExpandColumn){var d=a.getTotalWidth(false);var j=this.grid.getGridEl().getWidth(true)-this.getScrollOffset();if(d!=j){var h=a.getIndexById(i.autoExpandColumn);var e=a.getColumnWidth(h);var c=Math.min(Math.max(((j-d)+e),i.autoExpandMin),i.autoExpandMax);if(c!=e){a.setColumnWidth(h,c,true);if(b!==true){this.updateColumnWidth(h,c)}}}}},getColumnData:function(){var d=[],a=this.cm,e=a.getColumnCount();for(var c=0;c<e;c++){var b=a.getDataIndex(c);d[c]={name:(!Ext.isDefined(b)?this.ds.fields.get(c).name:b),renderer:a.getRenderer(c),scope:a.getRendererScope(c),id:a.getColumnId(c),style:this.getColumnStyle(c)}}return d},renderRows:function(j,c){var d=this.grid,h=d.colModel,a=d.store,k=d.stripeRows;var i=h.getColumnCount();if(a.getCount()<1){return""}var e=this.getColumnData();j=j||0;c=!Ext.isDefined(c)?a.getCount()-1:c;var b=a.getRange(j,c);return this.doRender(e,b,a,j,i,k)},renderBody:function(){var a=this.renderRows()||"&#160;";return this.templates.body.apply({rows:a})},refreshRow:function(a){var c=this.ds,b;if(Ext.isNumber(a)){b=a;a=c.getAt(b);if(!a){return}}else{b=c.indexOf(a);if(b<0){return}}this.insertRows(c,b,b,true);this.getRow(b).rowIndex=b;this.onRemove(c,a,b+1,true);this.fireEvent("rowupdated",this,b,a)},refresh:function(b){this.fireEvent("beforerefresh",this);this.grid.stopEditing(true);var a=this.renderBody();this.mainBody.update(a).setWidth(this.getTotalWidth());if(b===true){this.updateHeaders();this.updateHeaderSortState()}this.processRows(0,true);this.layout();this.applyEmptyText();this.fireEvent("refresh",this)},applyEmptyText:function(){if(this.emptyText&&!this.hasRows()){this.mainBody.update('<div class="x-grid-empty">'+this.emptyText+"</div>")}},updateHeaderSortState:function(){var b=this.ds.getSortState();if(!b){return}if(!this.sortState||(this.sortState.field!=b.field||this.sortState.direction!=b.direction)){this.grid.fireEvent("sortchange",this.grid,b)}this.sortState=b;var c=this.cm.findColumnIndex(b.field);if(c!=-1){var a=b.direction;this.updateSortIcon(c,a)}},clearHeaderSortState:function(){if(!this.sortState){return}this.grid.fireEvent("sortchange",this.grid,null);this.mainHd.select("td").removeClass(this.sortClasses);delete this.sortState},destroy:function(){if(this.scrollToTopTask&&this.scrollToTopTask.cancel){this.scrollToTopTask.cancel()}if(this.colMenu){Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.destroy();delete this.colMenu}if(this.hmenu){Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.destroy();delete this.hmenu}this.initData(null,null);this.purgeListeners();Ext.fly(this.innerHd).un("click",this.handleHdDown,this);if(this.grid.enableColumnMove){Ext.destroy(this.columnDrag.el,this.columnDrag.proxy.ghost,this.columnDrag.proxy.el,this.columnDrop.el,this.columnDrop.proxyTop,this.columnDrop.proxyBottom,this.columnDrag.dragData.ddel,this.columnDrag.dragData.header);if(this.columnDrag.proxy.anim){Ext.destroy(this.columnDrag.proxy.anim)}delete this.columnDrag.proxy.ghost;delete this.columnDrag.dragData.ddel;delete this.columnDrag.dragData.header;this.columnDrag.destroy();delete Ext.dd.DDM.locationCache[this.columnDrag.id];delete this.columnDrag._domRef;delete this.columnDrop.proxyTop;delete this.columnDrop.proxyBottom;this.columnDrop.destroy();delete Ext.dd.DDM.locationCache["gridHeader"+this.grid.getGridEl().id];delete this.columnDrop._domRef;delete Ext.dd.DDM.ids[this.columnDrop.ddGroup]}if(this.splitZone){this.splitZone.destroy();delete this.splitZone._domRef;delete Ext.dd.DDM.ids["gridSplitters"+this.grid.getGridEl().id]}Ext.fly(this.innerHd).removeAllListeners();Ext.removeNode(this.innerHd);delete this.innerHd;Ext.destroy(this.el,this.mainWrap,this.mainHd,this.scroller,this.mainBody,this.focusEl,this.resizeMarker,this.resizeProxy,this.activeHdBtn,this.dragZone,this.splitZone,this._flyweight);delete this.grid.container;if(this.dragZone){this.dragZone.destroy()}Ext.dd.DDM.currentTarget=null;delete Ext.dd.DDM.locationCache[this.grid.getGridEl().id];Ext.EventManager.removeResizeListener(this.onWindowResize,this)},onDenyColumnHide:function(){},render:function(){if(this.autoFill){var a=this.grid.ownerCt;if(a&&a.getLayout()){a.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders()},this,{single:true})}else{this.fitColumns(true,true)}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.renderUI()},initData:function(b,a){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this);if(this.ds!==b&&this.ds.autoDestroy){this.ds.destroy()}}if(b){b.on({scope:this,load:this.onLoad,datachanged:this.onDataChange,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.onClear})}this.ds=b;if(this.cm){this.cm.un("configchange",this.onColConfigChange,this);this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this)}if(a){delete this.lastViewWidth;a.on({scope:this,configchange:this.onColConfigChange,widthchange:this.onColWidthChange,headerchange:this.onHeaderChange,hiddenchange:this.onHiddenChange,columnmoved:this.onColumnMove})}this.cm=a},onDataChange:function(){this.refresh();this.updateHeaderSortState();this.syncFocusEl(0)},onClear:function(){this.refresh();this.syncFocusEl(0)},onUpdate:function(b,a){this.refreshRow(a)},onAdd:function(c,a,b){this.insertRows(c,b,b+(a.length-1))},onRemove:function(d,a,b,c){if(c!==true){this.fireEvent("beforerowremoved",this,b,a)}this.removeRow(b);if(c!==true){this.processRows(b);this.applyEmptyText();this.fireEvent("rowremoved",this,b,a)}},onLoad:function(){if(Ext.isGecko){if(!this.scrollToTopTask){this.scrollToTopTask=new Ext.util.DelayedTask(this.scrollToTop,this)}this.scrollToTopTask.delay(1)}else{this.scrollToTop()}},onColWidthChange:function(a,b,c){this.updateColumnWidth(b,c)},onHeaderChange:function(a,b,c){this.updateHeaders()},onHiddenChange:function(a,b,c){this.updateColumnHidden(b,c)},onColumnMove:function(a,d,b){this.indexMap=null;var c=this.getScrollState();this.refresh(true);this.restoreScroll(c);this.afterMove(b);this.grid.fireEvent("columnmove",d,b)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(a){a.on("headerclick",this.onHeaderClick,this)},initEvents:function(){},onHeaderClick:function(b,a){if(this.headersDisabled||!this.cm.isSortable(a)){return}b.stopEditing(true);b.store.sort(this.cm.getDataIndex(a))},onRowOver:function(b,a){var c;if((c=this.findRowIndex(a))!==false){this.addRowClass(c,"x-grid3-row-over")}},onRowOut:function(b,a){var c;if((c=this.findRowIndex(a))!==false&&!b.within(this.getRow(c),true)){this.removeRowClass(c,"x-grid3-row-over")}},handleWheel:function(a){a.stopPropagation()},onRowSelect:function(a){this.addRowClass(a,this.selectedRowClass)},onRowDeselect:function(a){this.removeRowClass(a,this.selectedRowClass)},onCellSelect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).addClass("x-grid3-cell-selected")}},onCellDeselect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).removeClass("x-grid3-cell-selected")}},onColumnSplitterMoved:function(c,b){this.userResized=true;var a=this.grid.colModel;a.setColumnWidth(c,b,true);if(this.forceFit){this.fitColumns(true,false,c);this.updateAllColumnWidths()}else{this.updateColumnWidth(c,b);this.syncHeaderScroll()}this.grid.fireEvent("columnresize",c,b)},handleHdMenuClick:function(c){var b=this.hdCtxIndex,a=this.cm,d=this.ds,e=c.getItemId();switch(e){case"asc":d.sort(a.getDataIndex(b),"ASC");break;case"desc":d.sort(a.getDataIndex(b),"DESC");break;default:b=a.getIndexById(e.substr(4));if(b!=-1){if(c.checked&&a.getColumnsBy(this.isHideableColumn,this).length<=1){this.onDenyColumnHide();return false}a.setHidden(b,c.checked)}}return true},isHideableColumn:function(a){return !a.hidden},beforeColMenuShow:function(){var a=this.cm,c=a.getColumnCount();this.colMenu.removeAll();for(var b=0;b<c;b++){if(a.config[b].hideable!==false){this.colMenu.add(new Ext.menu.CheckItem({itemId:"col-"+a.getColumnId(b),text:a.getColumnHeader(b),checked:!a.isHidden(b),hideOnClick:false,disabled:a.config[b].hideable===false}))}}},handleHdDown:function(h,d){if(Ext.fly(d).hasClass("x-grid3-hd-btn")){h.stopEvent();var g=this.findHeaderCell(d);Ext.fly(g).addClass("x-grid3-hd-menu-open");var c=this.getCellIndex(g);this.hdCtxIndex=c;var b=this.hmenu.items,a=this.cm;b.get("asc").setDisabled(!a.isSortable(c));b.get("desc").setDisabled(!a.isSortable(c));this.hmenu.on("hide",function(){Ext.fly(g).removeClass("x-grid3-hd-menu-open")},this,{single:true});this.hmenu.show(d,"tl-bl?")}},handleHdOver:function(d,a){var c=this.findHeaderCell(a);if(c&&!this.headersDisabled){this.activeHdRef=a;this.activeHdIndex=this.getCellIndex(c);var b=this.fly(c);this.activeHdRegion=b.getRegion();if(!this.cm.isMenuDisabled(this.activeHdIndex)){b.addClass("x-grid3-hd-over");this.activeHdBtn=b.child(".x-grid3-hd-btn");if(this.activeHdBtn){this.activeHdBtn.dom.style.height=(c.firstChild.offsetHeight-1)+"px"}}}},handleHdMove:function(i,d){var h=this.findHeaderCell(this.activeHdRef);if(h&&!this.headersDisabled){var b=this.splitHandleWidth||5,g=this.activeHdRegion,a=i.getPageX(),c=h.style,j="";if(this.grid.enableColumnResize!==false){if(a-g.left<=b&&this.cm.isResizable(this.activeHdIndex-1)){j=Ext.isAir?"move":Ext.isWebKit?"e-resize":"col-resize"}else{if(g.right-a<=(!this.activeHdBtn?b:2)&&this.cm.isResizable(this.activeHdIndex)){j=Ext.isAir?"move":Ext.isWebKit?"w-resize":"col-resize"}}}c.cursor=j}},handleHdOut:function(c,a){var b=this.findHeaderCell(a);if(b&&(!Ext.isIE||!c.within(b,true))){this.activeHdRef=null;this.fly(b).removeClass("x-grid3-hd-over");b.style.cursor=""}},hasRows:function(){var a=this.mainBody.dom.firstChild;return a&&a.nodeType==1&&a.className!="x-grid-empty"},bind:function(a,b){this.initData(a,b)}});Ext.grid.GridView.SplitDragZone=Ext.extend(Ext.dd.DDProxy,{constructor:function(a,b){this.grid=a;this.view=a.getView();this.marker=this.view.resizeMarker;this.proxy=this.view.resizeProxy;Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,b,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.scroll=false;this.hw=this.view.splitHandleWidth||5},b4StartDrag:function(a,e){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var d=this.view.mainWrap.getHeight();this.marker.setHeight(d);this.marker.show();this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]);this.proxy.setHeight(d);var b=this.cm.getColumnWidth(this.cellIndex),c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,e)},allowHeaderDrag:function(a){return true},handleMouseDown:function(a){var i=this.view.findHeaderCell(a.getTarget());if(i&&this.allowHeaderDrag(a)){var l=this.view.fly(i).getXY(),d=l[0],c=l[1],j=a.getXY(),b=j[0],h=i.offsetWidth,g=false;if((b-d)<=this.hw){g=-1}else{if((d+h)-b<=this.hw){g=0}}if(g!==false){this.cm=this.grid.colModel;var k=this.view.getCellIndex(i);if(g==-1){if(k+g<0){return}while(this.cm.isHidden(k+g)){--g;if(k+g<0){return}}}this.cellIndex=k+g;this.split=i.dom;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}else{if(this.view.columnDrag){this.view.columnDrag.callHandleMouseDown(a)}}}},endDrag:function(g){this.marker.hide();var a=this.view,c=Math.max(this.minX,g.getPageX()),d=c-this.startPos,b=this.dragHeadersDisabled;a.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+d);setTimeout(function(){a.headersDisabled=b},50)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.HeaderDragZone=Ext.extend(Ext.dd.DragZone,{maxDragWidth:120,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,c);if(b){this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b))}this.scroll=false},getDragData:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findHeaderCell(a);if(b){return{ddel:b.firstChild,header:b}}return false},onInitDrag:function(a){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var b=this.dragData.ddel.cloneNode(true);b.id=Ext.id();b.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(b);return true},afterValidDrop:function(){this.completeDrop()},afterInvalidDrop:function(){this.completeDrop()},completeDrop:function(){var a=this.view,b=this.dragHeadersDisabled;setTimeout(function(){a.headersDisabled=b},50)}});Ext.grid.HeaderDropZone=Ext.extend(Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:"&#160;"},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:"&#160;"},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,a.getGridEl().dom)},getTargetFromEvent:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findCellIndex(a);if(b!==false){return this.view.getHeaderCell(b)}},nextVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.nextSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.nextSibling}return null},prevVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.prevSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.prevSibling}return null},positionIndicator:function(d,k,j){var a=Ext.lib.Event.getPageX(j),g=Ext.lib.Dom.getRegion(k.firstChild),c,i,b=g.top+this.proxyOffsets[1];if((g.right-a)<=(g.right-g.left)/2){c=g.right+this.view.borderWidth;i="after"}else{c=g.left;i="before"}if(this.grid.colModel.isFixed(this.view.getCellIndex(k))){return false}c+=this.proxyOffsets[0];this.proxyTop.setLeftTop(c,b);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(c,b+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return i},onNodeEnter:function(d,a,c,b){if(b.header!=d){this.positionIndicator(b.header,d,c)}},onNodeOver:function(g,b,d,c){var a=false;if(c.header!=g){a=this.positionIndicator(c.header,g,d)}if(!a){this.proxyTop.hide();this.proxyBottom.hide()}return a?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(d,a,c,b){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(b,m,g,c){var d=c.header;if(d!=b){var k=this.grid.colModel,j=Ext.lib.Event.getPageX(g),a=Ext.lib.Dom.getRegion(b.firstChild),o=(a.right-j)<=((a.right-a.left)/2)?"after":"before",i=this.view.getCellIndex(d),l=this.view.getCellIndex(b);if(o=="after"){l++}if(i<l){l--}k.moveColumn(i,l);return true}return false}});Ext.grid.GridView.ColumnDragZone=Ext.extend(Ext.grid.HeaderDragZone,{constructor:function(a,b){Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this,a,b,null);this.proxy.el.addClass("x-grid3-col-dd")},handleMouseDown:function(a){},callHandleMouseDown:function(a){Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this,a)}});Ext.grid.SplitDragZone=Ext.extend(Ext.dd.DDProxy,{fly:Ext.Element.fly,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.proxy=this.view.resizeProxy;Ext.grid.SplitDragZone.superclass.constructor.call(this,c,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b));this.scroll=false},b4StartDrag:function(a,d){this.view.headersDisabled=true;this.proxy.setHeight(this.view.mainWrap.getHeight());var b=this.cm.getColumnWidth(this.cellIndex);var c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,d)},handleMouseDown:function(c){var b=Ext.EventObject.setEvent(c);var a=this.fly(b.getTarget());if(a.hasClass("x-grid-split")){this.cellIndex=this.view.getCellIndex(a.dom);this.split=a.dom;this.cm=this.grid.colModel;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}},endDrag:function(c){this.view.headersDisabled=false;var a=Math.max(this.minX,Ext.lib.Event.getPageX(c));var b=a-this.startPos;this.view.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+b)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.GridDragZone=function(b,a){this.view=b.getView();Ext.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,a);this.scroll=false;this.grid=b;this.ddel=document.createElement("div");this.ddel.className="x-grid-dd-wrap"};Ext.extend(Ext.grid.GridDragZone,Ext.dd.DragZone,{ddGroup:"GridDD",getDragData:function(b){var a=Ext.lib.Event.getTarget(b);var d=this.view.findRowIndex(a);if(d!==false){var c=this.grid.selModel;if(!c.isSelected(d)||b.hasModifier()){c.handleMouseDown(this.grid,d,b)}return{grid:this.grid,ddel:this.ddel,rowIndex:d,selections:c.getSelections()}}return false},onInitDrag:function(b){var a=this.dragData;this.ddel.innerHTML=this.grid.getDragDropText();this.proxy.update(this.ddel)},afterRepair:function(){this.dragging=false},getRepairXY:function(b,a){return false},onEndDrag:function(a,b){},onValidDrop:function(a,b,c){this.hideProxy()},beforeInvalidDrop:function(a,b){}});Ext.grid.ColumnModel=Ext.extend(Ext.util.Observable,{defaultWidth:100,defaultSortable:false,constructor:function(a){if(a.columns){Ext.apply(this,a);this.setConfig(a.columns,true)}else{this.setConfig(a,true)}this.addEvents("widthchange","headerchange","hiddenchange","columnmoved","configchange");Ext.grid.ColumnModel.superclass.constructor.call(this)},getColumnId:function(a){return this.config[a].id},getColumnAt:function(a){return this.config[a]},setConfig:function(d,b){var e,h,a;if(!b){delete this.totalWidth;for(e=0,a=this.config.length;e<a;e++){h=this.config[e];if(h.setEditor){h.setEditor(null)}}}this.defaults=Ext.apply({width:this.defaultWidth,sortable:this.defaultSortable},this.defaults);this.config=d;this.lookup={};for(e=0,a=d.length;e<a;e++){h=Ext.applyIf(d[e],this.defaults);if(Ext.isEmpty(h.id)){h.id=e}if(!h.isColumn){var g=Ext.grid.Column.types[h.xtype||"gridcolumn"];h=new g(h);d[e]=h}this.lookup[h.id]=h}if(!b){this.fireEvent("configchange",this)}},getColumnById:function(a){return this.lookup[a]},getIndexById:function(c){for(var b=0,a=this.config.length;b<a;b++){if(this.config[b].id==c){return b}}return -1},moveColumn:function(d,a){var b=this.config[d];this.config.splice(d,1);this.config.splice(a,0,b);this.dataMap=null;this.fireEvent("columnmoved",this,d,a)},getColumnCount:function(d){if(d===true){var e=0;for(var b=0,a=this.config.length;b<a;b++){if(!this.isHidden(b)){e++}}return e}return this.config.length},getColumnsBy:function(e,d){var g=[];for(var b=0,a=this.config.length;b<a;b++){var h=this.config[b];if(e.call(d||this,h,b)===true){g[g.length]=h}}return g},isSortable:function(a){return !!this.config[a].sortable},isMenuDisabled:function(a){return !!this.config[a].menuDisabled},getRenderer:function(a){if(!this.config[a].renderer){return Ext.grid.ColumnModel.defaultRenderer}return this.config[a].renderer},getRendererScope:function(a){return this.config[a].scope},setRenderer:function(a,b){this.config[a].renderer=b},getColumnWidth:function(a){return this.config[a].width},setColumnWidth:function(b,c,a){this.config[b].width=c;this.totalWidth=null;if(!a){this.fireEvent("widthchange",this,b,c)}},getTotalWidth:function(b){if(!this.totalWidth){this.totalWidth=0;for(var c=0,a=this.config.length;c<a;c++){if(b||!this.isHidden(c)){this.totalWidth+=this.getColumnWidth(c)}}}return this.totalWidth},getColumnHeader:function(a){return this.config[a].header},setColumnHeader:function(a,b){this.config[a].header=b;this.fireEvent("headerchange",this,a,b)},getColumnTooltip:function(a){return this.config[a].tooltip},setColumnTooltip:function(a,b){this.config[a].tooltip=b},getDataIndex:function(a){return this.config[a].dataIndex},setDataIndex:function(a,b){this.config[a].dataIndex=b},findColumnIndex:function(d){var e=this.config;for(var b=0,a=e.length;b<a;b++){if(e[b].dataIndex==d){return b}}return -1},isCellEditable:function(b,e){var d=this.config[b],a=d.editable;return !!(a||(!Ext.isDefined(a)&&d.editor))},getCellEditor:function(a,b){return this.config[a].getCellEditor(b)},setEditable:function(a,b){this.config[a].editable=b},isHidden:function(a){return !!this.config[a].hidden},isFixed:function(a){return !!this.config[a].fixed},isResizable:function(a){return a>=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){this.config[a].setEditor(b)},destroy:function(){var d;for(var b=0,a=this.config.length;b<a;b++){d=this.config[b];if(d.setEditor){d.setEditor(null)}}this.purgeListeners()}});Ext.grid.ColumnModel.defaultRenderer=function(a){if(typeof a=="string"&&a.length<1){return"&#160;"}return a};Ext.grid.AbstractSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(){this.locked=false;Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)},init:function(a){this.grid=a;if(this.lockOnInit){delete this.lockOnInit;this.locked=false;this.lock()}this.initEvents()},lock:function(){if(!this.locked){this.locked=true;var a=this.grid;if(a){a.getView().on({scope:this,beforerefresh:this.sortUnLock,refresh:this.sortLock})}else{this.lockOnInit=true}}},sortLock:function(){this.locked=true},sortUnLock:function(){this.locked=false},unlock:function(){if(this.locked){this.locked=false;var a=this.grid,b;if(a){b=a.getView();b.un("beforerefresh",this.sortUnLock,this);b.un("refresh",this.sortLock,this)}else{delete this.lockOnInit}}},isLocked:function(){return this.locked},destroy:function(){this.unlock();this.purgeListeners()}});Ext.grid.RowSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{singleSelect:false,constructor:function(a){Ext.apply(this,a);this.selections=new Ext.util.MixedCollection(false,function(b){return b.id});this.last=false;this.lastActive=false;this.addEvents("selectionchange","beforerowselect","rowselect","rowdeselect");Ext.grid.RowSelectionModel.superclass.constructor.call(this)},initEvents:function(){if(!this.grid.enableDragDrop&&!this.grid.enableDrag){this.grid.on("rowmousedown",this.handleMouseDown,this)}this.rowNav=new Ext.KeyNav(this.grid.getGridEl(),{up:function(b){if(!b.shiftKey||this.singleSelect){this.selectPrevious(false)}else{if(this.last!==false&&this.lastActive!==false){var a=this.last;this.selectRange(this.last,this.lastActive-1);this.grid.getView().focusRow(this.lastActive);if(a!==false){this.last=a}}else{this.selectFirstRow()}}},down:function(b){if(!b.shiftKey||this.singleSelect){this.selectNext(false)}else{if(this.last!==false&&this.lastActive!==false){var a=this.last;this.selectRange(this.last,this.lastActive+1);this.grid.getView().focusRow(this.lastActive);if(a!==false){this.last=a}}else{this.selectFirstRow()}}},scope:this});this.grid.getView().on({scope:this,refresh:this.onRefresh,rowupdated:this.onRowUpdated,rowremoved:this.onRemove})},onRefresh:function(){var g=this.grid.store,b;var d=this.getSelections();this.clearSelections(true);for(var c=0,a=d.length;c<a;c++){var e=d[c];if((b=g.indexOfId(e.id))!=-1){this.selectRow(b,true)}}if(d.length!=this.selections.getCount()){this.fireEvent("selectionchange",this)}},onRemove:function(a,b,c){if(this.selections.remove(c)!==false){this.fireEvent("selectionchange",this)}},onRowUpdated:function(a,b,c){if(this.isSelected(c)){a.onRowSelect(b)}},selectRecords:function(b,e){if(!e){this.clearSelections()}var d=this.grid.store;for(var c=0,a=b.length;c<a;c++){this.selectRow(d.indexOf(b[c]),true)}},getCount:function(){return this.selections.length},selectFirstRow:function(){this.selectRow(0)},selectLastRow:function(a){this.selectRow(this.grid.store.getCount()-1,a)},selectNext:function(a){if(this.hasNext()){this.selectRow(this.last+1,a);this.grid.getView().focusRow(this.last);return true}return false},selectPrevious:function(a){if(this.hasPrevious()){this.selectRow(this.last-1,a);this.grid.getView().focusRow(this.last);return true}return false},hasNext:function(){return this.last!==false&&(this.last+1)<this.grid.store.getCount()},hasPrevious:function(){return !!this.last},getSelections:function(){return[].concat(this.selections.items)},getSelected:function(){return this.selections.itemAt(0)},each:function(e,d){var c=this.getSelections();for(var b=0,a=c.length;b<a;b++){if(e.call(d||this,c[b],b)===false){return false}}return true},clearSelections:function(a){if(this.isLocked()){return}if(a!==true){var c=this.grid.store;var b=this.selections;b.each(function(d){this.deselectRow(c.indexOfId(d.id))},this);b.clear()}else{this.selections.clear()}this.last=false},selectAll:function(){if(this.isLocked()){return}this.selections.clear();for(var b=0,a=this.grid.store.getCount();b<a;b++){this.selectRow(b,true)}},hasSelection:function(){return this.selections.length>0},isSelected:function(a){var b=Ext.isNumber(a)?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,i,h){if(h.button!==0||this.isLocked()){return}var a=this.grid.getView();if(h.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,i,h.ctrlKey);this.last=c;a.focusRow(i)}else{var b=this.isSelected(i);if(h.ctrlKey&&b){this.deselectRow(i)}else{if(!b||this.getCount()>1){this.selectRow(i,h.ctrlKey||h.shiftKey);a.focusRow(i)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b<a;b++){this.selectRow(c[b],true)}},selectRange:function(b,a,d){var c;if(this.isLocked()){return}if(!d){this.clearSelections()}if(b<=a){for(c=b;c<=a;c++){this.selectRow(c,true)}}else{for(c=b;c>=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},restoreLast:function(){if(this._last){this.last=this._last}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(n,l){var d=l.getKey(),h,i=this.grid,o=i.lastEdit,j=i.activeEditor,p,o,a,m;var b=l.shiftKey;if(d==l.TAB){l.stopEvent();j.completeEdit();if(b){h=i.walkCells(j.row,j.col-1,-1,this.acceptsNav,this)}else{h=i.walkCells(j.row,j.col+1,1,this.acceptsNav,this)}}else{if(d==l.ENTER){if(this.moveEditorOnEnter!==false){if(b){h=i.walkCells(o.row-1,o.col,-1,this.acceptsNav,this)}else{h=i.walkCells(o.row+1,o.col,1,this.acceptsNav,this)}}}}if(h){a=h[0];m=h[1];if(o.row!=a){this.selectRow(a)}if(i.isEditor&&i.editing){p=i.activeEditor;if(p&&p.field.triggerBlur){p.field.triggerBlur()}}i.startEditing(a,m)}},destroy:function(){if(this.rowNav){this.rowNav.disable();this.rowNav=null}Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=Ext.extend(Object,{isColumn:true,constructor:function(b){Ext.apply(this,b);if(Ext.isString(this.renderer)){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}if(!this.scope){this.scope=this}var a=this.editor;delete this.editor;this.setEditor(a)},renderer:function(a){if(Ext.isString(a)&&a.length<1){return"&#160;"}return a},getEditor:function(a){return this.editable!==false?this.editor:null},setEditor:function(b){var a=this.editor;if(a){if(a.gridEditor){a.gridEditor.destroy();delete a.gridEditor}else{a.destroy()}}this.editor=null;if(b){if(!b.isXType){b=Ext.create(b,"textfield")}this.editor=b}},getCellEditor:function(b){var a=this.getEditor(b);if(a){if(!a.startEdit){if(!a.gridEditor){a.gridEditor=new Ext.grid.GridEditor(a)}a=a.gridEditor}}return a}});Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=(!Ext.isPrimitive(this.tpl)&&this.tpl.compile)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn};Ext.grid.RowNumberer=Ext.extend(Object,{header:"",width:23,sortable:false,constructor:function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}},fixed:true,hideable:false,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}});Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'<div class="x-grid3-hd-checker">&#160;</div>',width:20,sortable:false,menuDisabled:true,fixed:true,hideable:false,dataIndex:"",id:"checker",constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){var a=this.grid.getView();a.mainBody.on("mousedown",this.onMouseDown,this);Ext.fly(a.innerHd).on("mousedown",this.onHdMouseDown,this)},this)},handleMouseDown:function(){Ext.grid.CheckboxSelectionModel.superclass.handleMouseDown.apply(this,arguments);this.mouseHandled=true},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(!this.mouseHandled&&d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true);this.grid.getView().focusRow(a)}}}this.mouseHandled=false},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'<div class="x-grid3-row-checker">&#160;</div>'}});Ext.grid.CellSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{constructor:function(a){Ext.apply(this,a);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)},initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.on(Ext.EventManager.useKeydown?"keydown":"keypress",this.handleKeyDown,this);this.grid.getView().on({scope:this,refresh:this.onViewChange,rowupdated:this.onRowUpdated,beforerowremoved:this.clearSelections,beforerowsinserted:this.clearSelections});if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(a){this.select(a.row,a.column,false,true,a.record)},onRowUpdated:function(a,b,c){if(this.selection&&this.selection.record==c){a.onCellSelect(b,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(b){var a=this.selection;if(a){if(b!==true){this.grid.view.onCellDeselect(a.cell[0],a.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(b,d,a,c){if(c.button!==0||this.isLocked()){return}this.select(d,a)},select:function(g,c,b,e,d){if(this.fireEvent("beforecellselect",this,g,c)!==false){this.clearSelections();d=d||this.grid.store.getAt(g);this.selection={record:d,cell:[g,c]};if(!b){var a=this.grid.getView();a.onCellSelect(g,c);if(e!==true){a.focusCell(g,c)}}this.fireEvent("cellselect",this,g,c);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(c,b,a){return !a.isHidden(b)},onEditorKey:function(b,a){if(a.getKey()==a.TAB){this.handleKeyDown(a)}},handleKeyDown:function(j){if(!j.isNavKeyPress()){return}var d=j.getKey(),i=this.grid,p=this.selection,b=this,m=function(g,c,e){return i.walkCells(g,c,e,i.isEditor&&i.editing?b.acceptsNav:b.isSelectable,b)},o,h,a,l,n;switch(d){case j.ESC:case j.PAGE_UP:case j.PAGE_DOWN:break;default:j.stopEvent();break}if(!p){o=m(0,0,1);if(o){this.select(o[0],o[1])}return}o=p.cell;a=o[0];l=o[1];switch(d){case j.TAB:if(j.shiftKey){h=m(a,l-1,-1)}else{h=m(a,l+1,1)}break;case j.DOWN:h=m(a+1,l,1);break;case j.UP:h=m(a-1,l,-1);break;case j.RIGHT:h=m(a,l+1,1);break;case j.LEFT:h=m(a,l-1,-1);break;case j.ENTER:if(i.isEditor&&!i.editing){i.startEditing(a,l);return}break}if(h){a=h[0];l=h[1];this.select(a,l);if(i.isEditor&&i.editing){n=i.activeEditor;if(n&&n.field.triggerBlur){n.field.triggerBlur()}i.startEditing(a,l)}}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)}});Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:false,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.getGridEl().on("mousewheel",this.stopEditing.createDelegate(this,[true]),this);this.on("columnresize",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{var a=this.getView();if(this.clicksToEdit=="auto"&&a.mainBody){a.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}},onResize:function(){Ext.grid.EditorGridPanel.superclass.onResize.apply(this,arguments);var a=this.activeEditor;if(this.editing&&a){a.realign(true)}},onCellDblClick:function(b,c,a){this.startEditing(c,a)},onAutoEditClick:function(c,b){if(c.button!==0){return}var g=this.view.findRowIndex(b),a=this.view.findCellIndex(b);if(g!==false&&a!==false){this.stopEditing();if(this.selModel.getSelectedCell){var d=this.selModel.getSelectedCell();if(d&&d[0]===g&&d[1]===a){this.startEditing(g,a)}}else{if(this.selModel.isSelected(g)){this.startEditing(g,a)}}}},onEditComplete:function(b,d,a){this.editing=false;this.lastActiveEditor=this.activeEditor;this.activeEditor=null;var c=b.record,h=this.colModel.getDataIndex(b.col);d=this.postEditValue(d,a,c,h);if(this.forceValidation===true||String(d)!==String(a)){var g={grid:this,record:c,field:h,originalValue:a,value:d,row:b.row,column:b.col,cancel:false};if(this.fireEvent("validateedit",g)!==false&&!g.cancel&&String(d)!==String(a)){c.set(h,g.value);delete g.cancel;this.fireEvent("afteredit",g)}}this.view.focusCell(b.row,b.col)},startEditing:function(i,c){this.stopEditing();if(this.colModel.isCellEditable(c,i)){this.view.ensureVisible(i,c,true);var d=this.store.getAt(i),h=this.colModel.getDataIndex(c),g={grid:this,record:d,field:h,value:d.data[h],row:i,column:c,cancel:false};if(this.fireEvent("beforeedit",g)!==false&&!g.cancel){this.editing=true;var b=this.colModel.getCellEditor(c,i);if(!b){return}if(!b.rendered){b.parentEl=this.view.getEditorParent(b);b.on({scope:this,render:{fn:function(e){e.field.focus(false,true)},single:true,scope:this},specialkey:function(k,j){this.getSelectionModel().onEditorKey(k,j)},complete:this.onEditComplete,canceledit:this.stopEditing.createDelegate(this,[true])})}Ext.apply(b,{row:i,col:c,record:d});this.lastEdit={row:i,col:c};this.activeEditor=b;b.selectSameEditor=(this.activeEditor==this.lastActiveEditor);var a=this.preEditValue(d,h);b.startEdit(this.view.getCell(i,c).firstChild,Ext.isDefined(a)?a:"");(function(){delete b.selectSameEditor}).defer(50)}}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&Ext.isString(b)?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&Ext.isString(c)?Ext.util.Format.htmlEncode(c):c},stopEditing:function(b){if(this.editing){var a=this.lastActiveEditor=this.activeEditor;if(a){a[b===true?"cancelEdit":"completeEdit"]();this.view.focusCell(a.row,a.col)}this.activeEditor=null}this.editing=false}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(b,a){Ext.grid.GridEditor.superclass.constructor.call(this,b,a);b.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=Ext.extend(Ext.util.Observable,{constructor:function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)},setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)},setValue:function(d,c,a){var b=this.getRec(d);if(b){b.set("value",c);this.source[d]=c}else{if(a){this.source[d]=c;b=new Ext.grid.PropertyRecord({name:d,value:c},d);this.store.add(b)}}},remove:function(b){var a=this.getRec(b);if(a){this.store.remove(a);delete this.source[b]}},getRec:function(a){return this.store.getById(a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=Ext.extend(Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",constructor:function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:this.trueText},{tag:"option",value:"false",html:this.falseText}]},getValue:function(){return this.el.dom.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a,{autoSize:"both"})};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)},renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return this[a?"trueText":"falseText"]},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(d,b,c){var a=this.grid.customRenderers[c.get("name")];if(a){return a.apply(this,arguments)}var e=d;if(Ext.isDate(d)){e=this.renderDate(d)}else{if(typeof d=="boolean"){e=this.renderBool(d)}}return Ext.util.Format.htmlEncode(e)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);for(var a in this.editors){Ext.destroy(this.editors[a])}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customRenderers=this.customRenderers||{};this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.reg("propertygrid",Ext.grid.PropertyGrid);Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",groupMode:"value",initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('<div id="{groupId}" class="x-grid-group {cls}">','<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">',this.groupTextTpl,"</div></div>",'<div id="{groupId}-bd" class="x-grid-group-body">')}this.startGroup.compile();if(!this.endGroup){this.endGroup="</div></div>"}},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(d,a,b){if(this.canGroup()&&!this.ignoreAdd){var c=this.getScrollState();this.fireEvent("beforerowsinserted",d,b,b+(a.length-1));this.refresh();this.restoreScroll(c);this.fireEvent("rowsinserted",d,b,b+(a.length-1))}else{if(!this.canGroup()){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(this.enableGrouping,true)}},renderUI:function(){Ext.grid.GroupingView.superclass.renderUI.call(this);this.mainBody.on("mousedown",this.interceptMouse,this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}},processEvent:function(b,h){Ext.grid.GroupingView.superclass.processEvent.call(this,b,h);var g=h.getTarget(".x-grid-group-hd",this.mainBody);if(g){var d=this.getGroupField(),c=this.getPrefix(d),a=g.id.substring(c.length);a=a.substr(0,a.length-3);if(a){this.grid.fireEvent("group"+b,this.grid,d,a,h)}}},onGroupByClick:function(){this.enableGrouping=true;this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));this.grid.fireEvent("groupchange",this,this.grid.store.getGroupState());this.beforeMenuShow();this.refresh()},onShowGroupsClick:function(a,b){this.enableGrouping=b;if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping();this.grid.fireEvent("groupchange",this,null)}},toggleRowIndex:function(c,a){if(!this.canGroup()){return}var b=this.getRow(c);if(b){this.toggleGroup(this.findGroup(b),a)}},toggleGroup:function(c,b){var a=Ext.get(c);b=Ext.isDefined(b)?b:a.hasClass("x-grid-group-collapsed");if(this.state[a.id]!==b){this.grid.stopEditing(true);this.state[a.id]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")}},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d<a;d++){this.toggleGroup(b[d],c)}},expandAllGroups:function(){this.toggleAllGroups(true)},collapseAllGroups:function(){this.toggleAllGroups(false)},interceptMouse:function(b){var a=b.getTarget(".x-grid-group-hd",this.mainBody);if(a){b.stopEvent();this.toggleGroup(a.parentNode)}},getGroup:function(a,d,h,i,b,e){var c=h?h(a,{},d,i,b,e):String(a);if(c===""||c==="&#160;"){c=this.cm.config[b].emptyGroupText||this.emptyGroupText}return c},getGroupField:function(){return this.grid.store.getGroupState()},afterRender:function(){if(!this.ds||!this.cm){return}Ext.grid.GroupingView.superclass.afterRender.call(this);if(this.grid.deferRowRender){this.updateGroupWidths()}},renderRows:function(){var a=this.getGroupField();var e=!!a;if(this.hideGroupedColumn){var b=this.cm.findColumnIndex(a),d=Ext.isDefined(this.lastGroupField);if(!e&&d){this.mainBody.update("");this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField),false);delete this.lastGroupField}else{if(e&&!d){this.lastGroupField=a;this.cm.setHidden(b,true)}else{if(e&&d&&a!==this.lastGroupField){this.mainBody.update("");var c=this.cm.findColumnIndex(this.lastGroupField);this.cm.setHidden(c,false);this.lastGroupField=a;this.cm.setHidden(b,true)}}}}return Ext.grid.GroupingView.superclass.renderRows.apply(this,arguments)},doRender:function(c,h,q,a,p,s){if(h.length<1){return""}if(!this.canGroup()||this.isUpdating){return Ext.grid.GroupingView.superclass.doRender.apply(this,arguments)}var z=this.getGroupField(),o=this.cm.findColumnIndex(z),w,j="width:"+this.getTotalWidth()+";",e=this.cm.config[o],b=e.groupRenderer||e.renderer,t=this.showGroupName?(e.groupName||e.header)+": ":"",y=[],l,u,v,n;for(u=0,v=h.length;u<v;u++){var k=a+u,m=h[u],d=m.data[z];w=this.getGroup(d,m,b,k,o,q);if(!l||l.group!=w){n=this.constructId(d,z,o);this.state[n]=!(Ext.isDefined(this.state[n])?!this.state[n]:this.startCollapsed);l={group:w,gvalue:d,text:t+w,groupId:n,startRow:k,rs:[m],cls:this.state[n]?"":"x-grid-group-collapsed",style:j};y.push(l)}else{l.rs.push(m)}m._groupId=n}var x=[];for(u=0,v=y.length;u<v;u++){w=y[u];this.doGroupStart(x,w,c,q,p);x[x.length]=Ext.grid.GroupingView.superclass.doRender.call(this,c,w.rs,q,w.startRow,p,s);this.doGroupEnd(x,w,c,q,p)}return x.join("")},getGroupId:function(a){var b=this.getGroupField();return this.constructId(a,b,this.cm.findColumnIndex(b))},constructId:function(c,e,a){var b=this.cm.config[a],d=b.groupRenderer||b.renderer,g=(this.groupMode=="value")?c:this.getGroup(c,{data:{}},d,0,a,this.ds);return this.getPrefix(e)+Ext.util.Format.htmlEncode(g)},canGroup:function(){return this.enableGrouping&&!!this.getGroupField()},getPrefix:function(a){return this.grid.getGridEl().id+"-gp-"+a+"-"},doGroupStart:function(a,d,b,e,c){a[a.length]=this.startGroup.apply(d)},doGroupEnd:function(a,d,b,e,c){a[a.length]=this.endGroup},getRows:function(){if(!this.canGroup()){return Ext.grid.GroupingView.superclass.getRows.call(this)}var k=[],c=this.getGroups(),h,e=0,a=c.length,d,b;for(;e<a;++e){h=c[e].childNodes[1];if(h){h=h.childNodes;for(d=0,b=h.length;d<b;++d){k[k.length]=h[d]}}}return k},updateGroupWidths:function(){if(!this.canGroup()||!this.hasRows()){return}var c=Math.max(this.cm.getTotalWidth(),this.el.dom.offsetWidth-this.getScrollOffset())+"px";var b=this.getGroups();for(var d=0,a=b.length;d<a;d++){b[d].firstChild.style.width=c}},onColumnWidthUpdated:function(c,a,b){Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this,c,a,b);this.updateGroupWidths()},onAllColumnWidthsUpdated:function(a,b){Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this,a,b);this.updateGroupWidths()},onColumnHiddenUpdated:function(b,c,a){Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this,b,c,a);this.updateGroupWidths()},onLayout:function(){this.updateGroupWidths()},onBeforeRowSelect:function(b,a){this.toggleRowIndex(a,true)}});Ext.grid.GroupingView.GROUP_ID=1000;
\ No newline at end of file
+(function(){var e=this,a=Object.prototype,g=a.toString,b=true,d={toString:1},c;if(typeof Ext==="undefined"){e.Ext={}}Ext.global=e;for(c in d){b=null}if(b){b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=b;Ext.apply=function(n,m,q){if(q){Ext.apply(n,q)}if(n&&m&&typeof m==="object"){var p,l,h;for(p in m){n[p]=m[p]}if(b){for(l=b.length;l--;){h=b[l];if(m.hasOwnProperty(h)){n[h]=m[h]}}}}return n};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{emptyFn:function(){},baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(i,h){var j;if(i){for(j in h){if(i[j]===undefined){i[j]=h[j]}}}return i},iterate:function(h,j,i){if(Ext.isEmpty(h)){return}if(i===undefined){i=h}if(Ext.isIterable(h)){Ext.Array.each.call(Ext.Array,h,j,i)}else{Ext.Object.each.call(Ext.Object,h,j,i)}}});Ext.apply(Ext,{extend:function(){var h=a.constructor,i=function(k){for(var j in k){if(!k.hasOwnProperty(j)){continue}this[j]=k[j]}};return function(j,p,m){if(Ext.isObject(p)){m=p;p=j;j=m.constructor!==h?m.constructor:function(){p.apply(this,arguments)}}var l=function(){},k,n=p.prototype;l.prototype=n;k=j.prototype=new l();k.constructor=j;j.superclass=n;if(n.constructor===h){n.constructor=p}j.override=function(q){Ext.override(j,q)};k.override=i;k.proto=k;j.override(m);j.extend=function(q){return Ext.extend(j,q)};return j}}(),override:function(h,i){if(h.prototype.$className){return h.override(i)}else{Ext.apply(h.prototype,i)}}});Ext.apply(Ext,{valueFrom:function(j,h,i){return Ext.isEmpty(j,i)?h:j},typeOf:function(i){if(i===null){return"null"}var h=typeof i;if(h==="undefined"||h==="string"||h==="number"||h==="boolean"){return h}var j=g.call(i);switch(j){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(h==="function"){return"function"}if(h==="object"){if(i.nodeType!==undefined){if(i.nodeType===3){return(/\S/).test(i.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(h,i){return(h===null)||(h===undefined)||(!i?h==="":false)||(Ext.isArray(h)&&h.length===0)},isArray:("isArray" in Array)?Array.isArray:function(h){return g.call(h)==="[object Array]"},isDate:function(h){return g.call(h)==="[object Date]"},isObject:(g.call(null)==="[object Object]")?function(h){return h!==null&&h!==undefined&&g.call(h)==="[object Object]"&&h.ownerDocument===undefined}:function(h){return g.call(h)==="[object Object]"},isPrimitive:function(i){var h=typeof i;return h==="string"||h==="number"||h==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(h){return g.call(h)==="[object Function]"}:function(h){return typeof h==="function"},isNumber:function(h){return typeof h==="number"&&isFinite(h)},isNumeric:function(h){return !isNaN(parseFloat(h))&&isFinite(h)},isString:function(h){return typeof h==="string"},isBoolean:function(h){return typeof h==="boolean"},isElement:function(h){return h?h.nodeType===1:false},isTextNode:function(h){return h?h.nodeName==="#text":false},isDefined:function(h){return typeof h!=="undefined"},isIterable:function(h){return(h&&typeof h!=="string")?h.length!==undefined:false}});Ext.apply(Ext,{clone:function(q){if(q===null||q===undefined){return q}if(q.nodeType&&q.cloneNode){return q.cloneNode(true)}var p=g.call(q);if(p==="[object Date]"){return new Date(q.getTime())}var n,l,h,r,m;if(p==="[object Array]"){n=q.length;r=[];while(n--){r[n]=Ext.clone(q[n])}}else{if(p==="[object Object]"&&q.constructor===Object){r={};for(m in q){r[m]=Ext.clone(q[m])}if(b){for(l=b.length;l--;){h=b[l];r[h]=q[h]}}}}return r||q},getUniqueGlobalNamespace:function(){var j=this.uniqueGlobalNamespace;if(j===undefined){var h=0;do{j="ExtBox"+(++h)}while(Ext.global[j]!==undefined);Ext.global[j]=Ext;this.uniqueGlobalNamespace=j}return j},functionFactory:function(){var h=Array.prototype.slice.call(arguments);if(h.length>0){h[h.length-1]="var Ext=window."+this.getUniqueGlobalNamespace()+";"+h[h.length-1]}return Function.prototype.constructor.apply(Function.prototype,h)}});Ext.type=Ext.typeOf})();(function(){var a="4.0.7",b;Ext.Version=b=Ext.extend(Object,{constructor:function(c){var e,d;if(c instanceof b){return c}this.version=this.shortVersion=String(c).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");d=this.version.search(/([^\d\.])/);if(d!==-1){this.release=this.version.substr(d,c.length);this.shortVersion=this.version.substr(0,d)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");e=this.version.split(".");this.major=parseInt(e.shift()||0,10);this.minor=parseInt(e.shift()||0,10);this.patch=parseInt(e.shift()||0,10);this.build=parseInt(e.shift()||0,10);return this},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isLessThan:function(c){return b.compare(this.version,c)===-1},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(h,g){var d,e,c;h=new b(h).toArray();g=new b(g).toArray();for(c=0;c<Math.max(h.length,g.length);c++){d=this.getComponentValue(h[c]);e=this.getComponentValue(g[c]);if(d<e){return -1}else{if(d>e){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,g,d){if(b.compare(Ext.getVersion(c),e)<1){g.call(d)}}});Ext.setVersion("core",a)})();Ext.String={trimRegex:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe:/('|\\)/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,htmlEncode:(function(){var d={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;"},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+")","g");return function(e){return(!e)?e:String(e).replace(a,function(h,g){return d[g]})}})(),htmlDecode:(function(){var d={"&amp;":"&","&gt;":">","&lt;":"<","&quot;":'"'},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+"|&#[0-9]{1,5};)","g");return function(e){return(!e)?e:String(e).replace(a,function(h,g){if(g in d){return d[g]}else{return String.fromCharCode(parseInt(g.substr(2),10))}})}})(),urlAppend:function(b,a){if(!Ext.isEmpty(a)){return b+(b.indexOf("?")===-1?"?":"&")+a}return b},trim:function(a){return a.replace(Ext.String.trimRegex,"")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!==-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.String.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.String.escapeRe,"\\$1")},toggle:function(b,c,a){return b===c?a:c},leftPad:function(b,c,d){var a=String(b);d=d||" ";while(a.length<c){a=d+a}return a},format:function(b){var a=Ext.Array.toArray(arguments,1);return b.replace(Ext.String.formatRe,function(c,d){return a[d]})},repeat:function(e,d,b){for(var a=[],c=d;c--;){a.push(e)}return a.join(b||"")}};(function(){var a=(0.9).toFixed()!=="1";Ext.Number={constrain:function(d,c,b){d=parseFloat(d);if(!isNaN(c)){d=Math.max(d,c)}if(!isNaN(b)){d=Math.min(d,b)}return d},snap:function(e,c,d,h){var g=e,b;if(!(c&&e)){return e}b=e%c;if(b!==0){g-=b;if(b*2>=c){g+=c}else{if(b*2<-c){g-=c}}}return Ext.Number.constrain(g,d,h)},toFixed:function(d,b){if(a){b=b||0;var c=Math.pow(10,b);return(Math.round(d*c)/c).toFixed(b)}return d.toFixed(b)},from:function(c,b){if(isFinite(c)){c=parseFloat(c)}return !isNaN(c)?c:b}}})();Ext.num=function(){return Ext.Number.from.apply(this,arguments)};(function(){var g=Array.prototype,p=g.slice,r=function(){var B=[],e,A=20;if(!B.splice){return false}while(A--){B.push("A")}B.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=B.length;B.splice(13,0,"XXX");if(e+1!=B.length){return false}return true}(),j="forEach" in g,v="map" in g,q="indexOf" in g,z="every" in g,c="some" in g,d="filter" in g,n=function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}(),k=true,a;try{if(typeof document!=="undefined"){p.call(document.getElementsByTagName("body"))}}catch(t){k=false}function m(A,e){return(e<0)?Math.max(0,A.length+e):Math.min(A.length,e)}function y(H,G,A,K){var L=K?K.length:0,C=H.length,I=m(H,G);if(I===C){if(L){H.push.apply(H,K)}}else{var F=Math.min(A,C-I),J=I+F,B=J+L-F,e=C-J,D=C-F,E;if(B<J){for(E=0;E<e;++E){H[B+E]=H[J+E]}}else{if(B>J){for(E=e;E--;){H[B+E]=H[J+E]}}}if(L&&I===D){H.length=D;H.push.apply(H,K)}else{H.length=D+L;for(E=0;E<L;++E){H[I+E]=K[E]}}}return H}function i(C,e,B,A){if(A&&A.length){if(e<C.length){C.splice.apply(C,[e,B].concat(A))}else{C.push.apply(C,A)}}else{C.splice(e,B)}return C}function b(B,e,A){return y(B,e,A)}function s(B,e,A){B.splice(e,A);return B}function l(D,e,B){var C=m(D,e),A=D.slice(e,m(D,C+B));if(arguments.length<4){y(D,C,B)}else{y(D,C,B,p.call(arguments,3))}return A}function h(e){return e.splice.apply(e,p.call(arguments,1))}var x=r?s:b,u=r?i:y,w=r?h:l;a=Ext.Array={each:function(E,C,B,e){E=a.from(E);var A,D=E.length;if(e!==true){for(A=0;A<D;A++){if(C.call(B||E[A],E[A],A,E)===false){return A}}}else{for(A=D-1;A>-1;A--){if(C.call(B||E[A],E[A],A,E)===false){return A}}}return true},forEach:function(D,B,A){if(j){return D.forEach(B,A)}var e=0,C=D.length;for(;e<C;e++){B.call(A,D[e],e,D)}},indexOf:function(D,B,C){if(q){return D.indexOf(B,C)}var e,A=D.length;for(e=(C<0)?Math.max(0,A+C):C||0;e<A;e++){if(D[e]===B){return e}}return -1},contains:function(C,B){if(q){return C.indexOf(B)!==-1}var e,A;for(e=0,A=C.length;e<A;e++){if(C[e]===B){return true}}return false},toArray:function(B,D,e){if(!B||!B.length){return[]}if(typeof B==="string"){B=B.split("")}if(k){return p.call(B,D||0,e||B.length)}var C=[],A;D=D||0;e=e?((e<0)?B.length+e:e):B.length;for(A=D;A<e;A++){C.push(B[A])}return C},pluck:function(E,e){var A=[],B,D,C;for(B=0,D=E.length;B<D;B++){C=E[B];A.push(C[e])}return A},map:function(E,D,C){if(v){return E.map(D,C)}var B=[],A=0,e=E.length;for(;A<e;A++){B[A]=D.call(C,E[A],A,E)}return B},every:function(D,B,A){if(z){return D.every(B,A)}var e=0,C=D.length;for(;e<C;++e){if(!B.call(A,D[e],e,D)){return false}}return true},some:function(D,B,A){if(c){return D.some(B,A)}var e=0,C=D.length;for(;e<C;++e){if(B.call(A,D[e],e,D)){return true}}return false},clean:function(D){var A=[],e=0,C=D.length,B;for(;e<C;e++){B=D[e];if(!Ext.isEmpty(B)){A.push(B)}}return A},unique:function(D){var C=[],e=0,B=D.length,A;for(;e<B;e++){A=D[e];if(a.indexOf(C,A)===-1){C.push(A)}}return C},filter:function(E,C,B){if(d){return E.filter(C,B)}var A=[],e=0,D=E.length;for(;e<D;e++){if(C.call(B,E[e],e,E)){A.push(E[e])}}return A},from:function(A,e){if(A===undefined||A===null){return[]}if(Ext.isArray(A)){return(e)?p.call(A):A}if(A&&A.length!==undefined&&typeof A!=="string"){return Ext.toArray(A)}return[A]},remove:function(B,A){var e=a.indexOf(B,A);if(e!==-1){x(B,e,1)}return B},include:function(A,e){if(!a.contains(A,e)){A.push(e)}},clone:function(e){return p.call(e)},merge:function(){var e=p.call(arguments),C=[],A,B;for(A=0,B=e.length;A<B;A++){C=C.concat(e[A])}return a.unique(C)},intersect:function(){var B=[],e=p.call(arguments),F,D,C,H,I,L,K,J,A,E;if(!e.length){return B}for(F=L=0,J=e.length;F<J,I=e[F];F++){if(!H||I.length<H.length){H=I;L=F}}H=a.unique(H);x(e,L,1);for(F=0,J=H.length;F<J,L=H[F];F++){var G=0;for(D=0,A=e.length;D<A,I=e[D];D++){for(C=0,E=I.length;C<E,K=I[C];C++){if(L===K){G++;break}}}if(G===A){B.push(L)}}return B},difference:function(A,e){var F=p.call(A),D=F.length,C,B,E;for(C=0,E=e.length;C<E;C++){for(B=0;B<D;B++){if(F[B]===e[C]){x(F,B,1);B--;D--}}}return F},slice:([1,2].slice(1,undefined).length?function(B,A,e){return p.call(B,A,e)}:function(B,A,e){if(typeof A==="undefined"){return p.call(B)}if(typeof e==="undefined"){return p.call(B,A)}return p.call(B,A,e)}),sort:function(G,F){if(n){if(F){return G.sort(F)}else{return G.sort()}}var D=G.length,C=0,E,e,B,A;for(;C<D;C++){B=C;for(e=C+1;e<D;e++){if(F){E=F(G[e],G[B]);if(E<0){B=e}}else{if(G[e]<G[B]){B=e}}}if(B!==C){A=G[C];G[C]=G[B];G[B]=A}}return G},flatten:function(B){var A=[];function e(C){var E,F,D;for(E=0,F=C.length;E<F;E++){D=C[E];if(Ext.isArray(D)){e(D)}else{A.push(D)}}return A}return e(B)},min:function(E,D){var A=E[0],e,C,B;for(e=0,C=E.length;e<C;e++){B=E[e];if(D){if(D(A,B)===1){A=B}}else{if(B<A){A=B}}}return A},max:function(E,D){var e=E[0],A,C,B;for(A=0,C=E.length;A<C;A++){B=E[A];if(D){if(D(e,B)===-1){e=B}}else{if(B>e){e=B}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(D){var A=0,e,C,B;for(e=0,C=D.length;e<C;e++){B=D[e];A+=B}return A},erase:x,insert:function(B,A,e){return u(B,A,0,e)},replace:u,splice:w};Ext.each=a.each;a.union=a.merge;Ext.min=a.min;Ext.max=a.max;Ext.sum=a.sum;Ext.mean=a.mean;Ext.flatten=a.flatten;Ext.clean=a.clean;Ext.unique=a.unique;Ext.pluck=a.pluck;Ext.toArray=function(){return a.toArray.apply(a,arguments)}})();Ext.Function={flexSetter:function(a){return function(d,c){var e,g;if(d===null){return this}if(typeof d!=="string"){for(e in d){if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}if(Ext.enumerables){for(g=Ext.enumerables.length;g--;){e=Ext.enumerables[g];if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}}}else{a.call(this,d,c)}return this}},bind:function(d,c,b,a){if(arguments.length===2){return function(){return d.apply(c,arguments)}}var g=d,e=Array.prototype.slice;return function(){var h=b||arguments;if(a===true){h=e.call(arguments,0);h=h.concat(b)}else{if(typeof a=="number"){h=e.call(arguments,0);Ext.Array.insert(h,a,b)}}return g.apply(c||window,h)}},pass:function(c,a,b){if(a){a=Ext.Array.from(a)}return function(){return c.apply(b,a.concat(Ext.Array.toArray(arguments)))}},alias:function(b,a){return function(){return b[a].apply(b,arguments)}},createInterceptor:function(d,c,b,a){var e=d;if(!Ext.isFunction(c)){return d}else{return function(){var h=this,g=arguments;c.target=h;c.method=d;return(c.apply(b||h||window,g)!==false)?d.apply(h||window,g):a||null}}},createDelayed:function(e,c,d,b,a){if(d||b){e=Ext.Function.bind(e,d,b,a)}return function(){var g=this;setTimeout(function(){e.apply(g,arguments)},c)}},defer:function(d,c,e,b,a){d=Ext.Function.bind(d,e,b,a);if(c>0){return setTimeout(d,c)}d();return 0},createSequence:function(c,b,a){if(!Ext.isFunction(b)){return c}else{return function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}},createBuffered:function(d,a,c,b){return function(){var e;return function(){var g=this;if(e){clearTimeout(e);e=null}e=setTimeout(function(){d.apply(c||g,b||arguments)},a)}}()},createThrottled:function(e,b,d){var g,a,c,i,h=function(){e.apply(d||this,c);g=new Date().getTime()};return function(){a=new Date().getTime()-g;c=arguments;clearTimeout(i);if(!g||(a>=b)){h()}else{i=setTimeout(h,b-a)}}},interceptBefore:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){var e=c.apply(this,arguments);d.apply(this,arguments);return e}},interceptAfter:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){d.apply(this,arguments);return c.apply(this,arguments)}}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");(function(){var a=Ext.Object={toQueryObjects:function(d,j,c){var b=a.toQueryObjects,h=[],e,g;if(Ext.isArray(j)){for(e=0,g=j.length;e<g;e++){if(c){h=h.concat(b(d+"["+e+"]",j[e],true))}else{h.push({name:d,value:j[e]})}}}else{if(Ext.isObject(j)){for(e in j){if(j.hasOwnProperty(e)){if(c){h=h.concat(b(d+"["+e+"]",j[e],true))}else{h.push({name:d,value:j[e]})}}}}else{h.push({name:d,value:j})}}return h},toQueryString:function(e,c){var g=[],d=[],k,h,l,b,m;for(k in e){if(e.hasOwnProperty(k)){g=g.concat(a.toQueryObjects(k,e[k],c))}}for(h=0,l=g.length;h<l;h++){b=g[h];m=b.value;if(Ext.isEmpty(m)){m=""}else{if(Ext.isDate(m)){m=Ext.Date.toString(m)}}d.push(encodeURIComponent(b.name)+"="+encodeURIComponent(String(m)))}return d.join("&")},fromQueryString:function(c,r){var l=c.replace(/^\?/,"").split("&"),u={},s,h,w,m,q,e,n,p,b,g,t,k,v,d;for(q=0,e=l.length;q<e;q++){n=l[q];if(n.length>0){h=n.split("=");w=decodeURIComponent(h[0]);m=(h[1]!==undefined)?decodeURIComponent(h[1]):"";if(!r){if(u.hasOwnProperty(w)){if(!Ext.isArray(u[w])){u[w]=[u[w]]}u[w].push(m)}else{u[w]=m}}else{g=w.match(/(\[):?([^\]]*)\]/g);t=w.match(/^([^\[]+)/);w=t[0];k=[];if(g===null){u[w]=m;continue}for(p=0,b=g.length;p<b;p++){v=g[p];v=(v.length===2)?"":v.substring(1,v.length-1);k.push(v)}k.unshift(w);s=u;for(p=0,b=k.length;p<b;p++){v=k[p];if(p===b-1){if(Ext.isArray(s)&&v===""){s.push(m)}else{s[v]=m}}else{if(s[v]===undefined||typeof s[v]==="string"){d=k[p+1];s[v]=(Ext.isNumeric(d)||d==="")?[]:{}}s=s[v]}}}}}return u},each:function(b,d,c){for(var e in b){if(b.hasOwnProperty(e)){if(d.call(c||b,e,b[e],b)===false){return}}}},merge:function(j,d,h){if(typeof d==="string"){if(h&&h.constructor===Object){if(j[d]&&j[d].constructor===Object){a.merge(j[d],h)}else{j[d]=Ext.clone(h)}}else{j[d]=h}return j}var c=1,e=arguments.length,b,g;for(;c<e;c++){b=arguments[c];for(g in b){if(b.hasOwnProperty(g)){a.merge(j,g,b[g])}}}return j},getKey:function(b,d){for(var c in b){if(b.hasOwnProperty(c)&&b[c]===d){return c}}return null},getValues:function(c){var b=[],d;for(d in c){if(c.hasOwnProperty(d)){b.push(c[d])}}return b},getKeys:("keys" in Object.prototype)?Object.keys:function(b){var c=[],d;for(d in b){if(b.hasOwnProperty(d)){c.push(d)}}return c},getSize:function(b){var c=0,d;for(d in b){if(b.hasOwnProperty(d)){c++}}return c}};Ext.merge=Ext.Object.merge;Ext.urlEncode=function(){var b=Ext.Array.from(arguments),c="";if((typeof b[1]==="string")){c=b[1]+"&";b[1]=false}return c+Ext.Object.toQueryString.apply(Ext.Object,b)};Ext.urlDecode=function(){return Ext.Object.fromQueryString.apply(Ext.Object,arguments)}})();(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Ext.Date={now:Date.now||function(){return +new Date()},toString:function(c){var d=Ext.String.leftPad;return c.getFullYear()+"-"+d(c.getMonth()+1,2,"0")+"-"+d(c.getDate(),2,"0")+"T"+d(c.getHours(),2,"0")+":"+d(c.getMinutes(),2,"0")+":"+d(c.getSeconds(),2,"0")},getElapsed:function(d,c){return Math.abs(d-(c||new Date()))},useStrict:false,formatCodeToRegex:function(d,c){var e=a.parseCodes[d];if(e){e=typeof e=="function"?e():e;a.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.String.escapeRegex(d)}},parseFunctions:{MS:function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return a.monthNames[c].substring(0,3)},getShortDayName:function(c){return a.dayNames[c].substring(0,3)},getMonthNumber:function(c){return a.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatContainsHourInfo:(function(){var d=/(\\.)/g,c=/([gGhHisucUOPZ]|MS)/;return function(e){return c.test(e.replace(d,""))}})(),formatContainsDateInfo:(function(){var d=/(\\.)/g,c=/([djzmnYycU]|MS)/;return function(e){return c.test(e.replace(d,""))}})(),formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g<d;++g){var j=k.charAt(g);h.push(j=="T"?"'T'":a.getFormatCode(j))}return h.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(p,c,n,k,g,j,e){k=k||0;g=g||0;j=j||0;e=e||0;var l=a.add(new Date(p<100?100:p,c-1,n,k,g,j,e),a.YEAR,p<100?p-100:0);return p==l.getFullYear()&&c==l.getMonth()+1&&n==l.getDate()&&k==l.getHours()&&g==l.getMinutes()&&j==l.getSeconds()&&e==l.getMilliseconds()},parse:function(d,g,c){var e=a.parseFunctions;if(e[g]==null){a.createParser(g)}return e[g](d,Ext.isDefined(c)?c:a.useStrict)},parseDate:function(d,e,c){return a.parse(d,e,c)},getFormatCode:function(d){var c=a.formatCodes[d];if(c){c=typeof c=="function"?c():c;a.formatCodes[d]=c}return c||("'"+Ext.String.escape(d)+"'")},createFormat:function(h){var g=[],c=false,e="";for(var d=0;d<h.length;++d){e=h.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;g.push("'"+Ext.String.escape(e)+"'")}else{g.push(a.getFormatCode(e))}}}a.formatFunctions[h]=Ext.functionFactory("return "+g.join("+"))},createParser:(function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Ext.Date.defaults,","results = String(input).match(Ext.Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = Ext.Date.clearTime(new Date);","y = Ext.Number.from(y, Ext.Number.from(def.y, dt.getFullYear()));","m = Ext.Number.from(m, Ext.Number.from(def.m - 1, dt.getMonth()));","d = Ext.Number.from(d, Ext.Number.from(def.d, dt.getDate()));","h  = Ext.Number.from(h, Ext.Number.from(def.h, dt.getHours()));","i  = Ext.Number.from(i, Ext.Number.from(def.i, dt.getMinutes()));","s  = Ext.Number.from(s, Ext.Number.from(def.s, dt.getSeconds()));","ms = Ext.Number.from(ms, Ext.Number.from(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(m){var e=a.parseRegexes.length,n=1,g=[],l=[],k=false,d="";for(var j=0;j<m.length;++j){d=m.charAt(j);if(!k&&d=="\\"){k=true}else{if(k){k=false;l.push(Ext.String.escape(d))}else{var h=a.formatCodeToRegex(d,n);n+=h.g;l.push(h.s);if(h.g&&h.c){g.push(h.c)}}}}a.parseRegexes[e]=new RegExp("^"+l.join("")+"$","i");a.parseFunctions[m]=Ext.functionFactory("input","strict",b(c,e,g.join("")))}})(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var c=[],d=0;d<7;c.push(a.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+a.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Ext.Date.getMonthNumber(results[{0}]), 10);\n",s:"("+a.monthNames.join("|")+")"}},M:function(){for(var c=[],d=0;d<12;c.push(a.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a.formatCodeToRegex("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return a.formatCodeToRegex("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)"},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a.formatCodeToRegex("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a.formatCodeToRegex("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("h",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g<d;++g){e.push(c[g].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}},dateFormat:function(c,d){return a.format(c,d)},format:function(d,e){if(a.formatFunctions[e]==null){a.createFormat(e)}var c=a.formatFunctions[e].call(d);return c+""},getTimezone:function(c){return c.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(c,d){var e=c.getTimezoneOffset();return(e>0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(g){var e=0,j=Ext.Date.clone(g),c=g.getMonth(),h;for(h=0,j.setDate(1),j.setMonth(0);h<c;j.setMonth(++h)){e+=a.getDaysInMonth(j)}return e+g.getDate()-1},getWeekOfYear:(function(){var c=86400000,d=7*c;return function(g){var h=Date.UTC(g.getFullYear(),g.getMonth(),g.getDate()+3)/c,e=Math.floor(h/7),i=new Date(e*d).getUTCFullYear();return e-Math.floor(Date.UTC(i,0,7)/d)+1}})(),isLeapYear:function(c){var d=c.getFullYear();return !!((d&3)==0&&(d%100||(d%400==0&&d)))},getFirstDayOfMonth:function(d){var c=(d.getDay()-(d.getDate()-1))%7;return(c<0)?(c+7):c},getLastDayOfMonth:function(c){return a.getLastDateOfMonth(c).getDay()},getFirstDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),1)},getLastDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),a.getDaysInMonth(c))},getDaysInMonth:(function(){var c=[31,28,31,30,31,30,31,31,30,31,30,31];return function(e){var d=e.getMonth();return d==1&&a.isLeapYear(e)?29:c[d]}})(),getSuffix:function(c){switch(c.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(c){return new Date(c.getTime())},isDST:function(c){return new Date(c.getFullYear(),0,1).getTimezoneOffset()!=c.getTimezoneOffset()},clearTime:function(e,j){if(j){return Ext.Date.clearTime(Ext.Date.clone(e))}var h=e.getDate();e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);if(e.getDate()!=h){for(var g=1,i=a.add(e,Ext.Date.HOUR,g);i.getDate()!=h;g++,i=a.add(e,Ext.Date.HOUR,g)){}e.setDate(h);e.setHours(i.getHours())}return e},add:function(h,g,i){var j=Ext.Date.clone(h),c=Ext.Date;if(!g||i===0){return j}switch(g.toLowerCase()){case Ext.Date.MILLI:j.setMilliseconds(j.getMilliseconds()+i);break;case Ext.Date.SECOND:j.setSeconds(j.getSeconds()+i);break;case Ext.Date.MINUTE:j.setMinutes(j.getMinutes()+i);break;case Ext.Date.HOUR:j.setHours(j.getHours()+i);break;case Ext.Date.DAY:j.setDate(j.getDate()+i);break;case Ext.Date.MONTH:var e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),"mo",i)).getDate())}j.setDate(e);j.setMonth(h.getMonth()+i);break;case Ext.Date.YEAR:j.setFullYear(h.getFullYear()+i);break}return j},between:function(d,g,c){var e=d.getTime();return g.getTime()<=e&&e<=c.getTime()},compat:function(){var g=window.Date,e,c,h=["useStrict","formatCodeToRegex","parseFunctions","parseRegexes","formatFunctions","y2kYear","MILLI","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","defaults","dayNames","monthNames","monthNumbers","getShortMonthName","getShortDayName","getMonthNumber","formatCodes","isValid","parseDate","getFormatCode","createFormat","createParser","parseCodes"],d=["dateFormat","format","getTimezone","getGMTOffset","getDayOfYear","getWeekOfYear","isLeapYear","getFirstDayOfMonth","getLastDayOfMonth","getDaysInMonth","getSuffix","clone","isDST","clearTime","add","between"];Ext.Array.forEach(h,function(i){g[i]=a[i]});Ext.Array.forEach(d,function(i){g.prototype[i]=function(){var j=Array.prototype.slice.call(arguments);j.unshift(this);return a[i].apply(a,j)}})}};var a=Ext.Date})();(function(a){var b=Ext.Base=function(){};b.prototype={$className:"Ext.Base",$class:b,self:b,constructor:function(){return this},initConfig:function(c){if(!this.$configInited){this.config=Ext.Object.merge({},this.config||{},c||{});this.applyConfig(this.config);this.$configInited=true}return this},setConfig:function(c){this.applyConfig(c||{});return this},applyConfig:a(function(c,d){var e="set"+Ext.String.capitalize(c);if(typeof this[e]==="function"){this[e].call(this,d)}return this}),callParent:function(d){var g=this.callParent.caller,e,c;if(!g.$owner){g=g.caller}e=g.$owner.superclass;c=g.$name;return e[c].apply(this,d||[])},statics:function(){var d=this.statics.caller,c=this.self;if(!d){return c}return d.$owner},callOverridden:function(c){var d=this.callOverridden.caller;return d.$previous.apply(this,c||[])},destroy:function(){}};Ext.apply(Ext.Base,{create:function(){return Ext.create.apply(Ext,[this].concat(Array.prototype.slice.call(arguments,0)))},own:function(c,d){if(typeof d=="function"){this.ownMethod(c,d)}else{this.prototype[c]=d}},ownMethod:function(c,d){var e;if(typeof d.$owner!=="undefined"&&d!==Ext.emptyFn){e=d;d=function(){return e.apply(this,arguments)}}d.$owner=this;d.$name=c;this.prototype[c]=d},addStatics:function(c){for(var d in c){if(c.hasOwnProperty(d)){this[d]=c[d]}}return this},addInheritableStatics:function(d){var h,c,g=this.prototype,e,i;h=g.$inheritableStatics;c=g.$hasInheritableStatics;if(!h){h=g.$inheritableStatics=[];c=g.$hasInheritableStatics={}}for(e in d){if(d.hasOwnProperty(e)){i=d[e];this[e]=i;if(!c[e]){c[e]=true;h.push(e)}}}return this},implement:function(d){var g=this.prototype,c=Ext.enumerables,e,h,j;for(e in d){if(d.hasOwnProperty(e)){j=d[e];if(typeof j==="function"){j.$owner=this;j.$name=e}g[e]=j}}if(c){for(h=c.length;h--;){e=c[h];if(d.hasOwnProperty(e)){j=d[e];j.$owner=this;j.$name=e;g[e]=j}}}},borrow:function(h,d){var c=h.prototype,e,g,j;d=Ext.Array.from(d);for(e=0,g=d.length;e<g;e++){j=d[e];this.own(j,c[j])}return this},override:function(d){var g=this.prototype,c=Ext.enumerables,e,h,k,j;if(arguments.length===2){e=d;k=arguments[1];if(typeof k=="function"){if(typeof g[e]=="function"){j=g[e];k.$previous=j}this.ownMethod(e,k)}else{g[e]=k}return this}for(e in d){if(d.hasOwnProperty(e)){k=d[e];if(typeof k==="function"){if(typeof g[e]==="function"){j=g[e];k.$previous=j}this.ownMethod(e,k)}else{g[e]=k}}}if(c){for(h=c.length;h--;){e=c[h];if(d.hasOwnProperty(e)){if(typeof g[e]!=="undefined"){j=g[e];d[e].$previous=j}this.ownMethod(e,d[e])}}}return this},mixin:function(e,c){var d=c.prototype,i=this.prototype,g,h;for(g in d){if(d.hasOwnProperty(g)){if(typeof i[g]==="undefined"&&g!=="mixins"&&g!=="mixinId"){if(typeof d[g]==="function"){h=d[g];if(typeof h.$owner==="undefined"){this.ownMethod(g,h)}else{i[g]=h}}else{i[g]=d[g]}}else{if(g==="config"&&i.config&&d.config){Ext.Object.merge(i.config,d.config)}}}}if(typeof d.onClassMixedIn!=="undefined"){d.onClassMixedIn.call(c,this)}if(!i.hasOwnProperty("mixins")){if("mixins" in i){i.mixins=Ext.Object.merge({},i.mixins)}else{i.mixins={}}}i.mixins[e]=d},getName:function(){return Ext.getClassName(this)},createAlias:a(function(d,c){this.prototype[d]=function(){return this[c].apply(this,arguments)}})})})(Ext.Function.flexSetter);(function(){var c,d=Ext.Base,b=[],a;for(a in d){if(d.hasOwnProperty(a)){b.push(a)}}Ext.Class=c=function(m,t,r){if(typeof m!="function"){r=t;t=m;m=function(){return this.constructor.apply(this,arguments)}}if(!t){t={}}var g=t.preprocessors||c.getDefaultPreprocessors(),n=c.getPreprocessors(),l=0,q=[],u,s,e,k,h,p;for(k=0,p=b.length;k<p;k++){s=b[k];m[s]=d[s]}delete t.preprocessors;for(h=0,p=g.length;h<p;h++){u=g[h];if(typeof u=="string"){u=n[u];if(!u.always){if(t.hasOwnProperty(u.name)){q.push(u.fn)}}else{q.push(u.fn)}}else{q.push(u)}}t.onClassCreated=r||Ext.emptyFn;t.onBeforeClassCreated=function(i,j){r=j.onClassCreated;delete j.onBeforeClassCreated;delete j.onClassCreated;i.implement(j);r.call(i,i)};e=function(i,j){u=q[l++];if(!u){j.onBeforeClassCreated.apply(this,arguments);return}if(u.call(this,i,j,e)!==false){e.apply(this,arguments)}};e.call(c,m,t);return m};Ext.apply(c,{preprocessors:{},registerPreprocessor:function(g,h,e){this.preprocessors[g]={name:g,always:e||false,fn:h};return this},getPreprocessor:function(e){return this.preprocessors[e]},getPreprocessors:function(){return this.preprocessors},getDefaultPreprocessors:function(){return this.defaultPreprocessors||[]},setDefaultPreprocessors:function(e){this.defaultPreprocessors=Ext.Array.from(e);return this},setDefaultPreprocessorPosition:function(h,j,i){var e=this.defaultPreprocessors,g;if(typeof j=="string"){if(j==="first"){e.unshift(h);return this}else{if(j==="last"){e.push(h);return this}}j=(j==="after")?1:-1}g=Ext.Array.indexOf(e,i);if(g!==-1){Ext.Array.splice(e,Math.max(0,g+j),0,h)}return this}});c.registerPreprocessor("extend",function(v,j){var q=j.extend,e=Ext.Base,n=e.prototype,s=function(){},t,l,h,p,u,g,r,m;if(q&&q!==Object){t=q}else{t=e}r=t.prototype;s.prototype=r;m=v.prototype=new s();if(!("$class" in t)){for(l in n){if(!r[l]){r[l]=n[l]}}}m.self=v;v.superclass=m.superclass=r;delete j.extend;g=r.$inheritableStatics;if(g){for(h=0,p=g.length;h<p;h++){u=g[h];if(!v.hasOwnProperty(u)){v[u]=t[u]}}}if(r.config){m.config=Ext.Object.merge({},r.config)}else{m.config={}}if(m.$onExtended){m.$onExtended.call(v,v,j)}if(j.onClassExtended){m.$onExtended=j.onClassExtended;delete j.onClassExtended}},true);c.registerPreprocessor("statics",function(e,g){e.addStatics(g.statics);delete g.statics});c.registerPreprocessor("inheritableStatics",function(e,g){e.addInheritableStatics(g.inheritableStatics);delete g.inheritableStatics});c.registerPreprocessor("config",function(e,h){var g=e.prototype;Ext.Object.each(h.config,function(m){var j=m.charAt(0).toUpperCase()+m.substr(1),k=m,l="apply"+j,n="set"+j,i="get"+j;if(!(l in g)&&!h.hasOwnProperty(l)){h[l]=function(p){return p}}if(!(n in g)&&!h.hasOwnProperty(n)){h[n]=function(q){var p=this[l].call(this,q,this[k]);if(typeof p!="undefined"){this[k]=p}return this}}if(!(i in g)&&!h.hasOwnProperty(i)){h[i]=function(){return this[k]}}});Ext.Object.merge(g.config,h.config);delete h.config});c.registerPreprocessor("mixins",function(g,m){var e=m.mixins,j,h,k,l;delete m.mixins;Ext.Function.interceptBefore(m,"onClassCreated",function(i){if(e instanceof Array){for(k=0,l=e.length;k<l;k++){h=e[k];j=h.prototype.mixinId||h.$className;i.mixin(j,h)}}else{for(j in e){if(e.hasOwnProperty(j)){i.mixin(j,e[j])}}}})});c.setDefaultPreprocessors(["extend","statics","inheritableStatics","config","mixins"]);Ext.extend=function(g,i,h){if(arguments.length===2&&Ext.isObject(i)){h=i;i=g;g=null}var e;if(!i){Ext.Error.raise("Attempting to extend from a class which has not been loaded on the page.")}h.extend=i;h.preprocessors=["extend","statics","inheritableStatics","mixins","config"];if(g){e=new c(g,h)}else{e=new c(h)}e.prototype.override=function(k){for(var j in k){if(k.hasOwnProperty(j)){this[j]=k[j]}}};return e}})();(function(b,c){var e=Array.prototype.slice;var a=Ext.ClassManager={classes:{},existCache:{},namespaceRewrites:[{from:"Ext.",to:Ext}],maps:{alternateToName:{},aliasToName:{},nameToAliases:{}},enableNamespaceParseCache:true,namespaceParseCache:{},instantiators:[],isCreated:function(k){var j,l,h,g,m;if(this.classes.hasOwnProperty(k)||this.existCache.hasOwnProperty(k)){return true}g=Ext.global;m=this.parseNamespace(k);for(j=0,l=m.length;j<l;j++){h=m[j];if(typeof h!=="string"){g=h}else{if(!g||!g[h]){return false}g=g[h]}}Ext.Loader.historyPush(k);this.existCache[k]=true;return true},parseNamespace:function(h){var g=this.namespaceParseCache;if(this.enableNamespaceParseCache){if(g.hasOwnProperty(h)){return g[h]}}var j=[],l=this.namespaceRewrites,r,p,q,k,m,n=Ext.global;for(k=0,m=l.length;k<m;k++){r=l[k];p=r.from;q=r.to;if(h===p||h.substring(0,p.length)===p){h=h.substring(p.length);if(typeof q!=="string"){n=q}else{j=j.concat(q.split("."))}break}}j.push(n);j=j.concat(h.split("."));if(this.enableNamespaceParseCache){g[h]=j}return j},setNamespace:function(k,n){var h=Ext.global,p=this.parseNamespace(k),m=p.length-1,g=p[m],l,j;for(l=0;l<m;l++){j=p[l];if(typeof j!=="string"){h=j}else{if(!h[j]){h[j]={}}h=h[j]}}h[g]=n;return h[g]},createNamespaces:function(){var g=Ext.global,n,k,l,h,m,p;for(l=0,m=arguments.length;l<m;l++){n=this.parseNamespace(arguments[l]);for(h=0,p=n.length;h<p;h++){k=n[h];if(typeof k!=="string"){g=k}else{if(!g[k]){g[k]={}}g=g[k]}}}return g},set:function(g,i){var h=this.getName(i);this.classes[g]=this.setNamespace(g,i);if(h&&h!==g){this.maps.alternateToName[g]=h}return this},get:function(j){if(this.classes.hasOwnProperty(j)){return this.classes[j]}var g=Ext.global,m=this.parseNamespace(j),h,k,l;for(k=0,l=m.length;k<l;k++){h=m[k];if(typeof h!=="string"){g=h}else{if(!g||!g[h]){return null}g=g[h]}}return g},setAlias:function(g,h){var j=this.maps.aliasToName,k=this.maps.nameToAliases,i;if(typeof g==="string"){i=g}else{i=this.getName(g)}if(h&&j[h]!==i){j[h]=i}if(!k[i]){k[i]=[]}if(h){Ext.Array.include(k[i],h)}return this},getByAlias:function(g){return this.get(this.getNameByAlias(g))},getNameByAlias:function(g){return this.maps.aliasToName[g]||""},getNameByAlternate:function(g){return this.maps.alternateToName[g]||""},getAliasesByName:function(g){return this.maps.nameToAliases[g]||[]},getName:function(g){return g&&g.$className||""},getClass:function(g){return g&&g.self||null},create:function(i,j,g){var h=this;j.$className=i;return new b(j,function(){var s=j.postprocessors||h.defaultPostprocessors,r=h.postprocessors,m=0,l=[],k,q,n,p;delete j.postprocessors;for(n=0,p=s.length;n<p;n++){k=s[n];if(typeof k==="string"){k=r[k];if(!k.always){if(j[k.name]!==undefined){l.push(k.fn)}}else{l.push(k.fn)}}else{l.push(k)}}q=function(u,t,v){k=l[m++];if(!k){h.set(i,t);Ext.Loader.historyPush(i);if(g){g.call(t,t)}return}if(k.call(this,u,t,v,q)!==false){q.apply(this,arguments)}};q.call(h,i,this,j)})},instantiateByAlias:function(){var h=arguments[0],g=e.call(arguments),i=this.getNameByAlias(h);if(!i){i=this.maps.aliasToName[h];Ext.syncRequire(i)}g[0]=i;return this.instantiate.apply(this,g)},instantiate:function(){var i=arguments[0],h=e.call(arguments,1),j=i,k,g;if(typeof i!=="function"){g=this.get(i)}else{g=i}if(!g){k=this.getNameByAlias(i);if(k){i=k;g=this.get(i)}}if(!g){k=this.getNameByAlternate(i);if(k){i=k;g=this.get(i)}}if(!g){Ext.syncRequire(i);g=this.get(i)}return this.getInstantiator(h.length)(g,h)},dynInstantiate:function(h,g){g=Ext.Array.from(g,true);g.unshift(h);return this.instantiate.apply(this,g)},getInstantiator:function(j){if(!this.instantiators[j]){var h=j,g=[];for(h=0;h<j;h++){g.push("a["+h+"]")}this.instantiators[j]=new Function("c","a","return new c("+g.join(",")+")")}return this.instantiators[j]},postprocessors:{},defaultPostprocessors:[],registerPostprocessor:function(h,i,g){this.postprocessors[h]={name:h,always:g||false,fn:i};return this},setDefaultPostprocessors:function(g){this.defaultPostprocessors=Ext.Array.from(g);return this},setDefaultPostprocessorPosition:function(h,k,j){var i=this.defaultPostprocessors,g;if(typeof k==="string"){if(k==="first"){i.unshift(h);return this}else{if(k==="last"){i.push(h);return this}}k=(k==="after")?1:-1}g=Ext.Array.indexOf(i,j);if(g!==-1){Ext.Array.splice(i,Math.max(0,g+k),0,h)}return this},getNamesByExpression:function(p){var m=this.maps.nameToAliases,q=[],g,l,j,h,r,k,n;if(p.indexOf("*")!==-1){p=p.replace(/\*/g,"(.*?)");r=new RegExp("^"+p+"$");for(g in m){if(m.hasOwnProperty(g)){j=m[g];if(g.search(r)!==-1){q.push(g)}else{for(k=0,n=j.length;k<n;k++){l=j[k];if(l.search(r)!==-1){q.push(g);break}}}}}}else{h=this.getNameByAlias(p);if(h){q.push(h)}else{h=this.getNameByAlternate(p);if(h){q.push(h)}else{q.push(p)}}}return q}};var d=a.defaultPostprocessors;a.registerPostprocessor("alias",function(j,h,m){var g=m.alias,k,l;delete m.alias;for(k=0,l=g.length;k<l;k++){c=g[k];this.setAlias(h,c)}});a.registerPostprocessor("singleton",function(h,g,j,i){i.call(this,h,new g(),j);return false});a.registerPostprocessor("alternateClassName",function(h,g,m){var k=m.alternateClassName,j,l,n;if(!(k instanceof Array)){k=[k]}for(j=0,l=k.length;j<l;j++){n=k[j];this.set(n,g)}});a.setDefaultPostprocessors(["alias","singleton","alternateClassName"]);Ext.apply(Ext,{create:c(a,"instantiate"),factory:function(n,l){if(n instanceof Array){var k,m;for(k=0,m=n.length;k<m;k++){n[k]=Ext.factory(n[k],l)}return n}var g=(typeof n==="string");if(g||(n instanceof Object&&n.constructor===Object)){var j,h={};if(g){j=n}else{j=n.className;h=n;delete h.className}if(l!==undefined&&j.indexOf(l)===-1){j=l+"."+Ext.String.capitalize(j)}return Ext.create(j,h)}if(typeof n==="function"){return Ext.create(n)}return n},widget:function(h){var g=e.call(arguments);g[0]="widget."+h;return a.instantiateByAlias.apply(a,g)},createByAlias:c(a,"instantiateByAlias"),define:function(k,l,i){if(!l.override){return a.create.apply(a,arguments)}var j=l.requires,h=l.uses,g=k;k=l.override;l=Ext.apply({},l);delete l.requires;delete l.uses;delete l.override;if(typeof j=="string"){j=[k,j]}else{if(j){j=j.slice(0);j.unshift(k)}else{j=[k]}}return a.create(g,{requires:j,uses:h,isPartial:true,constructor:function(){}},function(){var m=a.get(k);if(m.override){m.override(l)}else{m.self.override(l)}if(i){i.call(m)}})},getClassName:c(a,"getName"),getDisplayName:function(g){if(g.displayName){return g.displayName}if(g.$name&&g.$class){return Ext.getClassName(g.$class)+"#"+g.$name}if(g.$className){return g.$className}return"Anonymous"},getClass:c(a,"getClass"),namespace:c(a,"createNamespaces")});Ext.createWidget=Ext.widget;Ext.ns=Ext.namespace;b.registerPreprocessor("className",function(g,h){if(h.$className){g.$className=h.$className}},true);b.setDefaultPreprocessorPosition("className","first");b.registerPreprocessor("xtype",function(h,n){var m=Ext.Array.from(n.xtype),j="widget.",g=Ext.Array.from(n.alias),k,l,p;n.xtype=m[0];n.xtypes=m;g=n.alias=Ext.Array.from(n.alias);for(k=0,l=m.length;k<l;k++){p=m[k];g.push(j+p)}n.alias=g});b.setDefaultPreprocessorPosition("xtype","last");b.registerPreprocessor("alias",function(q,k){var g=Ext.Array.from(k.alias),j=Ext.Array.from(k.xtypes),r="widget.",p=r.length,l,n,m,h;for(l=0,n=g.length;l<n;l++){m=g[l];if(m.substring(0,p)===r){h=m.substring(p);Ext.Array.include(j,h);if(!q.xtype){q.xtype=k.xtype=h}}}k.alias=g;k.xtypes=j});b.setDefaultPreprocessorPosition("alias","last")})(Ext.Class,Ext.Function.alias);(function(c,b,a,e){var d=["extend","mixins","requires"],g;g=Ext.Loader={documentHead:typeof document!=="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:[],isFileLoaded:{},readyListeners:[],optionalRequires:[],requiresMap:{},numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:{},history:[],config:{enabled:false,disableCaching:true,disableCachingParam:"_dc",paths:{Ext:"."}},setConfig:function(h,i){if(Ext.isObject(h)&&arguments.length===1){Ext.Object.merge(this.config,h)}else{this.config[h]=(Ext.isObject(i))?Ext.Object.merge(this.config[h],i):i}return this},getConfig:function(h){if(h){return this.config[h]}return this.config},setPath:a(function(h,i){this.config.paths[h]=i;return this}),getPath:function(h){var j="",k=this.config.paths,i=this.getPrefix(h);if(i.length>0){if(i===h){return k[i]}j=k[i];h=h.substring(i.length+1)}if(j.length>0){j+="/"}return j.replace(/\/\.\//g,"/")+h.replace(/\./g,"/")+".js"},getPrefix:function(i){var k=this.config.paths,j,h="";if(k.hasOwnProperty(i)){return i}for(j in k){if(k.hasOwnProperty(j)&&j+"."===i.substring(0,j.length+1)){if(j.length>h.length){h=j}}}return h},refreshQueue:function(){var n=this.queue.length,k,m,h,l;if(n===0){this.triggerReady();return}for(k=0;k<n;k++){m=this.queue[k];if(m){l=m.requires;if(l.length>this.numLoadedFiles){continue}h=0;do{if(c.isCreated(l[h])){Ext.Array.erase(l,h,1)}else{h++}}while(h<l.length);if(m.requires.length===0){Ext.Array.erase(this.queue,k,1);m.callback.call(m.scope);this.refreshQueue();break}}}return this},injectScriptElement:function(j,l,n,k){var i=document.createElement("script"),m=this,h=function(){m.cleanupScriptElement(i);l.call(k)},p=function(){m.cleanupScriptElement(i);n.call(k)};i.type="text/javascript";i.src=j;i.onload=h;i.onerror=p;i.onreadystatechange=function(){if(this.readyState==="loaded"||this.readyState==="complete"){h()}};this.documentHead.appendChild(i);return i},cleanupScriptElement:function(h){h.onload=null;h.onreadystatechange=null;h.onerror=null;return this},loadScriptFile:function(i,q,m,t,h){var p=this,u=i+(this.getConfig("disableCaching")?("?"+this.getConfig("disableCachingParam")+"="+Ext.Date.now()):""),l=i.split("/").pop(),j=false,s,k,r;t=t||this;this.isLoading=true;if(!h){r=function(){m.call(t,"Failed loading '"+i+"', please verify that the file exists",h)};if(!Ext.isReady&&Ext.onDocumentReady){Ext.onDocumentReady(function(){p.injectScriptElement(u,q,r,t)})}else{this.injectScriptElement(u,q,r,t)}}else{if(typeof XMLHttpRequest!=="undefined"){s=new XMLHttpRequest()}else{s=new ActiveXObject("Microsoft.XMLHTTP")}try{s.open("GET",u,false);s.send(null)}catch(n){j=true}k=(s.status===1223)?204:s.status;if(!j){j=(k===0)}if(j){m.call(this,"Failed loading synchronously via XHR: '"+i+"'; It's likely that the file is either being loaded from a different domain or from the local file system whereby cross origin requests are not allowed due to security reasons. Use asynchronous loading with Ext.require instead.",h)}else{if(k>=200&&k<300){new Function(s.responseText+"\n//@ sourceURL="+l)();q.call(t)}else{m.call(this,"Failed loading synchronously via XHR: '"+i+"'; please verify that the file exists. XHR status code: "+k,h)}}s=null}},exclude:function(i){var h=this;return{require:function(l,k,j){return h.require(l,k,j,i)},syncRequire:function(l,k,j){return h.syncRequire(l,k,j,i)}}},syncRequire:function(){this.syncModeEnabled=true;this.require.apply(this,arguments);this.refreshQueue();this.syncModeEnabled=false},require:function(s,y,A,z){var n,w,k,x,u={},l=[],m=[],r,h=[],q,p,v,t;s=Ext.Array.from(s);z=Ext.Array.from(z);y=y||Ext.emptyFn;A=A||Ext.global;for(q=0,v=z.length;q<v;q++){k=z[q];if(typeof k==="string"&&k.length>0){l=c.getNamesByExpression(k);for(p=0,t=l.length;p<t;p++){u[l[p]]=true}}}for(q=0,v=s.length;q<v;q++){w=s[q];if(typeof w==="string"&&w.length>0){m=c.getNamesByExpression(w);for(p=0,t=m.length;p<t;p++){r=m[p];if(!u.hasOwnProperty(r)&&!c.isCreated(r)){Ext.Array.include(h,r)}}}}if(!this.config.enabled){if(h.length>0){Ext.Error.raise({sourceClass:"Ext.Loader",sourceMethod:"require",msg:"Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((h.length>1)?"es":"")+": "+h.join(", ")})}}if(h.length===0){y.call(A);return this}this.queue.push({requires:h,callback:y,scope:A});h=h.slice();for(q=0,v=h.length;q<v;q++){x=h[q];if(!this.isFileLoaded.hasOwnProperty(x)){this.isFileLoaded[x]=false;n=this.getPath(x);this.classNameToFilePathMap[x]=n;this.numPendingFiles++;this.loadScriptFile(n,Ext.Function.pass(this.onFileLoaded,[x,n],this),Ext.Function.pass(this.onFileLoadError,[x,n]),this,this.syncModeEnabled)}}return this},onFileLoaded:function(i,h){this.numLoadedFiles++;this.isFileLoaded[i]=true;this.numPendingFiles--;if(this.numPendingFiles===0){this.refreshQueue()}},onFileLoadError:function(j,i,h,k){this.numPendingFiles--;this.hasFileLoadError=true},addOptionalRequires:function(k){var m=this.optionalRequires,j,l,h;k=Ext.Array.from(k);for(j=0,l=k.length;j<l;j++){h=k[j];Ext.Array.include(m,h)}return this},triggerReady:function(i){var k=this.readyListeners,j,h;if(this.isLoading||i){this.isLoading=false;if(this.optionalRequires.length){j=Ext.Array.clone(this.optionalRequires);this.optionalRequires.length=0;this.require(j,Ext.Function.pass(this.triggerReady,[true],this),this);return this}while(k.length){h=k.shift();h.fn.call(h.scope);if(this.isLoading){return this}}}return this},onReady:function(k,j,l,h){var i;if(l!==false&&Ext.onDocumentReady){i=k;k=function(){Ext.onDocumentReady(i,j,h)}}if(!this.isLoading){k.call(j)}else{this.readyListeners.push({fn:k,scope:j})}},historyPush:function(h){if(h&&this.isFileLoaded.hasOwnProperty(h)){Ext.Array.include(this.history,h)}return this}};Ext.require=e(g,"require");Ext.syncRequire=e(g,"syncRequire");Ext.exclude=e(g,"exclude");Ext.onReady=function(j,i,h){g.onReady(j,i,true,h)};b.registerPreprocessor("loader",function(w,l,v){var t=this,r=[],s=c.getName(w),m,k,q,p,u,n,h;for(m=0,q=d.length;m<q;m++){n=d[m];if(l.hasOwnProperty(n)){h=l[n];if(typeof h==="string"){r.push(h)}else{if(h instanceof Array){for(k=0,p=h.length;k<p;k++){u=h[k];if(typeof u==="string"){r.push(u)}}}else{if(typeof h!="function"){for(k in h){if(h.hasOwnProperty(k)){u=h[k];if(typeof u==="string"){r.push(u)}}}}}}}}if(r.length===0){return}g.require(r,function(){for(m=0,q=d.length;m<q;m++){n=d[m];if(l.hasOwnProperty(n)){h=l[n];if(typeof h==="string"){l[n]=c.get(h)}else{if(h instanceof Array){for(k=0,p=h.length;k<p;k++){u=h[k];if(typeof u==="string"){l[n][k]=c.get(u)}}}else{if(typeof h!="function"){for(var i in h){if(h.hasOwnProperty(i)){u=h[i];if(typeof u==="string"){l[n][i]=c.get(u)}}}}}}}}v.call(t,w,l)});return false},true);b.setDefaultPreprocessorPosition("loader","after","className");c.registerPostprocessor("uses",function(l,j,q){var h=Ext.Array.from(q.uses),k=[],m,p,n;for(m=0,p=h.length;m<p;m++){n=h[m];if(typeof n==="string"){k.push(n)}}g.addOptionalRequires(k)});c.setDefaultPostprocessorPosition("uses","last")})(Ext.ClassManager,Ext.Class,Ext.Function.flexSetter,Ext.Function.alias);Ext.Error=Ext.extend(Error,{statics:{ignore:false,raise:function(a){a=a||{};if(Ext.isString(a)){a={msg:a}}var c=this.raise.caller;if(c){if(c.$name){a.sourceMethod=c.$name}if(c.$owner){a.sourceClass=c.$owner.$className}}if(Ext.Error.handle(a)!==true){var b=Ext.Error.prototype.toString.call(a);Ext.log({msg:b,level:"error",dump:a,stack:true});throw new Ext.Error(a)}},handle:function(){return Ext.Error.ignore}},name:"Ext.Error",constructor:function(a){if(Ext.isString(a)){a={msg:a}}var b=this;Ext.apply(b,a);b.message=b.message||b.msg},toString:function(){var c=this,b=c.className?c.className:"",a=c.methodName?"."+c.methodName+"(): ":"",d=c.msg||"(No description provided)";return b+a+d}});Ext.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(Ext.isObject(o)){return encodeObject(o)}else{if(typeof o==="function"){return"null"}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o){var a=["[",""],len=o.length,i;for(i=0;i<len;i+=1){a.push(doEncode(o[i]),",")}a[a.length-1]="]";return a.join("")},encodeObject=function(o){var a=["{",""],i;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){a.push(doEncode(i),":",doEncode(o[i]),",")}}a[a.length-1]="}";return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode}return ec(o)}}();this.decode=function(){var dc;return function(json,safe){if(!dc){dc=isNative()?JSON.parse:doDecode}try{return dc(json)}catch(e){if(safe===true){return null}Ext.Error.raise({sourceClass:"Ext.JSON",sourceMethod:"decode",msg:"You're trying to decode an invalid JSON String: "+json})}}}()})();Ext.encode=Ext.JSON.encode;Ext.decode=Ext.JSON.decode;Ext.apply(Ext,{userAgent:navigator.userAgent.toLowerCase(),cache:{},idSeed:1000,windowId:"ext-window",documentId:"ext-document",isReady:false,enableGarbageCollector:true,enableListenerCollection:true,id:function(a,c){var b=this,d="";a=Ext.getDom(a,true)||{};if(a===document){a.id=b.documentId}else{if(a===window){a.id=b.windowId}}if(!a.id){if(b.isSandboxed){if(!b.uniqueGlobalNamespace){b.getUniqueGlobalNamespace()}d=b.uniqueGlobalNamespace+"-"}a.id=d+(c||"ext-gen")+(++Ext.idSeed)}return a.id},getBody:function(){return Ext.get(document.body||false)},getHead:function(){var a;return function(){if(a==undefined){a=Ext.get(document.getElementsByTagName("head")[0])}return a}}(),getDoc:function(){return Ext.get(document)},getCmp:function(a){return Ext.ComponentManager.get(a)},getOrientation:function(){return window.innerHeight>window.innerWidth?"portrait":"landscape"},destroy:function(){var c=arguments.length,b,a;for(b=0;b<c;b++){a=arguments[b];if(a){if(Ext.isArray(a)){this.destroy.apply(this,a)}else{if(Ext.isFunction(a.destroy)){a.destroy()}else{if(a.dom){a.remove()}}}}}},callback:function(d,c,b,a){if(Ext.isFunction(d)){b=b||[];c=c||window;if(a){Ext.defer(d,a,c,b)}else{d.apply(c,b)}}},htmlEncode:function(a){return Ext.String.htmlEncode(a)},htmlDecode:function(a){return Ext.String.htmlDecode(a)},urlAppend:function(a,b){if(!Ext.isEmpty(b)){return a+(a.indexOf("?")===-1?"?":"&")+b}return a}});Ext.ns=Ext.namespace;window.undefined=window.undefined;(function(){var m=function(e){return e.test(Ext.userAgent)},r=document.compatMode=="CSS1Compat",D=function(P,O){var e;return(P&&(e=O.exec(Ext.userAgent)))?parseFloat(e[1]):0},n=document.documentMode,a=m(/opera/),t=a&&m(/version\/10\.5/),I=m(/\bchrome\b/),x=m(/webkit/),c=!I&&m(/safari/),G=c&&m(/applewebkit\/4/),E=c&&m(/version\/3/),B=c&&m(/version\/4/),A=c&&m(/version\/5/),i=!a&&m(/msie/),H=i&&(m(/msie 7/)||n==7),F=i&&(m(/msie 8/)&&n!=7&&n!=9||n==8),C=i&&(m(/msie 9/)&&n!=7&&n!=8||n==9),K=i&&m(/msie 6/),b=!x&&m(/gecko/),N=b&&m(/rv:1\.9/),M=b&&m(/rv:2\.0/),L=b&&m(/rv:5\./),w=N&&m(/rv:1\.9\.0/),u=N&&m(/rv:1\.9\.1/),s=N&&m(/rv:1\.9\.2/),g=m(/windows|win32/),z=m(/macintosh|mac os x/),v=m(/linux/),j=null,k=D(true,/\bchrome\/(\d+\.\d+)/),h=D(true,/\bfirefox\/(\d+\.\d+)/),l=D(i,/msie (\d+\.\d+)/),q=D(a,/version\/(\d+\.\d+)/),d=D(c,/version\/(\d+\.\d+)/),y=D(x,/webkit\/(\d+\.\d+)/),p=/^https/i.test(window.location.protocol);try{document.execCommand("BackgroundImageCache",false,true)}catch(J){}Ext.setVersion("extjs","4.0.7");Ext.apply(Ext,{SSL_SECURE_URL:p&&i?'javascript:""':"about:blank",scopeResetCSS:Ext.buildSettings.scopeResetCSS,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,getDom:function(P,O){if(!P||!document){return null}if(P.dom){return P.dom}else{if(typeof P=="string"){var Q=document.getElementById(P);if(Q&&i&&O){if(P==Q.getAttribute("id")){return Q}else{return null}}return Q}else{return P}}},removeNode:K||H?function(){var e;return function(O){if(O&&O.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(O):Ext.EventManager.removeAll(O);e=e||document.createElement("div");e.appendChild(O);e.innerHTML="";delete Ext.cache[O.id]}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(e):Ext.EventManager.removeAll(e);e.parentNode.removeChild(e);delete Ext.cache[e.id]}},isStrict:r,isIEQuirks:i&&!r,isOpera:a,isOpera10_5:t,isWebKit:x,isChrome:I,isSafari:c,isSafari3:E,isSafari4:B,isSafari5:A,isSafari2:G,isIE:i,isIE6:K,isIE7:H,isIE8:F,isIE9:C,isGecko:b,isGecko3:N,isGecko4:M,isGecko5:L,isFF3_0:w,isFF3_5:u,isFF3_6:s,isFF4:4<=h&&h<5,isFF5:5<=h&&h<6,isLinux:v,isWindows:g,isMac:z,chromeVersion:k,firefoxVersion:h,ieVersion:l,operaVersion:q,safariVersion:d,webKitVersion:y,isSecure:p,BLANK_IMAGE_URL:(K||H)?"//www.sencha.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",value:function(P,e,O){return Ext.isEmpty(P,O)?e:P},escapeRe:function(e){return e.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},addBehaviors:function(R){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(R)})}else{var O={},Q,e,P;for(e in R){if((Q=e.split("@"))[1]){P=Q[0];if(!O[P]){O[P]=Ext.select(P)}O[P].on(Q[1],R[e])}}O=null}},getScrollbarSize:function(R){if(!Ext.isReady){return 0}if(R===true||j===null){var P=Ext.isIE9?"":Ext.baseCSSPrefix+"hide-offsets",T=Ext.getBody().createChild('<div class="'+P+'" style="width:100px;height:50px;overflow:hidden;"><div style="height:200px;"></div></div>'),S=T.child("div",true),O=S.offsetWidth;T.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var e=S.offsetWidth,Q=O-e;T.remove();j={width:Q,height:Q}}return j},getScrollBarWidth:function(O){var e=Ext.getScrollbarSize(O);return e.width+2},copyTo:function(e,O,Q,P){if(typeof Q=="string"){Q=Q.split(/[,;\s]/)}Ext.each(Q,function(R){if(P||O.hasOwnProperty(R)){e[R]=O[R]}},this);return e},destroyMembers:function(Q){for(var P=1,O=arguments,e=O.length;P<e;P++){Ext.destroy(Q[O[P]]);delete Q[O[P]]}},log:Ext.emptyFn,partition:function(e,O){var P=[[],[]];Ext.each(e,function(R,S,Q){P[(O&&O(R,S,Q))||(!O&&R)?0:1].push(R)});return P},invoke:function(e,O){var Q=[],P=Array.prototype.slice.call(arguments,2);Ext.each(e,function(R,S){if(R&&typeof R[O]=="function"){Q.push(R[O].apply(R,P))}else{Q.push(undefined)}});return Q},zip:function(){var U=Ext.partition(arguments,function(V){return typeof V!="function"}),R=U[0],T=U[1][0],e=Ext.max(Ext.pluck(R,"length")),Q=[];for(var S=0;S<e;S++){Q[S]=[];if(T){Q[S]=T.apply(T,Ext.pluck(R,S))}else{for(var P=0,O=R.length;P<O;P++){Q[S].push(R[P][S])}}}return Q},toSentence:function(O,e){var R=O.length;if(R<=1){return O[0]}else{var Q=O.slice(0,R-1),P=O[R-1];return Ext.util.Format.format("{0} {1} {2}",Q.join(", "),e||"and",P)}},useShims:K})})();Ext.application=function(a){Ext.require("Ext.app.Application");Ext.onReady(function(){Ext.create("Ext.app.Application",a)})};(function(){Ext.ns("Ext.util");Ext.util.Format={};var g=Ext.util.Format,e=/<\/?[^>]+>/gi,c=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,b=/\r?\n/g,d=/[^\d\.]/g,a;Ext.apply(g,{thousandSeparator:",",decimalSeparator:".",currencyPrecision:2,currencySign:"$",currencyAtEnd:false,undef:function(h){return h!==undefined?h:""},defaultValue:function(i,h){return i!==undefined&&i!==""?i:h},substr:function(i,j,h){return String(i).substr(j,h)},lowercase:function(h){return String(h).toLowerCase()},uppercase:function(h){return String(h).toUpperCase()},usMoney:function(h){return g.currency(h,"$",2)},currency:function(k,m,j,h){var p="",n=",0",l=0;k=k-0;if(k<0){k=-k;p="-"}j=j||g.currencyPrecision;n+=n+(j>0?".":"");for(;l<j;l++){n+="0"}k=g.number(k,n);if((h||g.currencyAtEnd)===true){return Ext.String.format("{0}{1}{2}",p,k,m||g.currencySign)}else{return Ext.String.format("{0}{1}{2}",p,m||g.currencySign,k)}},date:function(h,i){if(!h){return""}if(!Ext.isDate(h)){h=new Date(Date.parse(h))}return Ext.Date.dateFormat(h,i||Ext.Date.defaultFormat)},dateRenderer:function(h){return function(i){return g.date(i,h)}},stripTags:function(h){return !h?h:String(h).replace(e,"")},stripScripts:function(h){return !h?h:String(h).replace(c,"")},fileSize:function(h){if(h<1024){return h+" bytes"}else{if(h<1048576){return(Math.round(((h*10)/1024))/10)+" KB"}else{return(Math.round(((h*10)/1048576))/10)+" MB"}}},math:function(){var h={};return function(j,i){if(!h[i]){h[i]=Ext.functionFactory("v","return v "+i+";")}return h[i](j)}}(),round:function(j,i){var h=Number(j);if(typeof i=="number"){i=Math.pow(10,i);h=Math.round(j*i)/i}return h},number:function(z,t){if(!t){return z}z=Ext.Number.from(z,NaN);if(isNaN(z)){return""}var B=g.thousandSeparator,r=g.decimalSeparator,A=false,s=z<0,k,h;z=Math.abs(z);if(t.substr(t.length-2)=="/i"){if(!a){a=new RegExp("[^\\d\\"+g.decimalSeparator+"]","g")}t=t.substr(0,t.length-2);A=true;k=t.indexOf(B)!=-1;h=t.replace(a,"").split(r)}else{k=t.indexOf(",")!=-1;h=t.replace(d,"").split(".")}if(1<h.length){z=z.toFixed(h[1].length)}else{if(2<h.length){}else{z=z.toFixed(0)}}var y=z.toString();h=y.split(".");if(k){var x=h[0],q=[],u=x.length,p=Math.floor(u/3),l=x.length%3||3,w;for(w=0;w<u;w+=l){if(w!==0){l=3}q[q.length]=x.substr(w,l);p-=1}y=q.join(B);if(h[1]){y+=r+h[1]}}else{if(h[1]){y=h[0]+r+h[1]}}if(s){s=y.replace(/[^1-9]/g,"")!==""}return(s?"-":"")+t.replace(/[\d,?\.?]+/,y)},numberRenderer:function(h){return function(i){return g.number(i,h)}},plural:function(h,i,j){return h+" "+(h==1?i:(j?j:i+"s"))},nl2br:function(h){return Ext.isEmpty(h)?"":h.replace(b,"<br/>")},capitalize:Ext.String.capitalize,ellipsis:Ext.String.ellipsis,format:Ext.String.format,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,trim:Ext.String.trim,parseBox:function(i){if(Ext.isNumber(i)){i=i.toString()}var j=i.split(" "),h=j.length;if(h==1){j[1]=j[2]=j[3]=j[0]}else{if(h==2){j[2]=j[0];j[3]=j[1]}else{if(h==3){j[3]=j[1]}}}return{top:parseInt(j[0],10)||0,right:parseInt(j[1],10)||0,bottom:parseInt(j[2],10)||0,left:parseInt(j[3],10)||0}},escapeRegex:function(h){return h.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")}})})();Ext.ns("Ext.util");Ext.util.TaskRunner=function(e){e=e||10;var g=[],a=[],b=0,h=false,d=function(){h=false;clearInterval(b);b=0},i=function(){if(!h){h=true;b=setInterval(j,e)}},c=function(k){a.push(k);if(k.onStop){k.onStop.apply(k.scope||k)}},j=function(){var m=a.length,p=new Date().getTime(),r;if(m>0){for(r=0;r<m;r++){Ext.Array.remove(g,a[r])}a=[];if(g.length<1){d();return}}r=0;var q,l,n,k=g.length;for(;r<k;++r){q=g[r];l=p-q.taskRunTime;if(q.interval<=l){n=q.run.apply(q.scope||q,q.args||[++q.taskRunCount]);q.taskRunTime=p;if(n===false||q.taskRunCount===q.repeat){c(q);return}}if(q.duration&&q.duration<=(p-q.taskStartTime)){c(q)}}};this.start=function(k){g.push(k);k.taskStartTime=new Date().getTime();k.taskRunTime=0;k.taskRunCount=0;i();return k};this.stop=function(k){c(k);return k};this.stopAll=function(){d();for(var l=0,k=g.length;l<k;l++){if(g[l].onStop){g[l].onStop()}}g=[];a=[]}};Ext.TaskManager=Ext.create("Ext.util.TaskRunner");Ext.is={init:function(b){var c=this.platforms,e=c.length,d,a;b=b||window.navigator;for(d=0;d<e;d++){a=c[d];this[a.identity]=a.regex.test(b[a.property])}this.Desktop=this.Mac||this.Windows||(this.Linux&&!this.Android);this.Tablet=this.iPad;this.Phone=!this.Desktop&&!this.Tablet;this.iOS=this.iPhone||this.iPad||this.iPod;this.Standalone=!!window.navigator.standalone},platforms:[{property:"platform",regex:/iPhone/i,identity:"iPhone"},{property:"platform",regex:/iPod/i,identity:"iPod"},{property:"userAgent",regex:/iPad/i,identity:"iPad"},{property:"userAgent",regex:/Blackberry/i,identity:"Blackberry"},{property:"userAgent",regex:/Android/i,identity:"Android"},{property:"platform",regex:/Mac/i,identity:"Mac"},{property:"platform",regex:/Win/i,identity:"Windows"},{property:"platform",regex:/Linux/i,identity:"Linux"}]};Ext.is.init();Ext.supports={init:function(){var d=document,g=d.createElement("div"),b=this.tests,c=b.length,a,e;g.innerHTML=['<div style="height:30px;width:50px;">','<div style="height:20px;width:20px;"></div>',"</div>",'<div style="width: 200px; height: 200px; position: relative; padding: 5px;">','<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div>',"</div>",'<div style="float:left; background-color:transparent;"></div>'].join("");d.body.appendChild(g);for(a=0;a<c;a++){e=b[a];this[e.identity]=e.fn.call(this,d,g)}d.body.removeChild(g)},CSS3BoxShadow:Ext.isDefined(document.documentElement.style.boxShadow),ClassList:!!document.documentElement.classList,OrientationChange:((typeof window.orientation!="undefined")&&("onorientationchange" in window)),DeviceMotion:("ondevicemotion" in window),Touch:("ontouchstart" in window)&&(!Ext.is.Desktop),tests:[{identity:"Transitions",fn:function(g,j){var e=["webkit","Moz","o","ms","khtml"],h="TransitionEnd",a=[e[0]+h,"transitionend",e[2]+h,e[3]+h,e[4]+h],d=e.length,c=0,b=false;j=Ext.get(j);for(;c<d;c++){if(j.getStyle(e[c]+"TransitionProperty")){Ext.supports.CSS3Prefix=e[c];Ext.supports.CSS3TransitionEnd=a[c];b=true;break}}return b}},{identity:"RightMargin",fn:function(b,c){var a=b.defaultView;return !(a&&a.getComputedStyle(c.firstChild.firstChild,null).marginRight!="0px")}},{identity:"DisplayChangeInputSelectionBug",fn:function(){var a=Ext.webKitVersion;return 0<a&&a<533}},{identity:"DisplayChangeTextAreaSelectionBug",fn:function(){var a=Ext.webKitVersion;return 0<a&&a<534.24}},{identity:"TransparentColor",fn:function(b,c,a){a=b.defaultView;return !(a&&a.getComputedStyle(c.lastChild,null).backgroundColor!="transparent")}},{identity:"ComputedStyle",fn:function(b,c,a){a=b.defaultView;return a&&a.getComputedStyle}},{identity:"Svg",fn:function(a){return !!a.createElementNS&&!!a.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}},{identity:"Canvas",fn:function(a){return !!a.createElement("canvas").getContext}},{identity:"Vml",fn:function(a){var b=a.createElement("div");b.innerHTML="<!--[if vml]><br><br><![endif]-->";return(b.childNodes.length==2)}},{identity:"Float",fn:function(a,b){return !!b.lastChild.style.cssFloat}},{identity:"AudioTag",fn:function(a){return !!a.createElement("audio").canPlayType}},{identity:"History",fn:function(){return !!(window.history&&history.pushState)}},{identity:"CSS3DTransform",fn:function(){return(typeof WebKitCSSMatrix!="undefined"&&new WebKitCSSMatrix().hasOwnProperty("m41"))}},{identity:"CSS3LinearGradient",fn:function(e,h){var d="background-image:",b="-webkit-gradient(linear, left top, right bottom, from(black), to(white))",g="linear-gradient(left top, black, white)",c="-moz-"+g,a=[d+b,d+g,d+c];h.style.cssText=a.join(";");return(""+h.style.backgroundImage).indexOf("gradient")!==-1}},{identity:"CSS3BorderRadius",fn:function(d,e){var b=["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],c=false,a;for(a=0;a<b.length;a++){if(document.body.style[b[a]]!==undefined){return true}}return c}},{identity:"GeoLocation",fn:function(){return(typeof navigator!="undefined"&&typeof navigator.geolocation!="undefined")||(typeof google!="undefined"&&typeof google.gears!="undefined")}},{identity:"MouseEnterLeave",fn:function(a,b){return("onmouseenter" in b&&"onmouseleave" in b)}},{identity:"MouseWheel",fn:function(a,b){return("onmousewheel" in b)}},{identity:"Opacity",fn:function(a,b){if(Ext.isIE6||Ext.isIE7||Ext.isIE8){return false}b.firstChild.style.cssText="opacity:0.73";return b.firstChild.style.opacity=="0.73"}},{identity:"Placeholder",fn:function(a){return"placeholder" in a.createElement("input")}},{identity:"Direct2DBug",fn:function(){return Ext.isString(document.body.style.msTransformOrigin)}},{identity:"BoundingClientRect",fn:function(a,b){return Ext.isFunction(b.getBoundingClientRect)}},{identity:"IncludePaddingInWidthCalculation",fn:function(b,c){var a=Ext.get(c.childNodes[1].firstChild);return a.getWidth()==210}},{identity:"IncludePaddingInHeightCalculation",fn:function(b,c){var a=Ext.get(c.childNodes[1].firstChild);return a.getHeight()==210}},{identity:"ArraySort",fn:function(){var b=[1,2,3,4,5].sort(function(){return 0});return b[0]===1&&b[1]===2&&b[2]===3&&b[3]===4&&b[4]===5}},{identity:"Range",fn:function(){return !!document.createRange}},{identity:"CreateContextualFragment",fn:function(){var a=Ext.supports.Range?document.createRange():false;return a&&!!a.createContextualFragment}},{identity:"WindowOnError",fn:function(){return Ext.isIE||Ext.isGecko||Ext.webKitVersion>=534.16}}]};Ext.ns("Ext.core");Ext.core.DomHelper=Ext.DomHelper=function(){var y=null,k=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,m=/^table|tbody|tr|td$/i,d=/tag|children|cn|html$/i,u=/td|tr|tbody/i,w=/end/i,s,p="afterbegin",q="afterend",c="beforebegin",r="beforeend",a="<table>",i="</table>",b=a+"<tbody>",j="</tbody>"+i,l=b+"<tr>",x="</tr>"+j;function h(C,E,D,F,B,z){C=Ext.getDom(C);var A;if(s.useDom){A=n(E,null);if(z){C.appendChild(A)}else{(B=="firstChild"?C:C.parentNode).insertBefore(A,C[B]||C)}}else{A=Ext.DomHelper.insertHtml(F,C,Ext.DomHelper.createHtml(E))}return D?Ext.get(A,true):A}function n(z,F){var A,I=document,D,G,B,H;if(Ext.isArray(z)){A=I.createDocumentFragment();for(var E=0,C=z.length;E<C;E++){n(z[E],A)}}else{if(typeof z=="string"){A=I.createTextNode(z)}else{A=I.createElement(z.tag||"div");D=!!A.setAttribute;for(G in z){if(!d.test(G)){B=z[G];if(G=="cls"){A.className=B}else{if(D){A.setAttribute(G,B)}else{A[G]=B}}}}Ext.DomHelper.applyStyles(A,z.style);if((H=z.children||z.cn)){n(H,A)}else{if(z.html){A.innerHTML=z.html}}}}if(F){F.appendChild(A)}return A}function v(E){var A="",z,D,C,F,B;if(typeof E=="string"){A=E}else{if(Ext.isArray(E)){for(B=0;B<E.length;B++){if(E[B]){A+=v(E[B])}}}else{A+="<"+(E.tag=E.tag||"div");for(z in E){D=E[z];if(!d.test(z)){if(typeof D=="object"){A+=" "+z+'="';for(C in D){A+=C+":"+D[C]+";"}A+='"'}else{A+=" "+({cls:"class",htmlFor:"for"}[z]||z)+'="'+D+'"'}}}if(k.test(E.tag)){A+="/>"}else{A+=">";if((F=E.children||E.cn)){A+=v(F)}else{if(E.html){A+=E.html}}A+="</"+E.tag+">"}}}return A}function g(G,D,C,E){y.innerHTML=[D,C,E].join("");var z=-1,B=y,A;while(++z<G){B=B.firstChild}A=B.nextSibling;if(A){var F=document.createDocumentFragment();while(B){A=B.nextSibling;F.appendChild(B);B=A}B=F}return B}function e(z,A,C,B){var D,E;y=y||document.createElement("div");if(z=="td"&&(A==p||A==r)||!u.test(z)&&(A==c||A==q)){return null}E=A==c?C:A==q?C.nextSibling:A==p?C.firstChild:null;if(A==c||A==q){C=C.parentNode}if(z=="td"||(z=="tr"&&(A==r||A==p))){D=g(4,l,B,x)}else{if((z=="tbody"&&(A==r||A==p))||(z=="tr"&&(A==c||A==q))){D=g(3,b,B,j)}else{D=g(2,a,B,i)}}C.insertBefore(D,E);return D}function t(B){var E=document.createElement("div"),z=document.createDocumentFragment(),A=0,C,D;E.innerHTML=B;D=E.childNodes;C=D.length;for(;A<C;A++){z.appendChild(D[A].cloneNode(true))}return z}s={markup:function(z){return v(z)},applyStyles:function(z,A){if(A){z=Ext.fly(z);if(typeof A=="function"){A=A.call()}if(typeof A=="string"){A=Ext.Element.parseStyles(A)}if(typeof A=="object"){z.setStyle(A)}}},insertHtml:function(E,z,F){var C={},B,G,D,H,I,A;E=E.toLowerCase();C[c]=["BeforeBegin","previousSibling"];C[q]=["AfterEnd","nextSibling"];if(z.insertAdjacentHTML){if(m.test(z.tagName)&&(A=e(z.tagName.toLowerCase(),E,z,F))){return A}C[p]=["AfterBegin","firstChild"];C[r]=["BeforeEnd","lastChild"];if((B=C[E])){z.insertAdjacentHTML(B[0],F);return z[B[1]]}}else{if(Ext.isTextNode(z)){E=E==="afterbegin"?"beforebegin":E;E=E==="beforeend"?"afterend":E}G=Ext.supports.CreateContextualFragment?z.ownerDocument.createRange():undefined;H="setStart"+(w.test(E)?"After":"Before");if(C[E]){if(G){G[H](z);I=G.createContextualFragment(F)}else{I=t(F)}z.parentNode.insertBefore(I,E==c?z:z.nextSibling);return z[(E==c?"previous":"next")+"Sibling"]}else{D=(E==p?"first":"last")+"Child";if(z.firstChild){if(G){G[H](z[D]);I=G.createContextualFragment(F)}else{I=t(F)}if(E==p){z.insertBefore(I,z.firstChild)}else{z.appendChild(I)}}else{z.innerHTML=F}return z[D]}}},insertBefore:function(z,B,A){return h(z,B,A,c)},insertAfter:function(z,B,A){return h(z,B,A,q,"nextSibling")},insertFirst:function(z,B,A){return h(z,B,A,p,"firstChild")},append:function(z,B,A){return h(z,B,A,r,"",true)},overwrite:function(z,B,A){z=Ext.getDom(z);z.innerHTML=v(B);return A?Ext.get(z.firstChild):z.firstChild},createHtml:v,createDom:n,useDom:false,createTemplate:function(A){var z=Ext.DomHelper.createHtml(A);return Ext.create("Ext.Template",z)}};return s}();Ext.ns("Ext.core");Ext.core.DomQuery=Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*\#/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var result=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){result[++ri]=ci}}return result}function byId(cs,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var result=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){result[++ri]=ci;return result}}return result}function byAttribute(cs,attr,value,op,custom){var result=[],ri=-1,useGetStyle=custom=="{",fn=Ext.DomQuery.operators[op],a,xml,hasXml;for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}if(!hasXml){xml=Ext.DomQuery.isXml(ci);hasXml=true}if(!xml){if(useGetStyle){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}}else{a=ci.getAttribute(attr)}if((fn&&fn(a,value))||(!fn&&a)){result[++ri]=ci}}return result}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2}if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2)}for(var i=0;i<len1;i++){c1[i]._qdiff=d}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],mode,lastPath,matchers=Ext.DomQuery.matchers,matchersLn=matchers.length,modeMatch,lmode=path.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';path=path.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(path&&lastPath!=path){lastPath=path;var tokenMatch=path.match(tagTokenRe);if(type=="select"){if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}else{if(path.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}}while(!(modeMatch=path.match(modeRe))){var matched=false;for(var j=0;j<matchersLn;j++){var t=matchers[j];var m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});path=path.replace(m[0],"");matched=true;break}}if(!matched){}}if(modeMatch[1]){fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";';path=path.replace(modeMatch[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},jsSelect:function(path,root,type){root=root||document;if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var subPath=paths[i].replace(trimRe,"");if(!cache[subPath]){cache[subPath]=Ext.DomQuery.compile(subPath);if(!cache[subPath]){}}var result=cache[subPath](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)&&!(Ext.isSafari3&&!Ext.isStrict)){try{var isDocumentRoot=root.nodeType===9,_path=path,_root=root;if(!isDocumentRoot&&path.indexOf(",")===-1&&!startIdRe.test(path)){_path="#"+Ext.id(root)+" "+path;_root=root.parentNode}return Ext.Array.toArray(_root.querySelectorAll(_path))}catch(e){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;(function(){var h=document,a=Ext.cache;Ext.Element=Ext.core.Element=function(l,m){var n=typeof l=="string"?h.getElementById(l):l,p;if(!n){return null}p=n.id;if(!m&&p&&a[p]){return a[p].el}this.dom=n;this.id=p||Ext.id(n)};var d=Ext.DomHelper,e=Ext.Element;e.prototype={set:function(q,m){var n=this.dom,l,p;m=(m!==false)&&!!n.setAttribute;for(l in q){if(q.hasOwnProperty(l)){p=q[l];if(l=="style"){d.applyStyles(n,p)}else{if(l=="cls"){n.className=p}else{if(m){n.setAttribute(l,p)}else{n[l]=p}}}}}return this},defaultUnit:"px",is:function(l){return Ext.DomQuery.is(this.dom,l)},focus:function(p,n){var l=this;n=n||l.dom;try{if(Number(p)){Ext.defer(l.focus,p,null,[null,n])}else{n.focus()}}catch(m){}return l},blur:function(){try{this.dom.blur()}catch(l){}return this},getValue:function(l){var m=this.dom.value;return l?parseInt(m,10):m},addListener:function(l,p,n,m){Ext.EventManager.on(this.dom,l,p,n||this,m);return this},removeListener:function(l,n,m){Ext.EventManager.un(this.dom,l,n,m||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this);return this},addUnits:function(m,l){if(Ext.isNumber(m)){return m+(l||this.defaultUnit||"px")}if(m===""||m=="auto"||m==null){return m||""}if(!i.test(m)){return m||""}return m},isBorderBox:function(){return Ext.isBorderBox||g[(this.dom.tagName||"").toLowerCase()]},remove:function(){var l=this,m=l.dom;if(m){delete l.dom;Ext.removeNode(m)}},hover:function(m,l,p,n){var q=this;q.on("mouseenter",m,p||q.dom,n);q.on("mouseleave",l,p||q.dom,n);return q},contains:function(l){return !l?false:Ext.Element.isAncestor(this.dom,l.dom?l.dom:l)},getAttributeNS:function(m,l){return this.getAttribute(l,m)},getAttribute:(Ext.isIE&&!(Ext.isIE9&&document.documentMode===9))?function(l,n){var p=this.dom,m;if(n){m=typeof p[n+":"+l];if(m!="undefined"&&m!="unknown"){return p[n+":"+l]||null}return null}if(l==="for"){l="htmlFor"}return p[l]||null}:function(l,m){var n=this.dom;if(m){return n.getAttributeNS(m,l)||n.getAttribute(m+":"+l)}return n.getAttribute(l)||n[l]||null},update:function(l){if(this.dom){this.dom.innerHTML=l}return this}};var k=e.prototype;e.addMethods=function(l){Ext.apply(k,l)};k.on=k.addListener;k.un=k.removeListener;k.clearListeners=k.removeAllListeners;k.destroy=k.remove;k.autoBoxAdjust=true;var i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;e.get=function(m){var l,q,p;if(!m){return null}if(typeof m=="string"){if(!(q=h.getElementById(m))){return null}if(a[m]&&a[m].el){l=a[m].el;l.dom=q}else{l=e.addToCache(new e(q))}return l}else{if(m.tagName){if(!(p=m.id)){p=Ext.id(m)}if(a[p]&&a[p].el){l=a[p].el;l.dom=m}else{l=e.addToCache(new e(m))}return l}else{if(m instanceof e){if(m!=c){if(Ext.isIE&&(m.id==undefined||m.id=="")){m.dom=m.dom}else{m.dom=h.getElementById(m.id)||m.dom}}return m}else{if(m.isComposite){return m}else{if(Ext.isArray(m)){return e.select(m)}else{if(m==h){if(!c){var n=function(){};n.prototype=e.prototype;c=new n();c.dom=h}return c}}}}}}return null};k.getById=(!Ext.isIE6&&!Ext.isIE7&&!Ext.isIE8)?e.get:function(q){var p=this.dom,n,m,l;if(p){m=p.all[q];if(m){n=a[q];if(n&&n.el){l=n.el;l.dom=m}else{l=e.addToCache(new e(m))}return l}}return e.get(q)};e.addToCache=function(l,m){if(l){m=m||l.id;a[m]={el:l,data:{},events:{}}}return l};e.data=function(m,l,n){m=e.get(m);if(!m){return null}var p=a[m.id].data;if(arguments.length==2){return p[l]}else{return(p[l]=n)}};function j(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var l,n,q,p;for(l in a){if(!a.hasOwnProperty(l)){continue}p=a[l];if(p.skipGarbageCollection){continue}n=p.el;q=n.dom;if(!q||!q.parentNode||(!q.offsetParent&&!h.getElementById(l))){if(q&&Ext.enableListenerCollection){Ext.EventManager.removeAll(q)}delete a[l]}}if(Ext.isIE){var m={};for(l in a){if(!a.hasOwnProperty(l)){continue}m[l]=a[l]}a=Ext.cache=m}}}e.collectorThreadId=setInterval(j,30000);var b=function(){};b.prototype=e.prototype;e.Flyweight=function(l){this.dom=l};e.Flyweight.prototype=new b();e.Flyweight.prototype.isFlyweight=true;e._flyweights={};e.fly=function(n,l){var m=null;l=l||"_global";n=Ext.getDom(n);if(n){(e._flyweights[l]=e._flyweights[l]||new e.Flyweight()).dom=n;m=e._flyweights[l]}return m};Ext.get=e.get;Ext.fly=e.fly;var g=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){g.button=1}})();Ext.Element.addMethods({findParent:function(i,h,c){var e=this.dom,a=document.body,g=0,d;h=h||50;if(isNaN(h)){d=Ext.getDom(h);h=Number.MAX_VALUE}while(e&&e.nodeType==1&&g<h&&e!=a&&e!=d){if(Ext.DomQuery.is(e,i)){return c?Ext.get(e):e}g++;e=e.parentNode}return null},findParentNode:function(d,c,a){var b=Ext.fly(this.dom.parentNode,"_internal");return b?b.findParent(d,c,a):null},up:function(b,a){return this.findParentNode(b,a,true)},select:function(a){return Ext.Element.select(a,false,this.dom)},query:function(a){return Ext.DomQuery.select(a,this.dom)},down:function(a,b){var c=Ext.DomQuery.selectNode(a,this.dom);return b?c:Ext.get(c)},child:function(a,b){var d,c=this,e;e=Ext.get(c).id;e=e.replace(/[\.:]/g,"\\$0");d=Ext.DomQuery.selectNode("#"+e+" > "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null}});Ext.Element.addMethods({appendChild:function(a){return Ext.get(a).appendTo(this)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b,a){b=b||{};if(b.nodeType||b.dom||typeof b=="string"){b=Ext.getDom(b);this.dom.insertBefore(b,this.dom.firstChild);return !a?Ext.get(b):b}else{return this.createChild(b,this.dom.firstChild,a)}},insertSibling:function(e,c,d){var g=this,b,a=(c||"before").toLowerCase()=="after",h;if(Ext.isArray(e)){h=g;Ext.each(e,function(i){b=Ext.fly(h,"_internal").insertSibling(i,c,d);if(a){h=b}});return b}e=e||{};if(e.nodeType||e.dom){b=g.dom.parentNode.insertBefore(Ext.getDom(e),a?g.dom.nextSibling:g.dom);if(!d){b=Ext.get(b)}}else{if(a&&!g.dom.nextSibling){b=Ext.DomHelper.append(g.dom.parentNode,e,!d)}else{b=Ext.DomHelper[a?"insertAfter":"insertBefore"](g.dom,e,!d)}}return b},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.Element.addToCache(b.isFlyweight?new Ext.Element(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(a,b){var e=Ext.DomHelper.insertBefore(this.dom,a||{tag:"div"},!b),c=e.dom||e;c.appendChild(this.dom);return e},insertHtml:function(b,c,a){var d=Ext.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});(function(){var x=Ext.Element,A=Ext.supports,s=document.defaultView,C=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,u=/\s+/,b=/\w/g,v=/table-row|table-.*-group/,c="_internal",e="padding",d="margin",y="border",t="-left",q="-right",w="-top",p="-bottom",j="-width",r=Math,z="hidden",g="isClipped",k="overflow",n="overflow-x",m="overflow-y",B="originalClip",i={l:y+t+j,r:y+q+j,t:y+w+j,b:y+p+j},h={l:e+t,r:e+q,t:e+w,b:e+p},a={l:d+t,r:d+q,t:d+w,b:d+p},D=x.data;x.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';x.inheritedProps={fontSize:1,fontStyle:1,opacity:1};Ext.override(x,{adjustWidth:function(E){var F=this,G=(typeof E=="number");if(G&&F.autoBoxAdjust&&!F.isBorderBox()){E-=(F.getBorderWidth("lr")+F.getPadding("lr"))}return(G&&E<0)?0:E},adjustHeight:function(E){var F=this,G=(typeof E=="number");if(G&&F.autoBoxAdjust&&!F.isBorderBox()){E-=(F.getBorderWidth("tb")+F.getPadding("tb"))}return(G&&E<0)?0:E},addCls:function(I){var J=this,F=[],K=((J.dom.className.replace(l,"")=="")?"":" "),H,E,G;if(I===undefined){return J}if(Object.prototype.toString.call(I)!=="[object Array]"){if(typeof I==="string"){I=I.replace(l,"").split(u);if(I.length===1){I=I[0];if(!J.hasCls(I)){J.dom.className+=K+I}}else{this.addCls(I)}}}else{for(H=0,E=I.length;H<E;H++){G=I[H];if(typeof G=="string"&&(" "+J.dom.className+" ").indexOf(" "+G+" ")==-1){F.push(G)}}if(F.length){J.dom.className+=K+F.join(" ")}}return J},removeCls:function(J){var K=this,I,F,E,H,G;if(J===undefined){return K}if(Object.prototype.toString.call(J)!=="[object Array]"){J=J.replace(l,"").split(u)}if(K.dom&&K.dom.className){G=K.dom.className.replace(l,"").split(u);for(I=0,E=J.length;I<E;I++){H=J[I];if(typeof H=="string"){H=H.replace(l,"");F=Ext.Array.indexOf(G,H);if(F!=-1){Ext.Array.erase(G,F,1)}}}K.dom.className=G.join(" ")}return K},radioCls:function(H){var I=this.dom.parentNode.childNodes,F,G,E;H=Ext.isArray(H)?H:[H];for(G=0,E=I.length;G<E;G++){F=I[G];if(F&&F.nodeType==1){Ext.fly(F,"_internal").removeCls(H)}}return this.addCls(H)},toggleCls:Ext.supports.ClassList?function(E){this.dom.classList.toggle(Ext.String.trim(E));return this}:function(E){return this.hasCls(E)?this.removeCls(E):this.addCls(E)},hasCls:Ext.supports.ClassList?function(F){if(!F){return false}F=F.split(u);var G=F.length,E=0;for(;E<G;E++){if(F[E]&&this.dom.classList.contains(F[E])){return true}}return false}:function(E){return E&&(" "+this.dom.className+" ").indexOf(" "+E+" ")!=-1},replaceCls:function(F,E){return this.removeCls(F).addCls(E)},isStyle:function(E,F){return this.getStyle(E)==F},getStyle:function(){return s&&s.getComputedStyle?function(K){var I=this.dom,E,H,F,J,G;if(I==document){return null}K=x.normalize(K);F=(E=I.style[K])?E:(H=s.getComputedStyle(I,""))?H[K]:null;if(K=="marginRight"&&F!="0px"&&!A.RightMargin){G=x.getRightMarginFixCleaner(I);J=this.getStyle("display");I.style.display="inline-block";F=s.getComputedStyle(I,"").marginRight;I.style.display=J;G()}if(K=="backgroundColor"&&F=="rgba(0, 0, 0, 0)"&&!A.TransparentColor){F="transparent"}return F}:function(J){var G=this.dom,E,F;if(G==document){return null}J=x.normalize(J);do{if(J=="opacity"){if(G.style.filter.match){E=G.style.filter.match(C);if(E){var I=parseFloat(E[1]);if(!isNaN(I)){return I?I/100:0}}}return 1}if(!Ext.isIE6){return G.style[J]||((F=G.currentStyle)?F[J]:null)}try{return G.style[J]||((F=G.currentStyle)?F[J]:null)}catch(H){}if(!x.inheritedProps[J]){break}G=G.parentNode}while(G);return null}}(),getColor:function(E,F,J){var H=this.getStyle(E),G=J||J===""?J:"#",I;if(!H||(/transparent|inherit/.test(H))){return F}if(/^r/.test(H)){Ext.each(H.slice(4,H.length-1).split(","),function(K){I=parseInt(K,10);G+=(I<16?"0":"")+I.toString(16)})}else{H=H.replace("#","");G+=H.length==3?H.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):H}return(G.length>5?G.toLowerCase():F)},setStyle:function(I,H){var G=this,E,F;if(!G.dom){return G}if(typeof I==="string"){E={};E[I]=H;I=E}for(F in I){if(I.hasOwnProperty(F)){H=Ext.value(I[F],"");if(F=="opacity"){G.setOpacity(H)}else{G.dom.style[x.normalize(F)]=H}}}return G},setOpacity:function(F,E){var H=this,J=H.dom,I,G;if(!H.dom){return H}G=H.dom.style;if(!E||!H.anim){if(!Ext.supports.Opacity){F=F<1?"alpha(opacity="+F*100+")":"";I=G.filter.replace(C,"").replace(l,"");G.zoom=1;G.filter=I+(I.length>0?" ":"")+F}else{G.opacity=F}}else{if(!Ext.isObject(E)){E={duration:350,easing:"ease-in"}}H.animate(Ext.applyIf({to:{opacity:F}},E))}return H},clearOpacity:function(){var E=this.dom.style;if(!Ext.supports.Opacity){if(!Ext.isEmpty(E.filter)){E.filter=E.filter.replace(C,"").replace(l,"")}}else{E.opacity=E["-moz-opacity"]=E["-khtml-opacity"]=""}return this},adjustDirect2DDimension:function(I){var G=this,J=G.dom,H=G.getStyle("display"),F=J.style.display,E=J.style.position,L=I==="width"?0:1,K;if(H==="inline"){J.style.display="inline-block"}J.style.position=H.match(v)?"absolute":"static";K=(parseFloat(G.getStyle(I))||parseFloat(J.currentStyle.msTransformOrigin.split(" ")[L])*2)%1;J.style.position=E;if(H==="inline"){J.style.display=F}return K},getHeight:function(L,G){var K=this,H=K.dom,I=Ext.isIE&&K.isStyle("display","none"),M,F,E,J;if(Ext.isIEQuirks){E=H.style;F=E.overflow;K.setStyle({overflow:"hidden"})}M=H.offsetHeight;M=r.max(M,I?0:H.clientHeight)||0;if(!I&&Ext.supports.Direct2DBug){J=K.adjustDirect2DDimension("height");if(G){M+=J}else{if(J>0&&J<0.5){M++}}}if(L){M-=(K.getBorderWidth("tb")+K.getPadding("tb"))}if(Ext.isIEQuirks){K.setStyle({overflow:F})}if(M<0){M=0}return M},getWidth:function(E,O){var L=this,I=L.dom,J=Ext.isIE&&L.isStyle("display","none"),M,G,H,F,K,N;if(Ext.isIEQuirks){F=I.style;H=F.overflow;L.setStyle({overflow:"hidden"})}if(Ext.isOpera10_5){if(I.parentNode.currentStyle.position==="relative"){N=I.parentNode.style.position;I.parentNode.style.position="static";G=I.offsetWidth;I.parentNode.style.position=N}G=Math.max(G||0,I.offsetWidth)}else{if(Ext.supports.BoundingClientRect){M=I.getBoundingClientRect();G=M.right-M.left;G=O?G:Math.ceil(G)}else{G=I.offsetWidth}}G=r.max(G,J?0:I.clientWidth)||0;if(!J&&Ext.supports.Direct2DBug){K=L.adjustDirect2DDimension("width");if(O){G+=K}else{if(K>0&&K<0.5){G++}}}if(E){G-=(L.getBorderWidth("lr")+L.getPadding("lr"))}if(Ext.isIEQuirks){L.setStyle({overflow:H})}if(G<0){G=0}return G},setWidth:function(F,E){var G=this;F=G.adjustWidth(F);if(!E||!G.anim){G.dom.style.width=G.addUnits(F)}else{if(!Ext.isObject(E)){E={}}G.animate(Ext.applyIf({to:{width:F}},E))}return G},setHeight:function(E,F){var G=this;E=G.adjustHeight(E);if(!F||!G.anim){G.dom.style.height=G.addUnits(E)}else{if(!Ext.isObject(F)){F={}}G.animate(Ext.applyIf({to:{height:E}},F))}return G},getBorderWidth:function(E){return this.addStyles(E,i)},getPadding:function(E){return this.addStyles(E,h)},clip:function(){var E=this,F=E.dom;if(!D(F,g)){D(F,g,true);D(F,B,{o:E.getStyle(k),x:E.getStyle(n),y:E.getStyle(m)});E.setStyle(k,z);E.setStyle(n,z);E.setStyle(m,z)}return E},unclip:function(){var F=this,G=F.dom,E;if(D(G,g)){D(G,g,false);E=D(G,B);if(E.o){F.setStyle(k,E.o)}if(E.x){F.setStyle(n,E.x)}if(E.y){F.setStyle(m,E.y)}}return F},addStyles:function(L,K){var F=0,J=L.match(b),I=0,E=J.length,H,G;for(;I<E;I++){H=J[I];G=H&&parseInt(this.getStyle(K[H]),10);if(G){F+=r.abs(G)}}return F},margins:a,applyStyles:function(E){Ext.DomHelper.applyStyles(this.dom,E);return this},getStyles:function(){var H={},E=arguments.length,F=0,G;for(;F<E;++F){G=arguments[F];H[G]=this.getStyle(G)}return H},boxWrap:function(E){E=E||Ext.baseCSSPrefix+"box";var F=Ext.get(this.insertHtml("beforeBegin","<div class='"+E+"'>"+Ext.String.format(x.boxMarkup,E)+"</div>"));Ext.DomQuery.selectNode("."+E+"-mc",F.dom).appendChild(this.dom);return F},setSize:function(G,E,F){var H=this;if(Ext.isObject(G)){F=E;E=G.height;G=G.width}G=H.adjustWidth(G);E=H.adjustHeight(E);if(!F||!H.anim){if(!Ext.isIEQuirks&&(Ext.isIE6||Ext.isIE7)){H.dom.offsetTop}H.dom.style.width=H.addUnits(G);H.dom.style.height=H.addUnits(E)}else{if(F===true){F={}}H.animate(Ext.applyIf({to:{width:G,height:E}},F))}return H},getComputedHeight:function(){var F=this,E=Math.max(F.dom.offsetHeight,F.dom.clientHeight);if(!E){E=parseFloat(F.getStyle("height"))||0;if(!F.isBorderBox()){E+=F.getFrameWidth("tb")}}return E},getComputedWidth:function(){var F=this,E=Math.max(F.dom.offsetWidth,F.dom.clientWidth);if(!E){E=parseFloat(F.getStyle("width"))||0;if(!F.isBorderBox()){E+=F.getFrameWidth("lr")}}return E},getFrameWidth:function(F,E){return E&&this.isBorderBox()?0:(this.getPadding(F)+this.getBorderWidth(F))},addClsOnOver:function(E){var F=this.dom;this.hover(function(){Ext.fly(F,c).addCls(E)},function(){Ext.fly(F,c).removeCls(E)});return this},addClsOnFocus:function(E){var F=this,G=F.dom;F.on("focus",function(){Ext.fly(G,c).addCls(E)});F.on("blur",function(){Ext.fly(G,c).removeCls(E)});return F},addClsOnClick:function(E){var F=this.dom;this.on("mousedown",function(){Ext.fly(F,c).addCls(E);var H=Ext.getDoc(),G=function(){Ext.fly(F,c).removeCls(E);H.removeListener("mouseup",G)};H.on("mouseup",G)});return this},getViewSize:function(){var H=this,I=H.dom,F=(I==Ext.getDoc().dom||I==Ext.getBody().dom),G,J,E;if(F){E={width:x.getViewWidth(),height:x.getViewHeight()}}else{if(Ext.isIE6||Ext.isIEQuirks){G=I.style;J=G.overflow;H.setStyle({overflow:"hidden"})}E={width:I.clientWidth,height:I.clientHeight};if(Ext.isIE6||Ext.isIEQuirks){H.setStyle({overflow:J})}}return E},getStyleSize:function(){var I=this,J=document,K=this.dom,F=(K==J||K==J.body),H=K.style,E,G;if(F){return{width:x.getViewWidth(),height:x.getViewHeight()}}if(H.width&&H.width!="auto"){E=parseFloat(H.width);if(I.isBorderBox()){E-=I.getFrameWidth("lr")}}if(H.height&&H.height!="auto"){G=parseFloat(H.height);if(I.isBorderBox()){G-=I.getFrameWidth("tb")}}return{width:E||I.getWidth(true),height:G||I.getHeight(true)}},getSize:function(E){return{width:this.getWidth(E),height:this.getHeight(E)}},repaint:function(){var E=this.dom;this.addCls(Ext.baseCSSPrefix+"repaint");setTimeout(function(){Ext.fly(E).removeCls(Ext.baseCSSPrefix+"repaint")},1);return this},selectable:function(){var E=this;E.dom.unselectable="off";E.on("selectstart",function(F){F.stopPropagation();return true});E.applyStyles("-moz-user-select: text; -khtml-user-select: text;");E.removeCls(Ext.baseCSSPrefix+"unselectable");return E},unselectable:function(){var E=this;E.dom.unselectable="on";E.swallowEvent("selectstart",true);E.applyStyles("-moz-user-select:-moz-none;-khtml-user-select:none;");E.addCls(Ext.baseCSSPrefix+"unselectable");return E},getMargin:function(F){var G=this,H={t:"top",l:"left",r:"right",b:"bottom"},I={},E;if(!F){for(E in G.margins){I[H[E]]=parseFloat(G.getStyle(G.margins[E]))||0}return I}else{return G.addStyles.call(G,F,G.margins)}}})})();Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.OFFSETS=3;Ext.Element.ASCLASS=4;Ext.Element.visibilityCls=Ext.baseCSSPrefix+"hide-nosize";Ext.Element.addMethods(function(){var e=Ext.Element,q="opacity",j="visibility",g="display",d="hidden",n="offsets",k="asclass",m="none",a="nosize",b="originalDisplay",c="visibilityMode",h="isVisible",i=e.data,l=function(s){var r=i(s,b);if(r===undefined){i(s,b,r="")}return r},p=function(s){var r=i(s,c);if(r===undefined){i(s,c,r=1)}return r};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(r){i(this.dom,c,r);return this},isVisible:function(){var r=this,t=r.dom,s=i(t,h);if(typeof s=="boolean"){return s}s=!r.isStyle(j,d)&&!r.isStyle(g,m)&&!((p(t)==e.ASCLASS)&&r.hasCls(r.visibilityCls||e.visibilityCls));i(t,h,s);return s},setVisible:function(u,r){var x=this,s,z,y,w,v=x.dom,t=p(v);if(typeof r=="string"){switch(r){case g:t=e.DISPLAY;break;case j:t=e.VISIBILITY;break;case n:t=e.OFFSETS;break;case a:case k:t=e.ASCLASS;break}x.setVisibilityMode(t);r=false}if(!r||!x.anim){if(t==e.ASCLASS){x[u?"removeCls":"addCls"](x.visibilityCls||e.visibilityCls)}else{if(t==e.DISPLAY){return x.setDisplayed(u)}else{if(t==e.OFFSETS){if(!u){if(!x.hideModeStyles){x.hideModeStyles={position:x.getStyle("position"),top:x.getStyle("top"),left:x.getStyle("left")}}x.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{if(x.hideModeStyles){x.applyStyles(x.hideModeStyles||{position:"",top:"",left:""});delete x.hideModeStyles}}}else{x.fixDisplay();v.style.visibility=u?"":d}}}}else{if(u){x.setOpacity(0.01);x.setVisible(true)}if(!Ext.isObject(r)){r={duration:350,easing:"ease-in"}}x.animate(Ext.applyIf({callback:function(){u||x.setVisible(false).setOpacity(1)},to:{opacity:(u)?1:0}},r))}i(v,h,u);return x},hasMetrics:function(){var r=this.dom;return this.isVisible()||(p(r)==e.OFFSETS)||(p(r)==e.VISIBILITY)},toggle:function(r){var s=this;s.setVisible(!s.isVisible(),s.anim(r));return s},setDisplayed:function(r){if(typeof r=="boolean"){r=r?l(this.dom):m}this.setStyle(g,r);return this},fixDisplay:function(){var r=this;if(r.isStyle(g,m)){r.setStyle(j,d);r.setStyle(g,l(this.dom));if(r.isStyle(g,m)){r.setStyle(g,"block")}}},hide:function(r){if(typeof r=="string"){this.setVisible(false,r);return this}this.setVisible(false,this.anim(r));return this},show:function(r){if(typeof r=="string"){this.setVisible(true,r);return this}this.setVisible(true,this.anim(r));return this}}}());Ext.applyIf(Ext.Element.prototype,{animate:function(a){var b=this;if(!b.id){b=Ext.get(b.dom)}if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(Ext.create("Ext.fx.Anim",b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this,c=a.duration||Ext.fx.Anim.prototype.duration,e=a.easing||"ease",d;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));Ext.fx.Manager.setFxDefaults(b.id,{delay:0});d={target:b,remove:a.remove,alternate:a.alternate||false,duration:c,easing:e,callback:a.callback,listeners:a.listeners,iterations:a.iterations||1,scope:a.scope,block:a.block,concurrent:a.concurrent,delay:a.delay||0,paused:true,keyframes:a.keyframes,from:a.from||{},to:Ext.apply({},a)};Ext.apply(d.to,a.to);delete d.to.to;delete d.to.from;delete d.to.remove;delete d.to.alternate;delete d.to.keyframes;delete d.to.iterations;delete d.to.listeners;delete d.to.target;delete d.to.paused;delete d.to.callback;delete d.to.scope;delete d.to.duration;delete d.to.easing;delete d.to.concurrent;delete d.to.block;delete d.to.stopAnimation;delete d.to.delay;return d},slideIn:function(b,h,e){var g=this,d=g.dom.style,c,a;b=b||"t";h=h||{};c=function(){var m=this,l=h.listeners,n,i,k,j,p;if(!e){g.fixDisplay()}n=g.getBox();if((b=="t"||b=="b")&&n.height===0){n.height=g.dom.scrollHeight}else{if((b=="l"||b=="r")&&n.width===0){n.width=g.dom.scrollWidth}}i=g.getPositioning();g.setSize(n.width,n.height);j=g.wrap({style:{visibility:e?"visible":"hidden"}});j.setPositioning(i);if(j.isStyle("position","static")){j.position("relative")}g.clearPositioning("auto");j.clip();g.setStyle({visibility:"",position:"absolute"});if(e){j.setSize(n.width,n.height)}switch(b){case"t":p={from:{width:n.width+"px",height:"0px"},to:{width:n.width+"px",height:n.height+"px"}};d.bottom="0px";break;case"l":p={from:{width:"0px",height:n.height+"px"},to:{width:n.width+"px",height:n.height+"px"}};d.right="0px";break;case"r":p={from:{x:n.x+n.width,width:"0px",height:n.height+"px"},to:{x:n.x,width:n.width+"px",height:n.height+"px"}};break;case"b":p={from:{y:n.y+n.height,width:n.width+"px",height:"0px"},to:{y:n.y,width:n.width+"px",height:n.height+"px"}};break;case"tl":p={from:{x:n.x,y:n.y,width:"0px",height:"0px"},to:{width:n.width+"px",height:n.height+"px"}};d.bottom="0px";d.right="0px";break;case"bl":p={from:{x:n.x+n.width,width:"0px",height:"0px"},to:{x:n.x,width:n.width+"px",height:n.height+"px"}};d.right="0px";break;case"br":p={from:{x:n.x+n.width,y:n.y+n.height,width:"0px",height:"0px"},to:{x:n.x,y:n.y,width:n.width+"px",height:n.height+"px"}};break;case"tr":p={from:{y:n.y+n.height,width:"0px",height:"0px"},to:{y:n.y,width:n.width+"px",height:n.height+"px"}};d.bottom="0px";break}j.show();a=Ext.apply({},h);delete a.listeners;a=Ext.create("Ext.fx.Anim",Ext.applyIf(a,{target:j,duration:500,easing:"ease-out",from:e?p.to:p.from,to:e?p.from:p.to}));a.on("afteranimate",function(){if(e){g.setPositioning(i);if(h.useDisplay){g.setDisplayed(false)}else{g.hide()}}else{g.clearPositioning();g.setPositioning(i)}if(j.dom){j.dom.parentNode.insertBefore(g.dom,j.dom);j.remove()}g.setSize(n.width,n.height);m.end()});if(l){a.on(l)}};g.animate({duration:h.duration?h.duration*2:1000,listeners:{beforeanimate:{fn:c},afteranimate:{fn:function(){if(a&&a.running){a.end()}}}}});return g},slideOut:function(a,b){return this.slideIn(a,b,true)},puff:function(c){var b=this,a;c=Ext.applyIf(c||{},{easing:"ease-out",duration:500,useDisplay:false});a=function(){b.clearOpacity();b.show();var e=b.getBox(),g=b.getStyle("fontSize"),d=b.getPositioning();this.to={width:e.width*2,height:e.height*2,x:e.x-(e.width/2),y:e.y-(e.height/2),opacity:0,fontSize:"200%"};this.on("afteranimate",function(){if(b.dom){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(d);b.setStyle({fontSize:g})}})};b.animate({duration:c.duration,easing:c.easing,listeners:{beforeanimate:{fn:a}}});return b},switchOff:function(c){var b=this,a;c=Ext.applyIf(c||{},{easing:"ease-in",duration:500,remove:false,useDisplay:false});a=function(){var h=this,g=b.getSize(),i=b.getXY(),e,d;b.clearOpacity();b.clip();d=b.getPositioning();e=Ext.create("Ext.fx.Animator",{target:b,duration:c.duration,easing:c.easing,keyframes:{33:{opacity:0.3},66:{height:1,y:i[1]+g.height/2},100:{width:1,x:i[0]+g.width/2}}});e.on("afteranimate",function(){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(d);b.setSize(g);h.end()})};b.animate({duration:(c.duration*2),listeners:{beforeanimate:{fn:a}}});return b},frame:function(a,d,e){var c=this,b;a=a||"#C3DAF9";d=d||1;e=e||{};b=function(){c.show();var i=this,j=c.getBox(),h=Ext.getBody().createChild({style:{position:"absolute","pointer-events":"none","z-index":35000,border:"0px solid "+a}}),g;g=Ext.create("Ext.fx.Anim",{target:h,duration:e.duration||1000,iterations:d,from:{top:j.y,left:j.x,borderWidth:0,opacity:1,height:j.height,width:j.width},to:{top:j.y-20,left:j.x-20,borderWidth:10,opacity:0,height:j.height+40,width:j.width+40}});g.on("afteranimate",function(){h.remove();i.end()})};c.animate({duration:(e.duration*2)||2000,listeners:{beforeanimate:{fn:b}}});return c},ghost:function(a,d){var c=this,b;a=a||"b";b=function(){var h=c.getWidth(),g=c.getHeight(),i=c.getXY(),e=c.getPositioning(),j={opacity:0};switch(a){case"t":j.y=i[1]-g;break;case"l":j.x=i[0]-h;break;case"r":j.x=i[0]+h;break;case"b":j.y=i[1]+g;break;case"tl":j.x=i[0]-h;j.y=i[1]-g;break;case"bl":j.x=i[0]-h;j.y=i[1]+g;break;case"br":j.x=i[0]+h;j.y=i[1]+g;break;case"tr":j.x=i[0]+h;j.y=i[1]-g;break}this.to=j;this.on("afteranimate",function(){if(c.dom){c.hide();c.clearOpacity();c.setPositioning(e)}})};c.animate(Ext.applyIf(d||{},{duration:500,easing:"ease-out",listeners:{beforeanimate:{fn:b}}}));return c},highlight:function(d,b){var i=this,e=i.dom,k={},h,l,g,c,a,j;b=b||{};c=b.listeners||{};g=b.attr||"backgroundColor";k[g]=d||"ffff9c";if(!b.to){l={};l[g]=b.endColor||i.getColor(g,"ffffff","")}else{l=b.to}b.listeners=Ext.apply(Ext.apply({},c),{beforeanimate:function(){h=e.style[g];i.clearOpacity();i.show();a=c.beforeanimate;if(a){j=a.fn||a;return j.apply(a.scope||c.scope||window,arguments)}},afteranimate:function(){if(e){e.style[g]=h}a=c.afteranimate;if(a){j=a.fn||a;j.apply(a.scope||c.scope||window,arguments)}}});i.animate(Ext.apply({},b,{duration:1000,easing:"ease-in",from:k,to:l}));return i},pause:function(a){var b=this;Ext.fx.Manager.setFxDefaults(b.id,{delay:a});return b},fadeIn:function(a){this.animate(Ext.apply({},a,{opacity:1}));return this},fadeOut:function(a){this.animate(Ext.apply({},a,{opacity:0}));return this},scale:function(a,b,c){this.animate(Ext.apply({},c,{width:a,height:b}));return this},shift:function(a){this.animate(a);return this}});Ext.applyIf(Ext.Element,{unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,opacityRe:/alpha\(opacity=(.*)\)/i,cssRe:/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:Ext.Element.prototype.addUnits,parseBox:function(b){if(Ext.isObject(b)){return{top:b.top||0,right:b.right||0,bottom:b.bottom||0,left:b.left||0}}else{if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:parseFloat(c[0])||0,right:parseFloat(c[1])||0,bottom:parseFloat(c[2])||0,left:parseFloat(c[3])||0}}},unitizeBox:function(c,b){var a=this.addUnits,d=this.parseBox(c);return a(d.top,b)+" "+a(d.right,b)+" "+a(d.bottom,b)+" "+a(d.left,b)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){if(a=="float"){a=Ext.supports.Float?"cssFloat":"styleFloat"}return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},getDocumentHeight:function(){return Math.max(!Ext.isStrict?document.body.scrollHeight:document.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return Math.max(!Ext.isStrict?document.body.scrollWidth:document.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return window.innerHeight},getViewportWidth:function(){return window.innerWidth},getViewSize:function(){return{width:window.innerWidth,height:window.innerHeight}},getOrientation:function(){if(Ext.supports.OrientationChange){return(window.orientation==0)?"portrait":"landscape"}return(window.innerHeight>window.innerWidth)?"portrait":"landscape"},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(typeof d=="string"){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c<a;++c){g.push(e.transformElement(d[c]))}return e},invoke:function(g,b){var h=this,d=h.elements,a=d.length,j,c;for(c=0;c<a;c++){j=d[c];if(j){Ext.Element.prototype[g].apply(h.getElement(j),b)}}return h},item:function(b){var d=this,c=d.elements[b],a=null;if(c){a=d.getElement(c)}return a},addListener:function(b,j,h,g){var d=this.elements,a=d.length,c,k;for(c=0;c<a;c++){k=d[c];if(k){Ext.EventManager.on(k,b,j,h||k,g)}}return this},each:function(g,d){var h=this,c=h.elements,a=c.length,b,j;for(b=0;b<a;b++){j=c[b];if(j){j=this.getElement(j);if(g.call(d||j,j,h,b)===false){break}}}return h},fill:function(a){var b=this;b.elements=[];b.add(a);return b},filter:function(a){var b=[],d=this,c=Ext.isFunction(a)?a:function(e){return e.is(a)};d.each(function(h,e,g){if(c(h,g)!==false){b[b.length]=d.transformElement(h)}});d.elements=b;return d},indexOf:function(a){return Ext.Array.indexOf(this.elements,this.transformElement(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;Ext.CompositeElementLite.importElementMethods=function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(typeof b[c]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}};Ext.CompositeElementLite.importElementMethods();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};this.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};this.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.require("Ext.util.DelayedTask",function(){Ext.util.Event=Ext.extend(Object,(function(){function b(e,g,h,d){g.task=new Ext.util.DelayedTask();return function(){g.task.delay(h.buffer,e,d,Ext.Array.toArray(arguments))}}function a(e,g,h,d){return function(){var i=new Ext.util.DelayedTask();if(!g.tasks){g.tasks=[]}g.tasks.push(i);i.delay(h.delay||10,e,d,Ext.Array.toArray(arguments))}}function c(e,g,h,d){return function(){g.ev.removeListener(g.fn,d);return e.apply(d,arguments)}}return{isEvent:true,constructor:function(e,d){this.name=d;this.observable=e;this.listeners=[]},addListener:function(g,e,d){var h=this,i;e=e||h.observable;if(!h.isListening(g,e)){i=h.createListener(g,e,d);if(h.firing){h.listeners=h.listeners.slice(0)}h.listeners.push(i)}},createListener:function(g,e,i){i=i||{};e=e||this.observable;var h={fn:g,scope:e,o:i,ev:this},d=g;if(i.single){d=c(d,h,i,e)}if(i.delay){d=a(d,h,i,e)}if(i.buffer){d=b(d,h,i,e)}h.fireFn=d;return h},findListener:function(j,h){var g=this.listeners,d=g.length,k,e;while(d--){k=g[d];if(k){e=k.scope;if(k.fn==j&&(e==h||e==this.observable)){return d}}}return -1},isListening:function(e,d){return this.findListener(e,d)!==-1},removeListener:function(h,g){var i=this,e,j,d;e=i.findListener(h,g);if(e!=-1){j=i.listeners[e];if(i.firing){i.listeners=i.listeners.slice(0)}if(j.task){j.task.cancel();delete j.task}d=j.tasks&&j.tasks.length;if(d){while(d--){j.tasks[d].cancel()}delete j.tasks}Ext.Array.erase(i.listeners,e,1);return true}return false},clearListeners:function(){var e=this.listeners,d=e.length;while(d--){this.removeListener(e[d].fn,e[d].scope)}},fire:function(){var j=this,g=j.listeners,h=g.length,e,d,k;if(h>0){j.firing=true;for(e=0;e<h;e++){k=g[e];d=arguments.length?Array.prototype.slice.call(arguments,0):[];if(k.o){d.push(k.o)}if(k&&k.fireFn.apply(k.scope||j.observable,d)===false){return(j.firing=false)}}}j.firing=false;return true}}})())});Ext.EventManager={hasBoundOnReady:false,hasFiredReady:false,readyTimeout:null,hasOnReadyStateChange:false,readyEvent:new Ext.util.Event(),checkReadyState:function(){var a=Ext.EventManager;if(window.attachEvent){if(window!=top){return false}try{document.documentElement.doScroll("left")}catch(b){return false}a.fireDocReady();return true}if(document.readyState=="complete"){a.fireDocReady();return true}a.readyTimeout=setTimeout(arguments.callee,2);return false},bindReadyEvent:function(){var a=Ext.EventManager;if(a.hasBoundOnReady){return}if(document.addEventListener){document.addEventListener("DOMContentLoaded",a.fireDocReady,false);window.addEventListener("load",a.fireDocReady,false)}else{if(!a.checkReadyState()){document.attachEvent("onreadystatechange",a.checkReadyState);a.hasOnReadyStateChange=true}window.attachEvent("onload",a.fireDocReady,false)}a.hasBoundOnReady=true},fireDocReady:function(){var a=Ext.EventManager;if(!a.hasFiredReady){a.hasFiredReady=true;if(document.addEventListener){document.removeEventListener("DOMContentLoaded",a.fireDocReady,false);window.removeEventListener("load",a.fireDocReady,false)}else{if(a.readyTimeout!==null){clearTimeout(a.readyTimeout)}if(a.hasOnReadyStateChange){document.detachEvent("onreadystatechange",a.checkReadyState)}window.detachEvent("onload",a.fireDocReady)}Ext.supports.init()}if(!Ext.isReady){Ext.isReady=true;a.onWindowUnload();a.readyEvent.fire()}},onDocumentReady:function(c,b,a){a=a||{};var d=Ext.EventManager,e=d.readyEvent;a.single=true;if(Ext.isReady){e.addListener(c,b,a);e.fire()}else{a.delay=a.delay||1;e.addListener(c,b,a);d.bindReadyEvent()}},stoppedMouseDownEvent:new Ext.util.Event(),propRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|freezeEvent)$/,getId:function(a){var b=false,c;a=Ext.getDom(a);if(a===document||a===window){c=a===document?Ext.documentId:Ext.windowId}else{c=Ext.id(a)}if(a&&(a.getElementById||a.navigator)){b=true}if(!Ext.cache[c]){Ext.Element.addToCache(new Ext.Element(a),c);if(b){Ext.cache[c].skipGarbageCollection=true}}return c},prepareListenerConfig:function(d,b,h){var e=this,i=e.propRe,c,g,a;for(c in b){if(b.hasOwnProperty(c)){if(!i.test(c)){g=b[c];if(Ext.isFunction(g)){a=[d,c,g,b.scope,b]}else{a=[d,c,g.fn,g.scope,g]}if(h===true){e.removeListener.apply(this,a)}else{e.addListener.apply(e,a)}}}}},normalizeEvent:function(a,b){if(/mouseenter|mouseleave/.test(a)&&!Ext.supports.MouseEnterLeave){if(b){b=Ext.Function.createInterceptor(b,this.contains,this)}a=a=="mouseenter"?"mouseover":"mouseout"}else{if(a=="mousewheel"&&!Ext.supports.MouseWheel&&!Ext.isOpera){a="DOMMouseScroll"}}return{eventName:a,fn:b}},contains:function(b){var a=b.browserEvent.currentTarget,c=this.getRelatedTarget(b);if(a&&a.firstChild){while(c){if(c===a){return false}c=c.parentNode;if(c&&(c.nodeType!=1)){c=null}}}return true},addListener:function(c,a,g,e,b){if(typeof a!=="string"){this.prepareListenerConfig(c,a);return}var h=Ext.getDom(c),i,d;b=b||{};i=this.normalizeEvent(a,g);d=this.createListenerWrap(h,a,i.fn,e,b);if(h.attachEvent){h.attachEvent("on"+i.eventName,d)}else{h.addEventListener(i.eventName,d,b.capture||false)}if(h==document&&a=="mousedown"){this.stoppedMouseDownEvent.addListener(d)}this.getEventListenerCache(h,a).push({fn:g,wrap:d,scope:e})},removeListener:function(h,l,m,p){if(typeof l!=="string"){this.prepareListenerConfig(h,l,true);return}var g=Ext.getDom(h),a=this.getEventListenerCache(g,l),n=this.normalizeEvent(l).eventName,k=a.length,e,c,b,d;while(k--){c=a[k];if(c&&(!m||c.fn==m)&&(!p||c.scope===p)){b=c.wrap;if(b.task){clearTimeout(b.task);delete b.task}e=b.tasks&&b.tasks.length;if(e){while(e--){clearTimeout(b.tasks[e])}delete b.tasks}if(g.detachEvent){g.detachEvent("on"+n,b)}else{g.removeEventListener(n,b,false)}if(b&&g==document&&l=="mousedown"){this.stoppedMouseDownEvent.removeListener(b)}Ext.Array.erase(a,k,1)}}},removeAll:function(b){var d=Ext.getDom(b),a,c;if(!d){return}a=this.getElementEventCache(d);for(c in a){if(a.hasOwnProperty(c)){this.removeListener(d,c)}}Ext.cache[d.id].events={}},purgeElement:function(d,b){var e=Ext.getDom(d),c=0,a;if(b){this.removeListener(e,b)}else{this.removeAll(e)}if(e&&e.childNodes){for(a=d.childNodes.length;c<a;c++){this.purgeElement(d.childNodes[c],b)}}},createListenerWrap:function(i,b,e,d,a){a=a||{};var g,h;return function c(k,j){if(!h){g=["if(!Ext) {return;}"];if(a.buffer||a.delay||a.freezeEvent){g.push("e = new Ext.EventObjectImpl(e, "+(a.freezeEvent?"true":"false")+");")}else{g.push("e = Ext.EventObject.setEvent(e);")}if(a.delegate){g.push('var t = e.getTarget("'+a.delegate+'", this);');g.push("if(!t) {return;}")}else{g.push("var t = e.target;")}if(a.target){g.push("if(e.target !== options.target) {return;}")}if(a.stopEvent){g.push("e.stopEvent();")}else{if(a.preventDefault){g.push("e.preventDefault();")}if(a.stopPropagation){g.push("e.stopPropagation();")}}if(a.normalized===false){g.push("e = e.browserEvent;")}if(a.buffer){g.push("(wrap.task && clearTimeout(wrap.task));");g.push("wrap.task = setTimeout(function(){")}if(a.delay){g.push("wrap.tasks = wrap.tasks || [];");g.push("wrap.tasks.push(setTimeout(function(){")}g.push("fn.call(scope || dom, e, t, options);");if(a.single){g.push("Ext.EventManager.removeListener(dom, ename, fn, scope);")}if(a.delay){g.push("}, "+a.delay+"));")}if(a.buffer){g.push("}, "+a.buffer+");")}h=Ext.functionFactory("e","options","fn","scope","ename","dom","wrap","args",g.join("\n"))}h.call(i,k,a,e,d,b,i,c,j)}},getEventListenerCache:function(c,a){if(!c){return[]}var b=this.getElementEventCache(c);return b[a]||(b[a]=[])},getElementEventCache:function(b){if(!b){return{}}var a=Ext.cache[this.getId(b)];return a.events||(a.events={})},mouseLeaveRe:/(mouseout|mouseleave)/,mouseEnterRe:/(mouseover|mouseenter)/,stopEvent:function(a){this.stopPropagation(a);this.preventDefault(a)},stopPropagation:function(a){a=a.browserEvent||a;if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}},preventDefault:function(a){a=a.browserEvent||a;if(a.preventDefault){a.preventDefault()}else{a.returnValue=false;try{if(a.ctrlKey||a.keyCode>111&&a.keyCode<124){a.keyCode=-1}}catch(b){}}},getRelatedTarget:function(a){a=a.browserEvent||a;var b=a.relatedTarget;if(!b){if(this.mouseLeaveRe.test(a.type)){b=a.toElement}else{if(this.mouseEnterRe.test(a.type)){b=a.fromElement}}}return this.resolveTextNode(b)},getPageX:function(a){return this.getXY(a)[0]},getPageY:function(a){return this.getXY(a)[1]},getPageXY:function(c){c=c.browserEvent||c;var b=c.pageX,e=c.pageY,d=document.documentElement,a=document.body;if(!b&&b!==0){b=c.clientX+(d&&d.scrollLeft||a&&a.scrollLeft||0)-(d&&d.clientLeft||a&&a.clientLeft||0);e=c.clientY+(d&&d.scrollTop||a&&a.scrollTop||0)-(d&&d.clientTop||a&&a.clientTop||0)}return[b,e]},getTarget:function(a){a=a.browserEvent||a;return this.resolveTextNode(a.target||a.srcElement)},resolveTextNode:Ext.isGecko?function(b){if(!b){return}var a=HTMLElement.prototype.toString.call(b);if(a=="[xpconnect wrapped native prototype]"||a=="[object XULElement]"){return}return b.nodeType==3?b.parentNode:b}:function(a){return a&&a.nodeType==3?a.parentNode:a},curWidth:0,curHeight:0,onWindowResize:function(d,c,b){var a=this.resizeEvent;if(!a){this.resizeEvent=a=new Ext.util.Event();this.on(window,"resize",this.fireResize,this,{buffer:100})}a.addListener(d,c,b)},fireResize:function(){var c=this,a=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight();if(c.curHeight!=b||c.curWidth!=a){c.curHeight=b;c.curWidth=a;c.resizeEvent.fire(a,b)}},removeResizeListener:function(b,a){if(this.resizeEvent){this.resizeEvent.removeListener(b,a)}},onWindowUnload:function(){var a=this.unloadEvent;if(!a){this.unloadEvent=a=new Ext.util.Event();this.addListener(window,"unload",this.fireUnload,this)}},fireUnload:function(){try{this.removeUnloadListener();if(Ext.isGecko3){var h=Ext.ComponentQuery.query("gridview"),b=0,d=h.length;for(;b<d;b++){h[b].scrollToTop()}}var c,a=Ext.cache;for(c in a){if(a.hasOwnProperty(c)){Ext.EventManager.removeAll(c)}}}catch(g){}},removeUnloadListener:function(){if(this.unloadEvent){this.removeListener(window,"unload",this.fireUnload)}},useKeyDown:Ext.isWebKit?parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1],10)>=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera),getKeyEvent:function(){return this.useKeyDown?"keydown":"keypress"}};Ext.onReady=function(c,b,a){Ext.Loader.onReady(c,b,true,a)};Ext.onDocumentReady=Ext.EventManager.onDocumentReady;Ext.EventManager.on=Ext.EventManager.addListener;Ext.EventManager.un=Ext.EventManager.removeListener;(function(){var a=function(){var g=document.body||document.getElementsByTagName("body")[0],e=Ext.baseCSSPrefix,c=[e+"body"],b=[],d;if(!g){return false}d=g.parentNode;function h(i){c.push(e+i)}if(Ext.isIE){h("ie");if(Ext.isIE6){h("ie6")}else{h("ie7p");if(Ext.isIE7){h("ie7")}else{h("ie8p");if(Ext.isIE8){h("ie8")}else{h("ie9p");if(Ext.isIE9){h("ie9")}}}}if(Ext.isIE6||Ext.isIE7){h("ie7m")}if(Ext.isIE6||Ext.isIE7||Ext.isIE8){h("ie8m")}if(Ext.isIE7||Ext.isIE8){h("ie78")}}if(Ext.isGecko){h("gecko");if(Ext.isGecko3){h("gecko3")}if(Ext.isGecko4){h("gecko4")}if(Ext.isGecko5){h("gecko5")}}if(Ext.isOpera){h("opera")}if(Ext.isWebKit){h("webkit")}if(Ext.isSafari){h("safari");if(Ext.isSafari2){h("safari2")}if(Ext.isSafari3){h("safari3")}if(Ext.isSafari4){h("safari4")}if(Ext.isSafari5){h("safari5")}}if(Ext.isChrome){h("chrome")}if(Ext.isMac){h("mac")}if(Ext.isLinux){h("linux")}if(!Ext.supports.CSS3BorderRadius){h("nbr")}if(!Ext.supports.CSS3LinearGradient){h("nlg")}if(!Ext.scopeResetCSS){h("reset")}if(d){if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){Ext.isBorderBox=false}else{Ext.isBorderBox=true}b.push(e+(Ext.isBorderBox?"border-box":"strict"));if(!Ext.isStrict){b.push(e+"quirks")}Ext.fly(d,"_internal").addCls(b)}Ext.fly(g,"_internal").addCls(c);return true};Ext.onReady(a)})();Ext.define("Ext.EventObjectImpl",{uses:["Ext.util.Point"],BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_SCALE:(function(){var a;if(Ext.isGecko){a=3}else{if(Ext.isMac){if(Ext.isSafari&&Ext.webKitVersion>=532){a=120}else{a=12}a*=3}else{a=120}}return a})(),clickRe:/(dbl)?click/,safariKeys:{3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},btnMap:Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2},constructor:function(a,b){if(a){this.setEvent(a.browserEvent||a,b)}},setEvent:function(d,e){var c=this,b,a;if(d==c||(d&&d.browserEvent)){return d}c.browserEvent=d;if(d){b=d.button?c.btnMap[d.button]:(d.which?d.which-1:-1);if(c.clickRe.test(d.type)&&b==-1){b=0}a={type:d.type,button:b,shiftKey:d.shiftKey,ctrlKey:d.ctrlKey||d.metaKey||false,altKey:d.altKey,keyCode:d.keyCode,charCode:d.charCode,target:Ext.EventManager.getTarget(d),relatedTarget:Ext.EventManager.getRelatedTarget(d),currentTarget:d.currentTarget,xy:(e?c.getXY():null)}}else{a={button:-1,shiftKey:false,ctrlKey:false,altKey:false,keyCode:0,charCode:0,target:null,xy:[0,0]}}Ext.apply(c,a);return c},stopEvent:function(){this.stopPropagation();this.preventDefault()},preventDefault:function(){if(this.browserEvent){Ext.EventManager.preventDefault(this.browserEvent)}},stopPropagation:function(){var a=this.browserEvent;if(a){if(a.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}Ext.EventManager.stopPropagation(a)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(a){return Ext.isWebKit?(this.safariKeys[a]||a):a},getPageX:function(){return this.getX()},getPageY:function(){return this.getY()},getX:function(){return this.getXY()[0]},getY:function(){return this.getXY()[1]},getXY:function(){if(!this.xy){this.xy=Ext.EventManager.getPageXY(this.browserEvent)}return this.xy},getTarget:function(b,c,a){if(b){return Ext.fly(this.target).findParent(b,c,a)}return a?Ext.get(this.target):this.target},getRelatedTarget:function(b,c,a){if(b){return Ext.fly(this.relatedTarget).findParent(b,c,a)}return a?Ext.get(this.relatedTarget):this.relatedTarget},correctWheelDelta:function(c){var b=this.WHEEL_SCALE,a=Math.round(c/b);if(!a&&c){a=(c<0)?-1:1}return a},getWheelDeltas:function(){var d=this,c=d.browserEvent,b=0,a=0;if(Ext.isDefined(c.wheelDeltaX)){b=c.wheelDeltaX;a=c.wheelDeltaY}else{if(c.wheelDelta){a=c.wheelDelta}else{if(c.detail){a=-c.detail;if(a>100){a=3}else{if(a<-100){a=-3}}if(Ext.isDefined(c.axis)&&c.axis===c.HORIZONTAL_AXIS){b=a;a=0}}}}return{x:d.correctWheelDelta(b),y:d.correctWheelDelta(a)}},getWheelDelta:function(){var a=this.getWheelDeltas();return a.y},within:function(d,e,b){if(d){var c=e?this.getRelatedTarget():this.getTarget(),a;if(c){a=Ext.fly(d).contains(c);if(!a&&b){a=c==Ext.getDom(d)}return a}}return false},isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){var a=this.getXY();return Ext.create("Ext.util.Point",a[0],a[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey||this.metaKey},injectEvent:function(){var d,e={};if(!Ext.isIE&&document.createEvent){d={createHtmlEvent:function(k,i,h,g){var j=k.createEvent("HTMLEvents");j.initEvent(i,h,g);return j},createMouseEvent:function(v,t,m,l,p,k,i,j,g,s,r,n,q){var h=v.createEvent("MouseEvents"),u=v.defaultView||window;if(h.initMouseEvent){h.initMouseEvent(t,m,l,u,p,k,i,k,i,j,g,s,r,n,q)}else{h=v.createEvent("UIEvents");h.initEvent(t,m,l);h.view=u;h.detail=p;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.metaKey=r;h.shiftKey=s;h.button=n;h.relatedTarget=q}return h},createUIEvent:function(m,k,i,h,j){var l=m.createEvent("UIEvents"),g=m.defaultView||window;l.initUIEvent(k,i,h,g,j);return l},fireEvent:function(i,g,h){i.dispatchEvent(h)},fixTarget:function(g){if(g==window&&!g.dispatchEvent){return document}return g}}}else{if(document.createEventObject){var c={0:1,1:4,2:2};d={createHtmlEvent:function(k,i,h,g){var j=k.createEventObject();j.bubbles=h;j.cancelable=g;return j},createMouseEvent:function(u,t,m,l,p,k,i,j,g,s,r,n,q){var h=u.createEventObject();h.bubbles=m;h.cancelable=l;h.detail=p;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.shiftKey=s;h.metaKey=r;h.button=c[n]||n;h.relatedTarget=q;return h},createUIEvent:function(l,j,h,g,i){var k=l.createEventObject();k.bubbles=h;k.cancelable=g;return k},fireEvent:function(i,g,h){i.fireEvent("on"+g,h)},fixTarget:function(g){if(g==document){return document.documentElement}return g}}}}Ext.Object.each({load:[false,false],unload:[false,false],select:[true,false],change:[true,false],submit:[true,true],reset:[true,false],resize:[true,false],scroll:[true,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createHtmlEvent(i,h,g);d.fireEvent(m,i,l)}});function b(i,h){var g=(i!="mousemove");return function(m,j){var l=j.getXY(),k=d.createMouseEvent(m.ownerDocument,i,true,g,h,l[0],l[1],j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,j.relatedTarget);d.fireEvent(m,i,k)}}Ext.each(["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout"],function(g){e[g]=b(g,1)});Ext.Object.each({focusin:[true,false],focusout:[true,false],activate:[true,true],focus:[false,false],blur:[false,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createUIEvent(m.ownerDocument,i,h,g,1);d.fireEvent(m,i,l)}});if(!d){e={};d={fixTarget:function(g){return g}}}function a(h,g){}return function(j){var i=this,h=e[i.type]||a,g=j?(j.dom||j):i.getTarget();g=d.fixTarget(g);h(g,i)}}()},function(){Ext.EventObject=new Ext.EventObjectImpl()});(function(){var e=document,d=null,b=e.compatMode=="CSS1Compat",h=Ext.Element,a=function(i){if(!c){c=new Ext.Element.Flyweight()}c.dom=i;return c},c;if(!("activeElement" in e)&&e.addEventListener){e.addEventListener("focus",function(i){if(i&&i.target){d=(i.target==e)?null:i.target}},true)}function g(j,k,i){return function(){j.selectionStart=k;j.selectionEnd=i}}Ext.apply(h,{isAncestor:function(j,k){var i=false;j=Ext.getDom(j);k=Ext.getDom(k);if(j&&k){if(j.contains){return j.contains(k)}else{if(j.compareDocumentPosition){return !!(j.compareDocumentPosition(k)&16)}else{while((k=k.parentNode)){i=k==j||i}}}}return i},getActiveElement:function(){return e.activeElement||d},getRightMarginFixCleaner:function(n){var k=Ext.supports,l=k.DisplayChangeInputSelectionBug,m=k.DisplayChangeTextAreaSelectionBug;if(l||m){var p=e.activeElement||d,i=p&&p.tagName,q,j;if((m&&i=="TEXTAREA")||(l&&i=="INPUT"&&p.type=="text")){if(h.isAncestor(n,p)){q=p.selectionStart;j=p.selectionEnd;if(Ext.isNumber(q)&&Ext.isNumber(j)){return g(p,q,j)}}}}return Ext.emptyFn},getViewWidth:function(i){return i?h.getDocumentWidth():h.getViewportWidth()},getViewHeight:function(i){return i?h.getDocumentHeight():h.getViewportHeight()},getDocumentHeight:function(){return Math.max(!b?e.body.scrollHeight:e.documentElement.scrollHeight,h.getViewportHeight())},getDocumentWidth:function(){return Math.max(!b?e.body.scrollWidth:e.documentElement.scrollWidth,h.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?e.documentElement.clientHeight:e.body.clientHeight):self.innerHeight},getViewportWidth:function(){return(!Ext.isStrict&&!Ext.isOpera)?e.body.clientWidth:Ext.isIE?e.documentElement.clientWidth:self.innerWidth},getY:function(i){return h.getXY(i)[1]},getX:function(i){return h.getXY(i)[0]},getOffsetParent:function(j){j=Ext.getDom(j);try{return j.offsetParent}catch(k){var i=document.body;return(j==i)?null:i}},getXY:function(k){var j,s,u,z,l,m,w=0,t=0,v,i,n=(e.body||e.documentElement),r;k=Ext.getDom(k);if(k!=n){i=a(k).isStyle("position","absolute");if(k.getBoundingClientRect){try{u=k.getBoundingClientRect();v=a(document).getScroll();r=[Math.round(u.left+v.left),Math.round(u.top+v.top)]}catch(q){}}if(!r){for(j=k;j;j=h.getOffsetParent(j)){s=a(j);w+=j.offsetLeft;t+=j.offsetTop;i=i||s.isStyle("position","absolute");if(Ext.isGecko){t+=z=parseInt(s.getStyle("borderTopWidth"),10)||0;w+=l=parseInt(s.getStyle("borderLeftWidth"),10)||0;if(j!=k&&!s.isStyle("overflow","visible")){w+=l;t+=z}}}if(Ext.isSafari&&i){w-=n.offsetLeft;t-=n.offsetTop}if(Ext.isGecko&&!i){m=a(n);w+=parseInt(m.getStyle("borderLeftWidth"),10)||0;t+=parseInt(m.getStyle("borderTopWidth"),10)||0}j=k.parentNode;while(j&&j!=n){if(!Ext.isOpera||(j.tagName!="TR"&&!a(j).isStyle("display","inline"))){w-=j.scrollLeft;t-=j.scrollTop}j=j.parentNode}r=[w,t]}}return r||[0,0]},setXY:function(j,k){(j=Ext.fly(j,"_setXY")).position();var l=j.translatePoints(k),i=j.dom.style,m;for(m in l){if(!isNaN(l[m])){i[m]=l[m]+"px"}}},setX:function(j,i){h.setXY(j,[i,false])},setY:function(i,j){h.setXY(i,[false,j])},serializeForm:function(p){var n=p.elements||(document.forms[p]||Ext.getDom(p)).elements,i=false,m=encodeURIComponent,j,q="",l,k;Ext.each(n,function(r){j=r.name;l=r.type;if(!r.disabled&&j){if(/select-(one|multiple)/i.test(l)){Ext.each(r.options,function(s){if(s.selected){k=s.hasAttribute?s.hasAttribute("value"):s.getAttributeNode("value").specified;q+=Ext.String.format("{0}={1}&",m(j),m(k?s.value:s.text))}})}else{if(!(/file|undefined|reset|button/i.test(l))){if(!(/radio|checkbox/i.test(l)&&!r.checked)&&!(l=="submit"&&i)){q+=m(j)+"="+m(r.value)+"&";i=/submit/i.test(l)}}}}});return q.substr(0,q.length-1)}})})();Ext.Element.addMethods((function(){var focusRe=/button|input|textarea|select|object/;return{monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){timer=setTimeout(Ext.Function.bind(handler,scope||me,[e]),delay)},mouseenter:function(){clearTimeout(timer)},freezeEvent:true};me.on(listeners);return listeners},swallowEvent:function(eventName,preventDefault){var me=this;function fn(e){e.stopPropagation();if(preventDefault){e.preventDefault()}}if(Ext.isArray(eventName)){Ext.each(eventName,function(e){me.on(e,fn)});return me}me.on(eventName,fn);return me},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},clean:function(forceReclean){var me=this,dom=me.dom,n=dom.firstChild,nx,ni=-1;if(Ext.Element.data(dom,"isCleaned")&&forceReclean!==true){return me}while(n){nx=n.nextSibling;if(n.nodeType==3){if(!(/\S/.test(n.nodeValue))){dom.removeChild(n)}else{if(nx&&nx.nodeType==3){n.appendData(Ext.String.trim(nx.data));dom.removeChild(nx);nx=n.nextSibling;n.nodeIndex=++ni}}}else{Ext.fly(n).clean();n.nodeIndex=++ni}n=nx}Ext.Element.data(dom,"isCleaned",true);return me},load:function(options){this.getLoader().load(options);return this},getLoader:function(){var dom=this.dom,data=Ext.Element.data,loader=data(dom,"loader");if(!loader){loader=Ext.create("Ext.ElementLoader",{target:this});data(dom,"loader",loader)}return loader},update:function(html,loadScripts,callback){var me=this,id,dom,interval;if(!me.dom){return me}html=html||"";dom=me.dom;if(loadScripts!==true){dom.innerHTML=html;Ext.callback(callback,me);return me}id=Ext.id();html+='<span id="'+id+'"></span>';interval=setInterval(function(){if(!document.getElementById(id)){return false}clearInterval(interval);var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}Ext.callback(callback,me)},20);dom.innerHTML=html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return me},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},getScopeParent:function(){var parent=this.dom.parentNode;return Ext.scopeResetCSS?parent.parentNode:parent},createProxy:function(config,renderTo,matchBox){config=(typeof config=="object")?config:{tag:"div",cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,true):Ext.DomHelper.insertBefore(me.dom,config,true);proxy.setVisibilityMode(Ext.Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}return proxy},focusable:function(){var dom=this.dom,nodeName=dom.nodeName.toLowerCase(),canFocus=false,hasTabIndex=!isNaN(dom.tabIndex);if(!dom.disabled){if(focusRe.test(nodeName)){canFocus=true}else{canFocus=nodeName=="a"?dom.href||hasTabIndex:hasTabIndex}}return canFocus&&this.isVisible(true)}}})());Ext.Element.prototype.clearListeners=Ext.Element.prototype.removeAllListeners;Ext.Element.addMethods({getAnchorXY:function(e,l,q){e=(e||"tl").toLowerCase();q=q||{};var k=this,b=k.dom==document.body||k.dom==document,n=q.width||b?Ext.Element.getViewWidth():k.getWidth(),i=q.height||b?Ext.Element.getViewHeight():k.getHeight(),p,a=Math.round,c=k.getXY(),m=k.getScroll(),j=b?m.left:!l?c[0]:0,g=b?m.top:!l?c[1]:0,d={c:[a(n*0.5),a(i*0.5)],t:[a(n*0.5),0],l:[0,a(i*0.5)],r:[n,a(i*0.5)],b:[a(n*0.5),i],tl:[0,0],bl:[0,i],br:[n,i],tr:[n,0]};p=d[e];return[p[0]+j,p[1]+g]},anchorTo:function(b,h,c,a,k,l){var i=this,e=i.dom,j=!Ext.isEmpty(k),d=function(){Ext.fly(e).alignTo(b,h,c,a);Ext.callback(l,Ext.fly(e))},g=this.getAnchor();this.removeAnchor();Ext.apply(g,{fn:d,scroll:j});Ext.EventManager.onWindowResize(d,null);if(j){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(k)?k:50})}d.call(i);return i},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignVector:function(c,a,h){var d=this,b={t:"top",l:"left",r:"right",b:"bottom"},e=d.getRegion(),g;c=Ext.get(c);if(!c||!c.dom){}g=c.getRegion()},getAlignToXY:function(g,A,B){g=Ext.get(g);if(!g||!g.dom){}B=B||[0,0];A=(!A||A=="?"?"tl-bl?":(!(/-/).test(A)&&A!==""?"tl-"+A:A||"tl-bl")).toLowerCase();var K=this,H=K.dom,M,L,n,l,s,F,v,t=Ext.Element.getViewWidth()-10,G=Ext.Element.getViewHeight()-10,b,i,j,k,u,z,N=document,J=N.documentElement,q=N.body,E=(J.scrollLeft||q.scrollLeft||0)+5,D=(J.scrollTop||q.scrollTop||0)+5,I=false,e="",a="",C=A.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!C){}e=C[1];a=C[2];I=!!C[3];M=K.getAnchorXY(e,true);L=g.getAnchorXY(a,false);n=L[0]-M[0]+B[0];l=L[1]-M[1]+B[1];if(I){s=K.getWidth();F=K.getHeight();v=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);j=a.charAt(0);k=a.charAt(a.length-1);u=((b=="t"&&j=="b")||(b=="b"&&j=="t"));z=((i=="r"&&k=="l")||(i=="l"&&k=="r"));if(n+s>t+E){n=z?v.left-s:t+E-s}if(n<E){n=z?v.right:E}if(l+F>G+D){l=u?v.top-F:G+D-F}if(l<D){l=u?v.bottom:D}}return[n,l]},alignTo:function(c,a,e,b){var d=this;return d.setXY(d.getAlignToXY(c,a,e),d.anim&&!!b?d.anim(b):false)},adjustForConstraints:function(c,b){var a=this.getConstrainVector(b,c);if(a){c[0]+=a[0];c[1]+=a[1]}return c},getConstrainVector:function(d,b){if(!(d instanceof Ext.util.Region)){d=Ext.get(d).getViewRegion()}var g=this.getRegion(),a=[0,0],e=this.shadow&&this.shadow.offset,c=false;if(b){g.translateBy(b[0]-g.x,b[1]-g.y)}if(e){d.adjust(0,-e,-e,e)}if(g.right>d.right){c=true;a[0]=(d.right-g.right)}if(g.left+a[0]<d.left){c=true;a[0]=(d.left-g.left)}if(g.bottom>d.bottom){c=true;a[1]=(d.bottom-g.bottom)}if(g.top+a[1]<d.top){c=true;a[1]=(d.top-g.top)}return c?a:false},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(a){return this.alignTo(a||document,"c-c")}});(function(){var i=Ext.Element,a="left",e="right",c="top",h="bottom",g="position",b="static",d="relative",j="auto",k="z-index";Ext.override(Ext.Element,{getX:function(){return i.getX(this.dom)},getY:function(){return i.getY(this.dom)},getXY:function(){return i.getXY(this.dom)},getOffsetsTo:function(l){var n=this.getXY(),m=Ext.fly(l,"_internal").getXY();return[n[0]-m[0],n[1]-m[1]]},setX:function(l,m){return this.setXY([l,this.getY()],m)},setY:function(m,l){return this.setXY([this.getX(),m],l)},setLeft:function(l){this.setStyle(a,this.addUnits(l));return this},setTop:function(l){this.setStyle(c,this.addUnits(l));return this},setRight:function(l){this.setStyle(e,this.addUnits(l));return this},setBottom:function(l){this.setStyle(h,this.addUnits(l));return this},setXY:function(n,l){var m=this;if(!l||!m.anim){i.setXY(m.dom,n)}else{if(!Ext.isObject(l)){l={}}m.animate(Ext.applyIf({to:{x:n[0],y:n[1]}},l))}return m},setLocation:function(l,n,m){return this.setXY([l,n],m)},moveTo:function(l,n,m){return this.setXY([l,n],m)},getLeft:function(l){return !l?this.getX():parseInt(this.getStyle(a),10)||0},getRight:function(l){var m=this;return !l?m.getX()+m.getWidth():(m.getLeft(true)+m.getWidth())||0},getTop:function(l){return !l?this.getY():parseInt(this.getStyle(c),10)||0},getBottom:function(l){var m=this;return !l?m.getY()+m.getHeight():(m.getTop(true)+m.getHeight())||0},position:function(q,p,l,n){var m=this;if(!q&&m.isStyle(g,b)){m.setStyle(g,d)}else{if(q){m.setStyle(g,q)}}if(p){m.setStyle(k,p)}if(l||n){m.setXY([l||false,n||false])}},clearPositioning:function(l){l=l||"";this.setStyle({left:l,right:l,top:l,bottom:l,"z-index":"",position:b});return this},getPositioning:function(){var m=this.getStyle(a);var n=this.getStyle(c);return{position:this.getStyle(g),left:m,right:m?"":this.getStyle(e),top:n,bottom:n?"":this.getStyle(h),"z-index":this.getStyle(k)}},setPositioning:function(l){var n=this,m=n.dom.style;n.setStyle(l);if(l.right==j){m.right=""}if(l.bottom==j){m.bottom=""}return n},translatePoints:function(l,s){if(Ext.isArray(l)){s=l[1];l=l[0]}var m=this,n=m.isStyle(g,d),r=m.getXY(),q=parseInt(m.getStyle(a),10),p=parseInt(m.getStyle(c),10);if(!Ext.isNumber(q)){q=n?0:m.dom.offsetLeft}if(!Ext.isNumber(p)){p=n?0:m.dom.offsetTop}q=(Ext.isNumber(l))?l-r[0]+q:undefined;p=(Ext.isNumber(s))?s-r[1]+p:undefined;return{left:q,top:p}},setBox:function(q,r,m){var p=this,l=q.width,n=q.height;if((r&&!p.autoBoxAdjust)&&!p.isBorderBox()){l-=(p.getBorderWidth("lr")+p.getPadding("lr"));n-=(p.getBorderWidth("tb")+p.getPadding("tb"))}p.setBounds(q.x,q.y,l,n,m);return p},getBox:function(u,A){var x=this,E,p,z,n=x.getBorderWidth,B=x.getPadding,q,m,D,y,C,s,v;if(!A){E=x.getXY()}else{p=parseInt(x.getStyle("left"),10)||0;z=parseInt(x.getStyle("top"),10)||0;E=[p,z]}C=x.getWidth();s=x.getHeight();if(!u){v={x:E[0],y:E[1],0:E[0],1:E[1],width:C,height:s}}else{q=n.call(x,"l")+B.call(x,"l");m=n.call(x,"r")+B.call(x,"r");D=n.call(x,"t")+B.call(x,"t");y=n.call(x,"b")+B.call(x,"b");v={x:E[0]+q,y:E[1]+D,0:E[0]+q,1:E[1]+D,width:C-(q+m),height:s-(D+y)}}v.right=v.x+v.width;v.bottom=v.y+v.height;return v},move:function(u,m,n){var r=this,z=r.getXY(),v=z[0],t=z[1],p=[v-m,t],w=[v+m,t],s=[v,t-m],l=[v,t+m],q={l:p,left:p,r:w,right:w,t:s,top:s,up:s,b:l,bottom:l,down:l};u=u.toLowerCase();r.moveTo(q[u][0],q[u][1],n)},setLeftTop:function(p,n){var m=this,l=m.dom.style;l.left=m.addUnits(p);l.top=m.addUnits(n);return m},getRegion:function(){return this.getPageBox(true)},getViewRegion:function(){var q=this,n=q.dom===document.body,m,t,s,r,p,l;if(n){m=q.getScroll();r=m.left;s=m.top;p=Ext.Element.getViewportWidth();l=Ext.Element.getViewportHeight()}else{t=q.getXY();r=t[0]+q.getBorderWidth("l")+q.getPadding("l");s=t[1]+q.getBorderWidth("t")+q.getPadding("t");p=q.getWidth(true);l=q.getHeight(true)}return Ext.create("Ext.util.Region",s,r+p,s+l,r)},getPageBox:function(q){var u=this,n=u.dom,x=n===document.body,y=x?Ext.Element.getViewWidth():n.offsetWidth,s=x?Ext.Element.getViewHeight():n.offsetHeight,A=u.getXY(),z=A[1],m=A[0]+y,v=A[1]+s,p=A[0];if(q){return Ext.create("Ext.util.Region",z,m,v,p)}else{return{left:p,top:z,width:y,height:s,right:m,bottom:v}}},setBounds:function(m,r,p,l,n){var q=this;if(!n||!q.anim){q.setSize(p,l);q.setLocation(m,r)}else{if(!Ext.isObject(n)){n={}}q.animate(Ext.applyIf({to:{x:m,y:r,width:q.adjustWidth(p),height:q.adjustHeight(l)}},n))}return q},setRegion:function(m,l){return this.setBounds(m.left,m.top,m.right-m.left,m.bottom-m.top,l)}})})();Ext.override(Ext.Element,{isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e},scrollTo:function(b,d,a){var g=/top/i.test(b),c=this,h=c.dom,e={},i;if(!a||!c.anim){i="scroll"+(g?"Top":"Left");h[i]=d}else{if(!Ext.isObject(a)){a={}}e["scroll"+(g?"Top":"Left")]=d;c.animate(Ext.applyIf({to:e},a))}return c},scrollIntoView:function(b,e){b=Ext.getDom(b)||Ext.getBody().dom;var c=this.dom,h=this.getOffsetsTo(b),g=h[0]+b.scrollLeft,j=h[1]+b.scrollTop,a=j+c.offsetHeight,k=g+c.offsetWidth,n=b.clientHeight,m=parseInt(b.scrollTop,10),d=parseInt(b.scrollLeft,10),i=m+n,l=d+b.clientWidth;if(c.offsetHeight>n||j<m){b.scrollTop=j}else{if(a>i){b.scrollTop=a-n}}b.scrollTop=b.scrollTop;if(e!==false){if(c.offsetWidth>b.clientWidth||g<d){b.scrollLeft=g}else{if(k>l){b.scrollLeft=k-b.clientWidth}}b.scrollLeft=b.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,q=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,p,j={l:Math.min(g+b,n-i),r:p=Math.max(g-b,0),t:Math.max(q-b,0),b:Math.min(q+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((p=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",p,this.anim(d))}return c}});Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c=Ext.baseCSSPrefix+"masked",g=Ext.baseCSSPrefix+"masked-relative",e=Ext.Element.data;return{isVisible:function(i){var j=!this.isStyle(d,a)&&!this.isStyle(b,h),k=this.dom.parentNode;if(i!==true||!j){return j}while(k&&!(/^body/i.test(k.tagName))){if(!Ext.fly(k,"_isVisible").isVisible()){return false}k=k.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(j,p){var r=this,l=r.dom,m=l.style.setExpression,q=Ext.DomHelper,n=Ext.baseCSSPrefix+"mask-msg",i,s;if(!(/^body/i.test(l.tagName)&&r.getStyle("position")=="static")){r.addCls(g)}i=e(l,"maskMsg");if(i){i.remove()}i=e(l,"mask");if(i){i.remove()}s=q.append(l,{cls:Ext.baseCSSPrefix+"mask"},true);e(l,"mask",s);r.addCls(c);s.setDisplayed(true);if(typeof j=="string"){var k=q.append(l,{cls:n,cn:{tag:"div"}},true);e(l,"maskMsg",k);k.dom.className=p?n+" "+p:n;k.dom.firstChild.innerHTML=j;k.setDisplayed(true);k.center(r)}if(!Ext.supports.IncludePaddingInWidthCalculation&&m){s.dom.style.setExpression("width",'this.parentNode.offsetWidth + "px"')}if(!Ext.supports.IncludePaddingInHeightCalculation&&m){s.dom.style.setExpression("height",'this.parentNode.offsetHeight + "px"')}else{if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&r.getStyle("height")=="auto"){s.setSize(undefined,r.getHeight())}}return s},unmask:function(){var k=this,l=k.dom,i=e(l,"mask"),j=e(l,"maskMsg");if(i){if(i.dom.style.clearExpression){i.dom.style.clearExpression("width");i.dom.style.clearExpression("height")}if(j){j.remove();e(l,"maskMsg",undefined)}i.remove();e(l,"mask",undefined);k.removeCls([c,g])}},isMasked:function(){var k=this,i=e(k.dom,"mask"),j=e(k.dom,"maskMsg");if(i&&i.isVisible()){if(j){j.center(k)}return true}return false},createShim:function(){var i=document.createElement("iframe"),j;i.frameBorder="0";i.className=Ext.baseCSSPrefix+"shim";i.src=Ext.SSL_SECURE_URL;j=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));j.autoBoxAdjust=false;return j}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(typeof b!="object"||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return Ext.create("Ext.util.KeyMap",this,a)},addKeyMap:function(a){return Ext.create("Ext.util.KeyMap",this,a)}});Ext.CompositeElementLite.importElementMethods();Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}Ext.Array.erase(a,g,1)}});return this}});Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(b,a){this.elements=[];this.add(b,a)},getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(a){a.fireEvent=this.prototype.fireEvent},capture:function(c,b,a){c.fireEvent=Ext.Function.createInterceptor(c.fireEvent,b,a)},observe:function(a,b){if(a){if(!a.isObservable){Ext.applyIf(a,new this());this.capture(a.prototype,a.fireEvent,a)}if(Ext.isObject(b)){a.on(b)}return a}}},isObservable:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.listeners){b.on(b.listeners);delete b.listeners}b.events=b.events||{};if(b.bubbleEvents){b.enableBubble(b.bubbleEvents)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(i,d,g,e,c){var h=this,a=h.managedListeners=h.managedListeners||[],b;if(typeof d!=="string"){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!h.eventOptionsRe.test(d)){h.addManagedListener(i,d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{a.push({item:i,ename:d,fn:g,scope:e,options:c});i.on(d,g,e,c)}},removeManagedListener:function(j,c,g,k){var e=this,l,b,h,a,d;if(typeof c!=="string"){l=c;for(c in l){if(l.hasOwnProperty(c)){b=l[c];if(!e.eventOptionsRe.test(c)){e.removeManagedListener(j,c,b.fn||b,b.scope||l.scope)}}}}h=e.managedListeners?e.managedListeners.slice():[];for(d=0,a=h.length;d<a;d++){e.removeManagedListenerItem(false,h[d],j,c,g,k)}},fireEvent:function(b){var c=b.toLowerCase(),d=this.events,e=d&&d[c],a=e&&e.bubble;return this.continueFireEvent(c,Ext.Array.slice(arguments,1),a)},continueFireEvent:function(c,e,b){var h=this,a,g,d=true;do{if(h.eventsSuspended===true){if((a=h.eventQueue)){a.push([c,e,b])}return d}else{g=h.events[c];if(g&&g!=true){if((d=g.fire.apply(g,e))===false){break}}}}while(b&&(h=h.getBubbleParent()));return d},getBubbleParent:function(){var b=this,a=b.getBubbleTarget&&b.getBubbleTarget();if(a&&a.isObservable){return a}return null},addListener:function(c,e,d,b){var h=this,a,g;if(typeof c!=="string"){b=c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(!h.eventOptionsRe.test(c)){h.addListener(c,a.fn||a,a.scope||b.scope,a.fn?a:b)}}}}else{c=c.toLowerCase();h.events[c]=h.events[c]||true;g=h.events[c]||true;if(Ext.isBoolean(g)){h.events[c]=g=new Ext.util.Event(h,c)}g.addListener(e,d,Ext.isObject(b)?b:{})}},removeListener:function(c,e,d){var h=this,b,g,a;if(typeof c!=="string"){a=c;for(c in a){if(a.hasOwnProperty(c)){b=a[c];if(!h.eventOptionsRe.test(c)){h.removeListener(c,b.fn||b,b.scope||a.scope)}}}}else{c=c.toLowerCase();g=h.events[c];if(g&&g.isEvent){g.removeListener(e,d)}}},clearListeners:function(){var b=this.events,c,a;for(a in b){if(b.hasOwnProperty(a)){c=b[a];if(c.isEvent){c.clearListeners()}}}this.clearManagedListeners()},clearManagedListeners:function(){var b=this.managedListeners||[],c=0,a=b.length;for(;c<a;c++){this.removeManagedListenerItem(true,b[c])}this.managedListeners=[]},removeManagedListenerItem:function(b,a,g,c,e,d){if(b||(a.item===g&&a.ename===c&&(!e||a.fn===e)&&(!d||a.scope===d))){a.item.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(this.managedListeners,a)}}},addEvents:function(e){var d=this,b,a,c;d.events=d.events||{};if(Ext.isString(e)){b=arguments;c=b.length;while(c--){d.events[b[c]]=d.events[b[c]]||true}}else{Ext.applyIf(d.events,e)}},hasListener:function(a){var b=this.events[a.toLowerCase()];return b&&b.isEvent===true&&b.listeners.length>0},suspendEvents:function(a){this.eventsSuspended=true;if(a&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var a=this,b=a.eventQueue;a.eventsSuspended=false;delete a.eventQueue;if(b){Ext.each(b,function(c){a.continueFireEvent.apply(a,c)})}},relayEvents:function(c,e,j){j=j||"";var h=this,a=e.length,d=0,g,b;for(;d<a;d++){g=e[d].substr(j.length);b=j+g;h.events[b]=h.events[b]||true;c.on(g,h.createRelayer(b))}},createRelayer:function(a){var b=this;return function(){return b.fireEvent.apply(b,[a].concat(Array.prototype.slice.call(arguments,0,-1)))}},enableBubble:function(a){var b=this;if(!Ext.isEmpty(a)){a=Ext.isArray(a)?a:Ext.Array.toArray(arguments);Ext.each(a,function(c){c=c.toLowerCase();var d=b.events[c]||true;if(Ext.isBoolean(d)){d=new Ext.util.Event(b,c);b.events[c]=d}d.bubble=true})}}},function(){this.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});this.observeClass=this.observe;Ext.apply(Ext.util.Observable.prototype,function(){function a(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if((c=l.apply(k||h,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[j]=function(){var l=Array.prototype.slice.call(arguments,0),k,m,e;d=c=undefined;g=false;for(m=0,e=i.before.length;m<e;m++){k=i.before[m];b(k.fn,k.scope,l);if(g){return d}}if((c=i.originalFn.apply(h,l))!==undefined){d=c}for(m=0,e=i.after.length;m<e;m++){k=i.after[m];b(k.fn,k.scope,l);if(g){return d}}return d}}return i}return{beforeMethod:function(d,c,b){a.call(this,d).before.push({fn:c,scope:b})},afterMethod:function(d,c,b){a.call(this,d).after.push({fn:c,scope:b})},removeMethodListener:function(j,g,d){var h=this.getMethodEvent(j),c,b;for(c=0,b=h.before.length;c<b;c++){if(h.before[c].fn==g&&h.before[c].scope==d){Ext.Array.erase(h.before,c,1);return}}for(c=0,b=h.after.length;c<b;c++){if(h.after[c].fn==g&&h.after[c].scope==d){Ext.Array.erase(h.after,c,1);return}}},toggleEventLogging:function(b){Ext.util.Observable[b?"capture":"releaseCapture"](this,function(c){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(c,arguments)}})}}}())});Ext.define("Ext.util.Animate",{uses:["Ext.fx.Manager","Ext.fx.Anim"],animate:function(a){var b=this;if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(Ext.create("Ext.fx.Anim",b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));return Ext.apply({target:b,paused:true},a)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(g){var d=this,c=/^(a|n|d|b|s|o|e)\:(.*)$/,e=c.exec(unescape(g)),b,a,g,h;if(!e||!e[1]){return}a=e[1];g=e[2];switch(a){case"e":return null;case"n":return parseFloat(g);case"d":return new Date(Date.parse(g));case"b":return(g=="1");case"a":b=[];if(g!=""){Ext.each(g.split("^"),function(i){b.push(d.decodeValue(i))},d)}return b;case"o":b={};if(g!=""){Ext.each(g.split("^"),function(i){h=i.split("=");b[h[0]]=d.decodeValue(h[1])},d)}return b;default:return g}},encodeValue:function(e){var g="",d=0,b,a,c;if(e==null){return"e:1"}else{if(typeof e=="number"){b="n:"+e}else{if(typeof e=="boolean"){b="b:"+(e?"1":"0")}else{if(Ext.isDate(e)){b="d:"+e.toGMTString()}else{if(Ext.isArray(e)){for(a=e.length;d<a;d++){g+=this.encodeValue(e[d]);if(d!=a-1){g+="^"}}b="a:"+g}else{if(typeof e=="object"){for(c in e){if(typeof e[c]!="function"&&e[c]!==undefined){g+=c+"="+this.encodeValue(e[c])+"^"}}b="o:"+g.substring(0,g.length-1)}else{b="s:"+e}}}}}}return escape(b)}});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var h=this,k=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(q,p){return p.method.apply(this,[q].concat(p.args))},a=function(r,v){var p=[],s=0,u=r.length,t,q=v!==">";for(;s<u;s++){t=r[s];if(t.getRefItems){p=p.concat(t.getRefItems(q))}}return p},g=function(q){var p=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];while(!!(s=(s.ownerCt||s.floatParent))){p.push(s)}}return p},m=function(q,v,u){if(v==="*"){return q.slice()}else{var p=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];if(s.isXType(v,u)){p.push(s)}}return p}},j=function(q,t){var v=Ext.Array,p=[],r=0,u=q.length,s;for(;r<u;r++){s=q[r];if(s.el?s.el.hasCls(t):v.contains(s.initCls(),t)){p.push(s)}}return p},n=function(r,w,q,v){var p=[],s=0,u=r.length,t;for(;s<u;s++){t=r[s];if(!v?!!t[w]:(String(t[w])===v)){p.push(t)}}return p},d=function(q,u){var p=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];if(s.getItemId()===u){p.push(s)}}return p},l=function(p,q,r){return h.pseudos[q](p,r)},i=/^(\s?([>\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:m},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:l},{re:/^(?:\{([^\}]+)\})/,method:k}];h.Query=Ext.extend(Object,{constructor:function(p){p=p||{};Ext.apply(this,p)},execute:function(q){var s=this.operations,t=0,u=s.length,r,p;if(!q){p=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(q)){p=q}}for(;t<u;t++){r=s[t];if(r.mode==="^"){p=g(p||[q])}else{if(r.mode){p=a(p||[q],r.mode)}else{p=e(p||a([q]),r)}}if(t===u-1){return p}}return[]},is:function(r){var q=this.operations,u=Ext.isArray(r)?r:[r],p=u.length,v=q[q.length-1],t,s;u=e(u,v);if(u.length===p){if(q.length>1){for(s=0,t=u.length;s<t;s++){if(Ext.Array.indexOf(this.execute(),u[s])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(v,p){var w=Ext.ComponentQuery,t=0,u=v.length,s=[],r=-1,q;for(;t<u;++t){q=v[t];if(!w.is(q,p)){s[++r]=q}}return s},last:function(p){return p[p.length-1]}},query:function(q,x){var y=q.split(","),p=y.length,r=0,s=[],z=[],w={},u,t,v;for(;r<p;r++){q=Ext.String.trim(y[r]);u=this.cache[q];if(!u){this.cache[q]=u=this.parse(q)}s=s.concat(u.execute(x))}if(p>1){t=s.length;for(r=0;r<t;r++){v=s[r];if(!w[v.id]){z.push(v);w[v.id]=true}}s=z}return s},is:function(q,p){if(!p){return true}var r=this.cache[p];if(!r){this.cache[p]=r=this.parse(p)}return r.is(q)},parse:function(s){var q=[],r=b.length,w,t,x,y,z,u,v,p;while(s&&w!==s){w=s;t=s.match(c);if(t){x=t[1];if(x==="#"){q.push({method:d,args:[Ext.String.trim(t[2])]})}else{if(x==="."){q.push({method:j,args:[Ext.String.trim(t[2])]})}else{q.push({method:m,args:[Ext.String.trim(t[2]),Boolean(t[3])]})}}s=s.replace(t[0],"")}while(!(y=s.match(i))){for(u=0;s&&u<r;u++){v=b[u];z=s.match(v.re);p=v.method;if(z){q.push({method:Ext.isString(v.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[p].concat(z.slice(1)))):v.method,args:z.slice(1)});s=s.replace(z[0],"");break}}}if(y[1]){q.push({mode:y[2]||y[1]});s=s.replace(y[0],"")}}return new h.Query({operations:q})}})});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(a){a=a||{};var c=this,b=a.keyFn;c.addEvents("add","clear","remove","replace");c.mixins.observable.constructor.call(c,a);c.clear(true);if(b){c.getKey=b}},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,d){var b=this,c;if(arguments.length===1){d=a;a=b.getKey(d)}if(b.containsKey(a)){return b.replace(a,d)}c=b.getData(a,d);a=c[0];d=c[1];b.map[a]=d;++b.length;b.fireEvent("add",b,a,d);return d},replace:function(b,d){var c=this,e=c.map,a;if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;c.fireEvent("replace",c,b,d,a);return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;b.fireEvent("remove",b,a,c);return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=Ext.create("Ext.state.Provider")},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:true,saveDelay:100,autoGenIdRe:/^((\w+-)|(ext-comp-))\d{4,}$/i,constructor:function(a){var b=this;a=a||{};if(Ext.isDefined(a.stateful)){b.stateful=a.stateful}if(Ext.isDefined(a.saveDelay)){b.saveDelay=a.saveDelay}b.stateId=b.stateId||a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.initStateEvents();b.initState()}},initStateEvents:function(){this.addStateEvents(this.stateEvents)},addStateEvents:function(c){if(!Ext.isArray(c)){c=[c]}var d=this,b=0,a=c.length;for(;b<a;++b){d.on(c[b],d.onStateChange,d)}},onStateChange:function(){var b=this,a=b.saveDelay;if(a>0){if(!b.stateTask){b.stateTask=Ext.create("Ext.util.DelayedTask",b.saveState,b)}b.stateTask.delay(b.saveDelay)}else{b.saveState()}},saveState:function(){var a=this,c,b;if(a.stateful!==false){c=a.getStateId();if(c){b=a.getState();if(a.fireEvent("beforestatesave",a,b)!==false){Ext.state.Manager.set(c,b);a.fireEvent("statesave",a,b)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this,b=a.stateId;if(!b){b=a.autoGenIdRe.test(String(a.id))?null:a.id}return b},initState:function(){var a=this,c=a.getStateId(),b;if(a.stateful!==false){if(c){b=Ext.state.Manager.get(c);if(b){b=Ext.apply({},b);if(a.fireEvent("beforestaterestore",a,b)!==false){a.applyState(b);a.fireEvent("staterestore",a,b)}}}}},savePropToState:function(g,e,d){var b=this,c=b[g],a=b.initialConfig;if(b.hasOwnProperty(g)){if(!a||a[g]!==c){if(e){e[d||g]=c}return true}}return false},savePropsToState:function(c,b){var a=this;Ext.each(c,function(d){a.savePropToState(d,b)});return b},destroy:function(){var a=this.stateTask;if(a){a.cancel()}this.clearListeners()}});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(a){Ext.apply(this,a||{});this.all=Ext.create("Ext.util.HashMap");this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(e,c,b){var a=this.all,d;if(a.containsKey(e)){d=a.get(e);c.call(b||d,d)}else{a.on("add",function(i,g,h){if(g==e){c.call(b||h,h);a.un("add",c,b)}})}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ComponentManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(b,d){if(b instanceof Ext.AbstractComponent){return b}else{if(Ext.isString(b)){return Ext.createByAlias("widget."+b)}else{var c=b.xtype||d,a=b;return Ext.createByAlias("widget."+c,a)}}},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b;a.prototype[this.typeName]=b}});Ext.define("Ext.AbstractComponent",{requires:["Ext.ComponentQuery","Ext.ComponentManager"],mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",state:"Ext.state.Stateful"},uses:["Ext.PluginManager","Ext.ComponentManager","Ext.Element","Ext.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Layout","Ext.layout.component.Auto","Ext.LoadMask","Ext.ZIndexManager"],statics:{AUTO_ID:1000},isComponent:true,getAutoId:function(){return ++Ext.AbstractComponent.AUTO_ID},renderTpl:null,tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",autoShow:false,autoRender:false,needsLayout:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,weight:0,trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,maskOnDisable:true,constructor:function(b){var d=this,c,a;b=b||{};d.initialConfig=b;Ext.apply(d,b);d.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","beforedestroy","destroy","resize","move");d.getId();d.mons=[];d.additionalCls=[];d.renderData=d.renderData||{};d.renderSelectors=d.renderSelectors||{};if(d.plugins){d.plugins=[].concat(d.plugins);d.constructPlugins()}d.initComponent();Ext.ComponentManager.register(d);d.mixins.observable.constructor.call(d);d.mixins.state.constructor.call(d,b);this.addStateEvents("resize");if(d.plugins){d.plugins=[].concat(d.plugins);for(c=0,a=d.plugins.length;c<a;c++){d.plugins[c]=d.initPlugin(d.plugins[c])}}d.loader=d.getLoader();if(d.renderTo){d.render(d.renderTo)}if(d.autoShow){d.show()}},initComponent:function(){this.constructPlugins()},getState:function(){var g=this,e=g.ownerCt?(g.shadowOwnerCt||g.ownerCt).getLayout():null,h={collapsed:g.collapsed},c=g.width,b=g.height,a=g.collapseMemento,d;if(g.collapsed&&a){if(Ext.isDefined(a.data.width)){c=a.width}if(Ext.isDefined(a.data.height)){b=a.height}}if(e&&g.flex){h.flex=g.flex;if(e.perpendicularPrefix){h[e.perpendicularPrefix]=g["get"+e.perpendicularPrefixCap]()}else{}}else{if(e&&g.anchor){h.anchor=g.anchor;d=g.anchor.split(" ").concat(null);if(!d[0]){if(g.width){h.width=c}}if(!d[1]){if(g.height){h.height=b}}}else{if(g.width){h.width=c}if(g.height){h.height=b}}}if(h.width==g.initialConfig.width){delete h.width}if(h.height==g.initialConfig.height){delete h.height}if(e&&e.align&&(e.align.indexOf("stretch")!==-1)){delete h[e.perpendicularPrefix]}return h},show:Ext.emptyFn,animate:function(b){var g=this,k;b=b||{};k=b.to||{};if(Ext.fx.Manager.hasFxBlock(g.id)){return g}if(!b.dynamic&&(k.height||k.width)){var e=g.getWidth(),l=e,d=g.getHeight(),c=d,a=false;if(k.height&&k.height>d){c=k.height;a=true}if(k.width&&k.width>e){l=k.width;a=true}if(a){var j=!Ext.isNumber(g.width),i=!Ext.isNumber(g.height);g.componentLayout.childrenChanged=true;g.setSize(l,c,g.ownerCt);g.el.setSize(e,d);if(j){delete g.width}if(i){delete g.height}}}return g.mixins.animate.animate.apply(g,arguments)},findLayoutController:function(){return this.findParentBy(function(a){return !a.ownerCt||(a.layout.layoutBusy&&!a.ownerCt.layout.layoutBusy)})},onShow:function(){var a=this.needsLayout;if(Ext.isObject(a)){this.doComponentLayout(a.width,a.height,a.isSetSize,a.ownerCt)}},constructPlugin:function(a){if(a.ptype&&typeof a.init!="function"){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a=="string"){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},constructPlugins:function(){var d=this,b=d.plugins,c,a;if(b){for(c=0,a=b.length;c<a;c++){b[c]=d.constructPlugin(b[c])}}},initPlugin:function(a){a.init(this);return a},doAutoRender:function(){var a=this;if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}},render:function(b,a){var c=this;if(!c.rendered&&c.fireEvent("beforerender",c)!==false){c.rendering=true;if(c.el){c.el=Ext.get(c.el)}if(c.floating){c.onFloatRender()}b=c.initContainer(b);c.onRender(b,a);c.el.setVisibilityMode(Ext.Element[c.hideMode.toUpperCase()]);if(c.overCls){c.el.hover(c.addOverCls,c.removeOverCls,c)}c.fireEvent("render",c);c.initContent();c.afterRender(b);c.fireEvent("afterrender",c);c.initEvents();if(c.hidden){c.el.hide()}if(c.disabled){c.disable(true)}delete c.rendering}return c},onRender:function(b,a){var g=this,d=g.el,e=g.initStyles(),j,h,c;a=g.getInsertPosition(a);if(!d){if(a){d=Ext.DomHelper.insertBefore(a,g.getElConfig(),true)}else{d=Ext.DomHelper.append(b,g.getElConfig(),true)}}else{if(g.allowDomMove!==false){if(a){b.dom.insertBefore(d.dom,a)}else{b.dom.appendChild(d.dom)}}}if(Ext.scopeResetCSS&&!g.ownerCt){if(d.dom==Ext.getBody().dom){d.parent().addCls(Ext.baseCSSPrefix+"reset")}else{g.resetEl=d.wrap({cls:Ext.baseCSSPrefix+"reset"})}}g.setUI(g.ui);d.addCls(g.initCls());d.setStyle(e);g.el=d;g.initFrame();j=g.initRenderTpl();if(j){h=g.initRenderData();j.append(g.getTargetEl(),h)}g.applyRenderSelectors();g.rendered=true},afterRender:function(){var a=this,c,b;a.getComponentLayout();if(a.collapsed||(!a.ownerCt||(a.height||a.width))){a.setSize(a.width,a.height)}else{a.renderChildren()}if(a.floating&&(a.x===undefined||a.y===undefined)){if(a.floatParent){b=a.el.getAlignToXY(a.floatParent.getTargetEl(),"c-c");c=a.floatParent.getTargetEl().translatePoints(b[0],b[1])}else{b=a.el.getAlignToXY(a.container,"c-c");c=a.container.translatePoints(b[0],b[1])}a.x=a.x===undefined?c.left:a.x;a.y=a.y===undefined?c.top:a.y}if(Ext.isDefined(a.x)||Ext.isDefined(a.y)){a.setPosition(a.x,a.y)}if(a.styleHtmlContent){a.getTargetEl().addCls(a.styleHtmlCls)}},registerFloatingItem:function(b){var a=this;if(!a.floatingItems){a.floatingItems=Ext.create("Ext.ZIndexManager",a)}a.floatingItems.register(b)},renderChildren:function(){var b=this,a=b.getComponentLayout();b.suspendLayout=true;a.renderChildren();delete b.suspendLayout},frameCls:Ext.baseCSSPrefix+"frame",frameIdRegex:/[-]frame\d+[TMB][LCR]$/,frameElementCls:{tl:[],tc:[],tr:[],ml:[],mc:[],mr:[],bl:[],bc:[],br:[]},frameTpl:['<tpl if="top">','<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>"],frameTableTpl:["<table><tbody>",'<tpl if="top">',"<tr>",'<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" style="background-position: 0 0;" role="presentation"></td>','<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>"],initFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,d=e.getFrameInfo(),b=d.width,a=e.getFrameTpl(d.table),c;if(e.frame){e.frameGenId=c=(e.frameGenId||0)+1;c=e.id+"-frame"+c;a.insertFirst(e.el,Ext.apply({},{fgid:c,ui:e.ui,uiCls:e.uiCls,frameCls:e.frameCls,baseCls:e.baseCls,frameWidth:b,top:!!d.top,left:!!d.left,right:!!d.right,bottom:!!d.bottom},e.getFramePositions(d)));e.frameBody=e.el.down("."+e.frameCls+"-mc");e.removeChildEls(function(g){return g.id&&e.frameIdRegex.test(g.id)});Ext.each(["TL","TC","TR","ML","MC","MR","BL","BC","BR"],function(g){e.childEls.push({name:"frame"+g,id:c+g})})}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,h=this.frameSize&&this.frameSize.table,g=this.frameTL,d=this.frameBL,c=this.frameML,a=this.frameMC,b;this.initFrame();if(a){if(e.frame){delete e.frameTL;delete e.frameTC;delete e.frameTR;delete e.frameML;delete e.frameMC;delete e.frameMR;delete e.frameBL;delete e.frameBC;delete e.frameBR;this.applyRenderSelectors();b=this.frameMC.dom.className;a.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=a;a.dom.className=b;if(h){e.el.query("> table")[1].remove()}else{if(g){g.remove()}if(d){d.remove()}c.remove()}}else{}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius){return false}var c=this,g=c.el.getStyle("background-position-x"),e=c.el.getStyle("background-position-y"),d,b=false,a;if(!g&&!e){d=c.el.getStyle("background-position").split(" ");g=d[0];e=d[1]}if(parseInt(g,10)>=1000000&&parseInt(e,10)>=1000000){a=Math.max;b={table:g.substr(0,3)=="110",vertical:e.substr(0,3)=="110",top:a(g.substr(3,2),g.substr(5,2)),right:a(g.substr(5,2),e.substr(3,2)),bottom:a(e.substr(3,2),e.substr(5,2)),left:a(e.substr(5,2),g.substr(3,2))};b.width=a(b.top,b.right,b.bottom,b.left);c.el.setStyle("background-image","none")}if(c.frame===true&&!b){}c.frame=c.frame||!!b;c.frameSize=b||false;return b},getFramePositions:function(e){var h=this,i=e.width,j=h.dock,d,b,g,c,a;if(e.vertical){b="0 -"+(i*0)+"px";g="0 -"+(i*1)+"px";if(j&&j=="right"){b="right -"+(i*0)+"px";g="right -"+(i*1)+"px"}d={tl:"0 -"+(i*0)+"px",tr:"0 -"+(i*1)+"px",bl:"0 -"+(i*2)+"px",br:"0 -"+(i*3)+"px",ml:"-"+(i*1)+"px 0",mr:"right 0",tc:b,bc:g}}else{c="-"+(i*0)+"px 0";a="right 0";if(j&&j=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(i*2)+"px",tr:"right -"+(i*3)+"px",bl:"0 -"+(i*4)+"px",br:"right -"+(i*5)+"px",ml:c,mr:a,tc:"0 -"+(i*0)+"px",bc:"0 -"+(i*1)+"px"}}return d},getFrameTpl:function(a){return a?this.getTpl("frameTableTpl"):this.getTpl("frameTpl")},initCls:function(){var b=this,a=[];a.push(b.baseCls);if(Ext.isDefined(b.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}b.componentCls=b.cmpCls;delete b.cmpCls}if(b.componentCls){a.push(b.componentCls)}else{b.componentCls=b.baseCls}if(b.cls){a.push(b.cls);delete b.cls}return a.concat(b.additionalCls)},setUI:function(g){var e=this,b=Ext.Array.clone(e.uiCls),h=[],d=[],a,c;for(c=0;c<b.length;c++){a=b[c];d=d.concat(e.removeClsWithUI(a,true));h.push(a)}if(d.length){e.removeCls(d)}e.removeUIFromElement();e.ui=g;e.addUIToElement();d=[];for(c=0;c<h.length;c++){a=h[c];d=d.concat(e.addClsWithUI(a,true))}if(d.length){e.addCls(d)}},addClsWithUI:function(a,e){var d=this,c=[],b;if(!Ext.isArray(a)){a=[a]}for(b=0;b<a.length;b++){if(a[b]&&!d.hasUICls(a[b])){d.uiCls=Ext.Array.clone(d.uiCls);d.uiCls.push(a[b]);c=c.concat(d.addUIClsToElement(a[b]))}}if(e!==true){d.addCls(c)}return c},removeClsWithUI:function(a,e){var d=this,c=[],b;if(!Ext.isArray(a)){a=[a]}for(b=0;b<a.length;b++){if(a[b]&&d.hasUICls(a[b])){d.uiCls=Ext.Array.remove(d.uiCls,a[b]);c=c.concat(d.removeUIClsFromElement(a[b]))}}if(e!==true){d.removeCls(c)}return c},hasUICls:function(a){var b=this,c=b.uiCls||[];return Ext.Array.contains(c,a)},addUIClsToElement:function(l,a){var h=this,m=[],k=h.frameElementCls;m.push(Ext.baseCSSPrefix+l);m.push(h.baseCls+"-"+l);m.push(h.baseCls+"-"+h.ui+"-"+l);if(!a&&h.frame&&!Ext.supports.CSS3BorderRadius){var e=["tl","tc","tr","ml","mc","mr","bl","bc","br"],c,g,d,b;for(g=0;g<e.length;g++){b=h["frame"+e[g].toUpperCase()];c=[h.baseCls+"-"+h.ui+"-"+e[g],h.baseCls+"-"+h.ui+"-"+l+"-"+e[g]];if(b&&b.dom){b.addCls(c)}else{for(d=0;d<c.length;d++){if(Ext.Array.indexOf(k[e[g]],c[d])==-1){k[e[g]].push(c[d])}}}}}h.frameElementCls=k;return m},removeUIClsFromElement:function(b,j){var h=this,a=[],g=h.frameElementCls;a.push(Ext.baseCSSPrefix+b);a.push(h.baseCls+"-"+b);a.push(h.baseCls+"-"+h.ui+"-"+b);if(!j&&h.frame&&!Ext.supports.CSS3BorderRadius){var d=["tl","tc","tr","ml","mc","mr","bl","bc","br"],c,e;b=h.baseCls+"-"+h.ui+"-"+b+"-"+d[c];for(c=0;c<d.length;c++){e=h["frame"+d[c].toUpperCase()];if(e&&e.dom){e.removeCls(b)}else{Ext.Array.remove(g[d[c]],b)}}}h.frameElementCls=g;return a},addUIToElement:function(h){var g=this,e=g.frameElementCls;g.addCls(g.baseCls+"-"+g.ui);if(g.frame&&!Ext.supports.CSS3BorderRadius){var c=["tl","tc","tr","ml","mc","mr","bl","bc","br"],b,d,a;for(b=0;b<c.length;b++){d=g["frame"+c[b].toUpperCase()];a=g.baseCls+"-"+g.ui+"-"+c[b];if(d){d.addCls(a)}else{if(!Ext.Array.contains(e[c[b]],a)){e[c[b]].push(a)}}}}},removeUIFromElement:function(){var h=this,g=h.frameElementCls;h.removeCls(h.baseCls+"-"+h.ui);if(h.frame&&!Ext.supports.CSS3BorderRadius){var d=["tl","tc","tr","ml","mc","mr","bl","bc","br"],c,b,e,a;for(c=0;c<d.length;c++){e=h["frame"+d[c].toUpperCase()];a=h.baseCls+"-"+h.ui+"-"+d[c];if(e){e.removeCls(a)}else{Ext.Array.remove(g[d[c]],a)}}}},getElConfig:function(){if(Ext.isString(this.autoEl)){this.autoEl={tag:this.autoEl}}var a=this.autoEl||{tag:"div"};a.id=this.id;return a},getInsertPosition:function(a){if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}return a},initContainer:function(a){var b=this;if(!a&&b.el){a=b.el.dom.parentNode;b.allowDomMove=false}b.container=Ext.get(a);if(b.ctCls){b.container.addCls(b.ctCls)}return b.container},initRenderData:function(){var a=this;return Ext.applyIf(a.renderData,{id:a.id,ui:a.ui,uiCls:a.uiCls,baseCls:a.baseCls,componentCls:a.componentCls,frame:a.frame})},getTpl:function(c){var e=this,b=e.self.prototype,d,a;if(e.hasOwnProperty(c)){a=e[c];if(a&&!(a instanceof Ext.XTemplate)){e[c]=Ext.ClassManager.dynInstantiate("Ext.XTemplate",a)}return e[c]}if(!(b[c] instanceof Ext.XTemplate)){d=b;do{if(d.hasOwnProperty(c)){a=d[c];if(a&&!(a instanceof Ext.XTemplate)){d[c]=Ext.ClassManager.dynInstantiate("Ext.XTemplate",a);break}}d=d.superclass}while(d)}return b[c]},initRenderTpl:function(){return this.getTpl("renderTpl")},initStyles:function(){var b={},c=this,a=Ext.Element;if(Ext.isString(c.style)){b=a.parseStyles(c.style)}else{b=Ext.apply({},c.style)}if(c.padding!==undefined){b.padding=a.unitizeBox((c.padding===true)?5:c.padding)}if(c.margin!==undefined){b.margin=a.unitizeBox((c.margin===true)?5:c.margin)}delete c.style;return b},initContent:function(){var b=this,d=b.getTargetEl(),a,c;if(b.html){d.update(Ext.DomHelper.markup(b.html));delete b.html}if(b.contentEl){a=Ext.get(b.contentEl);c=Ext.baseCSSPrefix;a.removeCls([c+"hidden",c+"hide-display",c+"hide-offsets",c+"hide-nosize"]);d.appendChild(a.dom)}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=Ext.create("Ext.XTemplate",b.tpl)}if(b.data){b.tpl[b.tplWriteMode](d,b.data);delete b.data}}},initEvents:function(){var c=this,e=c.afterRenderEvents,b,d,a=function(g){c.mon(b,g)};if(e){for(d in e){if(e.hasOwnProperty(d)){b=c[d];if(b&&b.on){Ext.each(e[d],a)}}}}},addChildEls:function(){var b=this,a=b.childEls||(b.childEls=[]);a.push.apply(a,arguments)},removeChildEls:function(g){var e=this,a=e.childEls,d=(e.childEls=[]),h,b,c;for(b=0,h=a.length;b<h;++b){c=a[b];if(!g(c)){d.push(c)}}},applyRenderSelectors:function(){var g=this,h=g.childEls,j=g.renderSelectors,a=g.el,d=a.dom,k,l,c,e,b;if(h){k=g.id+"-";for(e=h.length;e--;){l=c=h[e];if(typeof(l)!="string"){c=l.id||(k+l.itemId);l=l.name}else{c=k+c}g[l]=a.getById(c)}}if(j){for(b in j){if(j.hasOwnProperty(b)&&j[b]){g[b]=Ext.get(Ext.DomQuery.selectNode(j[b],d))}}}},is:function(a){return Ext.ComponentQuery.is(this,a)},up:function(b){var a=this.ownerCt;if(b){for(;a;a=a.ownerCt){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},nextSibling:function(b){var g=this.ownerCt,d,e,a,h;if(g){d=g.items;a=d.indexOf(this)+1;if(a){if(b){for(e=d.getCount();a<e;a++){if((h=d.getAt(a)).is(b)){return h}}}else{if(a<d.getCount()){return d.getAt(a)}}}}return null},previousSibling:function(b){var e=this.ownerCt,d,a,g;if(e){d=e.items;a=d.indexOf(this);if(a!=-1){if(b){for(--a;a>=0;a--){if((g=d.getAt(a)).is(b)){return g}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(c,d){var h=this,b,g,a,e;if(d&&h.is(c)){return h}b=this.prev(c);if(b){return b}if(h.ownerCt){for(g=h.ownerCt.items.items,e=Ext.Array.indexOf(g,h)-1;e>-1;e--){if(g[e].query){b=g[e].query(c);b=b[b.length-1];if(b){return b}}}return h.ownerCt.previousNode(c,true)}},nextNode:function(c,d){var h=this,b,g,a,e;if(d&&h.is(c)){return h}b=this.next(c);if(b){return b}if(h.ownerCt){for(g=h.ownerCt.items,e=g.indexOf(h)+1,g=g.items,a=g.length;e<a;e++){if(g[e].down){b=g[e].down(c);if(b){return b}}}return h.ownerCt.nextNode(c)}},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},isXType:function(b,a){if(Ext.isFunction(b)){b=b.xtype}else{if(Ext.isObject(b)){b=b.statics().xtype}}return !a?("/"+this.getXTypes()+"/").indexOf("/"+b+"/")!=-1:this.self.xtype==b},getXTypes:function(){var c=this.self,d,b,a;if(!c.xtypes){d=[];b=this;while(b){a=b.xtypes;if(a!==undefined){d.unshift.apply(d,a)}b=b.superclass}c.xtypeChain=d;c.xtypes=d.join("/")}return c.xtypes},update:function(b,c,a){var d=this;if(d.tpl&&!Ext.isString(b)){d.data=b;if(d.rendered){d.tpl[d.tplWriteMode](d.getTargetEl(),b||{})}}else{d.html=Ext.isObject(b)?Ext.DomHelper.markup(b):b;if(d.rendered){d.getTargetEl().update(d.html,c,a)}}if(d.rendered){d.doComponentLayout()}},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(a){var c=this,e=c,d=!c.hidden,b=c.ownerCt;c.hiddenAncestor=false;if(c.destroyed){return false}if(a&&d&&c.rendered&&b){while(b){if(b.hidden||(b.collapsed&&!(b.getDockedItems&&Ext.Array.contains(b.getDockedItems(),e)))){c.hiddenAncestor=b;d=false;break}e=b;b=b.ownerCt}}return d},enable:function(a){var b=this;if(b.rendered){b.el.removeCls(b.disabledCls);b.el.dom.disabled=false;b.onEnable()}b.disabled=false;if(a!==true){b.fireEvent("enable",b)}return b},disable:function(a){var b=this;if(b.rendered){b.el.addCls(b.disabledCls);b.el.dom.disabled=true;b.onDisable()}b.disabled=true;if(a!==true){b.fireEvent("disable",b)}return b},onEnable:function(){if(this.maskOnDisable){this.el.unmask()}},onDisable:function(){if(this.maskOnDisable){this.el.mask()}},isDisabled:function(){return this.disabled},setDisabled:function(a){return this[a?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(a){var b=this;if(!a){return b}if(!Ext.isArray(a)){a=a.replace(b.trimRe,"").split(b.spacesRe)}if(b.rendered){b.el.addCls(a)}else{b.additionalCls=Ext.Array.unique(b.additionalCls.concat(a))}return b},addClass:function(){return this.addCls.apply(this,arguments)},removeCls:function(a){var b=this;if(!a){return b}if(!Ext.isArray(a)){a=a.replace(b.trimRe,"").split(b.spacesRe)}if(b.rendered){b.el.removeCls(a)}else{if(b.additionalCls.length){Ext.each(a,function(c){Ext.Array.remove(b.additionalCls,c)})}}return b},addOverCls:function(){var a=this;if(!a.disabled){a.el.addCls(a.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(b,g,e,a){var h=this,d,c;if(Ext.isString(b)&&(Ext.isObject(g)||a&&a.element)){if(a.element){d=g;g={};g[b]=d;b=a.element;if(e){g.scope=e}for(c in a){if(a.hasOwnProperty(c)){if(h.eventOptionsRe.test(c)){g[c]=a[c]}}}}if(h[b]&&h[b].on){h.mon(h[b],g)}else{h.afterRenderEvents=h.afterRenderEvents||{};if(!h.afterRenderEvents[b]){h.afterRenderEvents[b]=[]}h.afterRenderEvents[b].push(g)}}return h.mixins.observable.addListener.apply(h,arguments)},removeManagedListenerItem:function(b,a,i,d,g,e){var h=this,c=a.options?a.options.element:null;if(c){c=h[c];if(c&&c.un){if(b||(a.item===i&&a.ename===d&&(!g||a.fn===g)&&(!e||a.scope===e))){c.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(h.managedListeners,a)}}}}else{return h.mixins.observable.removeManagedListenerItem.apply(h,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(a,b){this.ownerCt=a;this.fireEvent("added",this,a,b)},onRemoved:function(){var a=this;a.fireEvent("removed",a,a.ownerCt);delete a.ownerCt},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(b,a){var c=this,d;if(Ext.isObject(b)){a=b.height;b=b.width}if(Ext.isNumber(b)){b=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}if(Ext.isNumber(a)){a=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}if(!c.rendered||!c.isVisible()){if(c.hiddenAncestor){d=c.hiddenAncestor.layoutOnShow;d.remove(c);d.add(c)}c.needsLayout={width:b,height:a,isSetSize:true};if(!c.rendered){c.width=(b!==undefined)?b:c.width;c.height=(a!==undefined)?a:c.height}return c}c.doComponentLayout(b,a,true);return c},isFixedWidth:function(){var b=this,a=b.layoutManagedWidth;if(Ext.isDefined(b.width)||a==1){return true}if(a==2){return false}return(b.ownerCt&&b.ownerCt.isFixedWidth())},isFixedHeight:function(){var a=this,b=a.layoutManagedHeight;if(Ext.isDefined(a.height)||b==1){return true}if(b==2){return false}return(a.ownerCt&&a.ownerCt.isFixedHeight())},setCalculatedSize:function(b,a,e){var c=this,d;if(Ext.isObject(b)){e=b.ownerCt;a=b.height;b=b.width}if(Ext.isNumber(b)){b=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}if(Ext.isNumber(a)){a=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}if(!c.rendered||!c.isVisible()){if(c.hiddenAncestor){d=c.hiddenAncestor.layoutOnShow;d.remove(c);d.add(c)}c.needsLayout={width:b,height:a,isSetSize:false,ownerCt:e};return c}c.doComponentLayout(b,a,false,e);return c},doComponentLayout:function(e,b,c,h){var g=this,d=g.getComponentLayout(),a=d.lastComponentSize||{width:undefined,height:undefined};if(g.rendered&&d){if(!Ext.isDefined(e)){if(g.isFixedWidth()){e=Ext.isDefined(g.width)?g.width:a.width}}if(!Ext.isDefined(b)){if(g.isFixedHeight()){b=Ext.isDefined(g.height)?g.height:a.height}}if(c){g.width=e;g.height=b}d.layout(e,b,c,h)}return g},forceComponentLayout:function(){this.doComponentLayout()},setComponentLayout:function(b){var a=this.componentLayout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.componentLayout=b;b.setOwner(this)},getComponentLayout:function(){var a=this;if(!a.componentLayout||!a.componentLayout.isLayout){a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,"autocomponent"))}return a.componentLayout},afterComponentLayout:function(c,a,b,h){var g=this,e=g.componentLayout,d=g.preLayoutSize;++g.componentLayoutCounter;if(!d||((c!==d.width)||(a!==d.height))){g.fireEvent("resize",g,c,a)}},beforeComponentLayout:function(c,a,b,d){this.preLayoutSize=this.componentLayout.lastComponentSize;return true},setPosition:function(a,c){var b=this;if(Ext.isObject(a)){c=a.y;a=a.x}if(!b.rendered){return b}if(a!==undefined||c!==undefined){b.el.setBox(a,c);b.onPosition(a,c);b.fireEvent("move",b,a,c)}return b},onPosition:Ext.emptyFn,setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var c=this,b=c.autoLoad?(Ext.isObject(c.autoLoad)?c.autoLoad:{url:c.autoLoad}):null,a=c.loader||b;if(a){if(!a.isLoader){c.loader=Ext.create("Ext.ComponentLoader",Ext.apply({target:c,autoLoad:b},a))}else{a.setTarget(c)}return c.loader}return null},setLoading:function(c,d){var b=this,a;if(b.rendered){if(c!==false&&!b.collapsed){if(Ext.isObject(c)){a=c}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}b.loadMask=b.loadMask||Ext.create("Ext.LoadMask",d?b.getTargetEl():b.el,a);b.loadMask.show()}else{if(b.loadMask){Ext.destroy(b.loadMask);b.loadMask=null}}}return b.loadMask},setDocked:function(b,c){var a=this;a.dock=b;if(c&&a.ownerCt&&a.rendered){a.ownerCt.doComponentLayout()}return a},onDestroy:function(){var a=this;if(a.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(a.setSize,a)}Ext.destroy(a.componentLayout,a.loadMask,a.floatingItems)},cleanElementRefs:function(){var h=this,e=0,g=h.childEls,d=h.renderSelectors,b,c,a;if(h.rendered){if(g){for(a=g.length;e<a;++e){c=g[e];if(typeof(c)!="string"){c=c.name}delete h[c]}}if(d){for(b in d){if(d.hasOwnProperty(b)){delete h[b]}}}}delete h.rendered;delete h.el;delete h.frameBody},destroy:function(){var a=this;if(!a.isDestroyed){if(a.fireEvent("beforedestroy",a)!==false){a.destroying=true;a.beforeDestroy();if(a.floating){delete a.floatParent;if(a.zIndexManager){a.zIndexManager.unregister(a)}}else{if(a.ownerCt&&a.ownerCt.remove){a.ownerCt.remove(a,false)}}a.onDestroy();Ext.destroy(a.plugins);if(a.rendered){a.el.remove()}a.fireEvent("destroy",a);Ext.ComponentManager.unregister(a);a.mixins.state.destroy.call(a);a.clearListeners();a.cleanElementRefs();a.destroying=false;a.isDestroyed=true}}},getPlugin:function(b){var c=0,a=this.plugins,d=a.length;for(;c<d;c++){if(a[c].pluginId===b){return a[c]}}},isDescendantOf:function(a){return !!this.findParentBy(function(b){return b===a})}},function(){this.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"})});Ext.define("Ext.AbstractPlugin",{disabled:false,constructor:function(a){Ext.apply(this,a)},getCmp:function(){return this.cmp},init:Ext.emptyFn,destroy:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,withCredentials:false,cors:false,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(a){a=a||{};Ext.apply(this,a);this.addEvents("beforerequest","requestcomplete","requestexception");this.requests={};this.mixins.observable.constructor.call(this)},request:function(k){k=k||{};var g=this,j=k.scope||window,e=k.username||g.username,h=k.password||g.password||"",b,c,d,a,i;if(g.fireEvent("beforerequest",g,k)!==false){c=g.setOptions(k,j);if(this.isFormUpload(k)===true){this.upload(k.form,c.url,c.data,k);return null}if(k.autoAbort===true||g.autoAbort){g.abort()}if((k.cors===true||g.cors===true)&&Ext.isIe&&Ext.ieVersion>=8){i=new XDomainRequest()}else{i=this.getXhrInstance()}b=k.async!==false?(k.async||g.async):false;if(e){i.open(c.method,c.url,b,e,h)}else{i.open(c.method,c.url,b)}if(k.withCredentials===true||g.withCredentials===true){i.withCredentials=true}a=g.setupHeaders(i,k,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:i,headers:a,options:k,async:b,timeout:setTimeout(function(){d.timedout=true;g.abort(d)},k.timeout||g.timeout)};g.requests[d.id]=d;g.latestId=d.id;if(b){i.onreadystatechange=Ext.Function.bind(g.onStateChange,g,[d])}i.send(c.data);if(!b){return this.onComplete(d)}return d}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(d,b,i,k){d=Ext.getDom(d);k=k||{};var c=Ext.id(),g=document.createElement("iframe"),j=[],h="multipart/form-data",e={target:d.target,method:d.method,encoding:d.encoding,enctype:d.enctype,action:d.action},a;Ext.fly(g).set({id:c,name:c,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(g);if(document.frames){document.frames[c].name=c}Ext.fly(d).set({target:c,method:"POST",enctype:h,encoding:h,action:b||e.action});if(i){Ext.iterate(Ext.Object.fromQueryString(i),function(l,m){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:m,name:l});d.appendChild(a);j.push(a)})}Ext.fly(g).on("load",Ext.Function.bind(this.onUploadComplete,this,[g,k]),null,{single:true});d.submit();Ext.fly(d).set(e);Ext.each(j,function(l){Ext.removeNode(l)})},onUploadComplete:function(i,b){var c=this,a={responseText:"",responseXML:null},h,g;try{h=i.contentWindow.document||i.contentDocument||window.frames[i.id].document;if(h){if(h.body){if(/textarea/i.test((g=h.body.firstChild||{}).tagName)){a.responseText=g.value}else{a.responseText=h.body.innerHTML}}a.responseXML=h.XMLDocument||h}}catch(d){}c.fireEvent("requestcomplete",c,a,b);Ext.callback(b.success,b.scope,[a,b]);Ext.callback(b.callback,b.scope,[b,true,a]);setTimeout(function(){Ext.removeNode(i)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(/multipart\/form-data/i).test(b.getAttribute("enctype")))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(l,k){var i=this,e=l.params||{},h=i.extraParams,d=l.urlParams,c=l.url||i.url,j=l.jsonData,b,a,g;if(Ext.isFunction(e)){e=e.call(k,l)}if(Ext.isFunction(c)){c=c.call(k,l)}c=this.setupUrl(l,c);g=l.rawData||l.xmlData||j||null;if(j&&!Ext.isPrimitive(j)){g=Ext.encode(g)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(h)){h=Ext.Object.toQueryString(h)}e=e+((h)?((e)?"&":"")+h:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(l,e);b=(l.method||i.method||((e||g)?"POST":"GET")).toUpperCase();this.setupMethod(l,b);a=l.disableCaching!==false?(l.disableCaching||i.disableCaching):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(l.disableCachingParam||i.disableCachingParam)+"="+(new Date().getTime()))}if((b=="GET"||g)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:g||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&&!this.isFormUpload(a)){b=Ext.Element.serializeForm(c);d=d?(d+"&"+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return"POST"}return b},setupHeaders:function(m,n,d,c){var i=this,b=Ext.apply({},n.headers||{},i.defaultHeaders||{}),l=i.defaultPostHeader,j=n.jsonData,a=n.xmlData,k,g;if(!b["Content-Type"]&&(d||c)){if(d){if(n.rawData){l="text/plain"}else{if(a&&Ext.isDefined(a)){l="text/xml"}else{if(j&&Ext.isDefined(j)){l="application/json"}}}}b["Content-Type"]=l}if(i.useDefaultXhrHeader&&!b["X-Requested-With"]){b["X-Requested-With"]=i.defaultXhrHeader}try{for(k in b){if(b.hasOwnProperty(k)){g=b[k];m.setRequestHeader(k,g)}}}catch(h){i.fireEvent("exception",k,g)}return b},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,g;for(;c<a;++c){try{g=b[c];g();break}catch(d){}}return g})(),isLoading:function(a){if(!a){a=this.getLatest()}if(!(a&&a.xhr)){return false}var b=a.xhr.readyState;return !(b===0||b==4)},abort:function(b){var a=this;if(!b){b=a.getLatest()}if(b&&a.isLoading(b)){b.xhr.onreadystatechange=null;b.xhr.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}},abortAll:function(){var b=this.requests,a;for(a in b){if(b.hasOwnProperty(a)){this.abort(b[a])}}},getLatest:function(){var b=this.latestId,a;if(b){a=this.requests[b]}return a||null},onStateChange:function(a){if(a.xhr.readyState==4){this.clearTimeout(a);this.onComplete(a);this.cleanup(a)}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(g){var d=this,c=g.options,a,i,b;try{a=d.parseStatus(g.xhr.status)}catch(h){a={success:false,isException:false}}i=a.success;if(i){b=d.createResponse(g);d.fireEvent("requestcomplete",d,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||g.aborted||g.timedout){b=d.createException(g)}else{b=d.createResponse(g)}d.fireEvent("requestexception",d,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,i,b]);delete d.requests[g.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a>=200&&a<300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var i=c.xhr,a={},j=i.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=j.length,k,e,h,g,b;while(d--){k=j[d];e=k.indexOf(":");if(e>=0){h=k.substr(0,e).toLowerCase();if(k.charAt(e+1)==" "){++e}a[h]=k.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:i.status,statusText:i.statusText,getResponseHeader:function(l){return a[l.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:i.responseText,responseXML:i.responseXML};i=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.ElementLoader",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.data.Connection","Ext.Ajax"],statics:{Renderer:{Html:function(a,b,c){a.getTarget().update(b.responseText,c.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(b){var c=this,a;b=b||{};Ext.apply(c,b);c.setTarget(c.target);c.addEvents("beforeload","exception","load");c.mixins.observable.constructor.call(c);if(c.autoLoad){a=c.autoLoad;if(a===true){a={}}c.load(a)}},setTarget:function(b){var a=this;b=Ext.get(b);if(a.target&&a.target!=b){a.abort()}a.target=b},getTarget:function(){return this.target||null},abort:function(){var a=this.active;if(a!==undefined){Ext.Ajax.abort(a.request);if(a.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(a){this.target.mask(a===true?null:a)},load:function(i){i=Ext.apply({},i);var e=this,d=e.target,j=Ext.isDefined(i.loadMask)?i.loadMask:e.loadMask,b=Ext.apply({},i.params),a=Ext.apply({},i.ajaxOptions),g=i.callback||e.callback,h=i.scope||e.scope||e,c;Ext.applyIf(a,e.ajaxOptions);Ext.applyIf(i,a);Ext.applyIf(b,e.params);Ext.apply(b,e.baseParams);Ext.applyIf(i,{url:e.url});Ext.apply(i,{scope:e,params:b,callback:e.onComplete});if(e.fireEvent("beforeload",e,i)===false){return}if(j){e.addMask(j)}c=Ext.Ajax.request(i);e.active={request:c,options:i,mask:j,scope:h,callback:g,success:i.success||e.success,failure:i.failure||e.failure,renderer:i.renderer||e.renderer,scripts:Ext.isDefined(i.scripts)?i.scripts:e.scripts};e.setOptions(e.active,i)},setOptions:Ext.emptyFn,onComplete:function(b,h,a){var d=this,g=d.active,c=g.scope,e=d.getRenderer(g.renderer);if(h){h=e.call(d,d,a,g)}if(h){Ext.callback(g.success,c,[d,a,b]);d.fireEvent("load",d,a,b)}else{Ext.callback(g.failure,c,[d,a,b]);d.fireEvent("exception",d,a,b)}Ext.callback(g.callback,c,[d,h,a,b]);if(g.mask){d.removeMask()}delete d.active},getRenderer:function(a){if(Ext.isFunction(a)){return a}return this.statics().Renderer.Html},startAutoRefresh:function(a,b){var c=this;c.stopAutoRefresh();c.autoRefresh=setInterval(function(){c.load(b)},a)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var a=this;a.stopAutoRefresh();delete a.target;a.abort();a.clearListeners()}});Ext.define("Ext.ComponentLoader",{extend:"Ext.ElementLoader",statics:{Renderer:{Data:function(a,b,d){var g=true;try{a.getTarget().update(Ext.decode(b.responseText))}catch(c){g=false}return g},Component:function(a,c,h){var i=true,g=a.getTarget(),b=[];try{b=Ext.decode(c.responseText)}catch(d){i=false}if(i){if(h.removeAll){g.removeAll()}g.add(b)}return i}}},target:null,loadMask:false,renderer:"html",setTarget:function(b){var a=this;if(Ext.isString(b)){b=Ext.getCmp(b)}if(a.target&&a.target!=b){a.abort()}a.target=b},removeMask:function(){this.target.setLoading(false)},addMask:function(a){this.target.setLoading(a)},setOptions:function(b,a){b.removeAll=Ext.isDefined(a.removeAll)?a.removeAll:this.removeAll},getRenderer:function(b){if(Ext.isFunction(b)){return b}var a=this.statics().Renderer;switch(b){case"component":return a.Component;case"data":return a.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.data.Association",{primaryKey:"id",defaultReaderType:"json",statics:{create:function(a){if(!a.isAssociation){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return Ext.create("Ext.data.BelongsToAssociation",a);case"hasMany":return Ext.create("Ext.data.HasManyAssociation",a);default:}}return a}},constructor:function(b){Ext.apply(this,b);var c=Ext.ModelManager.types,d=b.ownerModel,g=b.associatedModel,e=c[d],h=c[g],a;this.ownerModel=e;this.associatedModel=h;Ext.applyIf(this,{ownerName:d,associatedName:g})},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,g=a.length,e=[],b,d,h;for(d=0;d<g;d++){b=a[d];if(b.associatedModel==c.modelName){e.push(b)}}for(d=0,g=e.length;d<g;d++){h=e[d];this.types[h.ownerModel].prototype.associations.add(Ext.data.Association.create(h));Ext.Array.remove(a,h)}},registerDeferredAssociation:function(a){this.associationStack.push(a)},getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a]}return a},create:function(c,b,d){var a=typeof b=="function"?b:this.types[b||c.name];return new a(c,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.PluginManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(a,b){if(a.init){return a}else{return Ext.createByAlias("plugin."+(a.ptype||b),a)}},findByType:function(c,g){var e=[],b=this.types;for(var a in b){if(!b.hasOwnProperty(a)){continue}var d=b[a];if(d.type==c&&(!g||(g===true&&d.isDefault))){e.push(d)}}return e}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.Template",{requires:["Ext.DomHelper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var g=this,b=arguments,a=[],c=0,e=b.length,h;g.initialConfig={};if(e>1){for(;c<e;c++){h=b[c];if(typeof h=="object"){Ext.apply(g.initialConfig,h);Ext.apply(g,h)}else{a.push(h)}}d=a.join("")}else{if(Ext.isArray(d)){a.push(d.join(""))}else{a.push(d)}}g.html=a.join("");if(g.compiled){g.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,applyTemplate:function(a){var g=this,c=g.disableFormats!==true,e=Ext.util.Format,b=g;if(g.compiled){return g.compiled(a)}function d(h,j,k,i){if(k&&c){if(i){i=[a[j]].concat(Ext.functionFactory("return ["+i+"];")())}else{i=[a[j]]}if(k.substr(0,5)=="this."){return b[k.substr(5)].apply(b,i)}else{return e[k].apply(e,i)}}else{return a[j]!==undefined?a[j]:""}}return g.html.replace(g.re,d)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'].join('');};";eval(body);return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}},function(){this.createAlias("apply","applyTemplate")});Ext.define("Ext.XTemplate",{extend:"Ext.Template",argsRe:/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,nameRe:/^<tpl\b[^>]*?for="(.*?)"/,ifRe:/^<tpl\b[^>]*?if="(.*?)"/,execRe:/^<tpl\b[^>]*?exec="(.*?)"/,constructor:function(){this.callParent(arguments);var z=this,j=z.html,w=z.argsRe,c=z.nameRe,u=z.ifRe,y=z.execRe,q=0,k=[],p="values",x="parent",l="xindex",n="xcount",d="return ",b="with(values){ ",r,g,v,a,e,h,s,A,t;j=["<tpl>",j,"</tpl>"].join("");while((r=j.match(w))){e=null;h=null;s=null;g=r[0].match(c);v=r[0].match(u);a=r[0].match(y);e=v?v[1]:null;if(e){h=Ext.functionFactory(p,x,l,n,b+"try{"+d+Ext.String.htmlDecode(e)+";}catch(e){return;}}")}e=a?a[1]:null;if(e){s=Ext.functionFactory(p,x,l,n,b+Ext.String.htmlDecode(e)+";}")}A=g?g[1]:null;if(A){if(A==="."){A=p}else{if(A===".."){A=x}}A=Ext.functionFactory(p,x,"try{"+b+d+A+";}}catch(e){return;}")}k.push({id:q,target:A,exec:s,test:h,body:r[1]||""});j=j.replace(r[0],"{xtpl"+q+"}");q=q+1}for(t=k.length-1;t>=0;--t){z.compileTpl(k[t])}z.master=k[k.length-1];z.tpls=k},applySubTemplate:function(h,a,c,e,g){var d=this,b=d.tpls[h];return b.compiled.call(d,a,c,e,g)},codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?\}/g,compileTpl:function(tpl){var fm=Ext.util.Format,me=this,useFormat=me.disableFormats!==true,body,bodyReturn,evaluatedFn;function fn(m,name,format,args,math){var v;if(name.substr(0,4)=="xtpl"){return"',this.applySubTemplate("+name.substr(4)+", values, parent, xindex, xcount),'"}if(name=="."){v='Ext.Array.indexOf(["string", "number", "boolean"], typeof values) > -1 || Ext.isDate(values) ? values : ""'}else{if(name=="#"){v="xindex"}else{if(name.substr(0,7)=="parent."){v=name}else{if(name.indexOf(".")!=-1){v="values."+name}else{v="values['"+name+"']"}}}}if(math){v="("+v+math+")"}if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="("+v+" === undefined ? '' : "}return"',"+format+v+args+"),'"}function codeFn(m,code){return"',("+code.replace(me.compileARe,"'")+"),'"}bodyReturn=tpl.body.replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn).replace(me.codeRe,codeFn);body="evaluatedFn = function(values, parent, xindex, xcount){return ['"+bodyReturn+"'].join('');};";eval(body);tpl.compiled=function(values,parent,xindex,xcount){var vs,length,buffer,i;if(tpl.test&&!tpl.test.call(me,values,parent,xindex,xcount)){return""}vs=tpl.target?tpl.target.call(me,values,parent):values;if(!vs){return""}parent=tpl.target?values:parent;if(tpl.target&&Ext.isArray(vs)){buffer=[];length=vs.length;if(tpl.exec){for(i=0;i<length;i++){buffer[buffer.length]=evaluatedFn.call(me,vs[i],parent,i+1,length);tpl.exec.call(me,vs[i],parent,i+1,length)}}else{for(i=0;i<length;i++){buffer[buffer.length]=evaluatedFn.call(me,vs[i],parent,i+1,length)}}return buffer.join("")}if(tpl.exec){tpl.exec.call(me,vs,parent,xindex,xcount)}return evaluatedFn.call(me,vs,parent,xindex,xcount)};return this},applyTemplate:function(a){return this.master.compiled.call(this,a,{},1,1)},compile:function(){return this}},function(){this.createAlias("apply","applyTemplate")});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.util.Observable"},onClassExtended:function(i,c){var h=Ext.getClassName(i),d=h.match(/^(.*)\.controller\./);if(d!==null){var a=Ext.Loader.getPrefix(h)||d[1],g=c.onBeforeClassCreated,j=[],b=["model","view","store"],e;c.onBeforeClassCreated=function(t,m){var n,q,k,r,l,p,s;for(n=0,q=b.length;n<q;n++){k=b[n];r=Ext.Array.from(m[k+"s"]);for(l=0,p=r.length;l<p;l++){s=r[l];e=Ext.Loader.getPrefix(s);if(e===""||e===s){j.push(a+"."+k+"."+s)}else{j.push(s)}}}Ext.require(j,Ext.Function.pass(g,arguments,this))}}},constructor:function(a){this.mixins.observable.constructor.call(this,a);Ext.apply(this,a||{});this.createGetters("model",this.models);this.createGetters("store",this.stores);this.createGetters("view",this.views);if(this.refs){this.ref(this.refs)}},init:function(a){},onLaunch:function(a){},createGetters:function(b,a){b=Ext.String.capitalize(b);Ext.Array.each(a,function(d){var c="get",e=d.split(".");Ext.Array.each(e,function(g){c+=Ext.String.capitalize(g)});c+=b;if(!this[c]){this[c]=Ext.Function.pass(this["get"+b],[d],this)}this[c](d)},this)},ref:function(a){var b=this;a=Ext.Array.from(a);Ext.Array.each(a,function(e){var d=e.ref,c="get"+Ext.String.capitalize(d);if(!b[c]){b[c]=Ext.Function.pass(b.getRef,[d,e],b)}})},getRef:function(e,g,b){this.refCache=this.refCache||{};g=g||{};b=b||{};Ext.apply(g,b);if(g.forceCreate){return Ext.ComponentManager.create(g,"component")}var d=this,a=g.selector,c=d.refCache[e];if(!c){d.refCache[e]=c=Ext.ComponentQuery.query(g.selector)[0];if(!c&&g.autoCreate){d.refCache[e]=c=Ext.ComponentManager.create(g,"component")}if(c){c.on("beforedestroy",function(){d.refCache[e]=null})}}return c},control:function(a,b){this.application.control(a,b,this)},getController:function(a){return this.application.getController(a)},getStore:function(a){return this.application.getStore(a)},getModel:function(a){return this.application.getModel(a)},getView:function(a){return this.application.getView(a)}});Ext.define("Ext.data.IdGenerator",{isGenerator:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.id){Ext.data.IdGenerator.all[b.id]=b}},getRecId:function(a){return a.modelName+"-"+a.internalId},statics:{all:{},get:function(a){var c,d,b;if(typeof a=="string"){d=b=a;a=null}else{if(a.isGenerator){return a}else{d=a.id||a.type;b=a.type}}c=this.all[d];if(!c){c=Ext.create("idgen."+b,a)}return c}}});Ext.define("Ext.data.SortTypes",{singleton:true,none:function(a){return a},stripTagsRE:/<\/?[^>]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,g=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(g===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(a){var b=this;Ext.apply(b,a);b.updateSortFunction()},createSortFunction:function(b){var c=this,d=c.property,e=c.direction||"ASC",a=e.toUpperCase()=="DESC"?-1:1;return function(h,g){return a*b.call(c,h,g)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,g=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){g=a(g);e=a(e)}return g>e?1:(g<e?-1:0)},getRoot:function(a){return this.root===undefined?a:a[this.root]},setDirection:function(b){var a=this;a.direction=b;a.updateSortFunction()},toggle:function(){var a=this;a.direction=Ext.String.toggle(a.direction,"ASC","DESC");a.updateSortFunction()},updateSortFunction:function(a){var b=this;a=a||b.sorterFn||b.defaultSorterFn;b.sort=b.createSortFunction(a)}});Ext.define("Ext.data.Operation",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,group:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(a){Ext.apply(this,a||{})},commitRecords:function(b){var g=this,h,c,d,e,a;if(!g.actionSkipSyncRe.test(g.action)){d=g.records;if(d&&d.length){h=Ext.create("Ext.util.MixedCollection",true,function(i){return i.getId()});h.addAll(d);for(c=b?b.length:0;c--;){e=b[c];a=h.get(e.getId());if(a){a.beginEdit();a.set(e.data);a.endEdit(true)}}if(g.actionCommitRecordsRe.test(g.action)){for(c=d.length;c--;){d[c].commit()}}}}},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var a=this.getResultSet();return(a===undefined?this.records:a.records)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},setBatch:function(a){this.batch=a},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.data.validations",{singleton:true,presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address",emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(a,b){if(b===undefined){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&d<c)||(a&&d>a)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,g=[];for(;d<a;d++){g.push(this.getRecordData(b[d]))}return this.writeRecords(e,g)},getRecordData:function(e){var j=e.phantom===true,b=this.writeAllFields||j,c=this.nameProperty,g=e.fields,d={},i,a,h,k;if(b){g.each(function(l){if(l.persist){a=l[c]||l.name;d[a]=e.get(l.name)}})}else{i=e.getChanges();for(k in i){if(i.hasOwnProperty(k)){h=g.get(k);a=h[c]||h.name;d[a]=i[k]}}if(!j){d[e.idProperty]=e.getId()}}return d}});Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(a){var b=this;b.floating=true;b.el=Ext.create("Ext.Layer",Ext.apply({},a,{hideMode:b.hideMode,hidden:b.hidden,shadow:Ext.isDefined(b.shadow)?b.shadow:"sides",shadowOffset:b.shadowOffset,constrain:false,shim:b.shim===false?false:undefined}),b.el)},onFloatRender:function(){var a=this;a.zIndexParent=a.getZIndexParent();a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onFloatParentHide:function(){var a=this;if(a.hideOnParentHide!==false){a.showOnParentShow=a.isVisible();a.hide()}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},getZIndexParent:function(){var a=this.ownerCt,b;if(a){while(a){b=a;a=a.ownerCt}if(b.floating){return b}}},setZIndex:function(a){var b=this;b.el.setZIndex(a);a+=10;if(b.floatingItems){a=Math.floor(b.floatingItems.setBase(a)/100)*100+10000}return a},doConstrain:function(b){var c=this,a=c.getConstrainVector(b||c.el.getScopeParent()),d;if(a){d=c.getPosition();d[0]+=a[0];d[1]+=a[1];c.setPosition(d)}},getConstrainVector:function(b){var c=this,a;if(c.constrain||c.constrainHeader){a=c.constrainHeader?c.header.el:c.el;b=b||(c.floatParent&&c.floatParent.getTargetEl())||c.container;return a.getConstrainVector(b)}},alignTo:function(b,a,c){if(b.isComponent){b=b.getEl()}var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d);return this},toFront:function(b){var a=this;if(a.zIndexParent){a.zIndexParent.toFront(true)}if(a.zIndexManager.bringToFront(a)){if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(!b){a.focus(false,true)}}return a},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&&!a.maximized){a.el.enableShadow(true)}a.fireEvent("activate",a)}else{if((a instanceof Ext.window.Window)&&(c instanceof Ext.window.Window)){a.el.disableShadow()}a.fireEvent("deactivate",a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b=a.el.getAlignToXY(a.container,"c-c");a.setPagePosition(b);return a},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this.floatParent,a=c?c.getTargetEl():this.container,b=a.getViewSize(false);this.setSize(b)}});Ext.define("Ext.layout.Layout",{isLayout:true,initialized:false,statics:{create:function(b,c){var a;if(b instanceof Ext.layout.Layout){return Ext.createByAlias("layout."+b)}else{if(!b||typeof b==="string"){a=b||c;b={}}else{a=b.type||c}return Ext.createByAlias("layout."+a,b||{})}}},constructor:function(a){this.id=Ext.id(null,this.type+"-");Ext.apply(this,a)},layout:function(){var a=this;a.layoutBusy=true;a.initLayout();if(a.beforeLayout.apply(a,arguments)!==false){a.layoutCancelled=false;a.onLayout.apply(a,arguments);a.childrenChanged=false;a.owner.needsLayout=false;a.layoutBusy=false;a.afterLayout.apply(a,arguments)}else{a.layoutCancelled=true}a.layoutBusy=false;a.doOwnerCtLayouts()},beforeLayout:function(){this.renderChildren();return true},renderChildren:function(){this.renderItems(this.getLayoutItems(),this.getRenderTarget())},renderItems:function(a,g){var e=this,d=a.length,b=0,c;for(;b<d;b++){c=a[b];if(c&&!c.rendered){e.renderItem(c,g,b)}else{if(!e.isValidParent(c,g,b)){e.moveItem(c,g,b)}else{e.configureItem(c)}}}},isValidParent:function(b,c,a){var d=b.el?b.el.dom:Ext.getDom(b);if(d&&c&&c.dom){if(Ext.isNumber(a)&&d!==c.dom.childNodes[a]){return false}return(d.parentNode==(c.dom||c))}return false},renderItem:function(c,d,a){var b=this;if(!c.rendered){if(b.itemCls){c.addCls(b.itemCls)}if(b.owner.itemCls){c.addCls(b.owner.itemCls)}c.render(d,a);b.configureItem(c);b.childrenChanged=true}},moveItem:function(b,c,a){c=c.dom||c;if(typeof a=="number"){a=c.childNodes[a]}c.insertBefore(b.el.dom,a||null);b.container=Ext.get(c);this.configureItem(b);this.childrenChanged=true},initLayout:function(){var a=this,b=a.targetCls;if(!a.initialized&&!Ext.isEmpty(b)){a.getTarget().addCls(b)}a.initialized=true},setOwner:function(a){this.owner=a},getLayoutItems:function(){return[]},configureItem:Ext.emptyFn,onLayout:Ext.emptyFn,afterLayout:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,doOwnerCtLayouts:Ext.emptyFn,afterRemove:function(c){var b=c.el,a=this.owner,e=this.itemCls,d=a.itemCls;if(c.rendered&&!c.isDestroyed){if(e){b.removeCls(e)}if(d){b.removeCls(d)}}delete c.layoutManagedWidth;delete c.layoutManagedHeight},destroy:function(){var b=this.targetCls,a;if(!Ext.isEmpty(b)){a=this.getTarget();if(a){a.removeCls(b)}}this.onDestroy()}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(a){var b=this;b.list={};b.zIndexStack=[];b.front=null;if(a){if(a.isContainer){a.on("resize",b._onContainerResize,b);b.zseed=Ext.Number.from(a.getEl().getStyle("zIndex"),b.getNextZSeed());b.targetEl=a.getTargetEl();b.container=a}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();b.targetEl=Ext.get(a)}}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();Ext.onDocumentReady(function(){b.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(a){this.zseed=a;return this.assignZIndices()},assignZIndices:function(){var c=this.zIndexStack,b=c.length,e=0,g=this.zseed,d;for(;e<b;e++){d=c[e];if(d&&!d.hidden){g=d.setZIndex(g)}}this._activateLast();return g},_setActiveChild:function(a){if(a!==this.front){if(this.front){this.front.setActive(false,a)}this.front=a;if(a){a.setActive(true);if(a.modal){this._showModalMask(a)}}}},_activateLast:function(a){var b,d=false,c;for(c=this.zIndexStack.length-1;c>=0;--c){b=this.zIndexStack[c];if(!b.hidden){if(!d){this._setActiveChild(b);d=true}if(b.modal){this._showModalMask(b);return}}}this._hideModalMask();if(!d){this._setActiveChild(null)}},_showModalMask:function(a){var d=a.el.getStyle("zIndex")-4,b=a.floatParent?a.floatParent.getTargetEl():Ext.get(a.getEl().dom.parentNode),c;if(!b){return}c=b.getBox();if(!this.mask){this.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});this.mask.setVisibilityMode(Ext.Element.DISPLAY);this.mask.on("click",this._onMaskClick,this)}if(b.dom===document.body){c.height=Ext.Element.getViewHeight()}b.addCls(Ext.baseCSSPrefix+"body-masked");this.mask.setBox(c);this.mask.setStyle("zIndex",d);this.mask.show()},_hideModalMask:function(){if(this.mask&&this.mask.dom.parentNode){Ext.get(this.mask.dom.parentNode).removeCls(Ext.baseCSSPrefix+"body-masked");this.mask.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){if(this.mask&&this.mask.isVisible()){this.mask.setSize(Ext.get(this.mask.dom.parentNode).getViewSize(true))}},register:function(a){if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=this;this.list[a.id]=a;this.zIndexStack.push(a);a.on("hide",this._activateLast,this)},unregister:function(a){delete a.zIndexManager;if(this.list&&this.list[a.id]){delete this.list[a.id];a.un("hide",this._activateLast);Ext.Array.remove(this.zIndexStack,a);this._activateLast(a)}},get:function(a){return typeof a=="object"?a:this.list[a]},bringToFront:function(a){a=this.get(a);if(a!==this.front){Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.push(a);this.assignZIndices();return true}if(a.modal){this._showModalMask(a)}return false},sendToBack:function(a){a=this.get(a);Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.unshift(a);this.assignZIndices();return a},hideAll:function(){for(var a in this.list){if(this.list[a].isComponent&&this.list[a].isVisible()){this.list[a].hide()}}},hide:function(){var b=0,c=this.zIndexStack.length,a;this.tempHidden=[];for(;b<c;b++){a=this.zIndexStack[b];if(a.isVisible()){this.tempHidden.push(a);a.hide()}}},show:function(){var c=0,d=this.tempHidden.length,b,a,e;for(;c<d;c++){b=this.tempHidden[c];a=b.x;e=b.y;b.show();b.setPosition(a,e)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(e,d){var g=[],c=0,a=this.zIndexStack.length,b;for(;c<a;c++){b=this.zIndexStack[c];if(e.call(d||b,b)!==false){g.push(b)}}return g},each:function(c,b){var a;for(var d in this.list){a=this.list[d];if(a.isComponent&&c.call(b||a,a)===false){return}}},eachBottomUp:function(e,d){var b,a=this.zIndexStack,c,g;for(c=0,g=a.length;c<g;c++){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},eachTopDown:function(e,d){var b,a=this.zIndexStack,c;for(c=a.length;c-->0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){this.each(function(a){a.destroy()});delete this.zIndexStack;delete this.list;delete this.container;delete this.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(b,a){this.layout=b;Ext.apply(this,a||{})},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,onRemove:Ext.emptyFn,getItem:function(a){return this.layout.owner.getComponent(a)},onRemove:Ext.emptyFn});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",constructor:function(b,d,a){var c=this;Ext.apply(c,{el:Ext.get(b),eventName:a||c.eventName,bindings:[]});if(d){c.addBinding(d)}c.enable()},eventName:"keydown",addBinding:function(h){if(Ext.isArray(h)){Ext.each(h,this.addBinding,this);return}var g=h.key,j=false,d,e,b,c,a;if(Ext.isString(g)){e=[];b=g.toUpperCase();for(c=0,a=b.length;c<a;++c){e.push(b.charCodeAt(c))}g=e;j=true}if(!Ext.isArray(g)){g=[g]}if(!j){for(c=0,a=g.length;c<a;++c){d=g[c];if(Ext.isString(d)){g[c]=d.toUpperCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:g},h))},handleKeyDown:function(c){if(this.enabled){var d=this.bindings,b=0,a=d.length;c=this.processEvent(c);for(;b<a;++b){this.processBinding(d[b],c)}}},processEvent:function(a){return a},processBinding:function(g,a){if(this.checkModifiers(g,a)){var h=a.getKey(),k=g.fn||g.handler,l=g.scope||this,j=g.keyCode,b=g.defaultEventAction,c,e,d=new Ext.EventObjectImpl(a);for(c=0,e=j.length;c<e;++c){if(h===j[c]){if(k.call(l,h,a)!==true&&b){d[b]()}break}}}},checkModifiers:function(j,g){var d=["shift","ctrl","alt"],c=0,a=d.length,h,b;for(;c<a;++c){b=d[c];h=j[b];if(!(h===undefined||(h===g[b+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(Ext.isObject(b)&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},isEnabled:function(){return this.enabled},enable:function(){var a=this;if(!a.enabled){a.el.on(a.eventName,a.handleKeyDown,a);a.enabled=true}},disable:function(){var a=this;if(a.enabled){a.el.removeListener(a.eventName,a.handleKeyDown,a);a.enabled=false}},setDisabled:function(a){if(a){this.disable()}else{this.enable()}},destroy:function(b){var a=this;a.bindings=[];a.disable();if(b===true){a.el.remove()}delete a.el}});Ext.define("Ext.util.ClickRepeater",{extend:"Ext.util.Observable",constructor:function(b,a){this.el=Ext.get(b);this.el.unselectable();Ext.apply(this,a);this.addEvents("mousedown","click","mouseup");if(!this.disabled){this.disabled=true;this.enable()}if(this.handler){this.on("click",this.handler,this.scope||this)}this.callParent()},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(a){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a)},handleMouseDown:function(a){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a);if(this.accelerate){this.delay=400}a=new Ext.EventObjectImpl(a);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[a])},click:function(a){this.fireEvent("click",this,a);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[a])},easeOutExpo:function(e,a,h,g){return(e==g)?a+h:h*(-Math.pow(2,-10*e/g)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(a){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,a)}});Ext.define("Ext.layout.component.Component",{extend:"Ext.layout.Layout",type:"component",monitorChildren:true,initLayout:function(){var c=this,a=c.owner,b=a.el;if(!c.initialized){if(a.frameSize){c.frameSize=a.frameSize}else{a.frameSize=c.frameSize={top:0,left:0,bottom:0,right:0}}}c.callParent(arguments)},beforeLayout:function(b,k,l,i){this.callParent(arguments);var h=this,c=h.owner,d=c.ownerCt,g=c.layout,e=c.isVisible(true),a=c.el.child,j;h.previousComponentSize=h.lastComponentSize;if(!l&&((!Ext.isNumber(b)&&c.isFixedWidth())||(!Ext.isNumber(k)&&c.isFixedHeight()))&&i&&i!==d){h.doContainerLayout();return false}if(!e&&(c.hiddenAncestor||c.floating)){if(c.hiddenAncestor){j=c.hiddenAncestor.layoutOnShow;j.remove(c);j.add(c)}c.needsLayout={width:b,height:k,isSetSize:false}}if(e&&this.needsLayout(b,k)){return c.beforeComponentLayout(b,k,l,i)}else{return false}},needsLayout:function(d,a){var e=this,c,b;e.lastComponentSize=e.lastComponentSize||{width:-Infinity,height:-Infinity};c=!Ext.isDefined(d)||e.lastComponentSize.width!==d;b=!Ext.isDefined(a)||e.lastComponentSize.height!==a;return !e.isSizing&&(e.childrenChanged||c||b)},setElementSize:function(c,b,a){if(b!==undefined&&a!==undefined){c.setSize(b,a)}else{if(a!==undefined){c.setHeight(a)}else{if(b!==undefined){c.setWidth(b)}}}},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},setTargetSize:function(d,a){var e=this;e.setElementSize(e.owner.el,d,a);if(e.owner.frameBody){var h=e.getTargetInfo(),g=h.padding,c=h.border,b=e.frameSize;e.setElementSize(e.owner.frameBody,Ext.isNumber(d)?(d-b.left-b.right-g.left-g.right-c.left-c.right):d,Ext.isNumber(a)?(a-b.top-b.bottom-g.top-g.bottom-c.top-c.bottom):a)}e.autoSized={width:!Ext.isNumber(d),height:!Ext.isNumber(a)};e.lastComponentSize={width:d,height:a}},getTargetInfo:function(){if(!this.targetInfo){var b=this.getTarget(),a=this.owner.getTargetEl();this.targetInfo={padding:{top:b.getPadding("t"),right:b.getPadding("r"),bottom:b.getPadding("b"),left:b.getPadding("l")},border:{top:b.getBorderWidth("t"),right:b.getBorderWidth("r"),bottom:b.getBorderWidth("b"),left:b.getBorderWidth("l")},bodyMargin:{top:a.getMargin("t"),right:a.getMargin("r"),bottom:a.getMargin("b"),left:a.getMargin("l")}}}return this.targetInfo},doOwnerCtLayouts:function(){var b=this.owner,e=b.ownerCt,c,i,d=this.lastComponentSize,h=this.previousComponentSize,a=(h&&d&&Ext.isNumber(d.width))?d.width!==h.width:true,g=(h&&d&&Ext.isNumber(d.height))?d.height!==h.height:true;if(!e||(!a&&!g)){return}c=e.componentLayout;i=e.layout;if(!b.floating&&c&&c.monitorChildren&&!c.layoutBusy){if(!e.suspendLayout&&i&&!i.layoutBusy){if(((a&&!e.isFixedWidth())||(g&&!e.isFixedHeight()))){this.isSizing=true;e.doComponentLayout();this.isSizing=false}else{if(i.bindToOwnerCtContainer===true){i.layout()}}}}},doContainerLayout:function(){var e=this,a=e.owner,c=a.ownerCt,d=a.layout,b;if(!a.suspendLayout&&d&&d.isLayout&&!d.layoutBusy&&!d.isAutoDock){d.layout()}if(c&&c.componentLayout){b=c.componentLayout;if(!a.floating&&b.monitorChildren&&!b.layoutBusy){b.childrenChanged=true}}},afterLayout:function(c,a,b,d){this.doContainerLayout();this.owner.afterComponentLayout(c,a,b,d)}});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(a,d,e){var b=this,c=b.shared;if(!c){c=b.shared=new b(a,e)}c.bind(a);c.setFixedWidth(e||"auto");return c.getSize(d)},destroy:function(){var a=this;Ext.destroy(a.shared);a.shared=null}},constructor:function(a,c){var b=this.measure=Ext.getBody().createChild({cls:"x-textmetrics"});this.el=Ext.get(a);b.position("absolute");b.setLeftTop(-1000,-1000);b.hide();if(c){b.setWidth(c)}},getSize:function(c){var b=this.measure,a;b.update(c);a=b.getSize();b.update("");return a},bind:function(a){var b=this;b.el=Ext.get(a);b.measure.setStyle(b.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(a){this.measure.setWidth(a)},getWidth:function(a){this.measure.dom.style.width="auto";return this.getSize(a).width},getHeight:function(a){return this.getSize(a).height},destroy:function(){var a=this;a.measure.remove();delete a.el;delete a.measure}},function(){Ext.Element.addMethods({getTextWidth:function(c,b,a){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width,b||0,a||1000000)}})});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.util.ClickRepeater","Ext.Element"],alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:"Ext.util.Observable"},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(b,a){this.layout=b;Ext.apply(this,a||{});this.addEvents("scroll")},initCSSClasses:function(){var b=this,a=b.layout;if(!b.CSSinitialized){b.beforeCtCls=b.beforeCtCls||Ext.baseCSSPrefix+"box-scroller-"+a.parallelBefore;b.afterCtCls=b.afterCtCls||Ext.baseCSSPrefix+"box-scroller-"+a.parallelAfter;b.beforeScrollerCls=b.beforeScrollerCls||Ext.baseCSSPrefix+a.owner.getXType()+"-scroll-"+a.parallelBefore;b.afterScrollerCls=b.afterScrollerCls||Ext.baseCSSPrefix+a.owner.getXType()+"-scroll-"+a.parallelAfter;b.CSSinitializes=true}},handleOverflow:function(a,g){var e=this,d=e.layout,c="get"+d.parallelPrefixCap,b={};e.initCSSClasses();e.callParent(arguments);this.createInnerElements();this.showScrollers();b[d.perpendicularPrefix]=g[d.perpendicularPrefix];b[d.parallelPrefix]=g[d.parallelPrefix]-(e.beforeCt[c]()+e.afterCt[c]());return{targetSize:b}},createInnerElements:function(){var a=this,b=a.layout.getRenderTarget();if(!a.beforeCt){b.addCls(Ext.baseCSSPrefix+a.layout.direction+"-box-overflow-body");a.beforeCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+a.beforeCtCls},"before");a.afterCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+a.afterCtCls},"after");a.createWheelListener()}},createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons();this.layout.owner.addClsWithUI("scroller")},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide();this.layout.owner.removeClsWithUI("scroller")}},createScrollers:function(){if(!this.beforeScroller&&!this.afterScroller){var a=this.beforeCt.createChild({cls:Ext.String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:Ext.String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)});a.addClsOnOver(this.beforeScrollerCls+"-hover");b.addClsOnOver(this.afterScrollerCls+"-hover");a.setVisibilityMode(Ext.Element.DISPLAY);b.setVisibilityMode(Ext.Element.DISPLAY);this.beforeRepeater=Ext.create("Ext.util.ClickRepeater",a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=Ext.create("Ext.util.ClickRepeater",b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeRepeater,this.afterRepeater,this.beforeScroller,this.afterScroller,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?"addCls":"removeCls",c=this.atExtremeAfter()?"addCls":"removeCls",a=this.beforeScrollerCls+"-disabled",b=this.afterScrollerCls+"-disabled";this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var a=this.layout;return parseInt(a.innerCt.dom["scroll"+a.parallelBeforeCap],10)||0},getMaxScrollPosition:function(){var a=this.layout;return a.innerCt.dom["scroll"+a.parallelPrefixCap]-this.layout.innerCt["get"+a.parallelPrefixCap]()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(a,b){var g=this,e=g.layout,d=g.getScrollPosition(),c=Ext.Number.constrain(a,0,g.getMaxScrollPosition());if(c!=d&&!g.scrolling){if(b==undefined){b=g.animateScroll}e.innerCt.scrollTo(e.parallelBefore,c,b?g.getScrollAnim():false);if(b){g.scrolling=true}else{g.scrolling=false;g.updateScrollButtons()}g.fireEvent("scroll",g,c,b?g.getScrollAnim():false)}},scrollToItem:function(h,b){var g=this,e=g.layout,a,d,c;h=g.getItem(h);if(h!=undefined){a=this.getItemVisibility(h);if(!a.fullyVisible){d=h.getBox(true,true);c=d[e.parallelPosition];if(a.hiddenEnd){c-=(this.layout.innerCt["get"+e.parallelPrefixCap]()-d[e.parallelPrefix])}this.scrollTo(c,b)}}},getItemVisibility:function(g){var e=this,d=e.getItem(g).getBox(true,true),c=e.layout,b=d[c.parallelPosition],h=b+d[c.parallelPrefix],i=e.getScrollPosition(),a=i+c.innerCt["get"+c.parallelPrefixCap]();return{hiddenStart:b<i,hiddenEnd:h>a,fullyVisible:b>i&&h<a}}});Ext.define("Ext.util.Offset",{statics:{fromObject:function(a){return new this(a.x,a.y)}},constructor:function(a,b){this.x=(a!=null&&!isNaN(a))?a:0;this.y=(b!=null&&!isNaN(b))?b:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},round:function(b){if(!isNaN(b)){var a=Math.pow(10,b);this.x=Math.round(this.x*a)/a;this.y=Math.round(this.y*a)/a}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",requires:["Ext.util.KeyMap"],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(b,a){this.setConfig(b,a||{})},setConfig:function(d,a){if(this.map){this.map.destroy()}var g=Ext.create("Ext.util.KeyMap",d,null,this.getKeyEvent("forceKeyDown" in a?a.forceKeyDown:this.forceKeyDown)),e=Ext.util.KeyNav.keyOptions,c=a.scope||this,b;this.map=g;for(b in e){if(e.hasOwnProperty(b)){if(a[b]){g.addBinding({scope:c,key:e[b],handler:Ext.Function.bind(this.handleEvent,c,[a[b]],true),defaultEventAction:a.defaultEventAction||this.defaultEventAction})}}}g.disable();if(!a.disabled){g.enable()}},handleEvent:function(c,b,a){return a.call(this,b)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,destroy:function(a){this.map.destroy(a);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(a){this.map.setDisabled(a);this.disabled=a},getKeyEvent:function(a){return(a||Ext.EventManager.useKeyDown)?"keydown":"keypress"}});Ext.define("Ext.fx.Queue",{requires:["Ext.util.HashMap"],constructor:function(){this.targets=Ext.create("Ext.util.HashMap");this.fxQueue={}},getFxDefaults:function(a){var b=this.targets.get(a);if(b){return b.fxDefaults}return{}},setFxDefaults:function(a,c){var b=this.targets.get(a);if(b){b.fxDefaults=Ext.apply(b.fxDefaults||{},c)}},stopAnimation:function(b){var d=this,a=d.getFxQueue(b),c=a.length;while(c){a[c-1].end();c--}},getActiveAnimation:function(b){var a=this.getFxQueue(b);return(a&&!!a.length)?a[0]:false},hasFxBlock:function(b){var a=this.getFxQueue(b);return a&&a[0]&&a[0].block},getFxQueue:function(b){if(!b){return false}var c=this,a=c.fxQueue[b],d=c.targets.get(b);if(!d){return false}if(!a){c.fxQueue[b]=[];if(d.type!="element"){d.target.on("destroy",function(){c.fxQueue[b]=[]})}}return c.fxQueue[b]},queueFx:function(d){var c=this,e=d.target,a,b;if(!e){return}a=c.getFxQueue(e.getId());b=a.length;if(b){if(d.concurrent){d.paused=false}else{a[b-1].on("afteranimate",function(){d.paused=false})}}else{d.paused=false}d.on("afteranimate",function(){Ext.Array.remove(a,d);if(d.remove){if(e.type=="element"){var g=Ext.get(e.id);if(g){g.remove()}}}},this);a.push(d)}});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.fx.target.Sprite",{extend:"Ext.fx.target.Target",type:"draw",getFromPrim:function(b,a){var c;if(a=="translate"){c={x:b.attr.translation.x||0,y:b.attr.translation.y||0}}else{if(a=="rotate"){c={degrees:b.attr.rotation.degrees||0,x:b.attr.rotation.x,y:b.attr.rotation.y}}else{c=b.attr[a]}}return c},getAttr:function(a,b){return[[this.target,b!=undefined?b:this.getFromPrim(this.target,a)]]},setAttr:function(n){var h=n.length,l=[],s,g,r,e,b,q,p,d,c,m,k,a;for(d=0;d<h;d++){s=n[d].attrs;for(g in s){r=s[g];a=r.length;for(c=0;c<a;c++){b=r[c][0];e=r[c][1];if(g==="translate"){p={x:e.x,y:e.y}}else{if(g==="rotate"){m=e.x;if(isNaN(m)){m=null}k=e.y;if(isNaN(k)){k=null}p={degrees:e.degrees,x:m,y:k}}else{if(g==="width"||g==="height"||g==="x"||g==="y"){p=parseFloat(e)}else{p=e}}}q=Ext.Array.indexOf(l,b);if(q==-1){l.push([b,{}]);q=l.length-1}l[q][1][g]=p}}}h=l.length;for(d=0;d<h;d++){b=l[d];b[0].setAttributes(b[1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:"Ext.fx.target.Sprite",getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,d!=undefined?d:this.getFromPrim(e,a)])},this);return b}});Ext.define("Ext.fx.target.Component",{extend:"Ext.fx.target.Target",type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},compMethod:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(a,b){return[[this.target,b!==undefined?b:this.getPropMethod[a].call(this.target)]]},setAttr:function(t,e,b){var r=this,m=r.target,q=t.length,v,n,a,g,d,p,l,c,s,u,k;for(g=0;g<q;g++){v=t[g].attrs;for(n in v){l=v[n].length;p={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(d=0;d<l;d++){a=v[n][d];p[r.compMethod[n]].target=a[0];p[r.compMethod[n]][n]=a[1]}if(p.setPosition.target){a=p.setPosition;c=(a.left===undefined)?undefined:parseInt(a.left,10);s=(a.top===undefined)?undefined:parseInt(a.top,10);a.target.setPosition(c,s)}if(p.setPagePosition.target){a=p.setPagePosition;a.target.setPagePosition(a.x,a.y)}if(p.setSize.target&&p.setSize.target.el){a=p.setSize;u=(a.width===undefined)?a.target.getWidth():parseInt(a.width,10);k=(a.height===undefined)?a.target.getHeight():parseInt(a.height,10);if(b||r.dynamic){a.target.componentLayout.childrenChanged=true;if(r.layoutAnimation){a.target.setCalculatedSize(u,k)}else{a.target.setSize(u,k)}}else{a.target.el.setSize(u,k)}}if(p.setOpacity.target){a=p.setOpacity;a.target.el.setStyle("opacity",a.opacity)}}}}});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(p,d,b,n,m,i){var j=3*d,l=3*(n-d)-j,a=1-j-l,h=3*b,k=3*(m-b)-h,q=1-h-k;function g(r){return((a*r+l)*r+j)*r}function c(r,u){var s=e(r,u);return((q*s+k)*s+h)*s}function e(r,z){var y,w,u,s,v,t;for(u=r,t=0;t<8;t++){s=g(u)-r;if(Math.abs(s)<z){return u}v=(3*a*u+2*l)*u+j;if(Math.abs(v)<0.000001){break}u=u-s/v}y=0;w=1;u=r;if(u<y){return y}if(u>w){return w}while(y<w){s=g(u);if(Math.abs(s-r)<z){return u}if(r>s){y=u}else{w=u}u=(w-y)/2+y}return u}return c(p,1/(200*i))},cubicBezier:function(b,e,a,c){var d=function(g){return Ext.fx.CubicBezier.cubicBezierAtTime(g,b,e,a,c,1)};d.toCSS3=function(){return"cubic-bezier("+[b,e,a,c].join(",")+")"};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var j=this,a=j.r/255,i=j.g/255,k=j.b/255,m=Math.max(a,i,k),d=Math.min(a,i,k),n=m-d,e,p=0,c=0.5*(m+d);if(d!=m){p=(c<0.5)?n/(m+d):n/(2-m-d);if(a==m){e=60*(i-k)/n}else{if(i==m){e=120+60*(k-a)/n}else{e=240+60*(a-i)/n}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,p,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var h=this,c=Math.round,e=c(h.r).toString(16),d=c(h.g).toString(16),a=c(h.b).toString(16);e=(e.length==1)?"0"+e:e;d=(d.length==1)?"0"+d:d;a=(a.length==1)?"0"+a:a;return["#",e,d,a].join("")},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return""}if(b.substr(0,1)==="#"){return b}var e=this.colorToHexRe.exec(b);if(Ext.isArray(e)){var g=parseInt(e[2],10),d=parseInt(e[3],10),a=parseInt(e[4],10),c=a|(d<<8)|(g<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return""}},fromString:function(i){var c,e,d,a,h=parseInt;if((i.length==4||i.length==7)&&i.substr(0,1)==="#"){c=i.match(this.hexRe);if(c){e=h(c[1],16)>>0;d=h(c[2],16)>>0;a=h(c[3],16)>>0;if(i.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=i.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e=="undefined")?undefined:Ext.create("Ext.draw.Color",e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(g,p,d){var a,b,c,e,k=[],n=Math.abs,j=Math.floor;if(p==0||g==null){k=[d,d,d]}else{g/=60;a=p*(1-n(2*d-1));b=a*(1-n(g-2*j(g/2)-1));c=d-a/2;switch(j(g)){case 0:k=[a,b,0];break;case 1:k=[b,a,0];break;case 2:k=[0,a,b];break;case 3:k=[0,b,a];break;case 4:k=[b,0,a];break;case 5:k=[a,0,b];break}k=[k[0]+c,k[1]+c,k[2]+c]}return Ext.create("Ext.draw.Color",k[0]*255,k[1]*255,k[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define("Ext.dd.StatusProxy",{animRepair:false,constructor:function(a){Ext.apply(this,a);this.id=this.id||Ext.id();this.proxy=Ext.createWidget("component",{floating:true,stateful:false,id:this.id,html:'<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>',cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:!a||a.shadow!==false,renderTo:document.body});this.el=this.proxy.el;this.el.show();this.el.setVisibilityMode(Ext.Element.VISIBILITY);this.el.hide();this.ghost=Ext.get(this.el.dom.childNodes[1]);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(a){this.el.dom.className=Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed;this.dropStatus=this.dropNotAllowed;if(a){this.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(a){this.proxy.hide();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},show:function(){this.proxy.show();this.proxy.toFront()},sync:function(){this.proxy.el.sync()},repair:function(b,c,a){this.callback=c;this.scope=a;if(b&&this.animRepair!==false){this.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");this.el.hideUnders(true);this.anim=this.el.animate({duration:this.repairDuration||500,easing:"ease-out",to:{x:b[0],y:b[1]},stopAnimation:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback=="function"){this.callback.call(this.scope||this)}this.callback=null;this.scope=null},destroy:function(){Ext.destroy(this.ghost,this.proxy,this.el)}});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",constructor:function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.unghost(null,false);delete this.ghost}},show:function(){if(!this.ghost){var a=this.panel.getSize();this.panel.el.setVisibilityMode(Ext.Element.DISPLAY);this.ghost=this.panel.ghost();if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});this.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define("Ext.layout.component.AbstractDock",{extend:"Ext.layout.component.Component",type:"dock",autoSizing:true,beforeLayout:function(){var a=this.callParent(arguments);if(a!==false&&(!this.initializedBorders||this.childrenChanged)&&(!this.owner.border||this.owner.manageBodyBorders)){this.handleItemBorders();this.initializedBorders=true}return a},handleItemBorders:function(){var a=this.owner,e=a.body,m=this.getLayoutItems(),h={top:[],right:[],bottom:[],left:[]},b=this.borders,d={top:"bottom",right:"left",bottom:"top",left:"right"},c,j,l,k,g;for(c=0,j=m.length;c<j;c++){l=m[c];k=l.dock;if(l.ignoreBorderManagement){continue}if(!h[k].satisfied){h[k].push(l);h[k].satisfied=true}if(!h.top.satisfied&&d[k]!=="top"){h.top.push(l)}if(!h.right.satisfied&&d[k]!=="right"){h.right.push(l)}if(!h.bottom.satisfied&&d[k]!=="bottom"){h.bottom.push(l)}if(!h.left.satisfied&&d[k]!=="left"){h.left.push(l)}}if(b){for(g in b){if(b.hasOwnProperty(g)){j=b[g].length;if(!a.manageBodyBorders){for(c=0;c<j;c++){b[g][c].removeCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}if(!b[g].satisfied&&!a.bodyBorder){e.removeCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}}else{if(b[g].satisfied){e.setStyle("border-"+g+"-width","")}}}}}for(g in h){if(h.hasOwnProperty(g)){j=h[g].length;if(!a.manageBodyBorders){for(c=0;c<j;c++){h[g][c].addCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}if((!h[g].satisfied&&!a.bodyBorder)||a.bodyBorder===false){e.addCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}}else{if(h[g].satisfied){e.setStyle("border-"+g+"-width","1px")}}}}this.borders=h},onLayout:function(a,n){if(this.onLayout_running){return}this.onLayout_running=true;var j=this,b=j.owner,h=b.body,g=b.layout,i=j.getTarget(),l=false,m=false,k,e,d;var c=j.info={boxes:[],size:{width:a,height:n},bodyBox:{}};delete g.isAutoDock;Ext.applyIf(c,j.getTargetInfo());if(b&&b.ownerCt&&b.ownerCt.layout&&b.ownerCt.layout.isLayout){if(!Ext.isNumber(b.height)||!Ext.isNumber(b.width)){b.ownerCt.layout.bindToOwnerCtComponent=true}else{b.ownerCt.layout.bindToOwnerCtComponent=false}}if(n==null||a==null){k=c.padding;e=c.border;d=j.frameSize;if((n==null)&&(a==null)){m=true;l=true;j.setTargetSize(null);j.setBodyBox({width:null,height:null})}else{if(n==null){m=true;j.setTargetSize(a);j.setBodyBox({width:a-k.left-e.left-k.right-e.right-d.left-d.right,height:null})}else{l=true;j.setTargetSize(null,n);j.setBodyBox({width:null,height:n-k.top-k.bottom-e.top-e.bottom-d.top-d.bottom})}}if(g&&g.isLayout){g.bindToOwnerCtComponent=true;g.isAutoDock=g.autoSize!==true;g.layout();c.autoSizedCtLayout=g.autoSize===true;c.autoHeight=m;c.autoWidth=l}j.dockItems();j.setTargetSize(c.size.width,c.size.height)}else{j.setTargetSize(a,n);j.dockItems()}j.callParent(arguments);this.onLayout_running=false},dockItems:function(){this.calculateDockBoxes();var h=this.info,j=h.autoWidth,a=h.autoHeight,c=h.boxes,g=c.length,e,b,d;for(b=0;b<g;b++){e=c[b];d=e.item;d.setPosition(e.x,e.y);if((j||a)&&d.layout&&d.layout.isLayout){d.layout.bindToOwnerCtComponent=true}}if(!h.autoSizedCtLayout){if(j){h.bodyBox.width=null}if(a){h.bodyBox.height=null}}this.setBodyBox(h.bodyBox)},calculateDockBoxes:function(){if(this.calculateDockBoxes_running){return}this.calculateDockBoxes_running=true;var l=this,h=l.getTarget(),k=l.getLayoutItems(),a=l.owner,s=a.body,b=l.info,p=b.autoWidth,q=b.autoHeight,t=b.size,j=k.length,n=b.padding,d=b.border,c=l.frameSize,r,e,g,m;if(q){t.height=s.getHeight()+n.top+d.top+n.bottom+d.bottom+c.top+c.bottom}else{t.height=h.getHeight()}if(p){t.width=s.getWidth()+n.left+d.left+n.right+d.right+c.left+c.right}else{t.width=h.getWidth()}b.bodyBox={x:n.left+c.left,y:n.top+c.top,width:t.width-n.left-d.left-n.right-d.right-c.left-c.right,height:t.height-d.top-n.top-d.bottom-n.bottom-c.top-c.bottom};for(e=0;e<j;e++){r=k[e];g=l.initBox(r);if(q===true){g=l.adjustAutoBox(g,e)}else{g=l.adjustSizedBox(g,e)}b.boxes.push(g)}this.calculateDockBoxes_running=false},adjustSizedBox:function(e,d){var a=this.info.bodyBox,b=this.frameSize,h=this.info,g=h.padding,i=e.type,c=h.border;switch(i){case"top":e.y=a.y;break;case"left":e.x=a.x;break;case"bottom":e.y=(a.y+a.height)-e.height;break;case"right":e.x=(a.x+a.width)-e.width;break}if(e.ignoreFrame){if(i=="bottom"){e.y+=(b.bottom+g.bottom+c.bottom)}else{e.y-=(b.top+g.top+c.top)}if(i=="right"){e.x+=(b.right+g.right+c.right)}else{e.x-=(b.left+g.left+c.left)}}if(!e.overlay){switch(i){case"top":a.y+=e.height;a.height-=e.height;break;case"left":a.x+=e.width;a.width-=e.width;break;case"bottom":a.height-=e.height;break;case"right":a.width-=e.width;break}}return e},adjustAutoBox:function(j,m){var b=this.info,a=this.owner,n=b.bodyBox,s=b.size,k=b.boxes,g=k.length,q=j.type,e=this.frameSize,r=b.padding,d=b.border,c=b.autoSizedCtLayout,p=(g<m)?g:m,h,l;if(q=="top"||q=="bottom"){for(h=0;h<p;h++){l=k[h];if(l.stretched&&l.type=="left"||l.type=="right"){l.height+=j.height}else{if(l.type=="bottom"){l.y+=j.height}}}}switch(q){case"top":j.y=n.y;if(!j.overlay){n.y+=j.height;if(b.autoHeight){s.height+=j.height}else{n.height-=j.height}}break;case"bottom":if(!j.overlay){if(b.autoHeight){s.height+=j.height}else{n.height-=j.height}}j.y=(n.y+n.height);break;case"left":j.x=n.x;if(!j.overlay){n.x+=j.width;if(b.autoWidth){s.width+=j.width}else{n.width-=j.width}}break;case"right":if(!j.overlay){if(b.autoWidth){s.width+=j.width}else{n.width-=j.width}}j.x=(n.x+n.width);break}if(j.ignoreFrame){if(q=="bottom"){j.y+=(e.bottom+r.bottom+d.bottom)}else{j.y-=(e.top+r.top+d.top)}if(q=="right"){j.x+=(e.right+r.right+d.right)}else{j.x-=(e.left+r.left+d.left)}}return j},initBox:function(k){var i=this,h=i.info.bodyBox,a=(k.dock=="top"||k.dock=="bottom"),b=i.owner,e=i.frameSize,c=i.info,j=c.padding,d=c.border,g={item:k,overlay:k.overlay,type:k.dock,offsets:Ext.Element.parseBox(k.offsets||{}),ignoreFrame:k.ignoreParentFrame};if(k.stretch!==false){g.stretched=true;if(a){g.x=h.x+g.offsets.left;g.width=h.width-(g.offsets.left+g.offsets.right);if(g.ignoreFrame){g.width+=(e.left+e.right+d.left+d.right+j.left+j.right)}k.setCalculatedSize(g.width-k.el.getMargin("lr"),undefined,b)}else{g.y=h.y+g.offsets.top;g.height=h.height-(g.offsets.bottom+g.offsets.top);if(g.ignoreFrame){g.height+=(e.top+e.bottom+d.top+d.bottom+j.top+j.bottom)}k.setCalculatedSize(undefined,g.height-k.el.getMargin("tb"),b);if(!Ext.supports.ComputedStyle){k.el.repaint()}}}else{k.doComponentLayout();g.width=k.getWidth()-(g.offsets.left+g.offsets.right);g.height=k.getHeight()-(g.offsets.bottom+g.offsets.top);g.y+=g.offsets.top;if(a){g.x=(k.align=="right")?h.width-g.width:h.x;g.x+=g.offsets.left}}if(g.width===undefined){g.width=k.getWidth()+k.el.getMargin("lr")}if(g.height===undefined){g.height=k.getHeight()+k.el.getMargin("tb")}return g},getLayoutItems:function(){var c=this.owner.getDockedItems(),d=c.length,b=0,a=[];for(;b<d;b++){if(c[b].isVisible(true)){a.push(c[b])}}return a},renderItems:function(h,e){var a=e.dom.childNodes,d=a.length,g=h.length,l=0,c,b,k,m;for(c=0;c<d;c++){k=Ext.get(a[c]);for(b=0;b<g;b++){m=h[b];if(m.rendered&&(k.id==m.el.id||k.contains(m.el.id))){break}}if(b===g){l++}}for(c=0,b=0;c<g;c++,b++){m=h[c];if(c===b&&(m.dock==="right"||m.dock==="bottom")){b+=l}if(m&&!m.rendered){this.renderItem(m,e,b)}else{if(!this.isValidParent(m,e,b)){this.moveItem(m,e,b)}}}},setBodyBox:function(g){var i=this,a=i.owner,h=a.body,b=i.info,e=b.bodyMargin,j=b.padding,d=b.border,c=i.frameSize;if(a.collapsed){return}if(Ext.isNumber(g.width)){g.width-=e.left+e.right}if(Ext.isNumber(g.height)){g.height-=e.top+e.bottom}i.setElementSize(h,g.width,g.height);if(Ext.isNumber(g.x)){h.setLeft(g.x-j.left-c.left)}if(Ext.isNumber(g.y)){h.setTop(g.y-j.top-c.top)}},configureItem:function(a,b){this.callParent(arguments);if(a.dock=="top"||a.dock=="bottom"){a.layoutManagedWidth=1;a.layoutManagedHeight=2}else{a.layoutManagedWidth=2;a.layoutManagedHeight=1}a.addCls(Ext.baseCSSPrefix+"docked");a.addClsWithUI("docked-"+a.dock)},afterRemove:function(a){this.callParent(arguments);if(this.itemCls){a.el.removeCls(this.itemCls+"-"+a.dock)}var b=a.el.dom;if(!a.destroying&&b){b.parentNode.removeChild(b)}this.childrenChanged=true}});Ext.define("Ext.util.Memento",function(){function d(h,g,i){h[i]=g[i]}function c(h,g,i){delete h[i]}function e(i,h,j){var g=i[j];if(g||i.hasOwnProperty(j)){a(h,j,g)}}function a(h,i,g){if(Ext.isDefined(g)){h[i]=g}else{delete h[i]}}function b(g,j,i,h){if(j){if(Ext.isArray(h)){Ext.each(h,function(k){g(j,i,k)})}else{g(j,i,h)}}}return{data:null,target:null,constructor:function(h,g){if(h){this.target=h;if(g){this.capture(g)}}},capture:function(g,h){b(d,this.data||(this.data={}),h||this.target,g)},remove:function(g){b(c,this.data,null,g)},restore:function(h,g,i){b(e,this.data,i||this.target,h);if(g!==false){this.remove(h)}},restoreAll:function(g,j){var i=this,h=j||this.target;Ext.Object.each(i.data,function(l,k){a(h,l,k)});if(g!==false){delete i.data}}}}());Ext.define("Ext.app.EventBus",{requires:["Ext.util.Event"],mixins:{observable:"Ext.util.Observable"},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var a=this;Ext.override(Ext.Component,{fireEvent:function(b){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return a.dispatch.call(a,b,this,arguments)}return false}})},dispatch:function(l,g,k){var h=this.bus,m=h[l],d,c,b,n,a,e,j;if(m){for(d in m){if(g.is(d)){c=m[d];for(b in c){n=c[b];for(e=0,j=n.length;e<j;e++){a=n[e];if(a.fire.apply(a,Array.prototype.slice.call(k,1))===false){return false}}}}}}},control:function(d,g,c){var b=this.bus,a,e;if(Ext.isString(d)){a=d;d={};d[a]=g;this.control(d,null,c);return}Ext.Object.each(d,function(h,i){Ext.Object.each(i,function(m,n){var j={},k=c,l=Ext.create("Ext.util.Event",c,m);if(Ext.isObject(n)){j=n;n=j.fn;k=j.scope||c;delete j.fn;delete j.scope}l.addListener(n,k,j);b[m]=b[m]||{};b[m][h]=b[m][h]||{};b[m][h][c.id]=b[m][h][c.id]||[];b[m][h][c.id].push(l)})})}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{convert:function(b){return b},sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(this.useNull&&(b===undefined||b===null||b==="")){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat,b;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",constructor:function(b){if(Ext.isString(b)){b={name:b}}Ext.apply(this,b);var d=Ext.data.Types,a=this.sortType,c;if(this.type){if(Ext.isString(this.type)){this.type=d[this.type.toUpperCase()]||d.AUTO}}else{this.type=d.AUTO}if(Ext.isString(a)){this.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){this.sortType=this.type.sortType}}if(!this.convert){this.convert=this.type.convert}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.addEvents("clear","add","replace","remove");c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,g=e,c=b,a;if(arguments.length==1){g=c;c=d.getKey(g)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,g)}d.map[c]=g}d.length++;d.items.push(g);d.keys.push(c);d.fireEvent("add",d.length-1,g,c);return g},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(g){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(g)){b=arguments.length>1?arguments:g;for(a=b.length;d<a;d++){e.add(b[d])}}else{for(c in g){if(g.hasOwnProperty(c)){if(e.allowFunctions||typeof g[c]!="function"){e.add(c,g[c])}}}}},each:function(e,d){var b=[].concat(this.items),c=0,a=b.length,g;for(;c<a;c++){g=b[c];if(e.call(d||g,g,c,a)===false){break}}},eachKey:function(e,d){var g=this.keys,b=this.items,c=0,a=g.length;for(;c<a;c++){e.call(d||window,g[c],b[c],c,a)}},findBy:function(e,d){var g=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],g[c])){return b[c]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(a,b,e){var d=this,c=b,g=e;if(arguments.length==2){g=c;c=d.getKey(g)}if(d.containsKey(c)){d.suspendEvents();d.removeAtKey(c);d.resumeEvents()}if(a>=d.length){return d.add(c,g)}d.length++;Ext.Array.splice(d.items,a,0,g);if(typeof c!="undefined"&&c!==null){d.map[c]=g}Ext.Array.splice(d.keys,a,0,c);d.fireEvent("add",a,g,c);return g},remove:function(a){return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a<c.length&&a>=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent("remove",d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(h,b,j,a){var c=this.extractValues(h,b),g=c.length,e=0,d;j=j||0;a=(a||a===0)?a:g-1;for(d=j;d<=a;d++){e+=c[d]}return e},collect:function(k,e,h){var l=this.extractValues(k,e),a=l.length,b={},c=[],j,g,d;for(d=0;d<a;d++){j=l[d];g=String(j);if((h||!Ext.isEmpty(j))&&!b[g]){b[g]=true;c.push(j)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},getRange:function(g,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}g=g||0;a=Math.min(typeof a=="undefined"?e.length-1:a,e.length-1);if(g<=a){for(d=g;d<=a;d++){b[b.length]=c[d]}}else{for(d=g;d>=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,g,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create("Ext.util.Filter",{property:d,value:c,anyMatch:g,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(h){var n=true,p=b.length,j;for(j=0;j<p;j++){var m=b[j],l=m.filterFn,k=m.scope;n=n&&l.call(k,h)}return n};return this.filterBy(e)},filterBy:function(e,d){var j=this,a=new this.self(),h=j.keys,b=j.items,g=b.length,c;a.getKey=j.getKey;for(c=0;c<g;c++){if(e.call(d||j,b[c],h[c])){a.add(h[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(e,d,j){var h=this,g=h.keys,b=h.items,c=j||0,a=b.length;for(;c<a;c++){if(e.call(d||h,b[c],g[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var e=this,g=new this.self(),d=e.keys,b=e.items,c=0,a=b.length;for(;c<a;c++){g.add(d[c],b[c])}g.getKey=e.getKey;return g}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=Ext.create("Ext.util.AbstractMixedCollection",false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(h,g,c,e){var d=this,i,b,a;if(Ext.isArray(h)){e=c;c=g;a=h}else{if(Ext.isObject(h)){e=c;c=g;a=[h]}else{if(Ext.isString(h)){i=d.sorters.get(h);if(!i){i={property:h,direction:g};a=[i]}else{if(g===undefined){i.toggle()}else{i.setDirection(g)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){h=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(h)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}}if(e!==false){d.onBeforeSort(a);h=d.sorters.items;if(h.length){b=function(l,k){var j=h[0].sort(l,k),n=h.length,m;for(m=1;m<n;m++){j=j||h[m].sort.call(this,l,k)}return j};d.doSort(b)}}return h},onBeforeSort:Ext.emptyFn,decodeSorters:function(g){if(!Ext.isArray(g)){if(g===undefined){g=[]}else{g=[g]}}var d=g.length,h=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c<d;c++){b=g[c];if(!(b instanceof h)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:"ASC"});if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}if(a&&!b.transform){e=a.get(b.property);b.transform=e?e.sortType:undefined}g[c]=Ext.create("Ext.util.Sorter",b)}}return g},getSorters:function(){return this.sorters.items}});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var a=this;a.callParent(arguments);a.addEvents("sort");a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(l,a,k){var j=this,d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],m=j.keys,g=j.items;k=k||function(i,c){return i-c};for(d=0,e=g.length;d<e;d++){h[h.length]={key:m[d],value:g[d],index:d}}Ext.Array.sort(h,function(i,c){var n=k(i[l],c[l])*b;if(n===0){n=(i.index<c.index?-1:1)}return n});for(d=0,e=h.length;d<e;d++){g[d]=h[d].value;m[d]=h[d].key}j.fireEvent("sort",j)},sortBy:function(c){var h=this,b=h.items,g=h.keys,e=b.length,a=[],d;for(d=0;d<e;d++){a[d]={key:g[d],value:b[d],index:d}}Ext.Array.sort(a,function(j,i){var k=c(j.value,i.value);if(k===0){k=(j.index<i.index?-1:1)}return k});for(d=0;d<e;d++){b[d]=a[d].value;g[d]=a[d].key}h.fireEvent("sort",h,b,g)},reorder:function(d){var h=this,b=h.items,c=0,g=b.length,a=[],e=[],i;h.suspendEvents();for(i in d){a[d[i]]=b[i]}for(c=0;c<g;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<g;c++){if(a[c]==undefined){a[c]=e.shift()}}h.clear();h.addAll(a);h.resumeEvents();h.fireEvent("sort",h)},sortByKey:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})}});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b<this.length;b++){a=this.items[b];if(a.field==e){d.push(a)}}return d}});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,isReader:true,constructor:function(a){var b=this;Ext.apply(b,a||{});b.fieldCount=0;b.model=Ext.ModelManager.getModel(a.model);if(b.model){b.buildExtractors()}},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);b.buildExtractors(true);if(c&&b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b=a;if(a&&a.responseText){b=this.getResponseData(a)}if(b){return this.readRecords(b)}else{return this.nullResultSet}},readRecords:function(c){var d=this;if(d.fieldCount!==d.getFields().length){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);var g=Ext.isArray(c)?c:d.getRoot(c),i=true,b=0,e,h,a,j;if(g){e=g.length}if(d.totalProperty){h=parseInt(d.getTotal(c),10);if(!isNaN(h)){e=h}}if(d.successProperty){h=d.getSuccess(c);if(h===false||h==="false"){i=false}}if(d.messageProperty){j=d.getMessage(c)}if(g){a=d.extractData(g);b=a.length}else{b=0;a=[]}return Ext.create("Ext.data.ResultSet",{total:e||b,count:b,records:a,success:i,message:j})},extractData:function(k){var j=this,l=[],e=[],d=j.model,g=0,b=k.length,m=j.getIdProperty(),c,a,h;if(!k.length&&Ext.isObject(k)){k=[k];b=1}for(;g<b;g++){c=k[g];l=j.extractValues(c);a=j.getId(c);h=new d(l,a,c);e.push(h);if(j.implicitIncludes){j.readAssociated(h,c)}}return e},readAssociated:function(h,e){var d=h.associations.items,g=0,a=d.length,c,b,k,j;for(;g<a;g++){c=d[g];b=this.getAssociatedDataRoot(e,c.associationKey||c.name);if(b){j=c.getReader();if(!j){k=c.associatedModel.proxy;if(k){j=k.getReader()}else{j=new this.constructor({model:c.associatedName})}}c.read(h,j,b)}}},getAssociatedDataRoot:function(b,a){return b[a]},getFields:function(){return this.model.prototype.fields.items},extractValues:function(g){var a=this.getFields(),c=0,d=a.length,b={},h,e;for(;c<d;c++){h=a[c];e=this.extractorFunctions[c](g);b[h.name]=e}return b},getData:function(a){return a},getRoot:function(a){return a},getResponseData:function(a){},onMetaChange:function(c){var a=c.fields,b;Ext.apply(this,c);if(a){b=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:a});this.setModel(b,true)}else{this.buildExtractors(true)}},getIdProperty:function(){var a=this.idProperty;if(Ext.isEmpty(a)){a=this.model.prototype.idProperty}return a},buildExtractors:function(e){var c=this,h=c.getIdProperty(),d=c.totalProperty,b=c.successProperty,g=c.messageProperty,a;if(e===true){delete c.extractorFunctions}if(c.extractorFunctions){return}if(d){c.getTotal=c.createAccessor(d)}if(b){c.getSuccess=c.createAccessor(b)}if(g){c.getMessage=c.createAccessor(g)}if(h){a=c.createAccessor(h);c.getId=function(i){var j=a.call(c,i);return(j===undefined||j==="")?null:j}}else{c.getId=function(){return null}}c.buildFieldExtractors()},buildFieldExtractors:function(){var d=this,a=d.getFields(),c=a.length,b=0,h=[],g,e;for(;b<c;b++){g=a[b];e=(g.mapping!==undefined&&g.mapping!==null)?g.mapping:g.name;h.push(d.createAccessor(e))}d.fieldCount=c;d.extractorFunctions=h}},function(){Ext.apply(this,{nullResultSet:Ext.create("Ext.data.ResultSet",{total:0,count:0,records:[],success:true})})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(a){if(a.metaData){this.onMetaChange(a.metaData)}this.jsonData=a;return this.callParent([a])},getResponseData:function(a){var c;try{c=Ext.decode(a.responseText)}catch(b){Ext.Error.raise({response:a,json:a.responseText,parseError:b,msg:"Unable to parse the JSON returned by the server: "+b.toString()})}return c},buildExtractors:function(){var a=this;a.callParent(arguments);if(a.root){a.getRoot=a.createAccessor(a.root)}else{a.getRoot=function(b){return b}}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b<c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.useSimpleAccessors!==true){var b=String(c).search(a);if(b>=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(b,c){var a=this.root;if(this.allowSingle&&c.length==1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],requires:["Ext.data.reader.Json","Ext.data.writer.Json"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],mixins:{observable:"Ext.util.Observable"},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(a){a=a||{};if(a.model===undefined){delete a.model}this.mixins.observable.constructor.call(this,a);if(this.model!==undefined&&!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(b,c){this.model=Ext.ModelManager.getModel(b);var a=this.reader,d=this.writer;this.setReader(a);this.setWriter(d);if(c&&this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(a){var b=this;if(a===undefined||typeof a=="string"){a={type:a}}if(a.isReader){a.setModel(b.model)}else{Ext.applyIf(a,{proxy:b,model:b.model,type:b.defaultReaderType});a=Ext.createByAlias("reader."+a.type,a)}b.reader=a;return b.reader},getReader:function(){return this.reader},setWriter:function(a){if(a===undefined||typeof a=="string"){a={type:a}}if(!(a instanceof Ext.data.writer.Writer)){Ext.applyIf(a,{model:this.model,type:this.defaultWriterType});a=Ext.createByAlias("writer."+a.type,a)}this.writer=a;return this.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(d,e){var g=this,c=Ext.create("Ext.data.Batch",{proxy:g,listeners:e||{}}),b=g.batchActions,a;Ext.each(g.batchOrder.split(","),function(h){a=d[h];if(a){if(b){c.add(Ext.create("Ext.data.Operation",{action:h,records:a}))}else{Ext.each(a,function(i){c.add(Ext.create("Ext.data.Operation",{action:h,records:[i]}))})}}},g);c.start();return c}},function(){Ext.data.DataProxy=this});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(a){var b=this;a=a||{};this.addEvents("exception");b.callParent([a]);b.extraParams=a.extraParams||{};b.api=a.api||{};b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},buildRequest:function(a){var c=Ext.applyIf(a.params||{},this.extraParams||{}),b;c=Ext.applyIf(c,this.getParams(a));if(a.id&&!c.id){c.id=a.id}b=Ext.create("Ext.data.Request",{params:c,action:a.action,records:a.records,operation:a,url:a.url});b.url=this.buildUrl(b);a.request=b;return b},processResponse:function(h,a,c,b,g,i){var e=this,d,j;if(h===true){d=e.getReader();j=d.read(e.extractResponseData(b));if(j.success!==false){Ext.apply(a,{response:b,resultSet:j});a.commitRecords(j.records);a.setCompleted();a.setSuccessful()}else{a.setException(j.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof g=="function"){g.call(i||e,a)}e.afterRequest(c,h)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:function(a){return a},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,direction:d[a].direction}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,value:d[a].value}}return this.applyEncoding(b)},getParams:function(l){var t=this,s={},p=Ext.isDefined,q=l.groupers,a=l.sorters,j=l.filters,h=l.page,g=l.start,r=l.limit,i=t.simpleSortMode,n=t.pageParam,d=t.startParam,b=t.limitParam,c=t.groupParam,e=t.sortParam,m=t.filterParam,k=t.directionParam;if(n&&p(h)){s[n]=h}if(d&&p(g)){s[d]=g}if(b&&p(r)){s[b]=r}if(c&&q&&q.length>0){s[c]=t.encodeSorters(q)}if(e&&a&&a.length>0){if(i){s[e]=a[0].property;s[k]=a[0].direction}else{s[e]=t.encodeSorters(a)}}if(m&&j&&j.length>0){s[m]=t.encodeFilters(j)}return s},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a,e,b);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(h,i,g){c.processResponse(i,a,d,g,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.data.proxy.Ajax","Ext.util.MixedCollection"],onClassExtended:function(a,b){var c=b.onBeforeClassCreated;b.onBeforeClassCreated=function(d,z){var y=this,A=Ext.getClassName(d),m=d.prototype,s=d.prototype.superclass,e=z.validations||[],p=z.fields||[],u=z.associations||[],t=z.belongsTo,n=z.hasMany,q=z.idgen,w=new Ext.util.MixedCollection(false,function(i){return i.name}),v=new Ext.util.MixedCollection(false,function(i){return i.name}),l=s.validations,x=s.fields,h=s.associations,g,r,j,k=[];d.modelName=A;m.modelName=A;if(l){e=l.concat(e)}z.validations=e;if(x){p=x.items.concat(p)}for(r=0,j=p.length;r<j;++r){w.add(new Ext.data.Field(p[r]))}z.fields=w;if(q){z.idgen=Ext.data.IdGenerator.get(q)}if(t){t=Ext.Array.from(t);for(r=0,j=t.length;r<j;++r){g=t[r];if(!Ext.isObject(g)){g={model:g}}g.type="belongsTo";u.push(g)}delete z.belongsTo}if(n){n=Ext.Array.from(n);for(r=0,j=n.length;r<j;++r){g=n[r];if(!Ext.isObject(g)){g={model:g}}g.type="hasMany";u.push(g)}delete z.hasMany}if(h){u=h.items.concat(u)}for(r=0,j=u.length;r<j;++r){k.push("association."+u[r].type.toLowerCase())}if(z.proxy){if(typeof z.proxy==="string"){k.push("proxy."+z.proxy)}else{if(typeof z.proxy.type==="string"){k.push("proxy."+z.proxy.type)}}}Ext.require(k,function(){Ext.ModelManager.registerType(A,d);for(r=0,j=u.length;r<j;++r){g=u[r];Ext.apply(g,{ownerModel:A,associatedModel:g.model});if(Ext.ModelManager.getModel(g.model)===undefined){Ext.ModelManager.registerDeferredAssociation(g)}else{v.add(Ext.data.Association.create(g))}}z.associations=v;c.call(y,d,z);d.setProxy(d.prototype.proxy||d.prototype.defaultProxyType);Ext.ModelManager.onModelDefined(d)})}},inheritableStatics:{setProxy:function(a){if(!a.isProxy){if(typeof a=="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this);this.proxy=this.prototype.proxy=a;return a},getProxy:function(){return this.proxy},load:function(g,c){c=Ext.apply({},c);c=Ext.applyIf(c,{action:"read",id:g});var b=Ext.create("Ext.data.Operation",c),d=c.scope||this,a=null,e;e=function(h){if(h.wasSuccessful()){a=h.getRecords()[0];Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};this.proxy.read(b,e,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(a){var b=[this.PREFIX,"-",this.AUTO_ID++].join("");a.phantom=true;a.internalId=b;return b}},idgen:{isGenerator:true,type:"default",generate:function(){return null},getRecId:function(a){return a.modelName+"-"+a.internalId}},editing:false,dirty:false,persistenceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",defaultProxyType:"ajax",constructor:function(g,b,m){g=g||{};var k=this,j,c,l,a,e,d,h=Ext.isArray(g),n=h?{}:null;k.internalId=(b||b===0)?b:Ext.data.Model.id(k);k.raw=m;Ext.applyIf(k,{data:{}});k.modified={};if(k.persistanceProperty){k.persistenceProperty=k.persistanceProperty}k[k.persistenceProperty]={};k.mixins.observable.constructor.call(k);j=k.fields.items;c=j.length;for(e=0;e<c;e++){l=j[e];a=l.name;if(h){n[a]=g[e]}else{if(g[a]===undefined){g[a]=l.defaultValue}}}k.set(n||g);if(k.getId()){k.phantom=false}else{if(k.phantom){d=k.idgen.generate();if(d!==null){k.setId(d)}}}k.dirty=false;k.modified={};if(typeof k.init=="function"){k.init()}k.id=k.idgen.getRecId(k)},get:function(a){return this[this.persistenceProperty][a]},set:function(p,k){var h=this,e=h.fields,n=h.modified,d=[],j,m,c,l,b,g,a;if(arguments.length==1&&Ext.isObject(p)){b=!h.editing;g=0;for(m in p){if(p.hasOwnProperty(m)){j=e.get(m);if(j&&j.convert!==j.type.convert){d.push(m);continue}if(!g&&b){h.beginEdit()}++g;h.set(m,p[m])}}a=d.length;if(a){if(!g&&b){h.beginEdit()}g+=a;for(c=0;c<a;c++){j=d[c];h.set(j,p[j])}}if(b&&g){h.endEdit()}}else{if(e){j=e.get(p);if(j&&j.convert){k=j.convert(k,h)}}l=h.get(p);h[h.persistenceProperty][p]=k;if(j&&j.persist&&!h.isEqual(l,k)){if(h.isModified(p)){if(h.isEqual(n[p],k)){delete n[p];h.dirty=false;for(m in n){if(n.hasOwnProperty(m)){h.dirty=true;break}}}}else{h.dirty=true;n[p]=l}}if(!h.editing){h.afterEdit()}}},isEqual:function(d,c){if(Ext.isDate(d)&&Ext.isDate(c)){return d.getTime()===c.getTime()}return d===c},beginEdit:function(){var a=this;if(!a.editing){a.editing=true;a.dirtySave=a.dirty;a.dataSave=Ext.apply({},a[a.persistenceProperty]);a.modifiedSave=Ext.apply({},a.modified)}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a[a.persistenceProperty]=a.dataSave;a.dirty=a.dirtySave;delete a.modifiedSave;delete a.dataSave;delete a.dirtySave}},endEdit:function(a){var b=this,c;if(b.editing){b.editing=false;c=b.dirty||b.changedWhileEditing();delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(a!==true&&c){b.afterEdit()}}},changedWhileEditing:function(){var c=this,b=c.dataSave,d=c[c.persistenceProperty],a;for(a in d){if(d.hasOwnProperty(a)){if(!c.isEqual(d[a],b[a])){return true}}}return false},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var b=this,a;b.dirty=true;b.fields.each(function(c){if(c.persist){a=c.name;b.modified[a]=b.get(a)}},b)},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!="function"){c[c.persistenceProperty][d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a){var b=this;b.phantom=b.dirty=b.editing=false;b.modified={};if(a!==true){b.afterCommit()}},copy:function(a){var b=this;return new b.self(Ext.apply({},b[b.persistenceProperty]),a||b.internalId)},setProxy:function(a){if(!a.isProxy){if(typeof a==="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this.self);this.proxy=a;return a},getProxy:function(){return this.proxy},validate:function(){var k=Ext.create("Ext.data.Errors"),c=this.validations,e=Ext.data.validations,b,d,j,a,h,g;if(c){b=c.length;for(g=0;g<b;g++){d=c[g];j=d.field||d.name;h=d.type;a=e[h](d,this.get(j));if(!a){k.add({field:j,message:d.message||e[h+"Message"]})}}}return k},isValid:function(){return this.validate().isValid()},save:function(c){c=Ext.apply({},c);var e=this,g=e.phantom?"create":"update",a=null,d=c.scope||e,b,h;Ext.apply(c,{records:[e],action:g});b=Ext.create("Ext.data.Operation",c);h=function(i){if(i.wasSuccessful()){a=i.getRecords()[0];e.set(a.data);a.dirty=false;Ext.callback(c.success,d,[a,i])}else{Ext.callback(c.failure,d,[a,i])}Ext.callback(c.callback,d,[a,i])};e.getProxy()[g](b,h,e);return e},destroy:function(c){c=Ext.apply({},c);var e=this,a=null,d=c.scope||e,b,g;Ext.apply(c,{records:[e],action:"destroy"});b=Ext.create("Ext.data.Operation",c);g=function(h){if(h.wasSuccessful()){Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};e.getProxy().destroy(b,g,e);return e},getId:function(){return this.get(this.idProperty)},setId:function(a){this.set(this.idProperty,a)},join:function(a){this.store=a},unjoin:function(a){delete this.store},afterEdit:function(){this.callStore("afterEdit")},afterReject:function(){this.callStore("afterReject")},afterCommit:function(){this.callStore("afterCommit")},callStore:function(b){var a=this.store;if(a!==undefined&&typeof a[b]=="function"){a[b](this)}},getAssociatedData:function(){return this.prepareAssociatedData(this,[],null)},prepareAssociatedData:function(r,b,q){var l=r.associations.items,n=l.length,g={},h,a,k,t,u,e,d,p,m,s,c;for(p=0;p<n;p++){e=l[p];s=e.type;c=true;if(q){c=s==q}if(c&&s=="hasMany"){h=r[e.storeName];g[e.name]=[];if(h&&h.data.length>0){k=h.data.items;u=k.length;for(m=0;m<u;m++){t=k[m];d=t.id;if(Ext.Array.indexOf(b,d)==-1){b.push(d);g[e.name][m]=t.data;Ext.apply(g[e.name][m],this.prepareAssociatedData(t,b,s))}}}}else{if(c&&s=="belongsTo"){t=r[e.instanceName];if(t!==undefined){d=t.id;if(Ext.Array.indexOf(b,d)==-1){b.push(d);g[e.name]=t.data;Ext.apply(g[e.name],this.prepareAssociatedData(t,b,s))}}}}}return g}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.MixedCollection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=["field1"],e=!Ext.isArray(c[0]),g=c,d,a;if(e){g=[];for(d=0,a=c.length;d<a;++d){g.push([c[d]])}}else{for(d=2,a=c[0].length;d<=a;++d){b.push("field"+d)}}return Ext.create("Ext.data.ArrayStore",{data:g,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{return Ext.data.AbstractStore.create(c)}},getKey:function(a){return a.storeId}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{b.storeId=c}if(b instanceof Ext.data.Store){a=b}else{a=Ext.create("Ext.data.Store",b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",hideParent:false,ariaRole:"presentation",bubbleEvents:[],actionMode:"el",monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);delete a.listeners}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var b=this,a=b.resizable;if(b.floating){b.makeFloating(b.floating)}else{b.el.setVisibilityMode(Ext.Element[b.hideMode.toUpperCase()])}if(Ext.isDefined(b.autoScroll)){b.setAutoScroll(b.autoScroll)}b.callParent();if(!(b.x&&b.y)&&(b.pageX||b.pageY)){b.setPagePosition(b.pageX,b.pageY)}if(a){b.initResizable(a)}if(b.draggable){b.initDraggable()}b.initAria()},initAria:function(){var a=this.getActionEl(),b=this.ariaRole;if(b){a.dom.setAttribute("role",b)}},setAutoScroll:function(a){var b=this,c;a=!!a;if(b.rendered){c=b.getTargetEl();c.setStyle("overflow",a?"auto":"");if(a&&(Ext.isIE6||Ext.isIE7)){c.position()}}b.autoScroll=a;return b},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():b.el.getScopeParent()),handles:b.resizeHandles},a);a.target=b;b.resizer=Ext.create("Ext.resizer.Resizer",a)},getDragEl:function(){return this.el},initDraggable:function(){var b=this,a=Ext.applyIf({el:b.getDragEl(),constrainTo:b.constrain?(b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():b.el.getScopeParent())):undefined},b.draggable);if(b.constrain||b.constrainDelegate){a.constrain=b.constrain;a.constrainDelegate=b.constrainDelegate}b.dd=Ext.create("Ext.util.ComponentDragger",b,a)},setPosition:function(k,i,a){var g=this,b=g.el,l={},h,j,e,d,c;if(Ext.isArray(k)){a=i;i=k[1];k=k[0]}g.x=k;g.y=i;if(!g.rendered){return g}h=g.adjustPosition(k,i);j=h.x;e=h.y;d=Ext.isNumber(j);c=Ext.isNumber(e);if(d||c){if(a){if(d){l.left=j}if(c){l.top=e}g.stopAnimation();g.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(g.afterSetPosition,g,[j,e])},to:l},a))}else{if(!d){b.setTop(e)}else{if(!c){b.setLeft(j)}else{b.setLeftTop(j,e)}}g.afterSetPosition(j,e)}}return g},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,d,b){var c=this;if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},setPagePosition:function(a,e,b){var c=this,d;if(Ext.isArray(a)){e=a[1];a=a[0]}c.pageX=a;c.pageY=e;if(c.floating&&c.floatParent){d=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(d.left)){a-=d.left}if(Ext.isNumber(e)&&Ext.isNumber(d.top)){e-=d.top}c.setPosition(a,e,b)}else{d=c.el.translatePoints(a,e);c.setPosition(d.left,d.top,b)}return c},getBox:function(b){var c=this.getPosition(b),a=this.getSize();a.x=c[0];a.y=c[1];return a},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustPosition:function(a,c){if(this.floating&&this.floatParent){var b=this.floatParent.getTargetEl().getViewRegion();a+=b.left;c+=b.top}return{x:a,y:c}},getPosition:function(a){var c=this,b=c.el,d,e;if((a===true)||(c.floating&&!c.floatParent)){return[b.getLeft(true),b.getTop(true)]}d=c.xy||b.getXY();if(c.floating){e=c.floatParent.getTargetEl().getViewRegion();d[0]-=e.left;d[1]-=e.top}return d},getId:function(){var a=this,b;if(!a.id){b=a.getXType();b=b?b.replace(Ext.Component.INVALID_ID_CHARS_Re,"-"):"ext-comp";a.id=b+"-"+a.getAutoId()}return a.id},onEnable:function(){var a=this.getActionEl();a.dom.removeAttribute("aria-disabled");a.dom.disabled=false;this.callParent()},onDisable:function(){var a=this.getActionEl();a.dom.setAttribute("aria-disabled",true);a.dom.disabled=true;this.callParent()},show:function(d,a,b){var c=this;if(c.rendered&&c.isVisible()){if(c.toFrontOnShow&&c.floating){c.toFront()}}else{if(c.fireEvent("beforeshow",c)!==false){c.hidden=false;if(!c.rendered&&(c.autoRender||c.floating)){c.doAutoRender()}if(c.rendered){c.beforeShow();c.onShow.apply(c,arguments);if(c.ownerCt&&!c.floating&&!(c.ownerCt.suspendLayout||c.ownerCt.layout.layoutBusy)){c.ownerCt.doLayout()}c.afterShow.apply(c,arguments)}}}return c},beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating&&a.constrain){a.doConstrain()}},afterShow:function(h,b,e){var g=this,a,c,d;h=h||g.animateTarget;if(!g.ghost){h=null}if(h){h=h.el?h.el:Ext.get(h);c=g.el.getBox();a=h.getBox();g.el.addCls(Ext.baseCSSPrefix+"hide-offsets");d=g.ghost();d.el.stopAnimation();d.el.setX(-10000);d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;g.unghost();g.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");g.onShowComplete(b,e)}}})}else{g.onShowComplete(b,e)}},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront()}Ext.callback(a,b||c);c.fireEvent("show",c)},hide:function(){var a=this;a.showOnParentShow=false;if(!(a.rendered&&!a.isVisible())&&a.fireEvent("beforehide",a)!==false){a.hidden=true;if(a.rendered){a.onHide.apply(a,arguments);if(a.ownerCt&&!a.floating&&!(a.ownerCt.suspendLayout||a.ownerCt.layout.layoutBusy)){a.ownerCt.doLayout()}}}return a},onHide:function(g,a,d){var e=this,c,b;g=g||e.animateTarget;if(!e.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=e.ghost();c.el.stopAnimation();b=g.getBox();b.width+="px";b.height+="px";c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!g){e.afterHide(a,d)}},afterHide:function(a,b){Ext.callback(a,b||this);this.fireEvent("hide",this)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.proxyWrap,a.resizer);if(a.actionMode=="container"||a.removeMode=="container"){a.container.remove()}}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c<a;++c){delete this[b[c]]}},focus:function(d,b){var c=this,a;if(b){if(!c.focusTask){c.focusTask=Ext.create("Ext.util.DelayedTask",c.focus)}c.focusTask.delay(Ext.isNumber(b)?b:10,null,c,[d,false]);return c}if(c.rendered&&!c.isDestroyed){a=c.getFocusEl();a.focus();if(a.dom&&d===true){a.dom.select()}if(c.floating){c.toFront(true)}}return c},getFocusEl:function(){return this.el},blur:function(){if(this.rendered){this.getFocusEl().blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt},getContentTarget:function(){return this.el},cloneConfig:function(c){c=c||{};var d=c.id||Ext.id(),a=Ext.applyIf(c,this.initialConfig),b;a.id=d;b=Ext.getClass(this);return new b(a)},getXType:function(){return this.self.xtype},findParentBy:function(a){var b;for(b=this.ownerCt;b&&!a(b,this);b=b.ownerCt){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.up(a)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.ownerCt}return this},getProxy:function(){var a=this,b;if(!a.proxy){b=Ext.getBody();if(Ext.scopeResetCSS){a.proxyWrap=b=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"reset"})}a.proxy=a.el.createProxy(Ext.baseCSSPrefix+"proxy-el",b,true)}return a.proxy}});Ext.define("Ext.layout.container.AbstractContainer",{extend:"Ext.layout.Layout",type:"container",bindToOwnerCtComponent:false,bindToOwnerCtContainer:false,setItemSize:function(c,b,a){if(Ext.isObject(b)){a=b.height;b=b.width}c.setCalculatedSize(b,a,this.owner)},getLayoutItems:function(){return this.owner&&this.owner.items&&this.owner.items.items||[]},beforeLayout:function(){return !this.owner.collapsed&&this.callParent(arguments)},afterLayout:function(){this.owner.afterLayout(this)},getTarget:function(){return this.owner.getTargetEl()},getRenderTarget:function(){return this.owner.getTargetEl()}});Ext.define("Ext.layout.container.Container",{extend:"Ext.layout.container.AbstractContainer",alternateClassName:"Ext.layout.ContainerLayout",layoutItem:function(b,a){if(a){b.doComponentLayout(a.width,a.height)}else{b.doComponentLayout()}},getLayoutTargetSize:function(){var b=this.getTarget(),a;if(b){a=b.getViewSize();if(Ext.isIE&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},beforeLayout:function(){if(this.owner.beforeLayout(arguments)!==false){return this.callParent(arguments)}else{return false}},getRenderedItems:function(){var e=this,h=e.getTarget(),a=e.getLayoutItems(),d=a.length,g=[],b,c;for(b=0;b<d;b++){c=a[b];if(c.rendered&&e.isValidParent(c,h,b)){g.push(c)}}return g},getVisibleItems:function(){var g=this.getTarget(),b=this.getLayoutItems(),e=b.length,a=[],c,d;for(c=0;c<e;c++){d=b[c];if(d.rendered&&this.isValidParent(d,g,c)&&d.hidden!==true){a.push(d)}}return a}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:"Ext.layout.container.Container",type:"autocontainer",bindToOwnerCtComponent:true,onLayout:function(a,g){var e=this,b=e.getLayoutItems(),d=b.length,c;if(d){if(!e.clearEl){e.clearEl=e.getRenderTarget().createChild({cls:Ext.baseCSSPrefix+"clear",role:"presentation"})}for(c=0;c<d;c++){e.setItemSize(b[c])}}},configureItem:function(a){this.callParent(arguments);a.layoutManagedHeight=2;a.layoutManagedWidth=2}});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],suspendLayout:false,autoDestroy:true,defaultType:"panel",isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove");a.layoutOnShow=Ext.create("Ext.util.MixedCollection");a.callParent();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=Ext.create("Ext.util.MixedCollection",false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},afterRender:function(){this.getLayout();this.callParent()},renderChildren:function(){var b=this,a=b.getLayout();b.callParent();if(a){b.suspendLayout=true;a.renderChildren();delete b.suspendLayout}},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,"autocontainer"))}return a.layout},doLayout:function(){var b=this,a=b.getLayout();if(b.rendered&&a&&!b.suspendLayout){if(!b.isFixedWidth()||!b.isFixedHeight()){if(b.componentLayout.layoutBusy!==true){b.doComponentLayout();if(b.componentLayout.layoutCancelled===true){a.layout()}}}else{if(a.layoutBusy!==true){a.layout()}}}return b},afterLayout:function(a){++this.layoutCounter;this.fireEvent("afterlayout",this,a)},prepareItems:function(b,d){if(!Ext.isArray(b)){b=[b]}var c=0,a=b.length,e;for(;c<a;c++){e=b[c];if(d){e=this.applyDefaults(e)}b[c]=this.lookupComponent(e)}return b},applyDefaults:function(a){var b=this.defaults;if(b){if(Ext.isFunction(b)){b=b.call(this,a)}if(Ext.isString(a)){a=Ext.ComponentManager.get(a)}Ext.applyIf(a,b)}return a},lookupComponent:function(a){return Ext.isString(a)?Ext.ComponentManager.get(a):this.createComponent(a)},createComponent:function(a,b){return Ext.ComponentManager.create(a,b||this.defaultType)},getComponentId:function(a){return a.getItemId()},add:function(){var j=this,g=Array.prototype.slice.call(arguments),a,h,b=[],c,e,l,d=-1,k;if(typeof g[0]=="number"){d=g.shift()}a=g.length>1;if(a||Ext.isArray(g[0])){h=a?g:g[0];j.suspendLayout=true;for(c=0,e=h.length;c<e;c++){l=h[c];if(d!=-1){l=j.add(d+c,l)}else{l=j.add(l)}b.push(l)}j.suspendLayout=false;j.doLayout();return b}k=j.prepareItems(g[0],true)[0];if(k.floating){k.onAdded(j,d)}else{d=(d!==-1)?d:j.items.length;if(j.fireEvent("beforeadd",j,k,d)!==false&&j.onBeforeAdd(k)!==false){j.items.insert(d,k);k.onAdded(j,d);j.onAdd(k,d);j.fireEvent("add",j,k,d)}j.doLayout()}return k},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(b,a){return this.add(b,a)},move:function(b,d){var a=this.items,c;c=a.removeAt(b);if(c===false){return false}a.insert(d,c);this.doLayout();return c},onBeforeAdd:function(b){var a=this;if(b.ownerCt){b.ownerCt.remove(b,false)}if(a.border===false||a.border===0){b.border=(b.border===true)}},remove:function(a,b){var d=this,e=d.getComponent(a);if(e&&d.fireEvent("beforeremove",d,e)!==false){d.doRemove(e,b);d.fireEvent("remove",d,e)}return e},doRemove:function(c,b){var e=this,d=e.layout,a=d&&e.rendered;e.items.remove(c);c.onRemoved();if(a){d.onRemove(c)}e.onRemove(c,b);if(b===true||(b!==false&&e.autoDestroy)){c.destroy()}if(a&&!b){d.afterRemove(c)}if(!e.destroying){e.doLayout()}},removeAll:function(c){var h=this,e=h.items.items.slice(),b=[],d=0,a=e.length,g;h.suspendLayout=true;for(;d<a;d++){g=e[d];h.remove(g,c);if(g.ownerCt!==h){b.push(g)}}h.suspendLayout=false;if(a){h.doLayout()}return b},getRefItems:function(c){var h=this,d=h.items.items,b=d.length,e=0,g,a=[];for(;e<b;e++){g=d[e];a.push(g);if(c&&g.getRefItems){a.push.apply(a,g.getRefItems(true))}}if(h.floatingItems&&h.floatingItems.accessList){a.push.apply(a,h.floatingItems.accessList)}return a},cascade:function(l,m,a){var k=this,e=k.items?k.items.items:[],g=e.length,d=0,j,h=a?a.concat(k):[k],b=h.length-1;if(l.apply(m||k,h)!==false){for(;d<g;d++){j=e[d];if(j.cascade){j.cascade(l,m,a)}else{h[b]=j;l.apply(m||e,h)}}}return this},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.items.get(a)},query:function(a){a=a||"*";return Ext.ComponentQuery.query(a,this)},child:function(a){a=a||"";return this.query("> "+a)[0]||null},down:function(a){return this.query(a)[0]||null},show:function(){this.callParent(arguments);this.performDeferredLayouts();return this},performDeferredLayouts:function(){var e=this.layoutOnShow,d=e.getCount(),b=0,a,c;for(;b<d;b++){c=e.get(b);a=c.needsLayout;if(Ext.isObject(a)){c.doComponentLayout(a.width,a.height,a.isSetSize,a.ownerCt)}}e.clear()},onEnable:function(){Ext.Array.each(this.query("[isFormField]"),function(a){if(a.resetDisable){a.enable();delete a.resetDisable}});this.callParent()},onDisable:function(){Ext.Array.each(this.query("[isFormField]"),function(a){if(a.resetDisable!==false&&!a.disabled){a.disable();a.resetDisable=true}});this.callParent()},beforeLayout:function(){return true},beforeDestroy:function(){var b=this,a=b.items,d;if(a){while((d=a.first())){b.doRemove(d,true)}}Ext.destroy(b.layout);b.callParent()}});Ext.define("Ext.container.Container",{extend:"Ext.container.AbstractContainer",alias:"widget.container",alternateClassName:"Ext.Container",getChildByElement:function(d){var g,b,a=0,c=this.items.items,e=c.length;d=Ext.getDom(d);for(;a<e;a++){g=c[a];b=g.getEl();if((b.dom===d)||b.contains(d)){return g}}return null}});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.toolbar.Item",{extend:"Ext.Component",alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=Ext.create("Ext.util.MixedCollection");Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var a=this.active,b;if(a&&a.length>0){b=a.clone();b.each(function(c){c.hide()});return true}return false},onHide:function(a){var b=this,c=b.active;c.remove(a);if(c.length<1){Ext.getDoc().un("mousedown",b.onMouseDown,b);b.attached=false}},onShow:function(a){var e=this,g=e.active,d=g.last(),c=e.attached,b=a.getEl(),h;e.lastShow=new Date();g.add(a);if(!c){Ext.getDoc().on("mousedown",e.onMouseDown,e);e.attached=true}a.toFront()},onBeforeHide:function(a){if(a.activeChild){a.activeChild.hide()}if(a.autoHideTimer){clearTimeout(a.autoHideTimer);delete a.autoHideTimer}},onBeforeShow:function(a){var c=this.active,b=a.parentMenu;c.remove(a);if(!b&&!a.allowOtherMenus){this.hideAll()}else{if(b&&b.activeChild&&a!=b.activeChild){b.activeChild.hide()}}},onMouseDown:function(g){var b=this,d=b.active,a=b.lastShow,c=g.target;if(Ext.Date.getElapsed(a)>50&&d.length>0&&!g.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll();if(Ext.isIE&&Ext.fly(c).focusable()){c.focus()}}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return Ext.create("Ext.menu.Menu",{items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,g){var a=this.groups,c=d.group,b=0,j,e,h;if(c&&g){j=a[c];e=j.length;for(;b<e;b++){h=j[b];if(h!=d){h.setChecked(false)}}}}});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:"Ext.layout.component.Component",type:"button",cellClsRE:/-btn-(tl|br)\b/,htmlRE:/<.*>/,beforeLayout:function(){return this.callParent(arguments)||this.lastText!==this.owner.text},onLayout:function(c,p){var l=this,h=Ext.isNumber,d=l.owner,n=d.el,i=d.btnEl,e=d.btnInnerEl,g=d.btnIconEl,j=(d.icon||d.iconCls)&&(d.iconAlign=="top"||d.iconAlign=="bottom"),b=d.minWidth,m=d.maxWidth,a,q,k;l.getTargetInfo();l.callParent(arguments);e.unclip();l.setTargetSize(c,p);if(!h(c)){if(d.text&&(Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&i&&i.getWidth()>20){q=l.btnFrameWidth;k=Ext.util.TextMetrics.measure(e,d.text);n.setWidth(k.width+q+l.adjWidth);i.setWidth(k.width+q);e.setWidth(k.width+q);if(j){g.setWidth(k.width+q)}}else{n.setWidth(null);i.setWidth(null);e.setWidth(null);g.setWidth(null)}if(b||m){a=n.getWidth();if(b&&(a<b)){l.setTargetSize(b,p)}else{if(m&&(a>m)){e.clip();l.setTargetSize(m,p)}}}}this.lastText=d.text},setTargetSize:function(a,l){var h=this,b=h.owner,e=Ext.isNumber,d=b.btnInnerEl,j=(e(a)?a-h.adjWidth:a),g=(e(l)?l-h.adjHeight:l),c=h.btnFrameHeight,k=b.getText(),i;h.callParent(arguments);h.setElementSize(b.btnEl,j,g);h.setElementSize(d,j,g);if(g>=0){d.setStyle("line-height",g-c+"px")}if(k&&this.htmlRE.test(k)){d.setStyle("line-height","normal");i=Ext.util.TextMetrics.measure(d,k).height;d.setStyle("padding-top",h.btnFrameTop+Math.max(d.getHeight()-c-i,0)/2+"px");h.setElementSize(d,j,g)}},getTargetInfo:function(){var e=this,a=e.owner,d=a.el,c=e.frameSize,h=a.frameBody,b=a.btnWrap,g=a.btnInnerEl;if(!("adjWidth" in e)){Ext.apply(e,{adjWidth:c.left+c.right+d.getBorderWidth("lr")+d.getPadding("lr")+b.getPadding("lr")+(h?h.getFrameWidth("lr"):0),adjHeight:c.top+c.bottom+d.getBorderWidth("tb")+d.getPadding("tb")+b.getPadding("tb")+(h?h.getFrameWidth("tb"):0),btnFrameWidth:g.getFrameWidth("lr"),btnFrameHeight:g.getFrameWidth("tb"),btnFrameTop:g.getFrameWidth("t")})}return e.callParent()}});Ext.define("Ext.button.Button",{alias:"widget.button",extend:"Ext.Component",requires:["Ext.menu.Manager","Ext.util.ClickRepeater","Ext.layout.component.Button","Ext.util.TextMetrics","Ext.util.KeyMap"],alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",ariaRole:"button",renderTpl:'<em id="{id}-btnWrap" class="{splitCls}"><tpl if="href"><a id="{id}-btnEl" href="{href}" target="{target}"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="link"><span id="{id}-btnInnerEl" class="{baseCls}-inner">{text}</span><span id="{id}-btnIconEl" class="{baseCls}-icon"></span></a></tpl><tpl if="!href"><button id="{id}-btnEl" type="{type}" hidefocus="true"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="button" autocomplete="off"><span id="{id}-btnInnerEl" class="{baseCls}-inner" style="{innerSpanStyle}">{text}</span><span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}">&#160;</span></button></tpl></em>',scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerCt=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)){a.enableToggle=true}},initAria:function(){this.callParent();var a=this.getActionEl();if(this.menu){a.dom.setAttribute("aria-haspopup",true)}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.btnEl},setButtonCls:function(){var d=this,b=[],a=d.btnIconEl,c="x-hide-display";if(d.useSetClass){if(!Ext.isEmpty(d.oldCls)){d.removeClsWithUI(d.oldCls);d.removeClsWithUI(d.pressedCls)}if(d.iconCls||d.icon){if(d.text){b.push("icon-text-"+d.iconAlign)}else{b.push("icon")}if(a){a.removeCls(c)}}else{if(d.text){b.push("noicon")}if(a){a.addCls(c)}}d.oldCls=b;d.addClsWithUI(b);d.addClsWithUI(d.pressed?d.pressedCls:null)}},onRender:function(d,a){var e=this,c,b;Ext.applyIf(e.renderData,e.getTemplateArgs());e.addChildEls("btnEl","btnWrap","btnInnerEl","btnIconEl");if(e.scale){e.ui=e.ui+"-"+e.scale}e.callParent(arguments);if(e.split&&e.arrowTooltip){e.arrowEl.dom.setAttribute(e.getTipAttr(),e.arrowTooltip)}e.mon(e.btnEl,{scope:e,focus:e.onFocus,blur:e.onBlur});b=e.el;if(e.icon){e.setIcon(e.icon)}if(e.iconCls){e.setIconCls(e.iconCls)}if(e.tooltip){e.setTooltip(e.tooltip,true)}if(e.textAlign){e.setTextAlign(e.textAlign)}if(e.handleMouseEvents){e.mon(b,{scope:e,mouseover:e.onMouseOver,mouseout:e.onMouseOut,mousedown:e.onMouseDown});if(e.split){e.mon(b,{mousemove:e.onMouseMove,scope:e})}}if(e.menu){e.mon(e.menu,{scope:e,show:e.onMenuShow,hide:e.onMenuHide});e.keyMap=Ext.create("Ext.util.KeyMap",e.el,{key:Ext.EventObject.DOWN,handler:e.onDownKey,scope:e})}if(e.repeat){c=Ext.create("Ext.util.ClickRepeater",b,Ext.isObject(e.repeat)?e.repeat:{});e.mon(c,"click",e.onRepeatClick,e)}else{e.mon(b,e.clickEvent,e.onClick,e)}Ext.ButtonToggleManager.register(e)},getTemplateArgs:function(){var c=this,b=c.getPersistentBtnPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),target:c.target||"_blank",type:c.type,splitCls:c.getSplitCls(),cls:c.cls,iconCls:c.iconCls||"",text:c.text||"&#160;",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},afterRender:function(){var a=this;a.useSetClass=true;a.setButtonCls();a.doc=Ext.getDoc();this.callParent(arguments)},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||"");d.setButtonCls()}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-"+b.textAlign);a.addCls(b.baseCls+"-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.el){a.btnInnerEl.update(b||"&#160;");a.setButtonCls()}a.doComponentLayout();return a},setIcon:function(b){var c=this,a=c.btnIconEl;c.icon=b;if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setButtonCls()}return c},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.btnEl.dom.setAttribute("aria-pressed",c);b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;b.fireEvent("click",b,c);if(a){a.call(b.scope||b,b,c)}b.onBlur()},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(h){var d=this,c=d.el,g=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=h.getX()-c.getX();a=c.getWidth()}else{b=h.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!g){d.onMenuTriggerOver(h)}}else{if(g){d.onMenuTriggerOut(h)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+(e.frameSize&&e.frameSize[b]||0)}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent("mouseover",a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent("mouseout",a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent("menutriggerover",a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI("disabled");b.removeClsWithUI(b.overCls);return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onFocus:function(b){var a=this;if(!a.disabled){a.addClsWithUI(a.focusCls)}},onBlur:function(b){var a=this;a.removeClsWithUI(a.focusCls)},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentBtnPadding:function(){var a=Ext.button.Button,e=a.persistentPadding,c,b,d,g;if(!e){e=a.persistentPadding=[0,0,0,0];if(!Ext.isIE){c=Ext.create("Ext.button.Button",{renderTo:Ext.getBody(),text:"test",style:"position:absolute;top:-999px;"});d=c.btnEl;g=c.btnInnerEl;d.setSize(null,null);b=g.getOffsetsTo(d);e[0]=b[1];e[1]=d.getWidth()-g.getWidth()-b[0];e[2]=d.getHeight()-g.getHeight()-b[1];e[3]=b[0];c.destroy()}}return e}},function(){var a={};function b(e,j){var h,d,c;if(j){h=a[e.toggleGroup];for(d=0,c=h.length;d<c;d++){if(h[d]!==e){h[d].toggle(false)}}}}Ext.ButtonToggleManager={register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){Ext.Array.remove(d,c);c.un("toggle",b)}},getPressed:function(h){var e=a[h],d=0,c;if(e){for(c=e.length;d<c;d++){if(e[d].pressed===true){return e[d]}}}return null}}});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.toolbar.Separator","Ext.button.Button"],alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(b){var a=this;a.callParent(arguments);b.beforeLayout=Ext.Function.createInterceptor(b.beforeLayout,this.clearOverflow,this);a.afterCtCls=a.afterCtCls||Ext.baseCSSPrefix+"box-menu-"+b.parallelAfter;a.menuItems=[]},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},handleOverflow:function(a,h){var g=this,e=g.layout,c="get"+e.parallelPrefixCap,b={},d=[null,null];g.callParent(arguments);this.createMenu(a,h);b[e.perpendicularPrefix]=h[e.perpendicularPrefix];b[e.parallelPrefix]=h[e.parallelPrefix]-g.afterCt[c]();d[e.perpendicularSizeIndex]=(a.meta.maxSize-g.menuTrigger["get"+e.perpendicularPrefixCap]())/2;g.menuTrigger.setPosition.apply(g.menuTrigger,d);return{targetSize:b}},clearOverflow:function(a,j){var h=this,g=j?j.width+(h.afterCt?h.afterCt.getWidth():0):0,b=h.menuItems,c=0,e=b.length,d;h.hideTrigger();for(;c<e;c++){b[c].show()}b.length=0;return j?{targetSize:{height:j.height,width:g}}:null},showTrigger:function(){this.menuTrigger.show()},hideTrigger:function(){if(this.menuTrigger!==undefined){this.menuTrigger.hide()}},beforeMenuShow:function(j){var h=this,b=h.menuItems,d=0,a=b.length,g,e;var c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.toolbar.Separator)};h.clearMenu();j.removeAll();for(;d<a;d++){g=b[d];if(!d&&(g instanceof Ext.toolbar.Separator)){continue}if(e&&(c(g,e)||c(e,g))){j.add("-")}h.addComponentToMenu(j,g);e=g}if(j.items.length<1){j.add(h.noItemsMenuText)}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a,destroyMenu:false});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(c,a){var b=this;if(a instanceof Ext.toolbar.Separator){c.add("-")}else{if(a.isComponent){if(a.isXType("splitbutton")){c.add(b.createMenuConfig(a,true))}else{if(a.isXType("button")){c.add(b.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(d){b.addComponentToMenu(c,d)})}else{c.add(Ext.create(Ext.getClassName(a),b.createMenuConfig(a)))}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){if(b.menu){delete b.menu}})}},createMenu:function(a,c){var l=this,j=l.layout,m=j.parallelBefore,e=j.parallelPrefix,b=c[e],h=a.boxes,d=0,k=h.length,g;if(!l.menuTrigger){l.createInnerElements();l.menu=Ext.create("Ext.menu.Menu",{listeners:{scope:l,beforeshow:l.beforeMenuShow}});l.menuTrigger=Ext.create("Ext.button.Button",{ownerCt:l.layout.owner,iconCls:l.layout.owner.menuTriggerCls,ui:j.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:l.menu,getSplitCls:function(){return""},renderTo:l.afterCt})}l.showTrigger();b-=l.afterCt.getWidth();l.menuItems.length=0;for(;d<k;d++){g=h[d];if(g[m]+g[e]>b){l.menuItems.push(g.component);g.component.hide()}}},createInnerElements:function(){var a=this,b=a.layout.getRenderTarget();if(!this.afterCt){b.addCls(Ext.baseCSSPrefix+a.layout.direction+"-box-overflow-body");this.afterCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+" "+this.afterCtCls},"before")}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}});Ext.define("Ext.util.Region",{requires:["Ext.util.Offset"],statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,g,a,c){var e=this;e.y=e.top=e[1]=d;e.right=g;e.bottom=a;e.x=e.left=e[0]=c},contains:function(b){var a=this;return(b.x>=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(h){var g=this,d=Math.max(g.y,h.y),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.x,h.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(h){var g=this,d=Math.min(g.y,h.y),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.x,h.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,g,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=g;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=Ext.create("Ext.util.Offset");c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.x){return this.x-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.y){return this.y-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(a<this.x||a>this.right)},isOutOfBoundY:function(a){return(a<this.y||a>this.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.x){b-=(b-this.x)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.y){b-=(b-this.y)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(c,b){for(var d in this.ids){for(var a in this.ids[d]){var e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(a){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&&b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&&this.ids[a]&&this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(g,b){var e=[];for(var d in g.groups){for(var c in this.ids[d]){var a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true);for(var c=0,a=b.length;c<a;++c){if(b[c].id==d.id){return true}}return false},isTypeOfDD:function(a){return(a&&a.__ygDragDrop)},isHandle:function(b,a){return(this.handleIds[b]&&this.handleIds[b][a])},getDDById:function(b){for(var a in this.ids){if(this.ids[a][b]){return this.ids[a][b]}}return null},handleMouseDown:function(c,b){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(c)}this.currentTarget=c.getTarget();this.dragCurrent=b;var a=b.getEl();this.startX=c.getPageX();this.startY=c.getPageY();this.deltaX=this.startX-a.offsetLeft;this.deltaY=this.startY-a.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var d=Ext.dd.DragDropManager;d.startDrag(d.startX,d.startY)},this.clickTimeThresh)},startDrag:function(a,b){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(a,b);this.dragCurrent.startDrag(a,b)}this.dragThreshMet=true},handleMouseUp:function(a){if(Ext.tip&&Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(a,true)}else{}this.stopDrag(a);this.stopEvent(a)},stopEvent:function(a){if(this.stopPropagation){a.stopPropagation()}if(this.preventDefault){a.preventDefault()}},stopDrag:function(a){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(a);this.dragCurrent.endDrag(a)}this.dragCurrent.onMouseUp(a)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(c){if(!this.dragCurrent){return true}if(Ext.isIE&&(c.button!==0&&c.button!==1&&c.button!==2)){this.stopEvent(c);return this.handleMouseUp(c)}if(!this.dragThreshMet){var b=Math.abs(this.startX-c.getPageX());var a=Math.abs(this.startY-c.getPageY());if(b>this.clickPixelThresh||a>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(c);this.dragCurrent.onDrag(c);if(!this.dragCurrent.moveOnly){this.fireEvents(c,false)}}this.stopEvent(c);return true},fireEvents:function(m,n){var q=this.dragCurrent;if(!q||q.isLocked()){return}var r=m.getPoint();var a=[];var d=[];var k=[];var h=[];var c=[];for(var g in this.dragOvers){var b=this.dragOvers[g];if(!this.isTypeOfDD(b)){continue}if(!this.isOverTarget(r,b,this.mode)){d.push(b)}a[g]=true;delete this.dragOvers[g]}for(var p in q.groups){if("string"!=typeof p){continue}for(g in this.ids[p]){var j=this.ids[p][g];if(!this.isTypeOfDD(j)){continue}if(j.isTarget&&!j.isLocked()&&((j!=q)||(q.ignoreSelf===false))){if(this.isOverTarget(r,j,this.mode)){if(n){h.push(j)}else{if(!a[j.id]){c.push(j)}else{k.push(j)}this.dragOvers[j.id]=j}}}}}if(this.mode){if(d.length){q.b4DragOut(m,d);q.onDragOut(m,d)}if(c.length){q.onDragEnter(m,c)}if(k.length){q.b4DragOver(m,k);q.onDragOver(m,k)}if(h.length){q.b4DragDrop(m,h);q.onDragDrop(m,h)}}else{var l=0;for(g=0,l=d.length;g<l;++g){q.b4DragOut(m,d[g].id);q.onDragOut(m,d[g].id)}for(g=0,l=c.length;g<l;++g){q.onDragEnter(m,c[g].id)}for(g=0,l=k.length;g<l;++g){q.b4DragOver(m,k[g].id);q.onDragOver(m,k[g].id)}for(g=0,l=h.length;g<l;++g){q.b4DragDrop(m,h[g].id);q.onDragDrop(m,h[g].id)}}if(n&&!h.length){q.onInvalidDrop(m)}},getBestMatch:function(c){var e=null;var b=c.length;if(b==1){e=c[0]}else{for(var d=0;d<b;++d){var a=c[d];if(a.cursorIsOver){e=a;break}else{if(!e||e.overlap.getArea()<a.overlap.getArea()){e=a}}}}return e},refreshCache:function(b){for(var a in b){if("string"!=typeof a){continue}for(var c in this.ids[a]){var d=this.ids[a][c];if(this.isTypeOfDD(d)){var e=this.getLocation(d);if(e){this.locationCache[d.id]=e}else{delete this.locationCache[d.id]}}}}},verifyEl:function(b){if(b){var a;if(Ext.isIE){try{a=b.offsetParent}catch(c){}}else{a=b.offsetParent}if(a){return true}}return false},getLocation:function(i){if(!this.isTypeOfDD(i)){return null}if(i.getRegion){return i.getRegion()}var g=i.getEl(),m,d,c,p,n,q,a,k,h;try{m=Ext.Element.getXY(g)}catch(j){}if(!m){return null}d=m[0];c=d+g.offsetWidth;p=m[1];n=p+g.offsetHeight;q=p-i.padding[0];a=c+i.padding[1];k=n+i.padding[2];h=d-i.padding[3];return Ext.create("Ext.util.Region",q,a,k,h)},isOverTarget:function(j,a,c){var e=this.locationCache[a.id];if(!e||!this.useCache){e=this.getLocation(a);this.locationCache[a.id]=e}if(!e){return false}a.cursorIsOver=e.contains(j);var i=this.dragCurrent;if(!i||!i.getTargetCoord||(!c&&!i.constrainX&&!i.constrainY)){return a.cursorIsOver}a.overlap=null;var g=i.getTargetCoord(j.x,j.y);var b=i.getDragEl();var d=Ext.create("Ext.util.Region",g.y,g.x+b.offsetWidth,g.y+b.offsetHeight,g.x);var h=d.intersect(e);if(h){a.overlap=h;return(c)?true:a.cursorIsOver}else{return false}},_onUnload:function(b,a){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var a in this.elementCache){delete this.elementCache[a]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(b){var a=this.elementCache[b];if(!a||!a.el){a=this.elementCache[b]=new this.ElementWrapper(Ext.getDom(b))}return a},getElement:function(a){return Ext.getDom(a)},getCss:function(b){var a=Ext.getDom(b);return(a)?a.style:null},ElementWrapper:function(a){this.el=a||null;this.id=this.el&&a.id;this.css=this.el&&a.style},getPosX:function(a){return Ext.Element.getX(a)},getPosY:function(a){return Ext.Element.getY(a)},swapNode:function(c,a){if(c.swapNode){c.swapNode(a)}else{var d=a.parentNode;var b=a.nextSibling;if(b==c){d.insertBefore(c,a)}else{if(a==c.nextSibling){d.insertBefore(a,c)}else{c.parentNode.replaceChild(a,c);d.insertBefore(c,b)}}}},getScroll:function(){var d=window.document,e=d.documentElement,a=d.body,c=0,b=0;if(Ext.isGecko4){c=window.scrollYOffset;b=window.scrollXOffset}else{if(e&&(e.scrollTop||e.scrollLeft)){c=e.scrollTop;b=e.scrollLeft}else{if(a){c=a.scrollTop;b=a.scrollLeft}}}return{top:c,left:b}},getStyle:function(b,a){return Ext.fly(b).getStyle(a)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(a,c){var b=Ext.Element.getXY(c);Ext.Element.setXY(a,b)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount>2000){}else{setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(a,c){if(this.isHandle(c,a.id)){return true}else{var b=a.parentNode;while(b){if(this.isHandle(c,b.id)){return true}else{b=b.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:"0",pack:"start",type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",innerCls:Ext.baseCSSPrefix+"box-inner",bindToOwnerCtContainer:true,availableSpaceOffset:0,reserveOffset:true,shrinkToFit:true,clearInnerCtOnLayout:false,flexSortFn:function(d,c){var e="max"+this.parallelPrefixCap,g=Infinity;d=d.component[e]||g;c=c.component[e]||g;if(!isFinite(d)&&!isFinite(c)){return false}return d-c},minSizeSortFn:function(d,c){return c.available-d.available},constructor:function(a){var b=this;b.callParent(arguments);b.flexSortFn=Ext.Function.bind(b.flexSortFn,b);b.initOverflowHandler()},getChildBox:function(b){b=b.el||this.owner.getComponent(b).el;var a=b.getBox(false,true);return{left:a.left,top:a.top,width:a.width,height:a.height}},calculateChildBox:function(e){var d=this,b=d.calculateChildBoxes(d.getVisibleItems(),d.getLayoutTargetSize()).boxes,c=b.length,a=0;e=d.owner.getComponent(e);for(;a<c;a++){if(b[a].component===e){return b[a]}}},calculateChildBoxes:function(r,b){var z=this,L=Math,m=L.max,q=Infinity,x,u=z.parallelPrefix,p=z.parallelPrefixCap,O=z.perpendicularPrefix,v=z.perpendicularPrefixCap,E="min"+p,H="min"+v,am="max"+v,c=b[u]-z.scrollOffset,ab=b[O],ag=z.padding,t=ag[z.parallelBefore],w=t+ag[z.parallelAfter],R=ag[z.perpendicularLeftTop],M=R+ag[z.perpendicularRightBottom],aj=m(0,ab-M),al=z.innerCt.getBorderWidth(z.perpendicularLT+z.perpendicularRB),ad=z.pack=="start",ap=z.pack=="center",G=z.pack=="end",af=Ext.Number.constrain,P=r.length,d=0,ak=0,an=0,y=0,I=0,S=[],N=[],ai,ah,j,ac,C,D,ao,aa,Y,Z,n,e,B,K,A,Q,k,T,ae,g,F,V,a,s,l,J,U,X,h,W;for(ah=0;ah<P;ah++){j=r[ah];C=j[O];if(!j.flex||!(z.align=="stretch"||z.align=="stretchmax")){if(j.componentLayout.initialized!==true){z.layoutItem(j)}}D=j.margins;J=D[z.parallelBefore]+D[z.parallelAfter];Y={component:j,margins:D};if(j.flex){ak+=j.flex;ac=x}else{if(!(j[u]&&C)){ao=j.getSize()}ac=j[u]||ao[u];C=C||ao[O]}d+=J+(ac||0);an+=J+(j.flex?j[E]||0:ac);y+=J+(j[E]||ac||0);if(typeof C!="number"){C=j["get"+v]()}I=m(I,m(C,j[H]||0)+D[z.perpendicularLeftTop]+D[z.perpendicularRightBottom]);Y[u]=ac||x;Y.dirtySize=j.componentLayout.lastComponentSize?(Y[u]!==j.componentLayout.lastComponentSize[u]):false;Y[O]=C||x;S.push(Y)}if(!z.autoSize){Z=an-c;n=y>c}e=m(0,c-d-w-(z.reserveOffset?z.availableSpaceOffset:0));if(n){for(ah=0;ah<P;ah++){k=S[ah];B=r[ah][E]||r[ah][u]||k[u];k.dirtySize=k.dirtySize||k[u]!=B;k[u]=B}}else{if(Z>0){for(ah=0;ah<P;ah++){K=r[ah];B=K[E]||0;if(K.flex){k=S[ah];k.dirtySize=k.dirtySize||k[u]!=B;k[u]=B}else{if(z.shrinkToFit){N.push({minSize:B,available:S[ah][u]-B,index:ah})}}}Ext.Array.sort(N,z.minSizeSortFn);for(ah=0,A=N.length;ah<A;ah++){Q=N[ah].index;if(Q==x){continue}K=r[Q];B=N[ah].minSize;k=S[Q];T=k[u];ae=m(B,T-L.ceil(Z/(A-ah)));g=T-ae;k.dirtySize=k.dirtySize||k[u]!=ae;k[u]=ae;Z-=g}n=(Z>0)}else{a=e;s=ak;V=[];for(ah=0;ah<P;ah++){j=r[ah];if(ad&&j.flex){V.push(S[Ext.Array.indexOf(r,j)])}}Ext.Array.sort(V,z.flexSortFn);for(ah=0;ah<V.length;ah++){U=V[ah];j=U.component;D=U.margins;l=L.ceil((j.flex/s)*a);l=Math.max(j["min"+p]||0,L.min(j["max"+p]||q,l));a-=l;s-=j.flex;U.dirtySize=U.dirtySize||U[u]!=l;U[u]=l}}}if(ap){t+=e/2}else{if(G){t+=e}}if(z.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!z.owner.width&&z.direction=="vertical"){ai=I+z.owner.el.getPadding("lr")+z.owner.el.getBorderWidth("lr");if(z.owner.frameSize){ai+=z.owner.frameSize.left+z.owner.frameSize.right}aj=Math.min(aj,b.width=I+ag.left+ag.right)}for(ah=0;ah<P;ah++){j=r[ah];U=S[ah];D=U.margins;h=D[z.perpendicularLeftTop]+D[z.perpendicularRightBottom];t+=D[z.parallelBefore];U[z.parallelBefore]=t;U[z.perpendicularLeftTop]=R+D[z.perpendicularLeftTop];if(z.align=="stretch"){W=af(aj-h,j[H]||0,j[am]||q);U.dirtySize=U.dirtySize||U[O]!=W;U[O]=W}else{if(z.align=="stretchmax"){W=af(I-h,j[H]||0,j[am]||q);U.dirtySize=U.dirtySize||U[O]!=W;U[O]=W}else{if(z.align==z.alignCenteringString){F=m(aj,I)-al-U[O];if(F>0){U[z.perpendicularLeftTop]=R+Math.round(F/2)}}}}t+=(U[u]||0)+D[z.parallelAfter]}return{boxes:S,meta:{calculatedWidth:ai,maxSize:I,nonFlexSize:d,desiredSize:an,minimumSize:y,shortfall:Z,tooNarrow:n}}},onRemove:function(a){this.callParent(arguments);if(this.overflowHandler){this.overflowHandler.onRemove(a)}},initOverflowHandler:function(){var c=this.overflowHandler;if(typeof c=="string"){c={type:c}}var b="None";if(c&&c.type!==undefined){b=c.type}var a=Ext.layout.container.boxOverflow[b];if(a[this.type]){a=a[this.type]}this.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,this,c)},onLayout:function(){this.callParent();if(this.clearInnerCtOnLayout===true&&this.adjustmentPass!==true){this.innerCt.setSize(null,null)}var h=this,c=h.getLayoutTargetSize(),g=h.getVisibleItems(),b=h.calculateChildBoxes(g,c),e=b.boxes,i=b.meta,j,a,d;if(h.autoSize&&b.meta.desiredSize){c[h.parallelPrefix]=b.meta.desiredSize}if(i.shortfall>0){j=h.overflowHandler;a=i.tooNarrow?"handleOverflow":"clearOverflow";d=j[a](b,c);if(d){if(d.targetSize){c=d.targetSize}if(d.recalculate){g=h.getVisibleItems();b=h.calculateChildBoxes(g,c);e=b.boxes}}}else{h.overflowHandler.clearOverflow()}h.layoutTargetLastSize=c;h.childBoxCache=b;h.updateInnerCtSize(c,b);h.updateChildBoxes(e);h.handleTargetOverflow(c)},animCallback:Ext.emptyFn,updateChildBoxes:function(h){var m=this,e=0,c=h.length,q=[],p=Ext.dd.DDM.getDDById(m.innerCt.id),a,g,d,j,k,b;for(;e<c;e++){g=h[e];j=g.component;if(p&&(p.getDragEl()===j.el.dom)){continue}d=false;a=m.getChildBox(j);if(m.animate){b=m.animate.callback||m.animate;k={layoutAnimation:true,target:j,from:{},to:{},listeners:{}};if(!isNaN(g.width)&&(g.width!=a.width)){d=true;k.to.width=g.width}if(!isNaN(g.height)&&(g.height!=a.height)){d=true;k.to.height=g.height}if(!isNaN(g.left)&&(g.left!=a.left)){d=true;k.to.left=g.left}if(!isNaN(g.top)&&(g.top!=a.top)){d=true;k.to.top=g.top}if(d){q.push(k)}}else{if(g.dirtySize){if(g.width!==a.width||g.height!==a.height){m.setItemSize(j,g.width,g.height)}}if(isNaN(g.left)||isNaN(g.top)){continue}j.setPosition(g.left,g.top)}}c=q.length;if(c){var n=function(i){c-=1;if(!c){m.animCallback(i);m.layoutBusy=false;if(Ext.isFunction(b)){b()}}};var l=function(){m.layoutBusy=true};for(e=0,c=q.length;e<c;e++){k=q[e];k.listeners.afteranimate=n;if(!e){k.listeners.beforeanimate=l}if(m.animate.duration){k.duration=m.animate.duration}j=k.target;delete k.target;j.stopAnimation();j.animate(k)}}},updateInnerCtSize:function(c,a){var h=this,e=Math.max,g=h.align,i=h.padding,b=c.width,k=c.height,l=a.meta,d,j;if(h.direction=="horizontal"){d=b;j=l.maxSize+i.top+i.bottom+h.innerCt.getBorderWidth("tb");if(g=="stretch"){j=k}else{if(g=="middle"){j=e(k,j)}}}else{j=k;d=l.maxSize+i.left+i.right+h.innerCt.getBorderWidth("lr");if(g=="stretch"){d=b}else{if(g=="center"){d=e(b,d)}}}h.getRenderTarget().setSize(d||undefined,j||undefined);if(l.calculatedWidth&&h.owner.el.getWidth()>l.calculatedWidth){h.owner.el.setWidth(l.calculatedWidth)}if(h.innerCt.dom.scrollTop){h.innerCt.dom.scrollTop=0}},handleTargetOverflow:function(c){var b=this.getTarget(),d=b.getStyle("overflow"),a;if(d&&d!="hidden"&&!this.adjustmentPass){a=this.getLayoutTargetSize();if(a.width!=c.width||a.height!=c.height){this.adjustmentPass=true;this.onLayout();return true}}delete this.adjustmentPass},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&this.innerCt&&b.parentNode===this.innerCt.dom)||false},getRenderTarget:function(){if(!this.innerCt){this.innerCt=this.getTarget().createChild({cls:this.innerCls,role:"presentation"});this.padding=Ext.util.Format.parseBox(this.padding)}return this.innerCt},renderItem:function(d,g){this.callParent(arguments);var c=this,a=d.getEl(),b=a.dom.style,e=d.margins||d.margin;if(e){if(Ext.isString(e)||Ext.isNumber(e)){e=Ext.util.Format.parseBox(e)}else{Ext.applyIf(e,{top:0,right:0,bottom:0,left:0})}}else{e=Ext.apply({},c.defaultMargins)}e.top+=a.getMargin("t");e.right+=a.getMargin("r");e.bottom+=a.getMargin("b");e.left+=a.getMargin("l");e.height=e.top+e.bottom;e.width=e.left+e.right;b.marginTop=b.marginRight=b.marginBottom=b.marginLeft="0";d.margins=e},destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",alignCenteringString:"middle",type:"hbox",direction:"horizontal",parallelSizeIndex:0,perpendicularSizeIndex:1,parallelPrefix:"width",parallelPrefixCap:"Width",parallelLT:"l",parallelRB:"r",parallelBefore:"left",parallelBeforeCap:"Left",parallelAfter:"right",parallelPosition:"x",perpendicularPrefix:"height",perpendicularPrefixCap:"Height",perpendicularLT:"t",perpendicularRB:"b",perpendicularLeftTop:"top",perpendicularRightBottom:"bottom",perpendicularPosition:"y",configureItem:function(a){if(a.flex){a.layoutManagedWidth=1}else{a.layoutManagedWidth=2}if(this.align==="stretch"||this.align==="stretchmax"){a.layoutManagedHeight=1}else{a.layoutManagedHeight=2}this.callParent(arguments)}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",alignCenteringString:"center",type:"vbox",direction:"vertical",parallelSizeIndex:1,perpendicularSizeIndex:0,parallelPrefix:"height",parallelPrefixCap:"Height",parallelLT:"t",parallelRB:"b",parallelBefore:"top",parallelBeforeCap:"Top",parallelAfter:"bottom",parallelPosition:"y",perpendicularPrefix:"width",perpendicularPrefixCap:"Width",perpendicularLT:"l",perpendicularRB:"r",perpendicularLeftTop:"left",perpendicularRightBottom:"right",perpendicularPosition:"x",configureItem:function(a){if(a.flex){a.layoutManagedHeight=1}else{a.layoutManagedHeight=2}if(this.align==="stretch"||this.align==="stretchmax"){a.layoutManagedWidth=1}else{a.layoutManagedWidth=2}this.callParent(arguments)}});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:"Ext.FocusMgr",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ComponentManager","Ext.ComponentQuery","Ext.util.HashMap","Ext.util.KeyNav"],enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],tabIndexWhitelist:["a","button","embed","frame","iframe","img","input","object","select","textarea"],constructor:function(){var a=this,b=Ext.ComponentQuery;a.addEvents("beforecomponentfocus","componentfocus","disable","enable");a.keyNav=Ext.create("Ext.util.KeyNav",Ext.getDoc(),{disabled:true,scope:a,backspace:a.focusLast,enter:a.navigateIn,esc:a.navigateOut,tab:a.navigateSiblings});a.focusData={};a.subscribers=Ext.create("Ext.util.HashMap");a.focusChain={};Ext.apply(b.pseudos,{focusable:function(g){var d=g.length,j=[],h=0,k,e=function(c){return c&&c.focusable!==false&&b.is(c,"[rendered]:not([destroying]):not([isDestroyed]):not([disabled]){isVisible(true)}{el && c.el.dom && c.el.isVisible()}")};for(;h<d;h++){k=g[h];if(e(k)){j.push(k)}}return j},nextFocus:function(g,e,j){j=j||1;e=parseInt(e,10);var d=g.length,h=e+j,k;for(;h!=e;h+=j){if(h>=d){h=0}else{if(h<0){h=d-1}}k=g[h];if(b.is(k,":focusable")){return[k]}else{if(k.placeholder&&b.is(k.placeholder,":focusable")){return[k.placeholder]}}}return[]},prevFocus:function(d,c){return this.nextFocus(d,c,-1)},root:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(!j.ownerCt){h.push(j)}}return h}})},addXTypeToWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.addXTypeToWhitelist,a);return}if(!Ext.Array.contains(a.whitelist,b)){a.whitelist.push(b)}},clearComponent:function(a){clearTimeout(this.cmpFocusDelay);if(!a.isDestroyed){a.blur()}},disable:function(){var a=this;if(!a.enabled){return}delete a.options;a.enabled=false;Ext.ComponentManager.all.un("add",a.onComponentCreated,a);a.removeDOM();a.keyNav.disable();a.setFocusAll(false);a.fireEvent("disable",a)},enable:function(a){var b=this;if(a===true){a={focusFrame:true}}b.options=a=a||{};if(b.enabled){return}Ext.ComponentManager.all.on("add",b.onComponentCreated,b);b.initDOM(a);b.keyNav.enable();b.setFocusAll(true,a);b.focusEl.focus();delete b.focusedCmp;b.enabled=true;b.fireEvent("enable",b)},focusLast:function(b){var a=this;if(a.isWhitelisted(a.focusedCmp)){return true}if(a.previousFocusedCmp){a.previousFocusedCmp.focus()}},getRootComponents:function(){var a=this,c=Ext.ComponentQuery,b=c.query(":focusable:root:not([floating])"),d=c.query(":focusable:root[floating]");d.sort(function(g,e){return g.el.getZIndex()>e.el.getZIndex()});return d.concat(b)},initDOM:function(b){var c=this,d="&#160",a=c.focusFrameCls;if(!Ext.isReady){Ext.onReady(c.initDOM,c);return}if(!c.focusEl){c.focusEl=Ext.getBody().createChild({tabIndex:"-1",cls:c.focusElementCls,html:d})}if(!c.focusFrame&&b.focusFrame){c.focusFrame=Ext.getBody().createChild({cls:a,children:[{cls:a+"-top"},{cls:a+"-bottom"},{cls:a+"-left"},{cls:a+"-right"}],style:"top: -100px; left: -100px;"});c.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);c.focusFrameWidth=2;c.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(a){return a&&Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(d){var b=this,a=b.focusedCmp,g,c;if(!a){g=b.getRootComponents();if(g.length){g[0].focus()}}else{c=Ext.ComponentQuery.query(">:focusable",a)[0];if(c){c.focus()}else{if(Ext.isFunction(a.onClick)){d.button=0;a.onClick(d);a.focus()}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(i,b,n){var j=this,a=b||j,p=i.getKey(),g=Ext.EventObject,k=i.shiftKey||p==g.LEFT||p==g.UP,c=p==g.LEFT||p==g.RIGHT||p==g.UP||p==g.DOWN,h=k?"prev":"next",m,d,l;l=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!l&&!n){return}if(c&&j.isWhitelisted(l)){return true}n=n||l.up();if(n){m=l?Ext.Array.indexOf(n.getRefItems(),l):-1;d=Ext.ComponentQuery.query(">:"+h+"Focus("+m+")",n)[0];if(d&&l!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentCreated:function(b,c,a){this.setFocus(a,true,this.options)},onComponentDestroy:function(a){this.setFocus(a,false)},onComponentFocus:function(p,l){var m=this,a=m.focusChain;if(!Ext.ComponentQuery.is(p,":focusable")){m.clearComponent(p);if(a[p.id]){return}var r=p.up();if(r){a[p.id]=true;r.focus()}return}m.focusChain={};clearTimeout(m.cmpFocusDelay);if(arguments.length!==2){m.cmpFocusDelay=Ext.defer(m.onComponentFocus,90,m,[p,l]);return}if(m.fireEvent("beforecomponentfocus",m,p,m.previousFocusedCmp)===false){m.clearComponent(p);return}m.focusedCmp=p;if(m.shouldShowFocusFrame(p)){var t="."+m.focusFrameCls+"-",b=m.focusFrame,g=m.focusFrameWidth,j=p.el.getPageBox(),s=j.top,c=j.left,n=j.width,h=j.height,i=b.child(t+"top"),d=b.child(t+"bottom"),q=b.child(t+"left"),k=b.child(t+"right");i.setWidth(n).setLeftTop(c,s);d.setWidth(n).setLeftTop(c,s+h-g);q.setHeight(h-g-g).setLeftTop(c,s+g);k.setHeight(h-g-g).setLeftTop(c+n-g,s+g);b.show()}m.fireEvent("componentfocus",m,p,m.previousFocusedCmp)},onComponentHide:function(e){var d=this,g=Ext.ComponentQuery,b=false,a,c;if(d.focusedCmp){a=g.query("[id="+d.focusedCmp.id+"]",e)[0];b=d.focusedCmp.id===e.id||a;if(a){d.clearComponent(a)}}d.clearComponent(e);if(b){c=g.query("^:focusable",e)[0];if(c){c.focus()}}},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusEl,a.focusFrame);delete a.focusEl;delete a.focusFrame;delete a.focusFrameWidth},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setFocus:function(e,i,b){var d=this,c,h,g,a=function(j){return !Ext.Array.contains(d.tabIndexWhitelist,j.tagName.toLowerCase())&&j.tabIndex<=0};b=b||{};if(!e.rendered){e.on("afterrender",Ext.pass(d.setFocus,arguments,d),d,{single:true});return}c=e.getFocusEl();h=c.dom;if((i&&!d.focusData[e.id])||(!i&&d.focusData[e.id])){if(i){g={focusFrame:b.focusFrame};if(a(h)){g.tabIndex=h.tabIndex;h.tabIndex=-1}c.on({focus:g.focusFn=Ext.bind(d.onComponentFocus,d,[e],0),blur:g.blurFn=Ext.bind(d.onComponentBlur,d,[e],0),scope:d});e.on({hide:d.onComponentHide,close:d.onComponentHide,beforedestroy:d.onComponentDestroy,scope:d});d.focusData[e.id]=g}else{g=d.focusData[e.id];if("tabIndex" in g){h.tabIndex=g.tabIndex}c.un("focus",g.focusFn,d);c.un("blur",g.blurFn,d);e.un("hide",d.onComponentHide,d);e.un("close",d.onComponentHide,d);e.un("beforedestroy",d.onComponentDestroy,d);delete d.focusData[e.id]}}},setFocusAll:function(h,c){var g=this,b=Ext.ComponentManager.all.getArray(),a=b.length,e,d=0;for(;d<a;d++){g.setFocus(b[d],h,c)}},setupSubscriberKeys:function(a,g){var e=this,d=a.getFocusEl(),c=g.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},h=function(i){if(e.focusedCmp===a){return e.navigateSiblings(i,e,a)}else{return e.navigateSiblings(i)}};Ext.iterate(g,function(j,i){b[j]=function(l){var k=h(l);if(Ext.isFunction(i)&&i.call(c||a,l,k)===true){return true}return k}},e);return Ext.create("Ext.util.KeyNav",d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{};if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false},subscribe:function(a,c){var g=this,e=Ext.Array,h={},d=g.subscribers,b=function(i){if(i.isContainer&&!d.containsKey(i.id)){e.forEach(i.query(">"),b);g.setFocus(i,true,c);i.on("add",h.onAdd,g)}else{if(!i.isContainer){g.setFocus(i,true,c)}}};if(!a||!a.isContainer){return}if(!a.rendered){a.on("afterrender",Ext.pass(g.subscribe,arguments,g),g,{single:true});return}g.initDOM(c);h.keyNav=g.setupSubscriberKeys(a,c.keys);h.onAdd=function(j,k,i){b(k)};a.on("beforedestroy",g.unsubscribe,g);b(a);d.add(a.id,h)},unsubscribe:function(a){var e=this,d=Ext.Array,c=e.subscribers,g,b=function(h){if(h.isContainer&&!c.containsKey(h.id)){d.forEach(h.query(">"),b);e.setFocus(h,false);h.un("add",g.onAdd,e)}else{if(!h.isContainer){e.setFocus(h,false)}}};if(!a||!c.containsKey(a.id)){return}g=c.get(a.id);g.keyNav.destroy();a.un("beforedestroy",e.unsubscribe,e);c.removeAtKey(a.id);b(a);e.removeDOM()}});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox","Ext.FocusManager"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",initComponent:function(){var b=this,a;if(!b.layout&&b.enableOverflow){b.layout={overflowHandler:"Menu"}}if(b.dock==="right"||b.dock==="left"){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?"vbox":"hbox",align:b.vertical?"stretchmax":"middle",clearInnerCtOnLayout:true});if(b.vertical){b.addClsWithUI("vertical")}if(b.ui==="footer"){b.ignoreBorderManagement=true}b.callParent();b.addEvents("overflowchange");a=b.vertical?["up","down"]:["left","right"];Ext.FocusManager.subscribe(b,{keys:a})},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&&e.enableOverflow){c=d.overflowHandler;if(c&&c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(b){if(Ext.isString(b)){var a=Ext.toolbar.Toolbar.shortcuts[b];if(a){b={xtype:a}}else{b={xtype:"tbtext",text:b}}this.applyDefaults(b)}return this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"mouseover",b.onButtonOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:this.createComponent(a,a.split?"splitbutton":this.defaultType)},onBeforeAdd:function(a){if(a.is("field")||(a.is("button")&&this.ui!="footer")){a.ui=a.ui+"-toolbar"}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a);if(this.disabled){a.disable()}},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},onButtonOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}},function(){this.shortcuts={"-":"tbseparator"," ":"tbspacer","->":"tbfill"}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",requires:["Ext.util.MixedCollection","Ext.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",defaultDockWeights:{top:1,left:3,right:5,bottom:7},renderTpl:['<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"</div>"],border:true,initComponent:function(){var a=this;a.addEvents("bodyresize");a.addChildEls("body");if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},initItems:function(){var b=this,a=b.dockedItems;b.callParent();b.dockedItems=Ext.create("Ext.util.MixedCollection",false,b.getComponentId);if(a){b.addDocked(a)}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},initBodyStyles:function(){var d=this,a=d.bodyStyle,c=[],b=Ext.Element,e;if(Ext.isFunction(a)){a=a()}if(Ext.isString(a)){c=a.split(";")}else{for(e in a){if(a.hasOwnProperty(e)){c.push(e+":"+a[e])}}}if(d.bodyPadding!==undefined){c.push("padding: "+b.unitizeBox((d.bodyPadding===true)?5:d.bodyPadding))}if(d.frame&&d.bodyBorder){if(!Ext.isNumber(d.bodyBorder)){d.bodyBorder=1}c.push("border-width: "+b.unitizeBox(d.bodyBorder))}delete d.bodyStyle;return c.length?c.join(";"):undefined},initBodyCls:function(){var b=this,a="",c=b.bodyCls;if(c){Ext.each(c,function(d){a+=" "+d});delete b.bodyCls}return a.length>0?a:undefined},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyStyle:this.initBodyStyles(),bodyCls:this.initBodyCls()})},addDocked:function(a,g){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b<c;b++){d=a[b];d.dock=d.dock||"top";if(e.border===false){}if(g!==undefined){e.dockedItems.insert(g+b,d)}else{e.dockedItems.add(d)}d.onAdded(e,b);e.onDockedAdd(d)}e.componentLayout.childrenChanged=true;if(e.rendered&&!e.suspendLayout){e.doComponentLayout()}return a},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,insertDocked:function(b,a){this.addDocked(a,b)},removeDocked:function(e,b){var d=this,c,a;if(!d.dockedItems.contains(e)){return e}c=d.componentLayout;a=c&&d.rendered;if(a){c.onRemove(e)}d.dockedItems.remove(e);e.onRemoved();d.onDockedRemove(e);if(b===true||(b!==false&&d.autoDestroy)){e.destroy()}else{if(a){c.afterRemove(e)}}d.componentLayout.childrenChanged=true;if(!d.destroying&&!d.suspendLayout){d.doComponentLayout()}return e},getDockedItems:function(c){var d=this,b=d.defaultDockWeights,a;if(d.dockedItems&&d.dockedItems.items.length){if(c){a=Ext.ComponentQuery.query(c,d.dockedItems.items)}else{a=d.dockedItems.items.slice()}Ext.Array.sort(a,function(g,e){var h=g.weight||b[g.dock],i=e.weight||b[e.dock];if(Ext.isNumber(h)&&Ext.isNumber(i)){return h-i}return 0});return a}return[]},addUIClsToElement:function(b,g){var e=this,a=e.callParent(arguments),d=[Ext.baseCSSPrefix+b,e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){if(!Ext.Array.contains(h,d[c])){h.push(d[c])}}e.bodyCls=h.join(" ")}else{e.bodyCls=d.join(" ")}}return a},removeUIClsFromElement:function(b,g){var e=this,a=e.callParent(arguments),d=[Ext.baseCSSPrefix+b,e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.removeCls(e.bodyCls)}else{e.body.removeCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){Ext.Array.remove(h,d[c])}e.bodyCls=h.join(" ")}}return a},addUIToElement:function(c){var b=this,a=b.baseCls+"-body-"+b.ui,d;b.callParent(arguments);if(!c&&b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){d=b.bodyCls.split(" ");if(!Ext.Array.contains(d,a)){d.push(a)}b.bodyCls=d.join(" ")}else{b.bodyCls=a}}},removeUIFromElement:function(){var b=this,a=b.baseCls+"-body-"+b.ui,c;b.callParent(arguments);if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");Ext.Array.remove(c,a);b.bodyCls=c.join(" ")}else{b.bodyCls=a}}},getTargetEl:function(){return this.body},getRefItems:function(a){var b=this.callParent(arguments),d=this.getDockedItems(a?"*,* *":undefined),g=d.length,c=0,e;for(;c<g;c++){e=d[c];if(e.dock==="right"||e.dock==="bottom"){break}}return Ext.Array.splice(d,0,c).concat(b).concat(d)},beforeDestroy:function(){var b=this.dockedItems,a;if(b){while((a=b.first())){this.removeDocked(a,true)}}this.callParent()},setBorder:function(a){var b=this;b.border=(a!==undefined)?a:true;if(b.rendered){b.doComponentLayout()}}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,renderTpl:['<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>','<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>'],initComponent:function(){var c=this,g,e,b,a,d;c.indicateDragCls=c.baseCls+"-draggable";c.title=c.title||"&#160;";c.tools=c.tools||[];c.items=c.items||[];c.orientation=c.orientation||"horizontal";c.dock=(c.dock)?c.dock:(c.orientation=="horizontal")?"top":"left";c.addClsWithUI(c.orientation);c.addClsWithUI(c.dock);c.addChildEls("body");if(!Ext.isEmpty(c.iconCls)){c.initIconCmp();c.items.push(c.iconCmp)}if(c.orientation=="vertical"){if(Ext.isIE6||Ext.isIE7){c.width=this.width||24}else{if(Ext.isIEQuirks){c.width=this.width||25}}c.layout={type:"vbox",align:"center",clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.textConfig={cls:c.baseCls+"-text",type:"text",text:c.title,rotate:{degrees:90}};d=c.ui;if(Ext.isArray(d)){d=d[0]}g="."+c.baseCls+"-text-"+d;if(Ext.scopeResetCSS){g="."+Ext.baseCSSPrefix+"reset "+g}e=Ext.util.CSS.getRule(g);if(e){b=e.style}if(b){Ext.apply(c.textConfig,{"font-family":b.fontFamily,"font-weight":b.fontWeight,"font-size":b.fontSize,fill:b.color})}c.titleCmp=Ext.create("Ext.draw.Component",{ariaRole:"heading",focusable:false,viewBox:false,flex:1,autoSize:true,margins:"5 0 0 0",items:[c.textConfig],renderSelectors:{textEl:"."+c.baseCls+"-text"}})}else{c.layout={type:"hbox",align:"middle",clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.titleCmp=Ext.create("Ext.Component",{xtype:"component",ariaRole:"heading",focusable:false,flex:1,cls:c.baseCls+"-text-container",renderTpl:['<span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">{title}</span>'],renderData:{title:c.title,cls:c.baseCls,ui:c.ui},childEls:["textEl"]})}c.items.push(c.titleCmp);c.items=c.items.concat(c.tools);this.callParent()},initIconCmp:function(){this.iconCmp=Ext.create("Ext.Component",{focusable:false,renderTpl:['<img id="{id}-iconEl" alt="" src="{blank}" class="{cls}-icon {iconCls}"/>'],renderData:{blank:Ext.BLANK_IMAGE_URL,cls:this.baseCls,iconCls:this.iconCls,orientation:this.orientation},childEls:["iconEl"],iconCls:this.iconCls})},afterRender:function(){var a=this;a.el.unselectable();if(a.indicateDrag){a.el.addCls(a.indicateDragCls)}a.mon(a.el,{click:a.onClick,scope:a});a.callParent()},afterLayout:function(){var a=this;a.callParent(arguments);if(Ext.isIE7){a.el.repaint()}},addUIClsToElement:function(b,g){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){if(!Ext.Array.contains(h,d[c])){h.push(d[c])}}e.bodyCls=h.join(" ")}else{e.bodyCls=d.join(" ")}}return a},removeUIClsFromElement:function(b,g){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.removeCls(e.bodyCls)}else{e.body.removeCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){Ext.Array.remove(h,d[c])}e.bodyCls=h.join(" ")}}return a},addUIToElement:function(c){var b=this,d,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(!c&&b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){d=b.bodyCls.split(" ");if(!Ext.Array.contains(d,a)){d.push(a)}b.bodyCls=d.join(" ")}else{b.bodyCls=a}}if(!c&&b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.addCls(b.baseCls+"-text-"+b.ui)}},removeUIFromElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");Ext.Array.remove(c,a);b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.removeCls(b.baseCls+"-text-"+b.ui)}},onClick:function(a){if(!a.getTarget(Ext.baseCSSPrefix+"tool")){this.fireEvent("click",a)}},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(d){var c=this;if(c.rendered){if(c.titleCmp.rendered){if(c.titleCmp.surface){c.title=d||"";var b=c.titleCmp.surface.items.items[0],a=c.titleCmp.surface;a.remove(b);c.textConfig.type="text";c.textConfig.text=d;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:90}},true);c.titleCmp.autoSizeSurface()}else{c.title=d||"&#160;";c.titleCmp.textEl.update(c.title)}}else{c.titleCmp.on({render:function(){c.setTitle(d)},single:true})}}else{c.on({render:function(){c.layout.layout();c.setTitle(d)},single:true})}},setIconCls:function(a){var c=this,e=!a||!a.length,d=c.iconCmp,b;c.iconCls=a;if(!c.iconCmp&&!e){c.initIconCmp();c.insert(0,c.iconCmp)}else{if(d){if(e){c.iconCmp.destroy()}else{b=d.iconEl;b.removeCls(d.iconCls);b.addCls(a);d.iconCls=a}}}},addTool:function(a){this.tools.push(this.add(a))},onAdd:function(b,a){this.callParent([arguments]);if(b instanceof Ext.panel.Tool){b.bindTo(this.ownerCt);this.tools[b.type]=b}}});Ext.define("Ext.fx.target.Element",{extend:"Ext.fx.target.Target",type:"element",getElVal:function(b,a,c){if(c==undefined){if(a==="x"){c=b.getX()}else{if(a==="y"){c=b.getY()}else{if(a==="scrollTop"){c=b.getScroll().top}else{if(a==="scrollLeft"){c=b.getScroll().left}else{if(a==="height"){c=b.getHeight()}else{if(a==="width"){c=b.getWidth()}else{c=b.getStyle(a)}}}}}}}return c},getAttr:function(a,c){var b=this.target;return[[b,this.getElVal(b,a,c)]]},setAttr:function(l){var g=this.target,k=l.length,n,h,b,e,c,a,d,m;for(e=0;e<k;e++){n=l[e].attrs;for(h in n){if(n.hasOwnProperty(h)){a=n[h].length;for(c=0;c<a;c++){b=n[h][c];d=b[0];m=b[1];if(h==="x"){d.setX(m)}else{if(h==="y"){d.setY(m)}else{if(h==="scrollTop"){d.scrollTo("top",m)}else{if(h==="scrollLeft"){d.scrollTo("left",m)}else{d.setStyle(h,m)}}}}}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:"Ext.fx.target.Element",isComposite:true,constructor:function(a){a.id=a.id||Ext.id(null,"ext-composite-");this.callParent([a])},getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,this.getElVal(e,a,d)])},this);return b}});Ext.define("Ext.fx.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.fx.target.Element","Ext.fx.target.CompositeElement","Ext.fx.target.Sprite","Ext.fx.target.CompositeSprite","Ext.fx.target.Component"],mixins:{queue:"Ext.fx.Queue"},constructor:function(){this.items=Ext.create("Ext.util.MixedCollection");this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(d){var b=this,c=!b.forceJS&&Ext.supports.Transitions,a;b.useCSS3=c;if(Ext.isString(d)){d=Ext.get(d)}if(d&&d.tagName){d=Ext.get(d);a=Ext.create("Ext.fx.target.Element"+(c?"CSS":""),d);b.targets.add(a);return a}if(Ext.isObject(d)){if(d.dom){a=Ext.create("Ext.fx.target.Element"+(c?"CSS":""),d)}else{if(d.isComposite){a=Ext.create("Ext.fx.target.CompositeElement"+(c?"CSS":""),d)}else{if(d.isSprite){a=Ext.create("Ext.fx.target.Sprite",d)}else{if(d.isCompositeSprite){a=Ext.create("Ext.fx.target.CompositeSprite",d)}else{if(d.isComponent){a=Ext.create("Ext.fx.target.Component",d)}else{if(d.isAnimTarget){return d}else{return null}}}}}}b.targets.add(a);return a}else{return null}},addAnim:function(c){var b=this.items,a=this.task;b.add(c);if(!a&&b.length){a=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(a)}},removeAnim:function(c){var b=this.items,a=this.task;b.remove(c);if(a&&!b.length){Ext.TaskManager.stop(a);delete this.task}},startingFilter:function(a){return a.paused===false&&a.running===false&&a.iterations>0},runningFilter:function(a){return a.paused===false&&a.running===true&&a.isAnimator!==true},runner:function(){var b=this,a=b.items;b.targetData={};b.targetArr={};b.timestamp=new Date();a.filterBy(b.startingFilter).each(b.startAnim,b);a.filterBy(b.runningFilter).each(b.runAnim,b);b.applyPendingAttrs()},startAnim:function(a){a.start(this.timestamp)},runAnim:function(d){if(!d){return}var c=this,b=d.target.getId(),g=c.useCSS3&&d.target.type=="element",a=c.timestamp-d.startTime,e,h;this.collectTargetData(d,a,g);if(g){d.target.setAttr(c.targetData[b],true);c.targetData[b]=[];c.collectTargetData(d,d.duration,g);d.paused=true;e=d.target.target;if(d.target.isComposite){e=d.target.target.last()}h={};h[Ext.supports.CSS3TransitionEnd]=d.lastFrame;h.scope=d;h.single=true;e.on(h)}else{if(a>=d.duration){c.applyPendingAttrs(true);delete c.targetData[b];delete c.targetArr[b];d.lastFrame()}}},collectTargetData:function(d,a,e){var b=d.target.getId(),g=this.targetData[b],c;if(!g){g=this.targetData[b]=[];this.targetArr[b]=d.target}c={duration:d.duration,easing:(e&&d.reverse)?d.easingFn.reverse().toCSS3():d.easing,attrs:{}};Ext.apply(c.attrs,d.runAnim(a));g.push(c)},applyPendingAttrs:function(d){var c=this.targetData,b=this.targetArr,a;for(a in c){if(c.hasOwnProperty(a)){b[a].setAttr(c[a],false,d)}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,"ext-animator-");b.addEvents("beforeanimate","keyframe","afteranimate");b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(g){var k=this,n=[],l=k.to||{},c=k.duration,p,a,e,j,m,b,d,h;for(m in g){if(g.hasOwnProperty(m)&&k.animKeyFramesRE.test(m)){h={attrs:Ext.apply(g[m],l)};if(m=="from"){m=0}else{if(m=="to"){m=100}}h.pct=parseInt(m,10);n.push(h)}}Ext.Array.sort(n,k.sorter);j=n.length;for(e=0;e<j;e++){p=(n[e-1])?c*(n[e-1].pct/100):0;a=c*(n[e].pct/100);k.timeline.push({duration:a-p,attrs:n[e].attrs})}},applyAnimator:function(e){var k=this,l=[],p=k.timeline,g=k.reverse,j=p.length,b,h,a,d,n,m,c;if(k.fireEvent("beforeanimate",k)!==false){for(c=0;c<j;c++){b=p[c];n=b.attrs;h=n.easing||k.easing;a=n.damper||k.damper;delete n.easing;delete n.damper;b=Ext.create("Ext.fx.Anim",{target:e,easing:h,damper:a,duration:b.duration,paused:true,to:n});l.push(b)}k.animations=l;k.target=b.target;for(c=0;c<j-1;c++){b=l[c];b.nextAnim=l[c+1];b.on("afteranimate",function(){this.nextAnim.paused=false});b.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},k)}l[j-1].on("afteranimate",function(){this.lastFrame()},k)}},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;e.running=true;e.animations[e.keyframeStep].paused=false}},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){c.startTime=new Date();c.currentIteration=b;c.keyframeStep=0;c.applyAnimator(c.target);c.animations[c.keyframeStep].paused=false}else{c.currentIteration=0;c.end()}},end:function(){var a=this;a.fireEvent("afteranimate",a,a.startTime,new Date()-a.startTime)}});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var e=Math,h=e.PI,d=e.pow,b=e.sin,g=e.sqrt,a=e.abs,c=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(i){return i},ease:function(l){var i=0.07813-l/2,m=-0.25,p=g(0.0066+i*i),s=p-i,k=d(a(s),1/3)*(s<0?-1:1),r=-p-i,j=d(a(r),1/3)*(r<0?-1:1),u=k+j+0.25;return d(1-u,2)*3*u*0.1+(1-u)*3*u*u+u*u*u},easeIn:function(i){return d(i,1.7)},easeOut:function(i){return d(i,0.48)},easeInOut:function(s){var l=0.48-s/1.04,k=g(0.1734+l*l),i=k-l,r=d(a(i),1/3)*(i<0?-1:1),p=-k-l,m=d(a(p),1/3)*(p<0?-1:1),j=r+m+0.5;return(1-j)*3*j*j+j*j*j},backIn:function(i){return i*i*((c+1)*i-c)},backOut:function(i){i=i-1;return i*i*((c+1)*i+c)+1},elasticIn:function(k){if(k===0||k===1){return k}var j=0.3,i=j/4;return d(2,-10*k)*b((k-i)*(2*h)/j)+1},elasticOut:function(i){return 1-Ext.fx.Easing.elasticIn(1-i)},bounceIn:function(i){return 1-Ext.fx.Easing.bounceOut(1-i)},bounceOut:function(m){var j=7.5625,k=2.75,i;if(m<(1/k)){i=j*m*m}else{if(m<(2/k)){m-=(1.5/k);i=j*m*m+0.75}else{if(m<(2.5/k)){m-=(2.25/k);i=j*m*m+0.9375}else{m-=(2.625/k);i=j*m*m+0.984375}}}return i}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a=="object"&&b===Object(b))||(a=="undefined"&&typeof b==a)||(a=="null"&&b===null)||(a=="array"&&Array.isArray&&Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format("M{0},{1}l{2},0,0,{3},{4},0z",a.x,a.y,a.width,a.height,-a.width)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(a){return a.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,"array")&&b.is(a[0],"array")){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(g,e,j){var i=[],h=e.toLowerCase();j.replace(b.pathValuesRE,function(l,k){k&&i.push(+k)});if(h=="m"&&i.length>2){c.push([e].concat(Ext.Array.splice(i,0,2)));h="l";e=(e=="m")?"l":"L"}while(i.length>=d[h]){c.push([e].concat(Ext.Array.splice(i,0,d[h])));if(!d[h]){break}}})}c.toString=b.path2string;return c},mapPath:function(l,g){if(!g){return l}var h,e,c,k,a,d,b;l=this.path2curve(l);for(c=0,k=l.length;c<k;c++){b=l[c];for(a=1,d=b.length;a<d-1;a+=2){h=g.x(b[a],b[a+1]);e=g.y(b[a],b[a+1]);b[a]=h;b[a+1]=e}}return l},pathClone:function(g){var c=[],a,e,b,d;if(!this.is(g,"array")||!this.is(g&&g[0],"array")){g=this.parsePathString(g)}for(b=0,d=g.length;b<d;b++){c[b]=[];for(a=0,e=g[b].length;a<e;a++){c[b][a]=g[b][a]}}c.toString=this.path2string;return c},pathToAbsolute:function(c){if(!this.is(c,"array")||!this.is(c&&c[0],"array")){c=this.parsePathString(c)}var k=[],m=0,l=0,p=0,n=0,g=0,h=c.length,b,d,e,a;if(h&&c[0][0]=="M"){m=+c[0][1];l=+c[0][2];p=m;n=l;g++;k[0]=["M",m,l]}for(;g<h;g++){b=k[g]=[];d=c[g];if(d[0]!=d[0].toUpperCase()){b[0]=d[0].toUpperCase();switch(b[0]){case"A":b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=+(d[6]+m);b[7]=+(d[7]+l);break;case"V":b[1]=+d[1]+l;break;case"H":b[1]=+d[1]+m;break;case"M":p=+d[1]+m;n=+d[2]+l;default:e=1;a=d.length;for(;e<a;e++){b[e]=+d[e]+((e%2)?m:l)}}}else{e=0;a=d.length;for(;e<a;e++){k[g][e]=d[e]}}switch(b[0]){case"Z":m=p;l=n;break;case"H":m=b[1];break;case"V":l=b[1];break;case"M":d=k[g];a=d.length;p=d[a-2];n=d[a-1];default:d=k[g];a=d.length;m=d[a-2];l=d[a-1]}}k.toString=this.path2string;return k},pathToRelative:function(d){if(!this.is(d,"array")||!this.is(d&&d[0],"array")){d=this.parsePathString(d)}var n=[],q=0,p=0,u=0,t=0,c=0;if(d[0][0]=="M"){q=d[0][1];p=d[0][2];u=q;t=p;c++;n.push(["M",q,p])}for(var h=c,v=d.length;h<v;h++){var a=n[h]=[],s=d[h];if(s[0]!=s[0].toLowerCase()){a[0]=s[0].toLowerCase();switch(a[0]){case"a":a[1]=s[1];a[2]=s[2];a[3]=s[3];a[4]=s[4];a[5]=s[5];a[6]=+(s[6]-q).toFixed(3);a[7]=+(s[7]-p).toFixed(3);break;case"v":a[1]=+(s[1]-p).toFixed(3);break;case"m":u=s[1];t=s[2];default:for(var g=1,l=s.length;g<l;g++){a[g]=+(s[g]-((g%2)?q:p)).toFixed(3)}}}else{a=n[h]=[];if(s[0]=="m"){u=s[1]+q;t=s[2]+p}for(var e=0,b=s.length;e<b;e++){n[h][e]=s[e]}}var m=n[h].length;switch(n[h][0]){case"z":q=u;p=t;break;case"h":q+=+n[h][m-1];break;case"v":p+=+n[h][m-1];break;default:q+=+n[h][m-2];p+=+n[h][m-1]}}n.toString=this.path2string;return n},path2curve:function(k){var d=this,h=d.pathToAbsolute(k),c=h.length,j={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b,a,g,e;for(b=0;b<c;b++){h[b]=d.command2curve(h[b],j);if(h[b].length>7){h[b].shift();e=h[b];while(e.length){Ext.Array.splice(h,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(h,b,1);c=h.length}a=h[b];g=a.length;j.x=a[g-2];j.y=a[g-1];j.bx=parseFloat(a[g-4])||j.x;j.by=parseFloat(a[g-3])||j.y}return h},interpolatePaths:function(s,l){var j=this,d=j.pathToAbsolute(s),m=j.pathToAbsolute(l),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,t){if(p[t].length>7){p[t].shift();var u=p[t];while(u.length){Ext.Array.splice(p,t++,0,["C"].concat(Ext.Array.splice(u,0,6)))}Ext.Array.erase(p,t,1);q=Math.max(d.length,m.length||0)}},c=function(w,v,t,p,u){if(w&&v&&w[u][0]=="M"&&v[u][0]!="M"){Ext.Array.splice(v,u,0,["M",p.x,p.y]);t.bx=0;t.by=0;t.x=w[u][1];t.y=w[u][2];q=Math.max(d.length,m.length||0)}};for(var h=0,q=Math.max(d.length,m.length||0);h<q;h++){d[h]=j.command2curve(d[h],n);b(d,h);(m[h]=j.command2curve(m[h],a));b(m,h);c(d,m,n,a,h);c(m,d,a,n,h);var g=d[h],r=m[h],e=g.length,k=r.length;n.x=g[e-2];n.y=g[e-1];n.bx=parseFloat(g[e-4])||n.x;n.by=parseFloat(g[e-3])||n.y;a.bx=(parseFloat(r[k-4])||a.x);a.by=(parseFloat(r[k-3])||a.y);a.x=r[k-2];a.y=r[k-1]}return[d,m]},command2curve:function(c,b){var a=this;if(!c){return["C",b.x,b.y,b.x,b.y,b.x,b.y]}if(c[0]!="T"&&c[0]!="Q"){b.qx=b.qy=null}switch(c[0]){case"M":b.X=c[1];b.Y=c[2];break;case"A":c=["C"].concat(a.arc2curve.apply(a,[b.x,b.y].concat(c.slice(1))));break;case"S":c=["C",b.x+(b.x-(b.bx||b.x)),b.y+(b.y-(b.by||b.y))].concat(c.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));c=["C"].concat(a.quadratic2curve(b.x,b.y,b.qx,b.qy,c[1],c[2]));break;case"Q":b.qx=c[1];b.qy=c[2];c=["C"].concat(a.quadratic2curve(b.x,b.y,c[1],c[2],c[3],c[4]));break;case"L":c=["C"].concat(b.x,b.y,c[1],c[2],c[1],c[2]);break;case"H":c=["C"].concat(b.x,b.y,c[1],b.y,c[1],b.y);break;case"V":c=["C"].concat(b.x,b.y,b.x,c[1],b.x,c[1]);break;case"Z":c=["C"].concat(b.x,b.y,b.X,b.Y,b.X,b.Y);break}return c},quadratic2curve:function(b,d,h,e,a,c){var g=1/3,i=2/3;return[g*b+i*h,g*d+i*e,g*a+i*h,g*c+i*e,a,c]},rotate:function(b,h,a){var d=Math.cos(a),c=Math.sin(a),g=b*d-h*c,e=b*c+h*d;return{x:g,y:e}},arc2curve:function(w,ai,K,I,C,p,j,v,ah,D){var A=this,e=Math.PI,B=A.radian,H=e*120/180,b=B*(+C||0),P=[],M=Math,W=M.cos,a=M.sin,Y=M.sqrt,z=M.abs,q=M.asin,L,c,s,R,Q,ad,d,U,X,F,E,n,m,u,l,ag,g,af,S,V,T,ae,ac,ab,Z,O,aa,N,G,J,r;if(!D){L=A.rotate(w,ai,-b);w=L.x;ai=L.y;L=A.rotate(v,ah,-b);v=L.x;ah=L.y;c=W(B*C);s=a(B*C);R=(w-v)/2;Q=(ai-ah)/2;ad=(R*R)/(K*K)+(Q*Q)/(I*I);if(ad>1){ad=Y(ad);K=ad*K;I=ad*I}d=K*K;U=I*I;X=(p==j?-1:1)*Y(z((d*U-d*Q*Q-U*R*R)/(d*Q*Q+U*R*R)));F=X*K*Q/I+(w+v)/2;E=X*-I*R/K+(ai+ah)/2;n=q(((ai-E)/I).toFixed(7));m=q(((ah-E)/I).toFixed(7));n=w<F?e-n:n;m=v<F?e-m:m;if(n<0){n=e*2+n}if(m<0){m=e*2+m}if(j&&n>m){n=n-e*2}if(!j&&m>n){m=m-e*2}}else{n=D[0];m=D[1];F=D[2];E=D[3]}u=m-n;if(z(u)>H){G=m;J=v;r=ah;m=n+H*(j&&m>n?1:-1);v=F+K*W(m);ah=E+I*a(m);P=A.arc2curve(v,ah,K,I,C,0,j,J,r,[m,G,F,E])}u=m-n;l=W(n);ag=a(n);g=W(m);af=a(m);S=M.tan(u/4);V=4/3*K*S;T=4/3*I*S;ae=[w,ai];ac=[w+V*ag,ai-T*l];ab=[v+V*af,ah-T*g];Z=[v,ah];ac[0]=2*ae[0]-ac[0];ac[1]=2*ae[1]-ac[1];if(D){return[ac,ab,Z].concat(P)}else{P=[ac,ab,Z].concat(P).join().split(",");O=[];N=P.length;for(aa=0;aa<N;aa++){O[aa]=aa%2?A.rotate(P[aa-1],P[aa],b).y:A.rotate(P[aa],P[aa+1],b).x}return O}},rotateAndTranslatePath:function(k){var c=k.rotation.degrees,d=k.rotation.x,b=k.rotation.y,q=k.translation.x,l=k.translation.y,n,g,a,m,e,h=[];if(!c&&!q&&!l){return this.pathToAbsolute(k.attr.path)}q=q||0;l=l||0;n=this.pathToAbsolute(k.attr.path);for(g=n.length;g--;){a=h[g]=n[g].slice();if(a[0]=="A"){m=this.rotatePoint(a[6],a[7],c,d,b);a[6]=m.x+q;a[7]=m.y+l}else{e=1;while(a[e+1]!=null){m=this.rotatePoint(a[e],a[e+1],c,d,b);a[e]=m.x+q;a[e+1]=m.y+l;e+=2}}}return h},rotatePoint:function(b,h,e,a,g){if(!e){return{x:b,y:h}}a=a||0;g=g||0;b=b-a;h=h-g;e=e*this.radian;var d=Math.cos(e),c=Math.sin(e);return{x:b*d-h*c+a,y:b*c+h*d+g}},pathDimensions:function(m){if(!m||!(m+"")){return{x:0,y:0,width:0,height:0}}m=this.path2curve(m);var k=0,j=0,d=[],b=[],e=0,h=m.length,c,a,l,g;for(;e<h;e++){c=m[e];if(c[0]=="M"){k=c[1];j=c[2];d.push(k);b.push(j)}else{g=this.curveDim(k,j,c[1],c[2],c[3],c[4],c[5],c[6]);d=d.concat(g.min.x,g.max.x);b=b.concat(g.min.y,g.max.y);k=c[5];j=c[6]}}a=Math.min.apply(0,d);l=Math.min.apply(0,b);return{x:a,y:l,path:m,width:Math.max.apply(0,d)-a,height:Math.max.apply(0,b)-l}},intersectInside:function(b,c,a){return(a[0]-c[0])*(b[1]-c[1])>(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(n,m,g,d){var c=[],b=g[0]-d[0],a=g[1]-d[1],k=n[0]-m[0],i=n[1]-m[1],l=g[0]*d[1]-g[1]*d[0],j=n[0]*m[1]-n[1]*m[0],h=1/(b*i-a*k);c[0]=(l*k-j*b)*h;c[1]=(l*i-j*a)*h;return c},intersect:function(p,c){var n=this,k=0,m=c.length,h=c[m-1],r=p,g,t,l,q,a,b,d;for(;k<m;++k){g=c[k];b=r;r=[];t=b[b.length-1];d=0;a=b.length;for(;d<a;d++){l=b[d];if(n.intersectInside(l,h,g)){if(!n.intersectInside(t,h,g)){r.push(n.intersectIntersection(t,l,h,g))}r.push(l)}else{if(n.intersectInside(t,h,g)){r.push(n.intersectIntersection(t,l,h,g))}}t=l}h=g}return r},curveDim:function(g,d,i,h,u,t,q,m){var s=(u-2*i+g)-(q-2*u+i),p=2*(i-g)-2*(u-i),l=g-i,k=(-p+Math.sqrt(p*p-4*s*l))/2/s,j=(-p-Math.sqrt(p*p-4*s*l))/2/s,n=[d,m],r=[g,q],e;if(Math.abs(k)>1000000000000){k=0.5}if(Math.abs(j)>1000000000000){j=0.5}if(k>0&&k<1){e=this.findDotAtSegment(g,d,i,h,u,t,q,m,k);r.push(e.x);n.push(e.y)}if(j>0&&j<1){e=this.findDotAtSegment(g,d,i,h,u,t,q,m,j);r.push(e.x);n.push(e.y)}s=(t-2*h+d)-(m-2*t+h);p=2*(h-d)-2*(t-h);l=d-h;k=(-p+Math.sqrt(p*p-4*s*l))/2/s;j=(-p-Math.sqrt(p*p-4*s*l))/2/s;if(Math.abs(k)>1000000000000){k=0.5}if(Math.abs(j)>1000000000000){j=0.5}if(k>0&&k<1){e=this.findDotAtSegment(g,d,i,h,u,t,q,m,k);r.push(e.x);n.push(e.y)}if(j>0&&j<1){e=this.findDotAtSegment(g,d,i,h,u,t,q,m,j);r.push(e.x);n.push(e.y)}return{min:{x:Math.min.apply(0,r),y:Math.min.apply(0,n)},max:{x:Math.max.apply(0,r),y:Math.max.apply(0,n)}}},getAnchors:function(e,d,k,j,w,v,r){r=r||4;var i=Math,q=i.PI,s=q/2,m=i.abs,a=i.sin,b=i.cos,g=i.atan,u,t,h,l,p,n,y,x,c;u=(k-e)/r;t=(w-k)/r;if((j>=d&&j>=v)||(j<=d&&j<=v)){h=l=s}else{h=g((k-e)/m(j-d));if(d<j){h=q-h}l=g((w-k)/m(j-v));if(v<j){l=q-l}}c=s-((h+l)%(q*2))/2;if(c>s){c-=q}h+=c;l+=c;p=k-u*a(h);n=j+u*b(h);y=k+t*a(l);x=j+t*b(l);if((j>d&&n<d)||(j<d&&n>d)){p+=m(d-n)*(p-k)/(n-j);n=d}if((j>v&&x<v)||(j<v&&x>v)){y-=m(v-x)*(y-k)/(x-j);x=v}return{x1:p,y1:n,x2:y,y2:x}},smooth:function(a,s){var r=this.path2curve(a),e=[r[0]],k=r[0][1],h=r[0][2],t,v,w=1,l=r.length,g=1,n=k,m=h,c=0,b=0;for(;w<l;w++){var B=r[w],A=B.length,z=r[w-1],p=z.length,u=r[w+1],q=u&&u.length;if(B[0]=="M"){n=B[1];m=B[2];t=w+1;while(r[t][0]!="C"){t++}c=r[t][5];b=r[t][6];e.push(["M",n,m]);g=e.length;k=n;h=m;continue}if(B[A-2]==n&&B[A-1]==m&&(!u||u[0]=="M")){var d=e[g].length;v=this.getAnchors(z[p-2],z[p-1],n,m,e[g][d-2],e[g][d-1],s);e[g][1]=v.x2;e[g][2]=v.y2}else{if(!u||u[0]=="M"){v={x1:B[A-2],y1:B[A-1]}}else{v=this.getAnchors(z[p-2],z[p-1],B[A-2],B[A-1],u[q-2],u[q-1],s)}}e.push(["C",k,h,v.x1,v.y1,B[A-2],B[A-1]]);k=v.x2;h=v.y2}return e},findDotAtSegment:function(b,a,d,c,j,i,h,g,k){var e=1-k;return{x:Math.pow(e,3)*b+Math.pow(e,2)*3*k*d+e*3*k*k*j+Math.pow(k,3)*h,y:Math.pow(e,3)*a+Math.pow(e,2)*3*k*c+e*3*k*k*i+Math.pow(k,3)*g}},snapEnds:function(r,s,d){if(Ext.isDate(r)){return this.snapEndsByDate(r,s,d)}var c=(s-r)/d,a=Math.floor(Math.log(c)/Math.LN10)+1,e=Math.pow(10,a),t,p=Math.round((c%e)*Math.pow(10,2-a)),b=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],h=0,q,k,j,g,l=1000000000,n=b.length;t=r=Math.floor(r/e)*e;for(j=0;j<n;j++){q=b[j][0];k=(q-p)<0?1000000:(q-p)/b[j][1];if(k<l){g=q;l=k}}c=Math.floor(c*Math.pow(10,-a))*Math.pow(10,a)+g*Math.pow(10,a-2);while(t<s){t+=c;h++}s=+t.toFixed(10);return{from:r,to:s,power:a,step:c,steps:h}},snapEndsByDate:function(i,h,b,a){var d=false,g=[[Ext.Date.MILLI,[1,2,3,5,10,20,30,50,100,200,300,500]],[Ext.Date.SECOND,[1,2,3,5,10,15,30]],[Ext.Date.MINUTE,[1,2,3,5,10,20,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,3,7,14]],[Ext.Date.MONTH,[1,2,3,4,6]]],c,e;Ext.each(g,function(k,j){for(c=0;c<k[1].length;c++){if(h<Ext.Date.add(i,k[0],k[1][c]*b)){d=[k[0],k[1][c]];return false}}});if(!d){e=this.snapEnds(i.getFullYear(),h.getFullYear()+1,b,a);d=[Date.YEAR,Math.round(e.step)]}return this.snapEndsByDateAndStep(i,h,d,a)},snapEndsByDateAndStep:function(i,h,e,a){var d=[i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()],b=0,g,c;if(a){g=i}else{switch(e[0]){case Ext.Date.MILLI:g=new Date(d[0],d[1],d[2],d[3],d[4],d[5],Math.floor(d[6]/e[1])*e[1]);break;case Ext.Date.SECOND:g=new Date(d[0],d[1],d[2],d[3],d[4],Math.floor(d[5]/e[1])*e[1],0);break;case Ext.Date.MINUTE:g=new Date(d[0],d[1],d[2],d[3],Math.floor(d[4]/e[1])*e[1],0,0);break;case Ext.Date.HOUR:g=new Date(d[0],d[1],d[2],Math.floor(d[3]/e[1])*e[1],0,0,0);break;case Ext.Date.DAY:g=new Date(d[0],d[1],Math.floor(d[2]-1/e[1])*e[1]+1,0,0,0,0);break;case Ext.Date.MONTH:g=new Date(d[0],Math.floor(d[1]/e[1])*e[1],1,0,0,0,0);break;default:g=new Date(Math.floor(d[0]/e[1])*e[1],0,1,0,0,0,0);break}}c=g;while(c<h){c=Ext.Date.add(c,e[0],e[1]);b++}if(a){c=h}return{from:+g,to:+c,step:(c-g)/b,steps:b}},sorter:function(d,c){return d.offset-c.offset},rad:function(a){return a%360*Math.PI/180},degrees:function(a){return a*180/Math.PI%360},withinBox:function(a,c,b){b=b||{};return(a>=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(k){var e=this,g=k.type||"linear",c=k.angle||0,i=e.radian,l=k.stops,a=[],j,b,h,d;if(g=="linear"){b=[0,0,Math.cos(c*i),Math.sin(c*i)];h=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=h;b[3]*=h;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(j in l){if(l.hasOwnProperty(j)&&e.stopsRE.test(j)){d={offset:parseInt(j,10),color:Ext.draw.Color.toHex(l[j].color)||"#ffffff",opacity:l[j].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(g=="linear"){return{id:k.id,type:g,vector:b,stops:a}}else{return{id:k.id,type:g,centerX:k.centerX,centerY:k.centerY,focalX:k.focalX,focalY:k.focalY,radius:k.radius,vector:b,stops:a}}}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,c,a,g,i){a=(typeof a=="number")?a:1;var h=this.unitRE,d=h.exec(j),b,e;if(d){j=d[1];e=d[2];if(!this.scrollRE.test(i)&&!e&&this.pixelDefaultsRE.test(i)){e="px"}}j=+j||0;d=h.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(g!=null)?g:j;return{from:j,delta:(c-b)*a,units:e}},get:function(p,b,a,n,k){var m=p.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){if(n){h=n[e][1].from}if(Ext.isArray(p[e][1])&&Ext.isArray(b)){l=[];c=0;g=p[e][1].length;for(;c<g;c++){l.push(this.computeDelta(p[e][1][c],b[c],a,h,k))}d.push([p[e][0],l])}else{d.push([p[e][0],this.computeDelta(p[e][1],b,a,h,k)])}}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];if(Ext.isArray(a)){k=[];b=0;e=a.length;for(;b<e;b++){k.push(a[b].from+(a[b].delta*g)+(a[b].units||0))}c.push([l[d][0],k])}else{c.push([l[d][0],a.from+(a.delta*g)+(a.units||0)])}}return c}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(a,d){d=(typeof d=="number")?d:1;var e,c=false,b;Ext.each([this.hexRE,this.rgbRE,this.hex3RE],function(h,g){e=(g%2==0)?16:10;b=h.exec(a);if(b&&b.length==4){if(g==2){b[1]+=b[1];b[2]+=b[2];b[3]+=b[3]}c={red:parseInt(b[1],e),green:parseInt(b[2],e),blue:parseInt(b[3],e)};return false}});return c||a},computeDelta:function(h,a,e,c){h=this.parseColor(h);a=this.parseColor(a,e);var g=c?c:h,b=typeof g,d=typeof a;if(b=="string"||b=="undefined"||d=="string"||d=="undefined"){return a||g}return{from:h,delta:{red:Math.round((a.red-g.red)*e),green:Math.round((a.green-g.green)*e),blue:Math.round((a.blue-g.blue)*e)}}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(k,e){var g=k.length,c=[],d,b,a,h,j;for(d=0;d<g;d++){b=k[d][1];if(b){h=b.from;j=b.delta;b=(typeof b=="object"&&"red" in b)?"rgb("+b.red+", "+b.green+", "+b.blue+")":b;b=(typeof b=="object"&&b.length)?b[0]:b;if(typeof b=="undefined"){return[]}a=typeof b=="string"?b:"rgb("+[(h.red+Math.round(j.red*e))%256,(h.green+Math.round(j.green*e))%256,(h.blue+Math.round(j.blue*e))%256].join(",")+")";c.push([k[d][0],a])}}return c}},object:{interpolate:function(d,b){b=(typeof b=="number")?b:1;var a={},c;for(c in d){a[c]=parseInt(d[c],10)*b}return a},computeDelta:function(h,a,c,b){h=this.interpolate(h);a=this.interpolate(a,c);var g=b?b:h,e={},d;for(d in a){e[d]=a[d]-g[d]}return{from:h,delta:e}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(l,g){var h=l.length,c=[],e={},d,j,k,b,a;for(d=0;d<h;d++){b=l[d][1];j=b.from;k=b.delta;for(a in j){e[a]=Math.round(j[a]+k[a]*g)}c.push([l[d][0],e])}return c}},path:{computeDelta:function(e,a,c,b){c=(typeof c=="number")?c:1;var d;e=+e||0;a=+a||0;d=(b!=null)?b:e;return{from:e,delta:(a-d)*c}},forcePath:function(a){if(!Ext.isArray(a)&&!Ext.isArray(a[0])){a=Ext.draw.Draw.parsePathString(a)}return a},get:function(b,l,a,r){var c=this.forcePath(l),n=[],t=b.length,d,h,p,g,q,m,e,u,s;for(p=0;p<t;p++){s=this.forcePath(b[p][1]);g=Ext.draw.Draw.interpolatePaths(s,c);s=g[0];c=g[1];d=s.length;u=[];for(m=0;m<d;m++){g=[s[m][0]];h=s[m].length;for(e=1;e<h;e++){q=r&&r[0][1][m][e].from;g.push(this.computeDelta(s[m][e],c[m][e],a,q))}u.push(g)}n.push([b[p][0],u])}return n},set:function(q,n){var p=q.length,e=[],h,g,d,l,m,c,a,b;for(h=0;h<p;h++){c=q[h][1];l=[];a=c.length;for(g=0;g<a;g++){m=[c[g][0]];b=c[g].length;for(d=1;d<b;d++){m.push(c[g][d].from+c[g][d].delta*n)}l.push(m.join(","))}e.push([q[h][0],l.join(",")])}return e}}}},function(){Ext.each(["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],function(a){this[a]=this.color},this)});Ext.define("Ext.fx.Anim",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager","Ext.fx.Animator","Ext.fx.Easing","Ext.fx.CubicBezier","Ext.fx.PropertyHandler"],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,constructor:function(a){var b=this,c;a=a||{};if(a.keyframes){return Ext.create("Ext.fx.Animator",a)}a=Ext.apply(b,a);if(b.from===undefined){b.from={}}b.propHandlers={};b.config=a;b.target=Ext.fx.Manager.createTarget(b.target);b.easingFn=Ext.fx.Easing[b.easing];b.target.dynamic=b.dynamic;if(!b.easingFn){b.easingFn=String(b.easing).match(b.bezierRE);if(b.easingFn&&b.easingFn.length==5){c=b.easingFn;b.easingFn=Ext.fx.CubicBezier.cubicBezier(+c[1],+c[2],+c[3],+c[4])}}b.id=Ext.id(null,"ext-anim-");Ext.fx.Manager.addAnim(b);b.addEvents("beforeanimate","afteranimate","lastframe");b.mixins.observable.constructor.call(b,a);if(a.callback){b.on("afteranimate",a.callback,a.scope)}return b},setAttr:function(a,b){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,a,b)},initAttrs:function(){var e=this,h=e.from,i=e.to,g=e.initialFrom||{},c={},a,b,j,d;for(d in i){if(i.hasOwnProperty(d)){a=e.target.getAttr(d,h[d]);b=i[d];if(!Ext.fx.PropertyHandler[d]){if(Ext.isObject(b)){j=e.propHandlers[d]=Ext.fx.PropertyHandler.object}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler.defaultHandler}}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler[d]}c[d]=j.get(a,b,e.damper,g[d],d)}}e.currentAttrs=c},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;if(!e.paused&&!e.currentAttrs){e.initAttrs()}e.running=true}},runAnim:function(l){var i=this,k=i.currentAttrs,d=i.duration,c=i.easingFn,b=i.propHandlers,g={},h,j,e,a;if(l>=d){l=d;a=true}if(i.reverse){l=d-l}for(e in k){if(k.hasOwnProperty(e)){j=k[e];h=a?1:c(l/d);g[e]=b[e].set(j,h)}}return g},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){if(c.alternate){c.reverse=!c.reverse}c.startTime=new Date();c.currentIteration=b;c.paused=false}else{c.currentIteration=0;c.end();c.fireEvent("lastframe",c,c.startTime)}},end:function(){var a=this;a.startTime=0;a.paused=false;a.running=false;Ext.fx.Manager.removeAnim(a);a.fireEvent("afteranimate",a,a.startTime)}});Ext.enableFx=true;Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(Ext.isNumber(g)){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox(),a=Ext.get(i),m=a.getScroll(),j,d=a.dom;if(d==document.body){j={x:m.left,y:m.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{var l=a.getXY();j={x:l[0],y:l[1],width:d.clientWidth,height:d.clientHeight}}var h=k.y-j.y,e=k.x-j.x;this.resetConstraints();this.setXConstraint(e-(g.left||0),j.width-e-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!=="string"){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:"default");this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&&0!==a){this.padding=[c,c,c,c]}else{if(!d&&0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl();if(!this.DDMInstance.verifyEl(e)){return}var b=d||0;var a=c||0;var g=Ext.Element.getXY(e);this.initPageX=g[0]-b;this.initPageY=g[1]-a;this.lastPageX=g[0];this.lastPageY=g[1];this.setStartPosition(g)},setStartPosition:function(b){var a=b||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}Ext.EventManager.on(a,"mousedown",this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(c,b){if(this.primaryButtonOnly&&c.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);var a=c.getPoint();if(!this.hasOuterHandles&&!this.DDMInstance.isOverTarget(a,this)){}else{if(this.clickValidator(c)){this.setStartPosition();this.b4MouseDown(c);this.onMouseDown(c);this.DDMInstance.handleMouseDown(c,this);this.DDMInstance.stopEvent(c)}else{}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c<a;++c){if(this.invalidHandleClasses[c]==b){delete this.invalidHandleClasses[c]}}},isValidHandleChild:function(d){var c=true;var h;try{h=d.nodeName.toUpperCase()}catch(g){h=d.nodeName}c=c&&!this.invalidHandleTypes[h];c=c&&!this.invalidHandleIds[d.id];for(var b=0,a=this.invalidHandleClasses.length;c&&b<a;++b){c=!Ext.fly(d).hasCls(this.invalidHandleClasses[b])}return c},setXTicks:function(d,a){this.xTicks=[];this.xTickSize=a;var c={};for(var b=this.initPageX;b>=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b<=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={};for(var b=this.initPageY;b>=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b<=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(h,d){if(!d){return h}else{if(d[0]>=h){return d[0]}else{for(var b=0,a=d.length;b<a;++b){var c=b+1;if(d[c]&&d[c]>=h){var g=h-d[b];var e=d[c]-h;return(e>g)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var g=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),l=d.getSize(),i=Ext.Element,j;if(!this.deltaSetXY){j=this.cachedViewportSize={width:i.getDocumentWidth(),height:i.getDocumentHeight()};var a=[Math.max(0,Math.min(g.x,j.width-l.width)),Math.max(0,Math.min(g.y,j.height-l.height))];d.setXY(a);var k=d.getLeft(true);var h=d.getTop(true);this.deltaSetXY=[k-g.x,h-g.y]}else{j=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(g.x+this.deltaSetXY[0],j.width-l.width)),Math.max(0,Math.min(g.y+this.deltaSetXY[1],j.height-l.height)))}this.cachePosition(g.x,g.y);this.autoScroll(g.x,g.y,b.offsetHeight,b.offsetWidth);return g},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.Element.getViewHeight();var b=Ext.Element.getViewWidth();var q=this.DDMInstance.getScrollTop();var d=this.DDMInstance.getScrollLeft();var j=e+k;var p=m+l;var i=(n+q-k-this.deltaY);var g=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&i<c){window.scrollTo(d,q+a)}if(k<q&&q>0&&k-q<c){window.scrollTo(d,q-a)}if(p>b&&g<c){window.scrollTo(d+a,q)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,q)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=Ext.create("Ext.dd.StatusProxy",{animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d);this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},alignElWithMouse:function(){this.callParent(arguments);this.proxy.sync()},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d);if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,startDrag:function(a,b){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=Ext.create("Ext.panel.Proxy",b,a);this.callParent([b.el,a]);Ext.defer(function(){var d=b.header,c=b.body;if(d){this.setHandleElId(d.id);c=d.el}c.setStyle("cursor","move");this.scroll=false},200,this)},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.el.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.define("Ext.layout.component.Dock",{alias:["layout.dock"],extend:"Ext.layout.component.AbstractDock"});Ext.define("Ext.panel.Panel",{extend:"Ext.panel.AbstractPanel",requires:["Ext.panel.Header","Ext.fx.Anim","Ext.util.KeyMap","Ext.panel.DD","Ext.XTemplate","Ext.layout.component.Dock","Ext.util.Memento"],alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:"destroy",preventHeader:false,headerPosition:"top",frame:false,frameHeader:true,initComponent:function(){var b=this,a;b.addEvents("beforeclose","beforeexpand","beforecollapse","expand","collapse","titlechange","iconchange");this.addStateEvents("expand","collapse");if(b.unstyled){b.setUI("plain")}if(b.frame){b.setUI(b.ui+"-framed")}b.bridgeToolbars();b.callParent();b.collapseDirection=b.collapseDirection||b.headerPosition||Ext.Component.DIRECTION_TOP},setBorder:function(a){this.callParent(arguments)},beforeDestroy:function(){Ext.destroy(this.ghostPanel,this.dd);this.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},initHeaderAria:function(){var b=this,a=b.el,c=b.header;if(a&&c){a.dom.setAttribute("aria-labelledby",c.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(c){var b=this,a=this.title;b.title=c;if(b.header){b.header.setTitle(c)}else{b.updateHeader()}if(b.reExpander){b.reExpander.setTitle(c)}b.fireEvent("titlechange",b,c,a)},setIconCls:function(a){var c=this,b=c.iconCls;c.iconCls=a;var d=c.header;if(d){d.setIconCls(a)}c.fireEvent("iconchange",c,a,b)},bridgeToolbars:function(){var a=this,g=[],c,b,e=a.minButtonWidth;function d(h,j,i){if(Ext.isArray(h)){h={xtype:"toolbar",items:h}}else{if(!h.xtype){h.xtype="toolbar"}}h.dock=j;if(j=="left"||j=="right"){h.vertical=true}if(i){h.layout=Ext.applyIf(h.layout||{},{pack:{left:"start",center:"center"}[a.buttonAlign]||"end"})}return h}if(a.tbar){g.push(d(a.tbar,"top"));a.tbar=null}if(a.bbar){g.push(d(a.bbar,"bottom"));a.bbar=null}if(a.buttons){a.fbar=a.buttons;a.buttons=null}if(a.fbar){c=d(a.fbar,"bottom",true);c.ui="footer";if(e){b=c.defaults;c.defaults=function(h){var i=b||{};if((!h.xtype||h.xtype==="button"||(h.isComponent&&h.isXType("button")))&&!("minWidth" in i)){i=Ext.apply({minWidth:e},i)}return i}}g.push(c);a.fbar=null}if(a.lbar){g.push(d(a.lbar,"left"));a.lbar=null}if(a.rbar){g.push(d(a.rbar,"right"));a.rbar=null}if(a.dockedItems){if(!Ext.isArray(a.dockedItems)){a.dockedItems=[a.dockedItems]}a.dockedItems=a.dockedItems.concat(g)}else{a.dockedItems=g}},initTools:function(){var a=this;a.tools=a.tools?Ext.Array.clone(a.tools):[];if(a.collapsible&&!(a.hideCollapseTool||a.header===false)){a.collapseDirection=a.collapseDirection||a.headerPosition||"top";a.collapseTool=a.expandTool=a.createComponent({xtype:"tool",type:"collapse-"+a.collapseDirection,expandType:a.getOppositeDirection(a.collapseDirection),handler:a.toggleCollapse,scope:a});if(a.collapseFirst){a.tools.unshift(a.collapseTool)}}a.addTools();if(a.closable){a.addClsWithUI("closable");a.addTool({type:"close",handler:Ext.Function.bind(a.close,this,[])})}if(a.collapseTool&&!a.collapseFirst){a.tools.push(a.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},onRender:function(b,a){var d=this,c;d.initTools();d.updateHeader();d.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);if(a.collapsed){a.collapsed=false;a.collapse(null,false,true)}},updateHeader:function(b){var a=this,e=a.header,d=a.title,c=a.tools;if(!a.preventHeader&&(b||d||(c&&c.length))){if(!e){e=a.header=Ext.create("Ext.panel.Header",{title:d,orientation:(a.headerPosition=="left"||a.headerPosition=="right")?"vertical":"horizontal",dock:a.headerPosition||"top",textCls:a.headerTextCls,iconCls:a.iconCls,baseCls:a.baseCls+"-header",tools:c,ui:a.ui,indicateDrag:a.draggable,border:a.border,frame:a.frame&&a.frameHeader,ignoreParentFrame:a.frame||a.overlapHeader,ignoreBorderManagement:a.frame||a.ignoreHeaderBorderManagement,listeners:a.collapsible&&a.titleCollapse?{click:a.toggleCollapse,scope:a}:null});a.addDocked(e,0);a.tools=e.tools}e.show();a.initHeaderAria()}else{if(e){e.hide()}}},setUI:function(b){var a=this;a.callParent(arguments);if(a.header){a.header.setUI(b)}},getContentTarget:function(){return this.body},getTargetEl:function(){return this.body||this.frameBody||this.el},isVisible:function(a){var b=this;if(b.collapsed&&b.placeholder){return b.placeholder.isVisible(a)}return b.callParent(arguments)},onHide:function(){var a=this;if(a.collapsed&&a.placeholder){a.placeholder.hide()}else{a.callParent(arguments)}},onShow:function(){var a=this;if(a.collapsed&&a.placeholder){a.hidden=true;a.placeholder.show()}else{a.callParent(arguments)}},addTool:function(a){var b=this,c=b.header;if(Ext.isArray(a)){Ext.each(a,b.addTool,b);return}b.tools.push(a);if(c){c.addTool(a)}b.updateHeader()},getOppositeDirection:function(a){var b=Ext.Component;switch(a){case b.DIRECTION_TOP:return b.DIRECTION_BOTTOM;case b.DIRECTION_RIGHT:return b.DIRECTION_LEFT;case b.DIRECTION_BOTTOM:return b.DIRECTION_TOP;case b.DIRECTION_LEFT:return b.DIRECTION_RIGHT}},collapse:function(v,g,j){var w=this,u=Ext.Component,k=w.getHeight(),l=w.getWidth(),x,a=0,r=w.dockedItems.items,s=r.length,q=0,t,h,p={from:{height:k,width:l},to:{height:k,width:l},listeners:{afteranimate:w.afterCollapse,scope:w},duration:Ext.Number.from(g,Ext.fx.Anim.prototype.duration)},e,d,m,b,n;if(!v){v=w.collapseDirection}if(j){g=false}else{if(w.collapsed||w.fireEvent("beforecollapse",w,v,g)===false){return false}}m=v;w.expandDirection=w.getOppositeDirection(v);w.hiddenDocked=[];switch(v){case u.DIRECTION_TOP:case u.DIRECTION_BOTTOM:d="horizontal";n="height";b="getHeight";for(;q<s;q++){t=r[q];if(t.isVisible()){if(t.isXType("header",true)&&(!t.dock||t.dock=="top"||t.dock=="bottom")){e=t}else{w.hiddenDocked.push(t)}}else{if(t===w.reExpander){e=t}}}if(v==Ext.Component.DIRECTION_BOTTOM){h=w.getPosition()[1]-Ext.fly(w.el.dom.offsetParent).getRegion().top;p.from.top=h}break;case u.DIRECTION_LEFT:case u.DIRECTION_RIGHT:d="vertical";n="width";b="getWidth";for(;q<s;q++){t=r[q];if(t.isVisible()){if(t.isHeader&&(t.dock=="left"||t.dock=="right")){e=t}else{w.hiddenDocked.push(t)}}else{if(t===w.reExpander){e=t}}}if(v==Ext.Component.DIRECTION_RIGHT){h=w.getPosition()[0]-Ext.fly(w.el.dom.offsetParent).getRegion().left;p.from.left=h}break;default:throw ("Panel collapse must be passed a valid Component collapse direction")}if(g&&w.collapseTool){w.collapseTool.disable()}w.addClsWithUI(w.collapsedCls);if(e&&e.rendered){e.addClsWithUI(w.collapsedCls);e.addClsWithUI(w.collapsedCls+"-"+e.dock);if(w.border&&(!w.frame||(w.frame&&Ext.supports.CSS3BorderRadius))){e.addClsWithUI(w.collapsedCls+"-border-"+e.dock)}x=e.getFrameInfo();a=e[b]()+(x?x[v]:0);e.removeClsWithUI(w.collapsedCls);e.removeClsWithUI(w.collapsedCls+"-"+e.dock);if(w.border&&(!w.frame||(w.frame&&Ext.supports.CSS3BorderRadius))){e.removeClsWithUI(w.collapsedCls+"-border-"+e.dock)}}else{e={hideMode:"offsets",temporary:true,title:w.title,orientation:d,dock:m,textCls:w.headerTextCls,iconCls:w.iconCls,baseCls:w.baseCls+"-header",ui:w.ui,frame:w.frame&&w.frameHeader,ignoreParentFrame:w.frame||w.overlapHeader,indicateDrag:w.draggable,cls:w.baseCls+"-collapsed-placeholder  "+Ext.baseCSSPrefix+"docked "+w.baseCls+"-"+w.ui+"-collapsed",renderTo:w.el};if(!w.hideCollapseTool){e[(e.orientation=="horizontal")?"tools":"items"]=[{xtype:"tool",type:"expand-"+w.expandDirection,handler:w.toggleCollapse,scope:w}]}e=w.reExpander=Ext.create("Ext.panel.Header",e);a=e[b]()+((e.frame)?e.frameSize[v]:0);e.hide();w.insertDocked(0,e)}w.reExpander=e;w.reExpander.addClsWithUI(w.collapsedCls);w.reExpander.addClsWithUI(w.collapsedCls+"-"+e.dock);if(w.border&&(!w.frame||(w.frame&&Ext.supports.CSS3BorderRadius))){w.reExpander.addClsWithUI(w.collapsedCls+"-border-"+w.reExpander.dock)}if(v==Ext.Component.DIRECTION_RIGHT){p.to.left=h+(l-a)}else{if(v==Ext.Component.DIRECTION_BOTTOM){p.to.top=h+(k-a)}}p.to[n]=a;if(!w.collapseMemento){w.collapseMemento=new Ext.util.Memento(w)}w.collapseMemento.capture(["width","height","minWidth","minHeight","layoutManagedHeight","layoutManagedWidth"]);w.savedFlex=w.flex;w.minWidth=0;w.minHeight=0;delete w.flex;w.suspendLayout=true;if(g){w.animate(p)}else{w.setSize(p.to.width,p.to.height);if(Ext.isDefined(p.to.left)||Ext.isDefined(p.to.top)){w.setPosition(p.to.left,p.to.top)}w.afterCollapse(false,j)}return w},afterCollapse:function(e,b){var d=this,c=0,a=d.hiddenDocked.length;d.collapseMemento.restore(["minWidth","minHeight"]);if(Ext.Component.VERTICAL_DIRECTION_Re.test(d.expandDirection)){d.layoutManagedHeight=2;d.collapseMemento.restore("width",false)}else{d.layoutManagedWidth=2;d.collapseMemento.restore("height",false)}d.saveScrollTop=d.body.dom.scrollTop;d.body.setStyle("display","none");for(;c<a;c++){d.hiddenDocked[c].hide()}if(d.reExpander){d.reExpander.updateFrame();d.reExpander.show()}d.collapsed=true;d.suspendLayout=false;if(!b){if(d.ownerCt){if(e){d.ownerCt.layout.layout()}}else{if(d.reExpander.temporary){d.doComponentLayout()}}}if(d.resizer){d.resizer.disable()}if(d.collapseTool){d.collapseTool.setType("expand-"+d.expandDirection)}if(!b){d.fireEvent("collapse",d)}if(e&&d.collapseTool){d.collapseTool.enable()}},expand:function(b){var g=this;if(!g.collapsed||g.fireEvent("beforeexpand",g,b)===false){return false}var e=0,c=g.hiddenDocked.length,j=g.expandDirection,k=g.getHeight(),a=g.getWidth(),h,d;if(b&&g.collapseTool){g.collapseTool.disable()}for(;e<c;e++){g.hiddenDocked[e].hidden=false;g.hiddenDocked[e].el.show()}if(g.reExpander){if(g.reExpander.temporary){g.reExpander.hide()}else{g.reExpander.removeClsWithUI(g.collapsedCls);g.reExpander.removeClsWithUI(g.collapsedCls+"-"+g.reExpander.dock);if(g.border&&(!g.frame||(g.frame&&Ext.supports.CSS3BorderRadius))){g.reExpander.removeClsWithUI(g.collapsedCls+"-border-"+g.reExpander.dock)}g.reExpander.updateFrame()}}if(g.collapseTool){g.collapseTool.setType("collapse-"+g.collapseDirection)}g.body.setStyle("display","");g.body.dom.scrollTop=g.saveScrollTop;g.collapsed=false;g.removeClsWithUI(g.collapsedCls);d={to:{},from:{height:k,width:a},listeners:{afteranimate:g.afterExpand,scope:g}};if((j==Ext.Component.DIRECTION_TOP)||(j==Ext.Component.DIRECTION_BOTTOM)){g.collapseMemento.restore("height",false);if(g.height===undefined){g.setCalculatedSize(g.width,null);d.to.height=g.getHeight();g.setCalculatedSize(g.width,d.from.height)}else{if(g.savedFlex){g.flex=g.savedFlex;d.to.height=g.ownerCt.layout.calculateChildBox(g).height;delete g.flex}else{d.to.height=g.height}}if(j==Ext.Component.DIRECTION_TOP){h=g.getPosition()[1]-Ext.fly(g.el.dom.offsetParent).getRegion().top;d.from.top=h;d.to.top=h-(d.to.height-k)}}else{if((j==Ext.Component.DIRECTION_LEFT)||(j==Ext.Component.DIRECTION_RIGHT)){g.collapseMemento.restore("width",false);if(g.width===undefined){g.setCalculatedSize(null,g.height);d.to.width=g.getWidth();g.setCalculatedSize(d.from.width,g.height)}else{if(g.savedFlex){g.flex=g.savedFlex;d.to.width=g.ownerCt.layout.calculateChildBox(g).width;delete g.flex}else{d.to.width=g.width}}if(j==Ext.Component.DIRECTION_LEFT){h=g.getPosition()[0]-Ext.fly(g.el.dom.offsetParent).getRegion().left;d.from.left=h;d.to.left=h-(d.to.width-a)}}}if(b){g.animate(d)}else{g.setCalculatedSize(d.to.width,d.to.height);if(d.to.x){g.setLeft(d.to.x)}if(d.to.y){g.setTop(d.to.y)}g.afterExpand(false)}return g},afterExpand:function(b){var a=this;if(a.savedFlex){a.flex=a.savedFlex;delete a.savedFlex;delete a.width;delete a.height}if(a.collapseMemento){a.collapseMemento.restoreAll()}if(b&&a.ownerCt){Ext.defer(a.ownerCt.doLayout,Ext.isIE6?1:0,a)}if(a.resizer){a.resizer.enable()}a.fireEvent("expand",a);if(b&&a.collapseTool){a.collapseTool.enable()}},toggleCollapse:function(){if(this.collapsed){this.expand(this.animCollapse)}else{this.collapse(this.collapseDirection,this.animCollapse)}return this},getKeyMap:function(){if(!this.keyMap){this.keyMap=Ext.create("Ext.util.KeyMap",this.el,this.keys)}return this.keyMap},initDraggable:function(){this.dd=Ext.create("Ext.panel.DD",this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var b=[],a=this.header.query("tool[hidden=false]");if(a.length){Ext.each(a,function(c){b.push({type:c.type})})}else{b=[{type:"placeholder"}]}return b},ghost:function(a){var d=this,b=d.ghostPanel,c=d.getBox(),e;if(!b){b=Ext.create("Ext.panel.Panel",{renderTo:d.floating?d.el.dom.parentNode:document.body,floating:{shadow:false},frame:Ext.supports.CSS3BorderRadius?d.frame:false,overlapHeader:d.overlapHeader,headerPosition:d.headerPosition,baseCls:d.baseCls,cls:d.baseCls+"-ghost "+(a||"")});d.ghostPanel=b}b.floatParent=d.floatParent;if(d.floating){b.setZIndex(Ext.Number.from(d.el.getStyle("zIndex"),0))}else{b.toFront()}e=b.header;if(e){e.suspendLayout=true;Ext.Array.forEach(e.query("tool"),function(g){e.remove(g)});e.suspendLayout=false}b.addTool(d.ghostTools());b.setTitle(d.title);b.setIconCls(d.iconCls);b.el.show();b.setPosition(c.x,c.y);b.setSize(c.width,c.height);d.el.hide();if(d.floatingItems){d.floatingItems.hide()}return b},unghost:function(b,a){var c=this;if(!c.ghostPanel){return}if(b!==false){c.el.show();if(a!==false){c.setPosition(c.ghostPanel.getPosition())}if(c.floatingItems){c.floatingItems.show()}Ext.defer(c.focus,10,c)}c.ghostPanel.el.hide()},initResizable:function(a){if(this.collapsed){a.disabled=true}this.callParent([a])}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define("Ext.layout.component.Tip",{alias:["layout.tip"],extend:"Ext.layout.component.Dock",type:"tip",onLayout:function(b,j){var h=this,c=h.owner,d=c.el,a,i,g,e,k=d.getXY();d.setXY([-9999,-9999]);this.callParent(arguments);if(!Ext.isNumber(b)){a=c.minWidth;i=c.maxWidth;if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){e=h.doAutoWidth()}else{g=d.getWidth()}if(g<a){e=a}else{if(g>i){e=i}}if(e){this.callParent([e,j])}}d.setXY(k)},doAutoWidth:function(){var d=this,b=d.owner,a=b.body,c=a.getTextWidth();if(b.header){c=Math.max(c,b.header.getWidth())}if(!Ext.isDefined(d.frameWidth)){d.frameWidth=b.el.getWidth()-a.getWidth()}c+=d.frameWidth+a.getPadding("lr");return c}});Ext.define("Ext.tip.Tip",{extend:"Ext.panel.Panel",requires:["Ext.layout.component.Tip"],alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,frame:false,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,componentLayout:"tip",closeAction:"hide",ariaRole:"tooltip",initComponent:function(){var a=this;a.floating=Ext.apply({},{shadow:a.shadow},a.self.prototype.floating);a.callParent(arguments);a.constrain=a.constrain||a.constrainPosition},showAt:function(b){var a=this;this.callParent(arguments);if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}},showBy:function(a,b){this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){var a=this;a.draggable={el:a.getDragEl(),delegate:a.header.el,constrain:a,constrainTo:a.el.getScopeParent()};Ext.Component.prototype.initDraggable.call(a)},ghost:undefined,unghost:undefined});Ext.define("Ext.tip.ToolTip",{extend:"Ext.tip.Tip",alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var a=this;a.callParent(arguments);a.lastActive=new Date();a.setTarget(a.target);a.origAnchor=a.anchor},onRender:function(b,a){var c=this;c.callParent(arguments);c.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+c.getAnchorPosition();c.anchorEl=c.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+c.anchorCls})},afterRender:function(){var a=this,b;a.callParent(arguments);b=parseInt(a.el.getZIndex(),10)||0;a.anchorEl.setStyle("z-index",b+1).setVisibilityMode(Ext.Element.DISPLAY)},setTarget:function(d){var b=this,a=Ext.get(d),c;if(b.target){c=Ext.get(b.target);b.mun(c,"mouseover",b.onTargetOver,b);b.mun(c,"mouseout",b.onTargetOut,b);b.mun(c,"mousemove",b.onMouseMove,b)}b.target=a;if(a){b.mon(a,{freezeEvent:true,mouseover:b.onTargetOver,mouseout:b.onTargetOut,mousemove:b.onMouseMove,scope:b})}if(b.anchor){b.anchorTarget=b.target}},onMouseMove:function(d){var b=this,a=b.delegate?d.getTarget(b.delegate):b.triggerElement=true,c;if(a){b.targetXY=d.getXY();if(a===b.triggerElement){if(!b.hidden&&b.trackMouse){c=b.getTargetXY();if(b.constrainPosition){c=b.el.adjustForConstraints(c,b.el.getScopeParent())}b.setPagePosition(c)}}else{b.hide();b.lastActive=new Date(0);b.onTargetOver(d)}}else{if((!b.closable&&b.isVisible())&&b.autoHide!==false){b.hide()}}},getTargetXY:function(){var j=this,d;if(j.delegate){j.anchorTarget=j.triggerElement}if(j.anchor){j.targetCounter++;var c=j.getOffsets(),n=(j.anchorToTarget&&!j.trackMouse)?j.el.getAlignToXY(j.anchorTarget,j.getAnchorAlign()):j.targetXY,a=Ext.Element.getViewWidth()-5,i=Ext.Element.getViewHeight()-5,l=document.documentElement,e=document.body,m=(l.scrollLeft||e.scrollLeft||0)+5,k=(l.scrollTop||e.scrollTop||0)+5,b=[n[0]+c[0],n[1]+c[1]],h=j.getSize(),g=j.constrainPosition;j.anchorEl.removeCls(j.anchorCls);if(j.targetCounter<2&&g){if(b[0]<m){if(j.anchorToTarget){j.defaultAlign="l-r";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="left";return j.getTargetXY()}if(b[0]+h.width>a){if(j.anchorToTarget){j.defaultAlign="r-l";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="right";return j.getTargetXY()}if(b[1]<k){if(j.anchorToTarget){j.defaultAlign="t-b";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="top";return j.getTargetXY()}if(b[1]+h.height>i){if(j.anchorToTarget){j.defaultAlign="b-t";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="bottom";return j.getTargetXY()}}j.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+j.getAnchorPosition();j.anchorEl.addCls(j.anchorCls);j.targetCounter=0;return b}else{d=j.getMouseOffset();return(j.targetXY)?[j.targetXY[0]+d[0],j.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&&!c.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-c.anchorOffset,30];break;case"b":b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case"r":b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.clearTimer("hide");b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&&!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)<a.quickShowInterval){a.show()}else{a.showTimer=Ext.defer(a.show,a.showDelay,a)}}else{if(!a.hidden&&a.autoHide!==false){a.show()}}},onTargetOut:function(b){var a=this;if(a.disabled||b.within(a.target.dom,true)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},delayHide:function(){var a=this;if(!a.hidden&&!a.hideTimer){a.hideTimer=Ext.defer(a.hide,a.hideDelay,a)}},hide:function(){var a=this;a.clearTimer("dismiss");a.lastActive=new Date();if(a.anchorEl){a.anchorEl.hide()}a.callParent(arguments);delete a.triggerElement},show:function(){var a=this;this.callParent();if(this.hidden===false){a.setPagePosition(-10000,-10000);if(a.anchor){a.anchor=a.origAnchor}a.showAt(a.getTargetXY());if(a.anchor){a.syncAnchor();a.anchorEl.show()}else{a.anchorEl.hide()}}},showAt:function(b){var a=this;a.lastActive=new Date();a.clearTimers();if(!a.isVisible()){this.callParent(arguments)}if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}if(a.dismissDelay&&a.autoHide!==false){a.dismissTimer=Ext.defer(a.hide,a.dismissDelay,a)}if(a.anchor){a.syncAnchor();if(!a.anchorEl.isVisible()){a.anchorEl.show()}}else{a.anchorEl.hide()}},syncAnchor:function(){var c=this,a,b,d;switch(c.tipAnchor.charAt(0)){case"t":a="b";b="tl";d=[20+c.anchorOffset,1];break;case"r":a="l";b="tr";d=[-1,12+c.anchorOffset];break;case"b":a="t";b="bl";d=[20+c.anchorOffset,-1];break;default:a="r";b="tl";d=[1,12+c.anchorOffset];break}c.anchorEl.alignTo(c.el,a+"-"+b,d)},setPagePosition:function(a,c){var b=this;b.callParent(arguments);if(b.anchor){b.syncAnchor()}},clearTimer:function(a){a=a+"Timer";clearTimeout(this[a]);delete this[a]},clearTimers:function(){var a=this;a.clearTimer("show");a.clearTimer("dismiss");a.clearTimer("hide")},onShow:function(){var a=this;a.callParent();a.mon(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onHide:function(){var a=this;a.callParent();a.mun(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onDocMouseDown:function(b){var a=this;if(a.autoHide!==true&&!a.closable&&!b.within(a.el.dom)){a.disable();Ext.defer(a.doEnable,100,a)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var a=this;a.clearTimers();Ext.destroy(a.anchorEl);delete a.anchorEl;delete a.target;delete a.anchorTarget;delete a.triggerElement;a.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.tip.QuickTip",{extend:"Ext.tip.ToolTip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:"&#160;",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){var a=this;a.target=a.target||Ext.getDoc();a.targets=a.targets||{};a.callParent()},register:function(c){var h=Ext.isArray(c)?c:arguments,d=0,a=h.length,g,b,e;for(;d<a;d++){c=h[d];g=c.target;if(g){if(Ext.isArray(g)){for(b=0,e=g.length;b<e;b++){this.targets[Ext.id(g[b])]=c}}else{this.targets[Ext.id(g)]=c}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(a){var b=this,c=b.activeTarget;a=Ext.get(a).dom;if(b.isVisible()){if(c&&c.el==a){b.hide()}}else{if(c&&c.el==a){b.clearTimer("show")}}},getTipCfg:function(d){var c=d.getTarget(),b=c.title,a;if(this.interceptTitles&&b&&Ext.isString(b)){c.qtip=b;c.removeAttribute("title");d.preventDefault();return{text:b}}else{a=this.tagConfig;c=d.getTarget("["+a.namespace+a.attribute+"]");if(c){return{target:c,text:c.getAttribute(a.namespace+a.attribute)}}}},onTargetOver:function(i){var g=this,h=i.getTarget(),j,c,d,b,a;if(g.disabled){return}g.targetXY=i.getXY();if(!h||h.nodeType!==1||h==document||h==document.body){return}if(g.activeTarget&&((h==g.activeTarget.el)||Ext.fly(g.activeTarget.el).contains(h))){g.clearTimer("hide");g.show();return}if(h){Ext.Object.each(g.targets,function(e,k){var l=Ext.fly(k.target);if(l&&(l.dom===h||l.contains(h))){j=l.dom;return false}});if(j){g.activeTarget=g.targets[j.id];g.activeTarget.el=h;g.anchor=g.activeTarget.anchor;if(g.anchor){g.anchorTarget=h}g.delayShow();return}}j=Ext.get(h);c=g.tagConfig;d=c.namespace;b=g.getTipCfg(i);if(b){if(b.target){h=b.target;j=Ext.get(h)}a=j.getAttribute(d+c.hide);g.activeTarget={el:h,text:b.text,width:+j.getAttribute(d+c.width)||null,autoHide:a!="user"&&a!=="false",title:j.getAttribute(d+c.title),cls:j.getAttribute(d+c.cls),align:j.getAttribute(d+c.align)};g.anchor=j.getAttribute(d+c.anchor);if(g.anchor){g.anchorTarget=h}g.delayShow()}},onTargetOut:function(b){var a=this;if(a.activeTarget&&b.within(a.activeTarget.el)&&!a.getTipCfg(b)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},showAt:function(c){var a=this,b=a.activeTarget;if(b){if(!a.rendered){a.render(Ext.getBody());a.activeTarget=b}if(b.title){a.setTitle(b.title||"");a.header.show()}else{a.header.hide()}a.body.update(b.text);a.autoHide=b.autoHide;a.dismissDelay=b.dismissDelay||a.dismissDelay;if(a.lastCls){a.el.removeCls(a.lastCls);delete a.lastCls}if(b.cls){a.el.addCls(b.cls);a.lastCls=b.cls}a.setWidth(b.width);if(a.anchor){a.constrainPosition=false}else{if(b.align){c=a.el.getAlignToXY(b.el,b.align);a.constrainPosition=false}else{a.constrainPosition=true}}}a.callParent([c])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",function(){var b,a=false;return{requires:["Ext.tip.QuickTip"],singleton:true,alternateClassName:"Ext.QuickTips",init:function(g,d){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(g)});return}var c=Ext.apply({disabled:a},d),e=c.className,h=c.xtype;if(e){delete c.className}else{if(h){e="widget."+h;delete c.xtype}}if(g!==false){c.renderTo=document.body}b=Ext.create(e||"Ext.tip.QuickTip",c)}},destroy:function(){if(b){var c;b.destroy();b=c}},ddDisable:function(){if(b&&!a){b.disable()}},ddEnable:function(){if(b&&!a){b.enable()}},enable:function(){if(b){b.enable()}a=false},disable:function(){if(b){b.disable()}a=true},isEnabled:function(){return b!==undefined&&!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}());Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.ModelManager","Ext.data.Model","Ext.data.StoreManager","Ext.tip.QuickTipManager","Ext.ComponentManager","Ext.app.EventBus"],scope:undefined,enableQuickTips:true,appFolder:"app",autoCreateViewport:false,constructor:function(b){b=b||{};Ext.apply(this,b);var d=b.requires||[];Ext.Loader.setPath(this.name,this.appFolder);if(this.paths){Ext.Object.each(this.paths,function(h,i){Ext.Loader.setPath(h,i)})}this.callParent(arguments);this.eventbus=Ext.create("Ext.app.EventBus");var g=Ext.Array.from(this.controllers),e=g&&g.length,c,a;this.controllers=Ext.create("Ext.util.MixedCollection");if(this.autoCreateViewport){d.push(this.getModuleClassName("Viewport","view"))}for(c=0;c<e;c++){d.push(this.getModuleClassName(g[c],"controller"))}Ext.require(d);Ext.onReady(function(){for(c=0;c<e;c++){a=this.getController(g[c]);a.init(this)}this.onBeforeLaunch.call(this)},this)},control:function(b,c,a){this.eventbus.control(b,c,a)},launch:Ext.emptyFn,onBeforeLaunch:function(){if(this.enableQuickTips){Ext.tip.QuickTipManager.init()}if(this.autoCreateViewport){this.getView("Viewport").create()}this.launch.call(this.scope||this);this.launched=true;this.fireEvent("launch",this);this.controllers.each(function(a){a.onLaunch(this)},this)},getModuleClassName:function(a,c){var b=Ext.Loader.getPrefix(a);if(b.length>0&&b!==a){return a}return this.name+"."+c+"."+a},getController:function(b){var a=this.controllers.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"controller"),{application:this,id:b});this.controllers.add(a)}return a},getStore:function(b){var a=Ext.StoreManager.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"store"),{storeId:b})}return a},getModel:function(a){a=this.getModuleClassName(a,"model");return Ext.ModelManager.getModel(a)},getView:function(a){a=this.getModuleClassName(a,"view");return Ext.ClassManager.get(a)}});Ext.define("Ext.chart.Callout",{constructor:function(a){if(a.callouts){a.callouts.styles=Ext.applyIf(a.callouts.styles||{},{color:"#000",font:"11px Helvetica, sans-serif"});this.callouts=Ext.apply(this.callouts||{},a.callouts);this.calloutsArray=[]}},renderCallouts:function(){if(!this.callouts){return}var w=this,m=w.items,a=w.chart.animate,v=w.callouts,h=v.styles,e=w.calloutsArray,b=w.chart.store,t=b.getCount(),d=m.length/t,l=[],s,c,r,n;for(s=0,c=0;s<t;s++){for(r=0;r<d;r++){var u=m[c],g=e[c],k=b.getAt(s),q;q=v.filter(k);if(!q&&!g){c++;continue}if(!g){e[c]=g=w.onCreateCallout(k,u,s,q,r,c)}for(n in g){if(g[n]&&g[n].setAttributes){g[n].setAttributes(h,true)}}if(!q){for(n in g){if(g[n]){if(g[n].setAttributes){g[n].setAttributes({hidden:true},true)}else{if(g[n].setVisible){g[n].setVisible(false)}}}}}v.renderer(g,k);w.onPlaceCallout(g,k,u,s,q,a,r,c,l);l.push(g);c++}}this.hideCallouts(c)},onCreateCallout:function(g,n,e,j){var k=this,l=k.calloutsGroup,d=k.callouts,p=d.styles,c=p.width,m=p.height,h=k.chart,b=h.surface,a={lines:false};a.lines=b.add(Ext.apply({},{type:"path",path:"M0,0",stroke:k.getLegendColor()||"#555"},p));if(d.items){a.panel=Ext.create("widget.panel",{style:"position: absolute;",width:c,height:m,items:d.items,renderTo:h.el})}return a},hideCallouts:function(b){var d=this.calloutsArray,a=d.length,e,c;while(a-->b){e=d[a];for(c in e){if(e[c]){e[c].hide(true)}}}}});Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("mousedown","mouseup","mouseover","mouseout","click");b.id=Ext.id(null,"ext-sprite-group-");b.callParent()},onClick:function(a){this.fireEvent("click",a)},onMouseUp:function(a){this.fireEvent("mouseup",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)},onMouseOver:function(a){this.fireEvent("mouseover",a)},onMouseOut:function(a){this.fireEvent("mouseout",a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});return a.callParent(arguments)},getBBox:function(){var e=0,n,j,k=this.items,g=this.length,h=Infinity,c=h,m=-h,b=h,l=-h,d,a;for(;e<g;e++){n=k[e];if(n.el){j=n.getBBox();c=Math.min(c,j.x);b=Math.min(b,j.y);m=Math.max(m,j.height+j.y);l=Math.max(l,j.width+j.x)}}return{x:c,y:b,height:m-b,width:l-c}},setAttributes:function(c,e){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].setAttributes(c,e)}return this},hide:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].hide(d)}return this},show:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].show(d)}return this},redraw:function(){var e=this,d=0,c=e.items,b=e.getSurface(),a=e.length;if(b){for(;d<a;d++){b.renderItem(c[d])}}return e},setStyle:function(g){var c=0,b=this.items,a=this.length,e,d;for(;c<a;c++){e=b[c];d=e.el;if(d){d.setStyle(g)}}},addCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.addCls(c[d],e)}}},removeCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.removeCls(c[d],e)}}},getSurface:function(){var a=this.first();if(a){return a.surface}return null},destroy:function(){var c=this,a=c.getSurface(),b;if(a){while(c.getCount()>0){b=c.first();c.remove(b);a.remove(b)}}c.clearListeners()}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:"Ext.layout.component.Component",type:"autocomponent",onLayout:function(b,a){this.setTargetSize(b,a)}});Ext.define("Ext.chart.theme.Theme",{requires:["Ext.draw.Color"],theme:"Base",themeAttrs:false,initTheme:function(e){var d=this,b=Ext.chart.theme,c,a;if(e){e=e.split(":");for(c in b){if(c==e[0]){a=e[1]=="gradients";d.themeAttrs=new b[c]({useGradients:a});if(a){d.gradients=d.themeAttrs.gradients}if(d.themeAttrs.background){d.background=d.themeAttrs.background}return}}}}},function(){(function(){Ext.chart.theme=function(c,b){c=c||{};var k=0,h,a,j,q,r,e,n,p,m=[],d,g;if(c.baseColor){d=Ext.draw.Color.fromString(c.baseColor);g=d.getHSL()[2];if(g<0.15){d=d.getLighter(0.3)}else{if(g<0.3){d=d.getLighter(0.15)}else{if(g>0.85){d=d.getDarker(0.3)}else{if(g>0.7){d=d.getDarker(0.15)}}}}c.colors=[d.getDarker(0.3).toString(),d.getDarker(0.15).toString(),d.toString(),d.getLighter(0.15).toString(),d.getLighter(0.3).toString()];delete c.baseColor}if(c.colors){a=c.colors.slice();r=b.markerThemes;q=b.seriesThemes;h=a.length;b.colors=a;for(;k<h;k++){j=a[k];n=r[k]||{};e=q[k]||{};n.fill=e.fill=n.stroke=e.stroke=j;r[k]=n;q[k]=e}b.markerThemes=r.slice(0,h);b.seriesThemes=q.slice(0,h)}for(p in b){if(p in c){if(Ext.isObject(c[p])&&Ext.isObject(b[p])){Ext.apply(b[p],c[p])}else{b[p]=c[p]}}}if(c.useGradients){a=b.colors||(function(){var i=[];for(k=0,q=b.seriesThemes,h=q.length;k<h;k++){i.push(q[k].fill||q[k].stroke)}return i})();for(k=0,h=a.length;k<h;k++){d=Ext.draw.Color.fromString(a[k]);if(d){j=d.getDarker(0.1).toString();d=d.toString();p="theme-"+d.substr(1)+"-"+j.substr(1);m.push({id:p,angle:45,stops:{0:{color:d.toString()},100:{color:j.toString()}}});a[k]="url(#"+p+")"}}b.gradients=m;b.colors=a}Ext.apply(this,b)}})()});Ext.define("Ext.chart.Mask",{require:["Ext.chart.MaskLayer"],constructor:function(a){var b=this;b.addEvents("select");if(a){Ext.apply(b,a)}if(b.mask){b.on("afterrender",function(){var c=Ext.create("Ext.chart.MaskLayer",{renderTo:b.el});c.el.on({mousemove:function(g){b.onMouseMove(g)},mouseup:function(g){b.resized(g)}});var d=Ext.create("Ext.resizer.Resizer",{el:c.el,handles:"all",pinned:true});d.on({resize:function(g){b.resized(g)}});c.initDraggable();b.maskType=b.mask;b.mask=c;b.maskSprite=b.surface.add({type:"path",path:["M",0,0],zIndex:1001,opacity:0.7,hidden:true,stroke:"#444"})},b,{single:true})}},resized:function(d){var g=this,l=g.bbox||g.chartBBox,j=l.x,i=l.y,a=l.width,m=l.height,c=g.mask.getBox(true),h=Math.max,b=Math.min,n=c.x-j,k=c.y-i;n=h(n,j);k=h(k,i);n=b(n,a);k=b(k,m);c.x=n;c.y=k;g.fireEvent("select",g,c)},onMouseUp:function(c){var a=this,d=a.bbox||a.chartBBox,b=a.maskSelection;a.maskMouseDown=false;a.mouseDown=false;if(a.mouseMoved){a.onMouseMove(c);a.mouseMoved=false;a.fireEvent("select",a,{x:b.x-d.x,y:b.y-d.y,width:b.width,height:b.height})}},onMouseDown:function(b){var a=this;a.mouseDown=true;a.mouseMoved=false;a.maskMouseDown={x:b.getPageX()-a.el.getX(),y:b.getPageY()-a.el.getY()}},onMouseMove:function(u){var v=this,p=v.maskType,a=v.bbox||v.chartBBox,i=a.x,h=a.y,b=Math,r=b.floor,j=b.abs,n=b.min,q=b.max,k=r(h+a.height),m=r(i+a.width),d=u.getPageX(),c=u.getPageY(),t=d-v.el.getX(),s=c-v.el.getY(),g=v.maskMouseDown,l;v.mouseMoved=v.mouseDown;t=q(t,i);s=q(s,h);t=n(t,m);s=n(s,k);if(g&&v.mouseDown){if(p=="horizontal"){s=h;g.y=k;c=v.el.getY()+a.height+v.insetPadding}else{if(p=="vertical"){t=i;g.x=m}}m=g.x-t;k=g.y-s;l=["M",t,s,"l",m,0,0,k,-m,0,"z"];v.maskSelection={x:m>0?t:t+m,y:k>0?s:s+k,width:j(m),height:j(k)};v.mask.updateBox(v.maskSelection);v.mask.show();v.maskSprite.setAttributes({hidden:true},true)}else{if(p=="horizontal"){l=["M",t,h,"L",t,k]}else{if(p=="vertical"){l=["M",i,s,"L",m,s]}else{l=["M",t,h,"L",t,k,"M",i,s,"L",m,s]}}v.maskSprite.setAttributes({path:l,fill:v.maskMouseDown?v.maskSprite.stroke:false,"stroke-width":p===true?1:3,hidden:false},true)}},onMouseLeave:function(b){var a=this;a.mouseMoved=false;a.mouseDown=false;a.maskMouseDown=false;a.mask.hide();a.maskSprite.hide(true)}});Ext.define("Ext.chart.Navigation",{constructor:function(){this.originalStore=this.store},setZoom:function(a){var c=this,g=c.axes,h=c.chartBBox,e=1/h.width,b=1/h.height,d={x:a.x*e,y:a.y*b,width:a.width*e,height:a.height*b};g.each(function(j){var i=j.calcEnds();if(j.position=="bottom"||j.position=="top"){var l=(i.to-i.from)*d.x+i.from,k=(i.to-i.from)*d.width+l;j.minimum=l;j.maximum=k}else{var k=(i.to-i.from)*(1-d.y)+i.from,l=k-(i.to-i.from)*d.height;j.minimum=l;j.maximum=k}});c.redraw(false)},restoreZoom:function(){this.store=this.substore=this.originalStore;this.redraw(true)}});Ext.define("Ext.chart.Shape",{singleton:true,circle:function(a,b){return a.add(Ext.apply({type:"circle",x:b.x,y:b.y,stroke:null,radius:b.radius},b))},line:function(a,b){return a.add(Ext.apply({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius/5},b))},square:function(a,b){return a.add(Ext.applyIf({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius,radius:null},b))},triangle:function(a,b){b.radius*=1.75;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(b.x,",",b.y,"m0-",b.radius*0.58,"l",b.radius*0.5,",",b.radius*0.87,"-",b.radius,",0z")},b))},diamond:function(a,c){var b=c.radius;b*=1.5;return a.add(Ext.apply({type:"path",stroke:null,path:["M",c.x,c.y-b,"l",b,b,-b,b,-b,-b,b,-b,"z"]},c))},cross:function(a,c){var b=c.radius;b=b/1.7;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b,",",c.y,"l",[-b,-b,b,-b,b,b,b,-b,b,b,-b,b,b,b,-b,b,-b,-b,-b,b,-b,-b,"z"])},c))},plus:function(a,c){var b=c.radius/1.3;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b/2,",",c.y-b/2,"l",[0,-b,b,0,0,b,b,0,0,b,-b,0,0,b,-b,0,0,-b,-b,0,0,-b,"z"])},c))},arrow:function(a,c){var b=c.radius;return a.add(Ext.apply({type:"path",path:"M".concat(c.x-b*0.7,",",c.y-b*0.4,"l",[b*0.6,0,0,-b*0.4,b,b*0.8,-b,b*0.8,0,-b*0.4,-b*0.6,0],"z")},c))},drop:function(b,a,g,e,c,d){c=c||30;d=d||0;b.add({type:"path",path:["M",a,g,"l",c,0,"A",c*0.4,c*0.4,0,1,0,a+c*0.7,g-c*0.7,"z"],fill:"#000",stroke:"none",rotate:{degrees:22.5-d,x:a,y:g}});d=(d+90)*Math.PI/180;b.add({type:"text",x:a+c*Math.sin(d)-10,y:g+c*Math.cos(d)+5,text:e,"font-size":c*12/40,stroke:"none",fill:"#fff"})}});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml"],separatorRe:/[, ]+/,statics:{create:function(b,d){d=d||["Svg","Vml"];var c=0,a=d.length,e;for(;c<a;c++){if(Ext.supports[d[c]]){return Ext.create("Ext.draw.engine."+d[c],b)}}return false}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.domRef=Ext.getDoc().dom;b.customAttributes={};b.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click");b.mixins.observable.constructor.call(b);b.getId();b.initGradients();b.initItems();if(b.renderTo){b.render(b.renderTo);delete b.renderTo}b.initBackground(a.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){var a=this.gradients;if(a){Ext.each(a,this.addGradient,this)}},initItems:function(){var a=this.items;this.items=Ext.create("Ext.draw.CompositeSprite");this.groups=Ext.create("Ext.draw.CompositeSprite");if(a){this.add(a)}},initBackground:function(b){var e=this,d=e.width,a=e.height,g,h,c;if(b){if(b.gradient){h=b.gradient;g=h.id;e.addGradient(h);e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:"url(#"+g+")"})}else{if(b.fill){e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:b.fill})}else{if(b.image){e.background=e.add({type:"image",x:0,y:0,width:d,height:a,src:b.image})}}}}},setSize:function(a,b){if(this.background){this.background.setAttributes({width:a,height:b,hidden:false},true)}this.applyViewBox()},scrubAttrs:function(d){var c,b={},a={},e=d.attr;for(c in e){if(this.translateAttrs.hasOwnProperty(c)){b[this.translateAttrs[c]]=e[c];a[this.translateAttrs[c]]=true}else{if(this.availableAttrs.hasOwnProperty(c)&&!a[c]){b[c]=e[c]}}}return b},onClick:function(a){this.processEvent("click",a)},onMouseUp:function(a){this.processEvent("mouseup",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onMouseOver:function(a){this.processEvent("mouseover",a)},onMouseOut:function(a){this.processEvent("mouseout",a)},onMouseMove:function(a){this.fireEvent("mousemove",a)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var g=Array.prototype.slice.call(arguments),j,d;var a=g.length>1;if(a||Ext.isArray(g[0])){var h=a?g:g[0],b=[],c,e,k;for(c=0,e=h.length;c<e;c++){k=h[c];k=this.add(k);b.push(k)}return b}j=this.prepareItems(g[0],true)[0];this.insertByZIndex(j);this.onAdd(j);return j},insertByZIndex:function(j){var g=this,d=g.items.items,c=d.length,k=Math.ceil,h=j.attr.zIndex,i=c,b=i-1,e=0,a;if(g.orderSpritesByZIndex&&c&&h<d[b].attr.zIndex){while(e<=b){i=k((e+b)/2);a=d[i].attr.zIndex;if(a>h){b=i-1}else{if(a<h){e=i+1}else{break}}}while(i<c&&d[i].attr.zIndex<=h){i++}}g.items.insert(i,j);return i},onAdd:function(d){var g=d.group,b=d.draggable,a,e,c;if(g){a=[].concat(g);e=a.length;for(c=0;c<e;c++){g=a[c];this.getGroup(g).add(d)}delete d.group}if(b){d.initDraggable()}},remove:function(a,b){if(a){this.items.remove(a);this.groups.each(function(c){c.remove(a)});a.onRemove();if(b===true){a.destroy()}}},removeAll:function(d){var a=this.items.items,c=a.length,b;for(b=c-1;b>-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,l=d.viewBox,a=d.width,h=d.height,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;if(j*i<a){g-=(a-j*i)/2/i}if(b*c<h){e-=(h-b*c)/2/c}k=1/Math.min(j,i);d.viewBoxShift={dx:-g,dy:-e,scale:k}}},transformToViewBox:function(a,d){if(this.viewBoxShift){var c=this,b=c.viewBoxShift;return[a*b.scale-b.dx,d*b.scale-b.dy]}else{return[a,d]}},applyTransformations:function(b){b.bbox.transform=0;this.transform(b);var d=this,c=false,a=b.attr;if(a.translation.x!=null||a.translation.y!=null){d.translate(b);c=true}if(a.scaling.x!=null||a.scaling.y!=null){d.scale(b);c=true}if(a.rotation.degrees!=null){d.rotate(b);c=true}if(c){b.bbox.transform=0;this.transform(b);b.transformations=[]}},rotate:function(a){var e,b=a.attr.rotation.degrees,d=a.attr.rotation.x,c=a.attr.rotation.y;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(a);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}a.transformations.push({type:"rotate",degrees:b,x:d,y:c})},translate:function(b){var a=b.attr.translation.x||0,c=b.attr.translation.y||0;b.transformations.push({type:"translate",x:a,y:c})},scale:function(b){var e,a=b.attr.scaling.x||1,g=b.attr.scaling.y||1,d=b.attr.scaling.centerX,c=b.attr.scaling.centerY;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(b);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}b.transformations.push({type:"scale",x:a,y:g,centerX:d,centerY:c})},rectPath:function(a,e,b,c,d){if(d){return[["M",a+d,e],["l",b-d*2,0],["a",d,d,0,0,1,d,d],["l",0,c-d*2],["a",d,d,0,0,1,-d,d],["l",d*2-b,0],["a",d,d,0,0,1,-d,-d],["l",0,d*2-c],["a",d,d,0,0,1,d,-d],["z"]]}return[["M",a,e],["l",b,0],["l",0,c],["l",-b,0],["z"]]},ellipsePath:function(a,d,c,b){if(b==null){b=c}return[["M",a,d],["m",0,-b],["a",c,b,0,1,1,0,2*b],["a",c,b,0,1,1,0,-2*b],["z"]]},getPathpath:function(a){return a.attr.path},getPathcircle:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radius,b.radius)},getPathellipse:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radiusX||(b.width/2)||0,b.radiusY||(b.height/2)||0)},getPathrect:function(c){var b=c.attr;return this.rectPath(b.x,b.y,b.width,b.height,b.r)},getPathimage:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width,b.height)},getPathtext:function(a){var b=this.getBBoxText(a);return this.rectPath(b.x,b.y,b.width,b.height)},createGroup:function(b){var a=this.groups.get(b);if(!a){a=Ext.create("Ext.draw.CompositeSprite",{surface:this});a.id=b||Ext.id(null,"ext-surface-group-");this.groups.add(a)}return a},getGroup:function(b){if(typeof b=="string"){var a=this.groups.get(b);if(!a){a=this.createGroup(b)}}else{a=b}return a},prepareItems:function(a,c){a=[].concat(a);var e,b,d;for(b=0,d=a.length;b<d;b++){e=a[b];if(!(e instanceof Ext.draw.Sprite)){e.surface=this;a[b]=this.createItem(e)}else{e.surface=this}}return a},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){delete this.domRef;this.removeAll()}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",onLayout:function(b,a){this.owner.surface.setSize(b,a);this.callParent(arguments)}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:"Ext.Component",requires:["Ext.draw.Surface","Ext.layout.component.Draw"],enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click")},onRender:function(){var d=this,j=d.viewBox,b=d.autoSize,h,c,a,i,g,e;d.callParent(arguments);if(d.createSurface()!==false){c=d.surface.items;if(j||b){h=c.getBBox();a=h.width;i=h.height;g=h.x;e=h.y;if(d.viewBox){d.surface.setViewBox(g,e,a,i)}else{d.autoSizeSurface()}}}},autoSizeSurface:function(){var d=this,b=d.surface.items,e=b.getBBox(),c=e.width,a=e.height;b.setAttributes({translate:{x:-e.x,y:-e.y+(+Ext.isOpera)}},true);if(d.rendered){d.setSize(c,a);d.surface.setSize(c,a)}else{d.surface.setSize(c,a)}d.el.setSize(c,a)},createSurface:function(){var a=Ext.draw.Surface.create(Ext.apply({},{width:this.width,height:this.height,renderTo:this.el},this.initialConfig));if(!a){return false}this.surface=a;function b(c){return function(d){this.fireEvent(c,d)}}a.on({scope:this,mouseup:b("mouseup"),mousedown:b("mousedown"),mousemove:b("mousemove"),mouseenter:b("mouseenter"),mouseleave:b("mouseleave"),click:b("click")})},onDestroy:function(){var a=this.surface;if(a){a.destroy()}this.callParent(arguments)}});Ext.define("Ext.chart.LegendItem",{extend:"Ext.draw.CompositeSprite",requires:["Ext.chart.Shape"],x:0,y:0,zIndex:500,constructor:function(a){this.callParent(arguments);this.createLegend(a)},createLegend:function(t){var u=this,i=t.yFieldIndex,l=u.series,a=l.type,m=u.yFieldIndex,d=u.legend,q=u.surface,r=d.x+u.x,n=d.y+u.y,c,k=u.zIndex,b,j,s,e,p=false,h=Ext.apply(l.seriesStyle,l.style);function g(v){var w=l[v];return(Ext.isArray(w)?w[m]:w)}j=u.add("label",q.add({type:"text",x:20,y:0,zIndex:k||0,font:d.labelFont,text:g("title")||g("yField")}));if(a==="line"||a==="scatter"){if(a==="line"){u.add("line",q.add({type:"path",path:"M0.5,0.5L16.5,0.5",zIndex:k,"stroke-width":l.lineWidth,"stroke-linejoin":"round","stroke-dasharray":l.dash,stroke:h.stroke||"#000",style:{cursor:"pointer"}}))}if(l.showMarkers||a==="scatter"){b=Ext.apply(l.markerStyle,l.markerConfig||{});u.add("marker",Ext.chart.Shape[b.type](q,{fill:b.fill,x:8.5,y:0.5,zIndex:k,radius:b.radius||b.size,style:{cursor:"pointer"}}))}}else{u.add("box",q.add({type:"rect",zIndex:k,x:0,y:0,width:12,height:12,fill:l.getLegendColor(i),style:{cursor:"pointer"}}))}u.setAttributes({hidden:false},true);c=u.getBBox();s=u.add("mask",q.add({type:"rect",x:c.x,y:c.y,width:c.width||20,height:c.height||20,zIndex:(k||0)+1000,fill:"#f00",opacity:0,style:{cursor:"pointer"}}));u.on("mouseover",function(){j.setStyle({"font-weight":"bold"});s.setStyle({cursor:"pointer"});l._index=i;l.highlightItem()},u);u.on("mouseout",function(){j.setStyle({"font-weight":"normal"});l._index=i;l.unHighlightItem()},u);if(!l.visibleInLegend(i)){p=true;j.setAttributes({opacity:0.5},true)}u.on("mousedown",function(){if(!p){l.hideAll();j.setAttributes({opacity:0.5},true)}else{l.showAll();j.setAttributes({opacity:1},true)}p=!p},u);u.updatePosition({x:0,y:0})},updatePosition:function(c){var g=this,a=g.items,e=a.length,b=0,d;if(!c){c=g.legend}for(;b<e;b++){d=a[b];switch(d.type){case"text":d.setAttributes({x:20+c.x+g.x,y:c.y+g.y},true);break;case"rect":d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y-6}},true);break;default:d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y}},true)}}}});Ext.define("Ext.chart.Legend",{requires:["Ext.chart.LegendItem"],visible:true,position:"bottom",x:0,y:0,labelFont:"12px Helvetica, sans-serif",boxStroke:"#000",boxStrokeWidth:1,boxFill:"#FFF",itemSpacing:10,padding:5,width:0,height:0,boxZIndex:100,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.items=[];b.isVertical=("left|right|float".indexOf(b.position)!==-1);b.origX=b.x;b.origY=b.y},create:function(){var a=this;a.createBox();a.createItems();if(!a.created&&a.isDisplayed()){a.created=true;a.chart.series.each(function(b){b.on("titlechange",function(){a.create();a.updatePosition()})})}},isDisplayed:function(){return this.visible&&this.chart.series.findIndex("showInLegend",true)!==-1},createItems:function(){var B=this,n=B.chart,t=n.surface,q=B.items,m=B.padding,C=B.itemSpacing,j=2,w=0,s=0,e=0,A=0,b=B.isVertical,d=Math,c=d.floor,D=d.max,h=0,u=0,v=q?q.length:0,l,k,g,z,a,p,r;if(v){for(;u<v;u++){q[u].destroy()}}q.length=[];n.series.each(function(y,x){if(y.showInLegend){Ext.each([].concat(y.yField),function(E,i){z=Ext.create("Ext.chart.LegendItem",{legend:this,series:y,surface:n.surface,yFieldIndex:i});a=z.getBBox();r=a.width;p=a.height;if(x+i===0){g=b?m+p/2:m}else{g=C/(b?2:1)}z.x=c(b?m:e+g);z.y=c(b?A+g:m+p/2);e+=r+g;A+=p+g;w=D(w,r);s=D(s,p);q.push(z)},this)}},B);B.width=c((b?w:e)+m*2);if(b&&q.length===1){j=1}B.height=c((b?A-j*g:s)+(m*2));B.itemHeight=s},getBBox:function(){var a=this;return{x:Math.round(a.x)-a.boxStrokeWidth/2,y:Math.round(a.y)-a.boxStrokeWidth/2,width:a.width,height:a.height}},createBox:function(){var b=this,a;if(b.boxSprite){b.boxSprite.destroy()}a=b.boxSprite=b.chart.surface.add(Ext.apply({type:"rect",stroke:b.boxStroke,"stroke-width":b.boxStrokeWidth,fill:b.boxFill,zIndex:b.boxZIndex},b.getBBox()));a.redraw()},updatePosition:function(){var i=this,l,j,n=i.width,m=i.height,k=i.padding,h=i.chart,p=h.chartBBox,b=h.insetPadding,d=p.width-(b*2),c=p.height-(b*2),g=p.x+b,e=p.y+b,a=h.surface,q=Math.floor;if(i.isDisplayed()){switch(i.position){case"left":l=b;j=q(e+c/2-m/2);break;case"right":l=q(a.width-n)-b;j=q(e+c/2-m/2);break;case"top":l=q(g+d/2-n/2);j=b;break;case"bottom":l=q(g+d/2-n/2);j=q(a.height-m)-b;break;default:l=q(i.origX)+b;j=q(i.origY)+b}i.x=l;i.y=j;Ext.each(i.items,function(r){r.updatePosition()});i.boxSprite.setAttributes(i.getBBox(),true)}}});Ext.define("Ext.chart.Chart",{alias:"widget.chart",extend:"Ext.draw.Component",mixins:{themeManager:"Ext.chart.theme.Theme",mask:"Ext.chart.Mask",navigation:"Ext.chart.Navigation"},requires:["Ext.util.MixedCollection","Ext.data.StoreManager","Ext.chart.Legend","Ext.util.DelayedTask"],viewBox:false,animate:false,legend:false,insetPadding:10,enginePriority:["Svg","Vml"],background:false,constructor:function(b){var c=this,a;b=Ext.apply({},b);c.initTheme(b.theme||c.theme);if(c.gradients){Ext.apply(b,{gradients:c.gradients})}if(c.background){Ext.apply(b,{background:c.background})}if(b.animate){a={easing:"ease",duration:500};if(Ext.isObject(b.animate)){b.animate=Ext.applyIf(b.animate,a)}else{b.animate=a}}c.mixins.mask.constructor.call(c,b);c.mixins.navigation.constructor.call(c,b);c.callParent([b])},getChartStore:function(){return this.substore||this.store},initComponent:function(){var b=this,c,a;b.callParent();b.addEvents("itemmousedown","itemmouseup","itemmouseover","itemmouseout","itemclick","itemdoubleclick","itemdragstart","itemdrag","itemdragend","beforerefresh","refresh");Ext.applyIf(b,{zoom:{width:1,height:1,x:0,y:0}});b.maxGutter=[0,0];b.store=Ext.data.StoreManager.lookup(b.store);c=b.axes;b.axes=Ext.create("Ext.util.MixedCollection",false,function(d){return d.position});if(c){b.axes.addAll(c)}a=b.series;b.series=Ext.create("Ext.util.MixedCollection",false,function(d){return d.seriesId||(d.seriesId=Ext.id(null,"ext-chart-series-"))});if(a){b.series.addAll(a)}if(b.legend!==false){b.legend=Ext.create("Ext.chart.Legend",Ext.applyIf({chart:b},b.legend))}b.on({mousemove:b.onMouseMove,mouseleave:b.onMouseLeave,mousedown:b.onMouseDown,mouseup:b.onMouseUp,scope:b})},afterComponentLayout:function(b,a){var c=this;if(Ext.isNumber(b)&&Ext.isNumber(a)){c.curWidth=b;c.curHeight=a;c.redraw(true)}this.callParent(arguments)},redraw:function(a){var d=this,c=d.chartBBox={x:0,y:0,height:d.curHeight,width:d.curWidth},b=d.legend;d.surface.setSize(c.width,c.height);d.series.each(d.initializeSeries,d);d.axes.each(d.initializeAxis,d);d.axes.each(function(e){e.processView()});d.axes.each(function(e){e.drawAxis(true)});if(b!==false){b.create()}d.alignAxes();if(d.legend!==false){b.updatePosition()}d.getMaxGutter();d.resizing=!!a;d.axes.each(d.drawAxis,d);d.series.each(d.drawCharts,d);d.resizing=false},afterRender:function(){var b,a=this;this.callParent();if(a.categoryNames){a.setCategoryNames(a.categoryNames)}if(a.tipRenderer){b=a.getFunctionRef(a.tipRenderer);a.setTipRenderer(b.fn,b.scope)}a.bindStore(a.store,true);a.refresh()},getEventXY:function(d){var c=this,b=this.surface.getRegion(),h=d.getXY(),a=h[0]-b.left,g=h[1]-b.top;return[a,g]},onClick:function(d){var c=this,a=c.getEventXY(d),b;c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemclick",b)}}}},c)},onMouseDown:function(d){var c=this,a=c.getEventXY(d),b;if(c.mask){c.mixins.mask.onMouseDown.call(c,d)}c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemmousedown",b)}}}},c)},onMouseUp:function(d){var c=this,a=c.getEventXY(d),b;if(c.mask){c.mixins.mask.onMouseUp.call(c,d)}c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemmouseup",b)}}}},c)},onMouseMove:function(i){var h=this,a=h.getEventXY(i),g,d,c,b;if(h.mask){h.mixins.mask.onMouseMove.call(h,i)}h.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){g=e.getItemForPoint(a[0],a[1]);d=e._lastItemForPoint;c=e._lastStoreItem;b=e._lastStoreField;if(g!==d||g&&(g.storeItem!=c||g.storeField!=b)){if(d){e.fireEvent("itemmouseout",d);delete e._lastItemForPoint;delete e._lastStoreField;delete e._lastStoreItem}if(g){e.fireEvent("itemmouseover",g);e._lastItemForPoint=g;e._lastStoreItem=g.storeItem;e._lastStoreField=g.storeField}}}}else{d=e._lastItemForPoint;if(d){e.fireEvent("itemmouseout",d);delete e._lastItemForPoint;delete e._lastStoreField;delete e._lastStoreItem}}},h)},onMouseLeave:function(b){var a=this;if(a.mask){a.mixins.mask.onMouseLeave.call(a,b)}a.series.each(function(c){delete c._lastItemForPoint})},delayRefresh:function(){var a=this;if(!a.refreshTask){a.refreshTask=Ext.create("Ext.util.DelayedTask",a.refresh,a)}a.refreshTask.delay(a.refreshBuffer)},refresh:function(){var a=this;if(a.rendered&&a.curWidth!==undefined&&a.curHeight!==undefined){if(a.fireEvent("beforerefresh",a)!==false){a.redraw();a.fireEvent("refresh",a)}}},bindStore:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroyStore()}else{c.store.un("datachanged",c.refresh,c);c.store.un("add",c.delayRefresh,c);c.store.un("remove",c.delayRefresh,c);c.store.un("update",c.delayRefresh,c);c.store.un("clear",c.refresh,c)}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:c,datachanged:c.refresh,add:c.delayRefresh,remove:c.delayRefresh,update:c.delayRefresh,clear:c.refresh})}c.store=a;if(a&&!b){c.refresh()}},initializeAxis:function(b){var e=this,k=e.chartBBox,j=k.width,d=k.height,i=k.x,g=k.y,c=e.themeAttrs,a={chart:e};if(c){a.axisStyle=Ext.apply({},c.axis);a.axisLabelLeftStyle=Ext.apply({},c.axisLabelLeft);a.axisLabelRightStyle=Ext.apply({},c.axisLabelRight);a.axisLabelTopStyle=Ext.apply({},c.axisLabelTop);a.axisLabelBottomStyle=Ext.apply({},c.axisLabelBottom);a.axisTitleLeftStyle=Ext.apply({},c.axisTitleLeft);a.axisTitleRightStyle=Ext.apply({},c.axisTitleRight);a.axisTitleTopStyle=Ext.apply({},c.axisTitleTop);a.axisTitleBottomStyle=Ext.apply({},c.axisTitleBottom)}switch(b.position){case"top":Ext.apply(a,{length:j,width:d,x:i,y:g});break;case"bottom":Ext.apply(a,{length:j,width:d,x:i,y:d});break;case"left":Ext.apply(a,{length:d,width:j,x:i,y:d});break;case"right":Ext.apply(a,{length:d,width:j,x:j,y:d});break}if(!b.chart){Ext.apply(a,b);b=e.axes.replace(Ext.createByAlias("axis."+b.type.toLowerCase(),a))}else{Ext.apply(b,a)}},alignAxes:function(){var g=this,h=g.axes,e=g.legend,b=["top","right","bottom","left"],d,c=g.insetPadding,a={top:c,right:c,bottom:c,left:c};function i(k){var j=h.findIndex("position",k);return(j<0)?null:h.getAt(j)}Ext.each(b,function(k){var m=(k==="left"||k==="right"),j=i(k),l;if(e!==false){if(e.position===k){l=e.getBBox();a[k]+=(m?l.width:l.height)+a[k]}}if(j&&j.bbox){l=j.bbox;a[k]+=(m?l.width:l.height)}});d={x:a.left,y:a.top,width:g.curWidth-a.left-a.right,height:g.curHeight-a.top-a.bottom};g.chartBBox=d;h.each(function(j){var l=j.position,k=(l==="left"||l==="right");j.x=(l==="right"?d.x+d.width:d.x);j.y=(l==="top"?d.y:d.y+d.height);j.width=(k?d.width:d.height);j.length=(k?d.height:d.width)})},initializeSeries:function(h,k){var j=this,d=j.themeAttrs,c,e,n,q,p,m=[],g=0,b,a={chart:j,seriesId:h.seriesId};if(d){n=d.seriesThemes;p=d.markerThemes;c=Ext.apply({},d.series);e=Ext.apply({},d.marker);a.seriesStyle=Ext.apply(c,n[k%n.length]);a.seriesLabelStyle=Ext.apply({},d.seriesLabel);a.markerStyle=Ext.apply(e,p[k%p.length]);if(d.colors){a.colorArrayStyle=d.colors}else{m=[];for(b=n.length;g<b;g++){q=n[g];if(q.fill||q.stroke){m.push(q.fill||q.stroke)}}if(m.length){a.colorArrayStyle=m}}a.seriesIdx=k}if(h instanceof Ext.chart.series.Series){Ext.apply(h,a)}else{Ext.applyIf(a,h);h=j.series.replace(Ext.createByAlias("series."+h.type.toLowerCase(),a))}if(h.initialize){h.initialize()}},getMaxGutter:function(){var b=this,a=[0,0];b.series.each(function(c){var d=c.getGutters&&c.getGutters()||[0,0];a[0]=Math.max(a[0],d[0]);a[1]=Math.max(a[1],d[1])});b.maxGutter=a},drawAxis:function(a){a.drawAxis()},drawCharts:function(a){a.triggerafterrender=false;a.drawSeries();if(!this.animate){a.fireEvent("afterrender")}},destroy:function(){Ext.destroy(this.surface);this.bindStore(null);this.callParent(arguments)}});Ext.define("Ext.chart.Highlight",{requires:["Ext.fx.Anim"],highlight:false,highlightCfg:null,constructor:function(a){if(a.highlight){if(a.highlight!==true){this.highlightCfg=Ext.apply({},a.highlight)}else{this.highlightCfg={fill:"#fdd",radius:20,lineWidth:5,stroke:"#f55"}}}},highlightItem:function(k){if(!k){return}var g=this,j=k.sprite,a=g.highlightCfg,d=g.chart.surface,c=g.chart.animate,b,i,h,e;if(!g.highlight||!j||j._highlighted){return}if(j._anim){j._anim.paused=true}j._highlighted=true;if(!j._defaults){j._defaults=Ext.apply({},j.attr);i={};h={};for(b in a){if(!(b in j._defaults)){j._defaults[b]=d.availableAttrs[b]}i[b]=j._defaults[b];h[b]=a[b];if(Ext.isObject(a[b])){i[b]={};h[b]={};Ext.apply(j._defaults[b],j.attr[b]);Ext.apply(i[b],j._defaults[b]);for(e in j._defaults[b]){if(!(e in a[b])){h[b][e]=i[b][e]}else{h[b][e]=a[b][e]}}for(e in a[b]){if(!(e in h[b])){h[b][e]=a[b][e]}}}}j._from=i;j._to=h;j._endStyle=h}if(c){j._anim=Ext.create("Ext.fx.Anim",{target:j,from:j._from,to:j._to,duration:150})}else{j.setAttributes(j._to,true)}},unHighlightItem:function(){if(!this.highlight||!this.items){return}var j=this,h=j.items,g=h.length,a=j.highlightCfg,c=j.chart.animate,e=0,d,b,k;for(;e<g;e++){if(!h[e]){continue}k=h[e].sprite;if(k&&k._highlighted){if(k._anim){k._anim.paused=true}d={};for(b in a){if(Ext.isObject(k._defaults[b])){d[b]={};Ext.apply(d[b],k._defaults[b])}else{d[b]=k._defaults[b]}}if(c){k._endStyle=d;k._anim=Ext.create("Ext.fx.Anim",{target:k,to:d,duration:150})}else{k.setAttributes(d,true)}delete k._highlighted}}},cleanHighlights:function(){if(!this.highlight){return}var d=this.group,c=this.markerGroup,b=0,a;for(a=d.getCount();b<a;b++){delete d.getAt(b)._defaults}if(c){for(a=c.getCount();b<a;b++){delete c.getAt(b)._defaults}}}});Ext.define("Ext.chart.Label",{requires:["Ext.draw.Color"],colorStringRe:/url\s*\(\s*#([^\/)]+)\s*\)/,constructor:function(a){var b=this;b.label=Ext.applyIf(b.label||{},{display:"none",color:"#000",field:"name",minMargin:50,font:"11px Helvetica, sans-serif",orientation:"horizontal",renderer:function(c){return c}});if(b.label.display!=="none"){b.labelsGroup=b.chart.surface.getGroup(b.seriesId+"-labels")}},renderLabels:function(){var p=this,M=p.chart,y=M.gradients,s=p.items,I=M.animate,B=p.label,v=B.display,w=B.color,d=[].concat(B.field),r=p.labelsGroup,l=(r||0)&&r.length,b=p.chart.store,q=b.getCount(),h=(s||0)&&s.length,E=h/q,A=(y||0)&&y.length,m=Ext.draw.Color,L=[],n,K,F,c,z,J,H,e,g,u,x,G,N,t,O,D,C,a;if(v=="none"){return}if(h==0){while(l--){L.push(l)}}else{for(K=0,F=0,c=0;K<q;K++){z=0;for(J=0;J<E;J++){x=s[F];G=r.getAt(c);N=b.getAt(K);while(this.__excludes&&this.__excludes[z]&&E>1){if(d[J]){L.push(c)}z++}if(!x&&G){G.hide(true);c++}if(x&&d[J]){if(!G){G=p.onCreateLabel(N,x,K,v,J,z)}p.onPlaceLabel(G,N,x,K,v,I,J,z);c++;if(B.contrast&&x.sprite){t=x.sprite;if(t._endStyle){a=t._endStyle.fill}else{if(t._to){a=t._to.fill}else{a=t.attr.fill}}a=a||t.attr.fill;O=m.fromString(a);if(a&&!O){a=a.match(p.colorStringRe)[1];for(H=0;H<A;H++){n=y[H];if(n.id==a){u=0;e=0;for(g in n.stops){u++;e+=m.fromString(n.stops[g].color).getGrayscale()}D=(e/u)/255;break}}}else{D=O.getGrayscale()/255}if(G.isOutside){D=1}C=m.fromString(G.attr.color||G.attr.fill).getHSL();C[2]=D>0.5?0.2:0.8;G.setAttributes({fill:String(m.fromHSL.apply({},C))},true)}}F++;z++}}}p.hideLabels(L)},hideLabels:function(b){var a=this.labelsGroup,c=b.length;while(c--){a.getAt(b[c]).hide(true)}}});Ext.define("Ext.chart.MaskLayer",{extend:"Ext.Component",constructor:function(a){a=Ext.apply(a||{},{style:"position:absolute;background-color:#888;cursor:move;opacity:0.6;border:1px solid #222;"});this.callParent([a])},initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave")},initDraggable:function(){this.callParent(arguments);this.dd.onStart=function(c){var b=this,a=b.comp;this.startPosition=a.getPosition(true);if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}}}});Ext.define("Ext.chart.TipSurface",{extend:"Ext.draw.Component",spriteArray:false,renderFirst:true,constructor:function(a){this.callParent([a]);if(a.sprites){this.spriteArray=[].concat(a.sprites);delete a.sprites}},onRender:function(){var c=this,b=0,a=0,d,e;this.callParent(arguments);e=c.spriteArray;if(c.renderFirst&&e){c.renderFirst=false;for(a=e.length;b<a;b++){d=c.surface.add(e[b]);d.setAttributes({hidden:false},true)}}}});Ext.define("Ext.chart.Tip",{requires:["Ext.tip.ToolTip","Ext.chart.TipSurface"],constructor:function(b){var c=this,a,d,e;if(b.tips){c.tipTimeout=null;c.tipConfig=Ext.apply({},b.tips,{renderer:Ext.emptyFn,constrainPosition:false});c.tooltip=Ext.create("Ext.tip.ToolTip",c.tipConfig);c.chart.surface.on("mousemove",c.tooltip.onMouseMove,c.tooltip);c.chart.surface.on("mouseleave",function(){c.hideTip()});if(c.tipConfig.surface){a=c.tipConfig.surface;d=a.sprites;e=Ext.create("Ext.chart.TipSurface",{id:"tipSurfaceComponent",sprites:d});if(a.width&&a.height){e.setSize(a.width,a.height)}c.tooltip.add(e);c.spriteTip=e}}},showTip:function(l){var e=this;if(!e.tooltip){return}clearTimeout(e.tipTimeout);var m=e.tooltip,a=e.spriteTip,c=e.tipConfig,d=m.trackMouse,k,b,j,h,i,g;if(!d){m.trackMouse=true;k=l.sprite;b=k.surface;j=Ext.get(b.getId());if(j){h=j.getXY();i=h[0]+(k.attr.x||0)+(k.attr.translation&&k.attr.translation.x||0);g=h[1]+(k.attr.y||0)+(k.attr.translation&&k.attr.translation.y||0);m.targetXY=[i,g]}}if(a){c.renderer.call(m,l.storeItem,l,a.surface)}else{c.renderer.call(m,l.storeItem,l)}m.show();m.trackMouse=d},hideTip:function(a){var b=this.tooltip;if(!b){return}clearTimeout(this.tipTimeout);this.tipTimeout=setTimeout(function(){b.hide()},0)}});Ext.define("Ext.chart.axis.Abstract",{requires:["Ext.chart.Chart"],constructor:function(a){a=a||{};var b=this,c=a.position||"left";c=c.charAt(0).toUpperCase()+c.substring(1);a.label=Ext.apply(a["axisLabel"+c+"Style"]||{},a.label||{});a.axisTitleStyle=Ext.apply(a["axisTitle"+c+"Style"]||{},a.labelTitle||{});Ext.apply(b,a);b.fields=[].concat(b.fields);this.callParent();b.labels=[];b.getId();b.labelGroup=b.chart.surface.getGroup(b.axisId+"-labels")},alignment:null,grid:false,steps:10,x:0,y:0,minValue:0,maxValue:0,getId:function(){return this.axisId||(this.axisId=Ext.id(null,"ext-axis-"))},processView:Ext.emptyFn,drawAxis:Ext.emptyFn,addDisplayAndLabels:Ext.emptyFn});Ext.define("Ext.chart.axis.Axis",{extend:"Ext.chart.axis.Abstract",alternateClassName:"Ext.chart.Axis",requires:["Ext.draw.Draw"],forceMinMax:false,dashSize:3,position:"bottom",skipFirst:false,length:0,width:0,majorTickSteps:false,applyData:Ext.emptyFn,getRange:function(){var t=this,d=t.chart.getChartStore(),k=t.fields,g=k.length,c=Math,v=c.max,s=c.min,j=false,n=isNaN(t.minimum)?Infinity:t.minimum,q=isNaN(t.maximum)?-Infinity:t.maximum,u=0,r,p,m,a,e,b=[],h=t.chart.series.items;for(r=0,p=h.length;!j&&r<p;r++){j=j||h[r].stacked;b=h[r].__excludes||b}d.each(function(i){if(j){if(!isFinite(n)){n=0}for(a=[0,0],r=0;r<g;r++){if(b[r]){continue}e=i.get(k[r]);a[+(e>0)]+=c.abs(e)}q=v(q,-a[0],+a[1]);n=s(n,-a[0],+a[1])}else{for(r=0;r<g;r++){if(b[r]){continue}m=i.get(k[r]);q=v(q,+m);n=s(n,+m)}}});if(!isFinite(q)){q=t.prevMax||0}if(!isFinite(n)){n=t.prevMin||0}if(n!=q&&(q!=Math.floor(q))){q=Math.floor(q)+1}if(!isNaN(t.minimum)){n=t.minimum}if(!isNaN(t.maximum)){q=t.maximum}return{min:n,max:q}},calcEnds:function(){var i=this,b=i.fields,c=i.getRange(),h=c.min,a=c.max,e,g,d;d=Ext.draw.Draw.snapEnds(h,a,i.majorTickSteps!==false?(i.majorTickSteps+1):i.steps);e=d.from;g=d.to;if(i.forceMinMax){if(!isNaN(a)){d.to=a}if(!isNaN(h)){d.from=h}}if(!isNaN(i.maximum)){d.to=i.maximum}if(!isNaN(i.minimum)){d.from=i.minimum}d.step=(d.to-d.from)/(g-e)*d.step;if(i.adjustMaximumByMajorUnit){d.to+=d.step}if(i.adjustMinimumByMajorUnit){d.from-=d.step}i.prevMin=h==a?0:h;i.prevMax=a;return d},drawAxis:function(v){var G=this,w,u,k=G.x,h=G.y,E=G.chart.maxGutter[0],D=G.chart.maxGutter[1],e=G.dashSize,C=G.minorTickSteps||0,B=G.minorTickSteps||0,b=G.length,H=G.position,g=[],n=false,c=G.applyData(),d=c.step,z=c.steps,t=c.from,a=c.to,A,s,r,q,p,m,l,F;if(G.hidden||isNaN(d)||(t==a)){return}G.from=c.from;G.to=c.to;if(H=="left"||H=="right"){s=Math.floor(k)+0.5;q=["M",s,h,"l",0,-b];A=b-(D*2)}else{r=Math.floor(h)+0.5;q=["M",k,r,"l",b,0];A=b-(E*2)}F=A/(z||1);m=Math.max(C+1,0);l=Math.max(B+1,0);if(G.type=="Numeric"||G.type=="Time"){n=true;G.labels=[c.from]}if(H=="right"||H=="left"){r=h-D;s=k-((H=="left")*e*2);while(r>=h-D-A){q.push("M",s,Math.floor(r)+0.5,"l",e*2+1,0);if(r!=h-D){for(w=1;w<l;w++){q.push("M",s+e,Math.floor(r+F*w/l)+0.5,"l",e+1,0)}}g.push([Math.floor(k),Math.floor(r)]);r-=F;if(n){G.labels.push(G.labels[G.labels.length-1]+d)}if(F===0){break}}if(Math.round(r+F-(h-D-A))){q.push("M",s,Math.floor(h-b+D)+0.5,"l",e*2+1,0);for(w=1;w<l;w++){q.push("M",s+e,Math.floor(h-b+D+F*w/l)+0.5,"l",e+1,0)}g.push([Math.floor(k),Math.floor(r)]);if(n){G.labels.push(G.labels[G.labels.length-1]+d)}}}else{s=k+E;r=h-((H=="top")*e*2);while(s<=k+E+A){q.push("M",Math.floor(s)+0.5,r,"l",0,e*2+1);if(s!=k+E){for(w=1;w<m;w++){q.push("M",Math.floor(s-F*w/m)+0.5,r,"l",0,e+1)}}g.push([Math.floor(s),Math.floor(h)]);s+=F;if(n){G.labels.push(G.labels[G.labels.length-1]+d)}if(F===0){break}}if(Math.round(s-F-(k+E+A))){q.push("M",Math.floor(k+b-E)+0.5,r,"l",0,e*2+1);for(w=1;w<m;w++){q.push("M",Math.floor(k+b-E-F*w/m)+0.5,r,"l",0,e+1)}g.push([Math.floor(s),Math.floor(h)]);if(n){G.labels.push(G.labels[G.labels.length-1]+d)}}}if(!G.axis){G.axis=G.chart.surface.add(Ext.apply({type:"path",path:q},G.axisStyle))}G.axis.setAttributes({path:q},true);G.inflections=g;if(!v&&G.grid){G.drawGrid()}G.axisBBox=G.axis.getBBox();G.drawLabel()},drawGrid:function(){var v=this,p=v.chart.surface,b=v.grid,d=b.odd,e=b.even,h=v.inflections,k=h.length-((d||e)?0:1),w=v.position,c=v.chart.maxGutter,n=v.width-2,t=false,q,r,s=1,m=[],g,a,j,l=[],u=[];if((c[1]!==0&&(w=="left"||w=="right"))||(c[0]!==0&&(w=="top"||w=="bottom"))){s=0;k++}for(;s<k;s++){q=h[s];r=h[s-1];if(d||e){m=(s%2)?l:u;g=((s%2)?d:e)||{};a=(g.lineWidth||g["stroke-width"]||0)/2;j=2*a;if(w=="left"){m.push("M",r[0]+1+a,r[1]+0.5-a,"L",r[0]+1+n-a,r[1]+0.5-a,"L",q[0]+1+n-a,q[1]+0.5+a,"L",q[0]+1+a,q[1]+0.5+a,"Z")}else{if(w=="right"){m.push("M",r[0]-a,r[1]+0.5-a,"L",r[0]-n+a,r[1]+0.5-a,"L",q[0]-n+a,q[1]+0.5+a,"L",q[0]-a,q[1]+0.5+a,"Z")}else{if(w=="top"){m.push("M",r[0]+0.5+a,r[1]+1+a,"L",r[0]+0.5+a,r[1]+1+n-a,"L",q[0]+0.5-a,q[1]+1+n-a,"L",q[0]+0.5-a,q[1]+1+a,"Z")}else{m.push("M",r[0]+0.5+a,r[1]-a,"L",r[0]+0.5+a,r[1]-n+a,"L",q[0]+0.5-a,q[1]-n+a,"L",q[0]+0.5-a,q[1]-a,"Z")}}}}else{if(w=="left"){m=m.concat(["M",q[0]+0.5,q[1]+0.5,"l",n,0])}else{if(w=="right"){m=m.concat(["M",q[0]-0.5,q[1]+0.5,"l",-n,0])}else{if(w=="top"){m=m.concat(["M",q[0]+0.5,q[1]+0.5,"l",0,n])}else{m=m.concat(["M",q[0]+0.5,q[1]-0.5,"l",0,-n])}}}}}if(d||e){if(l.length){if(!v.gridOdd&&l.length){v.gridOdd=p.add({type:"path",path:l})}v.gridOdd.setAttributes(Ext.apply({path:l,hidden:false},d||{}),true)}if(u.length){if(!v.gridEven){v.gridEven=p.add({type:"path",path:u})}v.gridEven.setAttributes(Ext.apply({path:u,hidden:false},e||{}),true)}}else{if(m.length){if(!v.gridLines){v.gridLines=v.chart.surface.add({type:"path",path:m,"stroke-width":v.lineWidth||1,stroke:v.gridColor||"#ccc"})}v.gridLines.setAttributes({hidden:false,path:m},true)}else{if(v.gridLines){v.gridLines.hide(true)}}}},getOrCreateLabel:function(c,g){var d=this,b=d.labelGroup,e=b.getAt(c),a=d.chart.surface;if(e){if(g!=e.attr.text){e.setAttributes(Ext.apply({text:g},d.label),true);e._bbox=e.getBBox()}}else{e=a.add(Ext.apply({group:b,type:"text",x:0,y:0,text:g},d.label));a.renderItem(e);e._bbox=e.getBBox()}if(d.label.rotation){e.setAttributes({rotation:{degrees:0}},true);e._ubbox=e.getBBox();e.setAttributes(d.label,true)}else{e._ubbox=e._bbox}return e},rect2pointArray:function(l){var b=this.chart.surface,g=b.getBBox(l,true),m=[g.x,g.y],d=m.slice(),k=[g.x+g.width,g.y],a=k.slice(),j=[g.x+g.width,g.y+g.height],e=j.slice(),i=[g.x,g.y+g.height],c=i.slice(),h=l.matrix;m[0]=h.x.apply(h,d);m[1]=h.y.apply(h,d);k[0]=h.x.apply(h,a);k[1]=h.y.apply(h,a);j[0]=h.x.apply(h,e);j[1]=h.y.apply(h,e);i[0]=h.x.apply(h,c);i[1]=h.y.apply(h,c);return[m,k,j,i]},intersect:function(c,a){var d=this.rect2pointArray(c),b=this.rect2pointArray(a);return !!Ext.draw.Draw.intersect(d,b).length},drawHorizontalLabels:function(){var G=this,c=G.label,B=Math.floor,z=Math.max,A=G.chart.axes,H=G.position,k=G.inflections,p=k.length,F=G.labels,s=G.labelGroup,t=0,g,D=G.chart.maxGutter[1],d,a,v,e,n,C=0,E,u,j,r,h,m,q,l,w,b;m=p-1;v=k[0];b=G.getOrCreateLabel(0,G.label.renderer(F[0]));g=Math.floor(Math.abs(Math.sin(c.rotate&&(c.rotate.degrees*Math.PI/180)||0)));for(w=0;w<p;w++){v=k[w];r=G.label.renderer(F[w]);E=G.getOrCreateLabel(w,r);a=E._bbox;t=z(t,a.height+G.dashSize+G.label.padding);q=B(v[0]-(g?a.height:a.width)/2);if(G.chart.maxGutter[0]==0){if(w==0&&A.findIndex("position","left")==-1){q=v[0]}else{if(w==m&&A.findIndex("position","right")==-1){q=v[0]-a.width}}}if(H=="top"){l=v[1]-(G.dashSize*2)-G.label.padding-(a.height/2)}else{l=v[1]+(G.dashSize*2)+G.label.padding+(a.height/2)}E.setAttributes({hidden:false,x:q,y:l},true);if(w!=0&&(G.intersect(E,n)||G.intersect(E,b))){E.hide(true);continue}n=E}return t},drawVerticalLabels:function(){var C=this,g=C.inflections,D=C.position,k=g.length,A=C.labels,v=0,s=Math.max,u=Math.floor,b=Math.ceil,t=C.chart.axes,w=C.chart.maxGutter[1],c,a,q,l,z=0,B,p,e,n,d,j,m,h,r;j=k;for(r=0;r<j;r++){q=g[r];n=C.label.renderer(A[r]);B=C.getOrCreateLabel(r,n);a=B._bbox;v=s(v,a.width+C.dashSize+C.label.padding);h=q[1];if(w<a.height/2){if(r==j-1&&t.findIndex("position","top")==-1){h=C.y-C.length+b(a.height/2)}else{if(r==0&&t.findIndex("position","bottom")==-1){h=C.y-u(a.height/2)}}}if(D=="left"){m=q[0]-a.width-C.dashSize-C.label.padding-2}else{m=q[0]+C.dashSize+C.label.padding+2}B.setAttributes(Ext.apply({hidden:false,x:m,y:h},C.label),true);if(r!=0&&C.intersect(B,l)){B.hide(true);continue}l=B}return v},drawLabel:function(){var h=this,a=h.position,b=h.labelGroup,j=h.inflections,g=0,e=0,d,c;if(a=="left"||a=="right"){g=h.drawVerticalLabels()}else{e=h.drawHorizontalLabels()}d=b.getCount();c=j.length;for(;c<d;c++){b.getAt(c).hide(true)}h.bbox={};Ext.apply(h.bbox,h.axisBBox);h.bbox.height=e;h.bbox.width=g;if(Ext.isString(h.title)){h.drawTitle(g,e)}},elipsis:function(d,h,c,e,b){var g,a;if(c<e){d.hide(true);return false}while(h.length>4){h=h.substr(0,h.length-4)+"...";d.setAttributes({text:h},true);g=d.getBBox();if(g.width<c){if(typeof b=="number"){d.setAttributes({x:Math.floor(b-(g.width/2))},true)}break}}return true},setTitle:function(a){this.title=a;this.drawLabel()},drawTitle:function(l,m){var h=this,g=h.position,b=h.chart.surface,c=h.displaySprite,k=h.title,e=(g=="left"||g=="right"),j=h.x,i=h.y,a,n,d;if(c){c.setAttributes({text:k},true)}else{a={type:"text",x:0,y:0,text:k};c=h.displaySprite=b.add(Ext.apply(a,h.axisTitleStyle,h.labelTitle));b.renderItem(c)}n=c.getBBox();d=h.dashSize+h.label.padding;if(e){i-=((h.length/2)-(n.height/2));if(g=="left"){j-=(l+d+(n.width/2))}else{j+=(l+d+n.width-(n.width/2))}h.bbox.width+=n.width+10}else{j+=(h.length/2)-(n.width*0.5);if(g=="top"){i-=(m+d+(n.height*0.3))}else{i+=(m+d+(n.height*0.8))}h.bbox.height+=n.height+10}c.setAttributes({translate:{x:j,y:i}},true)}});Ext.define("Ext.chart.axis.Category",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.CategoryAxis",alias:"axis.category",categoryNames:null,calculateCategoryCount:false,setLabels:function(){var b=this.chart.store,a=this.fields,d=a.length,c;this.labels=[];b.each(function(e){for(c=0;c<d;c++){this.labels.push(e.get(a[c]))}},this)},applyData:function(){this.callParent();this.setLabels();var a=this.chart.store.getCount();return{from:0,to:a,power:1,step:1,steps:a-1}}});Ext.define("Ext.chart.axis.Gauge",{extend:"Ext.chart.axis.Abstract",position:"gauge",alias:"axis.gauge",drawAxis:function(r){var j=this.chart,a=j.surface,q=j.chartBBox,d=q.x+(q.width/2),b=q.y+q.height,c=this.margin||10,m=Math.min(q.width,2*q.height)/2+c,h=[],n,l=this.steps,e,g=Math.PI,p=Math.cos,k=Math.sin;if(this.sprites&&!j.resizing){this.drawLabel();return}if(this.margin>=0){if(!this.sprites){for(e=0;e<=l;e++){n=a.add({type:"path",path:["M",d+(m-c)*p(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*p(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"});n.setAttributes({hidden:false},true);h.push(n)}}else{h=this.sprites;for(e=0;e<=l;e++){h[e].setAttributes({path:["M",d+(m-c)*p(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*p(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"},true)}}}this.sprites=h;this.drawLabel();if(this.title){this.drawTitle()}},drawTitle:function(){var e=this,d=e.chart,a=d.surface,g=d.chartBBox,c=e.titleSprite,b;if(!c){e.titleSprite=c=a.add({type:"text",zIndex:2})}c.setAttributes(Ext.apply({text:e.title},e.label||{}),true);b=c.getBBox();c.setAttributes({x:g.x+(g.width/2)-(b.width/2),y:g.y+g.height-(b.height/2)-4},true)},setTitle:function(a){this.title=a;this.drawTitle()},drawLabel:function(){var k=this.chart,p=k.surface,b=k.chartBBox,j=b.x+(b.width/2),h=b.y+b.height,l=this.margin||10,d=Math.min(b.width,2*b.height)/2+2*l,u=Math.round,m=[],g,s=this.maximum||0,r=this.steps,q=0,v,t=Math.PI,c=Math.cos,a=Math.sin,e=this.label,n=e.renderer||function(i){return i};if(!this.labelArray){for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;g=p.add({type:"text",text:n(u(q/r*s)),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v,"text-anchor":"middle","stroke-width":0.2,zIndex:10,stroke:"#333"});g.setAttributes({hidden:false},true);m.push(g)}}else{m=this.labelArray;for(q=0;q<=r;q++){v=(q===0||q===r)?7:0;m[q].setAttributes({text:n(u(q/r*s)),x:j+d*c(q/r*t-t),y:h+d*a(q/r*t-t)-v},true)}}this.labelArray=m}});Ext.define("Ext.chart.axis.Numeric",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.NumericAxis",type:"numeric",alias:"axis.numeric",constructor:function(c){var d=this,a=!!(c.label&&c.label.renderer),b;d.callParent([c]);b=d.label;if(d.roundToDecimal===false){return}if(!a){b.renderer=function(e){return d.roundToDecimal(e,d.decimals)}}},roundToDecimal:function(a,c){var b=Math.pow(10,c||0);return Math.floor(a*b)/b},minimum:NaN,maximum:NaN,decimals:2,scale:"linear",position:"left",adjustMaximumByMajorUnit:false,adjustMinimumByMajorUnit:false,applyData:function(){this.callParent();return this.calcEnds()}});Ext.define("Ext.chart.axis.Radial",{extend:"Ext.chart.axis.Abstract",position:"radial",alias:"axis.radial",drawAxis:function(v){var m=this.chart,a=m.surface,u=m.chartBBox,r=m.store,b=r.getCount(),e=u.x+(u.width/2),c=u.y+(u.height/2),q=Math.min(u.width,u.height)/2,k=[],s,p=this.steps,g,d,h=Math.PI*2,t=Math.cos,n=Math.sin;if(this.sprites&&!m.resizing){this.drawLabel();return}if(!this.sprites){for(g=1;g<=p;g++){s=a.add({type:"circle",x:e,y:c,radius:Math.max(q*g/p,0),stroke:"#ccc"});s.setAttributes({hidden:false},true);k.push(s)}r.each(function(l,j){s=a.add({type:"path",path:["M",e,c,"L",e+q*t(j/b*h),c+q*n(j/b*h),"Z"],stroke:"#ccc"});s.setAttributes({hidden:false},true);k.push(s)})}else{k=this.sprites;for(g=0;g<p;g++){k[g].setAttributes({x:e,y:c,radius:Math.max(q*(g+1)/p,0),stroke:"#ccc"},true)}r.each(function(l,i){k[g+i].setAttributes({path:["M",e,c,"L",e+q*t(i/b*h),c+q*n(i/b*h),"Z"],stroke:"#ccc"},true)})}this.sprites=k;this.drawLabel()},drawLabel:function(){var s=this.chart,y=s.surface,b=s.chartBBox,h=s.store,m=b.x+(b.width/2),l=b.y+(b.height/2),e=Math.min(b.width,b.height)/2,C=Math.max,F=Math.round,t=[],k,w=[],c,x=[],g,u=!this.maximum,E=this.maximum||0,D=this.steps,B=0,A,q,p,v=Math.PI*2,d=Math.cos,a=Math.sin,z=this.label.display,n=z!=="none",r=10;if(!n){return}s.series.each(function(i){w.push(i.yField);g=i.xField});h.each(function(j,G){if(u){for(G=0,c=w.length;G<c;G++){E=C(+j.get(w[G]),E)}}x.push(j.get(g))});if(!this.labelArray){if(z!="categories"){for(B=1;B<=D;B++){k=y.add({type:"text",text:F(B/D*E),x:m,y:l-e*B/D,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"});k.setAttributes({hidden:false},true);t.push(k)}}if(z!="scale"){for(A=0,D=x.length;A<D;A++){q=d(A/D*v)*(e+r);p=a(A/D*v)*(e+r);k=y.add({type:"text",text:x[A],x:m+q,y:l+p,"text-anchor":q*q<=0.001?"middle":(q<0?"end":"start")});k.setAttributes({hidden:false},true);t.push(k)}}}else{t=this.labelArray;if(z!="categories"){for(B=0;B<D;B++){t[B].setAttributes({text:F((B+1)/D*E),x:m,y:l-e*(B+1)/D,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"},true)}}if(z!="scale"){for(A=0,D=x.length;A<D;A++){q=d(A/D*v)*(e+r);p=a(A/D*v)*(e+r);if(t[B+A]){t[B+A].setAttributes({type:"text",text:x[A],x:m+q,y:l+p,"text-anchor":q*q<=0.001?"middle":(q<0?"end":"start")},true)}}}}this.labelArray=t}});Ext.define("Ext.data.AbstractStore",{requires:["Ext.util.MixedCollection","Ext.data.Operation","Ext.util.Filter"],mixins:{observable:"Ext.util.Observable",sortable:"Ext.util.Sortable"},statics:{create:function(a){if(!a.isStore){if(!a.type){a.type="store"}a=Ext.createByAlias("store."+a.type,a)}return a}},remoteSort:false,remoteFilter:false,autoLoad:false,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(a){var c=this,b;c.addEvents("add","remove","update","datachanged","beforeload","load","write","beforesync","clear");Ext.apply(c,a);c.removed=[];c.mixins.observable.constructor.apply(c,arguments);c.model=Ext.ModelManager.getModel(c.model);Ext.applyIf(c,{modelDefaults:{}});if(!c.model&&c.fields){c.model=Ext.define("Ext.data.Store.ImplicitModel-"+(c.storeId||Ext.id()),{extend:"Ext.data.Model",fields:c.fields,proxy:c.proxy||c.defaultProxyType});delete c.fields;c.implicitModel=true}c.setProxy(c.proxy||c.model.getProxy());if(c.id&&!c.storeId){c.storeId=c.id;delete c.id}if(c.storeId){Ext.data.StoreManager.register(c)}c.mixins.sortable.initSortable.call(c);b=c.decodeFilters(c.filters);c.filters=Ext.create("Ext.util.MixedCollection");c.filters.addAll(b)},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias("proxy."+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:"create",records:[a]});b=Ext.create("Ext.data.Operation",c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},onProxyRead:Ext.emptyFn,update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"update",records:c.getUpdatedRecords()});a=Ext.create("Ext.data.Operation",b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b);c.fireEvent("datachanged",c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"destroy",records:c.getRemovedRecords()});a=Ext.create("Ext.data.Operation",b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var g=this,b=c.operations,e=b.length,d;g.suspendEvents();for(d=0;d<e;d++){g.onProxyWrite(b[d])}g.resumeEvents();g.fireEvent("datachanged",g)},onBatchException:function(b,a){},filterNew:function(a){return a.phantom===true&&a.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},filterUpdated:function(a){return a.dirty===true&&a.phantom!==true&&a.isValid()},getRemovedRecords:function(){return this.removed},filter:function(a,b){},decodeFilters:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,a=Ext.util.Filter,b,c;for(c=0;c<d;c++){b=e[c];if(!(b instanceof a)){Ext.apply(b,{root:"data"});if(b.fn){b.filterFn=b.fn}if(typeof b=="function"){b={filterFn:b}}e[c]=new a(b)}}return e},clearFilter:function(a){},isFiltered:function(){},filterBy:function(b,a){},sync:function(){var d=this,b={},e=d.getNewRecords(),c=d.getUpdatedRecords(),a=d.getRemovedRecords(),g=false;if(e.length>0){b.create=e;g=true}if(c.length>0){b.update=c;g=true}if(a.length>0){b.destroy=a;g=true}if(g&&d.fireEvent("beforesync",b)!==false){d.proxy.batch(b,d.getBatchListeners())}},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode=="operation"){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"read",filters:c.filters.items,sorters:c.getSorters()});a=Ext.create("Ext.data.Operation",b);if(c.fireEvent("beforeload",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},afterEdit:function(a){var b=this;if(b.autoSync){b.sync()}b.fireEvent("update",b,a,Ext.data.Model.EDIT)},afterReject:function(a){this.fireEvent("update",this,a,Ext.data.Model.REJECT)},afterCommit:function(a){this.fireEvent("update",this,a,Ext.data.Model.COMMIT)},clearData:Ext.emptyFn,destroyStore:function(){var a=this;if(!a.isDestroyed){if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=null;a.tree=null;a.reader=a.writer=null;a.clearListeners();a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent("datachanged",b)}},getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",getGroupString:function(a){return a.get(this.property)}});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.ModelManager","Ext.data.Model","Ext.util.Grouper"],uses:["Ext.data.proxy.Memory"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",pageSize:25,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,isStore:true,onClassExtended:function(a,c){var b=c.model;if(typeof b=="string"){var d=c.onBeforeClassCreated;c.onBeforeClassCreated=function(e,h){var g=this;Ext.require(b,function(){d.call(g,e,h)})}}},constructor:function(b){b=Ext.Object.merge({},b);var d=this,g=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;if(b.buffered||d.buffered){d.prefetchData=Ext.create("Ext.util.MixedCollection",false,function(h){return h.index});d.pendingRequests=[];d.pagesRequested=[];d.sortOnLoad=false;d.filterOnLoad=false}d.addEvents("beforeprefetch","groupchange","prefetch");e=b.data||d.data;d.data=Ext.create("Ext.util.MixedCollection",false,function(h){return h.internalId});if(e){d.inlineData=e;delete b.data}if(!g&&a){g=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=Ext.create("Ext.util.MixedCollection");d.groupers.addAll(d.decodeGroupers(g));this.callParent([b]);if(d.groupers.items.length){d.sort(d.groupers.items,"prepend",false)}c=d.proxy;e=d.inlineData;if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,e)}d.sort();delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,10,d,[typeof d.autoLoad==="object"?d.autoLoad:undefined])}}},onBeforeSort:function(){var a=this.groupers;if(a.getCount()>0){this.sort(a.items,"prepend",false)}},decodeGroupers:function(d){if(!Ext.isArray(d)){if(d===undefined){d=[]}else{d=[d]}}var c=d.length,e=Ext.util.Grouper,a,b;for(b=0;b<c;b++){a=d[b];if(!(a instanceof e)){if(Ext.isString(a)){a={property:a}}Ext.applyIf(a,{root:"data",direction:"ASC"});if(a.fn){a.sorterFn=a.fn}if(typeof a=="function"){a={sorterFn:a}}d[b]=new e(a)}}return d},group:function(e,g){var d=this,c=false,b,a;if(Ext.isArray(e)){a=e}else{if(Ext.isObject(e)){a=[e]}else{if(Ext.isString(e)){b=d.groupers.get(e);if(!b){b={property:e,direction:g};a=[b]}else{if(g===undefined){b.toggle()}else{b.setDirection(g)}}}}}if(a&&a.length){c=true;a=d.decodeGroupers(a);d.groupers.clear();d.groupers.addAll(a)}if(d.remoteGroup){d.load({scope:d,callback:d.fireGroupChange})}else{d.sort(null,null,null,c);d.fireGroupChange()}},clearGrouping:function(){var a=this;a.groupers.each(function(b){a.sorters.remove(b)});a.groupers.clear();if(a.remoteGroup){a.load({scope:a,callback:a.fireGroupChange})}else{a.sort();a.fireEvent("groupchange",a,a.groupers)}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],k={},g,h,j,e;for(e=0;e<a;e++){g=d[e];h=this.getGroupString(g);j=k[h];if(j===undefined){j={name:h,children:[]};c.push(j);k[h]=j}j.children.push(g)}return b?k[b]:c},getGroupsForGrouper:function(g,b){var d=g.length,e=[],a,c,j,k,h;for(h=0;h<d;h++){j=g[h];c=b.getGroupString(j);if(c!==a){k={name:c,grouper:b,records:[]};e.push(k)}k.records.push(j);a=c}return e},getGroupsForGrouperIndex:function(c,j){var g=this,h=g.groupers,b=h.getAt(j),a=g.getGroupsForGrouper(c,b),e=a.length,d;if(j+1<h.length){for(d=0;d<e;d++){a[d].children=g.getGroupsForGrouperIndex(a[d].records,j+1)}}for(d=0;d<e;d++){a[d].depth=j}return a},getGroupData:function(a){var b=this;if(a!==false){b.sort()}return b.getGroupsForGrouperIndex(b.data.items,0)},getGroupString:function(a){var b=this.groupers.first();if(b){return a.get(b.property)}return""},insert:function(d,c){var h=this,g=false,e,b,a;c=[].concat(c);for(e=0,a=c.length;e<a;e++){b=h.createModel(c[e]);b.set(h.modelDefaults);c[e]=b;h.data.insert(d+e,b);b.join(h);g=g||b.phantom===true}if(h.snapshot){h.snapshot.addAll(c)}h.fireEvent("add",h,c,d);h.fireEvent("datachanged",h);if(h.autoSync&&g){h.sync()}},add:function(b){if(!Ext.isArray(b)){b=Array.prototype.slice.apply(arguments)}var e=this,c=0,d=b.length,a;for(;c<d;c++){a=e.createModel(b[c]);b[c]=a}e.insert(e.data.length,b);return b},createModel:function(a){if(!a.isModel){a=Ext.ModelManager.create(a,this.model)}return a},each:function(b,a){this.data.each(b,a)},remove:function(b,k){if(!Ext.isArray(b)){b=[b]}k=k===true;var g=this,h=false,c=0,a=b.length,j,e,d;for(;c<a;c++){d=b[c];e=g.data.indexOf(d);if(g.snapshot){g.snapshot.remove(d)}if(e>-1){j=d.phantom===true;if(!k&&!j){g.removed.push(d)}d.unjoin(g);g.data.remove(d);h=h||!j;g.fireEvent("remove",g,d,e)}}g.fireEvent("datachanged",g);if(!k&&g.autoSync&&h){g.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},load:function(a){var b=this;a=a||{};if(Ext.isFunction(a)){a={callback:a}}Ext.applyIf(a,{groupers:b.groupers.items,page:b.currentPage,start:(b.currentPage-1)*b.pageSize,limit:b.pageSize,addRecords:false});return b.callParent([a])},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}if(e){d.loadRecords(a,b)}d.loading=false;d.fireEvent("load",d,a,e);d.fireEvent("read",d,a,b.wasSuccessful());Ext.callback(b.callback,b.scope||d,[a,b,e])},onCreateRecords:function(d,e,m){if(m){var h=0,g=this.data,a=this.snapshot,b=d.length,l=e.records,j,c,k;for(;h<b;++h){j=d[h];c=l[h];if(c){k=g.indexOf(c);if(k>-1){g.removeAt(k);g.insert(k,j)}if(a){k=a.indexOf(c);if(k>-1){a.removeAt(k);a.insert(k,j)}}j.phantom=false;j.join(this)}}}},onUpdateRecords:function(d,c,j){if(j){var e=0,g=d.length,h=this.data,b=this.snapshot,a;for(;e<g;++e){a=d[e];h.replace(a);if(b){b.replace(a)}a.join(this)}}},onDestroyRecords:function(c,d,k){if(k){var j=this,g=0,b=c.length,e=j.data,a=j.snapshot,h;for(;g<b;++g){h=c[g];h.unjoin(j);e.remove(h);if(a){a.remove(h)}}j.removed=[]}},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(e,g){if(Ext.isString(e)){e={property:e,value:g}}var d=this,a=d.decodeFilters(e),b=0,h=d.sortOnFilter&&!d.remoteSort,c=a.length;for(;b<c;b++){d.filters.replace(a[b])}if(d.remoteFilter){d.load()}else{if(d.filters.getCount()){d.snapshot=d.snapshot||d.data.clone();d.data=d.data.filter(d.filters.items);if(h){d.sort()}if(!h||d.sorters.length<1){d.fireEvent("datachanged",d)}}}},clearFilter:function(a){var b=this;b.filters.clear();if(b.remoteFilter){b.load()}else{if(b.isFiltered()){b.data=b.snapshot.clone();delete b.snapshot;if(a!==true){b.fireEvent("datachanged",b)}}}},isFiltered:function(){var a=this.snapshot;return !!a&&a!==this.data},filterBy:function(b,a){var c=this;c.snapshot=c.snapshot||c.data.clone();c.data=c.queryBy(b,a||c);c.fireEvent("datachanged",c)},queryBy:function(b,a){var c=this,d=c.snapshot||c.data;return d.filterBy(b,a||c)},loadData:function(h,a){var c=this.model,g=h.length,e=[],d,b;for(d=0;d<g;d++){b=h[d];if(!(b instanceof Ext.data.Model)){b=Ext.ModelManager.create(b,c)}e.push(b)}this.loadRecords(e,{addRecords:a})},loadRawData:function(e,b){var d=this,a=d.proxy.reader.read(e),c=a.records;if(a.success){d.loadRecords(c,{addRecords:b});d.fireEvent("load",d,c,true)}},loadRecords:function(a,b){var e=this,c=0,d=a.length;b=b||{};if(!b.addRecords){delete e.snapshot;e.clearData()}e.data.addAll(a);for(;c<d;c++){if(b.start!==undefined){a[c].index=b.start+c}a[c].join(e)}e.suspendEvents();if(e.filterOnLoad&&!e.remoteFilter){e.filter()}if(e.sortOnLoad&&!e.remoteSort){e.sort()}e.resumeEvents();e.fireEvent("datachanged",e,a)},loadPage:function(c,a){var b=this;a=Ext.apply({},a);b.currentPage=c;b.read(Ext.applyIf(a,{page:c,start:(c-1)*b.pageSize,limit:b.pageSize,addRecords:!b.clearOnPageLoad}))},nextPage:function(a){this.loadPage(this.currentPage+1,a)},previousPage:function(a){this.loadPage(this.currentPage-1,a)},clearData:function(){var a=this;a.data.each(function(b){b.unjoin(a)});a.data.clear()},prefetch:function(b){var c=this,a,d=c.getRequestId();b=b||{};Ext.applyIf(b,{action:"read",filters:c.filters.items,sorters:c.sorters.items,requestId:d});c.pendingRequests.push(d);a=Ext.create("Ext.data.Operation",b);if(c.fireEvent("beforeprefetch",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyPrefetch,c)}return c},prefetchPage:function(e,c){var d=this,b=d.pageSize,g=(e-1)*d.pageSize,a=g+b;if(Ext.Array.indexOf(d.pagesRequested,e)===-1&&!d.rangeSatisfied(g,a)){c=c||{};d.pagesRequested.push(e);Ext.applyIf(c,{page:e,start:g,limit:b,callback:d.onWaitForGuarantee,scope:d});d.prefetch(c)}},getRequestId:function(){this.requestSeed=this.requestSeed||1;return this.requestSeed++},onProxyPrefetch:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total;d.fireEvent("totalcountchange",d.totalCount)}if(e){d.cacheRecords(a,b)}Ext.Array.remove(d.pendingRequests,b.requestId);if(b.page){Ext.Array.remove(d.pagesRequested,b.page)}d.loading=false;d.fireEvent("prefetch",d,a,e,b);if(b.blocking){d.fireEvent("load",d,a,e)}Ext.callback(b.callback,b.scope||d,[a,b,e])},cacheRecords:function(b,a){var e=this,c=0,d=b.length,g=a?a.start:0;if(!Ext.isDefined(e.totalCount)){e.totalCount=b.length;e.fireEvent("totalcountchange",e.totalCount)}for(;c<d;c++){b[c].index=g+c}e.prefetchData.addAll(b);if(e.purgePageCount){e.purgeRecords()}},purgeRecords:function(){var c=this,b=c.prefetchData.getCount(),d=c.purgePageCount*c.pageSize,e=b-d-1,a=0;for(;a<=e;a++){c.prefetchData.removeAt(0)}},rangeSatisfied:function(e,a){var c=this,b=e,d=true;for(;b<a;b++){if(!c.prefetchData.getByKey(b)){d=false;break}}return d},getPageFromRecordIndex:function(a){return Math.floor(a/this.pageSize)+1},onGuaranteedRange:function(){var g=this,c=g.getTotalCount(),h=g.requestStart,b=((c-1)<g.requestEnd)?c-1:g.requestEnd,d=[],a,e=h;b=Math.max(0,b);if(h!==g.guaranteedStart&&b!==g.guaranteedEnd){g.guaranteedStart=h;g.guaranteedEnd=b;for(;e<=b;e++){a=g.prefetchData.getByKey(e);if(a){d.push(a)}}g.fireEvent("guaranteedrange",d,h,b);if(g.cb){g.cb.call(g.scope||g,d)}}g.unmask()},mask:function(){this.masked=true;this.fireEvent("beforeload")},unmask:function(){if(this.masked){this.fireEvent("load")}},hasPendingRequests:function(){return this.pendingRequests.length},onWaitForGuarantee:function(){if(!this.hasPendingRequests()){this.onGuaranteedRange()}},guaranteeRange:function(a,c,b,n){c=(c>this.totalCount)?this.totalCount-1:c;var j=this,d=a,l=j.prefetchData,e=[],h=!!l.getByKey(a),k=!!l.getByKey(c),g=j.getPageFromRecordIndex(a),m=j.getPageFromRecordIndex(c);j.cb=b;j.scope=n;j.requestStart=a;j.requestEnd=c;if(!h||!k){if(g===m){j.mask();j.prefetchPage(g,{callback:j.onWaitForGuarantee,scope:j})}else{j.mask();j.prefetchPage(g,{callback:j.onWaitForGuarantee,scope:j});j.prefetchPage(m,{callback:j.onWaitForGuarantee,scope:j})}}else{j.onGuaranteedRange()}},sort:function(){var d=this,c=d.prefetchData,e,g,a,b;if(d.buffered){if(d.remoteSort){c.clear();d.callParent(arguments)}else{e=d.getSorters();g=d.guaranteedStart;a=d.guaranteedEnd;if(e.length){c.sort(e);b=c.getRange();c.clear();d.cacheRecords(b);delete d.guaranteedStart;delete d.guaranteedEnd;d.guaranteeRange(g,a)}d.callParent(arguments)}}else{d.callParent(arguments)}},doSort:function(b){var e=this;if(e.remoteSort){e.load()}else{e.data.sortBy(b);if(!e.buffered){var a=e.getRange(),d=a.length,c=0;for(;c<d;c++){a[c].index=c}}e.fireEvent("datachanged",e)}},find:function(e,d,h,g,a,c){var b=this.createFilterFn(e,d,g,a,c);return b?this.data.findIndexBy(b,null,h):-1},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(g){return c.test(g.data[d])}},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.get(b)==a},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(b,a,c){var d=this,e=(c===true&&d.snapshot)?d.snapshot:d.data;return e.collect(b,"data",a)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount},getAt:function(a){return this.data.getAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},getById:function(a){return(this.snapshot||this.data).findBy(function(b){return b.getId()===a})},indexOf:function(a){return this.data.indexOf(a)},indexOfTotal:function(a){var b=a.index;if(b||b===0){return b}return this.indexOf(a)},indexOfId:function(a){return this.indexOf(this.getById(a))},removeAll:function(a){var b=this;b.clearData();if(b.snapshot){b.snapshot.clear()}if(a!==true){b.fireEvent("clear",b)}},first:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length?c[0]:undefined},b,true)}else{return b.data.first()}},last:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(d){var c=d.length;return c?d[c-1]:undefined},b,true)}else{return b.data.last()}},sum:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getSum,b,true,[c])}else{return b.getSum(b.data.items,c)}},getSum:function(b,e){var d=0,c=0,a=b.length;for(;c<a;++c){d+=b[c].get(e)}return d},count:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length},b,true)}else{return b.getCount()}},min:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMin,b,true,[c])}else{return b.getMin(b.data.items,c)}},getMin:function(b,g){var d=1,a=b.length,e,c;if(a>0){c=b[0].get(g)}for(;d<a;++d){e=b[d].get(g);if(e<c){c=e}}return c},max:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMax,b,true,[c])}else{return b.getMax(b.data.items,c)}},getMax:function(c,g){var d=1,b=c.length,e,a;if(b>0){a=c[0].get(g)}for(;d<b;++d){e=c[d].get(g);if(e>a){a=e}}return a},average:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length>0){for(;c<a;++c){d+=b[c].get(e)}return d/a}return 0},aggregate:function(h,k,e,g){g=g||[];if(e&&this.isGrouped()){var a=this.getGroups(),c=0,d=a.length,b={},j;for(;c<d;++c){j=a[c];b[j.name]=h.apply(k||this,[j.children].concat(g))}return b}else{return h.apply(k||this,[this.data.items].concat(g))}}},function(){Ext.regStore("ext-empty-store",{fields:[],proxy:"proxy"})});Ext.define("Ext.data.JsonStore",{extend:"Ext.data.Store",alias:"store.json",constructor:function(a){a=a||{};Ext.applyIf(a,{proxy:{type:"ajax",reader:"json",writer:"json"}});this.callParent([a])}});Ext.define("Ext.chart.axis.Time",{extend:"Ext.chart.axis.Numeric",alternateClassName:"Ext.chart.TimeAxis",alias:"axis.time",requires:["Ext.data.Store","Ext.data.JsonStore"],dateFormat:false,fromDate:false,toDate:false,step:[Ext.Date.DAY,1],constrain:false,roundToDecimal:false,constructor:function(b){var c=this,a,d,e;c.callParent([b]);a=c.label||{};e=this.dateFormat;if(e){if(a.renderer){d=a.renderer;a.renderer=function(g){g=d(g);return Ext.Date.format(new Date(d(g)),e)}}else{a.renderer=function(g){return Ext.Date.format(new Date(g>>0),e)}}}},doConstrain:function(){var t=this,d=t.chart.store,u=[],h=t.chart.series.items,c=Math,v=c.max,s=c.min,k=t.fields,g=k.length,j=t.getRange(),n=j.min,q=j.max,r,p,b=[],m,a,e,u=[];for(r=0,p=h.length;r<p;r++){b[r]=h[r].__excludes}d.each(function(i){for(r=0;r<g;r++){if(b[r]){continue}m=i.get(k[r]);if(+m<+n){return}if(+m>+q){return}}u.push(i)});t.chart.substore=Ext.create("Ext.data.JsonStore",{model:d.model,data:u})},processView:function(){var a=this;if(a.fromDate){a.minimum=+a.fromDate}if(a.toDate){a.maximum=+a.toDate}if(a.constrain){a.doConstrain()}},calcEnds:function(){var c=this,a,b=c.step;if(b){a=c.getRange();a=Ext.draw.Draw.snapEndsByDateAndStep(new Date(a.min),new Date(a.max),Ext.isNumber(b)?[Date.MILLI,b]:b);if(c.minimum){a.from=c.minimum}if(c.maximum){a.to=c.maximum}a.step=(a.to-a.from)/a.steps;return a}else{return c.callParent(arguments)}}});Ext.define("Ext.chart.series.Series",{mixins:{observable:"Ext.util.Observable",labels:"Ext.chart.Label",highlights:"Ext.chart.Highlight",tips:"Ext.chart.Tip",callouts:"Ext.chart.Callout"},type:null,title:null,showInLegend:true,renderer:function(e,a,c,d,b){return c},shadowAttributes:null,triggerAfterDraw:false,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.shadowGroups=[];b.mixins.labels.constructor.call(b,a);b.mixins.highlights.constructor.call(b,a);b.mixins.tips.constructor.call(b,a);b.mixins.callouts.constructor.call(b,a);b.addEvents({scope:b,itemmouseover:true,itemmouseout:true,itemmousedown:true,itemmouseup:true,mouseleave:true,afterdraw:true,titlechange:true});b.mixins.observable.constructor.call(b,a);b.on({scope:b,itemmouseover:b.onItemMouseOver,itemmouseout:b.onItemMouseOut,mouseleave:b.onMouseLeave})},eachRecord:function(c,b){var a=this.chart;(a.substore||a.store).each(c,b)},getRecordCount:function(){var b=this.chart,a=b.substore||b.store;return a?a.getCount():0},isExcluded:function(a){var b=this.__excludes;return !!(b&&b[a])},setBBox:function(a){var e=this,c=e.chart,b=c.chartBBox,g=a?0:c.maxGutter[0],d=a?0:c.maxGutter[1],h,i;h={x:b.x,y:b.y,width:b.width,height:b.height};e.clipBox=h;i={x:(h.x+g)-(c.zoom.x*c.zoom.width),y:(h.y+d)-(c.zoom.y*c.zoom.height),width:(h.width-(g*2))*c.zoom.width,height:(h.height-(d*2))*c.zoom.height};e.bbox=i},onAnimate:function(b,a){var c=this;b.stopAnimation();if(c.triggerAfterDraw){return b.animate(Ext.applyIf(a,c.chart.animate))}else{c.triggerAfterDraw=true;return b.animate(Ext.apply(Ext.applyIf(a,c.chart.animate),{listeners:{afteranimate:function(){c.triggerAfterDraw=false;c.fireEvent("afterrender")}}}))}},getGutters:function(){return[0,0]},onItemMouseOver:function(b){var a=this;if(b.series===a){if(a.highlight){a.highlightItem(b)}if(a.tooltip){a.showTip(b)}}},onItemMouseOut:function(b){var a=this;if(b.series===a){a.unHighlightItem();if(a.tooltip){a.hideTip(b)}}},onMouseLeave:function(){var a=this;a.unHighlightItem();if(a.tooltip){a.hideTip()}},getItemForPoint:function(a,j){if(!this.items||!this.items.length||this.seriesIsHidden){return null}var g=this,b=g.items,h=g.bbox,e,c,d;if(!Ext.draw.Draw.withinBox(a,j,h)){return null}for(c=0,d=b.length;c<d;c++){if(b[c]&&this.isItemInPoint(a,j,b[c],c)){return b[c]}}return null},isItemInPoint:function(a,d,c,b){return false},hideAll:function(){var h=this,g=h.items,m,e,d,c,a,k,b;h.seriesIsHidden=true;h._prevShowMarkers=h.showMarkers;h.showMarkers=false;h.hideLabels(0);for(d=0,e=g.length;d<e;d++){m=g[d];k=m.sprite;if(k){k.setAttributes({hidden:true},true)}if(k&&k.shadows){b=k.shadows;for(c=0,a=b.length;c<a;++c){b[c].setAttributes({hidden:true},true)}}}},showAll:function(){var a=this,b=a.chart.animate;a.chart.animate=false;a.seriesIsHidden=false;a.showMarkers=a._prevShowMarkers;a.drawSeries();a.chart.animate=b},getLegendColor:function(a){var b=this,d,c;if(b.seriesStyle){d=b.seriesStyle.fill;c=b.seriesStyle.stroke;if(d&&d!="none"){return d}return c}return"#000"},visibleInLegend:function(a){var b=this.__excludes;if(b){return !b[a]}return !this.seriesIsHidden},setTitle:function(a,d){var c=this,b=c.title;if(Ext.isString(a)){d=a;a=0}if(Ext.isArray(b)){b[a]=d}else{c.title=d}c.fireEvent("titlechange",d,a)}});Ext.define("Ext.chart.series.Cartesian",{extend:"Ext.chart.series.Series",alternateClassName:["Ext.chart.CartesianSeries","Ext.chart.CartesianChart"],xField:null,yField:null,axis:"left",getLegendLabels:function(){var b=this,c=[],a=b.combinations;Ext.each([].concat(b.yField),function(e,d){var g=b.title;c.push((Ext.isArray(g)?g[d]:g)||e)});if(a){Ext.each(a,function(e){var d=c[e[0]],g=c[e[1]];c[e[1]]=d+" & "+g;c.splice(e[0],1)})}return c},eachYValue:function(a,c,b){Ext.each(this.getYValueAccessors(),function(d,e){c.call(b,d(a),e)})},getYValueCount:function(){return this.getYValueAccessors().length},combine:function(g,e){var d=this,c=d.getYValueAccessors(),b=c[g],a=c[e];c[e]=function(h){return b(h)+a(h)};c.splice(g,1);d.callParent([g,e])},clearCombinations:function(){delete this.yValueAccessors;this.callParent()},getYValueAccessors:function(){var b=this,a=b.yValueAccessors;if(!a){a=b.yValueAccessors=[];Ext.each([].concat(b.yField),function(c){a.push(function(d){return d.get(c)})})}return a},getMinMaxXValues:function(){var d=this,b,a,c=d.xField;if(d.getRecordCount()>0){b=Infinity;a=-b;d.eachRecord(function(e){var g=e.get(c);if(g>a){a=g}if(g<b){b=g}})}else{b=a=0}return[b,a]},getMinMaxYValues:function(){var i=this,g=i.stacked,e,c,d,b;function h(k,j){if(!i.isExcluded(j)){if(k<0){b+=k}else{d+=k}}}function a(k,j){if(!i.isExcluded(j)){if(k>c){c=k}if(k<e){e=k}}}if(i.getRecordCount()>0){e=Infinity;c=-e;i.eachRecord(function(j){if(g){d=0;b=0;i.eachYValue(j,h);if(d>c){c=d}if(b<e){e=b}}else{i.eachYValue(j,a)}})}else{e=c=0}return[e,c]},getAxesForXAndYFields:function(){var c=this,e=c.chart.axes,b=[].concat(c.axis),d,a;if(Ext.Array.indexOf(b,"top")>-1){d="top"}else{if(Ext.Array.indexOf(b,"bottom")>-1){d="bottom"}else{if(e.get("top")){d="top"}else{if(e.get("bottom")){d="bottom"}}}}if(Ext.Array.indexOf(b,"left")>-1){a="left"}else{if(Ext.Array.indexOf(b,"right")>-1){a="right"}else{if(e.get("left")){a="left"}else{if(e.get("right")){a="right"}}}}return{xAxis:d,yAxis:a}}});Ext.define("Ext.chart.series.Area",{extend:"Ext.chart.series.Cartesian",alias:"series.area",requires:["Ext.chart.axis.Axis","Ext.draw.Color","Ext.fx.Anim"],type:"area",stacked:true,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;Ext.apply(e,c,{__excludes:[],highlightCfg:{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"}});if(e.highlight){e.highlightSprite=a.add({type:"path",path:["M",0,0],zIndex:1000,opacity:0.3,lineWidth:5,hidden:true,stroke:"#444"})}e.group=a.getGroup(e.seriesId)},shrink:function(b,n,p){var k=b.length,m=Math.floor(k/p),h,g,d=0,l=this.areas.length,a=[],e=[],c=[];for(g=0;g<l;++g){a[g]=0}for(h=0;h<k;++h){d+=b[h];for(g=0;g<l;++g){a[g]+=n[h][g]}if(h%m==0){e.push(d/m);for(g=0;g<l;++g){a[g]/=m}c.push(a);d=0;for(g=0,a=[];g<l;++g){a[g]=0}}}return{x:e,y:c}},getBounds:function(){var w=this,l=w.chart,h=l.getChartStore(),g=[].concat(w.yField),y=g.length,n=[],d=[],x=Infinity,u=x,s=x,t=-x,r=-x,c=Math,v=c.min,B=c.max,a,A,b,m,p,z,j,i,e,k,q;w.setBBox();a=w.bbox;if(w.axis){axis=l.axes.get(w.axis);if(axis){out=axis.calcEnds();s=out.from||axis.prevMin;r=B(out.to||axis.prevMax,0)}}if(w.yField&&!Ext.isNumber(s)){axis=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(w.yField)});out=axis.calcEnds();s=out.from||axis.prevMin;r=B(out.to||axis.prevMax,0)}if(!Ext.isNumber(s)){s=0}if(!Ext.isNumber(r)){r=0}h.each(function(C,D){m=C.get(w.xField);p=[];if(typeof m!="number"){m=D}n.push(m);j=0;for(z=0;z<y;z++){q=C.get(g[z]);if(typeof q=="number"){s=v(s,q);p.push(q);j+=q}}u=v(u,m);t=B(t,m);r=B(r,j);d.push(p)},w);A=a.width/((t-u)||1);b=a.height/((r-s)||1);i=n.length;if((i>a.width)&&w.areas){e=w.shrink(n,d,a.width);n=e.x;d=e.y}return{bbox:a,minX:u,minY:s,xValues:n,yValues:d,xScale:A,yScale:b,areasLen:y}},getPaths:function(){var w=this,l=w.chart,c=l.getChartStore(),d=true,e=w.getBounds(),a=e.bbox,m=w.items=[],v=[],b,p=[],s,h,j,g,q,t,k,z,r,u,n;h=e.xValues.length;for(s=0;s<h;s++){q=e.xValues[s];t=e.yValues[s];j=a.x+(q-e.minX)*e.xScale;k=0;for(z=0;z<e.areasLen;z++){if(w.__excludes[z]){continue}if(!v[z]){v[z]=[]}u=t[z];k+=u;g=a.y+a.height-(k-e.minY)*e.yScale;if(!p[z]){p[z]=["M",j,g];v[z].push(["L",j,g])}else{p[z].push("L",j,g);v[z].push(["L",j,g])}if(!m[z]){m[z]={pointsUp:[],pointsDown:[],series:w}}m[z].pointsUp.push([j,g])}}for(z=0;z<e.areasLen;z++){if(w.__excludes[z]){continue}n=p[z];if(z==0||d){d=false;n.push("L",j,a.y+a.height,"L",a.x,a.y+a.height,"Z")}else{b=v[r];b.reverse();n.push("L",j,b[0][2]);for(s=0;s<h;s++){n.push(b[s][0],b[s][1],b[s][2]);m[z].pointsDown[h-s-1]=[b[s][1],b[s][2]]}n.push("L",a.x,n[2],"Z")}r=z}return{paths:p,areasLen:e.areasLen}},drawSeries:function(){var h=this,g=h.chart,i=g.getChartStore(),c=g.surface,b=g.animate,k=h.group,a=Ext.apply(h.seriesStyle,h.style),l=h.colorArrayStyle,p=l&&l.length||0,d,e,n,m,j;h.unHighlightItem();h.cleanHighlights();if(!i||!i.getCount()){return}n=h.getPaths();if(!h.areas){h.areas=[]}for(d=0;d<n.areasLen;d++){if(h.__excludes[d]){continue}if(!h.areas[d]){h.items[d].sprite=h.areas[d]=c.add(Ext.apply({},{type:"path",group:k,path:n.paths[d],stroke:a.stroke||l[d%p],fill:l[d%p]},a||{}))}e=h.areas[d];m=n.paths[d];if(b){j=h.renderer(e,false,{path:m,fill:l[d%p],stroke:a.stroke||l[d%p]},d,i);h.animation=h.onAnimate(e,{to:j})}else{j=h.renderer(e,false,{path:m,hidden:false,fill:l[d%p],stroke:a.stroke||l[d%p]},d,i);h.areas[d].setAttributes(j,true)}}h.renderLabels();h.renderCallouts()},onAnimate:function(b,a){b.show();return this.callParent(arguments)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,t,q,p,c,e){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],d,n,m;g.setAttributes({text:r(k.get(b[e])),hidden:true},true);d=g.getBBox();n=d.width/2;m=d.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h;if(v.chart.animate&&!v.chart.resizing){g.show(true);v.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(s){v.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,s,K,H,G,d,k){var N=this,t=N.chart,E=t.surface,I=t.resizing,M=N.callouts,u=N.items,w=(H==0)?false:u[H-1].point,A=(H==u.length-1)?false:u[H+1].point,c=K.point,B,g,O,L,q,r,b=m.label.getBBox(),J=30,D=10,C=3,h,e,j,z,v,F=N.clipRect,n,l;if(!w){w=c}if(!A){A=c}L=(A[1]-w[1])/(A[0]-w[0]);q=(c[1]-w[1])/(c[0]-w[0]);r=(A[1]-c[1])/(A[0]-c[0]);g=Math.sqrt(1+L*L);B=[1/g,L/g];O=[-B[1],B[0]];if(q>0&&r<0&&O[1]<0||q<0&&r>0&&O[1]>0){O[0]*=-1;O[1]*=-1}else{if(Math.abs(q)<Math.abs(r)&&O[0]<0||Math.abs(q)>Math.abs(r)&&O[0]>0){O[0]*=-1;O[1]*=-1}}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;if(h<F[0]||(h+j)>(F[0]+F[2])){O[0]*=-1}if(e<F[1]||(e+z)>(F[1]+F[3])){O[1]*=-1}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:z},true);m.label.setAttributes({x:n+(O[0]>0?C:-(b.width+C)),y:l},true);for(v in m){m[v].show(true)}},isItemInPoint:function(j,h,l,c){var g=this,b=l.pointsUp,d=l.pointsDown,n=Math.abs,e=Infinity,a,m,k;for(a=0,m=b.length;a<m;a++){k=[b[a][0],b[a][1]];if(e>n(j-k[0])){e=n(j-k[0])}else{k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){l.storeIndex=a-1;l.storeField=g.yField[c];l.storeItem=g.chart.store.getAt(a-1);l._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=Ext.create("Ext.fx.Anim",Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=Ext.create("Ext.fx.Anim",{target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=true;this.areas[this._index].hide(true);this.drawSeries()}},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.areas[this._index].show(true);this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Area",{extend:"Ext.chart.series.Cartesian",alias:"series.area",requires:["Ext.chart.axis.Axis","Ext.draw.Color","Ext.fx.Anim"],type:"area",stacked:true,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;Ext.apply(e,c,{__excludes:[],highlightCfg:{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"}});if(e.highlight){e.highlightSprite=a.add({type:"path",path:["M",0,0],zIndex:1000,opacity:0.3,lineWidth:5,hidden:true,stroke:"#444"})}e.group=a.getGroup(e.seriesId)},shrink:function(b,n,p){var k=b.length,m=Math.floor(k/p),h,g,d=0,l=this.areas.length,a=[],e=[],c=[];for(g=0;g<l;++g){a[g]=0}for(h=0;h<k;++h){d+=b[h];for(g=0;g<l;++g){a[g]+=n[h][g]}if(h%m==0){e.push(d/m);for(g=0;g<l;++g){a[g]/=m}c.push(a);d=0;for(g=0,a=[];g<l;++g){a[g]=0}}}return{x:e,y:c}},getBounds:function(){var w=this,l=w.chart,h=l.getChartStore(),g=[].concat(w.yField),y=g.length,n=[],d=[],x=Infinity,u=x,s=x,t=-x,r=-x,c=Math,v=c.min,B=c.max,a,A,b,m,p,z,j,i,e,k,q;w.setBBox();a=w.bbox;if(w.axis){axis=l.axes.get(w.axis);if(axis){out=axis.calcEnds();s=out.from||axis.prevMin;r=B(out.to||axis.prevMax,0)}}if(w.yField&&!Ext.isNumber(s)){axis=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(w.yField)});out=axis.calcEnds();s=out.from||axis.prevMin;r=B(out.to||axis.prevMax,0)}if(!Ext.isNumber(s)){s=0}if(!Ext.isNumber(r)){r=0}h.each(function(C,D){m=C.get(w.xField);p=[];if(typeof m!="number"){m=D}n.push(m);j=0;for(z=0;z<y;z++){q=C.get(g[z]);if(typeof q=="number"){s=v(s,q);p.push(q);j+=q}}u=v(u,m);t=B(t,m);r=B(r,j);d.push(p)},w);A=a.width/((t-u)||1);b=a.height/((r-s)||1);i=n.length;if((i>a.width)&&w.areas){e=w.shrink(n,d,a.width);n=e.x;d=e.y}return{bbox:a,minX:u,minY:s,xValues:n,yValues:d,xScale:A,yScale:b,areasLen:y}},getPaths:function(){var w=this,l=w.chart,c=l.getChartStore(),d=true,e=w.getBounds(),a=e.bbox,m=w.items=[],v=[],b,p=[],s,h,j,g,q,t,k,z,r,u,n;h=e.xValues.length;for(s=0;s<h;s++){q=e.xValues[s];t=e.yValues[s];j=a.x+(q-e.minX)*e.xScale;k=0;for(z=0;z<e.areasLen;z++){if(w.__excludes[z]){continue}if(!v[z]){v[z]=[]}u=t[z];k+=u;g=a.y+a.height-(k-e.minY)*e.yScale;if(!p[z]){p[z]=["M",j,g];v[z].push(["L",j,g])}else{p[z].push("L",j,g);v[z].push(["L",j,g])}if(!m[z]){m[z]={pointsUp:[],pointsDown:[],series:w}}m[z].pointsUp.push([j,g])}}for(z=0;z<e.areasLen;z++){if(w.__excludes[z]){continue}n=p[z];if(z==0||d){d=false;n.push("L",j,a.y+a.height,"L",a.x,a.y+a.height,"Z")}else{b=v[r];b.reverse();n.push("L",j,b[0][2]);for(s=0;s<h;s++){n.push(b[s][0],b[s][1],b[s][2]);m[z].pointsDown[h-s-1]=[b[s][1],b[s][2]]}n.push("L",a.x,n[2],"Z")}r=z}return{paths:p,areasLen:e.areasLen}},drawSeries:function(){var h=this,g=h.chart,i=g.getChartStore(),c=g.surface,b=g.animate,k=h.group,a=Ext.apply(h.seriesStyle,h.style),l=h.colorArrayStyle,p=l&&l.length||0,d,e,n,m,j;h.unHighlightItem();h.cleanHighlights();if(!i||!i.getCount()){return}n=h.getPaths();if(!h.areas){h.areas=[]}for(d=0;d<n.areasLen;d++){if(h.__excludes[d]){continue}if(!h.areas[d]){h.items[d].sprite=h.areas[d]=c.add(Ext.apply({},{type:"path",group:k,path:n.paths[d],stroke:a.stroke||l[d%p],fill:l[d%p]},a||{}))}e=h.areas[d];m=n.paths[d];if(b){j=h.renderer(e,false,{path:m,fill:l[d%p],stroke:a.stroke||l[d%p]},d,i);h.animation=h.onAnimate(e,{to:j})}else{j=h.renderer(e,false,{path:m,hidden:false,fill:l[d%p],stroke:a.stroke||l[d%p]},d,i);h.areas[d].setAttributes(j,true)}}h.renderLabels();h.renderCallouts()},onAnimate:function(b,a){b.show();return this.callParent(arguments)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,t,q,p,c,e){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],d,n,m;g.setAttributes({text:r(k.get(b[e])),hidden:true},true);d=g.getBBox();n=d.width/2;m=d.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h;if(v.chart.animate&&!v.chart.resizing){g.show(true);v.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(s){v.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,s,K,H,G,d,k){var N=this,t=N.chart,E=t.surface,I=t.resizing,M=N.callouts,u=N.items,w=(H==0)?false:u[H-1].point,A=(H==u.length-1)?false:u[H+1].point,c=K.point,B,g,O,L,q,r,b=m.label.getBBox(),J=30,D=10,C=3,h,e,j,z,v,F=N.clipRect,n,l;if(!w){w=c}if(!A){A=c}L=(A[1]-w[1])/(A[0]-w[0]);q=(c[1]-w[1])/(c[0]-w[0]);r=(A[1]-c[1])/(A[0]-c[0]);g=Math.sqrt(1+L*L);B=[1/g,L/g];O=[-B[1],B[0]];if(q>0&&r<0&&O[1]<0||q<0&&r>0&&O[1]>0){O[0]*=-1;O[1]*=-1}else{if(Math.abs(q)<Math.abs(r)&&O[0]<0||Math.abs(q)>Math.abs(r)&&O[0]>0){O[0]*=-1;O[1]*=-1}}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;if(h<F[0]||(h+j)>(F[0]+F[2])){O[0]*=-1}if(e<F[1]||(e+z)>(F[1]+F[3])){O[1]*=-1}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:z},true);m.label.setAttributes({x:n+(O[0]>0?C:-(b.width+C)),y:l},true);for(v in m){m[v].show(true)}},isItemInPoint:function(j,h,l,c){var g=this,b=l.pointsUp,d=l.pointsDown,n=Math.abs,e=Infinity,a,m,k;for(a=0,m=b.length;a<m;a++){k=[b[a][0],b[a][1]];if(e>n(j-k[0])){e=n(j-k[0])}else{k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){l.storeIndex=a-1;l.storeField=g.yField[c];l.storeItem=g.chart.store.getAt(a-1);l._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=Ext.create("Ext.fx.Anim",Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=Ext.create("Ext.fx.Anim",{target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=true;this.areas[this._index].hide(true);this.drawSeries()}},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.areas[this._index].show(true);this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Bar",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.BarSeries","Ext.chart.BarChart","Ext.chart.StackedBarChart"],requires:["Ext.chart.axis.Axis","Ext.fx.Anim"],type:"bar",alias:"series.bar",column:false,style:{},gutter:38.2,groupGutter:38.2,xPadding:0,yPadding:10,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;Ext.apply(e,c,{highlightCfg:{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:1.2}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:0.9}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:0.6}}]});e.group=a.getGroup(e.seriesId+"-bars");if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBarGirth:function(){var d=this,a=d.chart.getChartStore(),b=d.column,c=a.getCount(),e=d.gutter/100;return(d.chart.chartBBox[b?"width":"height"]-d[b?"xPadding":"yPadding"]*2)/(c*(e+1)-e)},getGutters:function(){var b=this,a=b.column,c=Math.ceil(b[a?"xPadding":"yPadding"]+b.getBarGirth()/2);return b.column?[c,0]:[0,c]},getBounds:function(){var B=this,r=B.chart,k=r.getChartStore(),s=[].concat(B.yField),c=s.length,l=c,i=B.groupGutter/100,g=B.column,p=B.xPadding,b=B.yPadding,y=B.stacked,q=B.getBarGirth(),h=Math,E=h.max,w=h.abs,A,a,z,x,e,u,C,n,D,m,t,v,d;B.setBBox(true);a=B.bbox;if(B.__excludes){for(t=0,D=B.__excludes.length;t<D;t++){if(B.__excludes[t]){l--}}}if(B.axis){e=r.axes.get(B.axis);if(e){u=e.calcEnds();z=u.from;x=u.to}}if(B.yField&&!Ext.isNumber(z)){e=Ext.create("Ext.chart.axis.Axis",{chart:r,fields:[].concat(B.yField)});u=e.calcEnds();z=u.from;x=u.to}if(!Ext.isNumber(z)){z=0}if(!Ext.isNumber(x)){x=0}C=(g?a.height-b*2:a.width-p*2)/(x-z);A=q/((y?1:l)*(i+1)-i);n=(g)?a.y+a.height-b:a.x+p;if(y){D=[[],[]];k.each(function(j,F){D[0][F]=D[0][F]||0;D[1][F]=D[1][F]||0;for(t=0;t<c;t++){if(B.__excludes&&B.__excludes[t]){continue}m=j.get(s[t]);D[+(m>0)][F]+=w(m)}});D[+(x>0)].push(w(x));D[+(z>0)].push(w(z));d=E.apply(h,D[0]);v=E.apply(h,D[1]);C=(g?a.height-b*2:a.width-p*2)/(v+d);n=n+d*C*(g?-1:1)}else{if(z/x<0){n=n-z*C*(g?-1:1)}}return{bars:s,bbox:a,barsLen:c,groupBarsLen:l,barWidth:q,groupBarWidth:A,scale:C,zero:n,xPadding:p,yPadding:b,signed:z/x<0,minY:z,maxY:x}},getPaths:function(){var v=this,Q=v.chart,b=Q.getChartStore(),E=v.bounds=v.getBounds(),z=v.items=[],k=v.gutter/100,c=v.groupGutter/100,O=Q.animate,J=v.column,x=v.group,l=Q.shadow,M=v.shadowGroups,L=v.shadowAttributes,q=M.length,y=E.bbox,m=v.xPadding,r=v.yPadding,N=v.stacked,w=E.barsLen,K=v.colorArrayStyle,h=K&&K.length||0,B=Math,n=B.max,G=B.min,u=B.abs,P,R,e,H,C,a,i,t,s,p,g,d,D,A,I,F;b.each(function(j,S,T){a=E.zero;i=E.zero;H=0;C=0;t=false;for(P=0,g=0;P<w;P++){if(v.__excludes&&v.__excludes[P]){continue}R=j.get(E.bars[P]);e=Math.round((R-n(E.minY,0))*E.scale);s={fill:K[(w>1?P:0)%h]};if(J){Ext.apply(s,{height:e,width:n(E.groupBarWidth,0),x:(y.x+m+S*E.barWidth*(1+k)+g*E.groupBarWidth*(1+c)*!N),y:a-e})}else{I=(T-1)-S;Ext.apply(s,{height:n(E.groupBarWidth,0),width:e+(a==E.zero),x:a+(a!=E.zero),y:(y.y+r+I*E.barWidth*(1+k)+g*E.groupBarWidth*(1+c)*!N+1)})}if(e<0){if(J){s.y=i;s.height=u(e)}else{s.x=i+e;s.width=u(e)}}if(N){if(e<0){i+=e*(J?-1:1)}else{a+=e*(J?-1:1)}H+=u(e);if(e<0){C+=u(e)}}s.x=Math.floor(s.x)+1;F=Math.floor(s.y);if(!Ext.isIE9&&s.y>F){F--}s.y=F;s.width=Math.floor(s.width);s.height=Math.floor(s.height);z.push({series:v,storeItem:j,value:[j.get(v.xField),R],attr:s,point:J?[s.x+s.width/2,R>=0?s.y:s.y+s.height]:[R>=0?s.x+s.width:s.x,s.y+s.height/2]});if(O&&Q.resizing){p=J?{x:s.x,y:E.zero,width:s.width,height:0}:{x:E.zero,y:s.y,width:0,height:s.height};if(l&&(N&&!t||!N)){t=true;for(d=0;d<q;d++){D=M[d].getAt(N?S:(S*w+P));if(D){D.setAttributes(p,true)}}}A=x.getAt(S*w+P);if(A){A.setAttributes(p,true)}}g++}if(N&&z.length){z[S*g].totalDim=H;z[S*g].totalNegDim=C}},v)},renderShadows:function(v,w,z,l){var A=this,q=A.chart,t=q.surface,g=q.animate,y=A.stacked,a=A.shadowGroups,x=A.shadowAttributes,p=a.length,h=q.getChartStore(),d=A.column,s=A.items,b=[],m=l.zero,e,r,k,B,n,u,c;if((y&&(v%l.groupBarsLen===0))||!y){u=v/l.groupBarsLen;for(e=0;e<p;e++){r=Ext.apply({},x[e]);k=a[e].getAt(y?u:v);Ext.copyTo(r,w,"x,y,width,height");if(!k){k=t.add(Ext.apply({type:"rect",group:a[e]},Ext.apply({},z,r)))}if(y){B=s[v].totalDim;n=s[v].totalNegDim;if(d){r.y=m-n;r.height=B}else{r.x=m-n;r.width=B}}if(g){if(!y){c=A.renderer(k,h.getAt(u),r,v,h);A.onAnimate(k,{to:c})}else{c=A.renderer(k,h.getAt(u),Ext.apply(r,{hidden:true}),v,h);k.setAttributes(c,true)}}else{c=A.renderer(k,h.getAt(u),Ext.apply(r,{hidden:false}),v,h);k.setAttributes(c,true)}b.push(k)}}return b},drawSeries:function(){var D=this,s=D.chart,m=s.getChartStore(),w=s.surface,k=s.animate,B=D.stacked,d=D.column,b=s.shadow,a=D.shadowGroups,r=a.length,p=D.group,g=D.seriesStyle,t,q,z,y,C,u,c,e,h,n,l,A,v,x;if(!m||!m.getCount()){return}delete g.fill;l=Ext.apply(g,this.style);D.unHighlightItem();D.cleanHighlights();D.getPaths();n=D.bounds;t=D.items;C=d?{y:n.zero,height:0}:{x:n.zero,width:0};q=t.length;for(z=0;z<q;z++){u=p.getAt(z);A=t[z].attr;if(b){t[z].shadows=D.renderShadows(z,A,C,n)}if(!u){v=Ext.apply({},C,A);v=Ext.apply(v,l||{});u=w.add(Ext.apply({},{type:"rect",group:p},v))}if(k){c=D.renderer(u,m.getAt(z),A,z,m);u._to=c;x=D.onAnimate(u,{to:Ext.apply(c,l)});if(b&&B&&(z%n.barsLen===0)){y=z/n.barsLen;for(e=0;e<r;e++){x.on("afteranimate",function(){this.show(true)},a[e].getAt(y))}}}else{c=D.renderer(u,m.getAt(z),Ext.apply(A,{hidden:false}),z,m);u.setAttributes(Ext.apply(c,l),true)}t[z].sprite=u}q=p.getCount();for(y=z;y<q;y++){p.getAt(y).hide(true)}if(b){for(e=0;e<r;e++){h=a[e];q=h.getCount();for(y=z;y<q;y++){h.getAt(y).hide(true)}}}D.renderLabels()},onCreateLabel:function(e,l,d,g){var h=this,a=h.chart.surface,k=h.labelsGroup,b=h.label,c=Ext.apply({},b,h.seriesLabelStyle||{}),j;return a.add(Ext.apply({type:"text",group:k},c||{}))},onPlaceLabel:function(H,O,t,K,q,I,J,w){var m=this,n=m.bounds,d=n.groupBarWidth,G=m.column,M=m.chart,v=M.chartBBox,B=M.resizing,p=t.value[0],P=t.value[1],l=t.attr,A=m.label,L=A.orientation=="vertical",h=[].concat(A.field),u=A.renderer,s=u(O.get(h[w])),g=m.getLabelSize(s),a=g.width,c=g.height,b=n.zero,k="outside",r="insideStart",N="insideEnd",F=10,D=6,e=n.signed,E,C,z;H.setAttributes({text:s});H.isOutside=false;if(G){if(q==k){if(c+D+l.height>(P>=0?b-v.y:v.y+v.height-b)){q=N}}else{if(c+D>l.height){q=k;H.isOutside=true}}E=l.x+d/2;C=q==r?(b+((c/2+3)*(P>=0?-1:1))):(P>=0?(l.y+((c/2+3)*(q==k?-1:1))):(l.y+l.height+((c/2+3)*(q===k?1:-1))))}else{if(q==k){if(a+F+l.width>(P>=0?v.x+v.width-b:b-v.x)){q=N}}else{if(a+F>l.width){q=k;H.isOutside=true}}E=q==r?(b+((a/2+5)*(P>=0?1:-1))):(P>=0?(l.x+l.width+((a/2+5)*(q===k?1:-1))):(l.x+((a/2+5)*(q===k?-1:1))));C=l.y+d/2}z={x:E,y:C};if(L){z.rotate={x:E,y:C,degrees:270}}if(I&&B){if(G){E=l.x+l.width/2;C=b}else{E=b;C=l.y+l.height/2}H.setAttributes({x:E,y:C},true);if(L){H.setAttributes({rotate:{x:E,y:C,degrees:270}},true)}}if(I){m.onAnimate(H,{to:z})}else{H.setAttributes(Ext.apply(z,{hidden:false}),true)}},getLabelSize:function(g){var k=this.testerLabel,a=this.label,d=Ext.apply({},a,this.seriesLabelStyle||{}),b=a.orientation==="vertical",j,i,e,c;if(!k){k=this.testerLabel=this.chart.surface.add(Ext.apply({type:"text",opacity:0},d))}k.setAttributes({text:g},true);j=k.getBBox();i=j.width;e=j.height;return{width:b?e:i,height:b?i:e}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,b){var c=b.sprite.getBBox();return c.x<=a&&c.y<=d&&(c.x+c.width)>=a&&(c.y+c.height)>=d},hideAll:function(){var a=this.chart.axes;if(!isNaN(this._index)){if(!this.__excludes){this.__excludes=[]}this.__excludes[this._index]=true;this.drawSeries();a.each(function(b){b.drawAxis()})}},showAll:function(){var a=this.chart.axes;if(!isNaN(this._index)){if(!this.__excludes){this.__excludes=[]}this.__excludes[this._index]=false;this.drawSeries();a.each(function(b){b.drawAxis()})}},getLegendColor:function(a){var c=this,b=c.colorArrayStyle.length;if(c.style&&c.style.fill){return c.style.fill}else{return c.colorArrayStyle[a%b]}},highlightItem:function(a){this.callParent(arguments);this.renderLabels()},unHighlightItem:function(){this.callParent(arguments);this.renderLabels()},cleanHighlights:function(){this.callParent(arguments);this.renderLabels()}});Ext.define("Ext.chart.series.Column",{alternateClassName:["Ext.chart.ColumnSeries","Ext.chart.ColumnChart","Ext.chart.StackedColumnChart"],extend:"Ext.chart.series.Bar",type:"column",alias:"series.column",column:true,xPadding:10,yPadding:0});Ext.define("Ext.chart.series.Gauge",{extend:"Ext.chart.series.Series",type:"gauge",alias:"series.gauge",rad:Math.PI/180,highlightDuration:150,angleField:false,needle:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(i){return h.getSegment(i)}},initialize:function(){var b=this,a=b.chart.getChartStore();b.yField=[];if(b.label.field){a.each(function(c){b.yField.push(c.get(b.label.field))})}},getSegment:function(b){var D=this,C=D.rad,d=Math.cos,a=Math.sin,n=Math.abs,k=D.centerX,i=D.centerY,z=0,w=0,v=0,t=0,h=0,g=0,e=0,c=0,A=0.01,m=b.endRho-b.startRho,s=b.startAngle,q=b.endAngle,j=(s+q)/2*C,l=b.margin||0,u=n(q-s)>180,E=Math.min(s,q)*C,B=Math.max(s,q)*C,p=false;k+=l*d(j);i+=l*a(j);z=k+b.startRho*d(E);h=i+b.startRho*a(E);w=k+b.endRho*d(E);g=i+b.endRho*a(E);v=k+b.startRho*d(B);e=i+b.startRho*a(B);t=k+b.endRho*d(B);c=i+b.endRho*a(B);if(n(z-v)<=A&&n(h-e)<=A){p=true}if(p){return{path:[["M",z,h],["L",w,g],["A",b.endRho,b.endRho,0,+u,1,t,c],["Z"]]}}else{return{path:[["M",z,h],["L",w,g],["A",b.endRho,b.endRho,0,+u,1,t,c],["L",v,e],["A",b.startRho,b.startRho,0,+u,0,z,h],["Z"]]}}},calcMiddle:function(q){var k=this,l=k.rad,p=q.slice,n=k.centerX,m=k.centerY,j=p.startAngle,e=p.endAngle,i=Math.max(("rho" in p)?p.rho:k.radius,k.label.minMargin),h=+k.donut,b=Math.min(j,e)*l,a=Math.max(j,e)*l,d=-(b+(a-b)/2),g=n+(q.endRho+q.startRho)/2*Math.cos(d),c=m-(q.endRho+q.startRho)/2*Math.sin(d);q.middle={x:g,y:c}},drawSeries:function(){var x=this,X=x.chart,b=X.getChartStore(),B=x.group,T=x.chart.animate,E=x.chart.axes.get(0),F=E&&E.minimum||x.minimum||0,J=E&&E.maximum||x.maximum||0,n=x.angleField||x.field||x.xField,N=X.surface,I=X.chartBBox,h=x.rad,c=+x.donut,Y={},C=[],m=x.seriesStyle,a=x.seriesLabelStyle,g=x.colorArrayStyle,A=g&&g.length||0,L=X.maxGutter[0],K=X.maxGutter[1],k=Math.cos,t=Math.sin,u,e,d,w,s,D,P,G,H,M,V,U,l,W,y,q,R,S,r,z,v,Q,O;Ext.apply(m,x.style||{});x.setBBox();z=x.bbox;if(x.colorSet){g=x.colorSet;A=g.length}if(!b||!b.getCount()){return}e=x.centerX=I.x+(I.width/2);d=x.centerY=I.y+I.height;x.radius=Math.min(e-I.x,d-I.y);x.slices=s=[];x.items=C=[];if(!x.value){M=b.getAt(0);x.value=M.get(n)}P=x.value;if(x.needle){Q={series:x,value:P,startAngle:-180,endAngle:0,rho:x.radius};v=-180*(1-(P-F)/(J-F));s.push(Q)}else{v=-180*(1-(P-F)/(J-F));Q={series:x,value:P,startAngle:-180,endAngle:v,rho:x.radius};O={series:x,value:x.maximum-P,startAngle:v,endAngle:0,rho:x.radius};s.push(Q,O)}for(V=0,H=s.length;V<H;V++){w=s[V];D=B.getAt(V);u=Ext.apply({segment:{startAngle:w.startAngle,endAngle:w.endAngle,margin:0,rho:w.rho,startRho:w.rho*+c/100,endRho:w.rho}},Ext.apply(m,g&&{fill:g[V%A]}||{}));G=Ext.apply({},u.segment,{slice:w,series:x,storeItem:M,index:V});C[V]=G;if(!D){r=Ext.apply({type:"path",group:B},Ext.apply(m,g&&{fill:g[V%A]}||{}));D=N.add(Ext.apply(r,u))}w.sprite=w.sprite||[];G.sprite=D;w.sprite.push(D);if(T){u=x.renderer(D,M,u,V,b);D._to=u;x.onAnimate(D,{to:u})}else{u=x.renderer(D,M,Ext.apply(u,{hidden:false}),V,b);D.setAttributes(u,true)}}if(x.needle){v=v*Math.PI/180;if(!x.needleSprite){x.needleSprite=x.chart.surface.add({type:"path",path:["M",e+(x.radius*+c/100)*k(v),d+-Math.abs((x.radius*+c/100)*t(v)),"L",e+x.radius*k(v),d+-Math.abs(x.radius*t(v))],"stroke-width":4,stroke:"#222"})}else{if(T){x.onAnimate(x.needleSprite,{to:{path:["M",e+(x.radius*+c/100)*k(v),d+-Math.abs((x.radius*+c/100)*t(v)),"L",e+x.radius*k(v),d+-Math.abs(x.radius*t(v))]}})}else{x.needleSprite.setAttributes({type:"path",path:["M",e+(x.radius*+c/100)*k(v),d+-Math.abs((x.radius*+c/100)*t(v)),"L",e+x.radius*k(v),d+-Math.abs(x.radius*t(v))]})}}x.needleSprite.setAttributes({hidden:false},true)}delete x.value},setValue:function(a){this.value=a;this.drawSeries()},onCreateLabel:function(c,b,a,d){},onPlaceLabel:function(c,g,e,d,h,a,b){},onPlaceCallout:function(){},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,c,b){return false},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Line",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.LineSeries","Ext.chart.LineChart"],requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.draw.Draw","Ext.fx.Anim"],type:"line",alias:"series.line",selectionTolerance:20,showMarkers:true,markerConfig:{},style:{},smooth:false,defaultSmoothness:3,fill:false,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;Ext.apply(e,c,{highlightCfg:{"stroke-width":3},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}}]});e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},shrink:function(b,k,l){var h=b.length,j=Math.floor(h/l),g=1,d=0,a=0,e=[b[0]],c=[k[0]];for(;g<h;++g){d+=b[g]||0;a+=k[g]||0;if(g%j==0){e.push(d/j);c.push(a/j);d=0;a=0}}return{x:e,y:c}},drawSeries:function(){var am=this,aw=am.chart,U=aw.axes,aq=aw.getChartStore(),X=aq.getCount(),w=am.chart.surface,ao={},T=am.group,M=am.showMarkers,aC=am.markerGroup,F=aw.shadow,E=am.shadowGroups,Z=am.shadowAttributes,Q=am.smooth,s=E.length,au=["M"],V=["M"],d=["M"],b=["M"],L=aw.markerIndex,ak=[].concat(am.axis),aj,ax=[],ai={},ac=[],z={},K=false,S=[],aB=am.markerStyle,ab=am.style,v=am.colorArrayStyle,R=v&&v.length||0,N=Ext.isNumber,ay=am.seriesIdx,h=am.getAxesForXAndYFields(),m=h.xAxis,aA=h.yAxis,ae,k,ad,af,C,c,ag,J,I,g,e,u,t,Y,P,O,av,n,H,G,aD,p,r,D,a,aa,ah,B,at,A,ar,q,az,ap,an,W,l,al;if(am.fireEvent("beforedraw",am)===false){return}if(!X||am.seriesIsHidden){al=this.items;if(al){for(P=0,av=al.length;P<av;++P){if(al[P].sprite){al[P].sprite.hide(true)}}}return}ap=Ext.apply(aB||{},am.markerConfig);W=ap.type;delete ap.type;an=ab;if(!an["stroke-width"]){an["stroke-width"]=0.5}if(L&&aC&&aC.getCount()){for(P=0;P<L;P++){G=aC.getAt(P);aC.remove(G);aC.add(G);aD=aC.getAt(aC.getCount()-2);G.setAttributes({x:0,y:0,translate:{x:aD.attr.translation.x,y:aD.attr.translation.y}},true)}}am.unHighlightItem();am.cleanHighlights();am.setBBox();ao=am.bbox;am.clipRect=[ao.x,ao.y,ao.width,ao.height];for(P=0,av=ak.length;P<av;P++){n=U.get(ak[P]);if(n){H=n.calcEnds();if(n.position=="top"||n.position=="bottom"){B=H.from;at=H.to}else{A=H.from;ar=H.to}}}if(am.xField&&!N(B)&&(m=="bottom"||m=="top")&&!U.get(m)){n=Ext.create("Ext.chart.axis.Axis",{chart:aw,fields:[].concat(am.xField)}).calcEnds();B=n.from;at=n.to}if(am.yField&&!N(A)&&(aA=="right"||aA=="left")&&!U.get(aA)){n=Ext.create("Ext.chart.axis.Axis",{chart:aw,fields:[].concat(am.yField)}).calcEnds();A=n.from;ar=n.to}if(isNaN(B)){B=0;aa=ao.width/((X-1)||1)}else{aa=ao.width/((at-B)||(X-1)||1)}if(isNaN(A)){A=0;ah=ao.height/((X-1)||1)}else{ah=ao.height/((ar-A)||(X-1)||1)}am.eachRecord(function(j,x){r=j.get(am.xField);if(typeof r=="string"||typeof r=="object"&&!Ext.isDate(r)||m&&U.get(m)&&U.get(m).type=="Category"){if(r in ai){r=ai[r]}else{r=ai[r]=x}}D=j.get(am.yField);if(typeof D=="undefined"||(typeof D=="string"&&!D)){return}if(typeof D=="string"||typeof D=="object"&&!Ext.isDate(D)||aA&&U.get(aA)&&U.get(aA).type=="Category"){D=x}S.push(x);ax.push(r);ac.push(D)});av=ax.length;if(av>ao.width){a=am.shrink(ax,ac,ao.width);ax=a.x;ac=a.y}am.items=[];l=0;av=ax.length;for(P=0;P<av;P++){r=ax[P];D=ac[P];if(D===false){if(V.length==1){V=[]}K=true;am.items.push(false);continue}else{J=(ao.x+(r-B)*aa).toFixed(2);I=((ao.y+ao.height)-(D-A)*ah).toFixed(2);if(K){K=false;V.push("M")}V=V.concat([J,I])}if((typeof t=="undefined")&&(typeof I!="undefined")){t=I;u=J}if(!am.line||aw.resizing){au=au.concat([J,ao.y+ao.height/2])}if(aw.animate&&aw.resizing&&am.line){am.line.setAttributes({path:au},true);if(am.fillPath){am.fillPath.setAttributes({path:au,opacity:0.2},true)}if(am.line.shadows){ae=am.line.shadows;for(O=0,s=ae.length;O<s;O++){k=ae[O];k.setAttributes({path:au},true)}}}if(M){G=aC.getAt(l++);if(!G){G=Ext.chart.Shape[W](w,Ext.apply({group:[T,aC],x:0,y:0,translate:{x:+(g||J),y:e||(ao.y+ao.height/2)},value:'"'+r+", "+D+'"',zIndex:4000},ap));G._to={translate:{x:+J,y:+I}}}else{G.setAttributes({value:'"'+r+", "+D+'"',x:0,y:0,hidden:false},true);G._to={translate:{x:+J,y:+I}}}}am.items.push({series:am,value:[r,D],point:[J,I],sprite:G,storeItem:aq.getAt(S[P])});g=J;e=I}if(V.length<=1){return}if(am.smooth){b=Ext.draw.Draw.smooth(V,N(Q)?Q:am.defaultSmoothness)}d=Q?b:V;if(aw.markerIndex&&am.previousPath){af=am.previousPath;if(!Q){Ext.Array.erase(af,1,2)}}else{af=V}if(!am.line){am.line=w.add(Ext.apply({type:"path",group:T,path:au,stroke:an.stroke||an.fill},an||{}));if(F){am.line.setAttributes(Ext.apply({},am.shadowOptions),true)}am.line.setAttributes({fill:"none",zIndex:3000});if(!an.stroke&&R){am.line.setAttributes({stroke:v[ay%R]},true)}if(F){ae=am.line.shadows=[];for(ad=0;ad<s;ad++){aj=Z[ad];aj=Ext.apply({},aj,{path:au});k=w.add(Ext.apply({},{type:"path",group:E[ad]},aj));ae.push(k)}}}if(am.fill){c=d.concat([["L",J,ao.y+ao.height],["L",u,ao.y+ao.height],["L",u,t]]);if(!am.fillPath){am.fillPath=w.add({group:T,type:"path",opacity:an.opacity||0.3,fill:an.fill||v[ay%R],path:au})}}Y=M&&aC.getCount();if(aw.animate){C=am.fill;q=am.line;ag=am.renderer(q,false,{path:d},P,aq);Ext.apply(ag,an||{},{stroke:an.stroke||an.fill});delete ag.fill;q.show(true);if(aw.markerIndex&&am.previousPath){am.animation=az=am.onAnimate(q,{to:ag,from:{path:af}})}else{am.animation=az=am.onAnimate(q,{to:ag})}if(F){ae=q.shadows;for(O=0;O<s;O++){ae[O].show(true);if(aw.markerIndex&&am.previousPath){am.onAnimate(ae[O],{to:{path:d},from:{path:af}})}else{am.onAnimate(ae[O],{to:{path:d}})}}}if(C){am.fillPath.show(true);am.onAnimate(am.fillPath,{to:Ext.apply({},{path:c,fill:an.fill||v[ay%R],"stroke-width":0},an||{})})}if(M){l=0;for(P=0;P<av;P++){if(am.items[P]){p=aC.getAt(l++);if(p){ag=am.renderer(p,aq.getAt(P),p._to,P,aq);am.onAnimate(p,{to:Ext.apply(ag,ap||{})});p.show(true)}}}for(;l<Y;l++){p=aC.getAt(l);p.hide(true)}}}else{ag=am.renderer(am.line,false,{path:d,hidden:false},P,aq);Ext.apply(ag,an||{},{stroke:an.stroke||an.fill});delete ag.fill;am.line.setAttributes(ag,true);if(F){ae=am.line.shadows;for(O=0;O<s;O++){ae[O].setAttributes({path:d,hidden:false},true)}}if(am.fill){am.fillPath.setAttributes({path:c,hidden:false},true)}if(M){l=0;for(P=0;P<av;P++){if(am.items[P]){p=aC.getAt(l++);if(p){ag=am.renderer(p,aq.getAt(P),p._to,P,aq);p.setAttributes(Ext.apply(ap||{},ag||{}),true);p.show(true)}}}for(;l<Y;l++){p=aC.getAt(l);p.hide(true)}}}if(aw.markerIndex){if(am.smooth){Ext.Array.erase(V,1,2)}else{Ext.Array.splice(V,1,0,V[1],V[2])}am.previousPath=V}am.renderLabels();am.renderCallouts();am.fireEvent("draw",am)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,t,q,p,d){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],c=t.sprite.attr.radius,e,n,m;g.setAttributes({text:r(k.get(b)),hidden:true},true);if(p=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(p=="under"||p=="over"){e=t.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(p=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(v.chart.animate&&!v.chart.resizing){g.show(true);v.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(s&&v.animation){v.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},highlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&!a.highlighted){if(!("__strokeWidth" in a.line)){a.line.__strokeWidth=a.line.attr["stroke-width"]||0}if(a.line.__anim){a.line.__anim.paused=true}a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth+3}});a.highlighted=true}},unHighlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&a.highlighted){a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth}});a.highlighted=false}},onPlaceCallout:function(m,s,K,H,G,d,k){if(!G){return}var N=this,t=N.chart,E=t.surface,I=t.resizing,M=N.callouts,u=N.items,w=H==0?false:u[H-1].point,A=(H==u.length-1)?false:u[H+1].point,c=[+K.point[0],+K.point[1]],B,g,O,L,q,r,J=M.offsetFromViz||30,D=M.offsetToSide||10,C=M.offsetBox||3,h,e,j,z,v,F=N.clipRect,b={width:M.styles.width||10,height:M.styles.height||10},n,l;if(!w){w=c}if(!A){A=c}L=(A[1]-w[1])/(A[0]-w[0]);q=(c[1]-w[1])/(c[0]-w[0]);r=(A[1]-c[1])/(A[0]-c[0]);g=Math.sqrt(1+L*L);B=[1/g,L/g];O=[-B[1],B[0]];if(q>0&&r<0&&O[1]<0||q<0&&r>0&&O[1]>0){O[0]*=-1;O[1]*=-1}else{if(Math.abs(q)<Math.abs(r)&&O[0]<0||Math.abs(q)>Math.abs(r)&&O[0]>0){O[0]*=-1;O[1]*=-1}}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;if(h<F[0]||(h+j)>(F[0]+F[2])){O[0]*=-1}if(e<F[1]||(e+z)>(F[1]+F[3])){O[1]*=-1}n=c[0]+O[0]*J;l=c[1]+O[1]*J;h=n+(O[0]>0?0:-(b.width+2*C));e=l-b.height/2-C;j=b.width+2*C;z=b.height+2*C;if(t.animate){N.onAnimate(m.lines,{to:{path:["M",c[0],c[1],"L",n,l,"Z"]}});if(m.panel){m.panel.setPosition(h,e,true)}}else{m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);if(m.panel){m.panel.setPosition(h,e)}}for(v in m){m[v].show(true)}},isItemInPoint:function(j,g,B,r){var D=this,n=D.items,t=D.selectionTolerance,k=null,A,c,q,w,h,z,b,u,a,l,C,e,d,p,v,s,E=Math.sqrt,m=Math.abs;c=n[r];A=r&&n[r-1];if(r>=h){A=n[h-1]}q=A&&A.point;w=c&&c.point;z=A?q[0]:w[0]-t;b=A?q[1]:w[1];u=c?w[0]:q[0]+t;a=c?w[1]:q[1];e=E((j-z)*(j-z)+(g-b)*(g-b));d=E((j-u)*(j-u)+(g-a)*(g-a));p=Math.min(e,d);if(p<=t){return p==e?A:c}return false},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Cartesian.prototype.hideAll.call(e)}else{Ext.chart.series.Cartesian.prototype.showAll.call(e)}if(e.line){e.line.setAttributes({hidden:!a},true);if(e.line.shadows){for(b=0,c=e.line.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}if(e.fillPath){e.fillPath.setAttributes({hidden:!a},true)}},hideAll:function(){this.toggleAll(false)},showAll:function(){this.toggleAll(true)}});Ext.define("Ext.chart.series.Pie",{alternateClassName:["Ext.chart.PieSeries","Ext.chart.PieChart"],extend:"Ext.chart.series.Series",type:"pie",alias:"series.pie",rad:Math.PI/180,highlightDuration:150,angleField:false,lengthField:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;Ext.applyIf(h,{highlightCfg:{segment:{margin:20}}});Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(i){return h.getSegment(i)};h.__excludes=h.__excludes||[]},initialize:function(){var b=this,a=b.chart.getChartStore();b.yField=[];if(b.label.field){a.each(function(c){b.yField.push(c.get(b.label.field))})}},getSegment:function(d){var K=this,J=K.rad,i=Math.cos,a=Math.sin,q=K.centerX,n=K.centerY,F=0,E=0,D=0,B=0,l=0,k=0,j=0,g=0,z=0,c=0,w=0,b=0,H=0.01,A=d.startAngle,v=d.endAngle,p=(A+v)/2*J,s=d.margin||0,L=Math.min(A,v)*J,I=Math.max(A,v)*J,u=i(L),h=a(L),t=i(I),e=a(I),m=i(p),G=a(p),C=0,r=0.7071067811865476;if(I-L<H){return{path:""}}if(s!==0){q+=s*m;n+=s*G}E=q+d.endRho*u;k=n+d.endRho*h;B=q+d.endRho*t;g=n+d.endRho*e;if(Math.abs(E-B)+Math.abs(k-g)<H){m=r;G=-r;C=1}w=q+d.endRho*m;b=n+d.endRho*G;if(d.startRho!==0){F=q+d.startRho*u;l=n+d.startRho*h;D=q+d.startRho*t;j=n+d.startRho*e;z=q+d.startRho*m;c=n+d.startRho*G;return{path:[["M",E,k],["A",d.endRho,d.endRho,0,0,1,w,b],["L",w,b],["A",d.endRho,d.endRho,0,C,1,B,g],["L",B,g],["L",D,j],["A",d.startRho,d.startRho,0,C,0,z,c],["L",z,c],["A",d.startRho,d.startRho,0,0,0,F,l],["L",F,l],["Z"]]}}else{return{path:[["M",q,n],["L",E,k],["A",d.endRho,d.endRho,0,0,1,w,b],["L",w,b],["A",d.endRho,d.endRho,0,C,1,B,g],["L",B,g],["L",q,n],["Z"]]}}},calcMiddle:function(n){var i=this,j=i.rad,m=n.slice,l=i.centerX,k=i.centerY,h=m.startAngle,d=m.endAngle,g=+i.donut,c=-(h+d)*j/2,a=(n.endRho+n.startRho)/2,e=l+a*Math.cos(c),b=k-a*Math.sin(c);n.middle={x:e,y:b}},drawSeries:function(){var z=this,b=z.chart.getChartStore(),F=z.group,af=z.chart.animate,r=z.angleField||z.field||z.xField,I=[].concat(z.lengthField),ae=0,X=z.colorSet,ak=z.chart,U=ak.surface,P=ak.chartBBox,m=ak.shadow,ac=z.shadowGroups,ab=z.shadowAttributes,ao=ac.length,h=z.rad,V=I.length,J=0,d=+z.donut,am=[],an={},al,G=[],k=false,C=0,Y=0,l=9,ap=true,B=0,q=z.seriesStyle,a=z.seriesLabelStyle,g=z.colorArrayStyle,E=g&&g.length||0,S=ak.maxGutter[0],R=ak.maxGutter[1],N=Math.abs,w,ad,aj,K,Q,M,e,c,x,t=0,y,v,H,W,L,aq,O,T,ah,ag,n,ai,A,s,Z,aa,u,D;Ext.apply(q,z.style||{});z.setBBox();D=z.bbox;if(z.colorSet){g=z.colorSet;E=g.length}if(!b||!b.getCount()){return}z.unHighlightItem();z.cleanHighlights();e=z.centerX=P.x+(P.width/2);c=z.centerY=P.y+(P.height/2);z.radius=Math.min(e-P.x,c-P.y);z.slices=v=[];z.items=G=[];b.each(function(j,p){if(this.__excludes&&this.__excludes[p]){return}C+=+j.get(r);if(I[0]){for(ag=0,ae=0;ag<V;ag++){ae+=+j.get(I[ag])}am[p]=ae;Y=Math.max(Y,ae)}},this);C=C||1;b.each(function(j,p){if(this.__excludes&&this.__excludes[p]){W=0}else{W=j.get(r);if(t==0){t=1}}if(t==1){t=2;z.firstAngle=B=360*W/C/2;for(ag=0;ag<p;ag++){v[ag].startAngle=v[ag].endAngle=z.firstAngle}}ai=B-360*W/C;y={series:z,value:W,startAngle:B,endAngle:ai,storeItem:j};if(I[0]){aq=am[p];y.rho=z.radius*(aq/Y)}else{y.rho=z.radius}v[p]=y;B=ai},z);if(m){for(ah=0,O=v.length;ah<O;ah++){y=v[ah];y.shadowAttrs=[];for(ag=0,J=0,K=[];ag<V;ag++){H=F.getAt(ah*V+ag);x=I[ag]?b.getAt(ah).get(I[ag])/am[ah]*y.rho:y.rho;w={segment:{startAngle:y.startAngle,endAngle:y.endAngle,margin:0,rho:y.rho,startRho:J+(x*d/100),endRho:J+x},hidden:!y.value&&(y.startAngle%360)==(y.endAngle%360)};for(M=0,K=[];M<ao;M++){aj=ab[M];Q=ac[M].getAt(ah);if(!Q){Q=ak.surface.add(Ext.apply({},{type:"path",group:ac[M],strokeLinejoin:"round"},w,aj))}if(af){aj=z.renderer(Q,b.getAt(ah),Ext.apply({},w,aj),ah,b);z.onAnimate(Q,{to:aj})}else{aj=z.renderer(Q,b.getAt(ah),aj,ah,b);Q.setAttributes(aj,true)}K.push(Q)}y.shadowAttrs[ag]=K}}}for(ah=0,O=v.length;ah<O;ah++){y=v[ah];for(ag=0,J=0;ag<V;ag++){H=F.getAt(ah*V+ag);x=I[ag]?b.getAt(ah).get(I[ag])/am[ah]*y.rho:y.rho;w=Ext.apply({segment:{startAngle:y.startAngle,endAngle:y.endAngle,margin:0,rho:y.rho,startRho:J+(x*d/100),endRho:J+x},hidden:(!y.value&&(y.startAngle%360)==(y.endAngle%360))},Ext.apply(q,g&&{fill:g[(V>1?ag:ah)%E]}||{}));L=Ext.apply({},w.segment,{slice:y,series:z,storeItem:y.storeItem,index:ah});z.calcMiddle(L);if(m){L.shadows=y.shadowAttrs[ag]}G[ah]=L;if(!H){u=Ext.apply({type:"path",group:F,middle:L.middle},Ext.apply(q,g&&{fill:g[(V>1?ag:ah)%E]}||{}));H=U.add(Ext.apply(u,w))}y.sprite=y.sprite||[];L.sprite=H;y.sprite.push(H);y.point=[L.middle.x,L.middle.y];if(af){w=z.renderer(H,b.getAt(ah),w,ah,b);H._to=w;H._animating=true;z.onAnimate(H,{to:w,listeners:{afteranimate:{fn:function(){this._animating=false},scope:H}}})}else{w=z.renderer(H,b.getAt(ah),Ext.apply(w,{hidden:false}),ah,b);H.setAttributes(w,true)}J+=x}}O=F.getCount();for(ah=0;ah<O;ah++){if(!v[(ah/V)>>0]&&F.getAt(ah)){F.getAt(ah).hide(true)}}if(m){ao=ac.length;for(M=0;M<O;M++){if(!v[(M/V)>>0]){for(ag=0;ag<ao;ag++){if(ac[ag].getAt(M)){ac[ag].getAt(M).hide(true)}}}}}z.renderLabels();z.renderCallouts()},onCreateLabel:function(g,l,e,h){var j=this,k=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,m=l.middle,b=Ext.apply(j.seriesLabelStyle||{},a||{});return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:k,x:m.x,y:m.y},b))},onPlaceLabel:function(k,q,A,u,t,e,g){var C=this,r=C.chart,z=r.resizing,B=C.label,v=B.renderer,c=[].concat(B.field),m=C.centerX,l=C.centerY,D=A.middle,b={x:D.x,y:D.y},p=D.x-m,n=D.y-l,s={},d=1,j=Math.atan2(n,p||1),w=j*180/Math.PI,h;if(this.__excludes&&this.__excludes[u]){b.hidden=true}function a(i){if(i<0){i+=360}return i%360}k.setAttributes({text:v(q.get(c[g]))},true);switch(t){case"outside":d=Math.sqrt(p*p+n*n)*2;b.x=d*Math.cos(j)+m;b.y=d*Math.sin(j)+l;break;case"rotate":w=a(w);w=(w>90&&w<270)?w+180:w;h=k.attr.rotation.degrees;if(h!=null&&Math.abs(h-w)>180){if(w>h){w-=360}else{w+=360}w=w%360}else{w=a(w)}b.rotate={degrees:w,x:b.x,y:b.y};break;default:break}b.translate={x:0,y:0};if(e&&!z&&(t!="rotate"||h!=null)){C.onAnimate(k,{to:b})}else{k.setAttributes(b,true)}k._from=s},onPlaceCallout:function(l,q,B,w,v,d,e){var D=this,r=D.chart,z=r.resizing,C=D.callouts,j=D.centerX,h=D.centerY,E=B.middle,b={x:E.x,y:E.y},n=E.x-j,k=E.y-h,c=1,m,g=Math.atan2(k,n||1),a=l.label.getBBox(),A=20,u=10,t=10,s;c=B.endRho+A;m=(B.endRho+B.startRho)/2+(B.endRho-B.startRho)/3;b.x=c*Math.cos(g)+j;b.y=c*Math.sin(g)+h;n=m*Math.cos(g);k=m*Math.sin(g);if(r.animate){D.onAnimate(l.lines,{to:{path:["M",n+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",n>0?u:-u,0,"z"]}});D.onAnimate(l.box,{to:{x:b.x+(n>0?u:-(u+a.width+2*t)),y:b.y+(k>0?(-a.height-t/2):(-a.height-t/2)),width:a.width+2*t,height:a.height+2*t}});D.onAnimate(l.label,{to:{x:b.x+(n>0?(u+t):-(u+a.width+t)),y:b.y+(k>0?-a.height/4:-a.height/4)}})}else{l.lines.setAttributes({path:["M",n+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",n>0?u:-u,0,"z"]},true);l.box.setAttributes({x:b.x+(n>0?u:-(u+a.width+2*t)),y:b.y+(k>0?(-a.height-t/2):(-a.height-t/2)),width:a.width+2*t,height:a.height+2*t},true);l.label.setAttributes({x:b.x+(n>0?(u+t):-(u+a.width+t)),y:b.y+(k>0?-a.height/4:-a.height/4)},true)}for(s in l){l[s].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,q=Math.abs,p=q(l-d),m=q(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(p*p+m*m),b=Math.atan2(j-c,l-d)/h.rad;if(b>h.firstAngle){b-=360}return(b<=g&&b>a&&k>=n.startRho&&k<=n.endRho)},hideAll:function(){var e,b,h,g,d,a,c;if(!isNaN(this._index)){this.__excludes=this.__excludes||[];this.__excludes[this._index]=true;c=this.slices[this._index].sprite;for(d=0,a=c.length;d<a;d++){c[d].setAttributes({hidden:true},true)}if(this.slices[this._index].shadowAttrs){for(e=0,g=this.slices[this._index].shadowAttrs,b=g.length;e<b;e++){h=g[e];for(d=0,a=h.length;d<a;d++){h[d].setAttributes({hidden:true},true)}}}this.drawSeries()}},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},highlightItem:function(t){var v=this,u=v.rad;t=t||this.items[this._index];this.unHighlightItem();if(!t||t.sprite&&t.sprite._animating){return}v.callParent([t]);if(!v.highlight){return}if("segment" in v.highlightCfg){var z=v.highlightCfg.segment,d=v.chart.animate,p,s,a,e,k,b,m,c;if(v.labelsGroup){var g=v.labelsGroup,q=v.label.display,h=g.getAt(t.index),w=(t.startAngle+t.endAngle)/2*u,n=z.margin||0,l=n*Math.cos(w),j=n*Math.sin(w);if(Math.abs(l)<1e-10){l=0}if(Math.abs(j)<1e-10){j=0}if(d){h.stopAnimation();h.animate({to:{translate:{x:l,y:j}},duration:v.highlightDuration})}else{h.setAttributes({translate:{x:l,y:j}},true)}}if(v.chart.shadow&&t.shadows){s=0;a=t.shadows;k=a.length;for(;s<k;s++){e=a[s];b={};m=t.sprite._from.segment;for(c in m){if(!(c in z)){b[c]=m[c]}}p={segment:Ext.applyIf(b,v.highlightCfg.segment)};if(d){e.stopAnimation();e.animate({to:p,duration:v.highlightDuration})}else{e.setAttributes(p,true)}}}}},unHighlightItem:function(){var x=this;if(!x.highlight){return}if(("segment" in x.highlightCfg)&&x.items){var l=x.items,e=x.chart.animate,d=!!x.chart.shadow,k=x.labelsGroup,u=l.length,t=0,s=0,r=x.label.display,y,m,c,a,w,n,b,g,v,h,q;for(;t<u;t++){v=l[t];if(!v){continue}n=v.sprite;if(n&&n._highlighted){if(k){h=k.getAt(v.index);q=Ext.apply({translate:{x:0,y:0}},r=="rotate"?{rotate:{x:h.attr.x,y:h.attr.y,degrees:h.attr.rotation.degrees}}:{});if(e){h.stopAnimation();h.animate({to:q,duration:x.highlightDuration})}else{h.setAttributes(q,true)}}if(d){b=v.shadows;y=b.length;for(;s<y;s++){c={};a=v.sprite._to.segment;w=v.sprite._from.segment;Ext.apply(c,w);for(m in a){if(!(m in w)){c[m]=a[m]}}g=b[s];if(e){g.stopAnimation();g.animate({to:{segment:c},duration:x.highlightDuration})}else{g.setAttributes({segment:c},true)}}}}}}x.callParent(arguments)},getLegendColor:function(a){var b=this;return(b.colorSet&&b.colorSet[a%b.colorSet.length])||b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Radar",{extend:"Ext.chart.series.Series",requires:["Ext.chart.Shape","Ext.fx.Anim"],type:"radar",alias:"series.radar",rad:Math.PI/180,showInLegend:false,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}},drawSeries:function(){var M=this,n=M.chart.getChartStore(),q=M.group,D,z=M.chart,m=z.animate,c=M.field||M.yField,F=z.surface,v=z.chartBBox,h,s,r,A,j,K=0,E=[],I=Math.max,e=Math.cos,a=Math.sin,C=Math.PI*2,G=n.getCount(),L,B,u,t,d,H,b,k=M.seriesStyle,J=M.seriesLabelStyle,p=z.resizing||!M.radar,g=z.axes&&z.axes.get(0),w=!(g&&g.maximum);M.setBBox();K=w?0:(g.maximum||0);Ext.apply(k,M.style||{});if(!n||!n.getCount()){return}M.unHighlightItem();M.cleanHighlights();s=M.centerX=v.x+(v.width/2);r=M.centerY=v.y+(v.height/2);M.radius=j=Math.min(v.width,v.height)/2;M.items=A=[];if(w){z.series.each(function(i){E.push(i.yField)});n.each(function(l,x){for(x=0,b=E.length;x<b;x++){K=I(+l.get(E[x]),K)}})}K=K||1;L=[];B=[];n.each(function(l,x){d=j*l.get(c)/K;u=d*e(x/G*C);t=d*a(x/G*C);if(x==0){B.push("M",u+s,t+r);L.push("M",0.01*u+s,0.01*t+r)}else{B.push("L",u+s,t+r);L.push("L",0.01*u+s,0.01*t+r)}A.push({sprite:false,point:[s+u,r+t],series:M})});B.push("Z");if(!M.radar){M.radar=F.add(Ext.apply({type:"path",group:q,path:L},k||{}))}if(z.resizing){M.radar.setAttributes({path:L},true)}if(z.animate){M.onAnimate(M.radar,{to:Ext.apply({path:B},k||{})})}else{M.radar.setAttributes(Ext.apply({path:B},k||{}),true)}if(M.showMarkers){M.drawMarkers()}M.renderLabels();M.renderCallouts()},drawMarkers:function(){var n=this,k=n.chart,a=k.surface,b=Ext.apply({},n.markerStyle||{}),j=Ext.apply(b,n.markerConfig),m=n.items,p=j.type,r=n.markerGroup,e=n.centerX,d=n.centerY,q,h,c,g;delete j.type;for(h=0,c=m.length;h<c;h++){q=m[h];g=r.getAt(h);if(!g){g=Ext.chart.Shape[p](a,Ext.apply({group:r,x:0,y:0,translate:{x:e,y:d}},j))}else{g.show()}if(k.resizing){g.setAttributes({x:0,y:0,translate:{x:e,y:d}},true)}g._to={translate:{x:q.point[0],y:q.point[1]}};if(k.animate){n.onAnimate(g,{to:g._to})}else{g.setAttributes(Ext.apply(g._to,j||{}),true)}}},isItemInPoint:function(c,g,e){var b,d=10,a=Math.abs;b=e.point;return(a(b[0]-c)<=d&&a(b[1]-g)<=d)},onCreateLabel:function(g,m,e,h){var j=this,l=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,k=m.point,b=Ext.apply(j.seriesLabelStyle||{},a);return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:l,x:d,y:c},a||{}))},onPlaceLabel:function(r,h,t,g,k,b){var m=this,l=m.chart,j=l.resizing,c=m.label,s=c.renderer,q=c.field,e=m.centerX,d=m.centerY,a={x:t.point[0],y:t.point[1]},p=a.x-e,n=a.y-d;r.setAttributes({text:s(h.get(q)),hidden:true},true);if(j){r.setAttributes({x:e,y:d},true)}if(b){r.show(true);m.onAnimate(r,{to:a})}else{r.setAttributes(a,true);r.show(true)}},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Radar.superclass.hideAll.call(e)}else{Ext.chart.series.Radar.superclass.showAll.call(e)}if(e.radar){e.radar.setAttributes({hidden:!a},true);if(e.radar.shadows){for(b=0,c=e.radar.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}},hideAll:function(){this.toggleAll(false);this.hideMarkers(0)},showAll:function(){this.toggleAll(true)},hideMarkers:function(a){var d=this,c=d.markerGroup&&d.markerGroup.getCount()||0,b=a||0;for(;b<c;b++){d.markerGroup.getAt(b).hide(true)}}});Ext.define("Ext.chart.series.Scatter",{extend:"Ext.chart.series.Cartesian",requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.fx.Anim"],type:"scatter",alias:"series.scatter",constructor:function(c){this.callParent(arguments);var e=this,g=e.chart.shadow,a=e.chart.surface,d,b;Ext.apply(e,c,{style:{},markerConfig:{},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)"},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)"},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)"}]});e.group=a.getGroup(e.seriesId);if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBounds:function(){var m=this,l=m.chart,p=l.getChartStore(),j=[].concat(m.axis),r,q,c,k,g,e,b,a,h,d,n;m.setBBox();r=m.bbox;for(h=0,k=j.length;h<k;h++){d=l.axes.get(j[h]);if(d){n=d.calcEnds();if(d.position=="top"||d.position=="bottom"){g=n.from;b=n.to}else{e=n.from;a=n.to}}}if(m.xField&&!Ext.isNumber(g)){d=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(m.xField)}).calcEnds();g=d.from;b=d.to}if(m.yField&&!Ext.isNumber(e)){d=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(m.yField)}).calcEnds();e=d.from;a=d.to}if(isNaN(g)){g=0;b=p.getCount()-1;q=r.width/(p.getCount()-1)}else{q=r.width/(b-g)}if(isNaN(e)){e=0;a=p.getCount()-1;c=r.height/(p.getCount()-1)}else{c=r.height/(a-e)}return{bbox:r,minX:g,minY:e,xScale:q,yScale:c}},getPaths:function(){var u=this,k=u.chart,b=k.shadow,d=k.getChartStore(),h=u.group,e=u.bounds=u.getBounds(),a=u.bbox,w=e.xScale,c=e.yScale,s=e.minX,r=e.minY,v=a.x,t=a.y,g=a.height,l=u.items=[],n=[],j,i,p,q,m;d.each(function(x,y){p=x.get(u.xField);q=x.get(u.yField);if(typeof q=="undefined"||(typeof q=="string"&&!q)){return}if(typeof p=="string"||typeof p=="object"&&!Ext.isDate(p)){p=y}if(typeof q=="string"||typeof q=="object"&&!Ext.isDate(q)){q=y}j=v+(p-s)*w;i=t+g-(q-r)*c;n.push({x:j,y:i});u.items.push({series:u,value:[p,q],point:[j,i],storeItem:x});if(k.animate&&k.resizing){m=h.getAt(y);if(m){u.resetPoint(m);if(b){u.resetShadow(m)}}}});return n},resetPoint:function(a){var b=this.bbox;a.setAttributes({translate:{x:(b.x+b.width)/2,y:(b.y+b.height)/2}},true)},resetShadow:function(c){var g=this,e=c.shadows,j=g.shadowAttributes,d=g.shadowGroups.length,h=g.bbox,b,a;for(b=0;b<d;b++){a=Ext.apply({},j[b]);if(a.translate){a.translate.x+=(h.x+h.width)/2;a.translate.y+=(h.y+h.height)/2}else{a.translate={x:(h.x+h.width)/2,y:(h.y+h.height)/2}}e[b].setAttributes(a,true)}},createPoint:function(a,c){var d=this,b=d.chart,e=d.group,g=d.bbox;return Ext.chart.Shape[c](b.surface,Ext.apply({},{x:0,y:0,group:e,translate:{x:(g.x+g.width)/2,y:(g.y+g.height)/2}},a))},createShadow:function(n,g,k){var j=this,h=j.chart,l=j.shadowGroups,d=j.shadowAttributes,a=l.length,p=j.bbox,c,m,b,e;n.shadows=b=[];for(c=0;c<a;c++){e=Ext.apply({},d[c]);if(e.translate){e.translate.x+=(p.x+p.width)/2;e.translate.y+=(p.y+p.height)/2}else{Ext.apply(e,{translate:{x:(p.x+p.width)/2,y:(p.y+p.height)/2}})}Ext.apply(e,g);m=Ext.chart.Shape[k](h.surface,Ext.apply({},{x:0,y:0,group:l[c]},e));b.push(m)}},drawSeries:function(){var v=this,l=v.chart,h=l.getChartStore(),j=v.group,c=l.shadow,a=v.shadowGroups,r=v.shadowAttributes,s=a.length,m,n,p,k,q,u,e,g,b,d,t;u=Ext.apply(v.markerStyle,v.markerConfig);g=u.type;delete u.type;if(!h||!h.getCount()){return}v.unHighlightItem();v.cleanHighlights();n=v.getPaths();k=n.length;for(q=0;q<k;q++){p=n[q];m=j.getAt(q);Ext.apply(p,u);if(!m){m=v.createPoint(p,g);if(c){v.createShadow(m,u,g)}}b=m.shadows;if(l.animate){d=v.renderer(m,h.getAt(q),{translate:p},q,h);m._to=d;v.onAnimate(m,{to:d});for(e=0;e<s;e++){t=Ext.apply({},r[e]);d=v.renderer(b[e],h.getAt(q),Ext.apply({},{hidden:false,translate:{x:p.x+(t.translate?t.translate.x:0),y:p.y+(t.translate?t.translate.y:0)}},t),q,h);v.onAnimate(b[e],{to:d})}}else{d=v.renderer(m,h.getAt(q),{translate:p},q,h);m._to=d;m.setAttributes(d,true);for(e=0;e<s;e++){t=Ext.apply({},r[e]);d=v.renderer(b[e],h.getAt(q),Ext.apply({},{hidden:false,translate:{x:p.x+(t.translate?t.translate.x:0),y:p.y+(t.translate?t.translate.y:0)}},t),q,h);b[e].setAttributes(d,true)}}v.items[q].sprite=m}k=j.getCount();for(q=n.length;q<k;q++){j.getAt(q).hide(true)}v.renderLabels();v.renderCallouts()},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,b=Ext.apply({},a,g.seriesLabelStyle),j=g.bbox;return g.chart.surface.add(Ext.apply({type:"text",group:h,x:k.point[0],y:j.y+j.height/2},b))},onPlaceLabel:function(g,k,u,r,q,d){var w=this,l=w.chart,t=l.resizing,v=w.label,s=v.renderer,b=v.field,a=w.bbox,j=u.point[0],h=u.point[1],c=u.sprite.attr.radius,e,n,m,p;g.setAttributes({text:s(k.get(b)),hidden:true},true);if(q=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(q=="under"||q=="over"){e=u.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(q=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(!l.animate){g.setAttributes({x:j,y:h},true);g.show(true)}else{if(t){p=u.sprite.getActiveAnimation();if(p){p.on("afteranimate",function(){g.setAttributes({x:j,y:h},true);g.show(true)})}else{g.show(true)}}else{w.onAnimate(g,{to:{x:j,y:h}})}}},onPlaceCallout:function(k,m,C,A,z,c,h){var F=this,n=F.chart,v=n.surface,B=n.resizing,E=F.callouts,q=F.items,b=C.point,G,a=k.label.getBBox(),D=30,u=10,t=3,e,d,g,s,r,w=F.bbox,l,j;G=[Math.cos(Math.PI/4),-Math.sin(Math.PI/4)];l=b[0]+G[0]*D;j=b[1]+G[1]*D;e=l+(G[0]>0?0:-(a.width+2*t));d=j-a.height/2-t;g=a.width+2*t;s=a.height+2*t;if(e<w[0]||(e+g)>(w[0]+w[2])){G[0]*=-1}if(d<w[1]||(d+s)>(w[1]+w[3])){G[1]*=-1}l=b[0]+G[0]*D;j=b[1]+G[1]*D;e=l+(G[0]>0?0:-(a.width+2*t));d=j-a.height/2-t;g=a.width+2*t;s=a.height+2*t;if(n.animate){F.onAnimate(k.lines,{to:{path:["M",b[0],b[1],"L",l,j,"Z"]}},true);F.onAnimate(k.box,{to:{x:e,y:d,width:g,height:s}},true);F.onAnimate(k.label,{to:{x:l+(G[0]>0?t:-(a.width+t)),y:j}},true)}else{k.lines.setAttributes({path:["M",b[0],b[1],"L",l,j,"Z"]},true);k.box.setAttributes({x:e,y:d,width:g,height:s},true);k.label.setAttributes({x:l+(G[0]>0?t:-(a.width+t)),y:j},true)}for(r in k){k[r].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(c,h,e){var b,d=10,a=Math.abs;function g(i){var k=a(i[0]-c),j=a(i[1]-h);return Math.sqrt(k*k+j*j)}b=e.point;return(b[0]-d<=c&&b[0]+d>=c&&b[1]-d<=h&&b[1]+d>=h)}});Ext.define("Ext.chart.theme.Base",{requires:["Ext.chart.theme.Theme"],constructor:function(a){Ext.chart.theme.call(this,a,{background:false,axis:{stroke:"#444","stroke-width":1},axisLabelTop:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelRight:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelBottom:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelLeft:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisTitleTop:{font:"bold 18px Arial",fill:"#444"},axisTitleRight:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},axisTitleBottom:{font:"bold 18px Arial",fill:"#444"},axisTitleLeft:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},series:{"stroke-width":0},seriesLabel:{font:"12px Arial",fill:"#333"},marker:{stroke:"#555",fill:"#000",radius:3,size:3},colors:["#94ae0a","#115fa6","#a61120","#ff8809","#ffd13e","#a61187","#24ad9a","#7c7474","#a66111"],seriesThemes:[{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#a66111"}],markerThemes:[{fill:"#115fa6",type:"circle"},{fill:"#94ae0a",type:"cross"},{fill:"#a61120",type:"plus"}]})}},function(){var c=["#b1da5a","#4ce0e7","#e84b67","#da5abd","#4d7fe6","#fec935"],k=["Green","Sky","Red","Purple","Blue","Yellow"],h=0,g=0,b=c.length,a=Ext.chart.theme,d=[["#f0a50a","#c20024","#2044ba","#810065","#7eae29"],["#6d9824","#87146e","#2a9196","#d39006","#1e40ac"],["#fbbc29","#ce2e4e","#7e0062","#158b90","#57880e"],["#ef5773","#fcbd2a","#4f770d","#1d3eaa","#9b001f"],["#7eae29","#fdbe2a","#910019","#27b4bc","#d74dbc"],["#44dce1","#0b2592","#996e05","#7fb325","#b821a1"]],e=d.length;for(;h<b;h++){a[k[h]]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({baseColor:i},j))}})})(c[h])}for(h=0;h<e;h++){a["Category"+(h+1)]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({colors:i},j))}})})(d[h])}});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",uses:["Ext.data.reader.Array"],constructor:function(a){a=a||{};Ext.applyIf(a,{proxy:{type:"memory",reader:"array"}});this.callParent([a])},loadData:function(e,a){if(this.expandData===true){var d=[],b=0,c=e.length;for(;b<c;b++){d[d.length]=[e[b]]}e=d}this.callParent([e,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.util.Observable"},autoStart:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,pauseOnException:true,constructor:function(a){var b=this;b.addEvents("complete","exception","operationcomplete");b.mixins.observable.constructor.call(b,a);b.operations=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a)},start:function(){this.hasException=false;this.isRunning=true;this.runNextOperation()},runNextOperation:function(){this.runOperation(this.current+1)},pause:function(){this.isRunning=false},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent("complete",e,c[c.length-1])}else{e.current=d;a=function(g){var h=g.hasException();if(h){e.hasException=true;e.fireEvent("exception",e,g)}else{e.fireEvent("operationcomplete",e,g)}if(h&&e.pauseOnException){e.pause()}else{g.setCompleted();e.runNextOperation()}};b.setStarted();e.proxy[b.action](b,a,e)}}});Ext.define("Ext.data.BelongsToAssociation",{extend:"Ext.data.Association",alias:"association.belongsto",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"BelongsToInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var c=this,d=c.ownerModel,e=c.associatedModel,b=c.foreignKey,a=c.primaryKey;return function(i,g,h){this.set(b,i);if(typeof g=="function"){g={callback:g,scope:h||this}}if(Ext.isObject(g)){return this.save(g)}}},createGetter:function(){var d=this,g=d.ownerModel,e=d.associatedName,h=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(l,m){l=l||{};var k=this,n=k.get(c),i,j;if(k[a]===undefined){i=Ext.ModelManager.create({},e);i.set(b,n);if(typeof l=="function"){l={callback:l,scope:m||k}}h.load(n,l);k[a]=h;return h}else{i=k[a];j=[i];m=m||k;Ext.callback(l,m,j);Ext.callback(l.success,m,j);Ext.callback(l.failure,m,j);Ext.callback(l.callback,m,j);return i}}},read:function(b,a,c){b[this.instanceName]=a.read([c]).records[0]}});Ext.define("Ext.data.BufferStore",{extend:"Ext.data.Store",alias:"store.buffer",sortOnLoad:false,filterOnLoad:false,constructor:function(){Ext.Error.raise("The BufferStore class has been deprecated. Instead, specify the buffered config option on Ext.data.Store")}});Ext.define("Ext.direct.Manager",{singleton:true,mixins:{observable:"Ext.util.Observable"},requires:["Ext.util.MixedCollection"],statics:{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"}},constructor:function(){var a=this;a.addEvents("event","exception");a.transactions=Ext.create("Ext.util.MixedCollection");a.providers=Ext.create("Ext.util.MixedCollection");a.mixins.observable.constructor.call(a)},addProvider:function(e){var d=this,b=arguments,c=0,a;if(b.length>1){for(a=b.length;c<a;++c){d.addProvider(b[c])}return}if(!e.isProvider){e=Ext.create("direct."+e.type+"provider",e)}d.providers.add(e);e.on("data",d.onProviderData,d);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return a.isProvider?a:this.providers.get(a)},removeProvider:function(c){var b=this,a=b.providers;c=c.isProvider?c:a.get(c);if(c){c.un("data",b.onProviderData,b);a.remove(c);return c}return null},addTransaction:function(a){this.transactions.add(a);return a},removeTransaction:function(a){a=this.getTransaction(a);this.transactions.remove(a);return a},getTransaction:function(a){return a.isTransaction?a:this.transactions.get(a)},onProviderData:function(e,d){var c=this,b=0,a;if(Ext.isArray(d)){for(a=d.length;b<a;++b){c.onProviderData(e,d[b])}return}if(d.name&&d.name!="event"&&d.name!="exception"){c.fireEvent(d.name,d)}else{if(d.status===false){c.fireEvent("exception",d)}}c.fireEvent("event",d,e)}},function(){Ext.Direct=Ext.direct.Manager});Ext.define("Ext.data.proxy.Direct",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.DirectProxy",alias:"proxy.direct",requires:["Ext.direct.Manager"],paramOrder:undefined,paramsAsHash:true,directFn:undefined,paramOrderRe:/[\s,|]/,constructor:function(a){var b=this;Ext.apply(b,a);if(Ext.isString(b.paramOrder)){b.paramOrder=b.paramOrder.split(b.paramOrderRe)}b.callParent(arguments)},doRequest:function(d,n,p){var l=this,b=l.getWriter(),e=l.buildRequest(d,n,p),m=l.api[e.action]||l.directFn,j=[],c=e.params,k=l.paramOrder,a,g=0,h;if(d.allowWrite()){e=b.write(e)}if(d.action=="read"){a=m.directCfg.method;if(a.ordered){if(a.len>0){if(k){for(h=k.length;g<h;++g){j.push(c[k[g]])}}else{if(l.paramsAsHash){j.push(c)}}}}else{j.push(c)}}else{j.push(e.jsonData)}Ext.apply(e,{args:j,directFn:m});j.push(l.createRequestCallback(e,d,n,p),l);m.apply(window,j)},applyEncoding:function(a){return a},createRequestCallback:function(d,a,e,b){var c=this;return function(h,g){c.processResponse(g.status,a,d,g,e,b)}},extractResponseData:function(a){return Ext.isDefined(a.result)?a.result:a.data},setException:function(b,a){b.setException(a.message)},buildUrl:function(){return""}});Ext.define("Ext.data.DirectStore",{extend:"Ext.data.Store",alias:"store.direct",requires:["Ext.data.proxy.Direct"],constructor:function(a){a=Ext.apply({},a);if(!a.proxy){var b={type:"direct",reader:{type:"json"}};Ext.copyTo(b,a,"paramOrder,paramsAsHash,directFn,api,simpleSortMode");Ext.copyTo(b.reader,a,"totalProperty,root,idProperty");a.proxy=b}this.callParent([a])}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(g){if(this.isTransnumeral(g)){return g}var e=this.plurals,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},singularize:function(g){if(this.isTransnumeral(g)){return g}var e=this.singulars,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},classify:function(a){return Ext.String.capitalize(this.singularize(a))},ordinalize:function(d){var b=parseInt(d,10),c=b%10,a=b%100;if(11<=a&&a<=13){return d+"th"}else{switch(c){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd";default:return d+"th"}}}},function(){var b={alumnus:"alumni",cactus:"cacti",focus:"foci",nucleus:"nuclei",radius:"radii",stimulus:"stimuli",ellipsis:"ellipses",paralysis:"paralyses",oasis:"oases",appendix:"appendices",index:"indexes",beau:"beaux",bureau:"bureaux",tableau:"tableaux",woman:"women",child:"children",man:"men",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",phenomenon:"phenomena",foot:"feet",goose:"geese",tooth:"teeth",antenna:"antennae",formula:"formulae",nebula:"nebulae",vertebra:"vertebrae",vita:"vitae"},a;for(a in b){this.plural(a,b[a]);this.singular(b[a],a)}});Ext.define("Ext.data.HasManyAssociation",{extend:"Ext.data.Association",requires:["Ext.util.Inflector"],alias:"association.hasmany",constructor:function(c){var d=this,a,b;d.callParent(arguments);d.name=d.name||Ext.util.Inflector.pluralize(d.associatedName.toLowerCase());a=d.ownerModel.prototype;b=d.name;Ext.applyIf(d,{storeName:b+"Store",foreignKey:d.ownerName.toLowerCase()+"_id"});a[b]=d.createStore()},createStore:function(){var h=this,i=h.associatedModel,c=h.storeName,d=h.foreignKey,a=h.primaryKey,g=h.filterProperty,b=h.autoLoad,e=h.storeConfig||{};return function(){var m=this,k,l,j={};if(m[c]===undefined){if(g){l={property:g,value:m.get(g),exactMatch:true}}else{l={property:d,value:m.get(a),exactMatch:true}}j[d]=m.get(a);k=Ext.apply({},e,{model:i,filters:[l],remoteFilter:false,modelDefaults:j});m[c]=Ext.create("Ext.data.Store",k);if(b){m[c].load()}}return m[c]}},read:function(c,a,e){var d=c[this.name](),b;d.add(a.read(e).records);b=this.associatedModel.prototype.associations.findBy(function(g){return g.type==="belongsTo"&&g.associatedName===c.$className});if(b){d.data.each(function(g){g[b.instanceName]=c})}}});Ext.define("Ext.data.JsonP",{singleton:true,statics:{requestCount:0,requests:{}},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(n){n=Ext.apply({},n);var j=this,d=Ext.isDefined(n.disableCaching)?n.disableCaching:j.disableCaching,h=n.disableCachingParam||j.disableCachingParam,c=++j.statics().requestCount,l=n.callbackName||"callback"+c,i=n.callbackKey||j.callbackKey,m=Ext.isDefined(n.timeout)?n.timeout:j.timeout,e=Ext.apply({},n.params),b=n.url,a=Ext.isSandboxed?Ext.getUniqueGlobalNamespace():"Ext",g,k;e[i]=a+".data.JsonP."+l;if(d){e[h]=new Date().getTime()}k=j.createScript(b,e);j.statics().requests[c]=g={url:b,params:e,script:k,id:c,scope:n.scope,success:n.success,failure:n.failure,callback:n.callback,callbackName:l};if(m>0){g.timeout=setTimeout(Ext.bind(j.handleTimeout,j,[g]),m)}j.setupErrorHandling(g);j[l]=Ext.bind(j.handleResponse,j,[g],true);Ext.getHead().appendChild(k);return g},abort:function(b){var c=this.statics().requests,a;if(b){if(!b.id){b=c[b]}this.abort(b)}else{for(a in c){if(c.hasOwnProperty(a)){this.abort(c[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.statics()[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).remove();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType])}else{Ext.callback(b.success,b.scope,[a])}Ext.callback(b.callback,b.scope,[c,a,b.errorType])},createScript:function(b,c){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(b,Ext.Object.toQueryString(c)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a}});Ext.define("Ext.data.JsonPStore",{extend:"Ext.data.Store",alias:"store.jsonp",constructor:function(a){this.callParent(Ext.apply(a,{reader:Ext.create("Ext.data.reader.Json",a),proxy:Ext.create("Ext.data.proxy.JsonP",a)}))}});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field"],statics:{decorate:function(c){if(!c.isNode){var j=Ext.ModelManager,e=c.modelName,h=j.getModel(e),k=h.prototype.idProperty,g=[],b,a,d;h.override(this.getPrototypeBody());g=this.applyFields(h,[{name:k,type:"string",defaultValue:null},{name:"parentId",type:"string",defaultValue:null},{name:"index",type:"int",defaultValue:null},{name:"depth",type:"int",defaultValue:0},{name:"expanded",type:"bool",defaultValue:false,persist:false},{name:"expandable",type:"bool",defaultValue:true,persist:false},{name:"checked",type:"auto",defaultValue:null},{name:"leaf",type:"bool",defaultValue:false,persist:false},{name:"cls",type:"string",defaultValue:null,persist:false},{name:"iconCls",type:"string",defaultValue:null,persist:false},{name:"icon",type:"string",defaultValue:null,persist:false},{name:"root",type:"boolean",defaultValue:false,persist:false},{name:"isLast",type:"boolean",defaultValue:false,persist:false},{name:"isFirst",type:"boolean",defaultValue:false,persist:false},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false},{name:"loaded",type:"boolean",defaultValue:false,persist:false},{name:"loading",type:"boolean",defaultValue:false,persist:false},{name:"href",type:"string",defaultValue:null,persist:false},{name:"hrefTarget",type:"string",defaultValue:null,persist:false},{name:"qtip",type:"string",defaultValue:null,persist:false},{name:"qtitle",type:"string",defaultValue:null,persist:false}]);d=g.length;for(b=0;b<d;++b){a=g[b];if(c.get(a.name)===undefined){c.data[a.name]=a.defaultValue}}}Ext.applyIf(c,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]});c.commit(true);c.enableBubble(["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort"]);return c},applyFields:function(j,k){var c=j.prototype,e=c.fields,l=e.keys,h=k.length,b,d,a,g=[];for(d=0;d<h;d++){b=k[d];if(!Ext.Array.contains(l,b.name)){b=Ext.create("data.field",b);g.push(b);e.add(b)}}return g},getPrototypeBody:function(){return{isNode:true,createNode:function(a){if(Ext.isObject(a)&&!a.isModel){a=Ext.ModelManager.create(a,this.modelName)}return Ext.data.NodeInterface.decorate(a)},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},updateInfo:function(k){var l=this,b=l.isRoot(),h=l.parentNode,c=(!h?true:h.firstChild==l),g=(!h?true:h.lastChild==l),e=0,m=l,a=l.childNodes,j=a.length,d=0;while(m.parentNode){++e;m=m.parentNode}l.beginEdit();l.set({isFirst:c,isLast:g,depth:e,index:h?h.indexOf(l):0,parentId:h?h.getId():null});l.endEdit(k);if(k){l.commit()}for(d=0;d<j;d++){a[d].updateInfo(k)}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,k,j){var g=this,c,e,d,h,a;if(Ext.isArray(b)){for(c=0,e=b.length;c<e;c++){g.appendChild(b[c])}}else{b=g.createNode(b);if(k!==true&&g.fireEvent("beforeappend",g,b)===false){return false}d=g.childNodes.length;h=b.parentNode;if(h){if(k!==true&&b.fireEvent("beforemove",b,h,g,d)===false){return false}h.removeChild(b,null,false,true)}d=g.childNodes.length;if(d===0){g.setFirstChild(b)}g.childNodes.push(b);b.parentNode=g;b.nextSibling=null;g.setLastChild(b);a=g.childNodes[d-1];if(a){b.previousSibling=a;a.nextSibling=b;a.updateInfo(j)}else{b.previousSibling=null}b.updateInfo(j);if(!g.isLoaded()){g.set("loaded",true)}else{if(g.childNodes.length===1){g.set("loaded",g.isLoaded())}}if(k!==true){g.fireEvent("append",g,b,d);if(h){b.fireEvent("move",b,h,g,d)}}return b}},getBubbleTarget:function(){return this.parentNode},removeChild:function(e,b,c,g){var d=this,a=d.indexOf(e);if(a==-1||(c!==true&&d.fireEvent("beforeremove",d,e)===false)){return false}Ext.Array.erase(d.childNodes,a,1);if(d.firstChild==e){d.setFirstChild(e.nextSibling)}if(d.lastChild==e){d.setLastChild(e.previousSibling)}if(e.previousSibling){e.previousSibling.nextSibling=e.nextSibling;e.previousSibling.updateInfo(g)}if(e.nextSibling){e.nextSibling.previousSibling=e.previousSibling;e.nextSibling.updateInfo(g)}if(c!==true){d.fireEvent("remove",d,e)}if(!d.childNodes.length){d.set("loaded",d.isLoaded())}if(b){e.destroy(true)}else{e.clear()}return e},copy:function(d,c){var g=this,b=g.callOverridden(arguments),a=g.childNodes?g.childNodes.length:0,e;if(c){for(e=0;e<a;e++){b.appendChild(g.childNodes[e].copy(true))}}return b},clear:function(a){var b=this;b.parentNode=b.previousSibling=b.nextSibling=null;if(a){b.firstChild=b.lastChild=null}},destroy:function(a){var c=this,b=c.destroyOptions;if(a===true){c.clear(true);Ext.each(c.childNodes,function(d){d.destroy(true)});c.childNodes=null;delete c.destroyOptions;c.callOverridden([b])}else{c.destroyOptions=a;c.remove(true)}},insertBefore:function(g,a,d){var e=this,b=e.indexOf(a),c=g.parentNode,h=b,i;if(!a){return e.appendChild(g)}if(g==a){return false}g=e.createNode(g);if(d!==true&&e.fireEvent("beforeinsert",e,g,a)===false){return false}if(c==e&&e.indexOf(g)<b){h--}if(c){if(d!==true&&g.fireEvent("beforemove",g,c,e,b,a)===false){return false}c.removeChild(g)}if(h===0){e.setFirstChild(g)}Ext.Array.splice(e.childNodes,h,0,g);g.parentNode=e;g.nextSibling=a;a.previousSibling=g;i=e.childNodes[h-1];if(i){g.previousSibling=i;i.nextSibling=g;i.updateInfo()}else{g.previousSibling=null}g.updateInfo();if(!e.isLoaded()){e.set("loaded",true)}else{if(e.childNodes.length===1){e.set("loaded",e.isLoaded())}}if(d!==true){e.fireEvent("insert",e,g,a);if(c){g.fireEvent("move",g,c,e,h,a)}}return g},insertChild:function(a,c){var b=this.childNodes[a];if(b){return this.insertBefore(c,b)}else{return this.appendChild(c)}},remove:function(b,c){var a=this.parentNode;if(a){a.removeChild(this,b,c,true)}return this},removeAll:function(a,b){var d=this.childNodes,c;while((c=d[0])){this.removeChild(c,a,b)}return this},getChildAt:function(a){return this.childNodes[a]},replaceChild:function(a,d,c){var b=d?d.nextSibling:null;this.removeChild(d,c);this.insertBefore(a,b,c);return d},indexOf:function(a){return Ext.Array.indexOf(this.childNodes,a)},getPath:function(d,c){d=d||this.idProperty;c=c||"/";var b=[this.get(d)],a=this.parentNode;while(a){b.unshift(a.get(d));a=a.parentNode}return c+b.join(c)},getDepth:function(){return this.get("depth")},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascade:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")}return this.cascadeBy.apply(this,arguments)},cascadeBy:function(d,c,a){if(d.apply(c||this,a||[this])!==false){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){g[b].cascadeBy(d,c,a)}}},eachChild:function(d,c,a){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){if(d.apply(c||this,a||[g[b]])===false){break}}},findChild:function(b,c,a){return this.findChildBy(function(){return this.get(b)==c},null,a)},findChildBy:function(h,g,b){var e=this.childNodes,a=e.length,d=0,j,c;for(;d<a;d++){j=e[d];if(h.call(g||j,j)===true){return j}else{if(b){c=j.findChildBy(h,g,b);if(c!==null){return c}}}}return null},contains:function(a){return a.isAncestor(this)},isAncestor:function(a){var b=this.parentNode;while(b){if(b==a){return true}b=b.parentNode}return false},sort:function(g,b,a){var d=this.childNodes,e=d.length,c,h;if(e>0){Ext.Array.sort(d,g);for(c=0;c<e;c++){h=d[c];h.previousSibling=d[c-1];h.nextSibling=d[c+1];if(c===0){this.setFirstChild(h);h.updateInfo()}if(c==e-1){this.setLastChild(h);h.updateInfo()}if(b&&!h.isLeaf()){h.sort(g,true,true)}}if(a!==true){this.fireEvent("sort",this,d)}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var a=this.parentNode;while(a){if(!a.isExpanded()){return false}a=a.parentNode}return true},expand:function(a,d,b){var c=this;if(!c.isLeaf()){if(c.isLoading()){c.on("expand",function(){c.expand(a,d,b)},c,{single:true})}else{if(!c.isExpanded()){c.fireEvent("beforeexpand",c,function(){c.set("expanded",true);c.fireEvent("expand",c,c.childNodes,false);if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}}}}else{Ext.callback(d,b||c)}},expandChildren:function(d,j,k){var h=this,e=0,a=h.childNodes,g=a.length,c,b=0;for(;e<g;++e){c=a[e];if(!c.isLeaf()&&!c.isExpanded()){b++;a[e].expand(d,function(){b--;if(j&&!b){Ext.callback(j,k||h,[h.childNodes])}})}}if(!b&&j){Ext.callback(j,k||h,[h.childNodes])}},collapse:function(a,d,b){var c=this;if(!c.isLeaf()){if(!c.collapsing&&c.isExpanded()){c.fireEvent("beforecollapse",c,function(){c.set("expanded",false);c.fireEvent("collapse",c,c.childNodes,false);if(a){c.collapseChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.collapseChildren(true,d,b)}}}else{Ext.callback(d,b||c,[c.childNodes])}},collapseChildren:function(d,j,k){var h=this,e=0,b=h.childNodes,g=b.length,c,a=0;for(;e<g;++e){c=b[e];if(!c.isLeaf()&&c.isExpanded()){a++;b[e].collapse(d,function(){a--;if(j&&!a){Ext.callback(j,k||h,[h.childNodes])}})}}if(!a&&j){Ext.callback(j,k||h,[h.childNodes])}}}}}});Ext.define("Ext.data.NodeStore",{extend:"Ext.data.Store",alias:"store.node",requires:["Ext.data.NodeInterface"],node:null,recursive:false,rootVisible:false,constructor:function(a){var c=this,b;a=a||{};Ext.apply(c,a);a.proxy={type:"proxy"};c.callParent([a]);c.addEvents("expand","collapse","beforeexpand","beforecollapse");b=c.node;if(b){c.node=null;c.setNode(b)}},setNode:function(b){var a=this;if(a.node&&a.node!=b){a.mun(a.node,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=null}if(b){Ext.data.NodeInterface.decorate(b);a.removeAll();if(a.rootVisible){a.add(b)}a.mon(b,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=b;if(b.isExpanded()&&b.isLoaded()){a.onNodeExpand(b,b.childNodes,true)}}},onNodeSort:function(b,c){var a=this;if((a.indexOf(b)!==-1||(b===a.node&&!a.rootVisible)&&b.isExpanded())){a.onNodeCollapse(b,c,true);a.onNodeExpand(b,c,true)}},onNodeExpand:function(g,d,c){var j=this,a=j.indexOf(g)+1,h=d?d.length:0,e,b;if(!j.recursive&&g!==j.node){return}if(!j.isVisible(g)){return}if(!c&&j.fireEvent("beforeexpand",g,d,a)===false){return}if(h){j.insert(a,d);for(e=0;e<h;e++){b=d[e];if(b.isExpanded()){if(b.isLoaded()){j.onNodeExpand(b,b.childNodes,true)}else{b.set("expanded",false);b.expand()}}}}if(!c){j.fireEvent("expand",g,d)}},onNodeCollapse:function(g,c,b){var j=this,h=c.length,e=j.indexOf(g)+1,d,a;if(!j.recursive&&g!==j.node){return}if(!b&&j.fireEvent("beforecollapse",g,c,e)===false){return}for(d=0;d<h;d++){a=c[d];j.remove(a);if(a.isExpanded()){j.onNodeCollapse(a,a.childNodes,true)}}if(!b){j.fireEvent("collapse",g,c,e)}},onNodeAppend:function(d,g,b){var e=this,a,c;if(e.isVisible(g)){if(b===0){a=d}else{c=g.previousSibling;while(c.isExpanded()&&c.lastChild){c=c.lastChild}a=c}e.insert(e.indexOf(a)+1,g);if(!g.isLeaf()&&g.isExpanded()){if(g.isLoaded()){e.onNodeExpand(g,g.childNodes,true)}else{g.set("expanded",false);g.expand()}}}},onNodeInsert:function(c,e,a){var d=this,b=this.indexOf(a);if(b!=-1&&d.isVisible(e)){d.insert(b,e);if(!e.isLeaf()&&e.isExpanded()){if(e.isLoaded()){d.onNodeExpand(e,e.childNodes,true)}else{e.set("expanded",false);e.expand()}}}},onNodeRemove:function(b,d,a){var c=this;if(c.indexOf(d)!=-1){if(!d.isLeaf()&&d.isExpanded()){c.onNodeCollapse(d,d.childNodes,true)}c.remove(d)}},isVisible:function(b){var a=b.parentNode;while(a){if(a===this.node&&!this.rootVisible&&a.isExpanded()){return true}if(this.indexOf(a)===-1||!a.isExpanded()){return false}a=a.parentNode}return true}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(a){Ext.apply(this,a)}});Ext.define("Ext.data.SequentialIdGenerator",{extend:"Ext.data.IdGenerator",alias:"idgen.sequential",constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.prefix,""]},prefix:"",seed:1,generate:function(){var a=this,b=a.parts;b[1]=a.seed++;return b.join("")}});Ext.define("Ext.data.Tree",{alias:"data.tree",mixins:{observable:"Ext.util.Observable"},root:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b);if(a){b.setRootNode(a)}},getRootNode:function(){return this.root},setRootNode:function(b){var a=this;a.root=b;Ext.data.NodeInterface.decorate(b);if(a.fireEvent("beforeappend",null,b)!==false){b.set("root",true);b.updateInfo();a.relayEvents(b,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","rootchange"]);b.on({scope:a,insert:a.onNodeInsert,append:a.onNodeAppend,remove:a.onNodeRemove});a.nodeHash={};a.registerNode(b);a.fireEvent("append",null,b);a.fireEvent("rootchange",b)}return b},flatten:function(){var a=[],c=this.nodeHash,b;for(b in c){if(c.hasOwnProperty(b)){a.push(c[b])}}return a},onNodeInsert:function(a,b){this.registerNode(b,true)},onNodeAppend:function(a,b){this.registerNode(b,true)},onNodeRemove:function(a,b){this.unregisterNode(b,true)},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(b,a){this.nodeHash[b.getId()||b.internalId]=b;if(a===true){b.eachChild(function(c){this.registerNode(c,true)},this)}},unregisterNode:function(b,a){delete this.nodeHash[b.getId()||b.internalId];if(a===true){b.eachChild(function(c){this.unregisterNode(c,true)},this)}},sort:function(b,a){this.getRootNode().sort(b,a)},filter:function(b,a){this.getRootNode().filter(b,a)}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.AbstractStore",alias:"store.tree",requires:["Ext.data.Tree","Ext.data.NodeInterface","Ext.data.NodeStore"],clearOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",folderSort:false,constructor:function(c){var d=this,b,a;c=Ext.apply({},c);a=c.fields||d.fields;if(!a){c.fields=[{name:"text",type:"string"}]}d.callParent([c]);d.tree=Ext.create("Ext.data.Tree");d.relayEvents(d.tree,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","rootchange"]);d.tree.on({scope:d,remove:d.onNodeRemove,beforeexpand:d.onBeforeNodeExpand,beforecollapse:d.onBeforeNodeCollapse,append:d.onNodeAdded,insert:d.onNodeAdded});d.onBeforeSort();b=d.root;if(b){delete d.root;d.setRootNode(b)}d.addEvents("sort");if(Ext.isDefined(d.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")}d.nodeParam=d.nodeParameter;delete d.nodeParameter}},setProxy:function(c){var a,b;if(c instanceof Ext.data.proxy.Proxy){b=Ext.isEmpty(c.getReader().root)}else{if(Ext.isString(c)){b=true}else{a=c.reader;b=!(a&&!Ext.isEmpty(a.root))}}c=this.callParent(arguments);if(b){a=c.getReader();a.root=this.defaultRootProperty;a.buildExtractors(true)}},onBeforeSort:function(){if(this.folderSort){this.sort({property:"leaf",direction:"ASC"},"prepend",false)}},onBeforeNodeExpand:function(b,c,a){if(b.isLoaded()){Ext.callback(c,a||b,[b.childNodes])}else{if(b.isLoading()){this.on("load",function(){Ext.callback(c,a||b,[b.childNodes])},this,{single:true})}else{this.read({node:b,callback:function(){Ext.callback(c,a||b,[b.childNodes])}})}}},getNewRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterNew)},getUpdatedRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterUpdated)},onBeforeNodeCollapse:function(b,c,a){c.call(a||b,b.childNodes)},onNodeRemove:function(a,b){var c=this.removed;if(!b.isReplace&&Ext.Array.indexOf(c,b)==-1){c.push(b)}},onNodeAdded:function(d,e){var c=this.getProxy(),a=c.getReader(),g=e.raw||e.data,h,b;Ext.Array.remove(this.removed,e);if(!e.isLeaf()&&!e.isLoaded()){h=a.getRoot(g);if(h){this.fillNode(e,a.extractData(h));delete g[a.root]}}},setRootNode:function(a){var b=this;a=a||{};if(!a.isNode){Ext.applyIf(a,{id:b.defaultRootId,text:"Root",allowDrag:false});a=Ext.ModelManager.create(a,b.model)}Ext.data.NodeInterface.decorate(a);b.getProxy().getReader().buildExtractors(true);b.tree.setRootNode(a);if(!a.isLoaded()&&(b.autoLoad===true||a.isExpanded())){b.load({node:a})}return a},getRootNode:function(){return this.tree.getRootNode()},getNodeById:function(a){return this.tree.getNodeById(a)},load:function(b){b=b||{};b.params=b.params||{};var d=this,c=b.node||d.tree.getRootNode(),a;if(!c){c=d.setRootNode({expanded:true})}if(d.clearOnLoad){c.removeAll(true)}Ext.applyIf(b,{node:c});b.params[d.nodeParam]=c?c.getId():"root";if(c){c.set("loading",true)}return d.callParent([b])},fillNode:function(g,b){var e=this,d=b?b.length:0,c=0,a;if(d&&e.sortOnLoad&&!e.remoteSort&&e.sorters&&e.sorters.items){a=Ext.create("Ext.util.MixedCollection");a.addAll(b);a.sort(e.sorters.items);b=a.items}g.set("loaded",true);for(;c<d;c++){g.appendChild(b[c],undefined,true)}return b},onProxyLoad:function(b){var d=this,e=b.wasSuccessful(),a=b.getRecords(),c=b.node;d.loading=false;c.set("loading",false);if(e){a=d.fillNode(c,a)}d.fireEvent("read",d,b.node,a,e);d.fireEvent("load",d,b.node,a,e);Ext.callback(b.callback,b.scope||d,[a,b,e])},onCreateRecords:function(c,d,l){if(l){var e=0,a=c.length,k=d.records,h,g,b,j;for(;e<a;++e){g=c[e];b=k[e];if(b){h=b.parentNode;if(h){b.isReplace=true;h.replaceChild(g,b);delete b.isReplace}g.phantom=false}}}},onUpdateRecords:function(c,d,l){if(l){var k=this,g=0,a=c.length,e=k.data,b,j,h;for(;g<a;++g){h=c[g];b=k.tree.getNodeById(h.getId());j=b.parentNode;if(j){b.isReplace=true;j.replaceChild(h,b);b.isReplace=false}}}},onDestroyRecords:function(b,a,c){if(c){this.removed=[]}},removeAll:function(){this.getRootNode().destroy(true);this.fireEvent("clear",this)},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.tree.sort(a,true);b.fireEvent("datachanged",b)}b.fireEvent("sort",b)}});Ext.define("Ext.data.UuidGenerator",function(){var h=Math.pow(2,14),g=Math.pow(2,16),e=Math.pow(2,28),c=Math.pow(2,32);function a(k,j){var i=k.toString(16);if(i.length>j){i=i.substring(i.length-j)}else{if(i.length<j){i=Ext.String.leftPad(i,j,"0")}}return i}function d(k,j){var i=Math.random()*(j-k+1);return Math.floor(i)+k}function b(j){if(typeof(j)=="number"){var i=Math.floor(j/c);return{lo:Math.floor(j-i*c),hi:i}}return j}return{extend:"Ext.data.IdGenerator",alias:"idgen.uuid",id:"uuid",version:4,constructor:function(){var i=this;i.callParent(arguments);i.parts=[];i.init()},generate:function(){var j=this,k=j.parts,i=j.timestamp;k[0]=a(i.lo,8);k[1]=a(i.hi&65535,4);k[2]=a(((i.hi>>>16)&4095)|(j.version<<12),4);k[3]=a(128|((j.clockSeq>>>8)&63),2)+a(j.clockSeq&255,2);k[4]=a(j.salt.hi,4)+a(j.salt.lo,8);if(j.version==4){j.init()}else{++i.lo;if(i.lo>=c){i.lo=0;++i.hi}}return k.join("-").toLowerCase()},getRecId:function(i){return i.getId()},init:function(){var j=this,i,k;if(j.version==4){j.clockSeq=d(0,h-1);i=j.salt||(j.salt={});k=j.timestamp||(j.timestamp={});i.lo=d(0,c-1);i.hi=d(0,g-1);k.lo=d(0,c-1);k.hi=d(0,e-1)}else{j.salt=b(j.salt);j.timestamp=b(j.timestamp);j.salt.hi|=256}},reconfigure:function(i){Ext.apply(this,i);this.init()}}}());Ext.define("Ext.data.XmlStore",{extend:"Ext.data.Store",alternateClassName:"Ext.data.XmlStore",alias:"store.xml",constructor:function(a){a=a||{};a=a||{};Ext.applyIf(a,{proxy:{type:"ajax",reader:"xml",writer:"xml"}});this.callParent([a])}});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",clear:function(){}});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true,constructor:function(){this.addEvents("exception");this.callParent(arguments)},doRequest:function(a,h,b){var d=this,e=d.getWriter(),c=d.buildRequest(a),g=c.params;if(a.allowWrite()){c=e.write(c)}Ext.apply(c,{callbackKey:d.callbackKey,timeout:d.timeout,scope:d,disableCaching:false,callback:d.createRequestCallback(c,a,h,b)});if(d.autoAppendParams){c.params={}}c.jsonp=Ext.data.JsonP.request(c);c.params=g;a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(i,g,h){delete c.lastRequest;c.processResponse(i,a,d,g,e,b)}},setException:function(b,a){b.setException(b.request.jsonp.errorType)},buildUrl:function(h){var g=this,b=g.callParent(arguments),j=Ext.apply({},h.params),e=j.filters,a,d,c;delete j.filters;if(g.autoAppendParams){b=Ext.urlAppend(b,Ext.Object.toQueryString(j))}if(e&&e.length){for(c=0;c<e.length;c++){d=e[c];if(d.value){b=Ext.urlAppend(b,d.property+"="+d.value)}}}a=h.records;if(Ext.isArray(a)&&a.length>0){b=Ext.urlAppend(b,Ext.String.format("{0}={1}",g.recordParam,g.encodeRecords(a)))}return b},destroy:function(){this.abort();this.callParent()},abort:function(){var a=this.lastRequest;if(a){Ext.data.JsonP.abort(a.jsonp)}},encodeRecords:function(b){var d="",c=0,a=b.length;for(;c<a;c++){d+=Ext.Object.toQueryString(b[c].data)}return d}});Ext.define("Ext.data.proxy.WebStorage",{extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.WebStorageProxy",id:undefined,constructor:function(a){this.callParent(arguments);this.cache={};this.id=this.id||(this.store?this.store.storeId:undefined);this.initialize()},create:function(e,j,k){var d=e.records,c=d.length,a=this.getIds(),b,h,g;e.setStarted();for(g=0;g<c;g++){h=d[g];if(h.phantom){h.phantom=false;b=this.getNextId()}else{b=h.getId()}this.setRecord(h,b);a.push(b)}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof j=="function"){j.call(k||this,e)}},read:function(e,j,k){var d=[],a=this.getIds(),c=a.length,g,b,h;if(e.id){h=this.getRecord(e.id);if(h){d.push(h);e.setSuccessful()}}else{for(g=0;g<c;g++){d.push(this.getRecord(a[g]))}e.setSuccessful()}e.setCompleted();e.resultSet=Ext.create("Ext.data.ResultSet",{records:d,total:d.length,loaded:true});if(typeof j=="function"){j.call(k||this,e)}},update:function(e,j,k){var d=e.records,c=d.length,a=this.getIds(),h,b,g;e.setStarted();for(g=0;g<c;g++){h=d[g];this.setRecord(h);b=h.getId();if(b!==undefined&&Ext.Array.indexOf(a,b)==-1){a.push(b)}}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof j=="function"){j.call(k||this,e)}},destroy:function(b,j,e){var a=b.records,g=a.length,d=this.getIds(),h=[].concat(d),c;for(c=0;c<g;c++){Ext.Array.remove(h,a[c].getId());this.removeRecord(a[c],false)}this.setIds(h);b.setCompleted();b.setSuccessful();if(typeof j=="function"){j.call(e||this,b)}},getRecord:function(c){if(this.cache[c]===undefined){var a=Ext.decode(this.getStorageObject().getItem(this.getRecordKey(c))),g={},e=this.model,k=e.prototype.fields.items,d=k.length,h,l,b,j;for(h=0;h<d;h++){l=k[h];b=l.name;if(typeof l.decode=="function"){g[b]=l.decode(a[b])}else{g[b]=a[b]}}j=new e(g,c);j.phantom=false;this.cache[c]=j}return this.cache[c]},setRecord:function(k,c){if(c){k.setId(c)}else{c=k.getId()}var m=this,a=k.data,h={},j=m.model,l=j.prototype.fields.items,d=l.length,g=0,n,b,e,p;for(;g<d;g++){n=l[g];b=n.name;if(typeof n.encode=="function"){h[b]=n.encode(a[b],k)}else{h[b]=a[b]}}e=m.getStorageObject();p=m.getRecordKey(c);m.cache[c]=k;e.removeItem(p);e.setItem(p,Ext.encode(h))},removeRecord:function(d,c){var b=this,a;if(d.isModel){d=d.getId()}if(c!==false){a=b.getIds();Ext.Array.remove(a,d);b.setIds(a)}b.getStorageObject().removeItem(b.getRecordKey(d))},getRecordKey:function(a){if(a.isModel){a=a.getId()}return Ext.String.format("{0}-{1}",this.id,a)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.id)},getIds:function(){var b=(this.getStorageObject().getItem(this.id)||"").split(","),c=b.length,a;if(c==1&&b[0]===""){b=[]}else{for(a=0;a<c;a++){b[a]=parseInt(b[a],10)}}return b},setIds:function(a){var b=this.getStorageObject(),c=a.join(",");b.removeItem(this.id);if(!Ext.isEmpty(c)){b.setItem(this.id,c)}},getNextId:function(){var d=this.getStorageObject(),a=this.getRecordCounterKey(),c=d.getItem(a),b,e;if(c===null){b=this.getIds();c=b[b.length-1]||0}e=parseInt(c,10)+1;d.setItem(a,e);return e},initialize:function(){var a=this.getStorageObject();a.setItem(this.id,a.getItem(this.id)||"")},clear:function(){var d=this.getStorageObject(),c=this.getIds(),a=c.length,b;for(b=0;b<a;b++){this.removeRecord(c[b])}d.removeItem(this.getRecordCounterKey());d.removeItem(this.id)},getStorageObject:function(){}});Ext.define("Ext.data.proxy.LocalStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(a){this.callParent([a]);this.setReader(this.reader)},read:function(c,g,d){var e=this,b=e.getReader(),a=b.read(e.data);Ext.apply(c,{resultSet:a});c.setCompleted();c.setSuccessful();Ext.callback(g,d||e,[c])},clear:Ext.emptyFn});Ext.define("Ext.data.proxy.Rest",{extend:"Ext.data.proxy.Ajax",alternateClassName:"Ext.data.RestProxy",alias:"proxy.rest",appendId:true,batchActions:false,buildUrl:function(g){var e=this,c=g.operation,b=c.records||[],a=b[0],h=e.format,d=e.getUrl(g),i=a?a.getId():c.id;if(e.appendId&&i){if(!d.match(/\/$/)){d+="/"}d+=i}if(h){if(!d.match(/\.$/)){d+="."}d+=h}g.url=d;return e.callParent(arguments)}},function(){Ext.apply(this.prototype,{actionMethods:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"}})});Ext.define("Ext.data.proxy.SessionStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.sessionstorage",alternateClassName:"Ext.data.SessionStorageProxy",getStorageObject:function(){return window.sessionStorage}});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",buildExtractors:function(){this.callParent(arguments);var a=this.model.prototype.fields.items,b=0,c=a.length,e=[],d;for(;b<c;b++){d=a[b].mapping;e.push(function(g){return function(h){return h[g]}}(d!==null?d:b))}this.extractorFunctions=e}});Ext.define("Ext.data.reader.Xml",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.XmlReader",alias:"reader.xml",createAccessor:function(b){var a=this;if(Ext.isEmpty(b)){return Ext.emptyFn}if(Ext.isFunction(b)){return b}return function(c){return a.getNodeValue(Ext.DomQuery.selectNode(b,c))}},getNodeValue:function(a){if(a&&a.firstChild){return a.firstChild.nodeValue}return undefined},getResponseData:function(a){var b=a.responseXML;return b},getData:function(a){return a.documentElement||a},getRoot:function(b){var c=b.nodeName,a=this.root;if(!a||(c&&c==a)){return b}else{if(Ext.DomQuery.isXml(b)){return Ext.DomQuery.selectNode(a,b)}}},extractData:function(a){var b=this.record;if(b!=a.nodeName){a=Ext.DomQuery.select(b,a)}else{a=[a]}return this.callParent([a])},getAssociatedDataRoot:function(b,a){return Ext.DomQuery.select(a,b)[0]},readRecords:function(a){if(Ext.isArray(a)){a=a[0]}this.xmlData=a;return this.callParent([a])}});Ext.define("Ext.data.writer.Xml",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.XmlWriter",alias:"writer.xml",documentRoot:"xmlData",defaultDocumentRoot:"xmlData",header:"",record:"record",writeRecords:function(a,b){var h=this,d=[],c=0,g=b.length,j=h.documentRoot,e=h.record,m=b.length!==1,l,k;d.push(h.header||"");if(!j&&m){j=h.defaultDocumentRoot}if(j){d.push("<",j,">")}for(;c<g;++c){l=b[c];d.push("<",e,">");for(k in l){if(l.hasOwnProperty(k)){d.push("<",k,">",l[k],"</",k,">")}}d.push("</",e,">")}if(j){d.push("</",j,">")}a.xmlData=d.join("");return a}});Ext.define("Ext.direct.Event",{alias:"direct.event",requires:["Ext.direct.Manager"],status:true,constructor:function(a){Ext.apply(this,a)},getData:function(){return this.data}});Ext.define("Ext.direct.RemotingEvent",{extend:"Ext.direct.Event",alias:"direct.rpc",getTransaction:function(){return this.transaction||Ext.direct.Manager.getTransaction(this.tid)}});Ext.define("Ext.direct.ExceptionEvent",{extend:"Ext.direct.RemotingEvent",alias:"direct.exception",status:false});Ext.define("Ext.direct.Provider",{alias:"direct.provider",mixins:{observable:"Ext.util.Observable"},constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("connect","disconnect","data","exception");b.mixins.observable.constructor.call(b,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.define("Ext.direct.JsonProvider",{extend:"Ext.direct.Provider",alias:"direct.jsonprovider",uses:["Ext.direct.ExceptionEvent"],parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(Ext.isObject(a.responseText)){return a.responseText}return Ext.decode(a.responseText)}return null},createEvents:function(b){var h=null,d=[],g,c=0,a;try{h=this.parseResponse(b)}catch(j){g=Ext.create("Ext.direct.ExceptionEvent",{data:j,xhr:b,code:Ext.direct.Manager.self.exceptions.PARSE,message:"Error parsing json response: \n\n "+h});return[g]}if(Ext.isArray(h)){for(a=h.length;c<a;++c){d.push(this.createEvent(h[c]))}}else{d.push(this.createEvent(h))}return d},createEvent:function(a){return Ext.create("direct."+a.type,a)}});Ext.define("Ext.direct.PollingProvider",{extend:"Ext.direct.JsonProvider",alias:"direct.pollingprovider",uses:["Ext.direct.ExceptionEvent"],requires:["Ext.Ajax","Ext.util.DelayedTask"],interval:3000,constructor:function(a){this.callParent(arguments);this.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){var b=this,a=b.url;if(a&&!b.pollTask){b.pollTask=Ext.TaskManager.start({run:function(){if(b.fireEvent("beforepoll",b)!==false){if(Ext.isFunction(a)){a(b.baseParams)}else{Ext.Ajax.request({url:a,callback:b.onData,scope:b,params:b.baseParams})}}},interval:b.interval,scope:b});b.fireEvent("connect",b)}else{if(!a){}}},disconnect:function(){var a=this;if(a.pollTask){Ext.TaskManager.stop(a.pollTask);delete a.pollTask;a.fireEvent("disconnect",a)}},onData:function(e,h,b){var g=this,d=0,a,c;if(h){c=g.createEvents(b);for(a=c.length;d<a;++d){g.fireEvent("data",g,c[d])}}else{g.fireEvent("data",g,Ext.create("Ext.direct.ExceptionEvent",{data:null,code:Ext.direct.Manager.self.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:b}))}}});Ext.define("Ext.direct.RemotingMethod",{constructor:function(b){var c=this,d=Ext.isDefined(b.params)?b.params:b.len,a;c.name=b.name;c.formHandler=b.formHandler;if(Ext.isNumber(d)){c.len=d;c.ordered=true}else{c.params=[];Ext.each(d,function(e){a=Ext.isObject(e)?e.name:e;c.params.push(a)})}},getCallData:function(c){var e=this,g=null,a=e.len,h=e.params,i,d,b;if(e.ordered){i=c[a];d=c[a+1];if(a!==0){g=c.slice(0,a)}}else{g=Ext.apply({},c[0]);i=c[1];d=c[2];for(b in g){if(g.hasOwnProperty(b)){if(!Ext.Array.contains(h,b)){delete g[b]}}}}return{data:g,callback:i,scope:d}}});Ext.define("Ext.direct.Transaction",{alias:"direct.transaction",alternateClassName:"Ext.Direct.Transaction",statics:{TRANSACTION_ID:0},constructor:function(a){var b=this;Ext.apply(b,a);b.id=++b.self.TRANSACTION_ID;b.retryCount=0},send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++;this.send()},getProvider:function(){return this.provider}});Ext.define("Ext.direct.RemotingProvider",{alias:"direct.remotingprovider",extend:"Ext.direct.JsonProvider",requires:["Ext.util.MixedCollection","Ext.util.DelayedTask","Ext.direct.Transaction","Ext.direct.RemotingMethod"],enableBuffer:10,maxRetries:1,timeout:undefined,constructor:function(a){var b=this;b.callParent(arguments);b.addEvents("beforecall","call");b.namespace=(Ext.isString(b.namespace))?Ext.ns(b.namespace):b.namespace||window;b.transactions=Ext.create("Ext.util.MixedCollection");b.callBuffer=[]},initAPI:function(){var h=this.actions,e=this.namespace,g,b,c,d,a,j;for(g in h){b=e[g];if(!b){b=e[g]={}}c=h[g];for(d=0,a=c.length;d<a;++d){j=Ext.create("Ext.direct.RemotingMethod",c[d]);b[j.name]=this.createHandler(g,j)}}},createHandler:function(c,d){var b=this,a;if(!d.formHandler){a=function(){b.configureRequest(c,d,Array.prototype.slice.call(arguments,0))}}else{a=function(g,h,e){b.configureFormRequest(c,d,g,h,e)}}a.directCfg={action:c,method:d};return a},isConnected:function(){return !!this.connected},connect:function(){var a=this;if(a.url){a.initAPI();a.connected=true;a.fireEvent("connect",a)}else{if(!a.url){}}},disconnect:function(){var a=this;if(a.connected){a.connected=false;a.fireEvent("disconnect",a)}},runCallback:function(d,b){var c=b.status?"success":"failure",e,a;if(d&&d.callback){e=d.callback;a=Ext.isDefined(b.result)?b.result:b.data;if(Ext.isFunction(e)){e(a,b)}else{Ext.callback(e[c],e.scope,[a,b]);Ext.callback(e.callback,e.scope,[a,b])}}},onData:function(l,j,c){var g=this,d=0,e,k,a,b,h;if(j){k=g.createEvents(c);for(e=k.length;d<e;++d){a=k[d];b=g.getTransaction(a);g.fireEvent("data",g,a);if(b){g.runCallback(b,a,true);Ext.direct.Manager.removeTransaction(b)}}}else{h=[].concat(l.transaction);for(e=h.length;d<e;++d){b=g.getTransaction(h[d]);if(b&&b.retryCount<g.maxRetries){b.retry()}else{a=Ext.create("Ext.direct.ExceptionEvent",{data:null,transaction:b,code:Ext.direct.Manager.self.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:c});g.fireEvent("data",g,a);if(b){g.runCallback(b,a,false);Ext.direct.Manager.removeTransaction(b)}}}}},getTransaction:function(a){return a&&a.tid?Ext.direct.Manager.getTransaction(a.tid):null},configureRequest:function(d,a,g){var h=this,c=a.getCallData(g),e=c.data,i=c.callback,j=c.scope,b;b=Ext.create("Ext.direct.Transaction",{provider:h,args:g,action:d,method:a.name,data:e,callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i});if(h.fireEvent("beforecall",h,b,a)!==false){Ext.direct.Manager.addTransaction(b);h.queueTransaction(b);h.fireEvent("call",h,b,a)}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.id}},sendRequest:function(h){var g=this,e={url:g.url,callback:g.onData,scope:g,transaction:h,timeout:g.timeout},b,d=g.enableUrlEncode,c=0,a,j;if(Ext.isArray(h)){b=[];for(a=h.length;c<a;++c){b.push(g.getCallData(h[c]))}}else{b=g.getCallData(h)}if(d){j={};j[Ext.isString(d)?d:"data"]=Ext.encode(b);e.params=j}else{e.jsonData=b}Ext.Ajax.request(e)},queueTransaction:function(c){var b=this,a=b.enableBuffer;if(c.form){b.sendFormRequest(c);return}b.callBuffer.push(c);if(a){if(!b.callTask){b.callTask=Ext.create("Ext.util.DelayedTask",b.combineAndSend,b)}b.callTask.delay(Ext.isNumber(a)?a:10)}else{b.combineAndSend()}},combineAndSend:function(){var b=this.callBuffer,a=b.length;if(a>0){this.sendRequest(a==1?b[0]:b);this.callBuffer=[]}},configureFormRequest:function(e,a,b,i,j){var h=this,c=Ext.create("Ext.direct.Transaction",{provider:h,action:e,method:a.name,args:[b,i,j],callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i,isForm:true}),g,d;if(h.fireEvent("beforecall",h,c,a)!==false){Ext.direct.Manager.addTransaction(c);g=String(b.getAttribute("enctype")).toLowerCase()=="multipart/form-data";d={extTID:c.id,extAction:e,extMethod:a.name,extType:"rpc",extUpload:String(g)};Ext.apply(c,{form:Ext.getDom(b),isUpload:g,params:i&&Ext.isObject(i.params)?Ext.apply(d,i.params):d});h.fireEvent("call",h,c,a);h.sendFormRequest(c)}},sendFormRequest:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,transaction:a})}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(t,q,m,k,i,h){var n=this,g=[[],[],[]],s=[[t,m,i],[q,k,h],[0,0,1]],r,p,l,j;for(r=0;r<3;r++){for(p=0;p<3;p++){j=0;for(l=0;l<3;l++){j+=n.matrix[r][l]*s[l][p]}g[r][p]=j}}n.matrix=g},prepend:function(t,q,m,k,i,h){var n=this,g=[[],[],[]],s=[[t,m,i],[q,k,h],[0,0,1]],r,p,l,j;for(r=0;r<3;r++){for(p=0;p<3;p++){j=0;for(l=0;l<3;l++){j+=s[r][l]*n.matrix[l][p]}g[r][p]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(1,0,0,1,a,d);c.add(b,0,0,e,0,0);c.add(1,0,0,1,-a,-d)},rotate:function(c,b,h){c=Ext.draw.Draw.rad(c);var e=this,g=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(g,d,-d,g,b,h);e.add(1,0,0,1,-b,-h)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return"matrix("+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+")"},toFilter:function(){var a=this;return"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',FilterType=bilinear,M11="+a.get(0,0)+", M12="+a.get(0,1)+", M21="+a.get(1,0)+", M22="+a.get(1,1)+", Dx="+a.get(0,2)+", Dy="+a.get(1,2)+")"},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(g){return g[0]*g[0]+g[1]*g[1]}function b(g){var h=Math.sqrt(d(g));g[0]/=h;g[1]/=h}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][0],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var j=this,g=j.el,m,d,c,p,n,u,a,k,h,s,q;q=j.sprite;s=q.getBBox();try{m=Ext.Element.getXY(g)}catch(i){}if(!m){return null}d=m[0];c=d+s.width;p=m[1];n=p+s.height;return Ext.create("Ext.util.Region",p,c,n,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(i){var h=i.getXY(),g=this,d=g.sprite,a=d.attr,c,b;h=g.sprite.surface.transformToViewBox(h[0],h[1]);c=h[0]-g.prev[0];b=h[1]-g.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);g.prev=h},setDragElPos:function(){return false}});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(a){var b=this;a=a||{};b.id=Ext.id(null,"ext-sprite-");b.transformations=[];Ext.copyTo(this,a,"surface,group,type,draggable");b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;a.draggable=true;if(!a.el){a.surface.createSpriteElement(a)}a.dd=Ext.create("Ext.draw.SpriteDD",a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(k,n){var t=this,j=t.fontProperties,r=j.length,g=t.pathProperties,e=g.length,s=!!t.surface,a=s&&t.surface.customAttributes||{},b=t.attr,l,p,h,c,q,m,u,d;k=Ext.apply({},k);for(l in a){if(k.hasOwnProperty(l)&&typeof a[l]=="function"){Ext.apply(k,a[l].apply(t,[].concat(k[l])))}}if(!!k.hidden!==!!b.hidden){t.dirtyHidden=true}for(p=0;p<e;p++){l=g[p];if(l in k&&k[l]!==b[l]){t.dirtyPath=true;break}}if("zIndex" in k){t.zIndexDirty=true}for(p=0;p<r;p++){l=j[p];if(l in k&&k[l]!==b[l]){t.dirtyFont=true;break}}h=k.translate;c=b.translation;if(h){if((h.x&&h.x!==c.x)||(h.y&&h.y!==c.y)){Ext.apply(c,h);t.dirtyTransform=true}delete k.translate}q=k.rotate;m=b.rotation;if(q){if((q.x&&q.x!==m.x)||(q.y&&q.y!==m.y)||(q.degrees&&q.degrees!==m.degrees)){Ext.apply(m,q);t.dirtyTransform=true}delete k.rotate}u=k.scale;d=b.scaling;if(u){if((u.x&&u.x!==d.x)||(u.y&&u.y!==d.y)||(u.cx&&u.cx!==d.cx)||(u.cy&&u.cy!==d.cy)){Ext.apply(d,u);t.dirtyTransform=true}delete k.scale}Ext.apply(b,k);t.dirty=true;if(n===true&&s){t.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(a){return this.surface.setText(this,a)},hide:function(a){this.setAttributes({hidden:true},a);return this},show:function(a){this.setAttributes({hidden:false},a);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var a=this;if(a.fireEvent("beforedestroy",a)!==false){a.remove();a.surface.onDestroy(a);a.clearListeners();a.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(a){this.surface.addCls(this,a);return this},removeCls:function(a){this.surface.removeCls(this,a);return this}});Ext.define("Ext.draw.engine.Svg",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(d,a){var c=this.domRef.createElementNS("http://www.w3.org/2000/svg",d),b;if(a){for(b in a){c.setAttribute(b,String(a[b]))}}return c},createSpriteElement:function(a){var b=this.createSvgElement(a.type);b.id=a.id;if(b.style){b.style.webkitTapHighlightColor="rgba(0,0,0,0)"}a.el=Ext.get(b);this.applyZIndex(a);a.matrix=Ext.create("Ext.draw.Matrix");a.bbox={plain:0,transform:0};a.fireEvent("render",a);return b},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(j){var k={},g,l,a,c,h,b;if(j&&j.el){b=j.el.dom;try{k=b.getBBox();return k}catch(d){}k={x:k.x,y:Infinity,width:0,height:0};h=b.getNumberOfChars();for(c=0;c<h;c++){g=b.getExtentOfChar(c);k.y=Math.min(g.y,k.y);l=g.y+g.height-k.y;k.height=Math.max(k.height,l);a=g.x+g.width-k.x;k.width=Math.max(k.width,a)}return k}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(a){this.addCls(a,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){this.removeCls(a,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(d){var h=this,a=Ext.create("Ext.draw.Matrix"),g=d.transformations,j=g.length,c=0,b,e;for(;c<j;c++){b=g[c];e=b.type;if(e=="translate"){a.translate(b.x,b.y)}else{if(e=="rotate"){a.rotate(b.degrees,b.x,b.y)}else{if(e=="scale"){a.scale(b.x,b.y,b.centerX,b.centerY)}}}}d.matrix=a;d.el.set({transform:a.toSvg()})},setSize:function(a,c){var d=this,b=d.el;a=+a||d.width;c=+c||d.height;d.width=a;d.height=c;b.setSize(a,c);b.set({width:a,height:c});d.callParent([a,c])},getRegion:function(){var e=this.el.getXY(),c=this.bgRect.getXY(),b=Math.max,a=b(e[0],c[0]),d=b(e[1],c[1]);return{left:a,top:d,right:a+this.width,bottom:d+this.height}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[b,d,c,a].join(" "))}},render:function(c){var g=this;if(!g.el){var e=g.width||10,b=g.height||10,d=g.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:e,height:b}),a=g.getDefs(),h=g.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0}),i;if(Ext.isSafari3){i=g.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}d.appendChild(a);if(Ext.isSafari3){d.appendChild(i)}d.appendChild(h);c.appendChild(d);g.el=Ext.get(d);g.bgRect=Ext.get(h);if(Ext.isSafari3){g.webkitRect=Ext.get(i);g.webkitRect.hide()}g.el.on({scope:g,mouseup:g.onMouseUp,mousedown:g.onMouseDown,mouseover:g.onMouseOver,mouseout:g.onMouseOut,mousemove:g.onMouseMove,mouseenter:g.onMouseEnter,mouseleave:g.onMouseLeave,click:g.onClick})}g.renderAll()},onMouseEnter:function(a){if(this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseenter",a)}},onMouseLeave:function(a){if(!this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseleave",a)}},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);if(d.nodeName=="tspan"&&d.parentNode){d=d.parentNode}c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},tuneText:function(j,k){var a=j.el.dom,b=[],m,h,l,d,e,c,g;if(k.hasOwnProperty("text")){b=this.setText(j,k.text)}if(b.length){m=this.getBBoxText(j).height;for(d=0,e=b.length;d<e;d++){g=(Ext.isFF3_0||Ext.isFF3_5)?2:4;b[d].setAttribute("dy",d?m*1.2:m/g)}j.dirty=true}},setText:function(l,d){var h=this,a=l.el.dom,k=a.getAttribute("x"),b=[],n,j,m,e,g,c;while(a.firstChild){a.removeChild(a.firstChild)}c=String(d).split("\n");for(e=0,g=c.length;e<g;e++){m=c[e];if(m){j=h.createSvgElement("tspan");j.appendChild(document.createTextNode(Ext.htmlDecode(m)));j.setAttribute("x",k);a.appendChild(j);b[e]=j}}return b},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.zIndexDirty){this.applyZIndex(a)}if(a.dirty){this.applyAttrs(a);this.applyTransformations(a)}},redraw:function(a){a.dirty=a.zIndexDirty=true;this.renderItem(a)},applyAttrs:function(s){var m=this,c=s.el,r=s.group,j=s.attr,t=m.parsers,g=m.gradientsMap||{},k=Ext.isSafari&&!Ext.isStrict,e,h,l,q,d,p,b,a,n;if(r){e=[].concat(r);l=e.length;for(h=0;h<l;h++){r=e[h];m.getGroup(r).add(s)}delete s.group}q=m.scrubAttrs(s)||{};s.bbox.plain=0;s.bbox.transform=0;if(s.type=="circle"||s.type=="ellipse"){q.cx=q.cx||q.x;q.cy=q.cy||q.y}else{if(s.type=="rect"){q.rx=q.ry=q.r}else{if(s.type=="path"&&q.d){q.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(q.d))}}}s.dirtyPath=false;if(q["clip-rect"]){m.setClip(s,q);delete q["clip-rect"]}if(s.type=="text"&&q.font&&s.dirtyFont){c.set({style:"font: "+q.font});s.dirtyFont=false}if(s.type=="image"){c.dom.setAttributeNS(m.xlink,"href",q.src)}Ext.applyIf(q,m.minDefaults[s.type]);if(s.dirtyHidden){(j.hidden)?m.hidePrim(s):m.showPrim(s);s.dirtyHidden=false}for(p in q){if(q.hasOwnProperty(p)&&q[p]!=null){if(k&&("color|stroke|fill".indexOf(p)>-1)&&(q[p] in g)){q[p]=g[q[p]]}if(p in t){c.dom.setAttribute(p,t[p](q[p],s,m))}else{c.dom.setAttribute(p,q[p])}}}if(s.type=="text"){m.tuneText(s,q)}b=j.style;if(b){c.setStyle(b)}s.dirty=false;if(Ext.isSafari3){m.webkitRect.show();setTimeout(function(){m.webkitRect.hide()})}},setClip:function(b,g){var e=this,d=g["clip-rect"],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement("clipPath");c=e.createSvgElement("rect");a.id=Ext.id(null,"ext-clip-");c.setAttribute("x",d.x);c.setAttribute("y",d.y);c.setAttribute("width",d.width);c.setAttribute("height",d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute("clip-path","url(#"+a.id+")");b.clip=c}},applyZIndex:function(d){var g=this,b=g.items,a=b.indexOf(d),e=d.el,c;if(g.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||g.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=Ext.create("Ext.draw.Sprite",a);b.surface=this;return b},addGradient:function(h){h=Ext.draw.Draw.parseGradient(h);var e=this,d=h.stops.length,a=h.vector,l=Ext.isSafari&&!Ext.isStrict,j,g,k,c,b;b=e.gradientsMap||{};if(!l){if(h.type=="linear"){j=e.createSvgElement("linearGradient");j.setAttribute("x1",a[0]);j.setAttribute("y1",a[1]);j.setAttribute("x2",a[2]);j.setAttribute("y2",a[3])}else{j=e.createSvgElement("radialGradient");j.setAttribute("cx",h.centerX);j.setAttribute("cy",h.centerY);j.setAttribute("r",h.radius);if(Ext.isNumber(h.focalX)&&Ext.isNumber(h.focalY)){j.setAttribute("fx",h.focalX);j.setAttribute("fy",h.focalY)}}j.id=h.id;e.getDefs().appendChild(j);for(c=0;c<d;c++){g=h.stops[c];k=e.createSvgElement("stop");k.setAttribute("offset",g.offset+"%");k.setAttribute("stop-color",g.color);k.setAttribute("stop-opacity",g.opacity);j.appendChild(k)}}else{b["url(#"+h.id+")"]=h.stops[0].color}e.gradientsMap=b},hasCls:function(a,b){return b&&(" "+(a.el.dom.getAttribute("class")||"")+" ").indexOf(" "+b+" ")!=-1},addCls:function(e,h){var g=e.el,d,a,c,b=[],j=g.getAttribute("class")||"";if(!Ext.isArray(h)){if(typeof h=="string"&&!this.hasCls(e,h)){g.set({"class":j+" "+h})}}else{for(d=0,a=h.length;d<a;d++){c=h[d];if(typeof c=="string"&&(" "+j+" ").indexOf(" "+c+" ")==-1){b.push(c)}}if(b.length){g.set({"class":" "+b.join(" ")})}}},removeCls:function(k,g){var h=this,b=k.el,d=b.getAttribute("class")||"",c,j,e,l,a;if(!Ext.isArray(g)){g=[g]}if(d){a=d.replace(h.trimRe," ").split(h.spacesRe);for(c=0,e=g.length;c<e;c++){l=g[c];if(typeof l=="string"){l=l.replace(h.trimRe,"");j=Ext.Array.indexOf(a,l);if(j!=-1){Ext.Array.erase(a,j,1)}}}b.set({"class":a.join(" ")})}},destroy:function(){var a=this;a.callParent();if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",orderSpritesByZIndex:false,path2vml:function(u){var n=this,v=n.NonVmlPathRe,b=n.map,e=n.valRe,t=n.zoom,d=n.bitesRe,g=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),m,q,c,a,k,s,h,l;if(String(u).match(v)){g=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(u).match(n.partialPathRe)){m=String(u).replace(d,function(r,x,j){var w=[],i=x.toLowerCase()=="m",p=b[x];j.replace(e,function(y){if(i&&w[length]==2){p+=w+b[x=="m"?"l":"L"];w=[]}w.push(Math.round(y*t))});return p+w});return m}}q=g(u);m=[];for(k=0,s=q.length;k<s;k++){c=q[k];a=q[k][0].toLowerCase();if(a=="z"){a="x"}for(h=1,l=c.length;h<l;h++){a+=Math.round(c[h]*n.zoom)+(h!=l-1?",":"")}m.push(a)}return m.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(a){this.fireEvent("mouseenter",a)},onMouseLeave:function(a){this.fireEvent("mouseleave",a)},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},createSpriteElement:function(h){var e=this,d=h.attr,g=h.type,j=e.zoom,b=h.vml||(h.vml={}),k=Math.round,c=e.createNode("shape"),l,i,a;c.coordsize=j+" "+j;c.coordorigin=d.coordorigin||"0 0";Ext.get(c).addCls(e.spriteCls);if(g=="text"){b.path=l=e.createNode("path");l.textpathok=true;b.textpath=a=e.createNode("textpath");a.on=true;c.appendChild(a);c.appendChild(l)}c.id=h.id;h.el=Ext.get(c);e.el.appendChild(c);if(g!=="image"){i=e.createNode("skew");i.on=true;c.appendChild(i);h.skew=i}h.matrix=Ext.create("Ext.draw.Matrix");h.bbox={plain:null,transform:null};h.fireEvent("render",h);return h.el},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(b){var a=b.vml;return{x:a.X+(a.bbx||0)-a.W/2,y:a.Y-a.H/2,width:a.W,height:a.H}},applyAttrs:function(n){var u=this,d=n.vml,k=n.group,b=n.attr,c=n.el,q=c.dom,r,w,t,p,l,s,m,v,a;if(k){t=[].concat(k);l=t.length;for(p=0;p<l;p++){k=t[p];u.getGroup(k).add(n)}delete n.group}s=u.scrubAttrs(n)||{};if(n.zIndexDirty){u.setZIndex(n)}Ext.applyIf(s,u.minDefaults[n.type]);if(q.href){q.href=s.href}if(q.title){q.title=s.title}if(q.target){q.target=s.target}if(q.cursor){q.cursor=s.cursor}if(n.dirtyHidden){(s.hidden)?u.hidePrim(n):u.showPrim(n);n.dirtyHidden=false}if(n.dirtyPath){if(n.type=="circle"||n.type=="ellipse"){var g=s.x,e=s.y,j=s.rx||s.r||0,h=s.ry||s.r||0;q.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((g-j)*u.zoom),Math.round((e-h)*u.zoom),Math.round((g+j)*u.zoom),Math.round((e+h)*u.zoom),Math.round(g*u.zoom));n.dirtyPath=false}else{if(n.type!=="text"){n.attr.path=s.path=u.setPaths(n,s)||s.path;q.path=u.path2vml(s.path);n.dirtyPath=false}}}if("clip-rect" in s){u.setClip(n,s)}if(n.type=="text"){u.setTextAttributes(n,s)}if(n.type=="image"||s.opacity||s["fill-opacity"]||s.fill){u.setFill(n,s)}if(s.stroke||s["stroke-opacity"]||s.fill){u.setStroke(n,s)}r=b.style;if(r){c.setStyle(r)}n.dirty=false},setZIndex:function(a){if(a.el){if(a.attr.zIndex!=undefined){a.el.setStyle("zIndex",a.attr.zIndex)}a.zIndexDirty=false}},setPaths:function(b,c){var a=b.attr;b.bbox.plain=null;b.bbox.transform=null;if(b.type=="circle"){a.rx=a.ry=c.r;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type=="ellipse"){a.rx=c.rx;a.ry=c.ry;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type=="rect"||b.type=="image"){a.rx=a.ry=c.r;return Ext.draw.Draw.rectPath(b)}else{if(b.type=="path"&&a.path){return Ext.draw.Draw.pathToAbsolute(a.path)}}}}return false},setFill:function(k,d){var h=this,b=k.el,e=b.dom,j=e.getElementsByTagName("fill")[0],g,i,a,l,c;if(j){e.removeChild(j)}else{j=h.createNode("fill")}if(Ext.isArray(d.fill)){d.fill=d.fill[0]}if(k.type=="image"){j.on=true;j.src=d.src;j.type="tile";j.rotate=true}else{if(d.fill=="none"){j.on=false}else{if(typeof d.opacity=="number"){j.opacity=d.opacity}if(typeof d["fill-opacity"]=="number"){j.opacity=d["fill-opacity"]}j.on=true;if(typeof d.fill=="string"){a=d.fill.match(h.fillUrlRe);if(a){a=a[1];if(a.charAt(0)=="#"){i=h.gradientsColl.getByKey(a.substring(1))}if(i){l=d.rotation;c=-(i.angle+270+(l?l.degrees:0))%360;if(c===0){c=180}j.angle=c;j.type="gradient";j.method="sigma";j.colors=i.colors}else{j.src=a;j.type="tile";j.rotate=true}}else{j.color=Ext.draw.Color.toHex(d.fill)||d.fill;j.src="";j.type="solid"}}}}e.appendChild(j)},setStroke:function(b,h){var e=this,d=b.el.dom,i=b.strokeEl,g=false,c,a;if(!i){i=b.strokeEl=e.createNode("stroke");g=true}if(Ext.isArray(h.stroke)){h.stroke=h.stroke[0]}if(!h.stroke||h.stroke=="none"||h.stroke==0||h["stroke-width"]==0){i.on=false}else{i.on=true;if(h.stroke&&!h.stroke.match(e.fillUrlRe)){i.color=Ext.draw.Color.toHex(h.stroke)}i.joinstyle=h["stroke-linejoin"];i.endcap=h["stroke-linecap"]||"round";i.miterlimit=h["stroke-miterlimit"]||8;c=parseFloat(h["stroke-width"]||1)*0.75;a=h["stroke-opacity"]||1;if(Ext.isNumber(c)&&c<1){i.weight=1;i.opacity=a*c}else{i.weight=c;i.opacity=a}}if(g){d.appendChild(i)}},setClip:function(b,g){var e=this,c=b.el,a=b.clipEl,d=String(g["clip-rect"]).split(e.separatorRe);if(!a){a=b.clipEl=e.el.insertFirst(Ext.getDoc().dom.createElement("div"));a.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(d.length==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);a.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",d[0],d[1],d[2],d[3]));a.setSize(e.el.width,e.el.height)}else{a.setStyle("clip","")}},setTextAttributes:function(i,c){var h=this,a=i.vml,e=a.textpath.style,g=h.span.style,j=h.zoom,k=Math.round,l={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},b,d;if(i.dirtyFont){if(c.font){e.font=g.font=c.font}if(c["font-family"]){e.fontFamily='"'+c["font-family"].split(",")[0].replace(h.fontFamilyRe,"")+'"';g.fontFamily=c["font-family"]}for(b in l){d=c[l[b]];if(d){e[b]=g[b]=d}}h.setText(i,c.text);if(a.textpath.string){h.span.innerHTML=String(a.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>")}a.W=h.span.offsetWidth;a.H=h.span.offsetHeight+2;if(c["text-anchor"]=="middle"){e["v-text-align"]="center"}else{if(c["text-anchor"]=="end"){e["v-text-align"]="right";a.bbx=-Math.round(a.W/2)}else{e["v-text-align"]="left";a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(a.X*j),Math.round(a.Y*j),Math.round(a.X*j)+1);i.bbox.plain=null;i.bbox.transform=null;i.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}c.applyViewBox();c.callParent(arguments)}},setViewBox:function(b,d,c,a){this.callParent(arguments);this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()},applyViewBox:function(){var d=this,l=d.viewBox,a=d.width,h=d.height,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;if(j*i<a){g-=(a-j*i)/2/i}if(b*c<h){e-=(h-b*c)/2/c}k=1/Math.max(j/a,b/h);d.viewBoxShift={dx:-g,dy:-e,scale:k};d.items.each(function(m){d.transform(m)})}},onAdd:function(a){this.callParent(arguments);if(this.el){this.renderItem(a)}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},createNode:(function(){try{var b=Ext.getDoc().dom;if(!b.namespaces.rvml){b.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}return function(c){return b.createElement("<rvml:"+c+' class="rvml">')}}catch(a){return function(c){return b.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}})(),render:function(a){var c=this,d=Ext.getDoc().dom;if(!c.el){var b=d.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=d.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||10,c.height||10);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=Ext.create("Ext.draw.Matrix");b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},extractTransform:function(k){var h=this,j=Ext.create("Ext.draw.Matrix"),e,c,a,d,g=0,b=h.viewBoxShift;for(c=k.transformations,a=c.length;g<a;g++){d=c[g];switch(d.type){case"translate":j.translate(d.x,d.y);break;case"rotate":j.rotate(d.degrees,d.x,d.y);break;case"scale":j.scale(d.x||d.scale,d.y||d.scale,d.centerX,d.centerY);break}}if(b){j.add(1,0,0,1,b.dx,b.dy);j.prepend(b.scale,0,0,b.scale,0,0)}return k.matrix=j},setSimpleCoords:function(n,l,k,r,q,e){var j=this,m=n.matrix,d=n.el.dom,a=d.style,c=1,g="",p=d.getElementsByTagName("fill")[0],i=j.zoom/l,h=j.zoom/k,b;if(!l||!k){return}d.coordsize=Math.abs(i)+" "+Math.abs(h);a.rotation=e*(l*k<0?-1:1);if(e){b=j.rotationCompensation(e,r,q);r=b.x;q=b.y}if(l<0){g+="x"}if(k<0){g+=" y";c=-1}a.flip=g;d.coordorigin=(r*-i)+" "+(q*-h);if(p){d.removeChild(p);b=j.rotationCompensation(e,m.x(n.x,n.y),m.y(n.x,n.y));p.position=b.x*c+" "+b.y*c;p.size=n.width*Math.abs(l)+" "+n.height*Math.abs(k);d.appendChild(p)}},transform:function(m){var j=this,b=m.el,r=m.skew,e=b.dom,g=e.style,l=j.extractTransform(m).clone(),k,q=j.zoom,p=e.getElementsByTagName("fill")[0],a=!String(m.fill).indexOf("url("),d,i;if(m.type!="image"&&r&&!a){r.matrix=l.toString();d=l.offset();if(d[0]>32767){d[0]=32767}else{if(d[0]<-32768){d[0]=-32768}}if(d[1]>32767){d[1]=32767}else{if(d[1]<-32768){d[1]=-32768}}r.offset=d}else{if(r){r.matrix="1 0 0 1";r.offset="0 0"}k=l.split();if(k.isSimple){g.filter="";j.setSimpleCoords(m,k.scaleX,k.scaleY,k.translateX,k.translateY,k.rotate/Math.PI*180)}else{g.filter=l.toFilter();var h=j.getBBox(m),s=h.x-m.x,n=h.y-m.y;e.coordorigin=(s*-q)+" "+(n*-q);if(p){e.removeChild(p);p.position=s+" "+n;p.size=m.width*m.scale.x+" "+m.height*1.1;e.appendChild(p)}}}},createItem:function(a){return Ext.create("Ext.draw.Sprite",a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&&a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&&a.el){a.el.removeCls(b)}},addGradient:function(d){var a=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),b=[],c=Ext.create("Ext.util.MixedCollection");c.addAll(d.stops);c.sortByKey("ASC",function(g,e){g=parseInt(g,10);e=parseInt(e,10);return g>e?1:(g<e?-1:0)});c.eachKey(function(g,e){b.push(g+"% "+e.color)});a.add(d.id,{colors:b.join(","),angle:d.angle})},destroy:function(){var a=this;a.callParent(arguments);if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.fx.target.ElementCSS",{extend:"Ext.fx.target.Element",setAttr:function(n,e){var q={attrs:[],duration:[],easing:[]},m=n.length,g,p,k,l,c,b,h,d,a;for(h=0;h<m;h++){p=n[h];c=p.duration;l=p.easing;p=p.attrs;for(k in p){if(Ext.Array.indexOf(q.attrs,k)==-1){q.attrs.push(k.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()}));q.duration.push(c+"ms");q.easing.push(l)}}}g=q.attrs.join(",");c=q.duration.join(",");l=q.easing.join(", ");for(h=0;h<m;h++){p=n[h].attrs;for(k in p){a=p[k].length;for(d=0;d<a;d++){b=p[k][d];b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",e?"":g);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",e?"":c);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",e?"":l);b[0].setStyle(k,b[1]);if(e){b=b[0].dom.offsetWidth}else{b[0].on(Ext.supports.CSS3TransitionEnd,function(){this.setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",null)},b[0],{single:true})}}}}}});Ext.define("Ext.fx.target.CompositeElementCSS",{extend:"Ext.fx.target.CompositeElement",requires:["Ext.fx.target.ElementCSS"],setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}});Ext.define("Ext.layout.container.AbstractFit",{extend:"Ext.layout.container.Container",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit"});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.AbstractFit",alias:"layout.fit",alternateClassName:"Ext.layout.FitLayout",requires:["Ext.layout.container.Box"],defaultMargins:{top:0,right:0,bottom:0,left:0},onLayout:function(){var c=this,a,b,d;c.callParent();if(c.owner.items.length){b=c.owner.items.get(0);d=b.margins||c.defaultMargins;a=c.getLayoutTargetSize();a.width-=d.width;a.height-=d.height;c.setItemBox(b,a);if(d.left||d.top){b.setPosition(d.left,d.top)}}},getTargetBox:function(){return this.getLayoutTargetSize()},setItemBox:function(c,b){var a=this;if(c&&b.height>0){if(!a.owner.isFixedWidth()){b.width=undefined}if(!a.owner.isFixedHeight()){b.height=undefined}a.setItemSize(c,b.width,b.height)}},configureItem:function(a){a.layoutManagedHeight=0;a.layoutManagedWidth=0;this.callParent(arguments)}},function(){this.prototype.renderItem=Ext.layout.container.Box.prototype.renderItem});Ext.define("Ext.layout.container.AbstractCard",{extend:"Ext.layout.container.Fit",type:"card",sizeAllCards:false,hideInactive:true,deferredRender:false,beforeLayout:function(){var a=this;a.getActiveItem();if(a.activeItem&&a.deferredRender){a.renderItems([a.activeItem],a.getRenderTarget());return true}else{return this.callParent(arguments)}},renderChildren:function(){if(!this.deferredRender){this.getActiveItem();this.callParent()}},onLayout:function(){var g=this,h=g.activeItem,b=g.getVisibleItems(),e=b.length,a=g.getTargetBox(),c,d;for(c=0;c<e;c++){d=b[c];g.setItemBox(d,a)}if(!g.firstActivated&&h){if(h.fireEvent("beforeactivate",h)!==false){h.fireEvent("activate",h)}g.firstActivated=true}},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&b.parentNode===(d.dom||d))||false},getActiveItem:function(){var a=this;if(!a.activeItem&&a.owner){a.activeItem=a.parseActiveItem(a.owner.activeItem)}if(a.activeItem&&a.owner.items.indexOf(a.activeItem)!=-1){return a.activeItem}return null},parseActiveItem:function(a){if(a&&a.isComponent){return a}else{if(typeof a=="number"||a===undefined){return this.getLayoutItems()[a||0]}else{return this.owner.getComponent(a)}}},configureItem:function(b,a){this.callParent([b,a]);if(this.hideInactive&&this.activeItem!==b){b.hide()}else{b.show()}},onRemove:function(a){if(a===this.activeItem){this.activeItem=null;if(this.owner.items.getCount()===0){this.firstActivated=false}}},getAnimation:function(b,a){var c=(b||{}).cardSwitchAnimation;if(c===false){return false}return c||a.cardSwitchAnimation},getNext:function(){var c=arguments[0];var a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b+1]||(c?a[0]:false)},next:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getNext(a),b)},getPrev:function(){var c=arguments[0];var a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b-1]||(c?a[a.length-1]:false)},prev:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getPrev(a),b)}});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractSelectionModel",requires:["Ext.data.StoreManager"],allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("selectionchange");b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=Ext.create("Ext.util.MixedCollection");b.callParent(arguments)},bind:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroyStore()}else{c.store.un("add",c.onStoreAdd,c);c.store.un("clear",c.onStoreClear,c);c.store.un("remove",c.onStoreRemove,c);c.store.un("update",c.onStoreUpdate,c)}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({add:c.onStoreAdd,clear:c.onStoreClear,remove:c.onStoreRemove,update:c.onStoreUpdate,scope:c})}c.store=a;if(a&&!b){c.refresh()}},selectAll:function(b){var e=this,d=e.store.getRange(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doSelect(d[c],true,b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},deselectAll:function(b){var e=this,d=e.getSelection(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doDeselect(d[c],b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},selectWithEvent:function(a,d,c){var b=this;switch(b.selectionMode){case"MULTI":if(d.ctrlKey&&b.isSelected(a)){b.doDeselect(a,false)}else{if(d.shiftKey&&b.lastFocused){b.selectRange(b.lastFocused,a,d.ctrlKey)}else{if(d.ctrlKey){b.doSelect(a,true,false)}else{if(b.isSelected(a)&&!d.shiftKey&&!d.ctrlKey&&b.selected.getCount()>1){b.doSelect(a,c,false)}else{b.doSelect(a,false)}}}}break;case"SIMPLE":if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case"SINGLE":if(b.allowDeselect&&b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(l,e,m,c){var j=this,k=j.store,d=0,h,g,a,b=[];if(j.isLocked()){return}if(!m){j.deselectAll(true)}if(!Ext.isNumber(l)){l=k.indexOf(l)}if(!Ext.isNumber(e)){e=k.indexOf(e)}if(l>e){g=e;e=l;l=g}for(h=l;h<=e;h++){if(j.isSelected(k.getAt(h))){d++}}if(!c){a=-1}else{a=(c=="up")?l:e}for(h=l;h<=e;h++){if(d==(e-l+1)){if(h!=a){j.doDeselect(h,true)}}else{b.push(k.getAt(h))}}j.doMultiSelect(b,true)},select:function(b,c,a){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked){return}if(typeof c==="number"){c=[d.store.getAt(c)]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,l,k){var h=this,b=h.selected,j=false,d=0,g,e;if(h.locked){return}a=!Ext.isArray(a)?[a]:a;g=a.length;if(!l&&b.getCount()>0){if(h.doDeselect(h.getSelection(),k)===false){return}}function c(){b.add(e);j=true}for(;d<g;d++){e=a[d];if(l&&h.isSelected(e)){continue}h.lastSelected=e;h.onSelectChange(e,true,k,c)}h.setLastFocused(e,k);h.maybeFireSelectionChange(j&&!k)},doDeselect:function(a,k){var j=this,b=j.selected,d=0,h,e,l=0,g=0;if(j.locked){return false}if(typeof a==="number"){a=[j.store.getAt(a)]}else{if(!Ext.isArray(a)){a=[a]}}function c(){++g;b.remove(e)}h=a.length;for(;d<h;d++){e=a[d];if(j.isSelected(e)){if(j.lastSelected==e){j.lastSelected=b.last()}++l;j.onSelectChange(e,false,k,c)}}j.maybeFireSelectionChange(g>0&&!k);return g===l},doSingleSelect:function(a,b){var d=this,g=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()>0&&d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;g=true}d.onSelectChange(a,true,b,e);if(g){if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;d.onLastFocusChanged(a,c,b)},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var h=this,b=[],g=h.getSelection(),a=g.length,e,j,d=0,c=this.getLastFocused();for(;d<a;d++){e=g[d];if(!this.pruneRemoved||h.store.indexOf(e)!==-1){b.push(e)}}if(h.selected.getCount()!=b.length){j=true}h.clearSelections();if(h.store.indexOf(c)!==-1){this.setLastFocused(c,true)}if(b.length){h.doSelect(b,false,true)}h.maybeFireSelectionChange(j)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:function(){},onStoreClear:function(){if(this.selected.getCount>0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a){var d=this,c=d.selected;if(d.locked||!d.pruneRemoved){return}if(c.remove(a)){if(d.lastSelected==a){d.lastSelected=null}if(d.getLastFocused()==a){d.setLastFocused(null)}d.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(a,c,b){},onLastFocusChanged:function(b,a){},onEditorKey:function(b,a){},bindComponent:function(a){}});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bind(a.getStore());a.on(a.triggerEvent,b.onItemClick,b);a.on(a.triggerCtEvent,b.onContainerClick,b);a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,g){this.selectWithEvent(a,g)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=Ext.create("Ext.util.KeyNav",a.el,{down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(g){g=g||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+g}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,h){var g=this,a=g.view,c=e?"select":"deselect";if((d||g.fireEvent("before"+c,g,b))!==false&&h()!==false){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}if(!d){g.fireEvent(c,g,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.state.CookieProvider",{extend:"Ext.state.Provider",constructor:function(a){var b=this;b.path="/";b.expires=new Date(new Date().getTime()+(1000*60*60*24*7));b.domain=null;b.secure=false;b.callParent(arguments);b.state=b.readCookies()},set:function(a,c){var b=this;if(typeof c=="undefined"||c===null){b.clear(a);return}b.setCookie(a,c);b.callParent(arguments)},clear:function(a){this.clearCookie(a);this.callParent(arguments)},readCookies:function(){var e={},j=document.cookie+";",d=/\s?(.*?)=(.*?);/g,i=this.prefix,a=i.length,h,b,g;while((h=d.exec(j))!=null){b=h[1];g=h[2];if(b&&b.substring(0,a)==i){e[b.substr(a)]=this.decodeValue(g)}}return e},setCookie:function(a,c){var b=this;document.cookie=b.prefix+a+"="+b.encodeValue(c)+((b.expires==null)?"":("; expires="+b.expires.toGMTString()))+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")},clearCookie:function(a){var b=this;document.cookie=b.prefix+a+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")}});Ext.define("Ext.state.LocalStorageProvider",{extend:"Ext.state.Provider",alias:"state.localstorage",constructor:function(){var a=this;a.callParent(arguments);a.store=a.getStorageObject();a.state=a.readLocalStorage()},readLocalStorage:function(){var c=this.store,e=0,a=c.length,h=this.prefix,b=h.length,g={},d;for(;e<a;++e){d=c.key(e);if(d.substring(0,b)==h){g[d.substr(b)]=this.decodeValue(c.getItem(d))}}return g},set:function(a,c){var b=this;b.clear(a);if(typeof c=="undefined"||c===null){return}b.store.setItem(b.prefix+a,b.encodeValue(c));b.callParent(arguments)},clear:function(a){this.store.removeItem(this.prefix+a);this.callParent(arguments)},getStorageObject:function(){try{var a="localStorage" in window&&window.localStorage!==null;if(a){return window.localStorage}}catch(b){return false}}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(a){a=(a.changedTouches&&a.changedTouches.length>0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x<=b.x+a.x&&this.x>=b.x-a.x&&this.y<=b.y+a.y&&this.y>=b.y-a.y)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&&Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.LoadMask",{extend:"Ext.Component",alias:"widget.loadmask",mixins:{floating:"Ext.util.Floating"},uses:["Ext.data.StoreManager"],msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",useMsg:true,disabled:false,baseCls:Ext.baseCSSPrefix+"mask-msg",renderTpl:'<div style="position:relative" class="{msgCls}"></div>',modal:true,floating:{shadow:"frame"},focusOnToFront:false,constructor:function(b,a){var c=this;if(b.isComponent){c.ownerCt=b;c.bindComponent(b)}else{c.ownerCt=new Ext.Component({el:Ext.get(b),rendered:true,componentLayoutCounter:1});c.container=b}c.callParent([a]);if(c.store){c.bindStore(c.store,true)}c.renderData={msgCls:c.msgCls};c.renderSelectors={msgEl:"div"}},bindComponent:function(a){this.mon(a,{resize:this.onComponentResize,scope:this})},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onComponentResize:function(){var a=this;if(a.rendered&&a.isVisible()){a.toFront();a.center()}},bindStore:function(a,b){var c=this;if(!b&&c.store){c.mun(c.store,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad});if(!a){c.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);c.mon(a,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad})}c.store=a;if(a&&a.isLoading()){c.onBeforeLoad()}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},onBeforeLoad:function(){var c=this,a=c.ownerCt||c.floatParent,b;if(!this.disabled){if(a.componentLayoutCounter){Ext.Component.prototype.show.call(c)}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);if(c.loading){Ext.Component.prototype.show.call(c)}}}}},onHide:function(){var a=this;a.callParent(arguments);a.showOnParentShow=true},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},afterShow:function(){this.callParent(arguments);this.center()},onLoad:function(){this.loading=false;Ext.Component.prototype.hide.call(this)}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",alternateClassName:"Ext.view.AbstractView",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',c.itemCls,d);c.tpl=Ext.create("Ext.XTemplate",d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=Ext.create("Ext.XTemplate",c.tpl)}c.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||"ext-empty-store");c.all=new Ext.CompositeElementLite()},onRender:function(){var c=this,b=c.loadMask,a={msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=Ext.create("Ext.LoadMask",c,a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},onMaskBeforeShow:function(){var a=this.loadingHeight;this.getSelectionModel().deselectAll();if(a){this.setCalculatedSize(undefined,a)}},onMaskHide:function(){var a=this;if(!a.destroying&&a.loadingHeight){a.setHeight(a.height)}},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b="SINGLE";if(!a.selModel){a.selModel={}}if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=Ext.create("Ext.selection.DataViewModel",a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,b,a;if(!c.rendered||c.isDestroyed){return}c.fireEvent("beforerefresh",c);b=c.getTargetEl();a=c.store.getRange();b.update("");if(a.length<1){if(!c.deferEmptyText||c.hasSkippedEmptyText){b.update(c.emptyText)}c.all.clear()}else{c.tpl.overwrite(b,c.collectData(a,0));c.all.fill(Ext.query(c.getItemSelector(),b.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;c.fireEvent("refresh",c);if(!c.viewReady){c.viewReady=true;c.fireEvent("viewready",c)}},prepareData:function(c,b,a){if(a){Ext.apply(c,a.getAssociatedData())}return c},collectData:function(c,g){var e=[],d=0,a=c.length,b;for(;d<a;d++){b=c[d];e[e.length]=this.prepareData(b[b.persistenceProperty],g+d,b)}return e},bufferRender:function(a,b){var c=document.createElement("div");this.tpl.overwrite(c,this.collectData(a,b));return Ext.query(this.getItemSelector(),c)},onUpdate:function(e,a){var d=this,b=d.store.indexOf(a),c;if(b>-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.refresh();d.fireEvent("itemupdate",a,b,c)}}},onAdd:function(e,b,c){var d=this,a;if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);d.fireEvent("itemadd",b,c,a)},doAdd:function(b,a,c){var d=this.all;if(c<d.getCount()){d.item(c).insertSibling(b,"before",true)}else{d.last().insertSibling(b,"after",true)}Ext.Array.insert(d.elements,c,b)},onRemove:function(d,a,b){var c=this;c.doRemove(a,b);c.updateIndexes(b);if(c.store.getCount()===0){c.refresh()}c.fireEvent("itemremove",a,b)},doRemove:function(a,b){this.all.removeElement(b,true)},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(e,d){var c=this.all.elements,a=this.store.getRange(),b;e=e||0;d=d||((d===0)?0:(c.length-1));for(b=e;b<=d;b++){c[b].viewIndex=b;c[b].viewRecordId=a[b].internalId;if(!c[b].boundView){c[b].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(a,b){var d=this,c;if(!b&&d.store){if(a!==d.store&&d.store.autoDestroy){d.store.destroyStore()}else{d.mun(d.store,{scope:d,datachanged:d.onDataChanged,add:d.onAdd,remove:d.onRemove,update:d.onUpdate,clear:d.refresh})}if(!a){if(d.loadMask&&d.loadMask.bindStore){d.loadMask.bindStore(null)}d.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);d.mon(a,{scope:d,datachanged:d.onDataChanged,add:d.onAdd,remove:d.onRemove,update:d.onUpdate,clear:d.refresh});if(d.loadMask&&d.loadMask.bindStore){if(Ext.Array.contains(a.alias,"store.node")){c=this.ownerCt.store}else{c=a}d.loadMask.bindStore(c)}}d.viewReady=false;d.store=a;d.getSelectionModel().bind(a);if(a){if(b&&d.deferInitialRefresh){Ext.Function.defer(function(){if(!d.isDestroyed){d.refresh(true)}},1)}else{d.refresh(true)}}},onDataChanged:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemByChild:function(a){return Ext.fly(a).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(a){return a.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var b=[],a=this.selModel.getSelection(),d=a.length,c=0;for(;c<d;c++){b.push(this.getNode(a[c]))}return b},getRecords:function(c){var b=[],d=0,a=c.length,e=this.store.data;for(;d<a;d++){b[b.length]=e.getByKey(c[d].viewRecordId)}return b},getRecord:function(a){return this.store.data.getByKey(Ext.getDom(a).viewRecordId)},isSelected:function(b){var a=this.getRecord(b);return this.selModel.isSelected(a)},select:function(b,c,a){this.selModel.select(b,c,a)},deselect:function(b,a){this.selModel.deselect(b,a)},getNode:function(a){if(!this.rendered){return null}if(Ext.isString(a)){return document.getElementById(a)}if(Ext.isNumber(a)){return this.all.elements[a]}if(a instanceof Ext.data.Model){return this.getNodeByRecord(a)}return a},getNodeByRecord:function(a){var c=this.all.elements,d=c.length,b=0;for(;b<d;b++){if(c[b].viewRecordId===a.internalId){return c[b]}}return null},getNodes:function(e,a){var d=this.all.elements,b=[],c;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).addCls(this.selectedItemCls)}},onItemDeselect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.Action",{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconCls:function(a){this.initialConfig.iconCls=a;this.callEach("setIconCls",[a])},getIconCls:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,c){var b=this.items,d=0,a=b.length;for(;d<a;d++){b[d][e].apply(b[d],c)}},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){Ext.Array.remove(this.items,a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||Ext.global,arguments)}});Ext.define("Ext.layout.component.Editor",{alias:["layout.editor"],extend:"Ext.layout.component.Component",onLayout:function(d,c){var e=this,b=e.owner,a=b.autoSize;if(a===true){a={width:"field",height:"field"}}if(a){d=e.getDimension(b,a.width,"Width",d);c=e.getDimension(b,a.height,"Height",c)}e.setTargetSize(d,c);b.field.setSize(d,c)},getDimension:function(a,b,c,e){var d="get"+c;switch(b){case"boundEl":return a.boundEl[d]();case"field":return a.field[d]();default:return e}}});Ext.define("Ext.Editor",{extend:"Ext.Component",alias:"widget.editor",requires:["Ext.layout.component.Editor"],componentLayout:"editor",allowBlur:true,revertInvalid:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,hidden:true,baseCls:Ext.baseCSSPrefix+"editor",initComponent:function(){var a=this,b=a.field=Ext.ComponentManager.create(a.field,"textfield");Ext.apply(b,{inEditor:true,msgTarget:b.msgTarget=="title"?"title":"qtip"});a.mon(b,{scope:a,blur:{fn:a.onBlur,delay:1},specialkey:a.onSpecialKey});if(b.grow){a.mon(b,"autosize",a.onAutoSize,a,{delay:1})}a.floating={constrain:a.constrain};a.callParent(arguments);a.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onAutoSize:function(){this.doComponentLayout()},onRender:function(b,a){var c=this,e=c.field,d=e.inputEl;c.callParent(arguments);e.render(c.el);if(d){d.dom.name="";if(c.swallowKeys){d.swallowEvent(["keypress","keydown"])}}},onSpecialKey:function(g,e){var d=this,b=e.getKey(),a=d.completeOnEnter&&b==e.ENTER,c=d.cancelOnEsc&&b==e.ESC;if(a||c){e.stopEvent();Ext.defer(function(){if(a){d.completeEdit()}else{d.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}},10)}this.fireEvent("specialkey",this,g,e)},startEdit:function(a,c){var b=this,d=b.field;b.completeEdit();b.boundEl=Ext.get(a);c=Ext.isDefined(c)?c:b.boundEl.dom.innerHTML;if(!b.rendered){b.render(b.parentEl||document.body)}if(b.fireEvent("beforestartedit",b,b.boundEl,c)!==false){b.startValue=c;b.show();d.reset();d.setValue(c);b.realign(true);d.focus(false,10);if(d.autoSize){d.autoSize()}b.editing=true}},realign:function(a){var b=this;if(a===true){b.doComponentLayout()}b.alignTo(b.boundEl,b.alignment,b.offsets)},completeEdit:function(a){var b=this,d=b.field,c;if(!b.editing){return}if(d.assertValue){d.assertValue()}c=b.getValue();if(!d.isValid()){if(b.revertInvalid!==false){b.cancelEdit(a)}return}if(String(c)===String(b.startValue)&&b.ignoreNoChange){b.hideEdit(a);return}if(b.fireEvent("beforecomplete",b,c,b.startValue)!==false){c=b.getValue();if(b.updateEl&&b.boundEl){b.boundEl.update(c)}b.hideEdit(a);b.fireEvent("complete",b,c,b.startValue)}},onShow:function(){var a=this;a.callParent(arguments);if(a.hideEl!==false){a.boundEl.hide()}a.fireEvent("startedit",a.boundEl,a.startValue)},cancelEdit:function(a){var c=this,b=c.startValue,d;if(c.editing){d=c.getValue();c.setValue(b);c.hideEdit(a);c.fireEvent("canceledit",c,d,b)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){var a=this;if(a.allowBlur===true&&a.editing&&a.selectSameEditor!==true){a.completeEdit()}},onHide:function(){var a=this,b=a.field;if(a.editing){a.completeEdit();return}b.blur();if(b.collapse){b.collapse()}if(a.hideEl!==false){a.boundEl.show()}a.callParent(arguments)},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){var a=this;Ext.destroy(a.field);delete a.field;delete a.parentEl;delete a.boundEl;a.callParent(arguments)}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],src:"",getElConfig:function(){return{tag:"img",src:this.src}},initRenderTpl:Ext.emptyFn,setSrc:function(c){var b=this,a=b.el;b.src=c;if(a){a.dom.src=c}}});Ext.define("Ext.Layer",{uses:["Ext.Shadow"],statics:{shims:[]},extend:"Ext.Element",constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,g=b.parentEl,e=g?Ext.getDom(g):document.body,h=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{c.addCls(Ext.baseCSSPrefix+"layer");if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(h){c.setVisibilityMode(Ext.Element[h.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}c.position("absolute");if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=Ext.create("Ext.Shadow",{offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var j=this,n=j.shadow,i,e,a;if(!j.updating&&j.isVisible()&&(n||j.useShim)){var d=j.getShim(),c=j.getLeft(true),p=j.getTop(true),m=j.dom.offsetWidth,g=j.dom.offsetHeight,k;if(n&&!j.shadowDisabled){if(b&&!n.isVisible()){n.show(j)}else{n.realign(c,p,m,g)}if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();if(n.isVisible()){i=n.el.getXY();e=d.dom.style;a=n.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;i[0]-=2;i[1]-=4}e.left=(i[0])+"px";e.top=(i[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(m,g);d.setLeftTop(c,p)}}}else{if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();d.setSize(m,g);d.setLeftTop(c,p)}}}return j},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var g=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),l=Ext.getDoc().getScroll(),k=this.getXY(),i=k[0],e=k[1],a=this.shadowOffset,j=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((i+j)>g+l.left){i=g-j-a;d=true}if((e+c)>b+l.top){e=b-c-a;d=true}if(i<l.left){i=l.left;d=true}if(e<l.top){e=l.top;d=true}if(d){Ext.Layer.superclass.setXY.call(this,[i,e]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(e,b,d,h,g){var c=this,a;a=function(){if(e){c.sync(true)}if(h){h()}};if(!e){c.hideUnders(true)}c.callParent([e,b,d,h,g]);if(!b){a()}return c},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(a){this.callParent(arguments);return this.sync()},setTop:function(a){this.callParent(arguments);return this.sync()},setLeftTop:function(b,a){this.callParent(arguments);return this.sync()},setXY:function(d,a,c,g,e){var b=this;g=b.createCB(g);b.fixDisplay();b.beforeAction();b.callParent([d,a,c,g,e]);if(!a){g()}return b},createCB:function(c){var a=this,b=a.shadow&&a.shadow.isVisible();return function(){a.constrainXY();a.sync(b);if(c){c()}}},setX:function(a,b,c,e,d){this.setXY([a,this.getY()],b,c,e,d);return this},setY:function(e,a,b,d,c){this.setXY([this.getX(),e],a,b,d,c);return this},setSize:function(a,c,b,e,i,g){var d=this;i=d.createCB(i);d.beforeAction();d.callParent([a,c,b,e,i,g]);if(!b){i()}return d},setWidth:function(a,b,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([a,b,d,g,e]);if(!b){g()}return c},setHeight:function(b,a,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([b,a,d,g,e]);if(!a){g()}return c},setBounds:function(h,g,a,j,b,c,i,d){var e=this;i=e.createCB(i);e.beforeAction();if(!b){Ext.Layer.superclass.setXY.call(e,[h,g]);Ext.Layer.superclass.setSize.call(e,a,j);i()}else{e.callParent([h,g,a,j,b,c,i,d])}return e},setZIndex:function(a){var b=this;b.zindex=a;if(b.getShim()){b.shim.setStyle("z-index",a++)}if(b.shadow){b.shadow.setZIndex(a++)}return b.setStyle("z-index",a)},setOpacity:function(a){if(this.shadow){this.shadow.setOpacity(a)}return this.callParent(arguments)}});Ext.define("Ext.layout.component.ProgressBar",{alias:["layout.progressbar"],extend:"Ext.layout.component.Component",type:"progressbar",onLayout:function(d,b){var e=this,a=e.owner,c=a.textEl;e.setElementSize(a.el,d,b);c.setWidth(a.el.getWidth(true));e.callParent([d,b]);a.updateProgress(a.value)}});Ext.define("Ext.ProgressBar",{extend:"Ext.Component",alias:"widget.progressbar",requires:["Ext.Template","Ext.CompositeElement","Ext.TaskManager","Ext.layout.component.ProgressBar"],uses:["Ext.fx.Anim"],baseCls:Ext.baseCSSPrefix+"progress",config:{animate:false,text:""},waitTimer:null,renderTpl:['<div class="{baseCls}-text {baseCls}-text-back">',"<div>&#160;</div>","</div>",'<div id="{id}-bar" class="{baseCls}-bar">','<div class="{baseCls}-text">',"<div>&#160;</div>","</div>","</div>"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addChildEls("bar");this.addEvents("update")},afterRender:function(){var a=this;a.textEl=a.textEl?Ext.get(a.textEl):a.el.select("."+a.baseCls+"-text");a.callParent(arguments);if(a.value){a.updateProgress(a.value,a.text)}else{a.updateText(a.text)}},updateProgress:function(d,e,a){var c=this,b;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(c.isVisible(true)){b=Math.floor(c.value*c.el.getWidth(true));if(Ext.isForcedBorderBox){b+=c.bar.getBorderWidth("lr")}if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({to:{width:b+"px"}},c.animate))}else{c.bar.setWidth(b)}}else{c.doComponentLayout()}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},wait:function(b){var a=this;if(!a.waitTimer){scope=a;b=b||{};a.updateText(b.text);a.waitTimer=Ext.TaskManager.start({run:function(c){var d=b.increment||10;c-=1;a.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||a)}a.reset()},scope:scope})}return a},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,"textEl","progressBar")}a.callParent()}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:function(){if(Ext.supports.CSS3BoxShadow){return'<div class="'+Ext.baseCSSPrefix+'css-shadow" role="presentation"></div>'}else{if(Ext.isIE){return'<div class="'+Ext.baseCSSPrefix+'ie-shadow" role="presentation"></div>'}else{return'<div class="'+Ext.baseCSSPrefix+'frame-shadow" role="presentation"><div class="xst" role="presentation"><div class="xstl" role="presentation"></div><div class="xstc" role="presentation"></div><div class="xstr" role="presentation"></div></div><div class="xsc" role="presentation"><div class="xsml" role="presentation"></div><div class="xsmc" role="presentation"></div><div class="xsmr" role="presentation"></div></div><div class="xsb" role="presentation"><div class="xsbl" role="presentation"></div><div class="xsbc" role="presentation"></div><div class="xsbr" role="presentation"></div></div></div>'}}}(),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){Ext.Array.each(this.shadows,function(a){a.remove()});this.shadows=[]}});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(b){var c=this,d={h:0},e,a;Ext.apply(c,b);if(!Ext.isString(c.mode)){c.mode=c.defaultMode}e=c.offset;a=Math.floor(e/2);c.opacity=50;switch(c.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){d.w=d.h=-e;d.l=d.t=e}else{d.w=0;d.l=d.t=e;d.t-=1;if(Ext.isIE){d.l-=e+a;d.t-=e+a;d.w-=a;d.h-=a;d.t+=1}}break;case"sides":if(Ext.supports.CSS3BoxShadow){d.h-=e;d.t=e;d.l=d.w=0}else{d.w=(e*2);d.l=-e;d.t=e-1;if(Ext.isIE){d.l-=(e-a);d.t-=e+a;d.l+=1;d.w-=(e-a)*2;d.w-=a+1;d.h-=1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){d.l=d.w=d.t=0}else{d.w=d.h=(e*2);d.l=d.t=-e;d.t+=1;d.h-=2;if(Ext.isIE){d.l-=(e-a);d.t-=(e-a);d.l+=1;d.w-=(e+a+1);d.h-=(e+a);d.h+=1}break}}c.adjusts=d},offset:4,defaultMode:"drop",show:function(c){var b=this,a;c=Ext.get(c);if(!b.el){b.el=Ext.ShadowPool.pull();if(b.el.dom.nextSibling!=c.dom){b.el.insertBefore(c)}}a=(parseInt(c.getStyle("z-index"),10)-1)||0;b.el.setStyle("z-index",b.zIndex||a);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+b.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(b.offset)+")"}b.realign(c.getLeft(true),c.getTop(true),c.dom.offsetWidth,c.dom.offsetHeight);b.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,q,m,h){if(!this.el){return}var a=this.adjusts,j=this.el.dom,k=j.style,c,g,n,e,i,p;k.left=(b+a.l)+"px";k.top=(q+a.t)+"px";c=Math.max(m+a.w,0);g=Math.max(h+a.h,0);i=c+"px";p=g+"px";if(k.width!=i||k.height!=p){k.width=i;k.height=p;if(Ext.supports.CSS3BoxShadow){k.boxShadow="0 0 "+this.offset+"px 0 #888"}else{if(!Ext.isIE){n=j.childNodes;e=Math.max(0,(c-12))+"px";n[0].childNodes[1].style.width=e;n[1].childNodes[1].style.width=e;n[2].childNodes[1].style.width=e;n[1].style.height=Math.max(0,(g-12))+"px"}}}},hide:function(){var a=this;if(a.el){a.el.dom.style.display="none";Ext.ShadowPool.push(a.el);delete a.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}},setOpacity:function(a){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){a=Math.floor(a*100/2)/100}this.opacity=a;this.el.setOpacity(a)}}});Ext.define("Ext.button.Split",{alias:"widget.splitbutton",extend:"Ext.button.Button",alternateClassName:"Ext.SplitButton",arrowCls:"split",split:true,initComponent:function(){this.callParent();this.addEvents("arrowclick")},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},onClick:function(c,a){var b=this;c.preventDefault();if(!b.disabled){if(b.overMenuTrigger){b.maybeShowMenu();b.fireEvent("arrowclick",b,c);if(b.arrowHandler){b.arrowHandler.call(b.scope||b,b,c)}}else{b.doToggle();b.fireHandler()}}}});Ext.define("Ext.button.Cycle",{alias:"widget.cycle",extend:"Ext.button.Split",alternateClassName:"Ext.CycleButton",getButtonText:function(b){var a=this,c="";if(b&&a.showText===true){if(a.prependText){c+=a.prependText}c+=b.text;return c}return a.text},setActiveItem:function(c,a){var b=this;if(!Ext.isObject(c)){c=b.menu.getComponent(c)}if(c){if(!b.rendered){b.text=b.getButtonText(c);b.iconCls=c.iconCls}else{b.setText(b.getButtonText(c));b.setIconCls(c.iconCls)}b.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(b.forceIcon){b.setIconCls(b.forceIcon)}if(!a){b.fireEvent("change",b,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){var c=this,b=0,a;c.addEvents("change");if(c.changeHandler){c.on("change",c.changeHandler,c.scope||c);delete c.changeHandler}a=(c.menu.items||[]).concat(c.items||[]);c.menu=Ext.applyIf({cls:Ext.baseCSSPrefix+"cycle-menu",items:[]},c.menu);Ext.each(a,function(e,d){e=Ext.applyIf({group:c.id,itemIndex:d,checkHandler:c.checkHandler,scope:c,checked:e.checked||false},e);c.menu.items.push(e);if(e.checked){b=d}});c.itemCount=c.menu.items.length;c.callParent(arguments);c.on("click",c.toggleSelected,c);c.setActiveItem(b,c);if(c.width&&c.showText){c.addCls(Ext.baseCSSPrefix+"cycle-fixed-width")}},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var c=this,a=c.menu,b;b=c.activeItem.next(":not([disabled])")||a.items.getAt(0);b.setChecked(true)}});Ext.define("Ext.container.ButtonGroup",{extend:"Ext.panel.Panel",alias:"widget.buttongroup",alternateClassName:"Ext.ButtonGroup",baseCls:Ext.baseCSSPrefix+"btn-group",layout:{type:"table"},defaultType:"button",frame:true,frameHeader:false,internalDefaults:{removeMode:"container",hideParent:true},initComponent:function(){var a=this,b=a.columns;a.noTitleCls=a.baseCls+"-notitle";if(b){a.layout=Ext.apply({},{columns:b},a.layout)}if(!a.title){a.addCls(a.noTitleCls)}a.callParent(arguments)},afterLayout:function(){var b=this;b.callParent(arguments);if(b.layout.table&&(Ext.isIEQuirks||Ext.isIE6)&&!b.width){var a=b.getTargetEl();a.setWidth(b.layout.table.offsetWidth+a.getPadding("lr"))}if(Ext.isIE7){b.el.repaint()}},afterRender:function(){var a=this;if(a.header){delete a.header.items.items[0].flex;a.suspendLayout=true;a.header.insert(1,{xtype:"component",ui:a.ui,flex:1});a.header.insert(0,{xtype:"component",ui:a.ui,flex:1});a.suspendLayout=false}a.callParent(arguments)},onBeforeAdd:function(a){if(a.is("button")){a.ui=a.ui+"-toolbar"}this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b}});Ext.define("Ext.container.Viewport",{extend:"Ext.container.Container",alias:"widget.viewport",requires:["Ext.EventManager"],alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",initComponent:function(){var c=this,a=Ext.fly(document.body.parentNode),b;c.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"viewport");if(c.autoScroll){a.setStyle("overflow","auto")}c.el=b=Ext.getBody();b.setHeight=Ext.emptyFn;b.setWidth=Ext.emptyFn;b.setSize=Ext.emptyFn;b.dom.scroll="no";c.allowDomMove=false;Ext.EventManager.onWindowResize(c.fireResize,c);c.renderTo=c.el;c.width=Ext.Element.getViewportWidth();c.height=Ext.Element.getViewportHeight()},fireResize:function(a,b){this.setSize(a,b)}});Ext.define("Ext.dd.DDTarget",{extend:"Ext.dd.DragDrop",constructor:function(c,a,b){if(c){this.initTarget(c,a,b)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.DragTracker",{uses:["Ext.util.Region"],mixins:{observable:"Ext.util.Observable"},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","beforedragstart","dragstart","dragend","drag");this.dragRegion=Ext.create("Ext.util.Region",0,0,0,0);if(this.el){this.initEl(this.el)}this.mixins.observable.constructor.call(this);if(this.disabled){this.disable()}},initEl:function(a){this.el=Ext.get(a);this.handle=Ext.get(this.delegate);this.delegate=this.handle?undefined:this.delegate;if(!this.handle){this.handle=this.el}this.mon(this.handle,{mousedown:this.onMouseDown,delegate:this.delegate,scope:this});if(this.trackOver||this.overCls){this.mon(this.handle,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,delegate:this.delegate,scope:this})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(c,b){var a=this;if(!a.disabled){if(Ext.EventManager.contains(c)||a.delegate){a.mouseIsOut=false;if(a.overCls){a.el.addCls(a.overCls)}a.fireEvent("mouseover",a,c,a.delegate?c.getTarget(a.delegate,b):a.handle)}}},onMouseOut:function(a){if(this.mouseIsDown){this.mouseIsOut=true}else{if(this.overCls){this.el.removeCls(this.overCls)}this.fireEvent("mouseout",this,a)}},onMouseDown:function(b,a){if(this.disabled||b.dragTracked){return}this.dragTarget=this.delegate?a:this.handle.dom;this.startXY=this.lastXY=b.getXY();this.startRegion=Ext.fly(this.dragTarget).getRegion();if(this.fireEvent("mousedown",this,b)===false||this.fireEvent("beforedragstart",this,b)===false||this.onBeforeStart(b)===false){return}this.mouseIsDown=true;b.dragTracked=true;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=Ext.defer(this.triggerStart,this.autoStart===true?1000:this.autoStart,this,[b])}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.max(Math.abs(a[0]-b[0]),Math.abs(a[1]-b[1]))>this.tolerance){this.triggerStart(d)}else{return}}if(this.fireEvent("mousemove",this,d)===false){this.onMouseUp(d)}else{this.onDrag(d);this.fireEvent("drag",this,d)}},onMouseUp:function(a){this.mouseIsDown=false;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(a)}a.preventDefault();this.fireEvent("mouseup",this,a);this.endDrag(a)},endDrag:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);this.clearStart();this.active=false;if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}delete this._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,g){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return g}e.translateBy(g[0]-b[0],g[1]-b[1]);if(e.right>a.right){g[0]+=d=(a.right-e.right);e.left+=d}if(e.left<a.left){g[0]+=(a.left-e.left)}if(e.bottom>a.bottom){g[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top<a.top){g[1]+=(a.top-e.top)}return g}}});Ext.define("Ext.dd.DragZone",{extend:"Ext.dd.DragSource",constructor:function(b,a){this.callParent([b,a]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){var a=this;if(Ext.enableFx){Ext.fly(a.dragData.ddel).highlight(a.repairHighlightColor)}a.dragging=false},getRepairXY:function(a){return Ext.Element.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.ScrollManager",{singleton:true,requires:["Ext.dd.DragDropManager"],constructor:function(){var a=Ext.dd.DragDropManager;a.fireEvents=Ext.Function.createSequence(a.fireEvents,this.onFire,this);a.stopDrag=Ext.Function.createSequence(a.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=a;this.els={};this.dragEl=null;this.proc={}},onStop:function(a){var b=Ext.dd.ScrollManager;b.dragEl=null;b.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var a=this.proc,b=a.el,c=a.el.ddScrollConfig,d=c?c.increment:this.increment;if(!this.animate){if(b.scroll(a.dir,d)){this.triggerRefresh()}}else{b.scroll(a.dir,d,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var a=this.proc;if(a.id){clearInterval(a.id)}a.id=0;a.el=null;a.dir=""},startProc:function(b,a){this.clearProc();this.proc.el=b;this.proc.dir=a;var d=b.ddScrollConfig?b.ddScrollConfig.ddGroup:undefined,c=(b.ddScrollConfig&&b.ddScrollConfig.frequency)?b.ddScrollConfig.frequency:this.frequency;if(d===undefined||this.ddmInstance.dragCurrent.ddGroup==d){this.proc.id=setInterval(this.doScroll,c)}},onFire:function(h,k){if(k||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var l=h.getXY(),m=h.getPoint(),i=this.proc,g=this.els;for(var b in g){var d=g[b],a=d._region;var j=d.ddScrollConfig?d.ddScrollConfig:this;if(a&&a.contains(m)&&d.isScrollable()){if(a.bottom-m.y<=j.vthresh){if(i.el!=d){this.startProc(d,"down")}return}else{if(a.right-m.x<=j.hthresh){if(i.el!=d){this.startProc(d,"left")}return}else{if(m.y-a.top<=j.vthresh){if(i.el!=d){this.startProc(d,"up")}return}else{if(m.x-a.left<=j.hthresh){if(i.el!=d){this.startProc(d,"right")}return}}}}}}this.clearProc()},register:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.register(c[b])}}else{c=Ext.get(c);this.els[c.id]=c}},unregister:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.unregister(c[b])}}else{c=Ext.get(c);delete this.els[c.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var a=this.els,b;for(b in a){if(typeof a[b]=="object"){a[b]._region=a[b].getRegion()}}}});Ext.define("Ext.dd.DropTarget",{extend:"Ext.dd.DDTarget",requires:["Ext.dd.ScrollManager"],constructor:function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(a,c,b){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(b,a){if(typeof b=="string"){return b}var c=b.id;if(!c&&a!==false){c="extdd-"+(++this.autoIdSeed);b.id=c}return c},register:function(d,e){e=e||{};if(typeof d=="string"){d=document.getElementById(d)}e.ddel=d;this.elements[this.getId(d)]=e;if(e.isHandle!==false){this.handles[e.ddel.id]=e}if(e.handles){var c=e.handles;for(var b=0,a=c.length;b<a;b++){this.handles[this.getId(c[b])]=e}}},unregister:function(d){var g=this.getId(d,false);var e=this.elements[g];if(e){delete this.elements[g];if(e.handles){var c=e.handles;for(var b=0,a=c.length;b<a;b++){delete this.handles[this.getId(c[b],false)]}}}},getHandle:function(a){if(typeof a!="string"){a=a.id}return this.handles[a]},getHandleFromEvent:function(b){var a=b.getTarget();return a?this.handles[a.id]:null},getTarget:function(a){if(typeof a!="string"){a=a.id}return this.elements[a]},getTargetFromEvent:function(b){var a=b.getTarget();return a?this.elements[a.id]||this.handles[a.id]:null}});Ext.define("Ext.dd.DropZone",{extend:"Ext.dd.DropTarget",requires:["Ext.dd.Registry"],getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.flash.Component",{extend:"Ext.Component",alternateClassName:"Ext.FlashComponent",alias:"widget.flash",flashVersion:"9.0.115",backgroundColor:"#ffffff",wmode:"opaque",swfWidth:"100%",swfHeight:"100%",expressInstall:false,renderTpl:['<div id="{swfId}"></div>'],initComponent:function(){this.callParent();this.addEvents("success","failure")},onRender:function(){var c=this,e,d,b,a=c.getSwfId();c.renderData.swfId=a;c.callParent(arguments);e=Ext.apply({allowScriptAccess:"always",bgcolor:c.backgroundColor,wmode:c.wmode},c.flashParams);d=Ext.apply({allowedDomain:document.location.hostname},c.flashVars);new swfobject.embedSWF(c.url,a,c.swfWidth,c.swfHeight,c.flashVersion,c.expressInstall?c.statics.EXPRESS_INSTALL_URL:b,d,e,c.flashAttributes,Ext.bind(c.swfCallback,c))},swfCallback:function(b){var a=this;if(b.success){a.swf=Ext.get(b.ref);a.onSuccess();a.fireEvent("success",a)}else{a.onFailure();a.fireEvent("failure",a)}},getSwfId:function(){return this.swfId||(this.swfId="extswf"+this.getAutoId())},onSuccess:function(){this.swf.setStyle("visibility","inherit")},onFailure:Ext.emptyFn,beforeDestroy:function(){var b=this,a=b.swf;if(a){swfobject.removeSWF(b.getSwfId());Ext.destroy(a);delete b.swf}b.callParent()},statics:{EXPRESS_INSTALL_URL:"http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf"}});Ext.define("Ext.form.action.Action",{alternateClassName:"Ext.form.Action",submitEmptyText:true,constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||"POST").toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:"client",SERVER_INVALID:"server",CONNECT_FAILURE:"connect",LOAD_FAILURE:"load"}});Ext.define("Ext.form.action.Submit",{extend:"Ext.form.action.Action",alternateClassName:"Ext.form.Action.Submit",alias:"formaction.submit",type:"submit",run:function(){var a=this.form;if(this.clientValidation===false||a.isValid()){this.doSubmit()}else{this.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(this,false)}},doSubmit:function(){var b,a=Ext.apply(this.createCallback(),{url:this.getUrl(),method:this.getMethod(),headers:this.headers});if(this.form.hasUpload()){b=a.form=this.buildForm();a.isUpload=true}else{a.params=this.getParams()}Ext.Ajax.request(a);if(b){Ext.removeNode(b)}},getParams:function(){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c);return Ext.apply({},a,b)},buildForm:function(){var c=[],d,e,b=this.form,h=this.getParams(),a=[];b.getFields().each(function(i){if(i.isFileUpload()){a.push(i)}});function g(i,j){c.push({tag:"input",type:"hidden",name:i,value:Ext.String.htmlEncode(j)})}Ext.iterate(h,function(i,j){if(Ext.isArray(j)){Ext.each(j,function(k){g(i,k)})}else{g(i,j)}});d={tag:"form",action:this.getUrl(),method:this.getMethod(),target:this.target||"_self",style:"display:none",cn:c};if(a.length){d.encoding=d.enctype="multipart/form-data"}e=Ext.DomHelper.append(Ext.getBody(),d);Ext.Array.each(a,function(i){if(i.rendered){e.appendChild(i.extractFileInput())}});return e},onSuccess:function(b){var c=this.form,d=true,a=this.processResponse(b);if(a!==true&&!a.success){if(a.errors){c.markInvalid(a.errors)}this.failureType=Ext.form.action.Action.SERVER_INVALID;d=false}c.afterAction(this,d)},handleResponse:function(d){var h=this.form,e=h.errorReader,c,j,g,a,b;if(e){c=e.read(d);b=c.records;j=[];if(b){for(g=0,a=b.length;g<a;g++){j[g]=b[g].data}}if(j.length<1){j=null}return{success:c.success,errors:j}}return Ext.decode(d.responseText)}});Ext.define("Ext.util.ComponentDragger",{extend:"Ext.dd.DragTracker",autoStart:500,constructor:function(a,b){this.comp=a;this.initialConstrainTo=b.constrainTo;this.callParent([b])},onStart:function(c){var b=this,a=b.comp;this.startPosition=a.getPosition();if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}},calculateConstrainRegion:function(){var d=this,a=d.comp,h=d.initialConstrainTo,e,g,b=a.el.shadow?a.el.shadow.offset:0;if(!(h instanceof Ext.util.Region)){h=Ext.fly(h).getViewRegion()}if(b){h.adjust(0,-b,-b,b)}if(!d.constrainDelegate){e=Ext.fly(d.dragTarget).getRegion();g=d.proxy?d.proxy.el.getRegion():a.el.getRegion();h.adjust(e.top-g.top,e.right-g.right,e.bottom-g.bottom,e.left-g.left)}return h},onDrag:function(c){var b=this,a=(b.proxy&&!b.comp.liveDrag)?b.proxy:b.comp,d=b.getOffset(b.constrain||b.constrainDelegate?"dragTarget":null);a.setPosition(b.startPosition[0]+d[0],b.startPosition[1]+d[1])},onEnd:function(a){if(this.proxy&&!this.comp.liveDrag){this.comp.unghost()}}});Ext.define("Ext.form.Labelable",{requires:["Ext.XTemplate"],labelableRenderTpl:['<tpl if="!hideLabel && !(!fieldLabel && hideEmptyLabel)">','<label id="{id}-labelEl"<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>','<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"</label>","</tpl>",'<div class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" role="presentation">{subTplMarkup}</div>','<div id="{id}-errorEl" class="{errorMsgCls}" style="display:none"></div>','<div class="{clearCls}" role="presentation"><!-- --></div>',{compiled:true,disableFormats:true}],activeErrorsTpl:['<tpl if="errors && errors.length">','<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",initLabelable:function(){this.addCls(this.formItemCls);this.addEvents("errorchange")},getFieldLabel:function(){return this.fieldLabel||""},getLabelableRenderData:function(){var e=this,b=e.labelAlign,g=e.labelCls,d=e.labelClsExtra,c=e.labelPad,a;if(b==="top"){a="margin-bottom:"+c+"px;"}else{a="margin-right:"+c+"px;";if(Ext.isBorderBox){a+="width:"+e.labelWidth+"px;"}}return Ext.copyTo({inputId:e.getInputId(),fieldLabel:e.getFieldLabel(),labelCls:d?g+" "+d:g,labelStyle:a+(e.labelStyle||""),subTplMarkup:e.getSubTplMarkup()},e,"hideLabel,hideEmptyLabel,fieldBodyCls,baseBodyCls,errorMsgCls,clearCls,labelSeparator",true)},onLabelableRender:function(){this.addChildEls("labelEl","bodyEl","errorEl")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.activeError=a;this.activeErrors=[a];this.renderActiveError()},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);c.errorEl.dom.innerHTML=b}},setFieldDefaults:function(b){var a=this;Ext.iterate(b,function(c,d){if(!a.hasOwnProperty(c)){a[c]=d}})},getBodyNaturalWidth:function(){return this.bodyEl.getWidth()}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.layout.component.field.Field",{alias:["layout.field"],extend:"Ext.layout.component.Component",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics"],type:"field",beforeLayout:function(b,a){var c=this;return c.callParent(arguments)||(!c.owner.preventMark&&c.activeError!==c.owner.getActiveError())},onLayout:function(a,m){var g=this,b=g.owner,e=g.getLabelStrategy(),l=g.getErrorStrategy(),j=Ext.isDefined,n=Ext.isNumber,i,h,k,c,d;i=g.lastComponentSize||{};if(!j(a)){a=i.width;if(a<0){a=d}}if(!j(m)){m=i.height;if(m<0){m=d}}h=!n(a);k=!n(m);c={autoWidth:h,autoHeight:k,width:h?b.getBodyNaturalWidth():a,height:m,setOuterWidth:false,insets:{top:0,right:0,bottom:0,left:0}};e.prepare(b,c);l.prepare(b,c);e.adjustHorizInsets(b,c);l.adjustHorizInsets(b,c);e.layoutHoriz(b,c);l.layoutHoriz(b,c);e.adjustVertInsets(b,c);l.adjustVertInsets(b,c);e.layoutVert(b,c);l.layoutVert(b,c);if(h&&k){g.setElementSize(b.el,(c.setOuterWidth?c.width:d),c.height)}else{g.setTargetSize((!h||c.setOuterWidth?c.width:d),c.height)}g.sizeBody(c);g.activeError=b.getActiveError()},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},sizeBody:function(i){var h=this,c=h.owner,d=i.insets,b=i.width,e=i.height,g=Ext.isNumber(b)?b-d.left-d.right:b,a=Ext.isNumber(e)?e-d.top-d.bottom:e;h.setElementSize(c.bodyEl,g,a);h.sizeBodyContents(g,a)},sizeBodyContents:Ext.emptyFn,getLabelStrategy:function(){var b=this,c=b.labelStrategies,a=b.owner.labelAlign;return c[a]||c.base},getErrorStrategy:function(){var c=this,a=c.owner,d=c.errorStrategies,b=a.msgTarget;return !a.preventMark&&Ext.isString(b)?(d[b]||d.elementId):d.none},labelStrategies:(function(){var b=Ext.applyIf,a=Ext.emptyFn,c={prepare:function(e,i){var g=e.labelCls+"-"+e.labelAlign,h=e.labelEl;if(h&&!h.hasCls(g)){h.addCls(g)}},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a},d=b({prepare:function(e,g){c.prepare(e,g);if(g.autoWidth){g.width+=(!e.labelEl?0:e.labelWidth+e.labelPad)}g.setOuterWidth=true},adjustHorizInsets:function(e,g){if(e.labelEl){g.insets.left+=e.labelWidth+e.labelPad}},layoutHoriz:function(e,h){var g=e.labelEl;if(g&&!e.isLabelSized&&!Ext.isBorderBox){g.setWidth(e.labelWidth);e.isLabelSized=true}}},c);return{base:c,top:b({adjustVertInsets:function(e,h){var g=e.labelEl;if(g){h.insets.top+=Ext.util.TextMetrics.measure(g,e.fieldLabel,h.width).height+g.getFrameWidth("tb")+e.labelPad}}},c),left:d,right:d}})(),errorStrategies:(function(){function d(i,h){var j=i.getStyle("display")!=="none";if(h!==j){i.setDisplayed(h)}}function g(i,h,j){if(i.getStyle(h)!==j){i.setStyle(h,j)}}function c(h){var i=Ext.layout.component.field.Field.tip,j;if(i&&i.isVisible()){j=i.activeTarget;if(j&&j.el===h.getActionEl().dom){i.toFront(true)}}}var b=Ext.applyIf,a=Ext.emptyFn,e={prepare:function(h){d(h.errorEl,false)},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a,onFocus:a};return{none:e,side:b({prepare:function(h){var i=h.errorEl;i.addCls(Ext.baseCSSPrefix+"form-invalid-icon");Ext.layout.component.field.Field.initTip();i.dom.setAttribute("data-errorqtip",h.getActiveError()||"");d(i,h.hasActiveError())},adjustHorizInsets:function(h,i){if(h.autoFitErrors&&h.hasActiveError()){i.insets.right+=h.errorEl.getWidth()}},layoutHoriz:function(h,i){if(h.hasActiveError()){g(h.errorEl,"left",i.width-i.insets.right+"px")}},layoutVert:function(h,i){if(h.hasActiveError()){g(h.errorEl,"top",i.insets.top+"px")}},onFocus:c},e),under:b({prepare:function(h){var j=h.errorEl,i=Ext.baseCSSPrefix+"form-invalid-under";if(!j.hasCls(i)){j.addCls(i)}d(j,h.hasActiveError())},adjustVertInsets:function(h,i){if(h.autoFitErrors){i.insets.bottom+=h.errorEl.getHeight()}},layoutHoriz:function(h,j){var k=h.errorEl,i=j.insets;g(k,"width",j.width-i.right-i.left+"px");g(k,"marginLeft",i.left+"px")}},e),qtip:b({prepare:function(h){d(h.errorEl,false);Ext.layout.component.field.Field.initTip();h.getActionEl().dom.setAttribute("data-errorqtip",h.getActiveError()||"")},onFocus:c},e),title:b({prepare:function(h){d(h.errorEl,false);h.el.dom.title=h.getActiveError()||""}},e),elementId:b({prepare:function(h){d(h.errorEl,false);var i=Ext.fly(h.msgTarget);if(i){i.dom.innerHTML=h.getActiveError()||"";i.setDisplayed(h.hasActiveError())}}},e)}})(),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip",renderTo:Ext.getBody()});a.tagConfig=Ext.apply({},{attribute:"errorqtip"},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define("Ext.form.field.VTypes",(function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}})());Ext.define("Ext.layout.component.field.Text",{extend:"Ext.layout.component.field.Field",alias:"layout.textfield",requires:["Ext.util.TextMetrics"],type:"textfield",beforeLayout:function(d,b){var e=this,a=e.owner,c=this.lastValue,g=a.getRawValue();this.lastValue=g;return e.callParent(arguments)||(a.grow&&g!==c)},sizeBodyContents:function(c,a){var b=this.adjustForGrow(c,a);this.setElementSize(this.owner.inputEl,b[0],b[1])},adjustForGrow:function(e,c){var g=this,b=g.owner,i,h,d,a=[e,c];if(b.grow){i=b.inputEl;h=(i.dom.value||(b.hasFocus?"":b.emptyText)||"")+b.growAppend;d=i.getTextWidth(h)+i.getBorderWidth("lr")+i.getPadding("lr");a[0]=Ext.Number.constrain(d,b.growMin,Math.max(b.growMin,Math.min(b.growMax,Ext.isNumber(e)?e:Infinity)))}return a}});Ext.define("Ext.layout.component.field.TextArea",{extend:"Ext.layout.component.field.Text",alias:"layout.textareafield",type:"textareafield",adjustForGrow:function(a,k){var e=this,b=e.owner,i,h,g,d,c,j,l=[a,k];if(b.grow){i=b.inputEl;d=i.getWidth(true);c=i.getHeight();h=i.dom.value||"&#160;";h+=b.growAppend;h=h.replace(/\n/g,"<br>");j=Ext.util.TextMetrics.measure(i,h,d).height+i.getBorderWidth("tb")+i.getPadding("tb");g=b.growMax;if(Ext.isNumber(k)){g=Math.min(g,k)}l[1]=Ext.Number.constrain(j,b.growMin,g)}return l}});Ext.define("Ext.layout.container.Anchor",{alias:"layout.anchor",extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.AnchorLayout",type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,onLayout:function(){this.callParent(arguments);var t=this,m=t.getLayoutTargetSize(),a=t.owner,v=t.getTarget(),u=m.width,k=m.height,n=v.getStyle("overflow"),l=t.getVisibleItems(a),r=l.length,e=[],h,p,j,g,c,d,q,b,s;if(u<20&&k<20){return}if(!t.clearEl){t.clearEl=v.createChild({cls:Ext.baseCSSPrefix+"clear",role:"presentation"})}if(!Ext.supports.RightMargin){s=Ext.Element.getRightMarginFixCleaner(v);v.addCls(Ext.baseCSSPrefix+"inline-children")}for(q=0;q<r;q++){j=l[q];b=j.el;g=j.anchorSpec;if(g){if(g.right){c=t.adjustWidthAnchor(g.right(u)-b.getMargin("lr"),j)}else{c=undefined}if(g.bottom){d=t.adjustHeightAnchor(g.bottom(k)-b.getMargin("tb"),j)}else{d=undefined}e.push({component:j,anchor:true,width:c||undefined,height:d||undefined})}else{e.push({component:j,anchor:false})}}if(!Ext.supports.RightMargin){v.removeCls(Ext.baseCSSPrefix+"inline-children");s()}for(q=0;q<r;q++){h=e[q];t.setItemSize(h.component,h.width,h.height)}if(n&&n!="hidden"&&!t.adjustmentPass){p=t.getLayoutTargetSize();if(p.width!=m.width||p.height!=m.height){t.adjustmentPass=true;t.onLayout()}}delete t.adjustmentPass},parseAnchor:function(c,g,b){if(c&&c!="none"){var d;if(this.parseAnchorRE.test(c)){var e=b-g;return function(a){return a-e}}else{if(c.indexOf("%")!=-1){d=parseFloat(c.replace("%",""))*0.01;return function(a){return Math.floor(a*d)}}else{c=parseInt(c,10);if(!isNaN(c)){return function(a){return a+c}}}}}return null},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b},configureItem:function(g){var e=this,a=e.owner,d=g.anchor,b,i,c,h;if(!g.anchor&&g.items&&!Ext.isNumber(g.width)&&!(Ext.isIE6&&Ext.isStrict)){g.anchor=d=e.defaultAnchor}if(a.anchorSize){if(typeof a.anchorSize=="number"){c=a.anchorSize}else{c=a.anchorSize.width;h=a.anchorSize.height}}else{c=a.initialConfig.width;h=a.initialConfig.height}if(d){b=d.split(" ");g.anchorSpec=i={right:e.parseAnchor(b[0],g.initialConfig.width,c),bottom:e.parseAnchor(b[1],g.initialConfig.height,h)};if(i.right){g.layoutManagedWidth=1}else{g.layoutManagedWidth=2}if(i.bottom){g.layoutManagedHeight=1}else{g.layoutManagedHeight=2}}else{g.layoutManagedWidth=2;g.layoutManagedHeight=2}this.callParent(arguments)}});Ext.define("Ext.form.action.Load",{extend:"Ext.form.action.Action",requires:["Ext.data.Connection"],alternateClassName:"Ext.form.Action.Load",alias:"formaction.load",type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&&b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define("Ext.window.Window",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Window",requires:["Ext.util.ComponentDragger","Ext.util.Region","Ext.EventManager"],alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"visibility",floating:true,ariaRole:"alertdialog",itemCls:"x-window-item",overlapHeader:true,ignoreHeaderBorderManagement:true,initComponent:function(){var a=this;a.callParent();a.addEvents("resize","maximize","minimize","restore");if(a.plain){a.addClsWithUI("plain")}if(a.modal){a.ariaRole="dialog"}},initStateEvents:function(){var a=this.stateEvents;Ext.each(["maximize","restore","resize","dragend"],function(b){if(Ext.Array.indexOf(a,b)){a.push(b)}});this.callParent()},getState:function(){var b=this,c=b.callParent()||{},a=!!b.maximized;c.maximized=a;Ext.apply(c,{size:a?b.restoreSize:b.getSize(),pos:a?b.restorePos:b.getPosition()});return c},applyState:function(b){var a=this;if(b){a.maximized=b.maximized;if(a.maximized){a.hasSavedRestore=true;a.restoreSize=b.size;a.restorePos=b.pos}else{Ext.apply(a,{width:b.size.width,height:b.size.height,x:b.pos[0],y:b.pos[1]})}}},onMouseDown:function(b){var a;if(this.floating){if(Ext.fly(b.getTarget()).focusable()){a=true}this.toFront(a)}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({dblclick:{fn:c.toggleMaximize,element:"el",scope:c}})}},afterRender:function(){var a=this,b=a.hidden,c;a.hidden=false;a.callParent();a.hidden=b;a.proxy=a.getProxy();a.mon(a.el,"mousedown",a.onMouseDown,a);a.el.set({tabIndex:-1});if(a.maximized){a.maximized=false;a.maximize()}if(a.closable){c=a.getKeyMap();c.on(27,a.onEsc,a);c.disable()}if(!b){a.syncMonitorWindowResize();a.doConstrain()}},initDraggable:function(){var b=this,a;if(!b.header){b.updateHeader(true)}if(b.header){a=Ext.applyIf({el:b.el,delegate:"#"+b.header.id},b.draggable);if(b.constrain||b.constrainHeader){a.constrain=b.constrain;a.constrainDelegate=b.constrainHeader;a.constrainTo=b.constrainTo||b.container}b.dd=Ext.create("Ext.util.ComponentDragger",this,a);b.relayEvents(b.dd,["dragstart","drag","dragend"])}},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:"minimize",handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:"maximize",handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:"restore",handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getFocusEl:function(){var d=this,g=d.focusEl,e=d.defaultButton||d.defaultFocus,b=typeof db,c,a;if(Ext.isDefined(e)){if(Ext.isNumber(e)){g=d.query("button")[e]}else{if(Ext.isString(e)){g=d.down("#"+e)}else{g=e}}}return g||d.focusEl},beforeShow:function(){this.callParent();if(this.expandOnShow){this.expand(false)}},afterShow:function(c){var b=this,a=c||b.animateTarget;b.callParent(arguments);if(b.maximized){b.fitContainer()}b.syncMonitorWindowResize();if(!a){b.doConstrain()}if(b.keyMap){b.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent("close",a);if(a.closeAction=="destroy"){this.destroy()}}else{a.hide(a.animateTarget,a.doClose,a)}},afterHide:function(){var a=this;a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var a=this;if(a.maximizable){a.tools.maximize.hide();a.tools.restore.hide()}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this;if(a.maximized){a.tools.restore.show()}else{if(a.maximizable){a.tools.maximize.show()}}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(){var a=this;if(!a.maximized){a.expand(false);if(!a.hasSavedRestore){a.restoreSize=a.getSize();a.restorePos=a.getPosition(true)}if(a.maximizable){a.tools.maximize.hide();a.tools.restore.show()}a.maximized=true;a.el.disableShadow();if(a.dd){a.dd.disable()}if(a.collapseTool){a.collapseTool.hide()}a.el.addCls(Ext.baseCSSPrefix+"window-maximized");a.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.setPosition(0,0);a.fitContainer();a.fireEvent("maximize",a)}return a},restore:function(){var a=this,b=a.tools;if(a.maximized){delete a.hasSavedRestore;a.removeCls(Ext.baseCSSPrefix+"window-maximized");if(b.restore){b.restore.hide()}if(b.maximize){b.maximize.show()}if(a.collapseTool){a.collapseTool.show()}a.setPosition(a.restorePos);a.setSize(a.restoreSize);delete a.restorePos;delete a.restoreSize;a.maximized=false;a.el.enableShadow(true);if(a.dd){a.dd.enable()}a.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.doConstrain();a.fireEvent("restore",a)}return a},syncMonitorWindowResize:function(){var b=this,c=b._monitoringResize,d=b.monitorResize||b.constrain||b.constrainHeader||b.maximized,a=b.hidden||b.destroying||b.isDestroyed;if(d&&!a){if(!c){Ext.EventManager.onWindowResize(b.onWindowResize,b);b._monitoringResize=true}}else{if(c){Ext.EventManager.removeResizeListener(b.onWindowResize,b);b._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:['<input id="{id}" type="{type}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" />',{compiled:true,disableFormats:true}],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:Ext.baseCSSPrefix+"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("focus","blur","specialkey");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},getInputId:function(){return this.inputId||(this.inputId=Ext.id())},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId();return Ext.applyIf(c.subTplData,{id:a,cmpId:c.id,name:c.name||a,type:b,size:c.size||20,cls:c.cls,fieldCls:c.fieldCls,tabIdx:c.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(b==="password"?"text":b)})},afterRender:function(){this.callParent();if(this.inputEl){this.inputEl.selectable()}},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},onRender:function(){var b=this,a=b.fieldStyle;b.onLabelableRender();b.addChildEls({name:"inputEl",id:b.getInputId()});b.callParent(arguments);b.setRawValue(b.rawValue);if(b.readOnly){b.setReadOnly(true)}if(b.disabled){b.disable()}if(a){b.setFieldStyle(a)}b.renderActiveError()},initAria:function(){var a=this;a.callParent();a.getActionEl().dom.setAttribute("aria-describedby",Ext.id(a.errorEl))},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(b,"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.readOnly=c;b.dom.setAttribute("aria-readonly",c)}a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,Ext.create("Ext.EventObjectImpl",a))}},initEvents:function(){var b=this,c=b.inputEl,a,d;if(c){b.mon(c,Ext.EventManager.getKeyEvent(),b.fireKey,b);b.mon(c,"focus",b.onFocus,b);b.mon(c,"blur",b.onBlur,b,b.inEditor?{buffer:10}:null);a=Ext.create("Ext.util.DelayedTask",b.checkChange,b);b.onChangeEvent=d=function(){a.delay(b.checkChangeBuffer)};Ext.each(b.checkChangeEvents,function(e){if(e==="propertychange"){b.usesPropertychange=true}b.mon(c,e,d)},b)}b.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b="propertychange",e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},preFocus:Ext.emptyFn,onFocus:function(){var b=this,a=b.focusCls,c=b.inputEl;b.preFocus();if(a&&c){c.addCls(a)}if(!b.hasFocus){b.hasFocus=true;b.componentLayout.onFocus();b.fireEvent("focus",b)}},beforeBlur:Ext.emptyFn,onBlur:function(){var b=this,a=b.focusCls,c=b.inputEl;if(b.destroying){return}b.beforeBlur();if(a&&c){c.removeCls(a)}if(b.validateOnBlur){b.validate()}b.hasFocus=false;b.fireEvent("blur",b);b.postBlur()},postBlur:Ext.emptyFn,onDirtyChange:function(a){this[a?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var a=this;return a.disabled||a.validateValue(a.processRawValue(a.getRawValue()))},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(c){var b=this,a=b.getActiveError();b.setActiveErrors(Ext.Array.from(c));if(a!==b.getActiveError()){b.doComponentLayout()}},clearInvalid:function(){var b=this,a=b.hasActiveError();b.unsetActiveError();if(a){b.doComponentLayout()}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?"addCls":"removeCls"](b.invalidCls+"-field")}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.form.field.Text",{extend:"Ext.form.field.Base",alias:"widget.textfield",requires:["Ext.form.field.VTypes","Ext.layout.component.field.Text"],alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",ariaRole:"textbox",componentLayout:"textfield",initComponent:function(){this.callParent();this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){var b=this,a=b.inputEl;b.callParent();if(b.selectOnFocus||b.emptyText){b.mon(a,"mousedown",b.onMouseDown,b)}if(b.maskRe||(b.vtype&&b.disableKeyFilter!==true&&(b.maskRe=Ext.form.field.VTypes[b.vtype+"Mask"]))){b.mon(a,"keypress",b.filterKeys,b)}if(b.enableKeyEvents){b.mon(a,{scope:b,keyup:b.onKeyUp,keydown:b.onKeyDown,keypress:b.onKeyPress})}},isEqual:function(b,a){return this.isEqualAsString(b,a)},onChange:function(){this.callParent();this.autoSize()},afterRender:function(){var a=this;if(a.enforceMaxLength){a.inputEl.dom.maxLength=a.maxLength}a.applyEmptyText();a.autoSize();a.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,"mouseup",Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,"");if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&&a){c=b.getRawValue().length<1&&!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a)}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},preFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;if(a&&!Ext.supports.Placeholder&&c.dom.value===a){b.setRawValue("");d=true;c.removeCls(b.emptyCls)}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){c.dom.select()}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey&&!c.altKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if(Ext.isGecko&&(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&&c.button===-1))){return}if(!Ext.isGecko&&c.isSpecialKey()&&!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText){a=""}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&&a.emptyText&&!Ext.isEmpty(b)){c.removeCls(a.emptyCls)}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(l){var g=this,k=g.callParent(arguments),a=g.validator,d=g.emptyText,c=g.allowBlank,e=g.vtype,h=Ext.form.field.VTypes,i=g.regex,j=Ext.String.format,b;l=l||g.processRawValue(g.getRawValue());if(Ext.isFunction(a)){b=a.call(g,l);if(b!==true){k.push(b)}}if(l.length<1||l===d){if(!c){k.push(g.blankText)}return k}if(l.length<g.minLength){k.push(j(g.minLengthText,g.minLength))}if(l.length>g.maxLength){k.push(j(g.maxLengthText,g.maxLength))}if(e){if(!h[e](l,g)){k.push(g.vtypeText||h[e+"Text"])}}if(i&&!i.test(l)){k.push(g.regexText||g.invalidText)}return k},selectText:function(i,a){var h=this,c=h.getRawValue(),d=true,g=h.inputEl.dom,e,b;if(c.length>0){i=i===e?0:i;a=a===e?c.length:a;if(g.setSelectionRange){g.setSelectionRange(i,a)}else{if(g.createTextRange){b=g.createTextRange();b.moveStart("character",i);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){h.focus()}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.doComponentLayout();a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent("autosize",a);b.lastInputWidth=a}}},initAria:function(){this.callParent();this.getActionEl().dom.setAttribute("aria-required",this.allowBlank===false)},getBodyNaturalWidth:function(){return Math.round(this.size*6.5)+20}});Ext.define("Ext.form.field.TextArea",{extend:"Ext.form.field.Text",alias:["widget.textareafield","widget.textarea"],alternateClassName:"Ext.form.TextArea",requires:["Ext.XTemplate","Ext.layout.component.field.TextArea"],fieldSubTpl:['<textarea id="{id}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="rows">rows="{rows}" </tpl>','<tpl if="cols">cols="{cols}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" ','autocomplete="off">',"</textarea>",{compiled:true,disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",onRender:function(b,a){var c=this;Ext.applyIf(c.subTplData,{cols:c.cols,rows:c.rows});c.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);if(a.grow){if(a.preventScrollbars){a.inputEl.setStyle("overflow","hidden")}a.inputEl.setHeight(a.growMin)}},fireKey:function(a){if(a.isSpecialKey()&&(this.enterIsSpecial||(a.getKey()!==a.ENTER||a.hasModifier()))){this.fireEvent("specialkey",this,a)}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.doComponentLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},getBodyNaturalWidth:function(){return Math.round(this.cols*6.5)+20}});Ext.define("Ext.window.MessageBox",{extend:"Ext.window.Window",requires:["Ext.toolbar.Toolbar","Ext.form.field.Text","Ext.form.field.TextArea","Ext.button.Button","Ext.layout.container.Anchor","Ext.layout.container.HBox","Ext.ProgressBar"],alias:"widget.messagebox",OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",hideMode:"offsets",closeAction:"hide",resizable:false,title:"&#160;",width:600,height:500,minWidth:250,maxWidth:600,minHeight:110,maxHeight:500,constrain:true,cls:Ext.baseCSSPrefix+"message-box",layout:{type:"anchor"},defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"},buttonIds:["ok","yes","no","cancel"],titleText:{confirm:"Confirm",prompt:"Prompt",wait:"Loading...",alert:"Attention"},iconHeight:35,makeButton:function(a){var b=this.buttonIds[a];return Ext.create("Ext.button.Button",{handler:this.btnCallback,itemId:b,scope:this,text:this.buttonText[b],minWidth:75})},btnCallback:function(a){var b=this,c,d;if(b.cfg.prompt||b.cfg.multiline){if(b.cfg.multiline){d=b.textArea}else{d=b.textField}c=d.getValue();d.reset()}a.blur();b.hide();b.userCallback(a.itemId,c,b.cfg)},hide:function(){var a=this;a.dd.endDrag();a.progressBar.reset();a.removeCls(a.cfg.cls);a.callParent()},initComponent:function(){var c=this,b,a;c.title="&#160;";c.topContainer=Ext.create("Ext.container.Container",{anchor:"100%",style:{padding:"10px",overflow:"hidden"},items:[c.iconComponent=Ext.create("Ext.Component",{cls:"ext-mb-icon",width:50,height:c.iconHeight,style:{"float":"left"}}),c.promptContainer=Ext.create("Ext.container.Container",{layout:{type:"anchor"},items:[c.msg=Ext.create("Ext.Component",{autoEl:{tag:"span"},cls:"ext-mb-text"}),c.textField=Ext.create("Ext.form.field.Text",{anchor:"100%",enableKeyEvents:true,listeners:{keydown:c.onPromptKey,scope:c}}),c.textArea=Ext.create("Ext.form.field.TextArea",{anchor:"100%",height:75})]})]});c.progressBar=Ext.create("Ext.ProgressBar",{anchor:"-10",style:"margin-left:10px"});c.items=[c.topContainer,c.progressBar];c.msgButtons=[];for(b=0;b<4;b++){a=c.makeButton(b);c.msgButtons[a.itemId]=a;c.msgButtons.push(a)}c.bottomTb=Ext.create("Ext.toolbar.Toolbar",{ui:"footer",dock:"bottom",layout:{pack:"center"},items:[c.msgButtons[0],c.msgButtons[1],c.msgButtons[2],c.msgButtons[3]]});c.dockedItems=[c.bottomTb];c.callParent()},onPromptKey:function(a,c){var b=this,d;if(c.keyCode===Ext.EventObject.RETURN||c.keyCode===10){if(b.msgButtons.ok.isVisible()){d=true;b.msgButtons.ok.handler.call(b,b.msgButtons.ok)}else{if(b.msgButtons.yes.isVisible()){b.msgButtons.yes.handler.call(b,b.msgButtons.yes);d=true}}if(d){b.textField.blur()}}},reconfigure:function(a){var d=this,c=a.buttons||0,g=true,e=d.maxWidth,b;a=a||{};d.cfg=a;if(a.width){e=a.width}delete d.defaultFocus;d.animateTarget=a.animateTarget||undefined;d.modal=a.modal!==false;if(a.title){d.setTitle(a.title||"&#160;")}if(!d.rendered){d.width=e;d.render(Ext.getBody())}else{d.setSize(e,d.maxHeight)}d.setPosition(-10000,-10000);d.closable=a.closable&&!a.wait;d.header.child("[type=close]").setVisible(a.closable!==false);if(!a.title&&!d.closable){d.header.hide()}else{d.header.show()}d.liveDrag=!a.proxyDrag;d.userCallback=Ext.Function.bind(a.callback||a.fn||Ext.emptyFn,a.scope||Ext.global);d.setIcon(a.icon);if(a.msg){d.msg.update(a.msg);d.msg.show()}else{d.msg.hide()}if(a.prompt||a.multiline){d.multiline=a.multiline;if(a.multiline){d.textArea.setValue(a.value);d.textArea.setHeight(a.defaultTextHeight||d.defaultTextHeight);d.textArea.show();d.textField.hide();d.defaultFocus=d.textArea}else{d.textField.setValue(a.value);d.textArea.hide();d.textField.show();d.defaultFocus=d.textField}}else{d.textArea.hide();d.textField.hide()}if(a.progress||a.wait){d.progressBar.show();d.updateProgress(0,a.progressText);if(a.wait===true){d.progressBar.wait(a.waitConfig)}}else{d.progressBar.hide()}for(b=0;b<4;b++){if(c&Math.pow(2,b)){if(!d.defaultFocus){d.defaultFocus=d.msgButtons[b]}d.msgButtons[b].show();g=false}else{d.msgButtons[b].hide()}}if(g){d.bottomTb.hide()}else{d.bottomTb.show()}},show:function(a){var b=this;b.reconfigure(a);b.addCls(a.cls);if(a.animateTarget){b.doAutoSize(true);b.callParent()}else{b.callParent();b.doAutoSize(true)}return b},afterShow:function(){if(this.animateTarget){this.center()}this.callParent(arguments)},doAutoSize:function(b){var e=this,d=e.iconComponent,g=e.iconHeight;if(!Ext.isDefined(e.frameWidth)){e.frameWidth=e.el.getWidth()-e.body.getWidth()}d.setHeight(g);e.minWidth=e.cfg.minWidth||Ext.getClass(this).prototype.minWidth;e.topContainer.doLayout();if(Ext.isIE6||Ext.isIEQuirks){e.textField.setCalculatedSize(9);e.textArea.setCalculatedSize(9)}var c=e.cfg.width||e.msg.getWidth()+d.getWidth()+25,a=(e.header.rendered?e.header.getHeight():0)+Math.max(e.promptContainer.getHeight(),d.getHeight())+e.progressBar.getHeight()+(e.bottomTb.rendered?e.bottomTb.getHeight():0)+20;d.setHeight(Math.max(g,e.msg.getHeight()));e.setSize(c+e.frameWidth,a+e.frameWidth);if(b){e.center()}return e},updateText:function(a){this.msg.update(a);return this.doAutoSize(true)},setIcon:function(a){var b=this;b.iconComponent.removeCls(b.iconCls);if(a){b.iconComponent.show();b.iconComponent.addCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.addCls(b.iconCls=a)}else{b.iconComponent.removeCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.hide()}return b},updateProgress:function(b,a,c){this.progressBar.updateProgress(b,a);if(c){this.updateText(c)}return this},onEsc:function(){if(this.closable!==false){this.callParent(arguments)}},confirm:function(a,d,c,b){if(Ext.isString(a)){a={title:a,icon:"ext-mb-question",msg:d,buttons:this.YESNO,callback:c,scope:b}}return this.show(a)},prompt:function(b,g,d,c,a,e){if(Ext.isString(b)){b={prompt:true,title:b,minWidth:this.minPromptWidth,msg:g,buttons:this.OKCANCEL,callback:d,scope:c,multiline:a,value:e}}return this.show(b)},wait:function(a,c,b){if(Ext.isString(a)){a={title:c,msg:a,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:b}}return this.show(a)},alert:function(a,d,c,b){if(Ext.isString(a)){a={title:a,msg:d,buttons:this.OK,fn:c,scope:b,minWidth:this.minWidth}}return this.show(a)},progress:function(a,c,b){if(Ext.isString(a)){a={title:a,msg:c,progress:true,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define("Ext.form.Basic",{extend:"Ext.util.Observable",alternateClassName:"Ext.form.BasicForm",requires:["Ext.util.MixedCollection","Ext.form.action.Load","Ext.form.action.Submit","Ext.window.MessageBox","Ext.data.Errors","Ext.util.DelayedTask"],constructor:function(a,b){var c=this,d=c.onItemAddOrRemove;c.owner=a;c.mon(a,{add:d,remove:d,scope:c});Ext.apply(c,b);if(Ext.isString(c.paramOrder)){c.paramOrder=c.paramOrder.split(/[\s,|]/)}c.checkValidityTask=Ext.create("Ext.util.DelayedTask",c.checkValidity,c);c.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");c.callParent()},initialize:function(){this.initialized=true;this.onValidityChange(!this.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners();this.checkValidityTask.cancel()},onItemAddOrRemove:function(c,g){var d=this,e=!!g.ownerCt,b=g.isContainer;function a(h){d[e?"mon":"mun"](h,{validitychange:d.checkValidity,dirtychange:d.checkDirty,scope:d,buffer:100});delete d._fields}if(g.isFormField){a(g)}else{if(b){if(g.isDestroyed){delete d._fields}else{Ext.Array.forEach(g.query("[isFormField]"),a)}}}delete this._boundItems;if(d.initialized){d.checkValidityTask.delay(10)}},getFields:function(){var a=this._fields;if(!a){a=this._fields=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[isFormField]"))}return a},getBoundItems:function(){var a=this._boundItems;if(!a||a.getCount()===0){a=this._boundItems=Ext.create("Ext.util.MixedCollection");a.addAll(this.owner.query("[formBind]"))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;a.batchLayouts(function(){b=a.getFields().filterBy(function(c){return !c.validate()})});return b.length<1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent("validitychange",b,a);b.wasValid=a}},onValidityChange:function(b){var a=this.getBoundItems();if(a){a.each(function(c){if(c.disabled===b){c.setDisabled(!b)}})}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent("dirtychange",this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias("formaction."+b,Ext.apply({},a,{form:this}))}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){return this.doAction(this.standardSubmit?"standardsubmit":this.api?"directsubmit":"submit",a)},load:function(a){return this.doAction(this.api?"directload":"load",a)},updateRecord:function(b){var a=b.fields,c=this.getFieldValues(),d,e={};a.each(function(g){d=g.name;if(d in c){e[d]=c[d]}});b.beginEdit();b.set(e);b.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.data)},getRecord:function(){return this._record},beforeAction:function(c){var a=c.waitMsg,b=Ext.baseCSSPrefix+"mask-loading",d;this.getFields().each(function(e){if(e.isFormField&&e.syncValue){e.syncValue()}});if(a){d=this.waitMsgTarget;if(d===true){this.owner.el.mask(a,b)}else{if(d){d=this.waitMsgTarget=Ext.get(d);d.mask(a,b)}else{Ext.MessageBox.wait(a,c.waitTitle||this.waitTitle)}}}},afterAction:function(b,d){if(b.waitMsg){var a=Ext.MessageBox,c=this.waitMsgTarget;if(c===true){this.owner.el.unmask()}else{if(c){c.unmask()}else{a.updateProgress(1);a.hide()}}}if(d){if(b.reset){this.reset()}Ext.callback(b.success,b.scope||b,[this,b]);this.fireEvent("actioncomplete",this,b)}else{Ext.callback(b.failure,b.scope||b,[this,b]);this.fireEvent("actionfailed",this,b)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(c){var a=this;function b(d,g){var e=a.findField(d);if(e){e.markInvalid(g)}}if(Ext.isArray(c)){Ext.each(c,function(d){b(d.id,d.msg)})}else{if(c instanceof Ext.data.Errors){c.each(function(d){b(d.field,d.message)})}else{Ext.iterate(c,b)}}return this},setValues:function(a){var b=this;function c(d,g){var e=b.findField(d);if(e){e.setValue(g);if(b.trackResetOnLoad){e.resetOriginalValue()}}}if(Ext.isArray(a)){Ext.each(a,function(d){c(d.id,d.value)})}else{Ext.iterate(a,c)}return this},getValues:function(e,b,d,a){var c={};this.getFields().each(function(h){if(!b||h.isDirty()){var g=h[a?"getModelData":"getSubmitData"](d);if(Ext.isObject(g)){Ext.iterate(g,function(j,k){if(d&&k===""){k=h.emptyText||""}if(j in c){var l=c[j],i=Ext.isArray;if(!i(l)){l=c[j]=[l]}if(i(k)){c[j]=l.concat(k)}else{l.push(k)}}else{c[j]=k}})}}});if(e){c=Ext.Object.toQueryString(c)}return c},getFieldValues:function(a){return this.getValues(false,a,false,true)},clearInvalid:function(){var a=this;a.batchLayouts(function(){a.getFields().each(function(b){b.clearInvalid()})});return a},reset:function(){var a=this;a.batchLayouts(function(){a.getFields().each(function(b){b.reset()})});return a},applyToFields:function(a){this.getFields().each(function(b){Ext.apply(b,a)});return this},applyIfToFields:function(a){this.getFields().each(function(b){Ext.applyIf(b,a)});return this},batchLayouts:function(b){var c=this,a=new Ext.util.HashMap();c.getFields().each(function(e){var d=e.ownerCt;if(!a.contains(d)){a.add(d);d.oldSuspendLayout=d.suspendLayout;d.suspendLayout=true}});b();a.each(function(e,d){d.suspendLayout=d.oldSuspendLayout;delete d.oldSuspendLayout});c.owner.doComponentLayout()}});Ext.define("Ext.form.FieldAncestor",{initFieldAncestor:function(){var a=this,b=a.onFieldAncestorSubtreeChange;a.addEvents("fieldvaliditychange","fielderrorchange");a.on("add",b,a);a.on("remove",b,a);a.initFieldDefaults()},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},onFieldAncestorSubtreeChange:function(b,e){var c=this,d=!!e.ownerCt;function a(g){var h=g.isFieldLabelable,i=g.isFormField;if(h||i){if(h){c["onLabelable"+(d?"Added":"Removed")](g)}if(i){c["onField"+(d?"Added":"Removed")](g)}}else{if(g.isContainer){Ext.Array.forEach(g.getRefItems(),a)}}}a(e)},onLabelableAdded:function(a){var b=this;b.mon(a,"errorchange",b.handleFieldErrorChange,b,{buffer:10});a.setFieldDefaults(b.fieldDefaults)},onFieldAdded:function(b){var a=this;a.mon(b,"validitychange",a.handleFieldValidityChange,a)},onLabelableRemoved:function(a){var b=this;b.mun(a,"errorchange",b.handleFieldErrorChange,b)},onFieldRemoved:function(b){var a=this;a.mun(b,"validitychange",a.handleFieldValidityChange,a)},handleFieldValidityChange:function(c,b){var a=this;a.fireEvent("fieldvaliditychange",a,c,b);a.onFieldValidityChange()},handleFieldErrorChange:function(b,a){var c=this;c.fireEvent("fielderrorchange",c,b,a);c.onFieldErrorChange()},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn});Ext.define("Ext.layout.container.CheckboxGroup",{extend:"Ext.layout.container.Container",alias:["layout.checkboxgroup"],onLayout:function(){var b=this.getColCount(),c=this.getShadowCt(),a=this.owner,g=a.items,j=c.items,h=g.length,k=0,d,e;j.each(function(i){i.items.clear()});while(j.length>b){c.remove(j.last())}while(j.length<b){c.add({xtype:"container",cls:a.groupCls,flex:1})}if(a.vertical){e=Math.ceil(h/b);for(d=0;d<h;d++){if(d>0&&d%e===0){k++}j.getAt(k).items.add(g.getAt(d))}}else{for(d=0;d<h;d++){k=d%b;j.getAt(k).items.add(g.getAt(d))}}if(!c.rendered){c.render(this.getRenderTarget())}else{j.each(function(i){var l=i.getLayout();l.renderItems(l.getLayoutItems(),l.getRenderTarget())})}c.doComponentLayout()},renderItems:Ext.emptyFn,getShadowCt:function(){var j=this,d=j.shadowCt,a,h,k,c,g,b,e;if(!d){a=j.owner;c=a.columns;g=Ext.isArray(c);b=j.getColCount();h=[];for(e=0;e<b;e++){k={xtype:"container",cls:a.groupCls};if(g){if(c[e]<1){k.flex=c[e]}else{k.width=c[e]}}else{k.flex=1}h.push(k)}d=j.shadowCt=Ext.createWidget("container",{layout:"hbox",items:h,ownerCt:a})}return d},getColCount:function(){var a=this.owner,b=a.columns;return Ext.isArray(b)?b.length:(Ext.isNumber(b)?b:a.items.length)}});Ext.define("Ext.form.FieldContainer",{extend:"Ext.container.Container",mixins:{labelable:"Ext.form.Labelable",fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.fieldcontainer",componentLayout:"field",combineLabels:false,labelConnector:", ",combineErrors:false,maskOnDisable:false,initComponent:function(){var b=this,a=b.onSubCmpAddOrRemove;b.initLabelable();b.initFieldAncestor();b.callParent()},onLabelableAdded:function(a){var b=this;b.mixins.fieldAncestor.onLabelableAdded.call(this,a);b.updateLabel()},onLabelableRemoved:function(a){var b=this;b.mixins.fieldAncestor.onLabelableRemoved.call(this,a);b.updateLabel()},onRender:function(){var a=this;a.onLabelableRender();a.callParent(arguments)},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getFieldLabel:function(){var a=this.fieldLabel||"";if(!a&&this.combineLabels){a=Ext.Array.map(this.query("[isFieldLabelable]"),function(b){return b.getFieldLabel()}).join(this.labelConnector)}return a},updateLabel:function(){var b=this,a=b.labelEl;if(a){a.update(b.getFieldLabel())}},onFieldErrorChange:function(e,b){if(this.combineErrors){var d=this,g=d.getActiveError(),c=Ext.Array.filter(d.query("[isFormField]"),function(h){return h.hasActiveError()}),a=d.getCombinedErrors(c);if(a){d.setActiveErrors(a)}else{d.unsetActiveError()}if(g!==d.getActiveError()){d.doComponentLayout()}}},getCombinedErrors:function(a){var b=Ext.Array.forEach,c=[];b(a,function(d){b(d.getActiveErrors(),function(g){var e=d.getFieldLabel();c.push((e?e+": ":"")+g)})});return c},getTargetEl:function(){return this.bodyEl||this.callParent()}});Ext.define("Ext.form.CheckboxGroup",{extend:"Ext.form.FieldContainer",mixins:{field:"Ext.form.field.Field"},alias:"widget.checkboxgroup",requires:["Ext.layout.container.CheckboxGroup","Ext.form.field.Base"],columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkboxfield",groupCls:Ext.baseCSSPrefix+"form-check-group",fieldBodyCls:Ext.baseCSSPrefix+"form-checkboxgroup-body",layout:"checkboxgroup",initComponent:function(){var a=this;a.callParent();a.initField()},initValue:function(){var b=this,a=b.value;b.originalValue=b.lastValue=a||b.getValue();if(a){b.setValue(a)}},onFieldAdded:function(b){var a=this;if(b.isCheckbox){a.mon(b,"change",a.checkChange,a)}a.callParent(arguments)},onFieldRemoved:function(b){var a=this;if(b.isCheckbox){a.mun(b,"change",a.checkChange,a)}a.callParent(arguments)},isEqual:function(b,a){var c=Ext.Object.toQueryString;return c(b)===c(a)},getErrors:function(){var a=[];if(!this.allowBlank&&Ext.isEmpty(this.getChecked())){a.push(this.blankText)}return a},getBoxes:function(){return this.query("[isCheckbox]")},eachBox:function(b,a){Ext.Array.forEach(this.getBoxes(),b,a||this)},getChecked:function(){return Ext.Array.filter(this.getBoxes(),function(a){return a.getValue()})},isDirty:function(){return Ext.Array.some(this.getBoxes(),function(a){return a.isDirty()})},setReadOnly:function(a){this.eachBox(function(b){b.setReadOnly(a)});this.readOnly=a},reset:function(){var c=this,b=c.hasActiveError(),a=c.preventMark;c.preventMark=true;c.batchChanges(function(){c.eachBox(function(d){d.reset()})});c.preventMark=a;c.unsetActiveError();if(b){c.doComponentLayout()}},resetOriginalValue:function(){Ext.defer(function(){this.callParent()},1,this)},setValue:function(b){var a=this;a.batchChanges(function(){a.eachBox(function(c){var d=c.getName(),e=false;if(b&&d in b){if(Ext.isArray(b[d])){e=Ext.Array.contains(b[d],c.inputValue)}else{e=b[d]}}c.setValue(e)})});return a},getValue:function(){var a={};this.eachBox(function(c){var d=c.getName(),b=c.inputValue,e;if(c.getValue()){if(d in a){e=a[d];if(!Ext.isArray(e)){e=a[d]=[e]}e.push(b)}else{a[d]=b}}});return a},getSubmitData:function(){return null},getModelData:function(){return null},validate:function(){var a=this,d=a.getErrors(),c=Ext.isEmpty(d),b=!a.hasActiveError();if(c){a.unsetActiveError()}else{a.setActiveError(d)}if(c!==b){a.fireEvent("validitychange",a,c);a.doComponentLayout()}return c}},function(){this.borrow(Ext.form.field.Base,["markInvalid","clearInvalid"])});Ext.define("Ext.form.CheckboxManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a){return this.filterBy(function(b){return b.name==a})},getWithValue:function(a,b){return this.filterBy(function(c){return c.name==a&&c.inputValue==b})},getChecked:function(a){return this.filterBy(function(b){return b.name==a&&b.checked})}});Ext.define("Ext.form.FieldSet",{extend:"Ext.container.Container",alias:"widget.fieldset",uses:["Ext.form.field.Checkbox","Ext.panel.Tool","Ext.layout.container.Anchor","Ext.layout.component.FieldSet"],collapsed:false,baseCls:Ext.baseCSSPrefix+"fieldset",layout:"anchor",componentLayout:"fieldset",ariaRole:"",renderTpl:['<div id="{id}-body" class="{baseCls}-body"></div>'],maskOnDisable:false,getElConfig:function(){return{tag:"fieldset",id:this.id}},initComponent:function(){var b=this,a=b.baseCls;b.callParent();b.initLegend();b.addChildEls("body");if(b.collapsed){b.addCls(a+"-collapsed");b.collapse()}},onRender:function(b,a){this.callParent(arguments);this.initLegend()},initLegend:function(){var c=this,a,b=c.legend;if(!b&&(c.title||c.checkboxToggle||c.collapsible)){a=[];if(c.checkboxToggle){a.push(c.createCheckboxCmp())}else{if(c.collapsible){a.push(c.createToggleCmp())}}a.push(c.createTitleCmp());b=c.legend=Ext.create("Ext.container.Container",{baseCls:c.baseCls+"-header",ariaRole:"",ownerCt:this,getElConfig:function(){var d={tag:"legend",cls:this.baseCls};if(!Ext.isGecko3){d.children=[{cls:Ext.baseCSSPrefix+"clear"}]}return d},items:a})}if(b&&!b.rendered&&c.rendered){c.legend.render(c.el,c.body)}},createTitleCmp:function(){var a=this;a.titleCmp=Ext.create("Ext.Component",{html:a.title,getElConfig:function(){return{tag:Ext.isGecko3?"span":"div",cls:a.titleCmp.cls,id:a.titleCmp.id}},cls:a.baseCls+"-header-text"});return a.titleCmp},createCheckboxCmp:function(){var a=this,b="-checkbox";a.checkboxCmp=Ext.create("Ext.form.field.Checkbox",{getElConfig:function(){return{tag:Ext.isGecko3?"span":"div",id:a.checkboxCmp.id,cls:a.checkboxCmp.cls}},name:a.checkboxName||a.id+b,cls:a.baseCls+"-header"+b,checked:!a.collapsed,listeners:{change:a.onCheckChange,scope:a}});return a.checkboxCmp},createToggleCmp:function(){var a=this;a.toggleCmp=Ext.create("Ext.panel.Tool",{getElConfig:function(){return{tag:Ext.isGecko3?"span":"div",id:a.toggleCmp.id,cls:a.toggleCmp.cls}},type:"toggle",handler:a.toggle,scope:a});return a.toggleCmp},setTitle:function(b){var a=this;a.title=b;a.initLegend();a.titleCmp.update(b);return a},getTargetEl:function(){return this.body||this.frameBody||this.el},getContentTarget:function(){return this.body},getRefItems:function(a){var c=this.callParent(arguments),b=this.legend;if(b){c.unshift(b);if(a){c.unshift.apply(c,b.getRefItems(true))}}return c},expand:function(){return this.setExpanded(true)},collapse:function(){return this.setExpanded(false)},setExpanded:function(a){var b=this,c=b.checkboxCmp;a=!!a;if(c){c.setValue(a)}if(a){b.removeCls(b.baseCls+"-collapsed")}else{b.addCls(b.baseCls+"-collapsed")}b.collapsed=!a;if(a){b.getComponentLayout().childrenChanged=true}b.doComponentLayout();return b},toggle:function(){this.setExpanded(!!this.collapsed)},onCheckChange:function(b,a){this.setExpanded(a)},beforeDestroy:function(){var a=this.legend;if(a){a.destroy()}this.callParent()}});Ext.define("Ext.form.Label",{extend:"Ext.Component",alias:"widget.label",requires:["Ext.util.Format"],maskOnDisable:false,getElConfig:function(){var a=this;return{tag:"label",id:a.id,htmlFor:a.forId||"",html:a.text?Ext.util.Format.htmlEncode(a.text):(a.html||"")}},setText:function(c,b){var a=this;b=b!==false;if(b){a.text=c;delete a.html}else{a.html=c;delete a.text}if(a.rendered){a.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(c):c}return this}});Ext.define("Ext.form.Panel",{extend:"Ext.panel.Panel",mixins:{fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.form",alternateClassName:["Ext.FormPanel","Ext.form.FormPanel"],requires:["Ext.form.Basic","Ext.util.TaskRunner"],layout:"anchor",ariaRole:"form",initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,["beforeaction","actionfailed","actioncomplete","validitychange","dirtychange"]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){var a=this;a.form=a.createForm();a.callParent();a.form.initialize()},createForm:function(){return Ext.create("Ext.form.Basic",this,Ext.applyIf({listeners:{}},this.initialConfig))},getForm:function(){return this.form},loadRecord:function(a){return this.getForm().loadRecord(a)},getRecord:function(){return this.getForm().getRecord()},getValues:function(){return this.getForm().getValues()},beforeDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(a){this.form.load(a)},submit:function(a){this.form.submit(a)},disable:function(a){this.callParent(arguments);this.form.getFields().each(function(b){b.disable()})},enable:function(a){this.callParent(arguments);this.form.getFields().each(function(b){b.enable()})},startPolling:function(b){this.stopPolling();var a=Ext.create("Ext.util.TaskRunner",b);a.start({interval:0,run:this.checkChange,scope:this});this.pollTask=a},stopPolling:function(){var a=this.pollTask;if(a){a.stopAll();delete this.pollTask}},checkChange:function(){this.form.getFields().each(function(a){a.checkChange()})}});Ext.define("Ext.form.RadioGroup",{extend:"Ext.form.CheckboxGroup",alias:"widget.radiogroup",allowBlank:true,blankText:"You must select one item in this group",defaultType:"radiofield",groupCls:Ext.baseCSSPrefix+"form-radio-group",getBoxes:function(){return this.query("[isRadio]")},setValue:function(b){var a=this;if(Ext.isObject(b)){Ext.Object.each(b,function(c,e){var d=Ext.form.RadioManager.getWithValue(c,e);d.each(function(g){g.setValue(true)})})}return a}});Ext.define("Ext.form.RadioManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a){return this.filterBy(function(b){return b.name==a})},getWithValue:function(a,b){return this.filterBy(function(c){return c.name==a&&c.inputValue==b})},getChecked:function(a){return this.findBy(function(b){return b.name==a&&b.checked})}});Ext.define("Ext.form.action.DirectLoad",{extend:"Ext.form.action.Load",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectLoad",alias:"formaction.directload",type:"directload",run:function(){this.form.api.load.apply(window,this.getArgs())},getArgs:function(){var g=this,c=[],e=g.form,b=e.paramOrder,h=g.getParams(),d,a;if(b){for(d=0,a=b.length;d<a;d++){c.push(h[b[d]])}}else{if(e.paramsAsHash){c.push(h)}}c.push(g.onSuccess,g);return c},processResponse:function(a){return(this.result=a)},onSuccess:function(a,b){if(b.type==Ext.direct.Manager.self.exceptions.SERVER){a={}}this.callParent([a])}});Ext.define("Ext.form.action.DirectSubmit",{extend:"Ext.form.action.Submit",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectSubmit",alias:"formaction.directsubmit",type:"directsubmit",doSubmit:function(){var b=this,c=Ext.Function.bind(b.onSuccess,b),a=b.buildForm();b.form.api.submit(a,c,b);Ext.removeNode(a)},processResponse:function(a){return(this.result=a)},onSuccess:function(a,b){if(b.type===Ext.direct.Manager.self.exceptions.SERVER){a={}}this.callParent([a])}});Ext.define("Ext.form.action.StandardSubmit",{extend:"Ext.form.action.Submit",alias:"formaction.standardsubmit",doSubmit:function(){var a=this.buildForm();a.submit();Ext.removeNode(a)}});Ext.define("Ext.form.field.Checkbox",{extend:"Ext.form.field.Base",alias:["widget.checkboxfield","widget.checkbox"],alternateClassName:"Ext.form.Checkbox",requires:["Ext.XTemplate","Ext.form.CheckboxManager"],fieldSubTpl:["<tpl if=\"boxLabel && boxLabelAlign == 'before'\">",'<label id="{cmpId}-boxLabelEl" class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">{boxLabel}</label>',"</tpl>",'<input type="button" id="{id}" ','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">",'<label id="{cmpId}-boxLabelEl" class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">{boxLabel}</label>',"</tpl>",{disableFormats:true,compiled:true}],isCheckbox:true,focusCls:Ext.baseCSSPrefix+"form-cb-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",ariaRole:"checkbox",onRe:/^on$/i,initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var b=this,a=!!b.checked;b.originalValue=b.lastValue=a;b.setValue(a)},onRender:function(b,a){var c=this;c.addChildEls("boxLabelEl");Ext.applyIf(c.subTplData,{boxLabel:c.boxLabel,boxLabelCls:c.boxLabelCls,boxLabelAlign:c.boxLabelAlign});c.callParent(arguments)},initEvents:function(){var a=this;a.callParent();a.mon(a.inputEl,"click",a.onBoxClick,a)},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var a=this.uncheckedValue,b=Ext.isDefined(a)?a:null;return this.checked?this.inputValue:b},setRawValue:function(d){var c=this,e=c.inputEl,a=c.inputValue,b=(d===true||d==="true"||d==="1"||d===1||(((Ext.isString(d)||Ext.isNumber(d))&&a)?d==a:c.onRe.test(d)));if(e){e.dom.setAttribute("aria-checked",b);c[b?"addCls":"removeCls"](c.checkedCls)}c.checked=c.rawValue=b;return b},setValue:function(b){var a=this;if(Ext.isArray(b)){a.getManager().getByName(a.name).each(function(c){c.setValue(Ext.Array.contains(b,c.inputValue))})}else{a.callParent(arguments)}return a},valueToRaw:function(a){return a},onChange:function(b,a){var d=this,c=d.handler;if(c){c.call(d.scope||d,d,b)}d.callParent(arguments)},beforeDestroy:function(){this.callParent();this.getManager().removeAtKey(this.id)},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=a.readOnly}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.disabled=c||a.disabled}a.readOnly=c},getBodyNaturalWidth:function(){var d=this,b=d.bodyEl,a="white-space",c;b.setStyle(a,"nowrap");c=b.getWidth();b.setStyle(a,"");return c}});Ext.define("Ext.layout.component.field.Trigger",{alias:["layout.triggerfield"],extend:"Ext.layout.component.field.Field",type:"triggerfield",sizeBodyContents:function(d,b){var e=this,a=e.owner,h=a.inputEl,c=a.triggerWrap,g=a.getTriggerWidth();if(a.hideTrigger||a.readOnly||g>0){e.setElementSize(h,Ext.isNumber(d)?d-g:d);c.setWidth(g)}}});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.DataView",alias:"widget.dataview",inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect")},afterRender:function(){var b=this,a;b.callParent();a={scope:b,freezeEvent:true,click:b.handleEvent,mousedown:b.handleEvent,mouseup:b.handleEvent,dblclick:b.handleEvent,contextmenu:b.handleEvent,mouseover:b.handleEvent,mouseout:b.handleEvent,keydown:b.handleEvent};b.mon(b.getTargetEl(),a);if(b.store){b.bindStore(b.store,true)}},handleEvent:function(a){if(this.processUIEvent(a)!==false){this.processSpecialEvent(a)}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(b,a){var c;if(a&&typeof(a.offsetParent)==="object"){c=(b.type=="mouseout")?b.getRelatedTarget():b.getTarget();return Ext.fly(a).contains(c)}return false},processUIEvent:function(h){var i=this,k=h.getTarget(i.getItemSelector(),i.getTargetEl()),a=this.statics().EventMap,g,c,j=h.type,d=i.mouseOverItem,b;if(!k){if(j=="mouseover"&&i.stillOverItem(h,d)){k=d}if(j=="keydown"){c=i.getSelectionModel().getLastSelected();if(c){k=i.getNode(c)}}}if(k){g=i.indexOf(k);if(!c){c=i.getRecord(k)}if(i.processItemEvent(c,k,g,h)===false){return false}b=i.isNewItemEvent(k,h);if(b===false){return false}if((i["onBeforeItem"+a[b]](c,k,g,h)===false)||(i.fireEvent("beforeitem"+b,i,c,k,g,h)===false)||(i["onItem"+a[b]](c,k,g,h)===false)){return false}i.fireEvent("item"+b,i,c,k,g,h)}else{if((i.processContainerEvent(h)===false)||(i["onBeforeContainer"+a[j]](h)===false)||(i.fireEvent("beforecontainer"+j,i,h)===false)||(i["onContainer"+a[j]](h)===false)){return false}i.fireEvent("container"+j,i,h)}return true},isNewItemEvent:function(d,g){var c=this,a=c.mouseOverItem,b=g.type;switch(b){case"mouseover":if(d===a){return false}c.mouseOverItem=d;return"mouseenter";case"mouseout":if(c.stillOverItem(g,a)){return false}c.mouseOverItem=null;return"mouseleave"}return b},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(b){var a=this;a.clearHighlight();a.highlightedItem=b;Ext.fly(b).addCls(a.overItemCls)},clearHighlight:function(){var b=this,a=b.highlightedItem;if(a){Ext.fly(a).removeCls(b.overItemCls);delete b.highlightedItem}},refresh:function(){var a=this;a.clearHighlight();a.callParent(arguments);if(!a.isFixedHeight()){a.doComponentLayout()}}});Ext.define("Ext.layout.component.BoundList",{extend:"Ext.layout.component.Component",alias:"layout.boundlist",type:"component",beforeLayout:function(){return this.callParent(arguments)||this.owner.refreshed>0},onLayout:function(b,q){var k=this,c=k.owner,i=c.floating,d=c.el,s=d.getXY(),r=Ext.isNumber,a,n,p,m,h,l,g,j,e;if(i){d.setXY([-9999,-9999])}k.setTargetSize(b,q);if(!r(b)){a=c.minWidth;n=c.maxWidth;if(r(a)||r(n)){h=d.getWidth();if(h<a){g=a}else{if(h>n){g=n}}if(g){k.setTargetSize(g)}}}if(!r(q)){p=c.minHeight;m=c.maxHeight;if(r(p)||r(m)){l=d.getHeight();if(l<p){j=p}else{if(l>m){j=m}}if(j){k.setTargetSize(e,j)}}}if(i){d.setXY(s)}},afterLayout:function(){var b=this,a=b.owner.pagingToolbar;b.callParent();if(a){a.doComponentLayout()}},setTargetSize:function(d,b){var g=this,a=g.owner,c=null,e;if(Ext.isNumber(b)){c=b-a.el.getFrameWidth("tb");e=a.pagingToolbar;if(e){c-=e.getHeight()}}g.setElementSize(a.listEl,null,c);g.callParent(arguments)}});Ext.define("Ext.toolbar.TextItem",{extend:"Ext.toolbar.Item",requires:["Ext.XTemplate"],alias:"widget.tbtext",alternateClassName:"Ext.Toolbar.TextItem",text:"",renderTpl:"{text}",baseCls:Ext.baseCSSPrefix+"toolbar-text",onRender:function(){Ext.apply(this.renderData,{text:this.text});this.callParent(arguments)},setText:function(a){if(this.rendered){this.el.update(a);this.ownerCt.doLayout()}else{this.text=a}}});Ext.define("Ext.form.field.Trigger",{extend:"Ext.form.field.Text",alias:["widget.triggerfield","widget.trigger"],requires:["Ext.DomHelper","Ext.util.ClickRepeater","Ext.layout.component.field.Trigger"],alternateClassName:["Ext.form.TriggerField","Ext.form.TwinTriggerField","Ext.form.Trigger"],fieldSubTpl:['<input id="{id}" type="{type}" ','<tpl if="name">name="{name}" </tpl>','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" />','<div id="{cmpId}-triggerWrap" class="{triggerWrapCls}" role="presentation">',"{triggerEl}",'<div class="{clearCls}" role="presentation"></div>',"</div>",{compiled:true,disableFormats:true}],triggerBaseCls:Ext.baseCSSPrefix+"form-trigger",triggerWrapCls:Ext.baseCSSPrefix+"form-trigger-wrap",hideTrigger:false,editable:true,readOnly:false,repeatTriggerClick:false,autoSize:Ext.emptyFn,monitorTab:true,mimicing:false,triggerIndexRe:/trigger-index-(\d+)/,componentLayout:"triggerfield",initComponent:function(){this.wrapFocusCls=this.triggerWrapCls+"-focus";this.callParent(arguments)},onRender:function(d,a){var e=this,j,g=e.triggerBaseCls,h=e.triggerWrapCls,b=[],c;if(!e.trigger1Cls){e.trigger1Cls=e.triggerCls}for(c=0;(j=e["trigger"+(c+1)+"Cls"])||c<1;c++){b.push({cls:[Ext.baseCSSPrefix+"trigger-index-"+c,g,j].join(" "),role:"button"})}b[c-1].cls+=" "+g+"-last";e.addChildEls("triggerWrap");Ext.applyIf(e.subTplData,{triggerWrapCls:h,triggerEl:Ext.DomHelper.markup(b),clearCls:e.clearCls});e.callParent(arguments);e.triggerEl=Ext.select("."+g,true,e.triggerWrap.dom);e.doc=Ext.getDoc();e.initTrigger()},onEnable:function(){this.callParent();this.triggerWrap.unmask()},onDisable:function(){this.callParent();this.triggerWrap.mask()},afterRender:function(){this.callParent();this.updateEditState();this.triggerEl.unselectable()},updateEditState:function(){var c=this,e=c.inputEl,a=c.triggerWrap,d=Ext.baseCSSPrefix+"trigger-noedit",b,g;if(c.rendered){if(c.readOnly){e.addCls(d);g=true;b=false}else{if(c.editable){e.removeCls(d);g=false}else{e.addCls(d);g=true}b=!c.hideTrigger}a.setDisplayed(b);e.dom.readOnly=g;c.doComponentLayout()}},getTriggerWidth:function(){var c=this,b=c.triggerWrap,a=0;if(b&&!c.hideTrigger&&!c.readOnly){c.triggerEl.each(function(d){a+=d.getWidth()});a+=c.triggerWrap.getFrameWidth("lr")}return a},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateEditState()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateEditState()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateEditState()}},initTrigger:function(){var c=this,a=c.triggerWrap,b=c.triggerEl;if(c.repeatTriggerClick){c.triggerRepeater=Ext.create("Ext.util.ClickRepeater",a,{preventDefault:true,handler:function(d,g){c.onTriggerWrapClick(g)}})}else{c.mon(c.triggerWrap,"click",c.onTriggerWrapClick,c)}b.addClsOnOver(c.triggerBaseCls+"-over");b.each(function(e,g,d){e.addClsOnOver(c["trigger"+(d+1)+"Cls"]+"-over")});b.addClsOnClick(c.triggerBaseCls+"-click");b.each(function(e,g,d){e.addClsOnClick(c["trigger"+(d+1)+"Cls"]+"-click")})},onDestroy:function(){var a=this;Ext.destroyMembers(a,"triggerRepeater","triggerWrap","triggerEl");delete a.doc;a.callParent()},onFocus:function(){var a=this;a.callParent();if(!a.mimicing){a.bodyEl.addCls(a.wrapFocusCls);a.mimicing=true;a.mon(a.doc,"mousedown",a.mimicBlur,a,{delay:10});if(a.monitorTab){a.on("specialkey",a.checkTab,a)}}},checkTab:function(a,b){if(!this.ignoreMonitorTab&&b.getKey()==b.TAB){this.triggerBlur()}},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.bodyEl.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){var a=this;a.mimicing=false;a.mun(a.doc,"mousedown",a.mimicBlur,a);if(a.monitorTab&&a.inputEl){a.un("specialkey",a.checkTab,a)}Ext.form.field.Trigger.superclass.onBlur.call(a);if(a.bodyEl){a.bodyEl.removeCls(a.wrapFocusCls)}},beforeBlur:Ext.emptyFn,validateBlur:function(a){return true},onTriggerWrapClick:function(h){var g=this,d=h&&h.getTarget("."+Ext.baseCSSPrefix+"form-trigger",null),c=d&&d.className.match(g.triggerIndexRe),a,b;if(c&&!g.readOnly){a=parseInt(c[1],10);b=g["onTrigger"+(a+1)+"Click"]||g.onTriggerClick;if(b){b.call(g,h)}}},onTriggerClick:Ext.emptyFn});Ext.define("Ext.form.field.Picker",{extend:"Ext.form.field.Trigger",alias:"widget.pickerfield",alternateClassName:"Ext.form.Picker",requires:["Ext.util.KeyNav"],matchFieldWidth:true,pickerAlign:"tl-bl?",openCls:Ext.baseCSSPrefix+"pickerfield-open",editable:true,initComponent:function(){this.callParent();this.addEvents("expand","collapse","select")},initEvents:function(){var a=this;a.callParent();a.keyNav=Ext.create("Ext.util.KeyNav",a.inputEl,{down:function(){if(!a.isExpanded){a.onTriggerClick()}},esc:a.collapse,scope:a,forceKeyDown:true});if(!a.editable){a.mon(a.inputEl,"click",a.onTriggerClick,a)}if(Ext.isGecko){a.inputEl.dom.setAttribute("autocomplete","off")}},expand:function(){var c=this,a,b,d;if(c.rendered&&!c.isExpanded&&!c.isDestroyed){a=c.bodyEl;b=c.getPicker();d=c.collapseIf;b.show();c.isExpanded=true;c.alignPicker();a.addCls(c.openCls);c.mon(Ext.getDoc(),{mousewheel:d,mousedown:d,scope:c});Ext.EventManager.onWindowResize(c.alignPicker,c);c.fireEvent("expand",c);c.onExpand()}},onExpand:Ext.emptyFn,alignPicker:function(){var b=this,a;if(b.isExpanded){a=b.getPicker();if(b.matchFieldWidth){a.setSize(b.bodyEl.getWidth(),a.store&&a.store.getCount()?null:0)}if(a.isFloating()){b.doAlign()}}},doAlign:function(){var d=this,c=d.picker,a="-above",b;d.picker.alignTo(d.inputEl,d.pickerAlign,d.pickerOffset);b=c.el.getY()<d.inputEl.getY();d.bodyEl[b?"addCls":"removeCls"](d.openCls+a);c[b?"addCls":"removeCls"](c.baseCls+a)},collapse:function(){if(this.isExpanded&&!this.isDestroyed){var d=this,c=d.openCls,b=d.picker,e=Ext.getDoc(),g=d.collapseIf,a="-above";b.hide();d.isExpanded=false;d.bodyEl.removeCls([c,c+a]);b.el.removeCls(b.baseCls+a);e.un("mousewheel",g,d);e.un("mousedown",g,d);Ext.EventManager.removeResizeListener(d.alignPicker,d);d.fireEvent("collapse",d);d.onCollapse()}},onCollapse:Ext.emptyFn,collapseIf:function(b){var a=this;if(!a.isDestroyed&&!b.within(a.bodyEl,false,true)&&!b.within(a.picker.el,false,true)){a.collapse()}},getPicker:function(){var a=this;return a.picker||(a.picker=a.createPicker())},createPicker:Ext.emptyFn,onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.expand()}a.inputEl.focus()}},mimicBlur:function(c){var b=this,a=b.picker;if(!a||!c.within(a.el,false,true)){b.callParent(arguments)}},onDestroy:function(){var b=this,a=b.picker;Ext.EventManager.removeResizeListener(b.alignPicker,b);Ext.destroy(b.keyNav);if(a){delete a.pickerField;a.destroy()}b.callParent()}});Ext.define("Ext.form.field.Spinner",{extend:"Ext.form.field.Trigger",alias:"widget.spinnerfield",alternateClassName:"Ext.form.Spinner",requires:["Ext.util.KeyNav"],trigger1Cls:Ext.baseCSSPrefix+"form-spinner-up",trigger2Cls:Ext.baseCSSPrefix+"form-spinner-down",spinUpEnabled:true,spinDownEnabled:true,keyNavEnabled:true,mouseWheelEnabled:true,repeatTriggerClick:true,onSpinUp:Ext.emptyFn,onSpinDown:Ext.emptyFn,initComponent:function(){this.callParent();this.addEvents("spin","spinup","spindown")},onRender:function(){var b=this,a;b.callParent(arguments);a=b.triggerEl;b.spinUpEl=a.item(0);b.spinDownEl=a.item(1);b.setSpinUpEnabled(b.spinUpEnabled);b.setSpinDownEnabled(b.spinDownEnabled);if(b.keyNavEnabled){b.spinnerKeyNav=Ext.create("Ext.util.KeyNav",b.inputEl,{scope:b,up:b.spinUp,down:b.spinDown})}if(b.mouseWheelEnabled){b.mon(b.bodyEl,"mousewheel",b.onMouseWheel,b)}},getTriggerWidth:function(){return this.hideTrigger||this.readOnly?0:this.spinUpEl.getWidth()+this.triggerWrap.getFrameWidth("lr")},onTrigger1Click:function(){this.spinUp()},onTrigger2Click:function(){this.spinDown()},spinUp:function(){var a=this;if(a.spinUpEnabled&&!a.disabled){a.fireEvent("spin",a,"up");a.fireEvent("spinup",a);a.onSpinUp()}},spinDown:function(){var a=this;if(a.spinDownEnabled&&!a.disabled){a.fireEvent("spin",a,"down");a.fireEvent("spindown",a);a.onSpinDown()}},setSpinUpEnabled:function(a){var b=this,c=b.spinUpEnabled;b.spinUpEnabled=a;if(c!==a&&b.rendered){b.spinUpEl[a?"removeCls":"addCls"](b.trigger1Cls+"-disabled")}},setSpinDownEnabled:function(a){var b=this,c=b.spinDownEnabled;b.spinDownEnabled=a;if(c!==a&&b.rendered){b.spinDownEl[a?"removeCls":"addCls"](b.trigger2Cls+"-disabled")}},onMouseWheel:function(b){var a=this,c;if(a.hasFocus){c=b.getWheelDelta();if(c>0){a.spinUp()}else{if(c<0){a.spinDown()}}b.stopEvent()}},onDestroy:function(){Ext.destroyMembers(this,"spinnerKeyNav","spinUpEl","spinDownEl");this.callParent()}});Ext.define("Ext.form.field.Number",{extend:"Ext.form.field.Spinner",alias:"widget.numberfield",alternateClassName:["Ext.form.NumberField","Ext.form.Number"],allowDecimals:true,decimalSeparator:".",decimalPrecision:2,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,step:1,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",negativeText:"The value cannot be negative",baseChars:"0123456789",autoStripChars:false,initComponent:function(){var a=this,b;a.callParent();a.setMinValue(a.minValue);a.setMaxValue(a.maxValue);if(a.disableKeyFilter!==true){b=a.baseChars+"";if(a.allowDecimals){b+=a.decimalSeparator}if(a.minValue<0){b+="-"}b=Ext.String.escapeRegex(b);a.maskRe=new RegExp("["+b+"]");if(a.autoStripChars){a.stripCharsRe=new RegExp("[^"+b+"]","gi")}}},getErrors:function(c){var b=this,e=b.callParent(arguments),d=Ext.String.format,a;c=Ext.isDefined(c)?c:this.processRawValue(this.getRawValue());if(c.length<1){return e}c=String(c).replace(b.decimalSeparator,".");if(isNaN(c)){e.push(d(b.nanText,c))}a=b.parseValue(c);if(b.minValue===0&&a<0){e.push(this.negativeText)}else{if(a<b.minValue){e.push(d(b.minText,b.minValue))}}if(a>b.maxValue){e.push(d(b.maxText,b.maxValue))}return e},rawToValue:function(b){var a=this.fixPrecision(this.parseValue(b));if(a===null){a=b||null}return a},valueToRaw:function(c){var b=this,a=b.decimalSeparator;c=b.parseValue(c);c=b.fixPrecision(c);c=Ext.isNumber(c)?c:parseFloat(String(c).replace(a,"."));c=isNaN(c)?"":String(c).replace(".",a);return c},onChange:function(){var b=this,c=b.getValue(),a=c===null;b.callParent(arguments);b.setSpinUpEnabled(a||c<b.maxValue);b.setSpinDownEnabled(a||c>b.minValue)},setMinValue:function(a){this.minValue=Ext.Number.from(a,Number.NEGATIVE_INFINITY)},setMaxValue:function(a){this.maxValue=Ext.Number.from(a,Number.MAX_VALUE)},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?null:a},fixPrecision:function(d){var c=this,b=isNaN(d),a=c.decimalPrecision;if(b||!d){return b?"":d}else{if(!c.allowDecimals||a<=0){a=0}}return parseFloat(Ext.Number.toFixed(parseFloat(d),a))},beforeBlur:function(){var b=this,a=b.parseValue(b.getRawValue());if(!Ext.isEmpty(a)){b.setValue(a)}},onSpinUp:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()+a.step,a.minValue,a.maxValue))}},onSpinDown:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()-a.step,a.minValue,a.maxValue))}}});Ext.define("Ext.toolbar.Paging",{extend:"Ext.toolbar.Toolbar",alias:"widget.pagingtoolbar",alternateClassName:"Ext.PagingToolbar",requires:["Ext.toolbar.TextItem","Ext.form.field.Number"],displayInfo:false,prependButtons:false,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",inputItemWidth:30,getPagingItems:function(){var a=this;return[{itemId:"first",tooltip:a.firstText,overflowText:a.firstText,iconCls:Ext.baseCSSPrefix+"tbar-page-first",disabled:true,handler:a.moveFirst,scope:a},{itemId:"prev",tooltip:a.prevText,overflowText:a.prevText,iconCls:Ext.baseCSSPrefix+"tbar-page-prev",disabled:true,handler:a.movePrevious,scope:a},"-",a.beforePageText,{xtype:"numberfield",itemId:"inputItem",name:"inputItem",cls:Ext.baseCSSPrefix+"tbar-page-number",allowDecimals:false,minValue:1,hideTrigger:true,enableKeyEvents:true,selectOnFocus:true,submitValue:false,width:a.inputItemWidth,margins:"-1 2 3 2",listeners:{scope:a,keydown:a.onPagingKeyDown,blur:a.onPagingBlur}},{xtype:"tbtext",itemId:"afterTextItem",text:Ext.String.format(a.afterPageText,1)},"-",{itemId:"next",tooltip:a.nextText,overflowText:a.nextText,iconCls:Ext.baseCSSPrefix+"tbar-page-next",disabled:true,handler:a.moveNext,scope:a},{itemId:"last",tooltip:a.lastText,overflowText:a.lastText,iconCls:Ext.baseCSSPrefix+"tbar-page-last",disabled:true,handler:a.moveLast,scope:a},"-",{itemId:"refresh",tooltip:a.refreshText,overflowText:a.refreshText,iconCls:Ext.baseCSSPrefix+"tbar-loading",handler:a.doRefresh,scope:a}]},initComponent:function(){var b=this,c=b.getPagingItems(),a=b.items||b.buttons||[];if(b.prependButtons){b.items=a.concat(c)}else{b.items=c.concat(a)}delete b.buttons;if(b.displayInfo){b.items.push("->");b.items.push({xtype:"tbtext",itemId:"displayItem"})}b.callParent();b.addEvents("change","beforechange");b.on("afterlayout",b.onLoad,b,{single:true});b.bindStore(b.store||"ext-empty-store",true)},updateInfo:function(){var e=this,c=e.child("#displayItem"),a=e.store,b=e.getPageData(),d,g;if(c){d=a.getCount();if(d===0){g=e.emptyMsg}else{g=Ext.String.format(e.displayMsg,b.fromRecord,b.toRecord,b.total)}c.setText(g);e.doComponentLayout()}},onLoad:function(){var e=this,d,b,c,a;if(!e.rendered){return}d=e.getPageData();b=d.currentPage;c=d.pageCount;a=Ext.String.format(e.afterPageText,isNaN(c)?1:c);e.child("#afterTextItem").setText(a);e.child("#inputItem").setValue(b);e.child("#first").setDisabled(b===1);e.child("#prev").setDisabled(b===1);e.child("#next").setDisabled(b===c);e.child("#last").setDisabled(b===c);e.child("#refresh").enable();e.updateInfo();e.fireEvent("change",e,d)},getPageData:function(){var b=this.store,a=b.getTotalCount();return{total:a,currentPage:b.currentPage,pageCount:Math.ceil(a/b.pageSize),fromRecord:((b.currentPage-1)*b.pageSize)+1,toRecord:Math.min(b.currentPage*b.pageSize,a)}},onLoadError:function(){if(!this.rendered){return}this.child("#refresh").enable()},readPageFromInput:function(b){var a=this.child("#inputItem").getValue(),c=parseInt(a,10);if(!a||isNaN(c)){this.child("#inputItem").setValue(b.currentPage);return false}return c},onPagingFocus:function(){this.child("#inputItem").select()},onPagingBlur:function(b){var a=this.getPageData().currentPage;this.child("#inputItem").setValue(a)},onPagingKeyDown:function(i,h){var d=this,b=h.getKey(),c=d.getPageData(),a=h.shiftKey?10:1,g;if(b==h.RETURN){h.stopEvent();g=d.readPageFromInput(c);if(g!==false){g=Math.min(Math.max(1,g),c.pageCount);if(d.fireEvent("beforechange",d,g)!==false){d.store.loadPage(g)}}}else{if(b==h.HOME||b==h.END){h.stopEvent();g=b==h.HOME?1:c.pageCount;i.setValue(g)}else{if(b==h.UP||b==h.PAGEUP||b==h.DOWN||b==h.PAGEDOWN){h.stopEvent();g=d.readPageFromInput(c);if(g){if(b==h.DOWN||b==h.PAGEDOWN){a*=-1}g+=a;if(g>=1&&g<=c.pages){i.setValue(g)}}}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(a){if(this.fireEvent("beforechange",this,o)!==false){this.store.load()}},moveFirst:function(){if(this.fireEvent("beforechange",this,1)!==false){this.store.loadPage(1)}},movePrevious:function(){var b=this,a=b.store.currentPage-1;if(a>0){if(b.fireEvent("beforechange",b,a)!==false){b.store.previousPage()}}},moveNext:function(){var c=this,b=c.getPageData().pageCount,a=c.store.currentPage+1;if(a<=b){if(c.fireEvent("beforechange",c,a)!==false){c.store.nextPage()}}},moveLast:function(){var b=this,a=b.getPageData().pageCount;if(b.fireEvent("beforechange",b,a)!==false){b.store.loadPage(a)}},doRefresh:function(){var a=this,b=a.store.currentPage;if(a.fireEvent("beforechange",a,b)!==false){a.store.loadPage(b)}},bindStore:function(a,b){var c=this;if(!b&&c.store){if(a!==c.store&&c.store.autoDestroy){c.store.destroyStore()}else{c.store.un("beforeload",c.beforeLoad,c);c.store.un("load",c.onLoad,c);c.store.un("exception",c.onLoadError,c)}if(!a){c.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:c,beforeload:c.beforeLoad,load:c.onLoad,exception:c.onLoadError})}c.store=a},unbind:function(a){this.bindStore(null)},bind:function(a){this.bindStore(a)},onDestroy:function(){this.bindStore(null);this.callParent()}});Ext.define("Ext.view.BoundList",{extend:"Ext.view.View",alias:"widget.boundlist",alternateClassName:"Ext.BoundList",requires:["Ext.layout.component.BoundList","Ext.toolbar.Paging"],pageSize:0,autoScroll:true,baseCls:Ext.baseCSSPrefix+"boundlist",itemCls:Ext.baseCSSPrefix+"boundlist-item",listItemCls:"",shadow:false,trackOver:true,refreshed:0,ariaRole:"listbox",componentLayout:"boundlist",renderTpl:['<div id="{id}-listEl" class="list-ct"></div>'],initComponent:function(){var b=this,a=b.baseCls,c=b.itemCls;b.selectedItemCls=a+"-selected";b.overItemCls=a+"-item-over";b.itemSelector="."+c;if(b.floating){b.addCls(a+"-floating")}if(!b.tpl){b.tpl=Ext.create("Ext.XTemplate",'<ul><tpl for=".">','<li role="option" class="'+c+'">'+b.getInnerTpl(b.displayField)+"</li>","</tpl></ul>")}else{if(Ext.isString(b.tpl)){b.tpl=Ext.create("Ext.XTemplate",b.tpl)}}if(b.pageSize){b.pagingToolbar=b.createPagingToolbar()}b.callParent();b.addChildEls("listEl")},createPagingToolbar:function(){return Ext.widget("pagingtoolbar",{pageSize:this.pageSize,store:this.store,border:false})},onRender:function(){var b=this,a=b.pagingToolbar;b.callParent(arguments);if(a){a.render(b.el)}},bindStore:function(a,b){var d=this,c=d.pagingToolbar;d.callParent(arguments);if(c){c.bindStore(a,b)}},getTargetEl:function(){return this.listEl||this.el},getInnerTpl:function(a){return"{"+a+"}"},refresh:function(){var a=this;a.callParent();if(a.isVisible()){a.refreshed++;a.doComponentLayout();a.refreshed--}},initAria:function(){this.callParent();var a=this.getSelectionModel(),c=a.getSelectionMode(),b=this.getActionEl();if(c!=="SINGLE"){b.dom.setAttribute("aria-multiselectable",true)}},onDestroy:function(){Ext.destroyMembers(this,"pagingToolbar","listEl");this.callParent()}});Ext.define("Ext.view.BoundListKeyNav",{extend:"Ext.util.KeyNav",requires:"Ext.view.BoundList",constructor:function(b,a){var c=this;c.boundList=a.boundList;c.callParent([b,Ext.apply({},a,c.defaultHandlers)])},defaultHandlers:{up:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c>0?c-1:d.getCount()-1;e.highlightAt(a)},down:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c<d.getCount()-1?c+1:0;e.highlightAt(a)},pageup:function(){},pagedown:function(){},home:function(){this.highlightAt(0)},end:function(){var a=this;a.highlightAt(a.boundList.all.getCount()-1)},enter:function(a){this.selectHighlighted(a)}},highlightAt:function(b){var a=this.boundList,c=a.all.item(b);if(c){c=c.dom;a.highlightItem(c);a.getTargetEl().scrollChildIntoView(c,false)}},selectHighlighted:function(g){var d=this,b=d.boundList,c=b.highlightedItem,a=b.getSelectionModel();if(c){a.selectWithEvent(b.getRecord(c),g)}}});Ext.define("Ext.form.field.ComboBox",{extend:"Ext.form.field.Picker",requires:["Ext.util.DelayedTask","Ext.EventObject","Ext.view.BoundList","Ext.view.BoundListKeyNav","Ext.data.StoreManager"],alternateClassName:"Ext.form.ComboBox",alias:["widget.combobox","widget.combo"],triggerCls:Ext.baseCSSPrefix+"form-arrow-trigger",hiddenDataCls:Ext.baseCSSPrefix+"hide-display "+Ext.baseCSSPrefix+"form-data-hidden",fieldSubTpl:['<div class="{hiddenDataCls}" role="presentation"></div>','<input id="{id}" type="{type}" ','<tpl if="size">size="{size}" </tpl>','<tpl if="tabIdx">tabIndex="{tabIdx}" </tpl>','class="{fieldCls} {typeCls}" autocomplete="off" />','<div id="{cmpId}-triggerWrap" class="{triggerWrapCls}" role="presentation">',"{triggerEl}",'<div class="{clearCls}" role="presentation"></div>',"</div>",{compiled:true,disableFormats:true}],getSubTplData:function(){var a=this;Ext.applyIf(a.subTplData,{hiddenDataCls:a.hiddenDataCls});return a.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);a.setHiddenValue(a.value)},multiSelect:false,delimiter:", ",displayField:"text",triggerAction:"all",allQuery:"",queryParam:"query",queryMode:"remote",queryCaching:true,pageSize:0,autoSelect:true,typeAhead:false,typeAheadDelay:250,selectOnTab:true,forceSelection:false,defaultListConfig:{emptyText:"",loadingText:"Loading...",loadingHeight:70,minWidth:70,maxHeight:300,shadow:"sides"},ignoreSelection:0,initComponent:function(){var e=this,c=Ext.isDefined,b=e.store,d=e.transform,a,g;Ext.applyIf(e.renderSelectors,{hiddenDataEl:"."+e.hiddenDataCls.split(" ").join(".")});this.addEvents("beforequery","select","beforeselect","beforedeselect");if(d){a=Ext.getDom(d);if(a){b=Ext.Array.map(Ext.Array.from(a.options),function(h){return[h.value,h.text]});if(!e.name){e.name=a.name}if(!("value" in e)){e.value=a.value}}}e.bindStore(b||"ext-empty-store",true);b=e.store;if(b.autoCreated){e.queryMode="local";e.valueField=e.displayField="field1";if(!b.expanded){e.displayField="field2"}}if(!c(e.valueField)){e.valueField=e.displayField}g=e.queryMode==="local";if(!c(e.queryDelay)){e.queryDelay=g?10:500}if(!c(e.minChars)){e.minChars=g?0:4}if(!e.displayTpl){e.displayTpl=Ext.create("Ext.XTemplate",'<tpl for=".">{[typeof values === "string" ? values : values["'+e.displayField+'"]]}<tpl if="xindex < xcount">'+e.delimiter+"</tpl></tpl>")}else{if(Ext.isString(e.displayTpl)){e.displayTpl=Ext.create("Ext.XTemplate",e.displayTpl)}}e.callParent();e.doQueryTask=Ext.create("Ext.util.DelayedTask",e.doRawQuery,e);if(e.store.getCount()>0){e.setValue(e.value)}if(a){e.render(a.parentNode,a);Ext.removeNode(a);delete e.renderTo}},getStore:function(){return this.store},beforeBlur:function(){this.doQueryTask.cancel();this.assertValue()},assertValue:function(){var a=this,b=a.getRawValue(),c;if(a.forceSelection){if(a.multiSelect){if(b!==a.getDisplayValue()){a.setValue(a.lastSelection)}}else{c=a.findRecordByDisplay(b);if(c){a.select(c)}else{a.setValue(a.lastSelection)}}}a.collapse()},onTypeAhead:function(){var e=this,d=e.displayField,b=e.store.findRecord(d,e.getRawValue()),c=e.getPicker(),g,a,h;if(b){g=b.get(d);a=g.length;h=e.getRawValue().length;c.highlightItem(c.getNode(b));if(h!==0&&h!==a){e.setRawValue(g);e.selectText(h,g.length)}}},resetToDefault:function(){},bindStore:function(a,b){var c=this,d=c.store;if(d&&!b){if(d!==a&&d.autoDestroy){d.destroyStore()}else{d.un({scope:c,load:c.onLoad,exception:c.collapse})}if(!a){c.store=null;if(c.picker){c.picker.bindStore(null)}}}if(a){if(!b){c.resetToDefault()}c.store=Ext.data.StoreManager.lookup(a);c.store.on({scope:c,load:c.onLoad,exception:c.collapse});if(c.picker){c.picker.bindStore(a)}}},onLoad:function(){var a=this,b=a.value;if(a.rawQuery){a.rawQuery=false;a.syncSelection();if(a.picker&&!a.picker.getSelectionModel().hasSelection()){a.doAutoSelect()}}else{if(a.value){a.setValue(a.value)}else{if(a.store.getCount()){a.doAutoSelect()}else{a.setValue("")}}}},doRawQuery:function(){this.doQuery(this.getRawValue(),false,true)},doQuery:function(h,c,e){h=h||"";var d=this,b={query:h,forceAll:c,combo:d,cancel:false},a=d.store,g=d.queryMode==="local";if(d.fireEvent("beforequery",b)===false||b.cancel){return false}h=b.query;c=b.forceAll;if(c||(h.length>=d.minChars)){d.expand();if(!d.queryCaching||d.lastQuery!==h){d.lastQuery=h;if(g){if(c){a.clearFilter()}else{a.clearFilter(true);a.filter(d.displayField,h)}}else{d.rawQuery=e;if(d.pageSize){d.loadPage(1)}else{a.load({params:d.getParams(h)})}}}if(d.getRawValue()!==d.getDisplayValue()){d.ignoreSelection++;d.picker.getSelectionModel().deselectAll();d.ignoreSelection--}if(g){d.doAutoSelect()}if(d.typeAhead){d.doTypeAhead()}}return true},loadPage:function(a){this.store.loadPage(a,{params:this.getParams(this.lastQuery)})},onPageChange:function(b,a){this.loadPage(a);return false},getParams:function(c){var b={},a=this.queryParam;if(a){b[a]=c}return b},doAutoSelect:function(){var b=this,a=b.picker,c,d;if(a&&b.autoSelect&&b.store.getCount()>0){c=a.getSelectionModel().lastSelected;d=a.getNode(c||0);if(d){a.highlightItem(d);a.listEl.scrollChildIntoView(d,false)}}},doTypeAhead:function(){if(!this.typeAheadTask){this.typeAheadTask=Ext.create("Ext.util.DelayedTask",this.onTypeAhead,this)}if(this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.typeAheadTask.delay(this.typeAheadDelay)}},onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.onFocus({});if(a.triggerAction==="all"){a.doQuery(a.allQuery,true)}else{a.doQuery(a.getRawValue(),false,true)}}a.inputEl.focus()}},onKeyUp:function(d,b){var c=this,a=d.getKey();if(!c.readOnly&&!c.disabled&&c.editable){c.lastKey=a;if(!d.isSpecialKey()||a==d.BACKSPACE||a==d.DELETE){c.doQueryTask.delay(c.queryDelay)}}if(c.enableKeyEvents){c.callParent(arguments)}},initEvents:function(){var a=this;a.callParent();if(!a.enableKeyEvents){a.mon(a.inputEl,"keyup",a.onKeyUp,a)}},onDestroy:function(){this.bindStore(null);this.callParent()},createPicker:function(){var c=this,a,d=Ext.baseCSSPrefix+"menu",b=Ext.apply({pickerField:c,selModel:{mode:c.multiSelect?"SIMPLE":"SINGLE"},floating:true,hidden:true,ownerCt:c.ownerCt,cls:c.el.up("."+d)?d:"",store:c.store,displayField:c.displayField,focusOnToFront:false,pageSize:c.pageSize,tpl:c.tpl},c.listConfig,c.defaultListConfig);a=c.picker=Ext.create("Ext.view.BoundList",b);if(c.pageSize){a.pagingToolbar.on("beforechange",c.onPageChange,c)}c.mon(a,{itemclick:c.onItemClick,refresh:c.onListRefresh,scope:c});c.mon(a.getSelectionModel(),{beforeselect:c.onBeforeSelect,beforedeselect:c.onBeforeDeselect,selectionchange:c.onListSelectionChange,scope:c});return a},alignPicker:function(){var b=this,a=b.picker,e=b.getPosition()[1]-Ext.getBody().getScroll().top,d=Ext.Element.getViewHeight()-e-b.getHeight(),c=Math.max(e,d);b.callParent();if(a.getHeight()>c){a.setHeight(c-5);b.doAlign()}},onListRefresh:function(){this.alignPicker();this.syncSelection()},onItemClick:function(d,a){var g=this,b=g.lastSelection,c=g.valueField,e;if(!g.multiSelect&&b){e=b[0];if(e&&(a.get(c)===e.get(c))){g.displayTplData=[a.data];g.setRawValue(g.getDisplayValue());g.collapse()}}},onBeforeSelect:function(b,a){return this.fireEvent("beforeselect",this,a,a.index)},onBeforeDeselect:function(b,a){return this.fireEvent("beforedeselect",this,a,a.index)},onListSelectionChange:function(b,d){var a=this,e=a.multiSelect,c=d.length>0;if(!a.ignoreSelection&&a.isExpanded){if(!e){Ext.defer(a.collapse,1,a)}if(e||c){a.setValue(d,false)}if(c){a.fireEvent("select",a,d)}a.inputEl.focus()}},onExpand:function(){var d=this,a=d.listKeyNav,c=d.selectOnTab,b=d.getPicker();if(a){a.enable()}else{a=d.listKeyNav=Ext.create("Ext.view.BoundListKeyNav",this.inputEl,{boundList:b,forceKeyDown:true,tab:function(g){if(c){this.selectHighlighted(g);d.triggerBlur()}return true}})}if(c){d.ignoreMonitorTab=true}Ext.defer(a.enable,1,a);d.inputEl.focus()},onCollapse:function(){var b=this,a=b.listKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},select:function(a){this.setValue(a,true)},findRecord:function(d,c){var b=this.store,a=b.findExact(d,c);return a!==-1?b.getAt(a):false},findRecordByValue:function(a){return this.findRecord(this.valueField,a)},findRecordByDisplay:function(a){return this.findRecord(this.displayField,a)},setValue:function(l,e){var k=this,c=k.valueNotFoundText,m=k.inputEl,g,j,h,b=[],a=[],d=[];if(k.store.loading){k.value=l;k.setHiddenValue(k.value);return k}l=Ext.Array.from(l);for(g=0,j=l.length;g<j;g++){h=l[g];if(!h||!h.isModel){h=k.findRecordByValue(h)}if(h){b.push(h);a.push(h.data);d.push(h.get(k.valueField))}else{if(!k.forceSelection){a.push(l[g]);d.push(l[g])}else{if(Ext.isDefined(c)){a.push(c)}}}}k.setHiddenValue(d);k.value=k.multiSelect?d:d[0];if(!Ext.isDefined(k.value)){k.value=null}k.displayTplData=a;k.lastSelection=k.valueModels=b;if(m&&k.emptyText&&!Ext.isEmpty(l)){m.removeCls(k.emptyCls)}k.setRawValue(k.getDisplayValue());k.checkChange();if(e!==false){k.syncSelection()}k.applyEmptyText();return k},setHiddenValue:function(c){var g=this,e;if(!g.hiddenDataEl){return}c=Ext.Array.from(c);var j=g.hiddenDataEl.dom,h=j.childNodes,b=h[0],a=c.length,d=h.length;if(!b&&a>0){g.hiddenDataEl.update(Ext.DomHelper.markup({tag:"input",type:"hidden",name:g.name}));d=1;b=j.firstChild}while(d>a){j.removeChild(h[0]);--d}while(d<a){j.appendChild(b.cloneNode(true));++d}for(e=0;e<a;e++){h[e].value=c[e]}},getDisplayValue:function(){return this.displayTpl.apply(this.displayTplData)},getValue:function(){var b=this,a=b.picker,d=b.getRawValue(),c=b.value;if(b.getDisplayValue()!==d){c=d;b.value=b.displayTplData=b.valueModels=null;if(a){b.ignoreSelection++;a.getSelectionModel().deselectAll();b.ignoreSelection--}}return c},getSubmitValue:function(){return this.getValue()},isEqual:function(e,d){var b=Ext.Array.from,c,a;e=b(e);d=b(d);a=e.length;if(a!==d.length){return false}for(c=0;c<a;c++){if(d[c]!==e[c]){return false}}return true},clearValue:function(){this.setValue([])},syncSelection:function(){var d=this,e=Ext.Array,b=d.picker,c,a;if(b){c=[];e.forEach(d.valueModels||[],function(g){if(g&&g.isModel&&d.store.indexOf(g)>=0){c.push(g)}});d.ignoreSelection++;a=b.getSelectionModel();a.deselectAll();if(c.length){a.select(c)}d.ignoreSelection--}}});Ext.define("Ext.picker.Month",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.util.ClickRepeater","Ext.Date","Ext.button.Button"],alias:"widget.monthpicker",alternateClassName:"Ext.MonthPicker",renderTpl:['<div id="{id}-bodyEl" class="{baseCls}-body">','<div class="{baseCls}-months">','<tpl for="months">','<div class="{parent.baseCls}-item {parent.baseCls}-month"><a href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div class="{baseCls}-years">','<div class="{baseCls}-yearnav">','<button id="{id}-prevEl" class="{baseCls}-yearnav-prev"></button>','<button id="{id}-nextEl" class="{baseCls}-yearnav-next"></button>',"</div>",'<tpl for="years">','<div class="{parent.baseCls}-item {parent.baseCls}-year"><a href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div class="'+Ext.baseCSSPrefix+'clear"></div>',"</div>",'<tpl if="showButtons">','<div id="{id}-buttonsEl" class="{baseCls}-buttons"></div>',"</tpl>"],okText:"OK",cancelText:"Cancel",baseCls:Ext.baseCSSPrefix+"monthpicker",showButtons:true,width:178,smallCls:Ext.baseCSSPrefix+"monthpicker-small",totalYears:10,yearOffset:5,monthOffset:6,initComponent:function(){var a=this;a.selectedCls=a.baseCls+"-selected";a.addEvents("cancelclick","monthclick","monthdblclick","okclick","select","yearclick","yeardblclick");if(a.small){a.addCls(a.smallCls)}a.setValue(a.value);a.activeYear=a.getYear(new Date().getFullYear()-4,-4);this.callParent()},onRender:function(e,c){var h=this,d=0,b=[],a=Ext.Date.getShortMonthName,g=h.monthOffset;for(;d<g;++d){b.push(a(d),a(d+g))}Ext.apply(h.renderData,{months:b,years:h.getYears(),showButtons:h.showButtons});h.addChildEls("bodyEl","prevEl","nextEl","buttonsEl");h.callParent(arguments)},afterRender:function(){var b=this,a=b.bodyEl,c=b.buttonsEl;b.callParent();b.mon(a,"click",b.onBodyClick,b);b.mon(a,"dblclick",b.onBodyClick,b);b.years=a.select("."+b.baseCls+"-year a");b.months=a.select("."+b.baseCls+"-month a");if(b.showButtons){b.okBtn=Ext.create("Ext.button.Button",{text:b.okText,renderTo:c,handler:b.onOkClick,scope:b});b.cancelBtn=Ext.create("Ext.button.Button",{text:b.cancelText,renderTo:c,handler:b.onCancelClick,scope:b})}b.backRepeater=Ext.create("Ext.util.ClickRepeater",b.prevEl,{handler:Ext.Function.bind(b.adjustYear,b,[-b.totalYears])});b.prevEl.addClsOnOver(b.baseCls+"-yearnav-prev-over");b.nextRepeater=Ext.create("Ext.util.ClickRepeater",b.nextEl,{handler:Ext.Function.bind(b.adjustYear,b,[b.totalYears])});b.nextEl.addClsOnOver(b.baseCls+"-yearnav-next-over");b.updateBody()},setValue:function(d){var c=this,e=c.activeYear,g=c.monthOffset,b,a;if(!d){c.value=[null,null]}else{if(Ext.isDate(d)){c.value=[d.getMonth(),d.getFullYear()]}else{c.value=[d[0],d[1]]}}if(c.rendered){b=c.value[1];if(b!==null){if((b<e||b>e+c.yearOffset)){c.activeYear=b-c.yearOffset+1}}c.updateBody()}return c},getValue:function(){return this.value},hasSelection:function(){var a=this.value;return a[0]!==null&&a[1]!==null},getYears:function(){var d=this,e=d.yearOffset,g=d.activeYear,a=g+e,c=g,b=[];for(;c<a;++c){b.push(c,c+e)}return b},updateBody:function(){var e=this,b=e.years,a=e.months,i=e.getYears(),j=e.selectedCls,g=e.getYear(null),c=e.value[0],h=e.monthOffset,d;if(e.rendered){b.removeCls(j);a.removeCls(j);b.each(function(m,l,k){d=i[k];m.dom.innerHTML=d;if(d==g){m.dom.className=j}});if(c!==null){if(c<h){c=c*2}else{c=(c-h)*2+1}a.item(c).addCls(j)}}},getYear:function(a,c){var b=this.value[1];c=c||0;return b===null?a:b+c},onBodyClick:function(d,b){var c=this,a=d.type=="dblclick";if(d.getTarget("."+c.baseCls+"-month")){d.stopEvent();c.onMonthClick(b,a)}else{if(d.getTarget("."+c.baseCls+"-year")){d.stopEvent();c.onYearClick(b,a)}}},adjustYear:function(a){if(typeof a!="number"){a=this.totalYears}this.activeYear+=a;this.updateBody()},onOkClick:function(){this.fireEvent("okclick",this,this.value)},onCancelClick:function(){this.fireEvent("cancelclick",this)},onMonthClick:function(c,a){var b=this;b.value[0]=b.resolveOffset(b.months.indexOf(c),b.monthOffset);b.updateBody();b.fireEvent("month"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},onYearClick:function(c,a){var b=this;b.value[1]=b.activeYear+b.resolveOffset(b.years.indexOf(c),b.yearOffset);b.updateBody();b.fireEvent("year"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},resolveOffset:function(a,b){if(a%2===0){return(a/2)}else{return b+Math.floor(a/2)}},beforeDestroy:function(){var a=this;a.years=a.months=null;Ext.destroyMembers(a,"backRepeater","nextRepeater","okBtn","cancelBtn");a.callParent()}});Ext.define("Ext.picker.Date",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.button.Button","Ext.button.Split","Ext.util.ClickRepeater","Ext.util.KeyNav","Ext.EventObject","Ext.fx.Manager","Ext.picker.Month"],alias:"widget.datepicker",alternateClassName:"Ext.DatePicker",renderTpl:['<div class="{cls}" id="{id}" role="grid" title="{ariaTitle} {value:this.longDay}">','<div role="presentation" class="{baseCls}-header">','<div class="{baseCls}-prev"><a id="{id}-prevEl" href="#" role="button" title="{prevText}"></a></div>','<div class="{baseCls}-month" id="{id}-middleBtnEl"></div>','<div class="{baseCls}-next"><a id="{id}-nextEl" href="#" role="button" title="{nextText}"></a></div>',"</div>",'<table id="{id}-eventEl" class="{baseCls}-inner" cellspacing="0" role="presentation">','<thead role="presentation"><tr role="presentation">','<tpl for="dayNames">','<th role="columnheader" title="{.}"><span>{.:this.firstInitial}</span></th>',"</tpl>","</tr></thead>",'<tbody role="presentation"><tr role="presentation">','<tpl for="days">',"{#:this.isEndOfWeek}",'<td role="gridcell" id="{[Ext.id()]}">','<a role="presentation" href="#" hidefocus="on" class="{parent.baseCls}-date" tabIndex="1">','<em role="presentation"><span role="presentation"></span></em>',"</a>","</td>","</tpl>","</tr></tbody>","</table>",'<tpl if="showToday">','<div id="{id}-footerEl" role="presentation" class="{baseCls}-footer"></div>',"</tpl>","</div>",{firstInitial:function(a){return a.substr(0,1)},isEndOfWeek:function(b){b--;var a=b%7===0&&b!==0;return a?'</tr><tr role="row">':""},longDay:function(a){return Ext.Date.format(a,this.longDayFormat)}}],ariaTitle:"Date Picker",todayText:"Today",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"Disabled",disabledDatesText:"Disabled",nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,disableAnim:false,baseCls:Ext.baseCSSPrefix+"datepicker",longDayFormat:"F d, Y",focusOnShow:false,focusOnSelect:true,width:178,initHour:12,numDays:42,initComponent:function(){var b=this,a=Ext.Date.clearTime;b.selectedCls=b.baseCls+"-selected";b.disabledCellCls=b.baseCls+"-disabled";b.prevCls=b.baseCls+"-prevday";b.activeCls=b.baseCls+"-active";b.nextCls=b.baseCls+"-prevday";b.todayCls=b.baseCls+"-today";b.dayNames=b.dayNames.slice(b.startDay).concat(b.dayNames.slice(0,b.startDay));this.callParent();b.value=b.value?a(b.value,true):a(new Date());b.addEvents("select");b.initDisabledDays()},onRender:function(b,a){var d=this,e=new Array(d.numDays),c=Ext.Date.format(new Date(),d.format);Ext.applyIf(d,{renderData:{}});Ext.apply(d.renderData,{dayNames:d.dayNames,ariaTitle:d.ariaTitle,value:d.value,showToday:d.showToday,prevText:d.prevText,nextText:d.nextText,days:e});d.getTpl("renderTpl").longDayFormat=d.longDayFormat;d.addChildEls("eventEl","prevEl","nextEl","middleBtnEl","footerEl");this.callParent(arguments);d.el.unselectable();d.cells=d.eventEl.select("tbody td");d.textNodes=d.eventEl.query("tbody td span");d.monthBtn=Ext.create("Ext.button.Split",{text:"",tooltip:d.monthYearText,renderTo:d.middleBtnEl});d.todayBtn=Ext.create("Ext.button.Button",{renderTo:d.footerEl,text:Ext.String.format(d.todayText,c),tooltip:Ext.String.format(d.todayTip,c),handler:d.selectToday,scope:d})},initEvents:function(){var c=this,a=Ext.Date,b=a.DAY;this.callParent();c.prevRepeater=Ext.create("Ext.util.ClickRepeater",c.prevEl,{handler:c.showPrevMonth,scope:c,preventDefault:true,stopDefault:true});c.nextRepeater=Ext.create("Ext.util.ClickRepeater",c.nextEl,{handler:c.showNextMonth,scope:c,preventDefault:true,stopDefault:true});c.keyNav=Ext.create("Ext.util.KeyNav",c.eventEl,Ext.apply({scope:c,left:function(d){if(d.ctrlKey){c.showPrevMonth()}else{c.update(a.add(c.activeDate,b,-1))}},right:function(d){if(d.ctrlKey){c.showNextMonth()}else{c.update(a.add(c.activeDate,b,1))}},up:function(d){if(d.ctrlKey){c.showNextYear()}else{c.update(a.add(c.activeDate,b,-7))}},down:function(d){if(d.ctrlKey){c.showPrevYear()}else{c.update(a.add(c.activeDate,b,7))}},pageUp:c.showNextMonth,pageDown:c.showPrevMonth,enter:function(d){d.stopPropagation();return true}},c.keyNavConfig));if(c.showToday){c.todayKeyListener=c.eventEl.addKeyListener(Ext.EventObject.SPACE,c.selectToday,c)}c.mon(c.eventEl,"mousewheel",c.handleMouseWheel,c);c.mon(c.eventEl,"click",c.handleDateClick,c,{delegate:"a."+c.baseCls+"-date"});c.mon(c.monthBtn,"click",c.showMonthPicker,c);c.mon(c.monthBtn,"arrowclick",c.showMonthPicker,c);c.update(c.value)},initDisabledDays:function(){var d=this,b=d.disabledDates,c="(?:",a;if(!d.disabledDatesRE&&b){a=b.length-1;Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.String.escapeRegex(Ext.Date.dateFormat(g,d.format))+"$":b[e];if(e!=a){c+="|"}},d);d.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){var b=this;if(Ext.isArray(a)){b.disabledDates=a;b.disabledDatesRE=null}else{b.disabledDatesRE=a}b.initDisabledDays();b.update(b.value,true);return b},setDisabledDays:function(a){this.disabledDays=a;return this.update(this.value,true)},setMinDate:function(a){this.minDate=a;return this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;return this.update(this.value,true)},setValue:function(a){this.value=Ext.Date.clearTime(a,true);return this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(){this.callParent();this.setDisabledStatus(false);this.update(this.activeDate)},onDisable:function(){this.callParent();this.setDisabledStatus(true)},setDisabledStatus:function(a){var b=this;b.keyNav.setDisabled(a);b.prevRepeater.setDisabled(a);b.nextRepeater.setDisabled(a);if(b.showToday){b.todayKeyListener.setDisabled(a);b.todayBtn.setDisabled(a)}},getActive:function(){return this.activeDate||this.value},runAnimation:function(c){var b=this.monthPicker,a={duration:200,callback:function(){if(c){b.hide()}else{b.show()}}};if(c){b.el.slideOut("t",a)}else{b.el.slideIn("t",a)}},hideMonthPicker:function(a){var c=this,b=c.monthPicker;if(b){if(c.shouldAnimate(a)){c.runAnimation(true)}else{b.hide()}}return c},showMonthPicker:function(a){var c=this,b;if(c.rendered&&!c.disabled){b=c.createMonthPicker();b.setValue(c.getActive());b.setSize(c.getSize());b.setPosition(-1,-1);if(c.shouldAnimate(a)){c.runAnimation(false)}else{b.show()}}return c},shouldAnimate:function(a){return Ext.isDefined(a)?a:!this.disableAnim},createMonthPicker:function(){var b=this,a=b.monthPicker;if(!a){b.monthPicker=a=Ext.create("Ext.picker.Month",{renderTo:b.el,floating:true,shadow:false,small:b.showToday===false,listeners:{scope:b,cancelclick:b.onCancelClick,okclick:b.onOkClick,yeardblclick:b.onOkClick,monthdblclick:b.onOkClick}});if(!b.disableAnim){a.el.setStyle("display","none")}b.on("beforehide",Ext.Function.bind(b.hideMonthPicker,b,[false]))}return a},onOkClick:function(b,e){var d=this,g=e[0],c=e[1],a=new Date(c,g,d.getActive().getDate());if(a.getMonth()!==g){a=new Date(c,g,1).getLastDateOfMonth()}d.update(a);d.hideMonthPicker()},onCancelClick:function(){this.hideMonthPicker()},showPrevMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,-1))},showNextMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,1))},showPrevYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,-1))},showNextYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(d,a){var c=this,b=c.handler;d.stopEvent();if(!c.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasCls(c.disabledCellCls)){c.cancelFocus=c.focusOnSelect===false;c.setValue(new Date(a.dateValue));delete c.cancelFocus;c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}},onSelect:function(){if(this.hideOnSelect){this.hide()}},selectToday:function(){var c=this,a=c.todayBtn,b=c.handler;if(a&&!a.disabled){c.setValue(Ext.Date.clearTime(new Date()));c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}return c},selectedUpdate:function(c,g){var e=this,d=c.getTime(),b=e.cells,a=e.selectedCls;b.removeCls(a);b.each(function(h){if(h.dom.firstChild.dateValue==d){e.el.dom.setAttribute("aria-activedescendent",h.dom.id);h.addCls(a);if(e.isVisible()&&!e.cancelFocus){Ext.fly(h.dom.firstChild).focus(50)}return false}},this)},fullUpdate:function(D,m){var G=this,g=G.cells.elements,d=G.textNodes,I=G.disabledCellCls,p=Ext.Date,y=0,F=0,e=G.isVisible(),w=+p.clearTime(D,true),B=+p.clearTime(new Date()),v=G.minDate?p.clearTime(G.minDate,true):Number.NEGATIVE_INFINITY,x=G.maxDate?p.clearTime(G.maxDate,true):Number.POSITIVE_INFINITY,E=G.disabledDatesRE,u=G.disabledDatesText,J=G.disabledDays?G.disabledDays.join(""):false,C=G.disabledDaysText,z=G.format,l=p.getDaysInMonth(D),r=p.getFirstDateOfMonth(D),h=r.getDay()-G.startDay,A=p.add(D,p.MONTH,-1),b=G.longDayFormat,k,s,a,H,n,q,c,j,t;if(h<0){h+=7}l+=h;k=p.getDaysInMonth(A)-h;s=new Date(A.getFullYear(),A.getMonth(),k,G.initHour);if(G.showToday){H=p.clearTime(new Date());a=(H<v||H>x||(E&&z&&E.test(p.dateFormat(H,z)))||(J&&J.indexOf(H.getDay())!=-1));if(!G.disabled){G.todayBtn.setDisabled(a);G.todayKeyListener.setDisabled(a)}}n=function(i){t=+p.clearTime(s,true);i.title=p.format(s,b);i.firstChild.dateValue=t;if(t==B){i.className+=" "+G.todayCls;i.title=G.todayText}if(t==w){i.className+=" "+G.selectedCls;G.el.dom.setAttribute("aria-activedescendant",i.id);if(e&&G.floating){Ext.fly(i.firstChild).focus(50)}}if(t<v){i.className=I;i.title=G.minText;return}if(t>x){i.className=I;i.title=G.maxText;return}if(J){if(J.indexOf(s.getDay())!=-1){i.title=C;i.className=I}}if(E&&z){j=p.dateFormat(s,z);if(E.test(j)){i.title=u.replace("%0",j);i.className=I}}};for(;y<G.numDays;++y){if(y<h){q=(++k);c=G.prevCls}else{if(y>=l){q=(++F);c=G.nextCls}else{q=y-h+1;c=G.activeCls}}d[y].innerHTML=q;g[y].className=c;s.setDate(s.getDate()+1);n(g[y])}G.monthBtn.setText(G.monthNames[D.getMonth()]+" "+D.getFullYear())},update:function(a,d){var b=this,c=b.activeDate;if(b.rendered){b.activeDate=a;if(!d&&c&&b.el&&c.getMonth()==a.getMonth()&&c.getFullYear()==a.getFullYear()){b.selectedUpdate(a,c)}else{b.fullUpdate(a,c)}}return b},beforeDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.todayKeyListener,a.keyNav,a.monthPicker,a.monthBtn,a.nextRepeater,a.prevRepeater,a.todayBtn);delete a.textNodes;delete a.cells.elements}a.callParent()},onShow:function(){this.callParent(arguments);if(this.focusOnShow){this.focus()}}},function(){var a=this.prototype;a.monthNames=Ext.Date.monthNames;a.dayNames=Ext.Date.dayNames;a.format=Ext.Date.defaultFormat});Ext.define("Ext.form.field.Date",{extend:"Ext.form.field.Picker",alias:"widget.datefield",requires:["Ext.picker.Date"],alternateClassName:["Ext.form.DateField","Ext.form.Date"],format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",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}",triggerCls:Ext.baseCSSPrefix+"form-date-trigger",showToday:true,initTime:"12",initTimeFormat:"H",matchFieldWidth:false,startDay:0,initComponent:function(){var d=this,b=Ext.isString,c,a;c=d.minValue;a=d.maxValue;if(b(c)){d.minValue=d.parseDate(c)}if(b(a)){d.maxValue=d.parseDate(a)}d.disabledDatesRE=null;d.initDisabledDays();d.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.String.escapeRegex(g.dateFormat(this.format))+"$":b[e];if(e!==a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){var c=this,b=c.picker;c.disabledDates=a;c.initDisabledDays();if(b){b.setDisabledDates(c.disabledDatesRE)}},setDisabledDays:function(a){var b=this.picker;this.disabledDays=a;if(b){b.setDisabledDays(a)}},setMinValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.minValue=d;if(a){a.minText=Ext.String.format(b.minText,b.formatDate(b.minValue));a.setMinDate(d)}},setMaxValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.maxValue=d;if(a){a.maxText=Ext.String.format(b.maxText,b.formatDate(b.maxValue));a.setMaxDate(d)}},getErrors:function(r){var j=this,q=Ext.String.format,k=Ext.Date.clearTime,p=j.callParent(arguments),n=j.disabledDays,d=j.disabledDatesRE,m=j.minValue,h=j.maxValue,g=n?n.length:0,e=0,a,b,l,c;r=j.formatDate(r||j.processRawValue(j.getRawValue()));if(r===null||r.length<1){return p}a=r;r=j.parseDate(r);if(!r){p.push(q(j.invalidText,a,j.format));return p}c=r.getTime();if(m&&c<k(m).getTime()){p.push(q(j.minText,j.formatDate(m)))}if(h&&c>k(h).getTime()){p.push(q(j.maxText,j.formatDate(h)))}if(n){l=r.getDay();for(;e<g;e++){if(l===n[e]){p.push(j.disabledDaysText);break}}}b=j.formatDate(r);if(d&&d.test(b)){p.push(q(j.disabledDatesText,b))}return p},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},safeParse:function(e,g){var d=this,b=Ext.Date,c,a=null;if(b.formatContainsHourInfo(g)){a=b.parse(e,g)}else{c=b.parse(e+" "+d.initTime,g+" "+d.initTimeFormat);if(c){a=b.clearTime(c)}}return a},getSubmitValue:function(){var b=this.submitFormat||this.format,a=this.getValue();return a?Ext.Date.format(a,b):""},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},formatDate:function(a){return Ext.isDate(a)?Ext.Date.dateFormat(a,this.format):a},createPicker:function(){var a=this,b=Ext.String.format;return Ext.create("Ext.picker.Date",{pickerField:a,ownerCt:a.ownerCt,renderTo:document.body,floating:true,hidden:true,focusOnShow:true,minDate:a.minValue,maxDate:a.maxValue,disabledDatesRE:a.disabledDatesRE,disabledDatesText:a.disabledDatesText,disabledDays:a.disabledDays,disabledDaysText:a.disabledDaysText,format:a.format,showToday:a.showToday,startDay:a.startDay,minText:b(a.minText,a.formatDate(a.minValue)),maxText:b(a.maxText,a.formatDate(a.maxValue)),listeners:{scope:a,select:a.onSelect},keyNavConfig:{esc:function(){a.collapse()}}})},onSelect:function(a,c){var b=this;b.setValue(c);b.fireEvent("select",b,c);b.collapse()},onExpand:function(){var a=this.getValue();this.picker.setValue(Ext.isDate(a)?a:new Date())},onCollapse:function(){this.focus(false,60)},beforeBlur:function(){var c=this,a=c.parseDate(c.getRawValue()),b=c.focusTask;if(b){b.cancel()}if(a){c.setValue(a)}}});Ext.define("Ext.form.field.Display",{extend:"Ext.form.field.Base",alias:"widget.displayfield",requires:["Ext.util.Format","Ext.XTemplate"],alternateClassName:["Ext.form.DisplayField","Ext.form.Display"],fieldSubTpl:['<div id="{id}" class="{fieldCls}"></div>',{compiled:true,disableFormats:true}],fieldCls:Ext.baseCSSPrefix+"form-display-field",htmlEncode:false,validateOnChange:false,initEvents:Ext.emptyFn,submitValue:false,isValid:function(){return true},validate:function(){return true},getRawValue:function(){return this.rawValue},setRawValue:function(b){var a=this;b=Ext.value(b,"");a.rawValue=b;if(a.rendered){a.inputEl.dom.innerHTML=a.htmlEncode?Ext.util.Format.htmlEncode(b):b}return b},getContentTarget:function(){return this.inputEl}});Ext.define("Ext.form.field.File",{extend:"Ext.form.field.Text",alias:["widget.filefield","widget.fileuploadfield"],alternateClassName:["Ext.form.FileUploadField","Ext.ux.form.FileUploadField","Ext.form.File"],uses:["Ext.button.Button","Ext.layout.component.field.File"],buttonText:"Browse...",buttonOnly:false,buttonMargin:3,fieldBodyCls:Ext.baseCSSPrefix+"form-file-wrap",readOnly:true,componentLayout:"filefield",onRender:function(){var a=this,b;a.callParent(arguments);a.createButton();a.createFileInput();if(a.disabled){a.disableItems()}b=a.inputEl;b.dom.removeAttribute("name");if(a.buttonOnly){b.setDisplayed(false)}},createButton:function(){var a=this;a.button=Ext.widget("button",Ext.apply({ui:a.ui,renderTo:a.bodyEl,text:a.buttonText,cls:Ext.baseCSSPrefix+"form-file-btn",preventDefault:false,style:a.buttonOnly?"":"margin-left:"+a.buttonMargin+"px"},a.buttonConfig))},createFileInput:function(){var a=this;a.fileInputEl=a.button.el.createChild({name:a.getName(),cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1}).on("change",a.onFileChange,a)},onFileChange:function(){this.lastValue=null;Ext.form.field.File.superclass.setValue.call(this,this.fileInputEl.dom.value)},setValue:Ext.emptyFn,reset:function(){var a=this;if(a.rendered){a.fileInputEl.remove();a.createFileInput();a.inputEl.dom.value=""}a.callParent()},onDisable:function(){this.callParent();this.disableItems()},disableItems:function(){var b=this.fileInputEl,a=this.button;if(b){b.dom.disabled=true}if(a){a.disable()}},onEnable:function(){var a=this;a.callParent();a.fileInputEl.dom.disabled=false;a.button.enable()},isFileUpload:function(){return true},extractFileInput:function(){var a=this.fileInputEl.dom;this.reset();return a},onDestroy:function(){Ext.destroyMembers(this,"fileInputEl","button");this.callParent()}});Ext.define("Ext.form.field.Hidden",{extend:"Ext.form.field.Base",alias:["widget.hiddenfield","widget.hidden"],alternateClassName:"Ext.form.Hidden",inputType:"hidden",hideLabel:true,initComponent:function(){this.formItemCls+="-hidden";this.callParent()},isEqual:function(b,a){return this.isEqualAsString(b,a)},initEvents:Ext.emptyFn,setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.picker.Color",{extend:"Ext.Component",requires:"Ext.XTemplate",alias:"widget.colorpicker",alternateClassName:"Ext.ColorPalette",componentCls:Ext.baseCSSPrefix+"color-picker",selectedCls:Ext.baseCSSPrefix+"color-picker-selected",value:null,clickEvent:"click",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,renderTpl:['<tpl for="colors">','<a href="#" class="color-{.}" hidefocus="on">','<em><span style="background:#{.}" unselectable="on">&#160;</span></em>',"</a>","</tpl>"],initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("select");if(a.handler){a.on("select",a.handler,a.scope,true)}},onRender:function(c,b){var d=this,a=d.clickEvent;Ext.apply(d.renderData,{itemCls:d.itemCls,colors:d.colors});d.callParent(arguments);d.mon(d.el,a,d.handleClick,d,{delegate:"a"});if(a!="click"){d.mon(d.el,"click",Ext.emptyFn,d,{delegate:"a",stopEvent:true})}},afterRender:function(){var a=this,b;a.callParent(arguments);if(a.value){b=a.value;a.value=null;a.select(b,true)}},handleClick:function(c,d){var b=this,a;c.stopEvent();if(!b.disabled){a=d.className.match(b.colorRe)[1];b.select(a.toUpperCase())}},select:function(b,a){var d=this,g=d.selectedCls,e=d.value,c;b=b.replace("#","");if(!d.rendered){d.value=b;return}if(b!=e||d.allowReselect){c=d.el;if(d.value){c.down("a.color-"+e).removeCls(g)}c.down("a.color-"+b).addCls(g);d.value=b;if(a!==true){d.fireEvent("select",d,b)}}},getValue:function(){return this.value||null}});Ext.define("Ext.layout.component.field.HtmlEditor",{extend:"Ext.layout.component.field.Field",alias:["layout.htmleditor"],type:"htmleditor",sizeBodyContents:function(a,i){var e=this,b=e.owner,j=b.bodyEl,g=b.getToolbar(),h=b.textareaEl,c=b.iframeEl,d;if(Ext.isNumber(a)){a-=j.getFrameWidth("lr")}g.setWidth(a);h.setWidth(a);c.setWidth(a);if(Ext.isNumber(i)){d=i-g.getHeight()-j.getFrameWidth("tb");h.setHeight(d);c.setHeight(d)}}});Ext.define("Ext.form.field.HtmlEditor",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.htmleditor",alternateClassName:"Ext.form.HtmlEditor",requires:["Ext.tip.QuickTipManager","Ext.picker.Color","Ext.toolbar.Item","Ext.toolbar.Toolbar","Ext.util.Format","Ext.layout.component.field.HtmlEditor"],fieldSubTpl:['<div id="{cmpId}-toolbarWrap" class="{toolbarWrapCls}"></div>','<textarea id="{cmpId}-textareaEl" name="{name}" tabIndex="-1" class="{textareaCls}" ','style="{size}" autocomplete="off"></textarea>','<iframe id="{cmpId}-iframeEl" name="{iframeName}" frameBorder="0" style="overflow:auto;{size}" src="{iframeSrc}"></iframe>',{compiled:true,disableFormats:true}],enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&#160;":"&#8203;",fieldBodyCls:Ext.baseCSSPrefix+"html-editor-wrap",componentLayout:"htmleditor",initialized:false,activated:false,sourceEditMode:false,iframePad:3,hideMode:"offsets",maskOnDisable:true,initComponent:function(){var a=this;a.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange");a.callParent(arguments);a.initLabelable();a.initField()},createToolbar:function(e){var h=this,g=[],j=Ext.tip.QuickTipManager&&Ext.tip.QuickTipManager.isEnabled(),d=Ext.baseCSSPrefix,c,i,b;function a(m,k,l){return{itemId:m,cls:d+"btn-icon",iconCls:d+"edit-"+m,enableToggle:k!==false,scope:e,handler:l||e.relayBtnCmd,clickEvent:"mousedown",tooltip:j?e.buttonTips[m]||b:b,overflowText:e.buttonTips[m].title||b,tabIndex:-1}}if(h.enableFont&&!Ext.isSafari2){c=Ext.widget("component",{renderTpl:['<select id="{id}-selectEl" class="{cls}">','<tpl for="fonts">','<option value="{[values.toLowerCase()]}" style="font-family:{.}"<tpl if="values.toLowerCase()==parent.defaultFont"> selected</tpl>>{.}</option>',"</tpl>","</select>"],renderData:{cls:d+"font-select",fonts:h.fontFamilies,defaultFont:h.defaultFont},childEls:["selectEl"],onDisable:function(){var k=this.selectEl;if(k){k.dom.disabled=true}Ext.Component.superclass.onDisable.apply(this,arguments)},onEnable:function(){var k=this.selectEl;if(k){k.dom.disabled=false}Ext.Component.superclass.onEnable.apply(this,arguments)}});g.push(c,"-")}if(h.enableFormat){g.push(a("bold"),a("italic"),a("underline"))}if(h.enableFontSize){g.push("-",a("increasefontsize",false,h.adjustFont),a("decreasefontsize",false,h.adjustFont))}if(h.enableColors){g.push("-",{itemId:"forecolor",cls:d+"btn-icon",iconCls:d+"edit-forecolor",overflowText:e.buttonTips.forecolor.title,tooltip:j?e.buttonTips.forecolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,clickEvent:"mousedown",handler:function(l,k){h.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+k:k);h.deferFocus();this.up("menu").hide()}}]})},{itemId:"backcolor",cls:d+"btn-icon",iconCls:d+"edit-backcolor",overflowText:e.buttonTips.backcolor.title,tooltip:j?e.buttonTips.backcolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,clickEvent:"mousedown",handler:function(l,k){if(Ext.isGecko){h.execCmd("useCSS",false);h.execCmd("hilitecolor",k);h.execCmd("useCSS",true);h.deferFocus()}else{h.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+k:k);h.deferFocus()}this.up("menu").hide()}}]})})}if(h.enableAlignments){g.push("-",a("justifyleft"),a("justifycenter"),a("justifyright"))}if(!Ext.isSafari2){if(h.enableLinks){g.push("-",a("createlink",false,h.createLink))}if(h.enableLists){g.push("-",a("insertorderedlist"),a("insertunorderedlist"))}if(h.enableSourceEdit){g.push("-",a("sourceedit",true,function(k){h.toggleSourceEdit(!h.sourceEditMode)}))}}i=Ext.widget("toolbar",{renderTo:h.toolbarWrap,enableOverflow:true,items:g});if(c){h.fontSelect=c.selectEl;h.mon(h.fontSelect,"change",function(){h.relayCmd("fontname",h.fontSelect.dom.value);h.deferFocus()})}h.mon(i.el,"click",function(k){k.preventDefault()});h.toolbar=i},onDisable:function(){this.bodyEl.mask();this.callParent(arguments)},onEnable:function(){this.bodyEl.unmask();this.callParent(arguments)},setReadOnly:function(e){var d=this,c=d.textareaEl,b=d.iframeEl,a;d.readOnly=e;if(c){c.dom.readOnly=e}if(d.initialized){a=d.getEditorBody();if(Ext.isIE){b.setDisplayed(false);a.contentEditable=!e;b.setDisplayed(true)}else{d.setDesignMode(!e)}if(a){a.style.cursor=e?"default":"text"}d.disableItems(e)}},getDocMarkup:function(){var b=this,a=b.iframeEl.getHeight()-b.iframePad*2;return Ext.String.format('<html><head><style type="text/css">body{border:0;margin:0;padding:{0}px;height:{1}px;box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;cursor:text}</style></head><body></body></html>',b.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return(!Ext.isIE&&this.iframeEl.dom.contentDocument)||this.getWin().document},getWin:function(){return Ext.isIE?this.iframeEl.dom.contentWindow:window.frames[this.iframeEl.dom.name]},onRender:function(){var a=this;a.onLabelableRender();a.addChildEls("toolbarWrap","iframeEl","textareaEl");a.callParent(arguments);a.textareaEl.dom.value=a.value||"";a.monitorTask=Ext.TaskManager.start({run:a.checkDesignMode,scope:a,interval:100});a.createToolbar(a);a.disableItems(true)},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getSubTplData:function(){var a=Ext.baseCSSPrefix;return{cmpId:this.id,id:this.getInputId(),toolbarWrapCls:a+"html-editor-tb",textareaCls:a+"hidden",iframeName:Ext.id(),iframeSrc:Ext.SSL_SECURE_URL,size:"height:100px;"}},getSubTplMarkup:function(){var a=this.getSubTplData();return this.getTpl("fieldSubTpl").apply(a)},getBodyNaturalWidth:function(){return 565},initFrameDoc:function(){var b=this,c,a;Ext.TaskManager.stop(b.monitorTask);c=b.getDoc();b.win=b.getWin();c.open();c.write(b.getDocMarkup());c.close();a={run:function(){var d=b.getDoc();if(d.body||d.readyState==="complete"){Ext.TaskManager.stop(a);b.setDesignMode(true);Ext.defer(b.initEditor,10,b)}},interval:10,duration:10000,scope:b};Ext.TaskManager.start(a)},checkDesignMode:function(){var a=this,b=a.getDoc();if(b&&(!b.editorInitialized||a.getDesignMode()!=="on")){a.initFrameDoc()}},setDesignMode:function(c){var a=this,b=a.getDoc();if(b){if(a.readOnly){c=false}b.designMode=(/on|true/i).test(String(c).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();return !a?"":String(a.designMode).toLowerCase()},disableItems:function(a){this.getToolbar().items.each(function(b){if(b.getItemId()!=="sourceedit"){b.setDisabled(a)}})},toggleSourceEdit:function(b){var g=this,d=g.iframeEl,a=g.textareaEl,e=Ext.baseCSSPrefix+"hidden",c=g.getToolbar().getComponent("sourceedit");if(!Ext.isBoolean(b)){b=!g.sourceEditMode}g.sourceEditMode=b;if(c.pressed!==b){c.toggle(b)}if(b){g.disableItems(true);g.syncValue();d.addCls(e);a.removeCls(e);a.dom.removeAttribute("tabIndex");a.focus()}else{if(g.initialized){g.disableItems(g.readOnly)}g.pushValue();d.removeCls(e);a.addCls(e);a.dom.setAttribute("tabIndex",-1);g.deferFocus()}g.fireEvent("editmodechange",g,b);g.doComponentLayout()},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!=="http://"){this.relayCmd("createlink",a)}},clearInvalid:Ext.emptyFn,setValue:function(c){var b=this,a=b.textareaEl;b.mixins.field.setValue.call(b,c);if(c===null||c===undefined){c=""}if(a){a.dom.value=c}b.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)===this.defaultValue.replace(/\D/g,"")){a=a.substring(1)}return a},syncValue:function(){var e=this,b,d,a,c;if(e.initialized){b=e.getEditorBody();d=b.innerHTML;if(Ext.isWebKit){a=b.getAttribute("style");c=a.match(/text-align:(.*?);/i);if(c&&c[1]){d='<div style="'+c[0]+'">'+d+"</div>"}}d=e.cleanHtml(d);if(e.fireEvent("beforesync",e,d)!==false){e.textareaEl.dom.value=d;e.fireEvent("sync",e,d)}}},getValue:function(){var a=this,b;if(!a.sourceEditMode){a.syncValue()}b=a.rendered?a.textareaEl.dom.value:a.value;a.value=b;return b},pushValue:function(){var b=this,a;if(b.initialized){a=b.textareaEl.dom.value||"";if(!b.activated&&a.length<1){a=b.defaultValue}if(b.fireEvent("beforepush",b,a)!==false){b.getEditorBody().innerHTML=a;if(Ext.isGecko){b.setDesignMode(false);b.setDesignMode(true)}b.fireEvent("push",b,a)}}},deferFocus:function(){this.focus(false,true)},getFocusEl:function(){var a=this,b=a.win;return b&&!a.sourceEditMode?b:a.textareaEl},initEditor:function(){try{var g=this,d=g.getEditorBody(),b=g.textareaEl.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),i,c;b["background-attachment"]="fixed";d.bgProperties="fixed";Ext.DomHelper.applyStyles(d,b);i=g.getDoc();if(i){try{Ext.EventManager.removeAll(i)}catch(h){}}c=Ext.Function.bind(g.onEditorEvent,g);Ext.EventManager.on(i,{mousedown:c,dblclick:c,click:c,keyup:c,buffer:100});c=g.onRelayedEvent;Ext.EventManager.on(i,{mousedown:c,mousemove:c,mouseup:c,click:c,dblclick:c,scope:g});if(Ext.isGecko){Ext.EventManager.on(i,"keypress",g.applyCommand,g)}if(g.fixKeys){Ext.EventManager.on(i,"keydown",g.fixKeys,g)}Ext.EventManager.on(window,"unload",g.beforeDestroy,g);i.editorInitialized=true;g.initialized=true;g.pushValue();g.setReadOnly(g.readOnly);g.fireEvent("initialize",g)}catch(a){}},beforeDestroy:function(){var a=this,d=a.monitorTask,c,g;if(d){Ext.TaskManager.stop(d)}if(a.rendered){try{c=a.getDoc();if(c){Ext.EventManager.removeAll(c);for(g in c){if(c.hasOwnProperty(g)){delete c[g]}}}}catch(b){}Ext.destroyMembers(a,"tb","toolbarWrap","iframeEl","textareaEl")}a.callParent()},onRelayedEvent:function(c){var b=this.iframeEl,d=b.getXY(),a=c.getXY();c.xy=[d[0]+a[0],d[1]+a[1]];c.injectEvent(b);c.xy=a},onFirstFocus:function(){var c=this,b,a;c.activated=true;c.disableItems(c.readOnly);if(Ext.isGecko){c.win.focus();b=c.win.getSelection();if(!b.focusNode||b.focusNode.nodeType!==3){a=b.getRangeAt(0);a.selectNodeContents(c.getEditorBody());a.collapse(true);c.deferFocus()}try{c.execCmd("useCSS",true);c.execCmd("styleWithCSS",false)}catch(d){}}c.fireEvent("activate",c)},adjustFont:function(d){var e=d.getItemId()==="increasefontsize"?1:-1,c=this.getDoc().queryCommandValue("FontSize")||"2",a=Ext.isString(c)&&c.indexOf("px")!==-1,b;c=parseInt(c,10);if(a){if(c<=10){c=1+e}else{if(c<=13){c=2+e}else{if(c<=16){c=3+e}else{if(c<=18){c=4+e}else{if(c<=24){c=5+e}else{c=6+e}}}}}c=Ext.Number.constrain(c,1,6)}else{b=Ext.isSafari;if(b){e*=2}c=Math.max(1,c+e)+(b?"px":0)}this.execCmd("FontSize",c)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){var e=this,d,g,a,c;if(e.readOnly){return}if(!e.activated){e.onFirstFocus();return}d=e.getToolbar().items.map;g=e.getDoc();if(e.enableFont&&!Ext.isSafari2){a=(g.queryCommandValue("FontName")||e.defaultFont).toLowerCase();c=e.fontSelect.dom;if(a!==c.value){c.value=a}}function b(){Ext.Array.forEach(Ext.Array.toArray(arguments),function(h){d[h].toggle(g.queryCommandState(h))})}if(e.enableFormat){b("bold","italic","underline")}if(e.enableAlignments){b("justifyleft","justifycenter","justifyright")}if(!Ext.isSafari2&&e.enableLists){b("insertorderedlist","insertunorderedlist")}Ext.menu.Manager.hideAll();e.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){Ext.defer(function(){var c=this;c.focus();c.execCmd(b,a);c.updateToolbar()},10,this)},execCmd:function(d,c){var b=this,e=b.getDoc(),a;e.execCommand(d,false,c===a?null:c);b.syncValue()},applyCommand:function(d){if(d.ctrlKey){var a=this,g=d.getCharCode(),b;if(g>0){g=String.fromCharCode(g);switch(g){case"b":b="bold";break;case"i":b="italic";break;case"u":b="underline";break}if(b){a.win.focus();a.execCmd(b);a.deferFocus();d.preventDefault()}}}},insertAtCursor:function(c){var b=this,a;if(b.activated){b.win.focus();if(Ext.isIE){a=b.getDoc().selection.createRange();if(a){a.pasteHTML(c);b.syncValue();b.deferFocus()}}else{b.execCmd("InsertHTML",c);b.deferFocus()}}},fixKeys:function(){if(Ext.isIE){return function(h){var c=this,b=h.getKey(),g=c.getDoc(),a,d;if(b===h.TAB){h.stopEvent();a=g.selection.createRange();if(a){a.collapse(true);a.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");c.deferFocus()}}else{if(b===h.ENTER){a=g.selection.createRange();if(a){d=a.parentElement();if(!d||d.tagName.toLowerCase()!=="li"){h.stopEvent();a.pasteHTML("<br />");a.collapse(false);a.select()}}}}}}if(Ext.isOpera){return function(b){var a=this;if(b.getKey()===b.TAB){b.stopEvent();a.win.focus();a.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");a.deferFocus()}}}if(Ext.isWebKit){return function(c){var b=this,a=c.getKey();if(a===c.TAB){c.stopEvent();b.execCmd("InsertText","\t");b.deferFocus()}else{if(a===c.ENTER){c.stopEvent();b.execCmd("InsertHtml","<br /><br />");b.deferFocus()}}}}return null}(),getToolbar:function(){return this.toolbar},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:Ext.baseCSSPrefix+"html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:Ext.baseCSSPrefix+"html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:Ext.baseCSSPrefix+"html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:Ext.baseCSSPrefix+"html-editor-tip"}}});Ext.define("Ext.form.field.Radio",{extend:"Ext.form.field.Checkbox",alias:["widget.radiofield","widget.radio"],alternateClassName:"Ext.form.Radio",requires:["Ext.form.RadioManager"],isRadio:true,inputType:"radio",ariaRole:"radio",getGroupValue:function(){var a=this.getManager().getChecked(this.name);return a?a.inputValue:null},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(true)}},setValue:function(a){var b=this,c;if(Ext.isBoolean(a)){b.callParent(arguments)}else{c=b.getManager().getWithValue(b.name,a).getAt(0);if(c){c.setValue(true)}}return b},getSubmitValue:function(){return this.checked?this.inputValue:null},getModelData:function(){return this.getSubmitData()},onChange:function(b,a){var c=this;c.callParent(arguments);if(b){this.getManager().getByName(c.name).each(function(d){if(d!==c){d.setValue(false)}},c)}},getManager:function(){return Ext.form.RadioManager}});Ext.define("Ext.picker.Time",{extend:"Ext.view.BoundList",alias:"widget.timepicker",requires:["Ext.data.Store","Ext.Date"],increment:15,format:"g:i A",displayField:"disp",initDate:[2008,0,1],componentCls:Ext.baseCSSPrefix+"timepicker",loadMask:false,initComponent:function(){var c=this,a=Ext.Date,b=a.clearTime,d=c.initDate;c.absMin=b(new Date(d[0],d[1],d[2]));c.absMax=a.add(b(new Date(d[0],d[1],d[2])),"mi",(24*60)-1);c.store=c.createStore();c.updateList();c.callParent()},setMinValue:function(a){this.minValue=a;this.updateList()},setMaxValue:function(a){this.maxValue=a;this.updateList()},normalizeDate:function(a){var b=this.initDate;a.setFullYear(b[0],b[1],b[2]);return a},updateList:function(){var c=this,b=c.normalizeDate(c.minValue||c.absMin),a=c.normalizeDate(c.maxValue||c.absMax);c.store.filterBy(function(d){var e=d.get("date");return e>=b&&e<=a})},createStore:function(){var d=this,c=Ext.Date,e=[],b=d.absMin,a=d.absMax;while(b<=a){e.push({disp:c.dateFormat(b,d.format),date:b});b=c.add(b,"mi",d.increment)}return Ext.create("Ext.data.Store",{fields:["disp","date"],data:e})}});Ext.define("Ext.form.field.Time",{extend:"Ext.form.field.Picker",alias:"widget.timefield",requires:["Ext.form.field.Date","Ext.picker.Time","Ext.view.BoundListKeyNav","Ext.Date"],alternateClassName:["Ext.form.TimeField","Ext.form.Time"],triggerCls:Ext.baseCSSPrefix+"form-time-trigger",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 A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,pickerMaxHeight:300,selectOnTab:true,initDate:"1/1/2008",initDateFormat:"j/n/Y",initComponent:function(){var c=this,b=c.minValue,a=c.maxValue;if(b){c.setMinValue(b)}if(a){c.setMaxValue(a)}this.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},setMinValue:function(c){var b=this,a=b.picker;b.setLimit(c,true);if(a){a.setMinValue(b.minValue)}},setMaxValue:function(c){var b=this,a=b.picker;b.setLimit(c,false);if(a){a.setMaxValue(b.maxValue)}},setLimit:function(b,g){var a=this,e,c;if(Ext.isString(b)){e=a.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){c=Ext.Date.clearTime(new Date(a.initDate));c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());a[g?"minValue":"maxValue"]=c}},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},getErrors:function(d){var b=this,g=Ext.String.format,h=b.callParent(arguments),c=b.minValue,e=b.maxValue,a;d=b.formatDate(d||b.processRawValue(b.getRawValue()));if(d===null||d.length<1){return h}a=b.parseDate(d);if(!a){h.push(g(b.invalidText,d,b.format));return h}if(c&&a<c){h.push(g(b.minText,b.formatDate(c)))}if(e&&a>e){h.push(g(b.maxText,b.formatDate(e)))}return h},formatDate:function(){return Ext.form.field.Date.prototype.formatDate.apply(this,arguments)},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},safeParse:function(e,g){var d=this,b=Ext.Date,c,a=null;if(b.formatContainsDateInfo(g)){a=b.parse(e,g)}else{c=b.parse(d.initDate+" "+e,d.initDateFormat+" "+g);if(c){a=c}}return a},getSubmitValue:function(){var a=this,c=a.submitFormat||a.format,b=a.getValue();return b?Ext.Date.format(b,c):null},createPicker:function(){var b=this,a=Ext.create("Ext.picker.Time",{pickerField:b,selModel:{mode:"SINGLE"},floating:true,hidden:true,minValue:b.minValue,maxValue:b.maxValue,increment:b.increment,format:b.format,ownerCt:this.ownerCt,renderTo:document.body,maxHeight:b.pickerMaxHeight,focusOnToFront:false});b.mon(a.getSelectionModel(),{selectionchange:b.onListSelect,scope:b});return a},onExpand:function(){var d=this,a=d.pickerKeyNav,c=d.selectOnTab,b=d.getPicker(),e=b.getSelectionModel().lastSelected,g;if(!a){a=d.pickerKeyNav=Ext.create("Ext.view.BoundListKeyNav",this.inputEl,{boundList:b,forceKeyDown:true,tab:function(h){if(c){if(d.picker.highlightedItem){this.selectHighlighted(h)}else{d.collapse()}d.triggerBlur()}return true}});if(c){d.ignoreMonitorTab=true}}Ext.defer(a.enable,1,a);if(e){g=b.getNode(e);if(g){b.highlightItem(g);b.el.scrollChildIntoView(g,false)}}},onCollapse:function(){var b=this,a=b.pickerKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},onChange:function(){var b=this,a=b.picker;b.callParent(arguments);if(a){a.clearHighlight()}},onListSelect:function(c,e){var b=this,a=e[0],d=a?a.get("date"):null;b.setValue(d);b.fireEvent("select",b,d);b.picker.clearHighlight();b.collapse();b.inputEl.focus()}});Ext.define("Ext.grid.CellEditor",{extend:"Ext.Editor",constructor:function(a){a=Ext.apply({},a);if(a.field){a.field.monitorTab=false}if(!Ext.isDefined(a.autoSize)){a.autoSize={width:"boundEl"}}this.callParent([a])},onShow:function(){var a=this.boundEl.first();if(a){a.hide()}this.callParent(arguments)},onHide:function(){var a=this.boundEl.first();if(a){a.show()}this.callParent(arguments)},afterRender:function(){this.callParent(arguments);var a=this.field;if(a.isXType("checkboxfield")){a.mon(a.inputEl,"mousedown",this.onCheckBoxMouseDown,this);a.mon(a.inputEl,"click",this.onCheckBoxClick,this)}},onCheckBoxMouseDown:function(){this.completeEdit=Ext.emptyFn},onCheckBoxClick:function(){delete this.completeEdit;this.field.focus(false,10)},alignment:"tl-tl",hideEl:false,cls:Ext.baseCSSPrefix+"small-editor "+Ext.baseCSSPrefix+"grid-editor",shim:false,shadow:false});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"column",reserveOffset:false,shrinkToFit:false,clearInnerCtOnLayout:true,beforeLayout:function(){var h=this,c=0,b=h.getLayoutItems(),a=b.length,g,e,d;if(!Ext.isDefined(h.availableSpaceOffset)){d=h.owner.up("tablepanel").verticalScroller;h.availableSpaceOffset=d?d.width-1:0}e=h.callParent(arguments);h.innerCt.setHeight(23);for(;c<a;c++){g=b[c];g.el.setStyle({height:"auto"});g.titleContainer.setStyle({height:"auto",paddingTop:"0"});if(g.componentLayout&&g.componentLayout.lastComponentSize){g.componentLayout.lastComponentSize.height=g.el.dom.offsetHeight}}return e},calculateChildBoxes:function(l,c){var j=this,b=j.callParent(arguments),g=b.boxes,a=b.meta,h=g.length,d=0,e,k;if(c.width&&!j.isHeader){if(j.owner.forceFit){for(;d<h;d++){e=g[d];k=e.component;k.minWidth=Ext.grid.plugin.HeaderResizer.prototype.minColWidth;k.flex=e.width}b=j.callParent(arguments)}else{if(a.tooNarrow){c.width=a.desiredSize}}}return b},afterLayout:function(){var m=this,a=m.owner,l,n,h,b,g,c,e=0,k,j,d;m.callParent(arguments);if(!m.owner.hideHeaders){if(a.lockableInjected){l=a.up("tablepanel").up("tablepanel");n=l.query("headercontainer:not([isHeader])");h=(n[0]===a)?n[1]:n[0];if(!h.rendered){return}g=h.layout.getRenderTarget().getViewSize().height;if(!g){return}b=this.getRenderTarget().getViewSize().height;if(!b){return}l.componentLayout.layoutBusy=true;d=b;if(b>g){h.layout.align="stretch";h.setCalculatedSize(h.getWidth(),a.getHeight(),h.ownerCt);delete h.layout.align;c=h.up("tablepanel")}else{if(g>b){d=g;this.align="stretch";a.setCalculatedSize(a.getWidth(),h.getHeight(),a.ownerCt);delete this.align;c=a.up("tablepanel")}}l.componentLayout.layoutBusy=false;k=n[0].layout.getLayoutItems().concat(n[1].layout.getLayoutItems())}else{d=this.getRenderTarget().getViewSize().height;k=m.getLayoutItems()}j=k.length;for(;e<j;e++){k[e].setPadding(d)}if(c){setTimeout(function(){c.doLayout()},1)}}},updateInnerCtSize:function(b,d){var c=this,a;if(!c.isHeader){c.tooNarrow=d.meta.tooNarrow;a=(c.reserveOffset?c.availableSpaceOffset:0);if(d.meta.tooNarrow){b.width=d.meta.desiredSize+a}else{b.width+=a}}return c.callParent(arguments)},doOwnerCtLayouts:function(){var a=this.owner.ownerCt;if(!a.componentLayout.layoutBusy){a.doComponentLayout()}}});Ext.define("Ext.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(c){var g=this,i=[],a=g.eventRelayRe,b=c.locked.getView(),h=c.normal.getView(),d,e;Ext.apply(g,{lockedView:b,normalView:h,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});g.mixins.observable.constructor.call(g,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&&a.test(e)){i.push(e)}}g.relayEvents(b,i);g.relayEvents(h,i);h.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter});b.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter})},getGridColumns:function(){var a=this.lockedGrid.headerCt.getGridColumns();return a.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(a){return this.getViewForColumn(a).getEl()},getViewForColumn:function(b){var a=this.lockedView,c;a.headerCt.cascade(function(d){if(d===b){c=true;return false}});return c?a:this.normalView},onItemMouseEnter:function(c,b){var g=this,d=g.lockedView,a=g.normalView,e;if(c.trackOver){if(c!==d){a=d}e=a.getNode(b);a.highlightItem(e)}},onItemMouseLeave:function(c,b){var e=this,d=e.lockedView,a=e.normalView;if(c.trackOver){if(c!==d){a=d}a.clearHighlight()}},relayFn:function(c,b){b=b||[];var a=this.lockedView;a[c].apply(a,b||[]);a=this.normalView;a[c].apply(a,b||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(a){return this.normalView.getNode(a)},getCell:function(b,c){var a=this.getViewForColumn(c),d;d=a.getNode(b);return Ext.fly(d).down(c.getCellSelector())},getRecord:function(b){var a=this.lockedView.getRecord(b);if(!b){a=this.normalView.getRecord(b)}return a},addElListener:function(a,c,b){this.relayFn("addElListener",arguments)},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)}});Ext.define("Ext.grid.Lockable",{requires:["Ext.grid.LockingView"],syncRowHeight:true,spacerHidden:true,headerCounter:0,unlockText:"Unlock",lockText:"Lock",determineXTypeToCreate:function(){var c=this,g;if(c.subGridXType){g=c.subGridXType}else{var d=this.getXTypes().split("/"),b=d.length,e=d[b-1],a=d[b-2];if(a!=="tablepanel"){g=a}else{g=e}}return g},injectLockable:function(){this.lockable=true;this.hasView=true;var k=this,a=k.determineXTypeToCreate(),h=k.getSelectionModel(),b={xtype:a,enableAnimations:false,scroll:false,scrollerOwner:false,selModel:h,border:false,cls:Ext.baseCSSPrefix+"grid-inner-locked"},j={xtype:a,enableAnimations:false,scrollerOwner:false,selModel:h,border:false},e=0,d,c,g;k.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(j,k,k.normalCfgCopy);Ext.copyTo(b,k,k.lockedCfgCopy);for(;e<k.normalCfgCopy.length;e++){delete k[k.normalCfgCopy[e]]}for(e=0;e<k.lockedCfgCopy.length;e++){delete k[k.lockedCfgCopy[e]]}k.addEvents("lockcolumn","unlockcolumn");k.addStateEvents(["lockcolumn","unlockcolumn"]);k.lockedHeights=[];k.normalHeights=[];d=k.processColumns(k.columns);b.width=d.lockedWidth+Ext.num(h.headerWidth,0);b.columns=d.locked;j.columns=d.normal;k.store=Ext.StoreManager.lookup(k.store);b.store=k.store;j.store=k.store;j.flex=1;b.viewConfig=k.lockedViewConfig||{};b.viewConfig.loadingUseMsg=false;j.viewConfig=k.normalViewConfig||{};Ext.applyIf(b.viewConfig,k.viewConfig);Ext.applyIf(j.viewConfig,k.viewConfig);k.normalGrid=Ext.ComponentManager.create(j);k.lockedGrid=Ext.ComponentManager.create(b);k.view=Ext.create("Ext.grid.LockingView",{locked:k.lockedGrid,normal:k.normalGrid,panel:k});if(k.syncRowHeight){k.lockedGrid.getView().on({refresh:k.onLockedGridAfterRefresh,itemupdate:k.onLockedGridAfterUpdate,scope:k});k.normalGrid.getView().on({refresh:k.onNormalGridAfterRefresh,itemupdate:k.onNormalGridAfterUpdate,scope:k})}c=k.lockedGrid.headerCt;g=k.normalGrid.headerCt;c.lockedCt=true;c.lockableInjected=true;g.lockableInjected=true;c.on({columnshow:k.onLockedHeaderShow,columnhide:k.onLockedHeaderHide,columnmove:k.onLockedHeaderMove,sortchange:k.onLockedHeaderSortChange,columnresize:k.onLockedHeaderResize,scope:k});g.on({columnmove:k.onNormalHeaderMove,sortchange:k.onNormalHeaderSortChange,scope:k});k.normalGrid.on({scrollershow:k.onScrollerShow,scrollerhide:k.onScrollerHide,scope:k});k.lockedGrid.on("afterlayout",k.onLockedGridAfterLayout,k,{single:true});k.modifyHeaderCt();k.items=[k.lockedGrid,k.normalGrid];k.relayHeaderCtEvents(c);k.relayHeaderCtEvents(g);k.layout={type:"hbox",align:"stretch"}},processColumns:function(g){var e=0,a=g.length,b=1,d=[],c=[],h;for(;e<a;++e){h=g[e];h.processed=true;if(h.locked){if(!h.hidden){b+=h.width||Ext.grid.header.Container.prototype.defaultWidth}d.push(h)}else{c.push(h)}if(!h.headerId){h.headerId=(h.initialConfig||h).id||("L"+(++this.headerCounter))}}return{lockedWidth:b,locked:d,normal:c}},onLockedGridAfterLayout:function(){var b=this,a=b.lockedGrid.getView();a.on({beforerefresh:b.destroySpacer,scope:b})},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalGridAfterRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedGridAfterRefresh()}},getSpacerEl:function(){var d=this,b,a,c;if(!d.spacerEl){b=Ext.getScrollBarWidth()+(Ext.isIE?2:0);a=d.lockedGrid.getView();c=a.el;d.spacerEl=Ext.DomHelper.append(c,{cls:d.spacerHidden?(Ext.baseCSSPrefix+"hidden"):"",style:"height: "+b+"px;"},true)}return d.spacerEl},destroySpacer:function(){var a=this;if(a.spacerEl){a.spacerEl.destroy();delete a.spacerEl}},onLockedGridAfterRefresh:function(){var e=this,a=e.lockedGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.lockedHeights=[];for(;b<d;b++){e.lockedHeights[b]=g[b].clientHeight}e.syncRowHeights()},onNormalGridAfterRefresh:function(){var e=this,a=e.normalGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.normalHeights=[];for(;b<d;b++){e.normalHeights[b]=g[b].clientHeight}e.syncRowHeights()},onLockedGridAfterUpdate:function(a,b,c){this.lockedHeights[b]=c.clientHeight;this.syncRowHeights()},onNormalGridAfterUpdate:function(a,b,c){this.normalHeights[b]=c.clientHeight;this.syncRowHeights()},syncRowHeights:function(){var l=this,b=l.lockedHeights,m=l.normalHeights,a=[],k=b.length,h=0,n,d,e,j,g=l.getVerticalScroller(),c;if(b.length&&m.length){n=l.lockedGrid.getView();d=l.normalGrid.getView();e=n.el.query(n.getItemSelector());j=d.el.query(d.getItemSelector());for(;h<k;h++){if(!isNaN(b[h])&&!isNaN(m[h])){if(b[h]>m[h]){Ext.fly(j[h]).setHeight(b[h])}else{if(b[h]<m[h]){Ext.fly(e[h]).setHeight(m[h])}}}}l.normalGrid.invalidateScroller();if(g&&g.setViewScrollTop){g.setViewScrollTop(l.virtualScrollTop)}else{c=d.el.dom.scrollTop;d.el.dom.scrollTop=c;n.el.dom.scrollTop=c}l.lockedHeights=[];l.normalHeights=[]}},onScrollerShow:function(a,b){if(b==="horizontal"){this.spacerHidden=false;this.getSpacerEl().removeCls(Ext.baseCSSPrefix+"hidden")}},onScrollerHide:function(a,b){if(b==="horizontal"){this.spacerHidden=true;if(this.spacerEl){this.spacerEl.addCls(Ext.baseCSSPrefix+"hidden")}}},modifyHeaderCt:function(){var a=this;a.lockedGrid.headerCt.getMenuItems=a.getMenuItems(true);a.normalGrid.headerCt.getMenuItems=a.getMenuItems(false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(b){var g=this,h=g.unlockText,i=g.lockText,c=Ext.baseCSSPrefix+"hmenu-unlock",e=Ext.baseCSSPrefix+"hmenu-lock",a=Ext.Function.bind(g.onUnlockMenuClick,g),d=Ext.Function.bind(g.onLockMenuClick,g);return function(){var j=Ext.grid.header.Container.prototype.getMenuItems.call(this);j.push("-",{cls:c,text:h,handler:a,disabled:!b});j.push({cls:e,text:i,handler:d,disabled:b});return j}},lock:function(a,d){var c=this,e=c.normalGrid,h=c.lockedGrid,g=e.headerCt,b=h.headerCt;a=a||g.getMenu().activeHeader;if(a.flex){a.width=a.getWidth();delete a.flex}g.remove(a,false);b.suspendLayout=true;a.locked=true;if(Ext.isDefined(d)){b.insert(d,a)}else{b.add(a)}b.suspendLayout=false;c.syncLockedSection();c.fireEvent("lockcolumn",c,a)},syncLockedSection:function(){var a=this;a.syncLockedWidth();a.lockedGrid.getView().refresh();a.normalGrid.getView().refresh()},syncLockedWidth:function(){var b=this,a=b.lockedGrid.headerCt.getFullWidth(true);b.lockedGrid.setWidth(a+1);b.doComponentLayout()},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(a,d){var c=this,e=c.normalGrid,h=c.lockedGrid,g=e.headerCt,b=h.headerCt;if(!Ext.isDefined(d)){d=0}a=a||b.getMenu().activeHeader;b.remove(a,false);c.syncLockedWidth();c.lockedGrid.getView().refresh();a.locked=false;g.insert(d,a);c.normalGrid.getView().refresh();c.fireEvent("unlockcolumn",c,a)},applyColumnsState:function(e){var l=this,c=l.lockedGrid,d=c.headerCt,j=l.normalGrid.headerCt,m=d.items,g=j.items,a,i=[],k=[],b,h=1;Ext.each(e,function(n){function p(q){return q.headerId==n.id}b=true;if(!(a=m.findBy(p))){a=g.findBy(p);b=false}if(a){if(a.applyColumnState){a.applyColumnState(n)}if(!Ext.isDefined(a.locked)){a.locked=b}if(a.locked){i.push(a);if(!a.hidden&&Ext.isNumber(a.width)){h+=a.width}}else{k.push(a)}}});if(i.length+k.length==m.getCount()+g.getCount()){d.removeAll(false);j.removeAll(false);d.add(i);j.add(k);c.setWidth(h)}},getColumnsState:function(){var b=this,a=b.lockedGrid.headerCt.getColumnsState(),c=b.normalGrid.headerCt.getColumnsState();return a.concat(c)},reconfigureLockable:function(a,b){var c=this,e=c.lockedGrid,d=c.normalGrid;if(b){e.headerCt.suspendLayout=true;d.headerCt.suspendLayout=true;e.headerCt.removeAll();d.headerCt.removeAll();b=c.processColumns(b);e.setWidth(b.lockedWidth);e.headerCt.add(b.locked);d.headerCt.add(b.normal)}if(a){a=Ext.data.StoreManager.lookup(a);c.store=a;e.bindStore(a);d.bindStore(a)}else{e.getView().refresh();d.getView().refresh()}if(b){e.headerCt.suspendLayout=false;d.headerCt.suspendLayout=false;e.headerCt.forceComponentLayout();d.headerCt.forceComponentLayout()}}});Ext.define("Ext.grid.Scroller",{extend:"Ext.Component",alias:"widget.gridscroller",weight:110,baseCls:Ext.baseCSSPrefix+"scroller",focusable:false,reservedSpace:0,renderTpl:['<div class="'+Ext.baseCSSPrefix+'scroller-ct" id="{baseId}_ct">','<div class="'+Ext.baseCSSPrefix+'stretcher" id="{baseId}_stretch"></div>',"</div>"],initComponent:function(){var c=this,b=c.dock,a=Ext.baseCSSPrefix+"scroller-vertical";c.offsets={bottom:0};c.scrollProp="scrollTop";c.vertical=true;c.sizeProp="width";if(b==="top"||b==="bottom"){a=Ext.baseCSSPrefix+"scroller-horizontal";c.sizeProp="height";c.scrollProp="scrollLeft";c.vertical=false;c.weight+=5}c.cls+=(" "+a);Ext.applyIf(c.renderSelectors,{stretchEl:"."+Ext.baseCSSPrefix+"stretcher",scrollEl:"."+Ext.baseCSSPrefix+"scroller-ct"});c.callParent()},ensureDimension:function(){var a=this,b=a.sizeProp;a[b]=a.scrollerSize=Ext.getScrollbarSize()[b]},initRenderData:function(){var b=this,a=b.callParent(arguments)||{};a.baseId=b.id;return a},afterRender:function(){var a=this;a.callParent();a.mon(a.scrollEl,"scroll",a.onElScroll,a);Ext.cache[a.el.id].skipGarbageCollection=true},onAdded:function(a){this.ownerGrid=a;this.callParent(arguments)},getSizeCalculation:function(){var h=this,c=h.getPanel(),g=1,b=1,d,i;if(!h.vertical){var e=c.query("tableview"),a=e[1]||e[0];if(!a){return false}g=a.headerCt.getFullWidth();if(Ext.isIEQuirks){g--}}else{d=c.down("tableview:not([lockableInjected])");if(!d||!d.el){return false}i=d.el.child("table",true);if(!i){return false}b=i.offsetHeight}if(isNaN(g)){g=1}if(isNaN(b)){b=1}return{width:g,height:b}},invalidate:function(d){var g=this,e=g.stretchEl;if(!e||!g.ownerCt){return}var j=g.getSizeCalculation(),i=g.scrollEl,b=i.dom,c=g.reservedSpace,h,a=5;if(j){e.setSize(j);j=g.el.getSize(true);if(g.vertical){j.width+=a;j.height-=c;h="left"}else{j.width-=c;j.height+=a;h="top"}i.setSize(j);b.style[h]=(-a)+"px";b.scrollTop=b.scrollTop}},afterComponentLayout:function(){this.callParent(arguments);this.invalidate()},restoreScrollPos:function(){var c=this,b=this.scrollEl,a=b&&b.dom;if(c._scrollPos!==null&&a){a[c.scrollProp]=c._scrollPos;c._scrollPos=null}},setReservedSpace:function(b){var a=this;if(a.reservedSpace!==b){a.reservedSpace=b;a.invalidate()}},saveScrollPos:function(){var c=this,b=this.scrollEl,a=b&&b.dom;c._scrollPos=a?a[c.scrollProp]:null},setScrollTop:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return a.scrollTop=Ext.Number.constrain(c,0,a.scrollHeight-a.clientHeight)}},setScrollLeft:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return a.scrollLeft=Ext.Number.constrain(c,0,a.scrollWidth-a.clientWidth)}},scrollByDeltaY:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return this.setScrollTop(a.scrollTop+c)}},scrollByDeltaX:function(c){var b=this.scrollEl,a=b&&b.dom;if(a){return this.setScrollLeft(a.scrollLeft+c)}},scrollToTop:function(){this.setScrollTop(0)},onElScroll:function(a,b){this.fireEvent("bodyscroll",a,b)},getPanel:function(){var a=this;if(!a.panel){a.panel=this.up("[scrollerOwner]")}return a.panel}});Ext.define("Ext.grid.PagingScroller",{extend:"Ext.grid.Scroller",alias:"widget.paginggridscroller",percentageFromEdge:0.35,scrollToLoadBuffer:200,activePrefetch:true,chunkSize:50,snapIncrement:25,syncScroll:true,initComponent:function(){var a=this,b=a.store;b.on("guaranteedrange",a.onGuaranteedRange,a);a.callParent(arguments)},onGuaranteedRange:function(c,g,a){var d=this,e=d.store,b;if(c.length&&d.visibleStart<c[0].index){return}e.loadRecords(c);if(!d.firstLoad){if(d.rendered){d.invalidate()}else{d.on("afterrender",d.invalidate,d,{single:true})}d.firstLoad=true}else{if(d.scrollEl&&d.scrollEl.dom&&d.scrollEl.dom.scrollHeight){d.syncTo()}}},syncTo:function(){var i=this,b=i.getPanel(),j=b.store,h=this.scrollEl.dom,d=i.visibleStart-j.guaranteedStart,c=d*i.rowHeight,k=h.scrollHeight,e=h.clientHeight,a=h.scrollTop,g;if(Ext.isIE9&&Ext.isStrict){e=h.offsetHeight+2}g=(k-e-a<=0);this.setViewScrollTop(c,g)},getPageData:function(){var b=this.getPanel(),c=b.store,a=c.getTotalCount();return{total:a,currentPage:c.currentPage,pageCount:Math.ceil(a/c.pageSize),fromRecord:((c.currentPage-1)*c.pageSize)+1,toRecord:Math.min(c.currentPage*c.pageSize,a)}},onElScroll:function(y,m){var A=this,k=A.getPanel(),h=k.store,z=h.pageSize,c=h.guaranteedStart,w=h.guaranteedEnd,v=h.getTotalCount(),j=Math.ceil(A.percentageFromEdge*z),B=m.scrollTop,g=Math.floor(B/A.rowHeight),l=k.down("tableview"),i=l.el,n=i.getHeight(),b=Math.ceil(n/A.rowHeight),a=g+b,d=Math.floor(g/z),s=Math.floor(a/z)+2,x=Math.ceil(v/z),p=A.snapIncrement,u=Math.floor(g/p)*p,q=u+z-1,r=A.activePrefetch;A.visibleStart=g;A.visibleEnd=a;A.syncScroll=true;if(v>=z){if(q>v-1){A.cancelLoad();if(h.rangeSatisfied(v-z,v-1)){A.syncScroll=true}h.guaranteeRange(v-z,v-1)}else{if(g<=c||a>w){if(g<=c){u-=p;q-=p;if(u<0){u=0;q=z}}if(h.rangeSatisfied(u,q)){A.cancelLoad();h.guaranteeRange(u,q)}else{h.mask();A.attemptLoad(u,q)}A.syncScroll=false}else{if(r&&g<(c+j)&&d>0){A.syncScroll=true;h.prefetchPage(d)}else{if(r&&a>(w-j)&&s<x){A.syncScroll=true;h.prefetchPage(s)}}}}}if(A.syncScroll){A.syncTo()}},getSizeCalculation:function(){var i=this,b=i.ownerGrid,d=b.getView(),e=i.store,h=i.dock,c=i.el.dom,g=1,a=1;if(!i.rowHeight){i.rowHeight=d.el.down(d.getItemSelector()).getHeight(false,true)}a=e[(!e.remoteFilter&&e.isFiltered())?"getCount":"getTotalCount"]()*i.rowHeight;if(isNaN(g)){g=1}if(isNaN(a)){a=1}return{width:g,height:a}},attemptLoad:function(c,a){var b=this;if(!b.loadTask){b.loadTask=Ext.create("Ext.util.DelayedTask",b.doAttemptLoad,b,[])}b.loadTask.delay(b.scrollToLoadBuffer,b.doAttemptLoad,b,[c,a])},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(c,a){var b=this.getPanel().store;b.guaranteeRange(c,a)},setViewScrollTop:function(c,d){var n=this,b=n.getPanel(),m=b.query("tableview"),g=0,j=m.length,a,e,h,l,k=n.el.dom;b.virtualScrollTop=c;a=m[1]||m[0];e=a.el.dom;l=((b.store.pageSize*n.rowHeight)-e.clientHeight);h=(c%((b.store.pageSize*n.rowHeight)+1));if(d){h=l}if(h>l){return}for(;g<j;g++){m[g].el.dom.scrollTop=h}}});Ext.define("Ext.panel.Table",{extend:"Ext.panel.Panel",alias:"widget.tablepanel",uses:["Ext.selection.RowModel","Ext.grid.Scroller","Ext.grid.header.Container","Ext.grid.Lockable"],extraBaseCls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scrollDelta:40,scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,verticalScrollDock:"right",verticalScrollerType:"gridscroller",horizontalScrollerPresentCls:Ext.baseCSSPrefix+"horizontal-scroller-present",verticalScrollerPresentCls:Ext.baseCSSPrefix+"vertical-scroller-present",scrollerOwner:true,invalidateScrollerOnRefresh:true,enableColumnMove:true,enableColumnResize:true,enableColumnHide:true,initComponent:function(){var h=this,a=h.scroll,d=false,c=false,j=h.columns||h.colModel,g=0,b,e=h.border;if(h.hideHeaders){e=false}h.store=Ext.data.StoreManager.lookup(h.store||"ext-empty-store");if(j instanceof Ext.grid.header.Container){h.headerCt=j;h.headerCt.border=e;h.columns=h.headerCt.items.items}else{if(Ext.isArray(j)){j={items:j,border:e}}Ext.apply(j,{forceFit:h.forceFit,sortable:h.sortableColumns,enableColumnMove:h.enableColumnMove,enableColumnResize:h.enableColumnResize,enableColumnHide:h.enableColumnHide,border:e});h.columns=j.items;if(h.enableLocking||Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",h.columns).length){h.self.mixin("lockable",Ext.grid.Lockable);h.injectLockable()}}h.addEvents("reconfigure","viewready","scrollerhide","scrollershow");h.bodyCls=h.bodyCls||"";h.bodyCls+=(" "+h.extraBodyCls);h.cls=h.cls||"";h.cls+=(" "+h.extraBaseCls);delete h.autoScroll;if(!h.hasView){if(!h.headerCt){h.headerCt=Ext.create("Ext.grid.header.Container",j)}h.columns=h.headerCt.items.items;if(h.hideHeaders){h.headerCt.height=0;h.headerCt.border=false;h.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");h.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){h.headerCt.style={display:"none"}}}if(a===true||a==="both"){d=c=true}else{if(a==="horizontal"){c=true}else{if(a==="vertical"){d=true}else{h.headerCt.availableSpaceOffset=0}}}if(d){h.verticalScroller=Ext.ComponentManager.create(h.initVerticalScroller());h.mon(h.verticalScroller,{bodyscroll:h.onVerticalScroll,scope:h})}if(c){h.horizontalScroller=Ext.ComponentManager.create(h.initHorizontalScroller());h.mon(h.horizontalScroller,{bodyscroll:h.onHorizontalScroll,scope:h})}h.headerCt.on("resize",h.onHeaderResize,h);h.relayHeaderCtEvents(h.headerCt);h.features=h.features||[];if(!Ext.isArray(h.features)){h.features=[h.features]}h.dockedItems=h.dockedItems||[];h.dockedItems.unshift(h.headerCt);h.viewConfig=h.viewConfig||{};h.viewConfig.invalidateScrollerOnRefresh=h.invalidateScrollerOnRefresh;b=h.getView();b.on({afterrender:function(){b.el.scroll=Ext.Function.bind(h.elScroll,h);h.mon(b.el,{mousewheel:h.onMouseWheel,scope:h})},single:true});h.items=[b];h.hasView=true;h.mon(b.store,{load:h.onStoreLoad,scope:h});h.mon(b,{viewReady:h.onViewReady,resize:h.onViewResize,refresh:{fn:h.onViewRefresh,scope:h,buffer:50},scope:h});this.relayEvents(b,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect","select","beforedeselect","deselect"])}h.callParent(arguments)},onRender:function(){var a=this.verticalScroller,b=this.horizontalScroller;if(a){a.ensureDimension()}if(b){b.ensureDimension()}this.callParent(arguments)},initStateEvents:function(){var a=this.stateEvents;Ext.each(["columnresize","columnmove","columnhide","columnshow","sortchange"],function(b){if(Ext.Array.indexOf(a,b)){a.push(b)}});this.callParent()},initHorizontalScroller:function(){var b=this,a={xtype:"gridscroller",dock:"bottom",section:b,store:b.store};return a},initVerticalScroller:function(){var b=this,a=b.verticalScroller||{};Ext.applyIf(a,{xtype:b.verticalScrollerType,dock:b.verticalScrollDock,store:b.store});return a},relayHeaderCtEvents:function(a){this.relayEvents(a,["columnresize","columnmove","columnhide","columnshow","sortchange"])},getState:function(){var a=this,b=a.callParent(),c=a.store.sorters.first();b.columns=(a.headerCt||a).getColumnsState();if(c){b.sort={property:c.property,direction:c.direction}}return b},applyState:function(d){var c=this,e=d.sort,a=c.store,b=d.columns;delete d.columns;c.callParent(arguments);if(b){(c.headerCt||c).applyColumnsState(b)}if(e){if(a.remoteSort){a.sorters.add(Ext.create("Ext.util.Sorter",{property:e.property,direction:e.direction}))}else{a.sort(e.property,e.direction)}}},getStore:function(){return this.store},getView:function(){var a=this,b;if(!a.view){b=a.getSelectionModel();a.view=a.createComponent(Ext.apply({},a.viewConfig,{deferInitialRefresh:a.deferRowRender,xtype:a.viewType,store:a.store,headerCt:a.headerCt,selModel:b,features:a.features,panel:a}));a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view;a.relayEvents(a.view,["cellclick","celldblclick"])}return a.view},setAutoScroll:Ext.emptyFn,elScroll:function(d,e,b){var c=this,a;if(d==="up"||d==="left"){e=-e}if(d==="down"||d==="up"){a=c.getVerticalScroller();if(a){a.scrollByDeltaY(e)}}else{a=c.getHorizontalScroller();if(a){a.scrollByDeltaX(e)}}},processEvent:function(g,b,a,c,d,i){var h=this,j;if(d!==-1){j=h.headerCt.getGridColumns()[d];return j.processEvent.apply(j,arguments)}},determineScrollbars:function(){if(this.determineScrollbarsRunning){return}this.determineScrollbarsRunning=true;var i=this,j=i.view,d,a,e,k,m,g,h=i.verticalScroller,c=i.horizontalScroller,l=(h&&h.ownerCt===i?1:0)|(c&&c.ownerCt===i?2:0),b=0;if(!i.collapsed&&j&&j.viewReady){d=j.el.getSize();k=d.width+((l&1)?h.width:0);g=d.height+((l&2)?c.height:0);e=(i.headerCt.query("[flex]").length&&!i.headerCt.layout.tooNarrow)?0:i.headerCt.getFullWidth();if(h&&h.el){m=h.getSizeCalculation().height}else{a=j.el.child("table",true);m=a?a.offsetHeight:0}if(m>g){b=1;if(c&&((k-e)<h.width)){b=3}}else{if(e>k){b=2;if(h&&((g-m)<c.height)){b=3}}}if(b!==l){i.suspendLayout=true;if(b&1){i.showVerticalScroller()}else{i.hideVerticalScroller()}if(b&2){i.showHorizontalScroller()}else{i.hideHorizontalScroller()}i.suspendLayout=false;i.doComponentLayout();i.getLayout().layout()}}delete i.determineScrollbarsRunning},onViewResize:function(){this.determineScrollbars()},afterComponentLayout:function(){this.callParent(arguments);this.determineScrollbars();this.invalidateScroller()},onHeaderResize:function(){if(!this.componentLayout.layoutBusy&&this.view&&this.view.rendered){this.determineScrollbars();this.invalidateScroller()}},afterCollapse:function(){var a=this;if(a.verticalScroller){a.verticalScroller.saveScrollPos()}if(a.horizontalScroller){a.horizontalScroller.saveScrollPos()}a.callParent(arguments)},afterExpand:function(){var a=this;a.callParent(arguments);if(a.verticalScroller){a.verticalScroller.restoreScrollPos()}if(a.horizontalScroller){a.horizontalScroller.restoreScrollPos()}},hideHorizontalScroller:function(){var a=this;if(a.horizontalScroller&&a.horizontalScroller.ownerCt===a){a.verticalScroller.setReservedSpace(0);a.removeDocked(a.horizontalScroller,false);a.removeCls(a.horizontalScrollerPresentCls);a.fireEvent("scrollerhide",a.horizontalScroller,"horizontal")}},showHorizontalScroller:function(){var a=this;if(a.verticalScroller){a.verticalScroller.setReservedSpace(Ext.getScrollbarSize().height-1)}if(a.horizontalScroller&&a.horizontalScroller.ownerCt!==a){a.addDocked(a.horizontalScroller);a.addCls(a.horizontalScrollerPresentCls);a.fireEvent("scrollershow",a.horizontalScroller,"horizontal")}},hideVerticalScroller:function(){var a=this;a.setHeaderReserveOffset(false);if(a.verticalScroller&&a.verticalScroller.ownerCt===a){a.removeDocked(a.verticalScroller,false);a.removeCls(a.verticalScrollerPresentCls);a.fireEvent("scrollerhide",a.verticalScroller,"vertical")}},showVerticalScroller:function(){var a=this;a.setHeaderReserveOffset(true);if(a.verticalScroller&&a.verticalScroller.ownerCt!==a){a.addDocked(a.verticalScroller);a.addCls(a.verticalScrollerPresentCls);a.fireEvent("scrollershow",a.verticalScroller,"vertical")}},setHeaderReserveOffset:function(a){var c=this.headerCt,b=c.layout;if(b&&b.reserveOffset!==a){b.reserveOffset=a;if(!this.suspendLayout){c.doLayout()}}},invalidateScroller:function(){var b=this,a=b.verticalScroller,c=b.horizontalScroller;if(a){a.invalidate()}if(c){c.invalidate()}},onHeaderMove:function(c,d,a,b){this.view.refresh()},onHeaderHide:function(a,b){this.invalidateScroller()},onHeaderShow:function(a,b){this.invalidateScroller()},getVerticalScroller:function(){return this.getScrollerOwner().down("gridscroller[dock="+this.verticalScrollDock+"]")},getHorizontalScroller:function(){return this.getScrollerOwner().down("gridscroller[dock=bottom]")},onMouseWheel:function(n){var p=this,k=p.getVerticalScroller(),q=p.getHorizontalScroller(),b=-p.scrollDelta,c=n.getWheelDeltas(),i=b*c.x,h=b*c.y,m,r,a,s,d,j,l,g;if(q){r=q.scrollEl;if(r){s=r.dom;j=s.scrollLeft!==s.scrollWidth-s.clientWidth;d=s.scrollLeft!==0}}if(k){m=k.scrollEl;if(m){a=m.dom;l=a.scrollTop!==a.scrollHeight-a.clientHeight;g=a.scrollTop!==0}}if(q){if((i<0&&d)||(i>0&&j)){n.stopEvent();q.scrollByDeltaX(i)}}if(k){if((h<0&&g)||(h>0&&l)){n.stopEvent();k.scrollByDeltaY(h)}}},onViewReady:function(){var a=this;a.fireEvent("viewready",a);if(a.deferRowRender){a.determineScrollbars();a.invalidateScroller()}},onViewRefresh:function(){var a=this;if(!a.rendering){this.determineScrollbars();if(this.invalidateScrollerOnRefresh){this.invalidateScroller()}}},setScrollTop:function(d){var c=this,b=c.getScrollerOwner(),a=c.getVerticalScroller();b.virtualScrollTop=d;if(a){a.setScrollTop(d)}},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},scrollByDeltaY:function(a){var b=this.getVerticalScroller();if(b){b.scrollByDeltaY(a)}},scrollByDeltaX:function(a){var b=this.getHorizontalScroller();if(b){b.scrollByDeltaX(a)}},getLhsMarker:function(){var a=this;if(!a.lhsMarker){a.lhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true)}return a.lhsMarker},getRhsMarker:function(){var a=this;if(!a.rhsMarker){a.rhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true)}return a.rhsMarker},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b="SINGLE",a;if(this.simpleSelect){b="SIMPLE"}else{if(this.multiSelect){b="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},onVerticalScroll:function(e,g){var b=this.getScrollerOwner(),c=b.query("tableview"),d=0,a=c.length;for(;d<a;d++){c[d].el.dom.scrollTop=g.scrollTop}},onHorizontalScroll:function(d,e){var b=this.getScrollerOwner(),c=b.query("tableview"),a=c[1]||c[0];a.el.dom.scrollLeft=e.scrollLeft;this.headerCt.el.dom.scrollLeft=e.scrollLeft},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(a){var b=this;b.store=a;b.getView().bindStore(a)},beforeDestroy:function(){Ext.destroy(this.horizontalScroller,this.verticalScroller);this.callParent()},reconfigure:function(a,b){var c=this,d=c.headerCt;if(c.lockable){c.reconfigureLockable(a,b)}else{if(b){d.suspendLayout=true;d.removeAll();d.add(b)}if(a){a=Ext.StoreManager.lookup(a);c.bindStore(a)}else{c.getView().refresh()}if(b){d.suspendLayout=false;c.forceComponentLayout()}}c.fireEvent("reconfigure",c)}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],baseCls:Ext.baseCSSPrefix+"grid-view",itemSelector:"."+Ext.baseCSSPrefix+"grid-row",cellSelector:"."+Ext.baseCSSPrefix+"grid-cell",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:/(?:^|\s*)grid-row-(first|last|alt)(?:\s+|$)/g,cellRe:new RegExp("x-grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,initComponent:function(){var a=this;a.scrollState={};a.selModel.view=a;a.headerCt.view=a;a.initFeatures();a.tpl="<div></div>";a.callParent();a.mon(a.store,{load:a.onStoreLoad,scope:a})},onStoreLoad:function(){var a=this;if(a.invalidateScrollerOnRefresh){if(Ext.isGecko){if(!a.scrollToTopTask){a.scrollToTopTask=Ext.create("Ext.util.DelayedTask",a.scrollToTop,a)}a.scrollToTopTask.delay(1)}else{a.scrollToTop()}}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(){var d=this,b=0,c,a;d.features=d.features||[];c=d.features;a=c.length;d.featuresMC=Ext.create("Ext.util.MixedCollection");for(;b<a;b++){if(!c[b].isFeature){c[b]=Ext.create("feature."+c[b].ftype,c[b])}c[b].view=d;d.featuresMC.add(c[b])}},attachEventsForFeatures:function(){var b=this.features,c=b.length,a=0;for(;a<c;a++){if(b[a].isFeature){b[a].attachEvents()}}},afterRender:function(){var a=this;a.callParent();a.mon(a.el,{scroll:a.fireBodyScroll,scope:a});a.el.unselectable();a.attachEventsForFeatures()},fireBodyScroll:function(b,a){this.fireEvent("bodyscroll",b,a)},prepareData:function(c,k,e){var h=this,j=h.headerCt.prepareData(c,k,e,h,h.ownerCt),a=h.features,g=a.length,d=0,b,l;for(;d<g;d++){l=a[d];if(l.isFeature){Ext.apply(j,l.getAdditionalData(c,k,e,j,h))}}return j},collectData:function(d,n){var p=this.callParent(arguments),c=this.headerCt,m=c.getFullWidth(),b=this.features,k=b.length,a={rows:p,fullWidth:m},g=0,q,e=0,l,h;l=p.length;if(this.getRowClass){for(;e<l;e++){h={};p[e]["rowCls"]=this.getRowClass(d[e],e,h,this.store)}}for(;g<k;g++){q=b[g];if(q.isFeature&&q.collectData&&!q.disabled){a=q.collectData(d,p,n,m,a);break}}return a},onHeaderResize:function(e,a,d){var c=this,b=c.el;if(b){c.saveScrollState();if(Ext.isIE6||Ext.isIE7){if(e.el.hasCls(Ext.baseCSSPrefix+"column-header-first")){a+=1}}b.select("."+Ext.baseCSSPrefix+"grid-col-resizer-"+e.id).setWidth(a);b.select("."+Ext.baseCSSPrefix+"grid-table-resizer").setWidth(c.headerCt.getFullWidth());c.restoreScrollState();if(!c.ignoreTemplate){c.setNewTemplate()}if(!d){c.el.focus()}}},onHeaderShow:function(c,d,b){var a=this;a.ignoreTemplate=true;if(d.oldWidth){a.onHeaderResize(d,d.oldWidth,b);delete d.oldWidth}else{if(d.width&&!d.flex){a.onHeaderResize(d,d.width,b)}}delete a.ignoreTemplate;a.setNewTemplate()},onHeaderHide:function(b,c,a){this.onHeaderResize(c,0,a)},setNewTemplate:function(){var b=this,a=b.headerCt.getColumnsForTpl(true);b.tpl=b.getTableChunker().getTableTpl({columns:a,features:b.features})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).addCls(a)}},removeRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).removeCls(a)}},onRowSelect:function(a){this.addRowCls(a,this.selectedItemCls)},onRowDeselect:function(b){var a=this;a.removeRowCls(b,a.selectedItemCls);a.removeRowCls(b,a.focusedItemCls)},onCellSelect:function(b){var a=this.getCellByPosition(b);if(a){a.addCls(this.selectedCellCls)}},onCellDeselect:function(b){var a=this.getCellByPosition(b);if(a){a.removeCls(this.selectedCellCls)}},onCellFocus:function(a){this.focusCell(a)},getCellByPosition:function(b){var h=b.row,e=b.column,d=this.store,g=this.getNode(h),i=this.headerCt.getHeaderAtIndex(e),c,a=false;if(i&&g){c=i.getCellSelector();a=Ext.fly(g).down(c)}return a},onRowFocus:function(d,b,a){var c=this,e=c.getNode(d);if(b){c.addRowCls(d,c.focusedItemCls);if(!a){c.focusRow(d)}}else{c.removeRowCls(d,c.focusedItemCls)}},focusRow:function(b){var g=this,j=g.getNode(b),c=g.el,h=0,a=g.ownerCt,i,d,e;if(j&&c){d=c.getRegion();i=Ext.fly(j).getRegion();if(i.top<d.top){h=i.top-d.top}else{if(i.bottom>d.bottom){h=i.bottom-d.bottom}}e=g.getRecord(j);b=g.store.indexOf(e);if(h){a.scrollByDeltaY(h)}g.fireEvent("rowfocus",e,j,b)}},focusCell:function(h){var j=this,k=j.getCellByPosition(h),b=j.el,d=0,e=0,c=b.getRegion(),a=j.ownerCt,i,g;if(k){i=k.getRegion();if(i.top<c.top){d=i.top-c.top}else{if(i.bottom>c.bottom){d=i.bottom-c.bottom}}if(i.left<c.left){e=i.left-c.left}else{if(i.right>c.right){e=i.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();j.fireEvent("cellfocus",g,k,h)}},scrollByDelta:function(c,b){b=b||"scrollTop";var a=this.el.dom;a[b]=(a[b]+=c)},onUpdate:function(b,a){this.callParent(arguments)},saveScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState,c=this.headerCt.el.dom;c.scrollLeft=b.scrollLeft=a.left;b.scrollTop=a.top}},refresh:function(){this.setNewTemplate();this.callParent(arguments)},processItemEvent:function(b,m,j,d){var h=this,k=d.getTarget(h.cellSelector,m),i=k?k.cellIndex:-1,a=h.statics().EventMap,c=h.getSelectionModel(),g=d.type,l;if(g=="keydown"&&!k&&c.getCurrentPosition){k=h.getCellByPosition(c.getCurrentPosition());if(k){k=k.dom;i=k.cellIndex}}l=h.fireEvent("uievent",g,h,k,j,i,d);if(l===false||h.callParent(arguments)===false){return false}if(g=="mouseover"||g=="mouseout"){return true}return !((h["onBeforeCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("beforecell"+g,h,k,i,b,m,j,d)===false)||(h["onCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("cell"+g,h,k,i,b,m,j,d)===false))},processSpecialEvent:function(k){var n=this,b=n.statics().EventMap,d=n.features,m=d.length,p=k.type,g,q,h,j,c,l,a=n.ownerCt;n.callParent(arguments);if(p=="mouseover"||p=="mouseout"){return}for(g=0;g<m;g++){q=d[g];if(q.hasFeatureEvent){j=k.getTarget(q.eventSelector,n.getTargetEl());if(j){h=q.eventPrefix;c=q.getFireEventArgs("before"+h+p,n,j,k);l=q.getFireEventArgs(h+p,n,j,k);if((n.fireEvent.apply(n,c)===false)||(a.fireEvent.apply(a,c)===false)||(n.fireEvent.apply(n,l)===false)||(a.fireEvent.apply(a,l)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(b){if(b){var a=this.getMaxContentWidth(b);delete b.flex;b.setWidth(a)}},getMaxContentWidth:function(h){var a=h.getCellInnerSelector(),c=this.el.query(a),d=0,g=c.length,e=h.el.dom.scrollWidth,b;for(;d<g;d++){b=c[d].scrollWidth;if(b>e){e=b}}return e},getPositionByEvent:function(g){var d=this,b=g.getTarget(d.cellSelector),c=g.getTarget(d.itemSelector),a=d.getRecord(c),h=d.getHeaderByCell(b);return d.getPosition(a,h)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&&a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(l,m,h,n,a,p){var j=this,q=l.row,d=l.column,k=j.store.getCount(),g=j.getFirstVisibleColumnIndex(),b=j.getLastVisibleColumnIndex(),i={row:q,column:d},c=j.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}h=h||{};m=m.toLowerCase();switch(m){case"right":if(d===b){if(n||q===k-1){return false}if(!h.ctrlKey){i.row=q+1;i.column=g}}else{if(!h.ctrlKey){i.column=d+j.getRightGap(c)}else{i.column=b}}break;case"left":if(d===g){if(n||q===0){return false}if(!h.ctrlKey){i.row=q-1;i.column=b}}else{if(!h.ctrlKey){i.column=d+j.getLeftGap(c)}else{i.column=g}}break;case"up":if(q===0){return false}else{if(!h.ctrlKey){i.row=q-1}else{i.row=0}}break;case"down":if(q===k-1){return false}else{if(!h.ctrlKey){i.row=q+1}else{i.row=k-1}}break}if(a&&a.call(p||window,i)!==true){return false}else{return i}},getFirstVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(":not([hidden])",a),b=d[0];return c.getHeaderIndex(b)},getLastVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(":not([hidden])",a),b=d[d.length-1];return c.getHeaderIndex(b)},getHeaderCt:function(){return this.headerCt},getPosition:function(a,e){var d=this,b=d.store,c=d.headerCt.getGridColumns();return{row:b.indexOf(a),column:Ext.Array.indexOf(c,e)}},getRightGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c<=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d>=0;d--){if(!e[d].hidden){b=d;break}}return b-c}});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,invalidateScrollerOnRefresh:true,scrollToTop:function(){if(this.rendered){var b=this.ownerCt,a=b.verticalScroller;if(a){a.scrollToTop()}}},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onUpdate:function(d,a,b){var c=d.indexOf(a);this.callParent(arguments);this.doStripeRows(c,c)},doStripeRows:function(b,a){if(this.stripeRows){var d=this.getNodes(b,a),g=d.length,c=0,e;for(;c<g;c++){e=d[c];e.className=e.className.replace(this.rowClsRe," ");b++;if(b%2===0){e.className+=(" "+this.altRowCls)}}}},refresh:function(b){this.callParent(arguments);this.doStripeRows(0);var a=this.up("gridpanel");if(a&&this.invalidateScrollerOnRefresh){a.invalidateScroller()}}});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,normalCfgCopy:["invalidateScrollerOnRefresh","verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:["invalidateScrollerOnRefresh"],initComponent:function(){var a=this;if(a.columnLines){a.setColumnLines(a.columnLines)}a.callParent()},setColumnLines:function(a){var b=this,c=(a)?"addClsWithUI":"removeClsWithUI";b[c]("with-col-lines")}});Ext.define("Ext.grid.RowEditor",{extend:"Ext.form.Panel",requires:["Ext.tip.ToolTip","Ext.util.HashMap","Ext.util.KeyNav"],saveBtnText:"Update",cancelBtnText:"Cancel",errorsText:"Errors",dirtyText:"You need to commit or cancel your changes",lastScrollLeft:0,lastScrollTop:0,border:false,hideMode:"offsets",initComponent:function(){var b=this,a;b.cls=Ext.baseCSSPrefix+"grid-row-editor";b.layout={type:"hbox",align:"middle"};b.columns=Ext.create("Ext.util.HashMap");b.columns.getKey=function(d){var c;if(d.getEditor){c=d.getEditor();if(c){return c.id}}return d.id};b.mon(b.columns,{add:b.onFieldAdd,remove:b.onFieldRemove,replace:b.onFieldReplace,scope:b});b.callParent(arguments);if(b.fields){b.setField(b.fields);delete b.fields}a=b.getForm();a.trackResetOnLoad=true},onFieldChange:function(){var c=this,b=c.getForm(),a=b.isValid();if(c.errorSummary&&c.isVisible()){c[a?"hideToolTip":"showToolTip"]()}if(c.floatingButtons){c.floatingButtons.child("#update").setDisabled(!a)}c.isValid=a},afterRender:function(){var b=this,a=b.editingPlugin;b.callParent(arguments);b.mon(b.renderTo,"scroll",b.onCtScroll,b,{buffer:100});b.mon(b.el,{click:Ext.emptyFn,stopPropagation:true});b.el.swallowEvent(["keypress","keydown"]);b.keyNav=Ext.create("Ext.util.KeyNav",b.el,{enter:a.completeEdit,esc:a.onEscKey,scope:a});b.mon(a.view,{beforerefresh:b.onBeforeViewRefresh,refresh:b.onViewRefresh,scope:b})},onBeforeViewRefresh:function(b){var c=this,a=b.el.dom;if(c.el.dom.parentNode===a){a.removeChild(c.el.dom)}},onViewRefresh:function(c){var e=this,b=c.el.dom,d=e.context,a;b.appendChild(e.el.dom);if(d&&(a=d.store.indexOf(d.record))>=0){d.row=c.getNode(a);e.reposition();if(e.tooltip&&e.tooltip.isVisible()){e.tooltip.setTarget(d.row)}}else{e.editingPlugin.cancelEdit()}},onCtScroll:function(d,c){var a=this,b=c.scrollTop,g=c.scrollLeft;if(b!==a.lastScrollTop){a.lastScrollTop=b;if((a.tooltip&&a.tooltip.isVisible())||a.hiddenTip){a.repositionTip()}}if(g!==a.lastScrollLeft){a.lastScrollLeft=g;a.reposition()}},onColumnAdd:function(a){this.setField(a)},onColumnRemove:function(a){this.columns.remove(a)},onColumnResize:function(b,a){b.getEditor().setWidth(a-2);if(this.isVisible()){this.reposition()}},onColumnHide:function(a){a.getEditor().hide();if(this.isVisible()){this.reposition()}},onColumnShow:function(a){var b=a.getEditor();b.setWidth(a.getWidth()-2).show();if(this.isVisible()){this.reposition()}},onColumnMove:function(b,a,c){var d=b.getEditor();if(this.items.indexOf(d)!=c){this.move(a,c)}},onFieldAdd:function(e,a,b){var c=this,g=c.editingPlugin.grid.headerCt.getHeaderIndex(b),d=b.getEditor({xtype:"displayfield"});c.insert(g,d)},onFieldRemove:function(g,a,b){var c=this,e=b.getEditor(),d=e.el;c.remove(e,false);if(d){d.remove()}},onFieldReplace:function(e,a,c,b){var d=this;d.onFieldRemove(e,a,b)},clearFields:function(){var a=this,b=a.columns;b.each(function(c){b.removeAtKey(c)})},getFloatingButtons:function(){var d=this,e=Ext.baseCSSPrefix,c=e+"grid-row-editor-buttons",b=d.editingPlugin,a;if(!d.floatingButtons){a=d.floatingButtons=Ext.create("Ext.Container",{renderTpl:['<div class="{baseCls}-ml"></div>','<div class="{baseCls}-mr"></div>','<div class="{baseCls}-bl"></div>','<div class="{baseCls}-br"></div>','<div class="{baseCls}-bc"></div>'],renderTo:d.el,baseCls:c,layout:{type:"hbox",align:"middle"},defaults:{margins:"0 1 0 1"},items:[{itemId:"update",flex:1,xtype:"button",handler:b.completeEdit,scope:b,text:d.saveBtnText,disabled:!d.isValid},{flex:1,xtype:"button",handler:b.cancelEdit,scope:b,text:d.cancelBtnText}]});d.mon(a.el,{mousedown:Ext.emptyFn,click:Ext.emptyFn,stopEvent:true})}return d.floatingButtons},reposition:function(s){var u=this,c=u.context,e=c&&Ext.get(c.row),q=u.getFloatingButtons(),r=q.el,a=u.editingPlugin.grid,g=a.view.el,t=a.verticalScroller,p=a.headerCt.getFullWidth(),v=a.getWidth(),l=Math.min(p,v),n=a.view.el.dom.scrollLeft,i=q.getWidth(),d=(l-i)/2+n,j,h,m,k=function(){if(t){t.invalidate();r.scrollIntoView(g,false)}if(s&&s.callback){s.callback.call(s.scope||u)}};if(e&&Ext.isElement(e.dom)){e.scrollIntoView(g,false);j=e.getXY()[1]-5;h=e.getHeight();m=h+10;if(Ext.isIE){m+=2}if(u.getHeight()!=m){u.setHeight(m);u.el.setLeft(0)}if(s){var b={to:{y:j},duration:s.duration||125,listeners:{afteranimate:function(){k();j=e.getXY()[1]-5;u.el.setY(j)}}};u.animate(b)}else{u.el.setY(j);k()}}if(u.getWidth()!=p){u.setWidth(p)}r.setLeft(d)},getEditor:function(a){var b=this;if(Ext.isNumber(a)){return b.query(">[isFormField]")[a]}else{if(a instanceof Ext.grid.column.Column){return a.getEditor()}}},removeField:function(b){var a=this;b=a.getEditor(b);a.mun(b,"validitychange",a.onValidityChange,a);a.columns.removeKey(b.id)},setField:function(a){var b=this,c;if(Ext.isArray(a)){Ext.Array.forEach(a,b.setField,b);return}c=a.getEditor(null,{xtype:"displayfield",getModelData:function(){return null}});c.margins="0 0 0 2";c.setWidth(a.getDesiredWidth()-2);b.mon(c,"change",b.onFieldChange,b);b.columns.add(c.id,a);if(a.hidden){b.onColumnHide(a)}if(b.isVisible()&&b.context){b.renderColumnData(c,b.context.record)}},loadRecord:function(a){var c=this,b=c.getForm();b.loadRecord(a);if(b.isValid()){c.hideToolTip()}else{c.showToolTip()}Ext.Array.forEach(c.query(">displayfield"),function(d){c.renderColumnData(d,a)},c)},renderColumnData:function(k,h){var i=this,a=i.editingPlugin.grid,d=a.headerCt,j=a.view,m=j.store,e=i.columns.get(k.id),l=h.get(e.dataIndex);if(e.renderer){var b={tdCls:"",style:""},c=m.indexOf(h),g=d.getHeaderIndex(e);l=e.renderer.call(e.scope||d.ownerCt,l,b,h,c,g,m,j)}k.setRawValue(l);k.resetOriginalValue()},beforeEdit:function(){var a=this;if(a.isVisible()&&!a.autoCancel&&a.isDirty()){a.showToolTip();return false}},startEdit:function(b,h){var g=this,e=g.editingPlugin.grid,a=e.getView(),c=e.store,d=g.context=Ext.apply(g.editingPlugin.context,{view:e.getView(),store:c});d.grid.getSelectionModel().select(b);g.loadRecord(b);if(!g.isVisible()){g.show();g.focusContextCell()}else{g.reposition({callback:this.focusContextCell})}},focusContextCell:function(){var a=this.getEditor(this.context.colIdx);if(a&&a.focus){a.focus()}},cancelEdit:function(){var b=this,a=b.getForm();b.hide();a.clearInvalid();a.reset()},completeEdit:function(){var b=this,a=b.getForm();if(!a.isValid()){return}a.updateRecord(b.context.record);b.hide();return true},onShow:function(){var a=this;a.callParent(arguments);a.reposition()},onHide:function(){var a=this;a.callParent(arguments);a.hideToolTip();a.invalidateScroller();if(a.context){a.context.view.focus();a.context=null}},isDirty:function(){var b=this,a=b.getForm();return a.isDirty()},getToolTip:function(){var a=this,b;if(!a.tooltip){b=a.tooltip=Ext.createWidget("tooltip",{cls:Ext.baseCSSPrefix+"grid-row-editor-errors",title:a.errorsText,autoHide:false,closable:true,closeAction:"disable",anchor:"left"})}return a.tooltip},hideToolTip:function(){var a=this,b=a.getToolTip();if(b.rendered){b.disable()}a.hiddenTip=false},showToolTip:function(){var c=this,d=c.getToolTip(),a=c.context,e=Ext.get(a.row),b=a.grid.view.el;d.setTarget(e);d.showAt([-10000,-10000]);d.body.update(c.getErrors());d.mouseOffset=[b.getWidth()-e.getWidth()+c.lastScrollLeft+15,0];c.repositionTip();d.doLayout();d.enable()},repositionTip:function(){var i=this,j=i.getToolTip(),c=i.context,l=Ext.get(c.row),k=c.grid.view.el,e=k.getHeight(),g=i.lastScrollTop,h=g+e,b=l.getHeight(),a=l.dom.offsetTop,d=a+b;if(d>g&&a<h){j.show();i.hiddenTip=false}else{j.hide();i.hiddenTip=true}},getErrors:function(){var a=this,b=!a.autoCancel&&a.isDirty()?a.dirtyText+"<br />":"",c=[];Ext.Array.forEach(a.query(">[isFormField]"),function(d){c=c.concat(Ext.Array.map(d.getErrors(),function(g){return"<li>"+g+"</li>"}))},a);return b+"<ul>"+c.join("")+"</ul>"},invalidateScroller:function(){var c=this,b=c.context,a=b.grid.verticalScroller;if(a){a.invalidate()}}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",uses:["Ext.grid.ColumnLayout","Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){a.resizer=Ext.create("Ext.grid.plugin.HeaderResizer");a.reorderer=Ext.create("Ext.grid.plugin.HeaderReorderer");if(!a.enableColumnResize){a.resizer.disable()}if(!a.enableColumnMove){a.reorderer.disable()}a.plugins.push(a.reorderer,a.resizer)}if(a.isHeader&&!a.items){a.layout="auto"}else{a.layout={type:"gridcolumn",availableSpaceOffset:a.availableSpaceOffset,align:"stretchmax",resetStretch:true}}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{width:a.defaultWidth,triStateSort:a.triStateSort,sortable:a.sortable});a.callParent();a.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){Ext.destroy(this.resizer,this.reorderer);this.callParent()},applyDefaults:function(a){if(a&&!a.isComponent&&a.xtype=="rownumberer"){return a}return this.callParent([a])},applyColumnsState:function(d){if(!d||!d.length){return}var e=this,c=0,b,a;Ext.each(d,function(g){a=e.down("gridcolumn[headerId="+g.id+"]");if(a){b=e.items.indexOf(a);if(c!==b){e.moveHeader(b,c)}if(a.applyColumnState){a.applyColumnState(g)}++c}})},getColumnsState:function(){var b=this,a=[],c;b.items.each(function(d){c=d.getColumnState&&d.getColumnState();if(c){a.push(c)}});return a},onAdd:function(b){var a=this;if(!b.headerId){b.headerId=b.initialConfig.id||("h"+(++a.headerCounter))}a.callParent(arguments);a.purgeCache()},onRemove:function(b){var a=this;a.callParent(arguments);a.purgeCache()},afterRender:function(){this.callParent();var a=this.up("[store]").store,c=a.sorters,d=c.first(),b;if(d){b=this.down("gridcolumn[dataIndex="+d.property+"]");if(b){b.setSortState(d.direction,false,true)}}},afterLayout:function(){if(!this.isHeader){var e=this,d=e.query(">gridcolumn:not([hidden])"),c,b,a;e.callParent(arguments);if(d.length){b=d[0].el;if(b!==e.pastFirstHeaderEl){if(e.pastFirstHeaderEl){e.pastFirstHeaderEl.removeCls(e.firstHeaderCls)}b.addCls(e.firstHeaderCls);e.pastFirstHeaderEl=b}a=d[d.length-1].el;if(a!==e.pastLastHeaderEl){if(e.pastLastHeaderEl){e.pastLastHeaderEl.removeCls(e.lastHeaderCls)}a.addCls(e.lastHeaderCls);e.pastLastHeaderEl=a}}}},onHeaderShow:function(h,b){var l=this,m=l.ownerCt,d=l.getMenu(),e,c,j,a,k,g;if(d){j=d.down("menucheckitem[headerId="+h.id+"]");if(j){j.setChecked(true,true)}e=d.query("#columnItem>menucheckitem[checked]");c=e.length;if((l.getVisibleGridColumns().length>1)&&l.disabledMenuItems&&l.disabledMenuItems.length){if(c==1){Ext.Array.remove(l.disabledMenuItems,e[0])}for(g=0,k=l.disabledMenuItems.length;g<k;g++){a=l.disabledMenuItems[g];if(!a.isDestroyed){a[a.menu?"enableCheckChange":"enable"]()}}if(c==1){l.disabledMenuItems=e}else{l.disabledMenuItems=[]}}}if(!h.isGroupHeader){if(l.view){l.view.onHeaderShow(l,h,true)}if(m){m.onHeaderShow(l,h)}}l.fireEvent("columnshow",l,h);if(b!==true){l.doLayout()}},doComponentLayout:function(){var a=this;if(a.view&&a.view.saveScrollState){a.view.saveScrollState()}a.callParent(arguments);if(a.view&&a.view.restoreScrollState){a.view.restoreScrollState()}},onHeaderHide:function(g,c){var b=this,a=b.ownerCt,e=b.getMenu(),d;if(e){d=e.down("menucheckitem[headerId="+g.id+"]");if(d){d.setChecked(false,true)}b.setDisabledItems()}if(!g.isGroupHeader){if(b.view){b.view.onHeaderHide(b,g,true)}if(a){a.onHeaderHide(b,g)}if(!c){b.doLayout()}}b.fireEvent("columnhide",b,g)},setDisabledItems:function(){var d=this,g=d.getMenu(),b=0,a,e,c;e=g.query("#columnItem>menucheckitem[checked]");if((e.length===1)){if(!d.disabledMenuItems){d.disabledMenuItems=[]}if((d.getVisibleGridColumns().length===1)&&e[0].menu){e=e.concat(e[0].menu.query("menucheckitem[checked]"))}a=e.length;for(b=0;b<a;b++){c=e[b];if(!Ext.Array.contains(d.disabledMenuItems,c)){c.disabled=false;c[c.menu?"disableCheckChange":"disable"]();d.disabledMenuItems.push(c)}}}},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(c,a,b){this.tempLock();if(this.view&&this.view.rendered){this.view.onHeaderResize(c,a,b)}},onHeaderClick:function(c,b,a){this.fireEvent("headerclick",this,c,b,a)},onHeaderTriggerClick:function(c,b,a){if(this.fireEvent("headertriggerclick",this,c,b,a)!==false){this.showMenuBy(a,c)}},showMenuBy:function(b,g){var d=this.getMenu(),e=d.down("#ascItem"),c=d.down("#descItem"),a;d.activeHeader=d.ownerCt=g;d.setFloatParent(g);g.titleContainer.addCls(this.headerOpenCls);a=g.sortable?"enable":"disable";if(e){e[a]()}if(c){c[a]()}d.showBy(b)},onMenuDeactivate:function(){var a=this.getMenu();a.activeHeader.titleContainer.removeCls(this.headerOpenCls)},moveHeader:function(a,b){this.tempLock();this.onHeaderMoved(this.move(a,b),a,b)},purgeCache:function(){var a=this;delete a.gridDataColumns;delete a.hideableColumns;if(a.menu){a.menu.destroy();delete a.menu}},onHeaderMoved:function(e,b,d){var c=this,a=c.ownerCt;if(a&&a.onHeaderMove){a.onHeaderMove(c,e,b,d)}c.fireEvent("columnmove",c,e,b,d)},getMenu:function(){var a=this;if(!a.menu){a.menu=Ext.create("Ext.menu.Menu",{hideOnParentHide:false,items:a.getMenuItems(),listeners:{deactivate:a.onMenuDeactivate,scope:a}});a.setDisabledItems();a.fireEvent("menucreate",a,a.menu)}return a.menu},getMenuItems:function(){var c=this,b=[],a=c.enableColumnHide?c.getColumnMenu(c):null;if(c.sortable){b=[{itemId:"ascItem",text:c.sortAscText,cls:Ext.baseCSSPrefix+"hmenu-sort-asc",handler:c.onSortAscClick,scope:c},{itemId:"descItem",text:c.sortDescText,cls:Ext.baseCSSPrefix+"hmenu-sort-desc",handler:c.onSortDescClick,scope:c}]}if(a&&a.length){b.push("-",{itemId:"columnItem",text:c.columnsText,cls:Ext.baseCSSPrefix+"cols-icon",menu:a})}return b},onSortAscClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("ASC")},onSortDescClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("DESC")},getColumnMenu:function(g){var c=[],b=0,e,a=g.query(">gridcolumn[hideable]"),h=a.length,d;for(;b<h;b++){e=a[b];d=Ext.create("Ext.menu.CheckItem",{text:e.text,checked:!e.hidden,hideOnClick:false,headerId:e.id,menu:e.isGroupHeader?this.getColumnMenu(e):undefined,checkHandler:this.onColumnCheckChange,scope:this});if(h===1){d.disabled=true}c.push(d);e.on({destroy:Ext.Function.bind(d.destroy,d)})}return c},onColumnCheckChange:function(a,b){var c=Ext.getCmp(a.headerId);c[b?"show":"hide"]()},getColumnsForTpl:function(e){var c=[],d=this.getGridColumns(e),h=d.length,a=0,g,b;for(;a<h;a++){g=d[a];if(g.hidden||g.up("headercontainer[hidden=true]")){b=0}else{b=g.getDesiredWidth();if((a===0)&&(Ext.isIE6||Ext.isIE7)){b+=1}}c.push({dataIndex:g.dataIndex,align:g.align,width:b,id:g.id,cls:g.tdCls,columnId:g.getItemId()})}return c},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(d){var c=0,b=this.getVisibleGridColumns(d),e=b.length,a=0;for(;a<e;a++){if(!isNaN(b[a].width)){if(b[a].getDesiredWidth){c+=b[a].getDesiredWidth()}else{c+=b[a].getWidth()}}}return c},clearOtherSortStates:function(a){var c=this.getGridColumns(),e=c.length,b=0,d;for(;b<e;b++){if(c[b]!==a){d=c[b].sortState;c[b].setSortState(null,true)}}},getVisibleGridColumns:function(a){return Ext.ComponentQuery.query(":not([hidden])",this.getGridColumns(a))},getGridColumns:function(b){var c=this,a=b?null:c.gridDataColumns;if(!a){c.gridDataColumns=a=[];c.cascade(function(d){if((d!==c)&&!d.isGroupHeader){a.push(d)}})}return a},getHideableColumns:function(b){var c=this,a=b?null:c.hideableColumns;if(!a){a=c.hideableColumns=c.query("[hideable]")}return a},getHeaderIndex:function(b){var a=this.getGridColumns();return Ext.Array.indexOf(a,b)},getHeaderAtIndex:function(a){var b=this.getGridColumns();return b[a]},prepareData:function(i,c,k,m,a){var h={},d=this.gridDataColumns||this.getGridColumns(),e=d.length,g=0,j,q,l,p,b,n=a.store;for(;g<e;g++){b={tdCls:"",style:""};j=d[g];q=j.id;l=j.renderer;p=i[j.dataIndex];if(typeof l==="string"){j.renderer=l=Ext.util.Format[l]}if(typeof l==="function"){p=l.call(j.scope||this.ownerCt,p,b,k,c,g,n,m)}h[q+"-modified"]=k.isModified(j.dataIndex)?Ext.baseCSSPrefix+"grid-dirty-cell":"";h[q+"-tdCls"]=b.tdCls;h[q+"-tdAttr"]=b.tdAttr;h[q+"-style"]=b.style;if(p===undefined||p===null||p===""){p="&#160;"}h[q]=p}return h},expandToFit:function(a){if(this.view){this.view.expandToFit(a)}}});Ext.define("Ext.grid.column.Column",{extend:"Ext.grid.header.Container",alias:"widget.gridcolumn",requires:["Ext.util.KeyNav"],alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header "+Ext.baseCSSPrefix+"unselectable",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:5,sortState:null,possibleSortStates:["ASC","DESC"],renderTpl:'<div id="{id}-titleContainer" class="'+Ext.baseCSSPrefix+'column-header-inner"><span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'column-header-text">{text}</span><tpl if="!values.menuDisabled"><div id="{id}-triggerEl" class="'+Ext.baseCSSPrefix+'column-header-trigger"></div></tpl></div>',dataIndex:null,text:"&#160;",sortable:true,hideable:true,menuDisabled:false,renderer:false,align:"left",draggable:true,initDraggable:Ext.emptyFn,isHeader:true,initComponent:function(){var d=this,b,a,c;if(Ext.isDefined(d.header)){d.text=d.header;delete d.header}if(d.flex){d.minWidth=d.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}else{d.minWidth=d.width}if(!d.triStateSort){d.possibleSortStates.length=2}if(Ext.isDefined(d.columns)){d.isGroupHeader=true;d.items=d.columns;delete d.columns;delete d.flex;d.width=0;for(b=0,a=d.items.length;b<a;b++){c=d.items[b];if(!c.hidden){d.width+=c.width||Ext.grid.header.Container.prototype.defaultWidth}}d.minWidth=d.width;d.cls=(d.cls||"")+" "+Ext.baseCSSPrefix+"group-header";d.sortable=false;d.resizable=false;d.align="center"}d.addChildEls("titleContainer","triggerEl","textEl");d.callParent(arguments)},onAdd:function(a){a.isSubHeader=true;a.addCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},onRemove:function(a){a.isSubHeader=false;a.removeCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},initRenderData:function(){var a=this;Ext.applyIf(a.renderData,{text:a.text,menuDisabled:a.menuDisabled});return a.callParent(arguments)},applyColumnState:function(b){var a=this,c=Ext.isDefined;a.applyColumnsState(b.columns);if(c(b.hidden)){a.hidden=b.hidden}if(c(b.locked)){a.locked=b.locked}if(c(b.sortable)){a.sortable=b.sortable}if(c(b.width)){delete a.flex;a.width=b.width}else{if(c(b.flex)){delete a.width;a.flex=b.flex}}},getColumnState:function(){var b=this,a=[],c={id:b.headerId};b.savePropsToState(["hidden","sortable","locked","flex","width"],c);if(b.isGroupHeader){b.items.each(function(d){a.push(d.getColumnState())});if(a.length){c.columns=a}}else{if(b.isSubHeader&&b.ownerCt.hidden){delete b.hidden}}if("width" in c){delete c.flex}return c},setText:function(a){this.text=a;if(this.rendered){this.textEl.update(a)}},getOwnerHeaderCt:function(){return this.up(":not([isHeader])")},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},onRender:function(){var b=this,a=b.up("tablepanel");if(a&&(!b.sortable||a.sortableColumns===false)&&!b.groupable&&!b.lockable&&(a.enableColumnHide===false||!b.getOwnerHeaderCt().getHideableColumns().length)){b.menuDisabled=true}b.callParent(arguments)},afterRender:function(){var b=this,a=b.el;b.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"column-header-align-"+b.align).addClsOnOver(b.overCls);b.mon(a,{click:b.onElClick,dblclick:b.onElDblClick,scope:b});if(!Ext.isIE8||!Ext.isStrict){b.mon(b.getFocusEl(),{focus:b.onTitleMouseOver,blur:b.onTitleMouseOut,scope:b})}b.mon(b.titleContainer,{mouseenter:b.onTitleMouseOver,mouseleave:b.onTitleMouseOut,scope:b});b.keyNav=Ext.create("Ext.util.KeyNav",a,{enter:b.onEnterKey,down:b.onDownKey,scope:b})},setWidth:function(b,a){var j=this,c=j.ownerCt,k,h,g,d=j.getWidth(),e=0,l;if(b!==d){j.oldWidth=d;j.minWidth=j.width=b;if(c.isGroupHeader){k=c.items.items;h=k.length;for(g=0;g<h;g++){l=k[g];if(!l.hidden){e+=(l===j)?b:l.getWidth()}}c.setWidth(e,a)}else{if(a!==false){c.doLayout()}}}},afterComponentLayout:function(c,a){var d=this,b=this.getOwnerHeaderCt();d.callParent(arguments);if(c&&!d.isGroupHeader&&b){b.onHeaderResize(d,c,true)}if(d.oldWidth&&(c!==d.oldWidth)){b.fireEvent("columnresize",b,this,c)}delete d.oldWidth},setPadding:function(a){var c=this,b=Ext.util.TextMetrics.measure(c.textEl.dom,c.text).height;if(!c.isGroupHeader){if(c.titleContainer.getHeight()<a){c.titleContainer.dom.style.height=a+"px"}}a=c.titleContainer.getViewSize().height;if(b){c.titleContainer.setStyle({paddingTop:Math.max(((a-b)/2),0)+"px"})}if(Ext.isIE&&c.triggerEl){c.triggerEl.setHeight(a)}},onDestroy:function(){var a=this;Ext.destroy(a.textEl,a.keyNav);delete a.keyNav;a.callParent(arguments)},onTitleMouseOver:function(){this.titleContainer.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleContainer.removeCls(this.hoverCls)},onDownKey:function(a){if(this.triggerEl){this.onElClick(a,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(a){this.onElClick(a,this.el.dom)},onElDblClick:function(d,a){var c=this,b=c.ownerCt;if(b&&Ext.Array.indexOf(b.items,c)!==0&&c.isOnLeftEdge(d)){b.expandToFit(c.previousSibling("gridcolumn"))}},onElClick:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&&!a.ddLock){if(c.triggerEl&&(d.target===c.triggerEl.dom||b===c.triggerEl.dom||d.within(c.triggerEl))){a.onHeaderTriggerClick(c,d,b)}else{if(d.getKey()||(!c.isOnLeftEdge(d)&&!c.isOnRightEdge(d))){c.toggleSortState();a.onHeaderClick(c,d,b)}}}},processEvent:function(g,b,a,c,d,h){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var b=this,a,c;if(b.sortable){a=Ext.Array.indexOf(b.possibleSortStates,b.sortState);c=(a+1)%b.possibleSortStates.length;b.setSortState(b.possibleSortStates[c])}},doSort:function(b){var a=this.up("tablepanel").store;a.sort({property:this.getSortParam(),direction:b})},getSortParam:function(){return this.dataIndex},setSortState:function(a,k,g){var h=this,i=Ext.baseCSSPrefix+"column-header-sort-",j=i+"ASC",c=i+"DESC",b=i+"null",e=h.getOwnerHeaderCt(),d=h.sortState;if(d!==a&&h.getSortParam()){h.addCls(i+a);if(a&&!g){h.doSort(a)}switch(a){case"DESC":h.removeCls([j,b]);break;case"ASC":h.removeCls([c,b]);break;case null:h.removeCls([j,c]);break}if(e&&!h.triStateSort&&!k){e.clearOtherSortStates(h)}h.sortState=a;e.fireEvent("sortchange",e,h,a)}},hide:function(){var g=this,c,a,d,h,e=0,b=g.getOwnerHeaderCt();g.oldWidth=g.getWidth();if(g.isGroupHeader){c=g.items.items;g.callParent(arguments);b.onHeaderHide(g);for(d=0,a=c.length;d<a;d++){c[d].hidden=true;b.onHeaderHide(c[d],true)}return}h=g.ownerCt.componentLayout.layoutBusy;g.ownerCt.componentLayout.layoutBusy=true;g.callParent(arguments);g.ownerCt.componentLayout.layoutBusy=h;b.onHeaderHide(g);if(g.ownerCt.isGroupHeader){c=g.ownerCt.query(">:not([hidden])");if(!c.length){g.ownerCt.hide()}else{for(d=0,a=c.length;d<a;d++){e+=c[d].getWidth()}g.ownerCt.minWidth=e;g.ownerCt.setWidth(e)}}},show:function(){var l=this,b=l.ownerCt,g=b.componentLayout,c=g.layoutBusy,a=b.layout,h=a.layoutBusy,k,j,e,m,d=0;g.layoutBusy=a.layoutBusy=true;l.callParent(arguments);g.layoutBusy=c;a.layoutBusy=h;if(l.isSubHeader){if(!b.isVisible()){b.show()}}if(l.isGroupHeader&&!l.query(":not([hidden])").length){k=l.query(">*");for(e=0,j=k.length;e<j;e++){m=k[e];m.preventLayout=true;m.show();d+=m.getWidth();delete m.preventLayout}l.setWidth(d)}if(b.isGroupHeader&&l.preventLayout!==true){k=b.query(">:not([hidden])");for(e=0,j=k.length;e<j;e++){d+=k[e].getWidth()}b.minWidth=d;b.setWidth(d)}b=l.getOwnerHeaderCt();if(b){b.onHeaderShow(l,l.preventLayout)}},getDesiredWidth:function(){var a=this;if(a.rendered&&a.componentLayout&&a.componentLayout.lastComponentSize){return a.componentLayout.lastComponentSize.width}else{if(a.flex){return a.width}else{return a.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(a){return(a.getXY()[0]-this.el.getLeft()<=this.handleWidth)},isOnRightEdge:function(a){return(this.el.getRight()-a.getXY()[0]<=this.handleWidth)}});Ext.define("Ext.grid.RowNumberer",{extend:"Ext.grid.column.Column",alias:"widget.rownumberer",text:"&#160",width:23,sortable:false,align:"right",constructor:function(a){this.callParent(arguments);if(this.rowspan){this.renderer=Ext.Function.bind(this.renderer,this)}},resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:Ext.baseCSSPrefix+"row-numberer",rowspan:undefined,renderer:function(e,b,a,d,g,c){if(this.rowspan){b.cellAttr='rowspan="'+this.rowspan+'"'}b.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return c.indexOfTotal(a)+1}});Ext.define("Ext.view.DropZone",{extend:"Ext.dd.DropZone",indicatorHtml:'<div class="x-grid-drop-indicator-left"></div><div class="x-grid-drop-indicator-right"></div>',indicatorCls:"x-grid-drop-indicator",constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el])},fireViewEvent:function(){var b=this,a;b.lock();a=b.view.fireEvent.apply(b.view,arguments);b.unlock();return a},getTargetFromEvent:function(k){var j=k.getTarget(this.view.getItemSelector()),d,c,b,g,a,h;if(!j){d=k.getPageY();for(g=0,c=this.view.getNodes(),a=c.length;g<a;g++){b=c[g];h=Ext.fly(b).getBox();if(d<=h.bottom){return b}}}return j},getIndicator:function(){var a=this;if(!a.indicator){a.indicator=Ext.createWidget("component",{html:a.indicatorHtml,cls:a.indicatorCls,ownerCt:a.view,floating:true,shadow:false})}return a.indicator},getPosition:function(c,a){var g=c.getXY()[1],b=Ext.fly(a).getRegion(),d;if((b.bottom-g)>=(b.bottom-b.top)/2){d="before"}else{d="after"}return d},containsRecordAtOffset:function(d,b,g){if(!b){return false}var a=this.view,c=a.indexOf(b),e=a.getNode(c+g),h=e?a.getRecord(e):null;return h&&Ext.Array.contains(d,h)},positionIndicator:function(b,c,d){var g=this,i=g.view,h=g.getPosition(d,b),l=i.getRecord(b),a=c.records,j,k;if(!Ext.Array.contains(a,l)&&(h=="before"&&!g.containsRecordAtOffset(a,l,-1)||h=="after"&&!g.containsRecordAtOffset(a,l,1))){g.valid=true;if(g.overRecord!=l||g.currentPosition!=h){k=Ext.fly(b).getY()-i.el.getY()-1;if(h=="after"){k+=Ext.fly(b).getHeight()}g.getIndicator().setWidth(Ext.fly(i.el).getWidth()).showAt(0,k);g.overRecord=l;g.currentPosition=h}}else{g.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(c,a,g,d){var b=this;if(!Ext.Array.contains(d.records,b.view.getRecord(c))){b.positionIndicator(c,d,g)}return b.valid?b.dropAllowed:b.dropNotAllowed},notifyOut:function(c,a,g,d){var b=this;b.callParent(arguments);delete b.overRecord;delete b.currentPosition;if(b.indicator){b.indicator.hide()}},onContainerOver:function(a,h,g){var d=this,b=d.view,c=b.store.getCount();if(c){d.positionIndicator(b.getNode(c-1),g,h)}else{delete d.overRecord;delete d.currentPosition;d.getIndicator().setWidth(Ext.fly(b.el).getWidth()).showAt(0,0);d.valid=true}return d.dropAllowed},onContainerDrop:function(a,c,b){return this.onNodeDrop(a,null,c,b)},onNodeDrop:function(d,a,h,g){var c=this,j=false,b=function(){c.invalidateDrop();c.handleNodeDrop(g,c.overRecord,c.currentPosition);j=true;c.fireViewEvent("drop",d,g,c.overRecord,c.currentPosition)},i=false;if(c.valid){i=c.fireViewEvent("beforedrop",d,g,c.overRecord,c.currentPosition,b);if(i!==false){if(!j){b()}}}return i},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.grid.ViewDropZone",{extend:"Ext.view.DropZone",indicatorHtml:'<div class="x-grid-drop-indicator-left"></div><div class="x-grid-drop-indicator-right"></div>',indicatorCls:"x-grid-drop-indicator",handleNodeDrop:function(b,d,e){var j=this.view,k=j.getStore(),h,a,c,g;if(b.copy){a=b.records;b.records=[];for(c=0,g=a.length;c<g;c++){b.records.push(a[c].copy(a[c].getId()))}}else{b.view.store.remove(b.records,b.view===j)}h=k.indexOf(d);if(e!=="before"){h++}k.insert(h,b.records);j.getSelectionModel().select(b.records)}});Ext.define("Ext.grid.column.Action",{extend:"Ext.grid.column.Column",alias:["widget.actioncolumn"],alternateClassName:"Ext.grid.ActionColumn",header:"&#160;",actionIdRe:new RegExp(Ext.baseCSSPrefix+"action-col-(\\d+)"),altText:"",sortable:false,constructor:function(d){var h=this,b=Ext.apply({},d),c=b.items||[h],a=c.length,e,g;delete b.items;h.callParent([b]);h.items=c;h.renderer=function(i,j){i=Ext.isFunction(b.renderer)?b.renderer.apply(this,arguments)||"":"";j.tdCls+=" "+Ext.baseCSSPrefix+"action-col-cell";for(e=0;e<a;e++){g=c[e];g.disable=Ext.Function.bind(h.disableAction,h,[e]);g.enable=Ext.Function.bind(h.enableAction,h,[e]);i+='<img alt="'+(g.altText||h.altText)+'" src="'+(g.icon||Ext.BLANK_IMAGE_URL)+'" class="'+Ext.baseCSSPrefix+"action-col-icon "+Ext.baseCSSPrefix+"action-col-"+String(e)+" "+(g.disabled?Ext.baseCSSPrefix+"item-disabled":" ")+(g.iconCls||"")+" "+(Ext.isFunction(g.getClass)?g.getClass.apply(g.scope||h.scope||h,arguments):(h.iconCls||""))+'"'+((g.tooltip)?' data-qtip="'+g.tooltip+'"':"")+" />"}return i}},enableAction:function(a){var b=this;if(!a){a=0}else{if(!Ext.isNumber(a)){a=Ext.Array.indexOf(b.items,a)}}b.items[a].disabled=false;b.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+a).removeCls(b.disabledCls)},disableAction:function(a){var b=this;if(!a){a=0}else{if(!Ext.isNumber(a)){a=Ext.Array.indexOf(b.items,a)}}b.items[a].disabled=true;b.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+a).addCls(b.disabledCls)},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(g,j,k,a,h,c){var d=this,b=c.getTarget().className.match(d.actionIdRe),l,i;if(b){l=d.items[parseInt(b[1],10)];if(l){if(g=="click"){i=l.handler||d.handler;if(i&&!l.disabled){i.call(l.scope||d.scope||d,j,a,h,l,c)}}else{if(g=="mousedown"&&l.stopSelection!==false){return false}}}}return d.callParent(arguments)},cascade:function(b,a){b.call(a||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.grid.column.Boolean",{extend:"Ext.grid.column.Column",alias:["widget.booleancolumn"],alternateClassName:"Ext.grid.BooleanColumn",trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(a){this.callParent(arguments);var b=this.trueText,c=this.falseText,d=this.undefinedText;this.renderer=function(e){if(e===undefined){return d}if(!e||e==="false"){return c}return b}}});Ext.define("Ext.grid.column.Date",{extend:"Ext.grid.column.Column",alias:["widget.datecolumn"],requires:["Ext.Date"],alternateClassName:"Ext.grid.DateColumn",initComponent:function(){var a=this;a.callParent(arguments);if(!a.format){a.format=Ext.Date.defaultFormat}a.renderer=Ext.util.Format.dateRenderer(a.format)}});Ext.define("Ext.grid.column.Number",{extend:"Ext.grid.column.Column",alias:["widget.numbercolumn"],requires:["Ext.util.Format"],alternateClassName:"Ext.grid.NumberColumn",format:"0,000.00",constructor:function(a){this.callParent(arguments);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.define("Ext.grid.column.Template",{extend:"Ext.grid.column.Column",alias:["widget.templatecolumn"],requires:["Ext.XTemplate"],alternateClassName:"Ext.grid.TemplateColumn",constructor:function(a){var c=this,b;c.callParent(arguments);b=c.tpl=(!Ext.isPrimitive(c.tpl)&&c.tpl.compile)?c.tpl:Ext.create("Ext.XTemplate",c.tpl);c.renderer=function(g,h,d){var e=Ext.apply({},d.data,d.getAssociatedData());return b.apply(e)}}});Ext.define("Ext.grid.feature.Feature",{extend:"Ext.util.Observable",alias:"feature.feature",isFeature:true,disabled:false,hasFeatureEvent:true,eventPrefix:null,eventSelector:null,view:null,grid:null,collectData:false,getFeatureTpl:function(){return""},getFireEventArgs:function(b,a,c,d){return[b,a,c,d]},attachEvents:function(){},getFragmentTpl:function(){return},mutateMetaRowTpl:function(a){},getMetaRowTplFragments:function(){return{}},getTableFragments:function(){return{}},getAdditionalData:function(c,a,b,d){return{}},enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.grid.feature.AbstractSummary",{extend:"Ext.grid.feature.Feature",alias:"feature.abstractsummary",showSummaryRow:true,nestedIdRe:/\{\{id\}([\w\-]*)\}/g,toggleSummaryRow:function(a){this.showSummaryRow=!!a},getSummaryFragments:function(){var a={};if(this.showSummaryRow){Ext.apply(a,{printSummaryRow:Ext.bind(this.printSummaryRow,this)})}return a},printSummaryRow:function(b){var a=this.view.getTableChunker().metaRowTpl.join(""),c=Ext.baseCSSPrefix;a=a.replace(c+"grid-row",c+"grid-row-summary");a=a.replace("{{id}}","{gridSummaryValue}");a=a.replace(this.nestedIdRe,"{id$1}");a=a.replace("{[this.embedRowCls()]}","{rowCls}");a=a.replace("{[this.embedRowAttr()]}","{rowAttr}");a=Ext.create("Ext.XTemplate",a,{firstOrLastCls:Ext.view.TableChunker.firstOrLastCls});return a.applyTemplate({columns:this.getPrintData(b)})},getColumnValue:function(c,a){var b=Ext.getCmp(c.id),e=a[c.id],d=b.summaryRenderer;if(d){e=d.call(b.scope||this,e,a,c.dataIndex)}return e},getSummary:function(a,b,d,c){if(b){if(Ext.isFunction(b)){return a.aggregate(b,null,c)}switch(b){case"count":return a.count(c);case"min":return a.min(d,c);case"max":return a.max(d,c);case"sum":return a.sum(d,c);case"average":return a.average(d,c);default:return c?{}:""}}}});Ext.define("Ext.grid.feature.Chunking",{extend:"Ext.grid.feature.Feature",alias:"feature.chunking",chunkSize:20,rowHeight:Ext.isIE?27:26,visibleChunk:0,hasFeatureEvent:false,attachEvents:function(){var b=this.view.up("gridpanel"),a=b.down("gridscroller[dock=right]");a.el.on("scroll",this.onBodyScroll,this,{buffer:300})},onBodyScroll:function(g,c){var b=this.view,d=c.scrollTop,a=Math.floor(d/this.rowHeight/this.chunkSize);if(a!==this.visibleChunk){this.visibleChunk=a;b.refresh();b.el.dom.scrollTop=d;b.el.dom.scrollTop=d}},collectData:function(d,m,l,k,j){var c={fullWidth:j.fullWidth,chunks:[]},e=j.rows.length,b=0,g=0,a=this.visibleChunk,h,p,n;for(;b<e;b+=this.chunkSize,g++){if(b+this.chunkSize>e){n=e-b}else{n=this.chunkSize}if(g>=a-1&&g<=a+1){p=j.rows.slice(b,b+this.chunkSize)}else{p=[]}c.chunks.push({rows:p,fullWidth:k,chunkHeight:n*this.rowHeight})}return c},getTableFragments:function(){return{openTableWrap:function(){return'<tpl for="chunks"><div class="'+Ext.baseCSSPrefix+'grid-chunk" style="height: {chunkHeight}px;">'},closeTableWrap:function(){return"</div></tpl>"}}}});Ext.define("Ext.grid.feature.Grouping",{extend:"Ext.grid.feature.Feature",alias:"feature.grouping",eventPrefix:"group",eventSelector:"."+Ext.baseCSSPrefix+"grid-group-hd",constructor:function(){var a=this;a.collapsedState={};a.callParent(arguments)},groupHeaderTpl:"Group: {name}",depthToIndent:17,collapsedCls:Ext.baseCSSPrefix+"grid-group-collapsed",hdCollapsedCls:Ext.baseCSSPrefix+"grid-group-hd-collapsed",groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedHeader:false,startCollapsed:false,enableGroupingMenu:true,enableNoGroups:true,enable:function(){var c=this,a=c.view,b=a.store,d;c.lastGroupField=c.getGroupField();if(c.lastGroupIndex){b.group(c.lastGroupIndex)}c.callParent();d=c.view.headerCt.getMenu().down("#groupToggleMenuItem");d.setChecked(true,true);c.refreshIf()},disable:function(){var d=this,a=d.view,b=a.store,g=b.remoteGroup,e,c;c=b.groupers.first();if(c){d.lastGroupIndex=c.property;d.block();b.clearGrouping();d.unblock()}d.callParent();e=d.view.headerCt.getMenu().down("#groupToggleMenuItem");e.setChecked(true,true);e.setChecked(false,true);if(!g){a.refresh()}},refreshIf:function(){if(this.blockRefresh!==true){this.view.refresh()}},getFeatureTpl:function(b,c,a,e){var d=this;return["<tpl if=\"typeof rows !== 'undefined'\">",'<tr class="'+Ext.baseCSSPrefix+"grid-group-hd "+(d.startCollapsed?d.hdCollapsedCls:"")+' {hdCollapsedCls}"><td class="'+Ext.baseCSSPrefix+'grid-cell" colspan="'+c.columns.length+'" {[this.indentByDepth(values)]}><div class="'+Ext.baseCSSPrefix+'grid-cell-inner"><div class="'+Ext.baseCSSPrefix+'grid-group-title">{collapsed}'+d.groupHeaderTpl+"</div></div></td></tr>",'<tr id="{viewId}-gp-{name}" class="'+Ext.baseCSSPrefix+"grid-group-body "+(d.startCollapsed?d.collapsedCls:"")+' {collapsedCls}"><td colspan="'+c.columns.length+'">{[this.recurse(values)]}</td></tr>',"</tpl>"].join("")},getFragmentTpl:function(){return{indentByDepth:this.indentByDepth,depthToIndent:this.depthToIndent}},indentByDepth:function(a){var b=a.depth||0;return'style="padding-left:'+b*this.depthToIndent+'px;"'},destroy:function(){var a=this;delete a.view;delete a.prunedHeader},attachEvents:function(){var b=this,a=b.view;a.on({scope:b,groupclick:b.onGroupClick,rowfocus:b.onRowFocus});a.store.on("groupchange",b.onGroupChange,b);b.pruneGroupedHeader();if(b.enableGroupingMenu){b.injectGroupingMenu()}b.lastGroupField=b.getGroupField();b.block();b.onGroupChange();b.unblock()},injectGroupingMenu:function(){var b=this,a=b.view,c=a.headerCt;c.showMenuBy=b.showMenuBy;c.getMenuItems=b.getMenuItems()},showMenuBy:function(b,e){var d=this.getMenu(),c=d.down("#groupMenuItem"),a=e.groupable===false?"disable":"enable";c[a]();Ext.grid.header.Container.prototype.showMenuBy.apply(this,arguments)},getMenuItems:function(){var e=this,b=e.groupByText,d=e.disabled,a=e.showGroupsText,c=e.enableNoGroups,h=Ext.Function.bind(e.onGroupMenuItemClick,e),g=Ext.Function.bind(e.onGroupToggleMenuItemClick,e);return function(){var i=Ext.grid.header.Container.prototype.getMenuItems.call(this);i.push("-",{iconCls:Ext.baseCSSPrefix+"group-by-icon",itemId:"groupMenuItem",text:b,handler:h});if(c){i.push({itemId:"groupToggleMenuItem",text:a,checked:!d,checkHandler:g})}return i}},onGroupMenuItemClick:function(c,h){var d=this,i=c.parentMenu,j=i.activeHeader,a=d.view,b=a.store,g=b.remoteGroup;delete d.lastGroupIndex;d.block();d.enable();b.group(j.dataIndex);d.pruneGroupedHeader();d.unblock();if(!g){a.refresh()}},block:function(){this.blockRefresh=this.view.blockRefresh=true},unblock:function(){this.blockRefresh=this.view.blockRefresh=false},onGroupToggleMenuItemClick:function(a,b){this[b?"enable":"disable"]()},pruneGroupedHeader:function(){var d=this,b=d.view,c=b.store,a=d.getGroupField(),e=b.headerCt,g=e.down("header[dataIndex="+a+"]");if(g){if(d.prunedHeader){d.prunedHeader.show()}d.prunedHeader=g;g.hide()}},getGroupField:function(){var a=this.view.store.groupers.first();if(a){return a.property}return""},onRowFocus:function(c){var b=this.view.getNode(c),a=Ext.fly(b).up("."+this.collapsedCls);if(a){this.expand(a)}},expand:function(c){var e=this,b=e.view,d=b.up("gridpanel"),a=Ext.getDom(c);e.collapsedState[a.id]=false;c.removeCls(e.collapsedCls);c.prev().removeCls(e.hdCollapsedCls);d.determineScrollbars();d.invalidateScroller();b.fireEvent("groupexpand")},collapse:function(c){var e=this,b=e.view,d=b.up("gridpanel"),a=Ext.getDom(c);e.collapsedState[a.id]=true;c.addCls(e.collapsedCls);c.prev().addCls(e.hdCollapsedCls);d.determineScrollbars();d.invalidateScroller();b.fireEvent("groupcollapse")},onGroupChange:function(){var b=this,c=b.getGroupField(),a;if(b.hideGroupedHeader){if(b.lastGroupField){a=b.getMenuItem(b.lastGroupField);if(a){a.setChecked(true)}}if(c){a=b.getMenuItem(c);if(a){a.setChecked(false)}}}if(b.blockRefresh!==true){b.view.refresh()}b.lastGroupField=c},getMenuItem:function(b){var a=this.view,d=a.headerCt.down("gridcolumn[dataIndex="+b+"]"),c=a.headerCt.getMenu();return c.down("menuitem[headerId="+d.id+"]")},onGroupClick:function(c,i,a,j,h){var g=this,d=g.toggleCls,b=Ext.fly(i.nextSibling,"_grouping");if(b.hasCls(g.collapsedCls)){g.expand(b)}else{g.collapse(b)}},getMetaRowTplFragments:function(){return{isRow:this.isRow,closeRow:this.closeRow}},isRow:function(){return"<tpl if=\"typeof rows === 'undefined'\">"},closeRow:function(){return"</tpl>"},mutateMetaRowTpl:function(a){a.unshift("{[this.isRow()]}");a.push("{[this.closeRow()]}")},getAdditionalData:function(e,j,g,i){var h=this.view,d=h.headerCt,c=d.items.getAt(0),b={},a=c.id+"-tdAttr";b[a]=this.indentByDepth(e)+" "+(i[a]?i[a]:"");b.collapsed="true";return b},getGroupRows:function(h,c,b,i){var e=this,d=h.children,g=h.rows=[],a=e.view;h.viewId=a.id;Ext.Array.each(c,function(k,j){if(Ext.Array.indexOf(d,k)!=-1){g.push(Ext.apply(b[j],{depth:1}))}});delete h.children;h.fullWidth=i;if(e.collapsedState[a.id+"-gp-"+h.name]){h.collapsedCls=e.collapsedCls;h.hdCollapsedCls=e.hdCollapsedCls}return h},collectData:function(d,c,i,h,g){var e=this,b=e.view.store,a;if(!e.disabled&&b.isGrouped()){a=b.getGroups();Ext.Array.each(a,function(k,j){e.getGroupRows(k,d,c,h)},e);return{rows:a,fullWidth:h}}return g},getFireEventArgs:function(g,h,d,c){var j=[g,h,d],i=Ext.fly(d.nextSibling,"_grouping"),a=Ext.getDom(i).id,b=h.id+"-gp-",k=a.substr(b.length);j.push(k,c);return j}});Ext.define("Ext.grid.feature.GroupingSummary",{extend:"Ext.grid.feature.Grouping",alias:"feature.groupingsummary",mixins:{summary:"Ext.grid.feature.AbstractSummary"},getFeatureTpl:function(){var a=this.callParent(arguments);if(this.showSummaryRow){a=a.replace("</tpl>","");a+="{[this.printSummaryRow(xindex)]}</tpl>"}return a},getFragmentTpl:function(){var b=this,a=b.callParent();Ext.apply(a,b.getSummaryFragments());if(b.showSummaryRow){b.summaryGroups=b.view.store.getGroups();b.summaryData=b.generateSummaryData()}return a},getPrintData:function(j){var k=this,e=k.view.headerCt.getColumnsForTpl(),h=0,b=e.length,g=[],a=k.summaryGroups[j-1].name,d=k.summaryData[a],c;for(;h<b;++h){c=e[h];c.gridSummaryValue=this.getColumnValue(c,d);g.push(c)}return g},generateSummaryData:function(){var m=this,j={},p={},q=m.view.store,a=this.getGroupField(),l=q.proxy.reader,d=m.summaryGroups,g=m.view.headerCt.getColumnsForTpl(),b,h,c,e,n,r,k;for(h=0,c=d.length;h<c;++h){j[d[h].name]={}}if(m.remoteRoot&&l.rawData){n=l.root;l.root=m.remoteRoot;l.buildExtractors(true);Ext.Array.each(l.getRoot(l.rawData),function(i){p[i[a]]=i});l.root=n;l.buildExtractors(true)}for(h=0,c=g.length;h<c;++h){k=Ext.getCmp(g[h].id);e=m.getSummary(q,k.summaryType,k.dataIndex,true);for(r in e){if(e.hasOwnProperty(r)){j[r][k.id]=e[r]}}for(r in p){if(p.hasOwnProperty(r)){b=p[r][k.dataIndex];if(b!==undefined&&j[r]!==undefined){j[r][k.id]=b}}}}return j}});Ext.define("Ext.grid.feature.RowBody",{extend:"Ext.grid.feature.Feature",alias:"feature.rowbody",rowBodyHiddenCls:Ext.baseCSSPrefix+"grid-row-body-hidden",rowBodyTrCls:Ext.baseCSSPrefix+"grid-rowbody-tr",rowBodyTdCls:Ext.baseCSSPrefix+"grid-cell-rowbody",rowBodyDivCls:Ext.baseCSSPrefix+"grid-rowbody",eventPrefix:"rowbody",eventSelector:"."+Ext.baseCSSPrefix+"grid-rowbody-tr",getRowBody:function(a){return['<tr class="'+this.rowBodyTrCls+' {rowBodyCls}">','<td class="'+this.rowBodyTdCls+'" colspan="{rowBodyColspan}">','<div class="'+this.rowBodyDivCls+'">{rowBody}</div>',"</td>","</tr>"].join("")},getMetaRowTplFragments:function(){return{getRowBody:this.getRowBody,rowBodyTrCls:this.rowBodyTrCls,rowBodyTdCls:this.rowBodyTdCls,rowBodyDivCls:this.rowBodyDivCls}},mutateMetaRowTpl:function(a){a.push("{[this.getRowBody(values)]}")},getAdditionalData:function(c,a,b,g){var d=this.view.headerCt,e=d.getColumnCount();return{rowBody:"",rowBodyCls:this.rowBodyCls,rowBodyColspan:e}}});Ext.define("Ext.grid.feature.RowWrap",{extend:"Ext.grid.feature.Feature",alias:"feature.rowwrap",hasFeatureEvent:false,mutateMetaRowTpl:function(a){a[0]=a[0].replace(Ext.baseCSSPrefix+"grid-row","");a[0]=a[0].replace("{[this.embedRowCls()]}","");a.unshift('<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" style="width: {[this.embedFullWidth()]}px;">');a.unshift('<tr class="'+Ext.baseCSSPrefix+'grid-row {[this.embedRowCls()]}"><td colspan="{[this.embedColSpan()]}"><div class="'+Ext.baseCSSPrefix+'grid-rowwrap-div">');a.push("</table>");a.push("</div></td></tr>")},embedColSpan:function(){return"{colspan}"},embedFullWidth:function(){return"{fullWidth}"},getAdditionalData:function(h,p,k,m){var d=this.view.headerCt,c=d.getColumnCount(),n=d.getFullWidth(),l=d.query("gridcolumn"),q=l.length,g=0,b={colspan:c,fullWidth:n},a,j,e;for(;g<q;g++){a=l[g].id;j=a+"-tdCls";e=Ext.baseCSSPrefix+"grid-col-resizer-"+a;b[j]=e+" "+(m[j]?m[j]:"");b[a+"-tdAttr"]=' style="width: '+(l[g].hidden?0:l[g].getDesiredWidth())+'px;" ';if(m[a+"-tdAttr"]){b[a+"-tdAttr"]+=m[a+"-tdAttr"]}}return b},getMetaRowTplFragments:function(){return{embedFullWidth:this.embedFullWidth,embedColSpan:this.embedColSpan}}});Ext.define("Ext.grid.feature.Summary",{extend:"Ext.grid.feature.AbstractSummary",alias:"feature.summary",getFragmentTpl:function(){this.summaryData=this.generateSummaryData();return this.getSummaryFragments()},getTableFragments:function(){if(this.showSummaryRow){return{closeRows:this.closeRows}}},closeRows:function(){return"</tpl>{[this.printSummaryRow()]}"},getPrintData:function(a){var g=this,c=g.view.headerCt.getColumnsForTpl(),b=0,e=c.length,h=[],j=g.summaryData,d;for(;b<e;++b){d=c[b];d.gridSummaryValue=this.getColumnValue(d,j);h.push(d)}return h},generateSummaryData:function(){var h=this,d={},j=h.view.store,c=h.view.headerCt.getColumnsForTpl(),e=0,a=c.length,b,k,g;for(e=0,a=c.length;e<a;++e){g=Ext.getCmp(c[e].id);d[g.id]=h.getSummary(j,g.summaryType,g.dataIndex,false)}return d}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(b){var d=b.getTarget("."+this.colHeaderCls),a;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&&a.draggable&&!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){var c=document.createElement("div");c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(a){return a.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:"&#160;"},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:"&#160;"},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),h,g;if((c.right-a)<=(c.right-c.left)/2){h="after"}else{h="before"}return{pos:h,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(y,q,w){var a=this.getLocation(w,q),s=a.header,h=a.pos,g=y.nextSibling("gridcolumn:not([hidden])"),v=y.previousSibling("gridcolumn:not([hidden])"),d,m,t,u,b,c,l,n,z,x;if(!s.draggable&&s.getIndex()==0){return false}this.lastLocation=a;if((y!==s)&&((h==="before"&&g!==s)||(h==="after"&&v!==s))&&!s.isDescendantOf(y)){var p=Ext.dd.DragDropManager.getRelated(this),k=p.length,r=0,j;for(;r<k;r++){j=p[r];if(j!==this&&j.invalidateDrop){j.invalidateDrop()}}this.valid=true;m=this.getTopIndicator();t=this.getBottomIndicator();if(h==="before"){u="tl";b="bl"}else{u="tr";b="br"}c=s.el.getAnchorXY(u);l=s.el.getAnchorXY(b);n=this.headerCt.el;z=n.getLeft();x=n.getRight();c[0]=Ext.Number.constrain(c[0],z,x);l[0]=Ext.Number.constrain(l[0],z,x);c[0]-=4;c[1]-=9;l[0]-=4;m.setXY(c);t.setXY(l);m.show();t.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(b,a,d,c){if(c.header.el.dom!==b){this.positionIndicator(c.header,b,d)}return this.valid?this.dropAllowed:this.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(d,l,k,g){if(this.valid){this.invalidateDrop();var i=g.header,h=this.lastLocation,n=i.ownerCt,a=n.items.indexOf(i),j=h.header.ownerCt,p=j.items.indexOf(h.header),c=this.headerCt,m,b;if(h.pos==="after"){p++}if(n!==j&&n.lockableInjected&&j.lockableInjected&&j.lockedCt){b=n.up("[scrollerOwner]");b.lock(i,p)}else{if(n!==j&&n.lockableInjected&&j.lockableInjected&&n.lockedCt){b=n.up("[scrollerOwner]");b.unlock(i,p)}else{if((n===j)&&(p>n.items.indexOf(i))){p--}if(n!==j){n.suspendLayout=true;n.remove(i,false);n.suspendLayout=false}if(n.isGroupHeader){if(!n.items.getCount()){m=n.ownerCt;m.suspendLayout=true;m.remove(n,false);n.el.dom.parentNode.removeChild(n.el.dom);m.suspendLayout=false}else{n.minWidth=n.getWidth()-i.getWidth();n.setWidth(n.minWidth)}}j.suspendLayout=true;if(n===j){j.move(a,p)}else{j.insert(p,i)}j.suspendLayout=false;if(j.isGroupHeader){i.savedFlex=i.flex;delete i.flex;i.width=i.getWidth();j.minWidth=j.getWidth()+i.getWidth()-(i.savedFlex?1:0);j.setWidth(j.minWidth)}else{if(i.savedFlex){i.flex=i.savedFlex;delete i.width}}c.purgeCache();c.doLayout();c.onHeaderMoved(i,a,p);if(!n.items.getCount()){n.destroy()}}}}}});Ext.define("Ext.grid.plugin.Editing",{alias:"editing.editing",requires:["Ext.grid.column.Column","Ext.util.KeyNav"],mixins:{observable:"Ext.util.Observable"},clicksToEdit:2,defaultFieldXType:"textfield",editStyle:"",constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("beforeedit","edit","validateedit");b.mixins.observable.constructor.call(b);b.relayEvents(b,["afteredit"],"after")},init:function(a){var b=this;b.grid=a;b.view=a.view;b.initEvents();b.mon(a,"reconfigure",b.onReconfigure,b);b.onReconfigure();a.relayEvents(b,["beforeedit","edit","validateedit"]);a.isEditable=true;a.editingPlugin=a.view.editingPlugin=b},onReconfigure:function(){this.initFieldAccessors(this.view.getGridColumns())},destroy:function(){var c=this,b=c.grid,d=b.headerCt,a=b.events;Ext.destroy(c.keyNav);c.removeFieldAccessors(b.getView().getGridColumns());c.clearListeners();delete c.grid.editingPlugin;delete c.grid.view.editingPlugin;delete c.grid;delete c.view;delete c.editor;delete c.keyNav},getEditStyle:function(){return this.editStyle},initFieldAccessors:function(a){var b=this;if(Ext.isArray(a)){Ext.Array.forEach(a,b.initFieldAccessors,b);return}Ext.applyIf(a,{getEditor:function(c,d){return b.getColumnField(this,d)},setEditor:function(c){b.setColumnField(this,c)}})},removeFieldAccessors:function(a){var b=this;if(Ext.isArray(a)){Ext.Array.forEach(a,b.removeFieldAccessors,b);return}delete a.getEditor;delete a.setEditor},getColumnField:function(b,a){var c=b.field;if(!c&&b.editor){c=b.editor;delete b.editor}if(!c&&a){c=a}if(c){if(Ext.isString(c)){c={xtype:c}}if(Ext.isObject(c)&&!c.isFormField){c=Ext.ComponentManager.create(c,this.defaultFieldXType);b.field=c}Ext.apply(c,{name:b.dataIndex});return c}},setColumnField:function(a,b){if(Ext.isObject(b)&&!b.isFormField){b=Ext.ComponentManager.create(b,this.defaultFieldXType)}a.field=b},initEvents:function(){var a=this;a.initEditTriggers();a.initCancelTriggers()},initCancelTriggers:Ext.emptyFn,initEditTriggers:function(){var c=this,b=c.view,a=c.clicksToEdit===1?"click":"dblclick";c.mon(b,"cell"+a,c.startEditByClick,c);b.on("render",function(){c.keyNav=Ext.create("Ext.util.KeyNav",b.el,{enter:c.onEnterKey,esc:c.onEscKey,scope:c})},c,{single:true})},onEnterKey:function(h){var d=this,c=d.grid,b=c.getSelectionModel(),a,g=c.headerCt.getHeaderAtIndex(0);if(b.getCurrentPosition){pos=b.getCurrentPosition();a=c.store.getAt(pos.row);g=c.headerCt.getHeaderAtIndex(pos.column)}else{a=b.getLastSelected()}d.startEdit(a,g)},onEscKey:function(a){this.cancelEdit()},startEditByClick:function(c,a,i,b,h,d,g){this.startEdit(b,c.getHeaderAtIndex(i))},beforeEdit:Ext.emptyFn,startEdit:function(a,d){var c=this,b=c.getEditingContext(a,d);if(c.beforeEdit(b)===false||c.fireEvent("beforeedit",b)===false||b.cancel){return false}c.context=b;c.editing=true},getEditingContext:function(e,c){var g=this,a=g.grid,j=a.store,b,d,h=a.getView(),i;if(Ext.isNumber(e)){b=e;e=j.getAt(b)}else{b=j.indexOf(e)}if(Ext.isNumber(c)){d=c;c=a.headerCt.getHeaderAtIndex(d)}else{d=c.getIndex()}i=e.get(c.dataIndex);return{grid:a,record:e,field:c.dataIndex,value:i,row:h.getNode(b),column:c,rowIdx:b,colIdx:d}},cancelEdit:function(){this.editing=false},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.fireEvent("edit",a.context)}delete a.context;a.editing=false},validateEdit:function(){var b=this,a=b.context;return b.fireEvent("validateedit",b,a)!==false&&!a.cancel}});Ext.define("Ext.grid.plugin.CellEditing",{alias:"plugin.cellediting",extend:"Ext.grid.plugin.Editing",requires:["Ext.grid.CellEditor","Ext.util.DelayedTask"],constructor:function(){this.callParent(arguments);this.editors=Ext.create("Ext.util.MixedCollection",false,function(a){return a.editorId});this.editTask=Ext.create("Ext.util.DelayedTask")},onReconfigure:function(){this.editors.clear();this.callParent()},destroy:function(){var a=this;a.editTask.cancel();a.editors.each(Ext.destroy,Ext);a.editors.clear();a.callParent(arguments)},onBodyScroll:function(){var a=this.getActiveEditor();if(a&&a.field){if(a.field.triggerBlur){a.field.triggerBlur()}else{a.field.blur()}}},initCancelTriggers:function(){var c=this,b=c.grid,a=b.view;a.addElListener("mousewheel",c.cancelEdit,c);c.mon(a,"bodyscroll",c.onBodyScroll,c);c.mon(b,{columnresize:c.cancelEdit,columnmove:c.cancelEdit,scope:c})},startEdit:function(a,g){var d=this,e=a.get(g.dataIndex),c=d.getEditingContext(a,g),b;a=c.record;g=c.column;d.completeEdit();c.originalValue=c.value=e;if(d.beforeEdit(c)===false||d.fireEvent("beforeedit",c)===false||c.cancel){return false}if(g&&!g.getEditor(a)){return false}b=d.getEditor(a,g);if(b){d.context=c;d.setActiveEditor(b);d.setActiveRecord(a);d.setActiveColumn(g);d.editTask.delay(15,b.startEdit,b,[d.getCell(a,g),e])}else{d.grid.getView().getEl(g).focus((Ext.isWebKit||Ext.isIE)?10:false)}},completeEdit:function(){var a=this.getActiveEditor();if(a){a.completeEdit()}},setActiveEditor:function(a){this.activeEditor=a},getActiveEditor:function(){return this.activeEditor},setActiveColumn:function(a){this.activeColumn=a},getActiveColumn:function(){return this.activeColumn},setActiveRecord:function(a){this.activeRecord=a},getActiveRecord:function(){return this.activeRecord},getEditor:function(a,d){var g=this,e=g.editors,c=d.getItemId(),b=e.getByKey(c);if(b){return b}else{b=d.getEditor(a);if(!b){return false}if(!(b instanceof Ext.grid.CellEditor)){b=Ext.create("Ext.grid.CellEditor",{editorId:c,field:b})}b.parentEl=g.grid.getEditorParent();b.on({scope:g,specialkey:g.onSpecialKey,complete:g.onEditComplete,canceledit:g.cancelEdit});e.add(b);return b}},setColumnField:function(b,c){var a=this.editors.getByKey(b.getItemId());Ext.destroy(a,b.field);this.editors.removeAtKey(b.getItemId());this.callParent(arguments)},getCell:function(a,b){return this.grid.getView().getCell(a,b)},onSpecialKey:function(a,d,c){var b=this.grid,g;if(c.getKey()===c.TAB){c.stopEvent();g=b.getSelectionModel();if(g.onEditorTab){g.onEditorTab(this,c)}}},onEditComplete:function(b,h,a){var g=this,d=g.grid,i=d.getSelectionModel(),e=g.getActiveColumn(),c;if(e){c=e.dataIndex;g.setActiveEditor(null);g.setActiveColumn(null);g.setActiveRecord(null);delete i.wasEditing;if(!g.validateEdit()){return}if(h!==a){g.context.record.set(c,h)}else{d.getView().getEl(e).focus()}g.context.value=h;g.fireEvent("edit",g,g.context)}},cancelEdit:function(){var c=this,b=c.getActiveEditor(),a=c.grid.getView().getEl(c.getActiveColumn());c.setActiveEditor(null);c.setActiveColumn(null);c.setActiveRecord(null);if(b){b.cancelEdit();a.focus()}},startEditByPosition:function(a){var d=this,c=d.grid,g=c.getSelectionModel(),b=c.store.getAt(a.row),e=c.headerCt.getHeaderAtIndex(a.column);if(g.selectByPosition){g.selectByPosition(a)}d.startEdit(b,e)}});Ext.define("Ext.grid.plugin.DragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.gridviewdragdrop",uses:["Ext.view.DragZone","Ext.grid.ViewDropZone"],dragText:"{0} selected row{1}",ddGroup:"GridDD",enableDrop:true,enableDrag:true,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},enable:function(){var a=this;if(a.dragZone){a.dragZone.unlock()}if(a.dropZone){a.dropZone.unlock()}a.callParent()},disable:function(){var a=this;if(a.dragZone){a.dragZone.lock()}if(a.dropZone){a.dropZone.lock()}a.callParent()},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=Ext.create("Ext.view.DragZone",{view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText})}if(b.enableDrop){b.dropZone=Ext.create("Ext.grid.ViewDropZone",{view:a,ddGroup:b.dropGroup||b.ddGroup})}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.util.Observable",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(a){this.headerCt=a;a.on("render",this.onHeaderCtRender,this)},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){this.dragZone=Ext.create("Ext.grid.header.DragZone",this.headerCt);this.dropZone=Ext.create("Ext.grid.header.DropZone",this.headerCt);if(this.disabled){this.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.util.Observable",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,configs:{dynamic:true},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(a){this.headerCt=a;a.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=Ext.create("Ext.dd.DragTracker",{disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(c,a){if(this.headerCt.dragging){if(this.activeHd){this.activeHd.el.dom.style.cursor="";delete this.activeHd}}else{var g=c.getTarget("."+this.colHeaderCls,3,true),b,d;if(g){b=Ext.getCmp(g.id);if(b.isOnLeftEdge(c)){d=b.previousNode("gridcolumn:not([hidden])")}else{if(b.isOnRightEdge(c)){d=b}else{d=null}}if(d){if(d.isGroupHeader){d=d.down(":not([isGroupHeader]):not([hidden]):last")}if(d&&!(d.fixed||(d.resizable===false)||this.disabled)){this.activeHd=d;b.el.dom.style.cursor=this.eResizeCursor}}else{b.el.dom.style.cursor="";delete this.activeHd}}}},onBeforeStart:function(b){var a=b.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(a).hasCls("x-column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var a=this.dragHd.el,b=Ext.util.Region.getRegion(a);return b.adjust(0,this.maxColWidth-a.getWidth(),0,this.minColWidth)},onStart:function(v){var w=this,h=w.dragHd,b=h.el,p=b.getWidth(),j=w.headerCt,l=v.getTarget();if(w.dragHd&&!Ext.fly(l).hasCls("x-column-header-trigger")){j.dragging=true}w.origWidth=p;if(!w.dynamic){var d=b.getXY(),s=j.up("[scrollerOwner]"),g=w.dragHd.up(":not([isGroupHeader])"),k=g.up(),c=s.getLhsMarker(),n=s.getRhsMarker(),a=n.parent(),i=a.getLeft(true),u=a.getTop(true),r=a.translatePoints(d),q=k.body.getHeight()+j.getHeight(),m=r.top-u;c.setTop(m);n.setTop(m);c.setHeight(q);n.setHeight(q);c.setLeft(r.left-i);n.setLeft(r.left+p-i)}},onDrag:function(h){if(!this.dynamic){var g=this.tracker.getXY("point"),a=this.headerCt.up("[scrollerOwner]"),i=a.getRhsMarker(),c=i.parent(),b=c.translatePoints(g),d=c.getLeft(true);i.setLeft(b.left-d)}else{this.doResize()}},onEnd:function(h){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var g=this.dragHd,c=this.headerCt.up("[scrollerOwner]"),d=c.getLhsMarker(),j=c.getRhsMarker(),a=g.getWidth(),i=this.tracker.getOffset("point"),b=-9999;d.setLeft(b);j.setLeft(b)}this.doResize()}},doResize:function(){if(this.dragHd){var b=this.dragHd,a,c=this.tracker.getOffset("point");if(b.flex){delete b.flex}this.headerCt.suspendLayout=true;b.setWidth(this.origWidth+c[0],false);if(this.headerCt.forceFit){a=b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(a){delete a.flex;a.setWidth(a.getWidth()-c[0],false)}}this.headerCt.suspendLayout=false;this.headerCt.doComponentLayout(this.headerCt.getFullWidth())}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.grid.plugin.RowEditing",{extend:"Ext.grid.plugin.Editing",alias:"plugin.rowediting",requires:["Ext.grid.RowEditor"],editStyle:"row",autoCancel:true,errorSummary:true,constructor:function(){var a=this;a.callParent(arguments);if(!a.clicksToMoveEditor){a.clicksToMoveEditor=a.clicksToEdit}a.autoCancel=!!a.autoCancel},destroy:function(){var a=this;Ext.destroy(a.editor);a.callParent(arguments)},startEdit:function(a,d){var c=this,b=c.getEditor();if(c.callParent(arguments)===false){return false}if(b.beforeEdit()!==false){b.startEdit(c.context.record,c.context.column)}},cancelEdit:function(){var a=this;if(a.editing){a.getEditor().cancelEdit();a.callParent(arguments);a.fireEvent("canceledit",a.context)}},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.editing=false;a.fireEvent("edit",a.context)}},validateEdit:function(){var g=this,e=g.editor,d=g.context,a=d.record,c={},h={},b;e.items.each(function(i){b=i.name;c[b]=i.getValue();h[b]=a.get(b)});Ext.apply(d,{newValues:c,originalValues:h});return g.callParent(arguments)&&g.getEditor().completeEdit()},getEditor:function(){var a=this;if(!a.editor){a.editor=a.initEditor()}return a.editor},initEditor:function(){var c=this,b=c.grid,a=c.view,d=b.headerCt;return Ext.create("Ext.grid.RowEditor",{autoCancel:c.autoCancel,errorSummary:c.errorSummary,fields:d.getGridColumns(),hidden:true,editingPlugin:c,renderTo:a.el})},initEditTriggers:function(){var c=this,b=c.grid,a=c.view,e=b.headerCt,d=c.clicksToMoveEditor===1?"click":"dblclick";c.callParent(arguments);if(c.clicksToMoveEditor!==c.clicksToEdit){c.mon(a,"cell"+d,c.moveEditorByClick,c)}a.on("render",function(){c.mon(e,{add:c.onColumnAdd,remove:c.onColumnRemove,columnresize:c.onColumnResize,columnhide:c.onColumnHide,columnshow:c.onColumnShow,columnmove:c.onColumnMove,scope:c})},c,{single:true})},startEditByClick:function(){var a=this;if(!a.editing||a.clicksToMoveEditor===a.clicksToEdit){a.callParent(arguments)}},moveEditorByClick:function(){var a=this;if(a.editing){a.superclass.startEditByClick.apply(a,arguments)}},onColumnAdd:function(a,c){if(c.isHeader){var d=this,b;d.initFieldAccessors(c);b=d.getEditor();if(b&&b.onColumnAdd){b.onColumnAdd(c)}}},onColumnRemove:function(a,c){if(c.isHeader){var d=this,b=d.getEditor();if(b&&b.onColumnRemove){b.onColumnRemove(c)}d.removeFieldAccessors(c)}},onColumnResize:function(a,d,c){if(d.isHeader){var e=this,b=e.getEditor();if(b&&b.onColumnResize){b.onColumnResize(d,c)}}},onColumnHide:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnHide){b.onColumnHide(c)}},onColumnShow:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnShow){b.onColumnShow(c)}},onColumnMove:function(a,d,c,g){var e=this,b=e.getEditor();if(b&&b.onColumnMove){b.onColumnMove(d,c,g)}},setColumnField:function(a,c){var b=this;b.callParent(arguments);b.getEditor().setField(a.field,a)}});Ext.define("Ext.grid.property.Grid",{extend:"Ext.grid.Panel",alias:"widget.propertygrid",alternateClassName:"Ext.grid.PropertyGrid",uses:["Ext.grid.plugin.CellEditing","Ext.grid.property.Store","Ext.grid.property.HeaderContainer","Ext.XTemplate","Ext.grid.CellEditor","Ext.form.field.Date","Ext.form.field.Text","Ext.form.field.Number"],valueField:"value",nameField:"name",enableColumnMove:false,columnLines:true,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,initComponent:function(){var a=this;a.addCls(Ext.baseCSSPrefix+"property-grid");a.plugins=a.plugins||[];a.plugins.push(Ext.create("Ext.grid.plugin.CellEditing",{clicksToEdit:a.clicksToEdit,startEdit:function(b,c){return this.self.prototype.startEdit.call(this,b,a.headerCt.child("#"+a.valueField))}}));a.selModel={selType:"cellmodel",onCellSelect:function(b){if(b.column!=1){b.column=1}return this.self.prototype.onCellSelect.call(this,b)}};a.customRenderers=a.customRenderers||{};a.customEditors=a.customEditors||{};if(!a.store){a.propStore=a.store=Ext.create("Ext.grid.property.Store",a,a.source)}a.store.sort("name","ASC");a.columns=Ext.create("Ext.grid.property.HeaderContainer",a,a.store);a.addEvents("beforepropertychange","propertychange");a.callParent();a.getView().walkCells=this.walkCells;a.editors={date:Ext.create("Ext.grid.CellEditor",{field:Ext.create("Ext.form.field.Date",{selectOnFocus:true})}),string:Ext.create("Ext.grid.CellEditor",{field:Ext.create("Ext.form.field.Text",{selectOnFocus:true})}),number:Ext.create("Ext.grid.CellEditor",{field:Ext.create("Ext.form.field.Number",{selectOnFocus:true})}),"boolean":Ext.create("Ext.grid.CellEditor",{field:Ext.create("Ext.form.field.ComboBox",{editable:false,store:[[true,a.headerCt.trueText],[false,a.headerCt.falseText]]})})};a.store.on("update",a.onUpdate,a)},onUpdate:function(d,a,c){var g=this,b,e;if(c==Ext.data.Model.EDIT){b=a.get(g.valueField);e=a.modified.value;if(g.fireEvent("beforepropertychange",g.source,a.getId(),b,e)!==false){if(g.source){g.source[a.getId()]=b}a.commit();g.fireEvent("propertychange",g.source,a.getId(),b,e)}else{a.reject()}}},walkCells:function(h,g,d,c,a,b){if(g=="left"){g="up"}else{if(g=="right"){g="down"}}h=Ext.view.Table.prototype.walkCells.call(this,h,g,d,c,a,b);if(!h.column){h.column=1}return h},getCellEditor:function(a,c){var d=this,e=a.get(d.nameField),g=a.get(d.valueField),b=d.customEditors[e];if(b){if(!(b instanceof Ext.grid.CellEditor)){if(!(b instanceof Ext.form.field.Base)){b=Ext.ComponentManager.create(b,"textfield")}b=d.customEditors[e]=Ext.create("Ext.grid.CellEditor",{field:b})}}else{if(Ext.isDate(g)){b=d.editors.date}else{if(Ext.isNumber(g)){b=d.editors.number}else{if(Ext.isBoolean(g)){b=d.editors["boolean"]}else{b=d.editors.string}}}}b.editorId=e;return b},beforeDestroy:function(){var a=this;a.callParent();a.destroyEditors(a.editors);a.destroyEditors(a.customEditors);delete a.source},destroyEditors:function(b){for(var a in b){if(b.hasOwnProperty(a)){Ext.destroy(b[a])}}},setSource:function(a){this.source=a;this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.define("Ext.grid.property.HeaderContainer",{extend:"Ext.grid.header.Container",alternateClassName:"Ext.grid.PropertyColumnModel",nameWidth:115,nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",nameColumnCls:Ext.baseCSSPrefix+"grid-property-name",constructor:function(b,a){var c=this;c.grid=b;c.store=a;c.callParent([{items:[{header:c.nameText,width:b.nameColumnWidth||c.nameWidth,sortable:true,dataIndex:b.nameField,renderer:Ext.Function.bind(c.renderProp,c),itemId:b.nameField,menuDisabled:true,tdCls:c.nameColumnCls},{header:c.valueText,renderer:Ext.Function.bind(c.renderCell,c),getEditor:Ext.Function.bind(c.getCellEditor,c),flex:1,fixed:true,dataIndex:b.valueField,itemId:b.valueField,menuDisabled:true}]}])},getCellEditor:function(a){return this.grid.getCellEditor(a,this)},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(g,d,e){var b=this,c=b.grid.customRenderers[e.get(b.grid.nameField)],a=g;if(c){return c.apply(b,arguments)}if(Ext.isDate(g)){a=b.renderDate(g)}else{if(Ext.isBoolean(g)){a=b.renderBool(g)}}return Ext.util.Format.htmlEncode(a)},renderDate:Ext.util.Format.date,renderBool:function(a){return this[a?"trueText":"falseText"]},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b}});Ext.define("Ext.grid.property.Property",{extend:"Ext.data.Model",alternateClassName:"Ext.PropGridProperty",fields:[{name:"name",type:"string"},{name:"value"}],idProperty:"name"});Ext.define("Ext.grid.property.Store",{extend:"Ext.data.Store",alternateClassName:"Ext.grid.PropertyStore",uses:["Ext.data.reader.Reader","Ext.data.proxy.Proxy","Ext.data.ResultSet","Ext.grid.property.Property"],constructor:function(a,c){var b=this;b.grid=a;b.source=c;b.callParent([{data:c,model:Ext.grid.property.Property,proxy:b.getProxy()}])},getProxy:function(){if(!this.proxy){Ext.grid.property.Store.prototype.proxy=Ext.create("Ext.data.proxy.Memory",{model:Ext.grid.property.Property,reader:this.getReader()})}return this.proxy},getReader:function(){if(!this.reader){Ext.grid.property.Store.prototype.reader=Ext.create("Ext.data.reader.Reader",{model:Ext.grid.property.Property,buildExtractors:Ext.emptyFn,read:function(a){return this.readRecords(a)},readRecords:function(b){var d,c,a={records:[],success:true};for(c in b){if(b.hasOwnProperty(c)){d=b[c];if(this.isEditableValue(d)){a.records.push(new Ext.grid.property.Property({name:c,value:d},c))}}}a.total=a.count=a.records.length;return Ext.create("Ext.data.ResultSet",a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)}})}return this.reader},setSource:function(a){var b=this;b.source=a;b.suspendEvents();b.removeAll();b.proxy.data=a;b.load();b.resumeEvents();b.fireEvent("datachanged",b)},getProperty:function(a){return Ext.isNumber(a)?this.getAt(a):this.getById(a)},setValue:function(e,c,a){var b=this,d=b.getRec(e);if(d){d.set("value",c);b.source[e]=c}else{if(a){b.source[e]=c;d=new Ext.grid.property.Property({name:e,value:c},e);b.add(d)}}},remove:function(b){var a=this.getRec(b);if(a){this.callParent([a]);delete this.source[b]}},getRec:function(a){return this.getById(a)},getSource:function(){return this.source}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:"Ext.layout.component.Component",uses:["Ext.layout.container.Container"],type:"body",onLayout:function(c,b){var d=this,a=d.owner;d.setTargetSize(c,b);d.setBodySize.apply(d,arguments);if(a&&a.layout&&a.layout.isLayout){if(!Ext.isNumber(a.height)||!Ext.isNumber(a.width)){a.layout.bindToOwnerCtComponent=true}else{a.layout.bindToOwnerCtComponent=false}}d.callParent(arguments)},setBodySize:function(e,b){var g=this,a=g.owner,c=a.frameSize,d=Ext.isNumber;if(d(e)){e-=a.el.getFrameWidth("lr")-c.left-c.right}if(d(b)){b-=a.el.getFrameWidth("tb")-c.top-c.bottom}g.setElementSize(a.body,e,b)}});Ext.define("Ext.layout.component.FieldSet",{extend:"Ext.layout.component.Body",alias:["layout.fieldset"],type:"fieldset",doContainerLayout:function(){if(!this.owner.collapsed){this.callParent()}}});Ext.define("Ext.layout.component.Tab",{alias:["layout.tab"],extend:"Ext.layout.component.Button",beforeLayout:function(){var b=this,a=b.lastClosable!==b.owner.closable;if(a){delete b.adjWidth}return this.callParent(arguments)||a},onLayout:function(){var a=this;a.callParent(arguments);a.lastClosable=a.owner.closable}});Ext.define("Ext.layout.component.field.File",{alias:["layout.filefield"],extend:"Ext.layout.component.field.Field",type:"filefield",sizeBodyContents:function(c,b){var d=this,a=d.owner;if(!a.buttonOnly){d.setElementSize(a.inputEl,Ext.isNumber(c)?c-a.button.getWidth()-a.buttonMargin:c)}}});Ext.define("Ext.layout.component.field.Slider",{alias:["layout.sliderfield"],extend:"Ext.layout.component.field.Field",type:"sliderfield",sizeBodyContents:function(a,k){var b=this.owner,g=b.thumbs,c=g.length,j=b.inputEl,h=b.innerEl,e=b.endEl,d=0;for(;d<c;++d){g[d].el.stopAnimation()}if(b.vertical){j.setHeight(k);h.setHeight(Ext.isNumber(k)?k-j.getPadding("t")-e.getPadding("b"):k)}else{j.setWidth(a);h.setWidth(Ext.isNumber(a)?a-j.getPadding("l")-e.getPadding("r"):a)}b.syncThumbs()}});Ext.define("Ext.layout.container.Absolute",{alias:"layout.absolute",extend:"Ext.layout.container.Anchor",alternateClassName:"Ext.layout.AbsoluteLayout",itemCls:Ext.baseCSSPrefix+"abs-layout-item",type:"absolute",onLayout:function(){var b=this,c=b.getTarget(),a=c.dom===document.body;if(!a){c.position()}b.paddingLeft=c.getPadding("l");b.paddingTop=c.getPadding("t");b.callParent(arguments)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]:b}});Ext.define("Ext.layout.container.Accordion",{extend:"Ext.layout.container.VBox",alias:["layout.accordion"],alternateClassName:"Ext.layout.AccordionLayout",itemCls:Ext.baseCSSPrefix+"box-item "+Ext.baseCSSPrefix+"accordion-item",align:"stretch",fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:true,activeOnTop:false,multi:false,constructor:function(){var a=this;a.callParent(arguments);a.initialAnimate=a.animate;a.animate=false;if(a.fill===false){a.itemCls=Ext.baseCSSPrefix+"accordion-item"}},beforeLayout:function(){var a=this;a.callParent(arguments);if(a.fill){if(!(a.owner.el.dom.style.height||a.getLayoutTargetSize().height)){return false}}else{a.owner.componentLayout.monitorChildren=false;a.autoSize=true;a.owner.setAutoScroll(true)}},renderItems:function(c,j){var h=this,g=c.length,d=0,b,e=h.getLayoutTargetSize(),a=[];for(;d<g;d++){b=c[d];if(!b.rendered){a.push(b);if(h.collapseFirst){b.collapseFirst=h.collapseFirst}if(h.hideCollapseTool){b.hideCollapseTool=h.hideCollapseTool;b.titleCollapse=true}else{if(h.titleCollapse){b.titleCollapse=h.titleCollapse}}delete b.hideHeader;b.collapsible=true;b.title=b.title||"&#160;";b.width=e.width;if(h.fill){delete b.height;delete b.flex;if(h.expandedItem!==undefined){b.collapsed=true}else{if(b.hasOwnProperty("collapsed")&&b.collapsed===false){b.flex=1;h.expandedItem=d}else{b.collapsed=true}}h.owner.mon(b,{show:h.onComponentShow,beforeexpand:h.onComponentExpand,beforecollapse:h.onComponentCollapse,scope:h})}else{delete b.flex;b.animCollapse=h.initialAnimate;b.autoHeight=true;b.autoScroll=false}b.border=b.collapsed}}if(g&&h.expandedItem===undefined){h.expandedItem=0;b=c[0];b.collapsed=b.border=false;if(h.fill){b.flex=1}}h.callParent(arguments);g=a.length;for(d=0;d<g;d++){b=a[d];delete b.width;b.header.addCls(Ext.baseCSSPrefix+"accordion-hd");b.body.addCls(Ext.baseCSSPrefix+"accordion-body")}},onLayout:function(){var g=this;if(g.fill){g.callParent(arguments)}else{var e=g.getLayoutTargetSize(),c=g.getVisibleItems(),a=c.length,d=0,b;for(;d<a;d++){b=c[d];if(b.collapsed){c[d].setWidth(e.width)}else{c[d].setSize(null,null)}}}g.updatePanelClasses();return g},updatePanelClasses:function(){var c=this.getLayoutItems(),d=c.length,a=true,b,e;for(b=0;b<d;b++){e=c[b];if(Ext.isWindows){e.el.dom.scrollTop=0}if(a){e.header.removeCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}else{e.header.addCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}if(b+1==d&&e.collapsed){e.header.addCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}else{e.header.removeCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}a=e.collapsed}},animCallback:function(){Ext.Array.forEach(this.toCollapse,function(a){a.fireEvent("collapse",a)});Ext.Array.forEach(this.toExpand,function(a){a.fireEvent("expand",a)})},setupEvents:function(){this.toCollapse=[];this.toExpand=[]},onComponentExpand:function(g){var e=this,d=e.owner.items.items,a=d.length,c=0,b;e.setupEvents();for(;c<a;c++){b=d[c];if(b===g&&b.collapsed){e.setExpanded(b)}else{if(!e.multi&&(b.rendered&&b.header.rendered&&b!==g&&!b.collapsed)){e.setCollapsed(b)}}}e.animate=e.initialAnimate;if(e.activeOnTop){e.owner.insert(0,g)}else{e.layout()}e.animate=false;return false},onComponentCollapse:function(b){var c=this,d=b.next()||b.prev(),a=c.multi?c.owner.query(">panel:not([collapsed])"):[];c.setupEvents();if(c.multi){c.setCollapsed(b);if(a.length===1&&a[0]===b){c.setExpanded(d)}c.animate=c.initialAnimate;c.layout();c.animate=false}else{if(d){c.onComponentExpand(d)}}return false},onComponentShow:function(a){this.onComponentExpand(a)},setCollapsed:function(b){var e=b.getDockedItems(),d,a=e.length,c=0;b.hiddenDocked=[];for(;c<a;c++){d=e[c];if((d!==b.header)&&!d.hidden){d.hidden=true;b.hiddenDocked.push(d)}}b.addCls(b.collapsedCls);b.header.addCls(b.collapsedHeaderCls);b.height=b.header.getHeight();b.el.setHeight(b.height);b.collapsed=true;delete b.flex;if(this.initialAnimate){this.toCollapse.push(b)}else{b.fireEvent("collapse",b)}if(b.collapseTool){b.collapseTool.setType("expand-"+b.getOppositeDirection(b.collapseDirection))}},setExpanded:function(b){var d=b.hiddenDocked,a=d?d.length:0,c=0;for(;c<a;c++){d[c].show()}if(!b.body.isVisible()){b.body.show()}delete b.collapsed;delete b.height;delete b.componentLayout.lastComponentSize;b.suspendLayout=false;b.flex=1;b.removeCls(b.collapsedCls);b.header.removeCls(b.collapsedHeaderCls);if(this.initialAnimate){this.toExpand.push(b)}else{b.fireEvent("expand",b)}if(b.collapseTool){b.collapseTool.setType("collapse-"+b.collapseDirection)}b.setAutoScroll(b.initialConfig.autoScroll)}});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" class="',Ext.baseCSSPrefix,"collapse-el ",Ext.baseCSSPrefix,'layout-split-{collapseDir}">&nbsp;</div>',"</tpl>"],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,width:5,height:5,collapseTarget:"next",onRender:function(){var a=this,b=a.getCollapseTarget(),c=a.getCollapseDirection();Ext.applyIf(a.renderData,{collapseDir:c,collapsible:a.collapsible||b.collapsible});a.addChildEls("collapseEl");this.callParent(arguments);if(a.performCollapse!==false){if(a.renderData.collapsible){a.mon(a.collapseEl,"click",a.toggleTargetCmp,a)}if(a.collapseOnDblClick){a.mon(a.el,"dblclick",a.toggleTargetCmp,a)}}a.mon(b,"collapse",a.onTargetCollapse,a);a.mon(b,"expand",a.onTargetExpand,a);a.el.addCls(a.baseCls+"-"+a.orientation);a.el.unselectable();a.tracker=Ext.create("Ext.resizer.SplitterTracker",{el:a.el});a.relayEvents(a.tracker,["beforedragstart","dragstart","dragend"])},getCollapseDirection:function(){var c=this,a,b=c.ownerCt.layout.type;if(c.collapseTarget.isComponent){a=Number(c.ownerCt.items.indexOf(c.collapseTarget)==c.ownerCt.items.indexOf(c)-1)<<1|Number(b=="hbox")}else{a=Number(c.collapseTarget=="prev")<<1|Number(b=="hbox")}c.orientation=["horizontal","vertical"][a&1];return["bottom","right","top","left"][a]},getCollapseTarget:function(){var a=this;return a.collapseTarget.isComponent?a.collapseTarget:a.collapseTarget=="prev"?a.previousSibling():a.nextSibling()},onTargetCollapse:function(a){this.el.addCls([this.collapsedClsInternal,this.collapsedCls])},onTargetExpand:function(a){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls])},toggleTargetCmp:function(c,a){var b=this.getCollapseTarget();if(b.isVisible()){if(b.collapsed){b.expand(b.animCollapse)}else{b.collapse(this.renderData.collapseDir,b.animCollapse)}}},setSize:function(){var a=this;a.callParent(arguments);if(Ext.isIE){a.el.repaint()}}});Ext.define("Ext.layout.container.Border",{alias:["layout.border"],extend:"Ext.layout.container.Container",requires:["Ext.resizer.Splitter","Ext.container.Container","Ext.fx.Anim"],alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:Ext.baseCSSPrefix+"border-item",bindToOwnerCtContainer:true,percentageRe:/(\d+)%/,slideDirection:{north:"t",south:"b",west:"l",east:"r"},constructor:function(a){this.initialConfig=a;this.callParent(arguments)},onLayout:function(){var a=this;if(!a.borderLayoutInitialized){a.initializeBorderLayout()}a.fixHeightConstraints();a.shadowLayout.onLayout();if(a.embeddedContainer){a.embeddedContainer.layout.onLayout()}if(!a.initialCollapsedComplete){Ext.iterate(a.regions,function(b,c){if(c.borderCollapse){a.onBeforeRegionCollapse(c,c.collapseDirection,false,0)}});a.initialCollapsedComplete=true}},isValidParent:function(b,c,a){if(!this.borderLayoutInitialized){this.initializeBorderLayout()}return this.shadowLayout.isValidParent(b,c,a)},beforeLayout:function(){if(!this.borderLayoutInitialized){this.initializeBorderLayout()}this.shadowLayout.beforeLayout()},renderItems:function(a,b){},renderItem:function(a){},renderChildren:function(){if(!this.borderLayoutInitialized){this.initializeBorderLayout()}this.shadowLayout.renderChildren()},getVisibleItems:function(){return Ext.ComponentQuery.query(":not([slideOutAnim])",this.callParent(arguments))},initializeBorderLayout:function(){var k=this,c=0,j=k.getLayoutItems(),h=j.length,b=(k.regions={}),e=[],g=[],a=0,m=0,d,l;k.splitters={};for(;c<h;c++){d=j[c];b[d.region]=d;if(d.region!="center"&&d.collapsible&&d.collapseMode!="header"){d.borderCollapse=d.collapsed;d.collapsed=false;d.on({beforecollapse:k.onBeforeRegionCollapse,beforeexpand:k.onBeforeRegionExpand,destroy:k.onRegionDestroy,scope:k});k.setupState(d)}}d=b.center;if(!d.flex){d.flex=1}delete d.width;d.maintainFlex=true;d=b.west;if(d){d.collapseDirection=Ext.Component.DIRECTION_LEFT;g.push(d);if(d.split){g.push(k.splitters.west=k.createSplitter(d))}l=Ext.isString(d.width)&&d.width.match(k.percentageRe);if(l){a+=(d.flex=parseInt(l[1],10)/100);delete d.width}}d=b.north;if(d){d.collapseDirection=Ext.Component.DIRECTION_TOP;e.push(d);if(d.split){e.push(k.splitters.north=k.createSplitter(d))}l=Ext.isString(d.height)&&d.height.match(k.percentageRe);if(l){m+=(d.flex=parseInt(l[1],10)/100);delete d.height}}if(b.north||b.south){if(b.east||b.west){e.push(k.embeddedContainer=Ext.create("Ext.container.Container",{xtype:"container",region:"center",id:k.owner.id+"-embedded-center",cls:Ext.baseCSSPrefix+"border-item",flex:b.center.flex,maintainFlex:true,layout:{type:"hbox",align:"stretch",getVisibleItems:k.getVisibleItems}}));g.push(b.center)}else{e.push(b.center)}}else{g.push(b.center)}d=b.south;if(d){d.collapseDirection=Ext.Component.DIRECTION_BOTTOM;if(d.split){e.push(k.splitters.south=k.createSplitter(d))}l=Ext.isString(d.height)&&d.height.match(k.percentageRe);if(l){m+=(d.flex=parseInt(l[1],10)/100);delete d.height}e.push(d)}d=b.east;if(d){d.collapseDirection=Ext.Component.DIRECTION_RIGHT;if(d.split){g.push(k.splitters.east=k.createSplitter(d))}l=Ext.isString(d.width)&&d.width.match(k.percentageRe);if(l){a+=(d.flex=parseInt(l[1],10)/100);delete d.width}g.push(d)}if(b.north||b.south){k.shadowContainer=Ext.create("Ext.container.Container",{ownerCt:k.owner,el:k.getTarget(),layout:Ext.applyIf({type:"vbox",align:"stretch",getVisibleItems:k.getVisibleItems},k.initialConfig)});k.createItems(k.shadowContainer,e);if(k.splitters.north){k.splitters.north.ownerCt=k.shadowContainer}if(k.splitters.south){k.splitters.south.ownerCt=k.shadowContainer}if(k.embeddedContainer){k.embeddedContainer.ownerCt=k.shadowContainer;k.createItems(k.embeddedContainer,g);if(k.splitters.east){k.splitters.east.ownerCt=k.embeddedContainer}if(k.splitters.west){k.splitters.west.ownerCt=k.embeddedContainer}Ext.each([k.splitters.north,k.splitters.south],function(i){if(i){i.on("beforedragstart",k.fixHeightConstraints,k)}});if(a){b.center.flex-=a}if(m){k.embeddedContainer.flex-=m}}else{if(m){b.center.flex-=m}}}else{k.shadowContainer=Ext.create("Ext.container.Container",{ownerCt:k.owner,el:k.getTarget(),layout:Ext.applyIf({type:(g.length==1)?"fit":"hbox",align:"stretch"},k.initialConfig)});k.createItems(k.shadowContainer,g);if(k.splitters.east){k.splitters.east.ownerCt=k.shadowContainer}if(k.splitters.west){k.splitters.west.ownerCt=k.shadowContainer}if(a){b.center.flex-=m}}for(c=0,j=k.shadowContainer.items.items,h=j.length;c<h;c++){j[c].shadowOwnerCt=k.shadowContainer}if(k.embeddedContainer){for(c=0,j=k.embeddedContainer.items.items,h=j.length;c<h;c++){j[c].shadowOwnerCt=k.embeddedContainer}}k.shadowLayout=k.shadowContainer.getLayout();k.borderLayoutInitialized=true},setupState:function(b){var a=b.getState;b.getState=function(){var c=a.call(b)||{},d=b.region;c.collapsed=!!b.collapsed;if(d=="west"||d=="east"){c.width=b.getWidth()}else{c.height=b.getHeight()}return c};b.addStateEvents(["collapse","expand","resize"])},createItems:function(a,b){delete a.items;a.initItems();a.items.addAll(b)},createSplitter:function(a){var b=this,c=(a.collapseMode!="header"),d;d=Ext.create("Ext.resizer.Splitter",{hidden:!!a.hidden,collapseTarget:a,performCollapse:!c,listeners:c?{click:{fn:Ext.Function.bind(b.onSplitterCollapseClick,b,[a]),element:"collapseEl"}}:null});if(a.collapseMode=="mini"){a.placeholder=d;d.collapsedCls=a.collapsedCls}a.on({hide:b.onRegionVisibilityChange,show:b.onRegionVisibilityChange,scope:b});return d},fixHeightConstraints:function(){var c=this,a=c.embeddedContainer,b=1e+99,d=-1;if(!a){return}a.items.each(function(e){if(Ext.isNumber(e.maxHeight)){b=Math.max(b,e.maxHeight)}if(Ext.isNumber(e.minHeight)){d=Math.max(d,e.minHeight)}});a.maxHeight=b;a.minHeight=d},onRegionVisibilityChange:function(a){this.splitters[a.region][a.hidden?"hide":"show"]();this.layout()},onSplitterCollapseClick:function(a){if(a.collapsed){this.onPlaceHolderToolClick(null,null,null,{client:a})}else{a.collapse()}},getPlaceholder:function(c){var d=this,g=c.placeholder,b=c.shadowOwnerCt,e=b.layout,a=Ext.panel.Panel.prototype.getOppositeDirection(c.collapseDirection),h=(c.region=="north"||c.region=="south");if(c.collapseMode=="header"){return}if(!g){if(c.collapseMode=="mini"){g=Ext.create("Ext.resizer.Splitter",{id:"collapse-placeholder-"+c.id,collapseTarget:c,performCollapse:false,listeners:{click:{fn:Ext.Function.bind(d.onSplitterCollapseClick,d,[c]),element:"collapseEl"}}});g.addCls(g.collapsedCls)}else{g={id:"collapse-placeholder-"+c.id,margins:c.initialConfig.margins||Ext.getClass(c).prototype.margins,xtype:"header",orientation:h?"horizontal":"vertical",title:c.title,textCls:c.headerTextCls,iconCls:c.iconCls,baseCls:c.baseCls+"-header",ui:c.ui,indicateDrag:c.draggable,cls:Ext.baseCSSPrefix+"region-collapsed-placeholder "+Ext.baseCSSPrefix+"region-collapsed-"+c.collapseDirection+"-placeholder "+c.collapsedCls,listeners:c.floatable?{click:{fn:function(i){d.floatCollapsedPanel(i,c)},element:"el"}}:null};if((Ext.isIE6||Ext.isIE7||(Ext.isIEQuirks))&&!h){g.width=25}if(!c.hideCollapseTool){g[h?"tools":"items"]=[{xtype:"tool",client:c,type:"expand-"+a,handler:d.onPlaceHolderToolClick,scope:d}]}}g=d.owner.createComponent(g);if(c.isXType("panel")){c.on({titlechange:d.onRegionTitleChange,iconchange:d.onRegionIconChange,scope:d})}}c.placeholder=g;g.comp=c;return g},onRegionTitleChange:function(a,b){a.placeholder.setTitle(b)},onRegionIconChange:function(b,a){b.placeholder.setIconCls(a)},calculateChildBox:function(a){var b=this;if(b.shadowContainer.items.contains(a)){return b.shadowContainer.layout.calculateChildBox(a)}else{if(b.embeddedContainer&&b.embeddedContainer.items.contains(a)){return b.embeddedContainer.layout.calculateChildBox(a)}}},onBeforeRegionCollapse:function(h,k,d){if(h.collapsedChangingLayout){return false}h.collapsedChangingLayout=true;var j=this,p=h.el,c,b=h.collapseMode=="mini",i=h.shadowOwnerCt,a=i.layout,m=h.placeholder,g=j.owner.suspendLayout,l=i.suspendLayout,n=(h.region=="north"||h.region=="west");j.owner.suspendLayout=true;i.suspendLayout=true;a.layoutBusy=true;if(i.componentLayout){i.componentLayout.layoutBusy=true}j.shadowContainer.layout.layoutBusy=true;j.layoutBusy=true;j.owner.componentLayout.layoutBusy=true;if(!m){m=j.getPlaceholder(h)}if(m.shadowOwnerCt===i){m.show()}else{i.insert(i.items.indexOf(h)+(n?0:1),m);m.shadowOwnerCt=i;m.ownerCt=j.owner}h.hidden=true;if(!m.rendered){a.renderItem(m,a.innerCt);if(h.region=="north"||h.region=="south"){m.setCalculatedSize(h.getWidth())}else{m.setCalculatedSize(undefined,h.getHeight())}}function e(){j.owner.suspendLayout=g;i.suspendLayout=l;delete a.layoutBusy;if(i.componentLayout){delete i.componentLayout.layoutBusy}delete j.shadowContainer.layout.layoutBusy;delete j.layoutBusy;delete j.owner.componentLayout.layoutBusy;delete h.collapsedChangingLayout;h.collapsed=true;h.fireEvent("collapse",h)}if(h.animCollapse&&j.initialCollapsedComplete){a.layout();p.dom.style.zIndex=100;if(!b){m.el.hide()}p.slideOut(j.slideDirection[h.region],{duration:Ext.Number.from(h.animCollapse,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){p.show().setLeftTop(-10000,-10000);p.dom.style.zIndex="";if(!b){m.el.slideIn(j.slideDirection[h.region],{easing:"linear",duration:100})}e()}}})}else{p.setLeftTop(-10000,-10000);a.layout();e()}return false},onBeforeRegionExpand:function(b,a){this.onPlaceHolderToolClick(null,null,null,{client:b,shouldFireBeforeexpand:false});return false},onPlaceHolderToolClick:function(n,u,a,c){var t=this,q=c.client,i=(q.collapseMode!="mini")||!q.split,s=q.el,k,d=q.placeholder,l=d.el,r=q.shadowOwnerCt,b=r.layout,j,p=t.owner.suspendLayout,m=r.suspendLayout,h;if(q.collapsedChangingLayout){return false}if(c.shouldFireBeforeexpand!==false&&q.fireEvent("beforeexpand",q,true)===false){return false}q.collapsedChangingLayout=true;if(q.getActiveAnimation()){q.stopAnimation()}if(q.slideOutAnim){s.un(q.panelMouseMon);l.un(q.placeholderMouseMon);delete q.slideOutAnim;delete q.panelMouseMon;delete q.placeholderMouseMon;h=true}t.owner.suspendLayout=true;r.suspendLayout=true;b.layoutBusy=true;if(r.componentLayout){r.componentLayout.layoutBusy=true}t.shadowContainer.layout.layoutBusy=true;t.layoutBusy=true;t.owner.componentLayout.layoutBusy=true;q.hidden=false;q.collapsed=false;if(i){d.hidden=true}k=b.calculateChildBox(q);if(q.collapseTool){q.collapseTool.show()}if(q.animCollapse&&!h){s.setStyle("visibility","hidden")}s.setLeftTop(k.left,k.top);j=q.getSize();if(j.height!=k.height||j.width!=k.width){t.setItemSize(q,k.width,k.height)}function g(){t.owner.suspendLayout=p;r.suspendLayout=m;delete b.layoutBusy;if(r.componentLayout){delete r.componentLayout.layoutBusy}delete t.shadowContainer.layout.layoutBusy;delete t.layoutBusy;delete t.owner.componentLayout.layoutBusy;delete q.collapsedChangingLayout;q.removeCls(Ext.baseCSSPrefix+"border-region-slide-in");q.fireEvent("expand",q)}if(i){d.el.hide()}if(q.animCollapse&&!h){s.dom.style.zIndex=100;s.slideIn(t.slideDirection[q.region],{duration:Ext.Number.from(q.animCollapse,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){s.dom.style.zIndex="";q.hidden=false;b.onLayout();g()}}})}else{b.onLayout();g()}},floatCollapsedPanel:function(j,h){if(h.floatable===false){return}var k=this,q=h.el,n=h.placeholder,p=n.el,i=h.shadowOwnerCt,b=i.layout,g=b.getChildBox(n),m=i.suspendLayout,a,d,l;if(j.getTarget("."+Ext.baseCSSPrefix+"tool")){return}if(q.getActiveAnimation()){return}if(h.slideOutAnim){k.slideOutFloatedComponent(h);return}function c(s){var r=q.getRegion().union(p.getRegion()).adjust(1,-1,-1,1);if(!r.contains(s.getPoint())){k.slideOutFloatedComponent(h)}}h.placeholderMouseMon=p.monitorMouseLeave(500,c);i.suspendLayout=true;k.layoutBusy=true;k.owner.componentLayout.layoutBusy=true;if(h.collapseTool){h.collapseTool.hide()}h.hidden=false;h.collapsed=false;n.hidden=true;d=b.calculateChildBox(h);n.hidden=false;if(h.region=="north"||h.region=="west"){d[b.parallelBefore]+=g[b.parallelPrefix]-1}else{d[b.parallelBefore]-=(g[b.parallelPrefix]-1)}q.setStyle("visibility","hidden");q.setLeftTop(d.left,d.top);a=h.getSize();if(a.height!=d.height||a.width!=d.width){k.setItemSize(h,d.width,d.height)}l={listeners:{afteranimate:function(){i.suspendLayout=m;delete k.layoutBusy;delete k.owner.componentLayout.layoutBusy;l.listeners={afterAnimate:function(){q.show().removeCls(Ext.baseCSSPrefix+"border-region-slide-in").setLeftTop(-10000,-10000);h.hidden=true;h.collapsed=true;delete h.slideOutAnim;delete h.panelMouseMon;delete h.placeholderMouseMon}};h.slideOutAnim=l}},duration:500};q.addCls(Ext.baseCSSPrefix+"border-region-slide-in");q.slideIn(k.slideDirection[h.region],l);h.panelMouseMon=q.monitorMouseLeave(500,c)},slideOutFloatedComponent:function(a){var c=a.el,b;c.un(a.panelMouseMon);a.placeholder.el.un(a.placeholderMouseMon);c.slideOut(this.slideDirection[a.region],a.slideOutAnim);delete a.slideOutAnim;delete a.panelMouseMon;delete a.placeholderMouseMon},onRegionDestroy:function(a){var b=a.placeholder;if(b){delete b.ownerCt;b.destroy()}},onDestroy:function(){var b=this,a=b.shadowContainer,c=b.embeddedContainer;if(a){delete a.ownerCt;Ext.destroy(a)}if(c){delete c.ownerCt;Ext.destroy(c)}delete b.regions;delete b.splitters;delete b.shadowContainer;delete b.embeddedContainer;b.callParent(arguments)}});Ext.define("Ext.layout.container.Card",{alias:["layout.card"],alternateClassName:"Ext.layout.CardLayout",extend:"Ext.layout.container.AbstractCard",setActiveItem:function(b){var e=this,a=e.owner,d=e.activeItem,c;b=e.parseActiveItem(b);c=a.items.indexOf(b);if(c==-1){c=a.items.items.length;a.add(b)}if(b&&d!=b){if(!b.rendered){e.renderItem(b,e.getRenderTarget(),a.items.length);e.configureItem(b,0)}e.activeItem=b;if(b.fireEvent("beforeactivate",b,d)===false){return false}if(d&&d.fireEvent("beforedeactivate",d,b)===false){return false}if(e.sizeAllCards){e.onLayout()}else{e.setItemBox(b,e.getTargetBox())}e.owner.suspendLayout=true;if(d){if(e.hideInactive){d.hide()}d.fireEvent("deactivate",d,b)}e.owner.suspendLayout=false;if(b.hidden){b.show()}else{e.onLayout()}b.fireEvent("activate",b,d);return b}return false},configureItem:function(a){a.layoutManagedHeight=0;a.layoutManagedWidth=0;this.callParent(arguments)}});Ext.define("Ext.layout.container.Column",{extend:"Ext.layout.container.Auto",alias:["layout.column"],alternateClassName:"Ext.layout.ColumnLayout",type:"column",itemCls:Ext.baseCSSPrefix+"column",targetCls:Ext.baseCSSPrefix+"column-layout-ct",scrollOffset:0,bindToOwnerCtComponent:false,getRenderTarget:function(){if(!this.innerCt){this.innerCt=this.getTarget().createChild({cls:Ext.baseCSSPrefix+"column-inner"});this.clearEl=this.innerCt.createChild({cls:Ext.baseCSSPrefix+"clear",role:"presentation"})}return this.innerCt},onLayout:function(){var h=this,e=h.getTarget(),g=h.getLayoutItems(),d=g.length,k,c,l=[],b,m,j,a;m=h.getLayoutTargetSize();if(m.width<d*10){return}if(h.adjustmentPass){if(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks){m.width=h.adjustedWidth}}else{c=e.getStyle("overflow");if(c&&c!="hidden"){h.autoScroll=true;if(!(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)){e.setStyle("overflow","hidden");m=h.getLayoutTargetSize()}}}j=m.width-h.scrollOffset;h.innerCt.setWidth(j);for(c=0;c<d;c++){k=g[c];b=l[c]=k.getEl().getMargin("lr");if(!k.columnWidth){j-=(k.getWidth()+b)}}j=j<0?0:j;for(c=0;c<d;c++){k=g[c];if(k.columnWidth){a=Math.floor(k.columnWidth*j)-l[c];h.setItemSize(k,a,k.height)}else{h.layoutItem(k)}}if(!h.adjustmentPass&&h.autoScroll){e.setStyle("overflow","auto");h.adjustmentPass=(e.dom.scrollHeight>m.height);if(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks){h.adjustedWidth=m.width-Ext.getScrollBarWidth()}else{e.setStyle("overflow","auto")}if(h.adjustmentPass){h.onLayout()}}delete h.adjustmentPass},configureItem:function(a){this.callParent(arguments);if(a.columnWidth){a.layoutManagedWidth=1}}});Ext.define("Ext.layout.container.Table",{alias:["layout.table"],extend:"Ext.layout.container.Auto",alternateClassName:"Ext.layout.TableLayout",monitorResize:false,type:"table",autoSize:true,clearEl:true,targetCls:Ext.baseCSSPrefix+"table-layout-ct",tableCls:Ext.baseCSSPrefix+"table-layout",cellCls:Ext.baseCSSPrefix+"table-layout-cell",tableAttrs:null,renderItems:function(h){var e=this.getTable().tBodies[0],p=e.rows,d=0,g=h.length,n,l,c,a,m,k,j,b;n=this.calculateCells(h);for(;d<g;d++){l=n[d];c=l.rowIdx;a=l.cellIdx;m=h[d];k=p[c];if(!k){k=e.insertRow(c);if(this.trAttrs){k.set(this.trAttrs)}}b=j=Ext.get(k.cells[a]||k.insertCell(a));if(this.needsDivWrap()){b=j.first()||j.createChild({tag:"div"});b.setWidth(null)}if(!m.rendered){this.renderItem(m,b,0)}else{if(!this.isValidParent(m,b,0)){this.moveItem(m,b,0)}}if(this.tdAttrs){j.set(this.tdAttrs)}j.set({colSpan:m.colspan||1,rowSpan:m.rowspan||1,id:m.cellId||"",cls:this.cellCls+" "+(m.cellCls||"")});if(!n[d+1]||n[d+1].rowIdx!==c){a++;while(k.cells[a]){k.deleteCell(a)}}}c++;while(e.rows[c]){e.deleteRow(c)}},afterLayout:function(){this.callParent();if(this.needsDivWrap()){Ext.Array.forEach(this.getLayoutItems(),function(a){Ext.fly(a.el.dom.parentNode).setWidth(a.getWidth())})}},calculateCells:function(k){var m=[],b=0,d=0,a=0,h=this.columns||Infinity,n=[],e=0,c,g=k.length,l;for(;e<g;e++){l=k[e];while(d>=h||n[d]>0){if(d>=h){d=0;a=0;b++;for(c=0;c<h;c++){if(n[c]>0){n[c]--}}}else{d++}}m.push({rowIdx:b,cellIdx:a});for(c=l.colspan||1;c;--c){n[d]=l.rowspan||1;++d}++a}return m},getTable:function(){var a=this.table;if(!a){a=this.table=this.getTarget().createChild(Ext.apply({tag:"table",role:"presentation",cls:this.tableCls,cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}return a},needsDivWrap:function(){return Ext.isOpera10_5}});Ext.define("Ext.menu.Item",{extend:"Ext.Component",alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,renderTpl:['<tpl if="plain">',"{text}","</tpl>",'<tpl if="!plain">','<a id="{id}-itemEl" class="'+Ext.baseCSSPrefix+'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">','<img id="{id}-iconEl" src="{icon}" class="'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}" />','<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text" <tpl if="menu">style="margin-right: 17px;"</tpl> >{text}</span>','<tpl if="menu">','<img id="{id}-arrowEl" src="{blank}" class="'+Ext.baseCSSPrefix+'menu-item-arrow" />',"</tpl>","</a>","</tpl>"],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},blur:function(){this.$focused=false;this.callParent(arguments)},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferExpandMenu:function(){var a=this;if(!a.menu.rendered||!a.menu.isVisible()){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},deferHideParentMenus:function(){Ext.menu.Manager.hideAll()},expandMenu:function(a){var b=this;if(b.menu){clearTimeout(b.hideMenuTimer);if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},focus:function(){this.$focused=true;this.callParent(arguments)},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"];b.addEvents("activate","click","deactivate");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){b.menu=Ext.menu.Manager.get(b.menu)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);clearTimeout(a.hideMenuTimer);clearTimeout(a.deferHideParentMenusTimer);if(a.menu){delete a.menu.parentItem;delete a.menu.parentMenu;delete a.menu.ownerCt;if(a.destroyMenu!==false){a.menu.destroy()}}a.callParent(arguments)},onRender:function(a,d){var b=this,c=Ext.BLANK_IMAGE_URL;Ext.applyIf(b.renderData,{href:b.href||"#",hrefTarget:b.hrefTarget,icon:b.icon||c,iconCls:b.iconCls+(b.checkChangeDisabled?" "+b.disabledCls:""),menu:Ext.isDefined(b.menu),plain:b.plain,text:b.text,blank:c});b.addChildEls("itemEl","iconEl","textEl","arrowEl");b.callParent(arguments)},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIconCls:function(a){var b=this;if(b.iconEl){if(b.iconCls){b.iconEl.removeCls(b.iconCls)}if(a){b.iconEl.addCls(a)}}b.iconCls=a},setText:function(c){var b=this,a=b.textEl||b.el;b.text=c;if(b.rendered){a.update(c||"");b.ownerCt.redoComponentLayout()}}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,afterRender:function(){var a=this;this.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true)},initComponent:function(){var a=this;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var a=this;if(a.iconEl){a.iconEl.addCls(a.disabledCls)}a.checkChangeDisabled=true},enableCheckChange:function(){var a=this;a.iconEl.removeCls(a.disabledCls);a.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&&a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(g){var h=this.menu,b=h.items,d=h.focusedItem,c=d?b.indexOf(d):-1,a=c+g;while(a!=c){if(a<0){a=b.length-1}else{if(a>=b.length){a=0}}var e=b.getAt(a);if(h.canActivateItem(e)){h.setActiveItem(e);break}a+=g}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(b){var c=this.menu,d=c.focusedItem,a=c.activeItem;if(d&&this.isWhitelisted(d)){return true}c.hide();if(c.parentMenu){c.parentMenu.focus()}},right:function(c){var d=this.menu,g=d.focusedItem,a=d.activeItem,b;if(g&&this.isWhitelisted(g)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);Ext.defer(function(){b.setActiveItem(b.items.getAt(0))},25)}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.UP&&a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:"&#160;",onRender:function(b,d){var c=this,a=c.separatorCls;c.cls+=" "+a;c.callParent(arguments)}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+"menu"],c=b.bodyCls?[b.bodyCls]:[];b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");c.unshift(d+"menu-body");b.bodyCls=c.join(" ");b.layout={type:"vbox",align:"stretchmax",autoSize:true,clearInnerCtOnLayout:true,overflowHandler:"Scroller"};if(b.floating===false&&b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on("beforeshow",function(){var e=!!b.items.length;if(e&&b.rendered){b.el.setStyle("visibility",null)}return e})},afterRender:function(a){var b=this,d=Ext.baseCSSPrefix,c="&#160;";b.callParent(arguments);if(b.showSeparator){b.iconSepEl=b.layout.getRenderTarget().insertFirst({cls:d+"menu-icon-separator",html:c})}b.focusEl=b.el.createChild({cls:d+"menu-focus",tabIndex:"-1",html:c});b.mon(b.el,{click:b.onClick,mouseover:b.onMouseOver,scope:b});b.mouseMonitor=b.el.monitorMouseLeave(100,b.onMouseLeave,b);if(b.showSeparator&&((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)){b.iconSepEl.setHeight(b.el.getHeight())}b.keyNav=Ext.create("Ext.menu.KeyNav",b)},afterLayout:function(){var k=this;k.callParent(arguments);if((!Ext.isStrict&&Ext.isIE)||Ext.isIE6){var a=k.layout.getRenderTarget(),c=0,b=k.dockedItems,d=b.length,g=0,h,j,e;c=a.getWidth();e=c+k.body.getBorderWidth("lr")+k.body.getPadding("lr");k.body.setWidth(e);for(;g<d,h=b.getAt(g);g++){if(h.dock=="left"||h.dock=="right"){e+=h.getWidth()}}k.el.setWidth(e)}},getBubbleTarget:function(){return this.parentMenu||this.callParent()},canActivateItem:function(a){return a&&!a.isDisabled()&&a.isVisible()&&(a.canActivate||a.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(){var a=this;if(a.activeItem){a.activeItem.deactivate();if(!a.activeItem.activated){delete a.activeItem}}if(a.focusedItem&&!a.filtered){a.focusedItem.blur();if(!a.focusedItem.$focused){delete a.focusedItem}}},clearStretch:function(){if(this.rendered){this.items.each(function(a){if(a.componentLayout){delete a.componentLayout.lastComponentSize}if(a.el){a.el.setWidth(null)}})}},onAdd:function(){var a=this;a.clearStretch();a.callParent(arguments);if(Ext.isIE6||Ext.isIE7){Ext.Function.defer(a.doComponentLayout,10,a)}},onRemove:function(){this.clearStretch();this.callParent(arguments)},redoComponentLayout:function(){if(this.rendered){this.clearStretch();this.doComponentLayout()}},getFocusEl:function(){return this.focusEl},hide:function(){this.deactivateActiveItem();this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(Ext.isString(b)){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix,a,e;if(!c.isComponent){if(!c.xtype){c=Ext.create("Ext.menu."+(Ext.isBoolean(c.checked)?"Check":"")+"Item",c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&&!c.dock){a=[d+"menu-item",d+"menu-item-cmp"];e=Ext.Function.createInterceptor;c.focus=e(c.focus,function(){this.$focused=true},c);c.blur=e(c.blur,function(){this.$focused=false},c);if(!b.plain&&(c.indent===true||c.iconCls==="no-icon")){a.push(d+"menu-item-indent")}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls?c.cls:"")+" "+a.join(" ")}c.isMenuItem=true}return c},lookupItemFromString:function(a){return(a=="separator"||a=="-")?Ext.createWidget("menuseparator"):Ext.createWidget("menuitem",{canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}if((c.getTarget()==b.focusEl.dom)||c.within(b.layout.getRenderTarget())){a=b.getItemFromEvent(c)||b.activeItem;if(a){if(a.getXTypes().indexOf("menuitem")>=0){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}}b.fireEvent("click",b,a,c)}},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);if(a.rendered){a.el.un(a.mouseMonitor);a.keyNav.destroy();delete a.keyNav}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent("mouseleave",a,b)},onMouseOver:function(d){var c=this,g=d.getRelatedTarget(),a=!c.el.contains(g),b=c.getItemFromEvent(d);if(a&&c.parentMenu){c.parentMenu.setActiveItem(c.parentItem);c.parentMenu.mouseMonitor.mouseenter()}if(c.disabled){return}if(b){c.setActiveItem(b);if(b.activated&&b.expandMenu){b.expandMenu()}}if(a){c.fireEvent("mouseenter",c,d)}c.fireEvent("mouseover",c,b,d)},setActiveItem:function(b){var a=this;if(b&&(b!=a.activeItem&&b!=a.focusedItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(b,g,e){var a=this,d,c;if(a.floating&&b){a.layout.autoSize=true;a.doAutoRender();delete a.needsLayout;b=b.el||b;d=a.el.getAlignToXY(b,g||a.defaultAlign,e);if(a.floatParent){c=a.floatParent.getTargetEl().getViewRegion();d[0]-=c.x;d[1]-=c.y}a.showAt(d)}return a},doConstrain:function(){var g=this,h=g.el.getY(),i,e,b,j=h,k,d,a,c;delete g.height;g.setSize();e=g.getHeight();if(g.floating){d=Ext.fly(g.el.getScopeParent());a=d.getScroll().top;c=d.getViewSize().height;k=h-a;i=g.maxHeight?g.maxHeight:c-k;if(e>c){i=c;j=h-k}else{if(i<e){j=h-(e-i);i=e}}}else{i=g.getHeight()}if(g.maxHeight){i=Math.min(g.maxHeight,i)}if(e>i&&i>0){g.layout.autoSize=false;g.setHeight(i);if(g.showSeparator){g.iconSepEl.setHeight(g.layout.getRenderTarget().dom.scrollHeight)}}b=g.getConstrainVector(g.el.getScopeParent());if(b){g.setPosition(g.getPosition()[0]+b[0])}g.el.setY(j)}});Ext.define("Ext.menu.ColorPicker",{extend:"Ext.menu.Menu",alias:"widget.colormenu",requires:["Ext.picker.Color"],hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{plain:true,showSeparator:false,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-color-item",id:b.pickerId,xtype:"colorpicker"},a)});b.callParent(arguments);b.picker=b.down("colorpicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.menu.DatePicker",{extend:"Ext.menu.Menu",alias:"widget.datemenu",requires:["Ext.picker.Date"],hideOnClick:true,pickerId:null,initComponent:function(){var a=this;Ext.apply(a,{showSeparator:false,plain:true,border:false,bodyPadding:0,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-date-item",id:a.pickerId,xtype:"datepicker"},a.initialConfig)});a.callParent(arguments);a.picker=a.down("datepicker");a.relayEvents(a.picker,["select"]);if(a.hideOnClick){a.on("select",a.hidePickerOnSelect,a)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",renderTpl:['<img id="{id}-toolEl" src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],tooltipType:"qtip",stopEvent:true,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.addChildEls("toolEl");a.tooltip=a.tooltip||a.qtip;a.callParent()},afterRender:function(){var b=this,a;b.callParent(arguments);if(b.tooltip){if(Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType=="qtip"?"data-qtip":"title";b.toolEl.dom.setAttribute(a,b.tooltip)}}b.mon(b.toolEl,{click:b.onClick,mousedown:b.onMouseDown,mouseover:b.onMouseOver,mouseout:b.onMouseOut,scope:b})},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+"-"+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent("click",b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.resizer.Handle",{extend:"Ext.Component",handleCls:"",baseHandleCls:Ext.baseCSSPrefix+"resizable-handle",region:"",onRender:function(){this.addCls(this.baseHandleCls,this.baseHandleCls+"-"+this.region,this.handleCls);this.callParent(arguments);this.el.unselectable()}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(a){var h=this,g,m,l=h.handles,b,k,e,c=0,j;this.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(a)||Ext.isElement(a)||a.dom){g=a;a=arguments[1]||{};a.target=g}h.mixins.observable.constructor.call(h,a);g=h.target;if(g){if(g.isComponent){h.el=g.getEl();if(g.minWidth){h.minWidth=g.minWidth}if(g.minHeight){h.minHeight=g.minHeight}if(g.maxWidth){h.maxWidth=g.maxWidth}if(g.maxHeight){h.maxHeight=g.maxHeight}if(g.floating){if(!this.hasOwnProperty("handles")){this.handles="n ne e se s sw w nw"}}}else{h.el=h.target=Ext.get(g)}}else{h.target=h.el=Ext.get(h.el)}m=h.el.dom.tagName;if(m=="TEXTAREA"||m=="IMG"){h.originalTarget=h.target;h.target=h.el=h.el.wrap({cls:h.wrapCls,id:h.el.id+"-rzwrap"});h.el.setPositioning(h.originalTarget.getPositioning());h.originalTarget.clearPositioning();var d=h.originalTarget.getBox();h.el.setBox(d)}h.el.position();if(h.pinned){h.el.addCls(h.pinnedCls)}h.resizeTracker=Ext.create("Ext.resizer.ResizeTracker",{disabled:h.disabled,target:h.target,constrainTo:h.constrainTo,overCls:h.overCls,throttle:h.throttle,originalTarget:h.originalTarget,delegate:"."+h.handleCls,dynamic:h.dynamic,preserveRatio:h.preserveRatio,heightIncrement:h.heightIncrement,widthIncrement:h.widthIncrement,minHeight:h.minHeight,maxHeight:h.maxHeight,minWidth:h.minWidth,maxWidth:h.maxWidth});h.resizeTracker.on("mousedown",h.onBeforeResize,h);h.resizeTracker.on("drag",h.onResize,h);h.resizeTracker.on("dragend",h.onResizeEnd,h);if(h.handles=="all"){h.handles="n s e w ne nw se sw"}l=h.handles=h.handles.split(/ |\s*?[,;]\s*?/);k=h.possiblePositions;e=l.length;b=h.handleCls+" "+(this.target.isComponent?(h.target.baseCls+"-handle "):"")+h.handleCls+"-";for(;c<e;c++){if(l[c]&&k[l[c]]){j=k[l[c]];h[j]=Ext.create("Ext.Component",{owner:this,region:j,cls:b+j,renderTo:h.el});h[j].el.unselectable();if(h.transparent){h[j].el.setOpacity(0)}}}if(Ext.isNumber(h.width)){h.width=Ext.Number.constrain(h.width,h.minWidth,h.maxWidth)}if(Ext.isNumber(h.height)){h.height=Ext.Number.constrain(h.height,h.minHeight,h.maxHeight)}if(h.width!=null||h.height!=null){if(h.originalTarget){h.originalTarget.setWidth(h.width);h.originalTarget.setHeight(h.height)}h.resizeTo(h.width,h.height)}h.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(c,d){var a=this.target.getBox();return this.fireEvent("beforeresize",this,a.width,a.height,d)},onResize:function(d,g){var c=this,a=c.target.getBox();c.forceHandlesHeight();return c.fireEvent("resizedrag",c,a.width,a.height,g)},onResizeEnd:function(d,g){var c=this,a=c.target.getBox();c.forceHandlesHeight();return c.fireEvent("resize",c,a.width,a.height,g)},resizeTo:function(b,a){this.target.setSize(b,a);this.fireEvent("resize",this,b,a,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var c;for(var b=0,a=this.handles.length;b<a;b++){c=this[this.possiblePositions[this.handles[b]]];delete c.owner;Ext.destroy(c)}},forceHandlesHeight:function(){var a=this,b;if(Ext.isIE6){b=a.east;if(b){b.setHeight(a.el.getHeight())}b=a.west;if(b){b.setHeight(a.el.getHeight())}a.el.repaint()}}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(b){var d=this;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&&d.minWidth&&d.minHeight){var c=d.minWidth/d.el.getWidth(),a=d.minHeight/d.el.getHeight();if(a>c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){var e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(h,i,g){if(g){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.el.getBox()},getDynamicTarget:function(){var a=this,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls,d;if(c.isComponent){b=c.getProxy().addCls(a)}else{d=Ext.getBody();if(Ext.scopeResetCSS){d=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"reset"})}b=c.createProxy({tag:"div",cls:a,id:c.id+"-rzproxy"},d)}b.removeCls(Ext.baseCSSPrefix+"proxy-el");return b},onStart:function(a){this.activeResizeHandle=Ext.getCmp(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(t,m){var u=this,c=u.activeResizeHandle.region,g=u.getOffset(u.constrainTo?"dragTarget":null),k=u.startBox,h,q=0,v=0,j,r,a=0,x=0,w,n=g[0]<0?"right":"left",s=g[1]<0?"down":"up",i,b;switch(c){case"south":v=g[1];b=2;break;case"north":v=-g[1];x=-v;b=2;break;case"east":q=g[0];b=1;break;case"west":q=-g[0];a=-q;b=1;break;case"northeast":v=-g[1];x=-v;q=g[0];i=[k.x,k.y+k.height];b=3;break;case"southeast":v=g[1];q=g[0];i=[k.x,k.y];b=3;break;case"southwest":q=-g[0];a=-q;v=g[1];i=[k.x+k.width,k.y];b=3;break;case"northwest":v=-g[1];x=-v;q=-g[0];a=-q;i=[k.x+k.width,k.y+k.height];b=3;break}var d={width:k.width+q,height:k.height+v,x:k.x+a,y:k.y+x};j=Ext.Number.snap(d.width,u.widthIncrement);r=Ext.Number.snap(d.height,u.heightIncrement);if(j!=d.width||r!=d.height){switch(c){case"northeast":d.y-=r-d.height;break;case"north":d.y-=r-d.height;break;case"southwest":d.x-=j-d.width;break;case"west":d.x-=j-d.width;break;case"northwest":d.x-=j-d.width;d.y-=r-d.height}d.width=j;d.height=r}if(d.width<u.minWidth||d.width>u.maxWidth){d.width=Ext.Number.constrain(d.width,u.minWidth,u.maxWidth);if(a){d.x=k.x+(k.width-d.width)}}else{u.lastX=d.x}if(d.height<u.minHeight||d.height>u.maxHeight){d.height=Ext.Number.constrain(d.height,u.minHeight,u.maxHeight);if(x){d.y=k.y+(k.height-d.height)}}else{u.lastY=d.y}if(u.preserveRatio||t.shiftKey){var p,l;h=u.startBox.width/u.startBox.height;p=Math.min(Math.max(u.minHeight,d.width/h),u.maxHeight);l=Math.min(Math.max(u.minWidth,d.height*h),u.maxWidth);if(b==1){d.height=p}else{if(b==2){d.width=l}else{w=Math.abs(i[0]-this.lastXY[0])/Math.abs(i[1]-this.lastXY[1]);if(w>h){d.height=p}else{d.width=l}if(c=="northeast"){d.y=k.y-(d.height-k.height)}else{if(c=="northwest"){d.y=k.y-(d.height-k.height);d.x=k.x-(d.width-k.width)}else{if(c=="southwest"){d.x=k.x-(d.width-k.width)}}}}}}if(v===0){s="none"}if(q===0){n="none"}u.resize(d,{horizontal:n,vertical:s},m)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(b,d,a){var c=this.getResizeTarget(a);if(c.isComponent){if(c.floating){c.setPagePosition(b.x,b.y)}c.setSize(b.width,b.height)}else{c.setBox(b);if(this.originalTarget){this.originalTarget.setBox(b)}}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.resizer.SplitterTracker",{extend:"Ext.dd.DragTracker",requires:["Ext.util.Region"],enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",getPrevCmp:function(){var a=this.getSplitter();return a.previousSibling()},getNextCmp:function(){var a=this.getSplitter();return a.nextSibling()},onBeforeStart:function(h){var d=this,g=d.getPrevCmp(),a=d.getNextCmp(),c=d.getSplitter().collapseEl,b;if(c&&(h.getTarget()===d.getSplitter().collapseEl.dom)){return false}if(a.collapsed||g.collapsed){return false}b=d.overlay=Ext.getBody().createChild({cls:d.overlayCls,html:"&#160;"});b.unselectable();b.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));b.show();d.prevBox=g.getEl().getBox();d.nextBox=a.getEl().getBox();d.constrainTo=d.calculateConstrainRegion()},onStart:function(b){var a=this.getSplitter();a.addCls(a.baseCls+"-active")},calculateConstrainRegion:function(){var g=this,a=g.getSplitter(),h=a.getWidth(),i=a.defaultSplitMin,b=a.orientation,d=g.prevBox,j=g.getPrevCmp(),c=g.nextBox,e=g.getNextCmp(),l,k;if(b==="vertical"){l=Ext.create("Ext.util.Region",d.y,(j.maxWidth?d.x+j.maxWidth:c.right-(e.minWidth||i))+h,d.bottom,d.x+(j.minWidth||i));k=Ext.create("Ext.util.Region",c.y,c.right-(e.minWidth||i),c.bottom,(e.maxWidth?c.right-e.maxWidth:d.x+(d.minWidth||i))-h)}else{l=Ext.create("Ext.util.Region",d.y+(j.minHeight||i),d.right,(j.maxHeight?d.y+j.maxHeight:c.bottom-(e.minHeight||i))+h,d.x);k=Ext.create("Ext.util.Region",(e.maxHeight?c.bottom-e.maxHeight:d.y+(j.minHeight||i))-h,c.right,c.bottom-(e.minHeight||i),c.x)}return l.intersect(k)},performResize:function(h){var j=this,c=j.getOffset("dragTarget"),a=j.getSplitter(),d=a.orientation,k=j.getPrevCmp(),i=j.getNextCmp(),b=a.ownerCt,g=b.getLayout();b.suspendLayout=true;if(d==="vertical"){if(k){if(!k.maintainFlex){delete k.flex;k.setSize(j.prevBox.width+c[0],k.getHeight())}}if(i){if(!i.maintainFlex){delete i.flex;i.setSize(j.nextBox.width-c[0],i.getHeight())}}}else{if(k){if(!k.maintainFlex){delete k.flex;k.setSize(k.getWidth(),j.prevBox.height+c[1])}}if(i){if(!i.maintainFlex){delete i.flex;i.setSize(k.getWidth(),j.nextBox.height-c[1])}}}delete b.suspendLayout;g.onLayout()},endDrag:function(){var a=this;if(a.overlay){a.overlay.remove();delete a.overlay}a.callParent(arguments)},onEnd:function(c){var a=this,b=a.getSplitter();b.removeCls(b.baseCls+"-active");a.performResize()},onDrag:function(g){var c=this,h=c.getOffset("dragTarget"),d=c.getSplitter(),b=d.getEl(),a=d.orientation;if(a==="vertical"){b.setX(c.startRegion.left+h[0])}else{b.setY(c.startRegion.top+h[1])}},getSplitter:function(){return Ext.getCmp(this.getDragCt().id)}});Ext.define("Ext.selection.CellModel",{extend:"Ext.selection.Model",alias:"selection.cellmodel",requires:["Ext.util.KeyNav"],enableKeyNav:true,preventWrap:false,constructor:function(){this.addEvents("deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this;b.primaryView=a;b.views=b.views||[];b.views.push(a);b.bind(a.getStore(),true);a.on({cellmousedown:b.onMouseDown,refresh:b.onViewRefresh,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=Ext.create("Ext.util.KeyNav",a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,tab:b.onKeyTab,scope:b})},getHeaderCt:function(){return this.primaryView.headerCt},onKeyUp:function(b,a){this.move("up",b)},onKeyDown:function(b,a){this.move("down",b)},onKeyLeft:function(b,a){this.move("left",b)},onKeyRight:function(b,a){this.move("right",b)},move:function(a,c){var b=this,d=b.primaryView.walkCells(b.getCurrentPosition(),a,c,b.preventWrap);if(d){b.setCurrentPosition(d)}return d},getCurrentPosition:function(){return this.position},setCurrentPosition:function(b){var a=this;if(a.position){a.onCellDeselect(a.position)}if(b){a.onCellSelect(b)}a.position=b},onMouseDown:function(c,a,d,b,h,i,g){this.setCurrentPosition({row:i,column:d})},onCellSelect:function(a){var d=this,c=d.view.getStore(),b=c.getAt(a.row);d.doSelect(b);d.primaryView.onCellSelect(a);d.primaryView.onCellFocus(a);d.fireEvent("select",d,b,a.row,a.column)},onCellDeselect:function(a){var d=this,c=d.view.getStore(),b=c.getAt(a.row);d.doDeselect(b);d.primaryView.onCellDeselect(a);d.fireEvent("deselect",d,b,a.row,a.column)},onKeyTab:function(h,c){var d=this,g=h.shiftKey?"left":"right",b=d.view.editingPlugin,a=d.move(g,h);if(b&&a&&d.wasEditing){b.startEditByPosition(a)}delete d.wasEditing},onEditorTab:function(b,g){var c=this,d=g.shiftKey?"left":"right",a=c.move(d,g);if(a){b.startEditByPosition(a);c.wasEditing=true}},refresh:function(){var a=this.getCurrentPosition();if(a){this.onCellSelect(a)}},onViewRefresh:function(){var a=this.getCurrentPosition();if(a){this.onCellDeselect(a);this.setCurrentPosition(null)}},selectByPosition:function(a){this.setCurrentPosition(a)}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:true,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bind(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,scope:b});a.el.on(Ext.EventManager.getKeyEvent(),b.onKeyPress,b)},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(d,a){var c=this,b=c.store.getAt(c.store.getCount()-1);if(b){if(d.shiftKey){c.selectRange(b,c.lastFocused||0);c.setLastFocused(b)}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeyHome:function(c,a){var b=this,d=b.store.getAt(0);if(d){if(c.shiftKey){b.selectRange(d,b.lastFocused||0);b.setLastFocused(d)}else{if(c.ctrlKey){b.setLastFocused(d)}else{b.doSelect(d,false)}}}},onKeyPageUp:function(i,d){var h=this,j=h.getRowsVisible(),b,c,a,g;if(j){b=h.lastFocused?h.store.indexOf(h.lastFocused):0;c=b-j;if(c<0){c=0}a=h.store.getAt(c);if(i.shiftKey){g=h.store.getAt(b);h.selectRange(a,g,i.ctrlKey,"up");h.setLastFocused(a)}else{if(i.ctrlKey){i.preventDefault();h.setLastFocused(a)}else{h.doSelect(a)}}}},onKeyPageDown:function(i,b){var g=this,j=g.getRowsVisible(),a,h,d,c;if(j){a=g.lastFocused?g.store.indexOf(g.lastFocused):0;h=a+j;if(h>=g.store.getCount()){h=g.store.getCount()-1}d=g.store.getAt(h);if(i.shiftKey){c=g.store.getAt(a);g.selectRange(d,c,i.ctrlKey,"down");g.setLastFocused(d)}else{if(i.ctrlKey){i.preventDefault();g.setLastFocused(d)}else{g.doSelect(d)}}}},onKeyPress:function(d,b){if(d.getKey()===d.SPACE){d.stopEvent();var c=this,a=c.lastFocused;if(a){if(c.isSelected(a)){c.doDeselect(a,false)}else{c.doSelect(a,true)}}}},onKeyUp:function(h,d){var g=this,c=g.views[0],a=g.store.indexOf(g.lastFocused),b;if(a>0){b=g.store.getAt(a-1);if(h.shiftKey&&g.lastFocused){if(g.isSelected(g.lastFocused)&&g.isSelected(b)){g.doDeselect(g.lastFocused,true);g.setLastFocused(b)}else{if(!g.isSelected(g.lastFocused)){g.doSelect(g.lastFocused,true);g.doSelect(b,true)}else{g.doSelect(b,true)}}}else{if(h.ctrlKey){g.setLastFocused(b)}else{g.doSelect(b)}}}},onKeyDown:function(h,d){var g=this,c=g.views[0],a=g.store.indexOf(g.lastFocused),b;if(a+1<g.store.getCount()){b=g.store.getAt(a+1);if(g.selected.getCount()===0){g.doSelect(b)}else{if(h.shiftKey&&g.lastFocused){if(g.isSelected(g.lastFocused)&&g.isSelected(b)){g.doDeselect(g.lastFocused,true);g.setLastFocused(b)}else{if(!g.isSelected(g.lastFocused)){g.doSelect(g.lastFocused,true);g.doSelect(b,true)}else{g.doSelect(b,true)}}}else{if(h.ctrlKey){g.setLastFocused(b)}else{g.doSelect(b)}}}}},scrollByDeltaX:function(d){var a=this.views[0],c=a.up(),b=c.horizontalScroller;if(b){b.scrollByDeltaX(d)}},onKeyLeft:function(b,a){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(b,a){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(b,a,d,c,g){b.el.focus();if(!this.allowRightMouseSelection(g)){return}this.selectWithEvent(a,g)},allowRightMouseSelection:function(a){var b=this.ignoreRightMouseSelection&&a.button!==0;if(b){b=this.hasSelection()}return !b},onSelectChange:function(g,c,l,a){var j=this,m=j.views,d=m.length,k=j.store,b=k.indexOf(g),h=c?"select":"deselect",e=0;if((l||j.fireEvent("before"+h,j,g,b))!==false&&a()!==false){for(;e<d;e++){if(c){m[e].onRowSelect(b,l)}else{m[e].onRowDeselect(b,l)}}if(!l){j.fireEvent(h,j,g,b)}}},onLastFocusChanged:function(j,d,b){var a=this.views,h=a.length,c=this.store,g,e=0;if(j){g=c.indexOf(j);if(g!=-1){for(;e<h;e++){a[e].onRowFocus(g,false)}}}if(d){g=c.indexOf(d);if(g!=-1){for(e=0;e<h;e++){a[e].onRowFocus(g,true,b)}}}},onEditorTab:function(i,g){var h=this,j=h.views[0],c=i.getActiveRecord(),b=i.getActiveColumn(),d=j.getPosition(c,b),k=g.shiftKey?"left":"right",a=j.walkCells(d,k,g,this.preventWrap);if(a){i.startEditByPosition(a)}},selectByPosition:function(a){var b=this.store.getAt(a.row);this.select(b)}});Ext.define("Ext.selection.CheckboxModel",{alias:"selection.checkboxmodel",extend:"Ext.selection.RowModel",mode:"MULTI",injectCheckbox:0,checkOnly:false,headerWidth:24,checkerOnCls:Ext.baseCSSPrefix+"grid-hd-checker-on",bindComponent:function(a){var b=this;b.sortable=false;b.callParent(arguments);if(!b.hasLockedHeader()||a.headerCt.lockedCt){a.headerCt.on("headerclick",b.onHeaderClick,b);b.addCheckbox(true);b.mon(a.ownerCt,"reconfigure",b.addCheckbox,b)}},hasLockedHeader:function(){var a=false;Ext.each(this.views,function(b){if(b.headerCt.lockedCt){a=true;return false}});return a},addCheckbox:function(b){var c=this,d=c.injectCheckbox,a=c.views[0],e=a.headerCt;if(d!==false){if(d=="first"){d=0}else{if(d=="last"){d=e.getColumnCount()}}e.add(d,c.getHeaderConfig())}if(b!==true){a.refresh()}},toggleUiHeader:function(d){var a=this.views[0],c=a.headerCt,b=c.child("gridcolumn[isCheckerHd]");if(b){if(d){b.el.addCls(this.checkerOnCls)}else{b.el.removeCls(this.checkerOnCls)}}},onHeaderClick:function(b,d,a){if(d.isCheckerHd){a.stopEvent();var c=d.el.hasCls(Ext.baseCSSPrefix+"grid-hd-checker-on");if(c){this.deselectAll(true)}else{this.selectAll(true)}}},getHeaderConfig:function(){var a=this;return{isCheckerHd:true,text:"&#160;",width:a.headerWidth,sortable:false,draggable:false,resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:Ext.baseCSSPrefix+"column-header-checkbox ",renderer:Ext.Function.bind(a.renderer,a),locked:a.hasLockedHeader()}},renderer:function(g,c,b,h,e,d,a){c.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return'<div class="'+Ext.baseCSSPrefix+'grid-row-checker">&#160;</div>'},onRowMouseDown:function(b,a,h,d,i){b.el.focus();var g=this,c=i.getTarget("."+Ext.baseCSSPrefix+"grid-row-checker");if(!g.allowRightMouseSelection(i)){return}if(g.checkOnly&&!c){return}if(c){var j=g.getSelectionMode();if(j!=="SINGLE"){g.setSelectionMode("SIMPLE")}g.selectWithEvent(a,i);g.setSelectionMode(j)}else{g.selectWithEvent(a,i)}},onSelectChange:function(){this.callParent(arguments);var a=this.selected.getCount()===this.store.getCount();this.toggleUiHeader(a)}});Ext.define("Ext.selection.TreeModel",{extend:"Ext.selection.RowModel",alias:"selection.treemodel",pruneRemoved:false,onKeyRight:function(d,b){var c=this.getLastFocused(),a=this.view;if(c){if(c.isExpanded()){this.onKeyDown(d,b)}else{if(!c.isLeaf()){a.expand(c)}}}},onKeyLeft:function(i,d){var h=this.getLastFocused(),c=this.view,b=c.getSelectionModel(),a,g;if(h){a=h.parentNode;if(h.isExpanded()){c.collapse(h)}else{if(a&&!a.isRoot()){if(i.shiftKey){b.selectRange(a,h,i.ctrlKey,"up");b.setLastFocused(a)}else{if(i.ctrlKey){b.setLastFocused(a)}else{b.select(a)}}}}}},onKeyPress:function(g,b){var a=g.getKey(),c,d;if(a===g.SPACE||a===g.ENTER){g.stopEvent();c=this.getLastSelected();if(c){this.view.onCheckChange(c)}}else{this.callParent(arguments)}}});Ext.define("Ext.slider.Thumb",{requires:["Ext.dd.DragTracker","Ext.util.Format"],topZIndex:10000,constructor:function(a){var b=this;Ext.apply(b,a||{},{cls:Ext.baseCSSPrefix+"slider-thumb",constrain:false});b.callParent([a]);if(b.slider.vertical){Ext.apply(b,Ext.slider.Thumb.Vertical)}},render:function(){var a=this;a.el=a.slider.innerEl.insertFirst({cls:a.cls});if(a.disabled){a.disable()}a.initEvents()},move:function(b,a){if(!a){this.el.setLeft(b)}else{Ext.create("Ext.fx.Anim",{target:this.el,duration:350,to:{left:b}})}},bringToFront:function(){this.el.setStyle("zIndex",this.topZIndex)},sendToBack:function(){this.el.setStyle("zIndex","")},enable:function(){var a=this;a.disabled=false;if(a.el){a.el.removeCls(a.slider.disabledCls)}},disable:function(){var a=this;a.disabled=true;if(a.el){a.el.addCls(a.slider.disabledCls)}},initEvents:function(){var b=this,a=b.el;b.tracker=Ext.create("Ext.dd.DragTracker",{onBeforeStart:Ext.Function.bind(b.onBeforeDragStart,b),onStart:Ext.Function.bind(b.onDragStart,b),onDrag:Ext.Function.bind(b.onDrag,b),onEnd:Ext.Function.bind(b.onDragEnd,b),tolerance:3,autoStart:300,overCls:Ext.baseCSSPrefix+"slider-thumb-over"});b.tracker.initEl(a)},onBeforeDragStart:function(a){if(this.disabled){return false}else{this.slider.promoteThumb(this);return true}},onDragStart:function(b){var a=this;a.el.addCls(Ext.baseCSSPrefix+"slider-thumb-drag");a.dragging=true;a.dragStartValue=a.value;a.slider.fireEvent("dragstart",a.slider,b,a)},onDrag:function(h){var d=this,c=d.slider,b=d.index,g=d.getNewValue(),a,i;if(d.constrain){a=c.thumbs[b+1];i=c.thumbs[b-1];if(i!==undefined&&g<=i.value){g=i.value}if(a!==undefined&&g>=a.value){g=a.value}}c.setValue(b,g,false);c.fireEvent("drag",c,h,d)},getNewValue:function(){var a=this.slider,b=a.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(a.reverseValue(b.left),a.decimalPrecision)},onDragEnd:function(d){var b=this,a=b.slider,c=b.value;b.el.removeCls(Ext.baseCSSPrefix+"slider-thumb-drag");b.dragging=false;a.fireEvent("dragend",a,d);if(b.dragStartValue!=c){a.fireEvent("changecomplete",a,c,b)}},destroy:function(){Ext.destroy(this.tracker)},statics:{Vertical:{getNewValue:function(){var b=this.slider,c=b.innerEl,d=c.translatePoints(this.tracker.getXY()),a=c.getHeight()-d.top;return Ext.util.Format.round(b.reverseValue(a),b.decimalPrecision)},move:function(b,a){if(!a){this.el.setBottom(b)}else{Ext.create("Ext.fx.Anim",{target:this.el,duration:350,to:{bottom:b}})}}}}});Ext.define("Ext.slider.Tip",{extend:"Ext.tip.Tip",minWidth:10,alias:"widget.slidertip",offsets:[0,-10],isSliderTip:true,init:function(b){var a=this;b.on({scope:a,dragstart:a.onSlide,drag:a.onSlide,dragend:a.hide,destroy:a.destroy})},onSlide:function(c,d,a){var b=this;b.show();b.update(b.getText(a));b.doComponentLayout();b.el.alignTo(a.el,"b-t?",b.offsets)},getText:function(a){return String(a.value)}});Ext.define("Ext.slider.Multi",{extend:"Ext.form.field.Base",alias:"widget.multislider",alternateClassName:"Ext.slider.MultiSlider",requires:["Ext.slider.Thumb","Ext.slider.Tip","Ext.Number","Ext.util.Format","Ext.Template","Ext.layout.component.field.Slider"],fieldSubTpl:['<div id="{id}" class="'+Ext.baseCSSPrefix+'slider {fieldCls} {vertical}" aria-valuemin="{minValue}" aria-valuemax="{maxValue}" aria-valuenow="{value}" aria-valuetext="{value}">','<div id="{cmpId}-endEl" class="'+Ext.baseCSSPrefix+'slider-end" role="presentation">','<div id="{cmpId}-innerEl" class="'+Ext.baseCSSPrefix+'slider-inner" role="presentation">','<a id="{cmpId}-focusEl" class="'+Ext.baseCSSPrefix+'slider-focus" href="#" tabIndex="-1" hidefocus="on" role="presentation"></a>',"</div>","</div>","</div>",{disableFormats:true,compiled:true}],vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,constrainThumbs:true,componentLayout:"sliderfield",useTips:true,tipText:null,ariaRole:"slider",initValue:function(){var e=this,c=Ext.value,b=c(e.values,[c(e.value,c(e.minValue,0))]),d=0,a=b.length;e.originalValue=b;for(;d<a;d++){e.addThumb(b[d])}},initComponent:function(){var c=this,a,b;c.thumbs=[];c.keyIncrement=Math.max(c.increment,c.keyIncrement);c.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(c.vertical){Ext.apply(c,Ext.slider.Multi.Vertical)}c.callParent();if(c.useTips){a=c.tipText?{getText:c.tipText}:{};c.plugins=c.plugins||[];Ext.each(c.plugins,function(d){if(d.isSliderTip){b=true;return false}});if(!b){c.plugins.push(Ext.create("Ext.slider.Tip",a))}}},addThumb:function(c){var b=this,a=Ext.create("Ext.slider.Thumb",{value:c,slider:b,index:b.thumbs.length,constrain:b.constrainThumbs});b.thumbs.push(a);if(b.rendered){a.render()}return a},promoteThumb:function(c){var a=this.thumbs,e=a.length,g,b,d;for(d=0;d<e;d++){b=a[d];if(b==c){b.bringToFront()}else{b.sendToBack()}}},onRender:function(){var e=this,d=0,b=e.thumbs,a=b.length,c;Ext.applyIf(e.subTplData,{vertical:e.vertical?Ext.baseCSSPrefix+"slider-vert":Ext.baseCSSPrefix+"slider-horz",minValue:e.minValue,maxValue:e.maxValue,value:e.value});e.addChildEls("endEl","innerEl","focusEl");e.callParent(arguments);for(;d<a;d++){b[d].render()}c=e.innerEl.down("."+Ext.baseCSSPrefix+"slider-thumb");e.halfThumb=(e.vertical?c.getHeight():c.getWidth())/2},onChange:function(b,a){this.setValue(a,undefined,true)},initEvents:function(){var a=this;a.mon(a.el,{scope:a,mousedown:a.onMouseDown,keydown:a.onKeyDown,change:a.onChange});a.focusEl.swallowEvent("click",true)},onMouseDown:function(j){var g=this,h=false,d=0,b=g.thumbs,a=b.length,c;if(g.disabled){return}for(;d<a;d++){h=h||j.target==b[d].el.dom}if(g.clickToChange&&!h){c=g.innerEl.translatePoints(j.getXY());g.onClickChange(c)}g.focus()},onClickChange:function(c){var d=this,a,b;if(c.top>d.clickRange[0]&&c.top<d.clickRange[1]){a=d.getNearest(c,"left");if(!a.disabled){b=a.index;d.setValue(b,Ext.util.Format.round(d.reverseValue(c.left),d.decimalPrecision),undefined,true)}}},getNearest:function(n,b){var l=this,q=b=="top"?l.innerEl.getHeight()-n[b]:n[b],j=l.reverseValue(q),m=(l.maxValue-l.minValue)+5,g=0,c=null,h=l.thumbs,d=0,e=h.length,a,p,k;for(;d<e;d++){a=l.thumbs[d];p=a.value;k=Math.abs(p-j);if(Math.abs(k<=m)){c=a;g=d;m=k}}return c},onKeyDown:function(c){var b=this,a,d;if(b.disabled||b.thumbs.length!==1){c.preventDefault();return}a=c.getKey();switch(a){case c.UP:case c.RIGHT:c.stopEvent();d=c.ctrlKey?b.maxValue:b.getValue(0)+b.keyIncrement;b.setValue(0,d,undefined,true);break;case c.DOWN:case c.LEFT:c.stopEvent();d=c.ctrlKey?b.minValue:b.getValue(0)-b.keyIncrement;b.setValue(0,d,undefined,true);break;default:c.preventDefault()}},afterRender:function(){var g=this,e=0,b=g.thumbs,a=b.length,d,c;g.callParent(arguments);for(;e<a;e++){d=b[e];if(d.value!==undefined){c=g.normalizeValue(d.value);if(c!==d.value){g.setValue(e,c,false)}else{d.move(g.translateValue(c),false)}}}},getRatio:function(){var a=this.innerEl.getWidth(),b=this.maxValue-this.minValue;return b===0?a:(a/b)},normalizeValue:function(a){var b=this;a=Ext.Number.snap(a,this.increment,this.minValue,this.maxValue);a=Ext.util.Format.round(a,b.decimalPrecision);a=Ext.Number.constrain(a,b.minValue,b.maxValue);return a},setMinValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.minValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemin",g)}for(;d<a;++d){c=b[d];c.value=c.value<g?g:c.value}e.syncThumbs()},setMaxValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.maxValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemax",g)}for(;d<a;++d){c=b[d];c.value=c.value>g?g:c.value}e.syncThumbs()},setValue:function(c,g,b,e){var d=this,a=d.thumbs[c];g=d.normalizeValue(g);if(g!==a.value&&d.fireEvent("beforechange",d,g,a.value,a)!==false){a.value=g;if(d.rendered){d.inputEl.set({"aria-valuenow":g,"aria-valuetext":g});a.move(d.translateValue(g),Ext.isDefined(b)?b!==false:d.animate);d.fireEvent("change",d,g,a);if(e){d.fireEvent("changecomplete",d,g,a)}}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},focus:function(){this.focusEl.focus(10)},onDisable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e,h;g.callParent();for(;d<a;d++){c=b[d];e=c.el;c.disable();if(Ext.isIE){h=e.getXY();e.hide();g.innerEl.addCls(g.disabledCls).dom.disabled=true;if(!g.thumbHolder){g.thumbHolder=g.endEl.createChild({cls:Ext.baseCSSPrefix+"slider-thumb "+g.disabledCls})}g.thumbHolder.show().setXY(h)}}},onEnable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e;this.callParent();for(;d<a;d++){c=b[d];e=c.el;c.enable();if(Ext.isIE){g.innerEl.removeCls(g.disabledCls).dom.disabled=false;if(g.thumbHolder){g.thumbHolder.hide()}e.show();g.syncThumbs()}}},syncThumbs:function(){if(this.rendered){var a=this.thumbs,c=a.length,b=0;for(;b<c;b++){a[b].move(this.translateValue(a[b].value))}}},getValue:function(a){return Ext.isNumber(a)?this.thumbs[a].value:this.getValues()},getValues:function(){var c=[],d=0,b=this.thumbs,a=b.length;for(;d<a;d++){c.push(b[d].value)}return c},getSubmitValue:function(){var a=this;return(a.disabled||!a.submitValue)?null:a.getValue()},reset:function(){var b=this,a=Ext.Array;a.forEach(a.from(b.originalValue),function(d,c){b.setValue(c,d)});b.clearInvalid();delete b.wasValid},beforeDestroy:function(){var a=this;Ext.destroy(a.innerEl,a.endEl,a.focusEl);Ext.each(a.thumbs,function(b){Ext.destroy(b)},a);a.callParent()},statics:{Vertical:{getRatio:function(){var b=this.innerEl.getHeight(),a=this.maxValue-this.minValue;return b/a},onClickChange:function(d){var e=this,b,c,a;if(d.left>e.clickRange[0]&&d.left<e.clickRange[1]){b=e.getNearest(d,"top");if(!b.disabled){c=b.index;a=e.reverseValue(e.innerEl.getHeight()-d.top);e.setValue(c,Ext.util.Format.round(e.minValue+a,e.decimalPrecision),undefined,true)}}}}}});Ext.define("Ext.slider.Single",{extend:"Ext.slider.Multi",alias:["widget.slider","widget.sliderfield"],alternateClassName:["Ext.Slider","Ext.form.SliderField","Ext.slider.SingleSlider","Ext.slider.Slider"],getValue:function(){return this.callParent([0])},setValue:function(d,b){var c=Ext.toArray(arguments),a=c.length;if(a==1||(a<=3&&typeof arguments[1]!="number")){c.unshift(0)}return this.callParent(c)},getNearest:function(){return this.thumbs[0]}});Ext.define("Ext.tab.Tab",{extend:"Ext.button.Button",alias:"widget.tab",requires:["Ext.layout.component.Tab","Ext.util.KeyNav"],componentLayout:"tab",isTab:true,baseCls:Ext.baseCSSPrefix+"tab",activeCls:"active",closableCls:"closable",closable:true,closeText:"Close Tab",active:false,scale:false,position:"top",initComponent:function(){var a=this;a.addEvents("activate","deactivate","beforeclose","close");a.callParent(arguments);if(a.card){a.setCard(a.card)}},onRender:function(){var b=this,a=b.up("tabbar"),c=b.up("tabpanel");b.addClsWithUI(b.position);b.syncClosableUI();if(!b.minWidth){b.minWidth=(a)?a.minTabWidth:b.minWidth;if(!b.minWidth&&c){b.minWidth=c.minTabWidth}if(b.minWidth&&b.iconCls){b.minWidth+=25}}if(!b.maxWidth){b.maxWidth=(a)?a.maxTabWidth:b.maxWidth;if(!b.maxWidth&&c){b.maxWidth=c.maxTabWidth}}b.callParent(arguments);if(b.active){b.activate(true)}b.syncClosableElements();b.keyNav=Ext.create("Ext.util.KeyNav",b.el,{enter:b.onEnterKey,del:b.onDeleteKey,scope:b})},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI(b.position+"-disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI(b.position+"-disabled");return b},onDestroy:function(){var a=this;if(a.closeEl){a.closeEl.un("click",Ext.EventManager.preventDefault);a.closeEl=null}Ext.destroy(a.keyNav);delete a.keyNav;a.callParent(arguments)},setClosable:function(a){var b=this;a=(!arguments.length||!!a);if(b.closable!=a){b.closable=a;if(b.card){b.card.closable=a}b.syncClosableUI();if(b.rendered){b.syncClosableElements();b.doComponentLayout();if(b.ownerCt){b.ownerCt.doLayout()}}}},syncClosableElements:function(){var a=this;if(a.closable){if(!a.closeEl){a.closeEl=a.el.createChild({tag:"a",cls:a.baseCls+"-close-btn",href:"#",title:a.closeText}).on("click",Ext.EventManager.preventDefault)}}else{var b=a.closeEl;if(b){b.un("click",Ext.EventManager.preventDefault);b.remove();a.closeEl=null}}},syncClosableUI:function(){var b=this,a=[b.closableCls,b.closableCls+"-"+b.position];if(b.closable){b.addClsWithUI(a)}else{b.removeClsWithUI(a)}},setCard:function(a){var b=this;b.card=a;b.setText(b.title||a.title);b.setIconCls(b.iconCls||a.iconCls)},onCloseClick:function(){var a=this;if(a.fireEvent("beforeclose",a)!==false){if(a.tabBar){if(a.tabBar.closeTab(a)===false){return}}else{a.fireEvent("close",a)}}},fireClose:function(){this.fireEvent("close",this)},onEnterKey:function(b){var a=this;if(a.tabBar){a.tabBar.onClick(b,a.el)}},onDeleteKey:function(b){var a=this;if(a.closable){a.onCloseClick()}},activate:function(b){var a=this;a.active=true;a.addClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("activate",a)}},deactivate:function(b){var a=this;a.active=false;a.removeClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("deactivate",a)}}});Ext.define("Ext.tab.Bar",{extend:"Ext.panel.Header",alias:"widget.tabbar",baseCls:Ext.baseCSSPrefix+"tab-bar",requires:["Ext.tab.Tab","Ext.FocusManager"],isTabBar:true,defaultType:"tab",plain:false,renderTpl:['<div id="{id}-body" class="{baseCls}-body <tpl if="bodyCls"> {bodyCls}</tpl> <tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>></div>','<div id="{id}-strip" class="{baseCls}-strip<tpl if="ui"> {baseCls}-strip-{ui}<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl></tpl>"></div>'],initComponent:function(){var b=this,a;if(b.plain){b.setUI(b.ui+"-plain")}b.addClsWithUI(b.dock);b.addEvents("change");b.addChildEls("body","strip");b.callParent(arguments);b.layout.align=(b.orientation=="vertical")?"left":"top";b.layout.overflowHandler=Ext.create("Ext.layout.container.boxOverflow.Scroller",b.layout);b.remove(b.titleCmp);delete b.titleCmp;a=b.orientation=="vertical"?["up","down"]:["left","right"];Ext.FocusManager.subscribe(b,{keys:a});Ext.apply(b.renderData,{bodyCls:b.bodyCls})},onAdd:function(a){a.position=this.dock;this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.previousTab){b.previousTab=null}if(b.items.getCount()===0){b.activeTab=null}b.callParent(arguments)},afterRender:function(){var a=this;a.mon(a.el,{scope:a,click:a.onClick,delegate:"."+Ext.baseCSSPrefix+"tab"});a.callParent(arguments)},afterComponentLayout:function(){var a=this;a.callParent(arguments);a.strip.setWidth(a.el.getWidth())},onClick:function(c,b){var a=Ext.getCmp(b.id),d=this.tabPanel;b=c.getTarget();if(a&&a.isDisabled&&!a.isDisabled()){if(a.closable&&b===a.closeEl.dom){a.onCloseClick()}else{if(d){d.setActiveTab(a.card)}else{this.setActiveTab(a)}a.focus()}}},closeTab:function(c){var d=this,b=c.card,e=d.tabPanel,a;if(b&&b.fireEvent("beforeclose",b)===false){return false}if(c.active&&d.items.getCount()>1){a=d.previousTab||c.next("tab")||d.items.first();d.setActiveTab(a);if(e){e.setActiveTab(a.card)}}c.fireClose();d.remove(c);if(e&&b){b.fireEvent("close",b);e.remove(b)}if(a){a.focus()}},setActiveTab:function(a){if(a.disabled){return}var b=this;if(b.activeTab){b.previousTab=b.activeTab;b.activeTab.deactivate()}a.activate();if(b.rendered){b.layout.layout();a.el&&a.el.scrollIntoView(b.layout.getRenderTarget())}b.activeTab=a;b.fireEvent("change",b,a,a.card)}});Ext.define("Ext.tab.Panel",{extend:"Ext.panel.Panel",alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],requires:["Ext.layout.container.Card","Ext.tab.Bar"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:"x-tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var c=this,b=c.dockedItems||[],a=c.activeTab||0;c.layout=Ext.create("Ext.layout.container.Card",Ext.apply({owner:c,deferredRender:c.deferredRender,itemCls:c.itemCls},c.layout));c.tabBar=Ext.create("Ext.tab.Bar",Ext.apply({},c.tabBar,{dock:c.tabPosition,plain:c.plain,border:c.border,cardLayout:c.layout,tabPanel:c}));if(b&&!Ext.isArray(b)){b=[b]}b.push(c.tabBar);c.dockedItems=b;c.addEvents("beforetabchange","tabchange");c.callParent(arguments);c.setActiveTab(a);c.on("afterlayout",c.afterInitialLayout,c,{single:true})},afterInitialLayout:function(){var b=this,a=b.getComponent(b.activeTab);if(a){b.layout.setActiveItem(a)}},setActiveTab:function(a){var c=this,b;a=c.getComponent(a);if(a){b=c.getActiveTab();if(b&&b!==a&&c.fireEvent("beforetabchange",c,a,b)===false){return false}c.tabBar.setActiveTab(a.tab);c.activeTab=a;if(c.rendered){c.layout.setActiveItem(a)}if(b&&b!==a){c.fireEvent("tabchange",c,a,b)}}},getActiveTab:function(){return this.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(e,c){var d=this,b=e.tabConfig||{},a={xtype:"tab",card:e,disabled:e.disabled,closable:e.closable,hidden:e.hidden,tabBar:d.tabBar};if(e.closeText){a.closeText=e.closeText}b=Ext.applyIf(b,a);e.tab=d.tabBar.insert(c,b);e.on({scope:d,enable:d.onItemEnable,disable:d.onItemDisable,beforeshow:d.onItemBeforeShow,iconchange:d.onItemIconChange,titlechange:d.onItemTitleChange});if(e.isPanel){if(d.removePanelHeader){e.preventHeader=true;if(e.rendered){e.updateHeader()}}if(e.isPanel&&d.border){e.setBorder(false)}}if(this.rendered&&d.items.getCount()===1){d.setActiveTab(0)}},onItemEnable:function(a){a.tab.enable()},onItemDisable:function(a){a.tab.disable()},onItemBeforeShow:function(a){if(a!==this.activeTab){this.setActiveTab(a);return false}},onItemIconChange:function(b,a){b.tab.setIconCls(a);this.getTabBar().doLayout()},onItemTitleChange:function(a,b){a.tab.setText(b);this.getTabBar().doLayout()},doRemove:function(d,b){var c=this,a=c.items,e=a.getCount()>1;if(c.destroying||!e){c.activeTab=null}else{if(d===c.activeTab){c.setActiveTab(d.next()||a.getAt(0))}}c.callParent(arguments);delete d.tab.card;delete d.tab},onRemove:function(c,a){var b=this;c.un({scope:b,enable:b.onItemEnable,disable:b.onItemDisable,beforeshow:b.onItemBeforeShow});if(!b.destroying&&c.tab.ownerCt==b.tabBar){b.tabBar.remove(c.tab)}}});Ext.define("Ext.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.tree.Column",{extend:"Ext.grid.column.Column",alias:"widget.treecolumn",initComponent:function(){var a=this.renderer||this.defaultRenderer,b=this.scope||window;this.renderer=function(m,p,e,d,l,h,k){var t=[],r=Ext.String.format,v=e.getDepth(),s=Ext.baseCSSPrefix+"tree-",g=s+"elbow-",n=s+"expander",j='<img src="{1}" class="{0}" />',w='<input type="button" role="checkbox" class="{0}" {1} />',i=a.apply(b,arguments),q=e.get("href"),u=e.get("hrefTarget"),c=e.get("cls");while(e){if(!e.isRoot()||(e.isRoot()&&k.rootVisible)){if(e.getDepth()===v){t.unshift(r(j,s+"icon "+s+"icon"+(e.get("icon")?"-inline ":(e.isLeaf()?"-leaf ":"-parent "))+(e.get("iconCls")||""),e.get("icon")||Ext.BLANK_IMAGE_URL));if(e.get("checked")!==null){t.unshift(r(w,(s+"checkbox")+(e.get("checked")?" "+s+"checkbox-checked":""),e.get("checked")?'aria-checked="true"':""));if(e.get("checked")){p.tdCls+=(" "+s+"checked")}}if(e.isLast()){if(e.isExpandable()){t.unshift(r(j,(g+"end-plus "+n),Ext.BLANK_IMAGE_URL))}else{t.unshift(r(j,(g+"end"),Ext.BLANK_IMAGE_URL))}}else{if(e.isExpandable()){t.unshift(r(j,(g+"plus "+n),Ext.BLANK_IMAGE_URL))}else{t.unshift(r(j,(s+"elbow"),Ext.BLANK_IMAGE_URL))}}}else{if(e.isLast()||e.getDepth()===0){t.unshift(r(j,(g+"empty"),Ext.BLANK_IMAGE_URL))}else{if(e.getDepth()!==0){t.unshift(r(j,(g+"line"),Ext.BLANK_IMAGE_URL))}}}}e=e.parentNode}if(q){t.push('<a href="',q,'" target="',u,'">',i,"</a>")}else{t.push(i)}if(c){p.tdCls+=" "+c}return t.join("")};this.callParent(arguments)},defaultRenderer:function(a){return a}});Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,rootVisible:true,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,initComponent:function(){var a=this;if(a.initialConfig.animate===undefined){a.animate=Ext.enableFx}a.store=Ext.create("Ext.data.NodeStore",{recursive:true,rootVisible:a.rootVisible,listeners:{beforeexpand:a.onBeforeExpand,expand:a.onExpand,beforecollapse:a.onBeforeCollapse,collapse:a.onCollapse,scope:a}});if(a.node){a.setRootNode(a.node)}a.animQueue={};a.callParent(arguments)},processUIEvent:function(a){if(a.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(b){var a=this;a.store.setNode(b);a.node=b;if(!a.rootVisible){b.expand()}},onRender:function(){var b=this,a;b.callParent(arguments);a=b.el;a.on({scope:b,delegate:b.expanderSelector,mouseover:b.onExpanderMouseOver,mouseout:b.onExpanderMouseOut});a.on({scope:b,delegate:b.checkboxSelector,click:b.onCheckboxChange})},onCheckboxChange:function(d,a){var c=this,b=d.getTarget(c.getItemSelector(),c.getTargetEl());if(b){c.onCheckChange(c.getRecord(b))}},onCheckChange:function(a){var b=a.get("checked");if(Ext.isBoolean(b)){b=!b;a.set("checked",b);this.fireEvent("checkchange",a,b)}},getChecked:function(){var a=[];this.node.cascadeBy(function(b){if(b.get("checked")){a.push(b)}});return a},isItemChecked:function(a){return a.get("checked")},createAnimWrap:function(j,k){var g="",e=this.panel.headerCt,b=e.getGridColumns(),h=0,l=b.length,m,d=this.getNode(j),a,c;for(;h<l;h++){m=b[h];g+='<th style="width: '+(m.hidden?0:m.getDesiredWidth())+'px; height: 0px;"></th>'}c=Ext.get(d);a=c.insertSibling({tag:"tr",html:['<td colspan="'+e.getColumnCount()+'">','<div class="'+this.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+'grid-table" style="width: '+e.getFullWidth()+'px;"><tbody>',g,"</tbody></table>","</div>","</td>"].join("")},"after");return{record:j,node:d,el:a,expanding:false,collapsing:false,animating:false,animateEl:a.down("div"),targetEl:a.down("tbody")}},getAnimWrap:function(a){if(!this.animate){return null}while(a){if(a.animWrap){return a.animWrap}a=a.parentNode}return null},doAdd:function(b,d,i){var j=this,g=d[0],l=g.parentNode,k=j.all.elements,n=0,e=j.getAnimWrap(l),m,c,h;if(!e||!e.expanding){j.resetScrollers();return j.callParent(arguments)}l=e.record;m=e.targetEl;c=m.dom.childNodes;h=c.length-1;n=i-j.indexOf(l)-1;if(!h||n>=h){m.appendChild(b)}else{Ext.fly(c[n+1]).insertSibling(b,"before",true)}Ext.Array.insert(k,i,b);if(e.isAnimating){j.onExpand(l)}},beginBulkUpdate:function(){this.bulkUpdate=true;this.ownerCt.changingScrollbars=true},endBulkUpdate:function(){var b=this,a=b.ownerCt;b.bulkUpdate=false;b.ownerCt.changingScrollbars=true;b.resetScrollers()},onRemove:function(e,a,b){var d=this,c=d.bulkUpdate;d.doRemove(a,b);if(!c){d.updateIndexes(b)}if(d.store.getCount()===0){d.refresh()}if(!c){d.fireEvent("itemremove",a,b)}},doRemove:function(a,c){var h=this,e=a.parentNode,d=h.all,b=h.getAnimWrap(a),g=d.item(c).dom;if(!b||!b.collapsing){h.resetScrollers();return h.callParent(arguments)}b.targetEl.appendChild(g);d.removeElement(c)},onBeforeExpand:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d);if(!a){a=d.animWrap=e.createAnimWrap(d);a.animateEl.setHeight(0)}else{if(a.collapsing){a.targetEl.select(e.itemSelector).remove()}}a.expanding=true;a.collapsing=false}},onExpand:function(c){var d=this,a=d.animQueue,i=c.getId(),b,e,g,h;if(d.singleExpand){d.ensureSingleExpand(c)}b=d.getAnimWrap(c);if(!b){d.resetScrollers();return}e=b.animateEl;g=b.targetEl;e.stopAnimation();a[i]=true;e.slideIn("t",{duration:d.expandDuration,listeners:{scope:d,lastframe:function(){b.el.insertSibling(g.query(d.itemSelector),"before");b.el.remove();d.resetScrollers();delete b.record.animWrap;delete a[i]}}});b.isAnimating=true},resetScrollers:function(){if(!this.bulkUpdate){var a=this.panel;a.determineScrollbars();a.invalidateScroller()}},onBeforeCollapse:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d);if(!a){a=d.animWrap=e.createAnimWrap(d,c)}else{if(a.expanding){a.targetEl.select(this.itemSelector).remove()}}a.expanding=false;a.collapsing=true}},onCollapse:function(c){var d=this,a=d.animQueue,h=c.getId(),b=d.getAnimWrap(c),e,g;if(!b){d.resetScrollers();return}e=b.animateEl;g=b.targetEl;a[h]=true;e.stopAnimation();e.slideOut("t",{duration:d.collapseDuration,listeners:{scope:d,lastframe:function(){b.el.remove();delete b.record.animWrap;d.resetScrollers();delete a[h]}}});b.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},collectData:function(c){var g=this.callParent(arguments),e=g.rows,a=e.length,d=0,h,b;for(;d<a;d++){h=e[d];b=c[d];if(b.get("qtip")){h.rowAttr='data-qtip="'+b.get("qtip")+'"';if(b.get("qtitle")){h.rowAttr+=' data-qtitle="'+b.get("qtitle")+'"'}}if(b.isExpanded()){h.rowCls=(h.rowCls||"")+" "+this.expandedCls}if(b.isLoading()){h.rowCls=(h.rowCls||"")+" "+this.loadingCls}}return g},expand:function(b,a,d,c){return b.expand(a,d,c)},collapse:function(b,a,d,c){return b.collapse(a,d,c)},toggle:function(a){this[a.isExpanded()?"collapse":"expand"](a)},onItemDblClick:function(a,c,b){this.callParent(arguments);if(this.toggleOnDblClick){this.toggle(a)}},onBeforeItemMouseDown:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){return false}return this.callParent(arguments)},onItemClick:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){this.toggle(a);return false}return this.callParent(arguments)},onExpanderMouseOver:function(b,a){b.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(b,a){b.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(b){var a=b.parentNode;if(a){a.eachChild(function(c){if(c!==b&&c.isExpanded()){c.collapse()}})}}});Ext.define("Ext.tree.Panel",{extend:"Ext.panel.Table",alias:"widget.treepanel",alternateClassName:["Ext.tree.TreePanel","Ext.TreePanel"],requires:["Ext.tree.View","Ext.selection.TreeModel","Ext.tree.Column"],viewType:"treeview",selType:"treemodel",treeCls:Ext.baseCSSPrefix+"tree-panel",deferRowRender:false,lines:true,useArrows:false,singleExpand:false,ddConfig:{enableDrag:true,enableDrop:true},rootVisible:true,displayField:"text",root:null,normalCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible","scroll"],lockedCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible"],constructor:function(a){a=a||{};if(a.animate===undefined){a.animate=Ext.enableFx}this.enableAnimations=a.animate;delete a.animate;this.callParent([a])},initComponent:function(){var b=this,a=[b.treeCls];if(b.useArrows){a.push(Ext.baseCSSPrefix+"tree-arrows");b.lines=false}if(b.lines){a.push(Ext.baseCSSPrefix+"tree-lines")}else{if(!b.useArrows){a.push(Ext.baseCSSPrefix+"tree-no-lines")}}if(Ext.isString(b.store)){b.store=Ext.StoreMgr.lookup(b.store)}else{if(!b.store||Ext.isObject(b.store)&&!b.store.isStore){b.store=Ext.create("Ext.data.TreeStore",Ext.apply({},b.store||{},{root:b.root,fields:b.fields,model:b.model,folderSort:b.folderSort}))}else{if(b.root){b.store=Ext.data.StoreManager.lookup(b.store);b.store.setRootNode(b.root);if(b.folderSort!==undefined){b.store.folderSort=b.folderSort;b.store.sort()}}}}b.viewConfig=Ext.applyIf(b.viewConfig||{},{rootVisible:b.rootVisible,animate:b.enableAnimations,singleExpand:b.singleExpand,node:b.store.getRootNode(),hideHeaders:b.hideHeaders});b.mon(b.store,{scope:b,rootchange:b.onRootChange,clear:b.onClear});b.relayEvents(b.store,["beforeload","load"]);b.store.on({append:b.createRelayer("itemappend"),remove:b.createRelayer("itemremove"),move:b.createRelayer("itemmove"),insert:b.createRelayer("iteminsert"),beforeappend:b.createRelayer("beforeitemappend"),beforeremove:b.createRelayer("beforeitemremove"),beforemove:b.createRelayer("beforeitemmove"),beforeinsert:b.createRelayer("beforeiteminsert"),expand:b.createRelayer("itemexpand"),collapse:b.createRelayer("itemcollapse"),beforeexpand:b.createRelayer("beforeitemexpand"),beforecollapse:b.createRelayer("beforeitemcollapse")});if(!b.columns){if(b.initialConfig.hideHeaders===undefined){b.hideHeaders=true}b.columns=[{xtype:"treecolumn",text:"Name",flex:1,dataIndex:b.displayField}]}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");b.callParent();b.relayEvents(b.getView(),["checkchange"]);if(!b.getView().rootVisible&&!b.getRootNode()){b.setRootNode({expanded:true})}},onClear:function(){this.view.onClear()},setRootNode:function(){return this.store.setRootNode.apply(this.store,arguments)},getRootNode:function(){return this.store.getRootNode()},onRootChange:function(a){this.view.setRootNode(a)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(a){return a.get("checked")},expandAll:function(e,d){var b=this.getRootNode(),c=this.enableAnimations,a=this.getView();if(b){if(!c){a.beginBulkUpdate()}b.expand(true,e,d);if(!c){a.endBulkUpdate()}}},collapseAll:function(e,d){var b=this.getRootNode(),c=this.enableAnimations,a=this.getView();if(b){if(!c){a.beginBulkUpdate()}if(a.rootVisible){b.collapse(true,e,d)}else{b.collapseChildren(true,e,d)}if(!c){a.endBulkUpdate()}}},expandPath:function(l,g,a,h,k){var d=this,c=d.getRootNode(),b=1,e=d.getView(),j,i;g=g||d.getRootNode().idProperty;a=a||"/";if(Ext.isEmpty(l)){Ext.callback(h,k||d,[false,null]);return}j=l.split(a);if(c.get(g)!=j[1]){Ext.callback(h,k||d,[false,c]);return}i=function(){if(++b===j.length){Ext.callback(h,k||d,[true,c]);return}var m=c.findChild(g,j[b]);if(!m){Ext.callback(h,k||d,[false,c]);return}c=m;c.expand(false,i)};c.expand(false,i)},selectPath:function(h,g,e,i,a){var d=this,c,b;g=g||d.getRootNode().idProperty;e=e||"/";c=h.split(e);b=c.pop();d.expandPath(c.join(e),g,e,function(l,k){var j=false;if(l&&k){k=k.findChild(g,b);if(k){d.getSelectionModel().select(k);Ext.callback(i,a||d,[true,k]);j=true}}else{if(k===d.getRootNode()){j=true}}Ext.callback(i,a||d,[j,k])},d)}});Ext.define("Ext.view.DragZone",{extend:"Ext.dd.DragZone",containerScroll:false,constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el.dom.parentNode]);b.ddel=Ext.get(document.createElement("div"));b.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(c,a,b){this.initTarget(c,a,b);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onItemMouseDown:function(b,a,d,c,g){if(!this.isPreventDrag(g,a,d,c)){this.handleMouseDown(g);if(b.getSelectionModel().selectionMode=="MULTI"&&!g.ctrlKey&&b.getSelectionModel().isSelected(a)){return false}}},isPreventDrag:function(a){return false},getDragData:function(h){var c=this.view,g=h.getTarget(c.getItemSelector()),b,a,d;if(g){b=c.getRecord(g);a=c.getSelectionModel();d=a.getSelection();return{copy:this.view.copy||(this.view.allowCopy&&h.ctrlKey),event:new Ext.EventObjectImpl(h),view:c,ddel:this.ddel,item:g,records:d,fromPosition:Ext.fly(g).getXY()}}},onInitDrag:function(b,j){var g=this,h=g.dragData,d=h.view,a=d.getSelectionModel(),c=d.getRecord(h.item),i=h.event;if(!a.isSelected(c)||i.hasModifier()){a.selectWithEvent(c,i,true)}h.records=a.getSelection();g.ddel.update(g.getDragText());g.proxy.update(g.ddel.dom);g.onStartDrag(b,j);return true},getDragText:function(){var a=this.dragData.records.length;return Ext.String.format(this.dragText,a,a==1?"":"s")},getRepairXY:function(b,a){return a?a.fromPosition:false}});Ext.define("Ext.tree.ViewDragZone",{extend:"Ext.view.DragZone",isPreventDrag:function(b,a){return(a.get("allowDrag")===false)||!!b.getTarget(this.view.expanderSelector)},afterRepair:function(){var d=this,a=d.view,e=a.selectedItemCls,b=d.dragData.records,c=Ext.fly;if(Ext.enableFx&&d.repairHighlight){Ext.Array.forEach(b,function(g){var h=a.getNode(g);c(h.firstChild).highlight(d.repairHighlightColor,{listeners:{beforeanimate:function(){if(a.isSelected(h)){c(h).removeCls(e)}},afteranimate:function(){if(a.isSelected(h)){c(h).addCls(e)}}}})})}d.dragging=false}});Ext.define("Ext.tree.ViewDropZone",{extend:"Ext.view.DropZone",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,expandDelay:500,indicatorCls:"x-tree-ddindicator",expandNode:function(b){var a=this.view;if(!b.isLeaf()&&!b.isExpanded()){a.expand(b);this.expandProcId=false}},queueExpand:function(a){this.expandProcId=Ext.Function.defer(this.expandNode,this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},getPosition:function(g,b){var j=this.view,c=j.getRecord(b),h=g.getPageY(),k=c.isLeaf(),a=false,i=Ext.fly(b).getRegion(),d;if(c.isRoot()){return"append"}if(this.appendOnly){return k?false:"append"}if(!this.allowParentInsert){a=c.hasChildNodes()&&c.isExpanded()}d=(i.bottom-i.top)/(k?2:3);if(h>=i.top&&h<(i.top+d)){return"before"}else{if(!a&&(k||(h>=(i.bottom-d)&&h<=i.bottom))){return"after"}else{return"append"}}},isValidDropPoint:function(b,j,n,k,g){if(!b||!g.item){return false}var p=this.view,l=p.getRecord(b),d=g.records,a=d.length,m=d.length,c,h;if(!(l&&j&&a)){return false}for(c=0;c<m;c++){h=d[c];if(h.isNode&&h.contains(l)){return false}}if(j==="append"&&l.get("allowDrop")===false){return false}else{if(j!="append"&&l.parentNode.get("allowDrop")===false){return false}}if(Ext.Array.contains(d,l)){return false}return true},onNodeOver:function(a,i,g,c){var d=this.getPosition(g,a),b=this.dropNotAllowed,j=this.view,h=j.getRecord(a),k=this.getIndicator(),m=0,l=0;this.cancelExpand();if(d=="append"&&!this.expandProcId&&!Ext.Array.contains(c.records,h)&&!h.isLeaf()&&!h.isExpanded()){this.queueExpand(h)}if(this.isValidDropPoint(a,d,i,g,c)){this.valid=true;this.currentPosition=d;this.overRecord=h;k.setWidth(Ext.fly(a).getWidth());l=Ext.fly(a).getY()-Ext.fly(j.el).getY()-1;if(d=="before"){b=h.isFirst()?Ext.baseCSSPrefix+"tree-drop-ok-above":Ext.baseCSSPrefix+"tree-drop-ok-between";k.showAt(0,l);i.proxy.show()}else{if(d=="after"){b=h.isLast()?Ext.baseCSSPrefix+"tree-drop-ok-below":Ext.baseCSSPrefix+"tree-drop-ok-between";l+=Ext.fly(a).getHeight();k.showAt(0,l);i.proxy.show()}else{b=Ext.baseCSSPrefix+"tree-drop-ok-append";k.hide()}}}else{this.valid=false}this.currentCls=b;return b},onContainerOver:function(a,c,b){return c.getTarget("."+this.indicatorCls)?this.currentCls:this.dropNotAllowed},notifyOut:function(){this.callParent(arguments);this.cancelExpand()},handleNodeDrop:function(d,l,e){var n=this,p=n.view,g=l.parentNode,q=p.getStore(),s=[],a,c,k,b,j,m,r,h;if(d.copy){a=d.records;d.records=[];for(c=0,k=a.length;c<k;c++){d.records.push(Ext.apply({},a[c].data))}}n.cancelExpand();if(e=="before"){b=g.insertBefore;j=[null,l];l=g}else{if(e=="after"){if(l.nextSibling){b=g.insertBefore;j=[null,l.nextSibling]}else{b=g.appendChild;j=[null]}l=g}else{if(!l.isExpanded()){m=true}b=l.appendChild;j=[null]}}r=function(){var i;for(c=0,k=d.records.length;c<k;c++){j[0]=d.records[c];i=b.apply(l,j);if(Ext.enableFx&&n.dropHighlight){s.push(p.getNode(i))}}if(Ext.enableFx&&n.dropHighlight){Ext.Array.forEach(s,function(t){if(t){Ext.fly(t.firstChild?t.firstChild:t).highlight(n.dropHighlightColor)}})}};if(m){l.expand(false,r)}else{r()}}});Ext.define("Ext.tree.plugin.TreeViewDragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.treeviewdragdrop",uses:["Ext.tree.ViewDragZone","Ext.tree.ViewDropZone"],dragText:"{0} selected node{1}",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,ddGroup:"TreeDD",expandDelay:1000,enableDrop:true,enableDrag:true,nodeHighlightColor:"c3daf9",nodeHighlightOnDrop:Ext.enableFx,nodeHighlightOnRepair:Ext.enableFx,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=Ext.create("Ext.tree.ViewDragZone",{view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText,repairHighlightColor:b.nodeHighlightColor,repairHighlight:b.nodeHighlightOnRepair})}if(b.enableDrop){b.dropZone=Ext.create("Ext.tree.ViewDropZone",{view:a,ddGroup:b.dropGroup||b.ddGroup,allowContainerDrops:b.allowContainerDrops,appendOnly:b.appendOnly,allowParentInserts:b.allowParentInserts,expandDelay:b.expandDelay,dropHighlightColor:b.nodeHighlightColor,dropHighlight:b.nodeHighlightOnDrop})}}});Ext.define("Ext.util.Cookies",{singleton:true,set:function(c,e){var a=arguments,i=arguments.length,b=(i>2)?a[2]:null,h=(i>3)?a[3]:"/",d=(i>4)?a[4]:null,g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=",g=b.length,a=document.cookie.length,e=0,c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return this.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a,b){if(this.get(a)){b=b||"/";document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path="+b}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}});Ext.define("Ext.util.CSS",function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,g){return g.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(i,l){var h,g=c.getElementsByTagName("head")[0],k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=document.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(i,e){var h=document;this.removeStyleSheet(i);var g=h.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",i);g.setAttribute("href",e);h.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(l){if(!d){d={}}try{var p=l.cssRules||l.rules,m,k=p.length-1,g,h;for(;k>=0;--k){m=p[k].selectorText;if(m){m=m.split(",");h=m.length;for(g=0;g<h;g++){d[Ext.String.trim(m[g]).toLowerCase()]=p[k]}}}}catch(n){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets,j=0,g=k.length;for(;j<g;j++){try{if(!k[j].disabled){this.cacheStyleSheet(k[j])}}catch(l){}}}return d},getRule:function(e,h){var g=this.getRules(h);if(!Ext.isArray(e)){return g[e.toLowerCase()]}for(var j=0;j<e.length;j++){if(g[e[j]]){return g[e[j].toLowerCase()]}}return null},updateRule:function(e,j,h){if(!Ext.isArray(e)){var k=this.getRule(e);if(k){k.style[j.replace(b,a)]=h;return true}}else{for(var g=0;g<e.length;g++){if(this.updateRule(e[g],j,h)){return true}}}return false}}}());Ext.define("Ext.util.History",{singleton:true,alternateClassName:"Ext.History",mixins:{observable:"Ext.util.Observable"},constructor:function(){var a=this;a.oldIEMode=Ext.isIE6||Ext.isIE7||!Ext.isStrict&&Ext.isIE8;a.iframe=null;a.hiddenField=null;a.ready=false;a.currentToken=null},getHash:function(){var a=window.location.href,b=a.indexOf("#");return b>=0?a.substr(b+1):null},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(a){this.currentToken=a;this.fireEvent("change",a)},updateIFrame:function(b){var a='<html><body><div id="state">'+Ext.util.Format.htmlEncode(b)+"</div></body></html>";try{var d=this.iframe.contentWindow.document;d.open();d.write(a);d.close();return true}catch(c){return false}},checkIFrame:function(){var d=this,b=d.iframe.contentWindow;if(!b||!b.document){Ext.Function.defer(this.checkIFrame,10,this);return}var e=b.document,c=e.getElementById("state"),a=c?c.innerText:null,g=d.getHash();Ext.TaskManager.start({run:function(){var k=b.document,j=k.getElementById("state"),h=j?j.innerText:null,i=d.getHash();if(h!==a){a=h;d.handleStateChange(h);window.top.location.hash=h;g=h;d.doSave()}else{if(i!==g){g=i;d.updateIFrame(i)}}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)},startUp:function(){var a=this;a.currentToken=a.hiddenField.value||this.getHash();if(a.oldIEMode){a.checkIFrame()}else{var b=a.getHash();Ext.TaskManager.start({run:function(){var c=a.getHash();if(c!==b){b=c;a.handleStateChange(b);a.doSave()}},interval:50,scope:a});a.ready=true;a.fireEvent("ready",a)}},fieldId:Ext.baseCSSPrefix+"history-field",iframeId:Ext.baseCSSPrefix+"history-frame",init:function(c,a){var b=this;if(b.ready){Ext.callback(c,a,[b]);return}if(!Ext.isReady){Ext.onReady(function(){b.init(c,a)});return}b.hiddenField=Ext.getDom(b.fieldId);if(b.oldIEMode){b.iframe=Ext.getDom(b.iframeId)}b.addEvents("ready","change");if(c){b.on("ready",c,a,{single:true})}b.startUp()},add:function(a,c){var b=this;if(c!==false){if(b.getToken()===a){return true}}if(b.oldIEMode){return b.updateIFrame(a)}else{window.top.location.hash=a;return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{[this.openTableWrap()]}",'<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth()]}>',"<tbody>",'<tr class="'+Ext.baseCSSPrefix+'grid-header-row">','<tpl for="columns">','<th class="'+Ext.baseCSSPrefix+'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',"</tpl>","</tr>","{[this.openRows()]}","{row}",'<tpl for="features">',"{[this.embedFeature(values, parent, xindex, xcount)]}","</tpl>","{[this.closeRows()]}","</tbody>","</table>","{[this.closeTableWrap()]}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(b,a){return this.apply(a?b[a]:b)}},embedFeature:function(b,d,a,e){var c="";if(!b.disabled){c=b.getFeatureTpl(b,d,a,e)}return c},embedFullWidth:function(){return'style="width: {fullWidth}px;"'},openRows:function(){return'<tpl for="rows">'},closeRows:function(){return"</tpl>"},metaRowTpl:['<tr class="'+Ext.baseCSSPrefix+'grid-row {addlSelector} {[this.embedRowCls()]}" {[this.embedRowAttr()]}>','<tpl for="columns">','<td class="{cls} '+Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}><div unselectable="on" class="'+Ext.baseCSSPrefix+"grid-cell-inner "+Ext.baseCSSPrefix+'unselectable" style="{{id}-style}; text-align: {align};">{{id}}</div></td>',"</tpl>","</tr>"],firstOrLastCls:function(b,c){var a="";if(b===1){a=Ext.baseCSSPrefix+"grid-cell-first"}else{if(b===c){a=Ext.baseCSSPrefix+"grid-cell-last"}}return a},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:function(){return""},closeTableWrap:function(){return""},getTableTpl:function(k,b){var j,h={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},g={},c=k.features||[],m=c.length,e=0,l={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;e<m;e++){if(!c[e].disabled){c[e].mutateMetaRowTpl(d);Ext.apply(l,c[e].getMetaRowTplFragments());Ext.apply(g,c[e].getFragmentTpl());Ext.apply(h,c[e].getTableFragments())}}d=Ext.create("Ext.XTemplate",d.join(""),l);k.row=d.applyTemplate(k);a=Ext.create("Ext.XTemplate",this.metaTableTpl.join(""),h);j=a.applyTemplate(k);if(!b){j=Ext.create("Ext.XTemplate",j,g)}return j}});