(){};(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]"},isMSDate:function(value){if(!Ext.isString(value)){return false}else{return value.match("\\\\?/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\\\?/")!==null}},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="2.3.1.410",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(;eD.length){return 1}else{if(E.lengthe){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,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){var f=d.apply(c||this,arguments);e.apply(this,arguments);return f})},interceptAfter:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){e.apply(this,arguments);return d.apply(c||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)){if(Ext.isMSDate(o)){return encodeMSDate(o)}else{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},getPreferredTranslationMethod:function(a){if(typeof a=="object"&&"translationMethod" in a&&a.translationMethod!=="auto"){return a.translationMethod}else{if(this.is.AndroidStock2||this.is.IE){return"scrollposition"}else{return"csstransform"}}}},function(){var a=Ext.browser=new this(Ext.global.navigator.userAgent)});Ext.define("Ext.env.OS",{statics:{names:{ios:"iOS",android:"Android",windowsPhone:"WindowsPhone",webos:"webOS",blackberry:"BlackBerry",rimTablet:"RIMTablet",mac:"MacOS",win:"Windows",tizen:"Tizen",linux:"Linux",bada:"Bada",chrome:"ChromeOS",other:"Other"},prefixes:{tizen:"(Tizen )",ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",windowsPhone:"Windows Phone ",blackberry:"(?:BlackBerry|BB)(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/",chrome:"CrOS "}},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(o,b,k){var l=this.statics(),j=l.names,d=l.prefixes,a,h="",c,g,f,n,e,m;k=k||Ext.browser;e=this.is=function(i){return this.is[i]===true};for(c in d){if(d.hasOwnProperty(c)){g=d[c];f=o.match(new RegExp("(?:"+g+")([^\\s;]+)"));if(f){a=j[c];m=f[1];if(m&&m=="HTC_"){h=new Ext.Version("2.3")}else{if(m&&m=="Silk/"){h=new Ext.Version("2.3")}else{h=new Ext.Version(f[f.length-1])}}break}}}if(!a){a=j[(o.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(c in j){if(j.hasOwnProperty(c)){n=j[c];if(!e.hasOwnProperty(a)){this.setFlag(n,(a===n))}}}if(this.name=="iOS"&&window.screen.height==568){this.setFlag("iPhone5")}if(k.is.Safari||k.is.Silk){if(this.is.Android2||this.is.Android3||k.version.shortVersion==501){k.setFlag("AndroidStock");k.setFlag("AndroidStock2")}if(this.is.Android4){k.setFlag("AndroidStock");k.setFlag("AndroidStock4")}}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&&!b.is.WindowsPhone&&/Windows|Linux|MacOS/.test(g)){d="Desktop";Ext.browser.is.WebView=Ext.browser.is.Ripple?true:false}else{if(b.is.iPad||b.is.RIMTablet||b.is.Android3||Ext.browser.is.Silk||(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",{constructor:function(){this.testElements={};this.has=function(a){return !!this.has[a]};if(!Ext.theme){Ext.theme={name:"Default"}}Ext.theme.is={};Ext.theme.is[Ext.theme.name]=true;Ext.onDocumentReady(function(){this.registerTest({ProperHBoxStretching:function(){var b=document.createElement("div"),c=b.appendChild(document.createElement("div")),d=c.appendChild(document.createElement("div")),a;b.setAttribute("style","width: 100px; height: 100px; position: relative;");c.setAttribute("style","position: absolute; display: -ms-flexbox; display: -webkit-flex; display: -moz-flexbox; display: flex; -ms-flex-direction: row; -webkit-flex-direction: row; -moz-flex-direction: row; flex-direction: row; min-width: 100%;");d.setAttribute("style","width: 200px; height: 50px;");document.body.appendChild(b);a=c.offsetWidth;document.body.removeChild(b);return(a>100)}})},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},isStyleSupportedWithoutPrefix:function(b,a){var c=this.getTestElement(a).style;if(typeof c[b]!=="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 Ext.browser.is.Ripple||(this.isEventSupported("touchstart")&&!(Ext.os&&Ext.os.name.match(/Windows|MacOS|Linux/)&&!Ext.os.is.BlackBerry6))},Pointer:function(){return !!window.navigator.msPointerEnabled},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")},CssTransformNoPrefix:function(){return this.isStyleSupportedWithoutPrefix("transform")},Css3dTransforms:function(){return this.has("CssTransforms")&&this.isStyleSupported("perspective")&&!Ext.browser.is.AndroidStock2},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},XHR2:function(){return window.ProgressEvent&&window.FormData&&window.XMLHttpRequest&&("withCredentials" in new XMLHttpRequest)},XHRUploadProgress:function(){if(window.XMLHttpRequest&&!Ext.browser.is.AndroidStock){var b=new XMLHttpRequest();return b&&("upload" in b)&&("onprogress" in b.upload)}return false},NumericInputPlaceHolder:function(){return !(Ext.browser.is.AndroidStock4&&Ext.os.version.getMinor()<2)}})});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(;b";return b}},isElement:true,constructor:function(a){if(typeof a=="string"){a=document.getElementById(a)}if(!a){throw new Error("Invalid domNode reference or an id of an existing domNode: "+a)}this.dom=a;this.getUniqueId()},attach:function(a){this.dom=a;this.id=a.id;return this},getUniqueId:function(){var b=this.id,a;if(!b){a=this.dom;if(a.id.length>0){this.id=b=a.id}else{a.id=b=this.mixins.identifiable.getUniqueId.call(this)}Ext.Element.cache[b]=this}return b},setId:function(c){var a=this.id,b=Ext.Element.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(){return !Ext.browser.is.IE?function(){var a=this.dom;return Boolean(a&&a.offsetParent)}:function(){var a=this.dom;return Boolean(a&&(a.offsetHeight!==0&&a.offsetWidth!==0))}})(),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(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.dom,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);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(){return this.getXY()[0]},getY:function(){return this.getXY()[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;if(!c){return new Ext.util.Region()}var j=c.offsetWidth,f=c.offsetHeight,m=g.getXY(),k=m[1],a=m[0]+j,i=m[1]+f,d=m[0];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"],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){if(e==="destroy"){c[e]=function(){return this.invoke(e,arguments)}}else{c[e]=c[e]||function(){return this.invoke(e,arguments)}}}).call(c,b)}}c.on=c.addListener;a.selectorFunction=Ext.DomQuery.select;Ext.dom.Element.select=function(e,h,f){var g;if(typeof e=="string"){g=Ext.dom.Element.selectorFunction(e,f)}else{if(e.length!==undefined){g=e}else{}}return(h===true)?new Ext.dom.CompositeElement(g):new Ext.dom.CompositeElementLite(g)};Ext.select=function(){return a.select.apply(a,arguments)}});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",{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(e,f,b){var g=this.getActivePublishers(e,b),d=g.length,c,a;a=this.doAddListener.apply(this,arguments);if(a&&d>0){for(c=0;c0){for(c=0;c0){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",{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(f,g){var b=f;if(!f){return""}if(!Ext.isDate(f)){b=new Date(Date.parse(f));if(isNaN(b)){if(this.iso8601TestRe.test(f)){if(Ext.os.is.Android&&Ext.os.version.isLessThan("3.0")){var h=[1,4,5,6,7,10,11];var e,d=0;if((e=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(f))){for(var c=0,a;(a=h[c]);++c){e[a]=+e[a]||0}e[2]=(+e[2]||1)-1;e[3]=+e[3]||1;if(e[8]!=="Z"&&e[9]!==undefined){d=e[10]*60+e[11];if(e[9]==="+"){d=0-d}}b=new Date(Date.UTC(e[1],e[2],e[3],e[4],e[5]+d,e[6],e[7]))}}else{b=f.split(this.iso8601SplitRe);b=new Date(b[0],b[1]-1,b[2],b[3],b[4],b[5])}}}if(isNaN(b)){b=new Date(Date.parse(f.replace(this.dashesRe,"/")))}f=b}return Ext.Date.format(f,g||Ext.util.Format.defaultDateFormat)}});Ext.define("Ext.Template",{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("v="+b+"; if (v !== undefined && v !== 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,config:{useWrapper:null,easing:null,easingX:null,easingY:null},x:0,y:0,activeEasingX:null,activeEasingY:null,isAnimating:false,isTranslatable:true,constructor:function(a){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)},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;Ext.AnimationQueue.start(this.doAnimationFrame,this);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;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;Ext.AnimationQueue.stop(this.doAnimationFrame,this);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(a,c){var b=this.getElement();if(!this.isDestroyed&&!b.isDestroyed){b.translate(a,c)}},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,type:"scrollposition",config:{useWrapper:true},getWrapper:function(){var c=this.wrapper,b=this.getElement(),a;if(!c){a=b.getParent();if(!a){return null}if(a.hasCls(Ext.baseCSSPrefix+"translatable-hboxfix")){a=a.getParent()}if(this.getUseWrapper()){c=b.wrap()}else{c=a}b.addCls("x-translatable");c.addCls("x-translatable-container");this.wrapper=c;c.on("painted",function(){if(!this.isAnimating){this.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=500000-a}if(typeof d=="number"){b.scrollTop=500000-d}}},destroy:function(){var a=this.getElement(),b=this.wrapper;if(b){if(!a.isDestroyed){if(this.getUseWrapper()){b.doReplaceWith(a)}a.removeCls("x-translatable")}if(!b.isDestroyed){b.removeCls("x-translatable-container");b.un("painted","refresh",this)}delete this.wrapper;delete this._element}this.callSuper()}});Ext.define("Ext.util.translatable.CssPosition",{extend:Ext.util.translatable.Dom,doTranslate:function(a,c){var b=this.getElement().dom.style;if(typeof a=="number"){b.left=a+"px"}if(typeof c=="number"){b.top=c+"px"}},destroy:function(){var a=this.getElement().dom.style;a.left=null;a.top=null;this.callParent(arguments)}});Ext.define("Ext.util.Translatable",{constructor:function(a){var b=Ext.util.translatable;switch(Ext.browser.getPreferredTranslationMethod(a)){case"scrollposition":return new b.ScrollPosition(a);case"csstransform":return new b.CssTransform(a);case"cssposition":return new b.CssPosition(a)}}});Ext.define("Ext.behavior.Translatable",{extend:Ext.behavior.Behavior,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],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);if(a){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,setConfig:function(c){var a=this.draggable,b=this.component;if(c){if(!a){b.setTranslatable(c.translatable);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()}}});(function(a){Ext.define("Ext.Component",{extend:Ext.AbstractComponent,alternateClassName:"Ext.lib.Component",mixins:[Ext.mixin.Traversable],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,activeAnimation:null,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;c0)){this.element.replaceCls(b,c)}},updateStyleHtmlCls:function(d,b){var e=this.innerHtmlElement,c=this.innerElement;if(this.getStyleHtmlContent()&&b){if(e){e.replaceCls(b,d)}else{c.replaceCls(b,d)}}},applyStyleHtmlContent:function(b){return Boolean(b)},updateStyleHtmlContent:function(d){var b=this.getStyleHtmlCls(),c=this.innerElement,e=this.innerHtmlElement;if(d){if(e){e.addCls(b)}else{c.addCls(b)}}else{if(e){e.removeCls(b)}else{c.addCls(b)}}},applyContentEl:function(b){if(b){return Ext.get(b)}},updateContentEl:function(b,c){if(c){c.hide();Ext.getBody().append(c)}if(b){this.setHtml(b.dom);b.show()}},getSize:function(){return{width:this.getWidth(),height:this.getHeight()}},isCentered:function(){return Boolean(this.getCentered())},isFloating:function(){return this.floating},isDocked:function(){return Boolean(this.getDocked())},isInnerItem:function(){return this.isInner},setIsInner:function(b){if(b!==this.isInner){this.isInner=b;if(this.initialized){this.fireEvent("innerstatechange",this,b)}}},filterLengthValue:function(b){if(b==="auto"||(!b&&b!==0)){return null}return b},applyTop:function(b){return this.filterLengthValue(b)},applyRight:function(b){return this.filterLengthValue(b)},applyBottom:function(b){return this.filterLengthValue(b)},applyLeft:function(b){return this.filterLengthValue(b)},applyWidth:function(b){return this.filterLengthValue(b)},applyHeight:function(b){return this.filterLengthValue(b)},applyMinWidth:function(b){return this.filterLengthValue(b)},applyMinHeight:function(b){return this.filterLengthValue(b)},applyMaxWidth:function(b){return this.filterLengthValue(b)},applyMaxHeight:function(b){return this.filterLengthValue(b)},doSetTop:function(b){this.element.setTop(b);this.refreshFloating()},doSetRight:function(b){this.element.setRight(b);this.refreshFloating()},doSetBottom:function(b){this.element.setBottom(b);this.refreshFloating()},doSetLeft:function(b){this.element.setLeft(b);this.refreshFloating()},doSetWidth:function(b){this.element.setWidth(b);this.refreshSizeState()},doSetHeight:function(b){this.element.setHeight(b);this.refreshSizeState()},applyFlex:function(b){if(b){b=Number(b);if(isNaN(b)){b=null}}else{b=null}return b},doSetFlex:Ext.emptyFn,refreshSizeState:function(){this.refreshSizeStateOnInitialized=true},doRefreshSizeState:function(){var c=this.getWidth()!==null||this.widthLayoutSized||(this.getLeft()!==null&&this.getRight()!==null),d=this.getHeight()!==null||this.heightLayoutSized||(this.getTop()!==null&&this.getBottom()!==null),f=this.layoutStretched||this.hasCSSMinHeight||(!d&&this.getMinHeight()!==null),e=c&&d,b=(c&&this.LAYOUT_WIDTH)|(d&&this.LAYOUT_HEIGHT)|(f&&this.LAYOUT_STRETCHED);if(!e&&f){e=null}this.setSizeState(e);this.setSizeFlags(b)},setLayoutSizeFlags:function(b){this.layoutStretched=!!(b&this.LAYOUT_STRETCHED);this.widthLayoutSized=!!(b&this.LAYOUT_WIDTH);this.heightLayoutSized=!!(b&this.LAYOUT_HEIGHT);this.refreshSizeState()},setSizeFlags:function(b){if(b!==this.sizeFlags){this.sizeFlags=b;var c=!!(b&this.LAYOUT_WIDTH),d=!!(b&this.LAYOUT_HEIGHT),e=!!(b&this.LAYOUT_STRETCHED);if(c&&!e&&!d){this.element.addCls("x-has-width")}else{this.element.removeCls("x-has-width")}if(d&&!e&&!c){this.element.addCls("x-has-height")}else{this.element.removeCls("x-has-height")}if(this.initialized){this.fireEvent("sizeflagschange",this,b)}}},getSizeFlags:function(){if(!this.initialized){this.doRefreshSizeState()}return this.sizeFlags},setSizeState:function(b){if(b!==this.sizeState){this.sizeState=b;this.element.setSizeState(b);if(this.initialized){this.fireEvent("sizestatechange",this,b)}}},getSizeState:function(){if(!this.initialized){this.doRefreshSizeState()}return this.sizeState},doSetMinWidth:function(b){this.element.setMinWidth(b)},doSetMinHeight:function(b){this.element.setMinHeight(b);this.refreshSizeState()},doSetMaxWidth:function(b){this.element.setMaxWidth(b)},doSetMaxHeight:function(b){this.element.setMaxHeight(b)},applyCentered:function(b){b=Boolean(b);if(b){this.refreshInnerState=Ext.emptyFn;if(this.isFloating()){this.resetFloating()}if(this.isDocked()){this.setDocked(false)}this.setIsInner(false);delete this.refreshInnerState}return b},doSetCentered:function(b){this.toggleCls(this.getFloatingCls(),b);if(!b){this.refreshInnerState()}},applyDocked:function(b){if(!b){return null}this.refreshInnerState=Ext.emptyFn;if(this.isFloating()){this.resetFloating()}if(this.isCentered()){this.setCentered(false)}this.setIsInner(false);delete this.refreshInnerState;return b},doSetDocked:function(c,b){this.fireEvent("afterdockedchange",this,c,b);if(!c){this.refreshInnerState()}},resetFloating:function(){this.setTop(null);this.setRight(null);this.setBottom(null);this.setLeft(null)},refreshInnerState:function(){this.setIsInner(!this.isCentered()&&!this.isFloating()&&!this.isDocked())},refreshFloating:function(){this.refreshFloatingOnInitialized=true},doRefreshFloating:function(){var c=true,b=this.getFloatingCls();if(this.getTop()===null&&this.getBottom()===null&&this.getRight()===null&&this.getLeft()===null){c=false}else{this.refreshSizeState()}if(c!==this.floating){this.floating=c;if(c){this.refreshInnerState=Ext.emptyFn;if(this.isCentered()){this.setCentered(false)}if(this.isDocked()){this.setDocked(false)}this.setIsInner(false);delete this.refreshInnerState}this.element.toggleCls(b,c);if(this.initialized){this.fireEvent("floatingchange",this,c)}if(!c){this.refreshInnerState()}}},updateFloatingCls:function(b,c){if(this.isFloating()){this.replaceCls(c,b)}},applyDisabled:function(b){return Boolean(b)},doSetDisabled:function(b){this.element[b?"addCls":"removeCls"](this.getDisabledCls())},updateDisabledCls:function(b,c){if(this.isDisabled()){this.element.replaceCls(c,b)}},disable:function(){this.setDisabled(true)},enable:function(){this.setDisabled(false)},isDisabled:function(){return this.getDisabled()},applyZIndex:function(b){if(!b&&b!==0){b=null}if(b!==null){b=Number(b);if(isNaN(b)){b=null}}return b},updateZIndex:function(d){var c=this.element,b;if(c&&!c.isDestroyed){b=c.dom.style;if(d!==null){b.setProperty("z-index",d,"important")}else{b.removeProperty("z-index")}}},getInnerHtmlElement:function(){var b=this.innerHtmlElement,c;if(!b||!b.dom||!b.dom.parentNode){this.innerHtmlElement=b=Ext.Element.create({cls:"x-innerhtml"});if(this.getStyleHtmlContent()){c=this.getStyleHtmlCls();this.innerHtmlElement.addCls(c);this.innerElement.removeCls(c)}this.innerElement.appendChild(b)}return b},updateHtml:function(b){if(!this.isDestroyed){var c=this.getInnerHtmlElement();if(Ext.isElement(b)){c.setHtml("");c.append(b)}else{c.setHtml(b)}}},applyHidden:function(b){return Boolean(b)},doSetHidden:function(c){var b=this.renderElement;if(b.isDestroyed){return}if(c){b.hide()}else{b.show()}if(this.element){this.element[c?"addCls":"removeCls"](this.getHiddenCls())}this.fireEvent(c?"hide":"show",this)},updateHiddenCls:function(b,c){if(this.isHidden()){this.element.replaceCls(c,b)}},isHidden:function(){return this.getHidden()},hide:function(b){this.setCurrentAlignmentInfo(null);if(this.activeAnimation){this.activeAnimation.on({animationend:function(){this.hide(b)},scope:this,single:true});return this}if(!this.getHidden()){if(b===undefined||(b&&b.isComponent)){b=this.getHideAnimation()}if(b){if(b===true){b="fadeOut"}this.onBefore({hiddenchange:"animateFn",scope:this,single:true,args:[b]})}this.setHidden(true)}return this},show:function(c){if(this.activeAnimation){this.activeAnimation.on({animationend:function(){this.show(c)},scope:this,single:true});return this}var b=this.getHidden();if(b||b===null){if(c===true){c="fadeIn"}else{if(c===undefined||(c&&c.isComponent)){c=this.getShowAnimation()}}if(c){this.beforeShowAnimation();this.onBefore({hiddenchange:"animateFn",scope:this,single:true,args:[c]})}this.setHidden(false)}return this},beforeShowAnimation:function(){if(this.element){this.renderElement.show();this.element.removeCls(this.getHiddenCls())}},animateFn:function(g,e,h,d,c,b){var f=this;if(g&&(!h||(h&&this.isPainted()))){this.activeAnimation=new Ext.fx.Animation(g);this.activeAnimation.setElement(e.element);if(!Ext.isEmpty(h)){this.activeAnimation.setOnEnd(function(){f.activeAnimation=null;b.resume()});b.pause()}Ext.Animator.run(f.activeAnimation)}},setVisibility:function(b){this.renderElement.setVisibility(b)},isRendered:function(){return this.rendered},isPainted:function(){return this.renderElement.isPainted()},applyTpl:function(b){return(Ext.isObject(b)&&b.isTemplate)?b:new Ext.XTemplate(b)},applyData:function(b){if(Ext.isObject(b)){return Ext.apply({},b)}else{if(!b){b={}}}return b},updateData:function(d){var e=this;if(d){var c=e.getTpl(),b=e.getTplWriteMode();if(c){c[b](e.getInnerHtmlElement(),d)}this.fireEvent("updatedata",e,d)}},applyRecord:function(b){if(b&&Ext.isObject(b)&&b.isModel){return b}return null},updateRecord:function(c,b){var d=this;if(b){b.unjoin(d)}if(!c){d.updateData("")}else{c.join(d);d.updateData(c.getData(true))}},afterEdit:function(){this.updateRecord(this.getRecord())},afterErase:function(){this.setRecord(null)},applyItemId:function(b){return b||this.getId()},isXType:function(c,b){if(b){return this.xtypes.indexOf(c)!=-1}return Boolean(this.xtypesMap[c])},getXTypes:function(){return this.xtypesChain.join("/")},getDraggableBehavior:function(){var b=this.draggableBehavior;if(!b){b=this.draggableBehavior=new Ext.behavior.Draggable(this)}return b},applyDraggable:function(b){this.getDraggableBehavior().setConfig(b)},getDraggable:function(){return this.getDraggableBehavior().getDraggable()},getTranslatableBehavior:function(){var b=this.translatableBehavior;if(!b){b=this.translatableBehavior=new Ext.behavior.Translatable(this)}return b},applyTranslatable:function(b){this.getTranslatableBehavior().setConfig(b)},getTranslatable:function(){return this.getTranslatableBehavior().getTranslatable()},translateAxis:function(c,e,d){var b,f;if(c==="x"){b=e}else{f=e}return this.translate(b,f,d)},translate:function(){var b=this.getTranslatable();if(!b){this.setTranslatable(true);b=this.getTranslatable()}b.translate.apply(b,arguments)},setRendered:function(c){var b=this.rendered;if(c!==b){this.rendered=c;return true}return false},setSize:function(c,b){if(c!=undefined){this.setWidth(c)}if(b!=undefined){this.setHeight(b)}},doAddListener:function(d,f,e,c,b){if(c&&"element" in c){return this[c.element].doAddListener(d,f,e||this,c,b)}if(d=="painted"||d=="resize"){return this.element.doAddListener(d,f,e||this,c,b)}return this.callParent(arguments)},doRemoveListener:function(d,f,e,c,b){if(c&&"element" in c){this[c.element].doRemoveListener(d,f,e||this,c,b)}return this.callParent(arguments)},showBy:function(c,f){var e=this,b=Ext.Viewport,d=e.getParent();e.setVisibility(false);if(d!==b){b.add(e)}e.show();e.on({hide:"onShowByErased",destroy:"onShowByErased",single:true,scope:e});b.on("resize","alignTo",e,{args:[c,f]});e.alignTo(c,f);e.setVisibility(true)},onShowByErased:function(){Ext.Viewport.un("resize","alignTo",this)},getAlignmentInfo:function(j,i){var c=j.isComponent?j.renderElement:j,g=c.getPageBox(),d=this.renderElement,e=d.getPageBox(),f={alignToBox:g,alignment:i,top:g.top,left:g.left,alignToWidth:g.width,alignToHeight:g.height,width:e.width,height:e.height},b=this.getCurrentAlignmentInfo(),h=true;if(!Ext.isEmpty(b)){Ext.Object.each(f,function(k,l){if(!Ext.isObject(l)&&b[k]!=l){h=false;return false}return true})}else{h=false}return{isAligned:h,stats:f}},getCurrentAlignmentInfo:function(){return this.$currentAlignmentInfo},setCurrentAlignmentInfo:function(b){this.$currentAlignmentInfo=Ext.isEmpty(b)?null:Ext.merge({},b.stats?b.stats:b)},alignTo:function(l,h){var o=this.getAlignmentInfo(l,h);if(o.isAligned){return}var n=o.stats.alignToBox,z=this.getParent().element.getPageBox(),w=o.stats.alignToHeight,m=o.stats.alignToWidth,r=o.stats.height,t=o.stats.width;z.bottom-=5;z.height-=10;z.left+=5;z.right-=5;z.top+=5;z.width-=10;if(!h||h==="auto"){if(z.bottom-n.bottomh){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"],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("afterdockedchange","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(f,d){var b=this.container,h=b.innerElement.dom,e=f.element.dom,g=d!==-1?b.getInnerAt(d+1):null,c=null,a;if(g){a=g.getTranslatable();if(a&&a.getUseWrapper()){c=a.getWrapper().dom}else{c=g?g.element.dom:null}}h.insertBefore(e,c);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;bt){n=q||p[0];p.splice(m,0,s);break}q=v}if(!n){n=p[g-1];p.push(s)}a=n.getDocked();d=n.$dockWrapper;l=f[a];if(u===l){d.addItem(s)}else{k=d.getItemsSlice(t);o=new b({container:this.container,direction:u});if(k.length>0){if(k.length===d.itemsCount){c=d;o.setSizeState(c.getSizeState());o.getElement().replace(c.getElement())}else{c=new b({container:this.container,direction:l});c.setInnerWrapper(d.getInnerWrapper());c.addItems(k);d.setInnerWrapper(o)}o.setInnerWrapper(c)}else{j=d.getInnerWrapper();d.setInnerWrapper(null);o.setInnerWrapper(j);d.setInnerWrapper(o)}o.addItem(s)}}h.onInitialized("refreshDockedItemLayoutSizeFlags",this,[s])},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);if(this.observableId){this.fireEvent("destroy",this);this.clearListeners();this.clearManagedListeners()}}});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,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.browser.is.AndroidStock2){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",{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.browser.is.AndroidStock2){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,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}},onActiveItemChange:function(e,c,f,b,a){var d=c.element.getParent();d.addCls("x-layout-card-perspective");this.on("animationend",function(){d.removeCls("x-layout-card-perspective")},this,{single:true});this.callParent(arguments)},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,alias:"fx.layout.card.scroll",config:{duration:150},constructor:function(a){this.initConfig(a)},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());Ext.AnimationQueue.start(this.doAnimationFrame,this)},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)}}Ext.AnimationQueue.stop(this.doAnimationFrame,this);c.isAnimating=false;c.fireEvent("animationend",c)}});Ext.define("Ext.fx.layout.Card",{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.browser.is.AndroidStock2){if(c!="fade"){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",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.getInnerAt(0),c=a.getActiveItem();if(c){c.show();if(b&&b!==c){b.hide()}}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",{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,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;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();if(!this.FixedHBoxStretching){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(f,e){var b=this.isAxisEnabledFlags,d=this.cls+"-vertical",a=this.cls+"-horizontal",c=this.getElement();if(e==="both"||e==="horizontal"){c.removeCls(a)}if(e==="both"||e==="vertical"){c.removeCls(d)}b.x=b.y=false;if(f==="both"||f==="horizontal"){b.x=true;c.addCls(a)}if(f==="both"||f==="vertical"){b.y=true;c.addCls(d)}},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,b;if(!a){b=this.getElement().getParent();this.container=a=this.FixedHBoxStretching?b.getParent():b;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){if(this.isDestroyed){return this}var b=this.getTranslatable(),a=this.position,d=false,f,e;if(this.isAxisEnabled("x")){if(isNaN(c)||typeof c!="number"){c=a.x}else{if(a.x!==c){a.x=c;d=true}}f=-c}if(this.isAxisEnabled("y")){if(isNaN(h)||typeof h!="number"){h=a.y}else{if(a.y!==h){a.y=h;d=true}}e=-h}if(d){if(g!==undefined&&g!==false){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",c);a=this.getAnimationEasing("y",c);if(b||a){this.getTranslatable().animate(b,a)}else{this.onScrollEnd()}},getAnimationEasing:function(g,j){if(!this.isAxisEnabled(g)){return null}var f=this.position[g],c=this.getMinPosition()[g],i=this.getMaxPosition()[g],a=this.getMaxAbsoluteVelocity(),d=null,b=this.dragEndTime,h=j.flick.velocity[g],k;if(fi){d=i}}if(d!==null){k=this.getBounceEasing()[g];k.setConfig({startTime:b,startValue:-f,endValue:-d});return k}if(h===0){return null}if(h<-a){h=-a}else{if(h>a){h=a}}if(Ext.browser.is.IE){h*=2}k=this.getMomentumEasing()[g];k.setConfig({startTime:b,startValue:-f,startVelocity:h*1.5,minMomentumValue:-i,maxMomentumValue:0});return k},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=Math.floor((a-f)%g);if(b!==0){if(a!==e){if(Math.abs(b)>g/2){d=Math.min(e,a+((b>0)?g-b:b-g))}else{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 c=this.getElement(),b=this.sizeMonitors,a;if(b){b.element.destroy();b.container.destroy()}if(c&&!c.isDestroyed){c.removeCls(this.cls);a=this.getContainer();if(a&&!a.isDestroyed){a.removeCls(this.containerCls)}}Ext.destroy(this.getTranslatable());this.callParent(arguments)}},function(){});(function(){var c=0,e=["ms","moz","webkit","o"],b=e.length,a,d;for(a=0;a=500){this.run()}},run:function(){if(!this.isRunning){return}var b=this.runningQueue,c,d;this.lastRunTime=Date.now();this.frameStartTime=Ext.performance.now();b.push.apply(b,this.queue);for(c=0,d=b.length;c0){c=b.shift();this.invoke(c);this.processIdleQueue()}},processTaskQueue:function(){if(!this.hasOwnProperty("taskQueueTimer")){this.taskQueueTimer=setTimeout(this.processTaskQueueItem,15)}},processTaskQueueItem:function(){delete this.taskQueueTimer;var b=this.taskQueue,c;if(b.length>0){c=b.shift();this.invoke(c);this.processTaskQueue()}},showFps:function(){if(!Ext.trueRequestAnimationFrames){alert("This browser does not support requestAnimationFrame. The FPS listed will not be accurate")}Ext.onReady(function(){Ext.Viewport.add([{xtype:"component",bottom:50,left:0,width:50,height:20,html:"Average",style:"background-color: black; color: white; text-align: center; line-height: 20px; font-size: 8px;"},{id:"__averageFps",xtype:"component",bottom:0,left:0,width:50,height:50,html:"0",style:"background-color: red; color: white; text-align: center; line-height: 50px;"},{xtype:"component",bottom:50,left:50,width:50,height:20,html:"Min (Last 1k)",style:"background-color: black; color: white; text-align: center; line-height: 20px; font-size: 8px;"},{id:"__minFps",xtype:"component",bottom:0,left:50,width:50,height:50,html:"0",style:"background-color: orange; color: white; text-align: center; line-height: 50px;"},{xtype:"component",bottom:50,left:100,width:50,height:20,html:"Max (Last 1k)",style:"background-color: black; color: white; text-align: center; line-height: 20px; font-size: 8px;"},{id:"__maxFps",xtype:"component",bottom:0,left:100,width:50,height:50,html:"0",style:"background-color: yellow; color: black; text-align: center; line-height: 50px;"},{xtype:"component",bottom:50,left:150,width:50,height:20,html:"Current",style:"background-color: black; color: white; text-align: center; line-height: 20px; font-size: 8px;"},{id:"__currentFps",xtype:"component",bottom:0,left:150,width:50,height:50,html:"0",style:"background-color: green; color: white; text-align: center; line-height: 50px;"}]);Ext.AnimationQueue.resetFps()})},resetFps:function(){var d=Ext.getCmp("__currentFps"),c=Ext.getCmp("__averageFps"),i=Ext.getCmp("__minFps"),h=Ext.getCmp("__maxFps"),e=1000,b=0,g=0,f=0;Ext.AnimationQueue.onFpsChanged=function(j){g++;if(!(g%10)){e=1000;b=0}f+=j;e=Math.min(e,j);b=Math.max(b,j);d.setHtml(Math.round(j));c.setHtml(Math.round(f/g));i.setHtml(Math.round(e));h.setHtml(Math.round(b))}}},function(){})})(this);Ext.define("Ext.TaskQueue",{singleton:true,pending:false,mode:true,constructor:function(){this.readQueue=[];this.writeQueue=[];this.run=Ext.Function.bind(this.run,this);this.watch=Ext.Function.bind(this.watch,this);if(Ext.os.is.iOS){setInterval(this.watch,500)}},requestRead:function(c,b,a){this.request(true);this.readQueue.push(arguments)},requestWrite:function(c,b,a){this.request(false);this.writeQueue.push(arguments)},request:function(a){if(!this.pending){this.pendingTime=Date.now();this.pending=true;this.mode=a;if(a){setTimeout(this.run,1)}else{requestAnimationFrame(this.run)}}},watch:function(){if(this.pending&&Date.now()-this.pendingTime>=500){this.run()}},run:function(){this.pending=false;var j=this.readQueue,e=this.writeQueue,c=null,f;if(this.mode){f=j;if(e.length>0){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.scroll.indicator.Abstract",{extend:Ext.Component,config:{baseCls:"x-scroll-indicator",axis:"x",value:null,length:null,minLength:6,hidden:true,ui:"dark",autoHide:true},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){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(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)},updateActive:function(a){this.barElement[a?"addCls":"removeCls"]("active")},doSetHidden:function(b){var a=this;if(b){a.getAutoHide()&&a.setOffset(-10000)}else{delete a.lastLength;delete a.lastOffset;a.updateValue(a.getValue())}},applyLength:function(a){return Math.max(this.getMinLength(),a)},updateLength:function(a){a=Math.round(a);if(this.lastLength===a){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;if(b==="x"){a.translate(c,0)}else{a.translate(0,c)}}}});Ext.define("Ext.scroll.indicator.CssTransform",{extend:Ext.scroll.indicator.Abstract,config:{cls:"csstransform"}});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--}this.setOffset(this.barLength*a)}else{this.setOffset(this.gapLength*a)}},doUpdateLength:function(){if(!this.isDestroyed){var a=this.barLength,b=this.element;this.callParent(arguments);if(this.getAxis()==="x"){b.setLeft(a)}else{b.setTop(a)}}},doSetOffset:function(d){if(!this.isDestroyed){var b=this.barLength,a=this.getMinLength(),c=this.barElement.dom;if(d!==-10000){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.Rounded",{extend:Ext.scroll.indicator.Abstract,config:{cls:"rounded"},constructor:function(){this.callParent(arguments);this.transformPropertyName=Ext.browser.getVendorProperyName("transform")},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()},doUpdateLength:function(c){if(!this.isDestroyed){var b=this.getAxis(),a=this.endElement,e=this.middleElement.dom.style,d=this.endElementLength,h=c-d,g=h-this.startElementLength,f=this.transformPropertyName;if(b==="x"){a.translate(h,0);e[f]="translate3d(0, 0, 0) scaleX("+g+")"}else{a.translate(0,h);e[f]="translate3d(0, 0, 0) scaleY("+g+")"}}}});Ext.define("Ext.scroll.Indicator",{alternateClassName:"Ext.util.Indicator",constructor:function(a){var b=Ext.scroll.indicator;switch(Ext.browser.getPreferredTranslationMethod(a)){case"scrollposition":return new b.ScrollPosition(a);case"csstransform":if(Ext.browser.is.AndroidStock4){return new b.CssTransform(a)}else{return new b.Rounded(a)}}}});Ext.define("Ext.scroll.View",{extend:Ext.Evented,alternateClassName:"Ext.util.ScrollView",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=this.getScroller(),a;a=c.getFirstChild().getFirstChild();if(this.FixedHBoxStretching){a=a.getFirstChild()}c.addCls(this.getCls());c.insertFirst(this.indicatorsGrid);b.setElement(a);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,constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.scrollView.refresh()},setConfig:function(f){var c=this.scrollView,e=this.component,b,d,a,g;if(f){if(!c){this.scrollView=c=new Ext.scroll.View(f);c.on("destroy","onScrollViewDestroy",this);e.setUseBodyElement(true);this.scrollerElement=b=e.innerElement;if(!Ext.feature.has.ProperHBoxStretching){a=c.getScroller();g=(Ext.isObject(f)?f.direction:f)||"auto";if(g!=="vertical"){d=b.wrap();d.addCls(Ext.baseCSSPrefix+"translatable-hboxfix");if(g=="horizontal"){d.setStyle({height:"100%"})}this.scrollContainer=d.wrap();c.FixedHBoxStretching=a.FixedHBoxStretching=true}else{this.scrollContainer=b.wrap()}}else{this.scrollContainer=b.wrap()}c.setElement(e.bodyElement);if(e.isPainted()){this.onComponentPainted()}e.on(this.listeners)}else{if(Ext.isString(f)||Ext.isObject(f)){c.setConfig(f)}}}else{if(c){c.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.util.InputBlocker",{singleton:true,blockInputs:function(){if(Ext.browser.is.ie){Ext.select(".x-field-text .x-field-input:not(.x-item-disabled) .x-input-el, .x-field-textarea .x-field-input:not(.x-item-disabled) .x-input-el, .x-field-search .x-field-input:not(.x-item-disabled) .x-input-el").each(function(a){if(a.dom.offsetWidth>0){a.dom.setAttribute("disabled",true);a.dom.setAttribute("overlayfix",true)}})}},unblockInputs:function(){if(Ext.browser.is.ie){Ext.select("[overlayfix]").each(function(a){a.dom.removeAttribute("disabled");a.dom.removeAttribute("overlayfix")})}}});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);this.on({hide:"onHide"})},onHide:function(){Ext.util.InputBlocker.unblockInputs();if(Ext.browser.is.AndroidStock4&&Ext.os.version.getMinor()===0){var a=this.element.getFirstChild();if(a){a.redraw()}}},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",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){var a=true,c;if(b===false){b=true;a=false}c=Ext.factory(b,Ext.Mask,this.getMasked());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(b){this.element.removeCls(b);this.innerElement.removeCls(a,null,"inner");if(d){this.element.removeCls(this.currentUi)}}if(a){this.element.addCls(a);this.innerElement.addCls(a,null,"inner");if(d){this.element.addCls(a,null,d);this.currentUi=a+"-"+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;if(Ext.isArray(a)){for(b=0,d=a.length;b0&&c.isInnerItem()){f=c}}}else{c=e.factoryItem(a);this.doAdd(c);if(!f&&!this.getActiveItem()&&this.innerItems.length>0&&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(typeof c!="boolean"){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){if(typeof a!="object"){a={x:0,y:0}}return(Math.round(this.x)===Math.round(a.x)&&Math.round(this.y)===Math.round(a.y))},getDistanceTo:function(b){if(typeof b!="object"){b={x:0,y:0}}var c=this.x-b.x,a=this.y-b.y;return Math.sqrt(c*c+a*a)},getAngleTo:function(b){if(typeof b!="object"){b={x:0,y:0}}var c=this.x-b.x,a=this.y-b.y;return Math.atan2(a,c)*this.radianToDegreeConstant}});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",iconCls:null},config:{badgeText:null,text:null,icon:false,iconAlign:"left",pressedDelay:0,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"},{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()}this.refreshIconAlign()}},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","url("+b+")");c.refreshIconAlign()}else{a.setStyle("background-image","");c.hideIconElement()}},updateIconCls:function(c,a){var d=this,b=d.iconElement;if(c){d.showIconElement();b.replaceCls(a,c);d.refreshIconAlign()}else{b.removeCls(a);d.hideIconElement()}},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())},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.removeCls(Ext.baseCSSPrefix+"shown");this.iconElement.addCls(Ext.baseCSSPrefix+"hidden")},showIconElement:function(){this.iconElement.removeCls(Ext.baseCSSPrefix+"hidden");this.iconElement.addCls(Ext.baseCSSPrefix+"shown")},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.data.Connection",{mixins:{observable:Ext.mixin.Observable},statics:{requestId:0},config:{url:null,async:true,method:null,username:"",password:"",disableCaching:false,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(k){k=k||{};var f=this,j=k.scope||window,e=k.username||f.getUsername(),h=k.password||f.getPassword()||"",g=k.xhr2===true&&Ext.feature.has.XHR2,b,c,d,a,i;if(!Ext.isEmpty(e)&&!Ext.isEmpty(h,true)&&Ext.isEmpty(k.withCredentials)){k.withCredentials=true}if(f.fireEvent("beforerequest",f,k)!==false){c=f.setOptions(k,j);if(this.isFormUpload(k)===true){this.upload(k.form,c.url,c.data,k);return null}if(k.autoAbort===true||f.getAutoAbort()){f.abort()}i=this.getXhrInstance();b=k.async!==false?(k.async||f.getAsync()):false;if(e){i.open(c.method,c.url,b,e,h)}else{i.open(c.method,c.url,b)}a=f.setupHeaders(i,k,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:i,headers:a,options:k,async:b,timeout:setTimeout(function(){d.timedout=true;f.abort(d)},k.timeout||f.getTimeout())};f.requests[d.id]=d;if(b){i[g?"onload":"onreadystatechange"]=Ext.Function.bind(f.onStateChange,f,[d])}if(g){i.onerror=Ext.Function.bind(f.onStateChange,f,[d])}if(k.progress){i.onprogress=function(l){if(k.progress.isProgressable){if(l.total===0&&k.progress.getDynamic()){Ext.Logger.warn("Server is not configured to properly return Content-Length. Dynamic progress will be disabled");k.progress.setState.call(k.progress,"download");k.progress.setDynamic(false);i.onprogress=null;return}Ext.callback(k.progress.updateProgress,k.progress,[(l.loaded/l.total),"download"]);if(l.total>0&&!k.progress.getDynamic()&&k.progress.getInitialConfig().dynamic){k.progress.setDynamic(true)}}else{if(Ext.isFunction(k.progress)){Ext.callback(k.progress,k.progressScope||d,[l,"download"])}}};if(Ext.feature.has.XHRUploadProgress){i.upload.onprogress=function(l){f.fireEvent("requestuploadprogress",f,d,l);if(k.progress.isProgressable){Ext.callback(k.progress.updateProgress,k.progress,[(l.loaded/l.total),"upload"])}else{if(Ext.isFunction(k.progress)){Ext.callback(k.progress,k.progressScope||d,[l,"upload"])}}}}if(k.progress.isProgressable){if(!Ext.feature.has.XHRUploadProgress){k.progress.setDynamic(false)}Ext.callback(k.progress.startProgress,k.progress)}}i.send(c.data);if(!b){return this.onComplete(d)}return d}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(e,c,i,l){e=Ext.getDom(e);l=l||{};var d=Ext.id(),k=this,h=document.createElement("iframe"),j=[],g="multipart/form-data",f={target:e.target,method:e.method,encoding:e.encoding,enctype:e.enctype,action:e.action},b=function(m,n){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:n,name:m});e.appendChild(a);j.push(a)},a;Ext.fly(h).set({id:d,name:d,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(h);if(document.frames){document.frames[d].name=d}Ext.fly(e).set({target:d,method:"POST",enctype:g,encoding:g,action:c||f.action});if(i){Ext.iterate(Ext.Object.fromQueryString(i),function(m,n){if(Ext.isArray(n)){Ext.each(n,function(o){b(m,o)})}else{b(m,n)}})}h.addEventListener("load",function(){Ext.callback(k.onUploadComplete,k,[h,l,d]);h.removeEventListener("load",arguments.callee)});e.submit();Ext.fly(e).set(f);Ext.each(j,function(m){Ext.removeNode(m)})},onUploadComplete:function(g,b,h){var a={responseText:"",responseXML:null},f,d;try{f=g.contentWindow||g.contentWindow.document||g.contentDocument||window.frames[h].document;if(f){if(f.hasOwnProperty("body")&&f.body){if(this.textAreaRe.test((d=f.body.firstChild||{}).tagName)){a.responseText=d.value}else{a.responseText=f.body.innerHTML}}a.responseXML=f.XMLDocument||f}}catch(c){a.success=false;a.message="Cross-Domain access is not permitted between frames. XHR2 is recommended for this type of request.";a.error=c}this.onAfterUploadComplete(a,g,b)},onAfterUploadComplete:function(a,d,b){var c=this;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(d)},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.data||k.rawData||k.binaryData||k.xmlData||i||null;if(i&&!Ext.isPrimitive(i)){f=Ext.encode(f)}if(k.binaryData){if(f instanceof Array){f=(new Uint8Array(k.binaryData))}if(f instanceof Uint8Array){f=f.buffer}}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"}}}}if(!(Ext.feature.has.XHR2&&d instanceof FormData)){b["Content-Type"]=k}}if(((h.getUseDefaultXhrHeader()&&m.useDefaultXhrHeader!==false)||m.useDefaultXhrHeader)&&!b["X-Requested-With"]){b["X-Requested-With"]=h.getDefaultXhrHeader()}if(!Ext.isEmpty(m.username)&&!Ext.isEmpty(m.password)){b.Authorization="Basic "+btoa(m.username+":"+m.password)}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.responseType){try{l.responseType=m.responseType==="blob"&&Ext.browser.is.Safari?"arraybuffer":m.responseType}catch(g){}}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&&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(d){var j=d.xhr,a={},k,f,l,g,i,b,e=j.responseType==="blob"||j.responseType==="arraybuffer",h=j.responseType==="text",c=j.responseType==="document";if(d.timedout||d.aborted){d.success=false;k=[]}else{k=j.getAllResponseHeaders().replace(this.lineBreakRe,"\n").split("\n")}f=k.length;while(f--){l=k[f];g=l.indexOf(":");if(g>=0){i=l.substr(0,g).toLowerCase();if(l.charAt(g+1)==" "){++g}a[i]=l.substr(g+1)}}d.xhr=null;delete d.xhr;b={request:d,requestId:d.id,status:j.status,statusText:j.statusText,getResponseHeader:function(m){return a[m.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:e?null:c?null:j.responseText,responseXML:e?null:h?null:j.responseXML,responseBytes:e?j.response:null};if(d.options.responseType==="blob"&&j.responseType==="arraybuffer"){b.responseBytes=new Blob([b.responseBytes],{type:j.getResponseHeader("Content-Type")})}j=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.util.Geolocation",{extend:Ext.Evented,alternateClassName:["Ext.util.GeoLocation"],config:{autoUpdate:true,frequency:10000,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null,allowHighAccuracy:false,timeout:Infinity,maximumAge:0,provider:undefined},updateMaximumAge:function(){if(this.watchOperation){this.updateWatchOperation()}},updateTimeout:function(){if(this.watchOperation){this.updateWatchOperation()}},updateAllowHighAccuracy:function(){if(this.watchOperation){this.updateWatchOperation()}},applyProvider:function(a){if(Ext.feature.has.Geolocation){if(!a){if(navigator&&navigator.geolocation){a=navigator.geolocation}else{if(window.google){a=google.gears.factory.create("beta.geolocation")}}}}else{this.fireEvent("locationerror",this,false,false,true,"This device does not support Geolocation.")}return a},updateAutoUpdate:function(a,b){var c=this,f=c.getProvider();if(b&&f){clearInterval(c.watchOperationId);c.watchOperationId=null}if(a){if(!f){c.fireEvent("locationerror",c,false,false,true,null);return}try{c.updateWatchOperation()}catch(d){c.fireEvent("locationerror",c,false,false,true,d.message)}}},updateWatchOperation:function(){var a=this,b=a.getProvider();if(a.watchOperationId){clearInterval(a.watchOperationId)}function c(){b.getCurrentPosition(Ext.bind(a.fireUpdate,a),Ext.bind(a.fireError,a),a.parseOptions())}c();a.watchOperationId=setInterval(c,this.getFrequency())},updateLocation:function(h,a,c){var b=this,g=b.getProvider();var f=function(i,e){if(e){b.fireError(e)}else{b.fireEvent("locationerror",b,false,false,true,i)}if(h){h.call(a||b,null,b)}};if(!g){f(null);return}try{g.getCurrentPosition(function(e){b.fireUpdate(e);if(h){h.call(a||b,b,b)}},function(e){f(null,e)},c||b.parseOptions())}catch(d){f(d.message)}},fireUpdate:function(a){var b=this,c=a.coords;this.position=a;b.setConfig({timestamp:a.timestamp,latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy,altitude:c.altitude,altitudeAccuracy:c.altitudeAccuracy,heading:c.heading,speed:c.speed});b.fireEvent("locationupdate",b)},fireError:function(a){var b=a.code;this.fireEvent("locationerror",this,b==a.TIMEOUT,b==a.PERMISSION_DENIED,b==a.POSITION_UNAVAILABLE,a.message==undefined?null:a.message)},parseOptions:function(){var b=this.getTimeout(),a={maximumAge:this.getMaximumAge(),enableHighAccuracy:this.getAllowHighAccuracy()};if(b!==Infinity){a.timeout=b}return a},destroy:function(){this.setAutoUpdate(false)}});Ext.define("Ext.Map",{extend:Ext.Container,xtype:"map",isMap:true,config:{baseCls:Ext.baseCSSPrefix+"map",useCurrentLocation:false,map:null,geo:null,mapOptions:{},mapListeners:null},constructor:function(){this.callParent(arguments);if(!(window.google||{}).maps){this.setHtml("Google Maps API is required")}},initialize:function(){this.callParent();this.initMap();this.on({painted:"doResize",scope:this});this.innerElement.on("touchstart","onTouchStart",this)},initMap:function(){var f=this.getMap();if(!f){var e=(window.google||{}).maps;if(!e){return null}var b=this.mapContainer,a=this.getMapOptions(),d=e.event,c=this;if(b.dom.firstChild){Ext.fly(b.dom.firstChild).destroy()}if(Ext.os.is.iPad){Ext.merge({navigationControlOptions:{style:e.NavigationControlStyle.ZOOM_PAN}},a)}a.mapTypeId=a.mapTypeId||e.MapTypeId.ROADMAP;a.center=a.center||new e.LatLng(37.381592,-122.135672);if(a.center&&a.center.latitude&&!Ext.isFunction(a.center.lat)){a.center=new e.LatLng(a.center.latitude,a.center.longitude)}a.zoom=a.zoom||12;f=new e.Map(b.dom,a);this.setMap(f);d.addListener(f,"zoom_changed",Ext.bind(c.onZoomChange,c));d.addListener(f,"maptypeid_changed",Ext.bind(c.onTypeChange,c));d.addListener(f,"center_changed",Ext.bind(c.onCenterChange,c));d.addListenerOnce(f,"tilesloaded",Ext.bind(c.onTilesLoaded,c));this.addMapListeners()}return this.getMap()},renderMap:function(){this.initMap()},getElementConfig:function(){return{reference:"element",className:"x-container",children:[{reference:"innerElement",className:"x-inner",children:[{reference:"mapContainer",className:Ext.baseCSSPrefix+"map-container"}]}]}},onTouchStart:function(a){a.makeUnpreventable()},applyMapOptions:function(a){return Ext.merge({},this.options,a)},updateMapOptions:function(c){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){a.setOptions(c)}},doMapCenter:function(){this.setMapCenter(this.getMapOptions().center)},getMapOptions:function(){return Ext.merge({},this.options||this.getInitialConfig("mapOptions"))},updateUseCurrentLocation:function(a){this.setGeo(a);if(!a){this.setMapCenter()}},applyGeo:function(a){return Ext.factory(a,Ext.util.Geolocation,this.getGeo())},updateGeo:function(b,a){var c={locationupdate:"onGeoUpdate",locationerror:"onGeoError",scope:this};if(a){a.un(c)}if(b){b.on(c);b.updateLocation()}},doResize:function(){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){b.event.trigger(a,"resize")}},onTilesLoaded:function(){this.fireEvent("maprender",this,this.getMap())},addMapListeners:function(){var e=(window.google||{}).maps,a=this.getMap(),j=this.getMapListeners();if(e){var b=e.event,h=this,d,k,i,g,f;if(Ext.isSimpleObject(j)){for(var c in j){d=j[c];if(Ext.isSimpleObject(d)){k=d.scope;i=d.fn}else{if(Ext.isFunction(d)){k=null;i=d}}if(i){g=function(){this.fn.apply(this.scope,[h]);if(this.handle){b.removeListener(this.handle);delete this.handle;delete this.fn;delete this.scope}};f=b.addListener(a,c,Ext.bind(g,g));g.fn=i;g.scope=k;if(d.single===true){g.handle=f}}}}}},onGeoUpdate:function(a){if(a){this.setMapCenter(new google.maps.LatLng(a.getLatitude(),a.getLongitude()))}},onGeoError:Ext.emptyFn,setMapCenter:function(e){var b=this,d=b.getMap(),a=b.getMapOptions(),c=(window.google||{}).maps;if(c){if(!e){if(d&&d.getCenter){e=d.getCenter()}else{if(a.hasOwnProperty("center")){e=a.center}else{e=new c.LatLng(37.381592,-122.135672)}}}if(e&&!(e instanceof c.LatLng)&&"longitude" in e){e=new c.LatLng(e.latitude,e.longitude)}if(!d){a.center=a.center||e;b.renderMap();d=b.getMap()}if(d&&e instanceof c.LatLng){d.panTo(e)}else{this.options=Ext.apply(this.getMapOptions(),{center:e})}}},onZoomChange:function(){var a=this.getMapOptions(),c=this.getMap(),b;b=(c&&c.getZoom)?c.getZoom():a.zoom||10;this.options=Ext.apply(a,{zoom:b});this.fireEvent("zoomchange",this,c,b)},onTypeChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getMapTypeId)?c.getMapTypeId():b.mapTypeId;this.options=Ext.apply(b,{mapTypeId:a});this.fireEvent("typechange",this,c,a)},onCenterChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getCenter)?c.getCenter():b.center;this.options=Ext.apply(b,{center:a});this.fireEvent("centerchange",this,c,a)},destroy:function(){Ext.destroy(this.getGeo());var a=this.getMap();if(a&&(window.google||{}).maps){google.maps.event.clearInstanceListeners(a)}this.callParent()}},function(){});Ext.define("Ext.BingMap",{extend:Ext.Map,xtype:"bingmap",initMap:function(){var f=this.getMap();if(!f){var e=this,c=e.mapContainer,a=e.getMapOptions(),d;var g=Microsoft.Maps;var b="AokX-S2lieXTaXG8pvEw3i2AKYuStBMK8RsUu6BDJ6hrL5AYv0IfQqM9zc-BAA-v";a=Ext.merge({credentials:b,mapTypeId:"r",zoom:12},a);if(!a.center){a.center=new g.Location(37.381592,-122.135672)}if(c.dom.firstChild){Ext.fly(c.dom.firstChild).destroy()}g.loadModule("Microsoft.Maps.Overlays.Style",{callback:function(){e.setMap(new g.Map(c.dom,a));if(a.callback){a.callback()}}});f=e.getMap()}e.fireEvent("maprender",e,f)},setMapCenter:function(c){var a=this,b=a.getMap(),d=Microsoft.Maps;if(!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{delay:150,single:true,args:[c]});return}c=c||new d.Location(37.381592,-122.135672);if(c&&!(c instanceof d.Location)&&"longitude" in c){c=new d.Location(c.latitude,c.longitude)}if(!b){a.initMap();b=a.getMap()}if(b&&c instanceof d.Location){b.updateMapPosition(c)}else{this.options=Ext.apply(this.getMapOptions(),{center:c})}}},function(){});Ext.define("Ext.ComponentQuery",{singleton:true},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,hide:"onButtonHiddenChange",show:"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;bn){d.renderElement.setWidth(n)}}var k=this.spacer.renderElement.getPageBox();if(Ext.browser.is.IE){g.setWidth(k.width)}var l=g.getPageBox(),h=l.width-k.width,e=l.left,j=l.right,c,m,f;if(h>0){c=h/2;e+=c;j-=c;g.setWidth(k.width)}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.app.Action",{config:{scope:null,application:null,controller:null,action:null,args:[],url:undefined,data:{},title:null,beforeFilters:[],currentFilterIndex:-1},constructor:function(a){this.initConfig(a);this.getUrl()},applyBeforeFilters:function(a){return a||[]},execute:function(){this.resume()},resume:function(){var b=this.getCurrentFilterIndex()+1,c=this.getBeforeFilters(),a=this.getController(),d=c[b];if(d){this.setCurrentFilterIndex(b);d.call(a,this)}else{a[this.getAction()].apply(a,this.getArgs())}},applyUrl:function(a){if(a===null||a===undefined){a=this.urlEncode()}return a},applyController:function(a){var c=this.getApplication(),b=c.getCurrentProfile();if(Ext.isString(a)){a=c.getController(a,b?b.getNamespace():null)}return a},urlEncode:function(){var a=this.getController(),b;if(a instanceof Ext.app.Controller){b=a.$className.split(".");a=b[b.length-1]}return a+"/"+this.getAction()}});Ext.define("Ext.app.Controller",{mixins:{observable:Ext.mixin.Observable},config:{refs:{},routes:{},control:{},before:{},application:{},stores:[],models:[],views:[]},constructor:function(a){this.initConfig(a);this.mixins.observable.constructor.call(this,a)},init:Ext.emptyFn,launch:Ext.emptyFn,redirectTo:function(a){return this.getApplication().redirectTo(a)},execute:function(b,a){b.setBeforeFilters(this.getBefore()[b.getAction()]);b.execute()},applyBefore:function(e){var d,a,c,b;for(a in e){d=Ext.Array.from(e[a]);c=d.length;for(b=0;b=1){g+=j.cssText}}a=g.match(/[0-9]+s/g);for(e in a){b=parseInt(a[e]);if(b>c){c=b}}if(this.$themeVariationChangeTimeout){clearTimeout(this.$themeVariationChangeTimeout);this.$themeVariationChangeTimeout=null}this.$themeVariationChangeTimeout=Ext.defer(function(){f.removeCls(k)},b*1000)}f.removeCls(d+l);f.addCls(d+h)}},function(){});Ext.define("Ext.mixin.Sortable",{extend:Ext.mixin.Mixin,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,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=b?this.indices[this.getKey(b)]:-1;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=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,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!=="0"&&!!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",{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,useDefaultXhrHeader: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",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(h.getResponseResult(c))}catch(g){b.setException(g.message);h.fireEvent("exception",h,c,b);return}if(!b.getModel()){b.setModel(this.getModel())}if(b.process(a,i,d,c)===false){h.setException(b,c);h.fireEvent("exception",h,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)},getResponseResult:function(a){return a},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(){},afterRequest:Ext.emptyFn});Ext.define("Ext.data.proxy.Ajax",{extend:Ext.data.proxy.Server,alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],config:{withCredentials:false,useDefaultXhrHeader:true,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,useDefaultXhrHeader:d.getUseDefaultXhrHeader()});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",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;ba)){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.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:Ext.mixin.Observable},isModel:true,config:{idProperty:"id",data:null,fields:undefined,validations:null,associations:null,hasMany:null,hasOne:null,belongsTo:null,proxy:null,identifier:{type:"simple"},clientIdProperty:"clientId",isErased:false,useCache:true},staticConfigs:["idProperty","fields","validations","associations","hasMany","hasOne","belongsTo","clientIdProperty","identifier","useCache","proxy"],statics:{EDIT:"edit",REJECT:"reject",COMMIT:"commit",cache:{},generateProxyMethod:function(a){return function(){var b=this.prototype;return b[a].apply(b,arguments)}},generateCacheId:function(b,c){var a;if(b&&b.isModel){a=b.modelName;if(c===undefined){c=b.getId()}}else{a=b}return a.replace(/\./g,"-").toLowerCase()+"-"+c}},inheritableStatics:{load:function(a,b,h){var f=this.getProxy(),i=this.getIdProperty(),e=null,d={},g,c;h=h||(b&&b.scope)||this;if(Ext.isFunction(b)){b={callback:b,scope:h}}d[i]=a;b=Ext.apply({},b);b=Ext.applyIf(b,{action:"read",params:d,model:this});c=Ext.create("Ext.data.Operation",b);if(!f){Ext.Logger.error("You are trying to load a model that doesn't have a Proxy specified")}g=function(j){if(j.wasSuccessful()){e=j.getRecords()[0]||null;Ext.callback(b.success,h,[e,j])}else{Ext.callback(b.failure,h,[e,j])}Ext.callback(b.callback,h,[e,j])};f.read(c,g,this)}},editing:false,dirty:false,phantom:false,constructor:function(f,h,c,g){var e=this,d=null,a=e.getUseCache(),b=e.getIdProperty();f=f||g||{};if(h||h===0){f[b]=e.internalId=h}h=f[b];if(a&&(h||h===0)){d=Ext.data.Model.cache[Ext.data.Model.generateCacheId(this,h)];if(d){d.raw=c||d.raw;return d.mergeData(g||f||{})}}e.modified={};e.raw=c||f||{};e.stores=[];if(g){e.setConvertedData(f)}else{e.setData(f)}e.id=e.getIdentifier().generate(e);h=e.data[b];if(!h&&h!==0){e.data[b]=e.internalId=e.id;e.phantom=true;if(this.associations.length){this.handleInlineAssociationData(f)}}else{this.internalId=h}if(a){Ext.data.Model.cache[Ext.data.Model.generateCacheId(e)]=e}if(this.init&&typeof this.init=="function"){this.init()}},mergeData:function(a){var g=this,e=g.getFields().items,f=e.length,k=g.modified,c=g.data,d,h,l,j,b;for(d=0;d0){b=n.data.items;k=b.length;o.length=0;for(p=0;p0){h=o.shift();Ext.apply(s[h.associationName][h.j],this.prepareAssociatedData(h.associatedRecord,h.ids,h.associationType))}}}else{if(t&&(f.toLowerCase()=="belongsto"||f.toLowerCase()=="hasone")){a=d[e.getInstanceName()];if(a!==undefined){l=a.id;if(Ext.Array.indexOf(m,l)===-1){m.push(l);s[u]=a.getData();Ext.apply(s[u],this.prepareAssociatedData(a,m,c))}}}}}return s},join:function(a){Ext.Array.include(this.stores,a)},unjoin:function(a){Ext.Array.remove(this.stores,a)},setDirty:function(){var b=this,a;b.dirty=true;b.fields.each(function(c){if(c.getPersist()){a=c.getName();b.modified[a]=b.get(a)}})},validate:function(){var j=Ext.create("Ext.data.Errors"),c=this.getValidations().items,e=Ext.data.Validations,b,d,h,a,g,f;if(c){b=c.length;for(f=0;ff)?1:((ba?1:(d0){b.create=f;g=true}if(d.length>0){b.update=d;g=true}if(a.length>0){b.destroy=a;g=true}if(g&&e.fireEvent("beforesync",this,b)!==false){e.getProxy().batch(Ext.merge({operations:b,listeners:e.getBatchListeners()},c||{}))}return{added:f,updated:d,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(;c0){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.proxy.JsonP",{extend:Ext.data.proxy.Server,alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],config:{defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true},doRequest:function(a,f,b){var d=this,c=d.buildRequest(a),e=c.getParams();c.setConfig({callbackKey:d.getCallbackKey(),timeout:d.getTimeout(),scope:d,callback:d.createRequestCallback(c,a,f,b)});if(d.getAutoAppendParams()){c.setParams({})}c.setJsonP(Ext.data.JsonP.request(c.getCurrentConfig()));c.setParams(e);a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(h,f,g){delete c.lastRequest;c.processResponse(h,a,d,f,e,b)}},setException:function(b,a){b.setException(b.getRequest().getJsonP().errorType)},buildUrl:function(f){var e=this,a=e.callParent(arguments),h=Ext.apply({},f.getParams()),d=h.filters,c,b,g;delete h.filters;if(e.getAutoAppendParams()){a=Ext.urlAppend(a,Ext.Object.toQueryString(h))}if(d&&d.length){for(b=0;bg){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 ."+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;e{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,c=b.getTriggerEvent();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;if(c){b.on(c,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){if(!this.isDestroyed){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){if(b.isComponent){b.renderElement.addCls(c.getPressedCls())}else{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){if(h.isComponent){h.renderElement.removeCls(f.getPressedCls())}else{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){if(h.isComponent){h.renderElement.removeCls(f.getPressedCls())}else{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){if(b.isComponent){b.renderElement.removeCls(c.getPressedCls());b.renderElement.addCls(c.getSelectedCls())}else{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){if(b.isComponent){b.renderElement.removeCls([c.getPressedCls(),c.getSelectedCls()])}else{b.removeCls([c.getPressedCls(),c.getSelectedCls()])}}},updateData:function(b){var a=this.getStore();if(!a){this.setStore(Ext.create("Ext.data.Store",{data:b,autoDestroy:true}))}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){e.un(f);if(!d.isDestroyed){d.onStoreClear()}if(e.getAutoDestroy()){e.destroy()}else{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(g){var a=g.container,l=g.getStore(),b=l.getRange(),f=g.getViewItems(),j=b.length,o=f.length,c=j-o,h=g.getScrollable(),d,m;if(this.getScrollToTopOnRefresh()&&h){h.getScroller().scrollToTop()}if(j<1){g.onStoreClear();return}else{g.hideEmptyText()}if(c<0){a.moveItemsToCache(o+c,o-1);f=g.getViewItems();o=f.length}else{if(c>0){a.moveItemsFromCache(l.getRange(o))}}for(d=0;dd.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(em){l=m-j;if(lk){break}q=d.shift();d.push(q);n.updateListItem(q,a,c);n.topRenderedIndex++}}}}}},onAnimationIdle:function(){var m=this,d=m.getListItemInfo(),c=m.getBufferSize(),k=m.topVisibleIndex,h=m.topRenderedIndex,j=m.getStore().getCount()-1,f=m.listItems,o=f.length,b,e,g,l,n,a;b=k-h;e=h+c-k;if(b0){l=e-b;for(g=0;gj){break}n=f.shift();f.push(n);m.updateListItem(n,a,d);m.topRenderedIndex++}}m.handleItemHeights();m.handleItemTransforms();m.onIdleBound=false},handleItemHeights:function(){var n=this,e=n.updatedItems,k=e.length,f=n.getItemMap(),b=n.getUseSimpleItems(),r=f.getMinimumHeight(),q=n.headerIndices,l=n.headerMap,c=n.getVariableHeights(),a,h,g,m,p,o,d;for(h=0;h=0||(b===0&&d+m>=0)||(b===0&&-m<=k[b])){g=-10000}else{if(j<0){g=j}else{g=Math.max(0,m)}}a=n.getGroupString(i);if(c.$currentHeader!=a){c.setHtml(a);c.$currentHeader=a}if(c.$position!=g){c.translate(0,g);c.$position=g}}},createItem:function(c){var i=this,a=i.container,d=i.listItems,g=i.getInfinite(),h=i.scrollElement,f=i.getUseHeaders(),j,e,b;j=Ext.factory(c);j.dataview=i;j.$height=c.minHeight;if(!g){b=i.getBaseCls()+"-item-relative";j.addCls(b)}if(f){e=j.getHeader();if(!g){e.addCls(b)}else{e.setTranslatable({translationMethod:this.translationMethod});e.translate(0,-10000);h.insertFirst(e.renderElement)}}a.doAdd(j);d.push(j);return j},setItemsCount:function(a){var d=this,e=d.listItems,b=d.getListItemConfig(),f=a-e.length,c;for(c=0;c=0){k[b]=true}}k[e-1]=true;return m},onIndex:function(c,f){var h=this,l=f.toLowerCase(),j=h.getStore(),d=j.getGroups(),g=d.length,k,e,b,a;for(e=0;e=l){b=k;break}else{b=k}}if(b){this.scrollToRecord(b.children[0])}},scrollToRecord:function(f,b,c){var i=this,g=i.container.getScrollable().getScroller(),j=i.getStore(),h=j.indexOf(f);g.stopAnimation();var a=g.getContainerSize().y,l=g.getSize().y,d=l-a,e,k;if(i.getInfinite()){e=i.getItemMap().map[h]}else{k=i.listItems[h];if(i.getUseHeaders()&&k.getHeader().isPainted()){e=k.getHeader().renderElement.dom.offsetTop}else{e=k.renderElement.dom.offsetTop}}if(!c){e=Math.min(e,d)}g.scrollTo(0,e,!!b)},onItemAdd:function(c){var b=this,a=c.config;if(a.scrollDock){if(a.scrollDock=="bottom"){b.scrollDockItems.bottom.push(c)}else{b.scrollDockItems.top.push(c)}if(b.getInfinite()){c.on({resize:"onScrollDockItemResize",scope:this});c.addCls(b.getBaseCls()+"-scrolldockitem");c.setTranslatable({translationMethod:this.translationMethod});c.translate(0,-10000);c.$scrollDockHeight=0}b.container.doAdd(c)}else{b.callParent(arguments)}},getScrollDockedItems:function(){return this.scrollDockItems.bottom.slice().concat(this.scrollDockItems.top.slice())},onScrollDockItemResize:function(g,c){var f=this,a=f.listItems,e=a.length,b,d;Ext.getCmp(g.id).$scrollDockHeight=c.height;for(b=0;b(?:[\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 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=j;c.contentWidth=a;c.contentHeight=i;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.Default",{extend:Ext.util.sizemonitor.Abstract,updateElement:function(a){},bindListeners:function(b){var a=this.getElement().dom;if(!a){return}if(b){a.onresize=this.refresh}else{delete a.onresize}},getContentBounds:function(){return this.getElement().dom.getBoundingClientRect()},getContentWidth:function(){return this.getElement().getWidth()},getContentHeight:function(){return this.getElement().getHeight()}});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](Ext.browser.is.Firefox?"underflow":"overflowchanged",this.onExpand,true);this.shrinkMonitor[a](Ext.browser.is.Firefox?"overflow":"overflowchanged",this.onShrink,true)},onExpand:function(a){if(Ext.browser.is.Webkit&&a.horizontalOverflow&&a.verticalOverflow){return}Ext.TaskQueue.requestRead("refresh",this)},onShrink:function(a){if(Ext.browser.is.Webkit&&!a.horizontalOverflow&&!a.verticalOverflow){return}Ext.TaskQueue.requestRead("refresh",this)},refreshMonitors:function(){if(this.isDestroyed){return}var f=this.expandHelper,e=this.shrinkHelper,b=this.getContentBounds(),d=b.width,a=b.height,c;if(f&&!f.isDestroyed){c=f.style;c.width=(d+1)+"px";c.height=(a+1)+"px"}if(e&&!e.isDestroyed){c=e.style;c.width=d+"px";c.height=a+"px"}Ext.TaskQueue.requestRead("refresh",this)}});Ext.define("Ext.util.SizeMonitor",{constructor:function(a){var b=Ext.util.sizemonitor;if(Ext.browser.is.Firefox){return new b.OverflowChange(a)}else{if(Ext.browser.is.WebKit){if(!Ext.browser.is.Silk&&Ext.browser.engineVersion.gtEq("535")){return new b.OverflowChange(a)}else{return new b.Scroll(a)}}else{if(Ext.browser.is.IE11){return new b.Scroll(a)}else{return new b.Default(a)}}}}});Ext.define("Ext.event.publisher.ElementSize",{extend:Ext.event.publisher.Publisher,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,isNotPreventable:/^(select|a)$/i,handledEvents:["touchstart","touchmove","touchend","touchcancel"],mouseToTouchMap:{mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},lastEventType:null,config:{moveThrottle:0,recognizers:{}},constructor:function(a){this.eventProcessors={touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd};this.eventToRecognizerMap={};this.activeRecognizers=[];this.touchesMap={};this.currentIdentifiers=[];if(Ext.browser.is.Chrome&&Ext.os.is.Android){this.screenPositionRatio=Ext.browser.version.gt("18")?1:1/window.devicePixelRatio}else{if(Ext.browser.is.AndroidStock4){this.screenPositionRatio=1}else{if(Ext.os.is.BlackBerry){this.screenPositionRatio=1/window.devicePixelRatio}else{if(Ext.browser.engineName=="WebKit"&&Ext.os.is.Desktop){this.screenPositionRatio=1}else{this.screenPositionRatio=window.innerWidth/window.screen.width}}}}this.initConfig(a);return this.callSuper()},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.callSuper(arguments)||this.eventToRecognizerMap.hasOwnProperty(a)},doesEventBubble:function(){return true},onEvent:function(f){var d=f.type,b=this.lastEventType,c=[f];if(this.eventProcessors[d]){this.eventProcessors[d].call(this,f);return}if("button" in f&&f.button>0){return}else{if(d==="mousedown"&&b&&b!=="mouseup"){var a=document.createEvent("MouseEvent");a.initMouseEvent("mouseup",f.bubbles,f.cancelable,document.defaultView,f.detail,f.screenX,f.screenY,f.clientX,f.clientY,f.ctrlKey,f.altKey,f.shiftKey,f.metaKey,f.metaKey,f.button,f.relatedTarget);this.onEvent(a)}if(d!=="mousemove"){this.lastEventType=d}f.identifier=1;f.touches=(d!=="mouseup")?c:[];f.targetTouches=(d!=="mouseup")?c:[];f.changedTouches=c;this.eventProcessors[this.mouseToTouchMap[d]].call(this,f)}},registerRecognizer:function(a){var g=this.eventToRecognizerMap,e=this.activeRecognizers,c=a.getHandledEvents(),d,f,b;a.setOnRecognized(this.onRecognized);a.setCallbackScope(this);for(d=0,f=c.length;d0){this.invokeRecognizers("onTouchMove",d)}},onTouchEnd:function(h){if(!this.isStarted){return}if(this.lastMoveEvent){this.onAnimationFrame()}var a=this.touchesMap,d=this.currentIdentifiers,f=h.changedTouches,g=f.length,b,c,j;this.updateTouches(f);f=h.changedTouches;for(c=0;c0){return}var a=this.pointerToTouchMap[b.type];b.identifier=b.pointerId;b.changedTouches=[b];this.eventProcessors[a].call(this,b)}})}else{if(!Ext.browser.is.Ripple&&(Ext.os.is.ChromeOS||!Ext.feature.has.Touch)){this.override({handledEvents:["touchstart","touchmove","touchend","touchcancel","mousedown","mousemove","mouseup"]})}}});Ext.define("Ext.event.recognizer.Recognizer",{mixins:[Ext.mixin.Identifiable],handledEvents:[],config:{onRecognized:Ext.emptyFn,onFailed:Ext.emptyFn,callbackScope:null},constructor:function(a){this.initConfig(a);return this},getHandledEvents:function(){return this.handledEvents},onStart:Ext.emptyFn,onEnd:Ext.emptyFn,fail:function(){this.getOnFailed().apply(this.getCallbackScope(),arguments);return false},fire:function(){this.getOnRecognized().apply(this.getCallbackScope(),arguments)}});Ext.define("Ext.event.recognizer.Touch",{extend:Ext.event.recognizer.Recognizer,onTouchStart:Ext.emptyFn,onTouchMove:Ext.emptyFn,onTouchEnd:Ext.emptyFn});Ext.define("Ext.event.recognizer.SingleTouch",{extend:Ext.event.recognizer.Touch,inheritableStatics:{NOT_SINGLE_TOUCH:1,TOUCH_MOVED:2},onTouchStart:function(a){if(a.touches.length>1){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"],config:{minDistance:8},constructor:function(){this.callSuper(arguments);this.info={touch:null,previous:{x:0,y:0},x:0,y:0,delta:{x:0,y:0},absDelta:{x:0,y:0},flick:{velocity:{x:0,y:0}},direction:{x:0,y:0},time:0,previousTime:{x:0,y:0}}},onTouchStart:function(a){if(this.callSuper(arguments)===false){if(this.isStarted&&this.lastMoveEvent!==null){this.lastMoveEvent.isStopped=false;this.onTouchEnd(this.lastMoveEvent)}return false}this.startTime=a.time;this.startPoint=a.changedTouches[0].point},tryDragStart:function(f){var b=this.startPoint,d=f.changedTouches,h=d[0],a=h.point,g=this.getMinDistance(),c=this.info;if(Math.abs(a.getDistanceTo(b))>=g){this.isStarted=true;this.previousPoint=this.lastPoint=a;this.resetInfo("x",f,h);this.resetInfo("y",f,h);c.time=f.time;this.fire("dragstart",f,d,c)}},onTouchMove:function(c){if(!this.isStarted){this.tryDragStart(c)}if(!this.isStarted){return}var b=c.changedTouches,d=b[0],a=d.point;if(this.lastPoint){this.previousPoint=this.lastPoint}this.lastPoint=a;this.lastMoveEvent=c;this.updateInfo("x",c,d,true);this.updateInfo("y",c,d,true);this.info.time=c.time;this.fire("drag",c,b,this.info)},onAxisDragEnd:function(a,c){var b=c.time-c.previousTime[a];if(b>0){c.flick.velocity[a]=(c[a]-c.previous[a])/b}},resetInfo:function(c,g,i){var d=this.lastPoint[c],b=this.startPoint[c],h=d-b,a=c.toUpperCase(),f=this.info;f.touch=i;f.delta[c]=h;f.absDelta[c]=Math.abs(h);f.previousTime[c]=this.startTime;f.previous[c]=b;f[c]=d;f.direction[c]=0;f["start"+a]=this.startPoint[c];f["previous"+a]=f.previous[c];f["page"+a]=f[c];f["delta"+a]=f.delta[c];f["absDelta"+a]=f.absDelta[c];f["previousDelta"+a]=0;f.startTime=this.startTime},updateInfo:function(f,k,j,l){var d=k.time,n=this.lastPoint[f],g=this.previousPoint[f],a=this.startPoint[f],o=n-a,c=this.info,m=c.direction,i=f.toUpperCase(),b=c.previous[f],h;c.touch=j;h=c.delta[f];c.delta[f]=o;c.absDelta[f]=Math.abs(o);if(l&&n!==b&&n!==c[f]&&d-c.previousTime[f]>=50){c.previous[f]=c[f];c.previousTime[f]=c.time}c[f]=n;if(n>g){m[f]=1}else{if(nthis.getMaxDuration()){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(this.isHorizontal&&c>this.getMaxOffset()){this.isHorizontal=false}if(this.isVertical&&d>this.getMaxOffset()){this.isVertical=false}if(!this.isVertical||!this.isHorizontal){if(this.isHorizontal&&df){this.isVertical=false}if(this.isHorizontal&&b>f){this.isHorizontal=false}if(this.isVertical&&this.isHorizontal){if(b>c){this.isHorizontal=false}else{this.isVertical=false}}if(this.isHorizontal){m=(h<0)?"left":"right";a=h}else{if(this.isVertical){m=(g<0)?"up":"down";a=g}}this.direction=this.direction||m;if(this.direction=="up"){a=g*-1}else{if(this.direction=="left"){a=h*-1}}this.distance=a;if(a==0){return this.fail(this.self.DISTANCE_NOT_ENOUGH)}if(!this.started){if(this.direction=="right"&&this.startX>p){return this.fail(this.self.NOT_NEAR_EDGE)}else{if(this.direction=="down"&&this.startY>p){return this.fail(this.self.NOT_NEAR_EDGE)}else{if(this.direction=="left"&&(n-this.startX)>p){return this.fail(this.self.NOT_NEAR_EDGE)}else{if(this.direction=="up"&&(j-this.startY)>p){return this.fail(this.self.NOT_NEAR_EDGE)}}}}this.started=true;this.startTime=k.time;this.fire("edgeswipestart",k,[i],{touch:i,direction:this.direction,distance:this.distance,duration:d})}else{this.fire("edgeswipe",k,[i],{touch:i,direction:this.direction,distance:this.distance,duration:d})}},onTouchEnd:function(b){if(this.onTouchMove(b)!==false){var c=b.changedTouches[0],a=b.time-this.startTime;this.fire("edgeswipeend",b,[c],{touch:c,direction:this.direction,distance:this.distance,duration:a})}}});Ext.define("Ext.event.recognizer.LongPress",{extend:Ext.event.recognizer.SingleTouch,inheritableStatics:{DURATION_NOT_ENOUGH:32},config:{minDuration:1000},handledEvents:["longpress"],fireLongPress:function(a){var b=a.changedTouches[0];this.fire("longpress",a,[b],{touch:b,duration:this.getMinDuration()});this.isLongPress=true},onTouchStart:function(b){var a=this;if(this.callParent(arguments)===false){return false}this.isLongPress=false;this.timer=setTimeout(function(){a.fireLongPress(b)},this.getMinDuration())},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(){if(!this.isLongPress){return this.fail(this.self.DURATION_NOT_ENOUGH)}},fail:function(){clearTimeout(this.timer);return this.callParent(arguments)}},function(){this.override({handledEvents:["longpress","taphold"],fire:function(a){if(a==="longpress"){var b=Array.prototype.slice.call(arguments);b[0]="taphold";this.fire.apply(this,b)}return this.callOverridden(arguments)}})});Ext.define("Ext.event.recognizer.MultiTouch",{extend:Ext.event.recognizer.Touch,requiredTouchesCount:2,isTracking:false,isStarted:false,onTouchStart:function(d){var a=this.requiredTouchesCount,c=d.touches,b=c.length;if(b===a){this.start(d)}else{if(b>a){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)=this.getMoveDistance()){this.fire("tapcancel",b,[c],{touch:c});return this.fail(this.self.TOUCH_MOVED)}},onTouchEnd:function(a){var b=a.changedTouches[0];this.fire("tap",a,[b],{touch:b})}});Ext.define("Ext.fx.runner.Css",{extend:Ext.Evented,prefixedProperties:{transform:true,"transform-origin":true,perspective:true,"transform-style":true,transition:true,"transition-property":true,"transition-duration":true,"transition-timing-function":true,"transition-delay":true,animation:true,"animation-name":true,"animation-duration":true,"animation-iteration-count":true,"animation-direction":true,"animation-timing-function":true,"animation-delay":true},lengthProperties:{top:true,right:true,bottom:true,left:true,width:true,height:true,"max-height":true,"max-width":true,"min-height":true,"min-width":true,"margin-bottom":true,"margin-left":true,"margin-right":true,"margin-top":true,"padding-bottom":true,"padding-left":true,"padding-right":true,"padding-top":true,"border-bottom-width":true,"border-left-width":true,"border-right-width":true,"border-spacing":true,"border-top-width":true,"border-width":true,"outline-width":true,"letter-spacing":true,"line-height":true,"text-indent":true,"word-spacing":true,"font-size":true,translate:true,translateX:true,translateY:true,translateZ:true,translate3d:true},durationProperties:{"transition-duration":true,"transition-delay":true,"animation-duration":true,"animation-delay":true},angleProperties:{rotate:true,rotateX:true,rotateY:true,rotateZ:true,skew:true,skewX:true,skewY:true},lengthUnitRegex:/([a-z%]*)$/,DEFAULT_UNIT_LENGTH:"px",DEFAULT_UNIT_ANGLE:"deg",DEFAULT_UNIT_DURATION:"ms",formattedNameCache:{},constructor:function(){var a=Ext.feature.has.Css3dTransforms;if(a){this.transformMethods=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","scaleX","scaleY","scaleZ"]}else{this.transformMethods=["translateX","translateY","rotate","skewX","skewY","scaleX","scaleY"]}this.vendorPrefix=Ext.browser.getStyleDashPrefix();this.ruleStylesCache={};return this},getStyleSheet:function(){var c=this.styleSheet,a,b;if(!c){a=document.createElement("style");a.type="text/css";(document.head||document.getElementsByTagName("head")[0]).appendChild(a);b=document.styleSheets;this.styleSheet=c=b[b.length-1]}return c},applyRules:function(i){var g=this.getStyleSheet(),k=this.ruleStylesCache,j=g.cssRules,c,e,h,b,d,a,f;for(c in i){e=i[c];h=k[c];if(h===undefined){d=j.length;g.insertRule(c+"{}",d);h=k[c]=j.item(d).style}b=h.$cache;if(!b){b=h.$cache={}}for(a in e){f=this.formatValue(e[a],a);a=this.formatName(a);if(b[a]!==f){b[a]=f;if(f===null){h.removeProperty(a)}else{h.setProperty(a,f,"important")}}}}return this},applyStyles:function(d){var g,c,f,b,a,e;for(g in d){if(d.hasOwnProperty(g)){c=document.getElementById(g);if(!c){return this}f=c.style;b=d[g];for(a in b){if(b.hasOwnProperty(a)){e=this.formatValue(b[a],a);a=this.formatName(a);if(e===null){f.removeProperty(a)}else{f.setProperty(a,e,"important")}}}}}return this},formatName:function(b){var a=this.formattedNameCache,c=a[b];if(!c){if((Ext.os.is.Tizen||!Ext.feature.has.CssTransformNoPrefix)&&this.prefixedProperties[b]){c=this.vendorPrefix+b}else{c=b}a[b]=c}return c},formatValue:function(j,b){var g=typeof j,l=this.DEFAULT_UNIT_LENGTH,e,a,d,f,c,k,h;if(j===null){return""}if(g=="string"){if(this.lengthProperties[b]){h=j.match(this.lengthUnitRegex)[1];if(h.length>0){}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);if(Ext.browser.is.Firefox){d.offsetHeight}e=a.getPropertyValue(b);c.removeProperty(b);return e},run:function(q){var G=this,h=this.lengthProperties,y={},F={},H={},d,t,z,e,v,J,w,r,s,a,n,B,A,p,C,l,u,g,D,I,k,f,x,o,c,E,b,m;if(!this.listenersAttached){this.attachListeners()}q=Ext.Array.from(q);for(B=0,p=q.length;B0){this.refreshRunningAnimationsData(d,Ext.Array.merge(J,w),true,H.replacePrevious)}c=a.nameMap;E=a.nameList;u={};for(A=0;A0){J=Ext.Array.difference(E,J);w=Ext.Array.merge(J,w);n["transition-property"]=J}y[t]=n;F[t]=Ext.apply({},e);F[t]["transition-property"]=w;F[t]["transition-duration"]=H.duration;F[t]["transition-timing-function"]=H.easing;F[t]["transition-delay"]=H.delay;C.startTime=Date.now()}s=this.$className;this.applyStyles(y);r=function(i){if(i.data===s&&i.source===window){window.removeEventListener("message",r,false);G.applyStyles(F)}};if(Ext.browser.is.IE){window.requestAnimationFrame(function(){window.addEventListener("message",r,false);window.postMessage(s,"*")})}else{window.addEventListener("message",r,false);window.postMessage(s,"*")}},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;b1;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);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;r.refreshTitlePosition()});if(Ext.browser.is.AndroidStock2&&!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.browser.is.AndroidStock2&&!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-n-s;if(o!==undefined){i=o}else{i=g}}else{i=c+m-n-s;if(o!==undefined){b=o}else{b=g}i=Math.max(d,i)}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){if(b&&b.getDocked()&&b.config.title===true){this.$titleContainer=b}this.doItemLayoutAdd(b,a);var c=this.getInitialConfig().navigationBar;if(!this.isItemsInitializing&&b.isInnerItem()){this.setActiveItem(b);if(c){this.getNavigationBar().onViewAdd(this,b,a)}if(this.$backButtonContainer){this.$backButton.show()}}if(b&&b.isInnerItem()){this.updateTitleContainerTitle((b.getTitle)?b.getTitle():b.config.title)}if(this.initialized){this.fireEvent("add",this,b,a)}},updateTitleContainerTitle:function(a){if(this.$titleContainer){this.$titleContainer.setTitle(a)}else{this.$currentTitle=a}},reset:function(){return this.pop(this.getInnerItems().length)}});Ext.define("Ext.tab.Tab",{extend:Ext.Button,xtype:"tab",alternateClassName:"Ext.Tab",isTab:true,config:{baseCls:Ext.baseCSSPrefix+"tab",pressedCls:Ext.baseCSSPrefix+"tab-pressed",activeCls:Ext.baseCSSPrefix+"tab-active",active:false,title:" "},updateIconCls:function(b,a){this.callParent([b,a]);if(a){this.removeCls("x-tab-icon")}if(b){this.addCls("x-tab-icon")}},updateTitle:function(a){this.setText(a)},updateActive:function(c,b){var a=this.getActiveCls();if(c&&!b){this.element.addCls(a);this.fireEvent("activate",this)}else{if(b){this.element.removeCls(a);this.fireEvent("deactivate",this)}}}},function(){this.override({activate:function(){this.setActive(true)},deactivate:function(){this.setActive(false)}})});Ext.define("Ext.tab.Bar",{extend:Ext.Toolbar,alternateClassName:"Ext.TabBar",xtype:"tabbar",config:{baseCls:Ext.baseCSSPrefix+"tabbar",defaultType:"tab",layout:{type:"hbox",align:"middle"}},eventedConfig:{activeTab:null},platformConfig:[{theme:["Blackberry","CupertinoClassic","MountainView"],defaults:{flex:1}}],initialize:function(){var a=this;a.callParent();a.on({tap:"onTabTap",delegate:"> tab",scope:a})},onTabTap:function(a){this.setActiveTab(a)},applyActiveTab:function(b,c){if(!b&&b!==0){return}var a=this.parseActiveTab(b);if(!a){return}return a},doSetDocked:function(a){var c=this.getLayout(),d=this.getInitialConfig(),b;if(!d.layout||!d.layout.pack){b=(a=="bottom")?"center":"left";if(c.isLayout){c.setPack(b)}else{c.pack=(c&&c.pack)?c.pack:b}}this.callParent(arguments)},doSetActiveTab:function(b,a){if(b){b.setActive(true)}if(a&&a.parent){a.setActive(false)}},parseActiveTab:function(a){if(typeof a=="number"){return this.getItems().items[a]}else{if(typeof a=="string"){a=Ext.getCmp(a)}}return a}});Ext.define("Ext.tab.Panel",{extend:Ext.Container,xtype:"tabpanel",alternateClassName:"Ext.TabPanel",config:{ui:"dark",tabBar:true,tabBarPosition:"top",layout:{type:"card",animation:{type:"slide",direction:"left"}},cls:Ext.baseCSSPrefix+"tabpanel"},initialize:function(){this.callParent();this.on({order:"before",activetabchange:"doTabChange",delegate:"> tabbar",scope:this});this.on({disabledchange:"onItemDisabledChange",delegate:"> component",scope:this})},platformConfig:[{theme:["Blackberry"],tabBarPosition:"bottom"}],applyScrollable:function(){return false},updateUi:function(a,b){this.callParent(arguments);if(this.initialized){this.getTabBar().setUi(a)}},doSetActiveItem:function(d,j){if(d){var f=this.getInnerItems(),g=f.indexOf(j),i=f.indexOf(d),e=g>i,c=this.getLayout().getAnimation(),b=this.getTabBar(),h=b.parseActiveTab(g),a=b.parseActiveTab(i);if(c&&c.setReverse){c.setReverse(e)}this.callParent(arguments);if(i!=-1){this.forcedChange=true;b.setActiveTab(i);this.forcedChange=false;if(h){h.setActive(false)}if(a){a.setActive(true)}}}},doTabChange:function(a,d){var b=this.getActiveItem(),c;this.setActiveItem(a.indexOf(d));c=this.getActiveItem();return this.forcedChange||b!==c},applyTabBar:function(a){if(a===true){a={}}if(a){Ext.applyIf(a,{ui:this.getUi(),docked:this.getTabBarPosition()})}return Ext.factory(a,Ext.tab.Bar,this.getTabBar())},updateTabBar:function(a){if(a){this.add(a);this.setTabBarPosition(a.getDocked())}},updateTabBarPosition:function(b){var a=this.getTabBar();if(a){a.setDocked(b)}},onItemAdd:function(e){var k=this;if(!e.isInnerItem()){return k.callParent(arguments)}var c=k.getTabBar(),o=e.getInitialConfig(),d=o.tab||{},g=(e.getTitle)?e.getTitle():o.title,i=(e.getIconCls)?e.getIconCls():o.iconCls,j=(e.getHidden)?e.getHidden():o.hidden,n=(e.getDisabled)?e.getDisabled():o.disabled,p=(e.getBadgeText)?e.getBadgeText():o.badgeText,b=k.getInnerItems(),h=b.indexOf(e),l=c.getItems(),a=c.getActiveTab(),m=(l.length>=b.length)&&l.getAt(h),f;if(g&&!d.title){d.title=g}if(i&&!d.iconCls){d.iconCls=i}if(j&&!d.hidden){d.hidden=j}if(n&&!d.disabled){d.disabled=n}if(p&&!d.badgeText){d.badgeText=p}f=Ext.factory(d,Ext.tab.Tab,m);if(!m){c.insert(h,f)}e.tab=f;k.callParent(arguments);if(!a&&a!==0){c.setActiveTab(c.getActiveItem())}},onItemDisabledChange:function(a,b){if(a&&a.tab){a.tab.setDisabled(b)}},onItemRemove:function(b,a){this.getTabBar().remove(b.tab,this.getAutoDestroy());this.callParent(arguments)}},function(){});Ext.define("Ext.viewport.Default",{extend:Ext.Container,xtype:"viewport",PORTRAIT:"portrait",LANDSCAPE:"landscape",config:{autoMaximize:false,autoBlurInput:true,preventPanning:true,preventZooming:false,autoRender:true,layout:"card",width:"100%",height:"100%",useBodyElement:true,menus:{}},isReady:false,isViewport:true,isMaximizing:false,id:"ext-viewport",isInputRegex:/^(input|textarea|select|a)$/i,focusedElement:null,fullscreenItemCls:Ext.baseCSSPrefix+"fullscreen",constructor:function(a){var b=Ext.Function.bind;this.doPreventPanning=b(this.doPreventPanning,this);this.doPreventZooming=b(this.doPreventZooming,this);this.doBlurInput=b(this.doBlurInput,this);this.maximizeOnEvents=["ready","orientationchange"];window.devicePixelRatio=window.devicePixelRatio||1;this.callSuper([a]);this.orientation=this.determineOrientation();this.windowWidth=this.getWindowWidth();this.windowHeight=this.getWindowHeight();this.windowOuterHeight=this.getWindowOuterHeight();if(!this.stretchHeights){this.stretchHeights={}}if(!Ext.os.is.Android||Ext.browser.is.ChromeMobile){if(this.supportsOrientation()){this.addWindowListener("orientationchange",b(this.onOrientationChange,this))}else{this.addWindowListener("resize",b(this.onResize,this))}}document.addEventListener("focus",b(this.onElementFocus,this),true);document.addEventListener("blur",b(this.onElementBlur,this),true);Ext.onDocumentReady(this.onDomReady,this);this.on("ready",this.onReady,this,{single:true});this.getEventDispatcher().addListener("component","*","fullscreen","onItemFullscreenChange",this);return this},onDomReady:function(){this.isReady=true;this.updateSize();this.fireEvent("ready",this)},onReady:function(){if(this.getAutoRender()){this.render()}if(Ext.browser.name=="ChromeiOS"){this.setHeight("-webkit-calc(100% - "+((window.outerHeight-window.innerHeight)/2)+"px)")}},onElementFocus:function(a){this.focusedElement=a.target},onElementBlur:function(){this.focusedElement=null},render:function(){if(!this.rendered){var a=Ext.getBody(),b=Ext.baseCSSPrefix,h=[],d=Ext.os,g=d.name.toLowerCase(),f=Ext.browser.name.toLowerCase(),e=d.version.getMajor(),c=this.getOrientation();this.renderTo(a);h.push(b+d.deviceType.toLowerCase());if(d.is.iPad){h.push(b+"ipad")}h.push(b+g);h.push(b+f);if(e){h.push(b+g+"-"+e)}if(d.is.BlackBerry){h.push(b+"bb")}if(Ext.browser.is.WebKit){h.push(b+"webkit")}if(Ext.browser.is.Standalone){h.push(b+"standalone")}if(Ext.browser.is.AndroidStock){h.push(b+"android-stock")}h.push(b+c);a.addCls(h)}},applyAutoBlurInput:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doBlurInput,false)}else{this.removeWindowListener(b,this.doBlurInput,false)}return a},applyAutoMaximize:function(a){if(Ext.browser.is.WebView){a=false}if(a){this.on("ready","doAutoMaximizeOnReady",this,{single:true});this.on("orientationchange","doAutoMaximizeOnOrientationChange",this)}else{this.un("ready","doAutoMaximizeOnReady",this);this.un("orientationchange","doAutoMaximizeOnOrientationChange",this)}return a},applyPreventPanning:function(a){if(a){this.addWindowListener("touchmove",this.doPreventPanning,false)}else{this.removeWindowListener("touchmove",this.doPreventPanning,false)}return a},applyPreventZooming:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doPreventZooming,false)}else{this.removeWindowListener(b,this.doPreventZooming,false)}return a},doAutoMaximizeOnReady:function(){var a=arguments[arguments.length-1];a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();a.resume();this.fireEvent("ready",this)},this,{single:true});this.maximize()},doAutoMaximizeOnOrientationChange:function(){var a=arguments[arguments.length-1],b=a.firingArguments;a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();b[2]=this.windowWidth;b[3]=this.windowHeight;a.resume()},this,{single:true});this.maximize()},doBlurInput:function(b){var a=b.target,c=this.focusedElement;if(c&&c.nodeName.toUpperCase()!="BODY"&&!this.isInputRegex.test(a.tagName)){delete this.focusedElement;c.blur()}},doPreventPanning:function(a){a.preventDefault()},doPreventZooming:function(b){if("button" in b&&b.button!==0){return}var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)){b.preventDefault()}},addWindowListener:function(b,c,a){window.addEventListener(b,c,Boolean(a))},removeWindowListener:function(b,c,a){window.removeEventListener(b,c,Boolean(a))},doAddListener:function(a,d,c,b){if(a==="ready"&&this.isReady&&!this.isMaximizing){d.call(c);return this}return this.callSuper(arguments)},supportsOrientation:function(){return Ext.feature.has.Orientation},onResize:function(){var c=this.windowWidth,f=this.windowHeight,e=this.getWindowWidth(),a=this.getWindowHeight(),d=this.getOrientation(),b=this.determineOrientation();if((c!==e&&f!==a)&&d!==b){this.fireOrientationChangeEvent(b,d)}},onOrientationChange:function(){var b=this.getOrientation(),a=this.determineOrientation();if(a!==b){this.fireOrientationChangeEvent(a,b)}},fireOrientationChangeEvent:function(b,c){var a=Ext.baseCSSPrefix;Ext.getBody().replaceCls(a+c,a+b);this.orientation=b;this.updateSize();this.fireEvent("orientationchange",this,b,this.windowWidth,this.windowHeight)},updateSize:function(b,a){this.windowWidth=b!==undefined?b:this.getWindowWidth();this.windowHeight=a!==undefined?a:this.getWindowHeight();return this},waitUntil:function(h,e,g,a,f){if(!a){a=50}if(!f){f=2000}var c=this,b=0;setTimeout(function d(){b+=a;if(h.call(c)===true){if(e){e.call(c)}}else{if(b>=f){if(g){g.call(c)}}else{setTimeout(d,a)}}},a)},maximize:function(){this.fireMaximizeEvent()},fireMaximizeEvent:function(){this.updateSize();this.fireEvent("maximize",this)},doSetHeight:function(a){Ext.getBody().setHeight(a);this.callParent(arguments)},doSetWidth:function(a){Ext.getBody().setWidth(a);this.callParent(arguments)},scrollToTop:function(){window.scrollTo(0,-1)},getWindowWidth:function(){return window.innerWidth},getWindowHeight:function(){return window.innerHeight},getWindowOuterHeight:function(){return window.outerHeight},getWindowOrientation:function(){return window.orientation},getOrientation:function(){return this.orientation},getSize:function(){return{width:this.windowWidth,height:this.windowHeight}},determineOrientation:function(){var b=this.PORTRAIT,a=this.LANDSCAPE;if(!Ext.os.is.Android&&this.supportsOrientation()){if(this.getWindowOrientation()%180===0){return b}return a}else{if(this.getWindowHeight()>=this.getWindowWidth()){return b}return a}},onItemFullscreenChange:function(a){a.addCls(this.fullscreenItemCls);this.add(a)},setMenu:function(e,a){var b=this;a=a||{};if(Ext.os.is.iOS&&!this.hasiOSOrientationFix){this.hasiOSOrientationFix=true;this.on("orientationchange",function(){window.scrollTo(0,0)},this)}if(!e){return}if(!a.side){return}if(["left","right","top","bottom"].indexOf(a.side)==-1){return}var d=b.getMenus();if(!d){d={}}if(!b.addedSwipeListener){b.addedSwipeListener=true;b.element.on({tap:b.onTap,swipestart:b.onSwipeStart,edgeswipestart:b.onEdgeSwipeStart,edgeswipe:b.onEdgeSwipe,edgeswipeend:b.onEdgeSwipeEnd,scope:b});if(window.blackberry){var c=function(){var f=b.getMenus(),g=f.top;if(!g){return}if(g.isHidden()){b.showMenu("top")}else{b.hideMenu("top")}};if(blackberry.app&&blackberry.app.event&&blackberry.app.event.onSwipeDown){blackberry.app.event.onSwipeDown(c)}else{if(blackberry.event&&blackberry.event.addEventListener){blackberry.event.addEventListener("swipedown",c)}}}}d[a.side]=e;e.$reveal=Boolean(a.reveal);e.$cover=a.cover!==false&&!e.$reveal;e.$side=a.side;b.fixMenuSize(e,a.side);if(a.side=="left"){e.setLeft(0);e.setRight(null);e.setTop(0);e.setBottom(0)}else{if(a.side=="right"){e.setLeft(null);e.setRight(0);e.setTop(0);e.setBottom(0)}else{if(a.side=="top"){e.setLeft(0);e.setRight(0);e.setTop(0);e.setBottom(null)}else{if(a.side=="bottom"){e.setLeft(0);e.setRight(0);e.setTop(null);e.setBottom(0)}}}}b.setMenus(d)},removeMenu:function(a){var b=this.getMenus()||{},c=b[a];if(c){this.hideMenu(a)}delete b[a];this.setMenus(b)},fixMenuSize:function(b,a){if(a=="top"||a=="bottom"){b.setWidth("100%")}else{if(a=="left"||a=="right"){b.setHeight("100%")}}},showMenu:function(b){var e=this.getMenus(),h=e[b],d,g,f,c;if(!h||h.isAnimating){return}this.hideOtherMenus(b);d={translateX:0,translateY:0};g={translateX:0,translateY:0};f={translateX:0,translateY:0};c={translateX:0,translateY:0};if(h.$reveal){Ext.getBody().insertFirst(h.element)}else{Ext.Viewport.add(h)}h.show();h.addCls("x-"+b);var a=(b=="left"||b=="right")?h.element.getWidth():h.element.getHeight();if(b=="left"){d.translateX=-a;c.translateX=a}else{if(b=="right"){d.translateX=a;c.translateX=-a}else{if(b=="top"){d.translateY=-a;c.translateY=a}else{if(b=="bottom"){d.translateY=a;c.translateY=-a}}}}if(h.$reveal){if(Ext.browser.getPreferredTranslationMethod()!="scrollposition"){h.translate(0,0)}}else{h.translate(d.translateX,d.translateY)}if(h.$cover){h.getTranslatable().on("animationend",function(){h.isAnimating=false},this,{single:true});h.translate(g.translateX,g.translateY,{preserveEndState:true,duration:200})}else{this.translate(f.translateX,f.translateY);this.getTranslatable().on("animationend",function(){h.isAnimating=false},this,{single:true});this.translate(c.translateX,c.translateY,{preserveEndState:true,duration:200})}h.isAnimating=true},hideMenu:function(c,a){var e=this.getMenus(),g=e[c],f,d,b;a=(a===false)?false:true;if(!g||(g.isHidden()||g.isAnimating)){return}f={translateX:0,translateY:0};d={translateX:0,translateY:0};b=(c=="left"||c=="right")?g.element.getWidth():g.element.getHeight();if(c=="left"){f.translateX=-b}else{if(c=="right"){f.translateX=b}else{if(c=="top"){f.translateY=-b}else{if(c=="bottom"){f.translateY=b}}}}if(g.$cover){if(a){g.getTranslatable().on("animationend",function(){g.isAnimating=false;g.hide()},this,{single:true});g.translate(f.translateX,f.translateY,{preserveEndState:true,duration:200})}else{g.translate(f.translateX,f.translateY);g.hide()}}else{if(a){this.getTranslatable().on("animationend",function(){g.isAnimating=false;g.hide()},this,{single:true});this.translate(d.translateX,d.translateY,{preserveEndState:true,duration:200})}else{this.translate(d.translateX,d.translateY);g.hide()}}},hideAllMenus:function(c){var b=this.getMenus();for(var a in b){this.hideMenu(a,c)}},hideOtherMenus:function(a,c){var b=this.getMenus();for(var d in b){if(a!=d){this.hideMenu(d,c)}}},toggleMenu:function(a){var b=this.getMenus(),c;if(b[a]){c=b[a];if(c.isHidden()){this.showMenu(a)}else{this.hideMenu(a)}}},sideForDirection:function(a){if(a=="left"){return"right"}else{if(a=="right"){return"left"}else{if(a=="up"){return"bottom"}else{if(a=="down"){return"top"}}}}},sideForSwipeDirection:function(a){if(a=="up"){return"top"}else{if(a=="down"){return"bottom"}}return a},onTap:function(a){},onSwipeStart:function(b){var a=this.sideForSwipeDirection(b.direction);this.hideMenu(a)},onEdgeSwipeStart:function(h){var j=this.sideForDirection(h.direction),d=this.getMenus(),b=d[j],k,i;if(!b||!b.isHidden()){return}for(k in d){i=d[k];if(i.isHidden()!==false){return}}this.$swiping=true;this.hideAllMenus(false);if(b.$reveal){Ext.getBody().insertFirst(b.element)}else{Ext.Viewport.add(b)}b.show();var l=(j=="left"||j=="right")?b.element.getWidth():b.element.getHeight(),a,g;a={translateX:0,translateY:0};g={translateX:0,translateY:0};if(j=="left"){a.translateX=-l}else{if(j=="right"){a.translateX=l}else{if(j=="top"){a.translateY=-l}else{if(j=="bottom"){a.translateY=l}}}}var c="webkitTransform" in document.createElement("div").style?"webkitTransform":"transform",f=b.element.dom.style[c];if(f){b.element.dom.style[c]=""}if(b.$reveal){if(Ext.browser.getPreferredTranslationMethod()!="scrollposition"){b.translate(0,0)}}else{b.translate(a.translateX,a.translateY)}if(!b.$cover){if(f){this.innerElement.dom.style[c]=""}this.translate(g.translateX,g.translateY)}},onEdgeSwipe:function(g){var c=this.sideForDirection(g.direction),i=this.getMenus()[c];if(!i||!this.$swiping){return}var b=(c=="left"||c=="right")?i.element.getWidth():i.element.getHeight(),h,f,a=Math.min(g.distance-b,0),d=Math.min(g.distance,b);h={translateX:0,translateY:0};f={translateX:0,translateY:0};if(c=="left"){h.translateX=a;f.translateX=d}else{if(c=="right"){h.translateX=-a;f.translateX=-d}else{if(c=="top"){h.translateY=a;f.translateY=d}else{if(c=="bottom"){h.translateY=-a;f.translateY=-d}}}}if(i.$cover){i.translate(h.translateX,h.translateY)}else{this.translate(f.translateX,f.translateY)}},onEdgeSwipeEnd:function(i){var j=this.sideForDirection(i.direction),b=this.getMenus()[j],h=false;if(!b){return}var k=(j=="left"||j=="right")?b.element.getWidth():b.element.getHeight(),f=(i.flick)?i.flick.velocity:0;if(j=="right"){if(f.x>0){h=true}}else{if(j=="left"){if(f.x<0){h=true}}else{if(j=="top"){if(f.y<0){h=true}}else{if(j=="bottom"){if(f.y>0){h=true}}}}}var c=(h)?k:0,d=(h)?0:-k,a,g;a={translateX:0,translateY:0};g={translateX:0,translateY:0};if(j=="left"){a.translateX=-c;g.translateX=-d}else{if(j=="right"){a.translateX=c;g.translateX=d}else{if(j=="top"){a.translateY=-c;g.translateY=-d}else{if(j=="bottom"){a.translateY=c;g.translateY=d}}}}if(b.$cover){b.getTranslatable().on("animationend",function(){if(h){b.hide()}},this,{single:true});b.translate(a.translateX,a.translateY,{preserveEndState:true,duration:200})}else{this.getTranslatable().on("animationend",function(){if(h){b.hide()}},this,{single:true});this.translate(g.translateX,g.translateY,{preserveEndState:true,duration:200})}this.$swiping=false}});Ext.define("Ext.viewport.Android",{extend:Ext.viewport.Default,config:{translatable:{translationMethod:"csstransform"}},constructor:function(){this.on("orientationchange","hideKeyboardIfNeeded",this,{prepend:true});this.callSuper(arguments);this.bodyElement.on("resize",this.onResize,this,{buffer:1})},getWindowWidth:function(){return this.element.getWidth()},getWindowHeight:function(){return this.element.getHeight()},getDummyInput:function(){var a=this.dummyInput,c=this.focusedElement,b=Ext.fly(c).getPageBox();if(!a){this.dummyInput=a=document.createElement("input");a.style.position="absolute";a.style.opacity="0";a.style.pointerEvents="none";document.body.appendChild(a)}a.style.left=b.left+"px";a.style.top=b.top+"px";a.style.display="";return a},doBlurInput:function(c){var b=c.target,d=this.focusedElement,a;if(d&&!this.isInputRegex.test(b.tagName)){a=this.getDummyInput();delete this.focusedElement;a.focus();setTimeout(function(){a.style.display="none"},100)}},hideKeyboardIfNeeded:function(){var a=arguments[arguments.length-1],b=this.focusedElement;if(b){delete this.focusedElement;a.pause();if(Ext.os.version.lt("4")){b.style.display="none"}else{b.blur()}setTimeout(function(){b.style.display="";a.resume()},1000)}},doFireOrientationChangeEvent:function(){var a=arguments[arguments.length-1];this.orientationChanging=true;a.pause();this.waitUntil(function(){return this.getWindowOuterHeight()!==this.windowOuterHeight},function(){this.windowOuterHeight=this.getWindowOuterHeight();this.updateSize();a.firingArguments[2]=this.windowWidth;a.firingArguments[3]=this.windowHeight;a.resume();this.orientationChanging=false},function(){});return this},determineOrientation:function(){return(this.getWindowHeight()>=this.getWindowWidth())?this.PORTRAIT:this.LANDSCAPE},getActualWindowOuterHeight:function(){return Math.round(this.getWindowOuterHeight()/window.devicePixelRatio)},maximize:function(){var c=this.stretchHeights,b=this.orientation,a;a=c[b];if(!a){c[b]=a=this.getActualWindowOuterHeight()}if(!this.addressBarHeight){this.addressBarHeight=a-this.getWindowHeight()}this.setHeight(a);var d=Ext.Function.bind(this.isHeightMaximized,this,[a]);this.scrollToTop();this.waitUntil(d,this.fireMaximizeEvent,this.fireMaximizeEvent)},isHeightMaximized:function(a){this.scrollToTop();return this.getWindowHeight()===a},supportsOrientation:function(){return false},onResize:function(){this.waitUntil(function(){var c=this.windowWidth,f=this.windowHeight,e=this.getWindowWidth(),a=this.getWindowHeight(),d=this.getOrientation(),b=this.determineOrientation();return((c!==e&&f!==a)&&d!==b)},function(){var b=this.getOrientation(),a=this.determineOrientation();this.fireOrientationChangeEvent(a,b)},Ext.emptyFn,250)},doPreventZooming:function(b){if("button" in b&&b.button!==0){return}var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)&&!this.focusedElement){b.preventDefault()}}},function(){if(!Ext.os.is.Android){return}var a=Ext.os.version,b=Ext.browser.userAgent,c=/(htc|desire|incredible|ADR6300)/i.test(b)&&a.lt("2.3");if(c){this.override({constructor:function(d){if(!d){d={}}d.autoMaximize=false;this.watchDogTick=Ext.Function.bind(this.watchDogTick,this);setInterval(this.watchDogTick,1000);return this.callParent([d])},watchDogTick:function(){this.watchDogLastTick=Ext.Date.now()},doPreventPanning:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)},doPreventZooming:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)}})}if(a.match("2")){this.override({onReady:function(){this.addWindowListener("resize",Ext.Function.bind(this.onWindowResize,this));this.callParent(arguments)},scrollToTop:function(){document.body.scrollTop=100},onWindowResize:function(){var e=this.windowWidth,g=this.windowHeight,f=this.getWindowWidth(),d=this.getWindowHeight();if(this.getAutoMaximize()&&!this.isMaximizing&&!this.orientationChanging&&window.scrollY===0&&e===f&&d=g-this.addressBarHeight)||!this.focusedElement)){this.scrollToTop()}}})}else{if(a.gtEq("3.1")){this.override({isHeightMaximized:function(d){this.scrollToTop();return this.getWindowHeight()===d-1}})}else{if(a.match("3")){this.override({isHeightMaximized:function(){this.scrollToTop();return true}})}}}if(a.gtEq("4")){this.override({doBlurInput:Ext.emptyFn})}});Ext.define("Ext.viewport.Ios",{extend:Ext.viewport.Default,isFullscreen:function(){return this.isHomeScreen()},isHomeScreen:function(){return window.navigator.standalone===true},constructor:function(){this.callParent(arguments);if(this.getAutoMaximize()&&!this.isFullscreen()){this.addWindowListener("touchstart",Ext.Function.bind(this.onTouchStart,this))}},maximize:function(){if(this.isFullscreen()){return this.callParent()}var c=this.stretchHeights,b=this.orientation,d=this.getWindowHeight(),a=c[b];if(window.scrollY>0){this.scrollToTop();if(!a){c[b]=a=this.getWindowHeight()}this.setHeight(a);this.fireMaximizeEvent()}else{if(!a){a=this.getScreenHeight()}this.setHeight(a);this.waitUntil(function(){this.scrollToTop();return d!==this.getWindowHeight()},function(){if(!c[b]){a=c[b]=this.getWindowHeight();this.setHeight(a)}this.fireMaximizeEvent()},function(){a=c[b]=this.getWindowHeight();this.setHeight(a);this.fireMaximizeEvent()},50,1000)}},getScreenHeight:function(){return window.screen[this.orientation===this.PORTRAIT?"height":"width"]},onElementFocus:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){clearTimeout(this.scrollToTopTimer)}this.callParent(arguments)},onElementBlur:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){this.scrollToTopTimer=setTimeout(this.scrollToTop,500)}this.callParent(arguments)},onTouchStart:function(){if(this.focusedElement===null){this.scrollToTop()}},scrollToTop:function(){window.scrollTo(0,0)}},function(){if(!Ext.os.is.iOS){return}if(Ext.os.version.lt("3.2")){this.override({constructor:function(){var a=this.stretchHeights={};a[this.PORTRAIT]=416;a[this.LANDSCAPE]=268;return this.callOverridden(arguments)}})}if(Ext.os.version.lt("5")){this.override({fieldMaskClsTest:"-field-mask",doPreventZooming:function(b){var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)&&a.className.indexOf(this.fieldMaskClsTest)==-1){b.preventDefault()}}})}if(Ext.os.is.iPad){this.override({isFullscreen:function(){return true}})}if(Ext.os.version.gtEq("7")){if(Ext.os.deviceType==="Tablet"||!Ext.browser.is.Safari||window.navigator.standalone){this.override({constructor:function(){var d={},b={},a=this.determineOrientation(),f=window.screen.height,c=window.screen.width,e=a===this.PORTRAIT?f-window.innerHeight:c-window.innerHeight;d[this.PORTRAIT]=f-e;d[this.LANDSCAPE]=c-e;b[this.PORTRAIT]=c;b[this.LANDSCAPE]=f;this.stretchHeights=d;this.stretchWidths=b;this.callOverridden(arguments);this.on("ready",this.setViewportSizeToAbsolute,this);this.on("orientationchange",this.setViewportSizeToAbsolute,this)},getWindowHeight:function(){return this.stretchHeights[this.orientation]},getWindowWidth:function(){return this.stretchWidths[this.orientation]},setViewportSizeToAbsolute:function(){this.setWidth(this.getWindowWidth());this.setHeight(this.getWindowHeight())}})}if(Ext.os.deviceType==="Tablet"){this.override({constructor:function(){this.callOverridden(arguments);window.addEventListener("scroll",function(){if(window.scrollX!==0){window.scrollTo(0,window.scrollY)}},false)},setViewportSizeToAbsolute:function(){window.scrollTo(0,0);this.callOverridden(arguments)},onElementBlur:function(){this.callOverridden(arguments);if(window.scrollY!==0){window.scrollTo(0,0)}}})}}});Ext.define("Ext.viewport.WindowsPhone",{requires:[],alternateClassName:"Ext.viewport.WP",extend:Ext.viewport.Default,config:{translatable:{translationMethod:"csstransform"}},initialize:function(){var a=function(d){var c=d.srcElement.nodeName.toUpperCase(),b=["INPUT","TEXTAREA"];if(b.indexOf(c)==-1){return false}};document.body.addEventListener("onselectstart",a);this.callParent(arguments)},supportsOrientation:function(){return false},onResize:function(){this.waitUntil(function(){var c=this.windowWidth,f=this.windowHeight,e=this.getWindowWidth(),a=this.getWindowHeight(),d=this.getOrientation(),b=this.determineOrientation();return((c!==e&&f!==a)&&d!==b)},function(){var b=this.getOrientation(),a=this.determineOrientation();this.fireOrientationChangeEvent(a,b)},Ext.emptyFn,250)}});Ext.define("Ext.viewport.Viewport",{constructor:function(b){var c=Ext.os.name,d,a;switch(c){case"Android":d=(Ext.browser.name=="ChromeMobile")?"Default":"Android";break;case"iOS":d="Ios";break;case"Windows":d=(Ext.browser.name=="IE")?"WindowsPhone":"Default";break;case"WindowsPhone":d="WindowsPhone";break;default:d="Default";break}a=Ext.create("Ext.viewport."+d,b);return a}});Ext.define("OpenConf.util.Proxy",{singleton:true,process:function(d,l){var a=Ext.getStore("Sessions"),e=Ext.getStore("Speakers"),h=Ext.getStore("SessionSpeakers"),b=Ext.getStore("SpeakerSessions"),g,i,j,k={},f,m,c={};Ext.data.JsonP.request({url:d,callbackName:"feedCb",success:function(n){Ext.Array.each(n.proposals,function(p){p.speakerIds=[];i=Ext.create("OpenConf.model.Session",p);Ext.Array.each(p.speakers,function(q){p.speakerIds.push(q.id);j=Ext.create("OpenConf.model.Speaker",q);e.add(j);h.add(j);k[q.id]=k[q.id]||[];k[q.id].push(p.id)});if(p.date){c[p.date]={day:i.get("time").getDate(),text:Ext.Date.format(i.get("time"),"j M"),time:i.get("time")}}a.add(i);b.add(i)});for(var o in k){m=e.findRecord("id",o);if(m){m.set("sessionIds",k[o])}}OpenConf.sessionDays=Ext.Array.sort(Ext.Object.getValues(c),function(q,p){return q.time
{title}
{room}
']},initialize:function(){this.config.title=OpenConf.app.title;this.callParent();var a=this.down("segmentedbutton");Ext.Array.each(OpenConf.sessionDays,function(b){a.add(b)})}});Ext.define("OpenConf.view.session.Card",{extend:Ext.NavigationView,xtype:"sessionContainer",config:{title:"Sessions",iconCls:"time",autoDestroy:false,items:[{xtype:"sessions",store:"Sessions",grouped:true,pinHeaders:false}]}});Ext.define("OpenConf.view.speaker.List",{extend:Ext.List,xtype:"speakers",config:{title:"Talks",itemCls:"speaker",variableHeights:true,itemTpl:["

{title}

","

{authors}

"]}});Ext.define("OpenConf.view.speaker.Card",{extend:Ext.NavigationView,xtype:"speakerContainer",config:{tab:{title:"Talks",iconCls:"chat",action:"speakersTab"},autoDestroy:false,items:[{xtype:"speakers",store:"Speakers",grouped:true,pinHeaders:false}]}});Ext.define("OpenConf.view.tab.Location",{extend:Ext.Container,xtype:"location",config:{title:"Location",iconCls:"locate",layout:"fit",items:[{docked:"top",xtype:"toolbar",title:"Location"}]},initialize:function(){var a=new google.maps.LatLng(OpenConf.app.mapCenter[0],OpenConf.app.mapCenter[1]),c=new google.maps.InfoWindow({content:OpenConf.app.mapText}),d,b;this.callParent();d=this.add({xtype:"map",mapOptions:{center:a,mapTypeId:google.maps.MapTypeId.ROADMAP}});b=new google.maps.Marker({position:a,map:d.getMap(),visible:true});google.maps.event.addListener(b,"click",function(){c.open(d,b)});setTimeout(function(){d.getMap().panTo(a)},1000)}});Ext.define("OpenConf.view.Location",{extend:Ext.Container,xtype:"location",config:{title:"Location",iconCls:"locate",layout:"fit",items:[{docked:"top",xtype:"toolbar",title:"Location"}]},initialize:function(){var a=new Microsoft.Maps.Location(OpenConf.app.mapCenter[0],OpenConf.app.mapCenter[1]),c;this.callParent();var b=function(){var e=c.getMap();var d=new Microsoft.Maps.Infobox(a,{description:OpenConf.app.mapText,visible:true,offset:new Microsoft.Maps.Point(0,10),height:100,width:180});e.entities.clear();var f=new Microsoft.Maps.Pushpin(e.getCenter(),null);pushpinClick=Microsoft.Maps.Events.addHandler(f,"click",function(){e.entities.push(d);d.setOptions({visible:true})});e.entities.push(f)};c=this.add({xtype:"bingmap",mapOptions:{center:a,mapTypeId:Microsoft.Maps.MapTypeId.ROADMAP,callback:b}})}});Ext.define("OpenConf.view.about.List",{extend:Ext.List,xtype:"aboutList",config:{title:"About",ui:"round",itemTpl:["{title}"]},initialize:function(){this.callParent();this.setData(OpenConf.app.aboutPages)}});Ext.define("OpenConf.view.about.Card",{extend:Ext.NavigationView,xtype:"aboutContainer",config:{title:"About",iconCls:"info",autoDestroy:false,items:[{xtype:"aboutList"}]}});Ext.define("OpenConf.view.Main",{extend:Ext.tab.Panel,xtype:"main",config:{tabBarPosition:"bottom",tabBar:{ui:"gray"},items:[{xclass:"OpenConf.view.session.Card"},{xclass:"OpenConf.view.speaker.Card"},{xclass:"OpenConf.view.Location"},{xclass:"OpenConf.view.about.Card"}]}});Ext.define("OpenConf.controller.Sessions",{extend:Ext.app.Controller,config:{refs:{sessions:"sessions",session:"session",sessionInfo:"sessionContainer sessionInfo",sessionSpeakers:"sessionContainer list",sessionContainer:"sessionContainer",sessionDayPicker:"sessions segmentedbutton",speakers:"sessionContainer speakers",speakerInfo:"sessionContainer speakerInfo"},control:{sessions:{initialize:"initSessions",itemtap:"onSessionTap",activate:"onSessionsActivate"},sessionDayPicker:{toggle:"onSessionDateChange"},speakers:{itemtap:"onSpeakerTap"}}},initSessions:function(){var a=this.getSessionDayPicker().getItems().items[0];this.getSessionDayPicker().setPressedButtons(a);this.filterByButton(a)},onSessionDateChange:function(b,c,a){if(a){this.filterByButton(c)}},filterByButton:function(a){if(this.getSessionSpeakers()){this.getSessionSpeakers().deselectAll()}Ext.getStore("Sessions").clearFilter(true);Ext.getStore("Sessions").filter(function(b){return b.get("time").getDate()==a.config.day})},onSessionTap:function(f,a,d,b){var c=Ext.getStore("SessionSpeakers"),e=b.get("speakerIds");c.clearFilter(true);c.filterBy(function(g){return Ext.Array.contains(e,g.get("id"))});if(!this.session){this.session=Ext.widget("session")}this.session.setTitle(b.get("title"));this.getSessionContainer().push(this.session);this.getSessionInfo().setRecord(b)},onSpeakerTap:function(d,a,c,b){if(!this.speakerInfo){this.speakerInfo=Ext.widget("speakerInfo",{scrollable:"vertical"})}this.speakerInfo.config.title=b.getFullName();this.speakerInfo.setRecord(b);this.getSessionContainer().push(this.speakerInfo)},onSessionsActivate:function(){if(this.session){this.session.down("speakers").deselectAll()}}});Ext.define("OpenConf.controller.Speakers",{extend:Ext.app.Controller,config:{refs:{speakerContainer:"speakerContainer",speakers:"speakerContainer speakers",speaker:"speakerContainer speaker",speakerInfo:"speakerContainer speakerInfo",sessions:"speakerContainer speaker list"},control:{speakers:{itemtap:"onSpeakerTap",activate:"onSpeakersActivate"},sessions:{itemtap:"onSessionTap"}}},onSpeakerTap:function(e,a,d,c){var f=Ext.getStore("SpeakerSessions"),b=c.get("sessionIds");f.clearFilter(true);f.filterBy(function(g){return Ext.Array.contains(b,g.get("id"))});if(!this.speaker){this.speaker=Ext.widget("speaker")}this.speaker.config.title=c.getFullName();this.getSpeakerContainer().push(this.speaker);this.getSpeakerInfo().setRecord(c)},onSessionTap:function(d,a,c,b){if(!this.sessionInfo){this.sessionInfo=Ext.widget("sessionInfo")}this.sessionInfo.config.title=b.get("title");this.sessionInfo.setRecord(b);this.getSpeakerContainer().push(this.sessionInfo)},onSpeakersActivate:function(){if(this.speaker){this.speaker.down("list").deselectAll()}}});Ext.define("OpenConf.controller.About",{extend:Ext.app.Controller,config:{refs:{aboutContainer:"aboutContainer"},control:{aboutList:{itemtap:"onAboutItemTap",activate:"onAboutListActivate"},videoList:{itemtap:"onVideoTap"}}},onAboutListActivate:function(a){a.deselectAll()},onAboutItemTap:function(b,a){this.getAboutContainer().push(OpenConf.app.config.aboutPages[a])},onVideoTap:function(d,a,c,b){Ext.Msg.confirm("External Link","Open in YouTube?",function(e){if(e=="yes"){window.location="http://www.youtube.com/watch?v="+b.get("id")+"&feature=player_embedded"}})}});Ext.define("OpenConf.view.session.Info",{extend:Ext.Container,xtype:"sessionInfo",config:{cls:"sessionInfo",tpl:Ext.create("Ext.XTemplate","

{title} {room}

","

{description}

","

{info}

",{formatTime:function(a){return""}})}});Ext.define("OpenConf.view.session.Detail",{extend:Ext.Container,xtype:"session",config:{layout:"vbox",title:"",items:[{flex:1,layout:"fit",scrollable:"vertical",xtype:"sessionInfo"},{xtype:"component",cls:"dark",html:""},{flex:2,xtype:"speakers",store:"SessionSpeakers"}]}});Ext.define("OpenConf.view.speaker.Info",{extend:Ext.Container,xtype:"speakerInfo",config:{cls:"speakerInfo",tpl:['
',"

{title}

","

{authorsorg}

","
","

{bio}

"]}});Ext.define("OpenConf.view.speaker.Detail",{extend:Ext.Container,xtype:"speaker",config:{layout:"vbox",items:[{flex:1,scrollable:"vertical",xtype:"speakerInfo"},{xtype:"component",cls:"dark",html:"Sessions"},{flex:2,xtype:"list",store:"SpeakerSessions",itemTpl:["{title}"]}]}});Ext.define("OpenConf.store.Sessions",{extend:Ext.data.Store,config:{model:"OpenConf.model.Session",grouper:{sortProperty:"time",groupFn:function(a){return a.get("pretty_time")}},sorters:[{property:"time",direction:"ASC"},{property:"id",direction:"ASC"}]}});Ext.define("OpenConf.store.SpeakerSessions",{extend:Ext.data.Store,config:{model:"OpenConf.model.Session",sorters:[{property:"time",direction:"ASC"}]}});Ext.define("OpenConf.store.Speakers",{extend:Ext.data.Store,config:{model:"OpenConf.model.Speaker",grouper:{groupFn:function(a){return a.get("sort").substr(0,1)},sortProperty:"sort"}}});Ext.define("OpenConf.store.SessionSpeakers",{extend:Ext.data.Store,config:{model:"OpenConf.model.Speaker"}});Ext.application({title:"",mapCenter:[,],mapText:"
",safeHTMLstr($OC_configAR['OC_PROGRAM_mobile_address'])); ?>",aboutPages:[{title:"Credits",xtype:"htmlPage",url:"credits.html"}],name:"OpenConf",startupImage:{"320x460":"resources/startup/320x460.jpg","640x920":"resources/startup/640x920.png","640x1096":"resources/startup/640x1096.png","768x1004":"resources/startup/768x1004.png","748x1024":"resources/startup/748x1024.png","1536x2008":"resources/startup/1536x2008.png","1496x2048":"resources/startup/1496x2048.png"},isIconPrecomposed:false,icon:{57:"resources/icons/icon.png",72:"resources/icons/icon@72.png",114:"resources/icons/icon@2x.png",144:"resources/icons/icon@72.png"},models:["Session","Speaker"],views:["Main","session.Card","session.List","session.Detail","session.Info","speaker.Card","speaker.List","speaker.Detail","speaker.Info","Location","about.Card","about.List","about.HtmlPage"],controllers:["Sessions","Speakers","About"],stores:["Sessions","SpeakerSessions","Speakers","SessionSpeakers"],launch:function(){Ext.Viewport.setMasked({xtype:"loadmask"});OpenConf.util.Proxy.process("data.php#",function(){Ext.Viewport.add({xtype:"main"});Ext.Viewport.setMasked(false)})}});