X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..HEAD:/examples/desktop/classes.js diff --git a/examples/desktop/classes.js b/examples/desktop/classes.js new file mode 100644 index 00000000..20afac75 --- /dev/null +++ b/examples/desktop/classes.js @@ -0,0 +1,145 @@ +/* +Copyright(c) 2011 Sencha Inc. +licensing@sencha.com +*/ +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(h,d,f,e,c){var g=this,a=g.managedListeners=g.managedListeners||[],b;if(typeof d!=="string"){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!g.eventOptionsRe.test(d)){g.addManagedListener(h,d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{a.push({item:h,ename:d,fn:f,scope:e,options:c});h.on(d,f,e,c)}},removeManagedListener:function(h,c,f,j){var e=this,k,b,g,a,d;if(typeof c!=="string"){k=c;for(c in k){if(k.hasOwnProperty(c)){b=k[c];if(!e.eventOptionsRe.test(c)){e.removeManagedListener(h,c,b.fn||b,b.scope||k.scope)}}}}g=e.managedListeners?e.managedListeners.slice():[];for(d=0,a=g.length;d0},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,h){h=h||"";var g=this,a=e.length,d=0,f,b;for(;db){e=d[a];for(c in e){if(e[c]){e[c].hide(true)}}}}});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(f){b.onMouseMove(f)},mouseup:function(f){b.resized(f)}});var d=Ext.create("Ext.resizer.Resizer",{el:c.el,handles:"all",pinned:true});d.on({resize:function(f){b.resized(f)}});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 f=this,k=f.bbox||f.chartBBox,i=k.x,h=k.y,a=k.width,l=k.height,c=f.mask.getBox(true),g=Math.max,b=Math.min,m=c.x-i,j=c.y-h;m=g(m,i);j=g(j,h);m=b(m,a);j=b(j,l);c.x=m;c.y=j;f.fireEvent("select",f,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(s){var t=this,n=t.maskType,a=t.bbox||t.chartBBox,h=a.x,g=a.y,b=Math,p=b.floor,i=b.abs,m=b.min,o=b.max,j=p(g+a.height),l=p(h+a.width),d=s.getPageX(),c=s.getPageY(),r=d-t.el.getX(),q=c-t.el.getY(),f=t.maskMouseDown,k;t.mouseMoved=t.mouseDown;r=o(r,h);q=o(q,g);r=m(r,l);q=m(q,j);if(f&&t.mouseDown){if(n=="horizontal"){q=g;f.y=j;c=t.el.getY()+a.height+t.insetPadding}else{if(n=="vertical"){r=h;f.x=l}}l=f.x-r;j=f.y-q;k=["M",r,q,"l",l,0,0,j,-l,0,"z"];t.maskSelection={x:l>0?r:r+l,y:j>0?q:q+j,width:i(l),height:i(j)};t.mask.updateBox(t.maskSelection);t.mask.show();t.maskSprite.setAttributes({hidden:true},true)}else{if(n=="horizontal"){k=["M",r,g,"L",r,j]}else{if(n=="vertical"){k=["M",h,q,"L",l,q]}else{k=["M",r,g,"L",r,j,"M",h,q,"L",l,q]}}t.maskSprite.setAttributes({path:k,fill:t.maskMouseDown?t.maskSprite.stroke:false,"stroke-width":n===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,f=c.axes,g=c.chartBBox,e=1/g.width,b=1/g.height,d={x:a.x*e,y:a.y*b,width:a.width*e,height:a.height*b};f.each(function(i){var h=i.calcEnds();if(i.position=="bottom"||i.position=="top"){var k=(h.to-h.from)*d.x+h.from,j=(h.to-h.from)*d.width+k;i.minimum=k;i.maximum=j}else{var j=(h.to-h.from)*(1-d.y)+h.from,k=j-(h.to-h.from)*d.height;i.minimum=k;i.maximum=j}});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,f,e,c,d){c=c||30;d=d||0;b.add({type:"path",path:["M",a,f,"l",c,0,"A",c*0.4,c*0.4,0,1,0,a+c*0.7,f-c*0.7,"z"],fill:"#000",stroke:"none",rotate:{degrees:22.5-d,x:a,y:f}});d=(d+90)*Math.PI/180;b.add({type:"text",x:a+c*Math.sin(d)-10,y:f+c*Math.cos(d)+5,text:e,"font-size":c*12/40,stroke:"none",fill:"#fff"})}});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.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,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+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.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.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(g){if(Ext.isArray(g)){Ext.each(g,this.addBinding,this);return}var f=g.key,h=false,d,e,b,c,a;if(Ext.isString(f)){e=[];b=f.toUpperCase();for(c=0,a=b.length;c1){for(;ca)){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.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 i=this,a=i.r/255,f=i.g/255,j=i.b/255,k=Math.max(a,f,j),d=Math.min(a,f,j),m=k-d,e,n=0,c=0.5*(k+d);if(d!=k){n=(c<0.5)?m/(k+d):m/(2-k-d);if(a==k){e=60*(f-j)/m}else{if(f==k){e=120+60*(j-a)/m}else{e=240+60*(a-f)/m}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,n,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 f=this,c=Math.round,e=c(f.r).toString(16),d=c(f.g).toString(16),a=c(f.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 f=parseInt(e[2],10),d=parseInt(e[3],10),a=parseInt(e[4],10),c=a|(d<<8)|(f<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return""}},fromString:function(h){var c,e,d,a,f=parseInt;if((h.length==4||h.length==7)&&h.substr(0,1)==="#"){c=h.match(this.hexRe);if(c){e=f(c[1],16)>>0;d=f(c[2],16)>>0;a=f(c[3],16)>>0;if(h.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=h.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(f,n,d){var a,b,c,e,j=[],k=Math.abs,g=Math.floor;if(n==0||f==null){j=[d,d,d]}else{f/=60;a=n*(1-k(2*d-1));b=a*(1-k(f-2*g(f/2)-1));c=d-a/2;switch(g(f)){case 0:j=[a,b,0];break;case 1:j=[b,a,0];break;case 2:j=[0,a,b];break;case 3:j=[0,b,a];break;case 4:j=[b,0,a];break;case 5:j=[a,0,b];break}j=[j[0]+c,j[1]+c,j[2]+c]}return Ext.create("Ext.draw.Color",j[0]*255,j[1]*255,j[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.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(f,e,i){var h=[],g=e.toLowerCase();i.replace(b.pathValuesRE,function(k,j){j&&h.push(+j)});if(g=="m"&&h.length>2){c.push([e].concat(Ext.Array.splice(h,0,2)));g="l";e=(e=="m")?"l":"L"}while(h.length>=d[g]){c.push([e].concat(Ext.Array.splice(h,0,d[g])));if(!d[g]){break}}})}c.toString=b.path2string;return c},mapPath:function(k,f){if(!f){return k}var g,e,c,h,a,d,b;k=this.path2curve(k);for(c=0,h=k.length;c7){g[b].shift();e=g[b];while(e.length){Ext.Array.splice(g,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(g,b,1);c=g.length}a=g[b];f=a.length;h.x=a[f-2];h.y=a[f-1];h.bx=parseFloat(a[f-4])||h.x;h.by=parseFloat(a[f-3])||h.y}return g},interpolatePaths:function(q,k){var h=this,d=h.pathToAbsolute(q),l=h.pathToAbsolute(k),m={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,r){if(p[r].length>7){p[r].shift();var s=p[r];while(s.length){Ext.Array.splice(p,r++,0,["C"].concat(Ext.Array.splice(s,0,6)))}Ext.Array.erase(p,r,1);n=Math.max(d.length,l.length||0)}},c=function(u,t,r,p,s){if(u&&t&&u[s][0]=="M"&&t[s][0]!="M"){Ext.Array.splice(t,s,0,["M",p.x,p.y]);r.bx=0;r.by=0;r.x=u[s][1];r.y=u[s][2];n=Math.max(d.length,l.length||0)}};for(var g=0,n=Math.max(d.length,l.length||0);g1){ab=W(ab);I=ab*I;G=ab*G}d=I*I;S=G*G;V=(n==g?-1:1)*W(v((d*S-d*O*O-S*P*P)/(d*O*O+S*P*P)));D=V*I*O/G+(u+s)/2;C=V*-G*P/I+(ag+af)/2;m=o(((ag-C)/G).toFixed(7));l=o(((af-C)/G).toFixed(7));m=ul){m=m-e*2}if(!g&&l>m){l=l-e*2}}else{m=B[0];l=B[1];D=B[2];C=B[3]}r=l-m;if(v(r)>F){E=l;H=s;p=af;l=m+F*(g&&l>m?1:-1);s=D+I*U(l);af=C+G*a(l);N=w.arc2curve(s,af,I,G,A,0,g,H,p,[l,E,D,C])}r=l-m;j=U(m);ae=a(m);f=U(l);ad=a(l);Q=K.tan(r/4);T=4/3*I*Q;R=4/3*G*Q;ac=[u,ag];aa=[u+T*ae,ag-R*j];Z=[s+T*ad,af-R*f];X=[s,af];aa[0]=2*ac[0]-aa[0];aa[1]=2*ac[1]-aa[1];if(B){return[aa,Z,X].concat(N)}else{N=[aa,Z,X].concat(N).join().split(",");M=[];L=N.length;for(Y=0;Y(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(m,l,f,d){var c=[],b=f[0]-d[0],a=f[1]-d[1],j=m[0]-l[0],h=m[1]-l[1],k=f[0]*d[1]-f[1]*d[0],i=m[0]*l[1]-m[1]*l[0],g=1/(b*h-a*j);c[0]=(k*j-i*b)*g;c[1]=(k*h-i*a)*g;return c},intersect:function(n,c){var m=this,h=0,l=c.length,g=c[l-1],p=n,f,q,k,o,a,b,d;for(;h1000000000000){j=0.5}if(Math.abs(i)>1000000000000){i=0.5}if(j>0&&j<1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,j);p.push(e.x);m.push(e.y)}if(i>0&&i<1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,i);p.push(e.x);m.push(e.y)}q=(r-2*g+d)-(l-2*r+g);n=2*(g-d)-2*(r-g);k=d-g;j=(-n+Math.sqrt(n*n-4*q*k))/2/q;i=(-n-Math.sqrt(n*n-4*q*k))/2/q;if(Math.abs(j)>1000000000000){j=0.5}if(Math.abs(i)>1000000000000){i=0.5}if(j>0&&j<1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,j);p.push(e.x);m.push(e.y)}if(i>0&&i<1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,i);p.push(e.x);m.push(e.y)}return{min:{x:Math.min.apply(0,p),y:Math.min.apply(0,m)},max:{x:Math.max.apply(0,p),y:Math.max.apply(0,m)}}},getAnchors:function(e,d,j,i,u,t,p){p=p||4;var h=Math,o=h.PI,q=o/2,l=h.abs,a=h.sin,b=h.cos,f=h.atan,s,r,g,k,n,m,w,v,c;s=(j-e)/p;r=(u-j)/p;if((i>=d&&i>=t)||(i<=d&&i<=t)){g=k=q}else{g=f((j-e)/l(i-d));if(dq){c-=o}g+=c;k+=c;n=j-s*a(g);m=i+s*b(g);w=j+r*a(k);v=i+r*b(k);if((i>d&&md)){n+=l(d-m)*(n-j)/(m-i);m=d}if((i>t&&vt)){w-=l(t-v)*(w-j)/(v-i);v=t}return{x1:n,y1:m,x2:w,y2:v}},smooth:function(a,q){var p=this.path2curve(a),e=[p[0]],h=p[0][1],g=p[0][2],r,t,u=1,k=p.length,f=1,m=h,l=g,c=0,b=0;for(;u=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(j){var e=this,f=j.type||"linear",c=j.angle||0,h=e.radian,k=j.stops,a=[],i,b,g,d;if(f=="linear"){b=[0,0,Math.cos(c*h),Math.sin(c*h)];g=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=g;b[3]*=g;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(i in k){if(k.hasOwnProperty(i)&&e.stopsRE.test(i)){d={offset:parseInt(i,10),color:Ext.draw.Color.toHex(k[i].color)||"#ffffff",opacity:k[i].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(f=="linear"){return{id:j.id,type:f,vector:b,stops:a}}else{return{id:j.id,type:f,centerX:j.centerX,centerY:j.centerY,focalX:j.focalX,focalY:j.focalY,radius:j.radius,vector:b,stops:a}}}});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.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.util.Memento",function(){function d(g,f,h){g[h]=f[h]}function c(g,f,h){delete g[h]}function e(h,g,i){var f=h[i];if(f||h.hasOwnProperty(i)){a(g,i,f)}}function a(g,h,f){if(Ext.isDefined(f)){g[h]=f}else{delete g[h]}}function b(f,i,h,g){if(i){if(Ext.isArray(g)){Ext.each(g,function(j){f(i,h,j)})}else{f(i,h,g)}}}return{data:null,target:null,constructor:function(g,f){if(g){this.target=g;if(f){this.capture(f)}}},capture:function(f,g){b(d,this.data||(this.data={}),g||this.target,f)},remove:function(f){b(c,this.data,null,f)},restore:function(g,f,h){b(e,this.data,h||this.target,g);if(f!==false){this.remove(g)}},restoreAll:function(f,i){var h=this,g=i||this.target;Ext.Object.each(h.data,function(k,j){a(g,k,j)});if(f!==false){delete h.data}}}}());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,f){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return f}e.translateBy(f[0]-b[0],f[1]-b[1]);if(e.right>a.right){f[0]+=d=(a.right-e.right);e.left+=d}if(e.lefta.bottom){f[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top";for(;q\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:l},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:m},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:k},{re:/^(?:\{([^\}]+)\})/,method:j}];g.Query=Ext.extend(Object,{constructor:function(n){n=n||{};Ext.apply(this,n)},execute:function(o){var q=this.operations,r=0,s=q.length,p,n;if(!o){n=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(o)){n=o}}for(;r1){for(q=0,r=s.length;q1){r=q.length;for(p=0;p=this.getMaxScrollPosition()},scrollTo:function(a,b){var f=this,e=f.layout,d=f.getScrollPosition(),c=Ext.Number.constrain(a,0,f.getMaxScrollPosition());if(c!=d&&!f.scrolling){if(b==undefined){b=f.animateScroll}e.innerCt.scrollTo(e.parallelBefore,c,b?f.getScrollAnim():false);if(b){f.scrolling=true}else{f.scrolling=false;f.updateScrollButtons()}f.fireEvent("scroll",f,c,b?f.getScrollAnim():false)}},scrollToItem:function(g,b){var f=this,e=f.layout,a,d,c;g=f.getItem(g);if(g!=undefined){a=this.getItemVisibility(g);if(!a.fullyVisible){d=g.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(f){var e=this,d=e.getItem(f).getBox(true,true),c=e.layout,b=d[c.parallelPosition],g=b+d[c.parallelPrefix],h=e.getScrollPosition(),a=h+c.innerCt["get"+c.parallelPrefixCap]();return{hiddenStart:ba,fullyVisible:b>h&&g]+>/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.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(n,d,b,m,l,h){var i=3*d,k=3*(m-d)-i,a=1-i-k,g=3*b,j=3*(l-b)-g,o=1-g-j;function f(p){return((a*p+k)*p+i)*p}function c(p,r){var q=e(p,r);return((o*q+j)*q+g)*q}function e(p,w){var v,u,s,q,t,r;for(s=p,r=0;r<8;r++){q=f(s)-p;if(Math.abs(q)u){return u}while(vq){v=s}else{u=s}s=(u-v)/2+v}return s}return c(n,1/(200*h))},cubicBezier:function(b,e,a,c){var d=function(f){return Ext.fx.CubicBezier.cubicBezierAtTime(f,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.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(i,c,a,f,h){a=(typeof a=="number")?a:1;var g=this.unitRE,d=g.exec(i),b,e;if(d){i=d[1];e=d[2];if(!this.scrollRE.test(h)&&!e&&this.pixelDefaultsRE.test(h)){e="px"}}i=+i||0;d=g.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(f!=null)?f:i;return{from:i,delta:(c-b)*a,units:e}},get:function(n,b,a,m,h){var l=n.length,d=[],e,g,k,c,f;for(e=0;e=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(;b0;){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.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.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,f){var e=this,d=a.length,b=0,c;for(;b=8){h=new XDomainRequest()}else{h=this.getXhrInstance()}b=j.async!==false?(j.async||f.async):false;if(e){h.open(c.method,c.url,b,e,g)}else{h.open(c.method,c.url,b)}if(j.withCredentials===true||f.withCredentials===true){h.withCredentials=true}a=f.setupHeaders(h,j,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:h,headers:a,options:j,async:b,timeout:setTimeout(function(){d.timedout=true;f.abort(d)},j.timeout||f.timeout)};f.requests[d.id]=d;f.latestId=d.id;if(b){h.onreadystatechange=Ext.Function.bind(f.onStateChange,f,[d])}h.send(c.data);if(!b){return this.onComplete(d)}return d}else{Ext.callback(j.callback,j.scope,[j,undefined,undefined]);return null}},upload:function(d,b,h,j){d=Ext.getDom(d);j=j||{};var c=Ext.id(),f=document.createElement("iframe"),i=[],g="multipart/form-data",e={target:d.target,method:d.method,encoding:d.encoding,enctype:d.enctype,action:d.action},a;Ext.fly(f).set({id:c,name:c,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(f);if(document.frames){document.frames[c].name=c}Ext.fly(d).set({target:c,method:"POST",enctype:g,encoding:g,action:b||e.action});if(h){Ext.iterate(Ext.Object.fromQueryString(h),function(k,l){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:l,name:k});d.appendChild(a);i.push(a)})}Ext.fly(f).on("load",Ext.Function.bind(this.onUploadComplete,this,[f,j]),null,{single:true});d.submit();Ext.fly(d).set(e);Ext.each(i,function(k){Ext.removeNode(k)})},onUploadComplete:function(h,b){var c=this,a={responseText:"",responseXML:null},g,f;try{g=h.contentWindow.document||h.contentDocument||window.frames[h.id].document;if(g){if(g.body){if(/textarea/i.test((f=g.body.firstChild||{}).tagName)){a.responseText=f.value}else{a.responseText=g.body.innerHTML}}a.responseXML=g.XMLDocument||g}}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(h)},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(k,j){var h=this,e=k.params||{},g=h.extraParams,d=k.urlParams,c=k.url||h.url,i=k.jsonData,b,a,f;if(Ext.isFunction(e)){e=e.call(j,k)}if(Ext.isFunction(c)){c=c.call(j,k)}c=this.setupUrl(k,c);f=k.rawData||k.xmlData||i||null;if(i&&!Ext.isPrimitive(i)){f=Ext.encode(f)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(g)){g=Ext.Object.toQueryString(g)}e=e+((g)?((e)?"&":"")+g:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(k,e);b=(k.method||h.method||((e||f)?"POST":"GET")).toUpperCase();this.setupMethod(k,b);a=k.disableCaching!==false?(k.disableCaching||h.disableCaching):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(k.disableCachingParam||h.disableCachingParam)+"="+(new Date().getTime()))}if((b=="GET"||f)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:f||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(l,m,d,c){var h=this,b=Ext.apply({},m.headers||{},h.defaultHeaders||{}),k=h.defaultPostHeader,i=m.jsonData,a=m.xmlData,j,f;if(!b["Content-Type"]&&(d||c)){if(d){if(m.rawData){k="text/plain"}else{if(a&&Ext.isDefined(a)){k="text/xml"}else{if(i&&Ext.isDefined(i)){k="application/json"}}}}b["Content-Type"]=k}if(h.useDefaultXhrHeader&&!b["X-Requested-With"]){b["X-Requested-With"]=h.defaultXhrHeader}try{for(j in b){if(b.hasOwnProperty(j)){f=b[j];l.setRequestHeader(j,f)}}}catch(g){h.fireEvent("exception",j,f)}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,f;for(;c=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 h=c.xhr,a={},i=h.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=i.length,j,e,g,f,b;while(d--){j=i[d];e=j.indexOf(":");if(e>=0){g=j.substr(0,e).toLowerCase();if(j.charAt(e+1)==" "){++e}a[g]=j.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:h.status,statusText:h.statusText,getResponseHeader:function(k){return a[k.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:h.responseText,responseXML:h.responseXML};h=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.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(g,f){return a*b.call(c,g,f)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,f=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){f=a(f);e=a(e)}return f>e?1:(f
',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.fx.target.Target",{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});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(f){var d=this,c=/^(a|n|d|b|s|o|e)\:(.*)$/,e=c.exec(unescape(f)),b,a,f,g;if(!e||!e[1]){return}a=e[1];f=e[2];switch(a){case"e":return null;case"n":return parseFloat(f);case"d":return new Date(Date.parse(f));case"b":return(f=="1");case"a":b=[];if(f!=""){Ext.each(f.split("^"),function(h){b.push(d.decodeValue(h))},d)}return b;case"o":b={};if(f!=""){Ext.each(f.split("^"),function(h){g=h.split("=");b[g[0]]=d.decodeValue(g[1])},d)}return b;default:return f}},encodeValue:function(e){var f="",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'],renderSelectors:{body:"canvas"},listeners:{afterrender:a.onTooltipRender,show:a.renderPreview,scope:a}})}}}}],listeners:{beforedestroy:function(){a.tip=a.ctx=a.videoEl=null}}})}b.show();if(a.tip){a.tip.setTarget(b.taskButton.el)}return b},onTooltipRender:function(c){var a=c.body.dom,b=this;b.ctx=a.getContext&&a.getContext("2d")},renderPreview:function(){var a=this;if((a.tip&&!a.tip.isVisible())||!a.videoEl){return}if(a.ctx){try{a.ctx.drawImage(a.videoEl,0,0,a.tipWidth,a.tipHeight)}catch(b){}}Ext.Function.defer(a.renderPreview,20,a)}}); +/* +* Ext JS Library 4.0 +* Copyright(c) 2006-2011 Sencha Inc. +* licensing@sencha.com +* http://www.sencha.com/license +*/ +var windowIndex=0;Ext.define("MyDesktop.BogusModule",{extend:"Ext.ux.desktop.Module",init:function(){this.launcher={text:"Window "+(++windowIndex),iconCls:"bogus",handler:this.createWindow,scope:this,windowId:windowIndex}},createWindow:function(b){var c=this.app.getDesktop();var a=c.getWindow("bogus"+b.windowId);if(!a){a=c.createWindow({id:"bogus"+b.windowId,title:b.text,width:640,height:480,html:"

Something useful would be in here.

",iconCls:"bogus",animCollapse:false,constrainHeader:true})}a.show();return a}}); +/* +* Ext JS Library 4.0 +* Copyright(c) 2006-2011 Sencha Inc. +* licensing@sencha.com +* http://www.sencha.com/license +*/ +Ext.define("MyDesktop.BogusMenuModule",{extend:"MyDesktop.BogusModule",init:function(){this.launcher={text:"More items",iconCls:"bogus",handler:function(){return false},menu:{items:[]}};for(var a=0;a<5;++a){this.launcher.menu.items.push({text:"Window "+(++windowIndex),iconCls:"bogus",handler:this.createWindow,scope:this,windowId:windowIndex})}}});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 n=this,K=n.chart,w=K.gradients,q=n.items,G=K.animate,z=n.label,t=z.display,u=z.color,d=[].concat(z.field),p=n.labelsGroup,h=(p||0)&&p.length,b=n.chart.store,o=b.getCount(),g=(q||0)&&q.length,C=g/o,y=(w||0)&&w.length,l=Ext.draw.Color,J=[],m,I,D,c,x,H,F,e,f,s,v,E,L,r,M,B,A,a;if(t=="none"){return}if(g==0){while(h--){J.push(h)}}else{for(I=0,D=0,c=0;I1){if(d[H]){J.push(c)}x++}if(!v&&E){E.hide(true);c++}if(v&&d[H]){if(!E){E=n.onCreateLabel(L,v,I,t,H,x)}n.onPlaceLabel(E,L,v,I,t,G,H,x);c++;if(z.contrast&&v.sprite){r=v.sprite;if(r._endStyle){a=r._endStyle.fill}else{if(r._to){a=r._to.fill}else{a=r.attr.fill}}a=a||r.attr.fill;M=l.fromString(a);if(a&&!M){a=a.match(n.colorStringRe)[1];for(F=0;F0.5?0.2:0.8;E.setAttributes({fill:String(l.fromHSL.apply({},A))},true)}}D++;x++}}}n.hideLabels(J)},hideLabels:function(b){var a=this.labelsGroup,c=b.length;while(c--){a.getAt(b[c]).hide(true)}}});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 j=0,g,a,h,o,p,e,m,n,k=[],d,f;if(c.baseColor){d=Ext.draw.Color.fromString(c.baseColor);f=d.getHSL()[2];if(f<0.15){d=d.getLighter(0.3)}else{if(f<0.3){d=d.getLighter(0.15)}else{if(f>0.85){d=d.getDarker(0.3)}else{if(f>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();p=b.markerThemes;o=b.seriesThemes;g=a.length;b.colors=a;for(;j=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(g){var f=this,d=Math.max(f.y,g.y),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.x,g.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(g){var f=this,d=Math.min(f.y,g.y),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.x,g.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,f,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=f;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(athis.right)},isOutOfBoundY:function(a){return(athis.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.XTemplate",{extend:"Ext.Template",argsRe:/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,nameRe:/^]*?for="(.*?)"/,ifRe:/^]*?if="(.*?)"/,execRe:/^]*?exec="(.*?)"/,constructor:function(){this.callParent(arguments);var x=this,h=x.html,u=x.argsRe,c=x.nameRe,s=x.ifRe,w=x.execRe,o=0,j=[],n="values",v="parent",k="xindex",l="xcount",d="return ",b="with(values){ ",p,f,t,a,e,g,q,y,r;h=["",h,""].join("");while((p=h.match(u))){e=null;g=null;q=null;f=p[0].match(c);t=p[0].match(s);a=p[0].match(w);e=t?t[1]:null;if(e){g=Ext.functionFactory(n,v,k,l,b+"try{"+d+Ext.String.htmlDecode(e)+";}catch(e){return;}}")}e=a?a[1]:null;if(e){q=Ext.functionFactory(n,v,k,l,b+Ext.String.htmlDecode(e)+";}")}y=f?f[1]:null;if(y){if(y==="."){y=n}else{if(y===".."){y=v}}y=Ext.functionFactory(n,v,"try{"+b+d+y+";}}catch(e){return;}")}j.push({id:o,target:y,exec:q,test:g,body:p[1]||""});h=h.replace(p[0],"{xtpl"+o+"}");o=o+1}for(r=j.length-1;r>=0;--r){x.compileTpl(j[r])}x.master=j[j.length-1];x.tpls=j},applySubTemplate:function(g,a,c,e,f){var d=this,b=d.tpls[g];return b.compiled.call(d,a,c,e,f)},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','","",'','','',{compiled:true,disableFormats:true}],activeErrorsTpl:['','
    class="last">{.}
',"
"],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,f=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?f+" "+d:f,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.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.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(f){var d=f.length,h=[],g=0,j,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(;g=d){g=0}else{if(g<0){g=d-1}}j=f[g];if(b.is(j,":focusable")){return[j]}else{if(j.placeholder&&b.is(j.placeholder,":focusable")){return[j.placeholder]}}}return[]},prevFocus:function(d,c){return this.nextFocus(d,c,-1)},root:function(e){var d=e.length,g=[],f=0,h;for(;fe.el.getZIndex()});return d.concat(b)},initDOM:function(b){var c=this,d=" ",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,f,c;if(!a){f=b.getRootComponents();if(f.length){f[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(h,b,m){var i=this,a=b||i,n=h.getKey(),f=Ext.EventObject,j=h.shiftKey||n==f.LEFT||n==f.UP,c=n==f.LEFT||n==f.RIGHT||n==f.UP||n==f.DOWN,g=j?"prev":"next",l,d,k;k=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!k&&!m){return}if(c&&i.isWhitelisted(k)){return true}m=m||k.up();if(m){l=k?Ext.Array.indexOf(m.getRefItems(),k):-1;d=Ext.ComponentQuery.query(">:"+g+"Focus("+l+")",m)[0];if(d&&k!==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(n,k){var l=this,a=l.focusChain;if(!Ext.ComponentQuery.is(n,":focusable")){l.clearComponent(n);if(a[n.id]){return}var p=n.up();if(p){a[n.id]=true;p.focus()}return}l.focusChain={};clearTimeout(l.cmpFocusDelay);if(arguments.length!==2){l.cmpFocusDelay=Ext.defer(l.onComponentFocus,90,l,[n,k]);return}if(l.fireEvent("beforecomponentfocus",l,n,l.previousFocusedCmp)===false){l.clearComponent(n);return}l.focusedCmp=n;if(l.shouldShowFocusFrame(n)){var r="."+l.focusFrameCls+"-",b=l.focusFrame,f=l.focusFrameWidth,i=n.el.getPageBox(),q=i.top,c=i.left,m=i.width,g=i.height,h=b.child(r+"top"),d=b.child(r+"bottom"),o=b.child(r+"left"),j=b.child(r+"right");h.setWidth(m).setLeftTop(c,q);d.setWidth(m).setLeftTop(c,q+g-f);o.setHeight(g-f-f).setLeftTop(c,q+f);j.setHeight(g-f-f).setLeftTop(c+m-f,q+f);b.show()}l.fireEvent("componentfocus",l,n,l.previousFocusedCmp)},onComponentHide:function(e){var d=this,f=Ext.ComponentQuery,b=false,a,c;if(d.focusedCmp){a=f.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=f.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,h,b){var d=this,c,g,f,a=function(i){return !Ext.Array.contains(d.tabIndexWhitelist,i.tagName.toLowerCase())&&i.tabIndex<=0};b=b||{};if(!e.rendered){e.on("afterrender",Ext.pass(d.setFocus,arguments,d),d,{single:true});return}c=e.getFocusEl();g=c.dom;if((h&&!d.focusData[e.id])||(!h&&d.focusData[e.id])){if(h){f={focusFrame:b.focusFrame};if(a(g)){f.tabIndex=g.tabIndex;g.tabIndex=-1}c.on({focus:f.focusFn=Ext.bind(d.onComponentFocus,d,[e],0),blur:f.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]=f}else{f=d.focusData[e.id];if("tabIndex" in f){g.tabIndex=f.tabIndex}c.un("focus",f.focusFn,d);c.un("blur",f.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(g,c){var f=this,b=Ext.ComponentManager.all.getArray(),a=b.length,e,d=0;for(;d"),b);f.setFocus(h,true,c);h.on("add",g.onAdd,f)}else{if(!h.isContainer){f.setFocus(h,true,c)}}};if(!a||!a.isContainer){return}if(!a.rendered){a.on("afterrender",Ext.pass(f.subscribe,arguments,f),f,{single:true});return}f.initDOM(c);g.keyNav=f.setupSubscriberKeys(a,c.keys);g.onAdd=function(i,j,h){b(j)};a.on("beforedestroy",f.unsubscribe,f);b(a);d.add(a.id,g)},unsubscribe:function(a){var e=this,d=Ext.Array,c=e.subscribers,f,b=function(g){if(g.isContainer&&!c.containsKey(g.id)){d.forEach(g.query(">"),b);e.setFocus(g,false);g.un("add",f.onAdd,e)}else{if(!g.isContainer){e.setFocus(g,false)}}};if(!a||!c.containsKey(a.id)){return}f=c.get(a.id);f.keyNav.destroy();a.un("beforedestroy",e.unsubscribe,e);c.removeAtKey(a.id);b(a);e.removeDOM()}});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,j,k,h){this.callParent(arguments);var g=this,c=g.owner,d=c.ownerCt,f=c.layout,e=c.isVisible(true),a=c.el.child,i;g.previousComponentSize=g.lastComponentSize;if(!k&&((!Ext.isNumber(b)&&c.isFixedWidth())||(!Ext.isNumber(j)&&c.isFixedHeight()))&&h&&h!==d){g.doContainerLayout();return false}if(!e&&(c.hiddenAncestor||c.floating)){if(c.hiddenAncestor){i=c.hiddenAncestor.layoutOnShow;i.remove(c);i.add(c)}c.needsLayout={width:b,height:j,isSetSize:false}}if(e&&this.needsLayout(b,j)){return c.beforeComponentLayout(b,j,k,h)}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 g=e.getTargetInfo(),f=g.padding,c=g.border,b=e.frameSize;e.setElementSize(e.owner.frameBody,Ext.isNumber(d)?(d-b.left-b.right-f.left-f.right-c.left-c.right):d,Ext.isNumber(a)?(a-b.top-b.bottom-f.top-f.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,h,d=this.lastComponentSize,g=this.previousComponentSize,a=(g&&d&&Ext.isNumber(d.width))?d.width!==g.width:true,f=(g&&d&&Ext.isNumber(d.height))?d.height!==g.height:true;if(!e||(!a&&!f)){return}c=e.componentLayout;h=e.layout;if(!b.floating&&c&&c.monitorChildren&&!c.layoutBusy){if(!e.suspendLayout&&h&&!h.layoutBusy){if(((a&&!e.isFixedWidth())||(f&&!e.isFixedHeight()))){this.isSizing=true;e.doComponentLayout();this.isSizing=false}else{if(h.bindToOwnerCtContainer===true){h.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.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,n){var k=this,g=Ext.isNumber,d=k.owner,m=d.el,h=d.btnEl,e=d.btnInnerEl,f=d.btnIconEl,i=(d.icon||d.iconCls)&&(d.iconAlign=="top"||d.iconAlign=="bottom"),b=d.minWidth,l=d.maxWidth,a,o,j;k.getTargetInfo();k.callParent(arguments);e.unclip();k.setTargetSize(c,n);if(!g(c)){if(d.text&&(Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&h&&h.getWidth()>20){o=k.btnFrameWidth;j=Ext.util.TextMetrics.measure(e,d.text);m.setWidth(j.width+o+k.adjWidth);h.setWidth(j.width+o);e.setWidth(j.width+o);if(i){f.setWidth(j.width+o)}}else{m.setWidth(null);h.setWidth(null);e.setWidth(null);f.setWidth(null)}if(b||l){a=m.getWidth();if(b&&(al)){e.clip();k.setTargetSize(l,n)}}}}this.lastText=d.text},setTargetSize:function(a,k){var g=this,b=g.owner,e=Ext.isNumber,d=b.btnInnerEl,i=(e(a)?a-g.adjWidth:a),f=(e(k)?k-g.adjHeight:k),c=g.btnFrameHeight,j=b.getText(),h;g.callParent(arguments);g.setElementSize(b.btnEl,i,f);g.setElementSize(d,i,f);if(f>=0){d.setStyle("line-height",f-c+"px")}if(j&&this.htmlRE.test(j)){d.setStyle("line-height","normal");h=Ext.util.TextMetrics.measure(d,j).height;d.setStyle("padding-top",g.btnFrameTop+Math.max(d.getHeight()-c-h,0)/2+"px");g.setElementSize(d,i,f)}},getTargetInfo:function(){var e=this,a=e.owner,d=a.el,c=e.frameSize,g=a.frameBody,b=a.btnWrap,f=a.btnInnerEl;if(!("adjWidth" in e)){Ext.apply(e,{adjWidth:c.left+c.right+d.getBorderWidth("lr")+d.getPadding("lr")+b.getPadding("lr")+(g?g.getFrameWidth("lr"):0),adjHeight:c.top+c.bottom+d.getBorderWidth("tb")+d.getPadding("tb")+b.getPadding("tb")+(g?g.getFrameWidth("tb"):0),btnFrameWidth:f.getFrameWidth("lr"),btnFrameHeight:f.getFrameWidth("tb"),btnFrameTop:f.getFrameWidth("t")})}return e.callParent()}});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.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,l){var f=this,b=f.owner,e=f.getLabelStrategy(),k=f.getErrorStrategy(),i=Ext.isDefined,m=Ext.isNumber,h,g,j,c,d;h=f.lastComponentSize||{};if(!i(a)){a=h.width;if(a<0){a=d}}if(!i(l)){l=h.height;if(l<0){l=d}}g=!m(a);j=!m(l);c={autoWidth:g,autoHeight:j,width:g?b.getBodyNaturalWidth():a,height:l,setOuterWidth:false,insets:{top:0,right:0,bottom:0,left:0}};e.prepare(b,c);k.prepare(b,c);e.adjustHorizInsets(b,c);k.adjustHorizInsets(b,c);e.layoutHoriz(b,c);k.layoutHoriz(b,c);e.adjustVertInsets(b,c);k.adjustVertInsets(b,c);e.layoutVert(b,c);k.layoutVert(b,c);if(g&&j){f.setElementSize(b.el,(c.setOuterWidth?c.width:d),c.height)}else{f.setTargetSize((!g||c.setOuterWidth?c.width:d),c.height)}f.sizeBody(c);f.activeError=b.getActiveError()},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},sizeBody:function(h){var g=this,c=g.owner,d=h.insets,b=h.width,e=h.height,f=Ext.isNumber(b)?b-d.left-d.right:b,a=Ext.isNumber(e)?e-d.top-d.bottom:e;g.setElementSize(c.bodyEl,f,a);g.sizeBodyContents(f,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,h){var f=e.labelCls+"-"+e.labelAlign,g=e.labelEl;if(g&&!g.hasCls(f)){g.addCls(f)}},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a},d=b({prepare:function(e,f){c.prepare(e,f);if(f.autoWidth){f.width+=(!e.labelEl?0:e.labelWidth+e.labelPad)}f.setOuterWidth=true},adjustHorizInsets:function(e,f){if(e.labelEl){f.insets.left+=e.labelWidth+e.labelPad}},layoutHoriz:function(e,g){var f=e.labelEl;if(f&&!e.isLabelSized&&!Ext.isBorderBox){f.setWidth(e.labelWidth);e.isLabelSized=true}}},c);return{base:c,top:b({adjustVertInsets:function(e,g){var f=e.labelEl;if(f){g.insets.top+=Ext.util.TextMetrics.measure(f,e.fieldLabel,g.width).height+f.getFrameWidth("tb")+e.labelPad}}},c),left:d,right:d}})(),errorStrategies:(function(){function d(h,g){var i=h.getStyle("display")!=="none";if(g!==i){h.setDisplayed(g)}}function f(h,g,i){if(h.getStyle(g)!==i){h.setStyle(g,i)}}function c(g){var h=Ext.layout.component.field.Field.tip,i;if(h&&h.isVisible()){i=h.activeTarget;if(i&&i.el===g.getActionEl().dom){h.toFront(true)}}}var b=Ext.applyIf,a=Ext.emptyFn,e={prepare:function(g){d(g.errorEl,false)},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a,onFocus:a};return{none:e,side:b({prepare:function(g){var h=g.errorEl;h.addCls(Ext.baseCSSPrefix+"form-invalid-icon");Ext.layout.component.field.Field.initTip();h.dom.setAttribute("data-errorqtip",g.getActiveError()||"");d(h,g.hasActiveError())},adjustHorizInsets:function(g,h){if(g.autoFitErrors&&g.hasActiveError()){h.insets.right+=g.errorEl.getWidth()}},layoutHoriz:function(g,h){if(g.hasActiveError()){f(g.errorEl,"left",h.width-h.insets.right+"px")}},layoutVert:function(g,h){if(g.hasActiveError()){f(g.errorEl,"top",h.insets.top+"px")}},onFocus:c},e),under:b({prepare:function(g){var i=g.errorEl,h=Ext.baseCSSPrefix+"form-invalid-under";if(!i.hasCls(h)){i.addCls(h)}d(i,g.hasActiveError())},adjustVertInsets:function(g,h){if(g.autoFitErrors){h.insets.bottom+=g.errorEl.getHeight()}},layoutHoriz:function(g,i){var j=g.errorEl,h=i.insets;f(j,"width",i.width-h.right-h.left+"px");f(j,"marginLeft",h.left+"px")}},e),qtip:b({prepare:function(g){d(g.errorEl,false);Ext.layout.component.field.Field.initTip();g.getActionEl().dom.setAttribute("data-errorqtip",g.getActiveError()||"")},onFocus:c},e),title:b({prepare:function(g){d(g.errorEl,false);g.el.dom.title=g.getActiveError()||""}},e),elementId:b({prepare:function(g){d(g.errorEl,false);var h=Ext.fly(g.msgTarget);if(h){h.dom.innerHTML=g.getActiveError()||"";h.setDisplayed(g.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.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,f=a.getRawValue();this.lastValue=f;return e.callParent(arguments)||(a.grow&&f!==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 f=this,b=f.owner,h,g,d,a=[e,c];if(b.grow){h=b.inputEl;g=(h.dom.value||(b.hasFocus?"":b.emptyText)||"")+b.growAppend;d=h.getTextWidth(g)+h.getBorderWidth("lr")+h.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,j){var e=this,b=e.owner,h,g,f,d,c,i,k=[a,j];if(b.grow){h=b.inputEl;d=h.getWidth(true);c=h.getHeight();g=h.dom.value||" ";g+=b.growAppend;g=g.replace(/\n/g,"
");i=Ext.util.TextMetrics.measure(h,g,d).height+h.getBorderWidth("tb")+h.getPadding("tb");f=b.growMax;if(Ext.isNumber(j)){f=Math.min(f,j)}k[1]=Ext.Number.constrain(i,b.growMin,f)}return k}});Ext.define("Ext.layout.component.field.HtmlEditor",{extend:"Ext.layout.component.field.Field",alias:["layout.htmleditor"],type:"htmleditor",sizeBodyContents:function(a,h){var e=this,b=e.owner,i=b.bodyEl,f=b.getToolbar(),g=b.textareaEl,c=b.iframeEl,d;if(Ext.isNumber(a)){a-=i.getFrameWidth("lr")}f.setWidth(a);g.setWidth(a);c.setWidth(a);if(Ext.isNumber(h)){d=h-f.getHeight()-i.getFrameWidth("tb");g.setHeight(d);c.setHeight(d)}}});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,g=e.getTarget(),a=e.getLayoutItems(),d=a.length,f=[],b,c;for(b=0;bthis.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(l,m){var o=this.dragCurrent;if(!o||o.isLocked()){return}var p=l.getPoint();var a=[];var d=[];var j=[];var g=[];var c=[];for(var f in this.dragOvers){var b=this.dragOvers[f];if(!this.isTypeOfDD(b)){continue}if(!this.isOverTarget(p,b,this.mode)){d.push(b)}a[f]=true;delete this.dragOvers[f]}for(var n in o.groups){if("string"!=typeof n){continue}for(f in this.ids[n]){var h=this.ids[n][f];if(!this.isTypeOfDD(h)){continue}if(h.isTarget&&!h.isLocked()&&((h!=o)||(o.ignoreSelf===false))){if(this.isOverTarget(p,h,this.mode)){if(m){g.push(h)}else{if(!a[h.id]){c.push(h)}else{j.push(h)}this.dragOvers[h.id]=h}}}}}if(this.mode){if(d.length){o.b4DragOut(l,d);o.onDragOut(l,d)}if(c.length){o.onDragEnter(l,c)}if(j.length){o.b4DragOver(l,j);o.onDragOver(l,j)}if(g.length){o.b4DragDrop(l,g);o.onDragDrop(l,g)}}else{var k=0;for(f=0,k=d.length;f2000){}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.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.data.NodeInterface",{requires:["Ext.data.Field"],statics:{decorate:function(c){if(!c.isNode){var h=Ext.ModelManager,e=c.modelName,g=h.getModel(e),j=g.prototype.idProperty,f=[],b,a,d;g.override(this.getPrototypeBody());f=this.applyFields(g,[{name:j,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=f.length;for(b=0;b0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,j,h){var f=this,c,e,d,g,a;if(Ext.isArray(b)){for(c=0,e=b.length;c0){Ext.Array.sort(d,f);for(c=0;c1||Ext.isArray(f)){b=arguments.length>1?arguments:f;for(a=b.length;d=d.length){return d.add(c,f)}d.length++;Ext.Array.splice(d.items,a,0,f);if(typeof c!="undefined"&&c!==null){d.map[c]=f}Ext.Array.splice(d.keys,a,0,c);d.fireEvent("add",a,f,c);return f},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=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(g,b,h,a){var c=this.extractValues(g,b),f=c.length,e=0,d;h=h||0;a=(a||a===0)?a:f-1;for(d=h;d<=a;d++){e+=c[d]}return e},collect:function(j,e,g){var k=this.extractValues(j,e),a=k.length,b={},c=[],h,f,d;for(d=0;d=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,f,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create("Ext.util.Filter",{property:d,value:c,anyMatch:f,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(g){var m=true,n=b.length,h;for(h=0;he?1:(f0){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,f=e.active,d=f.last(),c=e.attached,b=a.getEl(),g;e.lastShow=new Date();f.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(f){var b=this,d=b.active,a=b.lastShow,c=f.target;if(Ext.Date.getElapsed(a)>50&&d.length>0&&!f.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,f){var a=this.groups,c=d.group,b=0,h,e,g;if(c&&f){h=a[c];e=h.length;for(;b0){b=c.first();c.remove(b);a.remove(b)}}c.clearListeners()}});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(r){var s=this,h=r.yFieldIndex,k=s.series,a=k.type,l=s.yFieldIndex,d=s.legend,o=s.surface,p=d.x+s.x,m=d.y+s.y,c,j=s.zIndex,b,i,q,e,n=false,g=Ext.apply(k.seriesStyle,k.style);function f(t){var u=k[t];return(Ext.isArray(u)?u[l]:u)}i=s.add("label",o.add({type:"text",x:20,y:0,zIndex:j||0,font:d.labelFont,text:f("title")||f("yField")}));if(a==="line"||a==="scatter"){if(a==="line"){s.add("line",o.add({type:"path",path:"M0.5,0.5L16.5,0.5",zIndex:j,"stroke-width":k.lineWidth,"stroke-linejoin":"round","stroke-dasharray":k.dash,stroke:g.stroke||"#000",style:{cursor:"pointer"}}))}if(k.showMarkers||a==="scatter"){b=Ext.apply(k.markerStyle,k.markerConfig||{});s.add("marker",Ext.chart.Shape[b.type](o,{fill:b.fill,x:8.5,y:0.5,zIndex:j,radius:b.radius||b.size,style:{cursor:"pointer"}}))}}else{s.add("box",o.add({type:"rect",zIndex:j,x:0,y:0,width:12,height:12,fill:k.getLegendColor(h),style:{cursor:"pointer"}}))}s.setAttributes({hidden:false},true);c=s.getBBox();q=s.add("mask",o.add({type:"rect",x:c.x,y:c.y,width:c.width||20,height:c.height||20,zIndex:(j||0)+1000,fill:"#f00",opacity:0,style:{cursor:"pointer"}}));s.on("mouseover",function(){i.setStyle({"font-weight":"bold"});q.setStyle({cursor:"pointer"});k._index=h;k.highlightItem()},s);s.on("mouseout",function(){i.setStyle({"font-weight":"normal"});k._index=h;k.unHighlightItem()},s);if(!k.visibleInLegend(h)){n=true;i.setAttributes({opacity:0.5},true)}s.on("mousedown",function(){if(!n){k.hideAll();i.setAttributes({opacity:0.5},true)}else{k.showAll();i.setAttributes({opacity:1},true)}n=!n},s);s.updatePosition({x:0,y:0})},updatePosition:function(c){var f=this,a=f.items,e=a.length,b=0,d;if(!c){c=f.legend}for(;b0){b.create=e;f=true}if(c.length>0){b.update=c;f=true}if(a.length>0){b.destroy=a;f=true}if(f&&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.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(;c1;if(a||Ext.isArray(f[0])){var g=a?f:f[0],b=[],c,e,j;for(c=0,e=g.length;cg){b=h-1}else{if(a-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,k=d.viewBox,a=d.width,g=d.height,f,e,i,b,h,c,j;if(k&&(a||g)){f=k.x;e=k.y;i=k.width;b=k.height;h=g/b;c=a/i;if(i*h0},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(),f=c.useCSS3&&d.target.type=="element",a=c.timestamp-d.startTime,e,g;this.collectTargetData(d,a,f);if(f){d.target.setAttr(c.targetData[b],true);c.targetData[b]=[];c.collectTargetData(d,d.duration,f);d.paused=true;e=d.target.target;if(d.target.isComposite){e=d.target.target.last()}g={};g[Ext.supports.CSS3TransitionEnd]=d.lastFrame;g.scope=d;g.single=true;e.on(g)}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(),f=this.targetData[b],c;if(!f){f=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));f.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(f){var j=this,m=[],k=j.to||{},c=j.duration,n,a,e,h,l,b,d,g;for(l in f){if(f.hasOwnProperty(l)&&j.animKeyFramesRE.test(l)){g={attrs:Ext.apply(f[l],k)};if(l=="from"){l=0}else{if(l=="to"){l=100}}g.pct=parseInt(l,10);m.push(g)}}Ext.Array.sort(m,j.sorter);h=m.length;for(e=0;e=d){k=d;a=true}if(h.reverse){k=d-k}for(e in j){if(j.hasOwnProperty(e)){i=j[e];g=a?1:c(k/d);f[e]=b[e].set(i,g)}}return f},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(bh){e=h}}if(e){this.callParent([e,i])}}d.setXY(j)},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.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.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,f=e.getSelection().length;e.bulkChange=true;for(;c1){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(k,e,l,c){var h=this,j=h.store,d=0,g,f,a,b=[];if(h.isLocked()){return}if(!l){h.deselectAll(true)}if(!Ext.isNumber(k)){k=j.indexOf(k)}if(!Ext.isNumber(e)){e=j.indexOf(e)}if(k>e){f=e;e=k;k=f}for(g=k;g<=e;g++){if(h.isSelected(j.getAt(g))){d++}}if(!c){a=-1}else{a=(c=="up")?k:e}for(g=k;g<=e;g++){if(d==(e-k+1)){if(g!=a){h.doDeselect(g,true)}}else{b.push(j.getAt(g))}}h.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,k,j){var g=this,b=g.selected,h=false,d=0,f,e;if(g.locked){return}a=!Ext.isArray(a)?[a]:a;f=a.length;if(!k&&b.getCount()>0){if(g.doDeselect(g.getSelection(),j)===false){return}}function c(){b.add(e);h=true}for(;d0&&!j);return f===k},doSingleSelect:function(a,b){var d=this,f=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;f=true}d.onSelectChange(a,true,b,e);if(f){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 g=this,b=[],f=g.getSelection(),a=f.length,e,h,d=0,c=this.getLastFocused();for(;d0){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.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(h,d){var g=this,i=g.getRowsVisible(),b,c,a,f;if(i){b=g.lastFocused?g.store.indexOf(g.lastFocused):0;c=b-i;if(c<0){c=0}a=g.store.getAt(c);if(h.shiftKey){f=g.store.getAt(b);g.selectRange(a,f,h.ctrlKey,"up");g.setLastFocused(a)}else{if(h.ctrlKey){h.preventDefault();g.setLastFocused(a)}else{g.doSelect(a)}}}},onKeyPageDown:function(h,b){var f=this,i=f.getRowsVisible(),a,g,d,c;if(i){a=f.lastFocused?f.store.indexOf(f.lastFocused):0;g=a+i;if(g>=f.store.getCount()){g=f.store.getCount()-1}d=f.store.getAt(g);if(h.shiftKey){c=f.store.getAt(a);f.selectRange(d,c,h.ctrlKey,"down");f.setLastFocused(d)}else{if(h.ctrlKey){h.preventDefault();f.setLastFocused(d)}else{f.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(g,d){var f=this,c=f.views[0],a=f.store.indexOf(f.lastFocused),b;if(a>0){b=f.store.getAt(a-1);if(g.shiftKey&&f.lastFocused){if(f.isSelected(f.lastFocused)&&f.isSelected(b)){f.doDeselect(f.lastFocused,true);f.setLastFocused(b)}else{if(!f.isSelected(f.lastFocused)){f.doSelect(f.lastFocused,true);f.doSelect(b,true)}else{f.doSelect(b,true)}}}else{if(g.ctrlKey){f.setLastFocused(b)}else{f.doSelect(b)}}}},onKeyDown:function(g,d){var f=this,c=f.views[0],a=f.store.indexOf(f.lastFocused),b;if(a+10){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(f,e,d){var b=this,c=b[f],a=b.initialConfig;if(b.hasOwnProperty(f)){if(!a||a[f]!==c){if(e){e[d||f]=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.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;cd){c=j.height;a=true}if(j.width&&j.width>e){k=j.width;a=true}if(a){var i=!Ext.isNumber(f.width),g=!Ext.isNumber(f.height);f.componentLayout.childrenChanged=true;f.setSize(k,c,f.ownerCt);f.el.setSize(e,d);if(i){delete f.width}if(g){delete f.height}}}return f.mixins.animate.animate.apply(f,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','
{parent.baseCls}-{parent.ui}-{.}-tl" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-tr" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-tc" style="background-position: {tc}; height: {frameWidth}px" role="presentation">
','
','
',"",'
{parent.baseCls}-{parent.ui}-{.}-ml" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-mr" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-mc" role="presentation">
','
','
','','
{parent.baseCls}-{parent.ui}-{.}-bl" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-br" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation">','
{parent.baseCls}-{parent.ui}-{.}-bc" style="background-position: {bc}; height: {frameWidth}px" role="presentation">
','
','
',"
"],frameTableTpl:["",'',"",'','','',"","","",'','','',"",'',"",'','','',"","","
{parent.baseCls}-{parent.ui}-{.}-tl" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-tc" style="background-position: {tc}; height: {frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-tr" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation">
{parent.baseCls}-{parent.ui}-{.}-ml" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-mc" style="background-position: 0 0;" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-mr" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation">
{parent.baseCls}-{parent.ui}-{.}-bl" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-bc" style="background-position: {bc}; height: {frameWidth}px" role="presentation"> {parent.baseCls}-{parent.ui}-{.}-br" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation">
"],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(f){return f.id&&e.frameIdRegex.test(f.id)});Ext.each(["TL","TC","TR","ML","MC","MR","BL","BC","BR"],function(f){e.childEls.push({name:"frame"+f,id:c+f})})}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,g=this.frameSize&&this.frameSize.table,f=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(g){e.el.query("> table")[1].remove()}else{if(f){f.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,f=c.el.getStyle("background-position-x"),e=c.el.getStyle("background-position-y"),d,b=false,a;if(!f&&!e){d=c.el.getStyle("background-position").split(" ");f=d[0];e=d[1]}if(parseInt(f,10)>=1000000&&parseInt(e,10)>=1000000){a=Math.max;b={table:f.substr(0,3)=="110",vertical:e.substr(0,3)=="110",top:a(f.substr(3,2),f.substr(5,2)),right:a(f.substr(5,2),e.substr(3,2)),bottom:a(e.substr(3,2),e.substr(5,2)),left:a(e.substr(5,2),f.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 g=this,h=e.width,i=g.dock,d,b,f,c,a;if(e.vertical){b="0 -"+(h*0)+"px";f="0 -"+(h*1)+"px";if(i&&i=="right"){b="right -"+(h*0)+"px";f="right -"+(h*1)+"px"}d={tl:"0 -"+(h*0)+"px",tr:"0 -"+(h*1)+"px",bl:"0 -"+(h*2)+"px",br:"0 -"+(h*3)+"px",ml:"-"+(h*1)+"px 0",mr:"right 0",tc:b,bc:f}}else{c="-"+(h*0)+"px 0";a="right 0";if(i&&i=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(h*2)+"px",tr:"right -"+(h*3)+"px",bl:"0 -"+(h*4)+"px",br:"right -"+(h*5)+"px",ml:c,mr:a,tc:"0 -"+(h*0)+"px",bc:"0 -"+(h*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(f){var e=this,b=Ext.Array.clone(e.uiCls),g=[],d=[],a,c;for(c=0;c=0;a--){if((f=d.getAt(a)).is(b)){return f}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(c,d){var g=this,b,f,a,e;if(d&&g.is(c)){return g}b=this.prev(c);if(b){return b}if(g.ownerCt){for(f=g.ownerCt.items.items,e=Ext.Array.indexOf(f,g)-1;e>-1;e--){if(f[e].query){b=f[e].query(c);b=b[b.length-1];if(b){return b}}}return g.ownerCt.previousNode(c,true)}},nextNode:function(c,d){var g=this,b,f,a,e;if(d&&g.is(c)){return g}b=this.next(c);if(b){return b}if(g.ownerCt){for(f=g.ownerCt.items,e=f.indexOf(g)+1,f=f.items,a=f.length;e tabIndex="{tabIndex}" role="link">{text}',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||" ",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||" ");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(g){var d=this,c=d.el,f=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=g.getX()-c.getX();a=c.getWidth()}else{b=g.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!f){d.onMenuTriggerOver(g)}}else{if(f){d.onMenuTriggerOut(g)}}}},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,f;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;f=c.btnInnerEl;d.setSize(null,null);b=f.getOffsetsTo(d);e[0]=b[1];e[1]=d.getWidth()-f.getWidth()-b[0];e[2]=d.getHeight()-f.getHeight()-b[1];e[3]=b[0];c.destroy()}}return e}},function(){var a={};function b(e,h){var f,d,c;if(h){f=a[e.toggleGroup];for(d=0,c=f.length;d',"
 
","",'
','
',"
 
","
","
"],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.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.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});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:['name="{name}" ','size="{size}" ','tabIndex="{tabIdx}" ','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(k){var f=this,j=f.callParent(arguments),a=f.validator,d=f.emptyText,c=f.allowBlank,e=f.vtype,g=Ext.form.field.VTypes,h=f.regex,i=Ext.String.format,b;k=k||f.processRawValue(f.getRawValue());if(Ext.isFunction(a)){b=a.call(f,k);if(b!==true){j.push(b)}}if(k.length<1||k===d){if(!c){j.push(f.blankText)}return j}if(k.lengthf.maxLength){j.push(i(f.maxLengthText,f.maxLength))}if(e){if(!g[e](k,f)){j.push(f.vtypeText||g[e+"Text"])}}if(h&&!h.test(k)){j.push(f.regexText||f.invalidText)}return j},selectText:function(h,a){var g=this,c=g.getRawValue(),d=true,f=g.inputEl.dom,e,b;if(c.length>0){h=h===e?0:h;a=a===e?c.length:a;if(f.setSelectionRange){f.setSelectionRange(h,a)}else{if(f.createTextRange){b=f.createTextRange();b.moveStart("character",h);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){g.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:['",{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.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,i=d.viewBox,b=d.autoSize,g,c,a,h,f,e;d.callParent(arguments);if(d.createSurface()!==false){c=d.surface.items;if(i||b){g=c.getBBox();a=g.width;h=g.height;f=g.x;e=g.y;if(d.viewBox){d.surface.setViewBox(f,e,a,h)}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.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(),g=d.getXY(),a=g[0]-b.left,f=g[1]-b.top;return[a,f]},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(h){var g=this,a=g.getEventXY(h),f,d,c,b;if(g.mask){g.mixins.mask.onMouseMove.call(g,h)}g.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){f=e.getItemForPoint(a[0],a[1]);d=e._lastItemForPoint;c=e._lastStoreItem;b=e._lastStoreField;if(f!==d||f&&(f.storeItem!=c||f.storeField!=b)){if(d){e.fireEvent("itemmouseout",d);delete e._lastItemForPoint;delete e._lastStoreField;delete e._lastStoreItem}if(f){e.fireEvent("itemmouseover",f);e._lastItemForPoint=f;e._lastStoreItem=f.storeItem;e._lastStoreField=f.storeField}}}}else{d=e._lastItemForPoint;if(d){e.fireEvent("itemmouseout",d);delete e._lastItemForPoint;delete e._lastStoreField;delete e._lastStoreItem}}},g)},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,j=e.chartBBox,i=j.width,d=j.height,g=j.x,f=j.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:i,width:d,x:g,y:f});break;case"bottom":Ext.apply(a,{length:i,width:d,x:g,y:d});break;case"left":Ext.apply(a,{length:d,width:i,x:g,y:d});break;case"right":Ext.apply(a,{length:d,width:i,x:i,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 f=this,g=f.axes,e=f.legend,b=["top","right","bottom","left"],d,c=f.insetPadding,a={top:c,right:c,bottom:c,left:c};function h(k){var j=g.findIndex("position",k);return(j<0)?null:g.getAt(j)}Ext.each(b,function(j){var l=(j==="left"||j==="right"),i=h(j),k;if(e!==false){if(e.position===j){k=e.getBBox();a[j]+=(l?k.width:k.height)+a[j]}}if(i&&i.bbox){k=i.bbox;a[j]+=(l?k.width:k.height)}});d={x:a.left,y:a.top,width:f.curWidth-a.left-a.right,height:f.curHeight-a.top-a.bottom};f.chartBBox=d;g.each(function(i){var k=i.position,j=(k==="left"||k==="right");i.x=(k==="right"?d.x+d.width:d.x);i.y=(k==="top"?d.y:d.y+d.height);i.width=(j?d.width:d.height);i.length=(j?d.height:d.width)})},initializeSeries:function(g,j){var h=this,d=h.themeAttrs,c,e,m,o,n,k=[],f=0,b,a={chart:h,seriesId:g.seriesId};if(d){m=d.seriesThemes;n=d.markerThemes;c=Ext.apply({},d.series);e=Ext.apply({},d.marker);a.seriesStyle=Ext.apply(c,m[j%m.length]);a.seriesLabelStyle=Ext.apply({},d.seriesLabel);a.markerStyle=Ext.apply(e,n[j%n.length]);if(d.colors){a.colorArrayStyle=d.colors}else{k=[];for(b=m.length;f0)]+=c.abs(e)}o=t(o,-a[0],+a[1]);m=q(m,-a[0],+a[1])}else{for(p=0;p=g-B-w){o.push("M",q,Math.floor(p)+0.5,"l",e*2+1,0);if(p!=g-B){for(u=1;u4){g=g.substr(0,g.length-4)+"...";d.setAttributes({text:g},true);f=d.getBBox();if(f.width=0){if(!this.sprites){for(e=0;e<=k;e++){m=a.add({type:"path",path:["M",d+(l-c)*n(e/k*f-f),b+(l-c)*j(e/k*f-f),"L",d+l*n(e/k*f-f),b+l*j(e/k*f-f),"Z"],stroke:"#ccc"});m.setAttributes({hidden:false},true);g.push(m)}}else{g=this.sprites;for(e=0;e<=k;e++){g[e].setAttributes({path:["M",d+(l-c)*n(e/k*f-f),b+(l-c)*j(e/k*f-f),"L",d+l*n(e/k*f-f),b+l*j(e/k*f-f),"Z"],stroke:"#ccc"},true)}}}this.sprites=g;this.drawLabel();if(this.title){this.drawTitle()}},drawTitle:function(){var e=this,d=e.chart,a=d.surface,f=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:f.x+(f.width/2)-(b.width/2),y:f.y+f.height-(b.height/2)-4},true)},setTitle:function(a){this.title=a;this.drawTitle()},drawLabel:function(){var j=this.chart,n=j.surface,b=j.chartBBox,h=b.x+(b.width/2),g=b.y+b.height,k=this.margin||10,d=Math.min(b.width,2*b.height)/2+2*k,s=Math.round,l=[],f,q=this.maximum||0,p=this.steps,o=0,t,r=Math.PI,c=Math.cos,a=Math.sin,e=this.label,m=e.renderer||function(i){return i};if(!this.labelArray){for(o=0;o<=p;o++){t=(o===0||o===p)?7:0;f=n.add({type:"text",text:m(s(o/p*q)),x:h+d*c(o/p*r-r),y:g+d*a(o/p*r-r)-t,"text-anchor":"middle","stroke-width":0.2,zIndex:10,stroke:"#333"});f.setAttributes({hidden:false},true);l.push(f)}}else{l=this.labelArray;for(o=0;o<=p;o++){t=(o===0||o===p)?7:0;l[o].setAttributes({text:m(s(o/p*q)),x:h+d*c(o/p*r-r),y:g+d*a(o/p*r-r)-t},true)}}this.labelArray=l}});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(t){var k=this.chart,a=k.surface,s=k.chartBBox,p=k.store,b=p.getCount(),e=s.x+(s.width/2),c=s.y+(s.height/2),o=Math.min(s.width,s.height)/2,h=[],q,n=this.steps,f,d,g=Math.PI*2,r=Math.cos,m=Math.sin;if(this.sprites&&!k.resizing){this.drawLabel();return}if(!this.sprites){for(f=1;f<=n;f++){q=a.add({type:"circle",x:e,y:c,radius:Math.max(o*f/n,0),stroke:"#ccc"});q.setAttributes({hidden:false},true);h.push(q)}p.each(function(l,j){q=a.add({type:"path",path:["M",e,c,"L",e+o*r(j/b*g),c+o*m(j/b*g),"Z"],stroke:"#ccc"});q.setAttributes({hidden:false},true);h.push(q)})}else{h=this.sprites;for(f=0;f','',' ',"",""],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,f=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(f)}c.down("a.color-"+b).addCls(f);d.value=b;if(a!==true){d.fireEvent("select",d,b)}}},getValue:function(){return this.value||null}});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.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(;c1;if(a||Ext.isArray(f[0])){g=a?f:f[0];h.suspendLayout=true;for(c=0,e=g.length;c "+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 {bodyCls}','',' {parent.baseCls}-body-{parent.ui}-{.}','"',' style="{bodyStyle}">'],initComponent:function(){var c=this,f,e,b,a,d;c.indicateDragCls=c.baseCls+"-draggable";c.title=c.title||" ";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]}f="."+c.baseCls+"-text-"+d;if(Ext.scopeResetCSS){f="."+Ext.baseCSSPrefix+"reset "+f}e=Ext.util.CSS.getRule(f);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:['{title}'],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:[''],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,f){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],g,c;if(!f&&e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){g=e.bodyCls.split(" ");for(c=0;cgridcolumn: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(g,b){var k=this,l=k.ownerCt,d=k.getMenu(),e,c,h,a,j,f;if(d){h=d.down("menucheckitem[headerId="+g.id+"]");if(h){h.setChecked(true,true)}e=d.query("#columnItem>menucheckitem[checked]");c=e.length;if((k.getVisibleGridColumns().length>1)&&k.disabledMenuItems&&k.disabledMenuItems.length){if(c==1){Ext.Array.remove(k.disabledMenuItems,e[0])}for(f=0,j=k.disabledMenuItems.length;fmenucheckitem[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;bgridcolumn[hideable]"),g=a.length,d;for(;b{text}
',dataIndex:null,text:" ",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:not([hidden])");if(!c.length){f.ownerCt.hide()}else{for(d=0,a=c.length;d*");for(e=0,h=j.length;e:not([hidden])");for(e=0,h=j.length;e',u='',h=a.apply(b,arguments),o=e.get("href"),s=e.get("hrefTarget"),c=e.get("cls");while(e){if(!e.isRoot()||(e.isRoot()&&j.rootVisible)){if(e.getDepth()===t){r.unshift(p(i,q+"icon "+q+"icon"+(e.get("icon")?"-inline ":(e.isLeaf()?"-leaf ":"-parent "))+(e.get("iconCls")||""),e.get("icon")||Ext.BLANK_IMAGE_URL));if(e.get("checked")!==null){r.unshift(p(u,(q+"checkbox")+(e.get("checked")?" "+q+"checkbox-checked":""),e.get("checked")?'aria-checked="true"':""));if(e.get("checked")){n.tdCls+=(" "+q+"checked")}}if(e.isLast()){if(e.isExpandable()){r.unshift(p(i,(f+"end-plus "+m),Ext.BLANK_IMAGE_URL))}else{r.unshift(p(i,(f+"end"),Ext.BLANK_IMAGE_URL))}}else{if(e.isExpandable()){r.unshift(p(i,(f+"plus "+m),Ext.BLANK_IMAGE_URL))}else{r.unshift(p(i,(q+"elbow"),Ext.BLANK_IMAGE_URL))}}}else{if(e.isLast()||e.getDepth()===0){r.unshift(p(i,(f+"empty"),Ext.BLANK_IMAGE_URL))}else{if(e.getDepth()!==0){r.unshift(p(i,(f+"line"),Ext.BLANK_IMAGE_URL))}}}}e=e.parentNode}if(o){r.push('',h,"")}else{r.push(h)}if(c){n.tdCls+=" "+c}return r.join("")};this.callParent(arguments)},defaultRenderer:function(a){return a}});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:['
{bodyCls} {baseCls}-body-{ui} {parent.baseCls}-body-{parent.ui}-{.}" style="{bodyStyle}">
','
{baseCls}-strip-{ui} {parent.baseCls}-strip-{parent.ui}-{.}">
'],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.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false});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:'
(None)
',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,g){var f=this,e=f.layout,c="get"+e.parallelPrefixCap,b={},d=[null,null];f.callParent(arguments);this.createMenu(a,g);b[e.perpendicularPrefix]=g[e.perpendicularPrefix];b[e.parallelPrefix]=g[e.parallelPrefix]-f.afterCt[c]();d[e.perpendicularSizeIndex]=(a.meta.maxSize-f.menuTrigger["get"+e.perpendicularPrefixCap]())/2;f.menuTrigger.setPosition.apply(f.menuTrigger,d);return{targetSize:b}},clearOverflow:function(a,h){var g=this,f=h?h.width+(g.afterCt?g.afterCt.getWidth():0):0,b=g.menuItems,c=0,e=b.length,d;g.hideTrigger();for(;cb){k.menuItems.push(f.component);f.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.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,f=Infinity;d=d.component[e]||f;c=c.component[e]||f;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(;ac}e=l(0,c-d-u-(x.reserveOffset?x.availableSpaceOffset:0));if(m){for(af=0;af0){for(af=0;af0)}else{a=e;q=ai;T=[];for(af=0;af0){S[x.perpendicularLeftTop]=P+Math.round(D/2)}}}}r+=(S[s]||0)+B[x.parallelAfter]}return{boxes:Q,meta:{calculatedWidth:ag,maxSize:G,nonFlexSize:d,desiredSize:al,minimumSize:w,shortfall:X,tooNarrow:m}}},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 g=this,c=g.getLayoutTargetSize(),f=g.getVisibleItems(),b=g.calculateChildBoxes(f,c),e=b.boxes,h=b.meta,i,a,d;if(g.autoSize&&b.meta.desiredSize){c[g.parallelPrefix]=b.meta.desiredSize}if(h.shortfall>0){i=g.overflowHandler;a=h.tooNarrow?"handleOverflow":"clearOverflow";d=i[a](b,c);if(d){if(d.targetSize){c=d.targetSize}if(d.recalculate){f=g.getVisibleItems();b=g.calculateChildBoxes(f,c);e=b.boxes}}}else{g.overflowHandler.clearOverflow()}g.layoutTargetLastSize=c;g.childBoxCache=b;g.updateInnerCtSize(c,b);g.updateChildBoxes(e);g.handleTargetOverflow(c)},animCallback:Ext.emptyFn,updateChildBoxes:function(g){var l=this,e=0,c=g.length,o=[],n=Ext.dd.DDM.getDDById(l.innerCt.id),a,f,d,h,j,b;for(;ek.calculatedWidth){g.owner.el.setWidth(k.calculatedWidth)}if(g.innerCt.dom.scrollTop){g.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,f){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.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.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,h){var g=this,f=c.length,d=0,b,e=g.getLayoutTargetSize(),a=[];for(;dpanel: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 {bodyCls}',' {baseCls}-body-{ui}',' {parent.baseCls}-body-{parent.ui}-{.}','" style="{bodyStyle}">',""],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,f){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b0){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 f=this,g=f.activeItem,b=f.getVisibleItems(),e=b.length,a=f.getTargetBox(),c,d;for(c=0;c=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()});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 f=this,c=Ext.create("Ext.data.Batch",{proxy:f,listeners:e||{}}),b=f.batchActions,a;Ext.each(f.batchOrder.split(","),function(g){a=d[g];if(a){if(b){c.add(Ext.create("Ext.data.Operation",{action:g,records:a}))}else{Ext.each(a,function(h){c.add(Ext.create("Ext.data.Operation",{action:g,records:[h]}))})}}},f);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(g,a,c,b,f,h){var e=this,d,i;if(g===true){d=e.getReader();i=d.read(e.extractResponseData(b));if(i.success!==false){Ext.apply(a,{response:b,resultSet:i});a.commitRecords(i.records);a.setCompleted();a.setSuccessful()}else{a.setException(i.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof f=="function"){f.call(h||e,a)}e.afterRequest(c,g)},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(;a0){q[c]=r.encodeSorters(o)}if(e&&a&&a.length>0){if(h){q[e]=a[0].property;q[j]=a[0].direction}else{q[e]=r.encodeSorters(a)}}if(l&&i&&i.length>0){q[l]=r.encodeFilters(i)}return q},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(g,h,f){c.processResponse(h,a,d,f,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,x){var w=this,y=Ext.getClassName(d),l=d.prototype,q=d.prototype.superclass,e=x.validations||[],n=x.fields||[],s=x.associations||[],r=x.belongsTo,m=x.hasMany,o=x.idgen,u=new Ext.util.MixedCollection(false,function(i){return i.name}),t=new Ext.util.MixedCollection(false,function(i){return i.name}),k=q.validations,v=q.fields,g=q.associations,f,p,h,j=[];d.modelName=y;l.modelName=y;if(k){e=k.concat(e)}x.validations=e;if(v){n=v.items.concat(n)}for(p=0,h=n.length;p0){h=g.data.items;s=h.length;for(l=0;l0){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;b0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],j={},f,g,h,e;for(e=0;e-1){h=d.phantom===true;if(!j&&!h){f.removed.push(d)}d.unjoin(f);f.data.remove(d);g=g||!h;f.fireEvent("remove",f,d,e)}}f.fireEvent("datachanged",f);if(!j&&f.autoSync&&g){f.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,l){if(l){var g=0,f=this.data,a=this.snapshot,b=d.length,k=e.records,h,c,j;for(;g-1){f.removeAt(j);f.insert(j,h)}if(a){j=a.indexOf(c);if(j>-1){a.removeAt(j);a.insert(j,h)}}h.phantom=false;h.join(this)}}}},onUpdateRecords:function(d,c,h){if(h){var e=0,f=d.length,g=this.data,b=this.snapshot,a;for(;ethis.totalCount)?this.totalCount-1:c;var h=this,d=a,k=h.prefetchData,e=[],g=!!k.getByKey(a),j=!!k.getByKey(c),f=h.getPageFromRecordIndex(a),l=h.getPageFromRecordIndex(c);h.cb=b;h.scope=m;h.requestStart=a;h.requestEnd=c;if(!g||!j){if(f===l){h.mask();h.prefetchPage(f,{callback:h.onWaitForGuarantee,scope:h})}else{h.mask();h.prefetchPage(f,{callback:h.onWaitForGuarantee,scope:h});h.prefetchPage(l,{callback:h.onWaitForGuarantee,scope:h})}}else{h.onGuaranteedRange()}},sort:function(){var d=this,c=d.prefetchData,e,f,a,b;if(d.buffered){if(d.remoteSort){c.clear();d.callParent(arguments)}else{e=d.getSorters();f=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(f,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(;c0){c=b[0].get(f)}for(;d0){a=c[0].get(f)}for(;da){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>0),e)}}}},doConstrain:function(){var r=this,d=r.chart.store,s=[],g=r.chart.series.items,c=Math,t=c.max,q=c.min,j=r.fields,f=j.length,h=r.getRange(),m=h.min,o=h.max,p,n,b=[],k,a,e,s=[];for(p=0,n=g.length;p+o){return}}s.push(i)});r.chart.substore=Ext.create("Ext.data.JsonStore",{model:d.model,data:s})},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.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(f,d,c){var h=this,a=h.indexOf(f)+1,g=d?d.length:0,e,b;if(!h.recursive&&f!==h.node){return}if(!h.isVisible(f)){return}if(!c&&h.fireEvent("beforeexpand",f,d,a)===false){return}if(g){h.insert(a,d);for(e=0;e',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.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,f){this.selectWithEvent(a,f)},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(f){f=f||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))+f}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,g){var f=this,a=f.view,c=e?"select":"deselect";if((d||f.fireEvent("before"+c,f,b))!==false&&g()!==false){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}if(!d){f.fireEvent(c,f,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});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('
{1}
',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,f){var e=[],d=0,a=c.length,b;for(;d-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=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.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(g){var h=this,j=g.getTarget(h.getItemSelector(),h.getTargetEl()),a=this.statics().EventMap,f,c,i=g.type,d=h.mouseOverItem,b;if(!j){if(i=="mouseover"&&h.stillOverItem(g,d)){j=d}if(i=="keydown"){c=h.getSelectionModel().getLastSelected();if(c){j=h.getNode(c)}}}if(j){f=h.indexOf(j);if(!c){c=h.getRecord(j)}if(h.processItemEvent(c,j,f,g)===false){return false}b=h.isNewItemEvent(j,g);if(b===false){return false}if((h["onBeforeItem"+a[b]](c,j,f,g)===false)||(h.fireEvent("beforeitem"+b,h,c,j,f,g)===false)||(h["onItem"+a[b]](c,j,f,g)===false)){return false}h.fireEvent("item"+b,h,c,j,f,g)}else{if((h.processContainerEvent(g)===false)||(h["onBeforeContainer"+a[i]](g)===false)||(h.fireEvent("beforecontainer"+i,h,g)===false)||(h["onContainer"+a[i]](g)===false)){return false}h.fireEvent("container"+i,h,g)}return true},isNewItemEvent:function(d,f){var c=this,a=c.mouseOverItem,b=f.type;switch(b){case"mouseover":if(d===a){return false}c.mouseOverItem=d;return"mouseenter";case"mouseout":if(c.stillOverItem(f,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.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="
";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(;bd.bottom){g=h.bottom-d.bottom}}e=f.getRecord(i);b=f.store.indexOf(e);if(g){a.scrollByDeltaY(g)}f.fireEvent("rowfocus",e,i,b)}},focusCell:function(g){var i=this,j=i.getCellByPosition(g),b=i.el,d=0,e=0,c=b.getRegion(),a=i.ownerCt,h,f;if(j){h=j.getRegion();if(h.topc.bottom){d=h.bottom-c.bottom}}if(h.leftc.right){e=h.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();i.fireEvent("cellfocus",f,j,g)}},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,l,i,d){var g=this,j=d.getTarget(g.cellSelector,l),h=j?j.cellIndex:-1,a=g.statics().EventMap,c=g.getSelectionModel(),f=d.type,k;if(f=="keydown"&&!j&&c.getCurrentPosition){j=g.getCellByPosition(c.getCurrentPosition());if(j){j=j.dom;h=j.cellIndex}}k=g.fireEvent("uievent",f,g,j,i,h,d);if(k===false||g.callParent(arguments)===false){return false}if(f=="mouseover"||f=="mouseout"){return true}return !((g["onBeforeCell"+a[f]](j,h,b,l,i,d)===false)||(g.fireEvent("beforecell"+f,g,j,h,b,l,i,d)===false)||(g["onCell"+a[f]](j,h,b,l,i,d)===false)||(g.fireEvent("cell"+f,g,j,h,b,l,i,d)===false))},processSpecialEvent:function(j){var m=this,b=m.statics().EventMap,d=m.features,l=d.length,n=j.type,f,o,g,h,c,k,a=m.ownerCt;m.callParent(arguments);if(n=="mouseover"||n=="mouseout"){return}for(f=0;fe){e=b}}return e},getPositionByEvent:function(f){var d=this,b=f.getTarget(d.cellSelector),c=f.getTarget(d.itemSelector),a=d.getRecord(c),g=d.getHeaderByCell(b);return d.getPosition(a,g)},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(k,l,g,m,a,n){var i=this,o=k.row,d=k.column,j=i.store.getCount(),f=i.getFirstVisibleColumnIndex(),b=i.getLastVisibleColumnIndex(),h={row:o,column:d},c=i.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}g=g||{};l=l.toLowerCase();switch(l){case"right":if(d===b){if(m||o===j-1){return false}if(!g.ctrlKey){h.row=o+1;h.column=f}}else{if(!g.ctrlKey){h.column=d+i.getRightGap(c)}else{h.column=b}}break;case"left":if(d===f){if(m||o===0){return false}if(!g.ctrlKey){h.row=o-1;h.column=b}}else{if(!g.ctrlKey){h.column=d+i.getLeftGap(c)}else{h.column=f}}break;case"up":if(o===0){return false}else{if(!g.ctrlKey){h.row=o-1}else{h.row=0}}break;case"down":if(o===j-1){return false}else{if(!g.ctrlKey){h.row=o+1}else{h.row=j-1}}break}if(a&&a.call(n||window,h)!==true){return false}else{return h}},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 f=this.getHeaderCt(),e=f.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 f=this.getHeaderCt(),e=f.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),f=d.length,c=0,e;for(;c'}c=Ext.get(d);a=c.insertSibling({tag:"tr",html:['','
','',f,"
","
",""].join("")},"after");return{record:h,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,h){var i=this,f=d[0],k=f.parentNode,j=i.all.elements,m=0,e=i.getAnimWrap(k),l,c,g;if(!e||!e.expanding){i.resetScrollers();return i.callParent(arguments)}k=e.record;l=e.targetEl;c=l.dom.childNodes;g=c.length-1;m=h-i.indexOf(k)-1;if(!g||m>=g){l.appendChild(b)}else{Ext.fly(c[m+1]).insertSibling(b,"before",true)}Ext.Array.insert(j,h,b);if(e.isAnimating){i.onExpand(k)}},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 g=this,e=a.parentNode,d=g.all,b=g.getAnimWrap(a),f=d.item(c).dom;if(!b||!b.collapsing){g.resetScrollers();return g.callParent(arguments)}b.targetEl.appendChild(f);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,h=c.getId(),b,e,f,g;if(d.singleExpand){d.ensureSingleExpand(c)}b=d.getAnimWrap(c);if(!b){d.resetScrollers();return}e=b.animateEl;f=b.targetEl;e.stopAnimation();a[h]=true;e.slideIn("t",{duration:d.expandDuration,listeners:{scope:d,lastframe:function(){b.el.insertSibling(f.query(d.itemSelector),"before");b.el.remove();d.resetScrollers();delete b.record.animWrap;delete a[h]}}});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,g=c.getId(),b=d.getAnimWrap(c),e,f;if(!b){d.resetScrollers();return}e=b.animateEl;f=b.targetEl;a[g]=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[g]}}});b.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},collectData:function(c){var f=this.callParent(arguments),e=f.rows,a=e.length,d=0,g,b;for(;d=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(g,d){if(!d){return g}else{if(d[0]>=g){return d[0]}else{for(var b=0,a=d.length;b=g){var f=g-d[b];var e=d[c]-g;return(e>f)?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 f=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),k=d.getSize(),h=Ext.Element,i;if(!this.deltaSetXY){i=this.cachedViewportSize={width:h.getDocumentWidth(),height:h.getDocumentHeight()};var a=[Math.max(0,Math.min(f.x,i.width-k.width)),Math.max(0,Math.min(f.y,i.height-k.height))];d.setXY(a);var j=d.getLeft(true);var g=d.getTop(true);this.deltaSetXY=[j-f.x,g-f.y]}else{i=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(f.x+this.deltaSetXY[0],i.width-k.width)),Math.max(0,Math.min(f.y+this.deltaSetXY[1],i.height-k.height)))}this.cachePosition(f.x,f.y);this.autoScroll(f.x,f.y,b.offsetHeight,b.offsetWidth);return f},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(k,j,e,l){if(this.scroll){var m=Ext.Element.getViewHeight();var b=Ext.Element.getViewWidth();var o=this.DDMInstance.getScrollTop();var d=this.DDMInstance.getScrollLeft();var i=e+j;var n=l+k;var g=(m+o-j-this.deltaY);var f=(b+d-k-this.deltaX);var c=40;var a=(document.all)?80:30;if(i>m&&g0&&j-ob&&f0&&k-dthis.maxX){a=this.maxX}}if(this.constrainY){if(dthis.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.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,f=[],c,b,e=a.minButtonWidth;function d(g,i,h){if(Ext.isArray(g)){g={xtype:"toolbar",items:g}}else{if(!g.xtype){g.xtype="toolbar"}}g.dock=i;if(i=="left"||i=="right"){g.vertical=true}if(h){g.layout=Ext.applyIf(g.layout||{},{pack:{left:"start",center:"center"}[a.buttonAlign]||"end"})}return g}if(a.tbar){f.push(d(a.tbar,"top"));a.tbar=null}if(a.bbar){f.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(g){var h=b||{};if((!g.xtype||g.xtype==="button"||(g.isComponent&&g.isXType("button")))&&!("minWidth" in h)){h=Ext.apply({minWidth:e},h)}return h}}f.push(c);a.fbar=null}if(a.lbar){f.push(d(a.lbar,"left"));a.lbar=null}if(a.rbar){f.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(f)}else{a.dockedItems=f}},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(t,f,h){var u=this,s=Ext.Component,j=u.getHeight(),k=u.getWidth(),v,a=0,p=u.dockedItems.items,q=p.length,o=0,r,g,n={from:{height:j,width:k},to:{height:j,width:k},listeners:{afteranimate:u.afterCollapse,scope:u},duration:Ext.Number.from(f,Ext.fx.Anim.prototype.duration)},e,d,l,b,m;if(!t){t=u.collapseDirection}if(h){f=false}else{if(u.collapsed||u.fireEvent("beforecollapse",u,t,f)===false){return false}}l=t;u.expandDirection=u.getOppositeDirection(t);u.hiddenDocked=[];switch(t){case s.DIRECTION_TOP:case s.DIRECTION_BOTTOM:d="horizontal";m="height";b="getHeight";for(;o','
','
','',"
",'{name}',"
","",'
'],taskbarConfig:null,windowMenu:null,initComponent:function(){var b=this;b.windowMenu=new Ext.menu.Menu(b.createWindowMenu());b.bbar=b.taskbar=new Ext.ux.desktop.TaskBar(b.taskbarConfig);b.taskbar.windowMenu=b.windowMenu;b.windows=new Ext.util.MixedCollection();b.contextMenu=new Ext.menu.Menu(b.createDesktopMenu());b.items=[{xtype:"wallpaper",id:b.id+"_wallpaper"},b.createDataView()];b.callParent();b.shortcutsView=b.items.getAt(1);b.shortcutsView.on("itemclick",b.onShortcutItemClick,b);var a=b.wallpaper;b.wallpaper=b.items.getAt(0);if(a){b.setWallpaper(a,b.wallpaperStretch)}},afterRender:function(){var a=this;a.callParent();a.el.on("contextmenu",a.onDesktopMenu,a)},createDataView:function(){var a=this;return{xtype:"dataview",overItemCls:"x-view-over",trackOver:true,itemSelector:a.shortcutItemSelector,store:a.shortcuts,tpl:new Ext.XTemplate(a.shortcutTpl)}},createDesktopMenu:function(){var b=this,a={items:b.contextMenuItems||[]};if(a.items.length){a.items.push("-")}a.items.push({text:"Tile",handler:b.tileWindows,scope:b,minWindows:1},{text:"Cascade",handler:b.cascadeWindows,scope:b,minWindows:1});return a},createWindowMenu:function(){var a=this;return{defaultAlign:"br-tr",items:[{text:"Restore",handler:a.onWindowMenuRestore,scope:a},{text:"Minimize",handler:a.onWindowMenuMinimize,scope:a},{text:"Maximize",handler:a.onWindowMenuMaximize,scope:a},"-",{text:"Close",handler:a.onWindowMenuClose,scope:a}],listeners:{beforeshow:a.onWindowMenuBeforeShow,hide:a.onWindowMenuHide,scope:a}}},onDesktopMenu:function(b){var a=this,c=a.contextMenu;b.stopEvent();if(!c.rendered){c.on("beforeshow",a.onDesktopMenuBeforeShow,a)}c.showAt(b.getXY());c.doConstrain()},onDesktopMenuBeforeShow:function(c){var b=this,a=b.windows.getCount();c.items.each(function(e){var d=e.minWindows||0;e.setDisabled(a1)?c:a;e.windows.each(function(g){var f=g.dd,h=g.resizer;f.xTickSize=a;f.yTickSize=d;h.widthIncrement=a;h.heightIncrement=d})},setWallpaper:function(b,a){this.wallpaper.setWallpaper(b,a);return this},cascadeWindows:function(){var a=0,c=0,b=this.getDesktopZIndexManager();b.eachBottomUp(function(d){if(d.isWindow&&d.isVisible()&&!d.maximized){d.setPosition(a,c);a+=20;c+=20}})},createWindow:function(c,b){var d=this,e,a=Ext.applyIf(c||{},{stateful:false,isWindow:true,constrainHeader:true,minimizable:true,maximizable:true});b=b||Ext.window.Window;e=d.add(new b(a));d.windows.add(e);e.taskButton=d.taskbar.addTaskButton(e);e.animateTarget=e.taskButton.el;e.on({activate:d.updateActiveWindow,beforeshow:d.updateActiveWindow,deactivate:d.updateActiveWindow,minimize:d.minimizeWindow,destroy:d.onWindowClose,scope:d});e.on({afterrender:function(){e.dd.xTickSize=d.xTickSize;e.dd.yTickSize=d.yTickSize;if(e.resizer){e.resizer.widthIncrement=d.xTickSize;e.resizer.heightIncrement=d.yTickSize}},single:true});e.doClose=function(){e.doClose=Ext.emptyFn;e.el.disableShadow();e.el.fadeOut({listeners:{afteranimate:function(){e.destroy()}}})};return e},getActiveWindow:function(){var b=null,a=this.getDesktopZIndexManager();if(a){a.eachTopDown(function(c){if(c.isWindow&&!c.hidden){b=c;return false}return true})}return b},getDesktopZIndexManager:function(){var a=this.windows;return(a.getCount()&&a.getAt(0).zIndexManager)||null},getWindow:function(a){return this.windows.get(a)},minimizeWindow:function(a){a.minimized=true;a.hide()},restoreWindow:function(a){if(a.isVisible()){a.restore();a.toFront()}else{a.show()}return a},tileWindows:function(){var b=this,e=b.body.getWidth(true);var a=b.xTickSize,d=b.yTickSize,c=d;b.windows.each(function(g){if(g.isVisible()&&!g.maximized){var f=g.el.getWidth();if(a>b.xTickSize&&a+f>e){a=b.xTickSize;d=c}g.setPosition(a,d);a+=f+b.xTickSize;c=Math.max(c,d+g.el.getHeight()+b.yTickSize)}})},updateActiveWindow:function(){var b=this,c=b.getActiveWindow(),a=b.lastActiveWindow;if(c===a){return}if(a){if(a.el.dom){a.addCls(b.inactiveWindowCls);a.removeCls(b.activeWindowCls)}a.active=false}b.lastActiveWindow=c;if(c){c.addCls(b.activeWindowCls);c.removeCls(b.inactiveWindowCls);c.minimized=false;c.active=true}b.taskbar.setActiveButton(c&&c.taskButton)}}); +/* + * Ext JS Library 4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.define("Ext.ux.desktop.App",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.container.Viewport","Ext.ux.desktop.Desktop"],isReady:false,modules:null,useQuickTips:true,constructor:function(a){var b=this;b.addEvents("ready","beforeunload");b.mixins.observable.constructor.call(this,a);if(Ext.isReady){Ext.Function.defer(b.init,10,b)}else{Ext.onReady(b.init,b)}},init:function(){var b=this,a;if(b.useQuickTips){Ext.QuickTips.init()}b.modules=b.getModules();if(b.modules){b.initModules(b.modules)}a=b.getDesktopConfig();b.desktop=new Ext.ux.desktop.Desktop(a);b.viewport=new Ext.container.Viewport({layout:"fit",items:[b.desktop]});Ext.EventManager.on(window,"beforeunload",b.onUnload,b);b.isReady=true;b.fireEvent("ready",b)},getDesktopConfig:function(){var b=this,a={app:b,taskbarConfig:b.getTaskbarConfig()};Ext.apply(a,b.desktopConfig);return a},getModules:Ext.emptyFn,getStartConfig:function(){var b=this,a={app:b,menu:[]};Ext.apply(a,b.startConfig);Ext.each(b.modules,function(c){if(c.launcher){a.menu.push(c.launcher)}});return a},getTaskbarConfig:function(){var b=this,a={app:b,startConfig:b.getStartConfig()};Ext.apply(a,b.taskbarConfig);return a},initModules:function(a){var b=this;Ext.each(a,function(c){c.app=b})},getModule:function(d){var c=this.modules;for(var e=0,b=c.length;e=0){d=d.substring(b+1)}var a=d.lastIndexOf(".");d=Ext.String.capitalize(d.substring(0,a));d=d.replace(/[-]/g," ");return d},onOK:function(){var a=this;if(a.selected){a.desktop.setWallpaper(a.selected,a.stretch)}a.destroy()},onSelect:function(a,b){var c=this;if(b.data.img){c.selected="wallpapers/"+b.data.img}else{c.selected=Ext.BLANK_IMAGE_URL}c.preview.setWallpaper(c.selected)},setInitialSelection:function(){var a=this.desktop.getWallpaper();if(a){var b="/Wallpaper/"+this.getTextOfWallpaper(a);this.tree.selectPath(b,"text")}}});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 JS Library 4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.define("MyDesktop.TabWindow",{extend:"Ext.ux.desktop.Module",requires:["Ext.tab.Panel"],id:"tab-win",init:function(){this.launcher={text:"Tab Window",iconCls:"tabs",handler:this.createWindow,scope:this}},createWindow:function(){var b=this.app.getDesktop();var a=b.getWindow("tab-win");if(!a){a=b.createWindow({id:"tab-win",title:"Tab Window",width:740,height:480,iconCls:"tabs",animCollapse:false,border:false,constrainHeader:true,layout:"fit",items:[{xtype:"tabpanel",activeTab:0,bodyStyle:"padding: 5px;",items:[{title:"Tab Text 1",header:false,html:"

Something useful would be in here.

",border:false},{title:"Tab Text 2",header:false,html:"

Something useful would be in here.

",border:false},{title:"Tab Text 3",header:false,html:"

Something useful would be in here.

",border:false},{title:"Tab Text 4",header:false,html:"

Something useful would be in here.

",border:false}]}]})}a.show();return a}});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 g=this,a=g.scroll,d=false,c=false,h=g.columns||g.colModel,f=0,b,e=g.border;if(g.hideHeaders){e=false}g.store=Ext.data.StoreManager.lookup(g.store||"ext-empty-store");if(h instanceof Ext.grid.header.Container){g.headerCt=h;g.headerCt.border=e;g.columns=g.headerCt.items.items}else{if(Ext.isArray(h)){h={items:h,border:e}}Ext.apply(h,{forceFit:g.forceFit,sortable:g.sortableColumns,enableColumnMove:g.enableColumnMove,enableColumnResize:g.enableColumnResize,enableColumnHide:g.enableColumnHide,border:e});g.columns=h.items;if(g.enableLocking||Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",g.columns).length){g.self.mixin("lockable",Ext.grid.Lockable);g.injectLockable()}}g.addEvents("reconfigure","viewready","scrollerhide","scrollershow");g.bodyCls=g.bodyCls||"";g.bodyCls+=(" "+g.extraBodyCls);g.cls=g.cls||"";g.cls+=(" "+g.extraBaseCls);delete g.autoScroll;if(!g.hasView){if(!g.headerCt){g.headerCt=Ext.create("Ext.grid.header.Container",h)}g.columns=g.headerCt.items.items;if(g.hideHeaders){g.headerCt.height=0;g.headerCt.border=false;g.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");g.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){g.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{g.headerCt.availableSpaceOffset=0}}}if(d){g.verticalScroller=Ext.ComponentManager.create(g.initVerticalScroller());g.mon(g.verticalScroller,{bodyscroll:g.onVerticalScroll,scope:g})}if(c){g.horizontalScroller=Ext.ComponentManager.create(g.initHorizontalScroller());g.mon(g.horizontalScroller,{bodyscroll:g.onHorizontalScroll,scope:g})}g.headerCt.on("resize",g.onHeaderResize,g);g.relayHeaderCtEvents(g.headerCt);g.features=g.features||[];if(!Ext.isArray(g.features)){g.features=[g.features]}g.dockedItems=g.dockedItems||[];g.dockedItems.unshift(g.headerCt);g.viewConfig=g.viewConfig||{};g.viewConfig.invalidateScrollerOnRefresh=g.invalidateScrollerOnRefresh;b=g.getView();b.on({afterrender:function(){b.el.scroll=Ext.Function.bind(g.elScroll,g);g.mon(b.el,{mousewheel:g.onMouseWheel,scope:g})},single:true});g.items=[b];g.hasView=true;g.mon(b.store,{load:g.onStoreLoad,scope:g});g.mon(b,{viewReady:g.onViewReady,resize:g.onViewResize,refresh:{fn:g.onViewRefresh,scope:g,buffer:50},scope:g});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"])}g.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(f,b,a,c,d,h){var g=this,i;if(d!==-1){i=g.headerCt.getGridColumns()[d];return i.processEvent.apply(i,arguments)}},determineScrollbars:function(){if(this.determineScrollbarsRunning){return}this.determineScrollbarsRunning=true;var h=this,i=h.view,d,a,e,j,l,f,g=h.verticalScroller,c=h.horizontalScroller,k=(g&&g.ownerCt===h?1:0)|(c&&c.ownerCt===h?2:0),b=0;if(!h.collapsed&&i&&i.viewReady){d=i.el.getSize();j=d.width+((k&1)?g.width:0);f=d.height+((k&2)?c.height:0);e=(h.headerCt.query("[flex]").length&&!h.headerCt.layout.tooNarrow)?0:h.headerCt.getFullWidth();if(g&&g.el){l=g.getSizeCalculation().height}else{a=i.el.child("table",true);l=a?a.offsetHeight:0}if(l>f){b=1;if(c&&((j-e)j){b=2;if(g&&((f-l)0&&i)){m.stopEvent();o.scrollByDeltaX(h)}}if(j){if((g<0&&f)||(g>0&&k)){m.stopEvent();j.scrollByDeltaY(g)}}},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,f){var b=this.getScrollerOwner(),c=b.query("tableview"),d=0,a=c.length;for(;dSomething useful would be in here.

",autoScroll:true},{title:"Even More Stuff",html:"

Something useful would be in here.

"},{title:"My Stuff",html:"

Something useful would be in here.

"}]})}a.show();return a}});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 i=this,d;if(i.delegate){i.anchorTarget=i.triggerElement}if(i.anchor){i.targetCounter++;var c=i.getOffsets(),m=(i.anchorToTarget&&!i.trackMouse)?i.el.getAlignToXY(i.anchorTarget,i.getAnchorAlign()):i.targetXY,a=Ext.Element.getViewWidth()-5,h=Ext.Element.getViewHeight()-5,k=document.documentElement,e=document.body,l=(k.scrollLeft||e.scrollLeft||0)+5,j=(k.scrollTop||e.scrollTop||0)+5,b=[m[0]+c[0],m[1]+c[1]],g=i.getSize(),f=i.constrainPosition;i.anchorEl.removeCls(i.anchorCls);if(i.targetCounter<2&&f){if(b[0]a){if(i.anchorToTarget){i.defaultAlign="r-l";if(i.mouseOffset){i.mouseOffset[0]*=-1}}i.anchor="right";return i.getTargetXY()}if(b[1]h){if(i.anchorToTarget){i.defaultAlign="b-t";if(i.mouseOffset){i.mouseOffset[1]*=-1}}i.anchor="bottom";return i.getTargetXY()}}i.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+i.getAnchorPosition();i.anchorEl.addCls(i.anchorCls);i.targetCounter=0;return b}else{d=i.getMouseOffset();return(i.targetXY)?[i.targetXY[0]+d[0],i.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)0){b=Infinity;a=-b;d.eachRecord(function(e){var f=e.get(c);if(f>a){a=f}if(fc){c=k}if(k0){e=Infinity;c=-e;h.eachRecord(function(i){if(f){d=0;b=0;h.eachYValue(i,g);if(d>c){c=d}if(b-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,m,n){var h=b.length,l=Math.floor(h/n),g,f,d=0,k=this.areas.length,a=[],e=[],c=[];for(f=0;fa.width)&&u.areas){e=u.shrink(m,d,a.width);m=e.x;d=e.y}return{bbox:a,minX:s,minY:q,xValues:m,yValues:d,xScale:y,yScale:b,areasLen:w}},getPaths:function(){var u=this,k=u.chart,c=k.getChartStore(),d=true,e=u.getBounds(),a=e.bbox,l=u.items=[],t=[],b,n=[],q,g,h,f,o,r,j,v,p,s,m;g=e.xValues.length;for(q=0;qa.x+a.width)?(h-(h+m-a.x-a.width)):h;g=g-la.y+a.height)?(g-(g+l-a.y-a.height)):g;if(t.chart.animate&&!t.chart.resizing){f.show(true);t.onAnimate(f,{to:{x:h,y:g}})}else{f.setAttributes({x:h,y:g},true);if(q){t.animation.on("afteranimate",function(){f.show(true)})}else{f.show(true)}}},onPlaceCallout:function(l,q,I,F,E,d,j){var L=this,r=L.chart,C=r.surface,G=r.resizing,K=L.callouts,s=L.items,u=(F==0)?false:s[F-1].point,w=(F==s.length-1)?false:s[F+1].point,c=I.point,z,f,M,J,n,o,b=l.label.getBBox(),H=30,B=10,A=3,g,e,h,v,t,D=L.clipRect,m,k;if(!u){u=c}if(!w){w=c}J=(w[1]-u[1])/(w[0]-u[0]);n=(c[1]-u[1])/(c[0]-u[0]);o=(w[1]-c[1])/(w[0]-c[0]);f=Math.sqrt(1+J*J);z=[1/f,J/f];M=[-z[1],z[0]];if(n>0&&o<0&&M[1]<0||n<0&&o>0&&M[1]>0){M[0]*=-1;M[1]*=-1}else{if(Math.abs(n)Math.abs(o)&&M[0]>0){M[0]*=-1;M[1]*=-1}}m=c[0]+M[0]*H;k=c[1]+M[1]*H;g=m+(M[0]>0?0:-(b.width+2*A));e=k-b.height/2-A;h=b.width+2*A;v=b.height+2*A;if(g(D[0]+D[2])){M[0]*=-1}if(e(D[1]+D[3])){M[1]*=-1}m=c[0]+M[0]*H;k=c[1]+M[1]*H;g=m+(M[0]>0?0:-(b.width+2*A));e=k-b.height/2-A;h=b.width+2*A;v=b.height+2*A;l.lines.setAttributes({path:["M",c[0],c[1],"L",m,k,"Z"]},true);l.box.setAttributes({x:g,y:e,width:h,height:v},true);l.label.setAttributes({x:m+(M[0]>0?A:-(b.width+A)),y:k},true);for(t in l){l[t].show(true)}},isItemInPoint:function(h,g,k,c){var f=this,b=k.pointsUp,d=k.pointsDown,m=Math.abs,e=Infinity,a,l,j;for(a=0,l=b.length;am(h-j[0])){e=m(h-j[0])}else{j=b[a-1];if(g>=j[1]&&(!d.length||g<=(d[a-1][1]))){k.storeIndex=a-1;k.storeField=f.yField[c];k.storeItem=f.chart.store.getAt(a-1);k._points=d.length?[j,d[a-1]]:[j];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,m,n){var h=b.length,l=Math.floor(h/n),g,f,d=0,k=this.areas.length,a=[],e=[],c=[];for(f=0;fa.width)&&u.areas){e=u.shrink(m,d,a.width);m=e.x;d=e.y}return{bbox:a,minX:s,minY:q,xValues:m,yValues:d,xScale:y,yScale:b,areasLen:w}},getPaths:function(){var u=this,k=u.chart,c=k.getChartStore(),d=true,e=u.getBounds(),a=e.bbox,l=u.items=[],t=[],b,n=[],q,g,h,f,o,r,j,v,p,s,m;g=e.xValues.length;for(q=0;qa.x+a.width)?(h-(h+m-a.x-a.width)):h;g=g-la.y+a.height)?(g-(g+l-a.y-a.height)):g;if(t.chart.animate&&!t.chart.resizing){f.show(true);t.onAnimate(f,{to:{x:h,y:g}})}else{f.setAttributes({x:h,y:g},true);if(q){t.animation.on("afteranimate",function(){f.show(true)})}else{f.show(true)}}},onPlaceCallout:function(l,q,I,F,E,d,j){var L=this,r=L.chart,C=r.surface,G=r.resizing,K=L.callouts,s=L.items,u=(F==0)?false:s[F-1].point,w=(F==s.length-1)?false:s[F+1].point,c=I.point,z,f,M,J,n,o,b=l.label.getBBox(),H=30,B=10,A=3,g,e,h,v,t,D=L.clipRect,m,k;if(!u){u=c}if(!w){w=c}J=(w[1]-u[1])/(w[0]-u[0]);n=(c[1]-u[1])/(c[0]-u[0]);o=(w[1]-c[1])/(w[0]-c[0]);f=Math.sqrt(1+J*J);z=[1/f,J/f];M=[-z[1],z[0]];if(n>0&&o<0&&M[1]<0||n<0&&o>0&&M[1]>0){M[0]*=-1;M[1]*=-1}else{if(Math.abs(n)Math.abs(o)&&M[0]>0){M[0]*=-1;M[1]*=-1}}m=c[0]+M[0]*H;k=c[1]+M[1]*H;g=m+(M[0]>0?0:-(b.width+2*A));e=k-b.height/2-A;h=b.width+2*A;v=b.height+2*A;if(g(D[0]+D[2])){M[0]*=-1}if(e(D[1]+D[3])){M[1]*=-1}m=c[0]+M[0]*H;k=c[1]+M[1]*H;g=m+(M[0]>0?0:-(b.width+2*A));e=k-b.height/2-A;h=b.width+2*A;v=b.height+2*A;l.lines.setAttributes({path:["M",c[0],c[1],"L",m,k,"Z"]},true);l.box.setAttributes({x:g,y:e,width:h,height:v},true);l.label.setAttributes({x:m+(M[0]>0?A:-(b.width+A)),y:k},true);for(t in l){l[t].show(true)}},isItemInPoint:function(h,g,k,c){var f=this,b=k.pointsUp,d=k.pointsDown,m=Math.abs,e=Infinity,a,l,j;for(a=0,l=b.length;am(h-j[0])){e=m(h-j[0])}else{j=b[a-1];if(g>=j[1]&&(!d.length||g<=(d[a-1][1]))){k.storeIndex=a-1;k.storeField=f.yField[c];k.storeItem=f.chart.store.getAt(a-1);k._points=d.length?[j,d[a-1]]:[j];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,f=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(f){for(d=0,b=e.shadowAttributes.length;d0)][D]+=u(l)}});B[+(v>0)].push(u(v));B[+(x>0)].push(u(x));d=C.apply(g,B[0]);t=C.apply(g,B[1]);A=(f?a.height-b*2:a.width-n*2)/(t+d);m=m+d*A*(f?-1:1)}else{if(x/v<0){m=m-x*A*(f?-1:1)}}return{bars:q,bbox:a,barsLen:c,groupBarsLen:k,barWidth:o,groupBarWidth:y,scale:A,zero:m,xPadding:n,yPadding:b,signed:x/v<0,minY:x,maxY:v}},getPaths:function(){var t=this,O=t.chart,b=O.getChartStore(),C=t.bounds=t.getBounds(),x=t.items=[],i=t.gutter/100,c=t.groupGutter/100,M=O.animate,H=t.column,v=t.group,k=O.shadow,K=t.shadowGroups,J=t.shadowAttributes,o=K.length,w=C.bbox,l=t.xPadding,p=t.yPadding,L=t.stacked,u=C.barsLen,I=t.colorArrayStyle,g=I&&I.length||0,z=Math,m=z.max,E=z.min,s=z.abs,N,P,e,F,A,a,h,r,q,n,f,d,B,y,G,D;b.each(function(j,Q,R){a=C.zero;h=C.zero;F=0;A=0;r=false;for(N=0,f=0;N1?N:0)%g]};if(H){Ext.apply(q,{height:e,width:m(C.groupBarWidth,0),x:(w.x+l+Q*C.barWidth*(1+i)+f*C.groupBarWidth*(1+c)*!L),y:a-e})}else{G=(R-1)-Q;Ext.apply(q,{height:m(C.groupBarWidth,0),width:e+(a==C.zero),x:a+(a!=C.zero),y:(w.y+p+G*C.barWidth*(1+i)+f*C.groupBarWidth*(1+c)*!L+1)})}if(e<0){if(H){q.y=h;q.height=s(e)}else{q.x=h+e;q.width=s(e)}}if(L){if(e<0){h+=e*(H?-1:1)}else{a+=e*(H?-1:1)}F+=s(e);if(e<0){A+=s(e)}}q.x=Math.floor(q.x)+1;D=Math.floor(q.y);if(!Ext.isIE9&&q.y>D){D--}q.y=D;q.width=Math.floor(q.width);q.height=Math.floor(q.height);x.push({series:t,storeItem:j,value:[j.get(t.xField),P],attr:q,point:H?[q.x+q.width/2,P>=0?q.y:q.y+q.height]:[P>=0?q.x+q.width:q.x,q.y+q.height/2]});if(M&&O.resizing){n=H?{x:q.x,y:C.zero,width:q.width,height:0}:{x:C.zero,y:q.y,width:0,height:q.height};if(k&&(L&&!r||!L)){r=true;for(d=0;d(N>=0?b-t.y:t.y+t.height-b)){o=L}}else{if(c+B>k.height){o=h;F.isOutside=true}}C=k.x+d/2;A=o==p?(b+((c/2+3)*(N>=0?-1:1))):(N>=0?(k.y+((c/2+3)*(o==h?-1:1))):(k.y+k.height+((c/2+3)*(o===h?1:-1))))}else{if(o==h){if(a+D+k.width>(N>=0?t.x+t.width-b:b-t.x)){o=L}}else{if(a+D>k.width){o=h;F.isOutside=true}}C=o==p?(b+((a/2+5)*(N>=0?1:-1))):(N>=0?(k.x+k.width+((a/2+5)*(o===h?1:-1))):(k.x+((a/2+5)*(o===h?-1:1))));A=k.y+d/2}v={x:C,y:A};if(J){v.rotate={x:C,y:A,degrees:270}}if(G&&z){if(E){C=k.x+k.width/2;A=b}else{C=b;A=k.y+k.height/2}F.setAttributes({x:C,y:A},true);if(J){F.setAttributes({rotate:{x:C,y:A,degrees:270}},true)}}if(G){l.onAnimate(F,{to:v})}else{F.setAttributes(Ext.apply(v,{hidden:false}),true)}},getLabelSize:function(f){var j=this.testerLabel,a=this.label,d=Ext.apply({},a,this.seriesLabelStyle||{}),b=a.orientation==="vertical",i,g,e,c;if(!j){j=this.testerLabel=this.chart.surface.add(Ext.apply({type:"text",opacity:0},d))}j.setAttributes({text:f},true);i=j.getBBox();g=i.width;e=i.height;return{width:b?e:g,height:b?g: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 g=this,f=g.chart,a=f.surface,h=f.store,j=f.shadow,d,c,e;Ext.apply(g,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}}]});g.group=a.getGroup(g.seriesId);if(j){for(d=0,c=g.shadowAttributes.length;d180,C=Math.min(p,o)*A,z=Math.max(p,o)*A,n=false;j+=k*d(i);h+=k*a(i);v=j+b.startRho*d(C);g=h+b.startRho*a(C);u=j+b.endRho*d(C);f=h+b.endRho*a(C);t=j+b.startRho*d(z);e=h+b.startRho*a(z);q=j+b.endRho*d(z);c=h+b.endRho*a(z);if(m(v-t)<=w&&m(g-e)<=w){n=true}if(n){return{path:[["M",v,g],["L",u,f],["A",b.endRho,b.endRho,0,+s,1,q,c],["Z"]]}}else{return{path:[["M",v,g],["L",u,f],["A",b.endRho,b.endRho,0,+s,1,q,c],["L",t,e],["A",b.startRho,b.startRho,0,+s,0,v,g],["Z"]]}}},calcMiddle:function(o){var j=this,k=j.rad,n=o.slice,m=j.centerX,l=j.centerY,i=n.startAngle,e=n.endAngle,h=Math.max(("rho" in n)?n.rho:j.radius,j.label.minMargin),g=+j.donut,b=Math.min(i,e)*k,a=Math.max(i,e)*k,d=-(b+(a-b)/2),f=m+(o.endRho+o.startRho)/2*Math.cos(d),c=l-(o.endRho+o.startRho)/2*Math.sin(d);o.middle={x:f,y:c}},drawSeries:function(){var v=this,V=v.chart,b=V.getChartStore(),z=v.group,R=v.chart.animate,C=v.chart.axes.get(0),D=C&&C.minimum||v.minimum||0,H=C&&C.maximum||v.maximum||0,m=v.angleField||v.field||v.xField,L=V.surface,G=V.chartBBox,g=v.rad,c=+v.donut,W={},A=[],l=v.seriesStyle,a=v.seriesLabelStyle,f=v.colorArrayStyle,y=f&&f.length||0,J=V.maxGutter[0],I=V.maxGutter[1],h=Math.cos,r=Math.sin,s,e,d,u,q,B,N,E,F,K,T,S,k,U,w,n,P,Q,o,x,t,O,M;Ext.apply(l,v.style||{});v.setBBox();x=v.bbox;if(v.colorSet){f=v.colorSet;y=f.length}if(!b||!b.getCount()){return}e=v.centerX=G.x+(G.width/2);d=v.centerY=G.y+G.height;v.radius=Math.min(e-G.x,d-G.y);v.slices=q=[];v.items=A=[];if(!v.value){K=b.getAt(0);v.value=K.get(m)}N=v.value;if(v.needle){O={series:v,value:N,startAngle:-180,endAngle:0,rho:v.radius};t=-180*(1-(N-D)/(H-D));q.push(O)}else{t=-180*(1-(N-D)/(H-D));O={series:v,value:N,startAngle:-180,endAngle:t,rho:v.radius};M={series:v,value:v.maximum-N,startAngle:t,endAngle:0,rho:v.radius};q.push(O,M)}for(T=0,F=q.length;Tam.width){a=ak.shrink(av,aa,am.width);av=a.x;aa=a.y}ak.items=[];k=0;at=av.length;for(N=0;Na.x+a.width)?(h-(h+m-a.x-a.width)):h;g=(g-la.x+a.width)?(h-(h+m-a.x-a.width)):h;g=g-la.y+a.height)?(g-(g+l-a.y-a.height)):g}}if(t.chart.animate&&!t.chart.resizing){f.show(true);t.onAnimate(f,{to:{x:h,y:g}})}else{f.setAttributes({x:h,y:g},true);if(q&&t.animation){t.animation.on("afteranimate",function(){f.show(true)})}else{f.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(l,q,I,F,E,d,j){if(!E){return}var L=this,r=L.chart,C=r.surface,G=r.resizing,K=L.callouts,s=L.items,u=F==0?false:s[F-1].point,w=(F==s.length-1)?false:s[F+1].point,c=[+I.point[0],+I.point[1]],z,f,M,J,n,o,H=K.offsetFromViz||30,B=K.offsetToSide||10,A=K.offsetBox||3,g,e,h,v,t,D=L.clipRect,b={width:K.styles.width||10,height:K.styles.height||10},m,k;if(!u){u=c}if(!w){w=c}J=(w[1]-u[1])/(w[0]-u[0]);n=(c[1]-u[1])/(c[0]-u[0]);o=(w[1]-c[1])/(w[0]-c[0]);f=Math.sqrt(1+J*J);z=[1/f,J/f];M=[-z[1],z[0]];if(n>0&&o<0&&M[1]<0||n<0&&o>0&&M[1]>0){M[0]*=-1;M[1]*=-1}else{if(Math.abs(n)Math.abs(o)&&M[0]>0){M[0]*=-1;M[1]*=-1}}m=c[0]+M[0]*H;k=c[1]+M[1]*H;g=m+(M[0]>0?0:-(b.width+2*A));e=k-b.height/2-A;h=b.width+2*A;v=b.height+2*A;if(g(D[0]+D[2])){M[0]*=-1}if(e(D[1]+D[3])){M[1]*=-1}m=c[0]+M[0]*H;k=c[1]+M[1]*H;g=m+(M[0]>0?0:-(b.width+2*A));e=k-b.height/2-A;h=b.width+2*A;v=b.height+2*A;if(r.animate){L.onAnimate(l.lines,{to:{path:["M",c[0],c[1],"L",m,k,"Z"]}});if(l.panel){l.panel.setPosition(g,e,true)}}else{l.lines.setAttributes({path:["M",c[0],c[1],"L",m,k,"Z"]},true);if(l.panel){l.panel.setPosition(g,e)}}for(t in l){l[t].show(true)}},isItemInPoint:function(h,f,z,p){var B=this,m=B.items,r=B.selectionTolerance,j=null,w,c,o,u,g,v,b,s,a,k,A,e,d,n,t,q,C=Math.sqrt,l=Math.abs;c=m[p];w=p&&m[p-1];if(p>=g){w=m[g-1]}o=w&&w.point;u=c&&c.point;v=w?o[0]:u[0]-r;b=w?o[1]:u[1];s=c?u[0]:o[0]+r;a=c?u[1]:o[1];e=C((h-v)*(h-v)+(f-b)*(f-b));d=C((h-s)*(h-s)+(f-a)*(f-a));n=Math.min(e,d);if(n<=r){return n==e?w:c}return false},toggleAll:function(a){var e=this,b,d,f,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;b1?ae:af)%C]}||{}));J=Ext.apply({},u.segment,{slice:w,series:x,storeItem:w.storeItem,index:af});x.calcMiddle(J);if(l){J.shadows=w.shadowAttrs[ae]}E[af]=J;if(!F){s=Ext.apply({type:"path",group:D,middle:J.middle},Ext.apply(n,f&&{fill:f[(T>1?ae:af)%C]}||{}));F=S.add(Ext.apply(s,u))}w.sprite=w.sprite||[];J.sprite=F;w.sprite.push(F);w.point=[J.middle.x,J.middle.y];if(ad){u=x.renderer(F,b.getAt(af),u,af,b);F._to=u;F._animating=true;x.onAnimate(F,{to:u,listeners:{afteranimate:{fn:function(){this._animating=false},scope:F}}})}else{u=x.renderer(F,b.getAt(af),Ext.apply(u,{hidden:false}),af,b);F.setAttributes(u,true)}H+=v}}M=D.getCount();for(af=0;af>0]&&D.getAt(af)){D.getAt(af).hide(true)}}if(l){am=aa.length;for(K=0;K>0]){for(ae=0;ae90&&u<270)?u+180:u;g=j.attr.rotation.degrees;if(g!=null&&Math.abs(g-u)>180){if(u>g){u-=360}else{u+=360}u=u%360}else{u=a(u)}b.rotate={degrees:u,x:b.x,y:b.y};break;default:break}b.translate={x:0,y:0};if(e&&!v&&(r!="rotate"||g!=null)){A.onAnimate(j,{to:b})}else{j.setAttributes(b,true)}j._from=q},onPlaceCallout:function(k,n,z,u,t,d,e){var B=this,o=B.chart,v=o.resizing,A=B.callouts,h=B.centerX,g=B.centerY,C=z.middle,b={x:C.x,y:C.y},m=C.x-h,j=C.y-g,c=1,l,f=Math.atan2(j,m||1),a=k.label.getBBox(),w=20,s=10,r=10,q;c=z.endRho+w;l=(z.endRho+z.startRho)/2+(z.endRho-z.startRho)/3;b.x=c*Math.cos(f)+h;b.y=c*Math.sin(f)+g;m=l*Math.cos(f);j=l*Math.sin(f);if(o.animate){B.onAnimate(k.lines,{to:{path:["M",m+h,j+g,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?s:-s,0,"z"]}});B.onAnimate(k.box,{to:{x:b.x+(m>0?s:-(s+a.width+2*r)),y:b.y+(j>0?(-a.height-r/2):(-a.height-r/2)),width:a.width+2*r,height:a.height+2*r}});B.onAnimate(k.label,{to:{x:b.x+(m>0?(s+r):-(s+a.width+r)),y:b.y+(j>0?-a.height/4:-a.height/4)}})}else{k.lines.setAttributes({path:["M",m+h,j+g,"L",b.x,b.y,"Z","M",b.x,b.y,"l",m>0?s:-s,0,"z"]},true);k.box.setAttributes({x:b.x+(m>0?s:-(s+a.width+2*r)),y:b.y+(j>0?(-a.height-r/2):(-a.height-r/2)),width:a.width+2*r,height:a.height+2*r},true);k.label.setAttributes({x:b.x+(m>0?(s+r):-(s+a.width+r)),y:b.y+(j>0?-a.height/4:-a.height/4)},true)}for(q in k){k[q].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(k,h,m,e){var g=this,d=g.centerX,c=g.centerY,o=Math.abs,n=o(k-d),l=o(h-c),f=m.startAngle,a=m.endAngle,j=Math.sqrt(n*n+l*l),b=Math.atan2(h-c,k-d)/g.rad;if(b>g.firstAngle){b-=360}return(b<=f&&b>a&&j>=m.startRho&&j<=m.endRho)},hideAll:function(){var e,b,g,f,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;da.x+a.width)?(h-(h+m-a.x-a.width)):h;g=(g-la.x+a.width)?(h-(h+m-a.x-a.width)):h;g=g-la.y+a.height)?(g-(g+l-a.y-a.height)):g}}if(!k.animate){f.setAttributes({x:h,y:g},true);f.show(true)}else{if(r){n=s.sprite.getActiveAnimation();if(n){n.on("afteranimate",function(){f.setAttributes({x:h,y:g},true);f.show(true)})}else{f.show(true)}}else{u.onAnimate(f,{to:{x:h,y:g}})}}},onPlaceCallout:function(j,l,A,w,v,c,g){var D=this,m=D.chart,t=m.surface,z=m.resizing,C=D.callouts,n=D.items,b=A.point,E,a=j.label.getBBox(),B=30,s=10,r=3,e,d,f,q,o,u=D.bbox,k,h;E=[Math.cos(Math.PI/4),-Math.sin(Math.PI/4)];k=b[0]+E[0]*B;h=b[1]+E[1]*B;e=k+(E[0]>0?0:-(a.width+2*r));d=h-a.height/2-r;f=a.width+2*r;q=a.height+2*r;if(e(u[0]+u[2])){E[0]*=-1}if(d(u[1]+u[3])){E[1]*=-1}k=b[0]+E[0]*B;h=b[1]+E[1]*B;e=k+(E[0]>0?0:-(a.width+2*r));d=h-a.height/2-r;f=a.width+2*r;q=a.height+2*r;if(m.animate){D.onAnimate(j.lines,{to:{path:["M",b[0],b[1],"L",k,h,"Z"]}},true);D.onAnimate(j.box,{to:{x:e,y:d,width:f,height:q}},true);D.onAnimate(j.label,{to:{x:k+(E[0]>0?r:-(a.width+r)),y:h}},true)}else{j.lines.setAttributes({path:["M",b[0],b[1],"L",k,h,"Z"]},true);j.box.setAttributes({x:e,y:d,width:f,height:q},true);j.label.setAttributes({x:k+(E[0]>0?r:-(a.width+r)),y:h},true)}for(o in j){j[o].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(c,g,e){var b,d=10,a=Math.abs;function f(h){var j=a(h[0]-c),i=a(h[1]-g);return Math.sqrt(j*j+i*i)}b=e.point;return(b[0]-d<=c&&b[0]+d>=c&&b[1]-d<=g&&b[1]+d>=g)}}); +/* +* Ext JS Library 4.0 +* Copyright(c) 2006-2011 Sencha Inc. +* licensing@sencha.com +* http://www.sencha.com/license +*/ +Ext.define("MyDesktop.SystemStatus",{extend:"Ext.ux.desktop.Module",requires:["Ext.chart.*"],id:"systemstatus",refreshRate:500,init:function(){Ext.chart.theme.Memory=Ext.extend(Ext.chart.theme.Base,{constructor:function(a){Ext.chart.theme.Memory.superclass.constructor.call(this,Ext.apply({colors:["rgb(244, 16, 0)","rgb(248, 130, 1)","rgb(0, 7, 255)","rgb(84, 254, 0)"]},a))}})},createNewWindow:function(){var a=this,b=a.app.getDesktop();a.cpuLoadData=[];a.cpuLoadStore=Ext.create("store.json",{fields:["core1","core2"]});a.memoryArray=["Wired","Active","Inactive","Free"];a.memoryStore=Ext.create("store.json",{fields:["name","memory"],data:a.generateData(a.memoryArray)});a.pass=0;a.processArray=["explorer","monitor","charts","desktop","Ext3","Ext4"];a.processesMemoryStore=Ext.create("store.json",{fields:["name","memory"],data:a.generateData(a.processArray)});a.generateCpuLoad();return b.createWindow({id:"systemstatus",title:"System Status",width:800,height:600,animCollapse:false,constrainHeader:true,border:false,layout:"fit",listeners:{afterrender:{fn:a.updateCharts,delay:100},destroy:function(){clearTimeout(a.updateTimer);a.updateTimer=null},scope:a},items:[{xtype:"panel",layout:{type:"hbox",align:"stretch"},items:[{flex:1,height:600,width:400,xtype:"container",layout:{type:"vbox",align:"stretch"},items:[a.createCpu1LoadChart(),a.createCpu2LoadChart()]},{flex:1,width:400,height:600,xtype:"container",layout:{type:"vbox",align:"stretch"},items:[a.createMemoryPieChart(),a.createProcessChart()]}]}]})},createWindow:function(){var a=this.app.getDesktop().getWindow(this.id);if(!a){a=this.createNewWindow()}a.show();return a},createCpu1LoadChart:function(){return{flex:1,xtype:"chart",theme:"Category1",animate:false,store:this.cpuLoadStore,legend:{position:"bottom"},axes:[{type:"Numeric",position:"left",minimum:0,maximum:100,fields:["core1"],title:"CPU Load",grid:true,labelTitle:{font:"13px Arial"},label:{font:"11px Arial"}}],series:[{title:"Core 1 (3.4GHz)",type:"line",lineWidth:4,showMarkers:false,fill:true,axis:"right",xField:"time",yField:"core1",style:{"stroke-width":1}}]}},createCpu2LoadChart:function(){return{flex:1,xtype:"chart",theme:"Category2",animate:false,store:this.cpuLoadStore,legend:{position:"bottom"},axes:[{type:"Numeric",position:"left",minimum:0,maximum:100,grid:true,fields:["core2"],title:"CPU Load",labelTitle:{font:"13px Arial"},label:{font:"11px Arial"}}],series:[{title:"Core 2 (3.4GHz)",type:"line",lineWidth:4,showMarkers:false,fill:true,axis:"right",xField:"time",yField:"core2",style:{"stroke-width":1}}]}},createMemoryPieChart:function(){var a=this;return{flex:1,xtype:"chart",animate:{duration:250},store:this.memoryStore,shadow:true,legend:{position:"right"},insetPadding:40,theme:"Memory:gradients",series:[{donut:30,type:"pie",field:"memory",showInLegend:true,tips:{trackMouse:true,width:140,height:28,renderer:function(d,c){var b=0;a.memoryStore.each(function(e){b+=e.get("memory")});this.setTitle(d.get("name")+": "+Math.round(d.get("memory")/b*100)+"%")}},highlight:{segment:{margin:20}},labelTitle:{font:"13px Arial"},label:{field:"name",display:"rotate",contrast:true,font:"12px Arial"}}]}},createProcessChart:function(){return{flex:1,xtype:"chart",theme:"Category1",store:this.processesMemoryStore,animate:{easing:"ease-in-out",duration:750},axes:[{type:"Numeric",position:"left",minimum:0,maximum:10,fields:["memory"],title:"Memory",labelTitle:{font:"13px Arial"},label:{font:"11px Arial"}},{type:"Category",position:"bottom",fields:["name"],title:"System Processes",labelTitle:{font:"bold 14px Arial"},label:{rotation:{degrees:45}}},{type:"Numeric",position:"top",fields:["memory"],title:"Memory Usage",labelTitle:{font:"bold 14px Arial"},label:{fill:"#FFFFFF",stroke:"#FFFFFF"},axisStyle:{fill:"#FFFFFF",stroke:"#FFFFFF"}}],series:[{title:"Processes",type:"column",xField:"name",yField:"memory",renderer:function(g,c,b,f,e){var a=Ext.draw.Color.fromString("#b1da5a"),h=c.get("memory"),d;if(h>5){d=a.getDarker((h-5)/15).toString()}else{d=a.getLighter(((5-h)/20)).toString()}if(h>=8){d="#CD0000"}return Ext.apply(b,{fill:d})}}]}},generateCpuLoad:function(){var c=this,e=c.cpuLoadData;function a(f){var g=f+((Math.floor(Math.random()*2)%2)?-1:1)*Math.floor(Math.random()*9);if(g<0||g>100){g=50}return g}if(e.length===0){e.push({core1:0,core2:0,time:0});for(var b=1;b<100;b++){e.push({core1:a(e[b-1].core1),core2:a(e[b-1].core2),time:b})}c.cpuLoadStore.loadData(e)}else{c.cpuLoadStore.data.removeAt(0);c.cpuLoadStore.data.each(function(g,f){g.data.time=f});var d=c.cpuLoadStore.last().data;c.cpuLoadStore.loadData([{core1:a(d.core1),core2:a(d.core2),time:d.time+1}],true)}},generateData:function(e){var d=[],b,c=e.length,a;for(b=0;b','','',{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)?" ":"​",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 g=this,f=[],i=Ext.tip.QuickTipManager&&Ext.tip.QuickTipManager.isEnabled(),d=Ext.baseCSSPrefix,c,h,b;function a(l,j,k){return{itemId:l,cls:d+"btn-icon",iconCls:d+"edit-"+l,enableToggle:j!==false,scope:e,handler:k||e.relayBtnCmd,clickEvent:"mousedown",tooltip:i?e.buttonTips[l]||b:b,overflowText:e.buttonTips[l].title||b,tabIndex:-1}}if(g.enableFont&&!Ext.isSafari2){c=Ext.widget("component",{renderTpl:['"],renderData:{cls:d+"font-select",fonts:g.fontFamilies,defaultFont:g.defaultFont},childEls:["selectEl"],onDisable:function(){var j=this.selectEl;if(j){j.dom.disabled=true}Ext.Component.superclass.onDisable.apply(this,arguments)},onEnable:function(){var j=this.selectEl;if(j){j.dom.disabled=false}Ext.Component.superclass.onEnable.apply(this,arguments)}});f.push(c,"-")}if(g.enableFormat){f.push(a("bold"),a("italic"),a("underline"))}if(g.enableFontSize){f.push("-",a("increasefontsize",false,g.adjustFont),a("decreasefontsize",false,g.adjustFont))}if(g.enableColors){f.push("-",{itemId:"forecolor",cls:d+"btn-icon",iconCls:d+"edit-forecolor",overflowText:e.buttonTips.forecolor.title,tooltip:i?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(k,j){g.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+j:j);g.deferFocus();this.up("menu").hide()}}]})},{itemId:"backcolor",cls:d+"btn-icon",iconCls:d+"edit-backcolor",overflowText:e.buttonTips.backcolor.title,tooltip:i?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(k,j){if(Ext.isGecko){g.execCmd("useCSS",false);g.execCmd("hilitecolor",j);g.execCmd("useCSS",true);g.deferFocus()}else{g.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+j:j);g.deferFocus()}this.up("menu").hide()}}]})})}if(g.enableAlignments){f.push("-",a("justifyleft"),a("justifycenter"),a("justifyright"))}if(!Ext.isSafari2){if(g.enableLinks){f.push("-",a("createlink",false,g.createLink))}if(g.enableLists){f.push("-",a("insertorderedlist"),a("insertunorderedlist"))}if(g.enableSourceEdit){f.push("-",a("sourceedit",true,function(j){g.toggleSourceEdit(!g.sourceEditMode)}))}}h=Ext.widget("toolbar",{renderTo:g.toolbarWrap,enableOverflow:true,items:f});if(c){g.fontSelect=c.selectEl;g.mon(g.fontSelect,"change",function(){g.relayCmd("fontname",g.fontSelect.dom.value);g.deferFocus()})}g.mon(h.el,"click",function(j){j.preventDefault()});g.toolbar=h},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('',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 f=this,d=f.iframeEl,a=f.textareaEl,e=Ext.baseCSSPrefix+"hidden",c=f.getToolbar().getComponent("sourceedit");if(!Ext.isBoolean(b)){b=!f.sourceEditMode}f.sourceEditMode=b;if(c.pressed!==b){c.toggle(b)}if(b){f.disableItems(true);f.syncValue();d.addCls(e);a.removeCls(e);a.dom.removeAttribute("tabIndex");a.focus()}else{if(f.initialized){f.disableItems(f.readOnly)}f.pushValue();d.removeCls(e);a.addCls(e);a.dom.setAttribute("tabIndex",-1);f.deferFocus()}f.fireEvent("editmodechange",f,b);f.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='
'+d+"
"}}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 f=this,d=f.getEditorBody(),b=f.textareaEl.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),h,c;b["background-attachment"]="fixed";d.bgProperties="fixed";Ext.DomHelper.applyStyles(d,b);h=f.getDoc();if(h){try{Ext.EventManager.removeAll(h)}catch(g){}}c=Ext.Function.bind(f.onEditorEvent,f);Ext.EventManager.on(h,{mousedown:c,dblclick:c,click:c,keyup:c,buffer:100});c=f.onRelayedEvent;Ext.EventManager.on(h,{mousedown:c,mousemove:c,mouseup:c,click:c,dblclick:c,scope:f});if(Ext.isGecko){Ext.EventManager.on(h,"keypress",f.applyCommand,f)}if(f.fixKeys){Ext.EventManager.on(h,"keydown",f.fixKeys,f)}Ext.EventManager.on(window,"unload",f.beforeDestroy,f);h.editorInitialized=true;f.initialized=true;f.pushValue();f.setReadOnly(f.readOnly);f.fireEvent("initialize",f)}catch(a){}},beforeDestroy:function(){var a=this,d=a.monitorTask,c,f;if(d){Ext.TaskManager.stop(d)}if(a.rendered){try{c=a.getDoc();if(c){Ext.EventManager.removeAll(c);for(f in c){if(c.hasOwnProperty(f)){delete c[f]}}}}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,f,a,c;if(e.readOnly){return}if(!e.activated){e.onFirstFocus();return}d=e.getToolbar().items.map;f=e.getDoc();if(e.enableFont&&!Ext.isSafari2){a=(f.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(g){d[g].toggle(f.queryCommandState(g))})}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,f=d.getCharCode(),b;if(f>0){f=String.fromCharCode(f);switch(f){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(g){var c=this,b=g.getKey(),f=c.getDoc(),a,d;if(b===g.TAB){g.stopEvent();a=f.selection.createRange();if(a){a.collapse(true);a.pasteHTML("    ");c.deferFocus()}}else{if(b===g.ENTER){a=f.selection.createRange();if(a){d=a.parentElement();if(!d||d.tagName.toLowerCase()!=="li"){g.stopEvent();a.pasteHTML("
");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","    ");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","

");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 JS Library 4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.define("MyDesktop.Notepad",{extend:"Ext.ux.desktop.Module",requires:["Ext.form.field.HtmlEditor"],id:"notepad",init:function(){this.launcher={text:"Notepad",iconCls:"notepad",handler:this.createWindow,scope:this}},createWindow:function(){var b=this.app.getDesktop();var a=b.getWindow("notepad");if(!a){a=b.createWindow({id:"notepad",title:"Notepad",width:600,height:400,iconCls:"notepad",animCollapse:false,border:false,hideMode:"offsets",layout:"fit",items:[{xtype:"htmleditor",id:"notepad-editor",value:['Some rich text goes here
',"Give it a try!"].join("")}]})}a.show();return a}}); +/* + * Ext JS Library 4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.define("MyDesktop.App",{extend:"Ext.ux.desktop.App",requires:["Ext.window.MessageBox","Ext.ux.desktop.ShortcutModel","MyDesktop.SystemStatus","MyDesktop.VideoWindow","MyDesktop.GridWindow","MyDesktop.TabWindow","MyDesktop.AccordionWindow","MyDesktop.Notepad","MyDesktop.BogusMenuModule","MyDesktop.BogusModule","MyDesktop.Settings"],init:function(){this.callParent()},getModules:function(){return[new MyDesktop.VideoWindow(),new MyDesktop.SystemStatus(),new MyDesktop.GridWindow(),new MyDesktop.TabWindow(),new MyDesktop.AccordionWindow(),new MyDesktop.Notepad(),new MyDesktop.BogusMenuModule(),new MyDesktop.BogusModule()]},getDesktopConfig:function(){var b=this,a=b.callParent();return Ext.apply(a,{contextMenuItems:[{text:"Change Settings",handler:b.onSettings,scope:b}],shortcuts:Ext.create("Ext.data.Store",{model:"Ext.ux.desktop.ShortcutModel",data:[{name:"Grid Window",iconCls:"grid-shortcut",module:"grid-win"},{name:"Accordion Window",iconCls:"accordion-shortcut",module:"acc-win"},{name:"Notepad",iconCls:"notepad-shortcut",module:"notepad"},{name:"System Status",iconCls:"cpu-shortcut",module:"systemstatus"}]}),wallpaper:"wallpapers/Blue-Sencha.jpg",wallpaperStretch:false})},getStartConfig:function(){var b=this,a=b.callParent();return Ext.apply(a,{title:"Don Griffin",iconCls:"user",height:300,toolConfig:{width:100,items:[{text:"Settings",iconCls:"settings",handler:b.onSettings,scope:b},"-",{text:"Logout",iconCls:"logout",handler:b.onLogout,scope:b}]}})},getTaskbarConfig:function(){var a=this.callParent();return Ext.apply(a,{quickStart:[{name:"Accordion Window",iconCls:"accordion",module:"acc-win"},{name:"Grid Window",iconCls:"icon-grid",module:"grid-win"}],trayItems:[{xtype:"trayclock",flex:1}]})},onLogout:function(){Ext.Msg.confirm("Logout","Are you sure you want to logout?")},onSettings:function(){var a=new MyDesktop.Settings({desktop:this.desktop});a.show()}});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.Layer",{uses:["Ext.Shadow"],statics:{shims:[]},extend:"Ext.Element",constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,f=b.parentEl,e=f?Ext.getDom(f):document.body,g=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(g){c.setVisibilityMode(Ext.Element[g.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 i=this,m=i.shadow,g,e,a;if(!i.updating&&i.isVisible()&&(m||i.useShim)){var d=i.getShim(),c=i.getLeft(true),n=i.getTop(true),k=i.dom.offsetWidth,f=i.dom.offsetHeight,j;if(m&&!i.shadowDisabled){if(b&&!m.isVisible()){m.show(i)}else{m.realign(c,n,k,f)}if(d){j=d.getStyle("z-index");if(j>i.zindex){i.shim.setStyle("z-index",i.zindex-2)}d.show();if(m.isVisible()){g=m.el.getXY();e=d.dom.style;a=m.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;g[0]-=2;g[1]-=4}e.left=(g[0])+"px";e.top=(g[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(k,f);d.setLeftTop(c,n)}}}else{if(d){j=d.getStyle("z-index");if(j>i.zindex){i.shim.setStyle("z-index",i.zindex-2)}d.show();d.setSize(k,f);d.setLeftTop(c,n)}}}return i},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 f=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),k=Ext.getDoc().getScroll(),j=this.getXY(),g=j[0],e=j[1],a=this.shadowOffset,i=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((g+i)>f+k.left){g=f-i-a;d=true}if((e+c)>b+k.top){e=b-c-a;d=true}if(gSafari.'}else{g+=" or "+b+"."}}}}var e=this.getSize();var c=Ext.copyTo({tag:"video",width:e.width,height:e.height},this,"poster,start,loopstart,loopend,playcount,autobuffer,loop");if(this.autoplay){c.autoplay=1}if(this.controls){c.controls=1}if(Ext.isArray(this.src)){c.children=[];for(var d=0,a=this.src.length;d'],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.util.CSS",function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,f){return f.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(h,k){var g,f=c.getElementsByTagName("head")[0],j=c.createElement("style");j.setAttribute("type","text/css");if(k){j.setAttribute("id",k)}if(Ext.isIE){f.appendChild(j);g=j.styleSheet;g.cssText=h}else{try{j.appendChild(c.createTextNode(h))}catch(i){j.cssText=h}f.appendChild(j);g=j.styleSheet?j.styleSheet:(j.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(g);return g},removeStyleSheet:function(f){var e=document.getElementById(f);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(h,e){var g=document;this.removeStyleSheet(h);var f=g.createElement("link");f.setAttribute("rel","stylesheet");f.setAttribute("type","text/css");f.setAttribute("id",h);f.setAttribute("href",e);g.getElementsByTagName("head")[0].appendChild(f)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(k){if(!d){d={}}try{var n=k.cssRules||k.rules,l,h=n.length-1,f,g;for(;h>=0;--h){l=n[h].selectorText;if(l){l=l.split(",");g=l.length;for(f=0;ff){g.layout.align="stretch";g.setCalculatedSize(g.getWidth(),a.getHeight(),g.ownerCt);delete g.layout.align;c=g.up("tablepanel")}else{if(f>b){d=f;this.align="stretch";a.setCalculatedSize(a.getWidth(),g.getHeight(),a.ownerCt);delete this.align;c=a.up("tablepanel")}}k.componentLayout.layoutBusy=false;j=m[0].layout.getLayoutItems().concat(m[1].layout.getLayoutItems())}else{d=this.getRenderTarget().getViewSize().height;j=l.getLayoutItems()}h=j.length;for(;e',"",'','','',"","","{[this.openRows()]}","{row}",'',"{[this.embedFeature(values, parent, xindex, xcount)]}","","{[this.closeRows()]}","","","{[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''},closeRows:function(){return""},metaRowTpl:['','','
{{id}}
',"
",""],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(j,b){var h,g={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},f={},c=j.features||[],l=c.length,e=0,k={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;e',stretch:false,wallpaper:null,afterRender:function(){var a=this;a.callParent();a.setWallpaper(a.wallpaper,a.stretch)},applyState:function(){var b=this,a=b.wallpaper;b.callParent(arguments);if(a!=b.wallpaper){b.setWallpaper(b.wallpaper)}},getState:function(){return this.wallpaper&&{wallpaper:this.wallpaper}},setWallpaper:function(b,a){var c=this,e,d;c.stretch=(a!==false);c.wallpaper=b;if(c.rendered){e=c.el.dom.firstChild;if(!b||b==Ext.BLANK_IMAGE_URL){Ext.fly(e).hide()}else{if(c.stretch){e.src=b;c.el.removeCls("ux-wallpaper-tiled");Ext.fly(e).setStyle({width:"100%",height:"100%"}).show()}else{Ext.fly(e).hide();d="url("+b+")";c.el.addCls("ux-wallpaper-tiled")}}c.el.setStyle({backgroundImage:d||""})}return c}}); +/* + * Ext JS Library 4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.define("Ext.ux.desktop.FitAllLayout",{extend:"Ext.layout.container.AbstractFit",alias:"layout.fitall",onLayout:function(){var b=this;b.callParent();var a=b.getLayoutTargetSize();b.owner.items.each(function(c){b.setItemBox(c,a)})},getTargetBox:function(){return this.getLayoutTargetSize()},setItemBox:function(c,b){var a=this;if(c&&b.height>0){if(c.layoutManagedWidth==2){b.width=undefined}if(c.layoutManagedHeight==2){b.height=undefined}c.getEl().position("absolute",null,0,0);a.setItemSize(c,b.width,b.height)}}}); +/* + * Ext JS Library 4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.define("MyDesktop.WallpaperModel",{extend:"Ext.data.Model",fields:[{name:"text"},{name:"img"}]});Ext.define("Ext.grid.Scroller",{extend:"Ext.Component",alias:"widget.gridscroller",weight:110,baseCls:Ext.baseCSSPrefix+"scroller",focusable:false,reservedSpace:0,renderTpl:['
','
',"
"],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 g=this,c=g.getPanel(),f=1,b=1,d,h;if(!g.vertical){var e=c.query("tableview"),a=e[1]||e[0];if(!a){return false}f=a.headerCt.getFullWidth();if(Ext.isIEQuirks){f--}}else{d=c.down("tableview:not([lockableInjected])");if(!d||!d.el){return false}h=d.el.child("table",true);if(!h){return false}b=h.offsetHeight}if(isNaN(f)){f=1}if(isNaN(b)){b=1}return{width:f,height:b}},invalidate:function(d){var f=this,e=f.stretchEl;if(!e||!f.ownerCt){return}var i=f.getSizeCalculation(),h=f.scrollEl,b=h.dom,c=f.reservedSpace,g,a=5;if(i){e.setSize(i);i=f.el.getSize(true);if(f.vertical){i.width+=a;i.height-=c;g="left"}else{i.width-=c;i.height+=a;g="top"}h.setSize(i);b.style[g]=(-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.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:['',"{text}","",'','target="{hrefTarget}" hidefocus="true" unselectable="on">','','style="margin-right: 17px;" >{text}','','',"","",""],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.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(f){var g=this.menu,b=g.items,d=g.focusedItem,c=d?b.indexOf(d):-1,a=c+f;while(a!=c){if(a<0){a=b.length-1}else{if(a>=b.length){a=0}}var e=b.getAt(a);if(g.canActivateItem(e)){g.setActiveItem(e);break}a+=f}},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,f=d.focusedItem,a=d.activeItem,b;if(f&&this.isWhitelisted(f)){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.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(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=n.matrix[q][l]*r[l][o]}g[q][o]=j}}n.matrix=g},prepend:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=r[q][l]*n.matrix[l][o]}g[q][o]=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,g){c=Ext.draw.Draw.rad(c);var e=this,f=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(f,d,-d,f,b,g);e.add(1,0,0,1,-b,-g)},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(f){return f[0]*f[0]+f[1]*f[1]}function b(f){var g=Math.sqrt(d(f));f[0]/=g;f[1]/=g}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.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(h){h=Ext.apply({},h);var e=this,d=e.target,i=Ext.isDefined(h.loadMask)?h.loadMask:e.loadMask,b=Ext.apply({},h.params),a=Ext.apply({},h.ajaxOptions),f=h.callback||e.callback,g=h.scope||e.scope||e,c;Ext.applyIf(a,e.ajaxOptions);Ext.applyIf(h,a);Ext.applyIf(b,e.params);Ext.apply(b,e.baseParams);Ext.applyIf(h,{url:e.url});Ext.apply(h,{scope:e,params:b,callback:e.onComplete});if(e.fireEvent("beforeload",e,h)===false){return}if(i){e.addMask(i)}c=Ext.Ajax.request(h);e.active={request:c,options:h,mask:i,scope:g,callback:f,success:h.success||e.success,failure:h.failure||e.failure,renderer:h.renderer||e.renderer,scripts:Ext.isDefined(h.scripts)?h.scripts:e.scripts};e.setOptions(e.active,h)},setOptions:Ext.emptyFn,onComplete:function(b,g,a){var d=this,f=d.active,c=f.scope,e=d.getRenderer(f.renderer);if(g){g=e.call(d,d,a,f)}if(g){Ext.callback(f.success,c,[d,a,b]);d.fireEvent("load",d,a,b)}else{Ext.callback(f.failure,c,[d,a,b]);d.fireEvent("exception",d,a,b)}Ext.callback(f.callback,c,[d,g,a,b]);if(f.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.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",clear:function(){}});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",renderTpl:['','
 
',"
"],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.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.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.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(c){var f=this,h=[],a=f.eventRelayRe,b=c.locked.getView(),g=c.normal.getView(),d,e;Ext.apply(f,{lockedView:b,normalView:g,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});f.mixins.observable.constructor.call(f,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&&a.test(e)){h.push(e)}}f.relayEvents(b,h);f.relayEvents(g,h);g.on({scope:f,itemmouseleave:f.onItemMouseLeave,itemmouseenter:f.onItemMouseEnter});b.on({scope:f,itemmouseleave:f.onItemMouseLeave,itemmouseenter:f.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 f=this,d=f.lockedView,a=f.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.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 i=this,f=i.el,k,d,c,n,m,q,a,j,g,p,o;o=i.sprite;p=o.getBBox();try{k=Ext.Element.getXY(f)}catch(h){}if(!k){return null}d=k[0];c=d+p.width;n=k[1];m=n+p.height;return Ext.create("Ext.util.Region",n,c,m,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(h){var g=h.getXY(),f=this,d=f.sprite,a=d.attr,c,b;g=f.sprite.surface.transformToViewBox(g[0],g[1]);c=g[0]-f.prev[0];b=g[1]-f.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);f.prev=g},setDragElPos:function(){return false}});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.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=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,f=d.getRelatedTarget(),a=!c.el.contains(f),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,f,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,f||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 f=this,g=f.el.getY(),h,e,b,i=g,j,d,a,c;delete f.height;f.setSize();e=f.getHeight();if(f.floating){d=Ext.fly(f.el.getScopeParent());a=d.getScroll().top;c=d.getViewSize().height;j=g-a;h=f.maxHeight?f.maxHeight:c-j;if(e>c){h=c;i=g-j}else{if(hh&&h>0){f.layout.autoSize=false;f.setHeight(h);if(f.showSeparator){f.iconSepEl.setHeight(f.layout.getRenderTarget().dom.scrollHeight)}}b=f.getConstrainVector(f.el.getScopeParent());if(b){f.setPosition(f.getPosition()[0]+b[0])}f.el.setY(i)}});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,f,d){var e=this,b=e.getReader(),a=b.read(e.data);Ext.apply(c,{resultSet:a});c.setCompleted();c.setSuccessful();Ext.callback(f,d||e,[c])},clear:Ext.emptyFn});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:["",'',"",'tabIndex="{tabIdx}" ','class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"",'',"",{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.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 j=this,c=0,h=j.getLayoutItems(),g=h.length,b=(j.regions={}),e=[],f=[],a=0,l=0,d,k;j.splitters={};for(;cl[g]){Ext.fly(h[g]).setHeight(b[g])}else{if(b[g]-1)&&(o[n] in f)){o[n]=f[o[n]]}if(n in r){c.dom.setAttribute(n,r[n](o[n],q,l))}else{c.dom.setAttribute(n,o[n])}}}if(q.type=="text"){l.tuneText(q,o)}b=h.style;if(b){c.setStyle(b)}q.dirty=false;if(Ext.isSafari3){l.webkitRect.show();setTimeout(function(){l.webkitRect.hide()})}},setClip:function(b,f){var e=this,d=f["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 f=this,b=f.items,a=b.indexOf(d),e=d.el,c;if(f.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||f.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=Ext.create("Ext.draw.Sprite",a);b.surface=this;return b},addGradient:function(g){g=Ext.draw.Draw.parseGradient(g);var e=this,d=g.stops.length,a=g.vector,k=Ext.isSafari&&!Ext.isStrict,h,f,j,c,b;b=e.gradientsMap||{};if(!k){if(g.type=="linear"){h=e.createSvgElement("linearGradient");h.setAttribute("x1",a[0]);h.setAttribute("y1",a[1]);h.setAttribute("x2",a[2]);h.setAttribute("y2",a[3])}else{h=e.createSvgElement("radialGradient");h.setAttribute("cx",g.centerX);h.setAttribute("cy",g.centerY);h.setAttribute("r",g.radius);if(Ext.isNumber(g.focalX)&&Ext.isNumber(g.focalY)){h.setAttribute("fx",g.focalX);h.setAttribute("fy",g.focalY)}}h.id=g.id;e.getDefs().appendChild(h);for(c=0;c")}a.W=g.span.offsetWidth;a.H=g.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*i),Math.round(a.Y*i),Math.round(a.X*i)+1);h.bbox.plain=null;h.bbox.transform=null;h.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,k=d.viewBox,a=d.width,g=d.height,f,e,i,b,h,c,j;if(k&&(a||g)){f=k.x;e=k.y;i=k.width;b=k.height;h=g/b;c=a/i;if(i*h')}}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(j){var g=this,h=Ext.create("Ext.draw.Matrix"),e,c,a,d,f=0,b=g.viewBoxShift;for(c=j.transformations,a=c.length;f32767){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}}p.offset=d}else{if(p){p.matrix="1 0 0 1";p.offset="0 0"}j=k.split();if(j.isSimple){f.filter="";i.setSimpleCoords(l,j.scaleX,j.scaleY,j.translateX,j.translateY,j.rotate/Math.PI*180)}else{f.filter=k.toFilter();var g=i.getBBox(l),q=g.x-l.x,m=g.y-l.y;e.coordorigin=(q*-o)+" "+(m*-o);if(n){e.removeChild(n);n.position=q+" "+m;n.size=l.width*l.scale.x+" "+l.height*1.1;e.appendChild(n)}}}},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(f,e){f=parseInt(f,10);e=parseInt(e,10);return f>e?1:(fm.items.indexOf(h))){n--}if(m!==i){m.suspendLayout=true;m.remove(h,false);m.suspendLayout=false}if(m.isGroupHeader){if(!m.items.getCount()){l=m.ownerCt;l.suspendLayout=true;l.remove(m,false);m.el.dom.parentNode.removeChild(m.el.dom);l.suspendLayout=false}else{m.minWidth=m.getWidth()-h.getWidth();m.setWidth(m.minWidth)}}i.suspendLayout=true;if(m===i){i.move(a,n)}else{i.insert(n,h)}i.suspendLayout=false;if(i.isGroupHeader){h.savedFlex=h.flex;delete h.flex;h.width=h.getWidth();i.minWidth=i.getWidth()+h.getWidth()-(h.savedFlex?1:0);i.setWidth(i.minWidth)}else{if(h.savedFlex){h.flex=h.savedFlex;delete h.width}}c.purgeCache();c.doLayout();c.onHeaderMoved(h,a,n);if(!m.items.getCount()){m.destroy()}}}}}});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.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(g,h,f){if(f){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(r,l){var s=this,c=s.activeResizeHandle.region,f=s.getOffset(s.constrainTo?"dragTarget":null),j=s.startBox,g,o=0,t=0,i,p,a=0,v=0,u,m=f[0]<0?"right":"left",q=f[1]<0?"down":"up",h,b;switch(c){case"south":t=f[1];b=2;break;case"north":t=-f[1];v=-t;b=2;break;case"east":o=f[0];b=1;break;case"west":o=-f[0];a=-o;b=1;break;case"northeast":t=-f[1];v=-t;o=f[0];h=[j.x,j.y+j.height];b=3;break;case"southeast":t=f[1];o=f[0];h=[j.x,j.y];b=3;break;case"southwest":o=-f[0];a=-o;t=f[1];h=[j.x+j.width,j.y];b=3;break;case"northwest":t=-f[1];v=-t;o=-f[0];a=-o;h=[j.x+j.width,j.y+j.height];b=3;break}var d={width:j.width+o,height:j.height+t,x:j.x+a,y:j.y+v};i=Ext.Number.snap(d.width,s.widthIncrement);p=Ext.Number.snap(d.height,s.heightIncrement);if(i!=d.width||p!=d.height){switch(c){case"northeast":d.y-=p-d.height;break;case"north":d.y-=p-d.height;break;case"southwest":d.x-=i-d.width;break;case"west":d.x-=i-d.width;break;case"northwest":d.x-=i-d.width;d.y-=p-d.height}d.width=i;d.height=p}if(d.widths.maxWidth){d.width=Ext.Number.constrain(d.width,s.minWidth,s.maxWidth);if(a){d.x=j.x+(j.width-d.width)}}else{s.lastX=d.x}if(d.heights.maxHeight){d.height=Ext.Number.constrain(d.height,s.minHeight,s.maxHeight);if(v){d.y=j.y+(j.height-d.height)}}else{s.lastY=d.y}if(s.preserveRatio||r.shiftKey){var n,k;g=s.startBox.width/s.startBox.height;n=Math.min(Math.max(s.minHeight,d.width/g),s.maxHeight);k=Math.min(Math.max(s.minWidth,d.height*g),s.maxWidth);if(b==1){d.height=n}else{if(b==2){d.width=k}else{u=Math.abs(h[0]-this.lastXY[0])/Math.abs(h[1]-this.lastXY[1]);if(u>g){d.height=n}else{d.width=k}if(c=="northeast"){d.y=j.y-(d.height-j.height)}else{if(c=="northwest"){d.y=j.y-(d.height-j.height);d.x=j.x-(d.width-j.width)}else{if(c=="southwest"){d.x=j.x-(d.width-j.width)}}}}}}if(t===0){q="none"}if(o===0){m="none"}s.resize(d,{horizontal:m,vertical:q},l)},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(g){var d=this,f=d.getPrevCmp(),a=d.getNextCmp(),c=d.getSplitter().collapseEl,b;if(c&&(g.getTarget()===d.getSplitter().collapseEl.dom)){return false}if(a.collapsed||f.collapsed){return false}b=d.overlay=Ext.getBody().createChild({cls:d.overlayCls,html:" "});b.unselectable();b.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));b.show();d.prevBox=f.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 f=this,a=f.getSplitter(),g=a.getWidth(),h=a.defaultSplitMin,b=a.orientation,d=f.prevBox,i=f.getPrevCmp(),c=f.nextBox,e=f.getNextCmp(),k,j;if(b==="vertical"){k=Ext.create("Ext.util.Region",d.y,(i.maxWidth?d.x+i.maxWidth:c.right-(e.minWidth||h))+g,d.bottom,d.x+(i.minWidth||h));j=Ext.create("Ext.util.Region",c.y,c.right-(e.minWidth||h),c.bottom,(e.maxWidth?c.right-e.maxWidth:d.x+(d.minWidth||h))-g)}else{k=Ext.create("Ext.util.Region",d.y+(i.minHeight||h),d.right,(i.maxHeight?d.y+i.maxHeight:c.bottom-(e.minHeight||h))+g,d.x);j=Ext.create("Ext.util.Region",(e.maxHeight?c.bottom-e.maxHeight:d.y+(i.minHeight||h))-g,c.right,c.bottom-(e.minHeight||h),c.x)}return k.intersect(j)},performResize:function(g){var i=this,c=i.getOffset("dragTarget"),a=i.getSplitter(),d=a.orientation,j=i.getPrevCmp(),h=i.getNextCmp(),b=a.ownerCt,f=b.getLayout();b.suspendLayout=true;if(d==="vertical"){if(j){if(!j.maintainFlex){delete j.flex;j.setSize(i.prevBox.width+c[0],j.getHeight())}}if(h){if(!h.maintainFlex){delete h.flex;h.setSize(i.nextBox.width-c[0],h.getHeight())}}}else{if(j){if(!j.maintainFlex){delete j.flex;j.setSize(j.getWidth(),i.prevBox.height+c[1])}}if(h){if(!h.maintainFlex){delete h.flex;h.setSize(j.getWidth(),i.nextBox.height-c[1])}}}delete b.suspendLayout;f.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(f){var c=this,g=c.getOffset("dragTarget"),d=c.getSplitter(),b=d.getEl(),a=d.orientation;if(a==="vertical"){b.setX(c.startRegion.left+g[0])}else{b.setY(c.startRegion.top+g[1])}},getSplitter:function(){return Ext.getCmp(this.getDragCt().id)}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:function(){if(Ext.supports.CSS3BoxShadow){return''}else{if(Ext.isIE){return''}else{return''}}}(),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,o,k,g){if(!this.el){return}var a=this.adjusts,i=this.el.dom,j=i.style,c,f,m,e,h,n;j.left=(b+a.l)+"px";j.top=(o+a.t)+"px";c=Math.max(k+a.w,0);f=Math.max(g+a.h,0);h=c+"px";n=f+"px";if(j.width!=h||j.height!=n){j.width=h;j.height=n;if(Ext.supports.CSS3BoxShadow){j.boxShadow="0 0 "+this.offset+"px 0 #888"}else{if(!Ext.isIE){m=i.childNodes;e=Math.max(0,(c-12))+"px";m[0].childNodes[1].style.width=e;m[1].childNodes[1].style.width=e;m[2].childNodes[1].style.width=e;m[1].style.height=Math.max(0,(f-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)}}});