/* This file is part of Sencha Touch 2.1 Copyright (c) 2011-2012 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2012-11-05 22:31:29 (08c91901ae8449841ff23e5d3fb404d6128d3b0b) */ (function(){var global=this,objectPrototype=Object.prototype,toString=objectPrototype.toString,enumerables=true,enumerablesTest={toString:1},emptyFn=function(){},i;if(typeof Ext==="undefined"){global.Ext={}}Ext.global=global;for(i in enumerablesTest){enumerables=null}if(enumerables){enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=enumerables;Ext.apply=function(object,config,defaults){if(defaults){Ext.apply(object,defaults)}if(object&&config&&typeof config==="object"){var i,j,k;for(i in config){object[i]=config[i]}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];if(config.hasOwnProperty(k)){object[k]=config[k]}}}}return object};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{emptyFn:emptyFn,baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(object,config){var property;if(object){for(property in config){if(object[property]===undefined){object[property]=config[property]}}}return object},iterate:function(object,fn,scope){if(Ext.isEmpty(object)){return}if(scope===undefined){scope=object}if(Ext.isIterable(object)){Ext.Array.each.call(Ext.Array,object,fn,scope)}else{Ext.Object.each.call(Ext.Object,object,fn,scope)}}});Ext.apply(Ext,{extend:function(){var objectConstructor=objectPrototype.constructor,inlineOverrides=function(o){for(var m in o){if(!o.hasOwnProperty(m)){continue}this[m]=o[m]}};return function(subclass,superclass,overrides){if(Ext.isObject(superclass)){overrides=superclass;superclass=subclass;subclass=overrides.constructor!==objectConstructor?overrides.constructor:function(){superclass.apply(this,arguments)}}var F=function(){},subclassProto,superclassProto=superclass.prototype;F.prototype=superclassProto;subclassProto=subclass.prototype=new F();subclassProto.constructor=subclass;subclass.superclass=superclassProto;if(superclassProto.constructor===objectConstructor){superclassProto.constructor=superclass}subclass.override=function(overrides){Ext.override(subclass,overrides)};subclassProto.override=inlineOverrides;subclassProto.proto=subclassProto;subclass.override(overrides);subclass.extend=function(o){return Ext.extend(subclass,o)};return subclass}}(),override:function(cls,overrides){if(cls.$isClass){return cls.override(overrides)}else{Ext.apply(cls.prototype,overrides)}}});Ext.apply(Ext,{valueFrom:function(value,defaultValue,allowBlank){return Ext.isEmpty(value,allowBlank)?defaultValue:value},typeOf:function(value){if(value===null){return"null"}var type=typeof value;if(type==="undefined"||type==="string"||type==="number"||type==="boolean"){return type}var typeToString=toString.call(value);switch(typeToString){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(type==="function"){return"function"}if(type==="object"){if(value.nodeType!==undefined){if(value.nodeType===3){return(/\S/).test(value.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(value,allowEmptyString){return(value===null)||(value===undefined)||(!allowEmptyString?value==="":false)||(Ext.isArray(value)&&value.length===0)},isArray:("isArray" in Array)?Array.isArray:function(value){return toString.call(value)==="[object Array]"},isDate:function(value){return toString.call(value)==="[object Date]"},isObject:(toString.call(null)==="[object Object]")?function(value){return value!==null&&value!==undefined&&toString.call(value)==="[object Object]"&&value.ownerDocument===undefined}:function(value){return toString.call(value)==="[object Object]"},isSimpleObject:function(value){return value instanceof Object&&value.constructor===Object},isPrimitive:function(value){var type=typeof value;return type==="string"||type==="number"||type==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(value){return toString.call(value)==="[object Function]"}:function(value){return typeof value==="function"},isNumber:function(value){return typeof value==="number"&&isFinite(value)},isNumeric:function(value){return !isNaN(parseFloat(value))&&isFinite(value)},isString:function(value){return typeof value==="string"},isBoolean:function(value){return typeof value==="boolean"},isElement:function(value){return value?value.nodeType===1:false},isTextNode:function(value){return value?value.nodeName==="#text":false},isDefined:function(value){return typeof value!=="undefined"},isIterable:function(value){return(value&&typeof value!=="string")?value.length!==undefined:false}});Ext.apply(Ext,{clone:function(item){if(item===null||item===undefined){return item}if(item.nodeType&&item.cloneNode){return item.cloneNode(true)}var type=toString.call(item);if(type==="[object Date]"){return new Date(item.getTime())}var i,j,k,clone,key;if(type==="[object Array]"){i=item.length;clone=[];while(i--){clone[i]=Ext.clone(item[i])}}else{if(type==="[object Object]"&&item.constructor===Object){clone={};for(key in item){clone[key]=Ext.clone(item[key])}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];clone[k]=item[k]}}}}return clone||item},getUniqueGlobalNamespace:function(){var uniqueGlobalNamespace=this.uniqueGlobalNamespace;if(uniqueGlobalNamespace===undefined){var i=0;do{uniqueGlobalNamespace="ExtBox"+(++i)}while(Ext.global[uniqueGlobalNamespace]!==undefined);Ext.global[uniqueGlobalNamespace]=Ext;this.uniqueGlobalNamespace=uniqueGlobalNamespace}return uniqueGlobalNamespace},functionFactory:function(){var args=Array.prototype.slice.call(arguments),ln=args.length;if(ln>0){args[ln-1]="var Ext=window."+this.getUniqueGlobalNamespace()+";"+args[ln-1]}return Function.prototype.constructor.apply(Function.prototype,args)},globalEval:("execScript" in global)?function(code){global.execScript(code)}:function(code){(function(){eval(code)})()}});Ext.type=Ext.typeOf})();(function(){var a="4.1.0",b;Ext.Version=b=Ext.extend(Object,{constructor:function(d){var c=this.toNumber,f,e;if(d instanceof b){return d}this.version=this.shortVersion=String(d).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");e=this.version.search(/([^\d\.])/);if(e!==-1){this.release=this.version.substr(e,d.length);this.shortVersion=this.version.substr(0,e)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");f=this.version.split(".");this.major=c(f.shift());this.minor=c(f.shift());this.patch=c(f.shift());this.build=c(f.shift());return this},toNumber:function(c){c=parseInt(c||0,10);if(isNaN(c)){c=0}return c},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(g,f){var d,e,c;g=new b(g).toArray();f=new b(f).toArray();for(c=0;ce){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,f,d){if(b.compare(Ext.getVersion(c),e)<1){f.call(d)}}});Ext.setVersion("core",a)})();Ext.String={trimRegex:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe:/('|\\)/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,htmlEncode:(function(){var d={"&":"&",">":">","<":"<",'"':"""},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+")","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){return d[f]})}})(),htmlDecode:(function(){var d={"&":"&",">":">","<":"<",""":'"'},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+"|&#[0-9]{1,5};)","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){if(f in d){return d[f]}else{return String.fromCharCode(parseInt(f.substr(2),10))}})}})(),urlAppend:function(b,a){if(!Ext.isEmpty(a)){return b+(b.indexOf("?")===-1?"?":"&")+a}return b},trim:function(a){return a.replace(Ext.String.trimRegex,"")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!==-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.String.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.String.escapeRe,"\\$1")},toggle:function(b,c,a){return b===c?a:c},leftPad:function(b,c,d){var a=String(b);d=d||" ";while(a.lengthH){for(C=e;C--;){F[z+C]=F[H+C]}}}if(J&&G===B){F.length=B;F.push.apply(F,I)}else{F.length=B+J;for(C=0;C-1;y--){if(A.call(z||C[y],C[y],y,C)===false){return y}}}return true},forEach:i?function(z,y,e){return z.forEach(y,e)}:function(B,z,y){var e=0,A=B.length;for(;ee){e=z}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(B){var y=0,e,A,z;for(e=0,A=B.length;e=c){f+=c}else{if(b*2<-c){f-=c}}}return Ext.Number.constrain(f,d,g)},toFixed:function(d,b){if(a){b=b||0;var c=Math.pow(10,b);return(Math.round(d*c)/c).toFixed(b)}return d.toFixed(b)},from:function(c,b){if(isFinite(c)){c=parseFloat(c)}return !isNaN(c)?c:b}}})();Ext.num=function(){return Ext.Number.from.apply(this,arguments)};(function(){var a=function(){};var b=Ext.Object={chain:("create" in Object)?function(c){return Object.create(c)}:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,j,d){var c=b.toQueryObjects,h=[],f,g;if(Ext.isArray(j)){for(f=0,g=j.length;f0){h=n.split("=");v=decodeURIComponent(h[0]);m=(h[1]!==undefined)?decodeURIComponent(h[1]):"";if(!q){if(t.hasOwnProperty(v)){if(!Ext.isArray(t[v])){t[v]=[t[v]]}t[v].push(m)}else{t[v]=m}}else{g=v.match(/(\[):?([^\]]*)\]/g);s=v.match(/^([^\[]+)/);v=s[0];k=[];if(g===null){t[v]=m;continue}for(o=0,c=g.length;o0){return setTimeout(e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){var g=c||Array.prototype.slice.call(arguments,0),f=d||this;if(a){clearTimeout(a)}a=setTimeout(function(){e.apply(f,g)},b)}},createThrottled:function(e,b,d){var f,a,c,h,g=function(){e.apply(d||this,c);f=new Date().getTime()};return function(){a=new Date().getTime()-f;c=arguments;clearTimeout(h);if(!f||(a>=b)){g()}else{h=setTimeout(g,b-a)}}},interceptBefore:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){var e=c.apply(this,arguments);d.apply(this,arguments);return e}},interceptAfter:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){d.apply(this,arguments);return c.apply(this,arguments)}}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");Ext.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(Ext.isObject(o)){return encodeObject(o)}else{if(typeof o==="function"){return"null"}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o){var a=["[",""],len=o.length,i;for(i=0;i0){for(d=0;d0){if(m===l){return o[m]}n=o[m];l=l.substring(m.length+1)}if(n.length>0){n+="/"}return n.replace(/\/\.\//g,"/")+l.replace(/\./g,"/")+".js"},getPrefix:function(m){var o=this.config.paths,n,l="";if(o.hasOwnProperty(m)){return m}for(n in o){if(o.hasOwnProperty(n)&&n+"."===m.substring(0,n.length+1)){if(n.length>l.length){l=n}}}return l},require:function(n,m,l,o){if(m){m.call(l)}},syncRequire:function(){},exclude:function(m){var l=this;return{require:function(p,o,n){return l.require(p,o,n,m)},syncRequire:function(p,o,n){return l.syncRequire(p,o,n,m)}}},onReady:function(o,n,p,l){var m;if(p!==false&&Ext.onDocumentReady){m=o;o=function(){Ext.onDocumentReady(m,n,l)}}o.call(n)}};Ext.apply(b,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:[],isClassFileLoaded:{},isFileLoaded:{},readyListeners:[],optionalRequires:[],requiresMap:{},numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:{},syncModeEnabled:false,scriptElements:{},refreshQueue:function(){var l=this.queue,r=l.length,o,q,m,p,n;if(r===0){this.triggerReady();return}for(o=0;othis.numLoadedFiles){continue}m=0;do{if(a.isCreated(p[m])){g(p,m,1)}else{m++}}while(m=200&&o<300)||o==304||(o==0&&r.length>0)){Ext.globalEval(r+"\n//@ sourceURL="+m);t.call(x)}else{}v=null}},syncRequire:function(){var l=this.syncModeEnabled;if(!l){this.syncModeEnabled=true}this.require.apply(this,arguments);if(!l){this.syncModeEnabled=false}this.refreshQueue()},require:function(G,u,o,r){var w={},n={},z=this.queue,D=this.classNameToFilePathMap,B=this.isClassFileLoaded,t=[],I=[],F=[],m=[],s,H,y,x,l,q,E,C,A,v,p;if(r){r=i(r);for(C=0,v=r.length;C0){t=a.getNamesByExpression(l);for(A=0,p=t.length;A0){s=function(){var L=[],K,M,J;for(K=0,M=m.length;K0){I=a.getNamesByExpression(x);p=I.length;for(A=0;A0){if(!this.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((F.length>1)?"es":"")+": "+F.join(", "))}}else{s.call(o);return this}H=this.syncModeEnabled;if(!H){z.push({requires:F.slice(),callback:s,scope:o})}v=F.length;for(C=0;C=2){if("1496x2048" in r){e(r["1496x2048"],"(orientation: landscape)")}if("1536x2008" in r){e(r["1536x2008"],"(orientation: portrait)")}if("144" in p){n(p["144"],"144x144",t)}}else{if("748x1024" in r){e(r["748x1024"],"(orientation: landscape)")}if("768x1004" in r){e(r["768x1004"],"(orientation: portrait)")}if("72" in p){n(p["72"],"72x72",t)}}}else{if(o>=2&&Ext.os.version.gtEq("4.3")){if(Ext.os.is.iPhone5){e(r["640x1096"])}else{e(r["640x920"])}if("114" in p){n(p["114"],"114x114",t)}}else{e(r["320x460"]);if("57" in p){n(p["57"],null,t)}}}},application:function(b){var a=b.name,e,d,c;if(!b){b={}}if(!Ext.Loader.config.paths[a]){Ext.Loader.setPath(a,b.appFolder||"app")}c=Ext.Array.from(b.requires);b.requires=["Ext.app.Application"];e=b.onReady;d=b.scope;b.onReady=function(){b.requires=c;new Ext.app.Application(b);if(e){e.call(d)}};Ext.setup(b)},factoryConfig:function(a,l){var g=Ext.isSimpleObject(a);if(g&&a.xclass){var f=a.xclass;delete a.xclass;Ext.require(f,function(){Ext.factoryConfig(a,function(i){l(Ext.create(f,i))})});return}var d=Ext.isArray(a),m=[],k,j,c,e;if(g||d){if(g){for(k in a){if(a.hasOwnProperty(k)){j=a[k];if(Ext.isSimpleObject(j)||Ext.isArray(j)){m.push(k)}}}}else{for(c=0,e=a.length;c=e){l(a);return}k=m[c];j=a[k];Ext.factoryConfig(j,h)}b();return}l(a)},factory:function(b,e,a,f){var d=Ext.ClassManager,c;if(!b||b.isInstance){if(a&&a!==b){a.destroy()}return b}if(f){if(typeof b=="string"){return d.instantiateByAlias(f+"."+b)}else{if(Ext.isObject(b)&&"type" in b){return d.instantiateByAlias(f+"."+b.type,b)}}}if(b===true){return a||d.instantiate(e)}if("xtype" in b){c=d.instantiateByAlias("widget."+b.xtype,b)}else{if("xclass" in b){c=d.instantiate(b.xclass,b)}}if(c){if(a){a.destroy()}return c}if(a){return a.setConfig(b)}return d.instantiate(e,b)},deprecateClassMember:function(b,c,a,d){return this.deprecateProperty(b.prototype,c,a,d)},deprecateClassMembers:function(b,c){var d=b.prototype,e,a;for(e in c){if(c.hasOwnProperty(e)){a=c[e];this.deprecateProperty(d,e,a)}}},deprecateProperty:function(b,c,a,d){if(!d){d="'"+c+"' is deprecated"}if(a){d+=", please use '"+a+"' instead"}if(a){Ext.Object.defineProperty(b,c,{get:function(){return this[a]},set:function(e){this[a]=e},configurable:true})}},deprecatePropertyValue:function(b,a,d,c){Ext.Object.defineProperty(b,a,{get:function(){return d},configurable:true})},deprecateMethod:function(b,a,d,c){b[a]=function(){if(d){return d.apply(this,arguments)}}},deprecateClassMethod:function(a,b,h,d){if(typeof b!="string"){var g,f;for(g in b){if(b.hasOwnProperty(g)){f=b[g];Ext.deprecateClassMethod(a,g,f)}}return}var c=typeof h=="string",e;if(!d){d="'"+b+"()' is deprecated, please use '"+(c?h:h.name)+"()' instead"}if(c){e=function(){return this[h].apply(this,arguments)}}else{e=function(){return h.apply(this,arguments)}}if(b in a.prototype){Ext.Object.defineProperty(a.prototype,b,{value:null,writable:true,configurable:true})}a.addMember(b,e)},isReady:false,readyListeners:[],triggerReady:function(){var b=Ext.readyListeners,a,c,d;if(!Ext.isReady){Ext.isReady=true;for(a=0,c=b.length;a0){return b+Ext.String.capitalize(a)}return a}},function(){var a=Ext.browser=new this(Ext.global.navigator.userAgent)});Ext.define("Ext.env.OS",{requires:["Ext.Version"],statics:{names:{ios:"iOS",android:"Android",webos:"webOS",blackberry:"BlackBerry",rimTablet:"RIMTablet",mac:"MacOS",win:"Windows",linux:"Linux",bada:"Bada",other:"Other"},prefixes:{ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"}},is:Ext.emptyFn,name:null,version:null,setFlag:function(a,b){if(typeof b=="undefined"){b=true}this.is[a]=b;this.is[a.toLowerCase()]=b;return this},constructor:function(m,b){var k=this.statics(),j=k.names,c=k.prefixes,a,h="",d,g,f,l,e;e=this.is=function(i){return this.is[i]===true};for(d in c){if(c.hasOwnProperty(d)){g=c[d];f=m.match(new RegExp("(?:"+g+")([^\\s;]+)"));if(f){a=j[d];if(f[1]&&(f[1]=="HTC_"||f[1]=="Silk/")){h=new Ext.Version("2.3")}else{h=new Ext.Version(f[f.length-1])}break}}}if(!a){a=j[(m.toLowerCase().match(/mac|win|linux/)||["other"])[0]];h=new Ext.Version("")}this.name=a;this.version=h;if(b){this.setFlag(b.replace(/ simulator$/i,""))}this.setFlag(a);if(h){this.setFlag(a+(h.getMajor()||""));this.setFlag(a+h.getShortVersion())}for(d in j){if(j.hasOwnProperty(d)){l=j[d];if(!e.hasOwnProperty(a)){this.setFlag(l,(a===l))}}}if(this.name=="iOS"&&window.screen.height==568){this.setFlag("iPhone5")}return this}},function(){var a=Ext.global.navigator,e=a.userAgent,b,g,d;Ext.os=b=new this(e,a.platform);g=b.name;var c=window.location.search.match(/deviceType=(Tablet|Phone)/),f=window.deviceType;if(c&&c[1]){d=c[1]}else{if(f==="iPhone"){d="Phone"}else{if(f==="iPad"){d="Tablet"}else{if(!b.is.Android&&!b.is.iOS&&/Windows|Linux|MacOS/.test(g)){d="Desktop";Ext.browser.is.WebView=false}else{if(b.is.iPad||b.is.Android3||(b.is.Android4&&e.search(/mobile/i)==-1)){d="Tablet"}else{d="Phone"}}}}}b.setFlag(d,true);b.deviceType=d});Ext.define("Ext.env.Feature",{requires:["Ext.env.Browser","Ext.env.OS"],constructor:function(){this.testElements={};this.has=function(a){return !!this.has[a]};return this},getTestElement:function(a,b){if(a===undefined){a="div"}else{if(typeof a!=="string"){return a}}if(b){return document.createElement(a)}if(!this.testElements[a]){this.testElements[a]=document.createElement(a)}return this.testElements[a]},isStyleSupported:function(c,b){var d=this.getTestElement(b).style,a=Ext.String.capitalize(c);if(typeof d[c]!=="undefined"||typeof d[Ext.browser.getStylePrefix(c)+a]!=="undefined"){return true}return false},isEventSupported:function(c,a){if(a===undefined){a=window}var e=this.getTestElement(a),b="on"+c.toLowerCase(),d=(b in e);if(!d){if(e.setAttribute&&e.removeAttribute){e.setAttribute(b,"");d=typeof e[b]==="function";if(typeof e[b]!=="undefined"){e[b]=undefined}e.removeAttribute(b)}}return d},getSupportedPropertyName:function(b,a){var c=Ext.browser.getVendorProperyName(a);if(c in b){return c}else{if(a in b){return a}}return null},registerTest:Ext.Function.flexSetter(function(a,b){this.has[a]=b.call(this);return this})},function(){Ext.feature=new this;var a=Ext.feature.has;Ext.feature.registerTest({Canvas:function(){var b=this.getTestElement("canvas");return !!(b&&b.getContext&&b.getContext("2d"))},Svg:function(){var b=document;return !!(b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)},Vml:function(){var c=this.getTestElement(),b=false;c.innerHTML="";b=(c.childNodes.length===1);c.innerHTML="";return b},Touch:function(){return this.isEventSupported("touchstart")&&!(Ext.os&&Ext.os.name.match(/Windows|MacOS|Linux/)&&!Ext.os.is.BlackBerry6)},Orientation:function(){return("orientation" in window)&&this.isEventSupported("orientationchange")},OrientationChange:function(){return this.isEventSupported("orientationchange")},DeviceMotion:function(){return this.isEventSupported("devicemotion")},Geolocation:function(){return"geolocation" in window.navigator},SqlDatabase:function(){return"openDatabase" in window},WebSockets:function(){return"WebSocket" in window},Range:function(){return !!document.createRange},CreateContextualFragment:function(){var b=!!document.createRange?document.createRange():false;return b&&!!b.createContextualFragment},History:function(){return("history" in window&&"pushState" in window.history)},CssTransforms:function(){return this.isStyleSupported("transform")},Css3dTransforms:function(){return this.has("CssTransforms")&&this.isStyleSupported("perspective")&&!Ext.os.is.Android2},CssAnimations:function(){return this.isStyleSupported("animationName")},CssTransitions:function(){return this.isStyleSupported("transitionProperty")},Audio:function(){return !!this.getTestElement("audio").canPlayType},Video:function(){return !!this.getTestElement("video").canPlayType},ClassList:function(){return"classList" in this.getTestElement()},LocalStorage:function(){var b=false;try{if("localStorage" in window&&window.localStorage!==null){localStorage.setItem("sencha-localstorage-test","test success");localStorage.removeItem("sencha-localstorage-test");b=true}}catch(c){}return b}})});Ext.define("Ext.dom.Query",{select:function(h,b){var g=[],d,f,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}h=h.split(",");for(f=0,c=h.length;f")}else{c.push(">");if((h=d.tpl)){h.applyOut(d.tplData,c)}if((h=d.html)){c.push(h)}if((h=d.cn||d.children)){g.generateMarkup(h,c)}f=g.closeTags;c.push(f[a]||(f[a]=""))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(a,b){Ext.fly(a).applyStyles(b)},createContextualFragment:function(c){var f=document.createElement("div"),a=document.createDocumentFragment(),b=0,d,e;f.innerHTML=c;e=f.childNodes;d=e.length;for(;b0){this.id=b=a.id}else{a.id=b=this.mixins.identifiable.getUniqueId.call(this)}this.self.cache[b]=this}return b},setId:function(c){var a=this.id,b=this.self.cache;if(a){delete b[a]}this.dom.id=c;this.id=c;b[c]=this;return this},setHtml:function(a){this.dom.innerHTML=a},getHtml:function(){return this.dom.innerHTML},setText:function(a){this.dom.textContent=a},redraw:function(){var b=this.dom,a=b.style;a.display="none";b.offsetHeight;a.display=""},isPainted:function(){var a=this.dom;return Boolean(a&&a.offsetParent)},set:function(a,b){var e=this.dom,c,d;for(c in a){if(a.hasOwnProperty(c)){d=a[c];if(c=="style"){this.applyStyles(d)}else{if(c=="cls"){e.className=d}else{if(b!==false){if(d===undefined){e.removeAttribute(c)}else{e.setAttribute(c,d)}}else{e[c]=d}}}}}return this},is:function(a){return Ext.DomQuery.is(this.dom,a)},getValue:function(b){var a=this.dom.value;return b?parseInt(a,10):a},getAttribute:function(a,b){var c=this.dom;return c.getAttributeNS(b,a)||c.getAttribute(b+":"+a)||c.getAttribute(a)||c[a]},setSizeState:function(d){var c=["x-sized","x-unsized","x-stretched"],a=[true,false,null],b=a.indexOf(d),e;if(b!==-1){e=c[b];c.splice(b,1);this.addCls(e)}this.removeCls(c);return this},destroy:function(){this.isDestroyed=true;var a=Ext.Element.cache,b=this.dom;if(b&&b.parentNode&&b.tagName!="BODY"){b.parentNode.removeChild(b)}delete a[this.id];delete this.dom}},function(a){Ext.elements=Ext.cache=a.cache;this.addStatics({Fly:new Ext.Class({extend:a,constructor:function(b){this.dom=b}}),_flyweights:{},fly:function(e,c){var f=null,d=a._flyweights,b;c=c||"_global";e=Ext.getDom(e);if(e){f=d[c]||(d[c]=new a.Fly());f.dom=e;f.isSynchronized=false;b=Ext.cache[e.id];if(b&&b.isElement){b.isSynchronized=false}}return f}});Ext.get=function(b){return a.get.call(a,b)};Ext.fly=function(){return a.fly.apply(a,arguments)};Ext.ClassManager.onCreated(function(){a.mixin("observable",Ext.mixin.Observable)},null,"Ext.mixin.Observable")});Ext.dom.Element.addStatics({numberRe:/\d+$/,unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,cssRe:/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,opacityRe:/alpha\(opacity=(.*)\)/i,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:function(b,a){if(b===""||b=="auto"||b===undefined||b===null){return b||""}if(Ext.isNumber(b)||this.numberRe.test(b)){return b+(a||this.defaultUnit||"px")}else{if(!this.unitRe.test(b)){return b||""}}return b},isAncestor:function(b,d){var a=false;b=Ext.getDom(b);d=Ext.getDom(d);if(b&&d){if(b.contains){return b.contains(d)}else{if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(d)&16)}else{while((d=d.parentNode)){a=d==b||a}}}}return a},parseBox:function(b){if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:c[0]||0,right:c[1]||0,bottom:c[2]||0,left:c[3]||0}},unitizeBox:function(c,a){var b=this;c=b.parseBox(c);return b.addUnits(c.top,a)+" "+b.addUnits(c.right,a)+" "+b.addUnits(c.bottom,a)+" "+b.addUnits(c.left,a)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});Ext.dom.Element.addMembers({appendChild:function(a){this.dom.appendChild(Ext.getDom(a));return this},removeChild:function(a){this.dom.removeChild(Ext.getDom(a));return this},append:function(){this.appendChild.apply(this,arguments)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b){var a=Ext.getDom(b),d=this.dom,c=d.firstChild;if(!c){d.appendChild(a)}else{d.insertBefore(a,c)}return this},insertSibling:function(e,c,d){var f=this,b,a=(c||"before").toLowerCase()=="after",g;if(Ext.isArray(e)){g=f;Ext.each(e,function(h){b=Ext.fly(g,"_internal").insertSibling(h,c,d);if(a){g=b}});return b}e=e||{};if(e.nodeType||e.dom){b=f.dom.parentNode.insertBefore(Ext.getDom(e),a?f.dom.nextSibling:f.dom);if(!d){b=Ext.get(b)}}else{if(a&&!f.dom.nextSibling){b=Ext.core.DomHelper.append(f.dom.parentNode,e,!d)}else{b=Ext.core.DomHelper[a?"insertAfter":"insertBefore"](f.dom,e,!d)}}return b},replace:function(a){a=Ext.getDom(a);a.parentNode.replaceChild(this.dom,a);return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.core.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.dom.Element.addToCache(b.isFlyweight?new Ext.dom.Element(b.dom):b);return b},doReplaceWith:function(a){var b=this.dom;b.parentNode.replaceChild(Ext.getDom(a),b)},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.core.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.core.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(b,c){var e=this.dom,f=this.self.create(b,c),d=(c)?f:f.dom,a=e.parentNode;if(a){a.insertBefore(d,e)}d.appendChild(e);return f},wrapAllChildren:function(a){var d=this.dom,b=d.childNodes,e=this.self.create(a),c=e.dom;while(b.length>0){c.appendChild(d.firstChild)}d.appendChild(c);return e},unwrapAllChildren:function(){var c=this.dom,b=c.childNodes,a=c.parentNode;if(a){while(b.length>0){a.insertBefore(c,c.firstChild)}this.destroy()}},unwrap:function(){var c=this.dom,a=c.parentNode,b;if(a){b=a.parentNode;b.insertBefore(c,a);b.removeChild(a)}else{b=document.createDocumentFragment();b.appendChild(c)}return this},detach:function(){var a=this.dom;if(a&&a.parentNode&&a.tagName!=="BODY"){a.parentNode.removeChild(a)}return this},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});Ext.dom.Element.override({getX:function(a){return this.getXY(a)[0]},getY:function(a){return this.getXY(a)[1]},getXY:function(){var b=this.dom.getBoundingClientRect(),a=Math.round;return[a(b.left+window.pageXOffset),a(b.top+window.pageYOffset)]},getOffsetsTo:function(a){var c=this.getXY(),b=Ext.fly(a,"_internal").getXY();return[c[0]-b[0],c[1]-b[1]]},setX:function(a){return this.setXY([a,this.getY()])},setY:function(a){return this.setXY([this.getX(),a])},setXY:function(d){var b=this;if(arguments.length>1){d=[d,arguments[1]]}var c=b.translatePoints(d),a=b.dom.style;for(d in c){if(!c.hasOwnProperty(d)){continue}if(!isNaN(c[d])){a[d]=c[d]+"px"}}return b},getLeft:function(){return parseInt(this.getStyle("left"),10)||0},getRight:function(){return parseInt(this.getStyle("right"),10)||0},getTop:function(){return parseInt(this.getStyle("top"),10)||0},getBottom:function(){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(a,g){g=isNaN(a[1])?g:a[1];a=isNaN(a[0])?a:a[0];var d=this,e=d.isStyle("position","relative"),f=d.getXY(),b=parseInt(d.getStyle("left"),10),c=parseInt(d.getStyle("top"),10);b=!isNaN(b)?b:(e?0:d.dom.offsetLeft);c=!isNaN(c)?c:(e?0:d.dom.offsetTop);return{left:(a-f[0]+b),top:(g-f[1]+c)}},setBox:function(d){var c=this,b=d.width,a=d.height,f=d.top,e=d.left;if(e!==undefined){c.setLeft(e)}if(f!==undefined){c.setTop(f)}if(b!==undefined){c.setWidth(b)}if(a!==undefined){c.setHeight(a)}return this},getBox:function(g,j){var h=this,e=h.dom,c=e.offsetWidth,k=e.offsetHeight,n,f,d,a,m,i;if(!j){n=h.getXY()}else{if(g){n=[0,0]}else{n=[parseInt(h.getStyle("left"),10)||0,parseInt(h.getStyle("top"),10)||0]}}if(!g){f={x:n[0],y:n[1],0:n[0],1:n[1],width:c,height:k}}else{d=h.getBorderWidth.call(h,"l")+h.getPadding.call(h,"l");a=h.getBorderWidth.call(h,"r")+h.getPadding.call(h,"r");m=h.getBorderWidth.call(h,"t")+h.getPadding.call(h,"t");i=h.getBorderWidth.call(h,"b")+h.getPadding.call(h,"b");f={x:n[0]+d,y:n[1]+m,0:n[0]+d,1:n[1]+m,width:c-(d+a),height:k-(m+i)}}f.left=f.x;f.top=f.y;f.right=f.x+f.width;f.bottom=f.y+f.height;return f},getPageBox:function(e){var g=this,c=g.dom,j=c.offsetWidth,f=c.offsetHeight,m=g.getXY(),k=m[1],a=m[0]+j,i=m[1]+f,d=m[0];if(!c){return new Ext.util.Region()}if(e){return new Ext.util.Region(k,a,i,d)}else{return{left:d,top:k,width:j,height:f,right:a,bottom:i}}}});Ext.dom.Element.addMembers({WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",VISIBILITY:1,DISPLAY:2,OFFSETS:3,SEPARATOR:"-",trimRe:/^\s+|\s+$/g,wordsRe:/\w/g,spacesRe:/\s+/,styleSplitRe:/\s*(?::|;)\s*/,transparentRe:/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,classNameSplitRegex:/[\s]+/,borders:{t:"border-top-width",r:"border-right-width",b:"border-bottom-width",l:"border-left-width"},paddings:{t:"padding-top",r:"padding-right",b:"padding-bottom",l:"padding-left"},margins:{t:"margin-top",r:"margin-right",b:"margin-bottom",l:"margin-left"},defaultUnit:"px",isSynchronized:false,synchronize:function(){var g=this.dom,a={},d=g.className,f,c,e,b;if(d.length>0){f=g.className.split(this.classNameSplitRegex);for(c=0,e=f.length;c0?a:0},getWidth:function(a){var c=this.dom,b=a?(c.clientWidth-this.getPadding("lr")):c.offsetWidth;return b>0?b:0},getBorderWidth:function(a){return this.addStyles(a,this.borders)},getPadding:function(a){return this.addStyles(a,this.paddings)},applyStyles:function(d){if(d){var e=this.dom,c,b,a;if(typeof d=="function"){d=d.call()}c=typeof d;if(c=="string"){d=Ext.util.Format.trim(d).split(this.styleSplitRe);for(b=0,a=d.length;b "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:["Ext.CompositeElementLite","Ext.CompositeElement"],requires:["Ext.dom.Element"],statics:{importElementMethods:function(){}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.Element.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a).synchronize()},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b-1){c=Ext.getDom(c);if(a){f=this.elements[b];f.parentNode.insertBefore(c,f);Ext.removeNode(f)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(c,e){var b=this,d=this.elements,a;Ext.each(c,function(f){if((a=(d[f]||d[f=b.indexOf(f)]))){if(e){if(a.dom){a.remove()}else{Ext.removeNode(a)}}Ext.Array.erase(d,f,1)}});return this}},function(){var a=Ext.dom.Element,d=a.prototype,c=this.prototype,b;for(b in d){if(typeof d[b]=="function"){(function(e){c[e]=c[e]||function(){return this.invoke(e,arguments)}}).call(c,b)}}c.on=c.addListener;if(Ext.DomQuery){a.selectorFunction=Ext.DomQuery.select}a.select=function(e,f){var g;if(typeof e=="string"){g=a.selectorFunction(e,f)}else{if(e.length!==undefined){g=e}else{}}return new Ext.CompositeElementLite(g)};Ext.select=function(){return a.select.apply(a,arguments)}});Ext.define("Ext.mixin.Mixin",{onClassExtended:function(b,e){var a=e.mixinConfig,d,f,c;if(a){d=b.superclass.mixinConfig;if(d){a=e.mixinConfig=Ext.merge({},d,a)}e.mixinId=a.id;f=a.beforeHooks;c=a.hooks||a.afterHooks;if(f||c){Ext.Function.interceptBefore(e,"onClassMixedIn",function(h){var g=this.prototype;if(f){Ext.Object.each(f,function(j,i){h.override(i,function(){if(g[j].apply(this,arguments)!==false){return this.callOverridden(arguments)}})})}if(c){Ext.Object.each(c,function(j,i){h.override(i,function(){var k=this.callOverridden(arguments);g[j].apply(this,arguments);return k})})}})}}}});Ext.define("Ext.event.ListenerStack",{currentOrder:"current",length:0,constructor:function(){this.listeners={before:[],current:[],after:[]};this.lateBindingMap={};return this},add:function(h,j,k,e){var a=this.lateBindingMap,g=this.getAll(e),f=g.length,b,d,c;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();b=a[c];if(b){if(b[h]){return false}else{b[h]=true}}else{a[c]=b={};b[h]=true}}else{if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){d.options=k;return false}}}}d=this.create(h,j,k,e);if(k&&k.prepend){delete k.prepend;g.unshift(d)}else{g.push(d)}this.length++;return true},getAt:function(b,a){return this.getAll(a)[b]},getAll:function(a){if(!a){a=this.currentOrder}return this.listeners[a]},count:function(a){return this.getAll(a).length},create:function(d,c,b,a){return{stack:this,fn:d,firingFn:false,boundFn:false,isLateBinding:typeof d=="string",scope:c,options:b||{},order:a}},remove:function(h,j,e){var g=this.getAll(e),f=g.length,b=false,a=this.lateBindingMap,d,c;if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){g.splice(f,1);b=true;this.length--;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();if(a[c]&&a[c][h]){delete a[c][h]}}break}}}return b}});Ext.define("Ext.event.Controller",{isFiring:false,listenerStack:null,constructor:function(a){this.firingListeners=[];this.firingArguments=[];this.setInfo(a);return this},setInfo:function(a){this.info=a},getInfo:function(){return this.info},setListenerStacks:function(a){this.listenerStacks=a},fire:function(h,e){var n=this.listenerStacks,m=this.firingListeners,d=this.firingArguments,k=m.push,g=n.length,j,l,c,o,a=false,b=false,f;m.length=0;if(e){if(e.order!=="after"){a=true}else{b=true}}if(g===1){j=n[0].listeners;l=j.before;c=j.current;o=j.after;if(l.length>0){k.apply(m,l)}if(a){k.call(m,e)}if(c.length>0){k.apply(m,c)}if(b){k.call(m,e)}if(o.length>0){k.apply(m,o)}}else{for(f=0;f0){k.apply(m,l)}}if(a){k.call(m,e)}for(f=0;f0){k.apply(m,c)}}if(b){k.call(m,e)}for(f=0;f0){k.apply(m,o)}}}if(m.length===0){return this}if(!h){h=[]}d.length=0;d.push.apply(d,h);d.push(null,this);this.doFire();return this},doFire:function(){var k=this.firingListeners,c=this.firingArguments,g=c.length-2,d,f,b,o,h,n,a,j,l,e,m;this.isPausing=false;this.isPaused=false;this.isStopped=false;this.isFiring=true;for(d=0,f=k.length;d0){this.isPaused=false;this.doFire()}if(a){a.resume()}return this},isInterrupted:function(){return this.isStopped||this.isPaused},stop:function(){var a=this.connectingController;this.isStopped=true;if(a){this.connectingController=null;a.stop()}this.isFiring=false;this.listenerStacks=null;return this},pause:function(){var a=this.connectingController;this.isPausing=true;if(a){a.pause()}return this}});Ext.define("Ext.event.Dispatcher",{requires:["Ext.event.ListenerStack","Ext.event.Controller"],statics:{getInstance:function(){if(!this.instance){this.instance=new this()}return this.instance},setInstance:function(a){this.instance=a;return this}},config:{publishers:{}},wildcard:"*",constructor:function(a){this.listenerStacks={};this.activePublishers={};this.publishersCache={};this.noActivePublishers=[];this.controller=null;this.initConfig(a);return this},getListenerStack:function(e,g,c,b){var d=this.listenerStacks,f=d[e],a;b=Boolean(b);if(!f){if(b){d[e]=f={}}else{return null}}f=f[g];if(!f){if(b){d[e][g]=f={}}else{return null}}a=f[c];if(!a){if(b){f[c]=a=new Ext.event.ListenerStack()}else{return null}}return a},getController:function(d,f,c,b){var a=this.controller,e={targetType:d,target:f,eventName:c};if(!a){this.controller=a=new Ext.event.Controller()}if(a.isFiring){a=new Ext.event.Controller()}a.setInfo(e);if(b&&a!==b){a.connect(b)}return a},applyPublishers:function(c){var a,b;this.publishersCache={};for(a in c){if(c.hasOwnProperty(a)){b=c[a];this.registerPublisher(b)}}return c},registerPublisher:function(b){var a=this.activePublishers,c=b.getTargetType(),d=a[c];if(!d){a[c]=d=[]}d.push(b);b.setDispatcher(this);return this},getCachedActivePublishers:function(c,b){var a=this.publishersCache,d;if((d=a[c])&&(d=d[b])){return d}return null},cacheActivePublishers:function(c,b,d){var a=this.publishersCache;if(!a[c]){a[c]={}}a[c][b]=d;return d},getActivePublishers:function(f,b){var g,a,c,e,d;if((g=this.getCachedActivePublishers(f,b))){return g}a=this.activePublishers[f];if(a){g=[];for(c=0,e=a.length;c0}return false},addListener:function(d,e,a){var f=this.getActivePublishers(d,a),c=f.length,b;if(c>0){for(b=0;b0){for(b=0;b0){for(b=0;b 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var j="Y-m-dTH:i:sP",g=[],f=0,d=j.length;f= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(l){var e=a.parseRegexes.length,m=1,f=[],k=[],j=false,d="";for(var h=0;h Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)"},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a.formatCodeToRegex("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a.formatCodeToRegex("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("h",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}];for(var f=0,d=c.length;f0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(f){var e=0,h=Ext.Date.clone(f),c=f.getMonth(),g;for(g=0,h.setDate(1),h.setMonth(0);g28){c=Math.min(c,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(f),"mo",g)).getDate())}h.setDate(c);h.setMonth(f.getMonth()+g);break;case Ext.Date.YEAR:h.setFullYear(f.getFullYear()+g);break}return h},between:function(d,f,c){var e=d.getTime();return f.getTime()<=e&&e<=c.getTime()},diff:function(e,c,g){var d=Ext.Date,f,h=+c-e;switch(g){case d.MILLI:return h;case d.SECOND:return Math.floor(h/1000);case d.MINUTE:return Math.floor(h/60000);case d.HOUR:return Math.floor(h/3600000);case d.DAY:return Math.floor(h/86400000);case"w":return Math.floor(h/604800000);case d.MONTH:f=(c.getFullYear()*12+c.getMonth())-(e.getFullYear()*12+e.getMonth());if(Ext.Date.add(e,g,f)>c){return f-1}else{return f}case d.YEAR:f=c.getFullYear()-e.getFullYear();if(Ext.Date.add(e,g,f)>c){return f-1}else{return f}}},align:function(d,f,e){var c=new Date(+d);switch(f.toLowerCase()){case Ext.Date.MILLI:return c;break;case Ext.Date.SECOND:c.setUTCSeconds(c.getUTCSeconds()-c.getUTCSeconds()%e);c.setUTCMilliseconds(0);return c;break;case Ext.Date.MINUTE:c.setUTCMinutes(c.getUTCMinutes()-c.getUTCMinutes()%e);c.setUTCSeconds(0);c.setUTCMilliseconds(0);return c;break;case Ext.Date.HOUR:c.setUTCHours(c.getUTCHours()-c.getUTCHours()%e);c.setUTCMinutes(0);c.setUTCSeconds(0);c.setUTCMilliseconds(0);return c;break;case Ext.Date.DAY:if(e==7||e==14){c.setUTCDate(c.getUTCDate()-c.getUTCDay()+1)}c.setUTCHours(0);c.setUTCMinutes(0);c.setUTCSeconds(0);c.setUTCMilliseconds(0);return c;break;case Ext.Date.MONTH:c.setUTCMonth(c.getUTCMonth()-(c.getUTCMonth()-1)%e,1);c.setUTCHours(0);c.setUTCMinutes(0);c.setUTCSeconds(0);c.setUTCMilliseconds(0);return c;break;case Ext.Date.YEAR:c.setUTCFullYear(c.getUTCFullYear()-c.getUTCFullYear()%e,1,1);c.setUTCHours(0);c.setUTCMinutes(0);c.setUTCSeconds(0);c.setUTCMilliseconds(0);return d;break}}};var a=Ext.DateExtras;Ext.apply(Ext.Date,a)})();Ext.define("Ext.util.Format",{requires:["Ext.DateExtras"],singleton:true,defaultDateFormat:"m/d/Y",escapeRe:/('|\\)/g,trimRe:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,dashesRe:/-/g,iso8601TestRe:/\d\dT\d\d/,iso8601SplitRe:/[- :T\.Z\+]/,ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!=-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.util.Format.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.util.Format.escapeRe,"\\$1")},toggle:function(b,c,a){return b==c?a:c},trim:function(a){return a.replace(Ext.util.Format.trimRe,"")},leftPad:function(d,b,c){var a=String(d);c=c||" ";while(a.length/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},date:function(b,c){var a=b;if(!b){return""}if(!Ext.isDate(b)){a=new Date(Date.parse(b));if(isNaN(a)){if(this.iso8601TestRe.test(b)){a=b.split(this.iso8601SplitRe);a=new Date(a[0],a[1]-1,a[2],a[3],a[4],a[5])}if(isNaN(a)){a=new Date(Date.parse(b.replace(this.dashesRe,"/")))}}b=a}return Ext.Date.format(b,c||Ext.util.Format.defaultDateFormat)}});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var f=this,b=arguments,a=[],c=0,e=b.length,g;f.initialConfig={};if(e===1&&Ext.isArray(d)){b=d;e=b.length}if(e>1){for(;c]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useIndex:Ext.isIE6||Ext.isIE7,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(a){var c=this,b=c.generate(a);return c.useEval?c.evalTpl(b):(new Function("Ext",b))(Ext)},generate:function(a){var d=this,b="var fm=Ext.util.Format,ts=Object.prototype.toString;",c;d.maxLevel=0;d.body=["var c0=values, a0="+d.createArrayTest(0)+", p0=parent, n0=xcount, i0=xindex, v;\n"];if(d.definitions){if(typeof d.definitions==="string"){d.definitions=[d.definitions,b]}else{d.definitions.push(b)}}else{d.definitions=[b]}d.switches=[];d.parse(a);d.definitions.push((d.useEval?"$=":"return")+" function ("+d.fnArgs+") {",d.body.join(""),"}");c=d.definitions.join("\n");d.definitions.length=d.body.length=d.switches.length=0;delete d.definitions;delete d.body;delete d.switches;return c},doText:function(c){var b=this,a=b.body;c=c.replace(b.aposRe,"\\'").replace(b.newLineRe,"\\n");if(b.useIndex){a.push("out[out.length]='",c,"'\n")}else{a.push("out.push('",c,"')\n")}},doExpr:function(b){var a=this.body;a.push("if ((v="+b+")!==undefined && (v="+b+")!==null) out");if(this.useIndex){a.push("[out.length]=v+''\n")}else{a.push(".push(v+'')\n")}},doTag:function(a){this.doExpr(this.parseTag(a))},doElse:function(){this.body.push("} else {\n")},doEval:function(a){this.body.push(a,"\n")},doIf:function(b,c){var a=this;if(b==="."){a.body.push("if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("if (",a.parseTag(b),") {\n")}else{a.body.push("if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doElseIf:function(b,c){var a=this;if(b==="."){a.body.push("else if (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("} else if (",a.parseTag(b),") {\n")}else{a.body.push("} else if (",a.addFn(b),a.callFn,") {\n")}}if(c.exec){a.doExec(c.exec)}},doSwitch:function(b){var a=this;if(b==="."){a.body.push("switch (values) {\n")}else{if(a.propNameRe.test(b)){a.body.push("switch (",a.parseTag(b),") {\n")}else{a.body.push("switch (",a.addFn(b),a.callFn,") {\n")}}a.switches.push(0)},doCase:function(e){var d=this,c=Ext.isArray(e)?e:[e],f=d.switches.length-1,a,b;if(d.switches[f]){d.body.push("break;\n")}else{d.switches[f]++}for(b=0,f=c.length;bb){this.isEnded=true;return this.getEndValue()}else{return this.getStartValue()+((a/b)*this.distance)}}});Ext.define("Ext.util.translatable.Abstract",{extend:"Ext.Evented",requires:["Ext.fx.easing.Linear"],config:{easing:null,easingX:null,easingY:null,fps:Ext.os.is.Android4?50:60},x:0,y:0,activeEasingX:null,activeEasingY:null,isAnimating:false,isTranslatable:true,constructor:function(a){this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.initConfig(a)},factoryEasing:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")},applyEasing:function(a){if(!this.getEasingX()){this.setEasingX(this.factoryEasing(a))}if(!this.getEasingY()){this.setEasingY(this.factoryEasing(a))}},applyEasingX:function(a){return this.factoryEasing(a)},applyEasingY:function(a){return this.factoryEasing(a)},updateFps:function(a){this.animationInterval=1000/a},doTranslate:Ext.emptyFn,translate:function(a,c,b){if(b){return this.translateAnimated(a,c,b)}if(this.isAnimating){this.stopAnimation()}if(!isNaN(a)&&typeof a=="number"){this.x=a}if(!isNaN(c)&&typeof c=="number"){this.y=c}this.doTranslate(a,c)},translateAxis:function(b,d,c){var a,e;if(b=="x"){a=d}else{e=d}return this.translate(a,e,c)},animate:function(b,a){this.activeEasingX=b;this.activeEasingY=a;this.isAnimating=true;this.lastX=null;this.lastY=null;this.animationFrameId=requestAnimationFrame(this.doAnimationFrame);this.fireEvent("animationstart",this,this.x,this.y);return this},translateAnimated:function(b,g,e){if(!Ext.isObject(e)){e={}}if(this.isAnimating){this.stopAnimation()}var d=Ext.Date.now(),f=e.easing,c=(typeof b=="number")?(e.easingX||f||this.getEasingX()||true):null,a=(typeof g=="number")?(e.easingY||f||this.getEasingY()||true):null;if(c){c=this.factoryEasing(c);c.setStartTime(d);c.setStartValue(this.x);c.setEndValue(b);if("duration" in e){c.setDuration(e.duration)}}if(a){a=this.factoryEasing(a);a.setStartTime(d);a.setStartValue(this.y);a.setEndValue(g);if("duration" in e){a.setDuration(e.duration)}}return this.animate(c,a)},doAnimationFrame:function(){var e=this,c=e.activeEasingX,b=e.activeEasingY,d=Date.now(),a,f;this.animationFrameId=requestAnimationFrame(this.doAnimationFrame);if(!e.isAnimating){return}e.lastRun=d;if(c===null&&b===null){e.stopAnimation();return}if(c!==null){e.x=a=Math.round(c.getValue());if(c.isEnded){e.activeEasingX=null;e.fireEvent("axisanimationend",e,"x",a)}}else{a=e.x}if(b!==null){e.y=f=Math.round(b.getValue());if(b.isEnded){e.activeEasingY=null;e.fireEvent("axisanimationend",e,"y",f)}}else{f=e.y}if(e.lastX!==a||e.lastY!==f){e.doTranslate(a,f);e.lastX=a;e.lastY=f}e.fireEvent("animationframe",e,a,f)},stopAnimation:function(){if(!this.isAnimating){return}this.activeEasingX=null;this.activeEasingY=null;this.isAnimating=false;cancelAnimationFrame(this.animationFrameId);this.fireEvent("animationend",this,this.x,this.y)},refresh:function(){this.translate(this.x,this.y)},destroy:function(){if(this.isAnimating){this.stopAnimation()}this.callParent(arguments)}});Ext.define("Ext.util.translatable.Dom",{extend:"Ext.util.translatable.Abstract",config:{element:null},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(){this.refresh()}});Ext.define("Ext.util.translatable.CssTransform",{extend:"Ext.util.translatable.Dom",doTranslate:function(){this.getElement().dom.style.webkitTransform="translate3d("+this.x+"px, "+this.y+"px, 0px)"},destroy:function(){var a=this.getElement();if(a&&!a.isDestroyed){a.dom.style.webkitTransform=null}this.callSuper()}});Ext.define("Ext.util.translatable.ScrollPosition",{extend:"Ext.util.translatable.Dom",wrapperWidth:0,wrapperHeight:0,config:{useWrapper:true},getWrapper:function(){var c=this.wrapper,b=this.getElement(),a;if(!c){a=b.getParent();if(!a){return null}if(this.getUseWrapper()){c=b.wrap()}else{c=a}b.addCls("x-translatable");c.addCls("x-translatable-container");this.wrapper=c;c.on("resize","onWrapperResize",this);c.on("painted","refresh",this);this.refresh()}return c},doTranslate:function(a,d){var c=this.getWrapper(),b;if(c){b=c.dom;if(typeof a=="number"){b.scrollLeft=this.wrapperWidth-a}if(typeof d=="number"){b.scrollTop=this.wrapperHeight-d}}},onWrapperResize:function(b,a){this.wrapperWidth=a.width;this.wrapperHeight=a.height;this.refresh()},destroy:function(){var a=this.getElement(),b=this.wrapper;if(b){if(!a.isDestroyed){if(this.getUseWrapper()){b.doReplaceWith(a)}a.removeCls("x-translatable")}b.removeCls("x-translatable-container");b.un("resize","onWrapperResize",this);b.un("painted","refresh",this);delete this.wrapper;delete this._element}this.callSuper()}});Ext.define("Ext.util.Translatable",{requires:["Ext.util.translatable.CssTransform","Ext.util.translatable.ScrollPosition"],constructor:function(a){var c=Ext.util.translatable,e=c.CssTransform,d=c.ScrollPosition,b;if(typeof a=="object"&&"translationMethod" in a){if(a.translationMethod==="scrollposition"){b=d}else{if(a.translationMethod==="csstransform"){b=e}}}if(!b){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){b=d}else{b=e}}return new b(a)}});Ext.define("Ext.behavior.Translatable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Translatable"],setConfig:function(c){var a=this.translatable,b=this.component;if(c){if(!a){this.translatable=a=new Ext.util.Translatable(c);a.setElement(b.renderElement);a.on("destroy","onTranslatableDestroy",this)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getTranslatable:function(){return this.translatable},onTranslatableDestroy:function(){delete this.translatable},onComponentDestroy:function(){var a=this.translatable;if(a){a.destroy()}}});Ext.define("Ext.util.Draggable",{isDraggable:true,mixins:["Ext.mixin.Observable"],requires:["Ext.util.Translatable"],config:{cls:Ext.baseCSSPrefix+"draggable",draggingCls:Ext.baseCSSPrefix+"dragging",element:null,constraint:"container",disabled:null,direction:"both",initialOffset:{x:0,y:0},translatable:{}},DIRECTION_BOTH:"both",DIRECTION_VERTICAL:"vertical",DIRECTION_HORIZONTAL:"horizontal",defaultConstraint:{min:{x:-Infinity,y:-Infinity},max:{x:Infinity,y:Infinity}},containerWidth:0,containerHeight:0,width:0,height:0,constructor:function(a){var b;this.extraConstraint={};this.initialConfig=a;this.offset={x:0,y:0};this.listeners={dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",resize:"onElementResize",scope:this};if(a&&a.element){b=a.element;delete a.element;this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){a.on(this.listeners);this.initConfig(this.initialConfig)},updateInitialOffset:function(b){if(typeof b=="number"){b={x:b,y:b}}var c=this.offset,a,d;c.x=a=b.x;c.y=d=b.y;this.getTranslatable().translate(a,d)},updateCls:function(a){this.getElement().addCls(a)},applyTranslatable:function(a,b){a=Ext.factory(a,Ext.util.Translatable,b);a.setElement(this.getElement());return a},setExtraConstraint:function(a){this.extraConstraint=a||{};this.refreshConstraint();return this},addExtraConstraint:function(a){Ext.merge(this.extraConstraint,a);this.refreshConstraint();return this},applyConstraint:function(a){this.currentConstraint=a;if(!a){a=this.defaultConstraint}if(a==="container"){return Ext.merge(this.getContainerConstraint(),this.extraConstraint)}return Ext.merge({},this.extraConstraint,a)},updateConstraint:function(){this.refreshOffset()},getContainerConstraint:function(){var a=this.getContainer(),b=this.getElement();if(!a||!b.dom){return this.defaultConstraint}return{min:{x:0,y:0},max:{x:this.containerWidth-this.width,y:this.containerHeight-this.height}}},getContainer:function(){var a=this.container;if(!a){a=this.getElement().getParent();if(a){this.container=a;a.on({resize:"onContainerResize",destroy:"onContainerDestroy",scope:this})}}return a},onElementResize:function(a,b){this.width=b.width;this.height=b.height;this.refresh()},onContainerResize:function(a,b){this.containerWidth=b.width;this.containerHeight=b.height;this.refresh()},onContainerDestroy:function(){delete this.container;delete this.containerSizeMonitor},detachListeners:function(){this.getElement().un(this.listeners)},isAxisEnabled:function(a){var b=this.getDirection();if(a==="x"){return(b===this.DIRECTION_BOTH||b===this.DIRECTION_HORIZONTAL)}return(b===this.DIRECTION_BOTH||b===this.DIRECTION_VERTICAL)},onDragStart:function(a){if(this.getDisabled()){return false}var b=this.offset;this.fireAction("dragstart",[this,a,b.x,b.y],this.initDragStart)},initDragStart:function(b,c,a,d){this.dragStartOffset={x:a,y:d};this.isDragging=true;this.getElement().addCls(this.getDraggingCls())},onDrag:function(b){if(!this.isDragging){return}var a=this.dragStartOffset;this.fireAction("drag",[this,b,a.x+b.deltaX,a.y+b.deltaY],this.doDrag)},doDrag:function(b,c,a,d){b.setOffset(a,d)},onDragEnd:function(a){if(!this.isDragging){return}this.onDrag(a);this.isDragging=false;this.getElement().removeCls(this.getDraggingCls());this.fireEvent("dragend",this,a,this.offset.x,this.offset.y)},setOffset:function(i,h,b){var f=this.offset,a=this.getConstraint(),e=a.min,c=a.max,d=Math.min,g=Math.max;if(this.isAxisEnabled("x")&&typeof i=="number"){i=d(g(i,e.x),c.x)}else{i=f.x}if(this.isAxisEnabled("y")&&typeof h=="number"){h=d(g(h,e.y),c.y)}else{h=f.y}f.x=i;f.y=h;this.getTranslatable().translate(i,h,b)},getOffset:function(){return this.offset},refreshConstraint:function(){this.setConstraint(this.currentConstraint)},refreshOffset:function(){var a=this.offset;this.setOffset(a.x,a.y)},refresh:function(){this.refreshConstraint();this.getTranslatable().refresh();this.refreshOffset()},enable:function(){return this.setDisabled(false)},disable:function(){return this.setDisabled(true)},destroy:function(){var a=this.getTranslatable();var b=this.getElement();if(b&&!b.isDestroyed){b.removeCls(this.getCls())}this.detachListeners();if(a){a.destroy()}}},function(){});Ext.define("Ext.behavior.Draggable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Draggable"],setConfig:function(c){var a=this.draggable,b=this.component;if(c){if(!a){b.setTranslatable(true);this.draggable=a=new Ext.util.Draggable(c);a.setTranslatable(b.getTranslatable());a.setElement(b.renderElement);a.on("destroy","onDraggableDestroy",this);b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getDraggable:function(){return this.draggable},onDraggableDestroy:function(){delete this.draggable},onComponentDestroy:function(){var a=this.draggable;if(a){a.destroy()}}});Ext.define("Ext.mixin.Traversable",{extend:"Ext.mixin.Mixin",mixinConfig:{id:"traversable"},setParent:function(a){this.parent=a;return this},hasParent:function(){return Boolean(this.parent)},getParent:function(){return this.parent},getAncestors:function(){var b=[],a=this.getParent();while(a){b.push(a);a=a.getParent()}return b},getAncestorIds:function(){var b=[],a=this.getParent();while(a){b.push(a.getId());a=a.getParent()}return b}});(function(a){Ext.define("Ext.Component",{extend:"Ext.AbstractComponent",alternateClassName:"Ext.lib.Component",mixins:["Ext.mixin.Traversable"],requires:["Ext.ComponentManager","Ext.XTemplate","Ext.dom.Element","Ext.behavior.Translatable","Ext.behavior.Draggable"],xtype:"component",observableType:"component",cachedConfig:{baseCls:null,cls:null,floatingCls:a+"floating",hiddenCls:a+"item-hidden",ui:null,margin:null,padding:null,border:null,styleHtmlCls:a+"html",styleHtmlContent:null},eventedConfig:{flex:null,left:null,top:null,right:null,bottom:null,width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,docked:null,centered:null,hidden:null,disabled:null},config:{style:null,html:null,draggable:null,translatable:null,renderTo:null,zIndex:null,tpl:null,enterAnimation:null,exitAnimation:null,showAnimation:null,hideAnimation:null,tplWriteMode:"overwrite",data:null,disabledCls:a+"item-disabled",contentEl:null,itemId:undefined,record:null,plugins:null},listenerOptionsRegex:/^(?:delegate|single|delay|buffer|args|prepend|element)$/,alignmentRegex:/^([a-z]+)-([a-z]+)(\?)?$/,isComponent:true,floating:false,rendered:false,isInner:true,dockPositions:{top:true,right:true,bottom:true,left:true},innerElement:null,element:null,template:[],widthLayoutSized:false,heightLayoutSized:false,layoutStretched:false,sizeState:false,sizeFlags:0,LAYOUT_WIDTH:1,LAYOUT_HEIGHT:2,LAYOUT_BOTH:3,LAYOUT_STRETCHED:4,constructor:function(c){var d=this,b=d.config,e;d.onInitializedListeners=[];d.initialConfig=c;if(c!==undefined&&"id" in c){e=c.id}else{if("id" in b){e=b.id}else{e=d.getId()}}d.id=e;d.setId(e);Ext.ComponentManager.register(d);d.initElement();d.initConfig(d.initialConfig);d.refreshSizeState=d.doRefreshSizeState;d.refreshFloating=d.doRefreshFloating;if(d.refreshSizeStateOnInitialized){d.refreshSizeState()}if(d.refreshFloatingOnInitialized){d.refreshFloating()}d.initialize();d.triggerInitialized();if(d.config.fullscreen){d.fireEvent("fullscreen",d)}d.fireEvent("initialize",d)},beforeInitConfig:function(b){this.beforeInitialize.apply(this,arguments)},beforeInitialize:Ext.emptyFn,initialize:Ext.emptyFn,getTemplate:function(){return this.template},getElementConfig:function(){return{reference:"element",classList:["x-unsized"],children:this.getTemplate()}},triggerInitialized:function(){var f=this.onInitializedListeners,g=f.length,h,e,d,b,c;if(!this.initialized){this.initialized=true;if(g>0){for(c=0;ch){d=m.element;k.splice(e,0,n);break}}if(!d){k.push(n);d=this.getBodyElement()}this.itemsCount++;if(g==="start"){f.insertBefore(d)}else{f.insertAfter(d)}},removeItem:function(c){var a=c.getDocked(),b=this.items[this.positionMap[a]];Ext.Array.remove(b,c);c.element.detach();delete c.$dockWrapper;c.removeCls("x-dock-item");c.removeCls("x-docked-"+a);if(--this.itemsCount===0){this.destroy()}},getItemsSlice:function(c){var a=this.getContainer(),b=this.items,h=[],g,d,f,e;for(g=b.start,d=0,f=g.length;dc){h.push(e)}}for(g=b.end,d=0,f=g.length;dc){h.push(e)}}return h},applyElement:function(a){return Ext.Element.create(a)},updateElement:function(a){a.addCls("x-dock-"+this.getDirection())},applyBodyElement:function(a){return Ext.Element.create(a)},updateBodyElement:function(a){this.getElement().append(a)},updateInnerWrapper:function(a,c){var b=this.getBodyElement();if(c&&c.$outerWrapper===this){c.getElement().detach();delete c.$outerWrapper}if(a){a.setSizeState(this.getSizeState());a.$outerWrapper=this;b.append(a.getElement())}},updateSizeState:function(b){var a=this.getInnerWrapper();this.getElement().setSizeState(b);if(a){a.setSizeState(b)}},destroy:function(){var c=this.getInnerWrapper(),b=this.$outerWrapper,a;if(c){if(b){b.setInnerWrapper(c)}else{a=c.getElement();if(!a.isDestroyed){a.replace(this.getElement())}delete c.$outerWrapper}}delete this.$outerWrapper;this.setInnerWrapper(null);this.unlink("_bodyElement","_element");this.callSuper()}});Ext.define("Ext.layout.Default",{extend:"Ext.layout.Abstract",isAuto:true,alias:["layout.default","layout.auto"],requires:["Ext.util.Wrapper","Ext.layout.wrapper.BoxDock","Ext.layout.wrapper.Inner"],config:{animation:null},centerWrapperClass:"x-center",dockWrapperClass:"x-dock",positionMap:{top:"start",left:"start",middle:"center",bottom:"end",right:"end"},positionDirectionMap:{top:"vertical",bottom:"vertical",left:"horizontal",right:"horizontal"},setContainer:function(a){var b={delegate:"> component"};this.dockedItems=[];this.callSuper(arguments);a.on("centeredchange","onItemCenteredChange",this,b,"before").on("floatingchange","onItemFloatingChange",this,b,"before").on("dockedchange","onBeforeItemDockedChange",this,b,"before").on("dockedchange","onAfterItemDockedChange",this,b)},monitorSizeStateChange:function(){this.monitorSizeStateChange=Ext.emptyFn;this.container.on("sizestatechange","onContainerSizeStateChange",this)},monitorSizeFlagsChange:function(){this.monitorSizeFlagsChange=Ext.emptyFn;this.container.on("sizeflagschange","onContainerSizeFlagsChange",this)},onItemAdd:function(a){var b=a.getDocked();if(b!==null){this.dockItem(a)}else{if(a.isCentered()){this.onItemCenteredChange(a,true)}else{if(a.isFloating()){this.onItemFloatingChange(a,true)}else{this.onItemInnerStateChange(a,true)}}}},onItemInnerStateChange:function(b,a,c){if(a){this.insertInnerItem(b,this.container.innerIndexOf(b))}else{this.removeInnerItem(b)}},insertInnerItem:function(e,c){var a=this.container,g=a.innerElement.dom,d=e.element.dom,f=a.getInnerAt(c+1),b=f?f.element.dom:null;g.insertBefore(d,b);return this},insertBodyItem:function(c){var a=this.container.setUseBodyElement(true),b=a.bodyElement.dom;if(c.getZIndex()===null){c.setZIndex((a.indexOf(c)+1)*2)}b.insertBefore(c.element.dom,b.firstChild);return this},removeInnerItem:function(a){a.element.detach()},removeBodyItem:function(a){a.setZIndex(null);a.element.detach()},onItemRemove:function(b,a,c){var d=b.getDocked();if(d){this.undockItem(b)}else{if(b.isCentered()){this.onItemCenteredChange(b,false)}else{if(b.isFloating()){this.onItemFloatingChange(b,false)}else{this.onItemInnerStateChange(b,false,c)}}}},onItemMove:function(b,c,a){if(b.isCentered()||b.isFloating()){b.setZIndex((c+1)*2)}else{if(b.isInnerItem()){this.insertInnerItem(b,this.container.innerIndexOf(b))}else{this.undockItem(b);this.dockItem(b)}}},onItemCenteredChange:function(c,a){var b="$centerWrapper";if(a){this.insertBodyItem(c);c.link(b,new Ext.util.Wrapper({className:this.centerWrapperClass},c.element))}else{c.unlink(b);this.removeBodyItem(c)}},onItemFloatingChange:function(a,b){if(b){this.insertBodyItem(a)}else{this.removeBodyItem(a)}},onBeforeItemDockedChange:function(a,c,b){if(b){this.undockItem(a)}},onAfterItemDockedChange:function(a,c,b){if(c){this.dockItem(a)}},onContainerSizeStateChange:function(){var a=this.getDockWrapper();if(a){a.setSizeState(this.container.getSizeState())}},onContainerSizeFlagsChange:function(){var a=this.dockedItems,b,d,c;for(b=0,d=a.length;bs){m=p||o[0];o.splice(l,0,r);break}p=u}if(!m){m=o[g-1];o.push(r)}a=m.getDocked();d=m.$dockWrapper;k=f[a];if(t===k){d.addItem(r)}else{j=d.getItemsSlice(s);n=new b({container:this.container,direction:t});if(j.length>0){if(j.length===d.itemsCount){c=d;n.setSizeState(c.getSizeState());n.getElement().replace(c.getElement())}else{c=new b({container:this.container,direction:k});c.setInnerWrapper(d.getInnerWrapper());c.addItems(j);d.setInnerWrapper(n)}n.setInnerWrapper(c)}else{n.setInnerWrapper(d.getInnerWrapper());d.setInnerWrapper(n)}n.addItem(r)}}h.onInitialized("refreshDockedItemLayoutSizeFlags",this,[r])},getDockWrapper:function(){var a=this.dockedItems;if(a.length>0){return a[0].$dockWrapper}return null},undockItem:function(b){var a=this.dockedItems;if(b.$dockWrapper){b.$dockWrapper.removeItem(b)}Ext.Array.remove(a,b);b.setLayoutSizeFlags(0)},destroy:function(){this.dockedItems.length=0;delete this.dockedItems;this.callSuper()}});Ext.define("Ext.layout.Box",{extend:"Ext.layout.Default",config:{orient:"horizontal",align:"start",pack:"start"},alias:"layout.tablebox",layoutBaseClass:"x-layout-tablebox",itemClass:"x-layout-tablebox-item",setContainer:function(a){this.callSuper(arguments);a.innerElement.addCls(this.layoutBaseClass);a.on("flexchange","onItemFlexChange",this,{delegate:"> component"})},onItemInnerStateChange:function(b,a){this.callSuper(arguments);b.toggleCls(this.itemClass,a)},onItemFlexChange:function(){}});Ext.define("Ext.layout.FlexBox",{extend:"Ext.layout.Box",alias:"layout.box",config:{align:"stretch"},layoutBaseClass:"x-layout-box",itemClass:"x-layout-box-item",setContainer:function(a){this.callSuper(arguments);this.monitorSizeFlagsChange()},applyOrient:function(a){return a},updateOrient:function(c,b){var a=this.container,d={delegate:"> component"};if(c==="horizontal"){this.sizePropertyName="width"}else{this.sizePropertyName="height"}a.innerElement.swapCls("x-"+c,"x-"+b);if(b){a.un(b==="horizontal"?"widthchange":"heightchange","onItemSizeChange",this,d);this.redrawContainer()}a.on(c==="horizontal"?"widthchange":"heightchange","onItemSizeChange",this,d)},onItemInnerStateChange:function(d,c){this.callSuper(arguments);var a,b;d.toggleCls(this.itemClass,c);if(c){a=d.getFlex();b=d.get(this.sizePropertyName);if(a){this.doItemFlexChange(d,a)}else{if(b){this.doItemSizeChange(d,b)}}}this.refreshItemSizeState(d)},refreshItemSizeState:function(e){var c=e.isInnerItem(),a=this.container,f=a.LAYOUT_HEIGHT,d=a.LAYOUT_WIDTH,g=this.sizePropertyName,b=0,h=a.getSizeFlags();if(c){b|=a.LAYOUT_STRETCHED;if(this.getAlign()==="stretch"){b|=h&(g==="width"?f:d)}if(e.getFlex()){b|=h&(g==="width"?d:f)}}e.setLayoutSizeFlags(b)},refreshAllItemSizedStates:function(){var d=this.container.innerItems,a,c,b;for(a=0,c=d.length;aj){e=n.element;l.splice(f,0,o);break}}if(!e){l.push(o);e=this.getBodyElement()}this.itemsCount++;if(h==="start"){g.insertBefore(e)}else{g.insertAfter(e)}a.wrap(o.element);a.bindSize(this.getDirection()==="horizontal"?"width":"height")},removeItem:function(c){var a=c.getDocked(),b=this.items[this.positionMap[a]];c.removeCls("x-docked-"+a);Ext.Array.remove(b,c);c.unlink("$dockItemWrapper");c.element.detach();delete c.$dockWrapper;if(--this.itemsCount===0){this.destroy()}},getItemsSlice:function(c){var a=this.getContainer(),b=this.items,h=[],g,d,f,e;for(g=b.start,d=0,f=g.length;dc){h.push(e)}}for(g=b.end,d=0,f=g.length;dc){h.push(e)}}return h},applyElement:function(a){return Ext.Element.create(a)},updateElement:function(a){a.addCls("x-dock-"+this.getDirection())},applyBodyElement:function(a){return Ext.Element.create(a)},updateBodyElement:function(a){this.getElement().append(a)},updateInnerWrapper:function(a,c){var b=this.getBodyElement();if(c&&c.$outerWrapper===this){b.remove(c.getElement());delete c.$outerWrapper}if(a){a.setSizeState(this.getSizeState());a.$outerWrapper=this;b.append(a.getElement())}},updateSizeState:function(b){var a=this.getInnerWrapper();this.getElement().setSizeState(b);if(a){a.setSizeState(b)}},destroy:function(){var b=this.getInnerWrapper(),a=this.$outerWrapper;if(b){if(a){a.setInnerWrapper(b)}else{b.getElement().replace(this.getElement());delete b.$outerWrapper}}delete this.$outerWrapper;this.setInnerWrapper(null);this.unlink("_bodyElement","_element");this.callSuper()}});Ext.define("Ext.layout.VBox",{extend:"Ext.layout.FlexBox",alias:"layout.vbox",config:{orient:"vertical"}});Ext.define("Ext.fx.layout.card.Abstract",{extend:"Ext.Evented",isAnimation:true,config:{direction:"left",duration:null,reverse:null,layout:null},updateLayout:function(){this.enable()},enable:function(){var a=this.getLayout();if(a){a.onBefore("activeitemchange","onActiveItemChange",this)}},disable:function(){var a=this.getLayout();if(this.isAnimating){this.stopAnimation()}if(a){a.unBefore("activeitemchange","onActiveItemChange",this)}},onActiveItemChange:Ext.emptyFn,destroy:function(){var a=this.getLayout();if(this.isAnimating){this.stopAnimation()}if(a){a.unBefore("activeitemchange","onActiveItemChange",this)}this.setLayout(null)}});Ext.define("Ext.fx.State",{isAnimatable:{"background-color":true,"background-image":true,"background-position":true,"border-bottom-color":true,"border-bottom-width":true,"border-color":true,"border-left-color":true,"border-left-width":true,"border-right-color":true,"border-right-width":true,"border-spacing":true,"border-top-color":true,"border-top-width":true,"border-width":true,bottom:true,color:true,crop:true,"font-size":true,"font-weight":true,height:true,left:true,"letter-spacing":true,"line-height":true,"margin-bottom":true,"margin-left":true,"margin-right":true,"margin-top":true,"max-height":true,"max-width":true,"min-height":true,"min-width":true,opacity:true,"outline-color":true,"outline-offset":true,"outline-width":true,"padding-bottom":true,"padding-left":true,"padding-right":true,"padding-top":true,right:true,"text-indent":true,"text-shadow":true,top:true,"vertical-align":true,visibility:true,width:true,"word-spacing":true,"z-index":true,zoom:true,transform:true},constructor:function(a){this.data={};this.set(a)},setConfig:function(a){this.set(a);return this},setRaw:function(a){this.data=a;return this},clear:function(){return this.setRaw({})},setTransform:function(c,g){var f=this.data,a=Ext.isArray(g),b=f.transform,e,d;if(!b){b=f.transform={translateX:0,translateY:0,translateZ:0,scaleX:1,scaleY:1,scaleZ:1,rotate:0,rotateX:0,rotateY:0,rotateZ:0,skewX:0,skewY:0}}if(typeof c=="string"){switch(c){case"translate":if(a){e=g.length;if(e==0){break}b.translateX=g[0];if(e==1){break}b.translateY=g[1];if(e==2){break}b.translateZ=g[2]}else{b.translateX=g}break;case"rotate":if(a){e=g.length;if(e==0){break}b.rotateX=g[0];if(e==1){break}b.rotateY=g[1];if(e==2){break}b.rotateZ=g[2]}else{b.rotate=g}break;case"scale":if(a){e=g.length;if(e==0){break}b.scaleX=g[0];if(e==1){break}b.scaleY=g[1];if(e==2){break}b.scaleZ=g[2]}else{b.scaleX=g;b.scaleY=g}break;case"skew":if(a){e=g.length;if(e==0){break}b.skewX=g[0];if(e==1){break}b.skewY=g[1]}else{b.skewX=g}break;default:b[c]=g}}else{for(d in c){if(c.hasOwnProperty(d)){g=c[d];this.setTransform(d,g)}}}},set:function(a,d){var c=this.data,b;if(typeof a!="string"){for(b in a){d=a[b];if(b==="transform"){this.setTransform(d)}else{c[b]=d}}}else{if(a==="transform"){this.setTransform(d)}else{c[a]=d}}return this},unset:function(a){var b=this.data;if(b.hasOwnProperty(a)){delete b[a]}return this},getData:function(){return this.data}});Ext.define("Ext.fx.animation.Abstract",{extend:"Ext.Evented",isAnimation:true,requires:["Ext.fx.State"],config:{name:"",element:null,before:null,from:{},to:{},after:null,states:{},duration:300,easing:"linear",iteration:1,direction:"normal",delay:0,onBeforeStart:null,onEnd:null,onBeforeEnd:null,scope:null,reverse:null,preserveEndState:false,replacePrevious:true},STATE_FROM:"0%",STATE_TO:"100%",DIRECTION_UP:"up",DIRECTION_DOWN:"down",DIRECTION_LEFT:"left",DIRECTION_RIGHT:"right",stateNameRegex:/^(?:[\d\.]+)%$/,constructor:function(){this.states={};this.callParent(arguments);return this},applyElement:function(a){return Ext.get(a)},applyBefore:function(a,b){if(a){return Ext.factory(a,Ext.fx.State,b)}},applyAfter:function(b,a){if(b){return Ext.factory(b,Ext.fx.State,a)}},setFrom:function(a){return this.setState(this.STATE_FROM,a)},setTo:function(a){return this.setState(this.STATE_TO,a)},getFrom:function(){return this.getState(this.STATE_FROM)},getTo:function(){return this.getState(this.STATE_TO)},setStates:function(a){var c=this.stateNameRegex,b;for(b in a){if(c.test(b)){this.setState(b,a[b])}}return this},getStates:function(){return this.states},stop:function(){this.fireEvent("stop",this)},destroy:function(){this.stop();this.callParent()},setState:function(b,d){var a=this.getStates(),c;c=Ext.factory(d,Ext.fx.State,a[b]);if(c){a[b]=c}return this},getState:function(a){return this.getStates()[a]},getData:function(){var k=this.getStates(),e={},g=this.getBefore(),c=this.getAfter(),h=k[this.STATE_FROM],i=k[this.STATE_TO],j=h.getData(),f=i.getData(),d,b,a;for(b in k){if(k.hasOwnProperty(b)){a=k[b];d=a.getData();e[b]=d}}if(Ext.os.is.Android2){e["0.0001%"]=j}return{before:g?g.getData():{},after:c?c.getData():{},states:e,from:j,to:f,duration:this.getDuration(),iteration:this.getIteration(),direction:this.getDirection(),easing:this.getEasing(),delay:this.getDelay(),onEnd:this.getOnEnd(),onBeforeEnd:this.getOnBeforeEnd(),onBeforeStart:this.getOnBeforeStart(),scope:this.getScope(),preserveEndState:this.getPreserveEndState(),replacePrevious:this.getReplacePrevious()}}});Ext.define("Ext.fx.animation.Slide",{extend:"Ext.fx.animation.Abstract",alternateClassName:"Ext.fx.animation.SlideIn",alias:["animation.slide","animation.slideIn"],config:{direction:"left",out:false,offset:0,easing:"auto",containerBox:"auto",elementBox:"auto",isElementBoxFit:true,useCssTransform:true},reverseDirectionMap:{up:"down",down:"up",left:"right",right:"left"},applyEasing:function(a){if(a==="auto"){return"ease-"+((this.getOut())?"in":"out")}return a},getContainerBox:function(){var a=this._containerBox;if(a==="auto"){a=this.getElement().getParent().getPageBox()}return a},getElementBox:function(){var a=this._elementBox;if(this.getIsElementBoxFit()){return this.getContainerBox()}if(a==="auto"){a=this.getElement().getPageBox()}return a},getData:function(){var p=this.getElementBox(),c=this.getContainerBox(),g=p?p:c,n=this.getFrom(),o=this.getTo(),f=this.getOut(),e=this.getOffset(),m=this.getDirection(),b=this.getUseCssTransform(),h=this.getReverse(),d=0,a=0,l,j,k,i;if(h){m=this.reverseDirectionMap[m]}switch(m){case this.DIRECTION_UP:if(f){a=c.top-g.top-g.height-e}else{a=c.bottom-g.bottom+g.height+e}break;case this.DIRECTION_DOWN:if(f){a=c.bottom-g.bottom+g.height+e}else{a=c.top-g.height-g.top-e}break;case this.DIRECTION_RIGHT:if(f){d=c.right-g.right+g.width+e}else{d=c.left-g.left-g.width-e}break;case this.DIRECTION_LEFT:if(f){d=c.left-g.left-g.width-e}else{d=c.right-g.right+g.width+e}break}l=(f)?0:d;j=(f)?0:a;if(b){n.setTransform({translateX:l,translateY:j})}else{n.set("left",l);n.set("top",j)}k=(f)?d:0;i=(f)?a:0;if(b){o.setTransform({translateX:k,translateY:i})}else{o.set("left",k);o.set("top",i)}return this.callParent(arguments)}});Ext.define("Ext.fx.animation.SlideOut",{extend:"Ext.fx.animation.Slide",alias:["animation.slideOut"],config:{out:true}});Ext.define("Ext.fx.animation.Fade",{extend:"Ext.fx.animation.Abstract",alternateClassName:"Ext.fx.animation.FadeIn",alias:["animation.fade","animation.fadeIn"],config:{out:false,before:{display:null,opacity:0},after:{opacity:null},reverse:null},updateOut:function(a){var c=this.getTo(),b=this.getFrom();if(a){b.set("opacity",1);c.set("opacity",0)}else{b.set("opacity",0);c.set("opacity",1)}}});Ext.define("Ext.fx.animation.FadeOut",{extend:"Ext.fx.animation.Fade",alias:"animation.fadeOut",config:{out:true,before:{}}});Ext.define("Ext.fx.animation.Flip",{extend:"Ext.fx.animation.Abstract",alias:"animation.flip",config:{easing:"ease-in",direction:"right",half:false,out:null},getData:function(){var h=this.getFrom(),i=this.getTo(),g=this.getDirection(),b=this.getOut(),l=this.getHalf(),c=(l)?90:180,e=1,a=1,k=0,j=0,f=0,d=0;if(b){a=0.8}else{e=0.8}switch(g){case this.DIRECTION_UP:if(b){f=c}else{k=-c}break;case this.DIRECTION_DOWN:if(b){f=-c}else{k=c}break;case this.DIRECTION_RIGHT:if(b){d=-c}else{j=c}break;case this.DIRECTION_LEFT:if(b){d=-c}else{j=c}break}h.setTransform({rotateX:k,rotateY:j,scale:e});i.setTransform({rotateX:f,rotateY:d,scale:a});return this.callParent(arguments)}});Ext.define("Ext.fx.animation.Pop",{extend:"Ext.fx.animation.Abstract",alias:["animation.pop","animation.popIn"],alternateClassName:"Ext.fx.animation.PopIn",config:{out:false,before:{display:null,opacity:0},after:{opacity:null}},getData:function(){var c=this.getTo(),b=this.getFrom(),a=this.getOut();if(a){b.set("opacity",1);b.setTransform({scale:1});c.set("opacity",0);c.setTransform({scale:0})}else{b.set("opacity",0);b.setTransform({scale:0});c.set("opacity",1);c.setTransform({scale:1})}return this.callParent(arguments)}});Ext.define("Ext.fx.animation.PopOut",{extend:"Ext.fx.animation.Pop",alias:"animation.popOut",config:{out:true,before:{}}});Ext.define("Ext.fx.Animation",{requires:["Ext.fx.animation.Slide","Ext.fx.animation.SlideOut","Ext.fx.animation.Fade","Ext.fx.animation.FadeOut","Ext.fx.animation.Flip","Ext.fx.animation.Pop","Ext.fx.animation.PopOut"],constructor:function(b){var a=Ext.fx.animation.Abstract,c;if(typeof b=="string"){c=b;b={}}else{if(b&&b.type){c=b.type}}if(c){if(Ext.os.is.Android2){if(c=="pop"){c="fade"}if(c=="popIn"){c="fadeIn"}if(c=="popOut"){c="fadeOut"}}a=Ext.ClassManager.getByAlias("animation."+c)}return Ext.factory(b,a)}});Ext.define("Ext.fx.layout.card.Style",{extend:"Ext.fx.layout.card.Abstract",requires:["Ext.fx.Animation"],config:{inAnimation:{before:{visibility:null},preserveEndState:false,replacePrevious:true},outAnimation:{preserveEndState:false,replacePrevious:true}},constructor:function(b){var c,a;this.initConfig(b);this.endAnimationCounter=0;c=this.getInAnimation();a=this.getOutAnimation();c.on("animationend","incrementEnd",this);a.on("animationend","incrementEnd",this)},updateDirection:function(a){this.getInAnimation().setDirection(a);this.getOutAnimation().setDirection(a)},updateDuration:function(a){this.getInAnimation().setDuration(a);this.getOutAnimation().setDuration(a)},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)},incrementEnd:function(){this.endAnimationCounter++;if(this.endAnimationCounter>1){this.endAnimationCounter=0;this.fireEvent("animationend",this)}},applyInAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},applyOutAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},updateInAnimation:function(a){a.setScope(this)},updateOutAnimation:function(a){a.setScope(this)},onActiveItemChange:function(a,e,h,i,d){var b=this.getInAnimation(),g=this.getOutAnimation(),f,c;if(e&&h&&h.isPainted()){f=e.renderElement;c=h.renderElement;b.setElement(f);g.setElement(c);g.setOnBeforeEnd(function(j,k){if(k||Ext.Animator.hasRunningAnimations(j)){d.firingArguments[1]=null;d.firingArguments[2]=null}});g.setOnEnd(function(){d.resume()});f.dom.style.setProperty("visibility","hidden","!important");e.show();Ext.Animator.run([g,b]);d.pause()}},destroy:function(){Ext.destroy(this.getInAnimation(),this.getOutAnimation());this.callParent(arguments)}});Ext.define("Ext.fx.layout.card.Slide",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.slide",config:{inAnimation:{type:"slide",easing:"ease-out"},outAnimation:{type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Cover",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cover",config:{reverse:null,inAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out"},outAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1},out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Reveal",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.reveal",config:{inAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1}},outAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Fade",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.fade",config:{reverse:null,inAnimation:{type:"fade",easing:"ease-out"},outAnimation:{type:"fade",easing:"ease-out",out:true}}});Ext.define("Ext.fx.layout.card.Flip",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.flip",config:{duration:500,inAnimation:{type:"flip",half:true,easing:"ease-out",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null}},outAnimation:{type:"flip",half:true,easing:"ease-in",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null},out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Pop",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.pop",config:{duration:500,inAnimation:{type:"pop",easing:"ease-out"},outAnimation:{type:"pop",easing:"ease-in",out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Scroll",{extend:"Ext.fx.layout.card.Abstract",requires:["Ext.fx.easing.Linear"],alias:"fx.layout.card.scroll",config:{duration:150},constructor:function(a){this.initConfig(a);this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this)},getEasing:function(){var a=this.easing;if(!a){this.easing=a=new Ext.fx.easing.Linear()}return a},updateDuration:function(a){this.getEasing().setDuration(a)},onActiveItemChange:function(a,d,l,m,c){var i=this.getDirection(),g=this.getEasing(),k,e,b,h,j,f;if(d&&l){if(this.isAnimating){this.stopAnimation()}d.setWidth("100%");d.setHeight("100%");k=this.getLayout().container.innerElement;h=k.getWidth();j=k.getHeight();e=d.renderElement;b=l.renderElement;this.oldItem=l;this.newItem=d;this.currentEventController=c;this.containerElement=k;this.isReverse=f=this.getReverse();d.show();if(i=="right"){i="left";this.isReverse=f=!f}else{if(i=="down"){i="up";this.isReverse=f=!f}}if(i=="left"){if(f){g.setConfig({startValue:h,endValue:0});k.dom.scrollLeft=h;b.setLeft(h)}else{g.setConfig({startValue:0,endValue:h});e.setLeft(h)}}else{if(f){g.setConfig({startValue:j,endValue:0});k.dom.scrollTop=j;b.setTop(j)}else{g.setConfig({startValue:0,endValue:j});e.setTop(j)}}this.startAnimation();c.pause()}},startAnimation:function(){this.isAnimating=true;this.getEasing().setStartTime(Date.now());this.timer=setInterval(this.doAnimationFrame,20);this.doAnimationFrame()},doAnimationFrame:function(){var d=this.getEasing(),c=this.getDirection(),a="scrollTop",b;if(c=="left"||c=="right"){a="scrollLeft"}if(d.isEnded){this.stopAnimation()}else{b=d.getValue();this.containerElement.dom[a]=b}},stopAnimation:function(){var c=this,e=c.getDirection(),a="setTop",d=c.oldItem,b=c.newItem;if(e=="left"||e=="right"){a="setLeft"}c.currentEventController.resume();if(c.isReverse&&d&&d.renderElement&&d.renderElement.dom){d.renderElement[a](null)}else{if(b&&b.renderElement&&b.renderElement.dom){b.renderElement[a](null)}}clearInterval(c.timer);c.isAnimating=false;c.fireEvent("animationend",c)}});Ext.define("Ext.fx.layout.Card",{requires:["Ext.fx.layout.card.Slide","Ext.fx.layout.card.Cover","Ext.fx.layout.card.Reveal","Ext.fx.layout.card.Fade","Ext.fx.layout.card.Flip","Ext.fx.layout.card.Pop","Ext.fx.layout.card.Scroll"],constructor:function(b){var a=Ext.fx.layout.card.Abstract,c;if(!b){return null}if(typeof b=="string"){c=b;b={}}else{if(b.type){c=b.type}}b.elementBox=false;if(c){if(Ext.os.is.Android2){if(c!="fade"){c="scroll"}}else{if(c==="slide"&&Ext.browser.is.ChromeMobile){c="scroll"}}a=Ext.ClassManager.getByAlias("fx.layout.card."+c)}return Ext.factory(b,a)}});Ext.define("Ext.layout.Card",{extend:"Ext.layout.Default",alias:"layout.card",isCard:true,layoutClass:"x-layout-card",itemClass:"x-layout-card-item",requires:["Ext.fx.layout.Card"],applyAnimation:function(a){return new Ext.fx.layout.Card(a)},updateAnimation:function(b,a){if(b&&b.isAnimation){b.setLayout(this)}if(a){a.destroy()}},setContainer:function(a){this.callSuper(arguments);a.innerElement.addCls(this.layoutClass);a.onInitialized("onContainerInitialized",this)},onContainerInitialized:function(){var a=this.container,b=a.getActiveItem();if(b){b.show()}a.on("activeitemchange","onContainerActiveItemChange",this)},onContainerActiveItemChange:function(a){this.relayEvent(arguments,"doActiveItemChange")},onItemInnerStateChange:function(c,b,d){this.callSuper(arguments);var a=this.container,e=a.getActiveItem();c.toggleCls(this.itemClass,b);c.setLayoutSizeFlags(b?a.LAYOUT_BOTH:0);if(b){if(e!==a.innerIndexOf(c)&&e!==c&&c!==a.pendingActiveItem){c.hide()}}else{if(!d&&!c.isDestroyed&&c.isDestroying!==true){c.show()}}},doActiveItemChange:function(b,c,a){if(a){a.hide()}if(c){c.show()}},destroy:function(){this.callParent(arguments);Ext.destroy(this.getAnimation())}});Ext.define("Ext.util.Filter",{isFilter:true,config:{property:null,value:null,filterFn:Ext.emptyFn,anyMatch:false,exactMatch:false,caseSensitive:false,root:null,id:undefined,scope:null},applyId:function(a){if(!a){if(this.getProperty()){a=this.getProperty()+"-"+String(this.getValue())}if(!a){a=Ext.id(null,"ext-filter-")}}return a},constructor:function(a){this.initConfig(a)},applyFilterFn:function(b){if(b===Ext.emptyFn){b=this.getInitialConfig("filter");if(b){return b}var a=this.getValue();if(!this.getProperty()&&!a&&a!==0){return Ext.emptyFn}else{return this.createFilterFn()}}return b},createFilterFn:function(){var a=this,b=a.createValueMatcher();return function(d){var c=a.getRoot(),e=a.getProperty();if(c){d=d[c]}return b.test(d[e])}},createValueMatcher:function(){var d=this,e=d.getValue(),f=d.getAnyMatch(),c=d.getExactMatch(),a=d.getCaseSensitive(),b=Ext.String.escapeRegex;if(e===null||e===undefined||!e.exec){e=String(e);if(f===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.mixin.Observable"},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,f=e,c=b,a;if(arguments.length==1){f=c;c=d.getKey(f)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,f)}d.map[c]=f}d.length++;d.items.push(f);d.keys.push(c);d.fireEvent("add",d.length-1,f,c);return f},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(f){var e=this,d=0,b,a,c;if(arguments.length>1||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;ha?1:(de?1:(f0?1:-1,g=this.getMinMomentumValue(),d=this.getMaxMomentumValue(),c=(f==1)?d:g,h=this.lastValue,i,b;if(e===0){return this.getStartValue()}if(!this.isOutOfBound){i=a.getValue();b=a.getVelocity();if(Math.abs(b)=g&&i<=d){return i}this.isOutOfBound=true;j.setStartTime(Ext.Date.now()).setStartVelocity(b).setStartValue(c)}i=j.getValue();if(!this.isEnded){if(!this.isBouncingBack){if(h!==null){if((f==1&&ih)){this.isBouncingBack=true}}}else{if(Math.round(i)==c){this.isEnded=true}}}this.lastValue=i;return i}});Ext.define("Ext.fx.easing.EaseOut",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-out",config:{exponent:4,duration:1500},getValue:function(){var f=Ext.Date.now()-this.getStartTime(),d=this.getDuration(),b=this.getStartValue(),h=this.getEndValue(),a=this.distance,c=f/d,g=1-c,e=1-Math.pow(g,this.getExponent()),i=b+(e*a);if(f>=d){this.isEnded=true;return h}return i}});Ext.define("Ext.scroll.Scroller",{extend:"Ext.Evented",requires:["Ext.fx.easing.BoundMomentum","Ext.fx.easing.EaseOut","Ext.util.Translatable"],config:{element:null,direction:"auto",fps:"auto",disabled:null,directionLock:false,momentumEasing:{momentum:{acceleration:30,friction:0.5},bounce:{acceleration:30,springTension:0.3},minVelocity:1},bounceEasing:{duration:400},outOfBoundRestrictFactor:0.5,startMomentumResetTime:300,maxAbsoluteVelocity:6,containerSize:"auto",size:"auto",autoRefresh:true,initialOffset:{x:0,y:0},slotSnapSize:{x:0,y:0},slotSnapOffset:{x:0,y:0},slotSnapEasing:{duration:150},translatable:{translationMethod:"auto",useWrapper:false}},cls:Ext.baseCSSPrefix+"scroll-scroller",containerCls:Ext.baseCSSPrefix+"scroll-container",dragStartTime:0,dragEndTime:0,isDragging:false,isAnimating:false,constructor:function(a){var b=a&&a.element;if(Ext.os.is.Android4&&!Ext.browser.is.Chrome){this.onDrag=Ext.Function.createThrottled(this.onDrag,20,this)}this.listeners={scope:this,touchstart:"onTouchStart",touchend:"onTouchEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd"};this.minPosition={x:0,y:0};this.startPosition={x:0,y:0};this.position={x:0,y:0};this.velocity={x:0,y:0};this.isAxisEnabledFlags={x:false,y:false};this.flickStartPosition={x:0,y:0};this.flickStartTime={x:0,y:0};this.lastDragPosition={x:0,y:0};this.dragDirection={x:0,y:0};this.initialConfig=a;if(b){this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initialize();a.addCls(this.cls);if(!this.getDisabled()){this.attachListeneners()}this.onConfigUpdate(["containerSize","size"],"refreshMaxPosition");this.on("maxpositionchange","snapToBoundary");this.on("minpositionchange","snapToBoundary");return this},applyTranslatable:function(b,a){return Ext.factory(b,Ext.util.Translatable,a)},updateTranslatable:function(a){a.setConfig({element:this.getElement(),listeners:{animationframe:"onAnimationFrame",animationend:"onAnimationEnd",scope:this}})},updateFps:function(a){if(a!=="auto"){this.getTranslatable().setFps(a)}},attachListeneners:function(){this.getContainer().on(this.listeners)},detachListeners:function(){this.getContainer().un(this.listeners)},updateDisabled:function(a){if(a){this.detachListeners()}else{this.attachListeneners()}},updateInitialOffset:function(c){if(typeof c=="number"){c={x:c,y:c}}var b=this.position,a,d;b.x=a=c.x;b.y=d=c.y;this.getTranslatable().translate(-a,-d)},applyDirection:function(a){var e=this.getMinPosition(),d=this.getMaxPosition(),c,b;this.givenDirection=a;if(a==="auto"){c=d.x>e.x;b=d.y>e.y;if(c&&b){a="both"}else{if(c){a="horizontal"}else{a="vertical"}}}return a},updateDirection:function(b){var a=this.isAxisEnabledFlags;a.x=(b==="both"||b==="horizontal");a.y=(b==="both"||b==="vertical")},isAxisEnabled:function(a){this.getDirection();return this.isAxisEnabledFlags[a]},applyMomentumEasing:function(b){var a=Ext.fx.easing.BoundMomentum;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applyBounceEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},updateBounceEasing:function(a){this.getTranslatable().setEasingX(a.x).setEasingY(a.y)},applySlotSnapEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},getMinPosition:function(){var a=this.minPosition;if(!a){this.minPosition=a={x:0,y:0};this.fireEvent("minpositionchange",this,a)}return a},getMaxPosition:function(){var c=this.maxPosition,a,b;if(!c){a=this.getSize();b=this.getContainerSize();this.maxPosition=c={x:Math.max(0,a.x-b.x),y:Math.max(0,a.y-b.y)};this.fireEvent("maxpositionchange",this,c)}return c},refreshMaxPosition:function(){this.maxPosition=null;this.getMaxPosition()},applyContainerSize:function(b){var c=this.getContainer().dom,a,d;if(!c){return}this.givenContainerSize=b;if(b==="auto"){a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applySize:function(b){var c=this.getElement().dom,a,d;if(!c){return}this.givenSize=b;if(b==="auto"){a=c.offsetWidth;d=c.offsetHeight}else{if(typeof b=="number"){a=b;d=b}else{a=b.x;d=b.y}}return{x:a,y:d}},updateAutoRefresh:function(a){this.getElement().toggleListener(a,"resize","onElementResize",this);this.getContainer().toggleListener(a,"resize","onContainerResize",this)},applySlotSnapSize:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},applySlotSnapOffset:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},getContainer:function(){var a=this.container;if(!a){this.container=a=this.getElement().getParent();a.addCls(this.containerCls)}return a},refresh:function(){this.stopAnimation();this.getTranslatable().refresh();this.setSize(this.givenSize);this.setContainerSize(this.givenContainerSize);this.setDirection(this.givenDirection);this.fireEvent("refresh",this);return this},onElementResize:function(a,b){this.setSize({x:b.width,y:b.height});this.refresh()},onContainerResize:function(a,b){this.setContainerSize({x:b.width,y:b.height});this.refresh()},scrollTo:function(c,h,g){var b=this.getTranslatable(),a=this.position,d=false,f,e;if(this.isAxisEnabled("x")){if(typeof c!="number"){c=a.x}else{if(a.x!==c){a.x=c;d=true}}f=-c}if(this.isAxisEnabled("y")){if(typeof h!="number"){h=a.y}else{if(a.y!==h){a.y=h;d=true}}e=-h}if(d){if(g!==undefined){b.translateAnimated(f,e,g)}else{this.fireEvent("scroll",this,a.x,a.y);b.translate(f,e)}}return this},scrollToTop:function(b){var a=this.getInitialOffset();return this.scrollTo(a.x,a.y,b)},scrollToEnd:function(c){var b=this.getSize(),a=this.getContainerSize();return this.scrollTo(b.x-a.x,b.y-a.y,c)},scrollBy:function(b,d,c){var a=this.position;b=(typeof b=="number")?b+a.x:null;d=(typeof d=="number")?d+a.y:null;return this.scrollTo(b,d,c)},onTouchStart:function(){this.isTouching=true;this.stopAnimation()},onTouchEnd:function(){var a=this.position;this.isTouching=false;if(!this.isDragging&&this.snapToSlot()){this.fireEvent("scrollstart",this,a.x,a.y)}},onDragStart:function(l){var o=this.getDirection(),g=l.absDeltaX,f=l.absDeltaY,j=this.getDirectionLock(),i=this.startPosition,d=this.flickStartPosition,k=this.flickStartTime,h=this.lastDragPosition,c=this.position,b=this.dragDirection,n=c.x,m=c.y,a=Ext.Date.now();this.isDragging=true;if(j&&o!=="both"){if((o==="horizontal"&&g>f)||(o==="vertical"&&f>g)){l.stopPropagation()}else{this.isDragging=false;return}}h.x=n;h.y=m;d.x=n;d.y=m;i.x=n;i.y=m;k.x=a;k.y=a;b.x=0;b.y=0;this.dragStartTime=a;this.isDragging=true;this.fireEvent("scrollstart",this,n,m)},onAxisDrag:function(i,q){if(!this.isAxisEnabled(i)){return}var h=this.flickStartPosition,l=this.flickStartTime,j=this.lastDragPosition,e=this.dragDirection,g=this.position[i],k=this.getMinPosition()[i],o=this.getMaxPosition()[i],d=this.startPosition[i],p=j[i],n=d-q,c=e[i],m=this.getOutOfBoundRestrictFactor(),f=this.getStartMomentumResetTime(),b=Ext.Date.now(),a;if(no){a=n-o;n=o+a*m}}if(n>p){e[i]=1}else{if(nf){h[i]=g;l[i]=b}j[i]=n},onDrag:function(b){if(!this.isDragging){return}var a=this.lastDragPosition;this.onAxisDrag("x",b.deltaX);this.onAxisDrag("y",b.deltaY);this.scrollTo(a.x,a.y)},onDragEnd:function(c){var b,a;if(!this.isDragging){return}this.dragEndTime=Ext.Date.now();this.onDrag(c);this.isDragging=false;b=this.getAnimationEasing("x");a=this.getAnimationEasing("y");if(b||a){this.getTranslatable().animate(b,a)}else{this.onScrollEnd()}},getAnimationEasing:function(g){if(!this.isAxisEnabled(g)){return null}var e=this.position[g],f=this.flickStartPosition[g],k=this.flickStartTime[g],c=this.getMinPosition()[g],j=this.getMaxPosition()[g],a=this.getMaxAbsoluteVelocity(),d=null,b=this.dragEndTime,l,i,h;if(ej){d=j}}if(d!==null){l=this.getBounceEasing()[g];l.setConfig({startTime:b,startValue:-e,endValue:-d});return l}h=b-k;if(h===0){return null}i=(e-f)/(b-k);if(i===0){return null}if(i<-a){i=-a}else{if(i>a){i=a}}l=this.getMomentumEasing()[g];l.setConfig({startTime:b,startValue:-e,startVelocity:-i,minMomentumValue:-j,maxMomentumValue:0});return l},onAnimationFrame:function(c,b,d){var a=this.position;a.x=-b;a.y=-d;this.fireEvent("scroll",this,a.x,a.y)},onAnimationEnd:function(){this.snapToBoundary();this.onScrollEnd()},stopAnimation:function(){this.getTranslatable().stopAnimation()},onScrollEnd:function(){var a=this.position;if(this.isTouching||!this.snapToSlot()){this.fireEvent("scrollend",this,a.x,a.y)}},snapToSlot:function(){var b=this.getSnapPosition("x"),a=this.getSnapPosition("y"),c=this.getSlotSnapEasing();if(b!==null||a!==null){this.scrollTo(b,a,{easingX:c.x,easingY:c.y});return true}return false},getSnapPosition:function(c){var g=this.getSlotSnapSize()[c],d=null,a,f,e,b;if(g!==0&&this.isAxisEnabled(c)){a=this.position[c];f=this.getSlotSnapOffset()[c];e=this.getMaxPosition()[c];b=(a-f)%g;if(b!==0){if(Math.abs(b)>g/2){d=a+((b>0)?g-b:b-g);if(d>e){d=a-b}}else{d=a-b}}}return d},snapToBoundary:function(){var g=this.position,c=this.getMinPosition(),f=this.getMaxPosition(),e=c.x,d=c.y,b=f.x,a=f.y,i=Math.round(g.x),h=Math.round(g.y);if(ib){i=b}}if(ha){h=a}}this.scrollTo(i,h)},destroy:function(){var b=this.getElement(),a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}if(b&&!b.isDestroyed){b.removeCls(this.cls);this.getContainer().removeCls(this.containerCls)}Ext.destroy(this.getTranslatable());this.callParent(arguments)}},function(){});Ext.define("Ext.scroll.indicator.Abstract",{extend:"Ext.Component",config:{baseCls:"x-scroll-indicator",axis:"x",value:0,length:null,minLength:6,hidden:true,ui:"dark"},cachedConfig:{ratio:1,barCls:"x-scroll-bar",active:true},barElement:null,barLength:0,gapLength:0,getElementConfig:function(){return{reference:"barElement",children:[this.callParent()]}},applyRatio:function(a){if(isNaN(a)){a=1}return a},refresh:function(){var f=this.barElement,e=f.dom,c=this.getRatio(),b=this.getAxis(),a=(b==="x")?e.offsetWidth:e.offsetHeight,d=a*c;this.barLength=a;this.gapLength=a-d;this.setLength(d);this.updateValue(this.getValue())},updateBarCls:function(a){this.barElement.addCls(a)},updateAxis:function(a){this.element.addCls(this.getBaseCls(),null,a);this.barElement.addCls(this.getBarCls(),null,a)},updateValue:function(a){this.setOffset(this.gapLength*a)},updateActive:function(a){this.barElement[a?"addCls":"removeCls"]("active")},doSetHidden:function(a){var b=this.element.dom.style;if(a){b.opacity="0"}else{b.opacity=""}},applyLength:function(a){return Math.max(this.getMinLength(),a)},updateLength:function(c){if(!this.isDestroyed){var b=this.getAxis(),a=this.element;if(b==="x"){a.setWidth(c)}else{a.setHeight(c)}}},setOffset:function(c){var b=this.getAxis(),a=this.element;if(b==="x"){a.setLeft(c)}else{a.setTop(c)}}});Ext.define("Ext.scroll.indicator.Default",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"default"},setOffset:function(c){var b=this.getAxis(),a=this.element.dom.style;if(b==="x"){a.webkitTransform="translate3d("+c+"px, 0, 0)"}else{a.webkitTransform="translate3d(0, "+c+"px, 0)"}},updateValue:function(f){var b=this.barLength,c=this.gapLength,d=this.getLength(),e,g,a;if(f<=0){g=0;this.updateLength(this.applyLength(d+f*b))}else{if(f>=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)}});Ext.define("Ext.scroll.indicator.ScrollPosition",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"scrollposition"},getElementConfig:function(){var a=this.callParent(arguments);a.children.unshift({className:"x-scroll-bar-stretcher"});return a},updateValue:function(a){if(this.gapLength===0){if(a>1){a=a-1}this.setOffset(this.barLength*a)}else{this.setOffset(this.gapLength*a)}},updateLength:function(){var a=this.barLength,c=this.barElement.dom,b=this.element;this.callParent(arguments);if(this.getAxis()==="x"){c.scrollLeft=a;b.setLeft(a)}else{c.scrollTop=a;b.setTop(a)}},setOffset:function(d){var b=this.barLength,a=this.getMinLength(),c=this.barElement.dom;d=Math.min(b-a,Math.max(d,a-this.getLength()));d=b-d;if(this.getAxis()==="x"){c.scrollLeft=d}else{c.scrollTop=d}}});Ext.define("Ext.scroll.indicator.CssTransform",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"csstransform"},getElementConfig:function(){var a=this.callParent();a.children[0].children=[{reference:"startElement"},{reference:"middleElement"},{reference:"endElement"}];return a},refresh:function(){var d=this.getAxis(),c=this.startElement.dom,a=this.endElement.dom,e=this.middleElement,b,f;if(d==="x"){b=c.offsetWidth;f=a.offsetWidth;e.setLeft(b)}else{b=c.offsetHeight;f=a.offsetHeight;e.setTop(b)}this.startElementLength=b;this.endElementLength=f;this.callParent()},updateLength:function(c){var b=this.getAxis(),a=this.endElement.dom.style,e=this.middleElement.dom.style,d=this.endElementLength,g=c-d,f=g-this.startElementLength;if(b==="x"){a.webkitTransform="translate3d("+g+"px, 0, 0)";e.webkitTransform="translate3d(0, 0, 0) scaleX("+f+")"}else{a.webkitTransform="translate3d(0, "+g+"px, 0)";e.webkitTransform="translate3d(0, 0, 0) scaleY("+f+")"}},updateValue:function(f){var b=this.barLength,c=this.gapLength,d=this.getLength(),e,g,a;if(f<=0){g=0;this.updateLength(this.applyLength(d+f*b))}else{if(f>=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)},setOffset:function(c){var a=this.getAxis(),b=this.element.dom.style;c=Math.round(c);if(a==="x"){b.webkitTransform="translate3d("+c+"px, 0, 0)"}else{b.webkitTransform="translate3d(0, "+c+"px, 0)"}}});Ext.define("Ext.scroll.indicator.Throttled",{extend:"Ext.scroll.indicator.Default",config:{cls:"throttled"},constructor:function(){this.callParent(arguments);this.updateLength=Ext.Function.createThrottled(this.updateLength,75,this);this.setOffset=Ext.Function.createThrottled(this.setOffset,50,this)},doSetHidden:function(a){if(a){this.setOffset(-10000)}else{delete this.lastLength;delete this.lastOffset;this.updateValue(this.getValue())}},updateLength:function(a){a=Math.round(a);if(this.lastLength===a||this.lastOffset===-10000){return}this.lastLength=a;Ext.TaskQueue.requestWrite("doUpdateLength",this,[a])},doUpdateLength:function(c){if(!this.isDestroyed){var b=this.getAxis(),a=this.element;if(b==="x"){a.setWidth(c)}else{a.setHeight(c)}}},setOffset:function(a){a=Math.round(a);if(this.lastOffset===a||this.lastOffset===-10000){return}this.lastOffset=a;Ext.TaskQueue.requestWrite("doSetOffset",this,[a])},doSetOffset:function(c){if(!this.isDestroyed){var b=this.getAxis(),a=this.element.dom.style;if(b==="x"){a.webkitTransform="translate3d("+c+"px, 0, 0)"}else{a.webkitTransform="translate3d(0, "+c+"px, 0)"}}}});Ext.define("Ext.scroll.Indicator",{requires:["Ext.scroll.indicator.Default","Ext.scroll.indicator.ScrollPosition","Ext.scroll.indicator.CssTransform","Ext.scroll.indicator.Throttled"],alternateClassName:"Ext.util.Indicator",constructor:function(a){if(Ext.os.is.Android2||Ext.os.is.Android3||Ext.browser.is.ChromeMobile){return new Ext.scroll.indicator.ScrollPosition(a)}else{if(Ext.os.is.iOS){return new Ext.scroll.indicator.CssTransform(a)}else{if(Ext.os.is.Android4){return new Ext.scroll.indicator.Throttled(a)}else{return new Ext.scroll.indicator.Default(a)}}}}});Ext.define("Ext.scroll.View",{extend:"Ext.Evented",alternateClassName:"Ext.util.ScrollView",requires:["Ext.scroll.Scroller","Ext.scroll.Indicator"],config:{indicatorsUi:"dark",element:null,scroller:{},indicators:{x:{axis:"x"},y:{axis:"y"}},indicatorsHidingDelay:100,cls:Ext.baseCSSPrefix+"scroll-view"},processConfig:function(c){if(!c){return null}if(typeof c=="string"){c={direction:c}}c=Ext.merge({},c);var a=c.scroller,b;if(!a){c.scroller=a={}}for(b in c){if(c.hasOwnProperty(b)){if(!this.hasConfig(b)){a[b]=c[b];delete c[b]}}}return c},constructor:function(a){a=this.processConfig(a);this.useIndicators={x:true,y:true};this.doHideIndicators=Ext.Function.bind(this.doHideIndicators,this);this.initConfig(a)},setConfig:function(a){return this.callParent([this.processConfig(a)])},updateIndicatorsUi:function(a){var b=this.getIndicators();b.x.setUi(a);b.y.setUi(a)},applyScroller:function(a,b){return Ext.factory(a,Ext.scroll.Scroller,b)},applyIndicators:function(b,d){var a=Ext.scroll.Indicator,c=this.useIndicators;if(!b){b={}}if(!b.x){c.x=false;b.x={}}if(!b.y){c.y=false;b.y={}}return{x:Ext.factory(b.x,a,d&&d.x),y:Ext.factory(b.y,a,d&&d.y)}},updateIndicators:function(a){this.indicatorsGrid=Ext.Element.create({className:"x-scroll-bar-grid-wrapper",children:[{className:"x-scroll-bar-grid",children:[{children:[{},{children:[a.y.barElement]}]},{children:[{children:[a.x.barElement]},{}]}]}]})},updateScroller:function(a){a.on({scope:this,scrollstart:"onScrollStart",scroll:"onScroll",scrollend:"onScrollEnd",refresh:"refreshIndicators"})},isAxisEnabled:function(a){return this.getScroller().isAxisEnabled(a)&&this.useIndicators[a]},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(c){var b=c.getFirstChild().getFirstChild(),a=this.getScroller();c.addCls(this.getCls());c.insertFirst(this.indicatorsGrid);a.setElement(b);this.refreshIndicators();return this},showIndicators:function(){var a=this.getIndicators();if(this.hasOwnProperty("indicatorsHidingTimer")){clearTimeout(this.indicatorsHidingTimer);delete this.indicatorsHidingTimer}if(this.isAxisEnabled("x")){a.x.show()}if(this.isAxisEnabled("y")){a.y.show()}},hideIndicators:function(){var a=this.getIndicatorsHidingDelay();if(a>0){this.indicatorsHidingTimer=setTimeout(this.doHideIndicators,a)}else{this.doHideIndicators()}},doHideIndicators:function(){var a=this.getIndicators();if(this.isAxisEnabled("x")){a.x.hide()}if(this.isAxisEnabled("y")){a.y.hide()}},onScrollStart:function(){this.onScroll.apply(this,arguments);this.showIndicators()},onScrollEnd:function(){this.hideIndicators()},onScroll:function(b,a,c){this.setIndicatorValue("x",a);this.setIndicatorValue("y",c)},setIndicatorValue:function(b,f){if(!this.isAxisEnabled(b)){return this}var a=this.getScroller(),c=a.getMaxPosition()[b],e=a.getContainerSize()[b],d;if(c===0){d=f/e;if(f>=0){d+=1}}else{if(f>c){d=1+((f-c)/e)}else{if(f<0){d=f/e}else{d=f/c}}}this.getIndicators()[b].setValue(d)},refreshIndicator:function(d){if(!this.isAxisEnabled(d)){return this}var a=this.getScroller(),b=this.getIndicators()[d],e=a.getContainerSize()[d],f=a.getSize()[d],c=e/f;b.setRatio(c);b.refresh()},refresh:function(){return this.getScroller().refresh()},refreshIndicators:function(){var a=this.getIndicators();a.x.setActive(this.isAxisEnabled("x"));a.y.setActive(this.isAxisEnabled("y"));this.refreshIndicator("x");this.refreshIndicator("y")},destroy:function(){var a=this.getElement(),b=this.getIndicators();Ext.destroy(this.getScroller(),this.indicatorsGrid);if(this.hasOwnProperty("indicatorsHidingTimer")){clearTimeout(this.indicatorsHidingTimer);delete this.indicatorsHidingTimer}if(a&&!a.isDestroyed){a.removeCls(this.getCls())}b.x.destroy();b.y.destroy();delete this.indicatorsGrid;this.callParent(arguments)}});Ext.define("Ext.behavior.Scrollable",{extend:"Ext.behavior.Behavior",requires:["Ext.scroll.View"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.scrollView.refresh()},setConfig:function(d){var b=this.scrollView,c=this.component,a;if(d){if(!b){this.scrollView=b=new Ext.scroll.View(d);b.on("destroy","onScrollViewDestroy",this);c.setUseBodyElement(true);this.scrollerElement=a=c.innerElement;this.scrollContainer=a.wrap();b.setElement(c.bodyElement);if(c.isPainted()){this.onComponentPainted(c)}c.on(this.listeners)}else{if(Ext.isString(d)||Ext.isObject(d)){b.setConfig(d)}}}else{if(b){b.destroy()}}return this},getScrollView:function(){return this.scrollView},onScrollViewDestroy:function(){var b=this.component,a=this.scrollerElement;if(!a.isDestroyed){this.scrollerElement.unwrap()}this.scrollContainer.destroy();if(!b.isDestroyed){b.un(this.listeners)}delete this.scrollerElement;delete this.scrollView;delete this.scrollContainer},onComponentDestroy:function(){var a=this.scrollView;if(a){a.destroy()}}});Ext.define("Ext.Mask",{extend:"Ext.Component",xtype:"mask",config:{baseCls:Ext.baseCSSPrefix+"mask",transparent:false,top:0,left:0,right:0,bottom:0},initialize:function(){this.callSuper();this.element.on("*","onEvent",this)},onEvent:function(b){var a=arguments[arguments.length-1];if(a.info.eventName==="tap"){this.fireEvent("tap",this,b);return false}if(b&&b.stopEvent){b.stopEvent()}return false},updateTransparent:function(a){this[a?"addCls":"removeCls"](this.getBaseCls()+"-transparent")}});Ext.define("Ext.Container",{extend:"Ext.Component",alternateClassName:"Ext.lib.Container",requires:["Ext.layout.*","Ext.ItemCollection","Ext.behavior.Scrollable","Ext.Mask"],xtype:"container",eventedConfig:{activeItem:0,scrollable:null},config:{layout:null,control:{},defaults:null,items:null,autoDestroy:true,defaultType:null,useBodyElement:null,masked:null,modal:null,hideOnMaskTap:null},isContainer:true,constructor:function(a){var b=this;b._items=b.items=new Ext.ItemCollection();b.innerItems=[];b.onItemAdd=b.onFirstItemAdd;b.callParent(arguments)},getElementConfig:function(){return{reference:"element",classList:["x-container","x-unsized"],children:[{reference:"innerElement",className:"x-inner"}]}},applyMasked:function(b,c){var a=true;if(b===false){b=true;a=false}c=Ext.factory(b,Ext.Mask,c);if(c){this.add(c);c.setHidden(!a)}return c},mask:function(a){this.setMasked(a||true)},unmask:function(){this.setMasked(false)},setParent:function(a){this.callSuper(arguments);if(a){var b=this.getModal();if(b){a.insertBefore(b,this);b.setZIndex(this.getZIndex()-1)}}},applyModal:function(c,b){var a=true;if(c===false){c=true;a=false}b=Ext.factory(c,Ext.Mask,b);if(b){b.setVisibility(a)}return b},updateModal:function(b){var a=this.getParent();if(a){if(b){a.insertBefore(b,this);b.setZIndex(this.getZIndex()-1)}else{a.remove(b)}}},updateHideOnMaskTap:function(b){var a=this.getModal();if(a){a[b?"on":"un"].call(a,"tap","hide",this)}},updateZIndex:function(b){var a=this.getModal();this.callParent(arguments);if(a){a.setZIndex(b-1)}},updateBaseCls:function(a,b){var c=this,d=c.getUi();if(a){this.element.addCls(a);this.innerElement.addCls(a,null,"inner");if(d){this.element.addCls(a,null,d)}}if(b){this.element.removeCls(b);this.innerElement.removeCls(a,null,"inner");if(d){this.element.removeCls(b,null,d)}}},updateUseBodyElement:function(a){if(a){this.link("bodyElement",this.innerElement.wrap({cls:"x-body"}))}},applyItems:function(a,d){if(a){var b=this;b.getDefaultType();b.getDefaults();if(b.initialized&&d.length>0){b.removeAll()}b.add(a);if(b.initialized){var c=b.initialConfig.activeItem||b.config.activeItem||0;b.setActiveItem(c)}}},applyControl:function(c){var a,b,e,d;for(a in c){d=c[a];for(b in d){e=d[b];if(Ext.isObject(e)){e.delegate=a}}d.delegate=a;this.addListener(d)}return c},onFirstItemAdd:function(){delete this.onItemAdd;if(this.innerHtmlElement&&!this.getHtml()){this.innerHtmlElement.destroy();delete this.innerHtmlElement}this.on("innerstatechange","onItemInnerStateChange",this,{delegate:"> component"});return this.onItemAdd.apply(this,arguments)},getLayout:function(){var a=this.layout;if(!a){a=this.link("_layout",this.link("layout",Ext.factory(this._layout||"default",Ext.layout.Default,null,"layout")));a.setContainer(this)}return a},updateDefaultType:function(a){this.defaultItemClass=Ext.ClassManager.getByAlias("widget."+a)},applyDefaults:function(a){if(a){this.factoryItem=this.factoryItemWithDefaults;return a}},factoryItem:function(a){return Ext.factory(a,this.defaultItemClass)},factoryItemWithDefaults:function(c){var b=this,d=b.getDefaults(),a;if(!d){return Ext.factory(c,b.defaultItemClass)}if(c.isComponent){a=c;if(d&&c.isInnerItem()&&!b.has(a)){a.setConfig(d,true)}}else{if(d&&!c.ignoreDefaults){if(!(c.hasOwnProperty("left")&&c.hasOwnProperty("right")&&c.hasOwnProperty("top")&&c.hasOwnProperty("bottom")&&c.hasOwnProperty("docked")&&c.hasOwnProperty("centered"))){c=Ext.mergeIf({},c,d)}}a=Ext.factory(c,b.defaultItemClass)}return a},add:function(a){var e=this,b,d,c,f;a=Ext.Array.from(a);d=a.length;for(b=0;b0&&c.isInnerItem()){f=c}}if(f){this.setActiveItem(f)}return c},doAdd:function(d){var c=this,a=c.getItems(),b;if(!a.has(d)){b=a.length;a.add(d);if(d.isInnerItem()){c.insertInner(d)}d.setParent(c);c.onItemAdd(d,b)}},remove:function(d,b){var c=this,a=c.indexOf(d),e=c.getInnerItems();if(b===undefined){b=c.getAutoDestroy()}if(a!==-1){if(!c.removingAll&&e.length>1&&d===c.getActiveItem()){c.on({activeitemchange:"doRemove",scope:c,single:true,order:"after",args:[d,a,b]});c.doResetActiveItem(e.indexOf(d))}else{c.doRemove(d,a,b);if(e.length===0){c.setActiveItem(null)}}}return c},doResetActiveItem:function(a){if(a===0){this.setActiveItem(1)}else{this.setActiveItem(0)}},doRemove:function(d,a,b){var c=this;c.items.remove(d);if(d.isInnerItem()){c.removeInner(d)}c.onItemRemove(d,a,b);d.setParent(null);if(b){d.destroy()}},removeAll:function(c,f){var a=this.items,e=a.length,b=0,d;if(c===undefined){c=this.getAutoDestroy()}f=Boolean(f);this.removingAll=true;for(;b=0;b--){c.insert(a,d[b])}return c}d=this.factoryItem(d);this.doInsert(a,d);return d},doInsert:function(d,f){var e=this,b=e.items,c=b.length,a,g;g=f.isInnerItem();if(d>c){d=c}if(b[d-1]===f){return e}a=e.indexOf(f);if(a!==-1){if(a "+a)[0]||null},down:function(a){return this.query(a)[0]||null},destroy:function(){var b=this,a=b.getModal();if(a){a.destroy()}b.removeAll(true,true);b.unlink("_scrollable");Ext.destroy(b.items);b.callSuper()}},function(){this.addMember("defaultItemClass",this)});Ext.define("Ext.util.Point",{radianToDegreeConstant:180/Math.PI,statics:{fromEvent:function(b){var a=b.changedTouches,c=(a&&a.length>0)?a[0]:b;return this.fromTouch(c)},fromTouch:function(a){return new this(a.pageX,a.pageY)},from:function(a){if(!a){return new this(0,0)}if(!(a instanceof this)){return new this(a.x,a.y)}return a}},constructor:function(a,b){if(typeof a=="undefined"){a=0}if(typeof b=="undefined"){b=0}this.x=a;this.y=b;return this},clone:function(){return new this.self(this.x,this.y)},copy:function(){return this.clone.apply(this,arguments)},copyFrom:function(a){this.x=a.x;this.y=a.y;return this},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x===a.x&&this.y===a.y)},isCloseTo:function(c,b){if(typeof b=="number"){b={x:b};b.y=b.x}var a=c.x,f=c.y,e=b.x,d=b.y;return(this.x<=a+e&&this.x>=a-e&&this.y<=f+d&&this.y>=f-d)},isWithin:function(){return this.isCloseTo.apply(this,arguments)},translate:function(a,b){this.x+=a;this.y+=b;return this},roundedEquals:function(a){return(Math.round(this.x)===Math.round(a.x)&&Math.round(this.y)===Math.round(a.y))},getDistanceTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.sqrt(c*c+a*a)},getAngleTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.atan2(a,c)*this.radianToDegreeConstant}});Ext.define("Ext.util.LineSegment",{requires:["Ext.util.Point"],constructor:function(b,a){var c=Ext.util.Point;this.point1=c.from(b);this.point2=c.from(a)},intersects:function(l){var o=this.point1,m=this.point2,i=l.point1,f=l.point2,c=o.x,b=m.x,a=i.x,q=f.x,p=o.y,n=m.y,k=i.y,h=f.y,g=(c-b)*(k-h)-(p-n)*(a-q),j,e;if(g==0){return null}j=((a-q)*(c*n-p*b)-(c-b)*(a*h-k*q))/g;e=((k-h)*(c*n-p*b)-(p-n)*(a*h-k*q))/g;if(jMath.max(c,b)||jMath.max(a,q)||eMath.max(p,n)||eMath.max(k,h)){return null}return new Ext.util.Point(j,e)},toString:function(){return this.point1.toString()+" "+this.point2.toString()}});Ext.define("Ext.Panel",{extend:"Ext.Container",requires:["Ext.util.LineSegment"],alternateClassName:"Ext.lib.Panel",xtype:"panel",isPanel:true,config:{baseCls:Ext.baseCSSPrefix+"panel",bodyPadding:null,bodyMargin:null,bodyBorder:null},getElementConfig:function(){var a=this.callParent();a.children.push({reference:"tipElement",className:"x-anchor",hidden:true});return a},applyBodyPadding:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyPadding:function(a){this.element.setStyle("padding",a)},applyBodyMargin:function(a){if(a===true){a=5}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyMargin:function(a){this.element.setStyle("margin",a)},applyBodyBorder:function(a){if(a===true){a=1}if(a){a=Ext.dom.Element.unitizeBox(a)}return a},updateBodyBorder:function(a){this.element.setStyle("border-width",a)},alignTo:function(m){var w=this.tipElement;w.hide();if(this.currentTipPosition){w.removeCls("x-anchor-"+this.currentTipPosition)}this.callParent(arguments);var f=Ext.util.LineSegment,d=m.isComponent?m.renderElement:m,a=this.renderElement,n=d.getPageBox(),k=a.getPageBox(),b=k.left,t=k.top,C=k.right,h=k.bottom,j=b+(k.width/2),i=t+(k.height/2),o={x:b,y:t},l={x:C,y:t},B={x:b,y:h},D={x:C,y:h},y={x:j,y:i},s=n.left+(n.width/2),q=n.top+(n.height/2),v={x:s,y:q},c=new f(y,v),g=0,A=0,e,z,r,p,x,u;w.setVisibility(false);w.show();e=w.getSize();z=e.width;r=e.height;if(c.intersects(new f(o,l))){x=Math.min(Math.max(s,b+z),C-(z));u=t;A=r+10;p="top"}else{if(c.intersects(new f(o,B))){x=b;u=Math.min(Math.max(q+(z/2),z*1.6),h-(z/2.2));g=r+10;p="left"}else{if(c.intersects(new f(B,D))){x=Math.min(Math.max(s,b+z),C-z);u=h;A=-r-10;p="bottom"}else{if(c.intersects(new f(l,D))){x=C;u=Math.max(Math.min(q-r,h-z*1.3),z/2);g=-r-10;p="right"}}}}if(x||u){this.currentTipPosition=p;w.addCls("x-anchor-"+p);w.setLeft(x-b);w.setTop(u-t);w.setVisibility(true);this.setLeft(this.getLeft()+g);this.setTop(this.getTop()+A)}}});Ext.define("Ext.Sheet",{extend:"Ext.Panel",xtype:"sheet",requires:["Ext.fx.Animation"],config:{baseCls:Ext.baseCSSPrefix+"sheet",modal:true,centered:true,stretchX:null,stretchY:null,enter:"bottom",exit:"bottom",showAnimation:!Ext.os.is.Android2?{type:"slideIn",duration:250,easing:"ease-out"}:null,hideAnimation:!Ext.os.is.Android2?{type:"slideOut",duration:250,easing:"ease-in"}:null},applyHideAnimation:function(b){var a=this.getExit(),d=a;if(a===null){return null}if(b===true){b={type:"slideOut"}}if(Ext.isString(b)){b={type:b}}var c=Ext.factory(b,Ext.fx.Animation);if(c){if(a=="bottom"){d="down"}if(a=="top"){d="up"}c.setDirection(d)}return c},applyShowAnimation:function(a){var d=this.getEnter(),c=d;if(d===null){return null}if(a===true){a={type:"slideIn"}}if(Ext.isString(a)){a={type:a}}var b=Ext.factory(a,Ext.fx.Animation);if(b){if(d=="bottom"){c="down"}if(d=="top"){c="up"}b.setBefore({display:null});b.setReverse(true);b.setDirection(c)}return b},updateStretchX:function(a){this.getLeft();this.getRight();if(a){this.setLeft(0);this.setRight(0)}},updateStretchY:function(a){this.getTop();this.getBottom();if(a){this.setTop(0);this.setBottom(0)}}});Ext.define("Ext.Button",{extend:"Ext.Component",xtype:"button",cachedConfig:{pressedCls:Ext.baseCSSPrefix+"button-pressing",badgeCls:Ext.baseCSSPrefix+"badge",hasBadgeCls:Ext.baseCSSPrefix+"hasbadge",labelCls:Ext.baseCSSPrefix+"button-label",iconMaskCls:Ext.baseCSSPrefix+"icon-mask",iconCls:null},config:{badgeText:null,text:null,icon:null,iconAlign:"left",pressedDelay:0,iconMask:null,handler:null,scope:null,autoEvent:null,ui:"normal",baseCls:Ext.baseCSSPrefix+"button"},template:[{tag:"span",reference:"badgeElement",hidden:true},{tag:"span",className:Ext.baseCSSPrefix+"button-icon",reference:"iconElement",hidden:true},{tag:"span",reference:"textElement",hidden:true}],initialize:function(){this.callParent();this.element.on({scope:this,tap:"onTap",touchstart:"onPress",touchend:"onRelease"})},updateBadgeText:function(c){var a=this.element,b=this.badgeElement;if(c){b.show();b.setText(c)}else{b.hide()}a[(c)?"addCls":"removeCls"](this.getHasBadgeCls())},updateText:function(b){var a=this.textElement;if(a){if(b){a.show();a.setHtml(b)}else{a.hide()}}},updateHtml:function(b){var a=this.textElement;if(b){a.show();a.setHtml(b)}else{a.hide()}},updateBadgeCls:function(b,a){this.badgeElement.replaceCls(a,b)},updateHasBadgeCls:function(b,c){var a=this.element;if(a.hasCls(c)){a.replaceCls(c,b)}},updateLabelCls:function(b,a){this.textElement.replaceCls(a,b)},updatePressedCls:function(b,c){var a=this.element;if(a.hasCls(c)){a.replaceCls(c,b)}},updateIcon:function(b){var c=this,a=c.iconElement;if(b){c.showIconElement();a.setStyle("background-image",b?"url("+b+")":"");c.refreshIconAlign();c.refreshIconMask()}else{c.hideIconElement();c.setIconAlign(false)}},updateIconCls:function(c,a){var d=this,b=d.iconElement;if(c){d.showIconElement();b.replaceCls(a,c);d.refreshIconAlign();d.refreshIconMask()}else{d.hideIconElement();d.setIconAlign(false)}},updateIconAlign:function(d,c){var b=this.element,a=Ext.baseCSSPrefix+"iconalign-";if(!this.getText()){d="center"}b.removeCls(a+"center");b.removeCls(a+c);if(this.getIcon()||this.getIconCls()){b.addCls(a+d)}},refreshIconAlign:function(){this.updateIconAlign(this.getIconAlign())},updateIconMaskCls:function(c,b){var a=this.iconElement;if(this.getIconMask()){a.replaceCls(b,c)}},updateIconMask:function(a){this.iconElement[a?"addCls":"removeCls"](this.getIconMaskCls())},refreshIconMask:function(){this.updateIconMask(this.getIconMask())},applyAutoEvent:function(b){var a=this;if(typeof b=="string"){b={name:b,scope:a.scope||a}}return b},updateAutoEvent:function(c){var a=c.name,b=c.scope;this.setHandler(function(){b.fireEvent(a,b,this)});this.setScope(b)},hideIconElement:function(){this.iconElement.hide()},showIconElement:function(){this.iconElement.show()},applyUi:function(a){if(a&&Ext.isString(a)){var b=a.split("-");if(b&&(b[1]=="back"||b[1]=="forward")){return b}}return a},getUi:function(){var a=this._ui;if(Ext.isArray(a)){return a.join("-")}return a},applyPressedDelay:function(a){if(Ext.isNumber(a)){return a}return(a)?100:0},onPress:function(){var c=this,a=c.element,d=c.getPressedDelay(),b=c.getPressedCls();if(!c.getDisabled()){if(d>0){c.pressedTimeout=setTimeout(function(){delete c.pressedTimeout;if(a){a.addCls(b)}},d)}else{a.addCls(b)}}},onRelease:function(a){this.fireAction("release",[this,a],"doRelease")},doRelease:function(a,b){if(!a.getDisabled()){if(a.hasOwnProperty("pressedTimeout")){clearTimeout(a.pressedTimeout);delete a.pressedTimeout}else{a.element.removeCls(a.getPressedCls())}}},onTap:function(a){if(this.getDisabled()){return false}this.fireAction("tap",[this,a],"doTap")},doTap:function(c,d){var b=c.getHandler(),a=c.getScope()||c;if(!b){return}if(typeof b=="string"){b=a[b]}if(d&&d.preventDefault){d.preventDefault()}b.apply(a,arguments)}},function(){});Ext.define("Ext.ActionSheet",{extend:"Ext.Sheet",alias:"widget.actionsheet",requires:["Ext.Button"],config:{baseCls:Ext.baseCSSPrefix+"sheet-action",left:0,right:0,bottom:0,centered:false,height:"auto",defaultType:"button"}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.mixin.Observable"},statics:{requestId:0},config:{url:null,async:true,method:null,username:"",password:"",disableCaching:true,disableCachingParam:"_dc",timeout:30000,extraParams:null,defaultHeaders:null,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",autoAbort:false},textAreaRe:/textarea/i,multiPartRe:/multipart\/form-data/i,lineBreakRe:/\r\n/g,constructor:function(a){this.initConfig(a);this.requests={}},request:function(j){j=j||{};var f=this,i=j.scope||window,e=j.username||f.getUsername(),g=j.password||f.getPassword()||"",b,c,d,a,h;if(f.fireEvent("beforerequest",f,j)!==false){c=f.setOptions(j,i);if(this.isFormUpload(j)===true){this.upload(j.form,c.url,c.data,j);return null}if(j.autoAbort===true||f.getAutoAbort()){f.abort()}h=this.getXhrInstance();b=j.async!==false?(j.async||f.getAsync()):false;if(e){h.open(c.method,c.url,b,e,g)}else{h.open(c.method,c.url,b)}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.getTimeout())};f.requests[d.id]=d;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(e,c,i,k){e=Ext.getDom(e);k=k||{};var d=Ext.id(),g=document.createElement("iframe"),j=[],h="multipart/form-data",f={target:e.target,method:e.method,encoding:e.encoding,enctype:e.enctype,action:e.action},b=function(l,m){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:m,name:l});e.appendChild(a);j.push(a)},a;Ext.fly(g).set({id:d,name:d,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(g);if(document.frames){document.frames[d].name=d}Ext.fly(e).set({target:d,method:"POST",enctype:h,encoding:h,action:c||f.action});if(i){Ext.iterate(Ext.Object.fromQueryString(i),function(l,m){if(Ext.isArray(m)){Ext.each(m,function(n){b(l,n)})}else{b(l,m)}})}Ext.fly(g).on("load",Ext.Function.bind(this.onUploadComplete,this,[g,k]),null,{single:true});e.submit();Ext.fly(e).set(f);Ext.each(j,function(l){Ext.removeNode(l)})},onUploadComplete:function(h,b){var c=this,a={responseText:"",responseXML:null},g,f;try{g=h.contentWindow.document||h.contentDocument||window.frames[id].document;if(g){if(g.body){if(this.textAreaRe.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||(this.multiPartRe).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.getExtraParams(),d=k.urlParams,c=k.url||h.getUrl(),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.getMethod()||((e||f)?"POST":"GET")).toUpperCase();this.setupMethod(k,b);a=k.disableCaching!==false?(k.disableCaching||h.getDisableCaching()):false;if(a){c=Ext.urlAppend(c,(k.disableCachingParam||h.getDisableCachingParam())+"="+(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.getDefaultHeaders()||{}),k=h.getDefaultPostHeader(),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.getUseDefaultXhrHeader()&&m.useDefaultXhrHeader!==false)||m.useDefaultXhrHeader)&&!b["X-Requested-With"]){b["X-Requested-With"]=h.getDefaultXhrHeader()}try{for(j in b){if(b.hasOwnProperty(j)){f=b[j];l.setRequestHeader(j,f)}}}catch(g){h.fireEvent("exception",j,f)}if(m.withCredentials){l.withCredentials=m.withCredentials}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||(a==0&&d.responseText.length>0),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 g=c.xhr,a={},h,d,i,e,f,b;if(c.timedout||c.aborted){c.success=false;h=[]}else{h=g.getAllResponseHeaders().replace(this.lineBreakRe,"\n").split("\n")}d=h.length;while(d--){i=h[d];e=i.indexOf(":");if(e>=0){f=i.substr(0,e).toLowerCase();if(i.charAt(e+1)==" "){++e}a[f]=i.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:g.status,statusText:g.statusText,getResponseHeader:function(j){return a[j.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:g.responseText,responseXML:g.responseXML};g=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.Anim",{isAnim:true,disableAnimations:false,defaultConfig:{from:{},to:{},duration:250,delay:0,easing:"ease-in-out",autoClear:true,out:true,direction:null,reverse:false},opposites:{left:"right",right:"left",up:"down",down:"up"},constructor:function(a){a=Ext.apply({},a||{},this.defaultConfig);this.config=a;this.callSuper([a]);this.running=[]},initConfig:function(c,b){var d=this,a=Ext.apply({},b||{},d.config);a.el=c=Ext.get(c);if(a.reverse&&d.opposites[a.direction]){a.direction=d.opposites[a.direction]}if(d.config.before){d.config.before.call(a,c,a)}if(b.before){b.before.call(a.scope||a,c,a)}return a},run:function(c,a){c=Ext.get(c);a=a||{};var d=this,b=c.dom.style,e,f=a.after;if(d.running[c.id]){d.onTransitionEnd(null,c,{config:a,after:f})}a=this.initConfig(c,a);if(this.disableAnimations){for(e in a.to){if(!a.to.hasOwnProperty(e)){continue}b[e]=a.to[e]}this.onTransitionEnd(null,c,{config:a,after:f});return d}c.un("transitionend",d.onTransitionEnd,d);b.webkitTransitionDuration="0ms";for(e in a.from){if(!a.from.hasOwnProperty(e)){continue}b[e]=a.from[e]}setTimeout(function(){if(!c.dom){return}if(a.is3d===true){c.parent().setStyle({"-webkit-perspective":"1200","-webkit-transform-style":"preserve-3d"})}b.webkitTransitionDuration=a.duration+"ms";b.webkitTransitionProperty="all";b.webkitTransitionTimingFunction=a.easing;c.on("transitionend",d.onTransitionEnd,d,{single:true,config:a,after:f});for(e in a.to){if(!a.to.hasOwnProperty(e)){continue}b[e]=a.to[e]}},a.delay||5);d.running[c.id]=a;return d},onTransitionEnd:function(e,c,g){c=Ext.get(c);if(this.running[c.id]===undefined){return}var b=c.dom.style,a=g.config,d=this,f;if(a.autoClear){for(f in a.to){if(!a.to.hasOwnProperty(f)||a[f]===false){continue}b[f]=""}}b.webkitTransitionDuration=null;b.webkitTransitionProperty=null;b.webkitTransitionTimingFunction=null;if(a.is3d){c.parent().setStyle({"-webkit-perspective":"","-webkit-transform-style":""})}if(d.config.after){d.config.after.call(a,c,a)}if(g.after){g.after.call(a.scope||d,c,a)}delete d.running[c.id]}},function(){Ext.Anim.seed=1000;Ext.Anim.run=function(b,c,a){if(b.isComponent){b=b.element}a=a||{};if(c.isAnim){c.run(b,a)}else{if(Ext.isObject(c)){if(a.before&&c.before){a.before=Ext.createInterceptor(a.before,c.before,c.scope)}if(a.after&&c.after){a.after=Ext.createInterceptor(a.after,c.after,c.scope)}a=Ext.apply({},a,c);c=c.type}if(!Ext.anims[c]){throw c+" is not a valid animation type."}else{if(b&&b.dom){Ext.anims[c].run(b,a)}}}};Ext.anims={fade:new Ext.Anim({type:"fade",before:function(b){var c=1,a=1,e=b.getStyle("z-index")=="auto"?0:b.getStyle("z-index"),d=e;if(this.out){a=0}else{d=Math.abs(e)+1;c=0}this.from={opacity:c,"z-index":d};this.to={opacity:a,"z-index":d}}}),slide:new Ext.Anim({direction:"left",cover:false,reveal:false,opacity:false,"z-index":false,before:function(a){var c=a.getStyle("z-index")=="auto"?0:a.getStyle("z-index"),f=a.getStyle("opacity"),h=c+1,d=this.out,l=this.direction,k=0,i=0,j=0,g=0,b=a.getHeight(),e=a.getWidth();if(l=="left"||l=="right"){if(d){k=-e}else{j=e}}else{if(l=="up"||l=="down"){if(d){i=-b}else{g=b}}}if(l=="right"||l=="down"){i*=-1;k*=-1;g*=-1;j*=-1}if(this.cover&&d){k=0;i=0;h=c}else{if(this.reveal&&!d){j=0;g=0;h=c}}this.from={"-webkit-transform":"translate3d("+j+"px, "+g+"px, 0)","z-index":h,opacity:f-0.01};this.to={"-webkit-transform":"translate3d("+k+"px, "+i+"px, 0)","z-index":h,opacity:f}}}),pop:new Ext.Anim({scaleOnExit:true,before:function(d){var b=1,c=1,g=1,a=1,h=d.getStyle("z-index")=="auto"?0:d.getStyle("z-index"),f=h,e=h;if(!this.out){b=0.01;f=h+1;e=h+1;g=0}else{if(this.scaleOnExit){c=0.01;a=0}else{a=0.8}}this.from={"-webkit-transform":"scale("+b+")","-webkit-transform-origin":"50% 50%",opacity:g,"z-index":f};this.to={"-webkit-transform":"scale("+c+")","-webkit-transform-origin":"50% 50%",opacity:a,"z-index":e}}}),flip:new Ext.Anim({is3d:true,direction:"left",before:function(c){var f="Y",a=1,b=1,e=0,d=0;if(this.out){d=-180;b=0.8}else{e=180;a=0.8}if(this.direction=="up"||this.direction=="down"){f="X"}if(this.direction=="right"||this.direction=="left"){d*=-1;e*=-1}this.from={"-webkit-transform":"rotate"+f+"("+e+"deg) scale("+a+")","-webkit-backface-visibility":"hidden"};this.to={"-webkit-transform":"rotate"+f+"("+d+"deg) scale("+b+")","-webkit-backface-visibility":"hidden"}}}),cube:new Ext.Anim({is3d:true,direction:"left",style:"outer",before:function(b){var k="0% 0%",l=0,a=0,i="Y",f=0,g=0,e=b.getWidth(),d=b.getHeight(),j=true,c=" translateX(0)",h="";if(this.direction=="left"||this.direction=="right"){if(this.out){k="100% 100%";g=e;a=-90}else{k="0% 0%";f=e;l=90}}else{if(this.direction=="up"||this.direction=="down"){i="X";if(this.out){k="100% 100%";g=d;a=90}else{k="0% 0%";f=d;l=-90}}}if(this.direction=="down"||this.direction=="right"){l*=-1;a*=-1;k=(k=="0% 0%")?"100% 100%":"0% 0%"}if(this.style=="inner"){f*=-1;g*=-1;l*=-1;a*=-1;if(!this.out){h=" translateX(0px)";k="0% 50%"}else{h=c;k="100% 50%"}}this.from={"-webkit-transform":"rotate"+i+"("+l+"deg)"+(j?" translateZ("+f+"px)":"")+c,"-webkit-transform-origin":k};this.to={"-webkit-transform":"rotate"+i+"("+a+"deg) translateZ("+g+"px)"+h,"-webkit-transform-origin":k}},duration:250}),wipe:new Ext.Anim({before:function(b){var d=b.getStyle("z-index"),c,a="";if(!this.out){c=d+1;a="-webkit-gradient(linear, left bottom, right bottom, from(transparent), to(#000), color-stop(66%, #000), color-stop(33%, transparent))";this.from={"-webkit-mask-image":a,"-webkit-mask-size":b.getWidth()*3+"px "+b.getHeight()+"px","z-index":c,"-webkit-mask-position-x":0};this.to={"-webkit-mask-image":a,"-webkit-mask-size":b.getWidth()*3+"px "+b.getHeight()+"px","z-index":c,"-webkit-mask-position-x":-b.getWidth()*2+"px"}}},duration:500})}});Ext.define("Ext.Media",{extend:"Ext.Component",xtype:"media",config:{url:"",enableControls:Ext.os.is.Android?false:true,autoResume:false,autoPause:true,preload:true,loop:false,media:null,volume:1,muted:false},constructor:function(){this.mediaEvents={};this.callSuper(arguments)},initialize:function(){var a=this;a.callParent();a.on({scope:a,activate:a.onActivate,deactivate:a.onDeactivate});a.addMediaListener({canplay:"onCanPlay",play:"onPlay",pause:"onPause",ended:"onEnd",volumechange:"onVolumeChange",timeupdate:"onTimeUpdate"})},addMediaListener:function(c,a){var b=this,d=b.media.dom,e=Ext.Function.bind;Ext.Object.each(c,function(g,f){f=e(b[f],b);b.mediaEvents[g]=f;d.addEventListener(g,f)})},onPlay:function(){this.fireEvent("play",this)},onCanPlay:function(){this.fireEvent("canplay",this)},onPause:function(){this.fireEvent("pause",this,this.getCurrentTime())},onEnd:function(){this.fireEvent("ended",this,this.getCurrentTime())},onVolumeChange:function(){this.fireEvent("volumechange",this,this.media.dom.volume)},onTimeUpdate:function(){this.fireEvent("timeupdate",this,this.getCurrentTime())},isPlaying:function(){return !Boolean(this.media.dom.paused)},onActivate:function(){var a=this;if(a.getAutoResume()&&!a.isPlaying()){a.play()}},onDeactivate:function(){var a=this;if(a.getAutoPause()&&a.isPlaying()){a.pause()}},updateUrl:function(a){var b=this.media.dom;b.src=a;if("load" in b){b.load()}if(this.isPlaying()){this.play()}},updateEnableControls:function(a){this.media.dom.controls=a?"controls":false},updateLoop:function(a){this.media.dom.loop=a?"loop":false},play:function(){var a=this.media.dom;if("play" in a){a.play();setTimeout(function(){a.play()},10)}},pause:function(){var a=this.media.dom;if("pause" in a){a.pause()}},toggle:function(){if(this.isPlaying()){this.pause()}else{this.play()}},stop:function(){var a=this;a.setCurrentTime(0);a.fireEvent("stop",a);a.pause()},updateVolume:function(a){this.media.dom.volume=a},updateMuted:function(a){this.fireEvent("mutedchange",this,a);this.media.dom.muted=a},getCurrentTime:function(){return this.media.dom.currentTime},setCurrentTime:function(a){this.media.dom.currentTime=a;return a},getDuration:function(){return this.media.dom.duration},destroy:function(){var a=this,c=a.media.dom,b=a.mediaEvents;Ext.Object.each(b,function(e,d){c.removeEventListener(e,d)});this.callSuper()}});Ext.define("Ext.Audio",{extend:"Ext.Media",xtype:"audio",config:{cls:Ext.baseCSSPrefix+"audio"},onActivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.show()}},onDeactivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.hide()}},template:[{reference:"media",preload:"auto",tag:"audio",cls:Ext.baseCSSPrefix+"component"}]});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var g=this,j=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(o,n){return n.method.apply(this,[o].concat(n.args))},a=function(p,t){var n=[],q=0,s=p.length,r,o=t!==">";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 button",scope:a,tap:"onButtonRelease"});a.onAfter({delegate:"> button",scope:a,hiddenchange:"onButtonHiddenChange"})},updateAllowMultiple:function(a){if(!this.initialized&&!this.getInitialConfig().hasOwnProperty("allowDepress")&&a){this.setAllowDepress(true)}},applyItems:function(){var e=this,f=[],d,b,c,a;e.callParent(arguments);a=this.getItems();d=a.length;for(b=0;b=0;c--){d=b.items[c];if(!d.isHidden()){d.addCls(g);break}}},applyPressedButtons:function(a){var e=this,f=[],c,d,b;if(e.getAllowToggle()){if(Ext.isArray(a)){d=a.length;for(b=0;b0)?"taphold":"tapstart";if(!this.disabled){this.enable()}},onStart:function(b,a){if(this.cancelSelector&&b.getTarget(this.cancelSelector)){return}if(this.handleSelector&&!b.getTarget(this.handleSelector)){return}if(!this.sorting){this.onSortStart(b,a)}},onSortStart:function(c,b){this.sorting=true;var a=Ext.create("Ext.util.Draggable",b,{threshold:0,revert:this.revert,direction:this.direction,constrain:this.constrain===true?this.el:this.constrain,animationDuration:100});a.on({drag:this.onDrag,dragend:this.onDragEnd,scope:this});this.dragEl=b;this.calculateBoxes();if(!a.dragging){a.onStart(c)}this.fireEvent("sortstart",this,c)},calculateBoxes:function(){this.items=[];var b=this.el.select(this.itemSelector,false),f=b.length,a,e,c,d;for(a=0;a(h.bottom-h.top)/2){if(h.bottom>k.top&&k.top>h.top){l.el.insertAfter(k.el)}else{l.el.insertBefore(k.el)}d=true}else{if(this.horizontal&&Math.abs(a.left-a.right)>(h.right-h.left)/2){if(h.right>k.left&&k.left>h.left){l.el.insertAfter(k.el)}else{l.el.insertBefore(k.el)}d=true}}if(d){l.reset();l.moveTo(h.left,h.top);this.calculateBoxes();this.fireEvent("sortchange",this,l.el,this.el.select(this.itemSelector,false).indexOf(l.el.dom));return}}}},onDragEnd:function(a,b){a.destroy();this.sorting=false;this.fireEvent("sortend",this,a,b)},enable:function(){this.el.on(this.startEventName,this.onStart,this,{delegate:this.itemSelector,holdThreshold:this.getDelay()});this.disabled=false},disable:function(){this.el.un(this.startEventName,this.onStart,this);this.disabled=true},isDisabled:function(){return this.disabled},isSorting:function(){return this.sorting},isVertical:function(){return this.vertical},isHorizontal:function(){return this.horizontal}});(function(){var c=0,e=["ms","moz","webkit","o"],b=e.length,a,d;for(a=0;a0){c=false}}else{f=e;if(j.length>0){c=true}}var b=f.slice(),d,g,a,h,k;f.length=0;for(d=0,g=b.length;d2){h.apply(k,a[2])}else{h.call(k)}}b.length=0;if(c!==null){this.request(c)}}});Ext.define("Ext.TitleBar",{extend:"Ext.Container",xtype:"titlebar",requires:["Ext.Button","Ext.Title","Ext.Spacer"],isToolbar:true,config:{baseCls:Ext.baseCSSPrefix+"toolbar",cls:Ext.baseCSSPrefix+"navigation-bar",ui:"dark",title:null,defaultType:"button",height:"2.6em",layout:{type:"hbox"},items:[]},maxButtonWidth:"40%",constructor:function(){this.refreshTitlePosition=Ext.Function.createThrottled(this.refreshTitlePosition,50,this);this.callParent(arguments)},beforeInitialize:function(){this.applyItems=this.applyInitialItems},initialize:function(){delete this.applyItems;this.add(this.initialItems);delete this.initialItems;this.on({painted:"refreshTitlePosition",single:true})},applyInitialItems:function(a){var b=this,c=b.getDefaults()||{};b.initialItems=a;b.leftBox=b.add({xtype:"container",style:"position: relative",layout:{type:"hbox",align:"center"},listeners:{resize:"refreshTitlePosition",scope:b}});b.spacer=b.add({xtype:"component",style:"position: relative",flex:1,listeners:{resize:"refreshTitlePosition",scope:b}});b.rightBox=b.add({xtype:"container",style:"position: relative",layout:{type:"hbox",align:"center"},listeners:{resize:"refreshTitlePosition",scope:b}});b.titleComponent=b.add({xtype:"title",hidden:c.hidden,centered:true});b.doAdd=b.doBoxAdd;b.remove=b.doBoxRemove;b.doInsert=b.doBoxInsert},doBoxAdd:function(a){if(a.config.align=="right"){this.rightBox.add(a)}else{this.leftBox.add(a)}},doBoxRemove:function(a){if(a.config.align=="right"){this.rightBox.remove(a)}else{this.leftBox.remove(a)}},doBoxInsert:function(a,b){if(b.config.align=="right"){this.rightBox.add(b)}else{this.leftBox.add(b)}},getMaxButtonWidth:function(){var a=this.maxButtonWidth;if(Ext.isString(this.maxButtonWidth)){a=parseInt(a.replace("%",""),10);a=Math.round((this.element.getWidth()/100)*a)}return a},refreshTitlePosition:function(){var g=this.titleComponent.renderElement;g.setWidth(null);g.setLeft(null);var b=this.leftBox,d=b.down("button"),a=b.getItems().getCount()==1,i,n;if(d&&a){if(d.getWidth()==null){d.renderElement.setWidth("auto")}i=b.renderElement.getWidth();n=this.getMaxButtonWidth();if(i>n){d.renderElement.setWidth(n)}}var k=this.spacer.renderElement.getPageBox(),l=g.getPageBox(),h=l.width-k.width,e=l.left,j=l.right,c,m,f;if(h>0){g.setWidth(k.width);c=h/2;e+=c;j-=c}m=k.left-e;f=j-k.right;if(m>0){g.setLeft(m)}else{if(f>0){g.setLeft(-f)}}g.repaint()},updateTitle:function(a){this.titleComponent.setTitle(a);if(this.isPainted()){this.refreshTitlePosition()}}});Ext.define("Ext.Video",{extend:"Ext.Media",xtype:"video",config:{posterUrl:null,cls:Ext.baseCSSPrefix+"video"},template:[{reference:"ghost",classList:[Ext.baseCSSPrefix+"video-ghost"]},{tag:"video",reference:"media",classList:[Ext.baseCSSPrefix+"media"]}],initialize:function(){var a=this;a.callParent();a.media.hide();a.onBefore({erased:"onErased",scope:a});a.ghost.on({tap:"onGhostTap",scope:a});a.media.on({pause:"onPause",scope:a});if(Ext.os.is.Android4||Ext.os.is.iPad){this.isInlineVideo=true}},applyUrl:function(a){return[].concat(a)},updateUrl:function(f){var c=this,e=c.media,g=f.length,d=e.query("source"),b=d.length,a;for(a=0;a0){a.pop().destroy()}},setActiveIndex:function(b){var e=this.indicators,d=this.activeIndex,a=e[d],f=e[b],c=this.getBaseCls();if(a){a.removeCls(c,null,"active")}if(f){f.addCls(c,null,"active")}this.activeIndex=b;return this},onTap:function(f){var g=f.touch,a=this.element.getPageBox(),d=a.left+(a.width/2),b=a.top+(a.height/2),c=this.getDirection();if((c==="horizontal"&&g.pageX>=d)||(c==="vertical"&&g.pageY>=b)){this.fireEvent("next",this)}else{this.fireEvent("previous",this)}},destroy:function(){var d=this.indicators,b,c,a;for(b=0,c=d.length;b=a-c&&b<=a+c)},getTranslatable:function(){var a=this.translatable;if(!a){this.translatable=a=new Ext.util.TranslatableGroup;a.setItems(this.orderedCarouselItems);a.on("animationend","onAnimationEnd",this)}return a},onDragStart:function(f){var d=this.getDirection(),b=f.absDeltaX,a=f.absDeltaY,c=this.getDirectionLock();this.isDragging=true;if(c){if((d==="horizontal"&&b>a)||(d==="vertical"&&a>b)){f.stopPropagation()}else{this.isDragging=false;return}}this.getTranslatable().stopAnimation();this.dragStartOffset=this.offset;this.dragDirection=0},onDrag:function(j){if(!this.isDragging){return}var k=this.dragStartOffset,l=this.getDirection(),m=l==="horizontal"?j.deltaX:j.deltaY,a=this.offset,i=this.flickStartTime,c=this.dragDirection,b=Ext.Date.now(),h=this.getActiveIndex(),f=this.getMaxItemIndex(),d=c,g;if((h===0&&m>0)||(h===f&&m<0)){m*=0.5}g=k+m;if(g>a){c=1}else{if(g300){this.flickStartOffset=a;this.flickStartTime=b}this.dragDirection=c;this.setOffset(g)},onDragEnd:function(j){if(!this.isDragging){return}this.onDrag(j);this.isDragging=false;var a=Ext.Date.now(),i=this.itemLength,g=i/2,f=this.offset,m=this.getActiveIndex(),c=this.getMaxItemIndex(),h=0,l=f-this.flickStartOffset,b=a-this.flickStartTime,k=this.getIndicator(),d;if(b>0&&Math.abs(l)>=10){d=l/b;if(Math.abs(d)>=1){if(d<0&&m0&&m>0){h=1}}}}if(h===0){if(m0&&f>g){h=1}}}if(k){k.setActiveIndex(m-h)}this.animationDirection=h;this.setOffsetAnimated(h*i)},applyAnimation:function(a){a.easing=Ext.factory(a.easing,Ext.fx.easing.EaseOut);return a},updateDirection:function(b){var a=this.getIndicator();this.currentAxis=(b==="horizontal")?"x":"y";if(a){a.setDirection(b)}},setOffset:function(a){this.offset=a;this.getTranslatable().translateAxis(this.currentAxis,a+this.itemOffset);return this},setOffsetAnimated:function(b){var a=this.getIndicator();if(a){a.setActiveIndex(this.getActiveIndex()-this.animationDirection)}this.offset=b;this.getTranslatable().translateAxis(this.currentAxis,b+this.itemOffset,this.getAnimation());return this},onAnimationEnd:function(b){var c=this.getActiveIndex(),a=this.animationDirection,e=this.currentAxis,f=b[e],d=this.itemLength,g;if(a===-1){g=d+f}else{if(a===1){g=f-d}else{g=f}}g-=this.itemOffset;this.offset=g;this.setActiveItem(c-a)},refresh:function(){this.refreshSizing();this.refreshActiveItem()},refreshSizing:function(){var a=this.element,b=this.getItemLength(),e={x:0,y:0},c,d;if(this.getDirection()==="horizontal"){d=a.getWidth()}else{d=a.getHeight()}this.hiddenTranslation=-d;if(b===null){b=d;c=0}else{c=(d-b)/2}this.itemLength=b;this.itemOffset=c;e[this.currentAxis]=b;this.getTranslatable().setItemLength(e)},refreshOffset:function(){this.setOffset(this.offset)},refreshActiveItem:function(){this.doSetActiveItem(this.getActiveItem())},getActiveIndex:function(){return this.activeIndex},refreshActiveIndex:function(){this.activeIndex=this.getInnerItemIndex(this.getActiveItem())},refreshCarouselItems:function(){var a=this.carouselItems,b,d,c;for(b=0,d=a.length;b0){for(f=1;f<=c;f++){h=q-f;if(h>=0){a=this.getInnerItemAt(h);b=a.getId();o[b]=a;p[b]=c-f}else{break}}}if(qb){this.setActiveItem(b)}else{this.rebuildInnerIndexes(a);this.refreshActiveItem()}}},rebuildInnerIndexes:function(n){var c=this.innerIndexToItem,g=this.innerIdToIndex,j=this.innerItems.slice(),h=j.length,b=this.getBufferSize(),d=this.getMaxItemIndex(),l=[],e,k,f,a,m;if(n===undefined){this.innerIndexToItem=c={};this.innerIdToIndex=g={};for(e=0;e=0&&e<=d){if(c.hasOwnProperty(e)){Ext.Array.remove(j,c[e]);continue}l.push(e)}}for(e=0,h=l.length;eMath.min(b.x+b.width,a.x+a.width))||(Math.max(b.y,a.y)-c>Math.min(b.y+b.height,a.y+a.height))},spline:function(m){var e,c,k=m.length,b,h,l,f,a=0,g=new Float32Array(m.length),n=new Float32Array(m.length*3-2);g[0]=0;g[k-1]=0;for(e=1;e0;e--){a=3.732050807568877+48.248711305964385/(-13.928203230275537+Math.pow(0.07179676972449123,e));g[e]-=g[e+1]*a}f=m[0];b=f-g[0];for(e=0,c=0;e=360){e-=360}}if(i){i[0]=e;i[1]=o;i[2]=c}else{i=[e,o,c]}return i},setHSL:function(g,f,e){var j,d,b,a=Math.abs,i=Math.floor;g=(g%360+360)%360;f=f>1?1:f<0?0:f;e=e>1?1:e<0?0:e;if(f===0||g===null){e*=255;this.setRGB(e,e,e)}else{g/=60;j=f*(1-a(2*e-1));d=j*(1-a(g-2*i(g/2)-1));b=e-j/2;b*=255;j*=255;d*=255;switch(i(g)){case 0:this.setRGB(j+b,d+b,b);break;case 1:this.setRGB(d+b,j+b,b);break;case 2:this.setRGB(b,j+b,d+b);break;case 3:this.setRGB(b,d+b,j+b);break;case 4:this.setRGB(d+b,b,j+b);break;case 5:this.setRGB(j+b,b,d+b);break}}return this},createLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=a[2]+b;if(a[2]>1){a[2]=1}else{if(a[2]<0){a[2]=0}}return Ext.draw.Color.fromHSL(a[0],a[1],a[2])},createDarker:function(a){a=a||this.lightnessFactor;return this.createLighter(-a)},toString:function(){if(this.a===1){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("")}else{return"rgba("+[Math.round(this.r),Math.round(this.g),Math.round(this.b),this.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=Ext.draw.Color.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""}},setFromString:function(j){var e,h,f,c,d=1,i=parseInt;if(j==="none"){this.r=this.g=this.b=this.a=0;return this}if((j.length===4||j.length===7)&&j.substr(0,1)==="#"){e=j.match(Ext.draw.Color.hexRe);if(e){h=i(e[1],16)>>0;f=i(e[2],16)>>0;c=i(e[3],16)>>0;if(j.length===4){h+=(h*16);f+=(f*16);c+=(c*16)}}}else{if((e=j.match(Ext.draw.Color.rgbToHexRe))){h=+e[1];f=+e[2];c=+e[3]}else{if((e=j.match(Ext.draw.Color.rgbaToHexRe))){h=+e[1];f=+e[2];c=+e[3];d=+e[4]}else{if(Ext.draw.Color.ColorList.hasOwnProperty(j.toLowerCase())){return this.setFromString(Ext.draw.Color.ColorList[j.toLowerCase()])}}}}if(typeof h==="undefined"){return this}this.r=h;this.g=f;this.b=c;this.a=d;return this}},function(){var a=new this();this.addStatics({fly:function(f,e,c,d){switch(arguments.length){case 1:a.setFromString(f);break;case 3:case 4:a.setRGB(f,e,c,d);break;default:return null}return a},ColorList:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},fromHSL:function(d,c,b){return(new this(0,0,0,0)).setHSL(d,c,b)},fromString:function(b){return(new this(0,0,0,0)).setFromString(b)},create:function(b){if(b instanceof this){return b}else{if(Ext.isArray(b)){return new Ext.draw.Color(b[0],b[1],b[2],b[3])}else{if(Ext.isString(b)){return Ext.draw.Color.fromString(b)}else{if(arguments.length>2){return new Ext.draw.Color(arguments[0],arguments[1],arguments[2],arguments[3])}else{return new Ext.draw.Color(0,0,0,0)}}}}}})})})();Ext.define("Ext.draw.sprite.AttributeParser",{singleton:true,attributeRe:/^url\(#([a-zA-Z\-]+)\)$/,requires:["Ext.draw.Color"],"default":function(a){return a},string:function(a){return String(a)},number:function(a){if(!isNaN(a)){return a}},angle:function(a){if(!isNaN(a)){a%=Math.PI*2;if(a<-Math.PI){a+=Math.PI*2}if(a>Math.PI){a-=Math.PI*2}return a}},data:function(a){if(Ext.isArray(a)){return a.slice()}else{if(a instanceof Float32Array){return new Float32Array(a)}}},bool:function(a){return !!a},color:function(a){if(a instanceof Ext.draw.Color){return a.toString()}else{if(a instanceof Ext.draw.gradient.Gradient){return a}else{if(!a){return"none"}else{if(Ext.isString(a)){return a}else{if(a.type==="linear"){return Ext.create("Ext.draw.gradient.Linear",a)}else{if(a.type==="radial"){return Ext.create("Ext.draw.gradient.Radial",a)}else{if(a.type==="pattern"){return Ext.create("Ext.draw.gradient.Pattern",a)}}}}}}}},limited:function(a,b){return(function(c){return isNaN(c)?undefined:Math.min(Math.max(+c,a),b)})},limited01:function(a){return isNaN(a)?undefined:Math.min(Math.max(+a,0),1)},enums:function(){var d={},a=Array.prototype.slice.call(arguments,0),b,c;for(b=0,c=a.length;bMath.PI){b-=Math.PI*2}else{if(b-c<-Math.PI){b+=Math.PI*2}}return[c,b]},compute:function(d,c,b){if(!Ext.isNumber(d)||!Ext.isNumber(c)){return c||d}else{return a(d,c,b)}}},path:{parseInitial:function(m,n){var c=m.toStripes(),o=n.toStripes(),e,d,k=c.length,p=o.length,h,f,b,g=o[p-1],l=[g[g.length-2],g[g.length-1]];for(e=k;e=1){return l.path}var e=0,f=c.length,d=0,b,k,h,n=l.temp.coords,g=0;for(;e=(7-4*l)/11){o=i*i-f((11-6*l-11*q)/4,2);break}}return o},elastic:function(l,i){return f(2,10*--l)*m(20*l*e*(i||1)/3)}};n=function(l,i){i=i&&i.length?i:[i];return Ext.apply(l,{easeIn:function(o){return l(o,i)},easeOut:function(o){return 1-l(1-o,i)},easeInOut:function(o){return(o<=0.5)?l(2*o,i)/2:(2-l(2*(1-o),i))/2}})};h=function(i){return function(l){return f(l,i)}};for(d=0,b=a.length;d-1},empty:function(){return this.animations.length===0},step:function(e){var d=this,g=d.animations.slice(),f,c=0,b=0,a=g.length;for(;c0},applyEasing:function(a){if(typeof a==="string"){return Ext.draw.TimingFunctions.easingMap[a]}else{return a}},applyCustomEasings:function(c,g){g=g||{};var a,b,f,d,e;for(a in c){f=c[a];b=a.split(",");if(typeof f==="string"){f=Ext.draw.TimingFunctions.easingMap[f]}for(d=0,e=b.length;d=1){i[a]=d[a];delete d[a];delete e[a]}else{i[a]=b.serve(b.compute(b.source,b.target,b.easing(j),g[a]));f=true}}g.lastUpdate=c;this.setAnimating(g,f);return i},pushDown:function(a,b){b=Ext.draw.modifier.Modifier.prototype.pushDown.call(this,a.animationOriginal,b);return this.setAttrs(a,b)},popUp:function(a,b){a=a.upperLevel;b=this.setAttrs(a,b);if(this._next){return this._next.popUp(a,b)}else{return Ext.apply(a,b)}},step:function(){var g=this,d=g.animatingPool.slice(),a,c,f;for(c=0,f=d.length;c0){return h(e(i)/3)}else{if(i<0){return -h(e(-i)/3)}else{return 0}}},linearFunction:function(k,j){var i;if(k===0){i=function(l){return j};i.solve=function(l){return[]}}else{i=function(l){return k*l+j};i.solve=function(l){return[(l-j)/k]}}return i},quadraticFunction:function(k,j,p){var i;if(k===0){return this.linearFunction(j,p)}else{i=function(q){return(k*q+j)*q+p};var o=j*j-4*k*p,n=function(q){return o+4*k*q},m=1/k*0.5,l=-m*j;m=a(m);i.solve=function(r){var q=n(r);if(q<0){return[]}q=f(q);return[l-q*m,l+q*m]}}return i},cubicFunction:function(s,r,p,o){var v;if(s===0){return this.quadraticFunction(r,p,o)}else{v=function(w){return((s*w+r)*w+p)*w+o};var m=r/s/3,i=p/s,l=o/s,q=m*m,u=(m*i-l)*0.5-m*q,t=q-i/3,k=t*t*t;if(t===0){v.solve=function(w){return[-m+this.cubicRoot(u*2+w/s)]}}else{if(t>0){var j=f(t),n=j*j*j;j+=j}v.solve=function(E){E/=s;var A=u+E*0.5,C=A*A-k;if(C>0){C=f(C);return[-m+this.cubicRoot(A+C)+this.cubicRoot(A-C)]}else{if(C===0){var D=this.cubicRoot(A),F=-m-D;if(A>=0){return[F,F,-m+2*D]}else{return[-m+2*D,F,F]}}else{var B=c(A/n)/3,z=j*g(B)-m,x=j*g(B+b)-m,w=j*g(B-b)-m;if(z0){if(s=Math.PI*2){n.ellipse(g,f,c,a,q,m,m+Math.PI,e);n.ellipse(g,f,c,a,q,m+Math.PI,d,e);return}if(!e){if(d=m){s.push(j+u*b+i,h+t*b+f,j*b+u+i,h*b+t+f,u+i,t+f);r+=6;v-=m;C=j;j=u;u=-C;C=h;h=t;t=-C}if(v){g=(0.3294738052815987+0.012120855841304373*v)*v;A=Math.cos(v);a=Math.sin(v);B=A+g*a;c=a-g*A;s.push(j+u*g+i,h+t*g+f,j*B+u*c+i,h*B+t*c+f,j*A+u*a+i,h*A+t*a+f);r+=6}return r},arcSvg:function(j,h,r,m,w,t,c){if(j<0){j=-j}if(h<0){h=-h}var x=this,u=x.cursor[0],f=x.cursor[1],a=(u-t)/2,y=(f-c)/2,d=Math.cos(r),s=Math.sin(r),o=a*d+y*s,v=-a*s+y*d,i=o/j,g=v/h,p=i*i+g*g,e=(u+t)*0.5,b=(f+c)*0.5,l=0,k=0;if(p>=1){p=Math.sqrt(p);j*=p;h*=p}else{p=Math.sqrt(1/p-1);if(m===w){p=-p}l=p*j*g;k=-p*h*i;e+=d*l-s*k;b+=s*l+d*k}var q=Math.atan2((v-k)/h,(o-l)/j),n=Math.atan2((-v-k)/h,(-o-l)/j)-q;if(w){if(n<=0){n+=Math.PI*2}}else{if(n>=0){n-=Math.PI*2}}x.ellipse(e,b,j,h,r,q,q+n,1-w)},fromSvgString:function(e){if(!e){return}var m=this,h,l={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0,A:7,C:6,H:1,L:2,M:2,Q:4,S:4,T:2,V:1,Z:0},k="",g,f,c=0,b=0,d=false,j,n,a;if(Ext.isString(e)){h=e.replace(Ext.draw.Path.pathRe," $1 ").replace(Ext.draw.Path.pathRe2," -").split(Ext.draw.Path.pathSplitRe)}else{if(Ext.isArray(e)){h=e.join(",").split(Ext.draw.Path.pathSplitRe)}}for(j=0,n=0;j=0){q=Math.sqrt(q);o=(q-g)/2/i;if(00){o-=q/i;if(0k.x){b=k.x}if(hk.y){f=k.y}if(a0&&m>0){a=(Math.sqrt(f*f+m*m)*Math.abs(Math.cos(c-Math.atan(f/m))))/2;k=q.createLinearGradient(d+p*a,b+j*a,d-p*a,b-j*a);for(e=0;eg){g=j.x+j.width}if(j.xa){a=j.y+j.height}if(j.y0){this.pendingRenderFrame=true}var f=this,g=this.getRegion(),c=f.getBackground(),a=f.getItems().items,e,b,d;if(!g){return}f.orderByZIndex();if(f.getDirty()){f.clear();f.clearTransform();if(c){f.renderSprite(c)}for(b=0,d=a.length;bthis.position){Ext.fly(b[b.length-1]).destroy()}for(var a=0;aa){c=d.dom.childNodes[a];if(c.tagName===b){return Ext.get(c)}else{Ext.destroy(c)}}c=Ext.get(this.createSvgNode(b));if(a===0){d.insertFirst(c)}else{c.insertAfter(Ext.fly(d.dom.childNodes[a-1]))}c.cache={};return c},setElementAttributes:function(d,b){var f=d.dom,a=d.cache,c,e;for(c in b){e=b[c];if(a[c]!==e){a[c]=e;f.setAttribute(c,e)}}},getNextDef:function(a){return this.getSvgElement(this.defElement,a,this.defPosition++)},clearTransform:function(){var a=this;a.mainGroup.set({transform:a.matrix.toSvg()})},clear:function(){this.ctx.clear();this.defPosition=0},renderSprite:function(b){var c=this,d=c.getRegion(),a=c.ctx;if(b.attr.hidden||b.attr.opacity===0){a.save();a.restore();return}try{a.save();b.preRender(this);b.applyTransformations();b.useAttributes(a);if(false===b.render(this,a,[0,0,d[2],d[3]])){return false}b.setDirty(false)}finally{a.restore()}},destroy:function(c,a,d){var b=this;b.ctx.destroy();b.mainGroup.destroy();delete b.mainGroup;delete b.ctx;b.callSuper(arguments)}});Ext.define("Ext.draw.engine.Canvas",{extend:"Ext.draw.Surface",config:{highPrecision:false},requires:["Ext.draw.Animator"],statics:{contextOverrides:{setGradientBBox:function(a){this.bbox=a},fill:function(){var c=this.fillStyle,a=this.fillGradient,b=this.fillOpacity,d="rgba(0, 0, 0, 0)",e="rgba(0, 0, 0, 0.0)",g=this.bbox,f=this.globalAlpha;if(c!==d&&c!==e&&b!==0){if(a&&g){this.fillStyle=a.getGradient(this,g)}if(b!==1){this.globalAlpha=f*b}this.$fill();if(b!==1){this.globalAlpha=f}if(a&&g){this.fillStyle=c}}},stroke:function(a){var h=this.strokeStyle,f=this.strokeGradient,c=this.strokeOpacity,b="rgba(0, 0, 0, 0)",d="rgba(0, 0, 0, 0.0)",g=this.bbox,e=this.globalAlpha;if(h!==b&&h!==d&&c!==0){if(f&&g){this.strokeStyle=f.getGradient(this,g)}if(c!==1){this.globalAlpha=e*c}this.$stroke();if(c!==1){this.globalAlpha=e}if(f&&g){this.strokeStyle=h}}},fillStroke:function(e,g){var k=this,j=this.fillStyle,i=this.fillOpacity,h=this.strokeStyle,d=this.strokeOpacity,c=k.shadowColor,b=k.shadowBlur,a="rgba(0, 0, 0, 0)",f="rgba(0, 0, 0, 0.0)";if(g===undefined){g=e.transformFillStroke}if(!g){e.inverseMatrix.toContext(k)}if(j!==a&&j!==f&&i!==0){k.fill();k.shadowColor="rgba(0,0,0,0)";k.shadowBlur=0}if(h!==a&&h!==f&&d!==0){k.stroke()}k.shadowColor=c;k.shadowBlur=b},ellipse:function(g,e,c,a,j,b,f,d){var i=Math.cos(j),h=Math.sin(j);this.transform(i*c,h*c,-h*a,i*a,g,e);this.arc(0,0,1,b,f,d);this.transform(i/c,-h/a,h/c,i/a,-(i*g+h*e)/c,(h*g-i*e)/a)},appendPath:function(g){var e=this,c=0,a=0,b=g.types,f=g.coords,d=g.types.length;e.beginPath();for(;c=m.canvases.length){m.createCanvas()}e=m.canvases[f].dom;e.style.left=g+"px";if(j*u!==e.height){e.height=j*u;e.style.height=j+"px"}d=Math.min(p,s-g);if(d*u!==e.width){e.width=d*u;e.style.width=d+"px"}m.applyDefaults(m.contexts[f])}for(;fm||o.x+o.widtha||o.y+o.heightSencha Touch GPL'},config:{cls:"x-draw-component",autoSize:false,viewBox:false,fitSurface:true,resizeHandler:null,background:null,sprites:null},constructor:function(a){a=a||{};if(a.items){a.sprites=a.items;delete a.items}this.callSuper(arguments);this.frameCallbackId=Ext.draw.Animator.addFrameCallback("renderFrame",this)},initialize:function(){var a=this;a.callSuper();a.element.on("resize","onResize",this)},applySprites:function(d){if(!d){return}d=Ext.Array.from(d);var c=d.length,b,a;for(b=0;bMath.PI){o-=Math.PI*2}if(l){o=o*(1-e)+Math.PI/2*e;k=d;d=n;n=k}else{o=o*(1-e)}i.rotationRads=o;i.x=h*(1-e)+c*e;i.y=g*(1-e)+a*e;q=c-h;p=a-g;if(Math.abs(p*d)>Math.abs(n*q)){if(p>0){i.calloutEndX=i.x-(n/(p*2)*q)*e;i.calloutEndY=i.y-n/2*e}else{i.calloutEndX=i.x+(n/(p*2)*q)*e;i.calloutEndY=i.y+n/2*e}}else{if(q>0){i.calloutEndX=i.x-d/2;i.calloutEndY=i.y-(d/(q*2)*p)*e}else{i.calloutEndX=i.x+d/2;i.calloutEndY=i.y+(d/(q*2)*p)*e}}}return i},pushDown:function(a,b){b=Ext.draw.modifier.Modifier.prototype.pushDown.call(this,a.calloutOriginal,b);return this.setAttrs(a,b)},popUp:function(a,b){a=a.__proto__;b=this.setAttrs(a,b);if(this._next){return this._next.popUp(a,b)}else{return Ext.apply(a,b)}}});Ext.define("Ext.chart.label.Label",{extend:"Ext.draw.sprite.Text",requires:["Ext.chart.label.Callout"],inheritableStatics:{def:{processors:{callout:"limited01",calloutPlaceX:"number",calloutPlaceY:"number",calloutStartX:"number",calloutStartY:"number",calloutEndX:"number",calloutEndY:"number",calloutColor:"color",calloutVertical:"bool",labelOverflowPadding:"number"},defaults:{callout:0,calloutPlaceX:0,calloutPlaceY:0,calloutStartX:0,calloutStartY:0,calloutEndX:0,calloutEndY:0,calloutVertical:false,calloutColor:"black",labelOverflowPadding:5},dirtyTriggers:{callout:"transform",calloutPlaceX:"transform",calloutPlaceY:"transform",labelOverflowPadding:"transform",calloutRotation:"transform"}}},config:{fx:{customDuration:{callout:200}}},prepareModifiers:function(){this.callSuper(arguments);this.calloutModifier=new Ext.chart.label.Callout({sprite:this});this.fx.setNext(this.calloutModifier);this.calloutModifier.setNext(this.topModifier)},render:function(b,c,d){var e=this,a=e.attr;c.save();c.globalAlpha*=Math.max(0,a.callout-0.5)*2;if(c.globalAlpha>0){c.strokeStyle=a.calloutColor;c.fillStyle=a.calloutColor;c.beginPath();c.moveTo(e.attr.calloutStartX,e.attr.calloutStartY);c.lineTo(e.attr.calloutEndX,e.attr.calloutEndY);c.stroke();c.beginPath();c.arc(e.attr.calloutStartX,e.attr.calloutStartY,1,0,2*Math.PI,true);c.fill();c.beginPath();c.arc(e.attr.calloutEndX,e.attr.calloutEndY,1,0,2*Math.PI,true);c.fill()}c.restore();Ext.draw.sprite.Text.prototype.render.apply(this,arguments)}});Ext.define("Ext.chart.series.Series",{requires:["Ext.chart.Markers","Ext.chart.label.Label"],mixins:{observable:"Ext.mixin.Observable"},type:null,seriesType:"sprite",identifiablePrefix:"ext-line-",observableType:"series",config:{chart:null,title:null,renderer:function(e,a,c,d,b){return c},showInLegend:true,triggerAfterDraw:false,themeStyle:{},style:{},subStyle:{},colors:null,store:null,label:{textBaseline:"middle",textAlign:"center",font:"14px Helvetica"},labelOverflowPadding:5,labelField:null,marker:null,markerSubStyle:null,itemInstancing:null,background:null,highlightItem:null,surface:null,overlaySurface:null,hidden:false,highlightCfg:null},directions:[],sprites:null,getFields:function(f){var e=this,a=[],c,b,d;for(b=0,d=f.length;b0){for(r=0;r0){for(d=0;da){a=f}}b.min=c;b.max=a},updateLabelData:function(){var f=this,b=f.getStore(),a=b.getData().items,g=f.getSprites(),c=f.getLabelField(),d,e,h;if(g.length>0&&c){h=[];for(d=0,e=a.length;db.to){d.call(this,b.max,b.getLabel(b.max),b.steps+1,b)}}else{if(b.minb.to){d.call(this,b.max,b.max,b.steps+1,b)}}},renderTicks:function(b,o,g,c){var l=this,h=l.attr,q=h.position,m=h.matrix,d=0.5*h.lineWidth,a=m.getXX(),p=m.getDX(),i=m.getYY(),n=m.getDY(),f=g.majorTicks,k=h.majorTickSize,e=g.minorTicks,j=h.minorTickSize;if(f){switch(q){case"right":l.iterate(f,function(r,t,s){r=b.roundPixel(r*i+n)+d;o.moveTo(0,r);o.lineTo(k,r)});break;case"left":l.iterate(f,function(r,t,s){r=b.roundPixel(r*i+n)+d;o.moveTo(c[2]-k,r);o.lineTo(c[2],r)});break;case"bottom":l.iterate(f,function(r,t,s){r=b.roundPixel(r*a+p)-d;o.moveTo(r,0);o.lineTo(r,k)});break;case"top":l.iterate(f,function(r,t,s){r=b.roundPixel(r*a+p)-d;o.moveTo(r,c[3]);o.lineTo(r,c[3]-k)});break;case"angular":l.iterate(f,function(r,t,s){r=r/(h.max+1)*Math.PI*2+h.baseRotation;o.moveTo(h.centerX+(h.length)*Math.cos(r),h.centerY+(h.length)*Math.sin(r));o.lineTo(h.centerX+(h.length+k)*Math.cos(r),h.centerY+(h.length+k)*Math.sin(r))});break}}},renderLabels:function(r,s,z,x){var C=this,q=C.attr,c=0.5*q.lineWidth,A=q.position,t=q.matrix,v=q.textPadding,e=t.getXX(),i=t.getDX(),o=t.getYY(),h=t.getDY(),a=0,u=z.majorTicks,k=Math.max(q.majorTickSize,q.minorTickSize)+q.lineWidth,f=this.getLabel(),m,w=null,l=0,y=0,d=z.segmenter,p=this.getRenderer(),g,B=null,b,n,j;if(u&&f&&!f.attr.hidden){m=f.attr.font;if(s.font!==m){s.font=m}f.setAttributes({translationX:0,translationY:0},true,true);f.applyTransformations();g=f.attr.inverseMatrix.elements.slice(0);switch(A){case"left":f.setAttributes({textAlign:"center",textBaseline:"middle",translationX:r.roundPixel(x[2]-k+i)-c-C.thickness/2},true,true);break;case"right":f.setAttributes({textAlign:"center",textBaseline:"middle",translationX:r.roundPixel(k+i)-c+C.thickness/2},true,true);break;case"top":f.setAttributes({textAlign:"center",textBaseline:"middle",translationY:r.roundPixel(x[3]-k)-c-C.thickness/2},true,true);break;case"bottom":f.setAttributes({textAlign:"center",textBaseline:"middle",translationY:r.roundPixel(k)-c+C.thickness/2},true,true);break;case"radial":f.setAttributes({textAlign:"center",textBaseline:"middle",translationX:q.centerX},true,true);break;case"angular":f.setAttributes({textAlign:"center",textBaseline:"middle",translationY:q.centerY},true,true);break}if(A==="left"||A==="right"){C.iterate(u,function(D,F,E){if(F===undefined){return}j=p?p.call(this,F,z,w):d.renderer(F,z,w);w=F;f.setAttributes({text:String(j),translationY:r.roundPixel(D*o+h)},true,true);f.applyTransformations();a=Math.max(a,f.getBBox().width+k);if(a<=C.thickness){n=Ext.draw.Matrix.fly(f.attr.matrix.elements.slice(0));b=n.prepend.apply(n,g).transformBBox(f.getBBox(true));if(B&&!Ext.draw.Draw.isBBoxIntersect(b,B,v)){return}r.renderSprite(f);B=b;l+=b.height;y++}})}else{if(A==="top"||A==="bottom"){C.iterate(u,function(D,F,E){if(F===undefined){return}j=p?p.call(this,F,z,w):d.renderer(F,z,w);w=F;f.setAttributes({text:String(j),translationX:r.roundPixel(D*e+i)},true,true);f.applyTransformations();a=Math.max(a,f.getBBox().height+k);if(a<=C.thickness){n=Ext.draw.Matrix.fly(f.attr.matrix.elements.slice(0));b=n.prepend.apply(n,g).transformBBox(f.getBBox(true));if(B&&!Ext.draw.Draw.isBBoxIntersect(b,B,v)){return}r.renderSprite(f);B=b;l+=b.width;y++}})}else{if(A==="radial"){C.iterate(u,function(D,F,E){if(F===undefined){return}j=p?p.call(this,F,z,w):d.renderer(F,z,w);w=F;if(typeof j!=="undefined"){f.setAttributes({text:String(j),translationY:q.centerY-r.roundPixel(D)/q.max*q.length},true,true);f.applyTransformations();b=f.attr.matrix.transformBBox(f.getBBox(true));if(B&&!Ext.draw.Draw.isBBoxIntersect(b,B)){return}r.renderSprite(f);B=b;l+=b.width;y++}})}else{if(A==="angular"){C.iterate(u,function(D,F,E){if(F===undefined){return}j=p?p.call(this,F,z,w):d.renderer(F,z,w);w=F;if(typeof j!=="undefined"){var G=D/(q.max+1)*Math.PI*2+q.baseRotation;f.setAttributes({text:String(j),translationX:q.centerX+(q.length+10)*Math.cos(G),translationY:q.centerY+(q.length+10)*Math.sin(G)},true,true);f.applyTransformations();b=f.attr.matrix.transformBBox(f.getBBox(true));if(B&&!Ext.draw.Draw.isBBoxIntersect(b,B)){return}r.renderSprite(f);B=b;l+=b.width;y++}})}}}}if(q.enlargeEstStepSizeByText&&y){l/=y;l+=k;l*=2;if(q.estStepSize1){C.thickness=a;q.bbox.plain.dirty=true;q.bbox.transform.dirty=true;C.doThicknessChanged();return false}}},renderAxisLine:function(b,c,f,d){var e=this,a=e.attr,h=a.lineWidth*0.5,g=a.position;if(a.axisLine){switch(g){case"left":c.moveTo(d[2]-h,-a.endGap);c.lineTo(d[2]-h,a.length+a.startGap);break;case"right":c.moveTo(h,-a.endGap);c.lineTo(h,a.length+a.startGap);break;case"bottom":c.moveTo(-a.startGap,h);c.lineTo(a.length+a.endGap,h);break;case"top":c.moveTo(-a.startGap,d[3]-h);c.lineTo(a.length+a.endGap,d[3]-h);break;case"angular":c.moveTo(a.centerX+a.length,a.centerY);c.arc(a.centerX,a.centerY,a.length,0,Math.PI*2,true);break}}},renderGridLines:function(c,p,i,d){var m=this,k=m.attr,n=k.matrix,a=n.getXX(),l=n.getYY(),q=n.getDX(),o=n.getDY(),h=k.position,g=i.majorTicks,f,e,b;if(k.grid){if(g){if(h==="left"||h==="right"){b=k.min*l+o;m.iterate(g,function(j,s,r){f=j*l+o;m.putMarker("horizontal-"+(r%2?"odd":"even"),{y:f,height:b-f},e=r,true);b=f});e++;f=0;m.putMarker("horizontal-"+(e%2?"odd":"even"),{y:f,height:b-f},e,true)}else{if(h==="top"||h==="bottom"){b=k.min*a+q;m.iterate(g,function(j,s,r){f=j*a+q;m.putMarker("vertical-"+(r%2?"odd":"even"),{x:f,width:b-f},e=r,true);b=f});e++;f=k.length;m.putMarker("vertical-"+(e%2?"odd":"even"),{x:f,width:b-f},e,true)}else{if(h==="radial"){m.iterate(g,function(j,s,r){f=j/k.max*k.length;m.putMarker("circular-"+(r%2?"odd":"even"),{scalingX:f,scalingY:f},r,true);b=f})}else{if(h==="angular"){m.iterate(g,function(j,s,r){f=j/(k.max+1)*Math.PI*2+k.baseRotation;m.putMarker("radial-"+(r%2?"odd":"even"),{rotationRads:f,rotationCenterX:0,rotationCenterY:0,scalingX:k.length,scalingY:k.length},r,true);b=f})}}}}}}},doThicknessChanged:function(){var a=this.getAxis();if(a){a.onThicknessChanged()}},render:function(a,b,c){var e=this,d=e.getLayoutContext();if(d){if(false===e.renderLabels(a,b,d,c)){return false}b.beginPath();e.renderTicks(a,b,d,c);e.renderAxisLine(a,b,d,c);e.renderGridLines(a,b,d,c);b.stroke()}}});Ext.define("Ext.chart.axis.segmenter.Segmenter",{config:{axis:null},constructor:function(a){this.initConfig(a)},renderer:function(b,a){return String(b)},from:function(a){return a},diff:Ext.emptyFn,align:Ext.emptyFn,add:Ext.emptyFn,preferredStep:Ext.emptyFn});Ext.define("Ext.chart.axis.segmenter.Names",{extend:"Ext.chart.axis.segmenter.Segmenter",alias:"segmenter.names",renderer:function(b,a){return b},diff:function(b,a,c){return Math.floor(a-b)},align:function(c,b,a){return Math.floor(c)},add:function(c,b,a){return c+b},preferredStep:function(c,a,b,d){return{unit:1,step:1}}});Ext.define("Ext.chart.axis.segmenter.Time",{extend:"Ext.chart.axis.segmenter.Segmenter",alias:"segmenter.time",config:{step:null},renderer:function(c,b){var a=Ext.Date;switch(b.majorTicks.unit){case"y":return a.format(c,"Y");case"mo":return a.format(c,"Y-m");case"d":return a.format(c,"Y-m-d")}return a.format(c,"Y-m-d\nH:i:s")},from:function(a){return new Date(a)},diff:function(c,a,d){var b=Ext.Date;if(isFinite(c)){c=new Date(c)}if(isFinite(a)){a=new Date(a)}return b.diff(c,a,d)},align:function(a,c,b){if(b==="d"&&c>=7){a=Ext.Date.align(a,"d",c);a.setDate(a.getDate()-a.getDay()+1);return a}else{return Ext.Date.align(a,b,c)}},add:function(c,b,a){return Ext.Date.add(new Date(c),a,b)},preferredStep:function(b,e){if(this.getStep()){return this.getStep()}var h=new Date(+b),k=new Date(+b+Math.ceil(e)),l=Ext.Date,d=[[l.YEAR,1,2,5,10,20,50,100,200,500],[l.MONTH,1,3,6],[l.DAY,1,7,14],[l.HOUR,1,6,12],[l.MINUTE,1,5,15,30],[l.SECOND,1,5,15,30],[l.MILLI,1,2,5,10,20,50,100,200,500]],m;for(var c=0;c0){for(var a=1;aa){f.max=f.to}if(f.froma){f.max=f.to}if(f.froma[1]){var b=a[0];a[0]=a[1];a[0]=b}if(a[1]===a[0]){a[1]+=1/this.getMaxZoom()}if(a[1]>a[0]+1){a[0]=0;a[1]=1}else{if(a[0]<0){a[1]-=a[0];a[0]=0}else{if(a[1]>1){a[0]-=a[1]-1;a[1]=1}}}if(c&&a[0]===c[0]&&a[1]===c[1]){return undefined}return a},updateVisibleRange:function(a){this.fireEvent("transformed",this,a)},onSeriesChanged:function(c){var e=this,b=c.getSeries(),g="get"+e.getDirection()+"Axis",f=[],a,d=b.length;for(a=0;ah){h=b[1]}}}if(!isFinite(h)){h=g.prevMax}if(!isFinite(c)){c=g.prevMin}if(this.getLabelInSpan()){h+=this.getIncrement();c-=this.getIncrement()}if(!isNaN(g.getMinimum())){c=g.getMinimum()}else{g.prevMin=c}if(!isNaN(g.getMaximum())){h=g.getMaximum()}else{g.prevMax=h}return this.range=[c,h]},applyStyle:function(c,b){var a=Ext.ClassManager.getByAlias("sprite."+this.seriesType);if(a&&a.def){c=a.def.normalize(c)}b=Ext.apply(b||{},c);return b},updateCenter:function(b){var e=this.getSprites(),a=e[0],d=b[0],c=b[1];if(a){a.setAttributes({centerX:d,centerY:c})}if(this.gridSpriteEven){this.gridSpriteEven.getTemplate().setAttributes({translationX:d,translationY:c,rotationCenterX:d,rotationCenterY:c})}if(this.gridSpriteOdd){this.gridSpriteOdd.getTemplate().setAttributes({translationX:d,translationY:c,rotationCenterX:d,rotationCenterY:c})}},getSprites:function(){if(!this.getChart()){return}var i=this,f=i.getRange(),g=i.getPosition(),h=i.getChart(),d=h.getAnimate(),e,b,a=i.getGridAlignment(),c=i.getLength();if(d===false){d={duration:0}}if(f){b=Ext.applyIf({position:g,axis:i,min:f[0],max:f[1],length:c,grid:i.getGrid(),hidden:i.getHidden(),titleOffset:i.titleOffset,layout:i.getLayout(),segmenter:i.getSegmenter(),label:i.getLabel()},i.getStyle());if(!i.sprites.length){e=new Ext.chart.axis.sprite.Axis(b);e.fx.setCustomDuration({baseRotation:0});e.fx.on("animationstart","onAnimationStart",i);e.fx.on("animationend","onAnimationEnd",i);i.sprites.push(e);i.updateTitleSprite()}else{e=i.sprites[0];e.fx.setConfig(d);e.setAttributes(b);e.setLayout(i.getLayout());e.setSegmenter(i.getSegmenter());e.setLabel(i.getLabel())}if(i.getRenderer()){e.setRenderer(i.getRenderer())}}return i.sprites},updateTitleSprite:function(){if(!this.sprites[0]){return}var g=this,d=this.sprites[0].thickness,b=g.getSurface(),h=this.getTitle(),a=g.getPosition(),e=g.getTitleMargin(),f=g.getLength(),c=b.roundPixel(f/2);if(h){switch(a){case"top":h.setAttributes({x:c,y:e/2,textBaseline:"top",textAlign:"center"},true,true);h.applyTransformations();g.titleOffset=h.getBBox().height+e;break;case"bottom":h.setAttributes({x:c,y:d+e,textBaseline:"top",textAlign:"center"},true,true);h.applyTransformations();g.titleOffset=h.getBBox().height+e;break;case"left":h.setAttributes({x:e/2,y:c,textBaseline:"top",textAlign:"center",rotationCenterX:e/2,rotationCenterY:c,rotationRads:-Math.PI/2},true,true);h.applyTransformations();g.titleOffset=h.getBBox().width+e;break;case"right":h.setAttributes({x:d-e/2,y:c,textBaseline:"bottom",textAlign:"center",rotationCenterX:d,rotationCenterY:c,rotationRads:Math.PI/2},true,true);h.applyTransformations();g.titleOffset=h.getBBox().width+e;break}}},onThicknessChanged:function(){var a=this;a.getChart().onThicknessChanged()},getThickness:function(){if(this.getHidden()){return 0}return(this.sprites[0]&&this.sprites[0].thickness||1)+this.titleOffset},onAnimationStart:function(){this.animating++;if(this.animating===1){this.fireEvent("animationstart")}},onAnimationEnd:function(){this.animating--;if(this.animating===0){this.fireEvent("animationend")}},getItemId:function(){return this.getId()},getAncestorIds:function(){return[this.getChart().getId()]},isXType:function(a){return a==="axis"},destroy:function(){Ext.ComponentManager.unregister(this);this.callSuper()}});Ext.define("Ext.mixin.Sortable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Sorter"],mixinConfig:{id:"sortable"},config:{sorters:null,defaultSortDirection:"ASC",sortRoot:null},dirtySortFn:false,sortFn:null,sorted:false,applySorters:function(a,b){if(!b){b=this.createSortersCollection()}b.clear();this.sorted=false;if(a){this.addSorters(a)}return b},createSortersCollection:function(){this._sorters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._sorters},addSorter:function(b,a){this.addSorters([b],a)},addSorters:function(c,a){var b=this.getSorters();return this.insertSorters(b?b.length:0,c,a)},insertSorter:function(a,c,b){return this.insertSorters(a,[c],b)},insertSorters:function(e,h,a){if(!Ext.isArray(h)){h=[h]}var f=h.length,j=a||this.getDefaultSortDirection(),c=this.getSortRoot(),k=this.getSorters(),l=[],g,b,m,d;if(!k){k=this.createSortersCollection()}for(b=0;b>1;f=d(e,b[c]);if(f>=0){h=c+1}else{if(f<0){a=c-1}}}return h}});Ext.define("Ext.mixin.Filterable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Filter"],mixinConfig:{id:"filterable"},config:{filters:null,filterRoot:null},dirtyFilterFn:false,filterFn:null,filtered:false,applyFilters:function(a,b){if(!b){b=this.createFiltersCollection()}b.clear();this.filtered=false;this.dirtyFilterFn=true;if(a){this.addFilters(a)}return b},createFiltersCollection:function(){this._filters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._filters},addFilter:function(a){this.addFilters([a])},addFilters:function(b){var a=this.getFilters();return this.insertFilters(a?a.length:0,b)},insertFilter:function(a,b){return this.insertFilters(a,[b])},insertFilters:function(h,c){if(!Ext.isArray(c)){c=[c]}var j=c.length,a=this.getFilterRoot(),d=this.getFilters(),e=[],f,g,b;if(!d){d=this.createFiltersCollection()}for(g=0;g=e.length||(a&&e.getAutoSort())){return e.add(d,f)}if(typeof d!="undefined"&&d!==null){if(typeof g[d]!="undefined"){e.replace(d,f);return false}g[d]=f}this.all.push(f);if(b&&this.getAutoFilter()&&this.mixins.filterable.isFiltered.call(e,f)){return null}e.length++;Ext.Array.splice(e.items,c,0,f);Ext.Array.splice(e.keys,c,0,d);e.dirtyIndices=true;return f},insertAll:function(g,d){if(g>=this.items.length||(this.sorted&&this.getAutoSort())){return this.addAll(d)}var s=this,h=this.filtered,a=this.sorted,b=this.all,m=this.items,l=this.keys,r=this.map,n=this.getAutoFilter(),o=this.getAutoSort(),t=[],j=[],f=[],c=this.mixins.filterable,e=false,k,u,p,q;if(a&&this.getAutoSort()){}if(Ext.isObject(d)){for(u in d){if(d.hasOwnProperty(u)){j.push(m[u]);t.push(u)}}}else{j=d;k=d.length;for(p=0;p=0){e=a[b];c=f[b];if(typeof c!="undefined"){delete g.map[c]}Ext.Array.erase(a,b,1);Ext.Array.erase(f,b,1);Ext.Array.remove(d,e);delete g.indices[c];g.length--;this.dirtyIndices=true;return e}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[this.getKey(b)];return(a===undefined)?-1:a},indexOfKey:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[b];return(a===undefined)?-1:a},updateIndices:function(){var a=this.items,e=a.length,f=this.indices={},c,d,b;for(c=0;c=a;d--){b[b.length]=c[d]}}return b},findIndexBy:function(d,c,h){var g=this,f=g.keys,a=g.items,b=h||0,e=a.length;for(;b ."+Ext.baseCSSPrefix+"data-item",scope:this})},initialize:function(){this.callParent();this.doInitialize()},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,a,b.indexOf(a),d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtouchmove",b,a,b.indexOf(a),d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,a,b.indexOf(a),d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtap",b,a,b.indexOf(a),d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtaphold",b,a,b.indexOf(a),d)},onItemSingleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemsingletap",b,a,b.indexOf(a),d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemdoubletap",b,a,b.indexOf(a),d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemswipe",b,a,b.indexOf(a),d)},moveItemsToCache:function(j,k){var h=this,c=h.dataview,a=c.getMaxItemCache(),g=h.getViewItems(),f=h.itemCache,e=f.length,l=c.getPressedCls(),d=c.getSelectedCls(),b=k-j,m;for(;b>=0;b--){m=g[j+b];if(e!==a){h.remove(m,false);m.removeCls([l,d]);f.push(m);e++}else{m.destroy()}}if(h.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(b){var l=this,e=l.dataview,m=e.getStore(),k=b.length,a=e.getDefaultType(),h=e.getItemConfig(),g=l.itemCache,f=g.length,j=[],c,n,d;if(k){e.hideEmptyText()}for(c=0;ci._tmpIndex?1:-1});for(c=0;c div",scope:this})},initialize:function(){this.callParent();this.doInitialize()},updateBaseCls:function(a,b){var c=this;c.callParent([a+"-container",b])},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,Ext.get(c),a,d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,Ext.get(c),a,d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtouchmove",b,Ext.get(c),a,d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtap",b,Ext.get(c),a,d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtaphold",b,Ext.get(c),a,d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemdoubletap",b,Ext.get(c),a,d)},onItemSingleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemsingletap",b,Ext.get(c),a,d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemswipe",b,Ext.get(c),a,d)},updateListItem:function(b,f){var e=this,a=e.dataview,c=a.getStore(),d=c.indexOf(b),g=a.prepareData(b.getData(true),d,b);g.xcount=c.getCount();g.xindex=typeof g.xindex==="number"?g.xindex:d;f.innerHTML=a.getItemTpl().apply(g)},addListItem:function(e,c){var h=this,d=h.dataview,i=d.getStore(),a=d.prepareData(c.getData(true),e,c),b=h.element,j=b.dom.childNodes,g=j.length,f;a.xcount=typeof a.xcount==="number"?a.xcount:i.getCount();a.xindex=typeof a.xindex==="number"?a.xindex:e;f=Ext.Element.create(this.getItemElementConfig(e,a));if(!g||e==g){f.appendTo(b)}else{f.insertBefore(j[e])}},getItemElementConfig:function(c,e){var b=this.dataview,d=b.getItemCls(),a=b.getBaseCls()+"-item";if(d){a+=" "+d}return{cls:a,html:b.getItemTpl().apply(e)}},doRemoveItemCls:function(a){var d=this.getViewItems(),c=d.length,b=0;for(;b=0;b--){c=a[f+b];Ext.get(c).destroy()}if(d.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(d){var g=this,b=g.dataview,c=b.getStore(),f=d.length,e,a;if(f){b.hideEmptyText()}for(e=0;eh._tmpIndex?1:-1});for(e=0;eg){e=g;g=c;c=e}for(d=c;d<=g;d++){a.push(b.getAt(d))}this.doMultiSelect(a,h)},select:function(c,e,b){var d=this,a;if(d.getDisableSelection()){return}if(typeof c==="number"){c=[d.getStore().getAt(c)]}if(!c){return}if(d.getMode()=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doSingleSelect:function(a,b){var d=this,c=d.selected;if(d.getDisableSelection()){return}if(d.isSelected(a)){return}if(c.getCount()>0){d.deselect(d.getLastSelected(),b)}c.add(a);d.setLastSelected(a);d.onItemSelect(a,b);d.setLastFocused(a);if(!b){d.fireSelectionChange([a])}},doMultiSelect:function(a,j,h){if(a===null||this.getDisableSelection()){return}a=!Ext.isArray(a)?[a]:a;var f=this,b=f.selected,e=a.length,g=false,c=0,d;if(!j&&b.getCount()>0){g=true;f.deselect(f.getSelection(),true)}for(;c0},refreshSelection:function(){var b=this,a=b.getSelection();b.deselectAll(true);if(a.length){b.select(a,false,true)}},onSelectionStoreRemove:function(c,b){var g=this,e=g.selected,f=b.length,a,d;if(g.getDisableSelection()){return}for(d=0;d{text}",pressedCls:"x-item-pressed",itemCls:null,selectedCls:"x-item-selected",triggerEvent:"itemtap",triggerCtEvent:"tap",deselectOnContainerClick:true,scrollable:true,inline:null,pressedDelay:100,loadingText:"Loading...",useComponents:null,itemConfig:{},maxItemCache:20,defaultType:"dataitem",scrollToTopOnRefresh:true},constructor:function(a){var c=this,b;c.hasLoadedStore=false;c.mixins.selectable.constructor.apply(c,arguments);c.indexOffset=0;c.callParent(arguments)},updateItemCls:function(c,b){var a=this.container;if(a){if(b){a.doRemoveItemCls(b)}if(c){a.doAddItemCls(c)}}},storeEventHooks:{beforeload:"onBeforeLoad",load:"onLoad",refresh:"refresh",addrecords:"onStoreAdd",removerecords:"onStoreRemove",updaterecord:"onStoreUpdate"},initialize:function(){this.callParent();var b=this,a;b.on(b.getTriggerCtEvent(),b.onContainerTrigger,b);a=b.container=this.add(new Ext.dataview[b.getUseComponents()?"component":"element"].Container({baseCls:this.getBaseCls()}));a.dataview=b;b.on(b.getTriggerEvent(),b.onItemTrigger,b);a.on({itemtouchstart:"onItemTouchStart",itemtouchend:"onItemTouchEnd",itemtap:"onItemTap",itemtaphold:"onItemTapHold",itemtouchmove:"onItemTouchMove",itemsingletap:"onItemSingleTap",itemdoubletap:"onItemDoubleTap",itemswipe:"onItemSwipe",scope:b});if(b.getStore()){if(b.isPainted()){b.refresh()}else{b.on({painted:"refresh",single:true})}}},applyInline:function(a){if(Ext.isObject(a)){a=Ext.apply({},a)}return a},updateInline:function(c,b){var a=this.getBaseCls();if(b){this.removeCls([a+"-inlineblock",a+"-nowrap"])}if(c){this.addCls(a+"-inlineblock");if(Ext.isObject(c)&&c.wrap===false){this.addCls(a+"-nowrap")}else{this.removeCls(a+"-nowrap")}}},prepareData:function(c,b,a){return c},onContainerTrigger:function(b){var a=this;if(b.target!=a.element.dom){return}if(a.getDeselectOnContainerClick()&&a.getStore()){a.deselectAll()}},onItemTrigger:function(b,a){this.selectWithEvent(this.getStore().getAt(a))},doAddPressedCls:function(a){var c=this,b=c.getItemAt(c.getStore().indexOf(a));if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.addCls(c.getPressedCls())}},onItemTouchStart:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireAction("itemtouchstart",[f,d,h,a,g],"doItemTouchStart")},doItemTouchStart:function(c,b,e,a){var d=c.getPressedDelay();if(a){if(d>0){c.pressedTimeout=Ext.defer(c.doAddPressedCls,d,c,[a])}else{c.doAddPressedCls(a)}}},onItemTouchEnd:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(this.hasOwnProperty("pressedTimeout")){clearTimeout(this.pressedTimeout);delete this.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchend",f,d,h,a,g)},onItemTouchMove:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(f.hasOwnProperty("pressedTimeout")){clearTimeout(f.pressedTimeout);delete f.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchmove",f,d,h,a,g)},onItemTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtap",f,d,h,a,g)},onItemTapHold:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtaphold",f,d,h,a,g)},onItemSingleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemsingletap",f,d,h,a,g)},onItemDoubleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemdoubletap",f,d,h,a,g)},onItemSwipe:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemswipe",f,d,h,a,g)},onItemSelect:function(a,b){var c=this;if(b){c.doItemSelect(c,a)}else{c.fireAction("select",[c,a],"doItemSelect")}},doItemSelect:function(c,a){if(c.container&&!c.isDestroyed){var b=c.getItemAt(c.getStore().indexOf(a));if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls(c.getPressedCls());b.addCls(c.getSelectedCls())}}},onItemDeselect:function(a,b){var c=this;if(c.container&&!c.isDestroyed){if(b){c.doItemDeselect(c,a)}else{c.fireAction("deselect",[c,a,b],"doItemDeselect")}}},doItemDeselect:function(c,a){var b=c.getItemAt(c.getStore().indexOf(a));if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls([c.getPressedCls(),c.getSelectedCls()])}},updateData:function(b){var a=this.getStore();if(!a){this.setStore(Ext.create("Ext.data.Store",{data:b}))}else{a.add(b)}},applyStore:function(b){var d=this,e=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(b){b=Ext.data.StoreManager.lookup(b);if(b&&Ext.isObject(b)&&b.isStore){b.on(e);c=b.getProxy();if(c){a=c.getReader();if(a){a.on("exception","handleException",this)}}}}return b},handleException:function(){this.setMasked(false)},updateStore:function(b,e){var d=this,f=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(e&&Ext.isObject(e)&&e.isStore){d.onStoreClear();if(e.getAutoDestroy()){e.destroy()}else{e.un(f);c=e.getProxy();if(c){a=c.getReader();if(a){a.un("exception","handleException",this)}}}}if(b){if(b.isLoaded()){this.hasLoadedStore=true}if(b.isLoading()){d.onBeforeLoad()}if(d.container){d.refresh()}}},onBeforeLoad:function(){var a=this.getLoadingText();if(a&&this.isPainted()){this.setMasked({xtype:"loadmask",message:a})}this.hideEmptyText()},updateEmptyText:function(c,d){var b=this,a;if(d&&b.emptyTextCmp){b.remove(b.emptyTextCmp,true);delete b.emptyTextCmp}if(c){b.emptyTextCmp=b.add({xtype:"component",cls:b.getBaseCls()+"-emptytext",html:c,hidden:true});a=b.getStore();if(a&&b.hasLoadedStore&&!a.getCount()){this.showEmptyText()}}},onLoad:function(a){this.hasLoadedStore=true;this.setMasked(false);if(!a.getCount()){this.showEmptyText()}},refresh:function(){var b=this,a=b.container;if(!b.getStore()){if(!b.hasLoadedStore&&!b.getDeferEmptyText()){b.showEmptyText()}return}if(a){b.fireAction("refresh",[b],"doRefresh")}},applyItemTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onAfterRender:function(){var a=this;a.callParent(arguments);a.updateStore(a.getStore())},getItemAt:function(a){return this.getViewItems()[a-this.indexOffset]},getItemIndex:function(b){var a=this.getViewItems().indexOf(b);return(a===-1)?a:this.indexOffset+a},getViewItems:function(){return this.container.getViewItems()},doRefresh:function(f){var a=f.container,j=f.getStore(),b=j.getRange(),e=f.getViewItems(),h=b.length,l=e.length,c=h-l,g=f.getScrollable(),d,k;if(this.getScrollToTopOnRefresh()&&g){g.getScroller().scrollToTop()}if(h<1){f.onStoreClear();return}else{f.hideEmptyText()}if(c<0){a.moveItemsToCache(l+c,l-1);e=f.getViewItems();l=e.length}else{if(c>0){a.moveItemsFromCache(j.getRange(l))}}for(d=0;d{name}"],baseCls:"x-legend",padding:5,disableSelection:true,inline:true,position:"top",horizontalHeight:48,verticalWidth:150},constructor:function(){this.callSuper(arguments);var a=this.getScrollable().getScroller(),b=a.onDrag;a.onDrag=function(c){c.stopPropagation();b.call(this,c)}},doSetDocked:function(a){this.callSuper(arguments);if(a==="top"||a==="bottom"){this.setLayout({type:"hbox",pack:"center"});this.setInline(true);this.setWidth(null);this.setHeight(this.getHorizontalHeight());this.setScrollable({direction:"horizontal"})}else{this.setLayout({pack:"center"});this.setInline(false);this.setWidth(this.getVerticalWidth());this.setHeight(null);this.setScrollable({direction:"vertical"})}},updatePosition:function(a){this.setDocked(a)},onItemTap:function(b,h,d,g){this.callSuper(arguments);var f=this,c=f.getStore(),a=c&&c.getAt(d);a.beginEdit();a.set("disabled",!a.get("disabled"));a.commit()}});Ext.define("Ext.data.Operation",{config:{synchronous:true,action:null,filters:null,sorters:null,grouper:null,start:null,limit:null,batch:null,callback:null,scope:null,resultSet:null,records:null,request:null,response:null,withCredentials:null,params:null,url:null,page:null,node:null,model:undefined,addRecords:false},started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,constructor:function(a){this.initConfig(a)},applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},getRecords:function(){var a=this.getResultSet();return this._records||(a?a.getRecords():[])},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},allowWrite:function(){return this.getAction()!="read"},process:function(d,b,c,a){if(b.getSuccess()!==false){this.setResponse(a);this.setResultSet(b);this.setCompleted();this.setSuccessful()}else{return false}return this["process"+Ext.String.capitalize(d)].call(this,b,c,a)},processRead:function(d){var b=d.getRecords(),g=[],f=this.getModel(),e=b.length,c,a;for(c=0;c=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+a)(d)}return d[a]},onMetaChange:function(f){var a=f.fields,e=this,d,c,b;e.metaData=f;if(f.rootProperty!==undefined){e.setRootProperty(f.rootProperty)}else{if(f.root!==undefined){e.setRootProperty(f.root)}}if(f.idProperty!==undefined){e.setIdProperty(f.idProperty)}if(f.totalProperty!==undefined){e.setTotalProperty(f.totalProperty)}if(f.successProperty!==undefined){e.setSuccessProperty(f.successProperty)}if(f.messageProperty!==undefined){e.setMessageProperty(f.messageProperty)}if(a){if(e.getModel()){e.getModel().setFields(a);e.buildExtractors()}else{b=e.getIdProperty();c={fields:a};if(b){c.idProperty=b}d=Ext.define("Ext.data.reader.MetaModel"+Ext.id(),{extend:"Ext.data.Model",config:c});e.setModel(d)}}else{e.buildExtractors()}}},function(){Ext.apply(this.prototype,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:false})})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",config:{record:null,useSimpleAccessors:false},objectRe:/[\[\.]/,getResponseData:function(a){var d=a;if(a&&a.responseText){d=a.responseText}if(typeof d!=="string"){return d}var c;try{c=Ext.decode(d)}catch(b){this.fireEvent("exception",this,a,"Unable to parse the JSON returned by the server: "+b.toString());Ext.Logger.warn("Unable to parse the JSON returned by the server: "+b.toString())}return c},buildExtractors:function(){var b=this,a=b.getRootProperty();b.callParent(arguments);if(a){b.rootAccessor=b.createAccessor(a)}else{delete b.rootAccessor}},getRoot:function(b){var a=this.getModel().getFields();if(a.isDirty){this.buildExtractors(true);delete a.isDirty}if(this.rootAccessor){return this.rootAccessor.call(this,b)}else{return b}},extractData:function(a){var e=this.getRecord(),d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b=0){return Ext.functionFactory("obj","var value; try {value = obj"+(b>0?".":"")+c+"} catch(e) {}; return value;")}}return function(d){return d[c]}}}(),createFieldAccessExpression:function(g,b,c){var f=this,h=f.objectRe,e=(g.getMapping()!==null),a=e?g.getMapping():g.getName(),i,d;if(typeof a==="function"){i=b+".getMapping()("+c+", this)"}else{if(f.getUseSimpleAccessors()===true||((d=String(a).search(h))<0)){if(!e||isNaN(a)){a='"'+a+'"'}i=c+"["+a+"]"}else{i=c+(d>0?".":"")+a}}return i}});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],config:{writeAllFields:true,nameProperty:"name"},constructor:function(a){this.initConfig(a)},write:function(e){var c=e.getOperation(),b=c.getRecords()||[],a=b.length,d=0,f=[];for(;d]+>/gi,none:function(a){return a},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){a=parseFloat(String(a).replace(/,/g,""));return isNaN(a)?0:a},asInt:function(a){a=parseInt(String(a).replace(/,/g,""),10);return isNaN(a)?0:a}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"],stripRe:/[\$,%]/g,dashesRe:/-/g,iso8601TestRe:/\d\dT\d\d/,iso8601SplitRe:/[- :T\.Z\+]/},function(){var b=this,a=Ext.data.SortTypes;Ext.apply(b,{AUTO:{convert:function(c){return c},sortType:a.none,type:"auto"},STRING:{convert:function(c){return(c===undefined||c===null)?(this.getAllowNull()?null:""):String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?parseInt(c,10):parseInt(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?c:parseFloat(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(c){if((c===undefined||c===null||c==="")&&this.getAllowNull()){return null}return c!=="false"&&!!c},sortType:a.none,type:"bool"},DATE:{convert:function(e){var c=this.getDateFormat(),d;if(!e){return null}if(Ext.isDate(e)){return e}if(c){if(c=="timestamp"){return new Date(e*1000)}if(c=="time"){return new Date(parseInt(e,10))}return Ext.Date.parse(e,c)}d=new Date(Date.parse(e));if(isNaN(d)){if(b.iso8601TestRe.test(e)){d=e.split(b.iso8601SplitRe);d=new Date(d[0],d[1]-1,d[2],d[3],d[4],d[5])}if(isNaN(d)){d=new Date(Date.parse(e.replace(b.dashesRe,"/")))}}return isNaN(d)?null:d},sortType:a.asDate,type:"date"}});Ext.apply(b,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",isField:true,config:{name:null,type:"auto",convert:undefined,dateFormat:null,allowNull:true,defaultValue:undefined,mapping:null,sortType:undefined,sortDir:"ASC",allowBlank:true,persist:true,encode:null,decode:null,bubbleEvents:"action"},constructor:function(a){if(Ext.isString(a)){a={name:a}}this.initConfig(a)},applyType:function(c){var b=Ext.data.Types,a=b.AUTO;if(c){if(Ext.isString(c)){return b[c.toUpperCase()]||a}else{return c}}return a},updateType:function(a,b){var c=this.getConvert();if(b&&c===b.convert){this.setConvert(a.convert)}},applySortType:function(d){var c=Ext.data.SortTypes,a=this.getType(),b=a.sortType;if(d){if(Ext.isString(d)){return c[d]||b}else{return d}}return b},applyConvert:function(b){var a=this.getType().convert;if(b&&b!==a){this._hasCustomConvert=true;return b}else{this._hasCustomConvert=false;return a}},hasCustomConvert:function(){return this._hasCustomConvert}});Ext.define("Ext.data.identifier.Simple",{alias:"data.identifier.simple",statics:{AUTO_ID:1},config:{prefix:"ext-record-"},constructor:function(a){this.initConfig(a)},generate:function(a){return this._prefix+this.self.AUTO_ID++}});Ext.define("Ext.data.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:["Ext.ModelMgr","Ext.ModelManager"],singleton:true,modelNamespace:null,registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{b={extend:b.extend||"Ext.data.Model",config:b};a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:Ext.emptyFn,getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a];if(!a&&this.modelNamespace){a=this.types[this.modelNamespace+"."+a]}}return a},create:function(c,b,d){var a=typeof b=="function"?b:this.types[b||c.name];return new a(c,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.data.Request",{config:{action:null,params:null,method:"GET",url:null,operation:null,proxy:null,disableCaching:false,headers:{},callbackKey:null,jsonP:null,jsonData:null,xmlData:null,withCredentials:null,username:null,password:null,callback:null,scope:null,timeout:30000,records:null,directFn:null,args:null},constructor:function(a){this.initConfig(a)}});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",requires:["Ext.data.Request"],config:{url:null,pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",enablePagingParams:true,simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,api:{create:undefined,read:undefined,update:undefined,destroy:undefined},extraParams:{}},constructor:function(a){a=a||{};if(a.nocache!==undefined){a.noCache=a.nocache}this.callParent([a])},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)},setExtraParam:function(a,b){this.getExtraParams()[a]=b},buildRequest:function(a){var c=this,d=Ext.applyIf(a.getParams()||{},c.getExtraParams()||{}),b;d=Ext.applyIf(d,c.getParams(a));b=Ext.create("Ext.data.Request",{params:d,action:a.getAction(),records:a.getRecords(),url:a.getUrl(),operation:a,proxy:c});b.setUrl(c.buildUrl(b));a.setRequest(b);return b},processResponse:function(k,b,d,c,j,l){var h=this,a=b.getAction(),f,i;if(k===true){f=h.getReader();try{i=f.process(c)}catch(g){b.setException(g.message);h.fireEvent("exception",this,c,b);return}if(!b.getModel()){b.setModel(this.getModel())}if(b.process(a,i,d,c)===false){this.fireEvent("exception",this,c,b)}}else{h.setException(b,c);h.fireEvent("exception",this,c,b)}if(typeof j=="function"){j.call(l||h,b)}h.afterRequest(d,k)},setException:function(b,a){if(Ext.isObject(a)){b.setException({status:a.status,statusText:a.statusText})}},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a0){if(o){h[e]=m[0].getProperty();h[b]=m[0].getDirection()}else{h[e]=n.encodeSorters(m)}}if(c&&f&&f.length>0){h[c]=n.encodeFilters(f)}return h},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.getNoCache()){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.getCacheString(),Ext.Date.now()))}return a},getUrl:function(a){return a?a.getUrl()||this.getApi()[a.getAction()]||this._url:this._url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn});Ext.define("Ext.data.proxy.Ajax",{extend:"Ext.data.proxy.Server",requires:["Ext.util.MixedCollection","Ext.Ajax"],alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],config:{withCredentials:false,username:null,password:null,actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},headers:{}},doRequest:function(a,f,b){var d=this,e=d.getWriter(),c=d.buildRequest(a);c.setConfig({headers:d.getHeaders(),timeout:d.getTimeout(),method:d.getMethod(c),callback:d.createRequestCallback(c,a,f,b),scope:d,proxy:d});if(a.getWithCredentials()||d.getWithCredentials()){c.setWithCredentials(true);c.setUsername(d.getUsername());c.setPassword(d.getPassword())}c=e.write(c);Ext.Ajax.request(c.getCurrentConfig());return c},getMethod:function(a){return this.getActionMethods()[a.getAction()]},createRequestCallback:function(d,a,e,b){var c=this;return function(g,h,f){c.processResponse(h,a,d,f,e,b)}}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",requires:["Ext.data.ModelManager"],config:{ownerModel:null,ownerName:undefined,associatedModel:null,associatedName:undefined,associationKey:undefined,primaryKey:"id",reader:null,type:null,name:undefined},statics:{create:function(a){if(!a.isAssociation){if(Ext.isString(a)){a={type:a}}a.type=a.type.toLowerCase();return Ext.factory(a,Ext.data.association.Association,null,"association")}return a}},constructor:function(a){this.initConfig(a)},applyName:function(a){if(!a){a=this.getAssociatedName()}return a},applyOwnerModel:function(a){var b=Ext.data.ModelManager.getModel(a);if(b===undefined){Ext.Logger.error("The configured ownerModel was not valid (you tried "+a+")")}return b},applyOwnerName:function(a){if(!a){a=this.getOwnerModel().modelName}a=a.slice(a.lastIndexOf(".")+1);return a},updateOwnerModel:function(a,b){if(b){this.setOwnerName(a.modelName)}},applyAssociatedModel:function(a){var b=Ext.data.ModelManager.types[a];if(b===undefined){Ext.Logger.error("The configured associatedModel was not valid (you tried "+a+")")}return b},applyAssociatedName:function(a){if(!a){a=this.getAssociatedModel().modelName}a=a.slice(a.lastIndexOf(".")+1);return a},updateAssociatedModel:function(b,a){if(a){this.setAssociatedName(b.modelName)}},applyReader:function(a){if(a){if(Ext.isString(a)){a={type:a}}if(!a.isReader){Ext.applyIf(a,{type:"json"})}}return Ext.factory(a,Ext.data.Reader,this.getReader(),"reader")},updateReader:function(a){a.setModel(this.getAssociatedModel())}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(f){if(this.isTransnumeral(f)){return f}var e=this.plurals,d=e.length,a,c,b;for(b=0;b0){g=f.data.items;r=g.length;for(k=0;kf)?1:((ba?1:(d0){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",this,b)!==false){d.getProxy().batch({operations:b,listeners:d.getBatchListeners()})}return{added:e,updated:c,removed:a}},first:function(){return this.data.first()},last:function(){return this.data.last()},sum:function(e){var d=0,c=0,b=this.data.items,a=b.length;for(;c0){c=b[0].get(f)}for(;d0){a=c[0].get(f)}for(;da){a=e}}return a},average:function(e){var c=0,b=this.data.items,a=b.length,d=0;if(b.length>0){for(;cg[0]+g[2]){a=g[0]+g[2]}}if(ig[1]+g[3]){i=g[1]+g[3]}}d.selectionRect.setAttributes({width:a-d.startX,height:i-d.startY});if(Math.abs(d.startX-a)<11||Math.abs(d.startY-i)<11){d.selectionRect.setAttributes({globalAlpha:0.3})}else{d.selectionRect.setAttributes({globalAlpha:1})}b.renderFrame()}},onGestureEnd:function(c){var f=this;if(f.getLocks()[f.getGesture()]===f){var d=f.getChart(),b=f.getSurface(),h=d.getInnerRegion(),a=f.selectionRect,j=d.element.getXY(),i=c.pageX-j[0],g=c.pageY-j[1];if(ih[0]+h[2]){i=h[0]+h[2]}}if(gh[1]+h[3]){g=h[1]+h[3]}}if(Math.abs(f.startX-i)<11||Math.abs(f.startY-g)<11){b.remove(f.selectionRect)}else{f.zoomBy([(Math.min(f.startX,i)-h[0])/h[2],1-(Math.max(f.startY,g)-h[1])/h[3],(Math.max(f.startX,i)-h[0])/h[2],1-(Math.min(f.startY,g)-h[1])/h[3]]);a.setAttributes({x:Math.min(f.startX,i),y:Math.min(f.startY,g),width:Math.abs(f.startX-i),height:Math.abs(f.startY-g)});a.fx.setConfig(d.getAnimate()||{duration:0});a.setAttributes({globalAlpha:0,x:h[0],y:h[1],width:h[2],height:h[3]});d.suspendThicknessChanged();a.fx.on("animationend",function(){d.resumeThicknessChanged();b.remove(f.selectionRect)})}this.selectionRect=null;b.renderFrame();f.sync();f.unlockEvents(f.getGesture())}},zoomBy:function(k){var j=this,a=j.getAxes(),g=j.getChart().getAxes(),d,b={};for(var f=0;f=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},intersect:function(g){var f=this,d=Math.max(f.top,g.top),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.left,g.left);if(a>d&&e>c){return new Ext.util.Region(d,e,a,c)}else{return false}},union:function(g){var f=this,d=Math.min(f.top,g.top),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.left,g.left);return new Ext.util.Region(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.util.Numbers.constrain;a.top=c(a.top,b.top,b.bottom);a.bottom=c(a.bottom,b.top,b.bottom);a.left=c(a.left,b.left,b.right);a.right=c(a.right,b.left,b.right);return a},adjust:function(e,b,a,d){var c=this;c.top+=e;c.left+=d;c.right+=b;c.bottom+=a;return c},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(a.x);c.y=this.getOutOfBoundOffsetY(a.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.left){return this.left-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.top){return this.top-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.left){b-=(b-this.left)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.top){b-=(b-this.top)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.left,height:this.bottom-this.top}},copy:function(){return new Ext.util.Region(this.top,this.right,this.bottom,this.left)},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a){this.left+=a.x;this.right+=a.x;this.top+=a.y;this.bottom+=a.y;return this},round:function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.chart.interactions.PanZoom",{extend:"Ext.chart.interactions.Abstract",type:"panzoom",alias:"interaction.panzoom",requires:["Ext.util.Region","Ext.draw.Animator"],config:{axes:{top:{},right:{},bottom:{},left:{}},minZoom:1,maxZoom:10000,showOverflowArrows:true,gesture:"pinch",panGesture:"drag",zoomOnPanGesture:false,modeToggleButton:{cls:["x-panzoom-toggle","x-zooming"],iconCls:"x-panzoom-toggle-icon",iconMask:true},hideLabelInGesture:false},stopAnimationBeforeSync:true,applyAxes:function(b,a){return Ext.merge(a||{},b)},applyZoomOnPanGesture:function(a){this.getChart();if(this.isMultiTouch()){return false}return a},updateZoomOnPanGesture:function(c){if(!this.isMultiTouch()){var b=this.getModeToggleButton(),a=Ext.baseCSSPrefix+"zooming";if(c){b.addCls(a);if(!b.config.hideText){b.setText(" Zoom")}}else{b.removeCls(a);if(!b.config.hideText){b.setText(" Pan")}}}},toggleMode:function(){var a=this;if(!a.isMultiTouch()){a.setZoomOnPanGesture(!a.getZoomOnPanGesture())}},applyModeToggleButton:function(c,b){var d=this,a=Ext.factory(c,"Ext.Button",b);if(a&&!b){a.setHandler(function(){d.toggleMode()})}return a},getGestures:function(){var a=this,b={};b[a.getGesture()]="onGesture";b[a.getGesture()+"start"]="onGestureStart";b[a.getGesture()+"end"]="onGestureEnd";b[a.getPanGesture()]="onPanGesture";b[a.getPanGesture()+"start"]="onPanGestureStart";b[a.getPanGesture()+"end"]="onPanGestureEnd";b.doubletap="onDoubleTap";return b},onDoubleTap:function(a){},onPanGestureStart:function(d){if(!d||!d.touches||d.touches.length<2){var a=this,c=a.getChart().getInnerRegion(),b=a.getChart().element.getXY();a.startX=d.pageX-b[0]-c[0];a.startY=d.pageY-b[1]-c[1];a.oldVisibleRanges=null;a.hideLabels();a.getChart().suspendThicknessChanged()}},onPanGesture:function(d){if(!d.touches||d.touches.length<2){var a=this,c=a.getChart().getInnerRegion(),b=a.getChart().element.getXY();if(a.getZoomOnPanGesture()){a.transformAxesBy(a.getZoomableAxes(d),0,0,(d.pageX-b[0]-c[0])/a.startX,a.startY/(d.pageY-b[1]-c[1]))}else{a.transformAxesBy(a.getPannableAxes(d),d.pageX-b[0]-c[0]-a.startX,d.pageY-b[1]-c[1]-a.startY,1,1)}a.sync()}},onPanGestureEnd:function(b){var a=this;a.getChart().resumeThicknessChanged();a.showLabels();a.sync()},onGestureStart:function(b){if(b.touches&&b.touches.length===2){var c=this,i=c.getChart().element.getXY(),f=c.getChart().getInnerRegion(),h=i[0]+f[0],d=i[1]+f[1],j=[b.touches[0].point.x-h,b.touches[0].point.y-d,b.touches[1].point.x-h,b.touches[1].point.y-d],g=Math.max(44,Math.abs(j[2]-j[0])),a=Math.max(44,Math.abs(j[3]-j[1]));c.getChart().suspendThicknessChanged();c.lastZoomDistances=[g,a];c.lastPoints=j;c.oldVisibleRanges=null;c.hideLabels()}},onGesture:function(d){if(d.touches&&d.touches.length===2){var f=this,i=f.getChart().getInnerRegion(),n=f.getChart().element.getXY(),k=n[0]+i[0],h=n[1]+i[1],o=Math.abs,c=f.lastPoints,m=[d.touches[0].point.x-k,d.touches[0].point.y-h,d.touches[1].point.x-k,d.touches[1].point.y-h],g=Math.max(44,o(m[2]-m[0])),b=Math.max(44,o(m[3]-m[1])),a=this.lastZoomDistances||[g,b],l=g/a[0],j=b/a[1];f.transformAxesBy(f.getZoomableAxes(d),i[2]*(l-1)/2+m[2]-c[2]*l,i[3]*(j-1)/2+m[3]-c[3]*j,l,j);f.sync()}},onGestureEnd:function(b){var a=this;a.showLabels();a.sync()},hideLabels:function(){if(this.getHideLabelInGesture()){this.eachInteractiveAxes(function(a){a.hideLabels()})}},showLabels:function(){if(this.getHideLabelInGesture()){this.eachInteractiveAxes(function(a){a.showLabels()})}},isEventOnAxis:function(c,a){var b=a.getSurface().getRegion();return b[0]<=c.pageX&&c.pageX<=b[0]+b[2]&&b[1]<=c.pageY&&c.pageY<=b[1]+b[3]},getPannableAxes:function(d){var h=this,a=h.getAxes(),f=h.getChart().getAxes(),c,g=f.length,k=[],j=false,b;if(d){for(c=0;c1){g=1}if(g*f<1){g=1/f}d.setVisibleRange([(e[0]+e[1]-g)*0.5-p/b*g,(e[0]+e[1]+g)*0.5-p/b*g])},destroy:function(){this.setModeToggleButton(null);this.callSuper()}});Ext.define("Ext.chart.interactions.Rotate",{extend:"Ext.chart.interactions.Abstract",type:"rotate",alias:"interaction.rotate",config:{gesture:"rotate"},oldRotations:null,getGestures:function(){var a={};a.rotate="onRotate";a.rotateend="onRotate";a.dragstart="onGestureStart";a.drag="onGesture";a.dragend="onGesture";return a},getAngle:function(f){var c=this,b=c.getChart(),d=b.getEventXY(f),a=b.getCenter();return Math.atan2(d[1]-a[1],d[0]-a[0])},onGestureStart:function(a){this.angle=this.getAngle(a);this.oldRotations={}},onGesture:function(h){var o=this,l=o.getChart(),c=this.getAngle(h)-this.angle,k=l.getAxes(),b,f=l.getSeries(),m,a=l.getCenter(),n=this.oldRotations,g,d,j;for(d=0,j=k.length;d=b[a-1]){return a-1}while(f+1>1,e=b[c];if(e===d){return c}else{if(e=b;t--){h=l[t]*e+m;g=z[t]*o+k;r.lineTo(f,g);r.lineTo(f=h,g)}}else{for(t=a;t>=b;t--){h=l[t]*e+m;g=z[t]*o+k;r.lineTo(h,g)}}}else{r.lineTo(l[a]*e+m,g);r.lineTo(l[a]*e+m,k);r.lineTo(l[b]*e+m,k);r.lineTo(l[b]*e+m,j[t]*o+k)}if(p.transformFillStroke){p.matrix.toContext(r)}r.fill();if(p.transformFillStroke){p.inverseMatrix.toContext(r)}r.beginPath();if(p.step){for(t=b;t<=a;t++){h=l[t]*e+m;g=j[t]*o+k;r.lineTo(h,d);r.lineTo(h,d=g);n.translationX=c.x(h,g);n.translationY=c.y(h,g);w.putMarker("markers",n,t,!p.renderer)}}else{for(t=b;t<=a;t++){h=l[t]*e+m;g=j[t]*o+k;r.lineTo(h,g);n.translationX=c.x(h,g);n.translationY=c.y(h,g);w.putMarker("markers",n,t,!p.renderer)}}if(p.transformFillStroke){p.matrix.toContext(r)}r.stroke()}});Ext.define("Ext.chart.series.Area",{extend:"Ext.chart.series.StackedCartesian",alias:"series.area",type:"area",seriesType:"areaSeries",requires:["Ext.chart.series.sprite.Area"]});Ext.define("Ext.chart.series.sprite.Bar",{alias:"sprite.barSeries",extend:"Ext.chart.series.sprite.StackedCartesian",inheritableStatics:{def:{processors:{minBarWidth:"number",maxBarWidth:"number",minGapWidth:"number",radius:"number",inGroupGapWidth:"number",renderer:"default"},defaults:{minBarWidth:2,maxBarWidth:100,minGapWidth:5,inGroupGapWidth:3,radius:0,renderer:null}}},drawLabel:function(m,j,d,f,b){var l=this,g=l.attr,a=l.labelCfg||(l.labelCfg={}),e=l.surfaceMatrix,k,i,h=g.labelOverflowPadding,c,n;n=this.getMarkerBBox("labels",b,true);a.text=m;if(!n){l.putMarker("labels",a,b);n=this.getMarkerBBox("labels",b,true)}if(!g.flipXY){a.rotationRads=Math.PI*0.5}else{a.rotationRads=0}a.calloutVertical=!g.flipXY;c=(n.width/2+h);if(d>f){c=-c}k=j;i=f-c;a.x=e.x(k,i);a.y=e.y(k,i);k=j;i=f+c;a.calloutPlaceX=e.x(k,i);a.calloutPlaceY=e.y(k,i);k=j;i=f;a.calloutStartX=e.x(k,i);a.calloutStartY=e.y(k,i);if(d>f){c=-c}if(Math.abs(f-d)>c*2){a.callout=0}else{a.callout=1}l.putMarker("labels",a,b)},drawBar:function(i,b,d,c,f,h,a,e){var g=this.itemCfg||(this.itemCfg={});g.x=c;g.y=f;g.width=h-c;g.height=a-f;g.radius=this.attr.radius;if(this.attr.renderer){this.attr.renderer.call(this,g,this,e,this.getDataItems().items[e])}this.putMarker("items",g,e,!this.attr.renderer)},renderClipped:function(x,y,C){if(this.cleanRedraw){return}var G=this,w=G.attr,r=w.dataX,p=w.dataY,b=w.labels,H=w.dataStartY,c=w.groupCount,k=w.groupOffset-(c-1)*0.5,B=w.inGroupGapWidth,m,f,a=y.lineWidth,z=w.matrix,F=z.getXX()-w.minGapWidth,u=x.roundPixel(Math.max(w.minBarWidth,(Math.min(F,w.maxBarWidth)-B*(c-1))/c)),j=this.surfaceMatrix,e,D,n,t,A,E,h=0.5*w.lineWidth,l=z.elements[0],s=z.elements[4],v=z.elements[3],q=x.roundPixel(z.elements[5])-1,g=Math.max(0,Math.floor(C[0])),d=Math.min(r.length-1,Math.ceil(C[2])),o=b&&!!this.getBoundMarker("labels");for(A=g;A<=d;A++){m=H?H[A]:0;f=p[A];E=r[A]*l+s+k*(u+B);e=x.roundPixel(E-u/2)+h;t=x.roundPixel(f*v+a+q);D=x.roundPixel(E+u/2)-h;n=x.roundPixel(m*v+a+q);G.drawBar(y,x,C,e,t-h,D,n-h,A);if(o&&b[A]){this.drawLabel(b[A],E,n,t,A)}G.putMarker("markers",{translationX:j.x(E,t),translationY:j.y(E,t)},A,true)}}});Ext.define("Ext.chart.series.Bar",{extend:"Ext.chart.series.StackedCartesian",alias:"series.bar",type:"bar",seriesType:"barSeries",requires:["Ext.chart.series.sprite.Bar","Ext.draw.sprite.Rect"],config:{itemInstancing:{type:"rect",fx:{customDuration:{x:0,y:0,width:0,height:0,radius:0}}}},updateXAxis:function(a){a.setLabelInSpan(true);this.callSuper(arguments)},updateStacked:function(c){var e=this.getSprites(),a={},b,d=e.length;if(this.getStacked()){a.groupCount=1;a.groupOffset=0;for(b=0;bf+1&&zn.length*2*b[1]){continue}if(b[3]&&m.map["time_"+b[3]]){o=m.map["time_"+b[3]][0];A=m.map["time_"+b[3]][1]}else{o=k;A=F}f=l;t=s;j=true;r[l]=r[o];h[l]=h[o];w[l]=w[o];C[l]=C[o];a[l]=a[o];y[l]=y[o];g[l]=g[o];q[l]=q[o];p[l]=p[o];B[l]=B[o];t=Ext.Date.add(t,b[0],b[1]);for(v=o+1;vB[l]){B[l]=B[v];p[l]=p[v];C[l]=C[v]}if(q[v]f){m.map["time_"+b[2]]=[f,l]}}},"double":function(h,u,j,a,t,b,c){var e=0,k,f=1,n,d,v,g,s,l,m,r,q,p,o;while(u>e+1){k=e;e=u;f+=f;for(n=k;n=h.maxY[n+1]){s=h.maxIdx[n];p=h.maxX[n];o=h.maxY[n]}else{s=h.maxIdx[n+1];p=h.maxX[n+1];o=h.maxY[n+1]}}h.startIdx[u]=d;h.endIdx[u]=v;h.minIdx[u]=g;h.maxIdx[u]=s;h.open[u]=l;h.close[u]=m;h.minX[u]=r;h.minY[u]=q;h.maxX[u]=p;h.maxY[u]=o;u++}h.map["double_"+f]=[e,u]}},none:Ext.emptyFn,aggregateData:function(h,a,r,c,d){var b=h.length,e=[],s=[],f=[],q=[],j=[],p=[],n=[],o=[],m=[],k=[],g={startIdx:e,endIdx:s,minIdx:f,maxIdx:q,open:j,minX:p,minY:n,maxX:o,maxY:m,close:k},l;for(l=0;l=b[c.startIdx[a-1]]){return a-1}while(g+1>1,f=b[c.startIdx[d]];if(f===e){return d}else{if(f=b[c.endIdx[a-1]]){return a-1}while(g+1>1,f=b[c.endIdx[d]];if(f===e){return d}else{if(f0){if(e){d.getAggregator().setData(b.dataX,b.dataY,e,a,f)}else{d.getAggregator().setData(b.dataX,b.dataY)}}},getGapWidth:function(){return 1},renderClipped:function(a,b,d,e){var c=this,f=c.getAggregator()&&c.getAggregator().getAggregation(d[0],d[2],(d[2]-d[0])/e[2]*c.getGapWidth());if(f){c.dataStart=f.data.startIdx[f.start];c.dataEnd=f.data.endIdx[f.end-1];c.renderAggregates(f.data,f.start,f.end,a,b,d,e)}}});Ext.define("Ext.chart.series.sprite.CandleStick",{alias:"sprite.candlestickSeries",extend:"Ext.chart.series.sprite.Aggregative",inheritableStatics:{def:{processors:{raiseStyle:function(b,a){return Ext.merge({},a||{},b)},dropStyle:function(b,a){return Ext.merge({},a||{},b)},barWidth:"number",padding:"number",ohlcType:"enums(candlestick,ohlc)"},defaults:{raiseStyle:{strokeStyle:"green",fillStyle:"green"},dropStyle:{strokeStyle:"red",fillStyle:"red"},planar:false,barWidth:15,padding:3,lineJoin:"miter",miterLimit:5,ohlcType:"candlestick"},dirtyTriggers:{raiseStyle:"raiseStyle",dropStyle:"dropStyle"},updaters:{raiseStyle:function(){this.raiseTemplate&&this.raiseTemplate.setAttributes(this.attr.raiseStyle)},dropStyle:function(){this.dropTemplate&&this.dropTemplate.setAttributes(this.attr.dropStyle)}}}},candlestick:function(i,c,a,e,h,f,b){var d=Math.min(c,h),g=Math.max(c,h);i.moveTo(f,e);i.lineTo(f,g);i.moveTo(f+b,g);i.lineTo(f+b,d);i.lineTo(f-b,d);i.lineTo(f-b,g);i.closePath();i.moveTo(f,a);i.lineTo(f,d)},ohlc:function(b,d,e,a,f,c,g){b.moveTo(c,e);b.lineTo(c,a);b.moveTo(c,d);b.lineTo(c-g,d);b.moveTo(c,f);b.lineTo(c+g,f)},constructor:function(){this.callSuper(arguments);this.raiseTemplate=new Ext.draw.sprite.Rect({parent:this});this.dropTemplate=new Ext.draw.sprite.Rect({parent:this})},getGapWidth:function(){var a=this.attr,b=a.barWidth,c=a.padding;return b+c},renderAggregates:function(e,d,c,v,w,C,b){var G=this,u=this.attr,l=u.dataX,y=u.matrix,f=y.getXX(),t=y.getYY(),m=y.getDX(),k=y.getDY(),q=u.barWidth/f,F,j=u.ohlcType,g=Math.round(q*0.5*f),a=e.open,x=e.high,o=e.low,B=e.close,E=e.maxY,r=e.minY,s=e.startIdx,n,h,H,p,D,A,z=u.lineWidth*v.devicePixelRatio/2;z-=Math.floor(z);w.save();F=this.raiseTemplate;F.useAttributes(w);w.beginPath();for(A=d;AB[A]){n=Math.round(a[A]*t+k)+z;h=Math.round(E[A]*t+k)+z;H=Math.round(r[A]*t+k)+z;p=Math.round(B[A]*t+k)+z;D=Math.round(l[s[A]]*f+m)+z;G[j](w,n,h,H,p,D,g)}}w.fillStroke(F.attr);w.restore()}});Ext.define("Ext.chart.series.CandleStick",{extend:"Ext.chart.series.Cartesian",requires:["Ext.chart.series.sprite.CandleStick"],alias:"series.candlestick",type:"candlestick",seriesType:"candlestickSeries",config:{openField:null,highField:null,lowField:null,closeField:null},fieldCategoryY:["Open","High","Low","Close"]});Ext.define("Ext.chart.series.Gauge",{alias:"series.gauge",extend:"Ext.chart.series.Series",type:"gauge",seriesType:"sector",requires:["Ext.draw.sprite.Sector"],config:{angleField:null,field:null,needle:false,needleLengthRatio:0.8,donut:30,showInLegend:false,value:null,minimum:0,maximum:100,rotation:0,totalAngle:Math.PI/2,region:[0,0,1,1],center:[0.5,0.75],radius:0.5,wholeDisk:false},updateAngleField:function(a){this.setField(a)},updateRegion:function(f){var d=this.getWholeDisk(),c=d?Math.PI:this.getTotalAngle()/2,g=this.getDonut()/100,e,b,a;if(c<=Math.PI/2){e=2*Math.sin(c);b=1-g*Math.cos(c)}else{e=2;b=1-Math.cos(c)}a=Math.min(f[2]/e,f[3]/b);this.setRadius(a);this.setCenter([f[2]/2,a+(f[3]-b*a)/2])},updateCenter:function(a){this.setStyle({centerX:a[0],centerY:a[1],rotationCenterX:a[0],rotationCenterY:a[1]});this.doUpdateStyles()},updateRotation:function(a){this.setStyle({rotationRads:a-(this.getTotalAngle()+Math.PI)/2});this.doUpdateStyles()},updateRadius:function(a){var d=this.getDonut(),c=this.getNeedle(),b=c?this.getNeedleLengthRatio():1;this.setSubStyle({endRho:[a*b,a],startRho:a/100*d});this.doUpdateStyles()},updateDonut:function(d){var a=this.getRadius(),c=this.getNeedle(),b=c?this.getNeedleLengthRatio():1;this.setSubStyle({endRho:[a*b,a],startRho:a/100*d});this.doUpdateStyles()},applyValue:function(a){return Math.min(this.getMaximum(),Math.max(a,this.getMinimum()))},updateValue:function(b){var c=this.getNeedle(),f=(b-this.getMinimum())/(this.getMaximum()-this.getMinimum()),a=this.getTotalAngle(),e=f*a,d=this.getSprites();if(c){d[0].setAttributes({startAngle:e,endAngle:e})}else{d[0].setAttributes({endAngle:e})}this.doUpdateStyles()},processData:function(){var a=this.getStore();if(!a){return}var b=this.getField();if(!b){return}if(!a.getData().items.length){return}this.setValue(a.getData().items[0].get(b))},getDefaultSpriteConfig:function(){return{type:"sector",fx:{customDuration:{translationX:0,translationY:0,rotationCenterX:0,rotationCenterY:0,centerX:0,centerY:0,startRho:0,endRho:0,baseRotation:0}}}},getSprites:function(){if(!this.getStore()&&!Ext.isNumber(this.getValue())){return null}var c=this,b,a=this.getChart().getAnimate(),d=c.sprites;if(d&&d.length){d[0].fx.setConfig(a);return d}b=c.createSprite();b.setAttributes({zIndex:10});b=c.createSprite();b.setAttributes({startAngle:0,endAngle:c.getTotalAngle()});c.doUpdateStyles();return d}});Ext.define("Ext.event.publisher.Publisher",{targetType:"",idSelectorRegex:/^#([\w\-]+)$/i,constructor:function(){var b=this.handledEvents,a,c,e,d;a=this.handledEventsMap={};for(c=0,e=b.length;cG){D.push(G*h+p,C*u+n,r[B]);D.push(H*h+p,F*u+n,r[B])}else{D.push(G*h+p,C*u+n,r[B])}}j=false}if(D.length){for(B=0;B(d.endRho-d.startRho)){return 0}c=Math.sqrt(d.endRho*d.endRho-g*g);b=Math.sqrt(d.endRho*d.endRho-i*i);a=Math.abs(Math.tan(Math.abs(d.endAngle-d.startAngle)/2))*i;if(f.height+e*2>Math.min(c,b,a)*2){return 0}return 1}});Ext.define("Ext.chart.series.Pie",{extend:"Ext.chart.series.Polar",requires:["Ext.chart.series.sprite.PieSlice"],type:"pie",alias:"series.pie",seriesType:"pieslice",config:{labelField:false,donut:false,field:null,rotation:0,totalAngle:Math.PI*2,hidden:[],style:{}},directions:["X"],setField:function(a){return this.setXField(a)},getField:function(){return this.getXField()},updateLabelData:function(){var f=this,b=f.getStore(),a=b.getData().items,g=f.getSprites(),c=f.getLabelField(),d,e,h;if(g.length>0&&c){h=[];for(d=0,e=a.length;d=d.length){d[c]=false}}if(e===0){return}e=g/e;for(c=0;c0){c=(i+d)*0.5;h+=Math.cos(c)*f;g+=Math.sin(c)*f*b;o.moveTo(h+n*k,g+l*k*b);o.lineTo(h+n*a,g+l*a*b);o.lineTo(h+n*a,g+l*a*b+m);o.lineTo(h+n*k,g+l*k*b+m);o.closePath()}},innerRenderer:function(p){var k=this.attr,g=k.margin,i=k.centerX,h=k.centerY,b=k.distortion,e=k.baseRotation,j=k.startAngle+e,d=k.endAngle+e,n=k.thickness,m=k.startRho,o,a,f,l,c;c=(j+d)*0.5;i+=Math.cos(c)*g;h+=Math.sin(c)*g*b;if(j>=Math.PI*2){j-=Math.PI*2;d-=Math.PI*2}if(d>Math.PI&&dMath.PI*3){f=Math.PI;l=d;o=Math.sin(l);a=Math.cos(l);p.ellipse(i,h,m,m*b,0,f,l,false);p.lineTo(i+a*m,h+o*m*b+n);p.ellipse(i,h+n,m,m*b,0,l,f,true);p.closePath()}},outerRenderer:function(p){var l=this.attr,h=l.margin,j=l.centerX,i=l.centerY,c=l.distortion,f=l.baseRotation,k=l.startAngle+f,e=l.endAngle+f,n=l.thickness,b=l.endRho,o,a,g,m,d;d=(k+e)*0.5;j+=Math.cos(d)*h;i+=Math.sin(d)*h*c;if(k>=Math.PI*2){k-=Math.PI*2;e-=Math.PI*2}if(kMath.PI*2){g=Math.max(k,Math.PI*2);m=e;o=Math.sin(m);a=Math.cos(m);p.ellipse(j,i,b,b*c,0,g,m,false);p.lineTo(j+a*b,i+o*b*c+n);p.ellipse(j,i+n,b,b*c,0,m,g,true);p.closePath()}}});Ext.define("Ext.chart.series.Pie3D",{requires:["Ext.chart.series.sprite.Pie3DPart"],extend:"Ext.chart.series.Polar",type:"pie3d",seriesType:"pie3d",alias:"series.pie3d",config:{region:[0,0,0,0],thickness:35,distortion:0.5,field:false,lengthField:false,donut:false,rotation:0},applyRotation:function(b){var a=Math.PI*2;return(b%a+a)%a},updateRotation:function(b){var d=this.getSprites(),a,c;for(a=0,c=d.length;a1){for(c=a.length;b0){f.timeout=setTimeout(Ext.bind(i.handleTimeout,i,[f]),l)}i.setupErrorHandling(f);i[k]=Ext.bind(i.handleResponse,i,[f],true);i.loadScript(f);return f},abort:function(b){var c=this.requests,a;if(b){if(!b.id){b=c[b]}this.handleAbort(b)}else{for(a in c){if(c.hasOwnProperty(a)){this.abort(c[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.requests[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).destroy();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType,b])}else{Ext.callback(b.success,b.scope,[a,b])}Ext.callback(b.callback,b.scope,[c,a,b.errorType,b])},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.JsonStore",{extend:"Ext.data.Store",alias:"store.json",config:{proxy:{type:"ajax",reader:"json",writer:"json"}}});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field","Ext.data.ModelManager"],alternateClassName:"Ext.data.Node",statics:{decorate:function(d){if(!d.isNode){var g=Ext.data.ModelManager,c=d.modelName,e=g.getModel(c),b=[],f,h,a;e.override(this.getPrototypeBody());b=this.applyFields(e,[{name:"parentId",type:"string",defaultValue:null},{name:"index",type:"int",defaultValue:0},{name:"depth",type:"int",defaultValue:0,persist:false},{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:"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}]);a=b.length;e.getFields().isDirty=true;for(f=0;f0},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;ce){return 1}else{if(fa.data.index)?1:-1},applyFilters:function(b){var a=this;return function(c){return a.isVisible(c)}},applyProxy:function(a){},applyNode:function(a){if(a){a=Ext.data.NodeInterface.decorate(a)}return a},updateNode:function(a,c){if(c&&!c.isDestroyed){c.un({append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad",scope:this});c.unjoin(this)}if(a){a.on({scope:this,append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad"});a.join(this);var b=[];if(a.childNodes.length){b=b.concat(this.retrieveChildNodes(a))}if(this.getRootVisible()){b.push(a)}else{if(a.isLoaded()||a.isLoading()){a.set("expanded",true)}}this.data.clear();this.fireEvent("clear",this);this.suspendEvents();this.add(b);this.resumeEvents();this.fireEvent("refresh",this,this.data)}},retrieveChildNodes:function(a){var d=this.getNode(),b=this.getRecursive(),c=[],e=a;if(!a.childNodes.length||(!b&&a!==d)){return c}if(!b){return a.childNodes}while(e){if(e._added){delete e._added;if(e===a){break}else{e=e.nextSibling||e.parentNode}}else{if(e!==a){c.push(e)}if(e.firstChild){e._added=true;e=e.firstChild}else{e=e.nextSibling||e.parentNode}}}return c},isVisible:function(b){var a=b.parentNode;if(!this.getRecursive()&&a!==this.getNode()){return false}while(a){if(!a.isExpanded()){return false}if(a===this.getNode()){break}a=a.parentNode}return true}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.NodeStore",alias:"store.tree",config:{root:undefined,clearOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",recursive:true},applyProxy:function(){return Ext.data.Store.prototype.applyProxy.apply(this,arguments)},applyRoot:function(a){var b=this;a=a||{};a=Ext.apply({},a);if(!a.isModel){Ext.applyIf(a,{id:b.getStoreId()+"-"+b.getDefaultRootId(),text:"Root",allowDrag:false});a=Ext.data.ModelManager.create(a,b.getModel())}Ext.data.NodeInterface.decorate(a);a.set(a.raw);return a},handleTreeInsertionIndex:function(a,b,d,c){if(b.parentNode){b.parentNode.sort(d.getSortFn(),true,true)}return this.callParent(arguments)},handleTreeSort:function(a,b){if(this._sorting){return a}this._sorting=true;this.getNode().sort(b.getSortFn(),true,true);delete this._sorting;return this.callParent(arguments)},updateRoot:function(a,b){if(b){b.unBefore({expand:"onNodeBeforeExpand",scope:this});b.unjoin(this)}a.onBefore({expand:"onNodeBeforeExpand",scope:this});this.onNodeAppend(null,a);this.setNode(a);if(!a.isLoaded()&&!a.isLoading()&&a.isExpanded()){this.load({node:a})}this.fireEvent("rootchange",this,a,b)},getNodeById:function(a){return this.data.getByKey(a)},onNodeBeforeExpand:function(b,a,c){if(b.isLoading()){c.pause();this.on("load",function(){c.resume()},this,{single:true})}else{if(!b.isLoaded()){c.pause();this.load({node:b,callback:function(){c.resume()}})}}},onNodeAppend:function(n,c){var l=this.getProxy(),j=l.getReader(),b=this.getModel(),g=c.raw,d=[],a=j.getRootProperty(),m,h,f,k,e;if(!c.isLeaf()){m=j.getRoot(g);if(m){h=j.extractData(m);for(f=0,k=h.length;fa)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){if(b===undefined||b===null){b=""}return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.identifier.Sequential",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.sequential",config:{prefix:"",seed:1},constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.getPrefix(),""]},generate:function(b){var c=this,d=c.parts,a=c.getSeed()+1;c.setSeed(a);d[1]=a;return d.join("")}});Ext.define("Ext.data.identifier.Uuid",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.uuid",isUnique:true,config:{id:undefined,salt:null,timestamp:null,version:4},applyId:function(a){if(a===undefined){return Ext.data.identifier.Uuid.Global}return a},constructor:function(){var a=this;a.callParent(arguments);a.parts=[];a.init()},reconfigure:function(a){this.setConfig(a);this.init()},generate:function(){var c=this,e=c.parts,a=c.getVersion(),b=c.getSalt(),d=c.getTimestamp();e[0]=c.toHex(d.lo,8);e[1]=c.toHex(d.hi&65535,4);e[2]=c.toHex(((d.hi>>>16)&4095)|(a<<12),4);e[3]=c.toHex(128|((c.clockSeq>>>8)&63),2)+c.toHex(c.clockSeq&255,2);e[4]=c.toHex(b.hi,4)+c.toHex(b.lo,8);if(a==4){c.init()}else{++d.lo;if(d.lo>=c.twoPow32){d.lo=0;++d.hi}}return e.join("-").toLowerCase()},init:function(){var b=this,a=b.getSalt(),c=b.getTimestamp();if(b.getVersion()==4){b.clockSeq=b.rand(0,b.twoPow14-1);if(!a){a={};b.setSalt(a)}if(!c){c={};b.setTimestamp(c)}a.lo=b.rand(0,b.twoPow32-1);a.hi=b.rand(0,b.twoPow16-1);c.lo=b.rand(0,b.twoPow32-1);c.hi=b.rand(0,b.twoPow28-1)}else{b.setSalt(b.split(b.getSalt()));b.setTimestamp(b.split(b.getTimestamp()));b.getSalt().hi|=256}},twoPow14:Math.pow(2,14),twoPow16:Math.pow(2,16),twoPow28:Math.pow(2,28),twoPow32:Math.pow(2,32),toHex:function(c,b){var a=c.toString(16);if(a.length>b){a=a.substring(a.length-b)}else{if(a.length")}for(;c");for(j in k){if(k.hasOwnProperty(j)){d.push("<",j,">",k[j],"")}}d.push("")}if(h){d.push("")}a.setXmlData(d.join(""));return a}});Ext.define("Ext.dataview.IndexBar",{extend:"Ext.Component",alternateClassName:"Ext.IndexBar",config:{baseCls:Ext.baseCSSPrefix+"indexbar",direction:"vertical",letters:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ui:"alphabet",listPrefix:null},itemCls:Ext.baseCSSPrefix+"",updateDirection:function(a,c){var b=this.getBaseCls();this.element.replaceCls(b+"-"+c,b+"-"+a)},getElementConfig:function(){return{reference:"wrapper",classList:["x-centered","x-indexbar-wrapper"],children:[this.callParent()]}},updateLetters:function(c){this.innerElement.setHtml("");if(c){var b=c.length,a;for(a=0;ad.bottom||a.yd.right||a.xb[a-1]){return a-1}while(f+1>1,e=b[c];if(e==d){return c}else{if(e0){a.givenSize=b;a.refresh()}},onResize:function(){var d=this,a=d.container,c=a.element,b=d.getItemMap().getMinimumHeight(),e;if(!d.listItems.length){d.bind(a.getScrollable().getScroller().getTranslatable(),"doTranslate","onTranslate")}d.containerSize=e=c.getHeight();d.setItemsCount(Math.ceil(e/b)+1)},scrollDockHeightRefresh:function(){var a=this.listItems,e=this.scrollDockItems,d=a.length,b,c;for(b=0;b=0){d=-10000}else{if(v<0){d=v}else{d=Math.max(0,l)}}this.headerTranslateFn(e,d,k)}}c[1]=(u.map[a]||0)+l;if(s!==a&&a<=p){if(s>a){w=Math.min(j,s-a);for(t=w-1;t>=0;t--){B=q.pop();q.unshift(B);C.updateListItem(B,t+a,A)}}else{w=Math.min(j,a-s);for(t=0;t0){var a=this.scheduledTasks.shift();this.doUpdateListItem(a.item,a.index,a.info);if(this.scheduledTasks.length===0&&this.getVariableHeights()&&!this.container.getScrollable().getScroller().getTranslatable().isAnimating){this.refreshScroller()}else{if(this.scheduledTasks.length>0){this.intervalId=requestAnimationFrame(Ext.Function.bind(this.taskRunner,this))}}}},scheduledTasks:null,replaceItemContent:function(d,b,e){var a=this.container.getScrollable().getScroller().getTranslatable();if(Ext.os.is.Android4&&!Ext.browser.is.Chrome&&!e.variableHeights&&!e.grouped&&a.isAnimating&&a.activeEasingY&&Math.abs(a.activeEasingY._startVelocity)>0.75){if(!this.scheduledTasks){this.scheduledTasks=[]}for(var c=0;c=f.topItemIndex&&ds){g=e;break}else{g=e}}if(h&&g){c=b.indexOf(g.children[0]);o.stopAnimation();var l=o.getContainerSize().y,j=o.getSize().y,d=j-l,n=r.getItemMap().map[c],a=(n>d)?d:n;o.scrollTo(0,a);if(this.updatedItems.length>0&&(!this.scheduledTasks||this.scheduledTasks.length===0)){this.refreshScroller()}}},applyOnItemDisclosure:function(a){if(Ext.isFunction(a)){return{scope:this,handler:a}}return a},handleItemDisclosure:function(f){var d=this,c=Ext.getCmp(Ext.get(f.getTarget()).up(".x-list-item").id),b=c.dataIndex,a=d.getStore().getAt(b);d.fireAction("disclose",[d,a,c,b,f],"doDisclose")},doDisclose:function(f,a,d,c,g){var b=f.getOnItemDisclosure();if(b&&b.handler){b.handler.call(b.scope||f,a,d,c,g)}},updateItemCls:function(f,c){var a=this.listItems,e=a.length,b,d;for(b=0;b class="x-list-item-leaf">'+a.getItemTextTpl(b)+""},this.getListConfig())}},function(){});Ext.define("Ext.dataview.element.List",{extend:"Ext.dataview.element.Container",updateBaseCls:function(a){var b=this;b.itemClsShortCache=a+"-item";b.headerClsShortCache=a+"-header";b.headerClsCache="."+b.headerClsShortCache;b.headerItemClsShortCache=a+"-header-item";b.footerClsShortCache=a+"-footer-item";b.footerClsCache="."+b.footerClsShortCache;b.labelClsShortCache=a+"-item-label";b.labelClsCache="."+b.labelClsShortCache;b.disclosureClsShortCache=a+"-disclosure";b.disclosureClsCache="."+b.disclosureClsShortCache;b.iconClsShortCache=a+"-icon";b.iconClsCache="."+b.iconClsShortCache;this.callParent(arguments)},hiddenDisplayCache:Ext.baseCSSPrefix+"hidden-display",getItemElementConfig:function(e,h){var f=this,c=f.dataview,g=c.getItemCls(),b=f.itemClsShortCache,d,a;if(g){b+=" "+g}d={cls:b,children:[{cls:f.labelClsShortCache,html:c.getItemTpl().apply(h)}]};if(c.getIcon()){a=h.iconSrc;d.children.push({cls:f.iconClsShortCache,style:"background-image: "+a?'url("'+newSrc+'")':""})}if(c.getOnItemDisclosure()){d.children.push({cls:f.disclosureClsShortCache+" "+((h[c.getDisclosureProperty()]===false)?f.hiddenDisplayCache:"")})}return d},updateListItem:function(d,k){var h=this,e=h.dataview,j=Ext.fly(k),g=j.down(h.labelClsCache,true),c=e.prepareData(d.getData(true),e.getStore().indexOf(d),d),b=e.getDisclosureProperty(),a=c&&c.hasOwnProperty(b),l=c&&c.hasOwnProperty("iconSrc"),f,i;g.innerHTML=e.getItemTpl().apply(c);if(a){f=j.down(h.disclosureClsCache);f[c[b]===false?"addCls":"removeCls"](h.hiddenDisplayCache)}if(e.getIcon()){i=j.down(h.iconClsCache,true);i.style.backgroundImage=l?'url("'+l+'")':""}},doRemoveHeaders:function(){var e=this,a=e.headerItemClsShortCache,b=e.element.query(e.headerClsCache),f=b.length,c=0,d;for(;cg-1){c=0}this.sampleIndex=c}});Ext.define("Ext.device.Camera",{singleton:true,requires:["Ext.device.Communicator","Ext.device.camera.PhoneGap","Ext.device.camera.Sencha","Ext.device.camera.Simulator"],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.PhoneGap){return Ext.create("Ext.device.camera.PhoneGap")}else{return Ext.create("Ext.device.camera.Sencha")}}else{return Ext.create("Ext.device.camera.Simulator")}}});Ext.define("Ext.device.connection.Abstract",{extend:"Ext.Evented",config:{online:false,type:null},UNKNOWN:"Unknown connection",ETHERNET:"Ethernet connection",WIFI:"WiFi connection",CELL_2G:"Cell 2G connection",CELL_3G:"Cell 3G connection",CELL_4G:"Cell 4G connection",NONE:"No network connection",isOnline:function(){return this.getOnline()}});Ext.define("Ext.device.connection.Sencha",{extend:"Ext.device.connection.Abstract",initialize:function(){Ext.device.Communicator.send({command:"Connection#watch",callbacks:{callback:this.onConnectionChange},scope:this})},onConnectionChange:function(a){this.setOnline(Boolean(a.online));this.setType(this[a.type]);this.fireEvent("onlinechange",this.getOnline(),this.getType())}});Ext.define("Ext.device.connection.PhoneGap",{extend:"Ext.device.connection.Abstract",syncOnline:function(){var a=navigator.network.connection.type;this._type=a;this._online=a!=Connection.NONE},getOnline:function(){this.syncOnline();return this._online},getType:function(){this.syncOnline();return this._type}});Ext.define("Ext.device.connection.Simulator",{extend:"Ext.device.connection.Abstract",getOnline:function(){this._online=navigator.onLine;this._type=Ext.device.Connection.UNKNOWN;return this._online}});Ext.define("Ext.device.Connection",{singleton:true,requires:["Ext.device.Communicator","Ext.device.connection.Sencha","Ext.device.connection.PhoneGap","Ext.device.connection.Simulator"],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.PhoneGap){return Ext.create("Ext.device.connection.PhoneGap")}else{return Ext.create("Ext.device.connection.Sencha")}}else{return Ext.create("Ext.device.connection.Simulator")}}});Ext.define("Ext.device.contacts.Abstract",{extend:"Ext.Evented",config:{includeImages:false},getContacts:function(a){if(!this._store){this._store=[{first:"Robert",last:"Dougan",emails:{work:"rob@sencha.com"}},{first:"Jamie",last:"Avins",emails:{work:"jamie@sencha.com"}}]}a.success.call(a.scope||this,this._store)},getThumbnail:function(a){a.callback.call(a.scope||this,"")},getLocalizedLabel:function(a){a.callback.call(a.scope||this,a.label.toUpperCase(),a.label)}});Ext.define("Ext.device.contacts.Sencha",{extend:"Ext.device.contacts.Abstract",getContacts:function(a){var b=this.getIncludeImages();if(typeof a.includeImages!="undefined"){b=a.includeImages}if(!a){Ext.Logger.warn("Ext.device.Contacts#getContacts: You must specify a `config` object.");return false}if(!a.success){Ext.Logger.warn("Ext.device.Contacts#getContacts: You must specify a `success` method.");return false}Ext.device.Communicator.send({command:"Contacts#all",callbacks:{success:function(c){a.success.call(a.scope||this,c)},failure:function(){if(a.failure){a.failure.call(a.scope||this)}}},includeImages:b,scope:this})},getThumbnail:function(a){if(!a||typeof a.id=="undefined"){Ext.Logger.warn("Ext.device.Contacts#getThumbnail: You must specify an `id` of the contact.");return false}if(!a||!a.callback){Ext.Logger.warn("Ext.device.Contacts#getThumbnail: You must specify a `callback`.");return false}Ext.device.Communicator.send({command:"Contacts#getThumbnail",callbacks:{success:function(b){this.set("thumbnail",b);if(a.callback){a.callback.call(a.scope||this,this)}}},id:id,scope:this})},getLocalizedLabel:function(a){if(!a||typeof a.label=="undefined"){Ext.Logger.warn("Ext.device.Contacts#getLocalizedLabel: You must specify an `label` to be localized.");return false}if(!a||!a.callback){Ext.Logger.warn("Ext.device.Contacts#getLocalizedLabel: You must specify a `callback`.");return false}Ext.device.Communicator.send({command:"Contacts#getLocalizedLabel",callbacks:{callback:function(b){a.callback.call(a.scope||this,b,a.label)}},label:a.label,scope:this})}});Ext.define("Ext.device.Contacts",{singleton:true,requires:["Ext.device.Communicator","Ext.device.contacts.Sencha"],constructor:function(){var a=Ext.browser.is;if(a.WebView&&!a.PhoneGap){return Ext.create("Ext.device.contacts.Sencha")}else{return Ext.create("Ext.device.contacts.Abstract")}}});Ext.define("Ext.device.device.Abstract",{extend:"Ext.EventedBase",name:"not available",uuid:"anonymous",platform:Ext.os.name,scheme:false,openURL:function(a){window.location=a}});Ext.define("Ext.device.device.PhoneGap",{extend:"Ext.device.device.Abstract",constructor:function(){if(Ext.Viewport.isReady){this.onReady()}else{Ext.Viewport.on("ready",this.onReady,this,{single:true})}},onReady:function(){this.name=device.name;this.uuid=device.uuid;this.platform=device.platformName||Ext.os.name}});Ext.define("Ext.device.device.Sencha",{extend:"Ext.device.device.Abstract",constructor:function(){this.name=device.name;this.uuid=device.uuid;this.platform=device.platformName||Ext.os.name;this.initURL()},openURL:function(a){Ext.device.Communicator.send({command:"OpenURL#open",url:a})},initURL:function(){Ext.device.Communicator.send({command:"OpenURL#watch",callbacks:{callback:this.updateURL},scope:this})},updateURL:function(){this.scheme=device.scheme||false;this.fireEvent("schemeupdate",this,this.scheme)}});Ext.define("Ext.device.device.Simulator",{extend:"Ext.device.device.Abstract"});Ext.define("Ext.device.Device",{singleton:true,requires:["Ext.device.Communicator","Ext.device.device.PhoneGap","Ext.device.device.Sencha","Ext.device.device.Simulator"],constructor:function(){var a=Ext.browser.is;if(a.WebView){if(a.PhoneGap){return Ext.create("Ext.device.device.PhoneGap")}else{return Ext.create("Ext.device.device.Sencha")}}else{return Ext.create("Ext.device.device.Simulator")}}});Ext.define("Ext.device.geolocation.Abstract",{config:{maximumAge:0,frequency:10000,allowHighAccuracy:false,timeout:Infinity},getCurrentPosition:function(b){var a=Ext.device.geolocation.Abstract.prototype.config;b=Ext.applyIf(b,{maximumAge:a.maximumAge,frequency:a.frequency,allowHighAccuracy:a.allowHighAccuracy,timeout:a.timeout});return b},watchPosition:function(b){var a=Ext.device.geolocation.Abstract.prototype.config;b=Ext.applyIf(b,{maximumAge:a.maximumAge,frequency:a.frequency,allowHighAccuracy:a.allowHighAccuracy,timeout:a.timeout});return b},clearWatch:function(){}});Ext.define("Ext.device.geolocation.Sencha",{extend:"Ext.device.geolocation.Abstract",getCurrentPosition:function(a){a=this.callParent([a]);Ext.apply(a,{command:"Geolocation#getCurrentPosition",callbacks:{success:a.success,failure:a.failure}});Ext.applyIf(a,{scope:this});delete a.success;delete a.failure;Ext.device.Communicator.send(a);return a},watchPosition:function(a){a=this.callParent([a]);Ext.apply(a,{command:"Geolocation#watchPosition",callbacks:{success:a.callback,failure:a.failure}});Ext.applyIf(a,{scope:this});delete a.callback;delete a.failure;Ext.device.Communicator.send(a);return a},clearWatch:function(){Ext.device.Communicator.send({command:"Geolocation#clearWatch"})}});Ext.define("Ext.device.geolocation.Simulator",{extend:"Ext.device.geolocation.Abstract",requires:["Ext.util.Geolocation"],getCurrentPosition:function(a){a=this.callParent([a]);Ext.apply(a,{autoUpdate:false,listeners:{scope:this,locationupdate:function(b){if(a.success){a.success.call(a.scope||this,b.position)}},locationerror:function(){if(a.failure){a.failure.call(a.scope||this)}}}});this.geolocation=Ext.create("Ext.util.Geolocation",a);this.geolocation.updateLocation();return a},watchPosition:function(a){a=this.callParent([a]);Ext.apply(a,{listeners:{scope:this,locationupdate:function(b){if(a.callback){a.callback.call(a.scope||this,b.position)}},locationerror:function(){if(a.failure){a.failure.call(a.scope||this)}}}});this.geolocation=Ext.create("Ext.util.Geolocation",a);return a},clearWatch:function(){if(this.geolocation){this.geolocation.destroy()}this.geolocation=null}});Ext.define("Ext.device.Geolocation",{singleton:true,requires:["Ext.device.Communicator","Ext.device.geolocation.Sencha","Ext.device.geolocation.Simulator"],constructor:function(){var a=Ext.browser.is;if(a.WebView&&a.Sencha){return Ext.create("Ext.device.geolocation.Sencha")}else{return Ext.create("Ext.device.geolocation.Simulator")}}});Ext.define("Ext.device.notification.Abstract",{show:function(a){if(!a.message){throw ("[Ext.device.Notification#show] You passed no message")}if(!a.buttons){a.buttons="OK"}if(!Ext.isArray(a.buttons)){a.buttons=[a.buttons]}if(!a.scope){a.scope=this}return a},vibrate:Ext.emptyFn});Ext.define("Ext.device.notification.PhoneGap",{extend:"Ext.device.notification.Abstract",requires:["Ext.device.Communicator"],show:function(){var c=this.callParent(arguments),f=(c.buttons)?c.buttons.join(","):null,a=function(g){if(c.callback){c.callback.apply(c.scope,(c.buttons)?[c.buttons[g-1]].toLowerCase():[])}};var e=butons.length;if(e&&typeof f[0]!="string"){var b=[],d;for(d=0;d0){if(a){for(c=0,d=a.length;c0){this.sendRequest(b==1?a[0]:a);this.callBuffer=[]}}});Ext.define("Ext.dom.CompositeElement",{alternateClassName:"Ext.CompositeElement",extend:"Ext.dom.CompositeElementLite",getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}},function(){Ext.dom.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)}});Ext.define("Ext.event.Event",{alternateClassName:"Ext.EventObject",isStopped:false,set:function(a,b){if(arguments.length===1&&typeof a!="string"){var c=a;for(a in c){if(c.hasOwnProperty(a)){this[a]=c[a]}}}else{this[a]=c[a]}},stopEvent:function(){return this.stopPropagation()},stopPropagation:function(){this.isStopped=true;return this}});Ext.define("Ext.event.Dom",{extend:"Ext.event.Event",constructor:function(a){var c=a.target,b;if(c&&c.nodeType!==1){c=c.parentNode}b=a.changedTouches;if(b){b=b[0];this.pageX=b.pageX;this.pageY=b.pageY}else{this.pageX=a.pageX;this.pageY=a.pageY}this.browserEvent=this.event=a;this.target=this.delegatedTarget=c;this.type=a.type;this.timeStamp=this.time=a.timeStamp;if(typeof this.time!="number"){this.time=new Date(this.time).getTime()}return this},stopEvent:function(){this.preventDefault();return this.callParent()},preventDefault:function(){this.browserEvent.preventDefault()},getPageX:function(){return this.browserEvent.pageX},getPageY:function(){return this.browserEvent.pageY},getXY:function(){if(!this.xy){this.xy=[this.getPageX(),this.getPageY()]}return this.xy},getTarget:function(b,c,a){if(arguments.length===0){return this.delegatedTarget}return b?Ext.fly(this.target).findParent(b,c,a):(a?Ext.get(this.target):this.target)},getTime:function(){return this.time},setDelegatedTarget:function(a){this.delegatedTarget=a},makeUnpreventable:function(){this.browserEvent.preventDefault=Ext.emptyFn}});Ext.define("Ext.event.Touch",{extend:"Ext.event.Dom",requires:["Ext.util.Point"],constructor:function(a,b){if(b){this.set(b)}this.touchesMap={};this.changedTouches=this.cloneTouches(a.changedTouches);this.touches=this.cloneTouches(a.touches);this.targetTouches=this.cloneTouches(a.targetTouches);return this.callParent([a])},clone:function(){return new this.self(this)},setTargets:function(a){this.doSetTargets(this.changedTouches,a);this.doSetTargets(this.touches,a);this.doSetTargets(this.targetTouches,a)},doSetTargets:function(f,d){var c,e,g,b,a;for(c=0,e=f.length;c(?:[\s]*)|(?:\s*))([\w\-]+)$/i,handledEvents:["*"],getSubscribers:function(b,a){var d=this.subscribers,c=d[b];if(!c&&a){c=d[b]={type:{$length:0},selector:[],$length:0}}return c},subscribe:function(g,f){if(this.idSelectorRegex.test(g)){return false}var e=g.match(this.optimizedSelectorRegex),a=this.getSubscribers(f,true),k=a.type,c=a.selector,d,i,j,b,h;if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=k[j];if(!b){k[j]=b={descendents:{$length:0},children:{$length:0},$length:0}}h=i?b.descendents:b.children;if(h.hasOwnProperty(d)){h[d]++;return true}h[d]=1;h.$length++;b.$length++;k.$length++}else{if(c.hasOwnProperty(g)){c[g]++;return true}c[g]=1;c.push(g)}a.$length++;return true},unsubscribe:function(g,f,k){var a=this.getSubscribers(f);if(!a){return false}var e=g.match(this.optimizedSelectorRegex),l=a.type,c=a.selector,d,i,j,b,h;k=Boolean(k);if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=l[j];if(!b){return true}h=i?b.descendents:b.children;if(!h.hasOwnProperty(d)||(!k&&--h[d]>0)){return true}delete h[d];h.$length--;b.$length--;l.$length--}else{if(!c.hasOwnProperty(g)||(!k&&--c[g]>0)){return true}delete c[g];Ext.Array.remove(c,g)}if(--a.$length===0){delete this.subscribers[f]}return true},notify:function(d,a){var c=this.getSubscribers(a),e,b;if(!c||c.$length===0){return false}e=d.substr(1);b=Ext.ComponentManager.get(e);if(b){this.dispatcher.doAddListener(this.targetType,d,a,"publish",this,{args:[a,b]},"before")}},matchesSelector:function(b,a){return Ext.ComponentQuery.is(b,a)},dispatch:function(d,b,c,a){this.dispatcher.doDispatchEvent(this.targetType,d,b,c,null,a)},publish:function(g,k){var e=this.getSubscribers(g);if(!e){return}var p=arguments[arguments.length-1],o=e.type,b=e.selector,d=Array.prototype.slice.call(arguments,2,-2),l=k.xtypesChain,s,n,t,a,m,v,r,u,h,f,q,c;for(u=0,h=l.length;u0){s=e.descendents;if(s.$length>0){if(!a){a=k.getAncestorIds()}for(q=0,c=a.length;q0){if(!t){if(a){t=a[0]}else{v=k.getParent();if(v){t=v.getId()}}}if(t){if(n.hasOwnProperty(t)){this.dispatch("#"+t+" > "+f,g,d,p)}}}}}h=b.length;if(h>0){for(u=0;u0)){return true}delete d[f];if(--d.$length===0){delete this.subscribers[a]}return true},onBeforeComponentRenderedChange:function(b,d,g){var f=this.eventNames,c=g?f.painted:f.erased,e=this.getSubscribers(c),a;if(e&&e.$length>0){this.renderedQueue[d.getId()]=a=[];this.publish(e,d,c,a)}},onBeforeComponentHiddenChange:function(c,d){var f=this.eventNames,b=d?f.erased:f.painted,e=this.getSubscribers(b),a;if(e&&e.$length>0){this.hiddenQueue[c.getId()]=a=[];this.publish(e,c,b,a)}},onComponentRenderedChange:function(b,c){var d=this.renderedQueue,e=c.getId(),a;if(!d.hasOwnProperty(e)){return}a=d[e];delete d[e];if(a.length>0){this.dispatchQueue(a)}},onComponentHiddenChange:function(c){var b=this.hiddenQueue,d=c.getId(),a;if(!b.hasOwnProperty(d)){return}a=b[d];delete b[d];if(a.length>0){this.dispatchQueue(a)}},dispatchQueue:function(g){var l=this.dispatcher,a=this.targetType,b=this.eventNames,e=g.slice(),f=e.length,c,k,h,d,j;g.length=0;if(f>0){for(c=0;c0)){return true}delete a[f];d[g][f].destroy();delete d[g][f];if(--a.$length===0){delete d[g];delete this.subscribers[g];i.removeListener(b,g,"painted","onComponentPainted",this,"before")}return true},onComponentPainted:function(b){var c=b.getObservableId(),a=this.sizeMonitors[c];if(a.resize){a.resize.refresh()}if(a.innerresize){a.innerresize.refresh()}},onComponentSizeChange:function(b,c,a){this.dispatcher.doDispatchEvent(this.targetType,c,a,[b])}});Ext.define("Ext.event.publisher.Dom",{extend:"Ext.event.publisher.Publisher",requires:["Ext.env.Browser","Ext.Element","Ext.event.Dom"],targetType:"element",idOrClassSelectorRegex:/^([#|\.])([\w\-]+)$/,handledEvents:["click","focus","blur","paste","input","mousemove","mousedown","mouseup","mouseover","mouseout","keyup","keydown","keypress","submit","transitionend","animationstart","animationend"],classNameSplitRegex:/\s+/,SELECTOR_ALL:"*",constructor:function(){var f=this.getHandledEvents(),e={},b,c,a,d;this.doBubbleEventsMap={click:true,submit:true,mousedown:true,mousemove:true,mouseup:true,mouseover:true,mouseout:true,transitionend:true};this.onEvent=Ext.Function.bind(this.onEvent,this);for(b=0,c=f.length;b0)){return true}delete c[i];c.$length--}else{if(!d.hasOwnProperty(i)||(!j&&--d[i]>0)){return true}delete d[i];d.$length--}}else{if(g===this.SELECTOR_ALL){if(j){a.all=0}else{a.all--}}else{if(!b.hasOwnProperty(g)||(!j&&--b[g]>0)){return true}delete b[g];Ext.Array.remove(b,g)}}a.$length--;return true},getElementTarget:function(a){if(a.nodeType!==1){a=a.parentNode;if(!a||a.nodeType!==1){return null}}return a},getBubblingTargets:function(b){var a=[];if(!b){return a}do{a[a.length]=b;b=b.parentNode}while(b&&b.nodeType===1);return a},dispatch:function(c,a,b){b.push(b[0].target);this.callParent(arguments)},publish:function(b,a,c){var d=this.getSubscribers(b),e;if(d.$length===0||!this.doPublish(d,b,a,c)){e=this.getSubscribers("*");if(e.$length>0){this.doPublish(e,b,a,c)}}return this},doPublish:function(f,h,x,u){var r=f.id,g=f.className,b=f.selector,p=r.$length>0,a=g.$length>0,l=b.length>0,o=f.all>0,y={},e=[u],q=false,m=this.classNameSplitRegex,v,k,t,d,z,n,c,w,s;for(v=0,k=x.length;v0)){return true}delete d[f];this.monitors[f].destroy();delete this.monitors[f];return true},onElementPainted:function(b,a){Ext.TaskQueue.requestRead("dispatch",this,[b,"painted",[a]])}});Ext.define("Ext.mixin.Templatable",{extend:"Ext.mixin.Mixin",mixinConfig:{id:"templatable"},referenceAttributeName:"reference",referenceSelector:"[reference]",getElementConfig:function(){return{reference:"element"}},getElementTemplate:function(){var a=document.createDocumentFragment();a.appendChild(Ext.Element.create(this.getElementConfig(),true));return a},initElement:function(){var a=this.self.prototype;a.elementTemplate=this.getElementTemplate();a.initElement=a.doInitElement;this.initElement.apply(this,arguments)},linkElement:function(a,b){this.link(a,b)},doInitElement:function(){var g=this.referenceAttributeName,c,d,e,f,b,a;c=this.elementTemplate.cloneNode(true);d=c.querySelectorAll(this.referenceSelector);for(e=0,f=d.length;e0){c.width=b;c.height=k;c.contentWidth=a;c.contentHeight=j;c.flag=g;e=true;this.getCallback().apply(this.getScope(),this.getArgs())}return e},refresh:function(a){if(this.refreshSize()||a){Ext.TaskQueue.requestWrite("refreshMonitors",this)}},destroy:function(){var a=this.getElement();this.bindListeners(false);if(a&&!a.isDestroyed){a.removeCls("x-size-monitored")}delete this._element;this.callSuper()}});Ext.define("Ext.util.sizemonitor.Scroll",{extend:"Ext.util.sizemonitor.Abstract",getElementConfig:function(){return{reference:"detectorsContainer",classList:["x-size-monitors","scroll"],children:[{reference:"expandMonitor",className:"expand"},{reference:"shrinkMonitor",className:"shrink"}]}},constructor:function(a){this.onScroll=Ext.Function.bind(this.onScroll,this);this.callSuper(arguments)},bindListeners:function(b){var a=b?"addEventListener":"removeEventListener";this.expandMonitor[a]("scroll",this.onScroll,true);this.shrinkMonitor[a]("scroll",this.onScroll,true)},forceRefresh:function(){Ext.TaskQueue.requestRead("refresh",this,[true])},onScroll:function(){Ext.TaskQueue.requestRead("refresh",this)},refreshMonitors:function(){var b=this.expandMonitor,c=this.shrinkMonitor,a=1000000;if(b&&!b.isDestroyed){b.scrollLeft=a;b.scrollTop=a}if(c&&!c.isDestroyed){c.scrollLeft=a;c.scrollTop=a}}});Ext.define("Ext.util.sizemonitor.OverflowChange",{extend:"Ext.util.sizemonitor.Abstract",constructor:function(a){this.onExpand=Ext.Function.bind(this.onExpand,this);this.onShrink=Ext.Function.bind(this.onShrink,this);this.callSuper(arguments)},getElementConfig:function(){return{reference:"detectorsContainer",classList:["x-size-monitors","overflowchanged"],children:[{reference:"expandMonitor",className:"expand",children:[{reference:"expandHelper"}]},{reference:"shrinkMonitor",className:"shrink",children:[{reference:"shrinkHelper"}]}]}},bindListeners:function(b){var a=b?"addEventListener":"removeEventListener";this.expandMonitor[a]("overflowchanged",this.onExpand,true);this.shrinkMonitor[a]("overflowchanged",this.onShrink,true)},onExpand:function(a){if(a.horizontalOverflow&&a.verticalOverflow){return}Ext.TaskQueue.requestRead("refresh",this)},onShrink:function(a){if(!a.horizontalOverflow&&!a.verticalOverflow){return}Ext.TaskQueue.requestRead("refresh",this)},refreshMonitors:function(){var d=this.expandHelper,c=this.shrinkHelper,b=this.contentWidth,a=this.contentHeight;if(d&&!d.isDestroyed){d.style.width=(b+1)+"px";d.style.height=(a+1)+"px"}if(c&&!c.isDestroyed){c.style.width=b+"px";c.style.height=a+"px"}Ext.TaskQueue.requestRead("refresh",this)}});Ext.define("Ext.util.SizeMonitor",{requires:["Ext.util.sizemonitor.Scroll","Ext.util.sizemonitor.OverflowChange"],constructor:function(a){if(Ext.browser.engineVersion.gtEq("535")){return new Ext.util.sizemonitor.OverflowChange(a)}else{return new Ext.util.sizemonitor.Scroll(a)}}});Ext.define("Ext.event.publisher.ElementSize",{extend:"Ext.event.publisher.Publisher",requires:["Ext.util.SizeMonitor"],targetType:"element",handledEvents:["resize"],constructor:function(){this.monitors={};this.callSuper(arguments)},subscribe:function(e){var b=e.match(this.idSelectorRegex),d=this.subscribers,f,c,a;if(!b){return false}f=b[1];if(d.hasOwnProperty(f)){d[f]++;return true}d[f]=1;c=Ext.get(f);this.monitors[f]=a=new Ext.util.SizeMonitor({element:c,callback:this.onElementResize,scope:this,args:[e,c]});this.dispatcher.addListener("element",e,"painted","forceRefresh",a);return true},unsubscribe:function(g,a,e){var c=g.match(this.idSelectorRegex),f=this.subscribers,d=this.monitors,h,b;if(!c){return false}h=c[1];if(!f.hasOwnProperty(h)||(!e&&--f[h]>0)){return true}delete f[h];b=d[h];this.dispatcher.removeListener("element",g,"painted","forceRefresh",b);b.destroy();delete d[h];return true},onElementResize:function(c,a,b){Ext.TaskQueue.requestRead("dispatch",this,[c,"resize",[a,b]])}});Ext.define("Ext.event.publisher.TouchGesture",{extend:"Ext.event.publisher.Dom",requires:["Ext.util.Point","Ext.event.Touch"],handledEvents:["touchstart","touchmove","touchend","touchcancel"],moveEventName:"touchmove",config:{moveThrottle:1,buffering:{enabled:false,interval:10},recognizers:{}},currentTouchesCount:0,constructor:function(a){this.processEvents=Ext.Function.bind(this.processEvents,this);this.eventProcessors={touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd};this.eventToRecognizerMap={};this.activeRecognizers=[];this.currentRecognizers=[];this.currentTargets={};this.currentTouches={};this.buffer=[];this.initConfig(a);return this.callParent()},applyBuffering:function(a){if(a.enabled===true){this.bufferTimer=setInterval(this.processEvents,a.interval)}else{clearInterval(this.bufferTimer)}return a},applyRecognizers:function(b){var c,a;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(a){this.registerRecognizer(a)}}}return b},handles:function(a){return this.callParent(arguments)||this.eventToRecognizerMap.hasOwnProperty(a)},doesEventBubble:function(){return true},eventLogs:[],onEvent:function(b){var a=this.getBuffering();b=new Ext.event.Touch(b);if(a.enabled){this.buffer.push(b)}else{this.processEvent(b)}},processEvents:function(){var a=this.buffer,f=a.length,d=[],c,e,b;if(f>0){c=a.slice(0);a.length=0;for(b=0;b0){this.processEvent(this.mergeEvents(d));d.length=0}this.processEvent(e)}}if(d.length>0){this.processEvent(this.mergeEvents(d));d.length=0}}},mergeEvents:function(c){var b=[],f=c.length,a,e,d;d=c[f-1];if(f===1){return d}for(a=0;ag){for(d=0;dg){return}}for(d=0;d1){return this.fail(this.self.NOT_SINGLE_TOUCH)}}});Ext.define("Ext.event.recognizer.DoubleTap",{extend:"Ext.event.recognizer.SingleTouch",inheritableStatics:{DIFFERENT_TARGET:3},config:{maxDuration:300},handledEvents:["singletap","doubletap"],singleTapTimer:null,startTime:0,lastTapTime:0,onTouchStart:function(a){if(this.callParent(arguments)===false){return false}this.startTime=a.time;clearTimeout(this.singleTapTimer)},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onEnd:function(g){var i=this,d=this.getMaxDuration(),f=g.changedTouches[0],a=g.time,h=g.target,j=this.lastTapTime,b=this.lastTarget,c;this.lastTapTime=a;this.lastTarget=h;if(j){c=a-j;if(c<=d){if(h!==b){return this.fail(this.self.DIFFERENT_TARGET)}this.lastTarget=null;this.lastTapTime=0;this.fire("doubletap",g,[f],{touch:f,duration:c});return}}if(a-this.startTime>d){this.fireSingleTap(g,f)}else{this.singleTapTimer=setTimeout(function(){i.fireSingleTap(g,f)},d)}},fireSingleTap:function(a,b){this.fire("singletap",a,[b],{touch:b})}});Ext.define("Ext.event.recognizer.Drag",{extend:"Ext.event.recognizer.SingleTouch",isStarted:false,startPoint:null,previousPoint:null,lastPoint:null,handledEvents:["dragstart","drag","dragend"],onTouchStart:function(b){var c,a;if(this.callParent(arguments)===false){if(this.isStarted&&this.lastMoveEvent!==null){this.onTouchEnd(this.lastMoveEvent)}return false}this.startTouches=c=b.changedTouches;this.startTouch=a=c[0];this.startPoint=a.point},onTouchMove:function(d){var c=d.changedTouches,f=c[0],a=f.point,b=d.time;if(this.lastPoint){this.previousPoint=this.lastPoint}if(this.lastTime){this.previousTime=this.lastTime}this.lastTime=b;this.lastPoint=a;this.lastMoveEvent=d;if(!this.isStarted){this.isStarted=true;this.startTime=b;this.previousTime=b;this.previousPoint=this.startPoint;this.fire("dragstart",d,this.startTouches,this.getInfo(d,this.startTouch))}else{this.fire("drag",d,c,this.getInfo(d,f))}},onTouchEnd:function(c){if(this.isStarted){var b=c.changedTouches,d=b[0],a=d.point;this.isStarted=false;this.lastPoint=a;this.fire("dragend",c,b,this.getInfo(c,d));this.startTime=0;this.previousTime=0;this.lastTime=0;this.startPoint=null;this.previousPoint=null;this.lastPoint=null;this.lastMoveEvent=null}},getInfo:function(j,i){var d=j.time,a=this.startPoint,f=this.previousPoint,b=this.startTime,k=this.previousTime,l=this.lastPoint,h=l.x-a.x,g=l.y-a.y,c={touch:i,startX:a.x,startY:a.y,previousX:f.x,previousY:f.y,pageX:l.x,pageY:l.y,deltaX:h,deltaY:g,absDeltaX:Math.abs(h),absDeltaY:Math.abs(g),previousDeltaX:l.x-f.x,previousDeltaY:l.y-f.y,time:d,startTime:b,previousTime:k,deltaTime:d-b,previousDeltaTime:d-k};return c}});Ext.define("Ext.event.recognizer.Swipe",{extend:"Ext.event.recognizer.SingleTouch",handledEvents:["swipe"],inheritableStatics:{MAX_OFFSET_EXCEEDED:16,MAX_DURATION_EXCEEDED:17,DISTANCE_NOT_ENOUGH:18},config:{minDistance:80,maxOffset:35,maxDuration:1000},onTouchStart:function(a){if(this.callParent(arguments)===false){return false}var b=a.changedTouches[0];this.startTime=a.time;this.isHorizontal=true;this.isVertical=true;this.startX=b.pageX;this.startY=b.pageY},onTouchMove:function(f){var h=f.changedTouches[0],b=h.pageX,g=h.pageY,c=Math.abs(b-this.startX),a=Math.abs(g-this.startY),d=f.time;if(d-this.startTime>this.getMaxDuration()){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(this.isVertical&&c>this.getMaxOffset()){this.isVertical=false}if(this.isHorizontal&&a>this.getMaxOffset()){this.isHorizontal=false}if(!this.isHorizontal&&!this.isVertical){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(i){if(this.onTouchMove(i)===false){return false}var h=i.changedTouches[0],l=h.pageX,j=h.pageY,g=l-this.startX,f=j-this.startY,c=Math.abs(g),b=Math.abs(f),m=this.getMinDistance(),d=i.time-this.startTime,k,a;if(this.isVertical&&bc){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(a>b){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(f){if(this.onTouchMove(f)!==false){var i=f.changedTouches[0],a=i.pageX,b=a-this.startX,h=Math.abs(b),d=f.time-this.startTime,g=this.getMinDistance(),c;if(ha){this.end(d)}}},onTouchEnd:function(a){this.end(a)},start:function(){if(!this.isTracking){this.isTracking=true;this.isStarted=false}},end:function(a){if(this.isTracking){this.isTracking=false;if(this.isStarted){this.isStarted=false;this.fireEnd(a)}}}});Ext.define("Ext.event.recognizer.Pinch",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["pinchstart","pinch","pinchend"],startDistance:0,lastTouches:null,onTouchMove:function(c){if(!this.isTracking){return}var b=Array.prototype.slice.call(c.touches),d,a,f;d=b[0].point;a=b[1].point;f=d.getDistanceTo(a);if(f===0){return}if(!this.isStarted){this.isStarted=true;this.startDistance=f;this.fire("pinchstart",c,b,{touches:b,distance:f,scale:1})}else{this.fire("pinch",c,b,{touches:b,distance:f,scale:f/this.startDistance})}this.lastTouches=b},fireEnd:function(a){this.fire("pinchend",a,this.lastTouches)},fail:function(){return this.callParent(arguments)}});Ext.define("Ext.event.recognizer.Rotate",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["rotatestart","rotate","rotateend"],startAngle:0,lastTouches:null,lastAngle:null,onTouchMove:function(h){if(!this.isTracking){return}var g=Array.prototype.slice.call(h.touches),b=this.lastAngle,d,f,c,a,i,j;d=g[0].point;f=g[1].point;c=d.getAngleTo(f);if(b!==null){j=Math.abs(b-c);a=c+360;i=c-360;if(Math.abs(a-b)d){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(b>c){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(d){if(this.onTouchMove(d)!==false){var i=d.changedTouches[0],h=i.pageY,a=h-this.startY,g=Math.abs(a),c=d.time-this.startTime,f=this.getMinDistance(),b;if(g'+Ext.baseCSSPrefix+'picker-invalid">{'+a+"}")},updateAlign:function(a,c){var b=this.element;b.addCls(Ext.baseCSSPrefix+"picker-"+a);b.removeCls(Ext.baseCSSPrefix+"picker-"+c)},applyData:function(d){var f=[],c=d&&d.length,a,b,e;if(d&&Ext.isArray(d)&&c){for(a=0;a0){c[0].addCls(b+"first");c[c.length-1].addCls(b+"last")}this.updateUseTitles(this.getUseTitles())},onDoneButtonTap:function(){var a=this._value,b=this.getValue(true);if(b!=a){this.fireEvent("change",this,b)}this.hide()},onCancelButtonTap:function(){this.fireEvent("cancel",this);this.hide()},onSlotPick:function(a){this.fireEvent("pick",this,this.getValue(true),a)},onShow:function(){if(!this.isHidden()){this.setValue(this._value)}},setValue:function(k,a){var f=this,d=f.getInnerItems(),e=d.length,j,h,c,b,g;if(!k){k={};for(b=0;b slot",slotpick:this.onSlotPick});this.on({scope:this,show:this.onSlotPick})},setValue:function(b,a){if(Ext.isDate(b)){b={day:b.getDate(),month:b.getMonth()+1,year:b.getFullYear()}}this.callParent([b,a])},getValue:function(k){var h={},e=this.getItems().items,d=e.length,a,g,c,f,j,b;for(b=0;be,j,d,a;while(m){f.push({text:m,value:m});if(m===e){break}if(h){m--}else{m++}}a=k.getDaysInMonth(1,new Date().getFullYear());for(d=0;d{'+this.getDisplayField()+":htmlEncode}",listeners:{select:this.onListSelect,itemtap:this.onListTap,scope:this}}},a))}return this.listPanel},onMaskTap:function(){if(this.getDisabled()){return false}this.onFocus();return false},showPicker:function(){var b=this.getStore();if(!b||b.getCount()===0){return}if(this.getReadOnly()){return}this.isFocused=true;if(this.getUsePicker()){var e=this.getPhonePicker(),d=this.getName(),h={};h[d]=this.getValue();e.setValue(h);if(!e.getParent()){Ext.Viewport.add(e)}e.show()}else{var f=this.getTabletPicker(),g=f.down("list"),c,a;b=g.getStore();c=b.find(this.getValueField(),this.getValue(),null,null,null,true);a=b.getAt((c==-1)?0:c);if(!f.getParent()){Ext.Viewport.add(f)}f.showBy(this.getComponent());g.select(a,null,true)}},onListSelect:function(c,a){var b=this;if(a){b.setValue(a)}},onListTap:function(){this.listPanel.hide({type:"fade",out:true,scope:this})},onPickerChange:function(d,f){var e=this,g=f[e.getName()],b=e.getStore(),c=b.find(e.getValueField(),g,null,null,null,true),a=b.getAt(c);e.setValue(a)},onChange:function(f,h,e){var g=this,b=g.getStore(),d=(b)?b.find(g.getDisplayField(),e):-1,c=g.getValueField(),a=(b)?b.getAt(d):null;e=(a)?a.get(c):null;g.fireEvent("change",g,g.getValue(),e)},updateOptions:function(b){var a=this.getStore();if(!a){this.setStore(true);a=this._store}if(!b){a.clearData()}else{a.setData(b);this.onStoreDataChanged(a)}return this},applyStore:function(a){if(a===true){a=Ext.create("Ext.data.Store",{fields:[this.getValueField(),this.getDisplayField()],autoDestroy:true})}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:this,addrecords:"onStoreDataChanged",removerecords:"onStoreDataChanged",updaterecord:"onStoreDataChanged",refresh:"onStoreDataChanged"})}return a},updateStore:function(a){if(a){this.onStoreDataChanged(a)}if(this.getUsePicker()&&this.picker){this.picker.down("pickerslot").setStore(a)}else{if(this.listPanel){this.listPanel.down("dataview").setStore(a)}}},onStoreDataChanged:function(a){var c=this.getInitialConfig(),b=this.getValue();if(b||b==0){this.updateValue(this.applyValue(b))}if(this.getValue()===null){if(c.hasOwnProperty("value")){this.setValue(c.value)}if(this.getValue()===null&&this.getAutoSelect()){if(a.getCount()>0){this.setValue(a.getAt(0))}}}},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){var b=this.getStore(),a=(this.originalValue)?this.originalValue:b.getAt(0);if(b&&a){this.setValue(a)}return this},onFocus:function(b){var a=this.getComponent();this.fireEvent("focus",this,b);if(Ext.os.is.Android4){a.input.dom.focus()}a.input.dom.blur();this.isFocused=true;this.showPicker()},destroy:function(){this.callParent(arguments);var a=this.getStore();if(a&&a.getAutoDestroy()){Ext.destroy(a)}}});Ext.define("Ext.slider.Thumb",{extend:"Ext.Component",xtype:"thumb",config:{baseCls:Ext.baseCSSPrefix+"thumb",draggable:{direction:"horizontal"}},elementWidth:0,initialize:function(){this.callParent();this.getDraggable().onBefore({dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",scope:this});this.element.on("resize","onElementResize",this)},onDragStart:function(){if(this.isDisabled()){return false}this.relayEvent(arguments)},onDrag:function(){if(this.isDisabled()){return false}this.relayEvent(arguments)},onDragEnd:function(){if(this.isDisabled()){return false}this.relayEvent(arguments)},onElementResize:function(a,b){this.elementWidth=b.width},getElementWidth:function(){return this.elementWidth}});Ext.define("Ext.slider.Slider",{extend:"Ext.Container",xtype:"slider",requires:["Ext.slider.Thumb","Ext.fx.easing.EaseOut"],config:{baseCls:"x-slider",thumbConfig:{draggable:{translatable:{easingX:{duration:300,type:"ease-out"}}}},increment:1,value:0,minValue:0,maxValue:100,allowThumbsOverlapping:false,animation:true,readOnly:false},elementWidth:0,offsetValueRatio:0,activeThumb:null,constructor:function(a){a=a||{};if(a.hasOwnProperty("values")){a.value=a.values}this.callParent([a])},initialize:function(){var a=this.element;this.callParent();a.on({scope:this,tap:"onTap",resize:"onResize"});this.on({scope:this,delegate:"> thumb",dragstart:"onThumbDragStart",drag:"onThumbDrag",dragend:"onThumbDragEnd"})},factoryThumb:function(){return Ext.factory(this.getThumbConfig(),Ext.slider.Thumb)},getThumbs:function(){return this.innerItems},getThumb:function(a){if(typeof a!="number"){a=0}return this.innerItems[a]},refreshOffsetValueRatio:function(){var b=this.getMaxValue()-this.getMinValue(),a=this.elementWidth-this.thumbWidth;this.offsetValueRatio=a/b},onResize:function(b,c){var a=this.getThumb(0);if(a){this.thumbWidth=a.getElementWidth()}this.elementWidth=c.width;this.refresh()},refresh:function(){this.refreshValue()},setActiveThumb:function(b){var a=this.activeThumb;if(a&&a!==b){a.setZIndex(null)}this.activeThumb=b;b.setZIndex(2);return this},onThumbDragStart:function(a,b){if(b.absDeltaX<=b.absDeltaY||this.getReadOnly()){return false}else{b.stopPropagation()}if(this.getAllowThumbsOverlapping()){this.setActiveThumb(a)}this.dragStartValue=this.getValue()[this.getThumbIndex(a)];this.fireEvent("dragstart",this,a,this.dragStartValue,b)},onThumbDrag:function(c,g,a){var d=this.getThumbIndex(c),f=this.offsetValueRatio,b=this.constrainValue(this.getMinValue()+a/f);g.stopPropagation();this.setIndexValue(d,b);this.fireEvent("drag",this,c,this.getValue(),g);return false},setIndexValue:function(d,g,f){var c=this.getThumb(d),b=this.getValue(),e=this.offsetValueRatio,a=c.getDraggable();a.setOffset((g-this.getMinValue())*e,null,f);b[d]=g},onThumbDragEnd:function(a,f){this.refreshThumbConstraints(a);var c=this.getThumbIndex(a),d=this.getValue()[c],b=this.dragStartValue;this.fireEvent("dragend",this,a,this.getValue(),f);if(b!==d){this.fireEvent("change",this,a,d,b)}},getThumbIndex:function(a){return this.getThumbs().indexOf(a)},refreshThumbConstraints:function(d){var b=this.getAllowThumbsOverlapping(),a=d.getDraggable().getOffset().x,c=this.getThumbs(),e=this.getThumbIndex(d),g=c[e-1],h=c[e+1],f=this.thumbWidth;if(g){g.getDraggable().addExtraConstraint({max:{x:a-((b)?0:f)}})}if(h){h.getDraggable().addExtraConstraint({min:{x:a+((b)?0:f)}})}},onTap:function(j){if(this.isDisabled()){return}var k=Ext.get(j.target);if(!k||k.hasCls("x-thumb")){return}var n=j.touch.point.x,h=this.element,c=h.getX(),d=n-c-(this.thumbWidth/2),o=this.constrainValue(this.getMinValue()+d/this.offsetValueRatio),r=this.getValue(),q=Infinity,m=r.length,g,f,l,p,b,a;if(m===1){p=0}else{for(g=0;g=(a/2)){e+=(c>0)?a:-a}e=Math.max(d,e);e=Math.min(f,e);return e},setThumbsCount:function(e){var a=this.getThumbs(),f=a.length,c,d,b;if(f>e){for(c=0,d=f-e;cf){d=e}}c.setValue(d);d=c.getValue();c.fireEvent("spin",c,d,g);c.fireEvent("spin"+g,c,d)},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){this.setValue(this.getDefaultValue())},destroy:function(){var a=this;Ext.destroy(a.downRepeater,a.upRepeater,a.spinDownButton,a.spinUpButton);a.callParent(arguments)}},function(){});Ext.define("Ext.slider.Toggle",{extend:"Ext.slider.Slider",config:{baseCls:"x-toggle",minValueCls:"x-toggle-off",maxValueCls:"x-toggle-on"},initialize:function(){this.callParent();this.on({change:"onChange"})},applyMinValue:function(){return 0},applyMaxValue:function(){return 1},applyIncrement:function(){return 1},updateMinValueCls:function(c,b){var a=this.element;if(b&&a.hasCls(b)){a.replaceCls(b,c)}},updateMaxValueCls:function(c,b){var a=this.element;if(b&&a.hasCls(b)){a.replaceCls(b,c)}},setValue:function(b,a){this.callParent(arguments);this.onChange(this,this.getThumbs()[0],b,a)},onChange:function(d,a,f,c){var g=f>0,b=d.getMaxValueCls(),e=d.getMinValueCls();this.element.addCls(g?b:e);this.element.removeCls(g?e:b)},toggle:function(){var a=this.getValue();this.setValue((a==1)?0:1);return this},onTap:function(){if(this.isDisabled()||this.getReadOnly()){return}var b=this.getValue(),c=(b==1)?0:1,a=this.getThumb(0);this.setIndexValue(0,c,this.getAnimation());this.refreshThumbConstraints(a);this.fireEvent("change",this,a,c,b)}});Ext.define("Ext.field.Toggle",{extend:"Ext.field.Slider",xtype:"togglefield",alternateClassName:"Ext.form.Toggle",requires:["Ext.slider.Toggle"],config:{cls:"x-toggle-field"},proxyConfig:{minValueCls:"x-toggle-off",maxValueCls:"x-toggle-on"},applyComponent:function(a){return Ext.factory(a,Ext.slider.Toggle)},setValue:function(b){if(b===true){b=1}var a=this.getValue();if(a!=b){this.getComponent().setValue(b);this.fireEvent("change",this,b,a)}return this},getValue:function(){return(this.getComponent().getValue()==1)?1:0},toggle:function(){var a=this.getValue();this.setValue((a==1)?0:1);return this}});Ext.define("Ext.field.Url",{extend:"Ext.field.Text",xtype:"urlfield",alternateClassName:"Ext.form.Url",config:{autoCapitalize:false,component:{type:"url"}}});Ext.define("Ext.form.FieldSet",{extend:"Ext.Container",alias:"widget.fieldset",requires:["Ext.Title"],config:{baseCls:Ext.baseCSSPrefix+"form-fieldset",title:null,instructions:null},applyTitle:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"top",baseCls:this.getBaseCls()+"-title"});return Ext.factory(a,Ext.Title,this._title)},updateTitle:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}},getTitle:function(){var a=this._title;if(a&&a instanceof Ext.Title){return a.getTitle()}return a},applyInstructions:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"bottom",baseCls:this.getBaseCls()+"-instructions"});return Ext.factory(a,Ext.Title,this._instructions)},updateInstructions:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}},getInstructions:function(){var a=this._instructions;if(a&&a instanceof Ext.Title){return a.getTitle()}return a},doSetDisabled:function(a){this.getFieldsAsArray().forEach(function(b){b.setDisabled(a)});return this},getFieldsAsArray:function(){var a=[],b=function(c){if(c.isField){a.push(c)}if(c.isContainer){c.getItems().each(b)}};this.getItems().each(b);return a}});Ext.define("Ext.form.Panel",{alternateClassName:"Ext.form.FormPanel",extend:"Ext.Panel",xtype:"formpanel",requires:["Ext.XTemplate","Ext.field.Checkbox","Ext.Ajax"],config:{baseCls:Ext.baseCSSPrefix+"form",standardSubmit:false,url:null,baseParams:null,submitOnAction:false,record:null,method:"post",scrollable:{translatable:{translationMethod:"scrollposition"}}},getElementConfig:function(){var a=this.callParent();a.tag="form";return a},initialize:function(){var a=this;a.callParent();a.element.on({submit:"onSubmit",scope:a})},updateRecord:function(c){var a,b,d;if(c&&(a=c.fields)){b=this.getValues();for(d in b){if(b.hasOwnProperty(d)&&a.containsKey(d)){c.set(d,b[d])}}}return this},setRecord:function(a){var b=this;if(a&&a.data){b.setValues(a.data)}b._record=a;return this},onSubmit:function(b){var a=this;if(b&&!a.getStandardSubmit()){b.stopEvent()}else{this.submit()}},updateSubmitOnAction:function(a){if(a){this.on({action:"onFieldAction",scope:this})}else{this.un({action:"onFieldAction",scope:this})}},onFieldAction:function(a){if(this.getSubmitOnAction()){a.blur();this.submit()}},submit:function(a){var c=this,b=c.element.dom||{},d;a=Ext.apply({url:c.getUrl()||b.action,submit:false,method:c.getMethod()||b.method||"post",autoAbort:false,params:null,waitMsg:null,headers:null,success:null,failure:null},a||{});d=c.getValues(c.getStandardSubmit()||!a.submitDisabled);return c.fireAction("beforesubmit",[c,d,a],"doBeforeSubmit")},doBeforeSubmit:function(f,h,b){var e=f.element.dom||{};if(f.getStandardSubmit()){if(b.url&&Ext.isEmpty(e.action)){e.action=b.url}var a=this.query("spinnerfield"),d=a.length,c,g;for(c=0;c0){}else{return j+l}}return j}else{if(g=="number"){if(j==0){return"0"}if(this.lengthProperties[b]){return j+l}if(this.angleProperties[b]){return j+this.DEFAULT_UNIT_ANGLE}if(this.durationProperties[b]){return j+this.DEFAULT_UNIT_DURATION}}else{if(b==="transform"){e=this.transformMethods;c=[];for(d=0,f=e.length;d0)?k.join(", "):"none"}}}}return j}});Ext.define("Ext.fx.runner.CssTransition",{extend:"Ext.fx.runner.Css",listenersAttached:false,constructor:function(){this.runningAnimationsData={};return this.callParent(arguments)},attachListeners:function(){this.listenersAttached=true;this.getEventDispatcher().addListener("element","*","transitionend","onTransitionEnd",this)},onTransitionEnd:function(b){var a=b.target,c=a.id;if(c&&this.runningAnimationsData.hasOwnProperty(c)){this.refreshRunningAnimationsData(Ext.get(a),[b.browserEvent.propertyName])}},onAnimationEnd:function(g,f,d,j,n){var c=g.getId(),k=this.runningAnimationsData[c],o={},m={},b,h,e,l,a;d.un("stop","onAnimationStop",this);if(k){b=k.nameMap}o[c]=m;if(f.onBeforeEnd){f.onBeforeEnd.call(f.scope||this,g,j)}d.fireEvent("animationbeforeend",d,g,j);this.fireEvent("animationbeforeend",this,d,g,j);if(n||(!j&&!f.preserveEndState)){h=f.toPropertyNames;for(e=0,l=h.length;e0},refreshRunningAnimationsData:function(d,k,t,p){var g=d.getId(),q=this.runningAnimationsData,a=q[g];if(!a){return}var m=a.nameMap,s=a.nameList,b=a.sessions,f,h,e,u,l,c,r,o,n=false;t=Boolean(t);p=Boolean(p);if(!b){return this}f=b.length;if(f===0){return this}if(p){a.nameMap={};s.length=0;for(l=0;l");d.close();this.testElement=c=d.createElement("div");c.style.setProperty("position","absolute","!important");d.body.appendChild(c);this.testElementComputedStyle=window.getComputedStyle(c)}return c},getCssStyleValue:function(b,e){var d=this.getTestElement(),a=this.testElementComputedStyle,c=d.style;c.setProperty(b,e);e=a.getPropertyValue(b);c.removeProperty(b);return e},run:function(p){var F=this,h=this.lengthProperties,x={},E={},G={},d,s,y,e,u,I,v,q,r,a,A,z,o,B,l,t,g,C,H,k,f,w,n,c,D,b,m;if(!this.listenersAttached){this.attachListeners()}p=Ext.Array.from(p);for(A=0,o=p.length;A0){this.refreshRunningAnimationsData(d,Ext.Array.merge(I,v),true,G.replacePrevious)}c=a.nameMap;D=a.nameList;t={};for(z=0;z0){I=Ext.Array.difference(D,I);v=Ext.Array.merge(I,v);y["transition-property"]=I}E[s]=e=Ext.Object.chain(e);e["transition-property"]=v;e["transition-duration"]=G.duration;e["transition-timing-function"]=G.easing;e["transition-delay"]=G.delay;B.startTime=Date.now()}r=this.$className;this.applyStyles(x);q=function(i){if(i.data===r&&i.source===window){window.removeEventListener("message",q,false);F.applyStyles(E)}};window.addEventListener("message",q,false);window.postMessage(r,"*")},onAnimationStop:function(d){var f=this.runningAnimationsData,h,a,g,b,c,e;for(h in f){if(f.hasOwnProperty(h)){a=f[h];g=a.sessions;for(b=0,c=g.length;b=g){this.isEnded=true;return a}return f}});Ext.define("Ext.fx.layout.card.Cube",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cube",config:{reverse:null,inAnimation:{type:"cube"},outAnimation:{type:"cube",out:true}}});Ext.define("Ext.fx.layout.card.ScrollCover",{extend:"Ext.fx.layout.card.Scroll",alias:"fx.layout.card.scrollcover",onActiveItemChange:function(c,g,d,k,e){var i,a,j,h,b,f;this.lastController=e;this.inItem=g;if(g&&d){i=this.getLayout().container.innerElement;a=i.getSize();j=this.calculateXY(a);h={easing:this.getEasing(),duration:this.getDuration()};g.renderElement.dom.style.setProperty("visibility","hidden","!important");b=g.setTranslatable(true).getTranslatable();f=d.setTranslatable(true).getTranslatable();f.translate({x:0,y:0});b.translate({x:j.left,y:j.top});b.getWrapper().dom.style.setProperty("z-index","100","!important");g.show();b.on({animationstart:"onInAnimationStart",animationend:"onInAnimationEnd",scope:this});b.translateAnimated({x:0,y:0},h);e.pause()}},onInAnimationStart:function(){this.inItem.renderElement.dom.style.removeProperty("visibility")},onInAnimationEnd:function(){this.inItem.getTranslatable().getWrapper().dom.style.removeProperty("z-index");this.lastController.resume()}});Ext.define("Ext.fx.layout.card.ScrollReveal",{extend:"Ext.fx.layout.card.Scroll",alias:"fx.layout.card.scrollreveal",onActiveItemChange:function(c,g,d,k,e){var i,a,j,h,f,b;this.lastController=e;this.outItem=d;this.inItem=g;if(g&&d){i=this.getLayout().container.innerElement;a=i.getSize();j=this.calculateXY(a);h={easing:this.getEasing(),duration:this.getDuration()};f=d.setTranslatable(true).getTranslatable();b=g.setTranslatable(true).getTranslatable();f.getWrapper().dom.style.setProperty("z-index","100","!important");f.translate({x:0,y:0});b.translate({x:0,y:0});g.show();f.on({animationend:"onOutAnimationEnd",scope:this});f.translateAnimated({x:j.x,y:j.y},h);e.pause()}},onOutAnimationEnd:function(){this.outItem.getTranslatable().getWrapper().dom.style.removeProperty("z-index");this.lastController.resume()}});Ext.define("Ext.fx.runner.CssAnimation",{extend:"Ext.fx.runner.Css",constructor:function(){this.runningAnimationsMap={};this.elementEndStates={};this.animationElementMap={};this.keyframesRulesCache={};this.uniqueId=0;return this.callParent(arguments)},attachListeners:function(){var a=this.getEventDispatcher();this.listenersAttached=true;a.addListener("element","*","animationstart","onAnimationStart",this);a.addListener("element","*","animationend","onAnimationEnd",this)},onAnimationStart:function(g){var b=g.browserEvent.animationName,a=this.animationElementMap[b],f=this.runningAnimationsMap[a][b],h=this.elementEndStates,c=h[a],d={};console.log("START============= "+b);if(c){delete h[a];d[a]=c;this.applyStyles(d)}if(f.before){d[a]=f.before;this.applyStyles(d)}},onAnimationEnd:function(i){var c=i.target,b=i.browserEvent.animationName,d=this.animationElementMap,a=d[b],f=this.runningAnimationsMap,h=f[a],g=h[b];console.log("END============= "+b);if(g.onBeforeEnd){g.onBeforeEnd.call(g.scope||this,c)}if(g.onEnd){g.onEnd.call(g.scope||this,c)}delete d[b];delete h[b];this.removeKeyframesRule(b)},generateAnimationId:function(){return"animation-"+(++this.uniqueId)},run:function(f){var s={},t=this.elementEndStates,o=this.animationElementMap,r=this.runningAnimationsMap,b,d,h,k,p,g,q,u,m,l,c,e,a,j,n;if(!this.listenersAttached){this.attachListeners()}f=Ext.Array.from(f);for(p=0,g=f.length;p1;d.doChangeView(c,a,false)},onViewRemove:function(c){var d=this,b=d.backButtonStack,a;d.endAnimation();b.pop();a=b.length>1;d.doChangeView(c,a,true)},doChangeView:function(k,c,g){var r=this,o=r.leftBox,e=o.element,f=r.titleComponent,m=f.element,n=r.getBackButton(),l=r.getTitleText(),h=r.getBackButtonText(),q=r.getAnimation()&&k.getLayout().getAnimation(),p=q&&q.isAnimation&&k.isPainted(),d,i,a,j,b;if(p){i=r.createProxy(o.element);e.setStyle("opacity","0");n.setText(h);n[c?"show":"hide"]();a=r.createProxy(f.element.getParent());m.setStyle("opacity","0");r.setTitle(l);r.refreshTitlePosition();d=r.measureView(i,a,g);j=d.left;b=d.title;r.isAnimating=true;r.animate(e,j.element);r.animate(m,b.element,function(){m.setLeft(d.titleLeft);r.isAnimating=false});if(Ext.os.is.Android2&&!this.getAndroid2Transforms()){i.ghost.destroy();a.ghost.destroy()}else{r.animate(i.ghost,j.ghost);r.animate(a.ghost,b.ghost,function(){i.ghost.destroy();a.ghost.destroy()})}}else{if(c){n.setText(h);n.show()}else{n.hide()}r.setTitle(l)}},measureView:function(e,u,k){var w=this,j=w.element,v=w.leftBox.element,p=w.titleComponent.element,l=Math.min(j.getWidth()/3,200),q=v.getWidth(),c=j.getX(),m=j.getWidth(),n=p.getX(),d=p.getLeft(),s=p.getWidth(),r=e.x,t=e.width,a=e.left,h=Ext.os.is.Android2&&!this.getAndroid2Transforms(),i,b,f,x,o,g;g=c-r-t;if(k){i=g;b=Math.min(n-t,l)}else{b=g;i=Math.min(n-c,l)}if(h){f={element:{from:{left:i,opacity:1},to:{left:0,opacity:1}}}}else{f={element:{from:{transform:{translateX:i},opacity:0},to:{transform:{translateX:0},opacity:1}},ghost:{to:{transform:{translateX:b},opacity:0}}}}g=c-n+q;if((a+s)>n){o=c-n-s}if(k){p.setLeft(0);b=c+m;if(o!==undefined){i=o}else{i=g}}else{i=m-n;if(o!==undefined){b=o}else{b=g}}if(h){x={element:{from:{left:i,opacity:1},to:{left:d,opacity:1}}}}else{x={element:{from:{transform:{translateX:i},opacity:0},to:{transform:{translateX:d},opacity:1}},ghost:{to:{transform:{translateX:b},opacity:0}}}}return{left:f,title:x,titleLeft:d}},animate:function(b,a,e){var c=this,d;b.setLeft(0);a=Ext.apply(a,{element:b,easing:"ease-in-out",duration:c.getAnimation().duration||250,preserveEndState:true});d=new Ext.fx.Animation(a);d.on("animationend",function(){if(e){e.call(c)}},c);Ext.Animator.run(d);c.activeAnimations.push(d)},endAnimation:function(){var a=this.activeAnimations,d,b,c;if(a){c=a.length;for(b=0;b=0;a--){if((Ext.isString(f)&&Ext.ComponentQuery.is(g[a],f))||(Ext.isObject(f)&&f==g[a])){f=d-a;break}}if(!Ext.isNumber(f)){return false}}var c=g.length,b;if(!Ext.isNumber(f)||f<1){f=1}f=Math.min(f,c-1);if(f){e.getNavigationBar().beforePop(f);b=g.splice(-f,f-1);for(a=0;a0){if(b&&b.isAnimation){b.setReverse(true)}a.setActiveItem(d-1);a.getNavigationBar().onViewRemove(a,c[d],d)}},doRemove:function(){var a=this.getLayout().getAnimation();if(a&&a.isAnimation){a.setReverse(false)}this.callParent(arguments)},onItemAdd:function(b,a){this.doItemLayoutAdd(b,a);if(!this.isItemsInitializing&&b.isInnerItem()){this.setActiveItem(b);this.getNavigationBar().onViewAdd(this,b,a)}if(this.initialized){this.fireEvent("add",this,b,a)}},reset:function(){return this.pop(this.getInnerItems().length)}});Ext.define("Ext.plugin.ListPaging",{extend:"Ext.Component",alias:"plugin.listpaging",config:{autoPaging:false,loadMoreText:"Load More...",noMoreRecordsText:"No More Records",loadTpl:['
','','','','',"
",'
{message}
'].join(""),loadMoreCmp:{xtype:"component",baseCls:Ext.baseCSSPrefix+"list-paging",scrollDock:"bottom",docked:"bottom",hidden:true},loadMoreCmpAdded:false,loadingCls:Ext.baseCSSPrefix+"loading",list:null,scroller:null,loading:false},init:function(c){var a=c.getScrollable().getScroller(),b=c.getStore();this.setList(c);this.setScroller(a);this.bindStore(c.getStore());c.setScrollToTopOnRefresh(false);this.addLoadMoreCmp();if(b){this.disableDataViewMask(b)}c.updateStore=Ext.Function.createInterceptor(c.updateStore,this.bindStore,this);if(this.getAutoPaging()){a.on({scrollend:this.onScrollEnd,scope:this})}},bindStore:function(a,b){if(b){b.un({beforeload:this.onStoreBeforeLoad,load:this.onStoreLoad,scope:this})}if(a){a.on({beforeload:this.onStoreBeforeLoad,load:this.onStoreLoad,scope:this})}},disableDataViewMask:function(a){var b=this.getList();if(a.isAutoLoading()){b.setLoadingText(null)}else{a.on({load:{single:true,fn:function(){b.setLoadingText(null)}}})}},applyLoadTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},applyLoadMoreCmp:function(a){a=Ext.merge(a,{html:this.getLoadTpl().apply({cssPrefix:Ext.baseCSSPrefix,message:this.getLoadMoreText()}),listeners:{tap:{fn:this.loadNextPage,scope:this,element:"element"}}});return Ext.factory(a,Ext.Component,this.getLoadMoreCmp())},onScrollEnd:function(b,a,c){if(!this.getLoading()&&c>=b.maxPosition.y){this.loadNextPage()}},updateLoading:function(a){var b=this.getLoadMoreCmp(),c=this.getLoadingCls();if(a){b.addCls(c)}else{b.removeCls(c)}},onStoreBeforeLoad:function(a){if(a.getCount()===0){this.getLoadMoreCmp().hide()}},onStoreLoad:function(a){var d=this.getLoadMoreCmp(),b=this.getLoadTpl(),c=this.storeFullyLoaded()?this.getNoMoreRecordsText():this.getLoadMoreText();if(a.getCount()){d.show();this.getList().scrollDockHeightRefresh()}this.setLoading(false);d.setHtml(b.apply({cssPrefix:Ext.baseCSSPrefix,message:c}))},addLoadMoreCmp:function(){var b=this.getList(),a=this.getLoadMoreCmp();if(!this.getLoadMoreCmpAdded()){b.add(a);b.fireEvent("loadmorecmpadded",this,b);this.setLoadMoreCmpAdded(true)}return a},storeFullyLoaded:function(){var a=this.getList().getStore(),b=a.getTotalCount();return b!==null?a.getTotalCount()<=(a.currentPage*a.getPageSize()):false},loadNextPage:function(){var a=this;if(!a.storeFullyLoaded()){a.setLoading(true);a.getList().getStore().nextPage({addRecords:true})}}});Ext.define("Ext.plugin.PullRefresh",{extend:"Ext.Component",alias:"plugin.pullrefresh",requires:["Ext.DateExtras"],config:{list:null,pullRefreshText:"Pull down to refresh...",releaseRefreshText:"Release to refresh...",lastUpdatedText:"Last Updated:",loadingText:"Loading...",snappingAnimationDuration:150,refreshFn:null,pullTpl:['
','
','
','','','','',"
",'
','

{message}

','
{lastUpdatedText} {lastUpdated:date("m/d/Y h:iA")}
',"
","
"].join(""),translatable:true},isRefreshing:false,currentViewState:"",initialize:function(){this.callParent();this.on({painted:"onPainted",scope:this})},init:function(b){var a=this;a.setList(b);a.initScrollable()},initScrollable:function(){var d=this,g=d.getList(),b=g.getStore(),f=d.getPullTpl(),c=d.element,e=g.getScrollable(),a;if(!e){return}a=e.getScroller();d.lastUpdated=new Date();g.container.insert(0,d);if(b){if(b.isAutoLoading()){g.setLoadingText(null)}else{b.on({load:{single:true,fn:function(){g.setLoadingText(null)}}})}}f.overwrite(c,{message:d.getPullRefreshText(),lastUpdatedText:d.getLastUpdatedText(),lastUpdated:d.lastUpdated},true);d.loadingElement=c.getFirstChild();d.messageEl=c.down(".x-list-pullrefresh-message");d.updatedEl=c.down(".x-list-pullrefresh-updated");d.maxScroller=a.getMaxPosition();a.on({maxpositionchange:d.setMaxScroller,scroll:d.onScrollChange,scope:d})},onScrollableChange:function(){this.initScrollable()},updateList:function(a,c){var b=this;if(a&&a!=c){a.on({order:"after",scrollablechange:b.onScrollableChange,scope:b})}else{if(c){c.un({order:"after",scrollablechange:b.onScrollableChange,scope:b})}}},fetchLatest:function(){var b=this.getList().getStore(),c=b.getProxy(),a;a=Ext.create("Ext.data.Operation",{page:1,start:0,model:b.getModel(),limit:b.getPageSize(),action:"read",filters:b.getRemoteFilter()?b.getFilters():[]});c.read(a,this.onLatestFetched,this)},onLatestFetched:function(d){var j=this.getList().getStore(),b=j.getData(),c=d.getRecords(),a=c.length,g=[],h,f,e;for(e=0;ethis.maxScroller.y){this.onBounceBottom(c)}},applyPullTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onBounceTop:function(e){var b=this,d=b.pullHeight,c=b.getList(),a=c.getScrollable().getScroller();if(!b.isReleased){if(!d){b.onPainted();d=b.pullHeight}if(!b.isRefreshing&&-e>=d+10){b.isRefreshing=true;b.setViewState("release");a.getContainer().onBefore({dragend:"onScrollerDragEnd",single:true,scope:b})}else{if(b.isRefreshing&&-e