Created
July 14, 2016 02:02
-
-
Save ppmathis/8a3b5ca8d406d9635db5474a31c19228 to your computer and use it in GitHub Desktop.
Proxmox: Maximum Callstack Size Exceeded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Uncaught RangeError: Maximum call stack size exceeded | |
| [Symbol.split] @ (program):356 | |
| split @ (program):285 | |
| removeCls @ ext-all.js:formatted:17688 | |
| toggleInvalidCls @ ext-all.js:formatted:76607 | |
| toggleInvalidCls @ ext-all.js:formatted:77802 | |
| renderActiveError @ ext-all.js:formatted:76600 | |
| renderActiveError @ ext-all.js:formatted:77181 | |
| setActiveErrors @ ext-all.js:formatted:76510 | |
| markInvalid @ ext-all.js:formatted:77141 | |
| validateValue @ ext-all.js:formatted:77134 | |
| isValid @ ext-all.js:formatted:77124 | |
| validate @ ext-all.js:formatted:76768 | |
| (anonymous function) @ ext-all.js:formatted:78676 | |
| filterBy @ ext-all.js:formatted:19484 | |
| isValid @ ext-all.js:formatted:78675 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 | |
| flushLayouts @ ext-all.js:formatted:31287 | |
| resumeLayouts @ ext-all.js:formatted:31293 | |
| Ext.resumeLayouts @ ext-all.js:formatted:33842 | |
| isValid @ ext-all.js:formatted:78678 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 | |
| flushLayouts @ ext-all.js:formatted:31287 | |
| resumeLayouts @ ext-all.js:formatted:31293 | |
| Ext.resumeLayouts @ ext-all.js:formatted:33842 | |
| isValid @ ext-all.js:formatted:78678 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 | |
| flushLayouts @ ext-all.js:formatted:31287 | |
| resumeLayouts @ ext-all.js:formatted:31293 | |
| Ext.resumeLayouts @ ext-all.js:formatted:33842 | |
| isValid @ ext-all.js:formatted:78678 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 | |
| flushLayouts @ ext-all.js:formatted:31287 | |
| resumeLayouts @ ext-all.js:formatted:31293 | |
| Ext.resumeLayouts @ ext-all.js:formatted:33842 | |
| isValid @ ext-all.js:formatted:78678 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 | |
| flushLayouts @ ext-all.js:formatted:31287 | |
| resumeLayouts @ ext-all.js:formatted:31293 | |
| Ext.resumeLayouts @ ext-all.js:formatted:33842 | |
| isValid @ ext-all.js:formatted:78678 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 | |
| flushLayouts @ ext-all.js:formatted:31287 | |
| resumeLayouts @ ext-all.js:formatted:31293 | |
| Ext.resumeLayouts @ ext-all.js:formatted:33842 | |
| isValid @ ext-all.js:formatted:78678 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 | |
| flushLayouts @ ext-all.js:formatted:31287 | |
| resumeLayouts @ ext-all.js:formatted:31293 | |
| Ext.resumeLayouts @ ext-all.js:formatted:33842 | |
| isValid @ ext-all.js:formatted:78678 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 | |
| flushLayouts @ ext-all.js:formatted:31287 | |
| resumeLayouts @ ext-all.js:formatted:31293 | |
| Ext.resumeLayouts @ ext-all.js:formatted:33842 | |
| isValid @ ext-all.js:formatted:78678 | |
| isValid @ pvemanagerlib.js:7808 | |
| (anonymous function) @ pvemanagerlib.js:8035 | |
| fire @ ext-all.js:formatted:9407 | |
| doFireEvent @ ext-all.js:formatted:9850 | |
| doFireEvent @ ext-all.js:formatted:32071 | |
| a.doFireEvent @ ext-all.js:formatted:26855 | |
| fireEventArgs @ ext-all.js:formatted:9776 | |
| fireEvent @ ext-all.js:formatted:9758 | |
| afterLayout @ ext-all.js:formatted:61019 | |
| notifyOwner @ ext-all.js:formatted:60142 | |
| callLayout @ ext-all.js:formatted:109637 | |
| flushLayouts @ ext-all.js:formatted:109752 | |
| runComplete @ ext-all.js:formatted:110111 | |
| n @ ext-all.js:formatted:1687 | |
| callParent @ ext-all.js:formatted:6034 | |
| runComplete @ ext-all.js:formatted:31280 | |
| run @ ext-all.js:formatted:110100 |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This file is part of Ext JS 6.0.1.250 | |
| Copyright (c) 2011-2015 Sencha Inc | |
| Contact: http://www.sencha.com/contact | |
| GNU General Public License Usage | |
| This file may be used under the terms of the GNU General Public License version 3.0 as | |
| published by the Free Software Foundation and appearing in the file LICENSE included in the | |
| packaging of this file. | |
| Please review the following information to ensure the GNU General Public License version 3.0 | |
| requirements will be met: http://www.gnu.org/copyleft/gpl.html. | |
| If you are unsure which license is appropriate for your use, please contact the sales department | |
| at http://www.sencha.com/contact. | |
| Version: 6.0.1.250 Build date: 2015-09-02 17:27:43 (22ef9ff0ebf584ff525541be37e753a703cc044b) | |
| */ | |
| var Ext = Ext || {}; | |
| if (!Ext.Toolbar) { | |
| Ext.Toolbar = {} | |
| } | |
| if (!Ext.app) { | |
| Ext.app = {} | |
| } | |
| if (!Ext.app.bind) { | |
| Ext.app.bind = {} | |
| } | |
| if (!Ext.app.domain) { | |
| Ext.app.domain = {} | |
| } | |
| if (!Ext.app.route) { | |
| Ext.app.route = {} | |
| } | |
| if (!Ext.button) { | |
| Ext.button = {} | |
| } | |
| if (!Ext.container) { | |
| Ext.container = {} | |
| } | |
| if (!Ext.core) { | |
| Ext.core = {} | |
| } | |
| if (!Ext.dashboard) { | |
| Ext.dashboard = {} | |
| } | |
| if (!Ext.data) { | |
| Ext.data = {} | |
| } | |
| if (!Ext.data.field) { | |
| Ext.data.field = {} | |
| } | |
| if (!Ext.data.flash) { | |
| Ext.data.flash = {} | |
| } | |
| if (!Ext.data.identifier) { | |
| Ext.data.identifier = {} | |
| } | |
| if (!Ext.data.matrix) { | |
| Ext.data.matrix = {} | |
| } | |
| if (!Ext.data.operation) { | |
| Ext.data.operation = {} | |
| } | |
| if (!Ext.data.proxy) { | |
| Ext.data.proxy = {} | |
| } | |
| if (!Ext.data.reader) { | |
| Ext.data.reader = {} | |
| } | |
| if (!Ext.data.request) { | |
| Ext.data.request = {} | |
| } | |
| if (!Ext.data.schema) { | |
| Ext.data.schema = {} | |
| } | |
| if (!Ext.data.session) { | |
| Ext.data.session = {} | |
| } | |
| if (!Ext.data.validator) { | |
| Ext.data.validator = {} | |
| } | |
| if (!Ext.data.writer) { | |
| Ext.data.writer = {} | |
| } | |
| if (!Ext.dd) { | |
| Ext.dd = {} | |
| } | |
| if (!Ext.direct) { | |
| Ext.direct = {} | |
| } | |
| if (!Ext.dom) { | |
| Ext.dom = {} | |
| } | |
| if (!Ext.dom.Element) { | |
| Ext.dom.Element = {} | |
| } | |
| if (!Ext.event) { | |
| Ext.event = {} | |
| } | |
| if (!Ext.event.gesture) { | |
| Ext.event.gesture = {} | |
| } | |
| if (!Ext.event.publisher) { | |
| Ext.event.publisher = {} | |
| } | |
| if (!Ext.flash) { | |
| Ext.flash = {} | |
| } | |
| if (!Ext.form) { | |
| Ext.form = {} | |
| } | |
| if (!Ext.form.Action) { | |
| Ext.form.Action = {} | |
| } | |
| if (!Ext.form.action) { | |
| Ext.form.action = {} | |
| } | |
| if (!Ext.form.field) { | |
| Ext.form.field = {} | |
| } | |
| if (!Ext.form.trigger) { | |
| Ext.form.trigger = {} | |
| } | |
| if (!Ext.fx) { | |
| Ext.fx = {} | |
| } | |
| if (!Ext.fx.animation) { | |
| Ext.fx.animation = {} | |
| } | |
| if (!Ext.fx.easing) { | |
| Ext.fx.easing = {} | |
| } | |
| if (!Ext.fx.layout) { | |
| Ext.fx.layout = {} | |
| } | |
| if (!Ext.fx.layout.card) { | |
| Ext.fx.layout.card = {} | |
| } | |
| if (!Ext.fx.runner) { | |
| Ext.fx.runner = {} | |
| } | |
| if (!Ext.fx.target) { | |
| Ext.fx.target = {} | |
| } | |
| if (!Ext.grid) { | |
| Ext.grid = {} | |
| } | |
| if (!Ext.grid.column) { | |
| Ext.grid.column = {} | |
| } | |
| if (!Ext.grid.feature) { | |
| Ext.grid.feature = {} | |
| } | |
| if (!Ext.grid.filters) { | |
| Ext.grid.filters = {} | |
| } | |
| if (!Ext.grid.filters.filter) { | |
| Ext.grid.filters.filter = {} | |
| } | |
| if (!Ext.grid.header) { | |
| Ext.grid.header = {} | |
| } | |
| if (!Ext.grid.locking) { | |
| Ext.grid.locking = {} | |
| } | |
| if (!Ext.grid.plugin) { | |
| Ext.grid.plugin = {} | |
| } | |
| if (!Ext.grid.property) { | |
| Ext.grid.property = {} | |
| } | |
| if (!Ext.grid.selection) { | |
| Ext.grid.selection = {} | |
| } | |
| if (!Ext.layout) { | |
| Ext.layout = {} | |
| } | |
| if (!Ext.layout.boxOverflow) { | |
| Ext.layout.boxOverflow = {} | |
| } | |
| if (!Ext.layout.component) { | |
| Ext.layout.component = {} | |
| } | |
| if (!Ext.layout.component.field) { | |
| Ext.layout.component.field = {} | |
| } | |
| if (!Ext.layout.container) { | |
| Ext.layout.container = {} | |
| } | |
| if (!Ext.layout.container.border) { | |
| Ext.layout.container.border = {} | |
| } | |
| if (!Ext.layout.container.boxOverflow) { | |
| Ext.layout.container.boxOverflow = {} | |
| } | |
| if (!Ext.list) { | |
| Ext.list = {} | |
| } | |
| if (!Ext.menu) { | |
| Ext.menu = {} | |
| } | |
| if (!Ext.mixin) { | |
| Ext.mixin = {} | |
| } | |
| if (!Ext.overrides) { | |
| Ext.overrides = {} | |
| } | |
| if (!Ext.overrides.app) { | |
| Ext.overrides.app = {} | |
| } | |
| if (!Ext.overrides.app.domain) { | |
| Ext.overrides.app.domain = {} | |
| } | |
| if (!Ext.overrides.dom) { | |
| Ext.overrides.dom = {} | |
| } | |
| if (!Ext.overrides.event) { | |
| Ext.overrides.event = {} | |
| } | |
| if (!Ext.overrides.event.publisher) { | |
| Ext.overrides.event.publisher = {} | |
| } | |
| if (!Ext.overrides.list) { | |
| Ext.overrides.list = {} | |
| } | |
| if (!Ext.overrides.plugin) { | |
| Ext.overrides.plugin = {} | |
| } | |
| if (!Ext.overrides.util) { | |
| Ext.overrides.util = {} | |
| } | |
| if (!Ext.panel) { | |
| Ext.panel = {} | |
| } | |
| if (!Ext.perf) { | |
| Ext.perf = {} | |
| } | |
| if (!Ext.picker) { | |
| Ext.picker = {} | |
| } | |
| if (!Ext.plugin) { | |
| Ext.plugin = {} | |
| } | |
| if (!Ext.promise) { | |
| Ext.promise = {} | |
| } | |
| if (!Ext.resizer) { | |
| Ext.resizer = {} | |
| } | |
| if (!Ext.scroll) { | |
| Ext.scroll = {} | |
| } | |
| if (!Ext.selection) { | |
| Ext.selection = {} | |
| } | |
| if (!Ext.slider) { | |
| Ext.slider = {} | |
| } | |
| if (!Ext.sparkline) { | |
| Ext.sparkline = {} | |
| } | |
| if (!Ext.state) { | |
| Ext.state = {} | |
| } | |
| if (!Ext.tab) { | |
| Ext.tab = {} | |
| } | |
| if (!Ext.tip) { | |
| Ext.tip = {} | |
| } | |
| if (!Ext.toolbar) { | |
| Ext.toolbar = {} | |
| } | |
| if (!Ext.tree) { | |
| Ext.tree = {} | |
| } | |
| if (!Ext.tree.plugin) { | |
| Ext.tree.plugin = {} | |
| } | |
| if (!Ext.util) { | |
| Ext.util = {} | |
| } | |
| if (!Ext.util.paintmonitor) { | |
| Ext.util.paintmonitor = {} | |
| } | |
| if (!Ext.util.sizemonitor) { | |
| Ext.util.sizemonitor = {} | |
| } | |
| if (!Ext.util.translatable) { | |
| Ext.util.translatable = {} | |
| } | |
| if (!Ext.ux) { | |
| Ext.ux = {} | |
| } | |
| if (!Ext.ux.form) { | |
| Ext.ux.form = {} | |
| } | |
| if (!Ext.ux.layout) { | |
| Ext.ux.layout = {} | |
| } | |
| if (!Ext.view) { | |
| Ext.view = {} | |
| } | |
| if (!Ext.window) { | |
| Ext.window = {} | |
| } | |
| (function(e) { | |
| var b, m = ["constructor", "toString", "valueOf", "toLocaleString"], g = {}, q = {}, d = 0, n, k, s, i, a, h, o, c, j, r = function() { | |
| var v, u; | |
| k = Ext.Base; | |
| s = Ext.ClassManager; | |
| for (v = m.length; v-- > 0; ) { | |
| u = (1 << v); | |
| q[g[u] = m[v]] = u | |
| } | |
| for (v in q) { | |
| d |= q[v] | |
| } | |
| d = ~d; | |
| Function.prototype.$isFunction = 1; | |
| j = !!(s && s.addAlias); | |
| i = Ext.Class.getPreprocessor("config").fn; | |
| a = Ext.Class.getPreprocessor("cachedConfig") && Ext.Class.getPreprocessor("cachedConfig").fn; | |
| h = Ext.Class.getPreprocessor("platformConfig") && Ext.Class.getPreprocessor("platformConfig").fn; | |
| c = Ext.Class.getPreprocessor("privates") && Ext.Class.getPreprocessor("privates").fn; | |
| o = Ext.ClassManager.postprocessors.deprecated && Ext.ClassManager.postprocessors.deprecated.fn; | |
| b = k.$staticMembers; | |
| if (!b) { | |
| b = []; | |
| for (n in k) { | |
| if (k.hasOwnProperty(n)) { | |
| b.push(n) | |
| } | |
| } | |
| } | |
| e.derive = l; | |
| return l.apply(this, arguments) | |
| } | |
| , t = function(D, z, C) { | |
| var w = C.enumerableMembers, A = D.prototype, y, B, x, v, u; | |
| if (!z) { | |
| return | |
| } | |
| if (j) { | |
| D.addMembers(z) | |
| } else { | |
| for (y in z) { | |
| v = z[y]; | |
| if (v && v.$isFunction && !v.$isClass && v !== Ext.emptyFn && v !== Ext.identityFn) { | |
| u = A.hasOwnProperty(y) && A[y]; | |
| if (u) { | |
| v.$previous = u | |
| } | |
| A[y] = B = v; | |
| B.$owner = D; | |
| B.$name = y | |
| } else { | |
| A[y] = v | |
| } | |
| } | |
| for (x = 1; w; x <<= 1) { | |
| if (w & x) { | |
| w &= ~x; | |
| y = g[x]; | |
| A[y] = B = z[y]; | |
| B.$owner = D; | |
| B.$name = y | |
| } | |
| } | |
| } | |
| } | |
| , p = function(y) { | |
| var u = function x() { | |
| return y.apply(this, arguments) || null | |
| } | |
| , w, v; | |
| u.prototype = Ext.Object.chain(y.prototype); | |
| for (w = b.length; w-- > 0; ) { | |
| v = b[w]; | |
| u[v] = k[v] | |
| } | |
| return u | |
| } | |
| , l = function(z, C, X, u, B, L, A, U, x, N, G) { | |
| var v = function F() { | |
| return this.constructor.apply(this, arguments) || null | |
| } | |
| , W = v, w = { | |
| enumerableMembers: u & d, | |
| onCreated: G, | |
| onBeforeCreated: t, | |
| aliases: U | |
| }, J = X.alternateClassName || [], S = Ext.global, O, R, T, I, Q, aa, Z, y, P, E, V, M, H, Y, K = s.alternateToName || s.maps.alternateToName, D = s.nameToAlternates || s.maps.nameToAlternates; | |
| for (T = b.length; T-- > 0; ) { | |
| Z = b[T]; | |
| v[Z] = k[Z] | |
| } | |
| if (X.$isFunction) { | |
| X = X(v) | |
| } | |
| w.data = X; | |
| E = X.statics; | |
| delete X.statics; | |
| X.$className = z; | |
| if ("$className"in X) { | |
| v.$className = X.$className | |
| } | |
| v.extend(C); | |
| P = v.prototype; | |
| v.xtype = X.xtype = B[0]; | |
| if (B) { | |
| P.xtypes = B | |
| } | |
| P.xtypesChain = L; | |
| P.xtypesMap = A; | |
| X.alias = U; | |
| W.triggerExtended(v, X, w); | |
| if (X.onClassExtended) { | |
| v.onExtended(X.onClassExtended, v); | |
| delete X.onClassExtended | |
| } | |
| if (X.privates && c) { | |
| c.call(Ext.Class, v, X) | |
| } | |
| if (E) { | |
| if (j) { | |
| v.addStatics(E) | |
| } else { | |
| for (V in E) { | |
| if (E.hasOwnProperty(V)) { | |
| Y = E[V]; | |
| if (Y && Y.$isFunction && !Y.$isClass && Y !== Ext.emptyFn && Y !== Ext.identityFn) { | |
| v[V] = H = Y; | |
| H.$owner = v; | |
| H.$name = V | |
| } | |
| v[V] = Y | |
| } | |
| } | |
| } | |
| } | |
| if (X.inheritableStatics) { | |
| v.addInheritableStatics(X.inheritableStatics); | |
| delete X.inheritableStatics | |
| } | |
| if (P.onClassExtended) { | |
| W.onExtended(P.onClassExtended, W); | |
| delete P.onClassExtended | |
| } | |
| if (X.config) { | |
| i.call(Ext.Class, v, X) | |
| } | |
| if (X.cachedConfig && a) { | |
| a.call(Ext.Class, v, X); | |
| delete X.cachedConfig | |
| } | |
| if (X.platformConfig && h) { | |
| h.call(Ext.Class, v, X); | |
| delete X.platformConfig | |
| } | |
| if (X.deprecated && o) { | |
| o.call(Ext.ClassManager, z, v, X) | |
| } | |
| w.onBeforeCreated(v, w.data, w); | |
| for (T = 0, | |
| Q = x && x.length; T < Q; ++T) { | |
| v.mixin.apply(v, x[T]) | |
| } | |
| for (T = 0, | |
| Q = U.length; T < Q; T++) { | |
| O = U[T]; | |
| s.setAlias ? s.setAlias(v, O) : s.addAlias(v, O) | |
| } | |
| if (X.singleton) { | |
| W = new v() | |
| } | |
| if (!(J instanceof Array)) { | |
| J = [J] | |
| } | |
| M = s.getName(W); | |
| for (T = 0, | |
| I = J.length; T < I; T++) { | |
| R = J[T]; | |
| s.classes[R] = W; | |
| if (j) { | |
| s.addAlternate(v, R) | |
| } else { | |
| if (M) { | |
| K[R] = M; | |
| J = D[M] || (D[M] = []); | |
| J.push(R) | |
| } | |
| } | |
| } | |
| for (T = 0, | |
| Q = N.length; T < Q; T += 2) { | |
| aa = N[T]; | |
| if (!aa) { | |
| aa = S | |
| } | |
| aa[N[T + 1]] = W | |
| } | |
| s.classes[z] = W; | |
| if (!j) { | |
| if (M && M !== z) { | |
| K[z] = M; | |
| J = D[M] || (D[M] = []); | |
| J.push(z) | |
| } | |
| } | |
| delete P.alternateClassName; | |
| if (w.onCreated) { | |
| w.onCreated.call(W, W) | |
| } | |
| if (z) { | |
| s.triggerCreated(z) | |
| } | |
| return W | |
| } | |
| ; | |
| e.derive = r | |
| }(Ext.cmd = {})); | |
| var Ext = Ext || {}; | |
| Ext.Boot = Ext.Boot || (function(h) { | |
| var o = document | |
| , e = [] | |
| , k = { | |
| disableCaching: (/[?&](?:cache|disableCacheBuster)\b/i.test(location.search) || !(/http[s]?\:/i.test(location.href)) || /(^|[ ;])ext-cache=1/.test(o.cookie)) ? false : true, | |
| disableCachingParam: "_dc", | |
| loadDelay: false, | |
| preserveScripts: true, | |
| charset: "UTF-8" | |
| } | |
| , q = {} | |
| , g = /\.css(?:\?|$)/i | |
| , n = o.createElement("a") | |
| , l = typeof window !== "undefined" | |
| , i = { | |
| browser: l, | |
| node: !l && (typeof require === "function"), | |
| phantom: (window && (window._phantom || window.callPhantom)) || /PhantomJS/.test(window.navigator.userAgent) | |
| } | |
| , m = (Ext.platformTags = {}) | |
| , a = function(s, r, u) { | |
| if (u) { | |
| a(s, u) | |
| } | |
| if (s && r && typeof r === "object") { | |
| for (var t in r) { | |
| s[t] = r[t] | |
| } | |
| } | |
| return s | |
| } | |
| , p = function() { | |
| var t = false, w = Array.prototype.shift.call(arguments), s, u, r, v; | |
| if (typeof arguments[arguments.length - 1] === "boolean") { | |
| t = Array.prototype.pop.call(arguments) | |
| } | |
| r = arguments.length; | |
| for (s = 0; s < r; s++) { | |
| v = arguments[s]; | |
| if (typeof v === "object") { | |
| for (u in v) { | |
| w[t ? u.toLowerCase() : u] = v[u] | |
| } | |
| } | |
| } | |
| return w | |
| } | |
| , c = (typeof Object.keys == "function") ? function(r) { | |
| if (!r) { | |
| return [] | |
| } | |
| return Object.keys(r) | |
| } | |
| : function(r) { | |
| var s = [], t; | |
| for (t in r) { | |
| if (r.hasOwnProperty(t)) { | |
| s.push(t) | |
| } | |
| } | |
| return s | |
| } | |
| , d = { | |
| loading: 0, | |
| loaded: 0, | |
| apply: a, | |
| env: i, | |
| config: k, | |
| assetConfig: q, | |
| scripts: {}, | |
| currentFile: null , | |
| suspendedQueue: [], | |
| currentRequest: null , | |
| syncMode: false, | |
| useElements: true, | |
| listeners: [], | |
| Request: b, | |
| Entry: j, | |
| allowMultipleBrowsers: false, | |
| browserNames: { | |
| ie: "IE", | |
| firefox: "Firefox", | |
| safari: "Safari", | |
| chrome: "Chrome", | |
| opera: "Opera", | |
| dolfin: "Dolfin", | |
| edge: "Edge", | |
| webosbrowser: "webOSBrowser", | |
| chromeMobile: "ChromeMobile", | |
| chromeiOS: "ChromeiOS", | |
| silk: "Silk", | |
| other: "Other" | |
| }, | |
| osNames: { | |
| ios: "iOS", | |
| android: "Android", | |
| windowsPhone: "WindowsPhone", | |
| webos: "webOS", | |
| blackberry: "BlackBerry", | |
| rimTablet: "RIMTablet", | |
| mac: "MacOS", | |
| win: "Windows", | |
| tizen: "Tizen", | |
| linux: "Linux", | |
| bada: "Bada", | |
| chromeOS: "ChromeOS", | |
| other: "Other" | |
| }, | |
| browserPrefixes: { | |
| ie: "MSIE ", | |
| edge: "Edge/", | |
| firefox: "Firefox/", | |
| chrome: "Chrome/", | |
| safari: "Version/", | |
| opera: "OPR/", | |
| dolfin: "Dolfin/", | |
| webosbrowser: "wOSBrowser/", | |
| chromeMobile: "CrMo/", | |
| chromeiOS: "CriOS/", | |
| silk: "Silk/" | |
| }, | |
| browserPriority: ["edge", "opera", "dolfin", "webosbrowser", "silk", "chromeiOS", "chromeMobile", "ie", "firefox", "safari", "chrome"], | |
| osPrefixes: { | |
| 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/", | |
| chromeOS: "CrOS " | |
| }, | |
| fallbackOSPrefixes: { | |
| windows: "win", | |
| mac: "mac", | |
| linux: "linux" | |
| }, | |
| devicePrefixes: { | |
| iPhone: "iPhone", | |
| iPod: "iPod", | |
| iPad: "iPad" | |
| }, | |
| maxIEVersion: 12, | |
| detectPlatformTags: function() { | |
| var w = this | |
| , r = navigator.userAgent | |
| , x = /Mobile(\/|\s)/.test(r) | |
| , v = document.createElement("div") | |
| , A = function(F, D) { | |
| if (D === undefined) { | |
| D = window | |
| } | |
| var E = "on" + F.toLowerCase() | |
| , G = (E in v); | |
| if (!G) { | |
| if (v.setAttribute && v.removeAttribute) { | |
| v.setAttribute(E, ""); | |
| G = typeof v[E] === "function"; | |
| if (typeof v[E] !== "undefined") { | |
| v[E] = undefined | |
| } | |
| v.removeAttribute(E) | |
| } | |
| } | |
| return G | |
| } | |
| , z = function() { | |
| var E = {}, L, H, M, N, I, J, F, K, D; | |
| J = w.browserPriority.length; | |
| for (I = 0; I < J; I++) { | |
| N = w.browserPriority[I]; | |
| if (!D) { | |
| M = w.browserPrefixes[N]; | |
| F = r.match(new RegExp("(" + M + ")([\\w\\._]+)")); | |
| K = F && F.length > 1 ? parseInt(F[2]) : 0; | |
| if (K) { | |
| D = true | |
| } | |
| } else { | |
| K = 0 | |
| } | |
| E[N] = K | |
| } | |
| if (E.ie) { | |
| var G = document.documentMode; | |
| if (G >= 8) { | |
| E.ie = G | |
| } | |
| } | |
| K = E.ie || false; | |
| L = Math.max(K, w.maxIEVersion); | |
| for (I = 8; I <= L; ++I) { | |
| H = "ie" + I; | |
| E[H + "m"] = K ? K <= I : 0; | |
| E[H] = K ? K === I : 0; | |
| E[H + "p"] = K ? K >= I : 0 | |
| } | |
| return E | |
| } | |
| , y = function() { | |
| var E = {}, J, K, M, G, H, F, D, I, L; | |
| M = c(w.osPrefixes); | |
| H = M.length; | |
| for (G = 0, | |
| L = 0; G < H; G++) { | |
| K = M[G]; | |
| J = w.osPrefixes[K]; | |
| F = r.match(new RegExp("(" + J + ")([^\\s;]+)")); | |
| D = F ? F[1] : null ; | |
| if (D && (D === "HTC_" || D === "Silk/")) { | |
| I = 2.3 | |
| } else { | |
| I = F && F.length > 1 ? parseFloat(F[F.length - 1]) : 0 | |
| } | |
| if (I) { | |
| L++ | |
| } | |
| E[K] = I | |
| } | |
| M = c(w.fallbackOSPrefixes); | |
| H = M.length; | |
| for (G = 0; G < H; G++) { | |
| K = M[G]; | |
| if (L === 0) { | |
| J = w.fallbackOSPrefixes[K]; | |
| F = r.toLowerCase().match(new RegExp(J)); | |
| E[K] = F ? true : 0 | |
| } else { | |
| E[K] = 0 | |
| } | |
| } | |
| return E | |
| } | |
| , B = function() { | |
| var E = {}, J, H, I, G, D, F; | |
| I = c(w.devicePrefixes); | |
| D = I.length; | |
| for (G = 0; G < D; G++) { | |
| H = I[G]; | |
| J = w.devicePrefixes[H]; | |
| F = r.match(new RegExp(J)); | |
| E[H] = F ? true : 0 | |
| } | |
| return E | |
| } | |
| , t = z() | |
| , u = y() | |
| , C = B() | |
| , s = d.loadPlatformsParam(); | |
| p(m, t, u, C, s, true); | |
| m.phone = (m.iphone || m.ipod) || (!m.silk && (m.android && (m.android < 3 || x))) || (m.blackberry && x) || (m.windowsphone); | |
| m.tablet = !m.phone && (m.ipad || m.android || m.silk || m.rimtablet || (m.ie10 && /; Touch/.test(r))); | |
| m.touch = A("touchend") || navigator.maxTouchPoints || navigator.msMaxTouchPoints; | |
| m.desktop = !m.phone && !m.tablet; | |
| m.cordova = m.phonegap = !!(window.PhoneGap || window.Cordova || window.cordova); | |
| m.webview = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)(?!.*FBAN)/i.test(r); | |
| m.androidstock = (m.android <= 4.3) && (m.safari || m.silk); | |
| p(m, s, true) | |
| }, | |
| loadPlatformsParam: function() { | |
| var r = window.location.search.substr(1), t = r.split("&"), v = {}, x, y = {}, A, w, u, s, z; | |
| for (x = 0; x < t.length; x++) { | |
| A = t[x].split("="); | |
| v[A[0]] = A[1] | |
| } | |
| if (v.platformTags) { | |
| A = v.platformTags.split(","); | |
| for (w = A.length, | |
| x = 0; x < w; x++) { | |
| u = A[x].split(":"); | |
| s = u[0]; | |
| z = true; | |
| if (u.length > 1) { | |
| z = u[1]; | |
| if (z === "false" || z === "0") { | |
| z = false | |
| } | |
| } | |
| y[s] = z | |
| } | |
| } | |
| return y | |
| }, | |
| filterPlatform: function(t, x) { | |
| t = e.concat(t || e); | |
| x = e.concat(x || e); | |
| var w = t.length, v = x.length, s = (!w && v), u, r; | |
| for (u = 0; u < w && !s; u++) { | |
| r = t[u]; | |
| s = !!m[r] | |
| } | |
| for (u = 0; u < v && s; u++) { | |
| r = x[u]; | |
| s = !m[r] | |
| } | |
| return s | |
| }, | |
| init: function() { | |
| var u = o.getElementsByTagName("script"), v = u.length, B = /\/ext(\-[a-z\-]+)?\.js$/, z, x, r, s, w, A, t, y; | |
| for (t = 0; t < v; t++) { | |
| r = (x = u[t]).src; | |
| if (!r) { | |
| continue | |
| } | |
| s = x.readyState || null ; | |
| if (!w) { | |
| if (B.test(r)) { | |
| d.hasReadyState = ("readyState"in x); | |
| d.hasAsync = ("async"in x) || !d.hasReadyState; | |
| w = r | |
| } | |
| } | |
| if (!d.scripts[A = d.canonicalUrl(r)]) { | |
| z = new j({ | |
| key: A, | |
| url: r, | |
| done: s === null || s === "loaded" || s === "complete", | |
| el: x, | |
| prop: "src" | |
| }) | |
| } | |
| } | |
| if (!w) { | |
| x = u[u.length - 1]; | |
| w = x.src; | |
| d.hasReadyState = ("readyState"in x); | |
| d.hasAsync = ("async"in x) || !d.hasReadyState | |
| } | |
| d.baseUrl = w.substring(0, w.lastIndexOf("/") + 1); | |
| y = window.location.origin || window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : ""); | |
| d.origin = y; | |
| d.detectPlatformTags(); | |
| Ext.filterPlatform = d.filterPlatform | |
| }, | |
| canonicalUrl: function(u) { | |
| n.href = u; | |
| var t = n.href, s = k.disableCachingParam, w = s ? t.indexOf(s + "=") : -1, v, r; | |
| if (w > 0 && ((v = t.charAt(w - 1)) === "?" || v === "&")) { | |
| r = t.indexOf("&", w); | |
| r = (r < 0) ? "" : t.substring(r); | |
| if (r && v === "?") { | |
| ++w; | |
| r = r.substring(1) | |
| } | |
| t = t.substring(0, w - 1) + r | |
| } | |
| return t | |
| }, | |
| getConfig: function(r) { | |
| return r ? d.config[r] : d.config | |
| }, | |
| setConfig: function(r, u) { | |
| if (typeof r === "string") { | |
| d.config[r] = u | |
| } else { | |
| for (var t in r) { | |
| d.setConfig(t, r[t]) | |
| } | |
| } | |
| return d | |
| }, | |
| getHead: function() { | |
| return d.docHead || (d.docHead = o.head || o.getElementsByTagName("head")[0]) | |
| }, | |
| create: function(t, u, r) { | |
| var s = r || {}; | |
| s.url = t; | |
| s.key = u; | |
| return d.scripts[u] = new j(s) | |
| }, | |
| getEntry: function(s, r) { | |
| var t = d.canonicalUrl(s) | |
| , u = d.scripts[t]; | |
| if (!u) { | |
| u = d.create(s, t, r) | |
| } | |
| return u | |
| }, | |
| registerContent: function(s, t, u) { | |
| var r = { | |
| content: u, | |
| loaded: true, | |
| css: t === "css" | |
| }; | |
| return d.getEntry(s, r) | |
| }, | |
| processRequest: function(s, r) { | |
| s.loadEntries(r) | |
| }, | |
| load: function(r) { | |
| var r = new b(r); | |
| if (r.sync || d.syncMode) { | |
| return d.loadSync(r) | |
| } | |
| if (d.currentRequest) { | |
| r.getEntries(); | |
| d.suspendedQueue.push(r) | |
| } else { | |
| d.currentRequest = r; | |
| d.processRequest(r, false) | |
| } | |
| return d | |
| }, | |
| loadSync: function(r) { | |
| var r = new b(r); | |
| d.syncMode++; | |
| d.processRequest(r, true); | |
| d.syncMode--; | |
| return d | |
| }, | |
| loadBasePrefix: function(r) { | |
| r = new b(r); | |
| r.prependBaseUrl = true; | |
| return d.load(r) | |
| }, | |
| loadSyncBasePrefix: function(r) { | |
| r = new b(r); | |
| r.prependBaseUrl = true; | |
| return d.loadSync(r) | |
| }, | |
| requestComplete: function(s) { | |
| var r; | |
| if (d.currentRequest === s) { | |
| d.currentRequest = null ; | |
| while (d.suspendedQueue.length > 0) { | |
| r = d.suspendedQueue.shift(); | |
| if (!r.done) { | |
| d.load(r); | |
| break | |
| } | |
| } | |
| } | |
| if (!d.currentRequest && d.suspendedQueue.length == 0) { | |
| d.fireListeners() | |
| } | |
| }, | |
| isLoading: function() { | |
| return !d.currentRequest && d.suspendedQueue.length == 0 | |
| }, | |
| fireListeners: function() { | |
| var r; | |
| while (d.isLoading() && (r = d.listeners.shift())) { | |
| r() | |
| } | |
| }, | |
| onBootReady: function(r) { | |
| if (!d.isLoading()) { | |
| r() | |
| } else { | |
| d.listeners.push(r) | |
| } | |
| }, | |
| getPathsFromIndexes: function(s, r) { | |
| return b.prototype.getPathsFromIndexes(s, r) | |
| }, | |
| createLoadOrderMap: function(r) { | |
| return b.prototype.createLoadOrderMap(r) | |
| }, | |
| fetch: function(r, s, A, u) { | |
| u = (u === undefined) ? !!s : u; | |
| var z = new XMLHttpRequest(), B, w, x, t = false, y = function() { | |
| if (z && z.readyState == 4) { | |
| w = (z.status === 1223) ? 204 : (z.status === 0 && ((self.location || {}).protocol === "file:" || (self.location || {}).protocol === "ionp:")) ? 200 : z.status; | |
| x = z.responseText; | |
| B = { | |
| content: x, | |
| status: w, | |
| exception: t | |
| }; | |
| if (s) { | |
| s.call(A, B) | |
| } | |
| z = null | |
| } | |
| } | |
| ; | |
| if (u) { | |
| z.onreadystatechange = y | |
| } | |
| try { | |
| z.open("GET", r, u); | |
| z.send(null ) | |
| } catch (v) { | |
| t = v; | |
| y(); | |
| return B | |
| } | |
| if (!u) { | |
| y() | |
| } | |
| return B | |
| }, | |
| notifyAll: function(r) { | |
| r.notifyRequests() | |
| } | |
| }; | |
| function b(r) { | |
| if (r.$isRequest) { | |
| return r | |
| } | |
| var r = r.url ? r : { | |
| url: r | |
| } | |
| , s = r.url | |
| , t = s.charAt ? [s] : s | |
| , u = r.charset || d.config.charset; | |
| a(r, { | |
| urls: t, | |
| charset: u | |
| }); | |
| a(this, r) | |
| } | |
| b.prototype = { | |
| $isRequest: true, | |
| createLoadOrderMap: function(s) { | |
| var r = s.length, t = {}, v, u; | |
| for (v = 0; v < r; v++) { | |
| u = s[v]; | |
| t[u.path] = u | |
| } | |
| return t | |
| }, | |
| getLoadIndexes: function(w, y, t, u, E) { | |
| var F = t[w], x, v, D, C, A, z, B, s, r; | |
| if (y[w]) { | |
| return y | |
| } | |
| y[w] = true; | |
| A = false; | |
| while (!A) { | |
| z = false; | |
| for (B in y) { | |
| if (y.hasOwnProperty(B)) { | |
| F = t[B]; | |
| if (!F) { | |
| continue | |
| } | |
| r = this.prepareUrl(F.path); | |
| C = d.getEntry(r); | |
| if (!E || !C || !C.done) { | |
| D = F.requires; | |
| if (u && F.uses) { | |
| D = D.concat(F.uses) | |
| } | |
| for (x = D.length, | |
| v = 0; v < x; v++) { | |
| s = D[v]; | |
| if (!y[s]) { | |
| y[s] = true; | |
| z = true | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (!z) { | |
| A = true | |
| } | |
| } | |
| return y | |
| }, | |
| getPathsFromIndexes: function(w, s) { | |
| var u = [], x = [], t, r, v; | |
| for (t in w) { | |
| if (w.hasOwnProperty(t) && w[t]) { | |
| u.push(t) | |
| } | |
| } | |
| u.sort(function(z, y) { | |
| return z - y | |
| }); | |
| for (r = u.length, | |
| v = 0; v < r; v++) { | |
| x.push(s[u[v]].path) | |
| } | |
| return x | |
| }, | |
| expandUrl: function(r, x, u, A) { | |
| if (typeof r == "string") { | |
| r = [r] | |
| } | |
| var y = this | |
| , s = y.loadOrder | |
| , z = y.loadOrderMap; | |
| if (s) { | |
| z = z || y.createLoadOrderMap(s); | |
| y.loadOrderMap = z; | |
| x = x || {}; | |
| var w = r.length, t = [], v, B; | |
| for (v = 0; v < w; v++) { | |
| B = z[r[v]]; | |
| if (B) { | |
| y.getLoadIndexes(B.idx, x, s, u, A) | |
| } else { | |
| t.push(r[v]) | |
| } | |
| } | |
| return y.getPathsFromIndexes(x, s).concat(t) | |
| } | |
| return r | |
| }, | |
| expandUrls: function(y, u) { | |
| if (typeof y == "string") { | |
| y = [y] | |
| } | |
| var w = [], r = {}, B, x = y.length, v, A, s, z; | |
| for (v = 0; v < x; v++) { | |
| B = this.expandUrl(y[v], {}, u, true); | |
| for (A = 0, | |
| s = B.length; A < s; A++) { | |
| z = B[A]; | |
| if (!r[z]) { | |
| r[z] = true; | |
| w.push(z) | |
| } | |
| } | |
| } | |
| if (w.length == 0) { | |
| w = y | |
| } | |
| return w | |
| }, | |
| expandLoadOrder: function() { | |
| var s = this, t = s.urls, r; | |
| if (!s.expanded) { | |
| r = this.expandUrls(t, true); | |
| s.expanded = true | |
| } else { | |
| r = t | |
| } | |
| s.urls = r; | |
| if (t.length != r.length) { | |
| s.sequential = true | |
| } | |
| return s | |
| }, | |
| getUrls: function() { | |
| this.expandLoadOrder(); | |
| return this.urls | |
| }, | |
| prepareUrl: function(r) { | |
| if (this.prependBaseUrl) { | |
| return d.baseUrl + r | |
| } | |
| return r | |
| }, | |
| getEntries: function() { | |
| var v = this, r = v.entries, t, u, w, s; | |
| if (!r) { | |
| r = []; | |
| w = v.getUrls(); | |
| for (t = 0; t < w.length; t++) { | |
| s = v.prepareUrl(w[t]); | |
| u = d.getEntry(s, { | |
| buster: v.buster, | |
| charset: v.charset | |
| }); | |
| u.requests.push(v); | |
| r.push(u) | |
| } | |
| v.entries = r | |
| } | |
| return r | |
| }, | |
| loadEntries: function(x) { | |
| var w = this, s = w.getEntries(), r = s.length, y = w.loadStart || 0, t, v, u; | |
| if (x !== undefined) { | |
| w.sync = x | |
| } | |
| w.loaded = w.loaded || 0; | |
| w.loading = w.loading || r; | |
| for (u = y; u < r; u++) { | |
| v = s[u]; | |
| if (!v.loaded) { | |
| t = s[u].load(w.sync) | |
| } else { | |
| t = true | |
| } | |
| if (!t) { | |
| w.loadStart = u; | |
| v.onDone(function() { | |
| w.loadEntries(x) | |
| }); | |
| break | |
| } | |
| } | |
| w.processLoadedEntries() | |
| }, | |
| processLoadedEntries: function() { | |
| var v = this, s = v.getEntries(), r = s.length, w = v.startIndex || 0, t, u; | |
| if (!v.done) { | |
| for (t = w; t < r; t++) { | |
| u = s[t]; | |
| if (!u.loaded) { | |
| v.startIndex = t; | |
| return | |
| } | |
| if (!u.evaluated) { | |
| u.evaluate() | |
| } | |
| if (u.error) { | |
| v.error = true | |
| } | |
| } | |
| v.notify() | |
| } | |
| }, | |
| notify: function() { | |
| var v = this; | |
| if (!v.done) { | |
| var s = v.error | |
| , u = v[s ? "failure" : "success"] | |
| , r = ("delay"in v) ? v.delay : (s ? 1 : d.config.chainDelay) | |
| , t = v.scope || v; | |
| v.done = true; | |
| if (u) { | |
| if (r === 0 || r > 0) { | |
| setTimeout(function() { | |
| u.call(t, v) | |
| }, r) | |
| } else { | |
| u.call(t, v) | |
| } | |
| } | |
| v.fireListeners(); | |
| d.requestComplete(v) | |
| } | |
| }, | |
| onDone: function(t) { | |
| var s = this | |
| , r = s.listeners || (s.listeners = []); | |
| if (s.done) { | |
| t(s) | |
| } else { | |
| r.push(t) | |
| } | |
| }, | |
| fireListeners: function() { | |
| var r = this.listeners, s; | |
| if (r) { | |
| while ((s = r.shift()) ) { | |
| s(this) | |
| } | |
| } | |
| } | |
| }; | |
| function j(s) { | |
| if (s.$isEntry) { | |
| return s | |
| } | |
| var x = s.charset || d.config.charset, w = Ext.manifest, r = w && w.loader, t = (s.cache !== undefined) ? s.cache : (r && r.cache), v, u; | |
| if (d.config.disableCaching) { | |
| if (t === undefined) { | |
| t = !d.config.disableCaching | |
| } | |
| if (t === false) { | |
| v = +new Date() | |
| } else { | |
| if (t !== true) { | |
| v = t | |
| } | |
| } | |
| if (v) { | |
| u = (r && r.cacheParam) || d.config.disableCachingParam; | |
| v = u + "=" + v | |
| } | |
| } | |
| a(s, { | |
| charset: x, | |
| buster: v, | |
| requests: [] | |
| }); | |
| a(this, s) | |
| } | |
| j.prototype = { | |
| $isEntry: true, | |
| done: false, | |
| evaluated: false, | |
| loaded: false, | |
| isCrossDomain: function() { | |
| var r = this; | |
| if (r.crossDomain === undefined) { | |
| r.crossDomain = (r.getLoadUrl().indexOf(d.origin) !== 0) | |
| } | |
| return r.crossDomain | |
| }, | |
| isCss: function() { | |
| var s = this; | |
| if (s.css === undefined) { | |
| if (s.url) { | |
| var r = d.assetConfig[s.url]; | |
| s.css = r ? r.type === "css" : g.test(s.url) | |
| } else { | |
| s.css = false | |
| } | |
| } | |
| return this.css | |
| }, | |
| getElement: function(r) { | |
| var t = this | |
| , s = t.el; | |
| if (!s) { | |
| if (t.isCss()) { | |
| r = r || "link"; | |
| s = o.createElement(r); | |
| if (r == "link") { | |
| s.rel = "stylesheet"; | |
| t.prop = "href" | |
| } else { | |
| t.prop = "textContent" | |
| } | |
| s.type = "text/css" | |
| } else { | |
| r = r || "script"; | |
| s = o.createElement(r); | |
| s.type = "text/javascript"; | |
| t.prop = "src"; | |
| if (t.charset) { | |
| s.charset = t.charset | |
| } | |
| if (d.hasAsync) { | |
| s.async = false | |
| } | |
| } | |
| t.el = s | |
| } | |
| return s | |
| }, | |
| getLoadUrl: function() { | |
| var s = this | |
| , r = d.canonicalUrl(s.url); | |
| if (!s.loadUrl) { | |
| s.loadUrl = !!s.buster ? (r + (r.indexOf("?") === -1 ? "?" : "&") + s.buster) : r | |
| } | |
| return s.loadUrl | |
| }, | |
| fetch: function(u) { | |
| var s = this.getLoadUrl() | |
| , t = !!u.async | |
| , r = u.complete; | |
| d.fetch(s, r, this, t) | |
| }, | |
| onContentLoaded: function(s) { | |
| var w = this | |
| , r = s.status | |
| , v = s.content | |
| , u = s.exception | |
| , t = this.getLoadUrl(); | |
| w.loaded = true; | |
| if ((u || r === 0) && !i.phantom) { | |
| w.error = true; | |
| w.evaluated = true | |
| } else { | |
| if ((r >= 200 && r < 300) || r === 304 || i.phantom || (r === 0 && v.length > 0)) { | |
| w.content = v | |
| } else { | |
| w.error = true; | |
| w.evaluated = true | |
| } | |
| } | |
| }, | |
| createLoadElement: function(v) { | |
| var t = this | |
| , s = t.getElement() | |
| , r = function() { | |
| if (this.readyState === "loaded" || this.readyState === "complete") { | |
| if (v) { | |
| v() | |
| } | |
| } | |
| } | |
| , u = function() { | |
| t.error = true; | |
| if (v) { | |
| v() | |
| } | |
| } | |
| ; | |
| t.preserve = true; | |
| s.onerror = u; | |
| if (d.hasReadyState) { | |
| s.onreadystatechange = r | |
| } else { | |
| s.onload = v | |
| } | |
| s[t.prop] = t.getLoadUrl() | |
| }, | |
| onLoadElementReady: function() { | |
| d.getHead().appendChild(this.getElement()); | |
| this.evaluated = true | |
| }, | |
| inject: function(w, v) { | |
| var x = this, y = d.getHead(), r = x.url, z = x.key, s, t, u, A; | |
| if (x.isCss()) { | |
| x.preserve = true; | |
| A = z.substring(0, z.lastIndexOf("/") + 1); | |
| s = o.createElement("base"); | |
| s.href = A; | |
| if (y.firstChild) { | |
| y.insertBefore(s, y.firstChild) | |
| } else { | |
| y.appendChild(s) | |
| } | |
| s.href = s.href; | |
| if (r) { | |
| w += "\n/*# sourceURL=" + z + " */" | |
| } | |
| t = x.getElement("style"); | |
| u = ("styleSheet"in t); | |
| y.appendChild(s); | |
| if (u) { | |
| y.appendChild(t); | |
| t.styleSheet.cssText = w | |
| } else { | |
| t.textContent = w; | |
| y.appendChild(t) | |
| } | |
| y.removeChild(s) | |
| } else { | |
| if (r) { | |
| w += "\n//# sourceURL=" + z | |
| } | |
| Ext.globalEval(w) | |
| } | |
| return x | |
| }, | |
| loadCrossDomain: function() { | |
| var s = this | |
| , r = function() { | |
| s.loaded = s.evaluated = s.done = true; | |
| s.notifyRequests() | |
| } | |
| ; | |
| s.createLoadElement(function() { | |
| r() | |
| }); | |
| s.evaluateLoadElement(); | |
| return false | |
| }, | |
| loadElement: function() { | |
| var s = this | |
| , r = function() { | |
| s.loaded = s.evaluated = s.done = true; | |
| s.notifyRequests() | |
| } | |
| ; | |
| s.createLoadElement(function() { | |
| r() | |
| }); | |
| s.evaluateLoadElement(); | |
| return true | |
| }, | |
| loadSync: function() { | |
| var r = this; | |
| r.fetch({ | |
| async: false, | |
| complete: function(s) { | |
| r.onContentLoaded(s) | |
| } | |
| }); | |
| r.evaluate(); | |
| r.notifyRequests() | |
| }, | |
| load: function(s) { | |
| var r = this; | |
| if (!r.loaded) { | |
| if (r.loading) { | |
| return false | |
| } | |
| r.loading = true; | |
| if (!s) { | |
| if (r.isCrossDomain()) { | |
| return r.loadCrossDomain() | |
| } else { | |
| if (!r.isCss() && d.hasReadyState) { | |
| r.createLoadElement(function() { | |
| r.loaded = true; | |
| r.notifyRequests() | |
| }) | |
| } else { | |
| if (d.useElements && !(r.isCss() && i.phantom)) { | |
| return r.loadElement() | |
| } else { | |
| r.fetch({ | |
| async: !s, | |
| complete: function(t) { | |
| r.onContentLoaded(t); | |
| r.notifyRequests() | |
| } | |
| }) | |
| } | |
| } | |
| } | |
| } else { | |
| r.loadSync() | |
| } | |
| } | |
| return true | |
| }, | |
| evaluateContent: function() { | |
| this.inject(this.content); | |
| this.content = null | |
| }, | |
| evaluateLoadElement: function() { | |
| d.getHead().appendChild(this.getElement()) | |
| }, | |
| evaluate: function() { | |
| var r = this; | |
| if (!r.evaluated) { | |
| if (r.evaluating) { | |
| return | |
| } | |
| r.evaluating = true; | |
| if (r.content !== undefined) { | |
| r.evaluateContent() | |
| } else { | |
| if (!r.error) { | |
| r.evaluateLoadElement() | |
| } | |
| } | |
| r.evaluated = r.done = true; | |
| r.cleanup() | |
| } | |
| }, | |
| cleanup: function() { | |
| var t = this, s = t.el, u; | |
| if (!s) { | |
| return | |
| } | |
| if (!t.preserve) { | |
| t.el = null ; | |
| s.parentNode.removeChild(s); | |
| for (u in s) { | |
| try { | |
| if (u !== t.prop) { | |
| s[u] = null | |
| } | |
| delete s[u] | |
| } catch (r) {} | |
| } | |
| } | |
| s.onload = s.onerror = s.onreadystatechange = h | |
| }, | |
| notifyRequests: function() { | |
| var u = this.requests, r = u.length, s, t; | |
| for (s = 0; s < r; s++) { | |
| t = u[s]; | |
| t.processLoadedEntries() | |
| } | |
| if (this.done) { | |
| this.fireListeners() | |
| } | |
| }, | |
| onDone: function(t) { | |
| var s = this | |
| , r = s.listeners || (s.listeners = []); | |
| if (s.done) { | |
| t(s) | |
| } else { | |
| r.push(t) | |
| } | |
| }, | |
| fireListeners: function() { | |
| var r = this.listeners, s; | |
| if (r && r.length > 0) { | |
| while ((s = r.shift()) ) { | |
| s(this) | |
| } | |
| } | |
| } | |
| }; | |
| Ext.disableCacheBuster = function(s, t) { | |
| var r = new Date(); | |
| r.setTime(r.getTime() + (s ? 10 * 365 : -1) * 24 * 60 * 60 * 1000); | |
| r = r.toGMTString(); | |
| o.cookie = "ext-cache=1; expires=" + r + "; path=" + (t || "/") | |
| } | |
| ; | |
| d.init(); | |
| return d | |
| }(function() {})); | |
| Ext.globalEval = Ext.globalEval || (this.execScript ? function(a) { | |
| execScript(a) | |
| } | |
| : function($$code) { | |
| eval.call(window, $$code) | |
| } | |
| ); | |
| if (!Function.prototype.bind) { | |
| (function() { | |
| var a = Array.prototype.slice | |
| , b = function(d) { | |
| var c = a.call(arguments, 1) | |
| , e = this; | |
| if (c.length) { | |
| return function() { | |
| var g = arguments; | |
| return e.apply(d, g.length ? c.concat(a.call(g)) : c) | |
| } | |
| } | |
| c = null ; | |
| return function() { | |
| return e.apply(d, arguments) | |
| } | |
| } | |
| ; | |
| Function.prototype.bind = b; | |
| b.$extjs = true | |
| }()) | |
| } | |
| Ext.setResourcePath = function(c, b) { | |
| var a = Ext.manifest || (Ext.manifest = {}) | |
| , d = a.resources || (a.resources = {}); | |
| if (a) { | |
| if (typeof c !== "string") { | |
| Ext.apply(d, c) | |
| } else { | |
| d[c] = b | |
| } | |
| a.resources = d | |
| } | |
| } | |
| ; | |
| Ext.getResourcePath = function(g, e, a) { | |
| if (typeof g !== "string") { | |
| e = g.pool; | |
| a = g.packageName; | |
| g = g.path | |
| } | |
| var d = Ext.manifest | |
| , h = d && d.resources | |
| , c = h[e] | |
| , b = []; | |
| if (c == null ) { | |
| c = h.path; | |
| if (c == null ) { | |
| c = "resources" | |
| } | |
| } | |
| if (c) { | |
| b.push(c) | |
| } | |
| if (a) { | |
| b.push(a) | |
| } | |
| b.push(g); | |
| return b.join("/") | |
| } | |
| ; | |
| var Ext = Ext || {}; | |
| (function() { | |
| var b = this, h = Object.prototype, c = h.toString, o = ["valueOf", "toLocaleString", "toString", "constructor"], l = function() {} | |
| , g = function() {} | |
| , j = function(i) { | |
| return i | |
| } | |
| , n = function() { | |
| var i = n.caller.caller; | |
| return i.$owner.prototype[i.$name].apply(this, arguments) | |
| } | |
| , a = Ext.manifest || {}, k, d = /\[object\s*(?:Array|Arguments|\w*Collection|\w*List|HTML\s+document\.all\s+class)\]/, e = /^\\?\/Date\(([-+])?(\d+)(?:[+-]\d{4})?\)\\?\/$/; | |
| Ext.global = b; | |
| Ext.now = Date.now || (Date.now = function() { | |
| return +new Date() | |
| } | |
| ); | |
| Ext.ticks = (b.performance && b.performance.now) ? function() { | |
| return performance.now() | |
| } | |
| : Ext.now; | |
| Ext._startTime = Ext.ticks(); | |
| l.$nullFn = j.$nullFn = l.$emptyFn = j.$identityFn = g.$nullFn = true; | |
| g.$privacy = "framework"; | |
| Ext.suspendLayouts = Ext.resumeLayouts = l; | |
| for (k in { | |
| toString: 1 | |
| }) { | |
| o = null | |
| } | |
| Ext.enumerables = o; | |
| Ext.apply = function(s, r, u) { | |
| if (u) { | |
| Ext.apply(s, u) | |
| } | |
| if (s && r && typeof r === "object") { | |
| var t, q, p; | |
| for (t in r) { | |
| s[t] = r[t] | |
| } | |
| if (o) { | |
| for (q = o.length; q--; ) { | |
| p = o[q]; | |
| if (r.hasOwnProperty(p)) { | |
| s[p] = r[p] | |
| } | |
| } | |
| } | |
| } | |
| return s | |
| } | |
| ; | |
| function m(r, i, s) { | |
| var p, q; | |
| for (p in s) { | |
| if (s.hasOwnProperty(p)) { | |
| q = s[p]; | |
| if (typeof q === "function") { | |
| q.$name = p; | |
| q.$owner = i; | |
| q.$previous = r.hasOwnProperty(p) ? r[p] : n | |
| } | |
| r[p] = q | |
| } | |
| } | |
| } | |
| Ext.buildSettings = Ext.apply({ | |
| baseCSSPrefix: "x-" | |
| }, Ext.buildSettings || {}); | |
| Ext.apply(Ext, { | |
| idSeed: 0, | |
| idPrefix: "ext-", | |
| isSecure: /^https/i.test(window.location.protocol), | |
| enableGarbageCollector: false, | |
| enableListenerCollection: true, | |
| name: Ext.sandboxName || "Ext", | |
| privateFn: g, | |
| emptyFn: l, | |
| identityFn: j, | |
| frameStartTime: Ext.now(), | |
| manifest: a, | |
| enableAria: true, | |
| enableAriaButtons: true, | |
| enableAriaPanels: true, | |
| startsWithHashRe: /^#/, | |
| validIdRe: /^[a-z_][a-z0-9\-_]*$/i, | |
| BLANK_IMAGE_URL: "data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==", | |
| makeIdSelector: function(i) { | |
| return "#" + i | |
| }, | |
| id: function(p, i) { | |
| if (p && p.id) { | |
| return p.id | |
| } | |
| var q = (i || Ext.idPrefix) + (++Ext.idSeed); | |
| if (p) { | |
| p.id = q | |
| } | |
| return q | |
| }, | |
| returnId: function(i) { | |
| return i.getId() | |
| }, | |
| returnTrue: function() { | |
| return true | |
| }, | |
| emptyString: new String(), | |
| baseCSSPrefix: Ext.buildSettings.baseCSSPrefix, | |
| $eventNameMap: {}, | |
| $vendorEventRe: /^(Moz.+|MS.+|webkit.+)/, | |
| canonicalEventName: function(i) { | |
| return Ext.$eventNameMap[i] || (Ext.$eventNameMap[i] = (Ext.$vendorEventRe.test(i) ? i : i.toLowerCase())) | |
| }, | |
| applyIf: function(p, i) { | |
| var q; | |
| if (p) { | |
| for (q in i) { | |
| if (p[q] === undefined) { | |
| p[q] = i[q] | |
| } | |
| } | |
| } | |
| return p | |
| }, | |
| destroy: function() { | |
| var r = arguments.length, q, p; | |
| for (q = 0; q < r; q++) { | |
| p = arguments[q]; | |
| if (p) { | |
| if (Ext.isArray(p)) { | |
| this.destroy.apply(this, p) | |
| } else { | |
| if (Ext.isFunction(p.destroy)) { | |
| p.destroy() | |
| } | |
| } | |
| } | |
| } | |
| return null | |
| }, | |
| destroyMembers: function(s) { | |
| for (var u, r, t = 1, q = arguments, p = q.length; t < p; t++) { | |
| u = s[r = q[t]]; | |
| if (u != null ) { | |
| s[r] = Ext.destroy(u) | |
| } | |
| } | |
| }, | |
| override: function(q, r) { | |
| if (q.$isClass) { | |
| q.override(r) | |
| } else { | |
| if (typeof q === "function") { | |
| Ext.apply(q.prototype, r) | |
| } else { | |
| var i = q.self, p; | |
| if (i && i.$isClass) { | |
| p = r.privates; | |
| if (p) { | |
| r = Ext.apply({}, r); | |
| delete r.privates; | |
| m(q, i, p) | |
| } | |
| m(q, i, r) | |
| } else { | |
| Ext.apply(q, r) | |
| } | |
| } | |
| } | |
| return q | |
| }, | |
| valueFrom: function(q, i, p) { | |
| return Ext.isEmpty(q, p) ? i : q | |
| }, | |
| isEmpty: function(i, p) { | |
| return (i == null ) || (!p ? i === "" : false) || (Ext.isArray(i) && i.length === 0) | |
| }, | |
| isArray: ("isArray"in Array) ? Array.isArray : function(i) { | |
| return c.call(i) === "[object Array]" | |
| } | |
| , | |
| isDate: function(i) { | |
| return c.call(i) === "[object Date]" | |
| }, | |
| isMSDate: function(i) { | |
| if (!Ext.isString(i)) { | |
| return false | |
| } | |
| return e.test(i) | |
| }, | |
| isObject: (c.call(null ) === "[object Object]") ? function(i) { | |
| return i !== null && i !== undefined && c.call(i) === "[object Object]" && i.ownerDocument === undefined | |
| } | |
| : function(i) { | |
| return c.call(i) === "[object Object]" | |
| } | |
| , | |
| isSimpleObject: function(i) { | |
| return i instanceof Object && i.constructor === Object | |
| }, | |
| isPrimitive: function(p) { | |
| var i = typeof p; | |
| return i === "string" || i === "number" || i === "boolean" | |
| }, | |
| isFunction: (typeof document !== "undefined" && typeof document.getElementsByTagName("body") === "function") ? function(i) { | |
| return !!i && c.call(i) === "[object Function]" | |
| } | |
| : function(i) { | |
| return !!i && typeof i === "function" | |
| } | |
| , | |
| isNumber: function(i) { | |
| return typeof i === "number" && isFinite(i) | |
| }, | |
| isNumeric: function(i) { | |
| return !isNaN(parseFloat(i)) && isFinite(i) | |
| }, | |
| isString: function(i) { | |
| return typeof i === "string" | |
| }, | |
| isBoolean: function(i) { | |
| return typeof i === "boolean" | |
| }, | |
| isElement: function(i) { | |
| return i ? i.nodeType === 1 : false | |
| }, | |
| isTextNode: function(i) { | |
| return i ? i.nodeName === "#text" : false | |
| }, | |
| isDefined: function(i) { | |
| return typeof i !== "undefined" | |
| }, | |
| isIterable: function(i) { | |
| if (!i || typeof i.length !== "number" || typeof i === "string" || Ext.isFunction(i)) { | |
| return false | |
| } | |
| if (!i.propertyIsEnumerable) { | |
| return !!i.item | |
| } | |
| if (i.hasOwnProperty("length") && !i.propertyIsEnumerable("length")) { | |
| return true | |
| } | |
| return d.test(c.call(i)) | |
| }, | |
| isDebugEnabled: l, | |
| clone: function(u) { | |
| if (u === null || u === undefined) { | |
| return u | |
| } | |
| if (u.nodeType && u.cloneNode) { | |
| return u.cloneNode(true) | |
| } | |
| var t = c.call(u), s, q, p, v, r; | |
| if (t === "[object Date]") { | |
| return new Date(u.getTime()) | |
| } | |
| if (t === "[object Array]") { | |
| s = u.length; | |
| v = []; | |
| while (s--) { | |
| v[s] = Ext.clone(u[s]) | |
| } | |
| } else { | |
| if (t === "[object Object]" && u.constructor === Object) { | |
| v = {}; | |
| for (r in u) { | |
| v[r] = Ext.clone(u[r]) | |
| } | |
| if (o) { | |
| for (q = o.length; q--; ) { | |
| p = o[q]; | |
| if (u.hasOwnProperty(p)) { | |
| v[p] = u[p] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return v || u | |
| }, | |
| getUniqueGlobalNamespace: function() { | |
| var q = this.uniqueGlobalNamespace, p; | |
| if (q === undefined) { | |
| p = 0; | |
| do { | |
| q = "ExtBox" + (++p) | |
| } while (b[q] !== undefined);b[q] = Ext; | |
| this.uniqueGlobalNamespace = q | |
| } | |
| return q | |
| }, | |
| functionFactoryCache: {}, | |
| cacheableFunctionFactory: function() { | |
| var t = this, q = Array.prototype.slice.call(arguments), p = t.functionFactoryCache, i, r, s; | |
| if (Ext.isSandboxed) { | |
| s = q.length; | |
| if (s > 0) { | |
| s--; | |
| q[s] = "var Ext=window." + Ext.name + ";" + q[s] | |
| } | |
| } | |
| i = q.join(""); | |
| r = p[i]; | |
| if (!r) { | |
| r = Function.prototype.constructor.apply(Function.prototype, q); | |
| p[i] = r | |
| } | |
| return r | |
| }, | |
| functionFactory: function() { | |
| var i = Array.prototype.slice.call(arguments), p; | |
| if (Ext.isSandboxed) { | |
| p = i.length; | |
| if (p > 0) { | |
| p--; | |
| i[p] = "var Ext=window." + Ext.name + ";" + i[p] | |
| } | |
| } | |
| return Function.prototype.constructor.apply(Function.prototype, i) | |
| }, | |
| Logger: { | |
| log: function(p, i) { | |
| if (p && b.console) { | |
| if (!i || !(i in b.console)) { | |
| i = "log" | |
| } | |
| p = "[" + i.toUpperCase() + "] " + p; | |
| b.console[i](p) | |
| } | |
| }, | |
| verbose: function(i) { | |
| this.log(i, "verbose") | |
| }, | |
| info: function(i) { | |
| this.log(i, "info") | |
| }, | |
| warn: function(i) { | |
| this.log(i, "warn") | |
| }, | |
| error: function(i) { | |
| throw new Error(i) | |
| }, | |
| deprecate: function(i) { | |
| this.log(i, "warn") | |
| } | |
| } || { | |
| verbose: l, | |
| log: l, | |
| info: l, | |
| warn: l, | |
| error: function(i) { | |
| throw new Error(i) | |
| }, | |
| deprecate: l | |
| }, | |
| getElementById: function(i) { | |
| return document.getElementById(i) | |
| }, | |
| splitAndUnescape: (function() { | |
| var i = {}; | |
| return function(r, q) { | |
| if (!r) { | |
| return [] | |
| } else { | |
| if (!q) { | |
| return [r] | |
| } | |
| } | |
| var t = i[q] || (i[q] = new RegExp("\\\\" + q,"g")), p = [], u, s; | |
| u = r.split(q); | |
| while ((s = u.shift()) !== undefined) { | |
| while (s.charAt(s.length - 1) === "\\" && u.length > 0) { | |
| s = s + q + u.shift() | |
| } | |
| s = s.replace(t, q); | |
| p.push(s) | |
| } | |
| return p | |
| } | |
| })() | |
| }); | |
| Ext.returnTrue.$nullFn = Ext.returnId.$nullFn = true | |
| }()); | |
| Ext.platformTags.modern = !(Ext.platformTags.classic = Ext.isClassic = true); | |
| (function() { | |
| function a() { | |
| var c = this | |
| , b = c.sourceClass | |
| , e = c.sourceMethod | |
| , d = c.msg; | |
| if (e) { | |
| if (d) { | |
| e += "(): "; | |
| e += d | |
| } else { | |
| e += "()" | |
| } | |
| } | |
| if (b) { | |
| e = e ? (b + "." + e) : b | |
| } | |
| return e || d || "" | |
| } | |
| Ext.Error = function(c) { | |
| if (Ext.isString(c)) { | |
| c = { | |
| msg: c | |
| } | |
| } | |
| var b = new Error(); | |
| Ext.apply(b, c); | |
| b.message = b.message || b.msg; | |
| b.toString = a; | |
| return b | |
| } | |
| ; | |
| Ext.apply(Ext.Error, { | |
| ignore: false, | |
| raise: function(d) { | |
| d = d || {}; | |
| if (Ext.isString(d)) { | |
| d = { | |
| msg: d | |
| } | |
| } | |
| var c = this, g = c.raise.caller, e, b; | |
| if (g === Ext.raise) { | |
| g = g.caller | |
| } | |
| if (g) { | |
| if (!d.sourceMethod && (b = g.$name)) { | |
| d.sourceMethod = b | |
| } | |
| if (!d.sourceClass && (b = g.$owner) && (b = b.$className)) { | |
| d.sourceClass = b | |
| } | |
| } | |
| if (c.handle(d) !== true) { | |
| e = a.call(d); | |
| throw new Ext.Error(d) | |
| } | |
| }, | |
| handle: function() { | |
| return this.ignore | |
| } | |
| }) | |
| })(); | |
| Ext.deprecated = function(a) { | |
| return Ext.emptyFn | |
| } | |
| ; | |
| Ext.raise = function() { | |
| Ext.Error.raise.apply(Ext.Error, arguments) | |
| } | |
| ; | |
| Ext.Array = (function() { | |
| var c = Array.prototype | |
| , l = c.slice | |
| , n = (function() { | |
| var v = [], e, u = 20; | |
| if (!v.splice) { | |
| return false | |
| } | |
| while (u--) { | |
| v.push("A") | |
| } | |
| v.splice(15, 0, "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F"); | |
| e = v.length; | |
| v.splice(13, 0, "XXX"); | |
| if (e + 1 !== v.length) { | |
| return false | |
| } | |
| return true | |
| }()) | |
| , m = "indexOf"in c | |
| , h = true; | |
| function k(x, u) { | |
| var e = x.length, w = new Array(e), v; | |
| for (v = 0; v < e; v++) { | |
| w[v] = v | |
| } | |
| w.sort(function(z, y) { | |
| return u(x[z], x[y]) || (z - y) | |
| }); | |
| for (v = 0; v < e; v++) { | |
| w[v] = x[w[v]] | |
| } | |
| for (v = 0; v < e; v++) { | |
| x[v] = w[v] | |
| } | |
| return x | |
| } | |
| try { | |
| if (typeof document !== "undefined") { | |
| l.call(document.getElementsByTagName("body")) | |
| } | |
| } catch (p) { | |
| h = false | |
| } | |
| var j = function(u, e) { | |
| return (e < 0) ? Math.max(0, u.length + e) : Math.min(u.length, e) | |
| } | |
| , t = function(B, A, u, E) { | |
| var F = E ? E.length : 0 | |
| , w = B.length | |
| , C = j(B, A); | |
| if (C === w) { | |
| if (F) { | |
| B.push.apply(B, E) | |
| } | |
| } else { | |
| var z = Math.min(u, w - C), D = C + z, v = D + F - z, e = w - D, x = w - z, y; | |
| if (v < D) { | |
| for (y = 0; y < e; ++y) { | |
| B[v + y] = B[D + y] | |
| } | |
| } else { | |
| if (v > D) { | |
| for (y = e; y--; ) { | |
| B[v + y] = B[D + y] | |
| } | |
| } | |
| } | |
| if (F && C === x) { | |
| B.length = x; | |
| B.push.apply(B, E) | |
| } else { | |
| B.length = x + F; | |
| for (y = 0; y < F; ++y) { | |
| B[C + y] = E[y] | |
| } | |
| } | |
| } | |
| return B | |
| } | |
| , g = function(w, e, v, u) { | |
| if (u && u.length) { | |
| if (e === 0 && !v) { | |
| w.unshift.apply(w, u) | |
| } else { | |
| if (e < w.length) { | |
| w.splice.apply(w, [e, v].concat(u)) | |
| } else { | |
| w.push.apply(w, u) | |
| } | |
| } | |
| } else { | |
| w.splice(e, v) | |
| } | |
| return w | |
| } | |
| , b = function(v, e, u) { | |
| return t(v, e, u) | |
| } | |
| , o = function(v, e, u) { | |
| v.splice(e, u); | |
| return v | |
| } | |
| , i = function(x, e, v) { | |
| var w = j(x, e) | |
| , u = x.slice(e, j(x, w + v)); | |
| if (arguments.length < 4) { | |
| t(x, w, v) | |
| } else { | |
| t(x, w, v, l.call(arguments, 3)) | |
| } | |
| return u | |
| } | |
| , d = function(e) { | |
| return e.splice.apply(e, l.call(arguments, 1)) | |
| } | |
| , s = n ? o : b | |
| , q = n ? g : t | |
| , r = n ? d : i | |
| , a = { | |
| binarySearch: function(A, x, v, e, z) { | |
| var w = A.length, u, y; | |
| if (v instanceof Function) { | |
| z = v; | |
| v = 0; | |
| e = w | |
| } else { | |
| if (e instanceof Function) { | |
| z = e; | |
| e = w | |
| } else { | |
| if (v === undefined) { | |
| v = 0 | |
| } | |
| if (e === undefined) { | |
| e = w | |
| } | |
| z = z || a.lexicalCompare | |
| } | |
| } | |
| --e; | |
| while (v <= e) { | |
| u = (v + e) >> 1; | |
| y = z(x, A[u]); | |
| if (y >= 0) { | |
| v = u + 1 | |
| } else { | |
| if (y < 0) { | |
| e = u - 1 | |
| } | |
| } | |
| } | |
| return v | |
| }, | |
| defaultCompare: function(e, u) { | |
| return (e < u) ? -1 : ((e > u) ? 1 : 0) | |
| }, | |
| lexicalCompare: function(e, u) { | |
| e = String(e); | |
| u = String(u); | |
| return (e < u) ? -1 : ((e > u) ? 1 : 0) | |
| }, | |
| each: function(y, w, v, e) { | |
| y = a.from(y); | |
| var u, x = y.length; | |
| if (e !== true) { | |
| for (u = 0; u < x; u++) { | |
| if (w.call(v || y[u], y[u], u, y) === false) { | |
| return u | |
| } | |
| } | |
| } else { | |
| for (u = x - 1; u > -1; u--) { | |
| if (w.call(v || y[u], y[u], u, y) === false) { | |
| return u | |
| } | |
| } | |
| } | |
| return true | |
| }, | |
| forEach: ("forEach"in c) ? function(v, u, e) { | |
| return v.forEach(u, e) | |
| } | |
| : function(x, v, u) { | |
| for (var e = 0, w = x.length; e < w; e++) { | |
| v.call(u, x[e], e, x) | |
| } | |
| } | |
| , | |
| indexOf: m ? function(v, e, u) { | |
| return c.indexOf.call(v, e, u) | |
| } | |
| : function(x, v, w) { | |
| var e, u = x.length; | |
| for (e = (w < 0) ? Math.max(0, u + w) : w || 0; e < u; e++) { | |
| if (x[e] === v) { | |
| return e | |
| } | |
| } | |
| return -1 | |
| } | |
| , | |
| contains: m ? function(u, e) { | |
| return c.indexOf.call(u, e) !== -1 | |
| } | |
| : function(w, v) { | |
| var e, u; | |
| for (e = 0, | |
| u = w.length; e < u; e++) { | |
| if (w[e] === v) { | |
| return true | |
| } | |
| } | |
| return false | |
| } | |
| , | |
| toArray: function(v, x, e) { | |
| if (!v || !v.length) { | |
| return [] | |
| } | |
| if (typeof v === "string") { | |
| v = v.split("") | |
| } | |
| if (h) { | |
| return l.call(v, x || 0, e || v.length) | |
| } | |
| var w = [], u; | |
| x = x || 0; | |
| e = e ? ((e < 0) ? v.length + e : e) : v.length; | |
| for (u = x; u < e; u++) { | |
| w.push(v[u]) | |
| } | |
| return w | |
| }, | |
| pluck: function(y, e) { | |
| var u = [], v, x, w; | |
| for (v = 0, | |
| x = y.length; v < x; v++) { | |
| w = y[v]; | |
| u.push(w[e]) | |
| } | |
| return u | |
| }, | |
| map: ("map"in c) ? function(v, u, e) { | |
| return v.map(u, e) | |
| } | |
| : function(y, x, w) { | |
| var v = [], e = y.length, u; | |
| for (u = 0; u < e; u++) { | |
| v[u] = x.call(w, y[u], u, y) | |
| } | |
| return v | |
| } | |
| , | |
| every: ("every"in c) ? function(v, u, e) { | |
| return v.every(u, e) | |
| } | |
| : function(x, v, u) { | |
| var e = 0 | |
| , w = x.length; | |
| for (; e < w; ++e) { | |
| if (!v.call(u, x[e], e, x)) { | |
| return false | |
| } | |
| } | |
| return true | |
| } | |
| , | |
| some: ("some"in c) ? function(v, u, e) { | |
| return v.some(u, e) | |
| } | |
| : function(x, v, u) { | |
| var e = 0 | |
| , w = x.length; | |
| for (; e < w; ++e) { | |
| if (v.call(u, x[e], e, x)) { | |
| return true | |
| } | |
| } | |
| return false | |
| } | |
| , | |
| equals: function(x, w) { | |
| var u = x.length, e = w.length, v; | |
| if (x === w) { | |
| return true | |
| } | |
| if (u !== e) { | |
| return false | |
| } | |
| for (v = 0; v < u; ++v) { | |
| if (x[v] !== w[v]) { | |
| return false | |
| } | |
| } | |
| return true | |
| }, | |
| clean: function(x) { | |
| var u = [], e = 0, w = x.length, v; | |
| for (; e < w; e++) { | |
| v = x[e]; | |
| if (!Ext.isEmpty(v)) { | |
| u.push(v) | |
| } | |
| } | |
| return u | |
| }, | |
| unique: function(x) { | |
| var w = [], e = 0, v = x.length, u; | |
| for (; e < v; e++) { | |
| u = x[e]; | |
| if (a.indexOf(w, u) === -1) { | |
| w.push(u) | |
| } | |
| } | |
| return w | |
| }, | |
| filter: ("filter"in c) ? function(v, u, e) { | |
| return v.filter(u, e) | |
| } | |
| : function(y, w, v) { | |
| var u = [] | |
| , e = 0 | |
| , x = y.length; | |
| for (; e < x; e++) { | |
| if (w.call(v, y[e], e, y)) { | |
| u.push(y[e]) | |
| } | |
| } | |
| return u | |
| } | |
| , | |
| findBy: function(x, w, v) { | |
| var u = 0 | |
| , e = x.length; | |
| for (; u < e; u++) { | |
| if (w.call(v || x, x[u], u)) { | |
| return x[u] | |
| } | |
| } | |
| return null | |
| }, | |
| from: function(v, u) { | |
| if (v === undefined || v === null ) { | |
| return [] | |
| } | |
| if (Ext.isArray(v)) { | |
| return (u) ? l.call(v) : v | |
| } | |
| var e = typeof v; | |
| if (v && v.length !== undefined && e !== "string" && (e !== "function" || !v.apply)) { | |
| return a.toArray(v) | |
| } | |
| return [v] | |
| }, | |
| remove: function(v, u) { | |
| var e = a.indexOf(v, u); | |
| if (e !== -1) { | |
| s(v, e, 1) | |
| } | |
| return v | |
| }, | |
| removeAt: function(w, u, v) { | |
| var e = w.length; | |
| if (u >= 0 && u < e) { | |
| v = v || 1; | |
| v = Math.min(v, e - u); | |
| s(w, u, v) | |
| } | |
| return w | |
| }, | |
| include: function(u, e) { | |
| if (!a.contains(u, e)) { | |
| u.push(e) | |
| } | |
| }, | |
| clone: function(e) { | |
| return l.call(e) | |
| }, | |
| merge: function() { | |
| var e = l.call(arguments), w = [], u, v; | |
| for (u = 0, | |
| v = e.length; u < v; u++) { | |
| w = w.concat(e[u]) | |
| } | |
| return a.unique(w) | |
| }, | |
| intersect: function() { | |
| var e = [], v = l.call(arguments), G, E, A, D, H, w, u, C, F, x, B, z, y; | |
| if (!v.length) { | |
| return e | |
| } | |
| G = v.length; | |
| for (B = H = 0; B < G; B++) { | |
| w = v[B]; | |
| if (!D || w.length < D.length) { | |
| D = w; | |
| H = B | |
| } | |
| } | |
| D = a.unique(D); | |
| s(v, H, 1); | |
| u = D.length; | |
| G = v.length; | |
| for (B = 0; B < u; B++) { | |
| C = D[B]; | |
| x = 0; | |
| for (z = 0; z < G; z++) { | |
| E = v[z]; | |
| A = E.length; | |
| for (y = 0; y < A; y++) { | |
| F = E[y]; | |
| if (C === F) { | |
| x++; | |
| break | |
| } | |
| } | |
| } | |
| if (x === G) { | |
| e.push(C) | |
| } | |
| } | |
| return e | |
| }, | |
| difference: function(u, e) { | |
| var z = l.call(u), x = z.length, w, v, y; | |
| for (w = 0, | |
| y = e.length; w < y; w++) { | |
| for (v = 0; v < x; v++) { | |
| if (z[v] === e[w]) { | |
| s(z, v, 1); | |
| v--; | |
| x-- | |
| } | |
| } | |
| } | |
| return z | |
| }, | |
| reduce: Array.prototype.reduce ? function(v, u, e) { | |
| if (arguments.length === 3) { | |
| return Array.prototype.reduce.call(v, u, e) | |
| } | |
| return Array.prototype.reduce.call(v, u) | |
| } | |
| : function(y, x, e) { | |
| y = Object(y); | |
| var v = 0 | |
| , w = y.length >>> 0 | |
| , u = e; | |
| if (arguments.length < 3) { | |
| while (true) { | |
| if (v in y) { | |
| u = y[v++]; | |
| break | |
| } | |
| if (++v >= w) { | |
| throw new TypeError("Reduce of empty array with no initial value") | |
| } | |
| } | |
| } | |
| for (; v < w; ++v) { | |
| if (v in y) { | |
| u = x(u, y[v], v, y) | |
| } | |
| } | |
| return u | |
| } | |
| , | |
| slice: ([1, 2].slice(1, undefined).length ? function(v, u, e) { | |
| return l.call(v, u, e) | |
| } | |
| : function(v, u, e) { | |
| if (typeof u === "undefined") { | |
| return l.call(v) | |
| } | |
| if (typeof e === "undefined") { | |
| return l.call(v, u) | |
| } | |
| return l.call(v, u, e) | |
| } | |
| ), | |
| sort: function(u, e) { | |
| return k(u, e || a.lexicalCompare) | |
| }, | |
| flatten: function(v) { | |
| var u = []; | |
| function e(w) { | |
| var y, z, x; | |
| for (y = 0, | |
| z = w.length; y < z; y++) { | |
| x = w[y]; | |
| if (Ext.isArray(x)) { | |
| e(x) | |
| } else { | |
| u.push(x) | |
| } | |
| } | |
| return u | |
| } | |
| return e(v) | |
| }, | |
| min: function(y, x) { | |
| var u = y[0], e, w, v; | |
| for (e = 0, | |
| w = y.length; e < w; e++) { | |
| v = y[e]; | |
| if (x) { | |
| if (x(u, v) === 1) { | |
| u = v | |
| } | |
| } else { | |
| if (v < u) { | |
| u = v | |
| } | |
| } | |
| } | |
| return u | |
| }, | |
| max: function(y, x) { | |
| var e = y[0], u, w, v; | |
| for (u = 0, | |
| w = y.length; u < w; u++) { | |
| v = y[u]; | |
| if (x) { | |
| if (x(e, v) === -1) { | |
| e = v | |
| } | |
| } else { | |
| if (v > e) { | |
| e = v | |
| } | |
| } | |
| } | |
| return e | |
| }, | |
| mean: function(e) { | |
| return e.length > 0 ? a.sum(e) / e.length : undefined | |
| }, | |
| sum: function(x) { | |
| var u = 0, e, w, v; | |
| for (e = 0, | |
| w = x.length; e < w; e++) { | |
| v = x[e]; | |
| u += v | |
| } | |
| return u | |
| }, | |
| toMap: function(x, e, v) { | |
| var w = {} | |
| , u = x.length; | |
| if (!e) { | |
| while (u--) { | |
| w[x[u]] = u + 1 | |
| } | |
| } else { | |
| if (typeof e === "string") { | |
| while (u--) { | |
| w[x[u][e]] = u + 1 | |
| } | |
| } else { | |
| while (u--) { | |
| w[e.call(v, x[u])] = u + 1 | |
| } | |
| } | |
| } | |
| return w | |
| }, | |
| toValueMap: function(z, w, E, y) { | |
| var e = {}, v = z.length, u, x, C, A, D, B; | |
| if (!w) { | |
| while (v--) { | |
| B = z[v]; | |
| e[B] = B | |
| } | |
| } else { | |
| if (!(A = (typeof w !== "string"))) { | |
| y = E | |
| } | |
| x = y === 1; | |
| u = y === 2; | |
| while (v--) { | |
| B = z[v]; | |
| D = A ? w.call(E, B) : B[w]; | |
| if (x) { | |
| if (D in e) { | |
| e[D].push(B) | |
| } else { | |
| e[D] = [B] | |
| } | |
| } else { | |
| if (u && (D in e)) { | |
| if ((C = e[D])instanceof Array) { | |
| C.push(B) | |
| } else { | |
| e[D] = [C, B] | |
| } | |
| } else { | |
| e[D] = B | |
| } | |
| } | |
| } | |
| } | |
| return e | |
| }, | |
| erase: s, | |
| insert: function(v, u, e) { | |
| return q(v, u, 0, e) | |
| }, | |
| move: function(y, u, w) { | |
| if (w === u) { | |
| return | |
| } | |
| var v = y[u], x = w > u ? 1 : -1, e; | |
| for (e = u; e != w; e += x) { | |
| y[e] = y[e + x] | |
| } | |
| y[w] = v | |
| }, | |
| replace: q, | |
| splice: r, | |
| push: function(w) { | |
| var e = arguments.length, v = 1, u; | |
| if (w === undefined) { | |
| w = [] | |
| } else { | |
| if (!Ext.isArray(w)) { | |
| w = [w] | |
| } | |
| } | |
| for (; v < e; v++) { | |
| u = arguments[v]; | |
| Array.prototype.push[Ext.isIterable(u) ? "apply" : "call"](w, u) | |
| } | |
| return w | |
| }, | |
| numericSortFn: function(u, e) { | |
| return u - e | |
| } | |
| }; | |
| Ext.each = a.each; | |
| a.union = a.merge; | |
| Ext.min = a.min; | |
| Ext.max = a.max; | |
| Ext.sum = a.sum; | |
| Ext.mean = a.mean; | |
| Ext.flatten = a.flatten; | |
| Ext.clean = a.clean; | |
| Ext.unique = a.unique; | |
| Ext.pluck = a.pluck; | |
| Ext.toArray = function() { | |
| return a.toArray.apply(a, arguments) | |
| } | |
| ; | |
| return a | |
| }()); | |
| Ext.String = (function() { | |
| var i = /^[\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, m = /('|\\)/g, b = /([-.*+?\^${}()|\[\]\/\\])/g, o = /^\s+|\s+$/g, j = /\s+/, l = /(^[^a-z]*|[^\w])/gi, e, a, h, d, g = function(q, p) { | |
| return e[p] | |
| } | |
| , k = function(q, p) { | |
| return (p in a) ? a[p] : String.fromCharCode(parseInt(p.substr(2), 10)) | |
| } | |
| , c = function(q, p) { | |
| if (q === null || q === undefined || p === null || p === undefined) { | |
| return false | |
| } | |
| return p.length <= q.length | |
| } | |
| , n; | |
| return n = { | |
| insert: function(r, t, q) { | |
| if (!r) { | |
| return t | |
| } | |
| if (!t) { | |
| return r | |
| } | |
| var p = r.length; | |
| if (!q && q !== 0) { | |
| q = p | |
| } | |
| if (q < 0) { | |
| q *= -1; | |
| if (q >= p) { | |
| q = 0 | |
| } else { | |
| q = p - q | |
| } | |
| } | |
| if (q === 0) { | |
| r = t + r | |
| } else { | |
| if (q >= r.length) { | |
| r += t | |
| } else { | |
| r = r.substr(0, q) + t + r.substr(q) | |
| } | |
| } | |
| return r | |
| }, | |
| startsWith: function(r, t, q) { | |
| var p = c(r, t); | |
| if (p) { | |
| if (q) { | |
| r = r.toLowerCase(); | |
| t = t.toLowerCase() | |
| } | |
| p = r.lastIndexOf(t, 0) === 0 | |
| } | |
| return p | |
| }, | |
| endsWith: function(t, q, r) { | |
| var p = c(t, q); | |
| if (p) { | |
| if (r) { | |
| t = t.toLowerCase(); | |
| q = q.toLowerCase() | |
| } | |
| p = t.indexOf(q, t.length - q.length) !== -1 | |
| } | |
| return p | |
| }, | |
| createVarName: function(p) { | |
| return p.replace(l, "") | |
| }, | |
| htmlEncode: function(p) { | |
| return (!p) ? p : String(p).replace(h, g) | |
| }, | |
| htmlDecode: function(p) { | |
| return (!p) ? p : String(p).replace(d, k) | |
| }, | |
| hasHtmlCharacters: function(p) { | |
| return h.test(p) | |
| }, | |
| addCharacterEntities: function(q) { | |
| var p = [], t = [], r, s; | |
| for (r in q) { | |
| s = q[r]; | |
| a[r] = s; | |
| e[s] = r; | |
| p.push(s); | |
| t.push(r) | |
| } | |
| h = new RegExp("(" + p.join("|") + ")","g"); | |
| d = new RegExp("(" + t.join("|") + "|&#[0-9]{1,5};)","g") | |
| }, | |
| resetCharacterEntities: function() { | |
| e = {}; | |
| a = {}; | |
| this.addCharacterEntities({ | |
| "&": "&", | |
| ">": ">", | |
| "<": "<", | |
| """: '"', | |
| "'": "'" | |
| }) | |
| }, | |
| urlAppend: function(q, p) { | |
| if (!Ext.isEmpty(p)) { | |
| return q + (q.indexOf("?") === -1 ? "?" : "&") + p | |
| } | |
| return q | |
| }, | |
| trim: function(p) { | |
| if (p) { | |
| p = p.replace(i, "") | |
| } | |
| return p || "" | |
| }, | |
| capitalize: function(p) { | |
| if (p) { | |
| p = p.charAt(0).toUpperCase() + p.substr(1) | |
| } | |
| return p || "" | |
| }, | |
| uncapitalize: function(p) { | |
| if (p) { | |
| p = p.charAt(0).toLowerCase() + p.substr(1) | |
| } | |
| return p || "" | |
| }, | |
| ellipsis: function(r, q, s) { | |
| if (r && r.length > q) { | |
| if (s) { | |
| var t = r.substr(0, q - 2) | |
| , p = Math.max(t.lastIndexOf(" "), t.lastIndexOf("."), t.lastIndexOf("!"), t.lastIndexOf("?")); | |
| if (p !== -1 && p >= (q - 15)) { | |
| return t.substr(0, p) + "..." | |
| } | |
| } | |
| return r.substr(0, q - 3) + "..." | |
| } | |
| return r | |
| }, | |
| escapeRegex: function(p) { | |
| return p.replace(b, "\\$1") | |
| }, | |
| createRegex: function(t, s, q, p) { | |
| var r = t; | |
| if (t != null && !t.exec) { | |
| r = n.escapeRegex(String(t)); | |
| if (s !== false) { | |
| r = "^" + r | |
| } | |
| if (q !== false) { | |
| r += "$" | |
| } | |
| r = new RegExp(r,(p !== false) ? "i" : "") | |
| } | |
| return r | |
| }, | |
| escape: function(p) { | |
| return p.replace(m, "\\$1") | |
| }, | |
| toggle: function(q, r, p) { | |
| return q === r ? p : r | |
| }, | |
| leftPad: function(q, r, s) { | |
| var p = String(q); | |
| s = s || " "; | |
| while (p.length < r) { | |
| p = s + p | |
| } | |
| return p | |
| }, | |
| repeat: function(t, s, q) { | |
| if (s < 1) { | |
| s = 0 | |
| } | |
| for (var p = [], r = s; r--; ) { | |
| p.push(t) | |
| } | |
| return p.join(q || "") | |
| }, | |
| splitWords: function(p) { | |
| if (p && typeof p == "string") { | |
| return p.replace(o, "").split(j) | |
| } | |
| return p || [] | |
| } | |
| } | |
| }()); | |
| Ext.String.resetCharacterEntities(); | |
| Ext.htmlEncode = Ext.String.htmlEncode; | |
| Ext.htmlDecode = Ext.String.htmlDecode; | |
| Ext.urlAppend = Ext.String.urlAppend; | |
| Ext.Date = (function() { | |
| var g, e = Date, l = /(\\.)/g, a = /([gGhHisucUOPZ]|MS)/, h = /([djzmnYycU]|MS)/, k = /\\/gi, c = /\{(\d+)\}/g, i = new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/"), d = Ext.String.leftPad, b = ["var me = this, dt, y, m, d, h, i, s, ms, o, O, z, zz, u, v, W, year, jan4, week1monday, daysInMonth, dayMatched,", "def = me.defaults,", "from = Ext.Number.from,", "results = String(input).match(me.parseRegexes[{0}]);", "if(results){", "{1}", "if(u != null){", "v = new Date(u * 1000);", "}else{", "dt = me.clearTime(new Date);", "y = from(y, from(def.y, dt.getFullYear()));", "m = from(m, from(def.m - 1, dt.getMonth()));", "dayMatched = d !== undefined;", "d = from(d, from(def.d, dt.getDate()));", "if (!dayMatched) {", "dt.setDate(1);", "dt.setMonth(m);", "dt.setFullYear(y);", "daysInMonth = me.getDaysInMonth(dt);", "if (d > daysInMonth) {", "d = daysInMonth;", "}", "}", "h = from(h, from(def.h, dt.getHours()));", "i = from(i, from(def.i, dt.getMinutes()));", "s = from(s, from(def.s, dt.getSeconds()));", "ms = from(ms, from(def.ms, dt.getMilliseconds()));", "if(z >= 0 && y >= 0){", "v = me.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), me.YEAR, y < 100 ? y - 100 : 0);", "v = !strict? v : (strict === true && (z <= 364 || (me.isLeapYear(v) && z <= 365))? me.add(v, me.DAY, z) : null);", "}else if(strict === true && !me.isValid(y, m + 1, d, h, i, s, ms)){", "v = null;", "}else{", "if (W) {", "year = y || (new Date()).getFullYear();", "jan4 = new Date(year, 0, 4, 0, 0, 0);", "d = jan4.getDay();", "week1monday = new Date(jan4.getTime() - ((d === 0 ? 6 : d - 1) * 86400000));", "v = Ext.Date.clearTime(new Date(week1monday.getTime() + ((W - 1) * 604800000 + 43200000)));", "} else {", "v = me.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), me.YEAR, y < 100 ? y - 100 : 0);", "}", "}", "}", "}", "if(v){", "if(zz != null){", "v = me.add(v, me.SECOND, -v.getTimezoneOffset() * 60 - zz);", "}else if(o){", "v = me.add(v, me.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));", "}", "}", "return (v != null) ? v : null;"].join("\n"); | |
| if (!Date.prototype.toISOString) { | |
| Date.prototype.toISOString = function() { | |
| var m = this; | |
| return d(m.getUTCFullYear(), 4, "0") + "-" + d(m.getUTCMonth() + 1, 2, "0") + "-" + d(m.getUTCDate(), 2, "0") + "T" + d(m.getUTCHours(), 2, "0") + ":" + d(m.getUTCMinutes(), 2, "0") + ":" + d(m.getUTCSeconds(), 2, "0") + "." + d(m.getUTCMilliseconds(), 3, "0") + "Z" | |
| } | |
| } | |
| function j(n) { | |
| var m = Array.prototype.slice.call(arguments, 1); | |
| return n.replace(c, function(o, p) { | |
| return m[p] | |
| }) | |
| } | |
| return g = { | |
| now: e.now, | |
| toString: function(m) { | |
| if (!m) { | |
| m = new e() | |
| } | |
| return m.getFullYear() + "-" + d(m.getMonth() + 1, 2, "0") + "-" + d(m.getDate(), 2, "0") + "T" + d(m.getHours(), 2, "0") + ":" + d(m.getMinutes(), 2, "0") + ":" + d(m.getSeconds(), 2, "0") | |
| }, | |
| getElapsed: function(n, m) { | |
| return Math.abs(n - (m || g.now())) | |
| }, | |
| useStrict: false, | |
| formatCodeToRegex: function(n, m) { | |
| var o = g.parseCodes[n]; | |
| if (o) { | |
| o = typeof o === "function" ? o() : o; | |
| g.parseCodes[n] = o | |
| } | |
| return o ? Ext.applyIf({ | |
| c: o.c ? j(o.c, m || "{0}") : o.c | |
| }, o) : { | |
| g: 0, | |
| c: null , | |
| s: Ext.String.escapeRegex(n) | |
| } | |
| }, | |
| parseFunctions: { | |
| MS: function(n, m) { | |
| var o = (n || "").match(i); | |
| return o ? new e(((o[1] || "") + o[2]) * 1) : null | |
| }, | |
| time: function(n, m) { | |
| var o = parseInt(n, 10); | |
| if (o || o === 0) { | |
| return new e(o) | |
| } | |
| return null | |
| }, | |
| timestamp: function(n, m) { | |
| var o = parseInt(n, 10); | |
| if (o || o === 0) { | |
| return new e(o * 1000) | |
| } | |
| return null | |
| } | |
| }, | |
| parseRegexes: [], | |
| formatFunctions: { | |
| MS: function() { | |
| return "\\/Date(" + this.getTime() + ")\\/" | |
| }, | |
| time: function() { | |
| return this.getTime().toString() | |
| }, | |
| timestamp: function() { | |
| return g.format(this, "U") | |
| } | |
| }, | |
| y2kYear: 50, | |
| MILLI: "ms", | |
| SECOND: "s", | |
| MINUTE: "mi", | |
| HOUR: "h", | |
| DAY: "d", | |
| MONTH: "mo", | |
| YEAR: "y", | |
| defaults: {}, | |
| dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], | |
| monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | |
| monthNumbers: { | |
| January: 0, | |
| Jan: 0, | |
| February: 1, | |
| Feb: 1, | |
| March: 2, | |
| Mar: 2, | |
| April: 3, | |
| Apr: 3, | |
| May: 4, | |
| June: 5, | |
| Jun: 5, | |
| July: 6, | |
| Jul: 6, | |
| August: 7, | |
| Aug: 7, | |
| September: 8, | |
| Sep: 8, | |
| October: 9, | |
| Oct: 9, | |
| November: 10, | |
| Nov: 10, | |
| December: 11, | |
| Dec: 11 | |
| }, | |
| defaultFormat: "m/d/Y", | |
| getShortMonthName: function(m) { | |
| return g.monthNames[m].substring(0, 3) | |
| }, | |
| getShortDayName: function(m) { | |
| return g.dayNames[m].substring(0, 3) | |
| }, | |
| getMonthNumber: function(m) { | |
| return g.monthNumbers[m.substring(0, 1).toUpperCase() + m.substring(1, 3).toLowerCase()] | |
| }, | |
| formatContainsHourInfo: function(m) { | |
| return a.test(m.replace(l, "")) | |
| }, | |
| formatContainsDateInfo: function(m) { | |
| return h.test(m.replace(l, "")) | |
| }, | |
| unescapeFormat: function(m) { | |
| return m.replace(k, "") | |
| }, | |
| formatCodes: { | |
| d: "Ext.String.leftPad(m.getDate(), 2, '0')", | |
| D: "Ext.Date.getShortDayName(m.getDay())", | |
| j: "m.getDate()", | |
| l: "Ext.Date.dayNames[m.getDay()]", | |
| N: "(m.getDay() ? m.getDay() : 7)", | |
| S: "Ext.Date.getSuffix(m)", | |
| w: "m.getDay()", | |
| z: "Ext.Date.getDayOfYear(m)", | |
| W: "Ext.String.leftPad(Ext.Date.getWeekOfYear(m), 2, '0')", | |
| F: "Ext.Date.monthNames[m.getMonth()]", | |
| m: "Ext.String.leftPad(m.getMonth() + 1, 2, '0')", | |
| M: "Ext.Date.getShortMonthName(m.getMonth())", | |
| n: "(m.getMonth() + 1)", | |
| t: "Ext.Date.getDaysInMonth(m)", | |
| L: "(Ext.Date.isLeapYear(m) ? 1 : 0)", | |
| o: "(m.getFullYear() + (Ext.Date.getWeekOfYear(m) == 1 && m.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(m) >= 52 && m.getMonth() < 11 ? -1 : 0)))", | |
| Y: "Ext.String.leftPad(m.getFullYear(), 4, '0')", | |
| y: "('' + m.getFullYear()).substring(2, 4)", | |
| a: "(m.getHours() < 12 ? 'am' : 'pm')", | |
| A: "(m.getHours() < 12 ? 'AM' : 'PM')", | |
| g: "((m.getHours() % 12) ? m.getHours() % 12 : 12)", | |
| G: "m.getHours()", | |
| h: "Ext.String.leftPad((m.getHours() % 12) ? m.getHours() % 12 : 12, 2, '0')", | |
| H: "Ext.String.leftPad(m.getHours(), 2, '0')", | |
| i: "Ext.String.leftPad(m.getMinutes(), 2, '0')", | |
| s: "Ext.String.leftPad(m.getSeconds(), 2, '0')", | |
| u: "Ext.String.leftPad(m.getMilliseconds(), 3, '0')", | |
| O: "Ext.Date.getGMTOffset(m)", | |
| P: "Ext.Date.getGMTOffset(m, true)", | |
| T: "Ext.Date.getTimezone(m)", | |
| Z: "(m.getTimezoneOffset() * -60)", | |
| c: function() { | |
| var q = "Y-m-dTH:i:sP", o = [], n, m = q.length, p; | |
| for (n = 0; n < m; ++n) { | |
| p = q.charAt(n); | |
| o.push(p === "T" ? "'T'" : g.getFormatCode(p)) | |
| } | |
| return o.join(" + ") | |
| }, | |
| C: function() { | |
| return "m.toISOString()" | |
| }, | |
| U: "Math.round(m.getTime() / 1000)" | |
| }, | |
| isValid: function(v, n, u, r, p, q, o) { | |
| r = r || 0; | |
| p = p || 0; | |
| q = q || 0; | |
| o = o || 0; | |
| var t = g.add(new e(v < 100 ? 100 : v,n - 1,u,r,p,q,o), g.YEAR, v < 100 ? v - 100 : 0); | |
| return v === t.getFullYear() && n === t.getMonth() + 1 && u === t.getDate() && r === t.getHours() && p === t.getMinutes() && q === t.getSeconds() && o === t.getMilliseconds() | |
| }, | |
| parse: function(n, q, m) { | |
| var o = g.parseFunctions; | |
| if (o[q] == null ) { | |
| g.createParser(q) | |
| } | |
| return o[q].call(g, n, Ext.isDefined(m) ? m : g.useStrict) | |
| }, | |
| parseDate: function(n, o, m) { | |
| return g.parse(n, o, m) | |
| }, | |
| getFormatCode: function(n) { | |
| var m = g.formatCodes[n]; | |
| if (m) { | |
| m = typeof m === "function" ? m() : m; | |
| g.formatCodes[n] = m | |
| } | |
| return m || ("'" + Ext.String.escape(n) + "'") | |
| }, | |
| createFormat: function(q) { | |
| var p = [], m = false, o = "", n; | |
| for (n = 0; n < q.length; ++n) { | |
| o = q.charAt(n); | |
| if (!m && o === "\\") { | |
| m = true | |
| } else { | |
| if (m) { | |
| m = false; | |
| p.push("'" + Ext.String.escape(o) + "'") | |
| } else { | |
| if (o === "\n") { | |
| p.push("'\\n'") | |
| } else { | |
| p.push(g.getFormatCode(o)) | |
| } | |
| } | |
| } | |
| } | |
| g.formatFunctions[q] = Ext.functionFactory("var m=this;return " + p.join("+")) | |
| }, | |
| createParser: function(v) { | |
| var n = g.parseRegexes.length, w = 1, o = [], u = [], s = false, m = "", q = 0, r = v.length, t = [], p; | |
| for (; q < r; ++q) { | |
| m = v.charAt(q); | |
| if (!s && m === "\\") { | |
| s = true | |
| } else { | |
| if (s) { | |
| s = false; | |
| u.push(Ext.String.escape(m)) | |
| } else { | |
| p = g.formatCodeToRegex(m, w); | |
| w += p.g; | |
| u.push(p.s); | |
| if (p.g && p.c) { | |
| if (p.calcAtEnd) { | |
| t.push(p.c) | |
| } else { | |
| o.push(p.c) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| o = o.concat(t); | |
| g.parseRegexes[n] = new RegExp("^" + u.join("") + "$","i"); | |
| g.parseFunctions[v] = Ext.functionFactory("input", "strict", j(b, n, o.join(""))) | |
| }, | |
| parseCodes: { | |
| d: { | |
| g: 1, | |
| c: "d = parseInt(results[{0}], 10);\n", | |
| s: "(3[0-1]|[1-2][0-9]|0[1-9])" | |
| }, | |
| j: { | |
| g: 1, | |
| c: "d = parseInt(results[{0}], 10);\n", | |
| s: "(3[0-1]|[1-2][0-9]|[1-9])" | |
| }, | |
| D: function() { | |
| for (var m = [], n = 0; n < 7; m.push(g.getShortDayName(n)), | |
| ++n) {} | |
| return { | |
| g: 0, | |
| c: null , | |
| s: "(?:" + m.join("|") + ")" | |
| } | |
| }, | |
| l: function() { | |
| return { | |
| g: 0, | |
| c: null , | |
| s: "(?:" + g.dayNames.join("|") + ")" | |
| } | |
| }, | |
| N: { | |
| g: 0, | |
| c: null , | |
| s: "[1-7]" | |
| }, | |
| S: { | |
| g: 0, | |
| c: null , | |
| s: "(?:st|nd|rd|th)" | |
| }, | |
| w: { | |
| g: 0, | |
| c: null , | |
| s: "[0-6]" | |
| }, | |
| z: { | |
| g: 1, | |
| c: "z = parseInt(results[{0}], 10);\n", | |
| s: "(\\d{1,3})" | |
| }, | |
| W: { | |
| g: 1, | |
| c: "W = parseInt(results[{0}], 10);\n", | |
| s: "(\\d{2})" | |
| }, | |
| F: function() { | |
| return { | |
| g: 1, | |
| c: "m = parseInt(me.getMonthNumber(results[{0}]), 10);\n", | |
| s: "(" + g.monthNames.join("|") + ")" | |
| } | |
| }, | |
| M: function() { | |
| for (var m = [], n = 0; n < 12; m.push(g.getShortMonthName(n)), | |
| ++n) {} | |
| return Ext.applyIf({ | |
| s: "(" + m.join("|") + ")" | |
| }, g.formatCodeToRegex("F")) | |
| }, | |
| m: { | |
| g: 1, | |
| c: "m = parseInt(results[{0}], 10) - 1;\n", | |
| s: "(1[0-2]|0[1-9])" | |
| }, | |
| n: { | |
| g: 1, | |
| c: "m = parseInt(results[{0}], 10) - 1;\n", | |
| s: "(1[0-2]|[1-9])" | |
| }, | |
| t: { | |
| g: 0, | |
| c: null , | |
| s: "(?:\\d{2})" | |
| }, | |
| L: { | |
| g: 0, | |
| c: null , | |
| s: "(?:1|0)" | |
| }, | |
| o: { | |
| g: 1, | |
| c: "y = parseInt(results[{0}], 10);\n", | |
| s: "(\\d{4})" | |
| }, | |
| Y: { | |
| g: 1, | |
| c: "y = parseInt(results[{0}], 10);\n", | |
| s: "(\\d{4})" | |
| }, | |
| y: { | |
| g: 1, | |
| c: "var ty = parseInt(results[{0}], 10);\ny = ty > me.y2kYear ? 1900 + ty : 2000 + ty;\n", | |
| s: "(\\d{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)", | |
| calcAtEnd: true | |
| }, | |
| 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)", | |
| calcAtEnd: true | |
| }, | |
| g: { | |
| g: 1, | |
| c: "h = parseInt(results[{0}], 10);\n", | |
| s: "(1[0-2]|[0-9])" | |
| }, | |
| G: { | |
| g: 1, | |
| c: "h = parseInt(results[{0}], 10);\n", | |
| s: "(2[0-3]|1[0-9]|[0-9])" | |
| }, | |
| h: { | |
| g: 1, | |
| c: "h = parseInt(results[{0}], 10);\n", | |
| s: "(1[0-2]|0[1-9])" | |
| }, | |
| H: { | |
| g: 1, | |
| c: "h = parseInt(results[{0}], 10);\n", | |
| s: "(2[0-3]|[0-1][0-9])" | |
| }, | |
| i: { | |
| g: 1, | |
| c: "i = parseInt(results[{0}], 10);\n", | |
| s: "([0-5][0-9])" | |
| }, | |
| s: { | |
| g: 1, | |
| c: "s = parseInt(results[{0}], 10);\n", | |
| s: "([0-5][0-9])" | |
| }, | |
| 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,5}" | |
| }, | |
| Z: { | |
| g: 1, | |
| c: "zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n", | |
| s: "([+-]?\\d{1,5})" | |
| }, | |
| c: function() { | |
| var o = [], m = [g.formatCodeToRegex("Y", 1), g.formatCodeToRegex("m", 2), g.formatCodeToRegex("d", 3), g.formatCodeToRegex("H", 4), g.formatCodeToRegex("i", 5), g.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){", g.formatCodeToRegex("P", 8).c, "}else{", g.formatCodeToRegex("O", 8).c, "}", "}"].join("\n") | |
| }], p, n; | |
| for (p = 0, | |
| n = m.length; p < n; ++p) { | |
| o.push(m[p].c) | |
| } | |
| return { | |
| g: 1, | |
| c: o.join(""), | |
| s: [m[0].s, "(?:", "-", m[1].s, "(?:", "-", m[2].s, "(?:", "(?:T| )?", m[3].s, ":", m[4].s, "(?::", m[5].s, ")?", "(?:(?:\\.|,)(\\d+))?", "(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?", ")?", ")?", ")?"].join("") | |
| } | |
| }, | |
| U: { | |
| g: 1, | |
| c: "u = parseInt(results[{0}], 10);\n", | |
| s: "(-?\\d+)" | |
| } | |
| }, | |
| dateFormat: function(m, n) { | |
| return g.format(m, n) | |
| }, | |
| isEqual: function(n, m) { | |
| if (n && m) { | |
| return ( n.getTime() === m.getTime()) | |
| } | |
| return !(n || m) | |
| }, | |
| format: function(n, o) { | |
| var m = g.formatFunctions; | |
| if (!Ext.isDate(n)) { | |
| return "" | |
| } | |
| if (m[o] == null ) { | |
| g.createFormat(o) | |
| } | |
| return m[o].call(n) + "" | |
| }, | |
| getTimezone: function(m) { | |
| return m.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,5})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, "") | |
| }, | |
| getGMTOffset: function(m, n) { | |
| var o = m.getTimezoneOffset(); | |
| return (o > 0 ? "-" : "+") + Ext.String.leftPad(Math.floor(Math.abs(o) / 60), 2, "0") + (n ? ":" : "") + Ext.String.leftPad(Math.abs(o % 60), 2, "0") | |
| }, | |
| getDayOfYear: function(p) { | |
| var o = 0, r = g.clone(p), n = p.getMonth(), q; | |
| for (q = 0, | |
| r.setDate(1), | |
| r.setMonth(0); q < n; r.setMonth(++q)) { | |
| o += g.getDaysInMonth(r) | |
| } | |
| return o + p.getDate() - 1 | |
| }, | |
| getWeekOfYear: (function() { | |
| var m = 86400000 | |
| , n = 7 * m; | |
| return function(p) { | |
| var q = e.UTC(p.getFullYear(), p.getMonth(), p.getDate() + 3) / m | |
| , o = Math.floor(q / 7) | |
| , r = new e(o * n).getUTCFullYear(); | |
| return o - Math.floor(e.UTC(r, 0, 7) / n) + 1 | |
| } | |
| }()), | |
| isLeapYear: function(m) { | |
| var n = m.getFullYear(); | |
| return !!((n & 3) === 0 && (n % 100 || (n % 400 === 0 && n))) | |
| }, | |
| getFirstDayOfMonth: function(n) { | |
| var m = (n.getDay() - (n.getDate() - 1)) % 7; | |
| return (m < 0) ? (m + 7) : m | |
| }, | |
| getLastDayOfMonth: function(m) { | |
| return g.getLastDateOfMonth(m).getDay() | |
| }, | |
| getFirstDateOfMonth: function(m) { | |
| return new e(m.getFullYear(),m.getMonth(),1) | |
| }, | |
| getLastDateOfMonth: function(m) { | |
| return new e(m.getFullYear(),m.getMonth(),g.getDaysInMonth(m)) | |
| }, | |
| getDaysInMonth: (function() { | |
| var m = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; | |
| return function(o) { | |
| var n = o.getMonth(); | |
| return n === 1 && g.isLeapYear(o) ? 29 : m[n] | |
| } | |
| }()), | |
| getSuffix: function(m) { | |
| switch (m.getDate()) { | |
| case 1: | |
| case 21: | |
| case 31: | |
| return "st"; | |
| case 2: | |
| case 22: | |
| return "nd"; | |
| case 3: | |
| case 23: | |
| return "rd"; | |
| default: | |
| return "th" | |
| } | |
| }, | |
| clone: function(m) { | |
| return new e(m.getTime()) | |
| }, | |
| isDST: function(m) { | |
| return new e(m.getFullYear(),0,1).getTimezoneOffset() !== m.getTimezoneOffset() | |
| }, | |
| clearTime: function(m, q) { | |
| if (isNaN(m.getTime())) { | |
| return m | |
| } | |
| if (q) { | |
| return g.clearTime(g.clone(m)) | |
| } | |
| var o = m.getDate(), n, p; | |
| m.setHours(0); | |
| m.setMinutes(0); | |
| m.setSeconds(0); | |
| m.setMilliseconds(0); | |
| if (m.getDate() !== o) { | |
| for (n = 1, | |
| p = g.add(m, g.HOUR, n); p.getDate() !== o; n++, | |
| p = g.add(m, g.HOUR, n)) {} | |
| m.setDate(o); | |
| m.setHours(p.getHours()) | |
| } | |
| return m | |
| }, | |
| add: function(o, n, r) { | |
| var s = g.clone(o), m, q, p = 0; | |
| if (!n || r === 0) { | |
| return s | |
| } | |
| q = r - parseInt(r, 10); | |
| r = parseInt(r, 10); | |
| if (r) { | |
| switch (n.toLowerCase()) { | |
| case g.MILLI: | |
| s.setTime(s.getTime() + r); | |
| break; | |
| case g.SECOND: | |
| s.setTime(s.getTime() + r * 1000); | |
| break; | |
| case g.MINUTE: | |
| s.setTime(s.getTime() + r * 60 * 1000); | |
| break; | |
| case g.HOUR: | |
| s.setTime(s.getTime() + r * 60 * 60 * 1000); | |
| break; | |
| case g.DAY: | |
| s.setDate(s.getDate() + r); | |
| break; | |
| case g.MONTH: | |
| m = o.getDate(); | |
| if (m > 28) { | |
| m = Math.min(m, g.getLastDateOfMonth(g.add(g.getFirstDateOfMonth(o), g.MONTH, r)).getDate()) | |
| } | |
| s.setDate(m); | |
| s.setMonth(o.getMonth() + r); | |
| break; | |
| case g.YEAR: | |
| m = o.getDate(); | |
| if (m > 28) { | |
| m = Math.min(m, g.getLastDateOfMonth(g.add(g.getFirstDateOfMonth(o), g.YEAR, r)).getDate()) | |
| } | |
| s.setDate(m); | |
| s.setFullYear(o.getFullYear() + r); | |
| break | |
| } | |
| } | |
| if (q) { | |
| switch (n.toLowerCase()) { | |
| case g.MILLI: | |
| p = 1; | |
| break; | |
| case g.SECOND: | |
| p = 1000; | |
| break; | |
| case g.MINUTE: | |
| p = 1000 * 60; | |
| break; | |
| case g.HOUR: | |
| p = 1000 * 60 * 60; | |
| break; | |
| case g.DAY: | |
| p = 1000 * 60 * 60 * 24; | |
| break; | |
| case g.MONTH: | |
| m = g.getDaysInMonth(s); | |
| p = 1000 * 60 * 60 * 24 * m; | |
| break; | |
| case g.YEAR: | |
| m = (g.isLeapYear(s) ? 366 : 365); | |
| p = 1000 * 60 * 60 * 24 * m; | |
| break | |
| } | |
| if (p) { | |
| s.setTime(s.getTime() + p * q) | |
| } | |
| } | |
| return s | |
| }, | |
| subtract: function(n, m, o) { | |
| return g.add(n, m, -o) | |
| }, | |
| between: function(n, p, m) { | |
| var o = n.getTime(); | |
| return p.getTime() <= o && o <= m.getTime() | |
| }, | |
| compat: function() { | |
| var u, v = ["useStrict", "formatCodeToRegex", "parseFunctions", "parseRegexes", "formatFunctions", "y2kYear", "MILLI", "SECOND", "MINUTE", "HOUR", "DAY", "MONTH", "YEAR", "defaults", "dayNames", "monthNames", "monthNumbers", "getShortMonthName", "getShortDayName", "getMonthNumber", "formatCodes", "isValid", "parseDate", "getFormatCode", "createFormat", "createParser", "parseCodes"], t = ["dateFormat", "format", "getTimezone", "getGMTOffset", "getDayOfYear", "getWeekOfYear", "isLeapYear", "getFirstDayOfMonth", "getLastDayOfMonth", "getDaysInMonth", "getSuffix", "clone", "isDST", "clearTime", "add", "between"], n = v.length, m = t.length, q, r, o; | |
| for (o = 0; o < n; o++) { | |
| q = v[o]; | |
| e[q] = g[q] | |
| } | |
| for (u = 0; u < m; u++) { | |
| r = t[u]; | |
| e.prototype[r] = function() { | |
| var p = Array.prototype.slice.call(arguments); | |
| p.unshift(this); | |
| return g[r].apply(g, p) | |
| } | |
| } | |
| }, | |
| diff: function(n, m, p) { | |
| var o, q = +m - n; | |
| switch (p) { | |
| case g.MILLI: | |
| return q; | |
| case g.SECOND: | |
| return Math.floor(q / 1000); | |
| case g.MINUTE: | |
| return Math.floor(q / 60000); | |
| case g.HOUR: | |
| return Math.floor(q / 3600000); | |
| case g.DAY: | |
| return Math.floor(q / 86400000); | |
| case "w": | |
| return Math.floor(q / 604800000); | |
| case g.MONTH: | |
| o = (m.getFullYear() * 12 + m.getMonth()) - (n.getFullYear() * 12 + n.getMonth()); | |
| if (g.add(n, p, o) > m) { | |
| return o - 1 | |
| } | |
| return o; | |
| case g.YEAR: | |
| o = m.getFullYear() - n.getFullYear(); | |
| if (g.add(n, p, o) > m) { | |
| return o - 1 | |
| } else { | |
| return o | |
| } | |
| } | |
| }, | |
| align: function(n, p, o) { | |
| var m = new e(+n); | |
| switch (p.toLowerCase()) { | |
| case g.MILLI: | |
| return m; | |
| case g.SECOND: | |
| m.setUTCSeconds(m.getUTCSeconds() - m.getUTCSeconds() % o); | |
| m.setUTCMilliseconds(0); | |
| return m; | |
| case g.MINUTE: | |
| m.setUTCMinutes(m.getUTCMinutes() - m.getUTCMinutes() % o); | |
| m.setUTCSeconds(0); | |
| m.setUTCMilliseconds(0); | |
| return m; | |
| case g.HOUR: | |
| m.setUTCHours(m.getUTCHours() - m.getUTCHours() % o); | |
| m.setUTCMinutes(0); | |
| m.setUTCSeconds(0); | |
| m.setUTCMilliseconds(0); | |
| return m; | |
| case g.DAY: | |
| if (o === 7 || o === 14) { | |
| m.setUTCDate(m.getUTCDate() - m.getUTCDay() + 1) | |
| } | |
| m.setUTCHours(0); | |
| m.setUTCMinutes(0); | |
| m.setUTCSeconds(0); | |
| m.setUTCMilliseconds(0); | |
| return m; | |
| case g.MONTH: | |
| m.setUTCMonth(m.getUTCMonth() - (m.getUTCMonth() - 1) % o, 1); | |
| m.setUTCHours(0); | |
| m.setUTCMinutes(0); | |
| m.setUTCSeconds(0); | |
| m.setUTCMilliseconds(0); | |
| return m; | |
| case g.YEAR: | |
| m.setUTCFullYear(m.getUTCFullYear() - m.getUTCFullYear() % o, 1, 1); | |
| m.setUTCHours(0); | |
| m.setUTCMinutes(0); | |
| m.setUTCSeconds(0); | |
| m.setUTCMilliseconds(0); | |
| return n | |
| } | |
| } | |
| } | |
| }()); | |
| Ext.Function = (function() { | |
| var b = 0, m, e = [], n = [], i = 0, j = {}, h = window, d = Ext.global, g = !!(d.setImmediate && d.clearImmediate), l = h.requestAnimationFrame || h.webkitRequestAnimationFrame || h.mozRequestAnimationFrame || h.oRequestAnimationFrame || function(r) { | |
| var o = Ext.now() | |
| , p = Math.max(0, 16 - (o - b)) | |
| , q = h.setTimeout(function() { | |
| r(o + p) | |
| }, p); | |
| b = o + p; | |
| return q | |
| } | |
| , c = function() { | |
| var o = e.length, r, p, q; | |
| m = null ; | |
| for (p = 0; p < o; p++) { | |
| q = e[p]; | |
| r = q[3]; | |
| if (j[r]) { | |
| q[0].apply(q[1] || d, q[2] || n); | |
| delete j[r] | |
| } | |
| } | |
| e = e.slice(o) | |
| } | |
| , a = function() { | |
| Ext.elevateFunction(c) | |
| } | |
| , k = { | |
| flexSetter: function(o) { | |
| return function(q, s) { | |
| var p, r; | |
| if (q !== null ) { | |
| if (typeof q !== "string") { | |
| for (p in q) { | |
| if (q.hasOwnProperty(p)) { | |
| o.call(this, p, q[p]) | |
| } | |
| } | |
| if (Ext.enumerables) { | |
| for (r = Ext.enumerables.length; r--; ) { | |
| p = Ext.enumerables[r]; | |
| if (q.hasOwnProperty(p)) { | |
| o.call(this, p, q[p]) | |
| } | |
| } | |
| } | |
| } else { | |
| o.call(this, q, s) | |
| } | |
| } | |
| return this | |
| } | |
| }, | |
| bind: function(r, q, p, o) { | |
| if (arguments.length === 2) { | |
| return function() { | |
| return r.apply(q, arguments) | |
| } | |
| } | |
| var t = r | |
| , s = Array.prototype.slice; | |
| return function() { | |
| var u = p || arguments; | |
| if (o === true) { | |
| u = s.call(arguments, 0); | |
| u = u.concat(p) | |
| } else { | |
| if (typeof o === "number") { | |
| u = s.call(arguments, 0); | |
| Ext.Array.insert(u, o, p) | |
| } | |
| } | |
| return t.apply(q || d, u) | |
| } | |
| }, | |
| bindCallback: function(s, r, q, p, o) { | |
| return function() { | |
| var t = Ext.Array.slice(arguments); | |
| return Ext.callback(s, r, q ? q.concat(t) : t, p, o) | |
| } | |
| }, | |
| pass: function(q, o, p) { | |
| if (!Ext.isArray(o)) { | |
| if (Ext.isIterable(o)) { | |
| o = Ext.Array.clone(o) | |
| } else { | |
| o = o !== undefined ? [o] : [] | |
| } | |
| } | |
| return function() { | |
| var r = o.slice(); | |
| r.push.apply(r, arguments); | |
| return q.apply(p || this, r) | |
| } | |
| }, | |
| alias: function(p, o) { | |
| return function() { | |
| return p[o].apply(p, arguments) | |
| } | |
| }, | |
| clone: function(o) { | |
| return function() { | |
| return o.apply(this, arguments) | |
| } | |
| }, | |
| createInterceptor: function(r, q, p, o) { | |
| if (!Ext.isFunction(q)) { | |
| return r | |
| } else { | |
| o = Ext.isDefined(o) ? o : null ; | |
| return function() { | |
| var t = this | |
| , s = arguments; | |
| return (q.apply(p || t || d, s) !== false) ? r.apply(t || d, s) : o | |
| } | |
| } | |
| }, | |
| createDelayed: function(s, q, r, p, o) { | |
| if (r || p) { | |
| s = Ext.Function.bind(s, r, p, o) | |
| } | |
| return function() { | |
| var u = this | |
| , t = Array.prototype.slice.call(arguments); | |
| setTimeout(function() { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(s, u, t) | |
| } else { | |
| s.apply(u, t) | |
| } | |
| }, q) | |
| } | |
| }, | |
| defer: function(s, q, r, p, o) { | |
| s = Ext.Function.bind(s, r, p, o); | |
| if (q > 0) { | |
| return setTimeout(function() { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(s) | |
| } else { | |
| s() | |
| } | |
| }, q) | |
| } | |
| s(); | |
| return 0 | |
| }, | |
| interval: function(s, q, r, p, o) { | |
| s = Ext.Function.bind(s, r, p, o); | |
| return setInterval(function() { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(s) | |
| } else { | |
| s() | |
| } | |
| }, q) | |
| }, | |
| createSequence: function(p, q, o) { | |
| if (!q) { | |
| return p | |
| } else { | |
| return function() { | |
| var r = p.apply(this, arguments); | |
| q.apply(o || this, arguments); | |
| return r | |
| } | |
| } | |
| }, | |
| createBuffered: function(s, p, r, q) { | |
| var o; | |
| return function() { | |
| var u = q || Array.prototype.slice.call(arguments, 0) | |
| , t = r || this; | |
| if (o) { | |
| clearTimeout(o) | |
| } | |
| o = setTimeout(function() { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(s, t, u) | |
| } else { | |
| s.apply(t, u) | |
| } | |
| }, p) | |
| } | |
| }, | |
| createAnimationFrame: function(r, q, p, s) { | |
| var o; | |
| s = s || 3; | |
| return function() { | |
| var t = p || Array.prototype.slice.call(arguments, 0); | |
| q = q || this; | |
| if (s === 3 && o) { | |
| k.cancelAnimationFrame(o) | |
| } | |
| if ((s & 1) || !o) { | |
| o = k.requestAnimationFrame(function() { | |
| o = null ; | |
| r.apply(q, t) | |
| }) | |
| } | |
| } | |
| }, | |
| requestAnimationFrame: function(r, q, o) { | |
| var s = ++i | |
| , p = Array.prototype.slice.call(arguments, 0); | |
| p[3] = s; | |
| j[s] = 1; | |
| e.push(p); | |
| if (!m) { | |
| m = l(Ext.elevateFunction ? a : c) | |
| } | |
| return s | |
| }, | |
| cancelAnimationFrame: function(o) { | |
| delete j[o] | |
| }, | |
| createThrottled: function(s, p, r) { | |
| var t = 0, o, q, v, u = function() { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(s, r, q) | |
| } else { | |
| s.apply(r, q) | |
| } | |
| t = Ext.now(); | |
| v = null | |
| } | |
| ; | |
| return function() { | |
| if (!r) { | |
| r = this | |
| } | |
| o = Ext.now() - t; | |
| q = arguments; | |
| if (o >= p) { | |
| clearTimeout(v); | |
| u() | |
| } else { | |
| if (!v) { | |
| v = Ext.defer(u, p - o) | |
| } | |
| } | |
| } | |
| }, | |
| createBarrier: function(q, p, o) { | |
| return function() { | |
| if (!--q) { | |
| p.apply(o, arguments) | |
| } | |
| } | |
| }, | |
| interceptBefore: function(p, o, r, q) { | |
| var s = p[o] || Ext.emptyFn; | |
| return ( p[o] = function() { | |
| var t = r.apply(q || this, arguments); | |
| s.apply(this, arguments); | |
| return t | |
| } | |
| ) | |
| }, | |
| interceptAfter: function(p, o, r, q) { | |
| var s = p[o] || Ext.emptyFn; | |
| return ( p[o] = function() { | |
| s.apply(this, arguments); | |
| return r.apply(q || this, arguments) | |
| } | |
| ) | |
| }, | |
| makeCallback: function(p, o) { | |
| return function() { | |
| return o[p].apply(o, arguments) | |
| } | |
| }, | |
| memoize: function(r, q, o) { | |
| var p = {} | |
| , s = o && Ext.isFunction(o); | |
| return function(u) { | |
| var t = s ? o.apply(q, arguments) : u; | |
| if (!(t in p)) { | |
| p[t] = r.apply(q, arguments) | |
| } | |
| return p[t] | |
| } | |
| } | |
| }; | |
| Ext.asap = g ? function(p, o, q) { | |
| if (o != null || q != null ) { | |
| p = k.bind(p, o, q) | |
| } | |
| return setImmediate(function() { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(p) | |
| } else { | |
| p() | |
| } | |
| }) | |
| } | |
| : function(p, o, q) { | |
| if (o != null || q != null ) { | |
| p = k.bind(p, o, q) | |
| } | |
| return setTimeout(function() { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(p) | |
| } else { | |
| p() | |
| } | |
| }, 0, true) | |
| } | |
| , | |
| Ext.asapCancel = g ? function(o) { | |
| clearImmediate(o) | |
| } | |
| : function(o) { | |
| clearTimeout(o) | |
| } | |
| ; | |
| Ext.defer = k.defer; | |
| Ext.interval = k.interval; | |
| Ext.pass = k.pass; | |
| Ext.bind = k.bind; | |
| Ext.deferCallback = k.requestAnimationFrame; | |
| return k | |
| })(); | |
| Ext.Number = (new function() { | |
| var d = this | |
| , c = (0.9).toFixed() !== "1" | |
| , b = Math | |
| , a = { | |
| count: false, | |
| inclusive: false, | |
| wrap: true | |
| }; | |
| Ext.apply(d, { | |
| Clip: { | |
| DEFAULT: a, | |
| COUNT: Ext.applyIf({ | |
| count: true | |
| }, a), | |
| INCLUSIVE: Ext.applyIf({ | |
| inclusive: true | |
| }, a), | |
| NOWRAP: Ext.applyIf({ | |
| wrap: false | |
| }, a) | |
| }, | |
| clipIndices: function(m, n, h) { | |
| h = h || a; | |
| var g = 0, l = h.wrap, k, e, j; | |
| n = n || []; | |
| for (j = 0; j < 2; ++j) { | |
| k = e; | |
| e = n[j]; | |
| if (e == null ) { | |
| e = g | |
| } else { | |
| if (j && h.count) { | |
| e += k; | |
| e = (e > m) ? m : e | |
| } else { | |
| if (l) { | |
| e = (e < 0) ? (m + e) : e | |
| } | |
| if (j && h.inclusive) { | |
| ++e | |
| } | |
| e = (e < 0) ? 0 : ((e > m) ? m : e) | |
| } | |
| } | |
| g = m | |
| } | |
| n[0] = k; | |
| n[1] = (e < k) ? k : e; | |
| return n | |
| }, | |
| constrain: function(i, h, g) { | |
| var e = parseFloat(i); | |
| if (h === null ) { | |
| h = i | |
| } | |
| if (g === null ) { | |
| g = i | |
| } | |
| return (e < h) ? h : ((e > g) ? g : e) | |
| }, | |
| snap: function(i, g, h, j) { | |
| var e; | |
| if (i === undefined || i < h) { | |
| return h || 0 | |
| } | |
| if (g) { | |
| e = i % g; | |
| if (e !== 0) { | |
| i -= e; | |
| if (e * 2 >= g) { | |
| i += g | |
| } else { | |
| if (e * 2 < -g) { | |
| i -= g | |
| } | |
| } | |
| } | |
| } | |
| return d.constrain(i, h, j) | |
| }, | |
| snapInRange: function(i, e, h, j) { | |
| var g; | |
| h = (h || 0); | |
| if (i === undefined || i < h) { | |
| return h | |
| } | |
| if (e && (g = ((i - h) % e))) { | |
| i -= g; | |
| g *= 2; | |
| if (g >= e) { | |
| i += e | |
| } | |
| } | |
| if (j !== undefined) { | |
| if (i > (j = d.snapInRange(j, e, h))) { | |
| i = j | |
| } | |
| } | |
| return i | |
| }, | |
| sign: function(e) { | |
| e = +e; | |
| if (e === 0 || isNaN(e)) { | |
| return e | |
| } | |
| return (e > 0) ? 1 : -1 | |
| }, | |
| toFixed: c ? function(h, e) { | |
| e = e || 0; | |
| var g = b.pow(10, e); | |
| return (b.round(h * g) / g).toFixed(e) | |
| } | |
| : function(g, e) { | |
| return g.toFixed(e) | |
| } | |
| , | |
| from: function(g, e) { | |
| if (isFinite(g)) { | |
| g = parseFloat(g) | |
| } | |
| return !isNaN(g) ? g : e | |
| }, | |
| randomInt: function(g, e) { | |
| return b.floor(b.random() * (e - g + 1) + g) | |
| }, | |
| correctFloat: function(e) { | |
| return parseFloat(e.toPrecision(14)) | |
| } | |
| }); | |
| Ext.num = function() { | |
| return d.from.apply(this, arguments) | |
| } | |
| } | |
| ()); | |
| (function() { | |
| var d = function() {} | |
| , b = /^\?/ | |
| , c = /(\[):?([^\]]*)\]/g | |
| , a = /^([^\[]+)/ | |
| , g = /\+/g | |
| , e = Ext.Object = { | |
| chain: Object.create || function(i) { | |
| d.prototype = i; | |
| var h = new d(); | |
| d.prototype = null ; | |
| return h | |
| } | |
| , | |
| clear: function(h) { | |
| for (var i in h) { | |
| delete h[i] | |
| } | |
| return h | |
| }, | |
| freeze: Object.freeze ? function(j, h) { | |
| if (j && typeof j === "object" && !Object.isFrozen(j)) { | |
| Object.freeze(j); | |
| if (h) { | |
| for (var i in j) { | |
| e.freeze(j[i], h) | |
| } | |
| } | |
| } | |
| return j | |
| } | |
| : Ext.identityFn, | |
| toQueryObjects: function(k, o, j) { | |
| var h = e.toQueryObjects, n = [], l, m; | |
| if (Ext.isArray(o)) { | |
| for (l = 0, | |
| m = o.length; l < m; l++) { | |
| if (j) { | |
| n = n.concat(h(k + "[" + l + "]", o[l], true)) | |
| } else { | |
| n.push({ | |
| name: k, | |
| value: o[l] | |
| }) | |
| } | |
| } | |
| } else { | |
| if (Ext.isObject(o)) { | |
| for (l in o) { | |
| if (o.hasOwnProperty(l)) { | |
| if (j) { | |
| n = n.concat(h(k + "[" + l + "]", o[l], true)) | |
| } else { | |
| n.push({ | |
| name: k, | |
| value: o[l] | |
| }) | |
| } | |
| } | |
| } | |
| } else { | |
| n.push({ | |
| name: k, | |
| value: o | |
| }) | |
| } | |
| } | |
| return n | |
| }, | |
| toQueryString: function(m, k) { | |
| var n = [], l = [], p, o, q, h, r; | |
| for (p in m) { | |
| if (m.hasOwnProperty(p)) { | |
| n = n.concat(e.toQueryObjects(p, m[p], k)) | |
| } | |
| } | |
| for (o = 0, | |
| q = n.length; o < q; o++) { | |
| h = n[o]; | |
| r = h.value; | |
| if (Ext.isEmpty(r)) { | |
| r = "" | |
| } else { | |
| if (Ext.isDate(r)) { | |
| r = Ext.Date.toString(r) | |
| } | |
| } | |
| l.push(encodeURIComponent(h.name) + "=" + encodeURIComponent(String(r))) | |
| } | |
| return l.join("&") | |
| }, | |
| fromQueryString: function(k, v) { | |
| var q = k.replace(b, "").split("&"), y = {}, w, o, A, r, u, m, s, t, h, n, x, p, z, l; | |
| for (u = 0, | |
| m = q.length; u < m; u++) { | |
| s = q[u]; | |
| if (s.length > 0) { | |
| o = s.split("="); | |
| A = o[0]; | |
| A = A.replace(g, "%20"); | |
| A = decodeURIComponent(A); | |
| r = o[1]; | |
| if (r !== undefined) { | |
| r = r.replace(g, "%20"); | |
| r = decodeURIComponent(r) | |
| } else { | |
| r = "" | |
| } | |
| if (!v) { | |
| if (y.hasOwnProperty(A)) { | |
| if (!Ext.isArray(y[A])) { | |
| y[A] = [y[A]] | |
| } | |
| y[A].push(r) | |
| } else { | |
| y[A] = r | |
| } | |
| } else { | |
| n = A.match(c); | |
| x = A.match(a); | |
| A = x[0]; | |
| p = []; | |
| if (n === null ) { | |
| y[A] = r; | |
| continue | |
| } | |
| for (t = 0, | |
| h = n.length; t < h; t++) { | |
| z = n[t]; | |
| z = (z.length === 2) ? "" : z.substring(1, z.length - 1); | |
| p.push(z) | |
| } | |
| p.unshift(A); | |
| w = y; | |
| for (t = 0, | |
| h = p.length; t < h; t++) { | |
| z = p[t]; | |
| if (t === h - 1) { | |
| if (Ext.isArray(w) && z === "") { | |
| w.push(r) | |
| } else { | |
| w[z] = r | |
| } | |
| } else { | |
| if (w[z] === undefined || typeof w[z] === "string") { | |
| l = p[t + 1]; | |
| w[z] = (Ext.isNumeric(l) || l === "") ? [] : {} | |
| } | |
| w = w[z] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return y | |
| }, | |
| each: function(j, m, l) { | |
| var h = Ext.enumerables, k, n; | |
| if (j) { | |
| l = l || j; | |
| for (n in j) { | |
| if (j.hasOwnProperty(n)) { | |
| if (m.call(l, n, j[n], j) === false) { | |
| return | |
| } | |
| } | |
| } | |
| if (h) { | |
| for (k = h.length; k--; ) { | |
| if (j.hasOwnProperty(n = h[k])) { | |
| if (m.call(l, n, j[n], j) === false) { | |
| return | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| eachValue: function(j, m, l) { | |
| var h = Ext.enumerables, k, n; | |
| l = l || j; | |
| for (n in j) { | |
| if (j.hasOwnProperty(n)) { | |
| if (m.call(l, j[n]) === false) { | |
| return | |
| } | |
| } | |
| } | |
| if (h) { | |
| for (k = h.length; k--; ) { | |
| if (j.hasOwnProperty(n = h[k])) { | |
| if (m.call(l, j[n]) === false) { | |
| return | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| merge: function(o) { | |
| var m = 1, n = arguments.length, h = e.merge, k = Ext.clone, l, q, p, j; | |
| for (; m < n; m++) { | |
| l = arguments[m]; | |
| for (q in l) { | |
| p = l[q]; | |
| if (p && p.constructor === Object) { | |
| j = o[q]; | |
| if (j && j.constructor === Object) { | |
| h(j, p) | |
| } else { | |
| o[q] = k(p) | |
| } | |
| } else { | |
| o[q] = p | |
| } | |
| } | |
| } | |
| return o | |
| }, | |
| mergeIf: function(h) { | |
| var m = 1, n = arguments.length, k = Ext.clone, j, l, o; | |
| for (; m < n; m++) { | |
| j = arguments[m]; | |
| for (l in j) { | |
| if (!(l in h)) { | |
| o = j[l]; | |
| if (o && o.constructor === Object) { | |
| h[l] = k(o) | |
| } else { | |
| h[l] = o | |
| } | |
| } | |
| } | |
| } | |
| return h | |
| }, | |
| getAllKeys: function(h) { | |
| var i = [], j; | |
| for (j in h) { | |
| i.push(j) | |
| } | |
| return i | |
| }, | |
| getKey: function(h, j) { | |
| for (var i in h) { | |
| if (h.hasOwnProperty(i) && h[i] === j) { | |
| return i | |
| } | |
| } | |
| return null | |
| }, | |
| getValues: function(i) { | |
| var h = [], j; | |
| for (j in i) { | |
| if (i.hasOwnProperty(j)) { | |
| h.push(i[j]) | |
| } | |
| } | |
| return h | |
| }, | |
| getKeys: (typeof Object.keys == "function") ? function(h) { | |
| if (!h) { | |
| return [] | |
| } | |
| return Object.keys(h) | |
| } | |
| : function(h) { | |
| var i = [], j; | |
| for (j in h) { | |
| if (h.hasOwnProperty(j)) { | |
| i.push(j) | |
| } | |
| } | |
| return i | |
| } | |
| , | |
| getSize: function(h) { | |
| var i = 0, j; | |
| for (j in h) { | |
| if (h.hasOwnProperty(j)) { | |
| i++ | |
| } | |
| } | |
| return i | |
| }, | |
| isEmpty: function(h) { | |
| for (var i in h) { | |
| if (h.hasOwnProperty(i)) { | |
| return false | |
| } | |
| } | |
| return true | |
| }, | |
| equals: (function() { | |
| var h = function(k, j) { | |
| var i; | |
| for (i in k) { | |
| if (k.hasOwnProperty(i)) { | |
| if (k[i] !== j[i]) { | |
| return false | |
| } | |
| } | |
| } | |
| return true | |
| } | |
| ; | |
| return function(j, i) { | |
| if (j === i) { | |
| return true | |
| } | |
| if (j && i) { | |
| return h(j, i) && h(i, j) | |
| } else { | |
| if (!j && !i) { | |
| return j === i | |
| } else { | |
| return false | |
| } | |
| } | |
| } | |
| })(), | |
| fork: function(k) { | |
| var h, i, j; | |
| if (k && k.constructor === Object) { | |
| h = e.chain(k); | |
| for (i in k) { | |
| j = k[i]; | |
| if (j) { | |
| if (j.constructor === Object) { | |
| h[i] = e.fork(j) | |
| } else { | |
| if (j instanceof Array) { | |
| h[i] = Ext.Array.clone(j) | |
| } | |
| } | |
| } | |
| } | |
| } else { | |
| h = k | |
| } | |
| return h | |
| }, | |
| defineProperty: ("defineProperty"in Object) ? Object.defineProperty : function(i, h, j) { | |
| if (!Object.prototype.__defineGetter__) { | |
| return | |
| } | |
| if (j.get) { | |
| i.__defineGetter__(h, j.get) | |
| } | |
| if (j.set) { | |
| i.__defineSetter__(h, j.set) | |
| } | |
| } | |
| , | |
| classify: function(k) { | |
| var j = k, m = [], i = {}, h = function() { | |
| var o = 0, p = m.length, q; | |
| for (; o < p; o++) { | |
| q = m[o]; | |
| this[q] = new i[q]() | |
| } | |
| } | |
| , l, n; | |
| for (l in k) { | |
| if (k.hasOwnProperty(l)) { | |
| n = k[l]; | |
| if (n && n.constructor === Object) { | |
| m.push(l); | |
| i[l] = e.classify(n) | |
| } | |
| } | |
| } | |
| h.prototype = j; | |
| return h | |
| } | |
| }; | |
| Ext.merge = Ext.Object.merge; | |
| Ext.mergeIf = Ext.Object.mergeIf | |
| }()); | |
| Ext.apply(Ext, { | |
| _namedScopes: { | |
| "this": { | |
| isThis: 1 | |
| }, | |
| controller: { | |
| isController: 1 | |
| }, | |
| self: { | |
| isSelf: 1 | |
| }, | |
| "self.controller": { | |
| isSelf: 1, | |
| isController: 1 | |
| } | |
| }, | |
| escapeId: (function() { | |
| var c = /^[a-zA-Z_][a-zA-Z0-9_\-]*$/i | |
| , d = /([\W]{1})/g | |
| , b = /^(\d)/g | |
| , a = function(h, g) { | |
| return "\\" + g | |
| } | |
| , e = function(h, g) { | |
| return "\\00" + g.charCodeAt(0).toString(16) + " " | |
| } | |
| ; | |
| return function(g) { | |
| return c.test(g) ? g : g.replace(d, a).replace(b, e) | |
| } | |
| }()), | |
| callback: function(i, g, d, c, b, h) { | |
| if (!i) { | |
| return | |
| } | |
| var e = (g in Ext._namedScopes); | |
| if (i.charAt) { | |
| if ((!g || e) && b) { | |
| g = b.resolveListenerScope(e ? g : h) | |
| } | |
| i = g[i] | |
| } else { | |
| if (e) { | |
| g = h || b | |
| } else { | |
| if (!g) { | |
| g = b | |
| } | |
| } | |
| } | |
| var a; | |
| if (i && Ext.isFunction(i)) { | |
| g = g || Ext.global; | |
| if (c) { | |
| Ext.defer(i, c, g, d) | |
| } else { | |
| if (Ext.elevateFunction) { | |
| a = Ext.elevateFunction(i, g, d) | |
| } else { | |
| if (d) { | |
| a = i.apply(g, d) | |
| } else { | |
| a = i.call(g) | |
| } | |
| } | |
| } | |
| } | |
| return a | |
| }, | |
| coerce: function(e, d) { | |
| var c = Ext.typeOf(e) | |
| , b = Ext.typeOf(d) | |
| , a = typeof e === "string"; | |
| if (c !== b) { | |
| switch (b) { | |
| case "string": | |
| return String(e); | |
| case "number": | |
| return Number(e); | |
| case "boolean": | |
| return a && (!e || e === "false") ? false : Boolean(e); | |
| case "null": | |
| return a && (!e || e === "null") ? null : e; | |
| case "undefined": | |
| return a && (!e || e === "undefined") ? undefined : e; | |
| case "date": | |
| return a && isNaN(e) ? Ext.Date.parse(e, Ext.Date.defaultFormat) : Date(Number(e)) | |
| } | |
| } | |
| return e | |
| }, | |
| copyTo: function(b, d, g, e) { | |
| if (typeof g === "string") { | |
| g = g.split(Ext.propertyNameSplitRe) | |
| } | |
| for (var a, c = 0, h = g ? g.length : 0; c < h; c++) { | |
| a = g[c]; | |
| if (e || d.hasOwnProperty(a)) { | |
| b[a] = d[a] | |
| } | |
| } | |
| return b | |
| }, | |
| copy: function(b, d, g, e) { | |
| if (typeof g === "string") { | |
| g = g.split(Ext.propertyNameSplitRe) | |
| } | |
| for (var a, c = 0, h = g ? g.length : 0; c < h; c++) { | |
| a = g[c]; | |
| if (d.hasOwnProperty(a) || (e && a in d)) { | |
| b[a] = d[a] | |
| } | |
| } | |
| return b | |
| }, | |
| propertyNameSplitRe: /[,;\s]+/, | |
| copyToIf: function(a, d, e) { | |
| if (typeof e === "string") { | |
| e = e.split(Ext.propertyNameSplitRe) | |
| } | |
| for (var b, c = 0, g = e ? e.length : 0; c < g; c++) { | |
| b = e[c]; | |
| if (a[b] === undefined) { | |
| a[b] = d[b] | |
| } | |
| } | |
| return a | |
| }, | |
| copyIf: function(a, d, e) { | |
| if (typeof e === "string") { | |
| e = e.split(Ext.propertyNameSplitRe) | |
| } | |
| for (var b, c = 0, g = e ? e.length : 0; c < g; c++) { | |
| b = e[c]; | |
| if (!(b in a) && (b in d)) { | |
| a[b] = d[b] | |
| } | |
| } | |
| return a | |
| }, | |
| extend: (function() { | |
| var a = Object.prototype.constructor | |
| , b = function(d) { | |
| for (var c in d) { | |
| if (!d.hasOwnProperty(c)) { | |
| continue | |
| } | |
| this[c] = d[c] | |
| } | |
| } | |
| ; | |
| return function(c, i, g) { | |
| if (Ext.isObject(i)) { | |
| g = i; | |
| i = c; | |
| c = g.constructor !== a ? g.constructor : function() { | |
| i.apply(this, arguments) | |
| } | |
| } | |
| var e = function() {} | |
| , d, h = i.prototype; | |
| e.prototype = h; | |
| d = c.prototype = new e(); | |
| d.constructor = c; | |
| c.superclass = h; | |
| if (h.constructor === a) { | |
| h.constructor = i | |
| } | |
| c.override = function(j) { | |
| Ext.override(c, j) | |
| } | |
| ; | |
| d.override = b; | |
| d.proto = d; | |
| c.override(g); | |
| c.extend = function(j) { | |
| return Ext.extend(c, j) | |
| } | |
| ; | |
| return c | |
| } | |
| }()), | |
| iterate: function(a, c, b) { | |
| if (Ext.isEmpty(a)) { | |
| return | |
| } | |
| if (b === undefined) { | |
| b = a | |
| } | |
| if (Ext.isIterable(a)) { | |
| Ext.Array.each.call(Ext.Array, a, c, b) | |
| } else { | |
| Ext.Object.each.call(Ext.Object, a, c, b) | |
| } | |
| }, | |
| _resourcePoolRe: /^[<]([^<>@:]*)(?:[@]([^<>@:]+))?[>](.+)$/, | |
| resolveResource: function(c) { | |
| var b = c, a; | |
| if (c && c.charAt(0) === "<") { | |
| a = Ext._resourcePoolRe.exec(c); | |
| if (a) { | |
| b = Ext.getResourcePath(a[3], a[1], a[2]) | |
| } | |
| } | |
| return b | |
| }, | |
| urlEncode: function() { | |
| var a = Ext.Array.from(arguments) | |
| , b = ""; | |
| if (Ext.isString(a[1])) { | |
| b = a[1] + "&"; | |
| a[1] = false | |
| } | |
| return b + Ext.Object.toQueryString.apply(Ext.Object, a) | |
| }, | |
| urlDecode: function() { | |
| return Ext.Object.fromQueryString.apply(Ext.Object, arguments) | |
| }, | |
| getScrollbarSize: function(c) { | |
| var b = Ext._scrollbarSize; | |
| if (c || !b) { | |
| var a = document.body | |
| , d = document.createElement("div"); | |
| d.style.width = d.style.height = "100px"; | |
| d.style.overflow = "scroll"; | |
| d.style.position = "absolute"; | |
| a.appendChild(d); | |
| Ext._scrollbarSize = b = { | |
| width: d.offsetWidth - d.clientWidth, | |
| height: d.offsetHeight - d.clientHeight | |
| }; | |
| a.removeChild(d) | |
| } | |
| return b | |
| }, | |
| typeOf: (function() { | |
| var a = /\S/ | |
| , c = Object.prototype.toString | |
| , d = { | |
| number: 1, | |
| string: 1, | |
| "boolean": 1, | |
| "undefined": 1 | |
| } | |
| , b = { | |
| "[object Array]": "array", | |
| "[object Date]": "date", | |
| "[object Boolean]": "boolean", | |
| "[object Number]": "number", | |
| "[object RegExp]": "regexp" | |
| }; | |
| return function(h) { | |
| if (h === null ) { | |
| return "null" | |
| } | |
| var g = typeof h, e, i; | |
| if (d[g]) { | |
| return g | |
| } | |
| e = b[i = c.call(h)]; | |
| if (e) { | |
| return e | |
| } | |
| if (g === "function") { | |
| return "function" | |
| } | |
| if (g === "object") { | |
| if (h.nodeType !== undefined) { | |
| if (h.nodeType === 3) { | |
| return a.test(h.nodeValue) ? "textnode" : "whitespace" | |
| } else { | |
| return "element" | |
| } | |
| } | |
| return "object" | |
| } | |
| return i | |
| } | |
| }()), | |
| factory: function(b, e, a, g) { | |
| var d = Ext.ClassManager, c; | |
| if (!b || b.isInstance) { | |
| if (a && a !== b) { | |
| a.destroy() | |
| } | |
| return b | |
| } | |
| if (g) { | |
| if (typeof b === "string") { | |
| return d.instantiateByAlias(g + "." + b) | |
| } else { | |
| if (Ext.isObject(b) && "type"in b) { | |
| return d.instantiateByAlias(g + "." + b.type, b) | |
| } | |
| } | |
| } | |
| if (b === true) { | |
| return a || Ext.create(e) | |
| } | |
| if ("xtype"in b) { | |
| c = d.instantiateByAlias("widget." + b.xtype, b) | |
| } else { | |
| if ("xclass"in b) { | |
| c = Ext.create(b.xclass, b) | |
| } | |
| } | |
| if (c) { | |
| if (a) { | |
| a.destroy() | |
| } | |
| return c | |
| } | |
| if (a) { | |
| return a.setConfig(b) | |
| } | |
| return Ext.create(e, b) | |
| }, | |
| log: (function() { | |
| var a = function() {} | |
| ; | |
| a.info = a.warn = a.error = Ext.emptyFn; | |
| return a | |
| }()) | |
| }); | |
| (function() { | |
| var d = [""], i = /([^\d\.])/, b = /[^\d]/g, a = /[\-+]/g, h = /\s/g, c = /_/g, g = { | |
| classic: 1, | |
| modern: 1 | |
| }, e; | |
| Ext.Version = e = function(r, n) { | |
| var s = this, l = s.padModes, j, p, m, o, t, k, q; | |
| if (r.isVersion) { | |
| r = r.version | |
| } | |
| s.version = q = String(r).toLowerCase().replace(c, ".").replace(a, ""); | |
| j = q.charAt(0); | |
| if (j in l) { | |
| q = q.substring(1); | |
| m = l[j] | |
| } else { | |
| m = n ? l[n] : 0 | |
| } | |
| s.pad = m; | |
| k = q.search(i); | |
| s.shortVersion = q; | |
| if (k !== -1) { | |
| s.release = t = q.substr(k, r.length); | |
| s.shortVersion = q.substr(0, k); | |
| t = e.releaseValueMap[t] || t | |
| } | |
| s.releaseValue = t || m; | |
| s.shortVersion = s.shortVersion.replace(b, ""); | |
| s.parts = o = q.split("."); | |
| for (p = o.length; p--; ) { | |
| o[p] = parseInt(o[p], 10) | |
| } | |
| if (m === Infinity) { | |
| o.push(m) | |
| } | |
| s.major = o[0] || m; | |
| s.minor = o[1] || m; | |
| s.patch = o[2] || m; | |
| s.build = o[3] || m; | |
| return s | |
| } | |
| ; | |
| e.prototype = { | |
| isVersion: true, | |
| padModes: { | |
| "~": NaN, | |
| "^": Infinity | |
| }, | |
| release: "", | |
| compareTo: function(t) { | |
| var u = this, n = u.pad, r = u.parts, v = r.length, m = t.isVersion ? t : new e(t), k = m.pad, q = m.parts, p = q.length, j = Math.max(v, p), o, l, s; | |
| for (o = 0; o < j; o++) { | |
| l = (o < v) ? r[o] : n; | |
| s = (o < p) ? q[o] : k; | |
| if (l < s) { | |
| return -1 | |
| } | |
| if (l > s) { | |
| return 1 | |
| } | |
| } | |
| l = u.releaseValue; | |
| s = m.releaseValue; | |
| if (l < s) { | |
| return -1 | |
| } | |
| if (l > s) { | |
| return 1 | |
| } | |
| return 0 | |
| }, | |
| toString: function() { | |
| return this.version | |
| }, | |
| valueOf: function() { | |
| return this.version | |
| }, | |
| getMajor: function() { | |
| return this.major | |
| }, | |
| getMinor: function() { | |
| return this.minor | |
| }, | |
| getPatch: function() { | |
| return this.patch | |
| }, | |
| getBuild: function() { | |
| return this.build | |
| }, | |
| getRelease: function() { | |
| return this.release | |
| }, | |
| getReleaseValue: function() { | |
| return this.releaseValue | |
| }, | |
| isGreaterThan: function(j) { | |
| return this.compareTo(j) > 0 | |
| }, | |
| isGreaterThanOrEqual: function(j) { | |
| return this.compareTo(j) >= 0 | |
| }, | |
| isLessThan: function(j) { | |
| return this.compareTo(j) < 0 | |
| }, | |
| isLessThanOrEqual: function(j) { | |
| return this.compareTo(j) <= 0 | |
| }, | |
| equals: function(j) { | |
| return this.compareTo(j) === 0 | |
| }, | |
| match: function(j) { | |
| j = String(j); | |
| return this.version.substr(0, j.length) === j | |
| }, | |
| toArray: function() { | |
| var j = this; | |
| return [j.getMajor(), j.getMinor(), j.getPatch(), j.getBuild(), j.getRelease()] | |
| }, | |
| getShortVersion: function() { | |
| return this.shortVersion | |
| }, | |
| gt: function(j) { | |
| return this.compareTo(j) > 0 | |
| }, | |
| lt: function(j) { | |
| return this.compareTo(j) < 0 | |
| }, | |
| gtEq: function(j) { | |
| return this.compareTo(j) >= 0 | |
| }, | |
| ltEq: function(j) { | |
| return this.compareTo(j) <= 0 | |
| } | |
| }; | |
| Ext.apply(e, { | |
| aliases: { | |
| from: { | |
| extjs: "ext", | |
| core: "core", | |
| touch: "modern" | |
| }, | |
| to: { | |
| ext: ["extjs"], | |
| core: ["core"], | |
| modern: ["touch"] | |
| } | |
| }, | |
| releaseValueMap: { | |
| dev: -6, | |
| alpha: -5, | |
| a: -5, | |
| beta: -4, | |
| b: -4, | |
| rc: -3, | |
| "#": -2, | |
| p: -1, | |
| pl: -1 | |
| }, | |
| getComponentValue: function(j) { | |
| return !j ? 0 : (isNaN(j) ? this.releaseValueMap[j] || j : parseInt(j, 10)) | |
| }, | |
| compare: function(l, k) { | |
| var j = l.isVersion ? l : new e(l); | |
| return j.compareTo(k) | |
| }, | |
| set: function(o, m, l) { | |
| var k = e.aliases.to[m], j = l.isVersion ? l : new e(l), n; | |
| o[m] = j; | |
| if (k) { | |
| for (n = k.length; n-- > 0; ) { | |
| o[k[n]] = j | |
| } | |
| } | |
| return j | |
| } | |
| }); | |
| Ext.apply(Ext, { | |
| compatVersions: {}, | |
| versions: {}, | |
| lastRegisteredVersion: null , | |
| getCompatVersion: function(k) { | |
| var j = Ext.compatVersions, l; | |
| if (!k) { | |
| l = j.ext || j.touch || j.core | |
| } else { | |
| l = j[e.aliases.from[k] || k] | |
| } | |
| return l || Ext.getVersion(k) | |
| }, | |
| setCompatVersion: function(k, j) { | |
| e.set(Ext.compatVersions, k, j) | |
| }, | |
| setVersion: function(k, j) { | |
| if (k in g) { | |
| Ext.toolkit = k | |
| } | |
| Ext.lastRegisteredVersion = e.set(Ext.versions, k, j); | |
| return this | |
| }, | |
| getVersion: function(k) { | |
| var j = Ext.versions; | |
| if (!k) { | |
| return j.ext || j.touch || j.core | |
| } | |
| return j[e.aliases.from[k] || k] | |
| }, | |
| checkVersion: function(p, x) { | |
| var t = Ext.isArray(p), l = e.aliases.from, y = t ? p : d, k = y.length, m = Ext.versions, w = m.ext || m.touch, q, v, s, n, o, j, z, r, u; | |
| if (!t) { | |
| d[0] = p | |
| } | |
| for (q = 0; q < k; ++q) { | |
| if (!Ext.isString(z = y[q])) { | |
| s = Ext.checkVersion(z.and || z.or, !z.or); | |
| if (z.not) { | |
| s = !s | |
| } | |
| } else { | |
| if (z.indexOf(" ") >= 0) { | |
| z = z.replace(h, "") | |
| } | |
| v = z.indexOf("@"); | |
| if (v < 0) { | |
| r = z; | |
| u = w | |
| } else { | |
| j = z.substring(0, v); | |
| if (!(u = m[l[j] || j])) { | |
| if (x) { | |
| return false | |
| } | |
| continue | |
| } | |
| r = z.substring(v + 1) | |
| } | |
| v = r.indexOf("-"); | |
| if (v < 0) { | |
| if (r.charAt(v = r.length - 1) === "+") { | |
| n = r.substring(0, v); | |
| o = null | |
| } else { | |
| n = o = r | |
| } | |
| } else { | |
| if (v > 0) { | |
| n = r.substring(0, v); | |
| o = r.substring(v + 1) | |
| } else { | |
| n = null ; | |
| o = r.substring(v + 1) | |
| } | |
| } | |
| s = true; | |
| if (n) { | |
| n = new e(n,"~"); | |
| s = n.ltEq(u) | |
| } | |
| if (s && o) { | |
| o = new e(o,"~"); | |
| s = o.gtEq(u) | |
| } | |
| } | |
| if (s) { | |
| if (!x) { | |
| return true | |
| } | |
| } else { | |
| if (x) { | |
| return false | |
| } | |
| } | |
| } | |
| return !!x | |
| }, | |
| deprecate: function(j, l, m, k) { | |
| if (e.compare(Ext.getVersion(j), l) < 1) { | |
| m.call(k) | |
| } | |
| } | |
| }) | |
| }()); | |
| (function(d) { | |
| var e = (d && d.packages) || {}, c = d && d.compatibility, b, a; | |
| for (b in e) { | |
| a = e[b]; | |
| Ext.setVersion(b, a.version) | |
| } | |
| if (c) { | |
| if (Ext.isString(c)) { | |
| Ext.setCompatVersion("core", c) | |
| } else { | |
| for (b in c) { | |
| Ext.setCompatVersion(b, c[b]) | |
| } | |
| } | |
| } | |
| if (!e.ext && !e.touch) { | |
| Ext.setVersion("ext", "6.0.1.250"); | |
| Ext.setVersion("core", "6.0.1.250") | |
| } | |
| })(Ext.manifest); | |
| Ext.Config = function(b) { | |
| var c = this | |
| , a = b.charAt(0).toUpperCase() + b.substr(1); | |
| c.name = b; | |
| c.names = { | |
| internal: "_" + b, | |
| initializing: "is" + a + "Initializing", | |
| apply: "apply" + a, | |
| update: "update" + a, | |
| get: "get" + a, | |
| set: "set" + a, | |
| initGet: "initGet" + a, | |
| changeEvent: b.toLowerCase() + "change" | |
| }; | |
| c.root = c | |
| } | |
| ; | |
| Ext.Config.map = {}; | |
| Ext.Config.get = function(b) { | |
| var c = Ext.Config.map | |
| , a = c[b] || (c[b] = new Ext.Config(b)); | |
| return a | |
| } | |
| ; | |
| Ext.Config.prototype = { | |
| self: Ext.Config, | |
| isConfig: true, | |
| getGetter: function() { | |
| return this.getter || (this.root.getter = this.makeGetter()) | |
| }, | |
| getInitGetter: function() { | |
| return this.initGetter || (this.root.initGetter = this.makeInitGetter()) | |
| }, | |
| getSetter: function() { | |
| return this.setter || (this.root.setter = this.makeSetter()) | |
| }, | |
| getEventedSetter: function() { | |
| return this.eventedSetter || (this.root.eventedSetter = this.makeEventedSetter()) | |
| }, | |
| getInternalName: function(a) { | |
| return a.$configPrefixed ? this.names.internal : this.name | |
| }, | |
| mergeNew: function(g, b, e, d) { | |
| var a, c; | |
| if (!b) { | |
| a = g | |
| } else { | |
| if (!g) { | |
| a = b | |
| } else { | |
| a = Ext.Object.chain(b); | |
| for (c in g) { | |
| if (!d || !(c in a)) { | |
| a[c] = g[c] | |
| } | |
| } | |
| } | |
| } | |
| return a | |
| }, | |
| mergeSets: function(e, c, a) { | |
| var b = c ? Ext.Object.chain(c) : {}, d, g; | |
| if (e instanceof Array) { | |
| for (d = e.length; d--; ) { | |
| g = e[d]; | |
| if (!a || !(g in b)) { | |
| b[g] = true | |
| } | |
| } | |
| } else { | |
| if (e) { | |
| if (e.constructor === Object) { | |
| for (d in e) { | |
| g = e[d]; | |
| if (!a || !(d in b)) { | |
| b[d] = g | |
| } | |
| } | |
| } else { | |
| if (!a || !(e in b)) { | |
| b[e] = true | |
| } | |
| } | |
| } | |
| } | |
| return b | |
| }, | |
| makeGetter: function() { | |
| var a = this.name | |
| , b = this.names.internal; | |
| return function() { | |
| var c = this.$configPrefixed ? b : a; | |
| return this[c] | |
| } | |
| }, | |
| makeInitGetter: function() { | |
| var a = this.name | |
| , e = this.names | |
| , d = e.set | |
| , b = e.get | |
| , c = e.initializing; | |
| return function() { | |
| var g = this; | |
| g[c] = true; | |
| delete g[b]; | |
| g[d](g.config[a]); | |
| delete g[c]; | |
| return g[b].apply(g, arguments) | |
| } | |
| }, | |
| makeSetter: function() { | |
| var a = this.name, e = this.names, c = e.internal, d = e.get, b = e.apply, h = e.update, g; | |
| g = function(l) { | |
| var k = this | |
| , j = k.$configPrefixed ? c : a | |
| , i = k[j]; | |
| delete k[d]; | |
| if (!k[b] || (l = k[b](l, i)) !== undefined) { | |
| if (l !== (i = k[j])) { | |
| k[j] = l; | |
| if (k[h]) { | |
| k[h](l, i) | |
| } | |
| } | |
| } | |
| return k | |
| } | |
| ; | |
| g.$isDefault = true; | |
| return g | |
| }, | |
| makeEventedSetter: function() { | |
| var b = this.name, h = this.names, j = h.internal, a = h.get, i = h.apply, d = h.update, g = h.changeEvent, e = function(m, n, k, l) { | |
| m[l] = n; | |
| if (m[d]) { | |
| m[d](n, k) | |
| } | |
| } | |
| , c; | |
| c = function(n) { | |
| var m = this | |
| , l = m.$configPrefixed ? j : b | |
| , k = m[l]; | |
| delete m[a]; | |
| if (!m[i] || (n = m[i](n, k)) !== undefined) { | |
| if (n !== (k = m[l])) { | |
| if (m.isConfiguring) { | |
| m[l] = n; | |
| if (m[d]) { | |
| m[d](n, k) | |
| } | |
| } else { | |
| m.fireEventedAction(g, [m, n, k], e, m, [m, n, k, l]) | |
| } | |
| } | |
| } | |
| return m | |
| } | |
| ; | |
| c.$isDefault = true; | |
| return c | |
| } | |
| }; | |
| (function() { | |
| var b = Ext.Config | |
| , c = b.map | |
| , a = Ext.Object; | |
| Ext.Configurator = function(d) { | |
| var g = this | |
| , e = d.prototype | |
| , h = d.superclass ? d.superclass.self.$config : null ; | |
| g.cls = d; | |
| g.superCfg = h; | |
| if (h) { | |
| g.configs = a.chain(h.configs); | |
| g.cachedConfigs = a.chain(h.cachedConfigs); | |
| g.initMap = a.chain(h.initMap); | |
| g.values = a.chain(h.values); | |
| g.needsFork = h.needsFork | |
| } else { | |
| g.configs = {}; | |
| g.cachedConfigs = {}; | |
| g.initMap = {}; | |
| g.values = {} | |
| } | |
| e.config = e.defaultConfig = g.values; | |
| d.$config = g | |
| } | |
| ; | |
| Ext.Configurator.prototype = { | |
| self: Ext.Configurator, | |
| needsFork: false, | |
| initList: null , | |
| add: function(u, d) { | |
| var v = this, i = v.cls, l = v.configs, w = v.cachedConfigs, n = v.initMap, q = i.prototype, x = d && d.$config.configs, e = v.values, k, m, t, g, h, j, y, p, o, r; | |
| for (y in u) { | |
| r = u[y]; | |
| k = r && r.constructor === Object; | |
| m = k && "$value"in r ? r : null ; | |
| if (m) { | |
| t = !!m.cached; | |
| r = m.$value; | |
| k = r && r.constructor === Object | |
| } | |
| g = m && m.merge; | |
| h = l[y]; | |
| if (h) { | |
| if (d) { | |
| g = h.merge; | |
| if (!g) { | |
| continue | |
| } | |
| m = null | |
| } else { | |
| g = g || h.merge | |
| } | |
| j = e[y]; | |
| if (g) { | |
| r = g.call(h, r, j, i, d) | |
| } else { | |
| if (k) { | |
| if (j && j.constructor === Object) { | |
| r = a.merge({}, j, r) | |
| } | |
| } | |
| } | |
| } else { | |
| if (x) { | |
| h = x[y]; | |
| m = null | |
| } else { | |
| h = b.get(y) | |
| } | |
| l[y] = h; | |
| if (h.cached || t) { | |
| w[y] = true | |
| } | |
| p = h.names; | |
| if (!q[o = p.get]) { | |
| q[o] = h.getter || h.getGetter() | |
| } | |
| if (!q[o = p.set]) { | |
| q[o] = (m && m.evented) ? (h.eventedSetter || h.getEventedSetter()) : (h.setter || h.getSetter()) | |
| } | |
| } | |
| if (m) { | |
| if (h.owner !== i) { | |
| l[y] = h = Ext.Object.chain(h); | |
| h.owner = i | |
| } | |
| Ext.apply(h, m); | |
| delete h.$value | |
| } | |
| if (!v.needsFork && r && (r.constructor === Object || r instanceof Array)) { | |
| v.needsFork = true | |
| } | |
| if (r !== null ) { | |
| n[y] = true | |
| } else { | |
| if (q.$configPrefixed) { | |
| q[l[y].names.internal] = null | |
| } else { | |
| q[l[y].name] = null | |
| } | |
| if (y in n) { | |
| n[y] = false | |
| } | |
| } | |
| e[y] = r | |
| } | |
| }, | |
| configure: function(y, m) { | |
| var A = this, l = A.configs, n = A.initMap, p = A.initListMap, w = A.initList, q = A.cls.prototype, e = A.values, r = 0, t = !w, g, h, j, C, v, u, k, o, B, s, z, x, d; | |
| e = A.needsFork ? a.fork(e) : a.chain(e); | |
| y.isConfiguring = true; | |
| if (t) { | |
| A.initList = w = []; | |
| A.initListMap = p = {}; | |
| y.isFirstInstance = true; | |
| for (B in n) { | |
| C = n[B]; | |
| h = l[B]; | |
| z = h.cached; | |
| if (C) { | |
| o = h.names; | |
| s = e[B]; | |
| if (!q[o.set].$isDefault || q[o.apply] || q[o.update] || typeof s === "object") { | |
| if (z) { | |
| (g || (g = [])).push(h) | |
| } else { | |
| w.push(h); | |
| p[B] = true | |
| } | |
| y[o.get] = h.initGetter || h.getInitGetter() | |
| } else { | |
| q[h.getInternalName(q)] = s | |
| } | |
| } else { | |
| if (z) { | |
| q[h.getInternalName(q)] = undefined | |
| } | |
| } | |
| } | |
| } | |
| k = g && g.length; | |
| if (k) { | |
| for (v = 0; v < k; ++v) { | |
| u = g[v].getInternalName(q); | |
| y[u] = null | |
| } | |
| for (v = 0; v < k; ++v) { | |
| o = (h = g[v]).names; | |
| j = o.get; | |
| if (y.hasOwnProperty(j)) { | |
| y[o.set](e[h.name]); | |
| delete y[j] | |
| } | |
| } | |
| for (v = 0; v < k; ++v) { | |
| u = g[v].getInternalName(q); | |
| q[u] = y[u]; | |
| delete y[u] | |
| } | |
| } | |
| if (m && m.platformConfig) { | |
| m = A.resolvePlatformConfig(y, m) | |
| } | |
| if (t) { | |
| if (y.afterCachedConfig && !y.afterCachedConfig.$nullFn) { | |
| y.afterCachedConfig(m) | |
| } | |
| } | |
| y.config = e; | |
| for (v = 0, | |
| k = w.length; v < k; ++v) { | |
| h = w[v]; | |
| y[h.names.get] = h.initGetter || h.getInitGetter() | |
| } | |
| if (y.transformInstanceConfig) { | |
| m = y.transformInstanceConfig(m) | |
| } | |
| if (m) { | |
| for (B in m) { | |
| s = m[B]; | |
| h = l[B]; | |
| if (!h) { | |
| y[B] = s | |
| } else { | |
| if (!h.lazy) { | |
| ++r | |
| } | |
| if (!p[B]) { | |
| y[h.names.get] = h.initGetter || h.getInitGetter() | |
| } | |
| if (h.merge) { | |
| s = h.merge(s, e[B], y) | |
| } else { | |
| if (s && s.constructor === Object) { | |
| x = e[B]; | |
| if (x && x.constructor === Object) { | |
| s = a.merge(e[B], s) | |
| } else { | |
| s = Ext.clone(s) | |
| } | |
| } | |
| } | |
| } | |
| e[B] = s | |
| } | |
| } | |
| if (y.beforeInitConfig && !y.beforeInitConfig.$nullFn) { | |
| if (y.beforeInitConfig(m) === false) { | |
| return | |
| } | |
| } | |
| if (m) { | |
| for (B in m) { | |
| if (!r) { | |
| break | |
| } | |
| h = l[B]; | |
| if (h && !h.lazy) { | |
| --r; | |
| o = h.names; | |
| j = o.get; | |
| if (y.hasOwnProperty(j)) { | |
| y[o.set](e[B]); | |
| delete y[o.get] | |
| } | |
| } | |
| } | |
| } | |
| for (v = 0, | |
| k = w.length; v < k; ++v) { | |
| h = w[v]; | |
| o = h.names; | |
| j = o.get; | |
| if (!h.lazy && y.hasOwnProperty(j)) { | |
| y[o.set](e[h.name]); | |
| delete y[j] | |
| } | |
| } | |
| delete y.isConfiguring | |
| }, | |
| getCurrentConfig: function(e) { | |
| var d = e.defaultConfig, h = {}, g; | |
| for (g in d) { | |
| h[g] = e[c[g].names.get]() | |
| } | |
| return h | |
| }, | |
| merge: function(d, j, h) { | |
| var l = this.configs, g, k, i, e; | |
| for (g in h) { | |
| k = h[g]; | |
| e = l[g]; | |
| if (e) { | |
| if (e.merge) { | |
| k = e.merge(k, j[g], d) | |
| } else { | |
| if (k && k.constructor === Object) { | |
| i = j[g]; | |
| if (i && i.constructor === Object) { | |
| k = Ext.Object.merge(i, k) | |
| } else { | |
| k = Ext.clone(k) | |
| } | |
| } | |
| } | |
| } | |
| j[g] = k | |
| } | |
| return j | |
| }, | |
| reconfigure: function(s, n, t) { | |
| var j = s.config, k = [], r = s.$configStrict && !(t && t.strict === false), o = this.configs, g = t && t.defaults, m, q, h, l, e, p, d; | |
| for (e in n) { | |
| if (g && s.hasOwnProperty(e)) { | |
| continue | |
| } | |
| j[e] = n[e]; | |
| m = o[e]; | |
| if (m) { | |
| s[m.names.get] = m.initGetter || m.getInitGetter() | |
| } else { | |
| d = s.self.prototype[e]; | |
| if (r) { | |
| if ((typeof d === "function") && !d.$nullFn) { | |
| continue | |
| } | |
| } | |
| } | |
| k.push(e) | |
| } | |
| for (h = 0, | |
| l = k.length; h < l; h++) { | |
| e = k[h]; | |
| m = o[e]; | |
| if (m) { | |
| p = m.names; | |
| q = p.get; | |
| if (s.hasOwnProperty(q)) { | |
| s[p.set](n[e]); | |
| delete s[q] | |
| } | |
| } else { | |
| m = c[e] || Ext.Config.get(e); | |
| p = m.names; | |
| if (s[p.set]) { | |
| s[p.set](n[e]) | |
| } else { | |
| s[e] = n[e] | |
| } | |
| } | |
| } | |
| }, | |
| resolvePlatformConfig: function(d, l) { | |
| var j = l && l.platformConfig, e = l, g, h, k; | |
| if (j) { | |
| h = Ext.getPlatformConfigKeys(j); | |
| k = h.length; | |
| if (k) { | |
| e = Ext.merge({}, e); | |
| for (g = 0, | |
| k = h.length; g < k; ++g) { | |
| this.merge(d, e, j[h[g]]) | |
| } | |
| } | |
| } | |
| return e | |
| } | |
| } | |
| }()); | |
| Ext.Base = (function(c) { | |
| var b = [], j, l = [], m = function(q, p) { | |
| var s = this, o, n, r; | |
| if (q) { | |
| n = Ext.Config.map[q]; | |
| r = n.names.get; | |
| if (p && s.hasOwnProperty(r)) { | |
| o = s.config[q] | |
| } else { | |
| o = s[r]() | |
| } | |
| } else { | |
| o = s.getCurrentConfig() | |
| } | |
| return o | |
| } | |
| , g = function(n) { | |
| return function() { | |
| return this[n].apply(this, arguments) | |
| } | |
| } | |
| , a = Ext.Version, i = /^\d/, k = {}, e = {}, h = function() {} | |
| , d = h.prototype; | |
| Ext.apply(h, { | |
| $className: "Ext.Base", | |
| $isClass: true, | |
| create: function() { | |
| return Ext.create.apply(Ext, [this].concat(Array.prototype.slice.call(arguments, 0))) | |
| }, | |
| addDeprecations: function(t) { | |
| var C = this, o = [], q = Ext.getCompatVersion(t.name), B, x, s, y, D, v, A, u, z, E, w, n, r, p; | |
| for (x in t) { | |
| if (i.test(x)) { | |
| p = new Ext.Version(x); | |
| p.deprecations = t[x]; | |
| o.push(p) | |
| } | |
| } | |
| o.sort(a.compare); | |
| for (s = o.length; s--; ) { | |
| B = (p = o[s]).deprecations; | |
| D = C.prototype; | |
| r = B.statics; | |
| v = q && q.lt(p); | |
| if (!v) { | |
| break | |
| } | |
| while (B) { | |
| z = B.methods; | |
| if (z) { | |
| for (E in z) { | |
| n = z[E]; | |
| u = null ; | |
| if (!n) {} else { | |
| if (Ext.isString(n)) { | |
| if (v) { | |
| u = g(n) | |
| } | |
| } else { | |
| y = ""; | |
| if (n.message || n.fn) { | |
| n = n.fn | |
| } | |
| A = D.hasOwnProperty(E) && D[E]; | |
| if (v && n) { | |
| n.$owner = C; | |
| n.$name = E; | |
| if (A) { | |
| n.$previous = A | |
| } | |
| u = n | |
| } | |
| } | |
| } | |
| if (u) { | |
| D[E] = u | |
| } | |
| } | |
| } | |
| B = r; | |
| r = null ; | |
| D = C | |
| } | |
| } | |
| }, | |
| extend: function(r) { | |
| var t = this, n = r.prototype, p, q, s, o, u; | |
| p = t.prototype = Ext.Object.chain(n); | |
| p.self = t; | |
| t.superclass = p.superclass = n; | |
| if (!r.$isClass) { | |
| for (q in d) { | |
| if (q in p) { | |
| p[q] = d[q] | |
| } | |
| } | |
| } | |
| u = n.$inheritableStatics; | |
| if (u) { | |
| for (q = 0, | |
| s = u.length; q < s; q++) { | |
| o = u[q]; | |
| if (!t.hasOwnProperty(o)) { | |
| t[o] = r[o] | |
| } | |
| } | |
| } | |
| if (r.$onExtended) { | |
| t.$onExtended = r.$onExtended.slice() | |
| } | |
| t.getConfigurator() | |
| }, | |
| $onExtended: [], | |
| triggerExtended: function() { | |
| var p = this.$onExtended, o = p.length, n, q; | |
| if (o > 0) { | |
| for (n = 0; n < o; n++) { | |
| q = p[n]; | |
| q.fn.apply(q.scope || this, arguments) | |
| } | |
| } | |
| }, | |
| onExtended: function(o, n) { | |
| this.$onExtended.push({ | |
| fn: o, | |
| scope: n | |
| }); | |
| return this | |
| }, | |
| addStatics: function(n) { | |
| this.addMembers(n, true); | |
| return this | |
| }, | |
| addInheritableStatics: function(o) { | |
| var r, n, q = this.prototype, p, s; | |
| r = q.$inheritableStatics; | |
| n = q.$hasInheritableStatics; | |
| if (!r) { | |
| r = q.$inheritableStatics = []; | |
| n = q.$hasInheritableStatics = {} | |
| } | |
| for (p in o) { | |
| if (o.hasOwnProperty(p)) { | |
| s = o[p]; | |
| this[p] = s; | |
| if (!n[p]) { | |
| n[p] = true; | |
| r.push(p) | |
| } | |
| } | |
| } | |
| return this | |
| }, | |
| addMembers: function(r, C, o) { | |
| var A = this, v = Ext.Function.clone, y = C ? A : A.prototype, s = !C && y.defaultConfig, B = Ext.enumerables, w = r.privates, x, u, z, t, n, p, q; | |
| if (w) { | |
| delete r.privates; | |
| if (!C) { | |
| q = w.statics; | |
| delete w.statics | |
| } | |
| A.addMembers(w, C, p); | |
| if (q) { | |
| A.addMembers(q, true, p) | |
| } | |
| } | |
| for (n in r) { | |
| if (r.hasOwnProperty(n)) { | |
| t = r[n]; | |
| if (typeof t === "function" && !t.$isClass && !t.$nullFn) { | |
| if (t.$owner) { | |
| t = v(t) | |
| } | |
| if (y.hasOwnProperty(n)) { | |
| t.$previous = y[n] | |
| } | |
| t.$owner = A; | |
| t.$name = n | |
| } else { | |
| if (s && (n in s) && !y.config.hasOwnProperty(n)) { | |
| (x || (x = {}))[n] = t; | |
| continue | |
| } | |
| } | |
| y[n] = t | |
| } | |
| } | |
| if (x) { | |
| A.addConfig(x) | |
| } | |
| if (B) { | |
| for (u = 0, | |
| z = B.length; u < z; ++u) { | |
| if (r.hasOwnProperty(n = B[u])) { | |
| t = r[n]; | |
| if (t && !t.$nullFn) { | |
| if (t.$owner) { | |
| t = v(t) | |
| } | |
| t.$owner = A; | |
| t.$name = n; | |
| if (y.hasOwnProperty(n)) { | |
| t.$previous = y[n] | |
| } | |
| } | |
| y[n] = t | |
| } | |
| } | |
| } | |
| return this | |
| }, | |
| addMember: function(n, o) { | |
| k[n] = o; | |
| this.addMembers(k); | |
| delete k[n]; | |
| return this | |
| }, | |
| borrow: function(t, n) { | |
| var p = t.prototype, r = {}, q, s, o; | |
| n = Ext.Array.from(n); | |
| for (q = 0, | |
| s = n.length; q < s; q++) { | |
| o = n[q]; | |
| r[o] = p[o] | |
| } | |
| return this.addMembers(r) | |
| }, | |
| override: function(o) { | |
| var q = this | |
| , t = o.statics | |
| , s = o.inheritableStatics | |
| , p = o.config | |
| , n = o.mixins | |
| , r = o.cachedConfig; | |
| if (t || s || p) { | |
| o = Ext.apply({}, o) | |
| } | |
| if (t) { | |
| q.addMembers(t, true); | |
| delete o.statics | |
| } | |
| if (s) { | |
| q.addInheritableStatics(s); | |
| delete o.inheritableStatics | |
| } | |
| if (p) { | |
| q.addConfig(p); | |
| delete o.config | |
| } | |
| if (r) { | |
| q.addCachedConfig(r); | |
| delete o.cachedConfig | |
| } | |
| delete o.mixins; | |
| q.addMembers(o); | |
| if (n) { | |
| q.mixin(n) | |
| } | |
| return q | |
| }, | |
| callParent: function(n) { | |
| var o; | |
| return (o = this.callParent.caller) && (o.$previous || ((o = o.$owner ? o : o.caller) && o.$owner.superclass.self[o.$name])).apply(this, n || b) | |
| }, | |
| callSuper: function(n) { | |
| var o; | |
| return (o = this.callSuper.caller) && ((o = o.$owner ? o : o.caller) && o.$owner.superclass.self[o.$name]).apply(this, n || b) | |
| }, | |
| mixin: function(n, o) { | |
| var t = this, z, v, y, u, p, s, x, w, r; | |
| if (typeof n !== "string") { | |
| r = n; | |
| if (r instanceof Array) { | |
| for (p = 0, | |
| s = r.length; p < s; p++) { | |
| z = r[p]; | |
| t.mixin(z.prototype.mixinId || z.$className, z) | |
| } | |
| } else { | |
| for (var q in r) { | |
| t.mixin(q, r[q]) | |
| } | |
| } | |
| return | |
| } | |
| z = o.prototype; | |
| v = t.prototype; | |
| if (z.onClassMixedIn) { | |
| z.onClassMixedIn.call(o, t) | |
| } | |
| if (!v.hasOwnProperty("mixins")) { | |
| if ("mixins"in v) { | |
| v.mixins = Ext.Object.chain(v.mixins) | |
| } else { | |
| v.mixins = {} | |
| } | |
| } | |
| for (y in z) { | |
| w = z[y]; | |
| if (y === "mixins") { | |
| Ext.applyIf(v.mixins, w) | |
| } else { | |
| if (!(y === "mixinId" || y === "config") && (v[y] === undefined)) { | |
| v[y] = w | |
| } | |
| } | |
| } | |
| u = z.$inheritableStatics; | |
| if (u) { | |
| for (p = 0, | |
| s = u.length; p < s; p++) { | |
| x = u[p]; | |
| if (!t.hasOwnProperty(x)) { | |
| t[x] = o[x] | |
| } | |
| } | |
| } | |
| if ("config"in z) { | |
| t.addConfig(z.config, o) | |
| } | |
| v.mixins[n] = z; | |
| if (z.afterClassMixedIn) { | |
| z.afterClassMixedIn.call(o, t) | |
| } | |
| return t | |
| }, | |
| addConfig: function(o, p) { | |
| var n = this.$config || this.getConfigurator(); | |
| n.add(o, p) | |
| }, | |
| addCachedConfig: function(n, p) { | |
| var q = {}, o; | |
| for (o in n) { | |
| q[o] = { | |
| cached: true, | |
| $value: n[o] | |
| } | |
| } | |
| this.addConfig(q, p) | |
| }, | |
| getConfigurator: function() { | |
| return this.$config || new Ext.Configurator(this) | |
| }, | |
| getName: function() { | |
| return Ext.getClassName(this) | |
| }, | |
| createAlias: c(function(o, n) { | |
| e[o] = function() { | |
| return this[n].apply(this, arguments) | |
| } | |
| ; | |
| this.override(e); | |
| delete e[o] | |
| }) | |
| }); | |
| for (j in h) { | |
| if (h.hasOwnProperty(j)) { | |
| l.push(j) | |
| } | |
| } | |
| h.$staticMembers = l; | |
| h.getConfigurator(); | |
| h.addMembers({ | |
| $className: "Ext.Base", | |
| isInstance: true, | |
| $configPrefixed: true, | |
| $configStrict: true, | |
| isConfiguring: false, | |
| isFirstInstance: false, | |
| destroyed: false, | |
| statics: function() { | |
| var o = this.statics.caller | |
| , n = this.self; | |
| if (!o) { | |
| return n | |
| } | |
| return o.$owner | |
| }, | |
| callParent: function(o) { | |
| var p, n = (p = this.callParent.caller) && (p.$previous || ((p = p.$owner ? p : p.caller) && p.$owner.superclass[p.$name])); | |
| return n.apply(this, o || b) | |
| }, | |
| callSuper: function(o) { | |
| var p, n = (p = this.callSuper.caller) && ((p = p.$owner ? p : p.caller) && p.$owner.superclass[p.$name]); | |
| return n.apply(this, o || b) | |
| }, | |
| self: h, | |
| constructor: function() { | |
| return this | |
| }, | |
| getConfigurator: function() { | |
| return this.$config || this.self.getConfigurator() | |
| }, | |
| initConfig: function(p) { | |
| var o = this | |
| , n = o.getConfigurator(); | |
| o.initConfig = Ext.emptyFn; | |
| o.initialConfig = p || {}; | |
| n.configure(o, p); | |
| return o | |
| }, | |
| beforeInitConfig: Ext.emptyFn, | |
| getConfig: m, | |
| setConfig: function(p, r, o) { | |
| var q = this, n; | |
| if (p) { | |
| if (typeof p === "string") { | |
| n = {}; | |
| n[p] = r | |
| } else { | |
| n = p | |
| } | |
| q.getConfigurator().reconfigure(q, n, o) | |
| } | |
| return q | |
| }, | |
| getCurrentConfig: function() { | |
| var n = this.getConfigurator(); | |
| return n.getCurrentConfig(this) | |
| }, | |
| hasConfig: function(n) { | |
| return n in this.defaultConfig | |
| }, | |
| getInitialConfig: function(o) { | |
| var n = this.config; | |
| if (!o) { | |
| return n | |
| } | |
| return n[o] | |
| }, | |
| $links: null , | |
| link: function(o, q) { | |
| var p = this | |
| , n = p.$links || (p.$links = {}); | |
| n[o] = true; | |
| p[o] = q; | |
| return q | |
| }, | |
| unlink: function(s) { | |
| var q = this, n, p, o, r; | |
| for (n = 0, | |
| p = s.length; n < p; n++) { | |
| o = s[n]; | |
| r = q[o]; | |
| if (r) { | |
| if (r.isInstance && !r.destroyed) { | |
| r.destroy() | |
| } else { | |
| if (r.parentNode && "nodeType"in r) { | |
| r.parentNode.removeChild(r) | |
| } | |
| } | |
| } | |
| q[o] = null | |
| } | |
| return q | |
| }, | |
| destroy: function() { | |
| var o = this | |
| , n = o.$links; | |
| o.initialConfig = o.config = null ; | |
| o.destroy = Ext.emptyFn; | |
| o.isDestroyed = o.destroyed = true; | |
| if (n) { | |
| o.$links = null ; | |
| o.unlink(Ext.Object.getKeys(n)) | |
| } | |
| } | |
| }); | |
| d.callOverridden = d.callParent; | |
| return h | |
| }(Ext.Function.flexSetter)); | |
| (function(b, a) { | |
| (Ext.util || (Ext.util = {})).Cache = b = function(c) { | |
| var e = this, d; | |
| if (c) { | |
| Ext.apply(e, c) | |
| } | |
| e.head = d = { | |
| key: null , | |
| value: null | |
| }; | |
| e.map = {}; | |
| d.next = d.prev = d | |
| } | |
| ; | |
| b.prototype = a = { | |
| maxSize: 100, | |
| count: 0, | |
| clear: function() { | |
| var e = this | |
| , c = e.head | |
| , d = c.next; | |
| c.next = c.prev = c; | |
| if (!e.evict.$nullFn) { | |
| for (; d !== c; d = d.next) { | |
| e.evict(d.key, d.value) | |
| } | |
| } | |
| e.count = 0 | |
| }, | |
| each: function(e, d) { | |
| d = d || this; | |
| for (var c = this.head, g = c.next; g !== c; g = g.next) { | |
| if (e.call(d, g.key, g.value)) { | |
| break | |
| } | |
| } | |
| }, | |
| get: function(d) { | |
| var g = this | |
| , c = g.head | |
| , h = g.map | |
| , e = h[d]; | |
| if (e) { | |
| if (e.prev !== c) { | |
| g.unlinkEntry(e); | |
| g.linkEntry(e) | |
| } | |
| } else { | |
| h[d] = e = { | |
| key: d, | |
| value: g.miss.apply(g, arguments) | |
| }; | |
| g.linkEntry(e); | |
| ++g.count; | |
| while (g.count > g.maxSize) { | |
| g.unlinkEntry(c.prev, true); | |
| --g.count | |
| } | |
| } | |
| return e.value | |
| }, | |
| evict: Ext.emptyFn, | |
| linkEntry: function(d) { | |
| var c = this.head | |
| , e = c.next; | |
| d.next = e; | |
| d.prev = c; | |
| c.next = d; | |
| e.prev = d | |
| }, | |
| unlinkEntry: function(e, g) { | |
| var c = e.next | |
| , d = e.prev; | |
| d.next = c; | |
| c.prev = d; | |
| if (g) { | |
| this.evict(e.key, e.value) | |
| } | |
| } | |
| }; | |
| a.destroy = a.clear | |
| }()); | |
| (function() { | |
| var d, c = Ext.Base, e = c.$staticMembers, b = function(h, g) { | |
| return (h.length - g.length) || ((h < g) ? -1 : ((h > g) ? 1 : 0)) | |
| } | |
| ; | |
| function a(h) { | |
| function g() { | |
| return this.constructor.apply(this, arguments) || null | |
| } | |
| return g | |
| } | |
| Ext.Class = d = function(h, i, g) { | |
| if (typeof h != "function") { | |
| g = i; | |
| i = h; | |
| h = null | |
| } | |
| if (!i) { | |
| i = {} | |
| } | |
| h = d.create(h, i); | |
| d.process(h, i, g); | |
| return h | |
| } | |
| ; | |
| Ext.apply(d, { | |
| makeCtor: a, | |
| onBeforeCreated: function(h, i, g) { | |
| h.addMembers(i); | |
| g.onCreated.call(h, h) | |
| }, | |
| create: function(g, k) { | |
| var j = e.length, h; | |
| if (!g) { | |
| g = a() | |
| } | |
| while (j--) { | |
| h = e[j]; | |
| g[h] = c[h] | |
| } | |
| return g | |
| }, | |
| process: function(g, o, k) { | |
| var h = o.preprocessors || d.defaultPreprocessors, r = this.preprocessors, u = { | |
| onBeforeCreated: this.onBeforeCreated | |
| }, t = [], v, n, m, s, l, q, p; | |
| delete o.preprocessors; | |
| g._classHooks = u; | |
| for (m = 0, | |
| s = h.length; m < s; m++) { | |
| v = h[m]; | |
| if (typeof v == "string") { | |
| v = r[v]; | |
| n = v.properties; | |
| if (n === true) { | |
| t.push(v.fn) | |
| } else { | |
| if (n) { | |
| for (l = 0, | |
| q = n.length; l < q; l++) { | |
| p = n[l]; | |
| if (o.hasOwnProperty(p)) { | |
| t.push(v.fn); | |
| break | |
| } | |
| } | |
| } | |
| } | |
| } else { | |
| t.push(v) | |
| } | |
| } | |
| u.onCreated = k ? k : Ext.emptyFn; | |
| u.preprocessors = t; | |
| this.doProcess(g, o, u) | |
| }, | |
| doProcess: function(h, l, g) { | |
| var k = this | |
| , m = g.preprocessors | |
| , i = m.shift() | |
| , j = k.doProcess; | |
| for (; i; i = m.shift()) { | |
| if (i.call(k, h, l, g, j) === false) { | |
| return | |
| } | |
| } | |
| g.onBeforeCreated.apply(k, arguments) | |
| }, | |
| preprocessors: {}, | |
| registerPreprocessor: function(h, k, i, g, j) { | |
| if (!g) { | |
| g = "last" | |
| } | |
| if (!i) { | |
| i = [h] | |
| } | |
| this.preprocessors[h] = { | |
| name: h, | |
| properties: i || false, | |
| fn: k | |
| }; | |
| this.setDefaultPreprocessorPosition(h, g, j); | |
| return this | |
| }, | |
| getPreprocessor: function(g) { | |
| return this.preprocessors[g] | |
| }, | |
| getPreprocessors: function() { | |
| return this.preprocessors | |
| }, | |
| defaultPreprocessors: [], | |
| getDefaultPreprocessors: function() { | |
| return this.defaultPreprocessors | |
| }, | |
| setDefaultPreprocessors: function(g) { | |
| this.defaultPreprocessors = Ext.Array.from(g); | |
| return this | |
| }, | |
| setDefaultPreprocessorPosition: function(i, k, j) { | |
| var g = this.defaultPreprocessors, h; | |
| if (typeof k == "string") { | |
| if (k === "first") { | |
| g.unshift(i); | |
| return this | |
| } else { | |
| if (k === "last") { | |
| g.push(i); | |
| return this | |
| } | |
| } | |
| k = (k === "after") ? 1 : -1 | |
| } | |
| h = Ext.Array.indexOf(g, j); | |
| if (h !== -1) { | |
| Ext.Array.splice(g, Math.max(0, h + k), 0, i) | |
| } | |
| return this | |
| } | |
| }); | |
| d.registerPreprocessor("extend", function(h, k, p) { | |
| var l = Ext.Base, m = l.prototype, n = k.extend, g, o, j; | |
| delete k.extend; | |
| if (n && n !== Object) { | |
| g = n | |
| } else { | |
| g = l | |
| } | |
| o = g.prototype; | |
| if (!g.$isClass) { | |
| for (j in m) { | |
| if (!o[j]) { | |
| o[j] = m[j] | |
| } | |
| } | |
| } | |
| h.extend(g); | |
| h.triggerExtended.apply(h, arguments); | |
| if (k.onClassExtended) { | |
| h.onExtended(k.onClassExtended, h); | |
| delete k.onClassExtended | |
| } | |
| }, true); | |
| d.registerPreprocessor("privates", function(g, j) { | |
| var i = j.privates | |
| , k = i.statics | |
| , h = i.privacy || true; | |
| delete j.privates; | |
| delete i.statics; | |
| g.addMembers(i, false, h); | |
| if (k) { | |
| g.addMembers(k, true, h) | |
| } | |
| }); | |
| d.registerPreprocessor("statics", function(g, h) { | |
| g.addStatics(h.statics); | |
| delete h.statics | |
| }); | |
| d.registerPreprocessor("inheritableStatics", function(g, h) { | |
| g.addInheritableStatics(h.inheritableStatics); | |
| delete h.inheritableStatics | |
| }); | |
| Ext.createRuleFn = function(g) { | |
| return new Function("$c","with($c) { return (" + g + "); }") | |
| } | |
| ; | |
| Ext.expressionCache = new Ext.util.Cache({ | |
| miss: Ext.createRuleFn | |
| }); | |
| Ext.ruleKeySortFn = b; | |
| Ext.getPlatformConfigKeys = function(i) { | |
| var h = [], g, j; | |
| for (g in i) { | |
| j = Ext.expressionCache.get(g); | |
| if (j(Ext.platformTags)) { | |
| h.push(g) | |
| } | |
| } | |
| h.sort(b); | |
| return h | |
| } | |
| ; | |
| d.registerPreprocessor("platformConfig", function(j, n, u) { | |
| var o = n.platformConfig, k = n.config, s, p, q, l, h, v, g, t, m, r; | |
| delete n.platformConfig; | |
| l = j.getConfigurator(); | |
| p = l.configs; | |
| v = Ext.getPlatformConfigKeys(o); | |
| for (m = 0, | |
| r = v.length; m < r; ++m) { | |
| q = o[v[m]]; | |
| h = s = null ; | |
| for (g in q) { | |
| t = q[g]; | |
| if (k && g in k) { | |
| (s || (s = {}))[g] = t; | |
| (h || (h = {}))[g] = k[g]; | |
| delete k[g] | |
| } else { | |
| if (g in p) { | |
| (s || (s = {}))[g] = t | |
| } else { | |
| n[g] = t | |
| } | |
| } | |
| } | |
| if (h) { | |
| l.add(h) | |
| } | |
| if (s) { | |
| l.add(s) | |
| } | |
| } | |
| }); | |
| d.registerPreprocessor("config", function(g, h) { | |
| if (h.hasOwnProperty("$configPrefixed")) { | |
| g.prototype.$configPrefixed = h.$configPrefixed | |
| } | |
| g.addConfig(h.config); | |
| delete h.config | |
| }); | |
| d.registerPreprocessor("cachedConfig", function(g, h) { | |
| if (h.hasOwnProperty("$configPrefixed")) { | |
| g.prototype.$configPrefixed = h.$configPrefixed | |
| } | |
| g.addCachedConfig(h.cachedConfig); | |
| delete h.cachedConfig | |
| }); | |
| d.registerPreprocessor("mixins", function(j, k, g) { | |
| var i = k.mixins | |
| , h = g.onCreated; | |
| delete k.mixins; | |
| g.onCreated = function() { | |
| g.onCreated = h; | |
| j.mixin(i); | |
| return g.onCreated.apply(this, arguments) | |
| } | |
| }); | |
| Ext.extend = function(i, j, h) { | |
| if (arguments.length === 2 && Ext.isObject(j)) { | |
| h = j; | |
| j = i; | |
| i = null | |
| } | |
| var g; | |
| if (!j) { | |
| throw new Error("[Ext.extend] Attempting to extend from a class which has not been loaded on the page.") | |
| } | |
| h.extend = j; | |
| h.preprocessors = ["extend", "statics", "inheritableStatics", "mixins", "platformConfig", "config"]; | |
| if (i) { | |
| g = new d(i,h); | |
| g.prototype.constructor = i | |
| } else { | |
| g = new d(h) | |
| } | |
| g.prototype.override = function(l) { | |
| for (var k in l) { | |
| if (l.hasOwnProperty(k)) { | |
| this[k] = l[k] | |
| } | |
| } | |
| } | |
| ; | |
| return g | |
| } | |
| }()); | |
| Ext.Inventory = function() { | |
| var a = this; | |
| a.names = []; | |
| a.paths = {}; | |
| a.alternateToName = {}; | |
| a.aliasToName = {}; | |
| a.nameToAliases = {}; | |
| a.nameToAlternates = {} | |
| } | |
| ; | |
| Ext.Inventory.prototype = { | |
| _array1: [0], | |
| prefixes: null , | |
| dotRe: /\./g, | |
| wildcardRe: /\*/g, | |
| addAlias: function(b, a, c) { | |
| return this.addMapping(b, a, this.aliasToName, this.nameToAliases, c) | |
| }, | |
| addAlternate: function(a, b) { | |
| return this.addMapping(a, b, this.alternateToName, this.nameToAlternates) | |
| }, | |
| addMapping: function(m, e, g, p, h) { | |
| var b = m.$className || m, k = b, l = this._array1, o, d, q, j, c, n; | |
| if (Ext.isString(b)) { | |
| k = {}; | |
| k[b] = e | |
| } | |
| for (q in k) { | |
| d = k[q]; | |
| if (Ext.isString(d)) { | |
| l[0] = d; | |
| d = l | |
| } | |
| c = d.length; | |
| n = p[q] || (p[q] = []); | |
| for (j = 0; j < c; ++j) { | |
| if (!(o = d[j])) { | |
| continue | |
| } | |
| if (g[o] !== q) { | |
| g[o] = q; | |
| n.push(o) | |
| } | |
| } | |
| } | |
| }, | |
| getAliasesByName: function(a) { | |
| return this.nameToAliases[a] || null | |
| }, | |
| getAlternatesByName: function(a) { | |
| return this.nameToAlternates[a] || null | |
| }, | |
| getNameByAlias: function(a) { | |
| return this.aliasToName[a] || "" | |
| }, | |
| getNameByAlternate: function(a) { | |
| return this.alternateToName[a] || "" | |
| }, | |
| getNamesByExpression: function(m, a, j) { | |
| var v = this, s = v.aliasToName, p = v.alternateToName, b = v.nameToAliases, d = v.nameToAlternates, u = j ? a : {}, l = [], t = Ext.isString(m) ? [m] : m, h = t.length, e = v.wildcardRe, c, q, r, k, o, w, g; | |
| for (q = 0; q < h; ++q) { | |
| if ((c = t[q]).indexOf("*") < 0) { | |
| if (!(w = s[c])) { | |
| if (!(w = p[c])) { | |
| w = c | |
| } | |
| } | |
| if (!(w in u) && !(a && (w in a))) { | |
| u[w] = 1; | |
| l.push(w) | |
| } | |
| } else { | |
| g = new RegExp("^" + c.replace(e, "(.*?)") + "$"); | |
| for (w in b) { | |
| if (!(w in u) && !(a && (w in a))) { | |
| if (!(k = g.test(w))) { | |
| o = (r = b[w]).length; | |
| while (!k && o-- > 0) { | |
| k = g.test(r[o]) | |
| } | |
| r = d[w]; | |
| if (r && !k) { | |
| o = r.length; | |
| while (!k && o-- > 0) { | |
| k = g.test(r[o]) | |
| } | |
| } | |
| } | |
| if (k) { | |
| u[w] = 1; | |
| l.push(w) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return l | |
| }, | |
| getPath: function(b) { | |
| var c = this, e = c.paths, a = "", d; | |
| if (b in e) { | |
| a = e[b] | |
| } else { | |
| d = c.getPrefix(b); | |
| if (d) { | |
| b = b.substring(d.length + 1); | |
| a = e[d]; | |
| if (a) { | |
| a += "/" | |
| } | |
| } | |
| a += b.replace(c.dotRe, "/") + ".js" | |
| } | |
| return a | |
| }, | |
| getPrefix: function(b) { | |
| if (b in this.paths) { | |
| return b | |
| } | |
| var e = this.getPrefixes(), a = e.length, c, d; | |
| while (a-- > 0) { | |
| c = (d = e[a]).length; | |
| if (c < b.length && b.charAt(c) === "." && d === b.substring(0, c)) { | |
| return d | |
| } | |
| } | |
| return "" | |
| }, | |
| getPrefixes: function() { | |
| var a = this | |
| , b = a.prefixes; | |
| if (!b) { | |
| a.prefixes = b = a.names.slice(0); | |
| b.sort(a._compareNames) | |
| } | |
| return b | |
| }, | |
| removeName: function(b) { | |
| var g = this, k = g.aliasToName, m = g.alternateToName, l = g.nameToAliases, e = g.nameToAlternates, c = l[b], h = e[b], d, j; | |
| delete l[b]; | |
| delete e[b]; | |
| if (c) { | |
| for (d = c.length; d--; ) { | |
| if (b === (j = c[d])) { | |
| delete k[j] | |
| } | |
| } | |
| } | |
| if (h) { | |
| for (d = h.length; d--; ) { | |
| if (b === (j = h[d])) { | |
| delete m[j] | |
| } | |
| } | |
| } | |
| }, | |
| resolveName: function(a) { | |
| var b = this, c; | |
| if (!(a in b.nameToAliases)) { | |
| if (!(c = b.aliasToName[a])) { | |
| c = b.alternateToName[a] | |
| } | |
| } | |
| return c || a | |
| }, | |
| select: function(e, c) { | |
| var d = this, g = {}, b = { | |
| excludes: g, | |
| exclude: function() { | |
| d.getNamesByExpression(arguments, g, true); | |
| return this | |
| } | |
| }, a; | |
| for (a in e) { | |
| b[a] = d.selectMethod(g, e[a], c || e) | |
| } | |
| return b | |
| }, | |
| selectMethod: function(d, b, a) { | |
| var c = this; | |
| return function(e) { | |
| var g = Ext.Array.slice(arguments, 1); | |
| g.unshift(c.getNamesByExpression(e, d)); | |
| return b.apply(a, g) | |
| } | |
| }, | |
| setPath: Ext.Function.flexSetter(function(a, c) { | |
| var b = this; | |
| b.paths[a] = c; | |
| b.names.push(a); | |
| b.prefixes = null ; | |
| return b | |
| }), | |
| _compareNames: function(a, c) { | |
| var b = a.length - c.length; | |
| if (!b) { | |
| b = (a < c) ? -1 : 1 | |
| } | |
| return b | |
| } | |
| }; | |
| Ext.ClassManager = (function(q, l, s, e, o) { | |
| var b = Ext.Class.makeCtor | |
| , h = [] | |
| , i = { | |
| Ext: { | |
| name: "Ext", | |
| value: Ext | |
| } | |
| } | |
| , c = Ext.apply(new Ext.Inventory(), { | |
| classes: {}, | |
| classState: {}, | |
| existCache: {}, | |
| instantiators: [], | |
| isCreated: function(u) { | |
| if (c.classes[u] || c.existCache[u]) { | |
| return true | |
| } | |
| if (!c.lookupName(u, false)) { | |
| return false | |
| } | |
| c.triggerCreated(u); | |
| return true | |
| }, | |
| createdListeners: [], | |
| nameCreatedListeners: {}, | |
| existsListeners: [], | |
| nameExistsListeners: {}, | |
| overrideMap: {}, | |
| triggerCreated: function(u, v) { | |
| c.existCache[u] = v || 1; | |
| c.classState[u] += 40; | |
| c.notify(u, c.createdListeners, c.nameCreatedListeners) | |
| }, | |
| onCreated: function(w, v, u) { | |
| c.addListener(w, v, u, c.createdListeners, c.nameCreatedListeners) | |
| }, | |
| notify: function(C, E, w) { | |
| var x = c.getAlternatesByName(C), D = [C], z, B, y, A, v, u; | |
| for (z = 0, | |
| B = E.length; z < B; z++) { | |
| v = E[z]; | |
| v.fn.call(v.scope, C) | |
| } | |
| while (D) { | |
| for (z = 0, | |
| B = D.length; z < B; z++) { | |
| u = D[z]; | |
| E = w[u]; | |
| if (E) { | |
| for (y = 0, | |
| A = E.length; y < A; y++) { | |
| v = E[y]; | |
| v.fn.call(v.scope, u) | |
| } | |
| delete w[u] | |
| } | |
| } | |
| D = x; | |
| x = null | |
| } | |
| }, | |
| addListener: function(z, y, x, w, v) { | |
| if (Ext.isArray(x)) { | |
| z = Ext.Function.createBarrier(x.length, z, y); | |
| for (u = 0; u < x.length; u++) { | |
| this.addListener(z, null , x[u], w, v) | |
| } | |
| return | |
| } | |
| var u, A = { | |
| fn: z, | |
| scope: y | |
| }; | |
| if (x) { | |
| if (this.isCreated(x)) { | |
| z.call(y, x); | |
| return | |
| } | |
| if (!v[x]) { | |
| v[x] = [] | |
| } | |
| v[x].push(A) | |
| } else { | |
| w.push(A) | |
| } | |
| }, | |
| $namespaceCache: i, | |
| addRootNamespaces: function(v) { | |
| for (var u in v) { | |
| i[u] = { | |
| name: u, | |
| value: v[u] | |
| } | |
| } | |
| }, | |
| clearNamespaceCache: function() { | |
| h.length = 0; | |
| for (var u in i) { | |
| if (!i[u].value) { | |
| delete i[u] | |
| } | |
| } | |
| }, | |
| getNamespaceEntry: function(v) { | |
| if (typeof v !== "string") { | |
| return v | |
| } | |
| var w = i[v], u; | |
| if (!w) { | |
| u = v.lastIndexOf("."); | |
| if (u < 0) { | |
| w = { | |
| name: v | |
| } | |
| } else { | |
| w = { | |
| name: v.substring(u + 1), | |
| parent: c.getNamespaceEntry(v.substring(0, u)) | |
| } | |
| } | |
| i[v] = w | |
| } | |
| return w | |
| }, | |
| lookupName: function(x, z) { | |
| var y = c.getNamespaceEntry(x), w = Ext.global, u = 0, A, v; | |
| for (A = y; A; A = A.parent) { | |
| h[u++] = A | |
| } | |
| while (w && u-- > 0) { | |
| A = h[u]; | |
| v = w; | |
| w = A.value || w[A.name]; | |
| if (!w && z) { | |
| v[A.name] = w = {} | |
| } | |
| } | |
| return w | |
| }, | |
| setNamespace: function(v, x) { | |
| var w = c.getNamespaceEntry(v) | |
| , u = Ext.global; | |
| if (w.parent) { | |
| u = c.lookupName(w.parent, true) | |
| } | |
| u[w.name] = x; | |
| return x | |
| }, | |
| setXType: function(u, B) { | |
| var w = u.$className | |
| , A = w ? u : c.get(w = u) | |
| , x = A.prototype | |
| , y = x.xtypes | |
| , v = x.xtypesChain | |
| , z = x.xtypesMap; | |
| if (!x.hasOwnProperty("xtypes")) { | |
| x.xtypes = y = []; | |
| x.xtypesChain = v = v ? v.slice(0) : []; | |
| x.xtypesMap = z = Ext.apply({}, z) | |
| } | |
| c.addAlias(w, "widget." + B, true); | |
| y.push(B); | |
| v.push(B); | |
| z[B] = true | |
| }, | |
| set: function(u, w) { | |
| var v = c.getName(w); | |
| c.classes[u] = c.setNamespace(u, w); | |
| if (v && v !== u) { | |
| c.addAlternate(v, u) | |
| } | |
| return c | |
| }, | |
| get: function(u) { | |
| return c.classes[u] || c.lookupName(u, false) | |
| }, | |
| addNameAliasMappings: function(u) { | |
| c.addAlias(u) | |
| }, | |
| addNameAlternateMappings: function(u) { | |
| c.addAlternate(u) | |
| }, | |
| getByAlias: function(u) { | |
| return c.get(c.getNameByAlias(u)) | |
| }, | |
| getByConfig: function(v, w) { | |
| var x = v.xclass, u; | |
| if (x) { | |
| u = x | |
| } else { | |
| u = v.xtype; | |
| if (u) { | |
| w = "widget." | |
| } else { | |
| u = v.type | |
| } | |
| u = c.getNameByAlias(w + u) | |
| } | |
| return c.get(u) | |
| }, | |
| getName: function(u) { | |
| return u && u.$className || "" | |
| }, | |
| getClass: function(u) { | |
| return u && u.self || null | |
| }, | |
| create: function(v, x, u) { | |
| var w = b(v); | |
| if (typeof x === "function") { | |
| x = x(w) | |
| } | |
| x.$className = v; | |
| return new q(w,x,function() { | |
| var y = x.postprocessors || c.defaultPostprocessors, F = c.postprocessors, G = [], E, A, D, z, C, B, H; | |
| delete x.postprocessors; | |
| for (A = 0, | |
| D = y.length; A < D; A++) { | |
| E = y[A]; | |
| if (typeof E === "string") { | |
| E = F[E]; | |
| B = E.properties; | |
| if (B === true) { | |
| G.push(E.fn) | |
| } else { | |
| if (B) { | |
| for (z = 0, | |
| C = B.length; z < C; z++) { | |
| H = B[z]; | |
| if (x.hasOwnProperty(H)) { | |
| G.push(E.fn); | |
| break | |
| } | |
| } | |
| } | |
| } | |
| } else { | |
| G.push(E) | |
| } | |
| } | |
| x.postprocessors = G; | |
| x.createdFn = u; | |
| c.processCreate(v, this, x) | |
| } | |
| ) | |
| }, | |
| processCreate: function(x, v, z) { | |
| var y = this | |
| , u = z.postprocessors.shift() | |
| , w = z.createdFn; | |
| if (!u) { | |
| if (x) { | |
| y.set(x, v) | |
| } | |
| delete v._classHooks; | |
| if (w) { | |
| w.call(v, v) | |
| } | |
| if (x) { | |
| y.triggerCreated(x) | |
| } | |
| return | |
| } | |
| if (u.call(y, x, v, z, y.processCreate) !== false) { | |
| y.processCreate(x, v, z) | |
| } | |
| }, | |
| createOverride: function(A, y, w) { | |
| var C = this, D = y.override, F = y.requires, x = y.uses, z = y.mixins, u, E = 1, B, v = function() { | |
| var G, K, J, I, H; | |
| if (!B) { | |
| K = F ? F.slice(0) : []; | |
| if (z) { | |
| if (!(u = z instanceof Array)) { | |
| for (I in z) { | |
| if (Ext.isString(G = z[I])) { | |
| K.push(G) | |
| } | |
| } | |
| } else { | |
| for (J = 0, | |
| H = z.length; J < H; ++J) { | |
| if (Ext.isString(G = z[J])) { | |
| K.push(G) | |
| } | |
| } | |
| } | |
| } | |
| B = true; | |
| if (K.length) { | |
| Ext.require(K, v); | |
| return | |
| } | |
| } | |
| if (u) { | |
| for (J = 0, | |
| H = z.length; J < H; ++J) { | |
| if (Ext.isString(G = z[J])) { | |
| z[J] = Ext.ClassManager.get(G) | |
| } | |
| } | |
| } else { | |
| if (z) { | |
| for (I in z) { | |
| if (Ext.isString(G = z[I])) { | |
| z[I] = Ext.ClassManager.get(G) | |
| } | |
| } | |
| } | |
| } | |
| G = C.get(D); | |
| delete y.override; | |
| delete y.compatibility; | |
| delete y.requires; | |
| delete y.uses; | |
| Ext.override(G, y); | |
| Ext.Loader.history.push(A); | |
| if (x) { | |
| Ext.Loader.addUsedClasses(x) | |
| } | |
| if (w) { | |
| w.call(G, G) | |
| } | |
| } | |
| ; | |
| c.overrideMap[A] = true; | |
| if ("compatibility"in y && Ext.isString(E = y.compatibility)) { | |
| E = Ext.checkVersion(E) | |
| } | |
| if (E) { | |
| C.onCreated(v, C, D) | |
| } | |
| C.triggerCreated(A, 2); | |
| return C | |
| }, | |
| instantiateByAlias: function() { | |
| var v = arguments[0] | |
| , u = s.call(arguments) | |
| , w = this.getNameByAlias(v); | |
| u[0] = w; | |
| return Ext.create.apply(Ext, u) | |
| }, | |
| instantiate: function() { | |
| return Ext.create.apply(Ext, arguments) | |
| }, | |
| dynInstantiate: function(v, u) { | |
| u = e(u, true); | |
| u.unshift(v); | |
| return Ext.create.apply(Ext, u) | |
| }, | |
| getInstantiator: function(x) { | |
| var w = this.instantiators, y, v, u; | |
| y = w[x]; | |
| if (!y) { | |
| v = x; | |
| u = []; | |
| for (v = 0; v < x; v++) { | |
| u.push("a[" + v + "]") | |
| } | |
| y = w[x] = new Function("c","a","return new c(" + u.join(",") + ")") | |
| } | |
| return y | |
| }, | |
| postprocessors: {}, | |
| defaultPostprocessors: [], | |
| registerPostprocessor: function(v, y, w, u, x) { | |
| if (!u) { | |
| u = "last" | |
| } | |
| if (!w) { | |
| w = [v] | |
| } | |
| this.postprocessors[v] = { | |
| name: v, | |
| properties: w || false, | |
| fn: y | |
| }; | |
| this.setDefaultPostprocessorPosition(v, u, x); | |
| return this | |
| }, | |
| setDefaultPostprocessors: function(u) { | |
| this.defaultPostprocessors = e(u); | |
| return this | |
| }, | |
| setDefaultPostprocessorPosition: function(v, y, x) { | |
| var w = this.defaultPostprocessors, u; | |
| if (typeof y === "string") { | |
| if (y === "first") { | |
| w.unshift(v); | |
| return this | |
| } else { | |
| if (y === "last") { | |
| w.push(v); | |
| return this | |
| } | |
| } | |
| y = (y === "after") ? 1 : -1 | |
| } | |
| u = Ext.Array.indexOf(w, x); | |
| if (u !== -1) { | |
| Ext.Array.splice(w, Math.max(0, u + y), 0, v) | |
| } | |
| return this | |
| } | |
| }); | |
| c.registerPostprocessor("alias", function(w, v, z) { | |
| var u = Ext.Array.from(z.alias), x, y; | |
| for (x = 0, | |
| y = u.length; x < y; x++) { | |
| l = u[x]; | |
| this.addAlias(v, l) | |
| } | |
| }, ["xtype", "alias"]); | |
| c.registerPostprocessor("singleton", function(v, u, x, w) { | |
| if (x.singleton) { | |
| w.call(this, v, new u(), x) | |
| } else { | |
| return true | |
| } | |
| return false | |
| }); | |
| c.registerPostprocessor("alternateClassName", function(v, u, z) { | |
| var x = z.alternateClassName, w, y, A; | |
| if (!(x instanceof Array)) { | |
| x = [x] | |
| } | |
| for (w = 0, | |
| y = x.length; w < y; w++) { | |
| A = x[w]; | |
| this.set(A, u) | |
| } | |
| }); | |
| c.registerPostprocessor("debugHooks", function(v, u, w) { | |
| var x = u.isInstance ? u.self : u; | |
| delete x.prototype.debugHooks | |
| }); | |
| c.registerPostprocessor("deprecated", function(v, u, w) { | |
| var x = u.isInstance ? u.self : u; | |
| x.addDeprecations(w.deprecated); | |
| delete x.prototype.deprecated | |
| }); | |
| Ext.apply(Ext, { | |
| create: function() { | |
| var w = arguments[0], x = typeof w, v = s.call(arguments, 1), u; | |
| if (x === "function") { | |
| u = w | |
| } else { | |
| if (x !== "string" && v.length === 0) { | |
| v = [w]; | |
| if (!(w = w.xclass)) { | |
| w = v[0].xtype; | |
| if (w) { | |
| w = "widget." + w | |
| } | |
| } | |
| } | |
| w = c.resolveName(w); | |
| u = c.get(w) | |
| } | |
| if (!u) { | |
| Ext.syncRequire(w); | |
| u = c.get(w) | |
| } | |
| return c.getInstantiator(v.length)(u, v) | |
| }, | |
| widget: function(w, v) { | |
| var z = w, x, y, u; | |
| if (typeof z !== "string") { | |
| v = w; | |
| z = v.xtype; | |
| y = v.xclass | |
| } else { | |
| v = v || {} | |
| } | |
| if (v.isComponent) { | |
| return v | |
| } | |
| if (!y) { | |
| x = "widget." + z; | |
| y = c.getNameByAlias(x) | |
| } | |
| if (y) { | |
| u = c.get(y) | |
| } | |
| if (!u) { | |
| return Ext.create(y || x, v) | |
| } | |
| return new u(v) | |
| }, | |
| createByAlias: l(c, "instantiateByAlias"), | |
| define: function(v, w, u) { | |
| if (w.override) { | |
| c.classState[v] = 20; | |
| return c.createOverride.apply(c, arguments) | |
| } | |
| c.classState[v] = 10; | |
| return c.create.apply(c, arguments) | |
| }, | |
| undefine: function(w) { | |
| var u = c.classes; | |
| delete u[w]; | |
| delete c.existCache[w]; | |
| delete c.classState[w]; | |
| c.removeName(w); | |
| var x = c.getNamespaceEntry(w) | |
| , v = x.parent ? c.lookupName(x.parent, false) : Ext.global; | |
| if (v) { | |
| try { | |
| delete v[x.name] | |
| } catch (y) { | |
| v[x.name] = undefined | |
| } | |
| } | |
| }, | |
| getClassName: l(c, "getName"), | |
| getDisplayName: function(u) { | |
| if (u) { | |
| if (u.displayName) { | |
| return u.displayName | |
| } | |
| if (u.$name && u.$class) { | |
| return Ext.getClassName(u.$class) + "#" + u.$name | |
| } | |
| if (u.$className) { | |
| return u.$className | |
| } | |
| } | |
| return "Anonymous" | |
| }, | |
| getClass: l(c, "getClass"), | |
| namespace: function() { | |
| var u = o, v; | |
| for (v = arguments.length; v-- > 0; ) { | |
| u = c.lookupName(arguments[v], true) | |
| } | |
| return u | |
| } | |
| }); | |
| Ext.addRootNamespaces = c.addRootNamespaces; | |
| Ext.createWidget = Ext.widget; | |
| Ext.ns = Ext.namespace; | |
| q.registerPreprocessor("className", function(u, v) { | |
| if ("$className"in v) { | |
| u.$className = v.$className | |
| } | |
| }, true, "first"); | |
| q.registerPreprocessor("alias", function(F, z) { | |
| var D = F.prototype, w = e(z.xtype), u = e(z.alias), G = "widget.", E = G.length, A = Array.prototype.slice.call(D.xtypesChain || []), x = Ext.merge({}, D.xtypesMap || {}), y, C, B, v; | |
| for (y = 0, | |
| C = u.length; y < C; y++) { | |
| B = u[y]; | |
| if (B.substring(0, E) === G) { | |
| v = B.substring(E); | |
| Ext.Array.include(w, v) | |
| } | |
| } | |
| F.xtype = z.xtype = w[0]; | |
| z.xtypes = w; | |
| for (y = 0, | |
| C = w.length; y < C; y++) { | |
| v = w[y]; | |
| if (!x[v]) { | |
| x[v] = true; | |
| A.push(v) | |
| } | |
| } | |
| z.xtypesChain = A; | |
| z.xtypesMap = x; | |
| Ext.Function.interceptAfter(z, "onClassCreated", function() { | |
| var H = D.mixins, J, I; | |
| for (J in H) { | |
| if (H.hasOwnProperty(J)) { | |
| I = H[J]; | |
| w = I.xtypes; | |
| if (w) { | |
| for (y = 0, | |
| C = w.length; y < C; y++) { | |
| v = w[y]; | |
| if (!x[v]) { | |
| x[v] = true; | |
| A.push(v) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| for (y = 0, | |
| C = w.length; y < C; y++) { | |
| v = w[y]; | |
| Ext.Array.include(u, G + v) | |
| } | |
| z.alias = u | |
| }, ["xtype", "alias"]); | |
| if (Ext.manifest) { | |
| var g = Ext.manifest, r = g.classes, n = g.paths, p = {}, j = {}, d, k, t, m, a; | |
| if (n) { | |
| if (g.bootRelative) { | |
| a = Ext.Boot.baseUrl; | |
| for (m in n) { | |
| if (n.hasOwnProperty(m)) { | |
| n[m] = a + n[m] | |
| } | |
| } | |
| } | |
| c.setPath(n) | |
| } | |
| if (r) { | |
| for (d in r) { | |
| j[d] = []; | |
| p[d] = []; | |
| k = r[d]; | |
| if (k.alias) { | |
| p[d] = k.alias | |
| } | |
| if (k.alternates) { | |
| j[d] = k.alternates | |
| } | |
| } | |
| } | |
| c.addAlias(p); | |
| c.addAlternate(j) | |
| } | |
| return c | |
| }(Ext.Class, Ext.Function.alias, Array.prototype.slice, Ext.Array.from, Ext.global)); | |
| (Ext.env || (Ext.env = {})).Browser = function(u, o) { | |
| var v = this, a = Ext.Boot.browserPrefixes, c = Ext.Boot.browserNames, b = v.enginePrefixes, k = v.engineNames, r = u.match(new RegExp("((?:" + Ext.Object.getValues(a).join(")|(?:") + "))([\\w\\._]+)")), h = u.match(new RegExp("((?:" + Ext.Object.getValues(b).join(")|(?:") + "))([\\w\\._]+)")), q = c.other, t = k.other, m = "", g = "", d = "", j = false, p, n, l, w, s; | |
| v.userAgent = u; | |
| if (/Edge\//.test(u)) { | |
| r = u.match(/(Edge\/)([\w.]+)/) | |
| } | |
| if (r) { | |
| q = c[Ext.Object.getKey(a, r[1])]; | |
| if (q === "Safari" && /^Opera/.test(u)) { | |
| q = "Opera" | |
| } | |
| m = new Ext.Version(r[2]) | |
| } | |
| if (h) { | |
| t = k[Ext.Object.getKey(b, h[1])]; | |
| g = new Ext.Version(h[2]) | |
| } | |
| if (t === "Trident" && q !== "IE") { | |
| q = "IE"; | |
| var e = u.match(/.*rv:(\d+.\d+)/); | |
| if (e && e.length) { | |
| e = e[1]; | |
| m = new Ext.Version(e) | |
| } | |
| } | |
| if (q && m) { | |
| Ext.setVersion(q, m) | |
| } | |
| if (u.match(/FB/) && q === "Other") { | |
| q = c.safari; | |
| t = k.webkit | |
| } | |
| if (u.match(/Android.*Chrome/g)) { | |
| q = "ChromeMobile" | |
| } | |
| if (u.match(/OPR/)) { | |
| q = "Opera"; | |
| r = u.match(/OPR\/(\d+.\d+)/); | |
| m = new Ext.Version(r[1]) | |
| } | |
| Ext.apply(this, { | |
| engineName: t, | |
| engineVersion: g, | |
| name: q, | |
| version: m | |
| }); | |
| this.setFlag(q, true, o); | |
| if (m) { | |
| d = m.getMajor() || ""; | |
| if (v.is.IE) { | |
| d = parseInt(d, 10); | |
| l = document.documentMode; | |
| if (l === 7 || (d === 7 && l !== 8 && l !== 9 && l !== 10)) { | |
| d = 7 | |
| } else { | |
| if (l === 8 || (d === 8 && l !== 8 && l !== 9 && l !== 10)) { | |
| d = 8 | |
| } else { | |
| if (l === 9 || (d === 9 && l !== 7 && l !== 8 && l !== 10)) { | |
| d = 9 | |
| } else { | |
| if (l === 10 || (d === 10 && l !== 7 && l !== 8 && l !== 9)) { | |
| d = 10 | |
| } else { | |
| if (l === 11 || (d === 11 && l !== 7 && l !== 8 && l !== 9 && l !== 10)) { | |
| d = 11 | |
| } | |
| } | |
| } | |
| } | |
| } | |
| s = Math.max(d, Ext.Boot.maxIEVersion); | |
| for (p = 7; p <= s; ++p) { | |
| n = "isIE" + p; | |
| if (d <= p) { | |
| Ext[n + "m"] = true | |
| } | |
| if (d === p) { | |
| Ext[n] = true | |
| } | |
| if (d >= p) { | |
| Ext[n + "p"] = true | |
| } | |
| } | |
| } | |
| if (v.is.Opera && parseInt(d, 10) <= 12) { | |
| Ext.isOpera12m = true | |
| } | |
| Ext.chromeVersion = Ext.isChrome ? d : 0; | |
| Ext.firefoxVersion = Ext.isFirefox ? d : 0; | |
| Ext.ieVersion = Ext.isIE ? d : 0; | |
| Ext.operaVersion = Ext.isOpera ? d : 0; | |
| Ext.safariVersion = Ext.isSafari ? d : 0; | |
| Ext.webKitVersion = Ext.isWebKit ? d : 0; | |
| this.setFlag(q + d, true, o); | |
| this.setFlag(q + m.getShortVersion()) | |
| } | |
| for (p in c) { | |
| if (c.hasOwnProperty(p)) { | |
| w = c[p]; | |
| this.setFlag(w, q === w) | |
| } | |
| } | |
| this.setFlag(w); | |
| if (g) { | |
| this.setFlag(t + (g.getMajor() || "")); | |
| this.setFlag(t + g.getShortVersion()) | |
| } | |
| for (p in k) { | |
| if (k.hasOwnProperty(p)) { | |
| w = k[p]; | |
| this.setFlag(w, t === w, o) | |
| } | |
| } | |
| this.setFlag("Standalone", !!navigator.standalone); | |
| this.setFlag("Ripple", !!document.getElementById("tinyhippos-injected") && !Ext.isEmpty(window.top.ripple)); | |
| this.setFlag("WebWorks", !!window.blackberry); | |
| if (window.PhoneGap !== undefined || window.Cordova !== undefined || window.cordova !== undefined) { | |
| j = true; | |
| this.setFlag("PhoneGap"); | |
| this.setFlag("Cordova") | |
| } | |
| if (/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)(?!.*FBAN)/i.test(u)) { | |
| j = true | |
| } | |
| this.setFlag("WebView", j); | |
| this.isStrict = Ext.isStrict = document.compatMode === "CSS1Compat"; | |
| this.isSecure = Ext.isSecure; | |
| this.identity = q + d + (this.isStrict ? "Strict" : "Quirks") | |
| } | |
| ; | |
| Ext.env.Browser.prototype = { | |
| constructor: Ext.env.Browser, | |
| engineNames: { | |
| webkit: "WebKit", | |
| gecko: "Gecko", | |
| presto: "Presto", | |
| trident: "Trident", | |
| other: "Other" | |
| }, | |
| enginePrefixes: { | |
| webkit: "AppleWebKit/", | |
| gecko: "Gecko/", | |
| presto: "Presto/", | |
| trident: "Trident/" | |
| }, | |
| styleDashPrefixes: { | |
| WebKit: "-webkit-", | |
| Gecko: "-moz-", | |
| Trident: "-ms-", | |
| Presto: "-o-", | |
| Other: "" | |
| }, | |
| stylePrefixes: { | |
| WebKit: "Webkit", | |
| Gecko: "Moz", | |
| Trident: "ms", | |
| Presto: "O", | |
| Other: "" | |
| }, | |
| propertyPrefixes: { | |
| WebKit: "webkit", | |
| Gecko: "moz", | |
| Trident: "ms", | |
| Presto: "o", | |
| Other: "" | |
| }, | |
| is: function(a) { | |
| return !!this.is[a] | |
| }, | |
| name: null , | |
| version: null , | |
| engineName: null , | |
| engineVersion: null , | |
| setFlag: function(a, c, b) { | |
| if (c === undefined) { | |
| c = true | |
| } | |
| this.is[a] = c; | |
| this.is[a.toLowerCase()] = c; | |
| if (b) { | |
| Ext["is" + a] = c | |
| } | |
| return this | |
| }, | |
| getStyleDashPrefix: function() { | |
| return this.styleDashPrefixes[this.engineName] | |
| }, | |
| getStylePrefix: function() { | |
| return this.stylePrefixes[this.engineName] | |
| }, | |
| getVendorProperyName: function(a) { | |
| var b = this.propertyPrefixes[this.engineName]; | |
| if (b.length > 0) { | |
| 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 { | |
| return "csstransform" | |
| } | |
| } | |
| }; | |
| (function(a) { | |
| Ext.browser = new Ext.env.Browser(a,true); | |
| Ext.userAgent = a.toLowerCase(); | |
| Ext.SSL_SECURE_URL = Ext.isSecure && Ext.isIE ? "javascript:''" : "about:blank" | |
| }(Ext.global.navigator.userAgent)); | |
| Ext.env.OS = function(p, b, m) { | |
| var l = this, k = Ext.Boot.osNames, d = Ext.Boot.osPrefixes, a, j = "", g = l.is, c, h, e, o, n; | |
| m = m || Ext.browser; | |
| for (c in d) { | |
| if (d.hasOwnProperty(c)) { | |
| h = d[c]; | |
| e = p.match(new RegExp("(?:" + h + ")([^\\s;]+)")); | |
| if (e) { | |
| a = k[c]; | |
| n = e[1]; | |
| if (n && n === "HTC_") { | |
| j = new Ext.Version("2.3") | |
| } else { | |
| if (n && n === "Silk/") { | |
| j = new Ext.Version("2.3") | |
| } else { | |
| j = new Ext.Version(e[e.length - 1]) | |
| } | |
| } | |
| break | |
| } | |
| } | |
| } | |
| if (!a) { | |
| a = k[(p.toLowerCase().match(/mac|win|linux/) || ["other"])[0]]; | |
| j = new Ext.Version("") | |
| } | |
| this.name = a; | |
| this.version = j; | |
| if (b) { | |
| this.setFlag(b.replace(/ simulator$/i, "")) | |
| } | |
| this.setFlag(a); | |
| if (j) { | |
| this.setFlag(a + (j.getMajor() || "")); | |
| this.setFlag(a + j.getShortVersion()) | |
| } | |
| for (c in k) { | |
| if (k.hasOwnProperty(c)) { | |
| o = k[c]; | |
| if (!g.hasOwnProperty(a)) { | |
| this.setFlag(o, (a === o)) | |
| } | |
| } | |
| } | |
| if (this.name === "iOS" && window.screen.height === 568) { | |
| this.setFlag("iPhone5") | |
| } | |
| if (m.is.Safari || m.is.Silk) { | |
| if (this.is.Android2 || this.is.Android3 || m.version.shortVersion === 501) { | |
| m.setFlag("AndroidStock") | |
| } | |
| if (this.is.Android4) { | |
| m.setFlag("AndroidStock"); | |
| m.setFlag("AndroidStock4") | |
| } | |
| } | |
| } | |
| ; | |
| Ext.env.OS.prototype = { | |
| constructor: Ext.env.OS, | |
| is: function(a) { | |
| return !!this[a] | |
| }, | |
| name: null , | |
| version: null , | |
| setFlag: function(a, b) { | |
| if (b === undefined) { | |
| b = true | |
| } | |
| if (this.flags) { | |
| this.flags[a] = b | |
| } | |
| this.is[a] = b; | |
| this.is[a.toLowerCase()] = b; | |
| return this | |
| } | |
| }; | |
| (function() { | |
| var a = Ext.global.navigator, h = a.userAgent, g = Ext.env.OS, e = (Ext.is || (Ext.is = {})), i, d, b; | |
| g.prototype.flags = e; | |
| Ext.os = i = new g(h,a.platform); | |
| d = i.name; | |
| Ext["is" + d] = true; | |
| Ext.isMac = e.Mac = e.MacOS; | |
| var j = window.location.search.match(/deviceType=(Tablet|Phone)/) | |
| , c = window.deviceType; | |
| if (j && j[1]) { | |
| b = j[1] | |
| } else { | |
| if (c === "iPhone") { | |
| b = "Phone" | |
| } else { | |
| if (c === "iPad") { | |
| b = "Tablet" | |
| } else { | |
| if (!i.is.Android && !i.is.iOS && !i.is.WindowsPhone && /Windows|Linux|MacOS/.test(d)) { | |
| b = "Desktop"; | |
| Ext.browser.is.WebView = !!Ext.browser.is.Ripple | |
| } else { | |
| if (i.is.iPad || i.is.RIMTablet || i.is.Android3 || Ext.browser.is.Silk || (i.is.Android && h.search(/mobile/i) === -1)) { | |
| b = "Tablet" | |
| } else { | |
| b = "Phone" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| i.setFlag(b, true); | |
| i.deviceType = b; | |
| delete g.prototype.flags | |
| }()); | |
| Ext.feature = { | |
| has: function(a) { | |
| return !!this.has[a] | |
| }, | |
| testElements: {}, | |
| 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 | |
| }, | |
| getStyle: function(c, b) { | |
| var a = c.ownerDocument.defaultView | |
| , d = (a ? a.getComputedStyle(c, null ) : c.currentStyle); | |
| return (d || c.style)[b] | |
| }, | |
| 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 | |
| }, | |
| detect: function(j) { | |
| var k = this, m = document, g = k.toRun || k.tests, e = g.length, b = m.createElement("div"), c = [], p = Ext.supports, o = k.has, a, i, h, d, l; | |
| b.innerHTML = '<div style="height:30px;width:50px;"><div style="height:20px;width:20px;"></div></div><div style="width: 200px; height: 200px; position: relative; padding: 5px;"><div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div></div><div style="position: absolute; left: 10%; top: 10%;"></div><div style="float:left; background-color:transparent;"></div>'; | |
| if (j) { | |
| m.body.appendChild(b) | |
| } | |
| d = k.preDetected[Ext.browser.identity] || []; | |
| while (e--) { | |
| h = g[e]; | |
| l = d[e]; | |
| a = h.name; | |
| i = h.names; | |
| if (l === undefined) { | |
| if (!j && h.ready) { | |
| c.push(h); | |
| continue | |
| } | |
| l = h.fn.call(k, m, b) | |
| } | |
| if (a) { | |
| p[a] = o[a] = l | |
| } else { | |
| if (i) { | |
| while (i.length) { | |
| a = i.pop(); | |
| p[a] = o[a] = l | |
| } | |
| } | |
| } | |
| } | |
| if (j) { | |
| m.body.removeChild(b) | |
| } | |
| k.toRun = c | |
| }, | |
| report: function() { | |
| var b = [], a = this.tests.length, c; | |
| for (c = 0; c < a; ++c) { | |
| b.push(this.has[this.tests[c].name] ? 1 : 0) | |
| } | |
| Ext.log(Ext.browser.identity + ": [" + b.join(",") + "]") | |
| }, | |
| preDetected: {}, | |
| tests: [{ | |
| name: "CloneNodeCopiesExpando", | |
| fn: function() { | |
| var a = document.createElement("div"); | |
| a.expandoProp = {}; | |
| return a.cloneNode().expandoProp === a.expandoProp | |
| } | |
| }, { | |
| name: "CSSPointerEvents", | |
| fn: function(a) { | |
| return "pointerEvents"in a.documentElement.style | |
| } | |
| }, { | |
| name: "CSS3BoxShadow", | |
| fn: function(a) { | |
| return "boxShadow"in a.documentElement.style || "WebkitBoxShadow"in a.documentElement.style || "MozBoxShadow"in a.documentElement.style | |
| } | |
| }, { | |
| name: "CSS3NegationSelector", | |
| fn: function(b) { | |
| try { | |
| b.querySelectorAll("foo:not(bar)") | |
| } catch (a) { | |
| return false | |
| } | |
| return true | |
| } | |
| }, { | |
| name: "ClassList", | |
| fn: function(a) { | |
| return !!a.documentElement.classList | |
| } | |
| }, { | |
| name: "Canvas", | |
| fn: function() { | |
| var a = this.getTestElement("canvas"); | |
| return !!(a && a.getContext && a.getContext("2d")) | |
| } | |
| }, { | |
| name: "Svg", | |
| fn: function(a) { | |
| return !!(a.createElementNS && !!a.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect) | |
| } | |
| }, { | |
| name: "Vml", | |
| fn: function() { | |
| var b = this.getTestElement() | |
| , a = false; | |
| b.innerHTML = "<!--[if vml]><br><![endif]-->"; | |
| a = (b.childNodes.length === 1); | |
| b.innerHTML = ""; | |
| return a | |
| } | |
| }, { | |
| name: "touchScroll", | |
| fn: function() { | |
| var a = 0; | |
| if (Ext.os.is.Desktop && (navigator.maxTouchPoints || navigator.msMaxTouchPoints)) { | |
| a = 1 | |
| } else { | |
| if (Ext.supports.Touch) { | |
| a = 2 | |
| } | |
| } | |
| return a | |
| } | |
| }, { | |
| name: "Touch", | |
| fn: function() { | |
| var a = navigator.msMaxTouchPoints || navigator.maxTouchPoints; | |
| if (Ext.browser.is.Chrome && Ext.browser.version.isLessThanOrEqual(39)) { | |
| return (Ext.supports.TouchEvents && a !== 1) || a > 1 | |
| } else { | |
| return Ext.supports.TouchEvents || a > 0 | |
| } | |
| } | |
| }, { | |
| name: "TouchEvents", | |
| fn: function() { | |
| return this.isEventSupported("touchend") | |
| } | |
| }, { | |
| name: "PointerEvents", | |
| fn: function() { | |
| return navigator.pointerEnabled | |
| } | |
| }, { | |
| name: "MSPointerEvents", | |
| fn: function() { | |
| return navigator.msPointerEnabled | |
| } | |
| }, { | |
| name: "Orientation", | |
| fn: function() { | |
| return ("orientation"in window) && this.isEventSupported("orientationchange") | |
| } | |
| }, { | |
| name: "OrientationChange", | |
| fn: function() { | |
| return this.isEventSupported("orientationchange") | |
| } | |
| }, { | |
| name: "DeviceMotion", | |
| fn: function() { | |
| return this.isEventSupported("devicemotion") | |
| } | |
| }, { | |
| names: ["Geolocation", "GeoLocation"], | |
| fn: function() { | |
| return "geolocation"in window.navigator | |
| } | |
| }, { | |
| name: "SqlDatabase", | |
| fn: function() { | |
| return "openDatabase"in window | |
| } | |
| }, { | |
| name: "WebSockets", | |
| fn: function() { | |
| return "WebSocket"in window | |
| } | |
| }, { | |
| name: "Range", | |
| fn: function() { | |
| return !!document.createRange | |
| } | |
| }, { | |
| name: "CreateContextualFragment", | |
| fn: function() { | |
| var a = !!document.createRange ? document.createRange() : false; | |
| return a && !!a.createContextualFragment | |
| } | |
| }, { | |
| name: "History", | |
| fn: function() { | |
| return ( "history"in window && "pushState"in window.history) | |
| } | |
| }, { | |
| name: "Css3dTransforms", | |
| fn: function() { | |
| return this.has("CssTransforms") && this.isStyleSupported("perspective") | |
| } | |
| }, { | |
| name: "CssTransforms", | |
| fn: function() { | |
| return this.isStyleSupported("transform") | |
| } | |
| }, { | |
| name: "CssTransformNoPrefix", | |
| fn: function() { | |
| return this.isStyleSupportedWithoutPrefix("transform") | |
| } | |
| }, { | |
| name: "CssAnimations", | |
| fn: function() { | |
| return this.isStyleSupported("animationName") | |
| } | |
| }, { | |
| names: ["CssTransitions", "Transitions"], | |
| fn: function() { | |
| return this.isStyleSupported("transitionProperty") | |
| } | |
| }, { | |
| names: ["Audio", "AudioTag"], | |
| fn: function() { | |
| return !!this.getTestElement("audio").canPlayType | |
| } | |
| }, { | |
| name: "Video", | |
| fn: function() { | |
| return !!this.getTestElement("video").canPlayType | |
| } | |
| }, { | |
| name: "LocalStorage", | |
| fn: function() { | |
| try { | |
| if ("localStorage"in window && window.localStorage !== null ) { | |
| localStorage.setItem("sencha-localstorage-test", "test success"); | |
| localStorage.removeItem("sencha-localstorage-test"); | |
| return true | |
| } | |
| } catch (a) {} | |
| return false | |
| } | |
| }, { | |
| name: "XHR2", | |
| fn: function() { | |
| return window.ProgressEvent && window.FormData && window.XMLHttpRequest && ("withCredentials"in new XMLHttpRequest()) | |
| } | |
| }, { | |
| name: "XHRUploadProgress", | |
| fn: function() { | |
| if (window.XMLHttpRequest && !Ext.browser.is.AndroidStock) { | |
| var a = new XMLHttpRequest(); | |
| return a && ("upload"in a) && ("onprogress"in a.upload) | |
| } | |
| return false | |
| } | |
| }, { | |
| name: "NumericInputPlaceHolder", | |
| fn: function() { | |
| return !(Ext.browser.is.AndroidStock4 && Ext.os.version.getMinor() < 2) | |
| } | |
| }, { | |
| name: "matchesSelector", | |
| fn: function() { | |
| var b = document.documentElement | |
| , e = "matches" | |
| , d = "webkitMatchesSelector" | |
| , a = "msMatchesSelector" | |
| , c = "mozMatchesSelector"; | |
| return b[e] ? e : b[d] ? d : b[a] ? a : b[c] ? c : null | |
| } | |
| }, { | |
| name: "RightMargin", | |
| ready: true, | |
| fn: function(b, c) { | |
| var a = b.defaultView; | |
| return !(a && a.getComputedStyle(c.firstChild.firstChild, null ).marginRight !== "0px") | |
| } | |
| }, { | |
| name: "DisplayChangeInputSelectionBug", | |
| fn: function() { | |
| var a = Ext.webKitVersion; | |
| return 0 < a && a < 533 | |
| } | |
| }, { | |
| name: "DisplayChangeTextAreaSelectionBug", | |
| fn: function() { | |
| var a = Ext.webKitVersion; | |
| return 0 < a && a < 534.24 | |
| } | |
| }, { | |
| name: "TransparentColor", | |
| ready: true, | |
| fn: function(b, c, a) { | |
| a = b.defaultView; | |
| return !(a && a.getComputedStyle(c.lastChild, null ).backgroundColor !== "transparent") | |
| } | |
| }, { | |
| name: "ComputedStyle", | |
| ready: true, | |
| fn: function(b, c, a) { | |
| a = b.defaultView; | |
| return a && a.getComputedStyle | |
| } | |
| }, { | |
| name: "Float", | |
| fn: function(a) { | |
| return "cssFloat"in a.documentElement.style | |
| } | |
| }, { | |
| name: "CSS3BorderRadius", | |
| ready: true, | |
| fn: function(d) { | |
| var b = ["borderRadius", "BorderRadius", "MozBorderRadius", "WebkitBorderRadius", "OBorderRadius", "KhtmlBorderRadius"], c = false, a; | |
| for (a = 0; a < b.length; a++) { | |
| if (d.documentElement.style[b[a]] !== undefined) { | |
| c = true | |
| } | |
| } | |
| return c && !Ext.isIE9 | |
| } | |
| }, { | |
| name: "CSS3LinearGradient", | |
| fn: function(g, a) { | |
| var i = "background-image:" | |
| , h = "-webkit-gradient(linear, left top, right bottom, from(black), to(white))" | |
| , e = "linear-gradient(left top, black, white)" | |
| , d = "-moz-" + e | |
| , b = "-ms-" + e | |
| , c = "-o-" + e | |
| , j = [i + h, i + e, i + d, i + b, i + c]; | |
| a.style.cssText = j.join(";"); | |
| return (("" + a.style.backgroundImage).indexOf("gradient") !== -1) && !Ext.isIE9 | |
| } | |
| }, { | |
| name: "MouseEnterLeave", | |
| fn: function(a) { | |
| return ( "onmouseenter"in a.documentElement && "onmouseleave"in a.documentElement) | |
| } | |
| }, { | |
| name: "MouseWheel", | |
| fn: function(a) { | |
| return ( "onmousewheel"in a.documentElement) | |
| } | |
| }, { | |
| name: "Opacity", | |
| fn: function(a, b) { | |
| if (Ext.isIE8) { | |
| return false | |
| } | |
| b.firstChild.style.cssText = "opacity:0.73"; | |
| return b.firstChild.style.opacity == "0.73" | |
| } | |
| }, { | |
| name: "Placeholder", | |
| fn: function(a) { | |
| return "placeholder"in a.createElement("input") | |
| } | |
| }, { | |
| name: "Direct2DBug", | |
| fn: function(a) { | |
| return Ext.isString(a.documentElement.style.msTransformOrigin) && Ext.isIE9m | |
| } | |
| }, { | |
| name: "BoundingClientRect", | |
| fn: function(a) { | |
| return "getBoundingClientRect"in a.documentElement | |
| } | |
| }, { | |
| name: "RotatedBoundingClientRect", | |
| ready: true, | |
| fn: function(e) { | |
| var a = e.body | |
| , b = false | |
| , d = e.createElement("div") | |
| , c = d.style; | |
| if (d.getBoundingClientRect) { | |
| c.position = "absolute"; | |
| c.top = "0"; | |
| c.WebkitTransform = c.MozTransform = c.msTransform = c.OTransform = c.transform = "rotate(90deg)"; | |
| c.width = "100px"; | |
| c.height = "30px"; | |
| a.appendChild(d); | |
| b = d.getBoundingClientRect().height !== 100; | |
| a.removeChild(d) | |
| } | |
| return b | |
| } | |
| }, { | |
| name: "ChildContentClearedWhenSettingInnerHTML", | |
| ready: true, | |
| fn: function() { | |
| var a = this.getTestElement(), b; | |
| a.innerHTML = "<div>a</div>"; | |
| b = a.firstChild; | |
| a.innerHTML = "<div>b</div>"; | |
| return b.innerHTML !== "a" | |
| } | |
| }, { | |
| name: "IncludePaddingInWidthCalculation", | |
| ready: true, | |
| fn: function(a, b) { | |
| return b.childNodes[1].firstChild.offsetWidth === 210 | |
| } | |
| }, { | |
| name: "IncludePaddingInHeightCalculation", | |
| ready: true, | |
| fn: function(a, b) { | |
| return b.childNodes[1].firstChild.offsetHeight === 210 | |
| } | |
| }, { | |
| name: "TextAreaMaxLength", | |
| fn: function(a) { | |
| return ( "maxlength"in a.createElement("textarea")) | |
| } | |
| }, { | |
| name: "GetPositionPercentage", | |
| ready: true, | |
| fn: function(a, b) { | |
| return Ext.feature.getStyle(b.childNodes[2], "left") === "10%" | |
| } | |
| }, { | |
| name: "PercentageHeightOverflowBug", | |
| ready: true, | |
| fn: function(d) { | |
| var a = false, c, b; | |
| if (Ext.getScrollbarSize().height) { | |
| b = this.getTestElement(); | |
| c = b.style; | |
| c.height = "50px"; | |
| c.width = "50px"; | |
| c.overflow = "auto"; | |
| c.position = "absolute"; | |
| b.innerHTML = ['<div style="display:table;height:100%;">', '<div style="width:51px;"></div>', "</div>"].join(""); | |
| d.body.appendChild(b); | |
| if (b.firstChild.offsetHeight === 50) { | |
| a = true | |
| } | |
| d.body.removeChild(b) | |
| } | |
| return a | |
| } | |
| }, { | |
| name: "xOriginBug", | |
| ready: true, | |
| fn: function(d, e) { | |
| e.innerHTML = '<div id="b1" style="height:100px;width:100px;direction:rtl;position:relative;overflow:scroll"><div id="b2" style="position:relative;width:100%;height:20px;"></div><div id="b3" style="position:absolute;width:20px;height:20px;top:0px;right:0px"></div></div>'; | |
| var c = document.getElementById("b1").getBoundingClientRect() | |
| , b = document.getElementById("b2").getBoundingClientRect() | |
| , a = document.getElementById("b3").getBoundingClientRect(); | |
| return ( b.left !== c.left && a.right !== c.right) | |
| } | |
| }, { | |
| name: "ScrollWidthInlinePaddingBug", | |
| ready: true, | |
| fn: function(d) { | |
| var a = false, c, b; | |
| b = d.createElement("div"); | |
| c = b.style; | |
| c.height = "50px"; | |
| c.width = "50px"; | |
| c.padding = "10px"; | |
| c.overflow = "hidden"; | |
| c.position = "absolute"; | |
| b.innerHTML = '<span style="display:inline-block;zoom:1;height:60px;width:60px;"></span>'; | |
| d.body.appendChild(b); | |
| if (b.scrollWidth === 70) { | |
| a = true | |
| } | |
| d.body.removeChild(b); | |
| return a | |
| } | |
| }, { | |
| name: "rtlVertScrollbarOnRight", | |
| ready: true, | |
| fn: function(c, d) { | |
| d.innerHTML = '<div style="height:100px;width:100px;direction:rtl;overflow:scroll"><div style="width:20px;height:200px;"></div></div>'; | |
| var b = d.firstChild | |
| , a = b.firstChild; | |
| return ( a.offsetLeft + a.offsetWidth !== b.offsetLeft + b.offsetWidth) | |
| } | |
| }, { | |
| name: "rtlVertScrollbarOverflowBug", | |
| ready: true, | |
| fn: function(b, c) { | |
| c.innerHTML = '<div style="height:100px;width:100px;direction:rtl;overflow:auto"><div style="width:95px;height:200px;"></div></div>'; | |
| var a = c.firstChild; | |
| return a.clientHeight === a.offsetHeight | |
| } | |
| }, { | |
| identity: "defineProperty", | |
| fn: function() { | |
| if (Ext.isIE8m) { | |
| Ext.Object.defineProperty = Ext.emptyFn; | |
| return false | |
| } | |
| return true | |
| } | |
| }, { | |
| identify: "nativeXhr", | |
| fn: function() { | |
| if (typeof XMLHttpRequest !== "undefined") { | |
| return true | |
| } | |
| XMLHttpRequest = function() { | |
| try { | |
| return new ActiveXObject("MSXML2.XMLHTTP.3.0") | |
| } catch (a) { | |
| return null | |
| } | |
| } | |
| ; | |
| return false | |
| } | |
| }, { | |
| name: "SpecialKeyDownRepeat", | |
| fn: function() { | |
| return Ext.isWebKit ? parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1], 10) >= 525 : !((Ext.isGecko && !Ext.isWindows) || (Ext.isOpera && Ext.operaVersion < 12)) | |
| } | |
| }, { | |
| name: "EmulatedMouseOver", | |
| fn: function() { | |
| return Ext.os.is.iOS | |
| } | |
| }, { | |
| name: "Hashchange", | |
| fn: function() { | |
| var a = document.documentMode; | |
| return "onhashchange"in window && (a === undefined || a > 7) | |
| } | |
| }, { | |
| name: "FixedTableWidthBug", | |
| ready: true, | |
| fn: function() { | |
| if (Ext.isIE8) { | |
| return false | |
| } | |
| var b = document.createElement("div"), a = document.createElement("div"), c; | |
| b.setAttribute("style", "display:table;table-layout:fixed;"); | |
| a.setAttribute("style", "display:table-cell;min-width:50px;"); | |
| b.appendChild(a); | |
| document.body.appendChild(b); | |
| b.offsetWidth; | |
| b.style.width = "25px"; | |
| c = b.offsetWidth; | |
| document.body.removeChild(b); | |
| return c === 50 | |
| } | |
| }, { | |
| name: "FocusinFocusoutEvents", | |
| fn: function() { | |
| return !Ext.isGecko | |
| } | |
| }, { | |
| name: "AsyncFocusEvents", | |
| fn: function() { | |
| return Ext.asyncFocus = !!Ext.isIE | |
| } | |
| }, { | |
| name: "accessibility", | |
| ready: true, | |
| fn: function(h) { | |
| var a = h.body, i, d, e, b, c; | |
| function g(o) { | |
| var j = [], l = 0, n, k; | |
| if (o.indexOf("rgb(") !== -1) { | |
| j = o.replace("rgb(", "").replace(")", "").split(", ") | |
| } else { | |
| if (o.indexOf("#") !== -1) { | |
| n = o.length === 7 ? /^#(\S\S)(\S\S)(\S\S)$/ : /^#(\S)(\S)(\S)$/; | |
| k = o.match(n); | |
| if (k) { | |
| j = ["0x" + k[1], "0x" + k[2], "0x" + k[3]] | |
| } | |
| } | |
| } | |
| for (var m = 0; m < j.length; m++) { | |
| l += parseInt(j[m]) | |
| } | |
| return l | |
| } | |
| i = h.createElement("div"); | |
| d = h.createElement("img"); | |
| e = i.style; | |
| Ext.apply(e, { | |
| width: "2px", | |
| position: "absolute", | |
| clip: "rect(1px,1px,1px,1px)", | |
| borderWidth: "1px", | |
| borderStyle: "solid", | |
| borderTopTolor: "#f00", | |
| borderRightColor: "#ff0", | |
| backgroundColor: "#fff", | |
| backgroundImage: "url(" + Ext.BLANK_IMAGE_URL + ")" | |
| }); | |
| d.alt = ""; | |
| d.src = Ext.BLANK_IMAGE_URL; | |
| i.appendChild(d); | |
| a.appendChild(i); | |
| e = i.currentStyle || i.style; | |
| c = e.backgroundImage; | |
| b = { | |
| Images: d.offsetWidth === 1 && d.readyState !== "uninitialized", | |
| BackgroundImages: !(c !== null && (c === "none" || c === "url(invalid-url:)")), | |
| BorderColors: e.borderTopColor !== e.borderRightColor, | |
| LightOnDark: g(e.color) - g(e.backgroundColor) > 0 | |
| }; | |
| Ext.supports.HighContrastMode = !b.BackgroundImages; | |
| a.removeChild(i); | |
| i = d = null ; | |
| return b | |
| } | |
| }, 0] | |
| }; | |
| Ext.feature.tests.pop(); | |
| Ext.supports = {}; | |
| Ext.feature.detect(); | |
| Ext.env.Ready = { | |
| blocks: (location.search || "").indexOf("ext-pauseReadyFire") > 0 ? 1 : 0, | |
| bound: 0, | |
| delay: 1, | |
| firing: false, | |
| generation: 0, | |
| listeners: [], | |
| nextId: 0, | |
| sortGeneration: 0, | |
| state: 0, | |
| timer: null , | |
| bind: function() { | |
| var a = Ext.env.Ready | |
| , b = document; | |
| if (!a.bound) { | |
| if (b.readyState === "complete") { | |
| a.onReadyEvent({ | |
| type: b.readyState || "body" | |
| }) | |
| } else { | |
| a.bound = 1; | |
| if (Ext.browser.is.PhoneGap && !Ext.os.is.Desktop) { | |
| a.bound = 2; | |
| b.addEventListener("deviceready", a.onReadyEvent, false) | |
| } | |
| b.addEventListener("DOMContentLoaded", a.onReadyEvent, false); | |
| window.addEventListener("load", a.onReadyEvent, false) | |
| } | |
| } | |
| }, | |
| block: function() { | |
| ++this.blocks; | |
| Ext.isReady = false | |
| }, | |
| fireReady: function() { | |
| var a = Ext.env.Ready; | |
| if (!a.state) { | |
| Ext._readyTime = Ext.ticks(); | |
| Ext.isDomReady = true; | |
| a.state = 1; | |
| Ext.feature.detect(true); | |
| if (!a.delay) { | |
| a.handleReady() | |
| } else { | |
| if (navigator.standalone) { | |
| a.timer = Ext.defer(function() { | |
| a.timer = null ; | |
| a.handleReadySoon() | |
| }, 1) | |
| } else { | |
| a.handleReadySoon() | |
| } | |
| } | |
| } | |
| }, | |
| handleReady: function() { | |
| var a = this; | |
| if (a.state === 1) { | |
| a.state = 2; | |
| Ext._beforeReadyTime = Ext.ticks(); | |
| a.invokeAll(); | |
| Ext._afterReadyTime = Ext.ticks() | |
| } | |
| }, | |
| handleReadySoon: function(a) { | |
| var b = this; | |
| if (!b.timer) { | |
| b.timer = Ext.defer(function() { | |
| b.timer = null ; | |
| b.handleReady() | |
| }, a || b.delay) | |
| } | |
| }, | |
| invoke: function(b) { | |
| var a = b.delay; | |
| if (a) { | |
| Ext.defer(b.fn, a, b.scope) | |
| } else { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(b.fn, b.scope) | |
| } else { | |
| b.fn.call(b.scope) | |
| } | |
| } | |
| }, | |
| invokeAll: function() { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(this.doInvokeAll, this) | |
| } else { | |
| this.doInvokeAll() | |
| } | |
| }, | |
| doInvokeAll: function() { | |
| var b = this, a = b.listeners, c; | |
| if (!b.blocks) { | |
| Ext.isReady = true | |
| } | |
| b.firing = true; | |
| while (a.length) { | |
| if (b.sortGeneration !== b.generation) { | |
| b.sortGeneration = b.generation; | |
| a.sort(b.sortFn) | |
| } | |
| c = a.pop(); | |
| if (b.blocks && !c.dom) { | |
| a.push(c); | |
| break | |
| } | |
| b.invoke(c) | |
| } | |
| b.firing = false | |
| }, | |
| makeListener: function(d, c, b) { | |
| var a = { | |
| fn: d, | |
| id: ++this.nextId, | |
| scope: c, | |
| dom: false, | |
| priority: 0 | |
| }; | |
| if (b) { | |
| Ext.apply(a, b) | |
| } | |
| a.phase = a.dom ? 0 : 1; | |
| return a | |
| }, | |
| on: function(c, b, a) { | |
| var d = Ext.env.Ready | |
| , e = d.makeListener(c, b, a); | |
| if (d.state === 2 && !d.firing && (e.dom || !d.blocks)) { | |
| d.invoke(e) | |
| } else { | |
| d.listeners.push(e); | |
| ++d.generation; | |
| if (!d.bound) { | |
| d.bind() | |
| } | |
| } | |
| }, | |
| onReadyEvent: function(b) { | |
| var a = Ext.env.Ready; | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(a.doReadyEvent, a, arguments) | |
| } else { | |
| a.doReadyEvent(b) | |
| } | |
| }, | |
| doReadyEvent: function(b) { | |
| var a = this; | |
| if (a.bound > 0) { | |
| a.unbind(); | |
| a.bound = -1 | |
| } | |
| if (!a.state) { | |
| a.fireReady() | |
| } | |
| }, | |
| sortFn: function(d, c) { | |
| return -((d.phase - c.phase) || (c.priority - d.priority) || (d.id - c.id)) | |
| }, | |
| unblock: function() { | |
| var a = this; | |
| if (a.blocks) { | |
| if (!--a.blocks) { | |
| if (a.state === 2 && !a.firing) { | |
| a.invokeAll() | |
| } | |
| } | |
| } | |
| }, | |
| unbind: function() { | |
| var a = this | |
| , b = document; | |
| if (a.bound > 1) { | |
| b.removeEventListener("deviceready", a.onReadyEvent, false) | |
| } | |
| b.removeEventListener("DOMContentLoaded", a.onReadyEvent, false); | |
| window.removeEventListener("load", a.onReadyEvent, false) | |
| } | |
| }; | |
| (function() { | |
| var a = Ext.env.Ready; | |
| if (Ext.isIE9m) { | |
| Ext.apply(a, { | |
| scrollTimer: null , | |
| readyStatesRe: /complete/i, | |
| pollScroll: function() { | |
| var b = true; | |
| try { | |
| document.documentElement.doScroll("left") | |
| } catch (c) { | |
| b = false | |
| } | |
| if (b && document.body) { | |
| a.onReadyEvent({ | |
| type: "doScroll" | |
| }) | |
| } else { | |
| a.scrollTimer = Ext.defer(a.pollScroll, 20) | |
| } | |
| return b | |
| }, | |
| bind: function() { | |
| if (a.bound) { | |
| return | |
| } | |
| var d = document, b; | |
| try { | |
| b = window.frameElement === undefined | |
| } catch (c) {} | |
| if (!b || !d.documentElement.doScroll) { | |
| a.pollScroll = Ext.emptyFn | |
| } else { | |
| if (a.pollScroll()) { | |
| return | |
| } | |
| } | |
| if (d.readyState === "complete") { | |
| a.onReadyEvent({ | |
| type: "already " + (d.readyState || "body") | |
| }) | |
| } else { | |
| d.attachEvent("onreadystatechange", a.onReadyStateChange); | |
| window.attachEvent("onload", a.onReadyEvent); | |
| a.bound = 1 | |
| } | |
| }, | |
| unbind: function() { | |
| document.detachEvent("onreadystatechange", a.onReadyStateChange); | |
| window.detachEvent("onload", a.onReadyEvent); | |
| if (Ext.isNumber(a.scrollTimer)) { | |
| clearTimeout(a.scrollTimer); | |
| a.scrollTimer = null | |
| } | |
| }, | |
| onReadyStateChange: function() { | |
| var b = document.readyState; | |
| if (a.readyStatesRe.test(b)) { | |
| a.onReadyEvent({ | |
| type: b | |
| }) | |
| } | |
| } | |
| }) | |
| } | |
| Ext.onDocumentReady = function(e, d, b) { | |
| var c = { | |
| dom: true | |
| }; | |
| if (b) { | |
| Ext.apply(c, b) | |
| } | |
| a.on(e, d, c) | |
| } | |
| ; | |
| Ext.onReady = function(d, c, b) { | |
| a.on(d, c, b) | |
| } | |
| ; | |
| Ext.onInternalReady = function(d, c, b) { | |
| a.on(d, c, Ext.apply({ | |
| priority: 1000 | |
| }, b)) | |
| } | |
| ; | |
| a.bind() | |
| }()); | |
| Ext.Loader = (new function() { | |
| var c = this | |
| , a = Ext.ClassManager | |
| , h = Ext.Boot | |
| , d = Ext.Class | |
| , j = Ext.env.Ready | |
| , i = Ext.Function.alias | |
| , g = ["extend", "mixins", "requires"] | |
| , n = {} | |
| , k = [] | |
| , b = [] | |
| , e = [] | |
| , o = {} | |
| , m = {} | |
| , l = { | |
| enabled: true, | |
| scriptChainDelay: false, | |
| disableCaching: true, | |
| disableCachingParam: "_dc", | |
| paths: a.paths, | |
| preserveScripts: true, | |
| scriptCharset: undefined | |
| } | |
| , p = { | |
| disableCaching: true, | |
| disableCachingParam: true, | |
| preserveScripts: true, | |
| scriptChainDelay: "loadDelay" | |
| }; | |
| Ext.apply(c, { | |
| isInHistory: n, | |
| isLoading: false, | |
| history: k, | |
| config: l, | |
| readyListeners: b, | |
| optionalRequires: e, | |
| requiresMap: o, | |
| hasFileLoadError: false, | |
| scriptsLoading: 0, | |
| syncModeEnabled: false, | |
| missingQueue: m, | |
| init: function() { | |
| var v = document.getElementsByTagName("script"), q = v[v.length - 1].src, A = q.substring(0, q.lastIndexOf("/") + 1), y = Ext._classPathMetadata, z = Ext.Microloader, s = Ext.manifest, t, w, x, u, r; | |
| if (!a.getPath("Ext")) { | |
| a.setPath("Ext", A + "src") | |
| } | |
| if (y) { | |
| Ext._classPathMetadata = null ; | |
| c.addClassPathMappings(y) | |
| } | |
| if (s) { | |
| t = s.loadOrder; | |
| w = Ext.Boot.baseUrl; | |
| if (t && s.bootRelative) { | |
| for (x = t.length, | |
| u = 0; u < x; u++) { | |
| r = t[u]; | |
| r.path = w + r.path | |
| } | |
| } | |
| } | |
| if (z) { | |
| j.block(); | |
| z.onMicroloaderReady(function() { | |
| j.unblock() | |
| }) | |
| } | |
| }, | |
| setConfig: Ext.Function.flexSetter(function(q, r) { | |
| if (q === "paths") { | |
| c.setPath(r) | |
| } else { | |
| l[q] = r; | |
| var s = p[q]; | |
| if (s) { | |
| h.setConfig((s === true) ? q : s, r) | |
| } | |
| } | |
| return c | |
| }), | |
| getConfig: function(q) { | |
| return q ? l[q] : l | |
| }, | |
| setPath: function() { | |
| a.setPath.apply(a, arguments); | |
| return c | |
| }, | |
| addClassPathMappings: function(q) { | |
| a.setPath(q); | |
| return c | |
| }, | |
| addBaseUrlClassPathMappings: function(q) { | |
| for (var r in q) { | |
| q[r] = h.baseUrl + q[r] | |
| } | |
| Ext.Loader.addClassPathMappings(q) | |
| }, | |
| getPath: function(q) { | |
| return a.getPath(q) | |
| }, | |
| require: function(s, r, q, u) { | |
| if (u) { | |
| return c.exclude(u).require(s, r, q) | |
| } | |
| var t = a.getNamesByExpression(s); | |
| return c.load(t, r, q) | |
| }, | |
| syncRequire: function() { | |
| var r = c.syncModeEnabled; | |
| c.syncModeEnabled = true; | |
| var q = c.require.apply(c, arguments); | |
| c.syncModeEnabled = r; | |
| return q | |
| }, | |
| exclude: function(r) { | |
| var q = a.select({ | |
| require: function(u, t, s) { | |
| return c.load(u, t, s) | |
| }, | |
| syncRequire: function(w, u, t) { | |
| var v = c.syncModeEnabled; | |
| c.syncModeEnabled = true; | |
| var s = c.load(w, u, t); | |
| c.syncModeEnabled = v; | |
| return s | |
| } | |
| }); | |
| q.exclude(r); | |
| return q | |
| }, | |
| load: function(q, y, z) { | |
| if (y) { | |
| if (y.length) { | |
| y = c.makeLoadCallback(q, y) | |
| } | |
| y = y.bind(z || Ext.global) | |
| } | |
| var t = [], s = q.length, w, v, u, x = [], r = a.classState; | |
| for (v = 0; v < s; ++v) { | |
| w = a.resolveName(q[v]); | |
| if (!a.isCreated(w)) { | |
| t.push(w); | |
| m[w] = c.getPath(w); | |
| if (!r[w]) { | |
| x.push(m[w]) | |
| } | |
| } | |
| } | |
| u = t.length; | |
| if (u) { | |
| c.missingCount += u; | |
| a.onCreated(function() { | |
| if (y) { | |
| Ext.callback(y, z, arguments) | |
| } | |
| c.checkReady() | |
| }, c, t); | |
| if (!l.enabled) { | |
| Ext.raise("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class" + ((t.length > 1) ? "es" : "") + ": " + t.join(", ")) | |
| } | |
| if (x.length) { | |
| c.loadScripts({ | |
| url: x, | |
| _classNames: t | |
| }) | |
| } else { | |
| c.checkReady() | |
| } | |
| } else { | |
| if (y) { | |
| y.call(z) | |
| } | |
| c.checkReady() | |
| } | |
| if (c.syncModeEnabled) { | |
| if (s === 1) { | |
| return a.get(q[0]) | |
| } | |
| } | |
| return c | |
| }, | |
| makeLoadCallback: function(q, r) { | |
| return function() { | |
| var t = [] | |
| , s = q.length; | |
| while (s-- > 0) { | |
| t[s] = a.get(q[s]) | |
| } | |
| return r.apply(this, t) | |
| } | |
| }, | |
| onLoadFailure: function() { | |
| var q = this | |
| , r = q.onError; | |
| c.hasFileLoadError = true; | |
| --c.scriptsLoading; | |
| if (r) { | |
| r.call(q.userScope, q) | |
| } | |
| c.checkReady() | |
| }, | |
| onLoadSuccess: function() { | |
| var q = this | |
| , r = q.onLoad; | |
| --c.scriptsLoading; | |
| if (r) { | |
| r.call(q.userScope, q) | |
| } | |
| c.checkReady() | |
| }, | |
| onReady: function(s, r, u, q) { | |
| if (u) { | |
| j.on(s, r, q) | |
| } else { | |
| var t = j.makeListener(s, r, q); | |
| if (c.isLoading) { | |
| b.push(t) | |
| } else { | |
| j.invoke(t) | |
| } | |
| } | |
| }, | |
| addUsedClasses: function(s) { | |
| var q, r, t; | |
| if (s) { | |
| s = (typeof s === "string") ? [s] : s; | |
| for (r = 0, | |
| t = s.length; r < t; r++) { | |
| q = s[r]; | |
| if (typeof q === "string" && !Ext.Array.contains(e, q)) { | |
| e.push(q) | |
| } | |
| } | |
| } | |
| return c | |
| }, | |
| triggerReady: function() { | |
| var q, r = e; | |
| if (c.isLoading && r.length) { | |
| e = []; | |
| c.require(r) | |
| } else { | |
| c.isLoading = false; | |
| b.sort(j.sortFn); | |
| while (b.length && !c.isLoading) { | |
| q = b.pop(); | |
| j.invoke(q) | |
| } | |
| j.unblock() | |
| } | |
| }, | |
| historyPush: function(q) { | |
| if (q && !n[q] && !a.overrideMap[q]) { | |
| n[q] = true; | |
| k.push(q) | |
| } | |
| return c | |
| }, | |
| loadScripts: function(u) { | |
| var t = Ext.manifest, q = t && t.loadOrder, r = t && t.loadOrderMap, s; | |
| ++c.scriptsLoading; | |
| if (q && !r) { | |
| t.loadOrderMap = r = h.createLoadOrderMap(q) | |
| } | |
| c.checkReady(); | |
| s = Ext.apply({ | |
| loadOrder: q, | |
| loadOrderMap: r, | |
| charset: l.scriptCharset, | |
| success: c.onLoadSuccess, | |
| failure: c.onLoadFailure, | |
| sync: c.syncModeEnabled, | |
| _classNames: [] | |
| }, u); | |
| s.userScope = s.scope; | |
| s.scope = s; | |
| h.load(s) | |
| }, | |
| loadScriptsSync: function(r) { | |
| var q = c.syncModeEnabled; | |
| c.syncModeEnabled = true; | |
| c.loadScripts({ | |
| url: r | |
| }); | |
| c.syncModeEnabled = q | |
| }, | |
| loadScriptsSyncBasePrefix: function(r) { | |
| var q = c.syncModeEnabled; | |
| c.syncModeEnabled = true; | |
| c.loadScripts({ | |
| url: r, | |
| prependBaseUrl: true | |
| }); | |
| c.syncModeEnabled = q | |
| }, | |
| loadScript: function(y) { | |
| var r = typeof y === "string" | |
| , u = y instanceof Array | |
| , x = !u && !r | |
| , q = x ? y.url : y | |
| , t = x && y.onError | |
| , v = x && y.onLoad | |
| , w = x && y.scope | |
| , s = { | |
| url: q, | |
| scope: w, | |
| onLoad: v, | |
| onError: t, | |
| _classNames: [] | |
| }; | |
| c.loadScripts(s) | |
| }, | |
| flushMissingQueue: function() { | |
| var q, t, s = 0, r = 0; | |
| for (q in m) { | |
| s++; | |
| t = m[q]; | |
| if (a.isCreated(q)) { | |
| delete m[q] | |
| } else { | |
| if (a.existCache[q] === 2) { | |
| delete m[q] | |
| } else { | |
| ++r | |
| } | |
| } | |
| } | |
| this.missingCount = r | |
| }, | |
| checkReady: function() { | |
| var r = c.isLoading, q; | |
| c.flushMissingQueue(); | |
| q = c.missingCount + c.scriptsLoading; | |
| if (q && !r) { | |
| j.block(); | |
| c.isLoading = !!q | |
| } else { | |
| if (!q && r) { | |
| c.triggerReady() | |
| } | |
| } | |
| } | |
| }); | |
| Ext.require = i(c, "require"); | |
| Ext.syncRequire = i(c, "syncRequire"); | |
| Ext.exclude = i(c, "exclude"); | |
| d.registerPreprocessor("loader", function(F, u, E, D) { | |
| var A = this, y = [], q, z = a.getName(F), t, s, x, w, C, v, r, B; | |
| for (t = 0, | |
| x = g.length; t < x; t++) { | |
| v = g[t]; | |
| if (u.hasOwnProperty(v)) { | |
| r = u[v]; | |
| if (typeof r === "string") { | |
| y.push(r) | |
| } else { | |
| if (r instanceof Array) { | |
| for (s = 0, | |
| w = r.length; s < w; s++) { | |
| C = r[s]; | |
| if (typeof C === "string") { | |
| y.push(C) | |
| } | |
| } | |
| } else { | |
| if (typeof r !== "function") { | |
| for (s in r) { | |
| if (r.hasOwnProperty(s)) { | |
| C = r[s]; | |
| if (typeof C === "string") { | |
| y.push(C) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (y.length === 0) { | |
| return | |
| } | |
| if (z) { | |
| o[z] = y | |
| } | |
| (z ? c.exclude(z) : c).require(y, function() { | |
| for (t = 0, | |
| x = g.length; t < x; t++) { | |
| v = g[t]; | |
| if (u.hasOwnProperty(v)) { | |
| r = u[v]; | |
| if (typeof r === "string") { | |
| u[v] = a.get(r) | |
| } else { | |
| if (r instanceof Array) { | |
| for (s = 0, | |
| w = r.length; s < w; s++) { | |
| C = r[s]; | |
| if (typeof C === "string") { | |
| u[v][s] = a.get(C) | |
| } | |
| } | |
| } else { | |
| if (typeof r !== "function") { | |
| for (var G in r) { | |
| if (r.hasOwnProperty(G)) { | |
| C = r[G]; | |
| if (typeof C === "string") { | |
| u[v][G] = a.get(C) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| D.call(A, F, u, E) | |
| }); | |
| return false | |
| }, true, "after", "className"); | |
| a.registerPostprocessor("uses", function(r, B, w) { | |
| var q = Ext.manifest, s = q && q.loadOrder, t = q && q.classes, u, y, A, x, v, z; | |
| if (s) { | |
| y = t[r]; | |
| if (y && !isNaN(v = y.idx)) { | |
| A = s[v]; | |
| u = A.uses; | |
| z = {}; | |
| for (x = u.length, | |
| v = 0; v < x; v++) { | |
| z[u[v]] = true | |
| } | |
| u = Ext.Boot.getPathsFromIndexes(z, s, true); | |
| if (u.length > 0) { | |
| c.loadScripts({ | |
| url: u, | |
| sequential: true | |
| }) | |
| } | |
| } | |
| } | |
| if (w.uses) { | |
| u = w.uses; | |
| c.addUsedClasses(u) | |
| } | |
| }); | |
| a.onCreated(c.historyPush); | |
| c.init() | |
| } | |
| ()); | |
| Ext._endTime = Ext.ticks(); | |
| if (Ext._beforereadyhandler) { | |
| Ext._beforereadyhandler() | |
| } | |
| (Ext.cmd.derive("Ext.Mixin", Ext.Base, function(a) { | |
| return { | |
| statics: { | |
| addHook: function(i, e, c, d) { | |
| var h = Ext.isFunction(i) | |
| , g = function() { | |
| var k = arguments | |
| , l = h ? i : d[i] | |
| , j = this.callParent(k); | |
| l.apply(this, k); | |
| return j | |
| } | |
| , b = e.hasOwnProperty(c) && e[c]; | |
| if (h) { | |
| i.$previous = Ext.emptyFn | |
| } | |
| g.$name = c; | |
| g.$owner = e.self; | |
| if (b) { | |
| g.$previous = b.$previous; | |
| b.$previous = g | |
| } else { | |
| e[c] = g | |
| } | |
| } | |
| }, | |
| onClassExtended: function(l, d) { | |
| var g = d.mixinConfig, j = d.xhooks, i = l.superclass, e = d.onClassMixedIn, b, h, k, c; | |
| if (j) { | |
| delete d.xhooks; | |
| (g || (d.mixinConfig = g = {})).on = j | |
| } | |
| if (g) { | |
| b = i.mixinConfig; | |
| if (b) { | |
| d.mixinConfig = g = Ext.merge({}, b, g) | |
| } | |
| d.mixinId = g.id; | |
| h = g.before; | |
| k = g.after; | |
| j = g.on; | |
| c = g.extended | |
| } | |
| if (h || k || j || c) { | |
| d.onClassMixedIn = function(p) { | |
| var m = this.prototype, o = p.prototype, n; | |
| if (h) { | |
| Ext.Object.each(h, function(q, r) { | |
| p.addMember(q, function() { | |
| if (m[r].apply(this, arguments) !== false) { | |
| return this.callParent(arguments) | |
| } | |
| }) | |
| }) | |
| } | |
| if (k) { | |
| Ext.Object.each(k, function(q, r) { | |
| p.addMember(q, function() { | |
| var s = this.callParent(arguments); | |
| m[r].apply(this, arguments); | |
| return s | |
| }) | |
| }) | |
| } | |
| if (j) { | |
| for (n in j) { | |
| a.addHook(j[n], o, n, m) | |
| } | |
| } | |
| if (c) { | |
| p.onExtended(function() { | |
| var q = Ext.Array.slice(arguments, 0); | |
| q.unshift(p); | |
| return c.apply(this, q) | |
| }, this) | |
| } | |
| if (e) { | |
| e.apply(this, arguments) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext, "Mixin"], 0)); | |
| Ext.util = Ext.util || {}; | |
| Ext.util.DelayedTask = function(e, d, b, i, h) { | |
| var g = this, a, c = function() { | |
| var j = Ext.GlobalEvents; | |
| clearInterval(g.id); | |
| g.id = null ; | |
| e.apply(d, b || []); | |
| if (h !== false && j.hasListeners.idle) { | |
| j.fireEvent("idle") | |
| } | |
| } | |
| ; | |
| i = typeof i === "boolean" ? i : true; | |
| g.id = null ; | |
| g.delay = function(k, m, l, j) { | |
| if (i) { | |
| g.cancel() | |
| } | |
| if (typeof k === "number") { | |
| a = k | |
| } | |
| e = m || e; | |
| d = l || d; | |
| b = j || b; | |
| if (!g.id) { | |
| g.id = Ext.interval(c, a) | |
| } | |
| } | |
| ; | |
| g.cancel = function() { | |
| if (g.id) { | |
| clearInterval(g.id); | |
| g.id = null | |
| } | |
| } | |
| } | |
| ; | |
| (Ext.cmd.derive("Ext.util.Event", Ext.Base, function() { | |
| var d = Array.prototype.slice | |
| , a = Ext.Array.insert | |
| , c = Ext.Array.toArray | |
| , b = {}; | |
| return { | |
| isEvent: true, | |
| suspended: 0, | |
| noOptions: {}, | |
| constructor: function(g, e) { | |
| this.name = e; | |
| this.observable = g; | |
| this.listeners = [] | |
| }, | |
| addListener: function(n, e, g, u, q) { | |
| var x = this, l = false, p = x.observable, k = x.name, r, j, w, t, y, s, h, m, v, o; | |
| if (x.findListener(n, e) === -1) { | |
| j = x.createListener(n, e, g, u, q); | |
| if (x.firing) { | |
| x.listeners = x.listeners.slice(0) | |
| } | |
| r = x.listeners; | |
| m = h = r.length; | |
| w = g && g.priority; | |
| y = x._highestNegativePriorityIndex; | |
| s = y !== undefined; | |
| if (w) { | |
| t = (w < 0); | |
| if (!t || s) { | |
| for (v = (t ? y : 0); v < h; v++) { | |
| o = r[v].o ? r[v].o.priority || 0 : 0; | |
| if (o < w) { | |
| m = v; | |
| break | |
| } | |
| } | |
| } else { | |
| x._highestNegativePriorityIndex = m | |
| } | |
| } else { | |
| if (s) { | |
| m = y | |
| } | |
| } | |
| if (!t && m <= y) { | |
| x._highestNegativePriorityIndex++ | |
| } | |
| if (m === h) { | |
| r[h] = j | |
| } else { | |
| a(r, m, [j]) | |
| } | |
| if (p.isElement) { | |
| p._getPublisher(k).subscribe(p, k, g.delegated !== false, g.capture) | |
| } | |
| l = true | |
| } | |
| return l | |
| }, | |
| createListener: function(n, q, e, g, i) { | |
| var l = this, m = Ext._namedScopes[q], h = { | |
| fn: n, | |
| scope: q, | |
| ev: l, | |
| caller: g, | |
| manager: i, | |
| namedScope: m, | |
| defaultScope: m ? (q || l.observable) : undefined, | |
| lateBound: typeof n === "string" | |
| }, p = n, k = false, j; | |
| if (e) { | |
| h.o = e; | |
| if (e.single) { | |
| p = l.createSingle(p, h, e, q); | |
| k = true | |
| } | |
| if (e.target) { | |
| p = l.createTargeted(p, h, e, q, k); | |
| k = true | |
| } | |
| if (e.delay) { | |
| p = l.createDelayed(p, h, e, q, k); | |
| k = true | |
| } | |
| if (e.buffer) { | |
| p = l.createBuffered(p, h, e, q, k); | |
| k = true | |
| } | |
| if (l.observable.isElement) { | |
| j = e.type; | |
| if (j) { | |
| h.type = j | |
| } | |
| } | |
| } | |
| h.fireFn = p; | |
| h.wrapped = k; | |
| return h | |
| }, | |
| findListener: function(j, h) { | |
| var g = this.listeners, e = g.length, k; | |
| while (e--) { | |
| k = g[e]; | |
| if (k) { | |
| if (k.fn === j && k.scope == h) { | |
| return e | |
| } | |
| } | |
| } | |
| return -1 | |
| }, | |
| removeListener: function(r, t, p) { | |
| var q = this, o = false, e = q.observable, n = q.name, h, v, u, l, j, s, g, m; | |
| p = p || q.findListener(r, t); | |
| if (p != -1) { | |
| h = q.listeners[p]; | |
| u = h.o; | |
| v = q._highestNegativePriorityIndex; | |
| if (q.firing) { | |
| q.listeners = q.listeners.slice(0) | |
| } | |
| if (h.task) { | |
| h.task.cancel(); | |
| delete h.task | |
| } | |
| l = h.tasks && h.tasks.length; | |
| if (l) { | |
| while (l--) { | |
| h.tasks[l].cancel() | |
| } | |
| delete h.tasks | |
| } | |
| q.listeners.splice(p, 1); | |
| j = h.manager; | |
| if (j) { | |
| s = j.managedListeners; | |
| if (s) { | |
| for (m = s.length; m--; ) { | |
| g = s[m]; | |
| if (g.item === q.observable && g.ename === n && g.fn === r && g.scope === t) { | |
| s.splice(m, 1) | |
| } | |
| } | |
| } | |
| } | |
| if (v) { | |
| if (p < v) { | |
| q._highestNegativePriorityIndex-- | |
| } else { | |
| if (p === v && p === q.listeners.length) { | |
| delete q._highestNegativePriorityIndex | |
| } | |
| } | |
| } | |
| if (e.isElement) { | |
| e._getPublisher(n).unsubscribe(e, n, u.delegated !== false, u.capture) | |
| } | |
| o = true | |
| } | |
| return o | |
| }, | |
| clearListeners: function() { | |
| var g = this.listeners, e = g.length, h; | |
| while (e--) { | |
| h = g[e]; | |
| this.removeListener(h.fn, h.scope) | |
| } | |
| }, | |
| suspend: function() { | |
| ++this.suspended | |
| }, | |
| resume: function() { | |
| if (this.suspended) { | |
| --this.suspended | |
| } | |
| }, | |
| isSuspended: function() { | |
| return this.suspended > 0 | |
| }, | |
| fireDelegated: function(g, e) { | |
| this.firingObservable = g; | |
| return this.fire.apply(this, e) | |
| }, | |
| fire: function() { | |
| var B = this, s = B.listeners, m = s.length, p = B.observable, t = p.isElement, A = p.isComponent, y = B.firingObservable, h, x, q, v, g, k, w, u, C, j, o, l, z, r, n; | |
| if (!B.suspended && m > 0) { | |
| B.firing = true; | |
| g = arguments.length ? d.call(arguments, 0) : []; | |
| w = g.length; | |
| if (t) { | |
| z = g[0] | |
| } | |
| for (v = 0; v < m; v++) { | |
| k = s[v]; | |
| h = k.o; | |
| if (t) { | |
| if (C) { | |
| z.setCurrentTarget(C) | |
| } | |
| j = k.type; | |
| if (j) { | |
| o = z; | |
| z = g[0] = o.chain({ | |
| type: j | |
| }) | |
| } | |
| Ext.EventObject = z | |
| } | |
| l = g; | |
| if (h) { | |
| x = h.delegate; | |
| if (x) { | |
| if (t) { | |
| u = z.getTarget("#" + z.currentTarget.id + " " + x); | |
| if (u) { | |
| g[1] = u; | |
| C = z.currentTarget; | |
| z.setCurrentTarget(u) | |
| } else { | |
| continue | |
| } | |
| } else { | |
| if (A && !y.is("#" + p.id + " " + h.delegate)) { | |
| continue | |
| } | |
| } | |
| } | |
| if (t) { | |
| if (h.preventDefault) { | |
| z.preventDefault() | |
| } | |
| if (h.stopPropagation) { | |
| z.stopPropagation() | |
| } | |
| if (h.stopEvent) { | |
| z.stopEvent() | |
| } | |
| } | |
| g[w] = h; | |
| if (h.args) { | |
| l = h.args.concat(g) | |
| } | |
| } | |
| q = B.getFireInfo(k); | |
| r = q.fn; | |
| n = q.scope; | |
| q.fn = q.scope = null ; | |
| if (r.apply(n, l) === false) { | |
| Ext.EventObject = null ; | |
| return ( B.firing = false) | |
| } | |
| if (o) { | |
| z = g[0] = o; | |
| o = null | |
| } | |
| Ext.EventObject = null | |
| } | |
| } | |
| B.firing = false; | |
| return true | |
| }, | |
| getFireInfo: function(k, j) { | |
| var l = this.observable, e = k.fireFn, i = k.scope, g = k.namedScope, h; | |
| if (!j && k.wrapped) { | |
| b.fn = e; | |
| return b | |
| } | |
| h = j ? k.fn : e; | |
| if (k.lateBound) { | |
| if (!i || g) { | |
| i = (k.caller || l).resolveListenerScope(k.defaultScope) | |
| } | |
| h = i[h] | |
| } else { | |
| if (g && g.isController) { | |
| i = (k.caller || l).resolveListenerScope(k.defaultScope) | |
| } else { | |
| if (!i || g) { | |
| i = l | |
| } | |
| } | |
| } | |
| b.fn = h; | |
| b.scope = i; | |
| return b | |
| }, | |
| createTargeted: function(h, i, j, g, e) { | |
| return function() { | |
| if (j.target === arguments[0]) { | |
| var k; | |
| if (!e) { | |
| k = i.ev.getFireInfo(i, true); | |
| h = k.fn; | |
| g = k.scope; | |
| k.fn = k.scope = null | |
| } | |
| return h.apply(g, arguments) | |
| } | |
| } | |
| }, | |
| createBuffered: function(h, i, j, g, e) { | |
| i.task = new Ext.util.DelayedTask(); | |
| return function() { | |
| var k; | |
| if (!e) { | |
| k = i.ev.getFireInfo(i, true); | |
| h = k.fn; | |
| g = k.scope; | |
| k.fn = k.scope = null | |
| } | |
| i.task.delay(j.buffer, h, g, c(arguments)) | |
| } | |
| }, | |
| createDelayed: function(h, i, j, g, e) { | |
| return function() { | |
| var k = new Ext.util.DelayedTask(), l; | |
| if (!e) { | |
| l = i.ev.getFireInfo(i, true); | |
| h = l.fn; | |
| g = l.scope; | |
| l.fn = l.scope = null | |
| } | |
| if (!i.tasks) { | |
| i.tasks = [] | |
| } | |
| i.tasks.push(k); | |
| k.delay(j.delay || 10, h, g, c(arguments)) | |
| } | |
| }, | |
| createSingle: function(h, i, j, g, e) { | |
| return function() { | |
| var k = i.ev, l; | |
| if (k.removeListener(i.fn, g) && k.observable) { | |
| k.observable.hasListeners[k.name]-- | |
| } | |
| if (!e) { | |
| l = k.getFireInfo(i, true); | |
| h = l.fn; | |
| g = l.scope; | |
| l.fn = l.scope = null | |
| } | |
| return h.apply(g, arguments) | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "Event"], 0)); | |
| (Ext.cmd.derive("Ext.mixin.Identifiable", Ext.Base, { | |
| statics: { | |
| uniqueIds: {} | |
| }, | |
| isIdentifiable: true, | |
| mixinId: "identifiable", | |
| idCleanRegex: /\.|[^\w\-]/g, | |
| defaultIdPrefix: "ext-", | |
| defaultIdSeparator: "-", | |
| getOptimizedId: function() { | |
| return this.id | |
| }, | |
| getUniqueId: function() { | |
| var g = this.id, b, d, e, a, c; | |
| if (!(g || g === 0)) { | |
| b = this.self.prototype; | |
| d = this.defaultIdSeparator; | |
| a = Ext.mixin.Identifiable.uniqueIds; | |
| if (!b.hasOwnProperty("identifiablePrefix")) { | |
| e = this.xtype; | |
| if (e) { | |
| c = this.defaultIdPrefix + e.replace(this.idCleanRegex, d) + d | |
| } else { | |
| if (!(c = b.$className)) { | |
| c = this.defaultIdPrefix + "anonymous" + d | |
| } else { | |
| c = c.replace(this.idCleanRegex, d).toLowerCase() + d | |
| } | |
| } | |
| b.identifiablePrefix = c | |
| } | |
| c = this.identifiablePrefix; | |
| if (!a.hasOwnProperty(c)) { | |
| a[c] = 0 | |
| } | |
| g = this.id = this.id = c + (++a[c]) | |
| } | |
| this.getUniqueId = this.getOptimizedId; | |
| return g | |
| }, | |
| setId: function(a) { | |
| this.id = this.id = a | |
| }, | |
| getId: function() { | |
| var a = this.id; | |
| if (!a) { | |
| a = this.getUniqueId() | |
| } | |
| this.getId = this.getOptimizedId; | |
| return a | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.mixin, "Identifiable"], 0)); | |
| (Ext.cmd.derive("Ext.mixin.Observable", Ext.Mixin, function(a) { | |
| var d = Ext.emptyFn | |
| , c = [] | |
| , e = Array.prototype | |
| , g = e.slice | |
| , b = function(h) { | |
| if (h instanceof b) { | |
| return h | |
| } | |
| this.observable = h; | |
| if (arguments[1].isObservable) { | |
| this.managedListeners = true | |
| } | |
| this.args = g.call(arguments, 1) | |
| } | |
| ; | |
| b.prototype.destroy = function() { | |
| this.destroy = Ext.emptyFn; | |
| var h = this.observable; | |
| h[this.managedListeners ? "mun" : "un"].apply(h, this.args) | |
| } | |
| ; | |
| return { | |
| mixinConfig: { | |
| id: "observable", | |
| after: { | |
| destroy: "clearListeners" | |
| } | |
| }, | |
| statics: { | |
| releaseCapture: function(h) { | |
| h.fireEventArgs = this.prototype.fireEventArgs | |
| }, | |
| capture: function(k, i, h) { | |
| var j = function(l, m) { | |
| return i.apply(h, [l].concat(m)) | |
| } | |
| ; | |
| this.captureArgs(k, j, h) | |
| }, | |
| captureArgs: function(j, i, h) { | |
| j.fireEventArgs = Ext.Function.createInterceptor(j.fireEventArgs, i, h) | |
| }, | |
| observe: function(h, i) { | |
| if (h) { | |
| if (!h.isObservable) { | |
| Ext.applyIf(h, new this()); | |
| this.captureArgs(h.prototype, h.fireEventArgs, h) | |
| } | |
| if (Ext.isObject(i)) { | |
| h.on(i) | |
| } | |
| } | |
| return h | |
| }, | |
| prepareClass: function(l, r, m) { | |
| var q = l.listeners = [], o = m || l.prototype, h = o.listeners, k = r ? r.listeners : l.superclass.self.listeners, i, s, p; | |
| if (k) { | |
| q.push(k) | |
| } | |
| if (h) { | |
| s = h.scope; | |
| if (!s) { | |
| h.scope = "self" | |
| } else { | |
| p = Ext._namedScopes[s]; | |
| if (p && p.isController) { | |
| h.scope = "self.controller" | |
| } | |
| } | |
| q.push(h); | |
| o.listeners = null | |
| } | |
| if (!l.HasListeners) { | |
| var n = function() {} | |
| , j = l.superclass.HasListeners || (r && r.HasListeners) || a.HasListeners; | |
| l.prototype.HasListeners = l.HasListeners = n; | |
| n.prototype = l.hasListeners = new j() | |
| } | |
| } | |
| }, | |
| isObservable: true, | |
| eventsSuspended: 0, | |
| constructor: function(l) { | |
| var o = this, k = o.self, j, n, p, h, m; | |
| if (o.$observableInitialized) { | |
| return | |
| } | |
| o.$observableInitialized = true; | |
| o.hasListeners = new o.HasListeners(); | |
| o.eventedBeforeEventNames = {}; | |
| o.events = o.events || {}; | |
| j = k.listeners; | |
| if (j && !o._addDeclaredListeners(j)) { | |
| k.listeners = null | |
| } | |
| n = (l && l.listeners) || o.listeners; | |
| if (n) { | |
| if (n instanceof Array) { | |
| for (m = 0, | |
| h = n.length; m < h; ++m) { | |
| o.addListener(n[m]) | |
| } | |
| } else { | |
| o.addListener(n) | |
| } | |
| } | |
| p = (l && l.bubbleEvents) || o.bubbleEvents; | |
| if (p) { | |
| o.enableBubble(p) | |
| } | |
| if (o.$applyConfigs) { | |
| if (l) { | |
| Ext.apply(o, l) | |
| } | |
| } else { | |
| o.initConfig(l) | |
| } | |
| if (n) { | |
| o.listeners = null | |
| } | |
| }, | |
| onClassExtended: function(h, i) { | |
| if (!h.HasListeners) { | |
| a.prepareClass(h, h.prototype.$observableMixedIn ? undefined : i) | |
| } | |
| }, | |
| $eventOptions: { | |
| scope: 1, | |
| delay: 1, | |
| buffer: 1, | |
| onFrame: 1, | |
| single: 1, | |
| args: 1, | |
| destroyable: 1, | |
| priority: 1, | |
| order: 1 | |
| }, | |
| $orderToPriority: { | |
| before: 100, | |
| current: 0, | |
| after: -100 | |
| }, | |
| _addDeclaredListeners: function(h) { | |
| var i = this; | |
| if (h instanceof Array) { | |
| Ext.each(h, i._addDeclaredListeners, i) | |
| } else { | |
| i._addedDeclaredListeners = true; | |
| i.addListener(h) | |
| } | |
| return i._addedDeclaredListeners | |
| }, | |
| addManagedListener: function(o, k, m, p, q, j) { | |
| var l = this, n = l.managedListeners = l.managedListeners || [], i, h; | |
| if (typeof k !== "string") { | |
| h = arguments.length > 4 ? q : k; | |
| q = k; | |
| for (k in q) { | |
| if (q.hasOwnProperty(k)) { | |
| i = q[k]; | |
| if (!o.$eventOptions[k]) { | |
| l.addManagedListener(o, k, i.fn || i, i.scope || q.scope || p, i.fn ? i : h, true) | |
| } | |
| } | |
| } | |
| if (q && q.destroyable) { | |
| return new b(l,o,q) | |
| } | |
| } else { | |
| if (m !== d) { | |
| o.doAddListener(k, m, p, q, null , l, l); | |
| if (!j && q && q.destroyable) { | |
| return new b(l,o,k,m,p) | |
| } | |
| } | |
| } | |
| }, | |
| removeManagedListener: function(p, k, n, q) { | |
| var m = this, r, j, o, h, l; | |
| if (typeof k !== "string") { | |
| r = k; | |
| for (k in r) { | |
| if (r.hasOwnProperty(k)) { | |
| j = r[k]; | |
| if (!p.$eventOptions[k]) { | |
| m.removeManagedListener(p, k, j.fn || j, j.scope || r.scope || q) | |
| } | |
| } | |
| } | |
| } else { | |
| o = m.managedListeners ? m.managedListeners.slice() : []; | |
| k = Ext.canonicalEventName(k); | |
| for (l = 0, | |
| h = o.length; l < h; l++) { | |
| m.removeManagedListenerItem(false, o[l], p, k, n, q) | |
| } | |
| } | |
| }, | |
| fireEvent: function(h) { | |
| return this.fireEventArgs(h, g.call(arguments, 1)) | |
| }, | |
| resolveListenerScope: function(i) { | |
| var h = Ext._namedScopes[i]; | |
| if (h) { | |
| if (h.isSelf || h.isThis) { | |
| i = null | |
| } | |
| } | |
| return i || this | |
| }, | |
| fireEventArgs: function(h, j) { | |
| h = Ext.canonicalEventName(h); | |
| var m = this | |
| , k = m.events | |
| , l = k && k[h] | |
| , i = true; | |
| if (m.hasListeners[h]) { | |
| i = m.doFireEvent(h, j || c, l ? l.bubble : false) | |
| } | |
| return i | |
| }, | |
| fireAction: function(i, k, m, l, j, h) { | |
| if (typeof m === "string" && !l) { | |
| m = this[m] | |
| } | |
| j = j ? Ext.Object.chain(j) : {}; | |
| j.single = true; | |
| j.priority = ((h === "after") ? -99.5 : 99.5); | |
| this.doAddListener(i, m, l, j); | |
| this.fireEventArgs(i, k) | |
| }, | |
| $eventedController: { | |
| _paused: 1, | |
| pause: function() { | |
| ++this._paused | |
| }, | |
| resume: function() { | |
| var m = this, l = m.fn, k = m.scope, n = m.fnArgs, h = m.owner, j, i; | |
| if (!--m._paused) { | |
| if (l) { | |
| j = Ext.Array.slice(n || m.args); | |
| if (n === false) { | |
| j.shift() | |
| } | |
| m.fn = null ; | |
| j.push(m); | |
| if (Ext.isFunction(l)) { | |
| i = l.apply(k, j) | |
| } else { | |
| if (k && Ext.isString(l) && Ext.isFunction(k[l])) { | |
| i = k[l].apply(k, j) | |
| } | |
| } | |
| if (i === false) { | |
| return false | |
| } | |
| } | |
| if (!m._paused) { | |
| return m.owner.fireEventArgs(m.eventName, m.args) | |
| } | |
| } | |
| } | |
| }, | |
| fireEventedAction: function(i, k, n, q, m) { | |
| var l = this, p = l.eventedBeforeEventNames, j = p[i] || (p[i] = "before" + i), h = Ext.apply({ | |
| owner: l, | |
| eventName: i, | |
| fn: n, | |
| scope: q, | |
| fnArgs: m, | |
| args: k | |
| }, l.$eventedController), o; | |
| k.push(h); | |
| o = l.fireEventArgs(j, k); | |
| k.pop(); | |
| if (o === false) { | |
| return false | |
| } | |
| return h.resume() | |
| }, | |
| doFireEvent: function(j, l, i) { | |
| var n = this, h, m, k = true; | |
| do { | |
| if (n.eventsSuspended) { | |
| if ((h = n.eventQueue) ) { | |
| h.push([j, l]) | |
| } | |
| return k | |
| } else { | |
| m = n.events && n.events[j]; | |
| if (m && m !== true) { | |
| if ((k = m.fire.apply(m, l)) === false) { | |
| break | |
| } | |
| } | |
| } | |
| } while (i && (n = n.getBubbleParent()));return k | |
| }, | |
| getBubbleParent: function() { | |
| var i = this | |
| , h = i.getBubbleTarget && i.getBubbleTarget(); | |
| if (h && h.isObservable) { | |
| return h | |
| } | |
| return null | |
| }, | |
| addListener: function(l, r, s, t, j, h) { | |
| var q = this, m = Ext._namedScopes, i, p, n, o, k; | |
| if (typeof l !== "string") { | |
| t = l; | |
| s = t.scope; | |
| p = s && m[s]; | |
| n = p && p.isSelf; | |
| k = ((q.isComponent || q.isWidget) && t.element) ? q.$elementEventOptions : q.$eventOptions; | |
| for (l in t) { | |
| i = t[l]; | |
| if (!k[l]) { | |
| o = i.scope; | |
| if (o && n) { | |
| p = m[o]; | |
| if (p && p.isController) { | |
| o = "self.controller" | |
| } | |
| } | |
| q.doAddListener(l, i.fn || i, o || s, i.fn ? i : t, j, h) | |
| } | |
| } | |
| if (t && t.destroyable) { | |
| return new b(q,t) | |
| } | |
| } else { | |
| q.doAddListener(l, r, s, t, j, h); | |
| if (t && t.destroyable) { | |
| return new b(q,l,r,s,t) | |
| } | |
| } | |
| return q | |
| }, | |
| removeListener: function(k, m, l, h) { | |
| var n = this, j, i; | |
| if (typeof k !== "string") { | |
| i = k; | |
| h = h || n.$eventOptions; | |
| for (k in i) { | |
| if (i.hasOwnProperty(k)) { | |
| j = i[k]; | |
| if (!n.$eventOptions[k]) { | |
| n.doRemoveListener(k, j.fn || j, j.scope || i.scope) | |
| } | |
| } | |
| } | |
| } else { | |
| n.doRemoveListener(k, m, l) | |
| } | |
| return n | |
| }, | |
| onBefore: function(h, k, j, i) { | |
| return this.addListener(h, k, j, i, "before") | |
| }, | |
| onAfter: function(h, k, j, i) { | |
| return this.addListener(h, k, j, i, "after") | |
| }, | |
| unBefore: function(h, k, j, i) { | |
| return this.removeListener(h, k, j, i, "before") | |
| }, | |
| unAfter: function(h, k, j, i) { | |
| return this.removeListener(h, k, j, i, "after") | |
| }, | |
| addBeforeListener: function() { | |
| return this.onBefore.apply(this, arguments) | |
| }, | |
| addAfterListener: function() { | |
| return this.onAfter.apply(this, arguments) | |
| }, | |
| removeBeforeListener: function() { | |
| return this.unBefore.apply(this, arguments) | |
| }, | |
| removeAfterListener: function() { | |
| return this.unAfter.apply(this, arguments) | |
| }, | |
| clearListeners: function() { | |
| var l = this, j = l.events, h = l.hasListeners, k, i; | |
| if (j) { | |
| for (i in j) { | |
| if (j.hasOwnProperty(i)) { | |
| k = j[i]; | |
| if (k.isEvent) { | |
| delete h[i]; | |
| k.clearListeners() | |
| } | |
| } | |
| } | |
| l.events = null | |
| } | |
| l.clearManagedListeners() | |
| }, | |
| clearManagedListeners: function() { | |
| var l = this | |
| , j = l.managedListeners ? l.managedListeners.slice() : [] | |
| , k = 0 | |
| , h = j.length; | |
| for (; k < h; k++) { | |
| l.removeManagedListenerItem(true, j[k]) | |
| } | |
| l.managedListeners = [] | |
| }, | |
| removeManagedListenerItem: function(i, h, m, j, l, k) { | |
| if (i || (h.item === m && h.ename === j && (!l || h.fn === l) && (!k || h.scope === k))) { | |
| h.item.doRemoveListener(h.ename, h.fn, h.scope, h.options); | |
| if (!i) { | |
| Ext.Array.remove(this.managedListeners, h) | |
| } | |
| } | |
| }, | |
| hasListener: function(h) { | |
| h = Ext.canonicalEventName(h); | |
| return !!this.hasListeners[h] | |
| }, | |
| isSuspended: function(j) { | |
| var i = this.eventsSuspended > 0 | |
| , h = this.events; | |
| if (!i && j && h) { | |
| j = h[j]; | |
| if (j && j.isEvent) { | |
| return j.isSuspended() | |
| } | |
| } | |
| return i | |
| }, | |
| suspendEvents: function(h) { | |
| ++this.eventsSuspended; | |
| if (h && !this.eventQueue) { | |
| this.eventQueue = [] | |
| } | |
| }, | |
| suspendEvent: function() { | |
| var n = this, l = n.events, h = arguments.length, k, m, j; | |
| for (k = 0; k < h; k++) { | |
| j = arguments[k]; | |
| j = Ext.canonicalEventName(j); | |
| m = l[j]; | |
| if (!m || !m.isEvent) { | |
| m = n._initEvent(j) | |
| } | |
| m.suspend() | |
| } | |
| }, | |
| resumeEvent: function() { | |
| var k = this.events || 0, h = k && arguments.length, j, l; | |
| for (j = 0; j < h; j++) { | |
| l = k[arguments[j]]; | |
| if (l && l.resume) { | |
| l.resume() | |
| } | |
| } | |
| }, | |
| resumeEvents: function(h) { | |
| var i = this, l = i.eventQueue, k, j; | |
| if (i.eventsSuspended && !--i.eventsSuspended) { | |
| delete i.eventQueue; | |
| if (!h && l) { | |
| k = l.length; | |
| for (j = 0; j < k; j++) { | |
| i.fireEventArgs.apply(i, l[j]) | |
| } | |
| } | |
| } | |
| }, | |
| relayEvents: function(p, q, k) { | |
| var o = this, l = q.length, j = 0, h, m, n = {}; | |
| if (Ext.isObject(q)) { | |
| for (j in q) { | |
| m = q[j]; | |
| n[j] = o.createRelayer(m) | |
| } | |
| } else { | |
| for (; j < l; j++) { | |
| h = q[j]; | |
| n[h] = o.createRelayer(k ? k + h : h) | |
| } | |
| } | |
| o.mon(p, n, null , null , undefined); | |
| return new b(o,p,n) | |
| }, | |
| createRelayer: function(h, i) { | |
| var j = this; | |
| return function() { | |
| return j.fireEventArgs.call(j, h, i ? g.apply(arguments, i) : arguments) | |
| } | |
| }, | |
| enableBubble: function(p) { | |
| if (p) { | |
| var n = this, o = (typeof p == "string") ? arguments : p, k = n.events, m = k && o.length, j, l, h; | |
| for (h = 0; h < m; ++h) { | |
| j = o[h]; | |
| j = Ext.canonicalEventName(j); | |
| l = k[j]; | |
| if (!l || !l.isEvent) { | |
| l = n._initEvent(j) | |
| } | |
| n.hasListeners._incr_(j); | |
| l.bubble = true | |
| } | |
| } | |
| }, | |
| destroy: function() { | |
| this.clearListeners(); | |
| this.callParent() | |
| }, | |
| privates: { | |
| doAddListener: function(k, n, q, r, j, i, l) { | |
| var m = this, h, p, o; | |
| j = j || (r && r.order); | |
| if (j) { | |
| o = (r && r.priority); | |
| if (!o) { | |
| r = r ? Ext.Object.chain(r) : {}; | |
| r.priority = m.$orderToPriority[j] | |
| } | |
| } | |
| k = Ext.canonicalEventName(k); | |
| if (!l && (q && q.isObservable && (q !== m))) { | |
| l = q | |
| } | |
| if (l) { | |
| p = l.managedListeners = l.managedListeners || []; | |
| p.push({ | |
| item: m, | |
| ename: k, | |
| fn: n, | |
| scope: q, | |
| options: r | |
| }) | |
| } | |
| h = (m.events || (m.events = {}))[k]; | |
| if (!h || !h.isEvent) { | |
| h = m._initEvent(k) | |
| } | |
| if (n !== d) { | |
| if (h.addListener(n, q, r, i, l)) { | |
| m.hasListeners._incr_(k) | |
| } | |
| } | |
| }, | |
| doRemoveListener: function(i, k, j) { | |
| var m = this, h = m.events, l; | |
| i = Ext.canonicalEventName(i); | |
| l = h && h[i]; | |
| if (l && l.isEvent) { | |
| if (l.removeListener(k, j)) { | |
| m.hasListeners._decr_(i) | |
| } | |
| } | |
| }, | |
| _initEvent: function(h) { | |
| return ( this.events[h] = new Ext.util.Event(this,h)) | |
| } | |
| }, | |
| deprecated: { | |
| "5.0": { | |
| methods: { | |
| addEvents: null | |
| } | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, [[Ext.mixin.Identifiable.prototype.mixinId || Ext.mixin.Identifiable.$className, Ext.mixin.Identifiable]], [Ext.mixin, "Observable"], function() { | |
| var b = this | |
| , e = b.prototype | |
| , c = function() {} | |
| , g = function(h) { | |
| if (!h.HasListeners) { | |
| var i = h.prototype; | |
| i.$observableMixedIn = 1; | |
| b.prepareClass(h, this); | |
| h.onExtended(function(j, k) { | |
| b.prepareClass(j, null , k) | |
| }); | |
| if (i.onClassMixedIn) { | |
| Ext.override(h, { | |
| onClassMixedIn: function(j) { | |
| g.call(this, j); | |
| this.callParent(arguments) | |
| } | |
| }) | |
| } else { | |
| i.onClassMixedIn = function(j) { | |
| g.call(this, j) | |
| } | |
| } | |
| } | |
| a.call(this, h) | |
| } | |
| , a = e.onClassMixedIn; | |
| c.prototype = { | |
| _decr_: function(i, h) { | |
| if (h == null ) { | |
| h = 1 | |
| } | |
| if (!(this[i] -= h)) { | |
| delete this[i] | |
| } | |
| }, | |
| _incr_: function(h) { | |
| if (this.hasOwnProperty(h)) { | |
| ++this[h] | |
| } else { | |
| this[h] = 1 | |
| } | |
| } | |
| }; | |
| e.HasListeners = b.HasListeners = c; | |
| b.createAlias({ | |
| on: "addListener", | |
| un: "removeListener", | |
| mon: "addManagedListener", | |
| mun: "removeManagedListener", | |
| setListeners: "addListener" | |
| }); | |
| b.observeClass = b.observe; | |
| function d(n) { | |
| var m = (this.methodEvents = this.methodEvents || {})[n], j, i, k, l = this, h; | |
| if (!m) { | |
| this.methodEvents[n] = m = {}; | |
| m.originalFn = this[n]; | |
| m.methodName = n; | |
| m.before = []; | |
| m.after = []; | |
| h = function(q, p, o) { | |
| if ((i = q.apply(p || l, o)) !== undefined) { | |
| if (typeof i == "object") { | |
| if (i.returnValue !== undefined) { | |
| j = i.returnValue | |
| } else { | |
| j = i | |
| } | |
| k = !!i.cancel | |
| } else { | |
| if (i === false) { | |
| k = true | |
| } else { | |
| j = i | |
| } | |
| } | |
| } | |
| } | |
| ; | |
| this[n] = function() { | |
| var q = Array.prototype.slice.call(arguments, 0), p, r, o; | |
| j = i = undefined; | |
| k = false; | |
| for (r = 0, | |
| o = m.before.length; r < o; r++) { | |
| p = m.before[r]; | |
| h(p.fn, p.scope, q); | |
| if (k) { | |
| return j | |
| } | |
| } | |
| if ((i = m.originalFn.apply(l, q)) !== undefined) { | |
| j = i | |
| } | |
| for (r = 0, | |
| o = m.after.length; r < o; r++) { | |
| p = m.after[r]; | |
| h(p.fn, p.scope, q); | |
| if (k) { | |
| return j | |
| } | |
| } | |
| return j | |
| } | |
| } | |
| return m | |
| } | |
| Ext.apply(e, { | |
| onClassMixedIn: g, | |
| beforeMethod: function(j, i, h) { | |
| d.call(this, j).before.push({ | |
| fn: i, | |
| scope: h | |
| }) | |
| }, | |
| afterMethod: function(j, i, h) { | |
| d.call(this, j).after.push({ | |
| fn: i, | |
| scope: h | |
| }) | |
| }, | |
| removeMethodListener: function(n, l, k) { | |
| var m = this.getMethodEvent(n), j, h; | |
| for (j = 0, | |
| h = m.before.length; j < h; j++) { | |
| if (m.before[j].fn == l && m.before[j].scope == k) { | |
| Ext.Array.erase(m.before, j, 1); | |
| return | |
| } | |
| } | |
| for (j = 0, | |
| h = m.after.length; j < h; j++) { | |
| if (m.after[j].fn == l && m.after[j].scope == k) { | |
| Ext.Array.erase(m.after, j, 1); | |
| return | |
| } | |
| } | |
| }, | |
| toggleEventLogging: function(h) { | |
| Ext.util.Observable[h ? "capture" : "releaseCapture"](this, function(i) { | |
| if (Ext.isDefined(Ext.global.console)) { | |
| Ext.global.console.log(i, arguments) | |
| } | |
| }) | |
| } | |
| }) | |
| })); | |
| (Ext.cmd.derive("Ext.util.HashMap", Ext.Base, { | |
| generation: 0, | |
| config: { | |
| keyFn: null | |
| }, | |
| constructor: function(a) { | |
| var c = this, b; | |
| c.mixins.observable.constructor.call(c, a); | |
| c.clear(true); | |
| b = c.getKeyFn(); | |
| if (b) { | |
| c.getKey = b | |
| } | |
| }, | |
| getCount: function() { | |
| return this.length | |
| }, | |
| getData: function(a, b) { | |
| if (b === undefined) { | |
| b = a; | |
| a = this.getKey(b) | |
| } | |
| return [a, b] | |
| }, | |
| getKey: function(a) { | |
| return a.id | |
| }, | |
| add: function(a, c) { | |
| var b = this; | |
| if (arguments.length === 1) { | |
| c = a; | |
| a = b.getKey(c) | |
| } | |
| if (b.containsKey(a)) { | |
| return b.replace(a, c) | |
| } | |
| b.map[a] = c; | |
| ++b.length; | |
| b.generation++; | |
| if (b.hasListeners.add) { | |
| b.fireEvent("add", b, a, c) | |
| } | |
| return c | |
| }, | |
| replace: function(b, d) { | |
| var c = this, e = c.map, a; | |
| if (arguments.length === 1) { | |
| d = b; | |
| b = c.getKey(d) | |
| } | |
| if (!c.containsKey(b)) { | |
| c.add(b, d) | |
| } | |
| a = e[b]; | |
| e[b] = d; | |
| c.generation++; | |
| if (c.hasListeners.replace) { | |
| c.fireEvent("replace", c, b, d, a) | |
| } | |
| return d | |
| }, | |
| remove: function(b) { | |
| var a = this.findKey(b); | |
| if (a !== undefined) { | |
| return this.removeAtKey(a) | |
| } | |
| return false | |
| }, | |
| removeAtKey: function(a) { | |
| var b = this, c; | |
| if (b.containsKey(a)) { | |
| c = b.map[a]; | |
| delete b.map[a]; | |
| --b.length; | |
| b.generation++; | |
| if (b.hasListeners.remove) { | |
| b.fireEvent("remove", b, a, c) | |
| } | |
| return true | |
| } | |
| return false | |
| }, | |
| get: function(a) { | |
| var b = this.map; | |
| return b.hasOwnProperty(a) ? b[a] : undefined | |
| }, | |
| clear: function(a) { | |
| var b = this; | |
| if (a || b.generation) { | |
| b.map = {}; | |
| b.length = 0; | |
| b.generation = a ? 0 : b.generation + 1 | |
| } | |
| if (a !== true && b.hasListeners.clear) { | |
| b.fireEvent("clear", b) | |
| } | |
| return b | |
| }, | |
| containsKey: function(a) { | |
| var b = this.map; | |
| return b.hasOwnProperty(a) && b[a] !== undefined | |
| }, | |
| contains: function(a) { | |
| return this.containsKey(this.findKey(a)) | |
| }, | |
| getKeys: function() { | |
| return this.getArray(true) | |
| }, | |
| getValues: function() { | |
| return this.getArray(false) | |
| }, | |
| getArray: function(d) { | |
| var a = [], b, c = this.map; | |
| for (b in c) { | |
| if (c.hasOwnProperty(b)) { | |
| a.push(d ? b : c[b]) | |
| } | |
| } | |
| return a | |
| }, | |
| each: function(d, c) { | |
| var a = Ext.apply({}, this.map), b, e = this.length; | |
| c = c || this; | |
| for (b in a) { | |
| if (a.hasOwnProperty(b)) { | |
| if (d.call(c, b, a[b], e) === false) { | |
| break | |
| } | |
| } | |
| } | |
| return this | |
| }, | |
| clone: function() { | |
| var c = new this.self(this.initialConfig), b = this.map, a; | |
| c.suspendEvents(); | |
| for (a in b) { | |
| if (b.hasOwnProperty(a)) { | |
| c.add(a, b[a]) | |
| } | |
| } | |
| c.resumeEvents(); | |
| return c | |
| }, | |
| findKey: function(b) { | |
| var a, c = this.map; | |
| for (a in c) { | |
| if (c.hasOwnProperty(a) && c[a] === b) { | |
| return a | |
| } | |
| } | |
| return undefined | |
| }, | |
| destroy: function() { | |
| this.callParent(); | |
| this.map = null | |
| } | |
| }, 1, 0, 0, 0, 0, [[Ext.mixin.Observable.prototype.mixinId || Ext.mixin.Observable.$className, Ext.mixin.Observable]], [Ext.util, "HashMap"], function(b) { | |
| var a = b.prototype; | |
| a.removeByKey = a.removeAtKey | |
| })); | |
| (Ext.cmd.derive("Ext.AbstractManager", Ext.Base, { | |
| typeName: "type", | |
| constructor: function(a) { | |
| Ext.apply(this, a || {}); | |
| this.all = new Ext.util.HashMap(); | |
| this.types = {} | |
| }, | |
| get: function(a) { | |
| return this.all.get(a) | |
| }, | |
| register: function(a) { | |
| this.all.add(a) | |
| }, | |
| unregister: function(a) { | |
| this.all.remove(a) | |
| }, | |
| registerType: function(b, a) { | |
| this.types[b] = a; | |
| a[this.typeName] = b | |
| }, | |
| isRegistered: function(a) { | |
| return this.types[a] !== undefined | |
| }, | |
| create: function(a, d) { | |
| var b = a[this.typeName] || a.type || d | |
| , c = this.types[b]; | |
| return new c(a) | |
| }, | |
| onAvailable: function(g, c, b) { | |
| var a = this.all, d, e; | |
| if (a.containsKey(g)) { | |
| d = a.get(g); | |
| c.call(b || d, d) | |
| } else { | |
| e = function(j, h, i) { | |
| if (h == g) { | |
| c.call(b || i, i); | |
| a.un("add", e) | |
| } | |
| } | |
| ; | |
| a.on("add", e) | |
| } | |
| }, | |
| each: function(b, a) { | |
| this.all.each(b, a || this) | |
| }, | |
| getCount: function() { | |
| return this.all.getCount() | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext, "AbstractManager"], 0)); | |
| (Ext.cmd.derive("Ext.promise.Consequence", Ext.Base, function(a) { | |
| return { | |
| promise: null , | |
| deferred: null , | |
| onFulfilled: null , | |
| onRejected: null , | |
| onProgress: null , | |
| constructor: function(e, b, d) { | |
| var c = this; | |
| c.onFulfilled = e; | |
| c.onRejected = b; | |
| c.onProgress = d; | |
| c.deferred = new Ext.promise.Deferred(); | |
| c.promise = c.deferred.promise | |
| }, | |
| trigger: function(e, d) { | |
| var c = this | |
| , b = c.deferred; | |
| switch (e) { | |
| case "fulfill": | |
| c.propagate(d, c.onFulfilled, b, b.resolve); | |
| break; | |
| case "reject": | |
| c.propagate(d, c.onRejected, b, b.reject); | |
| break | |
| } | |
| }, | |
| update: function(b) { | |
| if (Ext.isFunction(this.onProgress)) { | |
| b = this.onProgress(b) | |
| } | |
| this.deferred.update(b) | |
| }, | |
| propagate: function(d, e, b, c) { | |
| if (Ext.isFunction(e)) { | |
| this.schedule(function() { | |
| try { | |
| b.resolve(e(d)) | |
| } catch (g) { | |
| b.reject(g) | |
| } | |
| }) | |
| } else { | |
| c.call(this.deferred, d) | |
| } | |
| }, | |
| schedule: function(c) { | |
| var b = a.queueSize++; | |
| a.queue[b] = c; | |
| if (!b) { | |
| Ext.asap(a.dispatch) | |
| } | |
| }, | |
| statics: { | |
| queue: new Array(10000), | |
| queueSize: 0, | |
| dispatch: function() { | |
| var b = a.queue, d, c; | |
| for (c = 0; c < a.queueSize; ++c) { | |
| d = b[c]; | |
| b[c] = null ; | |
| d() | |
| } | |
| a.queueSize = 0 | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.promise, "Consequence"], 0)); | |
| (Ext.cmd.derive("Ext.promise.Deferred", Ext.Base, { | |
| promise: null , | |
| consequences: [], | |
| completed: false, | |
| completionAction: null , | |
| completionValue: null , | |
| constructor: function() { | |
| var a = this; | |
| a.promise = new Ext.promise.Promise(a); | |
| a.consequences = []; | |
| a.completed = false; | |
| a.completionAction = null ; | |
| a.completionValue = null | |
| }, | |
| then: function(e, a, d) { | |
| var c = this | |
| , b = new Ext.promise.Consequence(e,a,d); | |
| if (c.completed) { | |
| b.trigger(c.completionAction, c.completionValue) | |
| } else { | |
| c.consequences.push(b) | |
| } | |
| return b.promise | |
| }, | |
| resolve: function(d) { | |
| var c = this, a, b; | |
| if (c.completed) { | |
| return | |
| } | |
| try { | |
| if (d === c.promise) { | |
| throw new TypeError("A Promise cannot be resolved with itself.") | |
| } | |
| if ((Ext.isObject(d) || Ext.isFunction(d)) && Ext.isFunction(b = d.then)) { | |
| a = false; | |
| try { | |
| b.call(d, function(e) { | |
| if (!a) { | |
| a = true; | |
| c.resolve(e) | |
| } | |
| }, function(e) { | |
| if (!a) { | |
| a = true; | |
| c.reject(e) | |
| } | |
| }) | |
| } catch (g) { | |
| if (!a) { | |
| c.reject(g) | |
| } | |
| } | |
| } else { | |
| c.complete("fulfill", d) | |
| } | |
| } catch (g) { | |
| c.reject(g) | |
| } | |
| }, | |
| reject: function(a) { | |
| if (this.completed) { | |
| return | |
| } | |
| this.complete("reject", a) | |
| }, | |
| update: function(b) { | |
| var e = this.consequences, d, c, a; | |
| if (this.completed) { | |
| return | |
| } | |
| for (c = 0, | |
| a = e.length; c < a; c++) { | |
| d = e[c]; | |
| d.update(b) | |
| } | |
| }, | |
| complete: function(g, e) { | |
| var d = this, h = d.consequences, c, b, a; | |
| d.completionAction = g; | |
| d.completionValue = e; | |
| d.completed = true; | |
| for (b = 0, | |
| a = h.length; b < a; b++) { | |
| c = h[b]; | |
| c.trigger(d.completionAction, d.completionValue) | |
| } | |
| d.consequences = null | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.promise, "Deferred"], 0)); | |
| (Ext.cmd.derive("Ext.promise.Promise", Ext.Base, function(b) { | |
| var a; | |
| return { | |
| statics: { | |
| CancellationError: Ext.global.CancellationError || Error, | |
| _ready: function() { | |
| a = Ext.promise.Deferred | |
| }, | |
| all: function(c) { | |
| return b.when(c).then(function(e) { | |
| var n = new a(), j = e.length, g = new Array(j), l, d, m, h, k; | |
| if (!j) { | |
| n.resolve(g) | |
| } else { | |
| m = function(o, i) { | |
| return b.when(o).then(function(p) { | |
| g[i] = p; | |
| if (!--j) { | |
| n.resolve(g) | |
| } | |
| return p | |
| }, function(p) { | |
| return n.reject(p) | |
| }) | |
| } | |
| ; | |
| for (l = h = 0, | |
| k = e.length; h < k; l = ++h) { | |
| d = e[l]; | |
| if (l in e) { | |
| m(d, l) | |
| } else { | |
| j-- | |
| } | |
| } | |
| } | |
| return n.promise | |
| }) | |
| }, | |
| is: function(c) { | |
| return (Ext.isObject(c) || Ext.isFunction(c)) && Ext.isFunction(c.then) | |
| }, | |
| rethrowError: function(c) { | |
| Ext.asap(function() { | |
| throw c | |
| }) | |
| }, | |
| when: function(d) { | |
| var c = new Ext.promise.Deferred(); | |
| c.resolve(d); | |
| return c.promise | |
| } | |
| }, | |
| owner: null , | |
| constructor: function(c) { | |
| this.owner = c | |
| }, | |
| then: function(h, c, g, d) { | |
| var e; | |
| if (arguments.length === 1 && Ext.isObject(arguments[0])) { | |
| e = arguments[0]; | |
| h = e.success; | |
| c = e.failure; | |
| g = e.progress; | |
| d = e.scope | |
| } | |
| if (d) { | |
| if (h) { | |
| h = Ext.Function.bind(h, d) | |
| } | |
| if (c) { | |
| c = Ext.Function.bind(c, d) | |
| } | |
| if (g) { | |
| g = Ext.Function.bind(g, d) | |
| } | |
| } | |
| return this.owner.then(h, c, g) | |
| }, | |
| otherwise: function(c, d) { | |
| var e; | |
| if (arguments.length === 1 && Ext.isObject(arguments[0])) { | |
| e = arguments[0]; | |
| c = e.fn; | |
| d = e.scope | |
| } | |
| if (d != null ) { | |
| c = Ext.Function.bind(c, d) | |
| } | |
| return this.owner.then(null , c) | |
| }, | |
| always: function(c, d) { | |
| var e; | |
| if (arguments.length === 1 && Ext.isObject(arguments[0])) { | |
| e = arguments[0]; | |
| c = e.fn; | |
| d = e.scope | |
| } | |
| if (d != null ) { | |
| c = Ext.Function.bind(c, d) | |
| } | |
| return this.owner.then(function(g) { | |
| try { | |
| c() | |
| } catch (h) { | |
| b.rethrowError(h) | |
| } | |
| return g | |
| }, function(h) { | |
| try { | |
| c() | |
| } catch (g) { | |
| b.rethrowError(g) | |
| } | |
| throw h | |
| }) | |
| }, | |
| done: function() { | |
| this.owner.then(null , b.rethrowError) | |
| }, | |
| cancel: function(c) { | |
| if (c == null ) { | |
| c = null | |
| } | |
| this.owner.reject(new this.self.CancellationError(c)) | |
| }, | |
| log: function(c) { | |
| if (c == null ) { | |
| c = "" | |
| } | |
| return this._owner.then(function(d) { | |
| Ext.log("" + (c || "Promise") + " resolved with value: " + d); | |
| return d | |
| }, function(d) { | |
| Ext.log("" + (c || "Promise") + " rejected with reason: " + d); | |
| throw d | |
| }) | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.promise, "Promise"], function(a) { | |
| a._ready() | |
| })); | |
| (Ext.cmd.derive("Ext.Promise", Ext.Base, function() { | |
| var a; | |
| return { | |
| statics: { | |
| _ready: function() { | |
| a = Ext.promise.Promise | |
| }, | |
| all: function() { | |
| return a.all.apply(a, arguments) | |
| }, | |
| race: function() {}, | |
| reject: function(c) { | |
| var b = new Ext.promise.Deferred(); | |
| b.reject(c); | |
| return b.promise | |
| }, | |
| resolve: function(c) { | |
| var b = new Ext.promise.Deferred(); | |
| b.resolve(c); | |
| return b.promise | |
| } | |
| }, | |
| constructor: function(c) { | |
| var b = new Ext.promise.Deferred(); | |
| c(b.resolve.bind(b), b.reject.bind(b)); | |
| return b.promise | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext, "Promise"], function(a) { | |
| var b = Ext.global.Promise; | |
| if (b && b.resolve) { | |
| Ext.Promise = b | |
| } else { | |
| a._ready() | |
| } | |
| })); | |
| (Ext.cmd.derive("Ext.Deferred", Ext.promise.Deferred, function(b) { | |
| var c, a; | |
| return { | |
| statics: { | |
| _ready: function() { | |
| c = Ext.promise.Promise; | |
| a = Ext.Promise.resolve | |
| }, | |
| all: function() { | |
| return c.all.apply(c, arguments) | |
| }, | |
| any: function(d) { | |
| return b.some(d, 1).then(function(e) { | |
| return e[0] | |
| }, function(e) { | |
| if (e instanceof Error && e.message === "Too few Promises were resolved.") { | |
| Ext.raise("No Promises were resolved.") | |
| } else { | |
| throw e | |
| } | |
| }) | |
| }, | |
| delay: function(d, g) { | |
| var e; | |
| if (arguments.length === 1) { | |
| g = d; | |
| d = undefined | |
| } | |
| g = Math.max(g, 0); | |
| e = new b(); | |
| setTimeout(function() { | |
| e.resolve(d) | |
| }, g); | |
| return e.promise | |
| }, | |
| map: function(d, e) { | |
| return b.resolved(d).then(function(h) { | |
| var p, n, g, l, o, j, k, m; | |
| l = h.length; | |
| j = new Array(h.length); | |
| p = new b(); | |
| if (!l) { | |
| p.resolve(j) | |
| } else { | |
| o = function(q, i) { | |
| return b.resolved(q).then(function(r) { | |
| return e(r, i, j) | |
| }).then(function(r) { | |
| j[i] = r; | |
| if (!--l) { | |
| p.resolve(j) | |
| } | |
| return r | |
| }, function(r) { | |
| return p.reject(r) | |
| }) | |
| } | |
| ; | |
| for (n = k = 0, | |
| m = h.length; k < m; n = ++k) { | |
| g = h[n]; | |
| if (n in h) { | |
| o(g, n) | |
| } else { | |
| l-- | |
| } | |
| } | |
| } | |
| return p.promise | |
| }) | |
| }, | |
| memoize: function(h, g, d) { | |
| var e = Ext.Function.memoize(h, g, d); | |
| return function() { | |
| return b.all(Ext.Array.slice(arguments)).then(function(i) { | |
| return e.apply(g, i) | |
| }) | |
| } | |
| }, | |
| parallel: function(e, g) { | |
| if (g == null ) { | |
| g = null | |
| } | |
| var d = Ext.Array.slice(arguments, 2); | |
| return b.map(e, function(h) { | |
| if (!Ext.isFunction(h)) { | |
| throw new Error("Invalid parameter: expected a function.") | |
| } | |
| return h.apply(g, d) | |
| }) | |
| }, | |
| pipeline: function(e, d, g) { | |
| if (g == null ) { | |
| g = null | |
| } | |
| return b.reduce(e, function(i, h) { | |
| if (!Ext.isFunction(h)) { | |
| throw new Error("Invalid parameter: expected a function.") | |
| } | |
| return h.call(g, i) | |
| }, d) | |
| }, | |
| reduce: function(e, g, d) { | |
| var h = arguments.length === 3; | |
| return b.resolved(e).then(function(j) { | |
| var i = [j, function(l, m, k) { | |
| return b.resolved(l).then(function(n) { | |
| return b.resolved(m).then(function(o) { | |
| return g(n, o, k, j) | |
| }) | |
| }) | |
| } | |
| ]; | |
| if (h) { | |
| i.push(d) | |
| } | |
| return Ext.Array.reduce.apply(Ext.Array, i) | |
| }) | |
| }, | |
| rejected: function(e) { | |
| var d = new Ext.Deferred(); | |
| d.reject(e); | |
| return d.promise | |
| }, | |
| resolved: function(e) { | |
| var d = new Ext.Deferred(); | |
| d.resolve(e); | |
| return d.promise | |
| }, | |
| sequence: function(e, g) { | |
| if (g == null ) { | |
| g = null | |
| } | |
| var d = Ext.Array.slice(arguments, 2); | |
| return b.reduce(e, function(h, i) { | |
| if (!Ext.isFunction(i)) { | |
| throw new Error("Invalid parameter: expected a function.") | |
| } | |
| return b.resolved(i.apply(g, d)).then(function(j) { | |
| h.push(j); | |
| return h | |
| }) | |
| }, []) | |
| }, | |
| some: function(e, d) { | |
| return b.resolved(e).then(function(j) { | |
| var r, n, p, q, h, g, l, o, k, m; | |
| o = []; | |
| l = d; | |
| g = (j.length - l) + 1; | |
| r = new b(); | |
| if (j.length < d) { | |
| r.reject(new Error("Too few Promises were resolved.")) | |
| } else { | |
| q = function(i) { | |
| if (l > 0) { | |
| o.push(i) | |
| } | |
| l--; | |
| if (l === 0) { | |
| r.resolve(o) | |
| } | |
| return i | |
| } | |
| ; | |
| p = function(i) { | |
| g--; | |
| if (g === 0) { | |
| r.reject(new Error("Too few Promises were resolved.")) | |
| } | |
| return i | |
| } | |
| ; | |
| for (n = k = 0, | |
| m = j.length; k < m; n = ++k) { | |
| h = j[n]; | |
| if (n in j) { | |
| b.resolved(h).then(q, p) | |
| } | |
| } | |
| } | |
| return r.promise | |
| }) | |
| }, | |
| timeout: function(d, g) { | |
| var e = new b(), h; | |
| h = setTimeout(function() { | |
| if (h) { | |
| e.reject(new Error("Promise timed out.")) | |
| } | |
| }, g); | |
| b.resolved(d).then(function(i) { | |
| clearTimeout(h); | |
| h = null ; | |
| e.resolve(i) | |
| }, function(i) { | |
| clearTimeout(h); | |
| h = null ; | |
| e.reject(i) | |
| }); | |
| return e.promise | |
| } | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext, "Deferred"], function(a) { | |
| a._ready() | |
| })); | |
| Ext.Factory = function(a) { | |
| var b = this; | |
| b.aliasPrefix = a + "."; | |
| b.cache = {}; | |
| b.name = a.replace(b.fixNameRe, b.fixNameFn); | |
| b.type = a | |
| } | |
| ; | |
| Ext.Factory.prototype = { | |
| defaultProperty: "type", | |
| instanceProp: "isInstance", | |
| create: function(c, e) { | |
| var i = this, a = Ext.ClassManager, b = i.cache, d, h, g, j; | |
| if (c) { | |
| if (c[i.instanceProp]) { | |
| return c | |
| } | |
| if (typeof c === "string") { | |
| j = c; | |
| c = {}; | |
| c[i.defaultProperty] = j | |
| } | |
| h = c.xclass; | |
| j = c.type | |
| } | |
| if (h) { | |
| if (!(g = a.get(h))) { | |
| return a.instantiate(h, c) | |
| } | |
| } else { | |
| if (!(j = j || e || i.defaultType)) { | |
| g = i.defaultClass | |
| } | |
| if (!g && !(g = b[j])) { | |
| d = i.aliasPrefix + j; | |
| h = a.getNameByAlias(d); | |
| if (!(g = h && a.get(h))) { | |
| return a.instantiateByAlias(d, c) | |
| } | |
| b[j] = g | |
| } | |
| } | |
| return g.isInstance ? g : new g(c) | |
| }, | |
| fixNameRe: /\.[a-z]/ig, | |
| fixNameFn: function(a) { | |
| return a.substring(1).toUpperCase() | |
| }, | |
| clearCache: function() { | |
| this.cache = {} | |
| } | |
| }; | |
| Ext.Factory.define = function(g, d) { | |
| var a = Ext.Factory, b, c, e; | |
| if (g.constructor === Object) { | |
| Ext.Object.each(g, a.define, a) | |
| } else { | |
| c = new Ext.Factory(g); | |
| if (d) { | |
| if (d.constructor === Object) { | |
| Ext.apply(c, d); | |
| if (typeof (b = c.xclass) === "string") { | |
| c.defaultClass = Ext.ClassManager.get(b) | |
| } | |
| } else { | |
| c.defaultType = d | |
| } | |
| } | |
| a[c.name] = e = c.create.bind(c); | |
| e.instance = c | |
| } | |
| return e | |
| } | |
| ; | |
| (Ext.cmd.derive("Ext.mixin.Factoryable", Ext.Base, { | |
| mixinId: "factoryable", | |
| onClassMixedIn: function(g) { | |
| var e = g.prototype, h = e.factoryConfig, d = e.alias, c = {}, b, a; | |
| d = d && d.length && d[0]; | |
| if (d && (b = d.lastIndexOf(".")) > 0) { | |
| c.type = d.substring(0, b); | |
| c.defaultType = d.substring(b + 1) | |
| } | |
| if (h) { | |
| delete e.factoryConfig; | |
| Ext.apply(c, h) | |
| } | |
| a = Ext.Factory.define(c.type, c); | |
| if (g.create === Ext.Base.create) { | |
| g.create = a | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.mixin, "Factoryable"], 0)); | |
| (Ext.cmd.derive("Ext.data.request.Base", Ext.Base, { | |
| factoryConfig: { | |
| type: "request", | |
| defaultType: "ajax" | |
| }, | |
| result: null , | |
| success: null , | |
| timer: null , | |
| constructor: function(a) { | |
| var b = this; | |
| Ext.apply(b, a.options || {}, a.ownerConfig); | |
| b.id = ++Ext.data.Connection.requestId; | |
| b.owner = a.owner; | |
| b.options = a.options; | |
| b.requestOptions = a.requestOptions | |
| }, | |
| start: function() { | |
| var a = this | |
| , b = a.getTimeout(); | |
| if (b && a.async) { | |
| a.timer = Ext.defer(a.onTimeout, b, a) | |
| } | |
| }, | |
| abort: function() { | |
| var a = this; | |
| a.clearTimer(); | |
| if (!a.timedout) { | |
| a.aborted = true | |
| } | |
| a.abort = Ext.emptyFn | |
| }, | |
| createDeferred: function() { | |
| return ( this.deferred = new Ext.Deferred()) | |
| }, | |
| getDeferred: function() { | |
| return this.deferred || this.createDeferred() | |
| }, | |
| getPromise: function() { | |
| return this.getDeferred().promise | |
| }, | |
| then: function() { | |
| var a = this.getPromise(); | |
| return a.then.apply(a, arguments) | |
| }, | |
| onComplete: function() { | |
| var c = this | |
| , b = c.deferred | |
| , a = c.result; | |
| c.clearTimer(); | |
| if (b) { | |
| if (c.success) { | |
| b.resolve(a) | |
| } else { | |
| b.reject(a) | |
| } | |
| } | |
| }, | |
| onTimeout: function() { | |
| var a = this; | |
| a.timedout = true; | |
| a.timer = null ; | |
| a.abort(true) | |
| }, | |
| getTimeout: function() { | |
| return this.timeout | |
| }, | |
| clearTimer: function() { | |
| var a = this.timer; | |
| if (a) { | |
| clearTimeout(a); | |
| this.timer = null | |
| } | |
| }, | |
| destroy: function() { | |
| var a = this; | |
| a.abort(); | |
| a.owner = a.options = a.requestOptions = a.result = null ; | |
| a.callParent() | |
| }, | |
| privates: { | |
| createException: function() { | |
| var b = this, a; | |
| a = { | |
| request: b, | |
| requestId: b.id, | |
| status: b.aborted ? -1 : 0, | |
| statusText: b.aborted ? "transaction aborted" : "communication failure", | |
| getResponseHeader: b._getHeader, | |
| getAllResponseHeaders: b._getHeaders | |
| }; | |
| if (b.aborted) { | |
| a.aborted = true | |
| } | |
| if (b.timedout) { | |
| a.timedout = true | |
| } | |
| return a | |
| }, | |
| _getHeader: function(a) { | |
| var b = this.headers; | |
| return b && b[a.toLowerCase()] | |
| }, | |
| _getHeaders: function() { | |
| return this.headers | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, [[Ext.mixin.Factoryable.prototype.mixinId || Ext.mixin.Factoryable.$className, Ext.mixin.Factoryable]], [Ext.data.request, "Base"], 0)); | |
| (Ext.cmd.derive("Ext.data.flash.BinaryXhr", Ext.Base, { | |
| statics: { | |
| flashPluginActivated: function() { | |
| Ext.data.flash.BinaryXhr.flashPluginActive = true; | |
| Ext.data.flash.BinaryXhr.flashPlugin = document.getElementById("ext-flash-polyfill"); | |
| Ext.GlobalEvents.fireEvent("flashready") | |
| }, | |
| flashPluginActive: false, | |
| flashPluginInjected: false, | |
| connectionIndex: 1, | |
| liveConnections: {}, | |
| flashPlugin: null , | |
| onFlashStateChange: function(d, c, b) { | |
| var a; | |
| a = this.liveConnections[Number(d)]; | |
| if (a) { | |
| a.onFlashStateChange(c, b) | |
| } | |
| }, | |
| registerConnection: function(b) { | |
| var a = this.connectionIndex; | |
| this.conectionIndex = this.connectionIndex + 1; | |
| this.liveConnections[a] = b; | |
| return a | |
| }, | |
| injectFlashPlugin: function() { | |
| var b = this, a, c; | |
| b.flashPolyfillEl = Ext.getBody().appendChild({ | |
| id: "ext-flash-polyfill", | |
| cn: [{ | |
| tag: "p", | |
| html: "To view this page ensure that Adobe Flash Player version 11.1.0 or greater is installed." | |
| }, { | |
| tag: "a", | |
| href: "http://www.adobe.com/go/getflashplayer", | |
| cn: [{ | |
| tag: "img", | |
| src: window.location.protocol + "//www.adobe.com/images/shared/download_buttons/get_flash_player.gif", | |
| alt: "Get Adobe Flash player" | |
| }] | |
| }] | |
| }); | |
| a = [Ext.Loader.getPath("Ext.data.Connection"), "../../../plugins/flash/swfobject.js"].join("/"); | |
| c = "/plugins/flash/FlashPlugin.swf"; | |
| if (Ext.flashPluginPath) { | |
| c = Ext.flashPluginPath | |
| } | |
| Ext.Loader.loadScript({ | |
| url: a, | |
| onLoad: function() { | |
| var e = "11.4.0"; | |
| var h = "playerProductInstall.swf"; | |
| var d = {}; | |
| var i = {}; | |
| i.quality = "high"; | |
| i.bgcolor = "#ffffff"; | |
| i.allowscriptaccess = "sameDomain"; | |
| i.allowfullscreen = "true"; | |
| var g = {}; | |
| g.id = "ext-flash-polyfill"; | |
| g.name = "polyfill"; | |
| g.align = "middle"; | |
| swfobject.embedSWF(c, "ext-flash-polyfill", "0", "0", e, h, d, i, g) | |
| }, | |
| onError: function() {}, | |
| scope: b | |
| }); | |
| Ext.data.flash.BinaryXhr.flashPluginInjected = true | |
| } | |
| }, | |
| readyState: 0, | |
| status: 0, | |
| statusText: "", | |
| responseBytes: null , | |
| javascriptId: null , | |
| constructor: function(a) { | |
| if (!Ext.data.flash.BinaryXhr.flashPluginInjected) { | |
| Ext.data.flash.BinaryXhr.injectFlashPlugin() | |
| } | |
| var b = this; | |
| Ext.apply(b, a); | |
| b.requestHeaders = {} | |
| }, | |
| abort: function() { | |
| var a = this; | |
| if (a.readyState == 4) { | |
| return | |
| } | |
| a.aborted = true; | |
| if (!Ext.data.flash.BinaryXhr.flashPluginActive) { | |
| Ext.GlobalEvents.removeListener("flashready", a.onFlashReady, a); | |
| return | |
| } | |
| Ext.data.flash.BinaryXhr.flashPlugin.abortRequest(a.javascriptId); | |
| delete Ext.data.flash.BinaryXhr.liveConnections[a.javascriptId] | |
| }, | |
| getAllResponseHeaders: function() { | |
| var a = []; | |
| Ext.Object.each(this.responseHeaders, function(b, c) { | |
| a.push(b + ": " + c) | |
| }); | |
| return a.join("\r\n") | |
| }, | |
| getResponseHeader: function(b) { | |
| var a = this.responseHeaders; | |
| return (a && a[b]) || null | |
| }, | |
| open: function(g, c, d, a, b) { | |
| var e = this; | |
| e.method = g; | |
| e.url = c; | |
| e.async = d !== false; | |
| e.user = a; | |
| e.password = b | |
| }, | |
| overrideMimeType: function(a) { | |
| this.mimeType = a | |
| }, | |
| send: function(a) { | |
| var b = this; | |
| b.body = a; | |
| if (!Ext.data.flash.BinaryXhr.flashPluginActive) { | |
| Ext.GlobalEvents.addListener("flashready", b.onFlashReady, b) | |
| } else { | |
| this.onFlashReady() | |
| } | |
| }, | |
| onFlashReady: function() { | |
| var c = this, b, a; | |
| c.javascriptId = Ext.data.flash.BinaryXhr.registerConnection(c); | |
| b = { | |
| method: c.method, | |
| url: c.url, | |
| user: c.user, | |
| password: c.password, | |
| mimeType: c.mimeType, | |
| requestHeaders: c.requestHeaders, | |
| body: c.body, | |
| javascriptId: c.javascriptId | |
| }; | |
| a = Ext.data.flash.BinaryXhr.flashPlugin.postBinary(b) | |
| }, | |
| setReadyState: function(b) { | |
| var a = this; | |
| if (a.readyState != b) { | |
| a.readyState = b; | |
| a.onreadystatechange() | |
| } | |
| }, | |
| setRequestHeader: function(b, a) { | |
| this.requestHeaders[b] = a | |
| }, | |
| onreadystatechange: Ext.emptyFn, | |
| parseData: function(b) { | |
| var a = this; | |
| this.status = b.status || 0; | |
| a.responseHeaders = {}; | |
| if (a.mimeType) { | |
| a.responseHeaders["content-type"] = a.mimeType | |
| } | |
| if (b.reason == "complete") { | |
| this.responseBytes = b.data; | |
| a.responseHeaders["content-length"] = b.data.length | |
| } else { | |
| if (b.reason == "error" || b.reason == "securityError") { | |
| this.statusText = b.text; | |
| a.responseHeaders["content-length"] = 0 | |
| } | |
| } | |
| }, | |
| onFlashStateChange: function(c, b) { | |
| var a = this; | |
| if (c == 4) { | |
| a.parseData(b); | |
| delete Ext.data.flash.BinaryXhr.liveConnections[a.javascriptId] | |
| } | |
| a.setReadyState(c) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.data.flash, "BinaryXhr"], 0)); | |
| (Ext.cmd.derive("Ext.data.request.Ajax", Ext.data.request.Base, { | |
| statics: { | |
| parseStatus: function(a) { | |
| a = a == 1223 ? 204 : a; | |
| var c = (a >= 200 && a < 300) || a == 304 | |
| , b = false; | |
| if (!c) { | |
| switch (a) { | |
| case 12002: | |
| case 12029: | |
| case 12030: | |
| case 12031: | |
| case 12152: | |
| case 13030: | |
| b = true; | |
| break | |
| } | |
| } | |
| return { | |
| success: c, | |
| isException: b | |
| } | |
| } | |
| }, | |
| start: function(e) { | |
| var c = this, b = c.options, a = c.requestOptions, d = c.isXdr, h, g; | |
| h = c.xhr = c.openRequest(b, a, c.async, c.username, c.password); | |
| if (!d) { | |
| g = c.setupHeaders(h, b, a.data, a.params) | |
| } | |
| if (c.async) { | |
| if (!d) { | |
| h.onreadystatechange = Ext.Function.bind(c.onStateChange, c) | |
| } | |
| } | |
| if (d) { | |
| c.processXdrRequest(c, h) | |
| } | |
| Ext.data.request.Base.prototype.start.call(this, e); | |
| h.send(e); | |
| if (!c.async) { | |
| return c.onComplete() | |
| } | |
| return c | |
| }, | |
| abort: function(b) { | |
| var a = this | |
| , d = a.xhr; | |
| if (b || a.isLoading()) { | |
| try { | |
| d.onreadystatechange = null | |
| } catch (c) { | |
| d.onreadystatechange = Ext.emptyFn | |
| } | |
| d.abort(); | |
| Ext.data.request.Base.prototype.abort.call(this, b); | |
| a.onComplete(); | |
| a.cleanup() | |
| } | |
| }, | |
| cleanup: function() { | |
| this.xhr = null ; | |
| delete this.xhr | |
| }, | |
| isLoading: function() { | |
| var a = this | |
| , d = a.xhr | |
| , b = d && d.readyState | |
| , c = Ext.data.flash && Ext.data.flash.BinaryXhr; | |
| if (!d || a.aborted || a.timedout) { | |
| return false | |
| } | |
| if (c && d instanceof c) { | |
| return b !== 4 | |
| } | |
| return b !== 0 && b !== 4 | |
| }, | |
| openRequest: function(c, a, d, h, b) { | |
| var e = this | |
| , g = e.newRequest(c); | |
| if (h) { | |
| g.open(a.method, a.url, d, h, b) | |
| } else { | |
| if (e.isXdr) { | |
| g.open(a.method, a.url) | |
| } else { | |
| g.open(a.method, a.url, d) | |
| } | |
| } | |
| if (c.binary || e.binary) { | |
| if (window.Uint8Array) { | |
| g.responseType = "arraybuffer" | |
| } else { | |
| if (g.overrideMimeType) { | |
| g.overrideMimeType("text/plain; charset=x-user-defined") | |
| } | |
| } | |
| } | |
| if (c.withCredentials || e.withCredentials) { | |
| g.withCredentials = true | |
| } | |
| return g | |
| }, | |
| newRequest: function(a) { | |
| var b = this, c; | |
| if (a.binaryData) { | |
| if (window.Uint8Array) { | |
| c = b.getXhrInstance() | |
| } else { | |
| c = new Ext.data.flash.BinaryXhr() | |
| } | |
| } else { | |
| if (b.cors && Ext.isIE9m) { | |
| c = b.getXdrInstance(); | |
| b.isXdr = true | |
| } else { | |
| c = b.getXhrInstance(); | |
| b.isXdr = false | |
| } | |
| } | |
| return c | |
| }, | |
| setupHeaders: function(o, p, g, d) { | |
| var k = this, b = Ext.apply({}, p.headers || {}, k.defaultHeaders), n = k.defaultPostHeader, l = p.jsonData, a = p.xmlData, j = "Content-Type", c = k.useDefaultXhrHeader, m, h; | |
| if (!b.hasOwnProperty(j) && (g || d)) { | |
| if (g) { | |
| if (p.rawData) { | |
| n = "text/plain" | |
| } else { | |
| if (a && Ext.isDefined(a)) { | |
| n = "text/xml" | |
| } else { | |
| if (l && Ext.isDefined(l)) { | |
| n = "application/json" | |
| } | |
| } | |
| } | |
| } | |
| b[j] = n | |
| } | |
| if (c && !b["X-Requested-With"]) { | |
| b["X-Requested-With"] = k.defaultXhrHeader | |
| } | |
| if (b[j] === undefined || b[j] === null ) { | |
| delete b[j] | |
| } | |
| try { | |
| for (m in b) { | |
| if (b.hasOwnProperty(m)) { | |
| h = b[m]; | |
| o.setRequestHeader(m, h) | |
| } | |
| } | |
| } catch (i) { | |
| k.owner.fireEvent("exception", m, h) | |
| } | |
| return b | |
| }, | |
| getXdrInstance: function() { | |
| var a; | |
| if (Ext.ieVersion >= 8) { | |
| a = new XDomainRequest() | |
| } else { | |
| Ext.raise({ | |
| msg: "Your browser does not support CORS" | |
| }) | |
| } | |
| return a | |
| }, | |
| getXhrInstance: (function() { | |
| var b = [function() { | |
| return new XMLHttpRequest() | |
| } | |
| , function() { | |
| return new ActiveXObject("MSXML2.XMLHTTP.3.0") | |
| } | |
| , function() { | |
| return new ActiveXObject("MSXML2.XMLHTTP") | |
| } | |
| , function() { | |
| return new ActiveXObject("Microsoft.XMLHTTP") | |
| } | |
| ], c = 0, a = b.length, g; | |
| for (; c < a; ++c) { | |
| try { | |
| g = b[c]; | |
| g(); | |
| break | |
| } catch (d) {} | |
| } | |
| return g | |
| }()), | |
| processXdrRequest: function(b, c) { | |
| var a = this; | |
| delete b.headers; | |
| b.contentType = b.options.contentType || a.defaultXdrContentType; | |
| c.onload = Ext.Function.bind(a.onStateChange, a, [true]); | |
| c.onerror = c.ontimeout = Ext.Function.bind(a.onStateChange, a, [false]) | |
| }, | |
| processXdrResponse: function(a, b) { | |
| a.getAllResponseHeaders = function() { | |
| return [] | |
| } | |
| ; | |
| a.getResponseHeader = function() { | |
| return "" | |
| } | |
| ; | |
| a.contentType = b.contentType || this.defaultXdrContentType | |
| }, | |
| onStateChange: function(b) { | |
| var c = this | |
| , d = c.xhr | |
| , a = Ext.GlobalEvents; | |
| if ((d && d.readyState == 4) || c.isXdr) { | |
| c.clearTimer(); | |
| c.onComplete(b); | |
| c.cleanup(); | |
| if (a.hasListeners.idle) { | |
| a.fireEvent("idle") | |
| } | |
| } | |
| }, | |
| onComplete: function(j) { | |
| var g = this, a = g.owner, k = g.options, i = g.xhr, b = { | |
| success: false, | |
| isException: false | |
| }, l, h, c; | |
| if (!i || g.destroyed) { | |
| return g.result = b | |
| } | |
| try { | |
| l = Ext.data.request.Ajax.parseStatus(i.status); | |
| if (l.success) { | |
| l.success = i.readyState === 4 | |
| } | |
| } catch (d) { | |
| l = b | |
| } | |
| h = g.success = g.isXdr ? j : l.success; | |
| if (h) { | |
| c = g.createResponse(i); | |
| a.fireEvent("requestcomplete", a, c, k); | |
| Ext.callback(k.success, k.scope, [c, k]) | |
| } else { | |
| if (l.isException || g.aborted || g.timedout) { | |
| c = g.createException(i) | |
| } else { | |
| c = g.createResponse(i) | |
| } | |
| a.fireEvent("requestexception", a, c, k); | |
| Ext.callback(k.failure, k.scope, [c, k]) | |
| } | |
| g.result = c; | |
| Ext.callback(k.callback, k.scope, [k, h, c]); | |
| a.onRequestComplete(g); | |
| Ext.data.request.Base.prototype.onComplete.call(this, j); | |
| return c | |
| }, | |
| createResponse: function(j) { | |
| var h = this, c = h.isXdr, b = {}, k = c ? [] : j.getAllResponseHeaders().replace(/\r\n/g, "\n").split("\n"), e = k.length, l, g, i, d, a; | |
| while (e--) { | |
| l = k[e]; | |
| g = l.indexOf(":"); | |
| if (g >= 0) { | |
| i = l.substr(0, g).toLowerCase(); | |
| if (l.charAt(g + 1) == " ") { | |
| ++g | |
| } | |
| b[i] = l.substr(g + 1) | |
| } | |
| } | |
| d = { | |
| request: h, | |
| requestId: h.id, | |
| status: j.status, | |
| statusText: j.statusText, | |
| getResponseHeader: function(m) { | |
| return b[m.toLowerCase()] | |
| }, | |
| getAllResponseHeaders: function() { | |
| return b | |
| } | |
| }; | |
| if (c) { | |
| h.processXdrResponse(d, j) | |
| } | |
| if (h.binary) { | |
| d.responseBytes = h.getByteArray(j) | |
| } else { | |
| d.responseText = j.responseText; | |
| d.responseXML = j.responseXML | |
| } | |
| return d | |
| }, | |
| destroy: function() { | |
| this.xhr = null ; | |
| Ext.data.request.Base.prototype.destroy.call(this) | |
| }, | |
| privates: { | |
| getByteArray: function(k) { | |
| var c = k.response, b = k.responseBody, l = Ext.data.flash && Ext.data.flash.BinaryXhr, a, j, g, d; | |
| if (k instanceof l) { | |
| a = k.responseBytes | |
| } else { | |
| if (window.Uint8Array) { | |
| a = c ? new Uint8Array(c) : [] | |
| } else { | |
| if (Ext.isIE9p) { | |
| try { | |
| a = new VBArray(b).toArray() | |
| } catch (h) { | |
| a = [] | |
| } | |
| } else { | |
| if (Ext.isIE) { | |
| if (!this.self.vbScriptInjected) { | |
| this.injectVBScript() | |
| } | |
| getIEByteArray(k.responseBody, a = []) | |
| } else { | |
| a = []; | |
| j = k.responseText; | |
| g = j.length; | |
| for (d = 0; d < g; d++) { | |
| a.push(j.charCodeAt(d) & 255) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return a | |
| }, | |
| injectVBScript: function() { | |
| var a = document.createElement("script"); | |
| a.type = "text/vbscript"; | |
| a.text = ["Function getIEByteArray(byteArray, out)", "Dim len, i", "len = LenB(byteArray)", "For i = 1 to len", "out.push(AscB(MidB(byteArray, i, 1)))", "Next", "End Function"].join("\n"); | |
| Ext.getHead().dom.appendChild(a); | |
| this.self.vbScriptInjected = true | |
| } | |
| } | |
| }, 0, 0, 0, 0, ["request.ajax"], 0, [Ext.data.request, "Ajax"], 0)); | |
| (Ext.cmd.derive("Ext.data.request.Form", Ext.data.request.Base, { | |
| start: function(d) { | |
| var c = this | |
| , b = c.options | |
| , a = c.requestOptions; | |
| Ext.data.request.Base.prototype.start.call(this, d); | |
| c.form = c.upload(b.form, a.url, a.data, b); | |
| return c | |
| }, | |
| abort: function(b) { | |
| var a = this, d; | |
| if (a.isLoading()) { | |
| try { | |
| d = a.frame.dom; | |
| if (d.stop) { | |
| d.stop() | |
| } else { | |
| d.document.execCommand("Stop") | |
| } | |
| } catch (c) {} | |
| } | |
| Ext.data.request.Base.prototype.abort.call(this, b); | |
| a.onComplete(); | |
| a.cleanup() | |
| }, | |
| cleanup: function() { | |
| var a = this | |
| , b = a.frame; | |
| if (b) { | |
| b.un("load", a.onComplete, a); | |
| Ext.removeNode(b) | |
| } | |
| a.frame = a.form = null | |
| }, | |
| isLoading: function() { | |
| return !!this.frame | |
| }, | |
| upload: function(b, i, u, g) { | |
| b = Ext.getDom(b); | |
| g = g || {}; | |
| var s = document.createElement("iframe"), m = Ext.get(s), o = m.id, c = [], d = "multipart/form-data", t = { | |
| target: b.target, | |
| method: b.method, | |
| encoding: b.encoding, | |
| enctype: b.enctype, | |
| action: b.action | |
| }, a = function(h, v) { | |
| j = document.createElement("input"); | |
| Ext.fly(j).set({ | |
| type: "hidden", | |
| value: v, | |
| name: h | |
| }); | |
| b.appendChild(j); | |
| c.push(j) | |
| } | |
| , j, l, q, w, p, k, n, r, e; | |
| m.set({ | |
| name: o, | |
| cls: "x-hidden-display", | |
| src: Ext.SSL_SECURE_URL, | |
| tabIndex: -1 | |
| }); | |
| document.body.appendChild(s); | |
| if (document.frames) { | |
| document.frames[o].name = o | |
| } | |
| Ext.fly(b).set({ | |
| target: o, | |
| method: "POST", | |
| enctype: d, | |
| encoding: d, | |
| action: i || t.action | |
| }); | |
| if (u) { | |
| l = Ext.Object.fromQueryString(u) || {}; | |
| for (w in l) { | |
| if (l.hasOwnProperty(w)) { | |
| q = l[w]; | |
| if (Ext.isArray(q)) { | |
| p = q.length; | |
| for (k = 0; k < p; k++) { | |
| a(w, q[k]) | |
| } | |
| } else { | |
| a(w, q) | |
| } | |
| } | |
| } | |
| } | |
| this.frame = m; | |
| m.on({ | |
| load: this.onComplete, | |
| scope: this, | |
| single: !Ext.isOpera | |
| }); | |
| b.submit(); | |
| Ext.fly(b).set(t); | |
| for (n = c.length, | |
| r = 0; r < n; r++) { | |
| Ext.removeNode(c[r]) | |
| } | |
| return b | |
| }, | |
| getDoc: function() { | |
| var a = this.frame.dom; | |
| return (a && (a.contentWindow.document || a.contentDocument)) || (window.frames[a.id] || {}).document | |
| }, | |
| getTimeout: function() { | |
| return this.options.timeout | |
| }, | |
| onComplete: function() { | |
| var h = this, b = h.frame, a = h.owner, l = h.options, j, i, k, d, c; | |
| if (!b) { | |
| return | |
| } | |
| if (h.aborted || h.timedout) { | |
| h.result = c = h.createException(); | |
| c.responseXML = null ; | |
| c.responseText = '{success:false,message:"' + Ext.String.trim(c.statusText) + '"}'; | |
| j = l.failure; | |
| k = false | |
| } else { | |
| try { | |
| i = h.getDoc(); | |
| h.result = c = { | |
| responseText: "", | |
| responseXML: null | |
| }; | |
| if (i) { | |
| if (Ext.isOpera && i.location == Ext.SSL_SECURE_URL) { | |
| return | |
| } | |
| if (i.body) { | |
| if ((d = i.body.firstChild) && /pre/i.test(d.tagName)) { | |
| c.responseText = d.textContent || d.innerText | |
| } else { | |
| if ((d = i.getElementsByTagName("textarea")[0]) ) { | |
| c.responseText = d.value | |
| } else { | |
| c.responseText = i.body.textContent || i.body.innerText | |
| } | |
| } | |
| } | |
| c.responseXML = i.XMLDocument || i; | |
| j = l.success; | |
| k = true; | |
| c.status = 200 | |
| } else { | |
| Ext.raise("Could not acquire a suitable connection for the file upload service.") | |
| } | |
| } catch (g) { | |
| h.result = c = h.createException(); | |
| c.status = 400; | |
| c.statusText = (g.message || g.description) + ""; | |
| c.responseText = '{success:false,message:"' + Ext.String.trim(c.statusText) + '"}'; | |
| c.responseXML = null ; | |
| j = l.failure; | |
| k = false | |
| } | |
| } | |
| h.frame = null ; | |
| h.success = k; | |
| a.fireEvent(k ? "requestcomplete" : "requestexception", a, c, l); | |
| Ext.callback(j, l.scope, [c, l]); | |
| Ext.callback(l.callback, l.scope, [l, k, c]); | |
| a.onRequestComplete(h); | |
| Ext.asap(b.destroy, b); | |
| Ext.data.request.Base.prototype.onComplete.call(this) | |
| }, | |
| destroy: function() { | |
| this.cleanup(); | |
| Ext.data.request.Base.prototype.destroy.call(this) | |
| } | |
| }, 0, 0, 0, 0, ["request.form"], 0, [Ext.data.request, "Form"], 0)); | |
| (Ext.cmd.derive("Ext.data.Connection", Ext.Base, { | |
| statics: { | |
| requestId: 0 | |
| }, | |
| enctypeRe: /multipart\/form-data/i, | |
| config: { | |
| url: null , | |
| async: true, | |
| username: "", | |
| password: "", | |
| disableCaching: true, | |
| withCredentials: false, | |
| binary: false, | |
| cors: false, | |
| isXdr: false, | |
| defaultXdrContentType: "text/plain", | |
| disableCachingParam: "_dc", | |
| timeout: 30000, | |
| extraParams: null , | |
| autoAbort: false, | |
| method: null , | |
| defaultHeaders: null , | |
| defaultPostHeader: "application/x-www-form-urlencoded; charset=UTF-8", | |
| useDefaultXhrHeader: true, | |
| defaultXhrHeader: "XMLHttpRequest" | |
| }, | |
| constructor: function(a) { | |
| this.mixins.observable.constructor.call(this, a); | |
| this.requests = {} | |
| }, | |
| request: function(b) { | |
| b = b || {}; | |
| var d = this, a, c; | |
| if (d.fireEvent("beforerequest", d, b) !== false) { | |
| a = d.setOptions(b, b.scope || Ext.global); | |
| c = d.createRequest(b, a); | |
| return c.start(a.data) | |
| } | |
| Ext.callback(b.callback, b.scope, [b, undefined, undefined]); | |
| return Ext.Deferred.rejected([b, undefined, undefined]) | |
| }, | |
| createRequest: function(b, a) { | |
| var e = this, c = b.type || a.type, d; | |
| if (!c) { | |
| c = e.isFormUpload(b) ? "form" : "ajax" | |
| } | |
| if (b.autoAbort || e.getAutoAbort()) { | |
| e.abort() | |
| } | |
| d = Ext.Factory.request({ | |
| type: c, | |
| owner: e, | |
| options: b, | |
| requestOptions: a, | |
| ownerConfig: e.getConfig() | |
| }); | |
| e.requests[d.id] = d; | |
| e.latestId = d.id; | |
| return d | |
| }, | |
| isFormUpload: function(a) { | |
| var b = this.getForm(a); | |
| if (b) { | |
| return a.isUpload || this.enctypeRe.test(b.getAttribute("enctype")) | |
| } | |
| return false | |
| }, | |
| getForm: function(a) { | |
| return Ext.getDom(a.form) | |
| }, | |
| setOptions: function(m, l) { | |
| var j = this, e = m.params || {}, i = j.getExtraParams(), d = m.urlParams, c = m.url || j.getUrl(), h = m.cors, k = m.jsonData, b, a, g; | |
| if (h !== undefined) { | |
| j.setCors(h) | |
| } | |
| if (Ext.isFunction(e)) { | |
| e = e.call(l, m) | |
| } | |
| if (Ext.isFunction(c)) { | |
| c = c.call(l, m) | |
| } | |
| c = this.setupUrl(m, c); | |
| g = m.rawData || m.binaryData || m.xmlData || k || null ; | |
| if (k && !Ext.isPrimitive(k)) { | |
| g = Ext.encode(g) | |
| } | |
| if (m.binaryData) { | |
| if (j.nativeBinaryPostSupport()) { | |
| g = (new Uint8Array(m.binaryData)); | |
| if ((Ext.isChrome && Ext.chromeVersion < 22) || Ext.isSafari || Ext.isGecko) { | |
| g = g.buffer | |
| } | |
| } | |
| } | |
| if (Ext.isObject(e)) { | |
| e = Ext.Object.toQueryString(e) | |
| } | |
| if (Ext.isObject(i)) { | |
| i = Ext.Object.toQueryString(i) | |
| } | |
| e = e + ((i) ? ((e) ? "&" : "") + i : ""); | |
| d = Ext.isObject(d) ? Ext.Object.toQueryString(d) : d; | |
| e = this.setupParams(m, e); | |
| b = (m.method || j.getMethod() || ((e || g) ? "POST" : "GET")).toUpperCase(); | |
| this.setupMethod(m, b); | |
| a = m.disableCaching !== false ? (m.disableCaching || j.getDisableCaching()) : false; | |
| if (b === "GET" && a) { | |
| c = Ext.urlAppend(c, (m.disableCachingParam || j.getDisableCachingParam()) + "=" + (new Date().getTime())) | |
| } | |
| if ((b == "GET" || g) && e) { | |
| c = Ext.urlAppend(c, e); | |
| e = null | |
| } | |
| if (d) { | |
| c = Ext.urlAppend(c, d) | |
| } | |
| return { | |
| url: c, | |
| method: b, | |
| data: g || e || null | |
| } | |
| }, | |
| setupUrl: function(b, a) { | |
| var c = this.getForm(b); | |
| if (c) { | |
| a = a || c.action | |
| } | |
| return a | |
| }, | |
| setupParams: function(a, d) { | |
| var c = this.getForm(a), b; | |
| if (c && !this.isFormUpload(a)) { | |
| b = Ext.Element.serializeForm(c); | |
| d = d ? (d + "&" + b) : b | |
| } | |
| return d | |
| }, | |
| setupMethod: function(a, b) { | |
| if (this.isFormUpload(a)) { | |
| return "POST" | |
| } | |
| return b | |
| }, | |
| isLoading: function(a) { | |
| if (!a) { | |
| a = this.getLatest() | |
| } | |
| return a ? a.isLoading() : false | |
| }, | |
| abort: function(a) { | |
| if (!a) { | |
| a = this.getLatest() | |
| } | |
| if (a && a.isLoading()) { | |
| a.abort() | |
| } | |
| }, | |
| abortAll: function() { | |
| var b = this.requests, a; | |
| for (a in b) { | |
| this.abort(b[a]) | |
| } | |
| }, | |
| getLatest: function() { | |
| var b = this.latestId, a; | |
| if (b) { | |
| a = this.requests[b] | |
| } | |
| return a || null | |
| }, | |
| clearTimeout: function(a) { | |
| if (!a) { | |
| a = this.getLatest() | |
| } | |
| if (a) { | |
| a.clearTimer() | |
| } | |
| }, | |
| onRequestComplete: function(a) { | |
| delete this.requests[a.id] | |
| }, | |
| nativeBinaryPostSupport: function() { | |
| return Ext.isChrome || (Ext.isSafari && Ext.isDefined(window.Uint8Array)) || (Ext.isGecko && Ext.isDefined(window.Uint8Array)) | |
| } | |
| }, 1, 0, 0, 0, 0, [["observable", Ext.mixin.Observable]], [Ext.data, "Connection"], 0)); | |
| (Ext.cmd.derive("Ext.Ajax", Ext.data.Connection, { | |
| singleton: true, | |
| autoAbort: false | |
| }, 0, 0, 0, 0, 0, 0, [Ext, "Ajax"], 0)); | |
| (Ext.cmd.derive("Ext.AnimationQueue", Ext.Base, { | |
| singleton: true, | |
| constructor: function() { | |
| var a = this; | |
| a.queue = []; | |
| a.taskQueue = []; | |
| a.runningQueue = []; | |
| a.idleQueue = []; | |
| a.isRunning = false; | |
| a.isIdle = true; | |
| a.run = Ext.Function.bind(a.run, a); | |
| if (Ext.os.is.iOS) { | |
| Ext.interval(a.watch, 500, a) | |
| } | |
| }, | |
| start: function(c, b, a) { | |
| var d = this; | |
| d.queue.push(arguments); | |
| if (!d.isRunning) { | |
| if (d.hasOwnProperty("idleTimer")) { | |
| clearTimeout(d.idleTimer); | |
| delete d.idleTimer | |
| } | |
| if (d.hasOwnProperty("idleQueueTimer")) { | |
| clearTimeout(d.idleQueueTimer); | |
| delete d.idleQueueTimer | |
| } | |
| d.isIdle = false; | |
| d.isRunning = true; | |
| d.doStart() | |
| } | |
| }, | |
| watch: function() { | |
| if (this.isRunning && Ext.now() - this.lastRunTime >= 500) { | |
| this.run() | |
| } | |
| }, | |
| run: function() { | |
| var e = this; | |
| if (!e.isRunning) { | |
| return | |
| } | |
| var a = e.runningQueue, b = Ext.now(), c, d; | |
| e.lastRunTime = b; | |
| e.frameStartTime = b; | |
| a.push.apply(a, e.queue); | |
| for (c = 0, | |
| d = a.length; c < d; c++) { | |
| e.invoke(a[c]) | |
| } | |
| a.length = 0; | |
| e.doIterate() | |
| }, | |
| doStart: function() { | |
| this.animationFrameId = Ext.Function.requestAnimationFrame(this.run); | |
| this.lastRunTime = Ext.now() | |
| }, | |
| doIterate: function() { | |
| this.animationFrameId = Ext.Function.requestAnimationFrame(this.run) | |
| }, | |
| doStop: function() { | |
| Ext.Function.cancelAnimationFrame(this.animationFrameId) | |
| }, | |
| stop: function(e, d, b) { | |
| var j = this; | |
| if (!j.isRunning) { | |
| return | |
| } | |
| var a = j.queue, h = a.length, c, g; | |
| for (c = 0; c < h; c++) { | |
| g = a[c]; | |
| if (g[0] === e && g[1] === d && g[2] === b) { | |
| a.splice(c, 1); | |
| c--; | |
| h-- | |
| } | |
| } | |
| if (h === 0) { | |
| j.doStop(); | |
| j.isRunning = false; | |
| j.idleTimer = Ext.defer(j.whenIdle, 100, j) | |
| } | |
| }, | |
| onIdle: function(e, d, a) { | |
| var c = this.idleQueue, b, g, h; | |
| for (b = 0, | |
| g = c.length; b < g; b++) { | |
| h = c[b]; | |
| if (e === h[0] && d === h[1] && a === h[2]) { | |
| return | |
| } | |
| } | |
| c.push(arguments); | |
| if (this.isIdle) { | |
| this.processIdleQueue() | |
| } | |
| }, | |
| unIdle: function(e, d, a) { | |
| var c = this.idleQueue, b, g, h; | |
| for (b = 0, | |
| g = c.length; b < g; b++) { | |
| h = c[b]; | |
| if (e === h[0] && d === h[1] && a === h[2]) { | |
| c.splice(b, 1); | |
| return true | |
| } | |
| } | |
| return false | |
| }, | |
| queueTask: function(c, b, a) { | |
| this.taskQueue.push(arguments); | |
| this.processTaskQueue() | |
| }, | |
| dequeueTask: function(e, d, a) { | |
| var c = this.taskQueue, b, g, h; | |
| for (b = 0, | |
| g = c.length; b < g; b++) { | |
| h = c[b]; | |
| if (e === h[0] && d === h[1] && a === h[2]) { | |
| c.splice(b, 1); | |
| b--; | |
| g-- | |
| } | |
| } | |
| }, | |
| invoke: function(d) { | |
| var c = d[0] | |
| , b = d[1] | |
| , a = d[2]; | |
| c = (typeof c == "string" ? b[c] : c); | |
| if (Ext.isArray(a)) { | |
| c.apply(b, a) | |
| } else { | |
| c.call(b, a) | |
| } | |
| }, | |
| whenIdle: function() { | |
| this.isIdle = true; | |
| this.processIdleQueue() | |
| }, | |
| processIdleQueue: function() { | |
| if (!this.hasOwnProperty("idleQueueTimer")) { | |
| this.idleQueueTimer = Ext.defer(this.processIdleQueueItem, 1, this) | |
| } | |
| }, | |
| processIdleQueueItem: function() { | |
| delete this.idleQueueTimer; | |
| if (!this.isIdle) { | |
| return | |
| } | |
| var a = this.idleQueue, b; | |
| if (a.length > 0) { | |
| b = a.shift(); | |
| this.invoke(b); | |
| this.processIdleQueue() | |
| } | |
| }, | |
| processTaskQueue: function() { | |
| if (!this.hasOwnProperty("taskQueueTimer")) { | |
| this.taskQueueTimer = Ext.defer(this.processTaskQueueItem, 15, this) | |
| } | |
| }, | |
| processTaskQueueItem: function() { | |
| delete this.taskQueueTimer; | |
| var a = this.taskQueue, b; | |
| if (a.length > 0) { | |
| b = a.shift(); | |
| this.invoke(b); | |
| this.processTaskQueue() | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext, "AnimationQueue"], 0)); | |
| (Ext.cmd.derive("Ext.ComponentManager", Ext.Base, { | |
| alternateClassName: "Ext.ComponentMgr", | |
| singleton: true, | |
| count: 0, | |
| typeName: "xtype", | |
| constructor: function(a) { | |
| var b = this; | |
| Ext.apply(b, a || {}); | |
| b.all = {}; | |
| b.references = {}; | |
| b.onAvailableCallbacks = {} | |
| }, | |
| create: function(a, b) { | |
| if (typeof a === "string") { | |
| return Ext.widget(a) | |
| } | |
| if (a.isComponent) { | |
| return a | |
| } | |
| if ("xclass"in a) { | |
| return Ext.create(a.xclass, a) | |
| } | |
| return Ext.widget(a.xtype || b, a) | |
| }, | |
| get: function(a) { | |
| return this.all[a] | |
| }, | |
| register: function(a) { | |
| var e = this | |
| , d = e.all | |
| , c = a.getId() | |
| , b = e.onAvailableCallbacks; | |
| d[c] = a; | |
| if (a.getReference && a.getReference()) { | |
| e.references[c] = a | |
| } | |
| ++e.count; | |
| if (!e.hasFocusListener) { | |
| Ext.on("focus", e.onGlobalFocus, e); | |
| e.hasFocusListener = true | |
| } | |
| b = b && b[c]; | |
| if (b && b.length) { | |
| e.notifyAvailable(a) | |
| } | |
| }, | |
| unregister: function(a) { | |
| var b = a.getId(); | |
| if (a.getReference && a.getReference()) { | |
| this.references[b] = null ; | |
| delete this.references[b] | |
| } | |
| this.all[b] = null ; | |
| delete this.all[b]; | |
| this.count-- | |
| }, | |
| markReferencesDirty: function() { | |
| this.referencesDirty = true | |
| }, | |
| fixReferences: function() { | |
| var c = this, b = c.references, a; | |
| if (c.referencesDirty) { | |
| for (a in b) { | |
| if (b.hasOwnProperty(a)) { | |
| b[a].fixReference() | |
| } | |
| } | |
| c.referencesDirty = false | |
| } | |
| }, | |
| onAvailable: function(h, c, b) { | |
| var g = this, e = g.onAvailableCallbacks, a = g.all, d; | |
| if (h in a) { | |
| d = a[h]; | |
| c.call(b || d, d) | |
| } else { | |
| if (h) { | |
| if (!Ext.isArray(e[h])) { | |
| e[h] = [] | |
| } | |
| e[h].push(function(i) { | |
| c.call(b || i, i) | |
| }) | |
| } | |
| } | |
| }, | |
| notifyAvailable: function(b) { | |
| var a = this.onAvailableCallbacks[b && b.getId()] || []; | |
| while (a.length) { | |
| (a.shift())(b) | |
| } | |
| }, | |
| each: function(b, a) { | |
| return Ext.Object.each(this.all, b, a) | |
| }, | |
| getCount: function() { | |
| return this.count | |
| }, | |
| getAll: function() { | |
| return Ext.Object.getValues(this.all) | |
| }, | |
| getActiveComponent: function() { | |
| return Ext.Component.fromElement(Ext.dom.Element.getActiveElement()) | |
| }, | |
| onGlobalFocus: function(i) { | |
| var d = this, b = i.toElement, j = i.fromElement, h = Ext.Component.fromElement(b), a = Ext.Component.fromElement(j), c, g; | |
| if (h === a) { | |
| return | |
| } | |
| c = d.getCommonAncestor(a, h); | |
| if (a && !(a.destroyed || a.destroying)) { | |
| if (a.handleBlurEvent) { | |
| a.handleBlurEvent(i) | |
| } | |
| for (g = a; g && g !== c; g = g.getRefOwner()) { | |
| if (!(g.destroyed || g.destroying)) { | |
| g.onFocusLeave({ | |
| event: i.event, | |
| type: "focusleave", | |
| target: j, | |
| relatedTarget: b, | |
| fromComponent: a, | |
| toComponent: h | |
| }) | |
| } | |
| } | |
| } | |
| if (h && !h.destroyed) { | |
| if (h.handleFocusEvent) { | |
| h.handleFocusEvent(i) | |
| } | |
| for (g = h; g && g !== c; g = g.getRefOwner()) { | |
| g.onFocusEnter({ | |
| event: i.event, | |
| type: "focusenter", | |
| relatedTarget: j, | |
| target: b, | |
| fromComponent: a, | |
| toComponent: h | |
| }) | |
| } | |
| } | |
| }, | |
| getCommonAncestor: function(b, a) { | |
| if (b === a) { | |
| return b | |
| } | |
| while (b && !(b.isAncestor(a) || b === a)) { | |
| b = b.getRefOwner() | |
| } | |
| return b | |
| }, | |
| privates: { | |
| clearAll: function() { | |
| this.all = {}; | |
| this.references = {}; | |
| this.onAvailableCallbacks = {} | |
| }, | |
| fromElement: function(b, d, c) { | |
| var h = Ext.getDom(b), a = this.all, e = 0, j, g, i; | |
| if (typeof d !== "number") { | |
| j = Ext.getDom(d); | |
| d = Number.MAX_VALUE | |
| } | |
| while (h && h.nodeType === 1 && e < d && h !== j) { | |
| g = h.getAttribute("data-componentid") || h.id; | |
| if (g) { | |
| i = a[g]; | |
| if (i && (!c || Ext.ComponentQuery.is(i, c))) { | |
| return i | |
| } | |
| e++ | |
| } | |
| h = h.parentNode | |
| } | |
| return null | |
| } | |
| }, | |
| deprecated: { | |
| 5: { | |
| methods: { | |
| isRegistered: null , | |
| registerType: null | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext, "ComponentManager", Ext, "ComponentMgr"], function() { | |
| Ext.getCmp = function(a) { | |
| return Ext.ComponentManager.get(a) | |
| } | |
| })); | |
| Ext.ns("Ext.util").Operators = { | |
| "=": function(b, c) { | |
| return b == c | |
| }, | |
| "!=": function(b, c) { | |
| return b != c | |
| }, | |
| "^=": function(b, c) { | |
| return b && b.substr(0, c.length) == c | |
| }, | |
| "$=": function(b, c) { | |
| return b && b.substr(b.length - c.length) == c | |
| }, | |
| "*=": function(b, c) { | |
| return b && b.indexOf(c) !== -1 | |
| }, | |
| "%=": function(b, c) { | |
| return (b % c) === 0 | |
| }, | |
| "|=": function(b, c) { | |
| return b && (b == c || b.substr(0, c.length + 1) == c + "-") | |
| }, | |
| "~=": function(b, c) { | |
| return b && (" " + b + " ").indexOf(" " + c + " ") != -1 | |
| } | |
| }; | |
| (Ext.cmd.derive("Ext.util.LruCache", Ext.util.HashMap, { | |
| config: { | |
| maxSize: null | |
| }, | |
| add: function(a, e) { | |
| var d = this, c, b; | |
| d.removeAtKey(a); | |
| b = d.last; | |
| c = { | |
| prev: b, | |
| next: null , | |
| key: a, | |
| value: e | |
| }; | |
| if (b) { | |
| b.next = c | |
| } else { | |
| d.first = c | |
| } | |
| d.last = c; | |
| Ext.util.HashMap.prototype.add.call(this, a, c); | |
| d.prune(); | |
| return e | |
| }, | |
| insertBefore: function(b, g, c) { | |
| var e = this, a, d; | |
| if (c = this.map[this.findKey(c)]) { | |
| a = e.findKey(g); | |
| if (a) { | |
| e.unlinkEntry(d = e.map[a]) | |
| } else { | |
| d = { | |
| prev: c.prev, | |
| next: c, | |
| key: b, | |
| value: g | |
| } | |
| } | |
| if (c.prev) { | |
| d.prev.next = d | |
| } else { | |
| e.first = d | |
| } | |
| d.next = c; | |
| c.prev = d; | |
| e.prune(); | |
| return g | |
| } else { | |
| return e.add(b, g) | |
| } | |
| }, | |
| get: function(a) { | |
| var b = this.map[a]; | |
| if (b) { | |
| if (b.next) { | |
| this.moveToEnd(b) | |
| } | |
| return b.value | |
| } | |
| }, | |
| removeAtKey: function(a) { | |
| this.unlinkEntry(this.map[a]); | |
| return Ext.util.HashMap.prototype.removeAtKey.apply(this, arguments) | |
| }, | |
| clear: function(a) { | |
| this.first = this.last = null ; | |
| return Ext.util.HashMap.prototype.clear.call(this, a) | |
| }, | |
| unlinkEntry: function(a) { | |
| if (a) { | |
| if (a.next) { | |
| a.next.prev = a.prev | |
| } else { | |
| this.last = a.prev | |
| } | |
| if (a.prev) { | |
| a.prev.next = a.next | |
| } else { | |
| this.first = a.next | |
| } | |
| a.prev = a.next = null | |
| } | |
| }, | |
| moveToEnd: function(a) { | |
| this.unlinkEntry(a); | |
| if (a.prev = this.last) { | |
| this.last.next = a | |
| } else { | |
| this.first = a | |
| } | |
| this.last = a | |
| }, | |
| getArray: function(c) { | |
| var a = [] | |
| , b = this.first; | |
| while (b) { | |
| a.push(c ? b.key : b.value); | |
| b = b.next | |
| } | |
| return a | |
| }, | |
| each: function(c, b, a) { | |
| var g = this | |
| , e = a ? g.last : g.first | |
| , d = g.length; | |
| b = b || g; | |
| while (e) { | |
| if (c.call(b, e.key, e.value, d) === false) { | |
| break | |
| } | |
| e = a ? e.prev : e.next | |
| } | |
| return g | |
| }, | |
| findKey: function(b) { | |
| var a, c = this.map; | |
| for (a in c) { | |
| if (c.hasOwnProperty(a) && c[a].value === b) { | |
| return a | |
| } | |
| } | |
| return undefined | |
| }, | |
| clone: function() { | |
| var a = new this.self(this.initialConfig), c = this.map, b; | |
| a.suspendEvents(); | |
| for (b in c) { | |
| if (c.hasOwnProperty(b)) { | |
| a.add(b, c[b].value) | |
| } | |
| } | |
| a.resumeEvents(); | |
| return a | |
| }, | |
| prune: function() { | |
| var b = this | |
| , a = b.getMaxSize() | |
| , c = a ? (b.length - a) : 0; | |
| if (c > 0) { | |
| for (; b.first && c; c--) { | |
| b.removeAtKey(b.first.key) | |
| } | |
| } | |
| }, | |
| destroy: function() { | |
| this.first = this.last = null ; | |
| Ext.util.HashMap.prototype.destroy.call(this) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util, "LruCache"], 0)); | |
| (Ext.cmd.derive("Ext.ComponentQuery", Ext.Base, { | |
| singleton: true | |
| }, 0, 0, 0, 0, 0, 0, [Ext, "ComponentQuery"], function() { | |
| var g = this | |
| , s = Ext.util.Operators | |
| , k = /(\d*)n\+?(\d*)/ | |
| , e = /\D/ | |
| , m = /^(\s)+/ | |
| , l = /\\(.)/g | |
| , n = new Ext.util.LruCache({ | |
| maxSize: 100 | |
| }) | |
| , o = ["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("") | |
| , p = function(u, t) { | |
| return t.method.apply(this, [u].concat(t.args)) | |
| } | |
| , a = function(v, z) { | |
| var t = [], w = 0, y = v.length, x, u = z !== ">"; | |
| for (; w < y; w++) { | |
| x = v[w]; | |
| if (x.getRefItems) { | |
| t = t.concat(x.getRefItems(u)) | |
| } | |
| } | |
| return t | |
| } | |
| , h = function(u) { | |
| var t = [], v = 0, x = u.length, w; | |
| for (; v < x; v++) { | |
| w = u[v]; | |
| while (!!(w = w.getRefOwner())) { | |
| t.push(w) | |
| } | |
| } | |
| return t | |
| } | |
| , d = function(u, z, y) { | |
| if (z === "*") { | |
| return u.slice() | |
| } else { | |
| var t = [], v = 0, x = u.length, w; | |
| for (; v < x; v++) { | |
| w = u[v]; | |
| if (w.isXType(z, y)) { | |
| t.push(w) | |
| } | |
| } | |
| return t | |
| } | |
| } | |
| , b = function(C, D, w, v) { | |
| var G = [], B = 0, u = C.length, F, y, E, t, A, z, x; | |
| if (D.charAt(0) === "@") { | |
| F = true; | |
| D = D.substr(1) | |
| } | |
| if (D.charAt(0) === "?") { | |
| F = true; | |
| y = true; | |
| D = D.substr(1) | |
| } | |
| for (; B < u; B++) { | |
| E = C[B]; | |
| x = E.getConfigurator && E.self.$config.configs[D]; | |
| if (x) { | |
| t = E[x.names.get]() | |
| } else { | |
| if (F && !E.hasOwnProperty(D)) { | |
| continue | |
| } else { | |
| t = E[D] | |
| } | |
| } | |
| if (y) { | |
| G.push(E) | |
| } else { | |
| if (w === "~=") { | |
| if (t) { | |
| if (!Ext.isArray(t)) { | |
| t = t.split(" ") | |
| } | |
| for (A = 0, | |
| z = t.length; A < z; A++) { | |
| if (s[w](Ext.coerce(t[A], v), v)) { | |
| G.push(E); | |
| break | |
| } | |
| } | |
| } | |
| } else { | |
| if (w === "/=") { | |
| if (t != null && v.test(t)) { | |
| G.push(E) | |
| } | |
| } else { | |
| if (!v ? !!E[D] : s[w](Ext.coerce(t, v), v)) { | |
| G.push(E) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return G | |
| } | |
| , i = function(u, y) { | |
| var t = [], v = 0, x = u.length, w; | |
| for (; v < x; v++) { | |
| w = u[v]; | |
| if (w.getItemId() === y) { | |
| t.push(w) | |
| } | |
| } | |
| return t | |
| } | |
| , r = function(t, u, v) { | |
| return g.pseudos[u](t, v) | |
| } | |
| , j = /^(\s?([>\^])\s?|\s|$)/ | |
| , q = /^(#)?((?:\\\.|[\w\-])+|\*)(?:\((true|false)\))?/ | |
| , c = [{ | |
| re: /^\.((?:\\\.|[\w\-])+)(?:\((true|false)\))?/, | |
| method: d, | |
| argTransform: function(t) { | |
| if (t[1] !== undefined) { | |
| t[1] = t[1].replace(l, "$1") | |
| } | |
| return t.slice(1) | |
| } | |
| }, { | |
| re: /^(?:\[((?:[@?$])?[\w\-]*)\s*(?:([\^$*~%!\/]?=)\s*(['"])?((?:\\\]|.)*?)\3)?(?!\\)\])/, | |
| method: b, | |
| argTransform: function(w) { | |
| var t = w[0], x = w[1], u = w[2], v = w[4], y; | |
| if (v !== undefined) { | |
| v = v.replace(l, "$1") | |
| } | |
| if (u === "/=") { | |
| y = n.get(v); | |
| if (y) { | |
| v = y | |
| } else { | |
| v = n.add(v, new RegExp(v)) | |
| } | |
| } | |
| return [x, u, v] | |
| } | |
| }, { | |
| re: /^#((?:\\\.|[\w\-])+)/, | |
| method: i | |
| }, { | |
| re: /^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/, | |
| method: r, | |
| argTransform: function(t) { | |
| if (t[2] !== undefined) { | |
| t[2] = t[2].replace(l, "$1") | |
| } | |
| return t.slice(1) | |
| } | |
| }, { | |
| re: /^(?:\{([^\}]+)\})/, | |
| method: o | |
| }]; | |
| g.Query = Ext.extend(Object, { | |
| constructor: function(t) { | |
| t = t || {}; | |
| Ext.apply(this, t) | |
| }, | |
| execute: function(v) { | |
| var w = this.operations, u = [], y, x, t; | |
| for (x = 0, | |
| t = w.length; x < t; x++) { | |
| y = w[x]; | |
| u = u.concat(this._execute(v, y)) | |
| } | |
| return u | |
| }, | |
| _execute: function(u, w) { | |
| var x = 0, y = w.length, v, t; | |
| if (!u) { | |
| t = Ext.ComponentManager.getAll() | |
| } else { | |
| if (Ext.isIterable(u)) { | |
| t = u | |
| } else { | |
| if (u.isMixedCollection) { | |
| t = u.items | |
| } | |
| } | |
| } | |
| for (; x < y; x++) { | |
| v = w[x]; | |
| if (v.mode === "^") { | |
| t = h(t || [u]) | |
| } else { | |
| if (v.mode) { | |
| t = a(t || [u], v.mode) | |
| } else { | |
| t = p(t || a([u]), v) | |
| } | |
| } | |
| if (x === y - 1) { | |
| return t | |
| } | |
| } | |
| return [] | |
| }, | |
| is: function(w) { | |
| var v = this.operations, u = false, t = v.length, y, x; | |
| if (t === 0) { | |
| return true | |
| } | |
| for (x = 0; x < t; x++) { | |
| y = v[x]; | |
| u = this._is(w, y); | |
| if (u) { | |
| return u | |
| } | |
| } | |
| return false | |
| }, | |
| _is: function(B, t) { | |
| var z = t.length, u = [B], v, x, w, y, A, C; | |
| for (x = z - 1; x >= 0; --x) { | |
| v = t[x]; | |
| y = v.mode; | |
| if (y) { | |
| if (y === "^") { | |
| u = a(u, " ") | |
| } else { | |
| if (y === ">") { | |
| A = []; | |
| for (w = 0, | |
| z = u.length; w < z; ++w) { | |
| C = u[w].getRefOwner(); | |
| if (C) { | |
| A.push(C) | |
| } | |
| } | |
| u = A | |
| } else { | |
| u = h(u) | |
| } | |
| } | |
| if (u.length === 0) { | |
| return false | |
| } | |
| } else { | |
| u = p(u, v); | |
| if (u.length === 0) { | |
| return false | |
| } | |
| } | |
| } | |
| return true | |
| }, | |
| getMatches: function(w, u) { | |
| var t = u.length, v; | |
| for (v = 0; v < t; ++v) { | |
| w = p(w, u[v]); | |
| if (w.length === 0) { | |
| break | |
| } | |
| } | |
| return w | |
| }, | |
| isMultiMatch: function() { | |
| return this.operations.length > 1 | |
| } | |
| }); | |
| Ext.apply(g, { | |
| cache: new Ext.util.LruCache({ | |
| maxSize: 100 | |
| }), | |
| pseudos: { | |
| not: function(z, t) { | |
| var x = 0, y = z.length, w = [], v = -1, u; | |
| for (; x < y; ++x) { | |
| u = z[x]; | |
| if (!g.is(u, t)) { | |
| w[++v] = u | |
| } | |
| } | |
| return w | |
| }, | |
| first: function(u) { | |
| var t = []; | |
| if (u.length > 0) { | |
| t.push(u[0]) | |
| } | |
| return t | |
| }, | |
| last: function(v) { | |
| var t = v.length | |
| , u = []; | |
| if (t > 0) { | |
| u.push(v[t - 1]) | |
| } | |
| return u | |
| }, | |
| focusable: function(u) { | |
| var t = u.length, w = [], v = 0, x; | |
| for (; v < t; v++) { | |
| x = u[v]; | |
| if (x.isFocusable && x.isFocusable()) { | |
| w.push(x) | |
| } | |
| } | |
| return w | |
| }, | |
| "nth-child": function(z, A) { | |
| var B = [], u = k.exec(A === "even" && "2n" || A === "odd" && "2n+1" || !e.test(A) && "n+" + A || A), x = (u[1] || 1) - 0, y = u[2] - 0, w, t, v; | |
| for (w = 0; t = z[w]; w++) { | |
| v = w + 1; | |
| if (x === 1) { | |
| if (y === 0 || v === y) { | |
| B.push(t) | |
| } | |
| } else { | |
| if ((v + y) % x === 0) { | |
| B.push(t) | |
| } | |
| } | |
| } | |
| return B | |
| }, | |
| scrollable: function(u) { | |
| var t = u.length, w = [], v = 0, x; | |
| for (; v < t; v++) { | |
| x = u[v]; | |
| if (x.scrollable || x._scrollable) { | |
| w.push(x) | |
| } | |
| } | |
| return w | |
| } | |
| }, | |
| query: function(t, A) { | |
| if (!t) { | |
| return Ext.ComponentManager.all.getArray() | |
| } | |
| var v = [], B = [], y = {}, x = g.cache.get(t), w, z, u; | |
| if (!x) { | |
| x = g.cache.add(t, g.parse(t)) | |
| } | |
| v = x.execute(A); | |
| if (x.isMultiMatch()) { | |
| w = v.length; | |
| for (u = 0; u < w; u++) { | |
| z = v[u]; | |
| if (!y[z.id]) { | |
| B.push(z); | |
| y[z.id] = true | |
| } | |
| } | |
| v = B | |
| } | |
| return v | |
| }, | |
| visitPreOrder: function(t, v, x, w, u) { | |
| g._visit(true, t, v, x, w, u) | |
| }, | |
| visitPostOrder: function(t, v, x, w, u) { | |
| g._visit(false, t, v, x, w, u) | |
| }, | |
| _visit: function(D, u, C, B, E, y) { | |
| var A = g.cache.get(u), x = [C], t, z = 0, w, v; | |
| if (!A) { | |
| A = g.cache.add(u, g.parse(u)) | |
| } | |
| v = A.is(C); | |
| if (C.getRefItems) { | |
| t = C.getRefItems(); | |
| z = t.length | |
| } | |
| if (y) { | |
| Ext.Array.push(x, y) | |
| } | |
| if (D) { | |
| if (v) { | |
| if (B.apply(E || C, x) === false) { | |
| return false | |
| } | |
| } | |
| } | |
| for (w = 0; w < z; w++) { | |
| if (g._visit.call(g, D, u, t[w], B, E, y) === false) { | |
| return false | |
| } | |
| } | |
| if (!D) { | |
| if (v) { | |
| if (B.apply(E || C, x) === false) { | |
| return false | |
| } | |
| } | |
| } | |
| }, | |
| is: function(u, t) { | |
| if (!t) { | |
| return true | |
| } | |
| var v = g.cache.get(t); | |
| if (!v) { | |
| v = g.cache.add(t, g.parse(t)) | |
| } | |
| return v.is(u) | |
| }, | |
| parse: function(u) { | |
| var v = [], x, y, w, t; | |
| x = Ext.splitAndUnescape(u, ","); | |
| for (w = 0, | |
| t = x.length; w < t; w++) { | |
| y = Ext.String.trim(x[w]); | |
| v.push(g._parse(y)) | |
| } | |
| return new g.Query({ | |
| operations: v | |
| }) | |
| }, | |
| _parse: function(z) { | |
| var u = [], x = Ext.String.trim, v = c.length, E, A, y, F, G, H, w, B, C, t, D; | |
| while (z && E !== z) { | |
| E = z; | |
| A = z.match(q); | |
| if (A) { | |
| F = A[1]; | |
| y = x(A[2]).replace(l, "$1"); | |
| if (F === "#") { | |
| u.push({ | |
| method: i, | |
| args: [y] | |
| }) | |
| } else { | |
| u.push({ | |
| method: d, | |
| args: [y, Boolean(A[3])] | |
| }) | |
| } | |
| z = z.replace(A[0], "").replace(m, "$1") | |
| } | |
| while (!(G = z.match(j))) { | |
| for (B = 0; z && B < v; B++) { | |
| C = c[B]; | |
| H = z.match(C.re); | |
| t = C.method; | |
| w = C.argTransform; | |
| if (H) { | |
| if (w) { | |
| D = w(H) | |
| } else { | |
| D = H.slice(1) | |
| } | |
| u.push({ | |
| method: Ext.isString(C.method) ? Ext.functionFactory("items", Ext.String.format.apply(Ext.String, [t].concat(H.slice(1)))) : C.method, | |
| args: D | |
| }); | |
| z = z.replace(H[0], "").replace(m, "$1"); | |
| break | |
| } | |
| if (B === (v - 1)) { | |
| Ext.raise('Invalid ComponentQuery selector: "' + arguments[0] + '"') | |
| } | |
| } | |
| } | |
| if (G[1]) { | |
| u.push({ | |
| mode: G[2] || G[1] | |
| }); | |
| z = z.replace(G[0], "").replace(m, "") | |
| } | |
| } | |
| return u | |
| } | |
| }); | |
| Ext.all = function() { | |
| return g.query.apply(g, arguments) | |
| } | |
| ; | |
| Ext.first = function() { | |
| var t = g.query.apply(g, arguments); | |
| return (t && t[0]) || null | |
| } | |
| })); | |
| (Ext.cmd.derive("Ext.Evented", Ext.Base, { | |
| alternateClassName: "Ext.EventedBase", | |
| initialized: false, | |
| constructor: function(a) { | |
| this.mixins.observable.constructor.call(this, a); | |
| this.initialized = true | |
| }, | |
| onClassExtended: function(b, e) { | |
| if (!e.hasOwnProperty("eventedConfig")) { | |
| return | |
| } | |
| var d = e.config, g = e.eventedConfig, c, a; | |
| if (d) { | |
| Ext.applyIf(d, g) | |
| } else { | |
| b.addConfig(g) | |
| } | |
| for (c in g) { | |
| if (g.hasOwnProperty(c)) { | |
| a = Ext.Config.get(c); | |
| e[a.names.set] = a.eventedSetter || a.getEventedSetter() | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, [[Ext.mixin.Observable.prototype.mixinId || Ext.mixin.Observable.$className, Ext.mixin.Observable]], [Ext, "Evented", Ext, "EventedBase"], 0)); | |
| (Ext.cmd.derive("Ext.util.Positionable", Ext.Base, { | |
| mixinId: "positionable", | |
| _positionTopLeft: ["position", "top", "left"], | |
| _alignRe: /^([a-z]+)-([a-z]+)([?!])?$/, | |
| afterSetPosition: Ext.emptyFn, | |
| adjustForConstraints: function(c, b) { | |
| var a = this.getConstrainVector(b, c); | |
| if (a) { | |
| c[0] += a[0]; | |
| c[1] += a[1] | |
| } | |
| return c | |
| }, | |
| alignTo: function(c, a, g, b) { | |
| var e = this | |
| , d = e.el; | |
| return e.setXY(e.getAlignToXY(c, a, g), d.anim && !!b ? d.anim(b) : false) | |
| }, | |
| calculateAnchorXY: function(g, i, h, d) { | |
| var j = this, c = j.el, k = document, e = (c.dom === k.body || c.dom === k), l = Math.round, m, b, a; | |
| g = (g || "tl").toLowerCase(); | |
| d = d || {}; | |
| b = d.width || (e ? Ext.Element.getViewportWidth() : j.getWidth()); | |
| a = d.height || (e ? Ext.Element.getViewportHeight() : j.getHeight()); | |
| switch (g) { | |
| case "tl": | |
| m = [0, 0]; | |
| break; | |
| case "bl": | |
| m = [0, a]; | |
| break; | |
| case "tr": | |
| m = [b, 0]; | |
| break; | |
| case "c": | |
| m = [l(b * 0.5), l(a * 0.5)]; | |
| break; | |
| case "t": | |
| m = [l(b * 0.5), 0]; | |
| break; | |
| case "l": | |
| m = [0, l(a * 0.5)]; | |
| break; | |
| case "r": | |
| m = [b, l(a * 0.5)]; | |
| break; | |
| case "b": | |
| m = [l(b * 0.5), a]; | |
| break; | |
| case "tc": | |
| m = [l(b * 0.5), 0]; | |
| break; | |
| case "bc": | |
| m = [l(b * 0.5), a]; | |
| break; | |
| case "br": | |
| m = [b, a] | |
| } | |
| return [m[0] + i, m[1] + h] | |
| }, | |
| convertPositionSpec: Ext.identityFn, | |
| getAlignToXY: function(j, w, e) { | |
| var z = this, d, v, a, h, r, g, s, t, p, q, u, o, n, b, c, i, l, m, k; | |
| j = Ext.get(j.el || j); | |
| if (!j || !j.dom) {} | |
| e = e || [0, 0]; | |
| w = (!w || w === "?" ? "tl-bl?" : (!(/-/).test(w) && w !== "" ? "tl-" + w : w || "tl-bl")).toLowerCase(); | |
| w = z.convertPositionSpec(w); | |
| a = w.match(z._alignRe); | |
| o = a[1]; | |
| n = a[2]; | |
| u = !!a[3]; | |
| h = z.getAnchorXY(o, true); | |
| r = z.getAnchorToXY(j, n, false); | |
| m = r[0] - h[0] + e[0]; | |
| k = r[1] - h[1] + e[1]; | |
| if (u) { | |
| if (a[3] === "!") { | |
| d = j | |
| } else { | |
| d = z.constrainTo || z.container || z.el.parent() | |
| } | |
| d = Ext.get(d.el || d); | |
| v = d.getConstrainRegion(); | |
| v.right = v.left + d.el.dom.clientWidth; | |
| g = z.getWidth(); | |
| s = z.getHeight(); | |
| t = j.getRegion(); | |
| b = o.charAt(0); | |
| c = o.charAt(o.length - 1); | |
| i = n.charAt(0); | |
| l = n.charAt(n.length - 1); | |
| p = (m < t.right && m + g >= t.left) && ((b == "t" && i == "b") || (b == "b" && i == "t")); | |
| q = (k < t.bottom && k + s >= t.top) && ((c == "r" && l == "l") || (c == "l" && l == "r")); | |
| if (m + g > v.right) { | |
| if (q) { | |
| m = t.left - g; | |
| q = false | |
| } else { | |
| m = v.right - g | |
| } | |
| } | |
| if (m < v.left) { | |
| m = q ? t.right : v.left | |
| } | |
| if (k + s > v.bottom) { | |
| if (p) { | |
| k = t.top - s; | |
| p = false | |
| } else { | |
| k = v.bottom - s | |
| } | |
| } | |
| if (k < v.top) { | |
| k = p ? t.bottom : v.top | |
| } | |
| } | |
| return [m, k] | |
| }, | |
| getAnchorXY: function(d, i, b) { | |
| var h = this | |
| , j = h.getXY() | |
| , a = h.el | |
| , l = document | |
| , c = a.dom == l.body || a.dom == l | |
| , k = a.getScroll() | |
| , g = c ? k.left : i ? 0 : j[0] | |
| , e = c ? k.top : i ? 0 : j[1]; | |
| return h.calculateAnchorXY(d, g, e, b) | |
| }, | |
| getBox: function(d, i) { | |
| var e = this, m = i ? e.getLocalXY() : e.getXY(), j = m[0], g = m[1], k = e.getWidth(), b = e.getHeight(), c, a, l; | |
| if (d) { | |
| c = e.getBorderPadding(); | |
| a = c.beforeX; | |
| l = c.beforeY; | |
| j += a; | |
| g += l; | |
| k -= (a + c.afterX); | |
| b -= (l + c.afterY) | |
| } | |
| return { | |
| x: j, | |
| left: j, | |
| 0: j, | |
| y: g, | |
| top: g, | |
| 1: g, | |
| width: k, | |
| height: b, | |
| right: j + k, | |
| bottom: g + b | |
| } | |
| }, | |
| calculateConstrainedPosition: function(h, b, l, d) { | |
| var k = this, c, i = k.floatParent, e = i ? i.getTargetEl() : null , a, g, j, n = false, m; | |
| if (l && i) { | |
| a = e.getXY(); | |
| g = e.getBorderPadding(); | |
| a[0] += g.beforeX; | |
| a[1] += g.beforeY; | |
| if (b) { | |
| j = [b[0] + a[0], b[1] + a[1]] | |
| } | |
| } else { | |
| j = b | |
| } | |
| h = h || k.constrainTo || e || k.container || k.el.parent(); | |
| if (l && j) { | |
| j = k.reverseTranslateXY(j) | |
| } | |
| c = ((k.constrainHeader && k.header.rendered) ? k.header : k).getConstrainVector(h, j, d); | |
| if (c) { | |
| n = b || k.getPosition(l); | |
| n[0] += c[0]; | |
| n[1] += c[1] | |
| } | |
| return n | |
| }, | |
| getConstrainRegion: function() { | |
| var h = this, c = h.el, a = c.dom.nodeName === "BODY", e = c.dom, g = c.getBorders(), i = c.getXY(), d = i[0] + g.beforeX, j = i[1] + g.beforeY, k, b, l; | |
| if (a) { | |
| k = c.getScroll(); | |
| d = k.left; | |
| j = k.top; | |
| b = Ext.Element.getViewportWidth(); | |
| l = Ext.Element.getViewportHeight() | |
| } else { | |
| b = e.clientWidth; | |
| l = e.clientHeight | |
| } | |
| return new Ext.util.Region(j,d + b,j + l,d) | |
| }, | |
| getConstrainVector: function(h, c, e) { | |
| var a = this.getRegion(), d = [0, 0], b = (this.shadow && this.constrainShadow && !this.shadowDisabled) ? this.shadow.getShadowSize() : undefined, j = false, i, g = this.constraintInsets; | |
| if (!(h instanceof Ext.util.Region)) { | |
| h = Ext.get(h.el || h); | |
| i = h.getViewSize(); | |
| h = h.getConstrainRegion(); | |
| h.right = h.left + i.width; | |
| h.bottom = h.top + i.height | |
| } | |
| if (g) { | |
| g = Ext.isObject(g) ? g : Ext.Element.parseBox(g); | |
| h.adjust(g.top, g.right, g.bottom, g.left) | |
| } | |
| if (c) { | |
| a.translateBy(c[0] - a.x, c[1] - a.y) | |
| } | |
| if (e) { | |
| a.right = a.left + e[0]; | |
| a.bottom = a.top + e[1] | |
| } | |
| if (b) { | |
| h.adjust(b[0], -b[1], -b[2], b[3]) | |
| } | |
| if (a.right > h.right) { | |
| j = true; | |
| d[0] = (h.right - a.right) | |
| } | |
| if (a.left + d[0] < h.left) { | |
| j = true; | |
| d[0] = (h.left - a.left) | |
| } | |
| if (a.bottom > h.bottom) { | |
| j = true; | |
| d[1] = (h.bottom - a.bottom) | |
| } | |
| if (a.top + d[1] < h.top) { | |
| j = true; | |
| d[1] = (h.top - a.top) | |
| } | |
| return j ? d : false | |
| }, | |
| getOffsetsTo: function(a) { | |
| var c = this.getXY() | |
| , b = Ext.fly(a.el || a).getXY(); | |
| return [c[0] - b[0], c[1] - b[1]] | |
| }, | |
| getRegion: function() { | |
| var a = this.getBox(); | |
| return new Ext.util.Region(a.top,a.right,a.bottom,a.left) | |
| }, | |
| getClientRegion: function() { | |
| var b = this, a, c = b.getBox(), d = b.dom; | |
| a = d.offsetWidth - d.clientWidth; | |
| if (a) { | |
| if (b.getStyle("direction") === "rtl") { | |
| c.left += a | |
| } else { | |
| c.right -= a | |
| } | |
| } | |
| a = d.offsetHeight - d.clientHeight; | |
| if (a) { | |
| c.bottom -= a | |
| } | |
| return new Ext.util.Region(c.top,c.right,c.bottom,c.left) | |
| }, | |
| getViewRegion: function() { | |
| var g = this, c = g.el, a = c.dom.nodeName === "BODY", e, j, h, i, d, b, k; | |
| if (a) { | |
| j = c.getScroll(); | |
| d = j.left; | |
| i = j.top; | |
| b = Ext.Element.getViewportWidth(); | |
| k = Ext.Element.getViewportHeight() | |
| } else { | |
| e = g.getBorderPadding(); | |
| h = g.getXY(); | |
| d = h[0] + e.beforeX; | |
| i = h[1] + e.beforeY; | |
| b = g.getWidth(true); | |
| k = g.getHeight(true) | |
| } | |
| return new Ext.util.Region(i,d + b,i + k,d) | |
| }, | |
| move: function(j, b, c) { | |
| var g = this | |
| , m = g.getXY() | |
| , k = m[0] | |
| , i = m[1] | |
| , d = [k - b, i] | |
| , l = [k + b, i] | |
| , h = [k, i - b] | |
| , a = [k, i + b] | |
| , e = { | |
| l: d, | |
| left: d, | |
| r: l, | |
| right: l, | |
| t: h, | |
| top: h, | |
| up: h, | |
| b: a, | |
| bottom: a, | |
| down: a | |
| }; | |
| j = j.toLowerCase(); | |
| g.setXY([e[j][0], e[j][1]], c) | |
| }, | |
| setBox: function(c) { | |
| var b = this, a, d; | |
| if (c.isRegion) { | |
| c = { | |
| x: c.left, | |
| y: c.top, | |
| width: c.right - c.left, | |
| height: c.bottom - c.top | |
| } | |
| } | |
| b.constrainBox(c); | |
| a = c.x; | |
| d = c.y; | |
| b.setXY([a, d]); | |
| b.setSize(c.width, c.height); | |
| b.afterSetPosition(a, d); | |
| return b | |
| }, | |
| constrainBox: function(d) { | |
| var c = this, b, a, e; | |
| if (c.constrain || c.constrainHeader) { | |
| a = ("x"in d) ? d.x : d.left; | |
| e = ("y"in d) ? d.y : d.top; | |
| b = c.calculateConstrainedPosition(null , [a, e], false, [d.width, d.height]); | |
| if (b) { | |
| d.x = b[0]; | |
| d.y = b[1] | |
| } | |
| } | |
| }, | |
| translatePoints: function(a, c) { | |
| var b = this.translateXY(a, c); | |
| return { | |
| left: b.x, | |
| top: b.y | |
| } | |
| }, | |
| translateXY: function(h, e) { | |
| var d = this | |
| , b = d.el | |
| , i = b.getStyle(d._positionTopLeft) | |
| , a = i.position === "relative" | |
| , c = parseFloat(i.left) | |
| , g = parseFloat(i.top) | |
| , j = d.getXY(); | |
| if (Ext.isArray(h)) { | |
| e = h[1]; | |
| h = h[0] | |
| } | |
| if (isNaN(c)) { | |
| c = a ? 0 : b.dom.offsetLeft | |
| } | |
| if (isNaN(g)) { | |
| g = a ? 0 : b.dom.offsetTop | |
| } | |
| c = (typeof h === "number") ? h - j[0] + c : undefined; | |
| g = (typeof e === "number") ? e - j[1] + g : undefined; | |
| return { | |
| x: c, | |
| y: g | |
| } | |
| }, | |
| reverseTranslateXY: function(k) { | |
| var i = k, c = this.el, j = [], d = c.dom, b = d.offsetParent, a, e, h, g; | |
| if (b) { | |
| a = c.isStyle("position", "relative"), | |
| e = Ext.fly(b).getXY(), | |
| h = k[0] + e[0] + b.clientLeft; | |
| g = k[1] + e[1] + b.clientTop; | |
| if (a) { | |
| h += c.getPadding("l"); | |
| g += c.getPadding("t") | |
| } | |
| i = [h, g] | |
| } | |
| return i | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util, "Positionable"], 0)); | |
| Ext.define("Ext.overrides.util.Positionable", { | |
| override: "Ext.util.Positionable", | |
| anchorTo: function(h, e, b, a, j, k) { | |
| var g = this | |
| , i = !Ext.isEmpty(j) | |
| , c = function() { | |
| g.alignTo(h, e, b, a); | |
| Ext.callback(k, g) | |
| } | |
| , d = g.getAnchor(); | |
| g.removeAnchor(); | |
| Ext.apply(d, { | |
| fn: c, | |
| scroll: i | |
| }); | |
| Ext.on("resize", c, null ); | |
| if (i) { | |
| Ext.getWin().on("scroll", c, null , { | |
| buffer: !isNaN(j) ? j : 50 | |
| }) | |
| } | |
| c(); | |
| return g | |
| }, | |
| getAnchor: function() { | |
| var b = this.el, c, a; | |
| if (!b.dom) { | |
| return | |
| } | |
| c = b.getData(); | |
| a = c._anchor; | |
| if (!a) { | |
| a = c._anchor = {} | |
| } | |
| return a | |
| }, | |
| removeAnchor: function() { | |
| var a = this.getAnchor(); | |
| if (a && a.fn) { | |
| Ext.un("resize", a.fn); | |
| if (a.scroll) { | |
| Ext.getWin().on("scroll", a.fn) | |
| } | |
| delete a.fn | |
| } | |
| return this | |
| }, | |
| setBox: function(c, a) { | |
| var b = this; | |
| if (c.isRegion) { | |
| c = { | |
| x: c.left, | |
| y: c.top, | |
| width: c.right - c.left, | |
| height: c.bottom - c.top | |
| } | |
| } | |
| if (a) { | |
| b.constrainBox(c); | |
| b.animate(Ext.applyIf({ | |
| to: c, | |
| listeners: { | |
| afteranimate: Ext.Function.bind(b.afterSetPosition, b, [c.x, c.y]) | |
| } | |
| }, a)) | |
| } else { | |
| arguments.callee.$previous.call(this, c) | |
| } | |
| return b | |
| } | |
| }); | |
| (Ext.cmd.derive("Ext.dom.UnderlayPool", Ext.Base, { | |
| constructor: function(a) { | |
| this.elementConfig = a; | |
| this.cache = [] | |
| }, | |
| checkOut: function() { | |
| var a = this.cache.shift(); | |
| if (!a) { | |
| a = Ext.Element.create(this.elementConfig); | |
| a.setVisibilityMode(2) | |
| } | |
| return a | |
| }, | |
| checkIn: function(a) { | |
| this.cache.push(a) | |
| }, | |
| reset: function() { | |
| var a = this.cache | |
| , b = a.length; | |
| while (b--) { | |
| a[b].destroy() | |
| } | |
| this.cache = [] | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.dom, "UnderlayPool"], 0)); | |
| (Ext.cmd.derive("Ext.dom.Underlay", Ext.Base, { | |
| constructor: function(a) { | |
| Ext.apply(this, a) | |
| }, | |
| beforeShow: Ext.emptyFn, | |
| getInsertionTarget: function() { | |
| return this.target | |
| }, | |
| getPool: function() { | |
| return this.pool || (this.self.prototype.pool = new Ext.dom.UnderlayPool(this.elementConfig)) | |
| }, | |
| hide: function() { | |
| var b = this | |
| , a = b.el; | |
| if (a) { | |
| a.hide(); | |
| b.getPool().checkIn(a); | |
| b.el = null ; | |
| b.hidden = true | |
| } | |
| }, | |
| realign: function(i, h, a, j) { | |
| var e = this | |
| , b = e.el | |
| , d = e.target | |
| , c = e.offsets | |
| , g = Math.max; | |
| if (b) { | |
| if (i == null ) { | |
| i = d.getX() | |
| } | |
| if (h == null ) { | |
| h = d.getY() | |
| } | |
| if (a == null ) { | |
| a = d.getWidth() | |
| } | |
| if (j == null ) { | |
| j = d.getHeight() | |
| } | |
| if (c) { | |
| i = i + c.x; | |
| h = h + c.y; | |
| a = g(a + c.w, 0); | |
| j = g(j + c.h, 0) | |
| } | |
| b.setXY([i, h]); | |
| b.setSize(a, j) | |
| } | |
| }, | |
| setZIndex: function(a) { | |
| this.zIndex = a; | |
| if (this.el) { | |
| this.el.setStyle("z-index", a) | |
| } | |
| }, | |
| show: function() { | |
| var b = this, d = b.target, g = b.zIndex, a = b.el, c = b.getInsertionTarget().dom, e; | |
| if (!a) { | |
| a = b.el = b.getPool().checkOut() | |
| } | |
| b.beforeShow(); | |
| if (g == null ) { | |
| g = (parseInt(d.getStyle("z-index"), 10)) | |
| } | |
| if (g) { | |
| a.setStyle("z-index", g) | |
| } | |
| a.setStyle("position", b.fixed ? "fixed" : ""); | |
| e = a.dom; | |
| if (e.nextSibling !== c) { | |
| d.dom.parentNode.insertBefore(e, c) | |
| } | |
| a.show(); | |
| b.realign(); | |
| b.hidden = false | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.dom, "Underlay"], 0)); | |
| (Ext.cmd.derive("Ext.dom.Shadow", Ext.dom.Underlay, { | |
| alternateClassName: "Ext.Shadow", | |
| mode: "drop", | |
| offset: 4, | |
| cls: "x-" + (!Ext.supports.CSS3BoxShadow ? "ie" : "css") + "-shadow", | |
| constructor: function(b) { | |
| var d = this, e, c, g, a; | |
| Ext.dom.Underlay.prototype.constructor.call(this, b); | |
| d.elementConfig = { | |
| cls: d.cls, | |
| role: "presentation" | |
| }; | |
| g = d.offset; | |
| a = Math.floor(g / 2); | |
| d.opacity = 50; | |
| switch (d.mode.toLowerCase()) { | |
| case "drop": | |
| e = { | |
| x: 0, | |
| y: 0, | |
| w: g, | |
| h: g | |
| }; | |
| if (Ext.supports.CSS3BoxShadow) { | |
| c = { | |
| x: g, | |
| y: g, | |
| h: -g, | |
| w: -g | |
| } | |
| } else { | |
| c = { | |
| x: -a, | |
| y: -a, | |
| h: -a, | |
| w: -a | |
| } | |
| } | |
| break; | |
| case "sides": | |
| e = { | |
| x: -g, | |
| y: 0, | |
| w: g * 2, | |
| h: g | |
| }; | |
| if (Ext.supports.CSS3BoxShadow) { | |
| c = { | |
| x: 0, | |
| y: g, | |
| h: -g, | |
| w: 0 | |
| } | |
| } else { | |
| c = { | |
| x: 1 + a - 2 * g, | |
| y: -(1 + a), | |
| h: -1, | |
| w: a - 1 | |
| } | |
| } | |
| break; | |
| case "frame": | |
| e = { | |
| x: -g, | |
| y: -g, | |
| w: g * 2, | |
| h: g * 2 | |
| }; | |
| if (Ext.supports.CSS3BoxShadow) { | |
| c = { | |
| x: 0, | |
| y: 0, | |
| h: 0, | |
| w: 0 | |
| } | |
| } else { | |
| c = { | |
| x: 1 + a - 2 * g, | |
| y: 1 + a - 2 * g, | |
| h: g - a - 1, | |
| w: g - a - 1 | |
| } | |
| } | |
| break; | |
| case "bottom": | |
| e = { | |
| x: -g, | |
| y: 0, | |
| w: g * 2, | |
| h: g | |
| }; | |
| if (Ext.supports.CSS3BoxShadow) { | |
| c = { | |
| x: 0, | |
| y: g, | |
| h: -g, | |
| w: 0 | |
| } | |
| } else { | |
| c = { | |
| x: 0, | |
| y: g, | |
| h: 0, | |
| w: 0 | |
| } | |
| } | |
| break | |
| } | |
| d.offsets = c; | |
| d.outerOffsets = e | |
| }, | |
| getShadowSize: function() { | |
| var b = this | |
| , d = b.el ? b.offset : 0 | |
| , a = [d, d, d, d] | |
| , c = b.mode.toLowerCase(); | |
| if (b.el && c !== "frame") { | |
| a[0] = 0; | |
| if (c == "drop") { | |
| a[3] = 0 | |
| } | |
| } | |
| return a | |
| }, | |
| boxShadowProperty: (function() { | |
| var b = "boxShadow" | |
| , a = document.documentElement.style; | |
| if (!("boxShadow"in a)) { | |
| if ("WebkitBoxShadow"in a) { | |
| b = "WebkitBoxShadow" | |
| } else { | |
| if ("MozBoxShadow"in a) { | |
| b = "MozBoxShadow" | |
| } | |
| } | |
| } | |
| return b | |
| }()), | |
| beforeShow: function() { | |
| var b = this | |
| , a = b.el.dom.style | |
| , c = b.shim; | |
| if (Ext.supports.CSS3BoxShadow) { | |
| a[b.boxShadowProperty] = "0 0 " + (b.offset + 2) + "px #888" | |
| } else { | |
| a.filter = "progid:DXImageTransform.Microsoft.alpha(opacity=" + b.opacity + ") progid:DXImageTransform.Microsoft.Blur(pixelradius=" + (b.offset) + ")" | |
| } | |
| if (c) { | |
| c.realign() | |
| } | |
| }, | |
| setOpacity: function(a) { | |
| var b = this.el; | |
| if (b) { | |
| if (Ext.isIE && !Ext.supports.CSS3BoxShadow) { | |
| a = Math.floor(a * 100 / 2) / 100 | |
| } | |
| this.opacity = a; | |
| b.setOpacity(a) | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.dom, "Shadow", Ext, "Shadow"], 0)); | |
| (Ext.cmd.derive("Ext.dom.Shim", Ext.dom.Underlay, { | |
| cls: "x-shim", | |
| constructor: function(a) { | |
| Ext.dom.Underlay.prototype.constructor.call(this, a); | |
| this.elementConfig = { | |
| tag: "iframe", | |
| cls: this.cls, | |
| role: "presentation", | |
| frameBorder: "0", | |
| src: Ext.SSL_SECURE_URL, | |
| tabindex: "-1" | |
| } | |
| }, | |
| getInsertionTarget: function() { | |
| var a = this.shadow; | |
| return (a && a.el) || this.target | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.dom, "Shim"], 0)); | |
| (Ext.cmd.derive("Ext.dom.ElementEvent", Ext.util.Event, { | |
| addListener: function(h, k, l, c, e) { | |
| var g = this, i = false, a = g.name, b, d, j; | |
| l = l || {}; | |
| if (l.delegated === false || Ext.event.publisher.Dom.instance.directEvents[a]) { | |
| if (l.capture) { | |
| j = g.directCaptures || (g.directCaptures = new Ext.util.Event(g.observable,a)); | |
| i = j.addListener(h, k, l, c, e) | |
| } else { | |
| d = g.directs || (g.directs = new Ext.util.Event(g.observable,a)); | |
| i = d.addListener(h, k, l, c, e) | |
| } | |
| } else { | |
| if (l.capture) { | |
| b = g.captures || (g.captures = new Ext.util.Event(g.observable,a)); | |
| i = b.addListener(h, k, l, c, e) | |
| } else { | |
| i = Ext.util.Event.prototype.addListener.call(this, h, k, l, c, e) | |
| } | |
| } | |
| return i | |
| }, | |
| removeListener: function(e, d) { | |
| var g = this | |
| , a = g.captures | |
| , c = g.directs | |
| , h = g.directCaptures | |
| , i = false | |
| , b = g.findListener(e, d); | |
| if (b !== -1) { | |
| i = Ext.util.Event.prototype.removeListener.call(this, e, d, b) | |
| } else { | |
| if (c) { | |
| b = c.findListener(e, d) | |
| } | |
| if (b !== -1) { | |
| i = c.removeListener(e, d, b) | |
| } else { | |
| if (a) { | |
| b = a.findListener(e, d) | |
| } | |
| if (b !== -1) { | |
| i = a.removeListener(e, d, b) | |
| } else { | |
| if (h) { | |
| b = h.findListener(e, d); | |
| if (b !== -1) { | |
| i = h.removeListener(e, d, b) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return i | |
| }, | |
| clearListeners: function() { | |
| var c = this | |
| , d = c.directCaptures | |
| , b = c.directs | |
| , a = c.captures; | |
| if (d) { | |
| d.clearListeners() | |
| } | |
| if (b) { | |
| b.clearListeners() | |
| } | |
| if (a) { | |
| a.clearListeners() | |
| } | |
| Ext.util.Event.prototype.clearListeners.call(this) | |
| }, | |
| suspend: function() { | |
| var c = this | |
| , d = c.directCaptures | |
| , b = c.directs | |
| , a = c.captures; | |
| if (d) { | |
| d.suspend() | |
| } | |
| if (b) { | |
| b.suspend() | |
| } | |
| if (a) { | |
| a.suspend() | |
| } | |
| Ext.util.Event.prototype.suspend.call(this) | |
| }, | |
| resume: function() { | |
| var c = this | |
| , d = c.directCaptures | |
| , b = c.directs | |
| , a = c.captures; | |
| if (d) { | |
| d.resume() | |
| } | |
| if (b) { | |
| b.resume() | |
| } | |
| if (a) { | |
| a.resume() | |
| } | |
| Ext.util.Event.prototype.resume.call(this) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.dom, "ElementEvent"], 0)); | |
| (Ext.cmd.derive("Ext.event.publisher.Publisher", Ext.Base, { | |
| handledEvents: [], | |
| statics: { | |
| publishers: {}, | |
| publishersByEvent: {} | |
| }, | |
| constructor: function() { | |
| var b = this | |
| , a = b.type; | |
| b.handles = {}; | |
| b.registerEvents(); | |
| Ext.event.publisher.Publisher.publishers[a] = b | |
| }, | |
| registerEvents: function(e) { | |
| var h = this, d = Ext.event.publisher.Publisher.publishersByEvent, b = e || h.handledEvents, g = b.length, a, c; | |
| for (c = 0; c < g; c++) { | |
| a = b[c]; | |
| h.handles[a] = 1; | |
| d[a] = h | |
| } | |
| }, | |
| fire: function(c, a, b) { | |
| var d; | |
| if (c.hasListeners[a]) { | |
| d = c.events[a]; | |
| if (d) { | |
| d.fire.apply(d, b) | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.event.publisher, "Publisher"], 0)); | |
| (Ext.cmd.derive("Ext.util.Offset", Ext.Base, { | |
| statics: { | |
| fromObject: function(a) { | |
| return new this(a.x,a.y) | |
| } | |
| }, | |
| constructor: function(a, b) { | |
| this.x = (a != null && !isNaN(a)) ? a : 0; | |
| this.y = (b != null && !isNaN(b)) ? b : 0; | |
| return this | |
| }, | |
| copy: function() { | |
| return new Ext.util.Offset(this.x,this.y) | |
| }, | |
| copyFrom: function(a) { | |
| this.x = a.x; | |
| this.y = a.y | |
| }, | |
| toString: function() { | |
| return "Offset[" + this.x + "," + this.y + "]" | |
| }, | |
| equals: function(a) { | |
| return ( this.x == a.x && this.y == a.y) | |
| }, | |
| round: function(b) { | |
| if (!isNaN(b)) { | |
| var a = Math.pow(10, b); | |
| this.x = Math.round(this.x * a) / a; | |
| this.y = Math.round(this.y * a) / a | |
| } else { | |
| this.x = Math.round(this.x); | |
| this.y = Math.round(this.y) | |
| } | |
| }, | |
| isZero: function() { | |
| return this.x == 0 && this.y == 0 | |
| } | |
| }, 3, 0, 0, 0, 0, 0, [Ext.util, "Offset"], 0)); | |
| (Ext.cmd.derive("Ext.util.Region", Ext.Base, { | |
| isRegion: true, | |
| statics: { | |
| getRegion: function(a) { | |
| return Ext.fly(a).getRegion() | |
| }, | |
| from: function(a) { | |
| return new this(a.top,a.right,a.bottom,a.left) | |
| } | |
| }, | |
| constructor: function(e, b, a, d) { | |
| var c = this; | |
| c.y = c.top = c[1] = e; | |
| c.right = b; | |
| c.bottom = a; | |
| c.x = c.left = c[0] = d | |
| }, | |
| contains: function(b) { | |
| var a = this; | |
| return ( b.x >= a.x && b.right <= a.right && b.y >= a.y && b.bottom <= a.bottom) | |
| }, | |
| intersect: function(h) { | |
| var g = this | |
| , d = Math.max(g.y, h.y) | |
| , e = Math.min(g.right, h.right) | |
| , a = Math.min(g.bottom, h.bottom) | |
| , c = Math.max(g.x, h.x); | |
| if (a > d && e > c) { | |
| return new this.self(d,e,a,c) | |
| } else { | |
| return false | |
| } | |
| }, | |
| union: function(h) { | |
| var g = this | |
| , d = Math.min(g.y, h.y) | |
| , e = Math.max(g.right, h.right) | |
| , a = Math.max(g.bottom, h.bottom) | |
| , c = Math.min(g.x, h.x); | |
| return new this.self(d,e,a,c) | |
| }, | |
| constrainTo: function(b) { | |
| var a = this | |
| , c = Ext.Number.constrain; | |
| a.top = a.y = c(a.top, b.y, b.bottom); | |
| a.bottom = c(a.bottom, b.y, b.bottom); | |
| a.left = a.x = c(a.left, b.x, b.right); | |
| a.right = c(a.right, b.x, b.right); | |
| return a | |
| }, | |
| adjust: function(e, b, a, d) { | |
| var c = this; | |
| c.top = c.y += e; | |
| c.left = c.x += d; | |
| c.right += b; | |
| c.bottom += a; | |
| return c | |
| }, | |
| getOutOfBoundOffset: function(a, b) { | |
| if (!Ext.isObject(a)) { | |
| if (a == "x") { | |
| return this.getOutOfBoundOffsetX(b) | |
| } else { | |
| return this.getOutOfBoundOffsetY(b) | |
| } | |
| } else { | |
| b = a; | |
| var c = new Ext.util.Offset(); | |
| c.x = this.getOutOfBoundOffsetX(b.x); | |
| c.y = this.getOutOfBoundOffsetY(b.y); | |
| return c | |
| } | |
| }, | |
| getOutOfBoundOffsetX: function(a) { | |
| if (a <= this.x) { | |
| return this.x - a | |
| } else { | |
| if (a >= this.right) { | |
| return this.right - a | |
| } | |
| } | |
| return 0 | |
| }, | |
| getOutOfBoundOffsetY: function(a) { | |
| if (a <= this.y) { | |
| return this.y - a | |
| } else { | |
| if (a >= this.bottom) { | |
| return this.bottom - a | |
| } | |
| } | |
| return 0 | |
| }, | |
| isOutOfBound: function(a, b) { | |
| if (!Ext.isObject(a)) { | |
| if (a == "x") { | |
| return this.isOutOfBoundX(b) | |
| } else { | |
| return this.isOutOfBoundY(b) | |
| } | |
| } else { | |
| b = a; | |
| return ( this.isOutOfBoundX(b.x) || this.isOutOfBoundY(b.y)) | |
| } | |
| }, | |
| isOutOfBoundX: function(a) { | |
| return ( a < this.x || a > this.right) | |
| }, | |
| isOutOfBoundY: function(a) { | |
| return ( a < this.y || a > this.bottom) | |
| }, | |
| restrict: function(b, d, a) { | |
| if (Ext.isObject(b)) { | |
| var c; | |
| a = d; | |
| d = b; | |
| if (d.copy) { | |
| c = d.copy() | |
| } else { | |
| c = { | |
| x: d.x, | |
| y: d.y | |
| } | |
| } | |
| c.x = this.restrictX(d.x, a); | |
| c.y = this.restrictY(d.y, a); | |
| return c | |
| } else { | |
| if (b == "x") { | |
| return this.restrictX(d, a) | |
| } else { | |
| return this.restrictY(d, a) | |
| } | |
| } | |
| }, | |
| restrictX: function(b, a) { | |
| if (!a) { | |
| a = 1 | |
| } | |
| if (b <= this.x) { | |
| b -= (b - this.x) * a | |
| } else { | |
| if (b >= this.right) { | |
| b -= (b - this.right) * a | |
| } | |
| } | |
| return b | |
| }, | |
| restrictY: function(b, a) { | |
| if (!a) { | |
| a = 1 | |
| } | |
| if (b <= this.y) { | |
| b -= (b - this.y) * a | |
| } else { | |
| if (b >= this.bottom) { | |
| b -= (b - this.bottom) * a | |
| } | |
| } | |
| return b | |
| }, | |
| getSize: function() { | |
| return { | |
| width: this.right - this.x, | |
| height: this.bottom - this.y | |
| } | |
| }, | |
| copy: function() { | |
| return new this.self(this.y,this.right,this.bottom,this.x) | |
| }, | |
| copyFrom: function(b) { | |
| var a = this; | |
| a.top = a.y = a[1] = b.y; | |
| a.right = b.right; | |
| a.bottom = b.bottom; | |
| a.left = a.x = a[0] = b.x; | |
| return this | |
| }, | |
| toString: function() { | |
| return "Region[" + this.top + "," + this.right + "," + this.bottom + "," + this.left + "]" | |
| }, | |
| translateBy: function(a, c) { | |
| if (arguments.length == 1) { | |
| c = a.y; | |
| a = a.x | |
| } | |
| var b = this; | |
| b.top = b.y += c; | |
| b.right += a; | |
| b.bottom += c; | |
| b.left = b.x += a; | |
| return b | |
| }, | |
| round: function() { | |
| var a = this; | |
| a.top = a.y = Math.round(a.y); | |
| a.right = Math.round(a.right); | |
| a.bottom = Math.round(a.bottom); | |
| a.left = a.x = Math.round(a.x); | |
| return a | |
| }, | |
| equals: function(a) { | |
| return ( this.top === a.top && this.right === a.right && this.bottom === a.bottom && this.left === a.left) | |
| } | |
| }, 3, 0, 0, 0, 0, 0, [Ext.util, "Region"], 0)); | |
| (Ext.cmd.derive("Ext.util.Point", Ext.util.Region, { | |
| radianToDegreeConstant: 180 / Math.PI, | |
| origin: { | |
| x: 0, | |
| y: 0 | |
| }, | |
| 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 (a == null ) { | |
| a = 0 | |
| } | |
| if (b == null ) { | |
| b = 0 | |
| } | |
| Ext.util.Region.prototype.constructor.call(this, b, a, b, a) | |
| }, | |
| 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") { | |
| return this.getDistanceTo(c) <= b | |
| } | |
| var a = c.x | |
| , g = c.y | |
| , e = b.x | |
| , d = b.y; | |
| return ( this.x <= a + e && this.x >= a - e && this.y <= g + d && this.y >= g - d) | |
| }, | |
| isWithin: function() { | |
| return this.isCloseTo.apply(this, arguments) | |
| }, | |
| isContainedBy: function(a) { | |
| if (!(a instanceof Ext.util.Region)) { | |
| a = Ext.get(a.el || a).getRegion() | |
| } | |
| return a.contains(this) | |
| }, | |
| roundedEquals: function(a) { | |
| if (!a || typeof a !== "object") { | |
| a = this.origin | |
| } | |
| return ( Math.round(this.x) === Math.round(a.x) && Math.round(this.y) === Math.round(a.y)) | |
| }, | |
| getDistanceTo: function(b) { | |
| if (!b || typeof b !== "object") { | |
| b = this.origin | |
| } | |
| var c = this.x - b.x | |
| , a = this.y - b.y; | |
| return Math.sqrt(c * c + a * a) | |
| }, | |
| getAngleTo: function(b) { | |
| if (!b || typeof b !== "object") { | |
| b = this.origin | |
| } | |
| var c = this.x - b.x | |
| , a = this.y - b.y; | |
| return Math.atan2(a, c) * this.radianToDegreeConstant | |
| } | |
| }, 3, 0, 0, 0, 0, 0, [Ext.util, "Point"], function() { | |
| this.prototype.translate = this.prototype.translateBy | |
| })); | |
| (Ext.cmd.derive("Ext.event.Event", Ext.Base, { | |
| alternateClassName: "Ext.EventObjectImpl", | |
| isStopped: false, | |
| defaultPrevented: false, | |
| isEvent: true, | |
| statics: { | |
| resolveTextNode: function(a) { | |
| return (a && a.nodeType === 3) ? a.parentNode : a | |
| }, | |
| pointerEvents: { | |
| pointerdown: 1, | |
| pointermove: 1, | |
| pointerup: 1, | |
| pointercancel: 1, | |
| pointerover: 1, | |
| pointerout: 1, | |
| pointerenter: 1, | |
| pointerleave: 1, | |
| MSPointerDown: 1, | |
| MSPointerMove: 1, | |
| MSPointerUp: 1, | |
| MSPointerOver: 1, | |
| MSPointerOut: 1, | |
| MSPointerCancel: 1, | |
| MSPointerEnter: 1, | |
| MSPointerLeave: 1 | |
| }, | |
| mouseEvents: { | |
| mousedown: 1, | |
| mousemove: 1, | |
| mouseup: 1, | |
| mouseover: 1, | |
| mouseout: 1, | |
| mouseenter: 1, | |
| mouseleave: 1 | |
| }, | |
| clickEvents: { | |
| click: 1, | |
| dblclick: 1 | |
| }, | |
| touchEvents: { | |
| touchstart: 1, | |
| touchmove: 1, | |
| touchend: 1, | |
| touchcancel: 1 | |
| }, | |
| focusEvents: { | |
| focus: 1, | |
| blur: 1, | |
| focusin: 1, | |
| focusout: 1, | |
| focusenter: 1, | |
| focusleave: 1 | |
| }, | |
| pointerTypes: { | |
| 2: "touch", | |
| 3: "pen", | |
| 4: "mouse", | |
| touch: "touch", | |
| pen: "pen", | |
| mouse: "mouse" | |
| } | |
| }, | |
| constructor: function(b) { | |
| var g = this, j = g.self, e = g.self.resolveTextNode, i = b.changedTouches, c = i ? i[0] : b, h = b.type, a, d; | |
| g.pageX = c.pageX; | |
| g.pageY = c.pageY; | |
| g.target = g.delegatedTarget = e(b.target); | |
| d = b.relatedTarget; | |
| if (d) { | |
| g.relatedTarget = e(d) | |
| } | |
| g.browserEvent = g.event = b; | |
| g.type = h; | |
| g.button = b.button || 0; | |
| g.shiftKey = b.shiftKey; | |
| g.ctrlKey = b.ctrlKey || b.metaKey || false; | |
| g.altKey = b.altKey; | |
| g.charCode = b.charCode; | |
| g.keyCode = b.keyCode; | |
| g.buttons = b.buttons; | |
| if (g.button === 0 && g.buttons === 0) { | |
| g.buttons = 1 | |
| } | |
| if (j.forwardTab !== undefined && j.focusEvents[h]) { | |
| g.forwardTab = j.forwardTab | |
| } | |
| if (j.mouseEvents[h] || j.clickEvents[h]) { | |
| a = "mouse" | |
| } else { | |
| if (j.pointerEvents[h]) { | |
| a = j.pointerTypes[b.pointerType] | |
| } else { | |
| if (j.touchEvents[h]) { | |
| a = "touch" | |
| } | |
| } | |
| } | |
| if (a) { | |
| g.pointerType = a | |
| } | |
| g.timeStamp = g.time = +(b.timeStamp || new Date()) | |
| }, | |
| chain: function(a) { | |
| var b = Ext.Object.chain(this); | |
| b.parentEvent = this; | |
| return Ext.apply(b, a) | |
| }, | |
| correctWheelDelta: function(c) { | |
| var b = this.WHEEL_SCALE | |
| , a = Math.round(c / b); | |
| if (!a && c) { | |
| a = (c < 0) ? -1 : 1 | |
| } | |
| return a | |
| }, | |
| getCharCode: function() { | |
| return this.charCode || this.keyCode | |
| }, | |
| getKey: function() { | |
| return this.keyCode || this.charCode | |
| }, | |
| getKeyName: function() { | |
| return this.keyCodes[this.keyCode] | |
| }, | |
| getPoint: function() { | |
| var a = this.getXY(); | |
| return new Ext.util.Point(a[0],a[1]) | |
| }, | |
| getRelatedTarget: function(b, e, a) { | |
| var c = this.relatedTarget | |
| , d = null ; | |
| if (c) { | |
| if (b) { | |
| d = Ext.fly(c).findParent(b, e, a) | |
| } else { | |
| d = a ? Ext.get(c) : c | |
| } | |
| } | |
| return d | |
| }, | |
| getTarget: function(b, c, a) { | |
| return b ? Ext.fly(this.target).findParent(b, c, a) : (a ? Ext.get(this.target) : this.target) | |
| }, | |
| getTime: function() { | |
| return this.time | |
| }, | |
| getWheelDelta: function() { | |
| var a = this.getWheelDeltas(); | |
| return a.y | |
| }, | |
| getWheelDeltas: function() { | |
| var d = this | |
| , c = d.browserEvent | |
| , b = 0 | |
| , a = 0; | |
| if (Ext.isDefined(c.wheelDeltaX)) { | |
| b = c.wheelDeltaX; | |
| a = c.wheelDeltaY | |
| } else { | |
| if (c.wheelDelta) { | |
| a = c.wheelDelta | |
| } else { | |
| if (c.detail) { | |
| a = -c.detail; | |
| if (a > 100) { | |
| a = 3 | |
| } else { | |
| if (a < -100) { | |
| a = -3 | |
| } | |
| } | |
| if (Ext.isDefined(c.axis) && c.axis === c.HORIZONTAL_AXIS) { | |
| b = a; | |
| a = 0 | |
| } | |
| } | |
| } | |
| } | |
| return { | |
| x: d.correctWheelDelta(b), | |
| y: d.correctWheelDelta(a) | |
| } | |
| }, | |
| getX: function() { | |
| return this.getXY()[0] | |
| }, | |
| getXY: function() { | |
| var c = this | |
| , e = c.xy; | |
| if (!e) { | |
| e = c.xy = [c.pageX, c.pageY]; | |
| var b = e[0], h, d, g, a; | |
| if (!b && b !== 0) { | |
| h = c.browserEvent; | |
| d = document; | |
| g = d.documentElement; | |
| a = d.body; | |
| e[0] = h.clientX + (g && g.scrollLeft || a && a.scrollLeft || 0) - (g && g.clientLeft || a && a.clientLeft || 0); | |
| e[1] = h.clientY + (g && g.scrollTop || a && a.scrollTop || 0) - (g && g.clientTop || a && a.clientTop || 0) | |
| } | |
| } | |
| return e | |
| }, | |
| getY: function() { | |
| return this.getXY()[1] | |
| }, | |
| hasModifier: function() { | |
| var a = this; | |
| return !!(a.ctrlKey || a.altKey || a.shiftKey || a.metaKey) | |
| }, | |
| isNavKeyPress: function(d) { | |
| var c = this | |
| , a = c.keyCode | |
| , b = c.type === "keypress"; | |
| return ((!b || Ext.isGecko) && a >= 33 && a <= 40) || (!d && (a === c.RETURN || a === c.TAB || a === c.ESC)) | |
| }, | |
| isSpecialKey: function() { | |
| var d = this | |
| , b = d.keyCode | |
| , a = Ext.isGecko | |
| , c = d.type === "keypress"; | |
| return (a && c && d.charCode === 0) || (this.isNavKeyPress()) || (b === d.BACKSPACE) || (b === d.ENTER) || (b >= 16 && b <= 20) || ((!c || a) && b >= 44 && b <= 46) | |
| }, | |
| makeUnpreventable: function() { | |
| this.browserEvent.preventDefault = Ext.emptyFn | |
| }, | |
| preventDefault: function() { | |
| var b = this | |
| , a = b.parentEvent; | |
| b.defaultPrevented = true; | |
| if (a) { | |
| a.defaultPrevented = true | |
| } | |
| b.browserEvent.preventDefault(); | |
| return b | |
| }, | |
| setCurrentTarget: function(a) { | |
| this.currentTarget = this.delegatedTarget = a | |
| }, | |
| stopEvent: function() { | |
| return this.preventDefault().stopPropagation() | |
| }, | |
| stopPropagation: function() { | |
| var b = this | |
| , c = b.browserEvent | |
| , a = b.parentEvent; | |
| b.isStopped = true; | |
| if (a) { | |
| a.isStopped = true | |
| } | |
| if (!c.stopPropagation) { | |
| c.cancelBubble = true; | |
| return b | |
| } | |
| c.stopPropagation(); | |
| return b | |
| }, | |
| within: function(c, d, a) { | |
| var b; | |
| if (c) { | |
| b = d ? this.getRelatedTarget() : this.getTarget() | |
| } | |
| return b ? Ext.fly(c).contains(b) || !!(a && b === Ext.getDom(c)) : false | |
| }, | |
| deprecated: { | |
| "4.0": { | |
| methods: { | |
| getPageX: "getX", | |
| getPageY: "getY" | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.event, "Event", Ext, "EventObjectImpl"], function(a) { | |
| var c = a.prototype, d = { | |
| BACKSPACE: 8, | |
| TAB: 9, | |
| NUM_CENTER: 12, | |
| ENTER: 13, | |
| RETURN: 13, | |
| SHIFT: 16, | |
| CTRL: 17, | |
| ALT: 18, | |
| PAUSE: 19, | |
| CAPS_LOCK: 20, | |
| ESC: 27, | |
| SPACE: 32, | |
| PAGE_UP: 33, | |
| PAGE_DOWN: 34, | |
| END: 35, | |
| HOME: 36, | |
| LEFT: 37, | |
| UP: 38, | |
| RIGHT: 39, | |
| DOWN: 40, | |
| PRINT_SCREEN: 44, | |
| INSERT: 45, | |
| DELETE: 46, | |
| ZERO: 48, | |
| ONE: 49, | |
| TWO: 50, | |
| THREE: 51, | |
| FOUR: 52, | |
| FIVE: 53, | |
| SIX: 54, | |
| SEVEN: 55, | |
| EIGHT: 56, | |
| NINE: 57, | |
| A: 65, | |
| B: 66, | |
| C: 67, | |
| D: 68, | |
| E: 69, | |
| F: 70, | |
| G: 71, | |
| H: 72, | |
| I: 73, | |
| J: 74, | |
| K: 75, | |
| L: 76, | |
| M: 77, | |
| N: 78, | |
| O: 79, | |
| P: 80, | |
| Q: 81, | |
| R: 82, | |
| S: 83, | |
| T: 84, | |
| U: 85, | |
| V: 86, | |
| W: 87, | |
| X: 88, | |
| Y: 89, | |
| Z: 90, | |
| CONTEXT_MENU: 93, | |
| NUM_ZERO: 96, | |
| NUM_ONE: 97, | |
| NUM_TWO: 98, | |
| NUM_THREE: 99, | |
| NUM_FOUR: 100, | |
| NUM_FIVE: 101, | |
| NUM_SIX: 102, | |
| NUM_SEVEN: 103, | |
| NUM_EIGHT: 104, | |
| NUM_NINE: 105, | |
| NUM_MULTIPLY: 106, | |
| NUM_PLUS: 107, | |
| NUM_MINUS: 109, | |
| NUM_PERIOD: 110, | |
| NUM_DIVISION: 111, | |
| F1: 112, | |
| F2: 113, | |
| F3: 114, | |
| F4: 115, | |
| F5: 116, | |
| F6: 117, | |
| F7: 118, | |
| F8: 119, | |
| F9: 120, | |
| F10: 121, | |
| F11: 122, | |
| F12: 123, | |
| WHEEL_SCALE: (function() { | |
| var h; | |
| if (Ext.isGecko) { | |
| h = 3 | |
| } else { | |
| if (Ext.isMac) { | |
| if (Ext.isSafari && Ext.webKitVersion >= 532) { | |
| h = 120 | |
| } else { | |
| h = 12 | |
| } | |
| h *= 3 | |
| } else { | |
| h = 120 | |
| } | |
| } | |
| return h | |
| }()) | |
| }, b = {}, e, g; | |
| Ext.apply(a, d); | |
| Ext.apply(c, d); | |
| delete d.WHEEL_SCALE; | |
| delete d.RETURN; | |
| for (e in d) { | |
| g = d[e]; | |
| b[g] = e | |
| } | |
| c.keyCodes = b; | |
| c.getTrueXY = c.getXY | |
| })); | |
| Ext.define("Ext.overrides.event.Event", { | |
| override: "Ext.event.Event", | |
| mousedownEvents: { | |
| mousedown: 1, | |
| pointerdown: 1, | |
| touchstart: 1 | |
| }, | |
| injectEvent: (function() { | |
| var d, e = {}, c; | |
| if (!Ext.isIE9m && document.createEvent) { | |
| d = { | |
| createHtmlEvent: function(k, i, h, g) { | |
| var j = k.createEvent("HTMLEvents"); | |
| j.initEvent(i, h, g); | |
| return j | |
| }, | |
| createMouseEvent: function(u, s, m, l, o, k, i, j, g, r, q, n, p) { | |
| var h = u.createEvent("MouseEvents") | |
| , t = u.defaultView || window; | |
| if (h.initMouseEvent) { | |
| h.initMouseEvent(s, m, l, t, o, k, i, k, i, j, g, r, q, n, p) | |
| } else { | |
| h = u.createEvent("UIEvents"); | |
| h.initEvent(s, m, l); | |
| h.view = t; | |
| h.detail = o; | |
| h.screenX = k; | |
| h.screenY = i; | |
| h.clientX = k; | |
| h.clientY = i; | |
| h.ctrlKey = j; | |
| h.altKey = g; | |
| h.metaKey = q; | |
| h.shiftKey = r; | |
| h.button = n; | |
| h.relatedTarget = p | |
| } | |
| return h | |
| }, | |
| createUIEvent: function(m, k, i, h, j) { | |
| var l = m.createEvent("UIEvents") | |
| , g = m.defaultView || window; | |
| l.initUIEvent(k, i, h, g, j); | |
| return l | |
| }, | |
| fireEvent: function(i, g, h) { | |
| i.dispatchEvent(h) | |
| } | |
| } | |
| } else { | |
| if (document.createEventObject) { | |
| c = { | |
| 0: 1, | |
| 1: 4, | |
| 2: 2 | |
| }; | |
| d = { | |
| createHtmlEvent: function(k, i, h, g) { | |
| var j = k.createEventObject(); | |
| j.bubbles = h; | |
| j.cancelable = g; | |
| return j | |
| }, | |
| createMouseEvent: function(t, s, m, l, o, k, i, j, g, r, q, n, p) { | |
| var h = t.createEventObject(); | |
| h.bubbles = m; | |
| h.cancelable = l; | |
| h.detail = o; | |
| h.screenX = k; | |
| h.screenY = i; | |
| h.clientX = k; | |
| h.clientY = i; | |
| h.ctrlKey = j; | |
| h.altKey = g; | |
| h.shiftKey = r; | |
| h.metaKey = q; | |
| h.button = c[n] || n; | |
| h.relatedTarget = p; | |
| return h | |
| }, | |
| createUIEvent: function(l, j, h, g, i) { | |
| var k = l.createEventObject(); | |
| k.bubbles = h; | |
| k.cancelable = g; | |
| return k | |
| }, | |
| fireEvent: function(i, g, h) { | |
| i.fireEvent("on" + g, h) | |
| } | |
| } | |
| } | |
| } | |
| Ext.Object.each({ | |
| load: [false, false], | |
| unload: [false, false], | |
| select: [true, false], | |
| change: [true, false], | |
| submit: [true, true], | |
| reset: [true, false], | |
| resize: [true, false], | |
| scroll: [true, false] | |
| }, function(i, j) { | |
| var h = j[0] | |
| , g = j[1]; | |
| e[i] = function(m, k) { | |
| var l = d.createHtmlEvent(i, h, g); | |
| d.fireEvent(m, i, l) | |
| } | |
| }); | |
| function b(i, h) { | |
| var g = (i !== "mousemove"); | |
| return function(m, j) { | |
| var l = j.getXY() | |
| , k = d.createMouseEvent(m.ownerDocument, i, true, g, h, l[0], l[1], j.ctrlKey, j.altKey, j.shiftKey, j.metaKey, j.button, j.relatedTarget); | |
| d.fireEvent(m, i, k) | |
| } | |
| } | |
| Ext.each(["click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove", "mouseout"], function(g) { | |
| e[g] = b(g, 1) | |
| }); | |
| Ext.Object.each({ | |
| focusin: [true, false], | |
| focusout: [true, false], | |
| activate: [true, true], | |
| focus: [false, false], | |
| blur: [false, false] | |
| }, function(i, j) { | |
| var h = j[0] | |
| , g = j[1]; | |
| e[i] = function(m, k) { | |
| var l = d.createUIEvent(m.ownerDocument, i, h, g, 1); | |
| d.fireEvent(m, i, l) | |
| } | |
| }); | |
| if (!d) { | |
| e = {}; | |
| d = {} | |
| } | |
| function a(h, g) {} | |
| return function(j) { | |
| var i = this | |
| , h = e[i.type] || a | |
| , g = j ? (j.dom || j) : i.getTarget(); | |
| h(g, i) | |
| } | |
| }()), | |
| preventDefault: function() { | |
| var d = this, c = d.browserEvent, b = d.parentEvent, a, e; | |
| if (typeof c.type !== "unknown") { | |
| d.defaultPrevented = true; | |
| if (b) { | |
| b.defaultPrevented = true | |
| } | |
| if (c.preventDefault) { | |
| c.preventDefault() | |
| } else { | |
| if (c.type === "mousedown") { | |
| e = c.target; | |
| a = e.getAttribute("unselectable"); | |
| if (a !== "on") { | |
| e.setAttribute("unselectable", "on"); | |
| Ext.defer(function() { | |
| e.setAttribute("unselectable", a) | |
| }, 1) | |
| } | |
| } | |
| c.returnValue = false; | |
| if (c.ctrlKey || c.keyCode > 111 && c.keyCode < 124) { | |
| c.keyCode = -1 | |
| } | |
| } | |
| } | |
| return d | |
| }, | |
| stopPropagation: function() { | |
| var b = this | |
| , a = b.browserEvent; | |
| if (typeof a.type !== "unknown") { | |
| if (b.mousedownEvents[b.type]) { | |
| Ext.GlobalEvents.fireMouseDown(b) | |
| } | |
| arguments.callee.$previous.call(this) | |
| } | |
| return b | |
| }, | |
| deprecated: { | |
| "5.0": { | |
| methods: { | |
| clone: function() { | |
| return new this.self(this.browserEvent,this) | |
| } | |
| } | |
| } | |
| } | |
| }, function() { | |
| var a = this, d, c = function(g) { | |
| if (g.keyCode === 9) { | |
| a.forwardTab = !g.shiftKey | |
| } | |
| } | |
| , b = function(g) { | |
| if (g.keyCode === 9) { | |
| delete a.forwardTab | |
| } | |
| } | |
| ; | |
| if (Ext.isIE9m) { | |
| d = { | |
| 0: 0, | |
| 1: 0, | |
| 4: 1, | |
| 2: 2 | |
| }; | |
| a.override({ | |
| statics: { | |
| enableIEAsync: function(h) { | |
| var e, g = {}; | |
| for (e in h) { | |
| g[e] = h[e] | |
| } | |
| return g | |
| } | |
| }, | |
| constructor: function(i, j, g, e) { | |
| var h = this; | |
| h.callParent([i, j, g, e]); | |
| h.button = d[i.button]; | |
| if (i.type === "contextmenu") { | |
| h.button = 2 | |
| } | |
| h.toElement = i.toElement; | |
| h.fromElement = i.fromElement | |
| }, | |
| mouseLeaveRe: /(mouseout|mouseleave)/, | |
| mouseEnterRe: /(mouseover|mouseenter)/, | |
| enableIEAsync: function(e) { | |
| this.browserEvent = this.self.enableIEAsync(e) | |
| }, | |
| getRelatedTarget: function(g, k, e) { | |
| var i = this, h, j; | |
| if (!i.relatedTarget) { | |
| h = i.type; | |
| if (i.mouseLeaveRe.test(h)) { | |
| j = i.toElement | |
| } else { | |
| if (i.mouseEnterRe.test(h)) { | |
| j = i.fromElement | |
| } | |
| } | |
| if (j) { | |
| i.relatedTarget = i.self.resolveTextNode(j) | |
| } | |
| } | |
| return i.callParent([g, k, e]) | |
| } | |
| }); | |
| document.attachEvent("onkeydown", c); | |
| document.attachEvent("onkeyup", b); | |
| window.attachEvent("onunload", function() { | |
| document.detachEvent("onkeydown", c); | |
| document.detachEvent("onkeyup", b) | |
| }) | |
| } else { | |
| if (document.addEventListener) { | |
| document.addEventListener("keydown", c, true); | |
| document.addEventListener("keyup", b, true) | |
| } | |
| } | |
| }); | |
| (Ext.cmd.derive("Ext.event.publisher.Dom", Ext.event.publisher.Publisher, { | |
| type: "dom", | |
| handledDomEvents: [], | |
| reEnterCount: 0, | |
| captureEvents: { | |
| animationstart: 1, | |
| animationend: 1, | |
| resize: 1, | |
| focus: 1, | |
| blur: 1, | |
| scroll: 1 | |
| }, | |
| directEvents: { | |
| mouseenter: 1, | |
| mouseleave: 1, | |
| pointerenter: 1, | |
| pointerleave: 1, | |
| MSPointerEnter: 1, | |
| MSPointerLeave: 1, | |
| load: 1, | |
| unload: 1, | |
| beforeunload: 1, | |
| error: 1, | |
| DOMContentLoaded: 1, | |
| DOMFrameContentLoaded: 1, | |
| hashchange: 1 | |
| }, | |
| blockedPointerEvents: { | |
| pointerover: 1, | |
| pointerout: 1, | |
| pointerenter: 1, | |
| pointerleave: 1, | |
| MSPointerOver: 1, | |
| MSPointerOut: 1, | |
| MSPointerEnter: 1, | |
| MSPointerLeave: 1 | |
| }, | |
| blockedCompatibilityMouseEvents: { | |
| mouseenter: 1, | |
| mouseleave: 1 | |
| }, | |
| constructor: function() { | |
| var a = this; | |
| a.bubbleSubscribers = {}; | |
| a.captureSubscribers = {}; | |
| a.directSubscribers = {}; | |
| a.directCaptureSubscribers = {}; | |
| a.delegatedListeners = {}; | |
| a.initHandlers(); | |
| Ext.onInternalReady(a.onReady, a); | |
| Ext.event.publisher.Publisher.prototype.constructor.call(this) | |
| }, | |
| registerEvents: function() { | |
| var g = this, d = Ext.event.publisher.Publisher.publishersByEvent, a = g.handledDomEvents, e = a.length, c = 0, b; | |
| for (; c < e; c++) { | |
| b = a[c]; | |
| g.handles[b] = 1; | |
| d[b] = g | |
| } | |
| Ext.event.publisher.Publisher.prototype.registerEvents.call(this) | |
| }, | |
| onReady: function() { | |
| var d = this, a = d.handledDomEvents, c, b; | |
| if (a) { | |
| for (b = 0, | |
| c = a.length; b < c; b++) { | |
| d.addDelegatedListener(a[b]) | |
| } | |
| } | |
| Ext.getWin().on("unload", d.destroy, d) | |
| }, | |
| initHandlers: function() { | |
| var a = this; | |
| a.onDelegatedEvent = Ext.bind(a.onDelegatedEvent, a); | |
| a.onDirectEvent = Ext.bind(a.onDirectEvent, a); | |
| a.onDirectCaptureEvent = Ext.bind(a.onDirectCaptureEvent, a) | |
| }, | |
| addDelegatedListener: function(a) { | |
| this.delegatedListeners[a] = 1; | |
| this.target.addEventListener(a, this.onDelegatedEvent, !!this.captureEvents[a]) | |
| }, | |
| removeDelegatedListener: function(a) { | |
| delete this.delegatedListeners[a]; | |
| this.target.removeEventListener(a, this.onDelegatedEvent, !!this.captureEvents[a]) | |
| }, | |
| addDirectListener: function(b, c, a) { | |
| c.dom.addEventListener(b, a ? this.onDirectCaptureEvent : this.onDirectEvent, a) | |
| }, | |
| removeDirectListener: function(b, c, a) { | |
| c.dom.removeEventListener(b, a ? this.onDirectCaptureEvent : this.onDirectEvent, a) | |
| }, | |
| subscribe: function(c, b, g, a) { | |
| var d = this, e, h; | |
| if (g && !d.directEvents[b]) { | |
| e = a ? d.captureSubscribers : d.bubbleSubscribers; | |
| if (!d.handles[b] && !d.delegatedListeners[b]) { | |
| d.addDelegatedListener(b) | |
| } | |
| if (e[b]) { | |
| ++e[b] | |
| } else { | |
| e[b] = 1 | |
| } | |
| } else { | |
| e = a ? d.directCaptureSubscribers : d.directSubscribers; | |
| h = c.id; | |
| e = e[b] || (e[b] = {}); | |
| if (e[h]) { | |
| ++e[h] | |
| } else { | |
| e[h] = 1; | |
| d.addDirectListener(b, c, a) | |
| } | |
| } | |
| }, | |
| unsubscribe: function(e, g, b, j) { | |
| var i = this, h, d, a, c; | |
| if (b && !i.directEvents[g]) { | |
| h = i.captureSubscribers; | |
| d = i.bubbleSubscribers; | |
| a = j ? h : d; | |
| if (a[g]) { | |
| --a[g] | |
| } | |
| if (!i.handles[g] && !d[g] && !h[g]) { | |
| this.removeDelegatedListener(g) | |
| } | |
| } else { | |
| a = j ? i.directCaptureSubscribers : i.directSubscribers; | |
| c = e.id; | |
| a = a[g]; | |
| if (a[c]) { | |
| --a[c] | |
| } | |
| if (!a[c]) { | |
| delete a[c]; | |
| i.removeDirectListener(g, e, j) | |
| } | |
| } | |
| }, | |
| getPropagatingTargets: function(d) { | |
| var c = d, b = [], a; | |
| while (c) { | |
| b.push(c); | |
| a = c.parentNode; | |
| if (!a) { | |
| a = c.defaultView | |
| } | |
| c = a | |
| } | |
| return b | |
| }, | |
| publish: function(b, k, j) { | |
| var h = this, a, d, c, g; | |
| if (Ext.isArray(k)) { | |
| a = k | |
| } else { | |
| if (h.captureEvents[b]) { | |
| d = Ext.cache[k.id]; | |
| a = d ? [d] : [] | |
| } else { | |
| a = h.getPropagatingTargets(k) | |
| } | |
| } | |
| g = a.length; | |
| if (h.captureSubscribers[b]) { | |
| for (c = g; c--; ) { | |
| d = Ext.cache[a[c].id]; | |
| if (d) { | |
| h.fire(d, b, j, false, true); | |
| if (j.isStopped) { | |
| break | |
| } | |
| } | |
| } | |
| } | |
| if (!j.isStopped && h.bubbleSubscribers[b]) { | |
| for (c = 0; c < g; c++) { | |
| d = Ext.cache[a[c].id]; | |
| if (d) { | |
| h.fire(d, b, j, false, false); | |
| if (j.isStopped) { | |
| break | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| fire: function(c, b, g, h, a) { | |
| var d; | |
| if (c.hasListeners[b]) { | |
| d = c.events[b]; | |
| if (d) { | |
| if (a && h) { | |
| d = d.directCaptures | |
| } else { | |
| if (a) { | |
| d = d.captures | |
| } else { | |
| if (h) { | |
| d = d.directs | |
| } | |
| } | |
| } | |
| if (d) { | |
| g.setCurrentTarget(c.dom); | |
| d.fire(g, g.target) | |
| } | |
| } | |
| } | |
| }, | |
| onDelegatedEvent: function(a) { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(this.doDelegatedEvent, this, [a]) | |
| } else { | |
| this.doDelegatedEvent(a) | |
| } | |
| }, | |
| doDelegatedEvent: function(d, c) { | |
| var b = this | |
| , a = d.timeStamp; | |
| d = new Ext.event.Event(d); | |
| if (b.isEventBlocked(d)) { | |
| return false | |
| } | |
| b.beforeEvent(d); | |
| Ext.frameStartTime = a; | |
| b.reEnterCount++; | |
| b.publish(d.type, d.target, d); | |
| b.reEnterCount--; | |
| if (c !== false) { | |
| b.afterEvent(d) | |
| } | |
| return d | |
| }, | |
| onDirectEvent: function(a) { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(this.doDirectEvent, this, [a, false]) | |
| } else { | |
| this.doDirectEvent(a, false) | |
| } | |
| }, | |
| onDirectCaptureEvent: function(a) { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(this.doDirectEvent, this, [a, true]) | |
| } else { | |
| this.doDirectEvent(a, true) | |
| } | |
| }, | |
| doDirectEvent: function(h, b) { | |
| var d = this, g = h.currentTarget, a = h.timeStamp, c; | |
| h = new Ext.event.Event(h); | |
| if (d.isEventBlocked(h)) { | |
| return | |
| } | |
| d.beforeEvent(h); | |
| Ext.frameStartTime = a; | |
| c = Ext.cache[g.id]; | |
| if (c) { | |
| d.reEnterCount++; | |
| d.fire(c, h.type, h, true, b); | |
| d.reEnterCount-- | |
| } | |
| d.afterEvent(h) | |
| }, | |
| beforeEvent: function(c) { | |
| var g = c.browserEvent, a = Ext.event.publisher.Dom, b, d; | |
| if (g.type === "touchstart") { | |
| b = g.touches; | |
| if (b.length === 1) { | |
| d = b[0]; | |
| a.lastTouchStartX = d.pageX; | |
| a.lastTouchStartY = d.pageY | |
| } | |
| } | |
| }, | |
| afterEvent: function(d) { | |
| var g = d.browserEvent | |
| , c = g.type | |
| , b = Ext.event.publisher.Dom | |
| , a = Ext.GlobalEvents; | |
| if (d.self.pointerEvents[c] && d.pointerType !== "mouse") { | |
| b.lastScreenPointerEventTime = Ext.now() | |
| } | |
| if (c === "touchend") { | |
| b.lastTouchEndTime = Ext.now() | |
| } | |
| if (!this.reEnterCount && a.hasListeners.idle && !a.idleEventMask[c]) { | |
| a.fireEvent("idle") | |
| } | |
| }, | |
| isEventBlocked: function(g) { | |
| var d = this | |
| , c = g.type | |
| , a = Ext.event.publisher.Dom | |
| , b = Ext.now(); | |
| if (Ext.isGecko && g.type === "click" && g.button === 2) { | |
| return true | |
| } | |
| return (d.blockedPointerEvents[c] && g.pointerType !== "mouse") || (d.blockedCompatibilityMouseEvents[c] && (b - a.lastScreenPointerEventTime < 1000)) || (Ext.supports.TouchEvents && g.self.mouseEvents[g.type] && Math.abs(g.pageX - a.lastTouchStartX) < 15 && Math.abs(g.pageY - a.lastTouchStartY) < 15 && (Ext.now() - a.lastTouchEndTime) < 1000) | |
| }, | |
| destroy: function() { | |
| var a; | |
| for (a in this.delegatedListeners) { | |
| this.removeDelegatedListener(a) | |
| } | |
| this.callParent() | |
| }, | |
| reset: function() { | |
| var a = Ext.event.publisher.Dom; | |
| a.lastScreenPointerEventTime = a.lastTouchEndTime = a.lastTouchStartX = a.lastTouchStartY = undefined | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.event.publisher, "Dom"], function(b) { | |
| var d = document | |
| , c = d.defaultView | |
| , a = b.prototype; | |
| if ((Ext.os.is.iOS && Ext.os.version.getMajor() < 5) || Ext.browser.is.AndroidStock || !(c && c.addEventListener)) { | |
| a.target = d | |
| } else { | |
| a.target = c | |
| } | |
| b.instance = new b() | |
| })); | |
| Ext.define("Ext.overrides.event.publisher.Dom", { | |
| override: "Ext.event.publisher.Dom" | |
| }, function(g) { | |
| if (Ext.isIE9m) { | |
| var b = document.documentElement, e = document.body, d = g.prototype, a, c; | |
| d.target = document; | |
| d.directBoundListeners = {}; | |
| a = function(j, i, h) { | |
| j.target = j.srcElement || window; | |
| j.currentTarget = this; | |
| if (h) { | |
| i.onDirectCaptureEvent(j) | |
| } else { | |
| i.onDirectEvent(j) | |
| } | |
| } | |
| ; | |
| c = function(i, h) { | |
| i.target = i.srcElement || window; | |
| i.currentTarget = this; | |
| h.onDirectCaptureEvent(i) | |
| } | |
| ; | |
| g.override({ | |
| addDelegatedListener: function(h) { | |
| this.delegatedListeners[h] = 1; | |
| this.target.attachEvent("on" + h, this.onDelegatedEvent) | |
| }, | |
| removeDelegatedListener: function(h) { | |
| delete this.delegatedListeners[h]; | |
| this.target.detachEvent("on" + h, this.onDelegatedEvent) | |
| }, | |
| addDirectListener: function(k, l, j) { | |
| var n = this | |
| , o = l.dom | |
| , m = Ext.Function.bind(a, o, [n, j], true) | |
| , h = n.directBoundListeners | |
| , i = h[k] || (h[k] = {}); | |
| i[o.id] = m; | |
| if (o.attachEvent) { | |
| o.attachEvent("on" + k, m) | |
| } else { | |
| n.callParent(arguments) | |
| } | |
| }, | |
| removeDirectListener: function(h, i) { | |
| var j = i.dom; | |
| if (j.detachEvent) { | |
| j.detachEvent("on" + h, this.directBoundListeners[h][j.id]) | |
| } else { | |
| this.callParent(arguments) | |
| } | |
| }, | |
| doDelegatedEvent: function(i, h) { | |
| i.target = i.srcElement || window; | |
| if (i.type === "focusin") { | |
| i.relatedTarget = i.fromElement === e || i.fromElement === b ? null : i.fromElement | |
| } else { | |
| if (i.type === "focusout") { | |
| i.relatedTarget = i.toElement === e || i.toElement === b ? null : i.toElement | |
| } | |
| } | |
| return this.callParent([i, h]) | |
| } | |
| }); | |
| Ext.apply(d.directEvents, d.captureEvents); | |
| Ext.apply(d.directEvents, { | |
| change: 1, | |
| input: 1, | |
| paste: 1 | |
| }); | |
| d.captureEvents = {} | |
| } | |
| }); | |
| (Ext.cmd.derive("Ext.event.publisher.Gesture", Ext.event.publisher.Dom, { | |
| type: "gesture", | |
| config: { | |
| async: true | |
| }, | |
| isCancelEvent: { | |
| touchcancel: 1, | |
| pointercancel: 1, | |
| MSPointerCancel: 1 | |
| }, | |
| handledEvents: [], | |
| handledDomEvents: [], | |
| constructor: function(b) { | |
| var h = this | |
| , c = h.handledDomEvents | |
| , m = Ext.supports | |
| , k = m.TouchEvents | |
| , l = Ext.Function | |
| , d = h.onTouchStart | |
| , a = h.onTouchMove | |
| , j = h.onTouchEnd | |
| , g = l.createAnimationFrame(h.onTouchStart, h, null , 1) | |
| , e = l.createAnimationFrame(h.onTouchMove, h) | |
| , i = l.createAnimationFrame(h.onTouchEnd, h, null , 1); | |
| h._handlers = { | |
| touchstart: d, | |
| touchmove: a, | |
| touchend: j, | |
| touchcancel: j, | |
| pointerdown: d, | |
| pointermove: a, | |
| pointerup: j, | |
| pointercancel: j, | |
| MSPointerDown: d, | |
| MSPointerMove: a, | |
| MSPointerUp: j, | |
| MSPointerCancel: j, | |
| mousedown: d, | |
| mousemove: a, | |
| mouseup: j | |
| }; | |
| h._asyncHandlers = { | |
| touchstart: g, | |
| touchmove: e, | |
| touchend: i, | |
| touchcancel: i, | |
| pointerdown: g, | |
| pointermove: e, | |
| pointerup: i, | |
| pointercancel: i, | |
| MSPointerDown: g, | |
| MSPointerMove: e, | |
| MSPointerUp: i, | |
| MSPointerCancel: i, | |
| mousedown: g, | |
| mousemove: e, | |
| mouseup: i | |
| }; | |
| h.activeTouchesMap = {}; | |
| h.activeTouches = []; | |
| h.changedTouches = []; | |
| h.recognizers = []; | |
| if (k) { | |
| h.onTargetTouchMove = h.onTargetTouchMove.bind(h); | |
| h.onTargetTouchEnd = h.onTargetTouchEnd.bind(h) | |
| } | |
| if (m.PointerEvents) { | |
| c.push("pointerdown", "pointermove", "pointerup", "pointercancel"); | |
| h.mousePointerType = "mouse" | |
| } else { | |
| if (m.MSPointerEvents) { | |
| c.push("MSPointerDown", "MSPointerMove", "MSPointerUp", "MSPointerCancel"); | |
| h.mousePointerType = 4 | |
| } else { | |
| if (k) { | |
| c.push("touchstart", "touchmove", "touchend", "touchcancel") | |
| } | |
| } | |
| } | |
| if (!c.length || (k && Ext.isWebKit && Ext.os.is.Desktop)) { | |
| c.push("mousedown", "mousemove", "mouseup") | |
| } | |
| h.initConfig(b); | |
| return Ext.event.publisher.Dom.prototype.constructor.call(this) | |
| }, | |
| onReady: function() { | |
| Ext.event.publisher.Dom.prototype.onReady.call(this); | |
| Ext.Array.sort(this.recognizers, function(g, e) { | |
| var d = g.priority | |
| , c = e.priority; | |
| return (d > c) ? 1 : (d < c) ? -1 : 0 | |
| }) | |
| }, | |
| registerRecognizer: function(a) { | |
| var e = this, b = a.handledEvents, d = b.length, c; | |
| a.setOnRecognized(e.onRecognized); | |
| a.setCallbackScope(e); | |
| for (c = 0; c < d; c++) { | |
| e.handledEvents.push(b[c]) | |
| } | |
| e.registerEvents(b); | |
| e.recognizers.push(a) | |
| }, | |
| onRecognized: function(d, h, a) { | |
| var k = this, l = h.changedTouches, j = l.length, m, g, c, b; | |
| a = a || {}; | |
| a.type = d; | |
| a.target = l[0].target; | |
| a.isStopped = false; | |
| h = h.chain(a); | |
| if (j > 1) { | |
| m = []; | |
| for (c = 0; c < j; c++) { | |
| b = l[c]; | |
| m.push(b.targets) | |
| } | |
| g = k.getCommonTargets(m) | |
| } else { | |
| g = l[0].targets | |
| } | |
| k.publish(d, g, h) | |
| }, | |
| getCommonTargets: function(a) { | |
| var k = a[0] | |
| , g = a.length; | |
| if (g === 1) { | |
| return k | |
| } | |
| var d = [], e = 1, h, b, c; | |
| while (true) { | |
| h = k[k.length - e]; | |
| if (!h) { | |
| return d | |
| } | |
| for (c = 1; c < g; c++) { | |
| b = a[c]; | |
| if (b[b.length - e] !== h) { | |
| return d | |
| } | |
| } | |
| d.unshift(h); | |
| e++ | |
| } | |
| return d | |
| }, | |
| invokeRecognizers: function(c, h) { | |
| var b = this.recognizers, g = b.length, d, a; | |
| if (c === "onStart") { | |
| for (d = 0; d < g; d++) { | |
| b[d].isActive = true | |
| } | |
| } | |
| for (d = 0; d < g; d++) { | |
| a = b[d]; | |
| if (a.isActive && a[c].call(a, h) === false) { | |
| a.isActive = false | |
| } | |
| } | |
| }, | |
| updateTouches: function(k, b) { | |
| var o = this, s = k.browserEvent, g = s.changedTouches || [s], a = o.activeTouches, l = o.activeTouchesMap, q = [], n, j, d, h, c, m, r, p; | |
| for (c = 0, | |
| m = g.length; c < m; c++) { | |
| n = g[c]; | |
| if ("identifier"in n) { | |
| j = n.identifier | |
| } else { | |
| if ("pointerId"in n) { | |
| j = n.pointerId | |
| } else { | |
| j = 1 | |
| } | |
| } | |
| d = l[j]; | |
| if (!d) { | |
| h = Ext.event.Event.resolveTextNode(n.target); | |
| d = l[j] = { | |
| identifier: j, | |
| target: h, | |
| targets: o.getPropagatingTargets(h) | |
| }; | |
| a.push(d) | |
| } | |
| if (b) { | |
| delete l[j]; | |
| Ext.Array.remove(a, d) | |
| } | |
| r = n.pageX; | |
| p = n.pageY; | |
| d.pageX = r; | |
| d.pageY = p; | |
| d.point = new Ext.util.Point(r,p); | |
| q.push(d) | |
| } | |
| k.touches = Ext.Array.clone(a); | |
| k.changedTouches = q | |
| }, | |
| doDelegatedEvent: function(b) { | |
| var a = this; | |
| b = Ext.event.publisher.Dom.prototype.doDelegatedEvent.call(this, b, false); | |
| if (b) { | |
| if (!b.button || b.button < 1) { | |
| a.handlers[b.type].call(a, b) | |
| } | |
| a.afterEvent(b) | |
| } | |
| }, | |
| onTouchStart: function(d) { | |
| var a = this | |
| , c = d.target | |
| , b = d.browserEvent.touches; | |
| if (d.browserEvent.type === "touchstart") { | |
| c.addEventListener("touchmove", a.onTargetTouchMove); | |
| c.addEventListener("touchend", a.onTargetTouchEnd); | |
| c.addEventListener("touchcancel", a.onTargetTouchEnd) | |
| } | |
| if (b && b.length <= a.activeTouches.length) { | |
| a.removeGhostTouches(b) | |
| } | |
| a.updateTouches(d); | |
| if (!a.isStarted) { | |
| a.isStarted = true; | |
| a.invokeRecognizers("onStart", d); | |
| if (Ext.enableGarbageCollector) { | |
| Ext.dom.GarbageCollector.pause() | |
| } | |
| } | |
| a.invokeRecognizers("onTouchStart", d) | |
| }, | |
| onTouchMove: function(c) { | |
| var b = this | |
| , a = b.mousePointerType; | |
| if (b.isStarted) { | |
| if (a && c.browserEvent.pointerType === a && c.buttons === 0) { | |
| c.type = Ext.dom.Element.prototype.eventMap.touchend; | |
| c.button = 0; | |
| b.onTouchEnd(c); | |
| return | |
| } | |
| b.updateTouches(c); | |
| if (c.changedTouches.length > 0) { | |
| b.invokeRecognizers("onTouchMove", c) | |
| } | |
| } | |
| }, | |
| onTouchEnd: function(b) { | |
| var a = this; | |
| if (!a.isStarted) { | |
| return | |
| } | |
| a.updateTouches(b, true); | |
| a.invokeRecognizers(a.isCancelEvent[b.type] ? "onTouchCancel" : "onTouchEnd", b); | |
| if (!a.activeTouches.length) { | |
| a.isStarted = false; | |
| a.invokeRecognizers("onEnd", b); | |
| if (Ext.enableGarbageCollector) { | |
| Ext.dom.GarbageCollector.resume() | |
| } | |
| } | |
| }, | |
| onTargetTouchMove: function(a) { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(this.doTargetTouchMove, this, [a]) | |
| } else { | |
| this.doTargetTouchMove(a) | |
| } | |
| }, | |
| doTargetTouchMove: function(a) { | |
| if (!Ext.getBody().contains(a.target)) { | |
| this.onTouchMove(new Ext.event.Event(a)) | |
| } | |
| }, | |
| onTargetTouchEnd: function(a) { | |
| if (Ext.elevateFunction) { | |
| Ext.elevateFunction(this.doTargetTouchEnd, this, [a]) | |
| } else { | |
| this.doTargetTouchEnd(a) | |
| } | |
| }, | |
| doTargetTouchEnd: function(c) { | |
| var a = this | |
| , b = c.target; | |
| b.removeEventListener("touchmove", a.onTargetTouchMove); | |
| b.removeEventListener("touchend", a.onTargetTouchEnd); | |
| b.removeEventListener("touchcancel", a.onTargetTouchEnd); | |
| if (!Ext.getBody().contains(b)) { | |
| a.onTouchEnd(new Ext.event.Event(c)) | |
| } | |
| }, | |
| updateAsync: function(a) { | |
| this.handlers = a ? this._asyncHandlers : this._handlers | |
| }, | |
| reset: function() { | |
| var e = this, b = e.recognizers, d = b.length, c, a; | |
| e.activeTouchesMap = {}; | |
| e.activeTouches = []; | |
| e.changedTouches = []; | |
| e.isStarted = false; | |
| for (c = 0; c < d; c++) { | |
| a = b[c]; | |
| a.reset(); | |
| a.isActive = false | |
| } | |
| Ext.event.publisher.Dom.prototype.reset.call(this) | |
| }, | |
| privates: { | |
| removeGhostTouches: function(e) { | |
| var c = {}, a = e.length, j = this.activeTouches, d = this.activeTouchesMap, b, h, g; | |
| for (b = 0; b < a; ++b) { | |
| c[e[b].identifier] = true | |
| } | |
| b = j.length; | |
| while (b--) { | |
| g = j[b]; | |
| h = g.identifier; | |
| if (!e[h]) { | |
| Ext.Array.remove(j, g); | |
| delete d[h] | |
| } | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.event.publisher, "Gesture"], function(a) { | |
| a.instance = new a() | |
| })); | |
| Ext.define("Ext.overrides.event.publisher.Gesture", { | |
| override: "Ext.event.publisher.Gesture" | |
| }, function() { | |
| if (Ext.isIE9m) { | |
| this.override({ | |
| updateTouches: function(c, a) { | |
| var d = c.browserEvent | |
| , b = c.getXY(); | |
| d.pageX = b[0]; | |
| d.pageY = b[1]; | |
| this.callParent([c, a]) | |
| }, | |
| doDelegatedEvent: function(a) { | |
| this.callParent([Ext.event.Event.enableIEAsync(a)]) | |
| } | |
| }) | |
| } | |
| }); | |
| (Ext.cmd.derive("Ext.mixin.Templatable", Ext.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 h = this.referenceAttributeName, c, d, e, g, b, a; | |
| c = this.elementTemplate.cloneNode(true); | |
| d = c.querySelectorAll(this.referenceSelector); | |
| for (e = 0, | |
| g = d.length; e < g; e++) { | |
| b = d[e]; | |
| a = b.getAttribute(h); | |
| b.removeAttribute(h); | |
| this.linkElement(a, b) | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.mixin, "Templatable"], 0)); | |
| (Ext.cmd.derive("Ext.TaskQueue", Ext.Base, { | |
| singleton: true, | |
| pending: false, | |
| mode: true, | |
| constructor: function() { | |
| this.readQueue = []; | |
| this.writeQueue = []; | |
| this.run = Ext.Function.bind(this.run, this); | |
| if (Ext.os.is.iOS) { | |
| Ext.interval(this.watch, 500, this) | |
| } | |
| }, | |
| 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) { | |
| Ext.defer(this.run, 1, this) | |
| } else { | |
| Ext.Function.requestAnimationFrame(this.run) | |
| } | |
| } | |
| }, | |
| watch: function() { | |
| if (this.pending && Date.now() - this.pendingTime >= 500) { | |
| this.run() | |
| } | |
| }, | |
| run: function() { | |
| this.pending = false; | |
| var k = this.readQueue, e = this.writeQueue, c = null , g; | |
| if (this.mode) { | |
| g = k; | |
| if (e.length > 0) { | |
| c = false | |
| } | |
| } else { | |
| g = e; | |
| if (k.length > 0) { | |
| c = true | |
| } | |
| } | |
| var b = g.slice(), d, h, a, j, l; | |
| g.length = 0; | |
| for (d = 0, | |
| h = b.length; d < h; d++) { | |
| a = b[d]; | |
| j = a[0]; | |
| l = a[1]; | |
| if (typeof j === "string") { | |
| j = l[j] | |
| } | |
| if (a.length > 2) { | |
| j.apply(l, a[2]) | |
| } else { | |
| j.call(l) | |
| } | |
| } | |
| b.length = 0; | |
| if (c !== null ) { | |
| this.request(c) | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext, "TaskQueue"], 0)); | |
| (Ext.cmd.derive("Ext.util.sizemonitor.Abstract", Ext.Base, { | |
| config: { | |
| element: null , | |
| callback: Ext.emptyFn, | |
| scope: null , | |
| args: [] | |
| }, | |
| width: 0, | |
| height: 0, | |
| contentWidth: 0, | |
| contentHeight: 0, | |
| constructor: function(a) { | |
| this.refresh = Ext.Function.bind(this.refresh, this); | |
| this.info = { | |
| width: 0, | |
| height: 0, | |
| contentWidth: 0, | |
| contentHeight: 0, | |
| flag: 0 | |
| }; | |
| this.initElement(); | |
| this.initConfig(a); | |
| this.bindListeners(true) | |
| }, | |
| bindListeners: Ext.emptyFn, | |
| applyElement: function(a) { | |
| if (a) { | |
| return Ext.get(a) | |
| } | |
| }, | |
| updateElement: function(a) { | |
| a.append(this.detectorsContainer); | |
| a.addCls("x-size-monitored") | |
| }, | |
| applyArgs: function(a) { | |
| return a.concat([this.info]) | |
| }, | |
| refreshMonitors: Ext.emptyFn, | |
| forceRefresh: function() { | |
| Ext.TaskQueue.requestRead("refresh", this) | |
| }, | |
| getContentBounds: function() { | |
| return this.detectorsContainer.getBoundingClientRect() | |
| }, | |
| getContentWidth: function() { | |
| return this.detectorsContainer.offsetWidth | |
| }, | |
| getContentHeight: function() { | |
| return this.detectorsContainer.offsetHeight | |
| }, | |
| refreshSize: function() { | |
| var d = this.getElement(); | |
| if (!d || d.destroyed) { | |
| return false | |
| } | |
| var b = d.getWidth(), k = d.getHeight(), a = this.getContentWidth(), j = this.getContentHeight(), i = this.contentWidth, g = this.contentHeight, c = this.info, e = false, h; | |
| this.width = b; | |
| this.height = k; | |
| this.contentWidth = a; | |
| this.contentHeight = j; | |
| h = ((i !== a ? 1 : 0) + (g !== j ? 2 : 0)); | |
| if (h > 0) { | |
| c.width = b; | |
| c.height = k; | |
| c.contentWidth = a; | |
| c.contentHeight = j; | |
| c.flag = h; | |
| 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 b = this | |
| , a = b.getElement(); | |
| b.bindListeners(false); | |
| if (a && !a.destroyed) { | |
| a.removeCls("x-size-monitored") | |
| } | |
| delete b._element; | |
| b.callParent() | |
| } | |
| }, 1, 0, 0, 0, 0, [[Ext.mixin.Templatable.prototype.mixinId || Ext.mixin.Templatable.$className, Ext.mixin.Templatable]], [Ext.util.sizemonitor, "Abstract"], 0)); | |
| (Ext.cmd.derive("Ext.util.sizemonitor.Scroll", 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); | |
| Ext.util.sizemonitor.Abstract.prototype.constructor.apply(this, 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.destroyed) { | |
| b.scrollLeft = a; | |
| b.scrollTop = a | |
| } | |
| if (c && !c.destroyed) { | |
| c.scrollLeft = a; | |
| c.scrollTop = a | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util.sizemonitor, "Scroll"], 0)); | |
| (Ext.cmd.derive("Ext.util.sizemonitor.OverflowChange", Ext.util.sizemonitor.Abstract, { | |
| constructor: function(a) { | |
| this.onExpand = Ext.Function.bind(this.onExpand, this); | |
| this.onShrink = Ext.Function.bind(this.onShrink, this); | |
| Ext.util.sizemonitor.Abstract.prototype.constructor.apply(this, 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.destroyed) { | |
| return | |
| } | |
| var g = this.expandHelper, e = this.shrinkHelper, b = this.getContentBounds(), d = b.width, a = b.height, c; | |
| if (g && !g.destroyed) { | |
| c = g.style; | |
| c.width = (d + 1) + "px"; | |
| c.height = (a + 1) + "px" | |
| } | |
| if (e && !e.destroyed) { | |
| c = e.style; | |
| c.width = d + "px"; | |
| c.height = a + "px" | |
| } | |
| Ext.TaskQueue.requestRead("refresh", this) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util.sizemonitor, "OverflowChange"], 0)); | |
| (Ext.cmd.derive("Ext.util.SizeMonitor", Ext.Base, { | |
| constructor: function(a) { | |
| var b = Ext.util.sizemonitor; | |
| if (Ext.browser.is.Firefox) { | |
| return new b.OverflowChange(a) | |
| } else { | |
| return new b.Scroll(a) | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "SizeMonitor"], 0)); | |
| (Ext.cmd.derive("Ext.event.publisher.ElementSize", Ext.event.publisher.Publisher, { | |
| type: "size", | |
| handledEvents: ["resize"], | |
| constructor: function() { | |
| this.monitors = {}; | |
| this.subscribers = {}; | |
| Ext.event.publisher.Publisher.prototype.constructor.apply(this, arguments) | |
| }, | |
| subscribe: function(b) { | |
| var d = b.id | |
| , c = this.subscribers | |
| , a = this.monitors; | |
| if (c[d]) { | |
| ++c[d] | |
| } else { | |
| c[d] = 1; | |
| a[d] = new Ext.util.SizeMonitor({ | |
| element: b, | |
| callback: this.onElementResize, | |
| scope: this, | |
| args: [b] | |
| }) | |
| } | |
| b.on("painted", "forceRefresh", a[d]); | |
| return true | |
| }, | |
| unsubscribe: function(c) { | |
| var e = c.id, d = this.subscribers, b = this.monitors, a; | |
| if (d[e] && !--d[e]) { | |
| delete d[e]; | |
| a = b[e]; | |
| c.un("painted", "forceRefresh", a); | |
| a.destroy(); | |
| delete b[e] | |
| } | |
| }, | |
| onElementResize: function(a, b) { | |
| Ext.TaskQueue.requestRead("fire", this, [a, "resize", [a, b]]) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.event.publisher, "ElementSize"], function(a) { | |
| a.instance = new a() | |
| })); | |
| (Ext.cmd.derive("Ext.util.paintmonitor.Abstract", Ext.Base, { | |
| config: { | |
| element: null , | |
| callback: Ext.emptyFn, | |
| scope: null , | |
| args: [] | |
| }, | |
| eventName: "", | |
| monitorClass: "", | |
| constructor: function(a) { | |
| this.onElementPainted = Ext.Function.bind(this.onElementPainted, this); | |
| this.initConfig(a) | |
| }, | |
| bindListeners: function(a) { | |
| this.monitorElement[a ? "addEventListener" : "removeEventListener"](this.eventName, this.onElementPainted, true) | |
| }, | |
| applyElement: function(a) { | |
| if (a) { | |
| return Ext.get(a) | |
| } | |
| }, | |
| updateElement: function(a) { | |
| this.monitorElement = Ext.Element.create({ | |
| classList: ["x-paint-monitor", this.monitorClass] | |
| }, true); | |
| a.appendChild(this.monitorElement); | |
| a.addCls("x-paint-monitored"); | |
| this.bindListeners(true) | |
| }, | |
| onElementPainted: function() {}, | |
| destroy: function() { | |
| var d = this | |
| , b = d.monitorElement | |
| , a = b.parentNode | |
| , c = d.getElement(); | |
| d.bindListeners(false); | |
| delete d.monitorElement; | |
| if (c && !c.destroyed) { | |
| c.removeCls("x-paint-monitored"); | |
| delete d._element | |
| } | |
| if (a) { | |
| a.removeChild(b) | |
| } | |
| d.callParent() | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util.paintmonitor, "Abstract"], 0)); | |
| (Ext.cmd.derive("Ext.util.paintmonitor.CssAnimation", Ext.util.paintmonitor.Abstract, { | |
| eventName: Ext.browser.is.WebKit ? "webkitAnimationEnd" : "animationend", | |
| monitorClass: "cssanimation", | |
| onElementPainted: function(a) { | |
| if (a.animationName === "x-paint-monitor-helper") { | |
| this.getCallback().apply(this.getScope(), this.getArgs()) | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util.paintmonitor, "CssAnimation"], 0)); | |
| (Ext.cmd.derive("Ext.util.PaintMonitor", Ext.Base, { | |
| constructor: function(a) { | |
| return new Ext.util.paintmonitor.CssAnimation(a) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "PaintMonitor"], 0)); | |
| (Ext.cmd.derive("Ext.event.publisher.ElementPaint", Ext.event.publisher.Publisher, { | |
| type: "paint", | |
| handledEvents: ["painted"], | |
| constructor: function() { | |
| this.monitors = {}; | |
| this.subscribers = {}; | |
| Ext.event.publisher.Publisher.prototype.constructor.apply(this, arguments) | |
| }, | |
| subscribe: function(a) { | |
| var b = this | |
| , d = a.id | |
| , c = b.subscribers; | |
| if (c[d]) { | |
| ++c[d] | |
| } else { | |
| c[d] = 1; | |
| b.monitors[d] = new Ext.util.PaintMonitor({ | |
| element: a, | |
| callback: b.onElementPainted, | |
| scope: b, | |
| args: [a] | |
| }) | |
| } | |
| }, | |
| unsubscribe: function(b) { | |
| var d = b.id | |
| , c = this.subscribers | |
| , a = this.monitors; | |
| if (c[d] && !--c[d]) { | |
| delete c[d]; | |
| a[d].destroy(); | |
| delete a[d] | |
| } | |
| }, | |
| onElementPainted: function(a) { | |
| Ext.TaskQueue.requestRead("fire", this, [a, "painted", [a]]) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.event.publisher, "ElementPaint"], function(a) { | |
| a.instance = new a() | |
| })); | |
| (Ext.cmd.derive("Ext.dom.Element", Ext.Base, function(q) { | |
| var v = window, T = document, ah = "ext-window", N = "ext-document", j = "width", R = "height", ae = "min-width", e = "min-height", r = "max-width", E = "max-height", U = "top", ai = "right", O = "bottom", I = "left", l = "visibility", af = "hidden", d = "display", W = "none", o = "z-index", Y = "position", t = "relative", u = "static", A = "-", y = /\w/g, M = /\s+/, ag = /[\s]+/, b = /^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i, K = /table-row|table-.*-group/, c = /top/i, x = { | |
| t: "border-top-width", | |
| r: "border-right-width", | |
| b: "border-bottom-width", | |
| l: "border-left-width" | |
| }, ad = { | |
| t: "padding-top", | |
| r: "padding-right", | |
| b: "padding-bottom", | |
| l: "padding-left" | |
| }, n = { | |
| t: "margin-top", | |
| r: "margin-right", | |
| b: "margin-bottom", | |
| l: "margin-left" | |
| }, H = [ad.l, ad.r, ad.t, ad.b], h = [x.l, x.r, x.t, x.b], ab = /\d+$/, k = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i, S = "px", Q = /(-[a-z])/gi, aj = /([a-z0-9\-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi, s = /^\d+(?:\.\d*)?px$/i, z = {}, w = "originalDisplay", X = function(ak, al) { | |
| return al.charAt(1).toUpperCase() | |
| } | |
| , L = function(an, al) { | |
| var ao, am, ak; | |
| if (an.nodeType === 1) { | |
| an._extData = null ; | |
| if (al) { | |
| ao = an.childNodes; | |
| for (am = 0, | |
| ak = ao.length; am < ak; ++am) { | |
| L(ao[am], al) | |
| } | |
| } | |
| } | |
| } | |
| , F = "x-hidden-visibility", D = "x-hidden-display", m = "x-hidden-offsets", a = "x-hidden-clip", C = "x-sized", P = "x-unsized", J = "x-stretched", aa = "x-no-touch-scroll", p = { | |
| style: "style", | |
| className: "className", | |
| cls: "cls", | |
| classList: "classList", | |
| text: "text", | |
| hidden: "hidden", | |
| html: "html", | |
| children: "children" | |
| }, V = 0, ac = 0, B = false, g = false, Z, G, i; | |
| return { | |
| alternateClassName: ["Ext.Element"], | |
| observableType: "element", | |
| isElement: true, | |
| skipGarbageCollection: true, | |
| $applyConfigs: true, | |
| identifiablePrefix: "ext-element-", | |
| styleHooks: {}, | |
| validIdRe: Ext.validIdRe, | |
| blockedEvents: Ext.supports.EmulatedMouseOver ? { | |
| mouseover: 1 | |
| } : {}, | |
| longpressEvents: { | |
| longpress: 1, | |
| taphold: 1 | |
| }, | |
| constructor: function(al) { | |
| var ak = this, am; | |
| if (typeof al === "string") { | |
| al = T.getElementById(al) | |
| } | |
| if (!al) { | |
| return null | |
| } | |
| ak.dom = al; | |
| am = al.id; | |
| if (am) { | |
| ak.id = am | |
| } else { | |
| am = al.id = ak.getUniqueId() | |
| } | |
| ak.el = ak; | |
| Ext.cache[am] = ak; | |
| ak.mixins.observable.constructor.call(ak) | |
| }, | |
| inheritableStatics: { | |
| cache: Ext.cache = {}, | |
| editableSelector: 'input,textarea,[contenteditable="true"]', | |
| VISIBILITY: 1, | |
| DISPLAY: 2, | |
| OFFSETS: 3, | |
| CLIP: 4, | |
| minKeyboardHeight: 100, | |
| unitRe: k, | |
| useDelegatedEvents: true, | |
| validNodeTypes: { | |
| 1: 1, | |
| 9: 1 | |
| }, | |
| addUnits: function(al, ak) { | |
| if (typeof al === "number") { | |
| return al + (ak || S) | |
| } | |
| if (al === "" || al === "auto" || al == null ) { | |
| return al || "" | |
| } | |
| if (ab.test(al)) { | |
| return al + (ak || S) | |
| } | |
| if (!k.test(al)) { | |
| return al || "" | |
| } | |
| return al | |
| }, | |
| create: function(am, al) { | |
| var at = this, ap = p.hidden, ao, au, aw, av, ak, an, ar, aq; | |
| if (!am) { | |
| am = {} | |
| } | |
| if (am.isElement) { | |
| return al ? am.dom : am | |
| } else { | |
| if ("nodeType"in am) { | |
| return al ? am : Ext.get(am) | |
| } | |
| } | |
| if (typeof am === "string") { | |
| return T.createTextNode(am) | |
| } | |
| aw = am.tag; | |
| if (!aw) { | |
| aw = "div" | |
| } | |
| if (am.namespace) { | |
| ao = T.createElementNS(am.namespace, aw) | |
| } else { | |
| ao = T.createElement(aw) | |
| } | |
| au = ao.style; | |
| if (am[ap]) { | |
| aq = am.className; | |
| aq = (aq == null ) ? "" : aq + " "; | |
| am.className = aq + D; | |
| delete am[ap] | |
| } | |
| for (ak in am) { | |
| if (ak !== "tag") { | |
| av = am[ak]; | |
| switch (ak) { | |
| case p.style: | |
| if (typeof av === "string") { | |
| ao.setAttribute(ak, av) | |
| } else { | |
| for (an in av) { | |
| if (av.hasOwnProperty(an)) { | |
| au[an] = av[an] | |
| } | |
| } | |
| } | |
| break; | |
| case p.className: | |
| case p.cls: | |
| ao.className = av; | |
| break; | |
| case p.classList: | |
| ao.className = av.join(" "); | |
| break; | |
| case p.text: | |
| ao.textContent = av; | |
| break; | |
| case p.html: | |
| ao.innerHTML = av; | |
| break; | |
| case p.children: | |
| for (an = 0, | |
| ar = av.length; an < ar; an++) { | |
| ao.appendChild(at.create(av[an], true)) | |
| } | |
| break; | |
| default: | |
| if (av != null ) { | |
| ao.setAttribute(ak, av) | |
| } | |
| } | |
| } | |
| } | |
| if (al) { | |
| return ao | |
| } else { | |
| return at.get(ao) | |
| } | |
| }, | |
| detach: function() { | |
| var ak = this.dom; | |
| if (ak && ak.parentNode && ak.tagName !== "BODY") { | |
| ak.parentNode.removeChild(ak) | |
| } | |
| return this | |
| }, | |
| fly: function(al, ak) { | |
| return Ext.fly(al, ak) | |
| }, | |
| fromPoint: function(ak, al) { | |
| return Ext.get(T.elementFromPoint(ak, al)) | |
| }, | |
| get: function(am) { | |
| var aq = this, ak = Ext.cache, ao, an, al, au, at, ap, ar; | |
| if (!am) { | |
| return null | |
| } | |
| if (am.isFly) { | |
| am = am.dom | |
| } | |
| if (typeof am === "string") { | |
| al = am; | |
| if (ak.hasOwnProperty(al)) { | |
| au = ak[al]; | |
| if (au.skipGarbageCollection || !Ext.isGarbage(au.dom)) { | |
| return au | |
| } else { | |
| au.destroy() | |
| } | |
| } | |
| if (al === ah) { | |
| return q.get(v) | |
| } else { | |
| if (al === N) { | |
| return q.get(T) | |
| } | |
| } | |
| an = Ext.getElementById ? Ext.getElementById(al) : T.getElementById(al); | |
| if (an) { | |
| return new q(an) | |
| } | |
| } | |
| ao = am.nodeType; | |
| if (ao) { | |
| at = (ao === 9); | |
| ar = aq.validNodeTypes[ao] | |
| } else { | |
| ap = (am.window == am) | |
| } | |
| if (ar || ap) { | |
| al = am.id; | |
| if (ak.hasOwnProperty(al)) { | |
| au = ak[al]; | |
| if (au.skipGarbageCollection || am === au.dom || !Ext.isGarbage(au.dom)) { | |
| return au | |
| } else { | |
| au.destroy() | |
| } | |
| } | |
| if (am === T) { | |
| am.id = N | |
| } | |
| if (am == v) { | |
| am.id = ah | |
| } | |
| am = new q(am); | |
| if (ap || at) { | |
| am.skipGarbageCollection = true | |
| } | |
| return am | |
| } | |
| if (am.isElement) { | |
| return am | |
| } | |
| if (am.isComposite) { | |
| return am | |
| } | |
| if (Ext.isIterable(am)) { | |
| return aq.select(am) | |
| } | |
| return null | |
| }, | |
| getActiveElement: function(ak) { | |
| var al = T.activeElement; | |
| if (!al || !al.focus) { | |
| al = T.body | |
| } | |
| return ak ? Ext.get(al) : al | |
| }, | |
| getDocumentHeight: function() { | |
| return Math.max(!Ext.isStrict ? T.body.scrollHeight : T.documentElement.scrollHeight, this.getViewportHeight()) | |
| }, | |
| getDocumentWidth: function() { | |
| return Math.max(!Ext.isStrict ? T.body.scrollWidth : T.documentElement.scrollWidth, this.getViewportWidth()) | |
| }, | |
| getOrientation: function() { | |
| if (Ext.supports.OrientationChange) { | |
| return (v.orientation == 0) ? "portrait" : "landscape" | |
| } | |
| return (v.innerHeight > v.innerWidth) ? "portrait" : "landscape" | |
| }, | |
| getViewportHeight: function() { | |
| var ak = q._viewportHeight; | |
| if (Ext.isIE9m) { | |
| return T.documentElement.clientHeight | |
| } | |
| return (ak != null ) ? ak : v.innerHeight | |
| }, | |
| getViewportWidth: function() { | |
| var ak = q._viewportWidth; | |
| if (Ext.isIE9m) { | |
| return T.documentElement.clientWidth | |
| } | |
| return (ak != null ) ? ak : v.innerWidth | |
| }, | |
| getViewSize: function() { | |
| return { | |
| width: q.getViewportWidth(), | |
| height: q.getViewportHeight() | |
| } | |
| }, | |
| normalize: function(ak) { | |
| return z[ak] || (z[ak] = ak.replace(Q, X)) | |
| }, | |
| _onWindowFocusChange: function(ak) { | |
| if (Ext.fly(ak.target).is(q.editableSelector)) { | |
| V = new Date(); | |
| B = (ak.type === "focusin" || ak.type === "pointerup") | |
| } | |
| }, | |
| _onWindowResize: function() { | |
| var ao = window.innerWidth, ap = window.innerHeight, an = new Date(), al = 1000, am, ak; | |
| am = ao - q._windowWidth; | |
| ak = ap - q._windowHeight; | |
| q._windowWidth = ao; | |
| q._windowHeight = ap; | |
| if (((an - V) < al) || ((an - ac) < al)) { | |
| if (am === 0 && (B && (ak <= -q.minKeyboardHeight))) { | |
| g = true; | |
| return | |
| } | |
| } | |
| if (g && (am === 0) && (ak >= q.minKeyboardHeight)) { | |
| g = false; | |
| ac = new Date() | |
| } | |
| if (g) { | |
| return | |
| } | |
| q._viewportWidth = ao; | |
| q._viewportHeight = ap | |
| }, | |
| parseBox: function(am) { | |
| am = am || 0; | |
| var ak = typeof am, an, al; | |
| if (ak === "number") { | |
| return { | |
| top: am, | |
| right: am, | |
| bottom: am, | |
| left: am | |
| } | |
| } else { | |
| if (ak !== "string") { | |
| return am | |
| } | |
| } | |
| an = am.split(" "); | |
| al = an.length; | |
| if (al === 1) { | |
| an[1] = an[2] = an[3] = an[0] | |
| } else { | |
| if (al === 2) { | |
| an[2] = an[0]; | |
| an[3] = an[1] | |
| } else { | |
| if (al === 3) { | |
| an[3] = an[1] | |
| } | |
| } | |
| } | |
| return { | |
| top: parseFloat(an[0]) || 0, | |
| right: parseFloat(an[1]) || 0, | |
| bottom: parseFloat(an[2]) || 0, | |
| left: parseFloat(an[3]) || 0 | |
| } | |
| }, | |
| parseStyles: function(al) { | |
| var ak = {}, am; | |
| if (al) { | |
| aj.lastIndex = 0; | |
| while ((am = aj.exec(al)) ) { | |
| ak[am[1]] = am[2] || "" | |
| } | |
| } | |
| return ak | |
| }, | |
| select: function(ak, am, al) { | |
| return Ext.fly(al || T).select(ak, am) | |
| }, | |
| query: function(al, ak, am) { | |
| return Ext.fly(am || T).query(al, ak) | |
| }, | |
| unitizeBox: function(am, ak) { | |
| var al = this; | |
| am = al.parseBox(am); | |
| return al.addUnits(am.top, ak) + " " + al.addUnits(am.right, ak) + " " + al.addUnits(am.bottom, ak) + " " + al.addUnits(am.left, ak) | |
| }, | |
| serializeForm: function(am) { | |
| var an = am.elements || (T.forms[am] || Ext.getDom(am)).elements, ax = false, aw = encodeURIComponent, aq = "", ap = an.length, ar, ak, av, az, ay, at, ao, au, al; | |
| for (at = 0; at < ap; at++) { | |
| ar = an[at]; | |
| ak = ar.name; | |
| av = ar.type; | |
| az = ar.options; | |
| if (!ar.disabled && ak) { | |
| if (/select-(one|multiple)/i.test(av)) { | |
| au = az.length; | |
| for (ao = 0; ao < au; ao++) { | |
| al = az[ao]; | |
| if (al.selected) { | |
| ay = al.hasAttribute("value"); | |
| aq += Ext.String.format("{0}={1}&", aw(ak), aw(ay ? al.value : al.text)) | |
| } | |
| } | |
| } else { | |
| if (!(/file|undefined|reset|button/i.test(av))) { | |
| if (!(/radio|checkbox/i.test(av) && !ar.checked) && !(av == "submit" && ax)) { | |
| aq += aw(ak) + "=" + aw(ar.value) + "&"; | |
| ax = /submit/i.test(av) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return aq.substr(0, aq.length - 1) | |
| }, | |
| getCommonAncestor: function(am, al, ak) { | |
| i = i || new Ext.dom.Fly(); | |
| i.attach(Ext.getDom(am)); | |
| while (!i.isAncestor(al)) { | |
| if (i.dom.parentNode) { | |
| i.attach(i.dom.parentNode) | |
| } else { | |
| i.attach(document.body); | |
| break | |
| } | |
| } | |
| return ak ? i.dom : Ext.get(i) | |
| } | |
| }, | |
| addCls: function(at, aq, av) { | |
| var au = this, an = au.getData(), aw, ao, al, am, ap, ar, ak; | |
| if (!at) { | |
| return au | |
| } | |
| if (!an.isSynchronized) { | |
| au.synchronize() | |
| } | |
| ao = au.dom; | |
| al = an.classMap; | |
| am = an.classList; | |
| aq = aq ? aq + A : ""; | |
| av = av ? A + av : ""; | |
| if (typeof at === "string") { | |
| at = at.split(M) | |
| } | |
| for (ap = 0, | |
| ar = at.length; ap < ar; ap++) { | |
| ak = at[ap]; | |
| if (ak) { | |
| ak = aq + ak + av; | |
| if (!al[ak]) { | |
| al[ak] = true; | |
| am.push(ak); | |
| aw = true | |
| } | |
| } | |
| } | |
| if (aw) { | |
| ao.className = am.join(" ") | |
| } | |
| return au | |
| }, | |
| addStyles: function(ar, aq) { | |
| var am = 0, ap = (ar || "").match(y), ao, ak = ap.length, an, al = []; | |
| if (ak === 1) { | |
| am = Math.abs(parseFloat(this.getStyle(aq[ap[0]])) || 0) | |
| } else { | |
| if (ak) { | |
| for (ao = 0; ao < ak; ao++) { | |
| an = ap[ao]; | |
| al.push(aq[an]) | |
| } | |
| al = this.getStyle(al); | |
| for (ao = 0; ao < ak; ao++) { | |
| an = ap[ao]; | |
| am += parseFloat(al[aq[an]]) || 0 | |
| } | |
| } | |
| } | |
| return am | |
| }, | |
| addUnits: function(al, ak) { | |
| return q.addUnits(al, ak) | |
| }, | |
| adjustDirect2DDimension: function(am) { | |
| var ar = this, al = ar.dom, ap = ar.getStyle("display"), ao = al.style.display, at = al.style.position, aq = am === j ? 0 : 1, ak = al.currentStyle, an; | |
| if (ap === "inline") { | |
| al.style.display = "inline-block" | |
| } | |
| al.style.position = ap.match(K) ? "absolute" : "static"; | |
| an = (parseFloat(ak[am]) || parseFloat(ak.msTransformOrigin.split(" ")[aq]) * 2) % 1; | |
| al.style.position = at; | |
| if (ap === "inline") { | |
| al.style.display = ao | |
| } | |
| return an | |
| }, | |
| animate: function(ak) { | |
| ak = new Ext.fx.Animation(ak); | |
| ak.setElement(this); | |
| this._activeAnimation = ak; | |
| ak.on({ | |
| animationend: this._onAnimationEnd | |
| }); | |
| Ext.Animator.run(ak); | |
| return ak | |
| }, | |
| _onAnimationEnd: function() { | |
| this._activeAnimation = null | |
| }, | |
| getActiveAnimation: function() { | |
| return this._activeAnimation | |
| }, | |
| append: function() { | |
| this.appendChild.apply(this, arguments) | |
| }, | |
| appendChild: function(am, al) { | |
| var an = this, ap, ak, ao; | |
| if (am.nodeType || am.dom || typeof am === "string") { | |
| am = Ext.getDom(am); | |
| an.dom.appendChild(am); | |
| return !al ? Ext.get(am) : am | |
| } else { | |
| if (am.length) { | |
| ap = Ext.fly(document.createDocumentFragment()); | |
| ak = am.length; | |
| for (ao = 0; ao < ak; ao++) { | |
| ap.appendChild(am[ao], al) | |
| } | |
| an.dom.appendChild(ap.dom); | |
| return al ? ap.dom : ap | |
| } else { | |
| return an.createChild(am, null , al) | |
| } | |
| } | |
| }, | |
| appendTo: function(ak) { | |
| Ext.getDom(ak).appendChild(this.dom); | |
| return this | |
| }, | |
| applyStyles: function(ak) { | |
| if (ak) { | |
| if (typeof ak === "function") { | |
| ak = ak.call() | |
| } | |
| if (typeof ak === "string") { | |
| ak = q.parseStyles(ak) | |
| } | |
| if (typeof ak === "object") { | |
| this.setStyle(ak) | |
| } | |
| } | |
| return this | |
| }, | |
| blur: function() { | |
| var ak = this | |
| , am = ak.dom; | |
| if (am !== T.body) { | |
| try { | |
| am.blur() | |
| } catch (al) {} | |
| return ak | |
| } else { | |
| return ak.focus(undefined, am) | |
| } | |
| }, | |
| cacheScrollValues: function() { | |
| var ao = this, ap = [], an = [], aq, am, al, ak; | |
| G = G || new Ext.dom.Fly(); | |
| aq = ao.query("*"); | |
| for (al = 0, | |
| ak = aq.length; al < ak; al++) { | |
| am = aq[al]; | |
| if (am.scrollTop > 0 || am.scrollLeft !== 0) { | |
| an.push(am); | |
| ap.push(G.attach(am).getScroll()) | |
| } | |
| } | |
| return function() { | |
| var at, au, ar; | |
| for (au = 0, | |
| ar = an.length; au < ar; au++) { | |
| at = ap[au]; | |
| G.attach(an[au]); | |
| G.setScrollLeft(at.left); | |
| G.setScrollTop(at.top) | |
| } | |
| } | |
| }, | |
| center: function(ak) { | |
| return this.alignTo(ak || T, "c-c") | |
| }, | |
| child: function(ak, al) { | |
| var am = this | |
| , an = Ext.get(am).id; | |
| return am.selectNode(Ext.makeIdSelector(an) + " > " + ak, !!al) | |
| }, | |
| clone: function(ak, al) { | |
| var am = this.dom.cloneNode(ak); | |
| if (Ext.supports.CloneNodeCopiesExpando) { | |
| L(am, ak) | |
| } | |
| return al ? am : Ext.get(am) | |
| }, | |
| constrainScrollLeft: function(ak) { | |
| var al = this.dom; | |
| return Math.max(Math.min(ak, al.scrollWidth - al.clientWidth), 0) | |
| }, | |
| constrainScrollTop: function(ak) { | |
| var al = this.dom; | |
| return Math.max(Math.min(ak, al.scrollHeight - al.clientHeight), 0) | |
| }, | |
| createChild: function(al, ak, am) { | |
| al = al || { | |
| tag: "div" | |
| }; | |
| if (ak) { | |
| return Ext.DomHelper.insertBefore(ak, al, am !== true) | |
| } else { | |
| return Ext.DomHelper.append(this.dom, al, am !== true) | |
| } | |
| }, | |
| contains: function(ak) { | |
| if (!ak) { | |
| return false | |
| } | |
| var al = this | |
| , am = Ext.getDom(ak); | |
| return (am === al.dom) || al.isAncestor(am) | |
| }, | |
| destroy: function() { | |
| var ak = this | |
| , al = ak.dom; | |
| if (al && al.parentNode) { | |
| al.parentNode.removeChild(al) | |
| } | |
| ak.collect(); | |
| if (!ak.isFly) { | |
| ak.callParent() | |
| } | |
| }, | |
| detach: function() { | |
| var ak = this.dom; | |
| if (ak && ak.parentNode && ak.tagName !== "BODY") { | |
| ak.parentNode.removeChild(ak) | |
| } | |
| return this | |
| }, | |
| disableShadow: function() { | |
| var ak = this.shadow; | |
| if (ak) { | |
| ak.hide(); | |
| ak.disabled = true | |
| } | |
| }, | |
| disableShim: function() { | |
| var ak = this.shim; | |
| if (ak) { | |
| ak.hide(); | |
| ak.disabled = true | |
| } | |
| }, | |
| disableTouchContextMenu: function() { | |
| this._contextMenuListenerRemover = this.on({ | |
| MSHoldVisual: function(ak) { | |
| ak.preventDefault() | |
| }, | |
| destroyable: true, | |
| delegated: false | |
| }) | |
| }, | |
| disableTouchScroll: function() { | |
| this.addCls(aa); | |
| this.on({ | |
| touchmove: function(ak) { | |
| ak.preventDefault() | |
| }, | |
| translate: false | |
| }) | |
| }, | |
| doReplaceWith: function(ak) { | |
| var al = this.dom; | |
| al.parentNode.replaceChild(Ext.getDom(ak), al) | |
| }, | |
| doScrollIntoView: function(ak, ao, al, ap, aw, at) { | |
| G = G || new Ext.dom.Fly(); | |
| var au = this | |
| , aq = au.dom | |
| , ax = G.attach(ak)[aw]() | |
| , av = ak.scrollTop | |
| , ar = au.getScrollIntoViewXY(ak, ax, av) | |
| , an = ar.x | |
| , am = ar.y; | |
| if (ap) { | |
| if (al) { | |
| al = Ext.apply({ | |
| listeners: { | |
| afteranimate: function() { | |
| G.attach(aq).highlight() | |
| } | |
| } | |
| }, al) | |
| } else { | |
| G.attach(aq).highlight() | |
| } | |
| } | |
| if (am !== av) { | |
| G.attach(ak).scrollTo("top", am, al) | |
| } | |
| if (ao !== false && (an !== ax)) { | |
| G.attach(ak)[at]("left", an, al) | |
| } | |
| return au | |
| }, | |
| down: function(ak, al) { | |
| return this.selectNode(ak, !!al) | |
| }, | |
| enableShadow: function(al, ak) { | |
| var am = this | |
| , ao = am.shadow || (am.shadow = new Ext.dom.Shadow(Ext.apply({ | |
| target: am | |
| }, al))) | |
| , an = am.shim; | |
| if (an) { | |
| an.offsets = ao.outerOffsets; | |
| an.shadow = ao; | |
| ao.shim = an | |
| } | |
| if (ak === true || (ak !== false && am.isVisible())) { | |
| ao.show() | |
| } else { | |
| ao.hide() | |
| } | |
| ao.disabled = false | |
| }, | |
| enableShim: function(al, ak) { | |
| var am = this | |
| , ao = am.shim || (am.shim = new Ext.dom.Shim(Ext.apply({ | |
| target: am | |
| }, al))) | |
| , an = am.shadow; | |
| if (an) { | |
| ao.offsets = an.outerOffsets; | |
| ao.shadow = an; | |
| an.shim = ao | |
| } | |
| if (ak === true || (ak !== false && am.isVisible())) { | |
| ao.show() | |
| } else { | |
| ao.hide() | |
| } | |
| ao.disabled = false | |
| }, | |
| findParent: function(aq, al, ak) { | |
| var an = this | |
| , ao = an.dom | |
| , am = T.documentElement | |
| , ap = 0; | |
| if (al || al === 0) { | |
| if (typeof al !== "number") { | |
| am = Ext.getDom(al); | |
| al = Number.MAX_VALUE | |
| } | |
| } else { | |
| al = 50 | |
| } | |
| while (ao && ao.nodeType === 1 && ap < al && ao !== am) { | |
| if (Ext.fly(ao).is(aq)) { | |
| return ak ? Ext.get(ao) : ao | |
| } | |
| ap++; | |
| ao = ao.parentNode | |
| } | |
| return null | |
| }, | |
| findParentNode: function(an, al, ak) { | |
| var am = Ext.fly(this.dom.parentNode); | |
| return am ? am.findParent(an, al, ak) : null | |
| }, | |
| first: function(ak, al) { | |
| return this.matchNode("nextSibling", "firstChild", ak, al) | |
| }, | |
| focus: function(am, al) { | |
| var ak = this; | |
| al = al || ak.dom; | |
| if (Number(am)) { | |
| Ext.defer(ak.focus, am, ak, [null , al]) | |
| } else { | |
| Ext.GlobalEvents.fireEvent("beforefocus", al); | |
| al.focus() | |
| } | |
| return ak | |
| }, | |
| collect: function() { | |
| var ak = this | |
| , al = ak.dom | |
| , an = ak.shadow | |
| , am = ak.shim; | |
| if (!ak.isFly) { | |
| ak.mixins.observable.destroy.call(ak); | |
| delete Ext.cache[ak.id]; | |
| ak.destroyed = true; | |
| ak.el = null | |
| } | |
| if (al) { | |
| al._extData = ak.dom = null | |
| } | |
| if (an) { | |
| an.hide(); | |
| ak.shadow = null | |
| } | |
| if (am) { | |
| am.hide(); | |
| ak.shim = null | |
| } | |
| }, | |
| getAnchorToXY: function(an, ak, am, al) { | |
| return an.getAnchorXY(ak, am, al) | |
| }, | |
| getAttribute: function(ak, al) { | |
| var am = this.dom; | |
| return al ? (am.getAttributeNS(al, ak) || am.getAttribute(al + ":" + ak)) : (am.getAttribute(ak) || am[ak] || null ) | |
| }, | |
| getAttributes: function() { | |
| var an = this.dom.attributes, am = {}, al, ao, ak; | |
| for (ao = 0, | |
| ak = an.length; ao < ak; ao++) { | |
| al = an[ao]; | |
| am[al.name] = al.value | |
| } | |
| return am | |
| }, | |
| getBottom: function(ak) { | |
| return (ak ? this.getLocalY() : this.getY()) + this.getHeight() | |
| }, | |
| getById: function(am, ak) { | |
| var al = T.getElementById(am) || this.dom.querySelector(Ext.makeIdSelector(am)); | |
| return ak ? al : (al ? Ext.get(al) : null ) | |
| }, | |
| getBorderPadding: function() { | |
| var ak = this.getStyle(H) | |
| , al = this.getStyle(h); | |
| return { | |
| beforeX: (parseFloat(al[x.l]) || 0) + (parseFloat(ak[ad.l]) || 0), | |
| afterX: (parseFloat(al[x.r]) || 0) + (parseFloat(ak[ad.r]) || 0), | |
| beforeY: (parseFloat(al[x.t]) || 0) + (parseFloat(ak[ad.t]) || 0), | |
| afterY: (parseFloat(al[x.b]) || 0) + (parseFloat(ak[ad.b]) || 0) | |
| } | |
| }, | |
| getBorders: function() { | |
| var ak = this.getStyle(h); | |
| return { | |
| beforeX: (parseFloat(ak[x.l]) || 0), | |
| afterX: (parseFloat(ak[x.r]) || 0), | |
| beforeY: (parseFloat(ak[x.t]) || 0), | |
| afterY: (parseFloat(ak[x.b]) || 0) | |
| } | |
| }, | |
| getBorderWidth: function(ak) { | |
| return this.addStyles(ak, x) | |
| }, | |
| getData: function(ak) { | |
| var am = this.dom, al; | |
| if (am) { | |
| al = am._extData; | |
| if (!al && !ak) { | |
| am._extData = al = {} | |
| } | |
| } | |
| return al | |
| }, | |
| getFirstChild: function() { | |
| return Ext.get(this.dom.firstElementChild) | |
| }, | |
| getHeight: function(an, al) { | |
| var am = this, ao = am.isStyle("display", "none"), ak, ap; | |
| if (ao) { | |
| return 0 | |
| } | |
| ak = am.dom.offsetHeight; | |
| if (Ext.supports.Direct2DBug) { | |
| ap = am.adjustDirect2DDimension(R); | |
| if (al) { | |
| ak += ap | |
| } else { | |
| if (ap > 0 && ap < 0.5) { | |
| ak++ | |
| } | |
| } | |
| } | |
| if (an) { | |
| ak -= am.getBorderWidth("tb") + am.getPadding("tb") | |
| } | |
| return (ak < 0) ? 0 : ak | |
| }, | |
| getHtml: function() { | |
| return this.dom ? this.dom.innerHTML : "" | |
| }, | |
| getLeft: function(ak) { | |
| return ak ? this.getLocalX() : this.getX() | |
| }, | |
| getLocalX: function() { | |
| var am = this, al, ak = am.getStyle("left"); | |
| if (!ak || ak === "auto") { | |
| ak = 0 | |
| } else { | |
| if (s.test(ak)) { | |
| ak = parseFloat(ak) | |
| } else { | |
| ak = am.getX(); | |
| al = am.dom.offsetParent; | |
| if (al) { | |
| ak -= Ext.fly(al).getX() | |
| } | |
| } | |
| } | |
| return ak | |
| }, | |
| getLocalXY: function() { | |
| var an = this, am, al = an.getStyle(["left", "top"]), ak = al.left, ao = al.top; | |
| if (!ak || ak === "auto") { | |
| ak = 0 | |
| } else { | |
| if (s.test(ak)) { | |
| ak = parseFloat(ak) | |
| } else { | |
| ak = an.getX(); | |
| am = an.dom.offsetParent; | |
| if (am) { | |
| ak -= Ext.fly(am).getX() | |
| } | |
| } | |
| } | |
| if (!ao || ao === "auto") { | |
| ao = 0 | |
| } else { | |
| if (s.test(ao)) { | |
| ao = parseFloat(ao) | |
| } else { | |
| ao = an.getY(); | |
| am = an.dom.offsetParent; | |
| if (am) { | |
| ao -= Ext.fly(am).getY() | |
| } | |
| } | |
| } | |
| return [ak, ao] | |
| }, | |
| getLocalY: function() { | |
| var al = this, ak, am = al.getStyle("top"); | |
| if (!am || am === "auto") { | |
| am = 0 | |
| } else { | |
| if (s.test(am)) { | |
| am = parseFloat(am) | |
| } else { | |
| am = al.getY(); | |
| ak = al.dom.offsetParent; | |
| if (ak) { | |
| am -= Ext.fly(ak).getY() | |
| } | |
| } | |
| } | |
| return am | |
| }, | |
| getMargin: (function() { | |
| var al = { | |
| t: "top", | |
| l: "left", | |
| r: "right", | |
| b: "bottom" | |
| } | |
| , ak = ["margin-top", "margin-left", "margin-right", "margin-bottom"]; | |
| return function(an) { | |
| var ap = this, ao, am, aq; | |
| if (!an) { | |
| ao = ap.getStyle(ak); | |
| aq = {}; | |
| if (ao && typeof ao === "object") { | |
| aq = {}; | |
| for (am in n) { | |
| aq[am] = aq[al[am]] = parseFloat(ao[n[am]]) || 0 | |
| } | |
| } | |
| } else { | |
| aq = ap.addStyles(an, n) | |
| } | |
| return aq | |
| } | |
| })(), | |
| getPadding: function(ak) { | |
| return this.addStyles(ak, ad) | |
| }, | |
| getParent: function() { | |
| return Ext.get(this.dom.parentNode) | |
| }, | |
| getRight: function(ak) { | |
| return (ak ? this.getLocalX() : this.getX()) + this.getWidth() | |
| }, | |
| getScroll: function() { | |
| var am = this, ap = am.dom, al = T.documentElement, ao, an, ak = document.body; | |
| if (ap === T || ap === ak) { | |
| ao = al.scrollLeft || (ak ? ak.scrollLeft : 0); | |
| an = al.scrollTop || (ak ? ak.scrollTop : 0) | |
| } else { | |
| ao = ap.scrollLeft; | |
| an = ap.scrollTop | |
| } | |
| return { | |
| left: ao, | |
| top: an | |
| } | |
| }, | |
| getScrollIntoViewXY: function(ap, ax, aw) { | |
| var az = this.dom | |
| , al = Ext.getDom(ap) | |
| , am = this.getOffsetsTo(al) | |
| , av = az.offsetWidth | |
| , ar = az.offsetHeight | |
| , ak = am[0] + ax | |
| , aq = am[1] + aw | |
| , ao = aq + ar | |
| , aB = ak + av | |
| , at = al.clientHeight | |
| , ay = al.clientWidth | |
| , aA = ax | |
| , au = aw | |
| , an = au + at | |
| , aC = aA + ay; | |
| if (ar > at || aq < au) { | |
| aw = aq | |
| } else { | |
| if (ao > an) { | |
| aw = ao - at | |
| } | |
| } | |
| if (av > ay || ak < aA) { | |
| ax = ak | |
| } else { | |
| if (aB > aC) { | |
| ax = aB - ay | |
| } | |
| } | |
| return { | |
| x: ax, | |
| y: aw | |
| } | |
| }, | |
| getScrollLeft: function() { | |
| var ak = this.dom; | |
| if (ak === T || ak === document.body) { | |
| return this.getScroll().left | |
| } else { | |
| return ak.scrollLeft | |
| } | |
| }, | |
| getScrollTop: function() { | |
| var ak = this.dom; | |
| if (ak === T || ak === document.body) { | |
| return this.getScroll().top | |
| } else { | |
| return ak.scrollTop | |
| } | |
| }, | |
| getSize: function(ak) { | |
| return { | |
| width: this.getWidth(ak), | |
| height: this.getHeight(ak) | |
| } | |
| }, | |
| getStyle: function(ax, ar) { | |
| var at = this, an = at.dom, aA = typeof ax !== "string", ay = at.styleHooks, al = ax, au = al, aq = 1, ap, az, aw, av, am, ak, ao; | |
| if (aA) { | |
| aw = {}; | |
| al = au[0]; | |
| ao = 0; | |
| if (!(aq = au.length)) { | |
| return aw | |
| } | |
| } | |
| if (!an || an.documentElement) { | |
| return aw || "" | |
| } | |
| ap = an.style; | |
| if (ar) { | |
| ak = ap | |
| } else { | |
| ak = an.ownerDocument.defaultView.getComputedStyle(an, null ); | |
| if (!ak) { | |
| ar = true; | |
| ak = ap | |
| } | |
| } | |
| do { | |
| av = ay[al]; | |
| if (!av) { | |
| ay[al] = av = { | |
| name: q.normalize(al) | |
| } | |
| } | |
| if (av.get) { | |
| am = av.get(an, at, ar, ak) | |
| } else { | |
| az = av.name; | |
| am = ak[az] | |
| } | |
| if (!aA) { | |
| return am | |
| } | |
| aw[al] = am; | |
| al = au[++ao] | |
| } while (ao < aq);return aw | |
| }, | |
| getStyleValue: function(ak) { | |
| return this.dom.style.getPropertyValue(ak) | |
| }, | |
| getTop: function(ak) { | |
| return ak ? this.getLocalY() : this.getY() | |
| }, | |
| getValue: function(al) { | |
| var ak = this.dom.value; | |
| return al ? parseInt(ak, 10) : ak | |
| }, | |
| getViewSize: function() { | |
| var ak = this.dom; | |
| if (ak === T || ak === T.body) { | |
| return { | |
| width: q.getViewportWidth(), | |
| height: q.getViewportHeight() | |
| } | |
| } else { | |
| return { | |
| width: ak.clientWidth, | |
| height: ak.clientHeight | |
| } | |
| } | |
| }, | |
| getVisibilityMode: function() { | |
| var ak = this | |
| , al = ak.getData() | |
| , am = al.visibilityMode; | |
| if (am === undefined) { | |
| al.visibilityMode = am = q.DISPLAY | |
| } | |
| return am | |
| }, | |
| getWidth: function(ak, ap) { | |
| var an = this, aq = an.dom, ao = an.isStyle("display", "none"), am, al, ar; | |
| if (ao) { | |
| return 0 | |
| } | |
| if (Ext.supports.BoundingClientRect) { | |
| am = aq.getBoundingClientRect(); | |
| al = (an.vertical && !Ext.supports.RotatedBoundingClientRect) ? (am.bottom - am.top) : (am.right - am.left); | |
| al = ap ? al : Math.ceil(al) | |
| } else { | |
| al = aq.offsetWidth | |
| } | |
| if (Ext.supports.Direct2DBug && !an.vertical) { | |
| ar = an.adjustDirect2DDimension(j); | |
| if (ap) { | |
| al += ar | |
| } else { | |
| if (ar > 0 && ar < 0.5) { | |
| al++ | |
| } | |
| } | |
| } | |
| if (ak) { | |
| al -= an.getBorderWidth("lr") + an.getPadding("lr") | |
| } | |
| return (al < 0) ? 0 : al | |
| }, | |
| getX: function() { | |
| return this.getXY()[0] | |
| }, | |
| getXY: function() { | |
| var am = Math.round, ap = this.dom, al = 0, aq = 0, ao, ak; | |
| if (ap !== T && ap !== T.body) { | |
| try { | |
| ao = ap.getBoundingClientRect() | |
| } catch (an) { | |
| ao = { | |
| left: 0, | |
| top: 0 | |
| } | |
| } | |
| al = am(ao.left); | |
| aq = am(ao.top); | |
| ak = Ext.getDoc().getScroll(); | |
| al += ak.left; | |
| aq += ak.top | |
| } | |
| return [al, aq] | |
| }, | |
| getY: function() { | |
| return this.getXY()[1] | |
| }, | |
| getZIndex: function() { | |
| return parseInt(this.getStyle("z-index"), 10) | |
| }, | |
| hasCls: function(ak) { | |
| var al = this.getData(); | |
| if (!al.isSynchronized) { | |
| this.synchronize() | |
| } | |
| return al.classMap.hasOwnProperty(ak) | |
| }, | |
| hide: function() { | |
| this.setVisible(false); | |
| return this | |
| }, | |
| insertAfter: function(ak) { | |
| ak = Ext.getDom(ak); | |
| ak.parentNode.insertBefore(this.dom, ak.nextSibling); | |
| return this | |
| }, | |
| insertBefore: function(ak) { | |
| ak = Ext.getDom(ak); | |
| ak.parentNode.insertBefore(this.dom, ak); | |
| return this | |
| }, | |
| insertFirst: function(al, ak) { | |
| al = al || {}; | |
| if (al.nodeType || al.dom || typeof al === "string") { | |
| al = Ext.getDom(al); | |
| this.dom.insertBefore(al, this.dom.firstChild); | |
| return !ak ? Ext.get(al) : al | |
| } else { | |
| return this.createChild(al, this.dom.firstChild, ak) | |
| } | |
| }, | |
| insertHtml: function(al, am, ak) { | |
| var an = Ext.DomHelper.insertHtml(al, this.dom, am); | |
| return ak ? Ext.get(an) : an | |
| }, | |
| insertSibling: function(al, ao, ar) { | |
| var aq = this, at = Ext.DomHelper, au = (ao || "before").toLowerCase() === "after", an, ak, am, ap; | |
| if (Ext.isIterable(al)) { | |
| am = al.length; | |
| ak = Ext.fly(document.createDocumentFragment()); | |
| if (Ext.isArray(al)) { | |
| for (ap = 0; ap < am; ap++) { | |
| an = ak.appendChild(al[ap], ar) | |
| } | |
| } else { | |
| for (ap = 0; ap < am; ap++) { | |
| ak.dom.appendChild(an = al[0]) | |
| } | |
| if (ar === false) { | |
| an = Ext.get(an) | |
| } | |
| } | |
| aq.dom.parentNode.insertBefore(ak.dom, au ? aq.dom.nextSibling : aq.dom); | |
| return an | |
| } | |
| al = al || {}; | |
| if (al.nodeType || al.dom) { | |
| an = aq.dom.parentNode.insertBefore(Ext.getDom(al), au ? aq.dom.nextSibling : aq.dom); | |
| if (!ar) { | |
| an = Ext.get(an) | |
| } | |
| } else { | |
| if (au && !aq.dom.nextSibling) { | |
| an = at.append(aq.dom.parentNode, al, !ar) | |
| } else { | |
| an = at[au ? "insertAfter" : "insertBefore"](aq.dom, al, !ar) | |
| } | |
| } | |
| return an | |
| }, | |
| is: function(ak) { | |
| var am = this.dom, al; | |
| if (!ak) { | |
| al = true | |
| } else { | |
| if (!am.tagName) { | |
| al = false | |
| } else { | |
| if (Ext.isFunction(ak)) { | |
| al = ak(am) | |
| } else { | |
| al = am[Ext.supports.matchesSelector](ak) | |
| } | |
| } | |
| } | |
| return al | |
| }, | |
| isAncestor: function(al) { | |
| var ak = false | |
| , am = this.dom | |
| , an = Ext.getDom(al); | |
| if (am && an) { | |
| if (am.contains) { | |
| return am.contains(an) | |
| } else { | |
| if (am.compareDocumentPosition) { | |
| return !!(am.compareDocumentPosition(an) & 16) | |
| } else { | |
| while ((an = an.parentNode) ) { | |
| ak = an === am || ak | |
| } | |
| } | |
| } | |
| } | |
| return ak | |
| }, | |
| isPainted: (function() { | |
| return !Ext.browser.is.IE ? function() { | |
| var ak = this.dom; | |
| return Boolean(ak && ak.offsetParent) | |
| } | |
| : function() { | |
| var ak = this.dom; | |
| return Boolean(ak && (ak.offsetHeight !== 0 && ak.offsetWidth !== 0)) | |
| } | |
| })(), | |
| isScrollable: function() { | |
| var ak = this.dom; | |
| return ak.scrollHeight > ak.clientHeight || ak.scrollWidth > ak.clientWidth | |
| }, | |
| isStyle: function(ak, al) { | |
| return this.getStyle(ak) === al | |
| }, | |
| isVisible: function(al) { | |
| var am = this.dom, ak; | |
| if (!am) { | |
| return false | |
| } | |
| if (!Z) { | |
| Z = new Ext.dom.Fly() | |
| } | |
| for (ak = am.ownerDocument.documentElement; am !== ak; am = am.parentNode) { | |
| if (!am || am.nodeType === 11 || (Z.attach(am)).isStyle(l, af) || Z.isStyle(d, W)) { | |
| return false | |
| } | |
| if (!al) { | |
| break | |
| } | |
| } | |
| return true | |
| }, | |
| last: function(ak, al) { | |
| return this.matchNode("previousSibling", "lastChild", ak, al) | |
| }, | |
| maskIframes: function() { | |
| var ak = document.getElementsByTagName("iframe"); | |
| Ext.each(ak, function(an) { | |
| var am = Ext.fly(an.parentNode) | |
| , al = am.mask(); | |
| al.setStyle("background-color", "transparent") | |
| }) | |
| }, | |
| matchNode: function(al, ap, ak, am) { | |
| var an = this.dom, ao; | |
| if (!an) { | |
| return null | |
| } | |
| ao = an[ap]; | |
| while (ao) { | |
| if (ao.nodeType === 1 && (!ak || Ext.fly(ao, "_matchNode").is(ak))) { | |
| return !am ? Ext.get(ao) : ao | |
| } | |
| ao = ao[al] | |
| } | |
| return null | |
| }, | |
| next: function(ak, al) { | |
| return this.matchNode("nextSibling", "nextSibling", ak, al) | |
| }, | |
| parent: function(ak, al) { | |
| return this.matchNode("parentNode", "parentNode", ak, al) | |
| }, | |
| position: function(ao, an, ak, am) { | |
| var al = this; | |
| if (al.dom.tagName !== "BODY") { | |
| if (!ao && al.isStyle(Y, u)) { | |
| al.setStyle(Y, t) | |
| } else { | |
| if (ao) { | |
| al.setStyle(Y, ao) | |
| } | |
| } | |
| if (an) { | |
| al.setStyle(o, an) | |
| } | |
| if (ak || am) { | |
| al.setXY([ak || false, am || false]) | |
| } | |
| } | |
| }, | |
| prev: function(ak, al) { | |
| return this.matchNode("previousSibling", "previousSibling", ak, al) | |
| }, | |
| query: function(am, av, at) { | |
| var ao = this.dom, aq, ar, au, al, ak, ap, an; | |
| if (!ao) { | |
| return null | |
| } | |
| av = (av !== false); | |
| am = am.split(","); | |
| if (!at) { | |
| aq = [] | |
| } | |
| for (ap = 0, | |
| ar = am.length; ap < ar; ap++) { | |
| if (typeof am[ap] === "string") { | |
| if (at) { | |
| al = ao.querySelector(am[ap]); | |
| return av ? al : Ext.get(al) | |
| } | |
| ak = ao.querySelectorAll(am[ap]); | |
| for (an = 0, | |
| au = ak.length; an < au; an++) { | |
| aq.push(av ? ak[an] : Ext.get(ak[an])) | |
| } | |
| } | |
| } | |
| return aq | |
| }, | |
| radioCls: function(an) { | |
| var ao = this.dom.parentNode.childNodes, al; | |
| an = Ext.isArray(an) ? an : [an]; | |
| for (var am = 0, ak = ao.length; am < ak; am++) { | |
| al = ao[am]; | |
| if (al && al.nodeType === 1) { | |
| Ext.fly(al).removeCls(an) | |
| } | |
| } | |
| return this.addCls(an) | |
| }, | |
| redraw: function() { | |
| var al = this.dom | |
| , ak = al.style; | |
| ak.display = "none"; | |
| al.offsetHeight; | |
| ak.display = "" | |
| }, | |
| remove: function() { | |
| this.destroy() | |
| }, | |
| removeChild: function(ak) { | |
| this.dom.removeChild(Ext.getDom(ak)); | |
| return this | |
| }, | |
| removeCls: function(at, aq, av) { | |
| var au = this, an = au.getData(), aw, ao, al, am, ap, ar, ak; | |
| if (!at) { | |
| return au | |
| } | |
| if (!an.isSynchronized) { | |
| au.synchronize() | |
| } | |
| ao = au.dom; | |
| al = an.classMap; | |
| am = an.classList; | |
| aq = aq ? aq + A : ""; | |
| av = av ? A + av : ""; | |
| if (typeof at === "string") { | |
| at = at.split(M) | |
| } | |
| for (ap = 0, | |
| ar = at.length; ap < ar; ap++) { | |
| ak = at[ap]; | |
| if (ak) { | |
| ak = aq + ak + av; | |
| if (al[ak]) { | |
| delete al[ak]; | |
| Ext.Array.remove(am, ak); | |
| aw = true | |
| } | |
| } | |
| } | |
| if (aw) { | |
| ao.className = am.join(" ") | |
| } | |
| return au | |
| }, | |
| repaint: function() { | |
| var ak = this; | |
| ak.addCls("x-repaint"); | |
| Ext.defer(function() { | |
| if (ak.dom) { | |
| Ext.fly(ak.dom).removeCls("x-repaint") | |
| } | |
| }, 1); | |
| return ak | |
| }, | |
| replace: function(am, al) { | |
| am = Ext.getDom(am); | |
| var ak = am.parentNode | |
| , ao = am.id | |
| , an = this.dom; | |
| if (al !== false && ao && Ext.cache[ao]) { | |
| ak.insertBefore(an, am); | |
| Ext.get(am).destroy() | |
| } else { | |
| ak.replaceChild(an, am) | |
| } | |
| return this | |
| }, | |
| replaceCls: function(am, au, ar, ax) { | |
| var av = this, ap, al, an, aq, at, ak, ao = av.getData(), aw; | |
| if (!am && !au) { | |
| return av | |
| } | |
| am = am || []; | |
| au = au || []; | |
| if (!ao.isSynchronized) { | |
| av.synchronize() | |
| } | |
| if (!ax) { | |
| ax = "" | |
| } | |
| ap = av.dom; | |
| al = ao.classMap; | |
| an = ao.classList; | |
| ar = ar ? ar + A : ""; | |
| ax = ax ? A + ax : ""; | |
| if (typeof am === "string") { | |
| am = am.split(M) | |
| } | |
| if (typeof au === "string") { | |
| au = au.split(M) | |
| } | |
| for (aq = 0, | |
| at = am.length; aq < at; aq++) { | |
| ak = ar + am[aq] + ax; | |
| if (al[ak]) { | |
| delete al[ak]; | |
| aw = true | |
| } | |
| } | |
| for (aq = 0, | |
| at = au.length; aq < at; aq++) { | |
| ak = ar + au[aq] + ax; | |
| if (!al[ak]) { | |
| al[ak] = true; | |
| aw = true | |
| } | |
| } | |
| if (aw) { | |
| ao.classList = an = Ext.Object.getKeys(al); | |
| ap.className = an.join(" ") | |
| } | |
| return av | |
| }, | |
| replaceWith: function(an) { | |
| var ao = this, ap = ao.dom, am = ap.parentNode, ak = Ext.cache, al; | |
| ao.clearListeners(); | |
| if (an.nodeType || an.dom || typeof an === "string") { | |
| an = Ext.get(an); | |
| al = am.insertBefore(an.dom, ap) | |
| } else { | |
| al = Ext.DomHelper.insertBefore(ap, an) | |
| } | |
| am.removeChild(ap); | |
| ao.dom = al; | |
| if (!ao.isFly) { | |
| delete ak[ao.id]; | |
| ak[ao.id = Ext.id(al)] = ao | |
| } | |
| return ao | |
| }, | |
| resolveListenerScope: function(al) { | |
| var ak = this.component; | |
| return ak ? ak.resolveListenerScope(al) : this | |
| }, | |
| scroll: function(at, ak, am) { | |
| if (!this.isScrollable()) { | |
| return false | |
| } | |
| at = at.charAt(0); | |
| var ar = this, ao = ar.dom, aq = at === "r" || at === "l" ? "left" : "top", al = false, an, ap; | |
| if (at === "l" || at === "t" || at === "u") { | |
| ak = -ak | |
| } | |
| if (aq === "left") { | |
| an = ao.scrollLeft; | |
| ap = ar.constrainScrollLeft(an + ak) | |
| } else { | |
| an = ao.scrollTop; | |
| ap = ar.constrainScrollTop(an + ak) | |
| } | |
| if (ap !== an) { | |
| this.scrollTo(aq, ap, am); | |
| al = true | |
| } | |
| return al | |
| }, | |
| scrollBy: function(al, ak, am) { | |
| var an = this | |
| , ao = an.dom; | |
| if (al.length) { | |
| am = ak; | |
| ak = al[1]; | |
| al = al[0] | |
| } else { | |
| if (typeof al != "number") { | |
| am = ak; | |
| ak = al.y; | |
| al = al.x | |
| } | |
| } | |
| if (al) { | |
| an.scrollTo("left", an.constrainScrollLeft(ao.scrollLeft + al), am) | |
| } | |
| if (ak) { | |
| an.scrollTo("top", an.constrainScrollTop(ao.scrollTop + ak), am) | |
| } | |
| return an | |
| }, | |
| scrollChildIntoView: function(al, ak) { | |
| Ext.fly(al).scrollIntoView(this, ak) | |
| }, | |
| scrollIntoView: function(ak, an, am, al) { | |
| ak = Ext.getDom(ak) || Ext.getBody().dom; | |
| return this.doScrollIntoView(ak, an, am, al, "getScrollLeft", "scrollTo") | |
| }, | |
| scrollTo: function(am, ao, ak) { | |
| var ap = c.test(am), an = this, ar = ap ? "scrollTop" : "scrollLeft", aq = an.dom, al; | |
| if (!ak || !an.anim) { | |
| aq[ar] = ao; | |
| aq[ar] = ao | |
| } else { | |
| al = { | |
| to: {} | |
| }; | |
| al.to[ar] = ao; | |
| if (Ext.isObject(ak)) { | |
| Ext.applyIf(al, ak) | |
| } | |
| an.animate(al) | |
| } | |
| return an | |
| }, | |
| select: function(al, an) { | |
| var ak, am; | |
| if (typeof al === "string") { | |
| am = this.query(al, !an) | |
| } else { | |
| am = al; | |
| ak = true | |
| } | |
| return an ? new Ext.CompositeElement(am,!ak) : new Ext.CompositeElementLite(am,true) | |
| }, | |
| selectNode: function(al, ak) { | |
| return this.query(al, ak, true) | |
| }, | |
| set: function(ak, al) { | |
| var an = this, ap = an.dom, am, ao; | |
| for (am in ak) { | |
| if (ak.hasOwnProperty(am)) { | |
| ao = ak[am]; | |
| if (am === "style") { | |
| an.applyStyles(ao) | |
| } else { | |
| if (am === "cls") { | |
| ap.className = ao | |
| } else { | |
| if (al !== false) { | |
| if (ao === undefined) { | |
| ap.removeAttribute(am) | |
| } else { | |
| ap.setAttribute(am, ao) | |
| } | |
| } else { | |
| ap[am] = ao | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return an | |
| }, | |
| setBottom: function(ak) { | |
| this.dom.style[O] = q.addUnits(ak); | |
| return this | |
| }, | |
| setCls: function(an) { | |
| var ap = this, am = ap.getData(), al, ao, ak, aq, ar; | |
| if (!am.isSynchronized) { | |
| ap.synchronize() | |
| } | |
| if (typeof an === "string") { | |
| an = an.split(M) | |
| } | |
| am.classList = ar = an.slice(); | |
| am.classMap = aq = {}; | |
| for (al = 0, | |
| ao = ar.length; al < ao; al++) { | |
| aq[ar[al]] = true | |
| } | |
| ap.dom.className = ar.join(" ") | |
| }, | |
| setDisplayed: function(al) { | |
| var ak = this; | |
| if (typeof al === "boolean") { | |
| al = al ? ak._getDisplay() : W | |
| } | |
| ak.setStyle(d, al); | |
| if (ak.shadow || ak.shim) { | |
| ak.setUnderlaysVisible(al !== W) | |
| } | |
| return ak | |
| }, | |
| setHeight: function(ak) { | |
| var al = this; | |
| al.dom.style[R] = q.addUnits(ak); | |
| if (al.shadow || al.shim) { | |
| al.syncUnderlays() | |
| } | |
| return al | |
| }, | |
| setHtml: function(ak) { | |
| if (this.dom) { | |
| this.dom.innerHTML = ak | |
| } | |
| return this | |
| }, | |
| setId: function(an) { | |
| var am = this | |
| , ak = am.id | |
| , al = Ext.cache; | |
| if (ak) { | |
| delete al[ak] | |
| } | |
| am.dom.id = an; | |
| am.id = an; | |
| al[an] = am; | |
| return am | |
| }, | |
| setLeft: function(al) { | |
| var ak = this; | |
| ak.dom.style[I] = q.addUnits(al); | |
| if (ak.shadow || ak.shim) { | |
| ak.syncUnderlays() | |
| } | |
| return ak | |
| }, | |
| setLocalX: function(ak) { | |
| var am = this | |
| , al = am.dom.style; | |
| al.right = "auto"; | |
| al.left = (ak === null ) ? "auto" : ak + "px"; | |
| if (am.shadow || am.shim) { | |
| am.syncUnderlays() | |
| } | |
| return am | |
| }, | |
| setLocalXY: function(ak, an) { | |
| var am = this | |
| , al = am.dom.style; | |
| al.right = "auto"; | |
| if (ak && ak.length) { | |
| an = ak[1]; | |
| ak = ak[0] | |
| } | |
| if (ak === null ) { | |
| al.left = "auto" | |
| } else { | |
| if (ak !== undefined) { | |
| al.left = ak + "px" | |
| } | |
| } | |
| if (an === null ) { | |
| al.top = "auto" | |
| } else { | |
| if (an !== undefined) { | |
| al.top = an + "px" | |
| } | |
| } | |
| if (am.shadow || am.shim) { | |
| am.syncUnderlays() | |
| } | |
| return am | |
| }, | |
| setLocalY: function(al) { | |
| var ak = this; | |
| ak.dom.style.top = (al === null ) ? "auto" : al + "px"; | |
| if (ak.shadow || ak.shim) { | |
| ak.syncUnderlays() | |
| } | |
| return ak | |
| }, | |
| setMargin: function(am) { | |
| var al = this | |
| , ak = al.dom.style; | |
| if (am || am === 0) { | |
| am = al.self.unitizeBox((am === true) ? 5 : am); | |
| ak.setProperty("margin", am, "important") | |
| } else { | |
| ak.removeProperty("margin-top"); | |
| ak.removeProperty("margin-right"); | |
| ak.removeProperty("margin-bottom"); | |
| ak.removeProperty("margin-left") | |
| } | |
| }, | |
| setMaxHeight: function(ak) { | |
| this.dom.style[E] = q.addUnits(ak); | |
| return this | |
| }, | |
| setMaxWidth: function(ak) { | |
| this.dom.style[r] = q.addUnits(ak); | |
| return this | |
| }, | |
| setMinHeight: function(ak) { | |
| this.dom.style[e] = q.addUnits(ak); | |
| return this | |
| }, | |
| setMinWidth: function(ak) { | |
| this.dom.style[ae] = q.addUnits(ak); | |
| return this | |
| }, | |
| setOpacity: function(ak) { | |
| var al = this; | |
| if (al.dom) { | |
| al.setStyle("opacity", ak) | |
| } | |
| return al | |
| }, | |
| setPadding: function(am) { | |
| var al = this | |
| , ak = al.dom.style; | |
| if (am || am === 0) { | |
| am = al.self.unitizeBox((am === true) ? 5 : am); | |
| ak.setProperty("padding", am, "important") | |
| } else { | |
| ak.removeProperty("padding-top"); | |
| ak.removeProperty("padding-right"); | |
| ak.removeProperty("padding-bottom"); | |
| ak.removeProperty("padding-left") | |
| } | |
| }, | |
| setRight: function(ak) { | |
| this.dom.style[ai] = q.addUnits(ak); | |
| return this | |
| }, | |
| setScrollLeft: function(ak) { | |
| this.dom.scrollLeft = ak; | |
| return this | |
| }, | |
| setScrollTop: function(ak) { | |
| this.dom.scrollTop = ak; | |
| return this | |
| }, | |
| setSize: function(am, ak) { | |
| var an = this | |
| , al = an.dom.style; | |
| if (Ext.isObject(am)) { | |
| ak = am.height; | |
| am = am.width | |
| } | |
| al.width = q.addUnits(am); | |
| al.height = q.addUnits(ak); | |
| if (an.shadow || an.shim) { | |
| an.syncUnderlays() | |
| } | |
| return an | |
| }, | |
| setSizeState: function(am) { | |
| var al = this, an, ak; | |
| if (am === true) { | |
| an = C; | |
| ak = [P, J] | |
| } else { | |
| if (am === false) { | |
| an = P; | |
| ak = [C, J] | |
| } else { | |
| if (am === null ) { | |
| an = J; | |
| ak = [C, P] | |
| } else { | |
| ak = [C, P, J] | |
| } | |
| } | |
| } | |
| if (an) { | |
| al.addCls(an) | |
| } | |
| al.removeCls(ak); | |
| return al | |
| }, | |
| setStyle: function(ar, ap) { | |
| var an = this, aq = an.dom, ak = an.styleHooks, am = aq.style, al = ar, ao; | |
| if (typeof al === "string") { | |
| ao = ak[al]; | |
| if (!ao) { | |
| ak[al] = ao = { | |
| name: q.normalize(al) | |
| } | |
| } | |
| ap = (ap == null ) ? "" : ap; | |
| if (ao.set) { | |
| ao.set(aq, ap, an) | |
| } else { | |
| am[ao.name] = ap | |
| } | |
| if (ao.afterSet) { | |
| ao.afterSet(aq, ap, an) | |
| } | |
| } else { | |
| for (al in ar) { | |
| if (ar.hasOwnProperty(al)) { | |
| ao = ak[al]; | |
| if (!ao) { | |
| ak[al] = ao = { | |
| name: q.normalize(al) | |
| } | |
| } | |
| ap = ar[al]; | |
| ap = (ap == null ) ? "" : ap; | |
| if (ao.set) { | |
| ao.set(aq, ap, an) | |
| } else { | |
| am[ao.name] = ap | |
| } | |
| if (ao.afterSet) { | |
| ao.afterSet(aq, ap, an) | |
| } | |
| } | |
| } | |
| } | |
| return an | |
| }, | |
| setText: function(ak) { | |
| this.dom.textContent = ak | |
| }, | |
| setTop: function(al) { | |
| var ak = this; | |
| ak.dom.style[U] = q.addUnits(al); | |
| if (ak.shadow || ak.shim) { | |
| ak.syncUnderlays() | |
| } | |
| return ak | |
| }, | |
| setUnderlaysVisible: function(ak) { | |
| var am = this.shadow | |
| , al = this.shim; | |
| if (am && !am.disabled) { | |
| if (ak) { | |
| am.show() | |
| } else { | |
| am.hide() | |
| } | |
| } | |
| if (al && !al.disabled) { | |
| if (ak) { | |
| al.show() | |
| } else { | |
| al.hide() | |
| } | |
| } | |
| }, | |
| setVisibility: function(ak) { | |
| var al = this.dom.style; | |
| if (ak) { | |
| al.removeProperty("visibility") | |
| } else { | |
| al.setProperty("visibility", "hidden", "important") | |
| } | |
| }, | |
| setVisibilityMode: function(ak) { | |
| this.getData().visibilityMode = ak; | |
| return this | |
| }, | |
| setVisible: function(am) { | |
| var ak = this | |
| , al = ak.getVisibilityMode() | |
| , an = am ? "removeCls" : "addCls"; | |
| switch (al) { | |
| case q.DISPLAY: | |
| ak.removeCls([F, m, a]); | |
| ak[an](D); | |
| break; | |
| case q.VISIBILITY: | |
| ak.removeCls([D, m, a]); | |
| ak[an](F); | |
| break; | |
| case q.OFFSETS: | |
| ak.removeCls([F, D, a]); | |
| ak[an](m); | |
| break; | |
| case q.CLIP: | |
| ak.removeCls([F, D, m]); | |
| ak[an](a); | |
| break | |
| } | |
| if (ak.shadow || ak.shim) { | |
| ak.setUnderlaysVisible(am) | |
| } | |
| return ak | |
| }, | |
| setWidth: function(ak) { | |
| var al = this; | |
| al.dom.style[j] = q.addUnits(ak); | |
| if (al.shadow || al.shim) { | |
| al.syncUnderlays() | |
| } | |
| return al | |
| }, | |
| setX: function(ak) { | |
| return this.setXY([ak, false]) | |
| }, | |
| setXY: function(am) { | |
| var al = this, an = al.translatePoints(am), ak = al.dom.style, ao; | |
| al.position(); | |
| ak.right = "auto"; | |
| for (ao in an) { | |
| if (!isNaN(an[ao])) { | |
| ak[ao] = an[ao] + "px" | |
| } | |
| } | |
| if (al.shadow || al.shim) { | |
| al.syncUnderlays() | |
| } | |
| return al | |
| }, | |
| setY: function(ak) { | |
| return this.setXY([false, ak]) | |
| }, | |
| setZIndex: function(ak) { | |
| var al = this; | |
| if (al.shadow) { | |
| al.shadow.setZIndex(ak) | |
| } | |
| if (al.shim) { | |
| al.shim.setZIndex(ak) | |
| } | |
| return al.setStyle("z-index", ak) | |
| }, | |
| show: function() { | |
| this.setVisible(true); | |
| return this | |
| }, | |
| swapCls: function(al, aq, ak, ao) { | |
| if (ak === undefined) { | |
| ak = true | |
| } | |
| var an = this | |
| , ap = ak ? al : aq | |
| , am = ak ? aq : al; | |
| if (am) { | |
| an.removeCls(ao ? ao + "-" + am : am) | |
| } | |
| if (ap) { | |
| an.addCls(ao ? ao + "-" + ap : ap) | |
| } | |
| return an | |
| }, | |
| synchronize: function() { | |
| var ar = this, an = ar.dom, at = {}, aq = an.className, al, ao, ap, ak, am = ar.getData(); | |
| if (aq && aq.length > 0) { | |
| al = an.className.split(ag); | |
| for (ao = 0, | |
| ap = al.length; ao < ap; ao++) { | |
| ak = al[ao]; | |
| at[ak] = true | |
| } | |
| } else { | |
| al = [] | |
| } | |
| am.classList = al; | |
| am.classMap = at; | |
| am.isSynchronized = true; | |
| return ar | |
| }, | |
| syncUnderlays: function() { | |
| var an = this, ar = an.shadow, ak = an.shim, al = an.dom, at, ap, ao, aq, am; | |
| if (an.isVisible()) { | |
| at = an.getXY(); | |
| ap = at[0]; | |
| ao = at[1]; | |
| aq = al.offsetWidth; | |
| am = al.offsetHeight; | |
| if (ar && !ar.hidden) { | |
| ar.realign(ap, ao, aq, am) | |
| } | |
| if (ak && !ak.hidden) { | |
| ak.realign(ap, ao, aq, am) | |
| } | |
| } | |
| }, | |
| toggleCls: function(ak, al) { | |
| if (typeof al !== "boolean") { | |
| al = !this.hasCls(ak) | |
| } | |
| return al ? this.addCls(ak) : this.removeCls(ak) | |
| }, | |
| toggle: function() { | |
| this.setVisible(!this.isVisible()); | |
| return this | |
| }, | |
| translate: function() { | |
| var ak = "webkitTransform"in T.createElement("div").style ? "webkitTransform" : "transform"; | |
| return function(al, an, am) { | |
| this.dom.style[ak] = "translate3d(" + (al || 0) + "px, " + (an || 0) + "px, " + (am || 0) + "px)" | |
| } | |
| }(), | |
| unmaskIframes: function() { | |
| var ak = document.getElementsByTagName("iframe"); | |
| Ext.each(ak, function(am) { | |
| var al = Ext.fly(am.parentNode); | |
| al.unmask() | |
| }) | |
| }, | |
| unwrap: function() { | |
| var aq = this.dom, al = aq.parentNode, an, ap = Ext.fly(Ext.Element.getActiveElement()), ao, am, ar, ak; | |
| ao = Ext.cache[ap.id]; | |
| if (ao) { | |
| ap = ao | |
| } | |
| if (this.contains(ap)) { | |
| if (ao) { | |
| ao.suspendFocusEvents() | |
| } | |
| am = true | |
| } | |
| if (al) { | |
| an = al.parentNode; | |
| if (am) { | |
| ak = an.getAttribute("tabIndex"); | |
| ar = Ext.fly(an); | |
| ar.set({ | |
| tabIndex: -1 | |
| }); | |
| ar.suspendFocusEvents(); | |
| ar.focus() | |
| } | |
| an.insertBefore(aq, al); | |
| an.removeChild(al) | |
| } else { | |
| an = document.createDocumentFragment(); | |
| an.appendChild(aq) | |
| } | |
| if (am) { | |
| if (ao) { | |
| ao.focus(); | |
| ao.resumeFocusEvents() | |
| } else { | |
| Ext.fly(ap).focus() | |
| } | |
| if (ar) { | |
| ar.resumeFocusEvents(); | |
| ar.set({ | |
| tabIndex: ak | |
| }) | |
| } | |
| } | |
| return this | |
| }, | |
| up: function(am, ak, al) { | |
| return this.findParentNode(am, ak, !al) | |
| }, | |
| update: function(ak) { | |
| return this.setHtml(ak) | |
| }, | |
| wrap: function(an, av, aq) { | |
| var au = this, ar = au.dom, ap = Ext.DomHelper.insertBefore(ar, an || { | |
| tag: "div" | |
| }, !av), at = ap, am = Ext.Element.getActiveElement(), ao, al, ak; | |
| ao = Ext.cache[am.id]; | |
| if (ao) { | |
| am = ao | |
| } | |
| if (aq) { | |
| at = ap.selectNode(aq, av) | |
| } | |
| if (au.contains(am)) { | |
| if (ao) { | |
| ao.suspendFocusEvents() | |
| } | |
| ak = ap.dom.getAttribute("tabIndex"); | |
| ap.set({ | |
| tabIndex: -1 | |
| }); | |
| ap.suspendFocusEvents(); | |
| ap.focus(); | |
| al = true | |
| } | |
| at.appendChild(ar); | |
| if (al) { | |
| if (ao) { | |
| ao.focus(); | |
| ao.resumeFocusEvents() | |
| } else { | |
| Ext.fly(am).focus() | |
| } | |
| ap.resumeFocusEvents(); | |
| ap.set({ | |
| tabIndex: ak | |
| }) | |
| } | |
| return ap | |
| }, | |
| privates: { | |
| doAddListener: function(ap, at, au, av, al, ak, am) { | |
| var ar = this, an, ao, aq; | |
| ap = Ext.canonicalEventName(ap); | |
| if (!ar.blockedEvents[ap]) { | |
| an = ar.mixins.observable.doAddListener; | |
| av = av || {}; | |
| if (ar.longpressEvents[ap]) { | |
| ar.disableTouchContextMenu() | |
| } | |
| if (q.useDelegatedEvents === false) { | |
| av.delegated = av.delegated || false | |
| } | |
| if (av.translate !== false) { | |
| ao = ar.additiveEvents[ap]; | |
| if (ao) { | |
| av.type = ap; | |
| ap = ao; | |
| an.call(ar, ap, at, au, av, al, ak, am) | |
| } | |
| aq = ar.eventMap[ap]; | |
| if (aq) { | |
| av.type = av.type || ap; | |
| ap = aq | |
| } | |
| } | |
| an.call(ar, ap, at, au, av, al, ak, am); | |
| delete av.type | |
| } | |
| }, | |
| doRemoveListener: function(ak, ao, an) { | |
| var ap = this, am, ar, aq, al; | |
| if (!ap.blockedEvents[ak]) { | |
| am = ap.mixins.observable.doRemoveListener; | |
| if (ap.longpressEvents[ak]) { | |
| al = this._contextMenuListenerRemover; | |
| if (al) { | |
| al.destroy() | |
| } | |
| } | |
| aq = ap.additiveEvents[ak]; | |
| if (aq) { | |
| ak = aq; | |
| am.call(ap, ak, ao, an) | |
| } | |
| ar = ap.eventMap[ak]; | |
| if (ar) { | |
| am.call(ap, ar, ao, an) | |
| } | |
| am.call(ap, ak, ao, an) | |
| } | |
| }, | |
| _initEvent: function(ak) { | |
| return ( this.events[ak] = new Ext.dom.ElementEvent(this,ak)) | |
| }, | |
| _getDisplay: function() { | |
| var ak = this.getData() | |
| , al = ak[w]; | |
| if (al === undefined) { | |
| ak[w] = al = "" | |
| } | |
| return al | |
| }, | |
| _getPublisher: function(ak) { | |
| var am = Ext.event.publisher.Publisher | |
| , al = am.publishersByEvent[ak]; | |
| if (!al || (this.dom === window && ak === "resize")) { | |
| al = am.publishers.dom | |
| } | |
| return al | |
| }, | |
| isFocusSuspended: function() { | |
| return !!this.getData().suspendFocusEvents | |
| }, | |
| suspendFocusEvents: function() { | |
| if (!this.isFly) { | |
| this.suspendEvent("focus", "blur") | |
| } | |
| this.getData().suspendFocusEvents = true | |
| }, | |
| resumeFocusEvents: function() { | |
| function ak() { | |
| var al; | |
| if (!this.destroyed) { | |
| al = this.getData(); | |
| if (al) { | |
| al.suspendFocusEvents = false | |
| } | |
| if (!this.isFly) { | |
| this.resumeEvent("focus", "blur") | |
| } | |
| } | |
| } | |
| if (!this.destroyed && this.getData().suspendFocusEvents) { | |
| if (Ext.isIE) { | |
| Ext.asap(ak, this) | |
| } else { | |
| ak.call(this) | |
| } | |
| } | |
| } | |
| }, | |
| deprecated: { | |
| "5.0": { | |
| methods: { | |
| cssTranslate: null , | |
| getHTML: "getHtml", | |
| getOuterHeight: null , | |
| getOuterWidth: null , | |
| getPageBox: function(am) { | |
| var ap = this | |
| , an = ap.dom | |
| , ar = an.nodeName === "BODY" | |
| , at = ar ? q.getViewportWidth() : an.offsetWidth | |
| , ao = ar ? q.getViewportHeight() : an.offsetHeight | |
| , av = ap.getXY() | |
| , au = av[1] | |
| , ak = av[0] + at | |
| , aq = av[1] + ao | |
| , al = av[0]; | |
| if (am) { | |
| return new Ext.util.Region(au,ak,aq,al) | |
| } else { | |
| return { | |
| left: al, | |
| top: au, | |
| width: at, | |
| height: ao, | |
| right: ak, | |
| bottom: aq | |
| } | |
| } | |
| }, | |
| getScrollParent: null , | |
| isDescendent: null , | |
| isTransparent: function(al) { | |
| var ak = this.getStyle(al); | |
| return ak ? b.test(ak) : false | |
| }, | |
| purgeAllListeners: "clearListeners", | |
| removeAllListeners: "clearListeners", | |
| setHTML: "setHtml", | |
| setTopLeft: null | |
| } | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, [[Ext.util.Positionable.prototype.mixinId || Ext.util.Positionable.$className, Ext.util.Positionable], [Ext.mixin.Observable.prototype.mixinId || Ext.mixin.Observable.$className, Ext.mixin.Observable]], [Ext.dom, "Element", Ext, "Element"], function(q) { | |
| var b = document, m = q.prototype, x = Ext.supports, E = "pointerdown", e = "pointermove", c = "pointerup", d = "pointercancel", i = "MSPointerDown", n = "MSPointerMove", A = "MSPointerUp", a = "MSPointerCancel", t = "mousedown", z = "mousemove", u = "mouseup", F = "mouseover", D = "mouseout", p = "mouseenter", g = "mouseleave", w = "touchstart", l = "touchmove", B = "touchend", h = "touchcancel", r = "click", j = "dblclick", v = "tap", C = "doubletap", k = m.eventMap = {}, s = m.additiveEvents = {}, o = Ext.id, y; | |
| Ext.id = function(I, H) { | |
| var G = Ext.getDom(I, true), J, K; | |
| if (!G) { | |
| K = o(I, H) | |
| } else { | |
| if (!(K = G.id)) { | |
| K = o(null , H || q.prototype.identifiablePrefix); | |
| if (Ext.isSandboxed) { | |
| J = Ext.sandboxPrefix || (Ext.sandboxPrefix = Ext.sandboxName.toLowerCase() + "-"); | |
| K = J + K | |
| } | |
| G.id = K | |
| } | |
| } | |
| return K | |
| } | |
| ; | |
| if (x.PointerEvents) { | |
| k[t] = E; | |
| k[z] = e; | |
| k[u] = c; | |
| k[w] = E; | |
| k[l] = e; | |
| k[B] = c; | |
| k[h] = d; | |
| k[r] = v; | |
| k[j] = C; | |
| k[F] = "pointerover"; | |
| k[D] = "pointerout"; | |
| k[p] = "pointerenter"; | |
| k[g] = "pointerleave" | |
| } else { | |
| if (x.MSPointerEvents) { | |
| k[E] = i; | |
| k[e] = n; | |
| k[c] = A; | |
| k[d] = a; | |
| k[t] = i; | |
| k[z] = n; | |
| k[u] = A; | |
| k[w] = i; | |
| k[l] = n; | |
| k[B] = A; | |
| k[h] = a; | |
| k[r] = v; | |
| k[j] = C; | |
| k[F] = "MSPointerOver"; | |
| k[D] = "MSPointerOut" | |
| } else { | |
| if (x.TouchEvents) { | |
| k[E] = w; | |
| k[e] = l; | |
| k[c] = B; | |
| k[d] = h; | |
| k[t] = w; | |
| k[z] = l; | |
| k[u] = B; | |
| k[r] = v; | |
| k[j] = C; | |
| if (Ext.isWebKit && Ext.os.is.Desktop) { | |
| k[w] = t; | |
| k[l] = z; | |
| k[B] = u; | |
| k[h] = u; | |
| s[t] = t; | |
| s[z] = z; | |
| s[u] = u; | |
| s[w] = w; | |
| s[l] = l; | |
| s[B] = B; | |
| s[h] = h; | |
| s[E] = t; | |
| s[e] = z; | |
| s[c] = u; | |
| s[d] = u | |
| } | |
| } else { | |
| k[E] = t; | |
| k[e] = z; | |
| k[c] = u; | |
| k[d] = u; | |
| k[w] = t; | |
| k[l] = z; | |
| k[B] = u; | |
| k[h] = u | |
| } | |
| } | |
| } | |
| if (Ext.isWebKit) { | |
| k.transitionend = Ext.browser.getVendorProperyName("transitionEnd"); | |
| k.animationstart = Ext.browser.getVendorProperyName("animationStart"); | |
| k.animationend = Ext.browser.getVendorProperyName("animationEnd") | |
| } | |
| if (!Ext.supports.MouseWheel && !Ext.isOpera) { | |
| k.mousewheel = "DOMMouseScroll" | |
| } | |
| y = m.$eventOptions = Ext.Object.chain(m.$eventOptions); | |
| y.translate = y.capture = y.delegate = y.delegated = y.stopEvent = y.preventDefault = y.stopPropagation = y.element = 1; | |
| m.styleHooks.opacity = { | |
| name: "opacity", | |
| afterSet: function(I, H, G) { | |
| var J = G.shadow; | |
| if (J) { | |
| J.setOpacity(H) | |
| } | |
| } | |
| }; | |
| m.getTrueXY = m.getXY; | |
| Ext.select = q.select; | |
| Ext.query = q.query; | |
| Ext.apply(Ext, { | |
| get: function(G) { | |
| return q.get(G) | |
| }, | |
| getDom: function(G) { | |
| if (!G || !b) { | |
| return null | |
| } | |
| return typeof G === "string" ? Ext.getElementById(G) : "dom"in G ? G.dom : G | |
| }, | |
| getBody: function() { | |
| if (!Ext._bodyEl) { | |
| if (!b.body) { | |
| throw new Error("[Ext.getBody] document.body does not yet exist") | |
| } | |
| Ext._bodyEl = Ext.get(b.body) | |
| } | |
| return Ext._bodyEl | |
| }, | |
| getHead: function() { | |
| if (!Ext._headEl) { | |
| Ext._headEl = Ext.get(b.head || b.getElementsByTagName("head")[0]) | |
| } | |
| return Ext._headEl | |
| }, | |
| getDoc: function() { | |
| if (!Ext._docEl) { | |
| Ext._docEl = Ext.get(b) | |
| } | |
| return Ext._docEl | |
| }, | |
| getWin: function() { | |
| if (!Ext._winEl) { | |
| Ext._winEl = Ext.get(window) | |
| } | |
| return Ext._winEl | |
| }, | |
| removeNode: function(I) { | |
| I = I.dom || I; | |
| var J = I && I.id, H = Ext.cache[J], G; | |
| if (H) { | |
| H.destroy() | |
| } else { | |
| if (I && (I.nodeType === 3 || I.tagName.toUpperCase() !== "BODY")) { | |
| G = I.parentNode; | |
| if (G) { | |
| G.removeChild(I) | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| Ext.isGarbage = function(G) { | |
| return G && G.nodeType === 1 && G.tagName !== "BODY" && G.tagName !== "HTML" && (!G.parentNode || (!G.offsetParent && ((Ext.isIE8 ? b.all[G.id] : b.getElementById(G.id)) !== G) && !(Ext.detachedBodyEl && Ext.detachedBodyEl.isAncestor(G)))) | |
| } | |
| ; | |
| if (Ext.os.is.Android || (Ext.os.is.Windows && Ext.supports.Touch)) { | |
| Ext.onReady(function() { | |
| var G = Ext.getWin(); | |
| q._windowWidth = q._viewportWidth = window.innerWidth; | |
| q._windowHeight = q._viewportHeight = window.innerHeight; | |
| G.on({ | |
| focusin: "_onWindowFocusChange", | |
| focusout: "_onWindowFocusChange", | |
| pointerup: "_onWindowFocusChange", | |
| capture: true, | |
| delegated: false, | |
| delay: 1, | |
| scope: q | |
| }); | |
| G.on({ | |
| resize: "_onWindowResize", | |
| priority: 2000, | |
| scope: q | |
| }) | |
| }) | |
| } | |
| })); | |
| (Ext.cmd.derive("Ext.util.Filter", Ext.Base, { | |
| isFilter: true, | |
| config: { | |
| property: null , | |
| value: null , | |
| filterFn: null , | |
| id: null , | |
| anyMatch: false, | |
| exactMatch: false, | |
| caseSensitive: false, | |
| disabled: false, | |
| disableOnEmpty: false, | |
| operator: null , | |
| root: null , | |
| serializer: null , | |
| convert: null | |
| }, | |
| scope: null , | |
| $configStrict: false, | |
| statics: { | |
| createFilterFn: function(a) { | |
| if (!a) { | |
| return Ext.returnTrue | |
| } | |
| return function(g) { | |
| var b = a.isCollection ? a.items : a, h = b.length, c = true, d, e; | |
| for (d = 0; c && d < h; d++) { | |
| e = b[d]; | |
| if (!e.getDisabled()) { | |
| c = e.filter(g) | |
| } | |
| } | |
| return c | |
| } | |
| }, | |
| isInvalid: function(a) { | |
| if (!a.filterFn) { | |
| if (!a.property) { | |
| return "A Filter requires either a property or a filterFn to be set" | |
| } | |
| if (!a.hasOwnProperty("value") && !a.operator) { | |
| return "A Filter requires either a property and value, or a filterFn to be set" | |
| } | |
| } | |
| return false | |
| } | |
| }, | |
| constructor: function(a) { | |
| this.initConfig(a) | |
| }, | |
| preventConvert: { | |
| "in": 1, | |
| notin: 1 | |
| }, | |
| filter: function(b) { | |
| var a = this | |
| , e = a._filterFn || a.getFilterFn() | |
| , d = a.getConvert() | |
| , c = a._value; | |
| a._filterValue = c; | |
| a.isDateValue = Ext.isDate(c); | |
| if (a.isDateValue) { | |
| a.dateValue = c.getTime() | |
| } | |
| if (d && !a.preventConvert[a.getOperator()]) { | |
| a._filterValue = d.call(a.scope || a, c) | |
| } | |
| return e.call(a.scope || a, b) | |
| }, | |
| getId: function() { | |
| var a = this._id; | |
| if (!a) { | |
| a = this.getProperty(); | |
| if (!a) { | |
| a = Ext.id(null , "ext-filter-") | |
| } | |
| this._id = a | |
| } | |
| return a | |
| }, | |
| getFilterFn: function() { | |
| var b = this, c = b._filterFn, a; | |
| if (!c) { | |
| a = b.getOperator(); | |
| if (a) { | |
| c = b.operatorFns[a] | |
| } else { | |
| c = b.createRegexFilter() | |
| } | |
| b._filterFn = c | |
| } | |
| return c | |
| }, | |
| createRegexFilter: function() { | |
| var b = this | |
| , e = !!b.getAnyMatch() | |
| , a = !!b.getExactMatch() | |
| , c = b.getValue() | |
| , d = Ext.String.createRegex(c, !e, !e && a, !b.getCaseSensitive()); | |
| return function(g) { | |
| var h = b.getPropertyValue(g); | |
| return d ? d.test(h) : (h == null ) | |
| } | |
| }, | |
| getPropertyValue: function(b) { | |
| var a = this._root | |
| , c = (a == null ) ? b : b[a]; | |
| return c[this._property] | |
| }, | |
| getState: function() { | |
| var c = this.getInitialConfig(), a = {}, b; | |
| for (b in c) { | |
| if (c.hasOwnProperty(b)) { | |
| a[b] = c[b] | |
| } | |
| } | |
| delete a.root; | |
| a.value = this.getValue(); | |
| return a | |
| }, | |
| getScope: function() { | |
| return this.scope | |
| }, | |
| serialize: function() { | |
| var a = this.getState() | |
| , b = this.getSerializer(); | |
| delete a.id; | |
| delete a.serializer; | |
| if (b) { | |
| b.call(this, a) | |
| } | |
| return a | |
| }, | |
| updateOperator: function() { | |
| this._filterFn = null | |
| }, | |
| updateValue: function(a) { | |
| this._filterFn = null ; | |
| if (this.getDisableOnEmpty()) { | |
| this.setDisabled(Ext.isEmpty(a)) | |
| } | |
| }, | |
| updateDisableOnEmpty: function(a) { | |
| var b = false; | |
| if (a) { | |
| b = Ext.isEmpty(this.getValue()) | |
| } | |
| this.setDisabled(b) | |
| }, | |
| privates: { | |
| getCandidateValue: function(c, b, e) { | |
| var d = this | |
| , g = d._convert | |
| , a = d.getPropertyValue(c); | |
| if (g) { | |
| a = g.call(d.scope || d, a) | |
| } else { | |
| if (!e) { | |
| a = Ext.coerce(a, b) | |
| } | |
| } | |
| return a | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "Filter"], function() { | |
| var a = this.prototype | |
| , b = (a.operatorFns = { | |
| "<": function(d) { | |
| var c = this._filterValue; | |
| return this.getCandidateValue(d, c) < c | |
| }, | |
| "<=": function(d) { | |
| var c = this._filterValue; | |
| return this.getCandidateValue(d, c) <= c | |
| }, | |
| "=": function(d) { | |
| var e = this | |
| , c = e._filterValue; | |
| d = e.getCandidateValue(d, c); | |
| if (e.isDateValue && d instanceof Date) { | |
| d = d.getTime(); | |
| c = e.dateValue | |
| } | |
| return d == c | |
| }, | |
| "===": function(d) { | |
| var e = this | |
| , c = e._filterValue; | |
| d = e.getCandidateValue(d, c, true); | |
| if (e.isDateValue && d instanceof Date) { | |
| d = d.getTime(); | |
| c = e.dateValue | |
| } | |
| return d === c | |
| }, | |
| ">=": function(d) { | |
| var c = this._filterValue; | |
| return this.getCandidateValue(d, c) >= c | |
| }, | |
| ">": function(d) { | |
| var c = this._filterValue; | |
| return this.getCandidateValue(d, c) > c | |
| }, | |
| "!=": function(d) { | |
| var e = this | |
| , c = e._filterValue; | |
| d = e.getCandidateValue(d, c); | |
| if (e.isDateValue && d instanceof Date) { | |
| d = d.getTime(); | |
| c = e.dateValue | |
| } | |
| return d != c | |
| }, | |
| "!==": function(d) { | |
| var e = this | |
| , c = e._filterValue; | |
| d = e.getCandidateValue(d, c, true); | |
| if (e.isDateValue && d instanceof Date) { | |
| d = d.getTime(); | |
| c = e.dateValue | |
| } | |
| return d !== c | |
| }, | |
| "in": function(d) { | |
| var c = this._filterValue; | |
| return Ext.Array.contains(c, this.getCandidateValue(d, c)) | |
| }, | |
| notin: function(d) { | |
| var c = this._filterValue; | |
| return !Ext.Array.contains(c, this.getCandidateValue(d, c)) | |
| }, | |
| like: function(d) { | |
| var c = this._filterValue; | |
| return c && this.getCandidateValue(d, c).toLowerCase().indexOf(c.toLowerCase()) > -1 | |
| } | |
| }); | |
| b["=="] = b["="]; | |
| b.gt = b[">"]; | |
| b.ge = b[">="]; | |
| b.lt = b["<"]; | |
| b.le = b["<="]; | |
| b.eq = b["="]; | |
| b.ne = b["!="] | |
| })); | |
| (Ext.cmd.derive("Ext.util.Observable", Ext.mixin.Observable, { | |
| $applyConfigs: true | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util, "Observable"], function(a) { | |
| var b = Ext.mixin.Observable; | |
| a.releaseCapture = b.releaseCapture; | |
| a.capture = b.capture; | |
| a.captureArgs = b.captureArgs; | |
| a.observe = a.observeClass = b.observe | |
| })); | |
| (Ext.cmd.derive("Ext.util.AbstractMixedCollection", Ext.Base, { | |
| isMixedCollection: true, | |
| generation: 0, | |
| indexGeneration: 0, | |
| constructor: function(b, a) { | |
| var c = this; | |
| if (arguments.length === 1 && Ext.isObject(b)) { | |
| c.initialConfig = b; | |
| Ext.apply(c, b) | |
| } else { | |
| c.allowFunctions = b === true; | |
| if (a) { | |
| c.getKey = a | |
| } | |
| c.initialConfig = { | |
| allowFunctions: c.allowFunctions, | |
| getKey: c.getKey | |
| } | |
| } | |
| c.items = []; | |
| c.map = {}; | |
| c.keys = []; | |
| c.indexMap = {}; | |
| c.length = 0; | |
| c.mixins.observable.constructor.call(c) | |
| }, | |
| destroy: function() { | |
| var a = this; | |
| a.items = a.map = a.keys = a.indexMap = null ; | |
| a.callParent() | |
| }, | |
| allowFunctions: false, | |
| add: function(c, d) { | |
| var a = this.length, b; | |
| if (arguments.length === 1) { | |
| b = this.insert(a, c) | |
| } else { | |
| b = this.insert(a, c, d) | |
| } | |
| return b | |
| }, | |
| 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) | |
| } | |
| d.generation++; | |
| b = d.indexOfKey(c); | |
| d.items[b] = e; | |
| d.map[c] = e; | |
| if (d.hasListeners.replace) { | |
| d.fireEvent("replace", c, a, e) | |
| } | |
| return e | |
| }, | |
| reorder: function(d) { | |
| var h = this, b = h.items, c = 0, g = b.length, a = [], e = [], i; | |
| h.suspendEvents(); | |
| for (i in d) { | |
| a[d[i]] = b[i] | |
| } | |
| for (c = 0; c < g; c++) { | |
| if (d[c] == undefined) { | |
| e.push(b[c]) | |
| } | |
| } | |
| for (c = 0; c < g; c++) { | |
| if (a[c] == undefined) { | |
| a[c] = e.shift() | |
| } | |
| } | |
| h.clear(); | |
| h.addAll(a); | |
| h.resumeEvents() | |
| }, | |
| updateKey: function(g, h) { | |
| var d = this, e = d.map, a = d.indexOfKey(g), c = d.indexMap, b; | |
| if (a > -1) { | |
| b = e[g]; | |
| delete e[g]; | |
| delete c[g]; | |
| e[h] = b; | |
| c[h] = a; | |
| d.keys[a] = h; | |
| d.indexGeneration = ++d.generation | |
| } | |
| }, | |
| addAll: function(c) { | |
| var b = this, a; | |
| if (arguments.length > 1 || Ext.isArray(c)) { | |
| b.insert(b.length, arguments.length > 1 ? arguments : c) | |
| } else { | |
| for (a in c) { | |
| if (c.hasOwnProperty(a)) { | |
| if (b.allowFunctions || typeof c[a] != "function") { | |
| b.add(a, c[a]) | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| each: function(e, d) { | |
| var b = Ext.Array.push([], this.items), c = 0, a = b.length, g; | |
| for (; c < a; c++) { | |
| g = b[c]; | |
| if (e.call(d || g, g, c, a) === false) { | |
| break | |
| } | |
| } | |
| }, | |
| eachKey: function(e, d) { | |
| var g = this.keys | |
| , b = this.items | |
| , c = 0 | |
| , a = g.length; | |
| for (; c < a; c++) { | |
| e.call(d || window, g[c], b[c], c, a) | |
| } | |
| }, | |
| findBy: function(e, d) { | |
| var g = this.keys | |
| , b = this.items | |
| , c = 0 | |
| , a = b.length; | |
| for (; c < a; c++) { | |
| if (e.call(d || window, b[c], g[c])) { | |
| return b[c] | |
| } | |
| } | |
| return null | |
| }, | |
| find: function() { | |
| if (Ext.isDefined(Ext.global.console)) { | |
| Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.") | |
| } | |
| return this.findBy.apply(this, arguments) | |
| }, | |
| insert: function(b, c, d) { | |
| var a; | |
| if (Ext.isIterable(c)) { | |
| a = this.doInsert(b, c, d) | |
| } else { | |
| if (arguments.length > 2) { | |
| a = this.doInsert(b, [c], [d]) | |
| } else { | |
| a = this.doInsert(b, [c]) | |
| } | |
| a = a[0] | |
| } | |
| return a | |
| }, | |
| doInsert: function(j, o, n) { | |
| var l = this, b, c, g, k = o.length, a = k, e = l.hasListeners.add, d, h = {}, m, q, p; | |
| if (n != null ) { | |
| l.useLinearSearch = true | |
| } else { | |
| n = o; | |
| o = new Array(k); | |
| for (g = 0; g < k; g++) { | |
| o[g] = this.getKey(n[g]) | |
| } | |
| } | |
| l.suspendEvents(); | |
| for (g = 0; g < k; g++) { | |
| b = o[g]; | |
| c = l.indexOfKey(b); | |
| if (c !== -1) { | |
| if (c < j) { | |
| j-- | |
| } | |
| l.removeAt(c) | |
| } | |
| if (b != null ) { | |
| if (h[b] != null ) { | |
| m = true; | |
| a-- | |
| } | |
| h[b] = g | |
| } | |
| } | |
| l.resumeEvents(); | |
| if (m) { | |
| q = o; | |
| p = n; | |
| o = new Array(a); | |
| n = new Array(a); | |
| g = 0; | |
| for (b in h) { | |
| o[g] = q[h[b]]; | |
| n[g] = p[h[b]]; | |
| g++ | |
| } | |
| k = a | |
| } | |
| d = j === l.length && l.indexGeneration === l.generation; | |
| Ext.Array.insert(l.items, j, n); | |
| Ext.Array.insert(l.keys, j, o); | |
| l.length += k; | |
| l.generation++; | |
| if (d) { | |
| l.indexGeneration = l.generation | |
| } | |
| for (g = 0; g < k; g++, | |
| j++) { | |
| b = o[g]; | |
| if (b != null ) { | |
| l.map[b] = n[g]; | |
| if (d) { | |
| l.indexMap[b] = j | |
| } | |
| } | |
| if (e) { | |
| l.fireEvent("add", j, n[g], b) | |
| } | |
| } | |
| return n | |
| }, | |
| remove: function(d) { | |
| var c = this, b, a; | |
| if (!c.useLinearSearch && (b = c.getKey(d))) { | |
| a = c.indexOfKey(b) | |
| } else { | |
| a = Ext.Array.indexOf(c.items, d) | |
| } | |
| return (a === -1) ? false : c.removeAt(a) | |
| }, | |
| removeAll: function(a) { | |
| var c = this, b; | |
| if (a || c.hasListeners.remove) { | |
| if (a) { | |
| for (b = a.length - 1; b >= 0; --b) { | |
| c.remove(a[b]) | |
| } | |
| } else { | |
| while (c.length) { | |
| c.removeAt(0) | |
| } | |
| } | |
| } else { | |
| c.length = c.items.length = c.keys.length = 0; | |
| c.map = {}; | |
| c.indexMap = {}; | |
| c.generation++; | |
| c.indexGeneration = c.generation | |
| } | |
| }, | |
| removeAt: function(a) { | |
| var c = this, d, b; | |
| if (a < c.length && a >= 0) { | |
| c.length--; | |
| d = c.items[a]; | |
| Ext.Array.erase(c.items, a, 1); | |
| b = c.keys[a]; | |
| if (typeof b != "undefined") { | |
| delete c.map[b] | |
| } | |
| Ext.Array.erase(c.keys, a, 1); | |
| if (c.hasListeners.remove) { | |
| c.fireEvent("remove", d, b) | |
| } | |
| c.generation++; | |
| return d | |
| } | |
| return false | |
| }, | |
| removeRange: function(h, a) { | |
| var j = this, b, k, g, e, c, d; | |
| if (h < j.length && h >= 0) { | |
| if (!a) { | |
| a = 1 | |
| } | |
| e = Math.min(h + a, j.length); | |
| a = e - h; | |
| d = e === j.length; | |
| c = d && j.indexGeneration === j.generation; | |
| for (g = h; g < e; g++) { | |
| k = j.keys[g]; | |
| if (k != null ) { | |
| delete j.map[k]; | |
| if (c) { | |
| delete j.indexMap[k] | |
| } | |
| } | |
| } | |
| b = j.items[g - 1]; | |
| j.length -= a; | |
| j.generation++; | |
| if (c) { | |
| j.indexGeneration = j.generation | |
| } | |
| if (d) { | |
| j.items.length = j.keys.length = j.length | |
| } else { | |
| j.items.splice(h, a); | |
| j.keys.splice(h, a) | |
| } | |
| return b | |
| } | |
| return false | |
| }, | |
| removeAtKey: function(b) { | |
| var d = this, c = d.keys, a; | |
| if (b == null ) { | |
| for (a = c.length - 1; a >= 0; a--) { | |
| if (c[a] == null ) { | |
| d.removeAt(a) | |
| } | |
| } | |
| } else { | |
| return d.removeAt(d.indexOfKey(b)) | |
| } | |
| }, | |
| getCount: function() { | |
| return this.length | |
| }, | |
| indexOf: function(c) { | |
| var b = this, a; | |
| if (c != null ) { | |
| if (!b.useLinearSearch && (a = b.getKey(c))) { | |
| return this.indexOfKey(a) | |
| } | |
| return Ext.Array.indexOf(b.items, c) | |
| } | |
| return -1 | |
| }, | |
| indexOfKey: function(a) { | |
| if (!this.map.hasOwnProperty(a)) { | |
| return -1 | |
| } | |
| if (this.indexGeneration !== this.generation) { | |
| this.rebuildIndexMap() | |
| } | |
| return this.indexMap[a] | |
| }, | |
| rebuildIndexMap: function() { | |
| var e = this, d = e.indexMap = {}, c = e.keys, a = c.length, b; | |
| for (b = 0; b < a; b++) { | |
| d[c[b]] = b | |
| } | |
| e.indexGeneration = e.generation | |
| }, | |
| 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(c) { | |
| var b = this, a; | |
| if (c != null ) { | |
| if (!b.useLinearSearch && (a = b.getKey(c))) { | |
| return this.map[a] != null | |
| } | |
| return Ext.Array.indexOf(this.items, c) !== -1 | |
| } | |
| return false | |
| }, | |
| containsKey: function(a) { | |
| return this.map.hasOwnProperty(a) | |
| }, | |
| clear: function() { | |
| var a = this; | |
| if (a.generation) { | |
| a.length = 0; | |
| a.items = []; | |
| a.keys = []; | |
| a.map = {}; | |
| a.indexMap = {}; | |
| a.generation++; | |
| a.indexGeneration = a.generation | |
| } | |
| if (a.hasListeners.clear) { | |
| a.fireEvent("clear") | |
| } | |
| }, | |
| first: function() { | |
| return this.items[0] | |
| }, | |
| last: function() { | |
| return this.items[this.length - 1] | |
| }, | |
| sum: function(h, b, j, a) { | |
| var c = this.extractValues(h, b), g = c.length, e = 0, d; | |
| j = j || 0; | |
| a = (a || a === 0) ? a : g - 1; | |
| for (d = j; d <= a; d++) { | |
| e += c[d] | |
| } | |
| return e | |
| }, | |
| collect: function(k, e, h) { | |
| var l = this.extractValues(k, e), a = l.length, b = {}, c = [], j, g, d; | |
| for (d = 0; d < a; d++) { | |
| j = l[d]; | |
| g = String(j); | |
| if ((h || !Ext.isEmpty(j)) && !b[g]) { | |
| b[g] = true; | |
| c.push(j) | |
| } | |
| } | |
| return c | |
| }, | |
| extractValues: function(c, a) { | |
| var b = this.items; | |
| if (a) { | |
| b = Ext.Array.pluck(b, a) | |
| } | |
| return Ext.Array.pluck(b, c) | |
| }, | |
| hasRange: function(b, a) { | |
| return ( a < this.length) | |
| }, | |
| getRange: function(i, b) { | |
| var h = this, d = h.items, c = [], a = d.length, g, e; | |
| if (a < 1) { | |
| return c | |
| } | |
| if (i > b) { | |
| e = true; | |
| g = i; | |
| i = b; | |
| b = g | |
| } | |
| if (i < 0) { | |
| i = 0 | |
| } | |
| if (b == null || b >= a) { | |
| b = a - 1 | |
| } | |
| c = d.slice(i, b + 1); | |
| if (e && c.length) { | |
| c.reverse() | |
| } | |
| return c | |
| }, | |
| filter: function(d, c, e, a) { | |
| var b = []; | |
| if (Ext.isString(d)) { | |
| b.push(new Ext.util.Filter({ | |
| property: d, | |
| value: c, | |
| anyMatch: e, | |
| caseSensitive: a | |
| })) | |
| } else { | |
| if (Ext.isArray(d) || d instanceof Ext.util.Filter) { | |
| b = b.concat(d) | |
| } | |
| } | |
| return this.filterBy(Ext.util.Filter.createFilterFn(b)) | |
| }, | |
| filterBy: function(e, d) { | |
| var j = this, a = new j.self(j.initialConfig), h = j.keys, b = j.items, g = b.length, c; | |
| a.getKey = j.getKey; | |
| for (c = 0; c < g; c++) { | |
| if (e.call(d || j, b[c], h[c])) { | |
| a.add(h[c], b[c]) | |
| } | |
| } | |
| a.useLinearSearch = j.useLinearSearch; | |
| return a | |
| }, | |
| findIndex: function(c, b, e, d, a) { | |
| if (Ext.isEmpty(b, false)) { | |
| return -1 | |
| } | |
| b = this.createValueMatcher(b, d, a); | |
| return this.findIndexBy(function(g) { | |
| return g && b.test(g[c]) | |
| }, null , e) | |
| }, | |
| findIndexBy: function(e, d, j) { | |
| var h = this | |
| , g = h.keys | |
| , b = h.items | |
| , c = j || 0 | |
| , a = b.length; | |
| for (; c < a; c++) { | |
| if (e.call(d || h, b[c], g[c])) { | |
| return c | |
| } | |
| } | |
| return -1 | |
| }, | |
| createValueMatcher: function(c, e, a, b) { | |
| if (!c.exec) { | |
| var d = Ext.String.escapeRegex; | |
| c = String(c); | |
| if (e === true) { | |
| c = d(c) | |
| } else { | |
| c = "^" + d(c); | |
| if (b === true) { | |
| c += "$" | |
| } | |
| } | |
| c = new RegExp(c,a ? "" : "i") | |
| } | |
| return c | |
| }, | |
| clone: function() { | |
| var a = this | |
| , b = new a.self(a.initialConfig); | |
| b.add(a.keys, a.items); | |
| b.useLinearSearch = a.useLinearSearch; | |
| return b | |
| } | |
| }, 1, 0, 0, 0, 0, [["observable", Ext.util.Observable]], [Ext.util, "AbstractMixedCollection"], 0)); | |
| (Ext.cmd.derive("Ext.util.Sorter", Ext.Base, { | |
| isSorter: true, | |
| config: { | |
| property: null , | |
| sorterFn: null , | |
| root: null , | |
| transform: null , | |
| direction: "ASC", | |
| id: undefined | |
| }, | |
| statics: { | |
| createComparator: function(b, a) { | |
| a = a || 0; | |
| return function(c, j) { | |
| var e = b.isCollection ? b.items : b, h = e.length, d, g; | |
| for (g = 0; g < h; ++g) { | |
| d = e[g].sort(c, j); | |
| if (d) { | |
| return d | |
| } | |
| } | |
| return a && a(c, j) | |
| } | |
| } | |
| }, | |
| multiplier: 1, | |
| constructor: function(a) { | |
| this.initConfig(a) | |
| }, | |
| getId: function() { | |
| var a = this._id; | |
| if (!a) { | |
| a = this.getProperty(); | |
| if (!a) { | |
| a = Ext.id(null , "ext-sorter-") | |
| } | |
| this._id = a | |
| } | |
| return a | |
| }, | |
| sort: function(a, b) { | |
| return this.multiplier * this.sortFn(a, b) | |
| }, | |
| sortFn: function(d, c) { | |
| var g = this, e = g._transform, b = g._root, h = g._property, a, i; | |
| if (b) { | |
| d = d[b]; | |
| c = c[b] | |
| } | |
| a = d[h]; | |
| i = c[h]; | |
| if (e) { | |
| a = e(a); | |
| i = e(i) | |
| } | |
| return (a > i) ? 1 : (a < i ? -1 : 0) | |
| }, | |
| applyDirection: function(a) { | |
| return a ? a : "ASC" | |
| }, | |
| updateDirection: function(a) { | |
| this.multiplier = (a.toUpperCase() === "DESC") ? -1 : 1 | |
| }, | |
| updateProperty: function(a) { | |
| if (a) { | |
| delete this.sortFn | |
| } | |
| }, | |
| updateSorterFn: function(a) { | |
| this.sortFn = a | |
| }, | |
| toggle: function() { | |
| this.setDirection(Ext.String.toggle(this.getDirection(), "ASC", "DESC")) | |
| }, | |
| getState: function() { | |
| var b = this | |
| , a = { | |
| root: b.getRoot(), | |
| property: b.getProperty(), | |
| direction: b.getDirection() | |
| }; | |
| if (b._id) { | |
| a.id = b._id | |
| } | |
| return a | |
| }, | |
| serialize: function() { | |
| return { | |
| property: this.getProperty(), | |
| direction: this.getDirection() | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "Sorter"], 0)); | |
| (Ext.cmd.derive("Ext.util.Sortable", Ext.Base, { | |
| isSortable: true, | |
| $configPrefixed: false, | |
| $configStrict: false, | |
| config: { | |
| sorters: null | |
| }, | |
| defaultSortDirection: "ASC", | |
| multiSortLimit: 3, | |
| statics: { | |
| createComparator: function(a) { | |
| return a && a.length ? function(d, c) { | |
| var b = a[0].sort(d, c) | |
| , g = a.length | |
| , e = 1; | |
| for (; !b && e < g; e++) { | |
| b = a[e].sort.call(a[e], d, c) | |
| } | |
| return b | |
| } | |
| : function() { | |
| return 0 | |
| } | |
| } | |
| }, | |
| applySorters: function(c) { | |
| var b = this | |
| , a = b.getSorters() || new Ext.util.MixedCollection(false,Ext.returnId); | |
| if (c) { | |
| a.addAll(b.decodeSorters(c)) | |
| } | |
| return a | |
| }, | |
| sort: function(h, g, a, e) { | |
| var b = this, i, d, c = b.getSorters(); | |
| if (!c) { | |
| b.setSorters(null ); | |
| c = b.getSorters() | |
| } | |
| if (Ext.isArray(h)) { | |
| e = a; | |
| a = g | |
| } else { | |
| if (Ext.isObject(h)) { | |
| h = [h]; | |
| e = a; | |
| a = g | |
| } else { | |
| if (Ext.isString(h)) { | |
| i = c.get(h); | |
| if (!i) { | |
| i = { | |
| property: h, | |
| direction: g | |
| } | |
| } else { | |
| if (g == null ) { | |
| i.toggle() | |
| } else { | |
| i.setDirection(g) | |
| } | |
| } | |
| h = [i] | |
| } | |
| } | |
| } | |
| if (h && h.length) { | |
| h = b.decodeSorters(h); | |
| switch (a) { | |
| case "multi": | |
| c.insert(0, h[0]); | |
| d = c.getCount() - b.multiSortLimit; | |
| if (d > 0) { | |
| c.removeRange(b.multiSortLimit, d) | |
| } | |
| break; | |
| case "prepend": | |
| c.insert(0, h); | |
| break; | |
| case "append": | |
| c.addAll(h); | |
| break; | |
| case undefined: | |
| case null : | |
| case "replace": | |
| c.clear(); | |
| c.addAll(h); | |
| break; | |
| default: | |
| } | |
| } | |
| if (e !== false) { | |
| b.fireEvent("beforesort", b, h); | |
| b.onBeforeSort(h); | |
| if (b.getSorterCount()) { | |
| b.doSort(b.generateComparator()) | |
| } | |
| } | |
| return h | |
| }, | |
| getSorterCount: function() { | |
| return this.getSorters().items.length | |
| }, | |
| generateComparator: function() { | |
| var a = this.getSorters().getRange(); | |
| return a.length ? this.createComparator(a) : this.emptyComparator | |
| }, | |
| emptyComparator: function() { | |
| return 0 | |
| }, | |
| onBeforeSort: Ext.emptyFn, | |
| decodeSorters: function(g) { | |
| if (!Ext.isArray(g)) { | |
| if (g === undefined) { | |
| g = [] | |
| } else { | |
| g = [g] | |
| } | |
| } | |
| var d = g.length, h = Ext.util.Sorter, b = this.getModel ? this.getModel() : this.model, e, a, c; | |
| for (c = 0; c < d; c++) { | |
| a = g[c]; | |
| if (!(a instanceof h)) { | |
| if (Ext.isString(a)) { | |
| a = { | |
| property: a | |
| } | |
| } | |
| Ext.applyIf(a, { | |
| root: this.sortRoot, | |
| direction: "ASC" | |
| }); | |
| if (a.fn) { | |
| a.sorterFn = a.fn | |
| } | |
| if (typeof a == "function") { | |
| a = { | |
| sorterFn: a | |
| } | |
| } | |
| if (b && !a.transform) { | |
| e = b.getField(a.property); | |
| a.transform = e && e.sortType !== Ext.identityFn ? e.sortType : undefined | |
| } | |
| g[c] = new Ext.util.Sorter(a) | |
| } | |
| } | |
| return g | |
| }, | |
| getFirstSorter: function() { | |
| var c = this.getSorters().items, a = c.length, b = 0, d; | |
| for (; b < a; ++b) { | |
| d = c[b]; | |
| if (!d.isGrouper) { | |
| return d | |
| } | |
| } | |
| return null | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util, "Sortable"], function() { | |
| this.prototype.createComparator = this.createComparator | |
| })); | |
| (Ext.cmd.derive("Ext.util.MixedCollection", Ext.util.AbstractMixedCollection, { | |
| constructor: function() { | |
| this.initConfig(); | |
| Ext.util.AbstractMixedCollection.prototype.constructor.apply(this, arguments) | |
| }, | |
| doSort: function(a) { | |
| this.sortBy(a) | |
| }, | |
| _sort: function(m, b, l) { | |
| var k = this, e, g, d = String(b).toUpperCase() == "DESC" ? -1 : 1, j = [], n = k.keys, h = k.items, a; | |
| l = l || function(i, c) { | |
| return i - c | |
| } | |
| ; | |
| for (e = 0, | |
| g = h.length; e < g; e++) { | |
| j[j.length] = { | |
| key: n[e], | |
| value: h[e], | |
| index: e | |
| } | |
| } | |
| Ext.Array.sort(j, function(i, c) { | |
| return l(i[m], c[m]) * d || (i.index < c.index ? -1 : 1) | |
| }); | |
| for (e = 0, | |
| g = j.length; e < g; e++) { | |
| a = j[e]; | |
| h[e] = a.value; | |
| n[e] = a.key; | |
| k.indexMap[a.key] = e | |
| } | |
| k.generation++; | |
| k.indexGeneration = k.generation; | |
| k.fireEvent("sort", k) | |
| }, | |
| sortBy: function(b) { | |
| var j = this, a = j.items, h, g = j.keys, d, e = a.length, c; | |
| for (c = 0; c < e; c++) { | |
| a[c].$extCollectionIndex = c | |
| } | |
| Ext.Array.sort(a, function(k, i) { | |
| return b(k, i) || (k.$extCollectionIndex < i.$extCollectionIndex ? -1 : 1) | |
| }); | |
| for (c = 0; c < e; c++) { | |
| h = a[c]; | |
| d = j.getKey(h); | |
| g[c] = d; | |
| j.indexMap[d] = c; | |
| delete a.$extCollectionIndex | |
| } | |
| j.generation++; | |
| j.indexGeneration = j.generation; | |
| j.fireEvent("sort", j, a, g) | |
| }, | |
| findInsertionIndex: function(e, d) { | |
| var g = this, b = g.items, i = 0, a = b.length - 1, c, h; | |
| if (!d) { | |
| d = g.generateComparator() | |
| } | |
| while (i <= a) { | |
| c = (i + a) >> 1; | |
| h = d(e, b[c]); | |
| if (h >= 0) { | |
| i = c + 1 | |
| } else { | |
| if (h < 0) { | |
| a = c - 1 | |
| } | |
| } | |
| } | |
| return i | |
| }, | |
| reorder: function(a) { | |
| Ext.util.AbstractMixedCollection.prototype.reorder.call(this, a); | |
| this.fireEvent("sort", this) | |
| }, | |
| sortByKey: function(a, b) { | |
| this._sort("key", a, b || function(d, c) { | |
| var g = String(d).toUpperCase() | |
| , e = String(c).toUpperCase(); | |
| return g > e ? 1 : (g < e ? -1 : 0) | |
| } | |
| ) | |
| } | |
| }, 1, 0, 0, 0, 0, [["sortable", Ext.util.Sortable]], [Ext.util, "MixedCollection"], 0)); | |
| (Ext.cmd.derive("Ext.util.TaskRunner", Ext.Base, { | |
| interval: 10, | |
| timerId: null , | |
| constructor: function(a) { | |
| var b = this; | |
| if (typeof a == "number") { | |
| b.interval = a | |
| } else { | |
| if (a) { | |
| Ext.apply(b, a) | |
| } | |
| } | |
| b.tasks = []; | |
| b.timerFn = Ext.Function.bind(b.onTick, b) | |
| }, | |
| newTask: function(b) { | |
| var a = new Ext.util.TaskRunner.Task(b); | |
| a.manager = this; | |
| return a | |
| }, | |
| start: function(a) { | |
| var c = this | |
| , b = Ext.Date.now(); | |
| if (!a.pending) { | |
| c.tasks.push(a); | |
| a.pending = true | |
| } | |
| a.stopped = false; | |
| a.taskStartTime = b; | |
| a.taskRunTime = a.fireOnStart !== false ? 0 : a.taskStartTime; | |
| a.taskRunCount = 0; | |
| if (!c.firing) { | |
| if (a.fireOnStart !== false) { | |
| c.startTimer(0, b) | |
| } else { | |
| c.startTimer(a.interval, b) | |
| } | |
| } | |
| return a | |
| }, | |
| stop: function(a) { | |
| if (!a.stopped) { | |
| a.stopped = true; | |
| if (a.onStop) { | |
| a.onStop.call(a.scope || a, a) | |
| } | |
| } | |
| return a | |
| }, | |
| stopAll: function() { | |
| Ext.each(this.tasks, this.stop, this) | |
| }, | |
| firing: false, | |
| nextExpires: 1e+99, | |
| onTick: function() { | |
| var n = this, g = n.tasks, a = Ext.Date.now(), o = 1e+99, l = g.length, d = Ext.GlobalEvents, c, p, j, b, e, h, q; | |
| n.timerId = null ; | |
| n.firing = true; | |
| for (j = 0; j < l || j < (l = g.length); ++j) { | |
| b = g[j]; | |
| if (!(h = b.stopped)) { | |
| c = b.taskRunTime + b.interval; | |
| if (c <= a) { | |
| e = 1; | |
| if (b.hasOwnProperty("fireIdleEvent")) { | |
| q = b.fireIdleEvent | |
| } else { | |
| q = n.fireIdleEvent | |
| } | |
| try { | |
| e = b.run.apply(b.scope || b, b.args || [++b.taskRunCount]) | |
| } catch (k) { | |
| try { | |
| if (b.onError) { | |
| e = b.onError.call(b.scope || b, b, k) | |
| } | |
| } catch (m) {} | |
| } | |
| b.taskRunTime = a; | |
| if (e === false || b.taskRunCount === b.repeat) { | |
| n.stop(b); | |
| h = true | |
| } else { | |
| h = b.stopped; | |
| c = a + b.interval | |
| } | |
| } | |
| if (!h && b.duration && b.duration <= (a - b.taskStartTime)) { | |
| n.stop(b); | |
| h = true | |
| } | |
| } | |
| if (h) { | |
| b.pending = false; | |
| if (!p) { | |
| p = g.slice(0, j) | |
| } | |
| } else { | |
| if (p) { | |
| p.push(b) | |
| } | |
| if (o > c) { | |
| o = c | |
| } | |
| } | |
| } | |
| if (p) { | |
| n.tasks = p | |
| } | |
| n.firing = false; | |
| if (n.tasks.length) { | |
| n.startTimer(o - a, Ext.Date.now()) | |
| } | |
| if (q !== false && d.hasListeners.idle) { | |
| d.fireEvent("idle") | |
| } | |
| }, | |
| startTimer: function(e, c) { | |
| var d = this | |
| , b = c + e | |
| , a = d.timerId; | |
| if (a && d.nextExpires - b > d.interval) { | |
| clearTimeout(a); | |
| a = null | |
| } | |
| if (!a) { | |
| if (e < d.interval) { | |
| e = d.interval | |
| } | |
| d.timerId = Ext.defer(d.timerFn, e); | |
| d.nextExpires = b | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "TaskRunner"], function() { | |
| var b = this | |
| , a = b.prototype; | |
| a.destroy = a.stopAll; | |
| b.Task = new Ext.Class({ | |
| isTask: true, | |
| stopped: true, | |
| fireOnStart: false, | |
| constructor: function(c) { | |
| Ext.apply(this, c) | |
| }, | |
| restart: function(c) { | |
| if (c !== undefined) { | |
| this.interval = c | |
| } | |
| this.manager.start(this) | |
| }, | |
| start: function(c) { | |
| if (this.stopped) { | |
| this.restart(c) | |
| } | |
| }, | |
| stop: function() { | |
| this.manager.stop(this) | |
| } | |
| }); | |
| a = b.Task.prototype; | |
| a.destroy = a.stop | |
| })); | |
| (Ext.cmd.derive("Ext.fx.target.Target", Ext.Base, { | |
| isAnimTarget: true, | |
| constructor: function(a) { | |
| this.target = a; | |
| this.id = this.getId() | |
| }, | |
| getId: function() { | |
| return this.target.id | |
| }, | |
| remove: function() { | |
| Ext.destroy(this.target) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.fx.target, "Target"], 0)); | |
| (Ext.cmd.derive("Ext.fx.target.Element", Ext.fx.target.Target, { | |
| type: "element", | |
| getElVal: function(b, a, c) { | |
| if (c === undefined) { | |
| if (a === "x") { | |
| c = b.getX() | |
| } else { | |
| if (a === "y") { | |
| c = b.getY() | |
| } else { | |
| if (a === "scrollTop") { | |
| c = b.getScroll().top | |
| } else { | |
| if (a === "scrollLeft") { | |
| c = b.getScroll().left | |
| } else { | |
| if (a === "height") { | |
| c = b.getHeight() | |
| } else { | |
| if (a === "width") { | |
| c = b.getWidth() | |
| } else { | |
| c = b.getStyle(a) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return c | |
| }, | |
| getAttr: function(a, c) { | |
| var b = this.target; | |
| return [[b, this.getElVal(b, a, c)]] | |
| }, | |
| setAttr: function(k) { | |
| var g = k.length, d, a, h, e, c, b; | |
| for (e = 0; e < g; e++) { | |
| d = k[e].attrs; | |
| for (a in d) { | |
| if (d.hasOwnProperty(a)) { | |
| b = d[a].length; | |
| for (c = 0; c < b; c++) { | |
| h = d[a][c]; | |
| this.setElVal(h[0], a, h[1]) | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| setElVal: function(b, a, c) { | |
| if (a === "x") { | |
| b.setX(c) | |
| } else { | |
| if (a === "y") { | |
| b.setY(c) | |
| } else { | |
| if (a === "scrollTop") { | |
| b.scrollTo("top", c) | |
| } else { | |
| if (a === "scrollLeft") { | |
| b.scrollTo("left", c) | |
| } else { | |
| if (a === "width") { | |
| b.setWidth(c) | |
| } else { | |
| if (a === "height") { | |
| b.setHeight(c) | |
| } else { | |
| b.setStyle(a, c) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.target, "Element"], 0)); | |
| (Ext.cmd.derive("Ext.fx.target.ElementCSS", Ext.fx.target.Element, { | |
| setAttr: function(p, e) { | |
| var s = { | |
| attrs: [], | |
| duration: [], | |
| easing: [] | |
| }, m = p.length, n = function() { | |
| this.setStyle(Ext.supports.CSS3Prefix + "TransitionProperty", null ); | |
| this.setStyle(Ext.supports.CSS3Prefix + "TransitionDuration", null ); | |
| this.setStyle(Ext.supports.CSS3Prefix + "TransitionTimingFunction", null ) | |
| } | |
| , q = { | |
| single: true | |
| }, g, r, k, l, c, b, h, d, a; | |
| for (h = 0; h < m; h++) { | |
| r = p[h]; | |
| c = r.duration; | |
| l = r.easing; | |
| r = r.attrs; | |
| for (k in r) { | |
| if (Ext.Array.indexOf(s.attrs, k) == -1) { | |
| s.attrs.push(k.replace(/[A-Z]/g, function(i) { | |
| return "-" + i.toLowerCase() | |
| })); | |
| s.duration.push(c + "ms"); | |
| s.easing.push(l) | |
| } | |
| } | |
| } | |
| g = s.attrs.join(","); | |
| c = s.duration.join(","); | |
| l = s.easing.join(", "); | |
| for (h = 0; h < m; h++) { | |
| r = p[h].attrs; | |
| for (k in r) { | |
| a = r[k].length; | |
| for (d = 0; d < a; d++) { | |
| b = r[k][d]; | |
| b[0].setStyle(Ext.supports.CSS3Prefix + "TransitionProperty", e ? "" : g); | |
| b[0].setStyle(Ext.supports.CSS3Prefix + "TransitionDuration", e ? "" : c); | |
| b[0].setStyle(Ext.supports.CSS3Prefix + "TransitionTimingFunction", e ? "" : l); | |
| b[0].setStyle(k, b[1]); | |
| if (e) { | |
| b = b[0].dom.offsetWidth | |
| } else { | |
| b[0].on(Ext.supports.CSS3TransitionEnd, n, b[0], q) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.target, "ElementCSS"], 0)); | |
| (Ext.cmd.derive("Ext.fx.target.CompositeElement", Ext.fx.target.Element, { | |
| isComposite: true, | |
| constructor: function(a) { | |
| a.id = a.id || Ext.id(null , "ext-composite-"); | |
| Ext.fx.target.Element.prototype.constructor.call(this, a) | |
| }, | |
| getAttr: function(a, j) { | |
| var b = [], h = this.target, g = h.elements, e = g.length, c, d; | |
| for (c = 0; c < e; c++) { | |
| d = g[c]; | |
| if (d) { | |
| d = h.getElement(d); | |
| b.push([d, this.getElVal(d, a, j)]) | |
| } | |
| } | |
| return b | |
| }, | |
| setAttr: function(n) { | |
| var l = this.target, m = n.length, b = l.elements, q = b.length, o, d, p, h, c, g, e, a; | |
| for (g = 0; g < m; g++) { | |
| p = n[g].attrs; | |
| for (h in p) { | |
| if (p.hasOwnProperty(h)) { | |
| a = p[h].length; | |
| for (e = 0; e < a; e++) { | |
| o = p[h][e][1]; | |
| for (d = 0; d < q; ++d) { | |
| c = b[d]; | |
| if (c) { | |
| c = l.getElement(c); | |
| this.setElVal(c, h, o) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| remove: function() { | |
| this.target.destroy() | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.fx.target, "CompositeElement"], 0)); | |
| (Ext.cmd.derive("Ext.fx.target.CompositeElementCSS", Ext.fx.target.CompositeElement, { | |
| setAttr: function() { | |
| return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this, arguments) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.target, "CompositeElementCSS"], 0)); | |
| (Ext.cmd.derive("Ext.fx.target.Sprite", Ext.fx.target.Target, { | |
| type: "draw", | |
| getFromPrim: function(b, a) { | |
| var c; | |
| switch (a) { | |
| case "rotate": | |
| case "rotation": | |
| c = b.attr.rotation; | |
| return { | |
| x: c.x || 0, | |
| y: c.y || 0, | |
| degrees: c.degrees || 0 | |
| }; | |
| case "scale": | |
| case "scaling": | |
| c = b.attr.scaling; | |
| return { | |
| x: c.x || 1, | |
| y: c.y || 1, | |
| cx: c.cx || 0, | |
| cy: c.cy || 0 | |
| }; | |
| case "translate": | |
| case "translation": | |
| c = b.attr.translation; | |
| return { | |
| x: c.x || 0, | |
| y: c.y || 0 | |
| }; | |
| default: | |
| return b.attr[a] | |
| } | |
| }, | |
| getAttr: function(a, b) { | |
| return [[this.target, b !== undefined ? b : this.getFromPrim(this.target, a)]] | |
| }, | |
| setAttr: function(m) { | |
| var g = m.length, k = [], b, e, p, r, q, o, n, d, c, l, h, a; | |
| for (d = 0; d < g; d++) { | |
| b = m[d].attrs; | |
| for (e in b) { | |
| p = b[e]; | |
| a = p.length; | |
| for (c = 0; c < a; c++) { | |
| q = p[c][0]; | |
| r = p[c][1]; | |
| if (e === "translate" || e === "translation") { | |
| n = { | |
| x: r.x, | |
| y: r.y | |
| } | |
| } else { | |
| if (e === "rotate" || e === "rotation") { | |
| l = r.x; | |
| if (isNaN(l)) { | |
| l = null | |
| } | |
| h = r.y; | |
| if (isNaN(h)) { | |
| h = null | |
| } | |
| n = { | |
| degrees: r.degrees, | |
| x: l, | |
| y: h | |
| } | |
| } else { | |
| if (e === "scale" || e === "scaling") { | |
| l = r.x; | |
| if (isNaN(l)) { | |
| l = null | |
| } | |
| h = r.y; | |
| if (isNaN(h)) { | |
| h = null | |
| } | |
| n = { | |
| x: l, | |
| y: h, | |
| cx: r.cx, | |
| cy: r.cy | |
| } | |
| } else { | |
| if (e === "width" || e === "height" || e === "x" || e === "y") { | |
| n = parseFloat(r) | |
| } else { | |
| n = r | |
| } | |
| } | |
| } | |
| } | |
| o = Ext.Array.indexOf(k, q); | |
| if (o === -1) { | |
| k.push([q, {}]); | |
| o = k.length - 1 | |
| } | |
| k[o][1][e] = n | |
| } | |
| } | |
| } | |
| g = k.length; | |
| for (d = 0; d < g; d++) { | |
| k[d][0].setAttributes(k[d][1]) | |
| } | |
| this.target.redraw() | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.target, "Sprite"], 0)); | |
| (Ext.cmd.derive("Ext.fx.target.CompositeSprite", Ext.fx.target.Sprite, { | |
| getAttr: function(a, h) { | |
| var b = [], g = [].concat(this.target.items), e = g.length, d, c; | |
| for (d = 0; d < e; d++) { | |
| c = g[d]; | |
| b.push([c, h !== undefined ? h : this.getFromPrim(c, a)]) | |
| } | |
| return b | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.target, "CompositeSprite"], 0)); | |
| (Ext.cmd.derive("Ext.fx.target.Component", Ext.fx.target.Target, { | |
| type: "component", | |
| getPropMethod: { | |
| top: function() { | |
| return this.getPosition(true)[1] | |
| }, | |
| left: function() { | |
| return this.getPosition(true)[0] | |
| }, | |
| x: function() { | |
| return this.getPosition()[0] | |
| }, | |
| y: function() { | |
| return this.getPosition()[1] | |
| }, | |
| height: function() { | |
| return this.getHeight() | |
| }, | |
| width: function() { | |
| return this.getWidth() | |
| }, | |
| opacity: function() { | |
| return this.el.getStyle("opacity") | |
| } | |
| }, | |
| setMethods: { | |
| top: "setPosition", | |
| left: "setPosition", | |
| x: "setPagePosition", | |
| y: "setPagePosition", | |
| height: "setSize", | |
| width: "setSize", | |
| opacity: "setOpacity" | |
| }, | |
| getAttr: function(a, b) { | |
| return [[this.target, b !== undefined ? b : this.getPropMethod[a].call(this.target)]] | |
| }, | |
| setAttr: function(s, g, b) { | |
| var q = this, p = s.length, v, n, c, k, e, m, d, r, u, l, a = {}, t; | |
| for (k = 0; k < p; k++) { | |
| v = s[k].attrs; | |
| for (n in v) { | |
| m = v[n].length; | |
| for (e = 0; e < m; e++) { | |
| c = v[n][e]; | |
| t = a[q.setMethods[n]] || (a[q.setMethods[n]] = {}); | |
| t.target = c[0]; | |
| t[n] = c[1] | |
| } | |
| } | |
| if (a.setPosition) { | |
| c = a.setPosition; | |
| d = (c.left === undefined) ? undefined : parseFloat(c.left); | |
| r = (c.top === undefined) ? undefined : parseFloat(c.top); | |
| c.target.setPosition(d, r) | |
| } | |
| if (a.setPagePosition) { | |
| c = a.setPagePosition; | |
| c.target.setPagePosition(c.x, c.y) | |
| } | |
| if (a.setSize) { | |
| c = a.setSize; | |
| u = (c.width === undefined) ? c.target.getWidth() : parseFloat(c.width); | |
| l = (c.height === undefined) ? c.target.getHeight() : parseFloat(c.height); | |
| c.target.el.setSize(u, l); | |
| if (b || q.dynamic) { | |
| Ext.GlobalEvents.on({ | |
| idle: Ext.Function.bind(c.target.setSize, c.target, [u, l]), | |
| single: true | |
| }) | |
| } | |
| } | |
| if (a.setOpacity) { | |
| c = a.setOpacity; | |
| c.target.el.setStyle("opacity", c.opacity) | |
| } | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.target, "Component"], 0)); | |
| (Ext.cmd.derive("Ext.fx.Queue", Ext.Base, { | |
| constructor: function() { | |
| this.targets = new Ext.util.HashMap(); | |
| this.fxQueue = {} | |
| }, | |
| getFxDefaults: function(a) { | |
| var b = this.targets.get(a); | |
| if (b) { | |
| return b.fxDefaults | |
| } | |
| return {} | |
| }, | |
| setFxDefaults: function(a, c) { | |
| var b = this.targets.get(a); | |
| if (b) { | |
| b.fxDefaults = Ext.apply(b.fxDefaults || {}, c) | |
| } | |
| }, | |
| stopAnimation: function(b) { | |
| var e = this, a = e.getFxQueue(b), d = a.length, c; | |
| while (d) { | |
| c = a[d - 1]; | |
| if (c) { | |
| c.end() | |
| } | |
| d-- | |
| } | |
| }, | |
| getActiveAnimation: function(b) { | |
| var a = this.getFxQueue(b); | |
| return (a && !!a.length) ? a[0] : false | |
| }, | |
| hasFxBlock: function(b) { | |
| var a = this.getFxQueue(b); | |
| return a && a[0] && a[0].block | |
| }, | |
| getFxQueue: function(b) { | |
| if (!b) { | |
| return false | |
| } | |
| var c = this | |
| , a = c.fxQueue[b] | |
| , d = c.targets.get(b); | |
| if (!d) { | |
| return false | |
| } | |
| if (!a) { | |
| c.fxQueue[b] = []; | |
| if (d.type !== "element") { | |
| d.target.on("destroy", function() { | |
| c.fxQueue[b] = [] | |
| }) | |
| } | |
| } | |
| return c.fxQueue[b] | |
| }, | |
| queueFx: function(d) { | |
| var c = this, e = d.target, a, b; | |
| if (!e) { | |
| return | |
| } | |
| a = c.getFxQueue(e.getId()); | |
| b = a.length; | |
| if (b) { | |
| if (d.concurrent) { | |
| d.paused = false | |
| } else { | |
| a[b - 1].on("afteranimate", function() { | |
| d.paused = false | |
| }) | |
| } | |
| } else { | |
| d.paused = false | |
| } | |
| d.on("afteranimate", function() { | |
| Ext.Array.remove(a, d); | |
| if (a.length === 0) { | |
| c.targets.remove(d.target) | |
| } | |
| if (d.remove) { | |
| if (e.type === "element") { | |
| var g = Ext.get(e.id); | |
| if (g) { | |
| g.destroy() | |
| } | |
| } | |
| } | |
| }, c, { | |
| single: true | |
| }); | |
| a.push(d) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.fx, "Queue"], 0)); | |
| (Ext.cmd.derive("Ext.fx.Manager", Ext.Base, { | |
| singleton: true, | |
| constructor: function() { | |
| var a = this; | |
| a.items = new Ext.util.MixedCollection(); | |
| a.targetArr = {}; | |
| a.mixins.queue.constructor.call(a); | |
| a.taskRunner = new Ext.util.TaskRunner() | |
| }, | |
| interval: 16, | |
| forceJS: true, | |
| createTarget: function(d) { | |
| var b = this, c = !b.forceJS && Ext.supports.Transitions, a; | |
| b.useCSS3 = c; | |
| if (d) { | |
| if (d.tagName || Ext.isString(d) || d.isFly) { | |
| d = Ext.get(d); | |
| a = new Ext.fx.target["Element" + (c ? "CSS" : "")](d) | |
| } else { | |
| if (d.dom) { | |
| a = new Ext.fx.target["Element" + (c ? "CSS" : "")](d) | |
| } else { | |
| if (d.isComposite) { | |
| a = new Ext.fx.target["CompositeElement" + (c ? "CSS" : "")](d) | |
| } else { | |
| if (d.isSprite) { | |
| a = new Ext.fx.target.Sprite(d) | |
| } else { | |
| if (d.isCompositeSprite) { | |
| a = new Ext.fx.target.CompositeSprite(d) | |
| } else { | |
| if (d.isComponent) { | |
| a = new Ext.fx.target.Component(d) | |
| } else { | |
| if (d.isAnimTarget) { | |
| return d | |
| } else { | |
| return null | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| b.targets.add(a); | |
| return a | |
| } else { | |
| return null | |
| } | |
| }, | |
| addAnim: function(d) { | |
| var c = this | |
| , b = c.items | |
| , a = c.task; | |
| b.add(d.id, d); | |
| if (!a && b.length) { | |
| a = c.task = { | |
| run: c.runner, | |
| interval: c.interval, | |
| scope: c | |
| }; | |
| c.taskRunner.start(a) | |
| } | |
| }, | |
| removeAnim: function(d) { | |
| var c = this | |
| , b = c.items | |
| , a = c.task; | |
| b.removeAtKey(d.id); | |
| if (a && !b.length) { | |
| c.taskRunner.stop(a); | |
| delete c.task | |
| } | |
| }, | |
| runner: function() { | |
| var d = this, b = d.items.getRange(), c = 0, a = b.length, e; | |
| d.targetArr = {}; | |
| d.timestamp = new Date(); | |
| for (; c < a; c++) { | |
| e = b[c]; | |
| if (e.isReady()) { | |
| d.startAnim(e) | |
| } | |
| } | |
| for (c = 0; c < a; c++) { | |
| e = b[c]; | |
| if (e.isRunning()) { | |
| d.runAnim(e) | |
| } | |
| } | |
| d.applyPendingAttrs(); | |
| d.targetArr = null | |
| }, | |
| startAnim: function(a) { | |
| a.start(this.timestamp) | |
| }, | |
| runAnim: function(e, a) { | |
| if (!e) { | |
| return | |
| } | |
| var d = this, h = d.useCSS3 && e.target.type === "element", b = d.timestamp - e.startTime, c = (b >= e.duration), g, i; | |
| if (a) { | |
| b = e.duration; | |
| c = true | |
| } | |
| g = this.collectTargetData(e, b, h, c); | |
| if (h) { | |
| e.target.setAttr(g.anims[e.id].attributes, true); | |
| d.collectTargetData(e, e.duration, h, c); | |
| e.paused = true; | |
| g = e.target.target; | |
| if (e.target.isComposite) { | |
| g = e.target.target.last() | |
| } | |
| i = {}; | |
| i[Ext.supports.CSS3TransitionEnd] = e.lastFrame; | |
| i.scope = e; | |
| i.single = true; | |
| g.on(i) | |
| } | |
| return g | |
| }, | |
| jumpToEnd: function(c) { | |
| var b = this, d, a; | |
| if (!b.targetArr) { | |
| b.targetArr = {}; | |
| a = true | |
| } | |
| d = b.runAnim(c, true); | |
| b.applyAnimAttrs(d, d.anims[c.id]); | |
| if (a) { | |
| b.targetArr = null | |
| } | |
| }, | |
| collectTargetData: function(c, a, e, g) { | |
| var b = c.target.getId() | |
| , d = this.targetArr[b]; | |
| if (!d) { | |
| d = this.targetArr[b] = { | |
| id: b, | |
| el: c.target, | |
| anims: {} | |
| } | |
| } | |
| d.anims[c.id] = { | |
| id: c.id, | |
| anim: c, | |
| elapsed: a, | |
| isLastFrame: g, | |
| attributes: [{ | |
| duration: c.duration, | |
| easing: (e && c.reverse) ? c.easingFn.reverse().toCSS3() : c.easing, | |
| attrs: c.runAnim(a) | |
| }] | |
| }; | |
| return d | |
| }, | |
| applyAnimAttrs: function(c, a) { | |
| var b = a.anim; | |
| if (a.attributes && b.isRunning()) { | |
| c.el.setAttr(a.attributes, false, a.isLastFrame); | |
| if (a.isLastFrame) { | |
| b.lastFrame() | |
| } | |
| } | |
| }, | |
| applyPendingAttrs: function() { | |
| var e = this.targetArr, g, c, b, d, a; | |
| for (c in e) { | |
| if (e.hasOwnProperty(c)) { | |
| g = e[c]; | |
| for (a in g.anims) { | |
| if (g.anims.hasOwnProperty(a)) { | |
| b = g.anims[a]; | |
| d = b.anim; | |
| if (b.attributes && d.isRunning()) { | |
| g.el.setAttr(b.attributes, false, b.isLastFrame); | |
| if (b.isLastFrame) { | |
| d.lastFrame() | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, [["queue", Ext.fx.Queue]], [Ext.fx, "Manager"], 0)); | |
| (Ext.cmd.derive("Ext.fx.Animator", Ext.Base, { | |
| isAnimator: true, | |
| duration: 250, | |
| delay: 0, | |
| delayStart: 0, | |
| dynamic: false, | |
| easing: "ease", | |
| running: false, | |
| paused: false, | |
| damper: 1, | |
| iterations: 1, | |
| currentIteration: 0, | |
| keyframeStep: 0, | |
| animKeyFramesRE: /^(from|to|\d+%?)$/, | |
| constructor: function(a) { | |
| var b = this; | |
| a = Ext.apply(b, a || {}); | |
| b.config = a; | |
| b.id = Ext.id(null , "ext-animator-"); | |
| b.mixins.observable.constructor.call(b, a); | |
| b.timeline = []; | |
| b.createTimeline(b.keyframes); | |
| if (b.target) { | |
| b.applyAnimator(b.target); | |
| Ext.fx.Manager.addAnim(b) | |
| } | |
| }, | |
| sorter: function(d, c) { | |
| return d.pct - c.pct | |
| }, | |
| createTimeline: function(d) { | |
| var h = this, l = [], j = h.to || {}, b = h.duration, m, a, c, g, k, e; | |
| for (k in d) { | |
| if (d.hasOwnProperty(k) && h.animKeyFramesRE.test(k)) { | |
| e = { | |
| attrs: Ext.apply(d[k], j) | |
| }; | |
| if (k === "from") { | |
| k = 0 | |
| } else { | |
| if (k === "to") { | |
| k = 100 | |
| } | |
| } | |
| e.pct = parseInt(k, 10); | |
| l.push(e) | |
| } | |
| } | |
| Ext.Array.sort(l, h.sorter); | |
| g = l.length; | |
| for (c = 0; c < g; c++) { | |
| m = (l[c - 1]) ? b * (l[c - 1].pct / 100) : 0; | |
| a = b * (l[c].pct / 100); | |
| h.timeline.push({ | |
| duration: a - m, | |
| attrs: l[c].attrs | |
| }) | |
| } | |
| }, | |
| applyAnimator: function(d) { | |
| var h = this, j = [], l = h.timeline, g = l.length, b, e, a, k, c; | |
| if (h.fireEvent("beforeanimate", h) !== false) { | |
| for (c = 0; c < g; c++) { | |
| b = l[c]; | |
| k = b.attrs; | |
| e = k.easing || h.easing; | |
| a = k.damper || h.damper; | |
| delete k.easing; | |
| delete k.damper; | |
| b = new Ext.fx.Anim({ | |
| target: d, | |
| easing: e, | |
| damper: a, | |
| duration: b.duration, | |
| paused: true, | |
| to: k | |
| }); | |
| j.push(b) | |
| } | |
| h.animations = j; | |
| h.target = b.target; | |
| for (c = 0; c < g - 1; c++) { | |
| b = j[c]; | |
| b.nextAnim = j[c + 1]; | |
| b.on("afteranimate", function() { | |
| this.nextAnim.paused = false | |
| }); | |
| b.on("afteranimate", function() { | |
| this.fireEvent("keyframe", this, ++this.keyframeStep) | |
| }, h) | |
| } | |
| j[g - 1].on("afteranimate", function() { | |
| this.lastFrame() | |
| }, h) | |
| } | |
| }, | |
| start: function(d) { | |
| var e = this, c = e.delay, b = e.delayStart, a; | |
| if (c) { | |
| if (!b) { | |
| e.delayStart = d; | |
| return | |
| } else { | |
| a = d - b; | |
| if (a < c) { | |
| return | |
| } else { | |
| d = new Date(b.getTime() + c) | |
| } | |
| } | |
| } | |
| if (e.fireEvent("beforeanimate", e) !== false) { | |
| e.startTime = d; | |
| e.running = true; | |
| e.animations[e.keyframeStep].paused = false | |
| } | |
| }, | |
| lastFrame: function() { | |
| var c = this | |
| , a = c.iterations | |
| , b = c.currentIteration; | |
| b++; | |
| if (b < a) { | |
| c.startTime = new Date(); | |
| c.currentIteration = b; | |
| c.keyframeStep = 0; | |
| c.applyAnimator(c.target); | |
| c.animations[c.keyframeStep].paused = false | |
| } else { | |
| c.currentIteration = 0; | |
| c.end() | |
| } | |
| }, | |
| end: function() { | |
| var a = this; | |
| a.fireEvent("afteranimate", a, a.startTime, new Date() - a.startTime) | |
| }, | |
| isReady: function() { | |
| return this.paused === false && this.running === false && this.iterations > 0 | |
| }, | |
| isRunning: function() { | |
| return false | |
| } | |
| }, 1, 0, 0, 0, 0, [["observable", Ext.util.Observable]], [Ext.fx, "Animator"], 0)); | |
| (Ext.cmd.derive("Ext.fx.CubicBezier", Ext.Base, { | |
| singleton: true, | |
| cubicBezierAtTime: function(o, d, b, n, m, i) { | |
| var j = 3 * d | |
| , l = 3 * (n - d) - j | |
| , a = 1 - j - l | |
| , h = 3 * b | |
| , k = 3 * (m - b) - h | |
| , p = 1 - h - k; | |
| function g(q) { | |
| return ((a * q + l) * q + j) * q | |
| } | |
| function c(q, s) { | |
| var r = e(q, s); | |
| return ((p * r + k) * r + h) * r | |
| } | |
| function e(q, y) { | |
| var w, v, t, r, u, s; | |
| for (t = q, | |
| s = 0; s < 8; s++) { | |
| r = g(t) - q; | |
| if (Math.abs(r) < y) { | |
| return t | |
| } | |
| u = (3 * a * t + 2 * l) * t + j; | |
| if (Math.abs(u) < 0.000001) { | |
| break | |
| } | |
| t = t - r / u | |
| } | |
| w = 0; | |
| v = 1; | |
| t = q; | |
| if (t < w) { | |
| return w | |
| } | |
| if (t > v) { | |
| return v | |
| } | |
| while (w < v) { | |
| r = g(t); | |
| if (Math.abs(r - q) < y) { | |
| return t | |
| } | |
| if (q > r) { | |
| w = t | |
| } else { | |
| v = t | |
| } | |
| t = (v - w) / 2 + w | |
| } | |
| return t | |
| } | |
| return c(o, 1 / (200 * i)) | |
| }, | |
| cubicBezier: function(b, e, a, c) { | |
| var d = function(g) { | |
| return Ext.fx.CubicBezier.cubicBezierAtTime(g, b, e, a, c, 1) | |
| } | |
| ; | |
| d.toCSS3 = function() { | |
| return "cubic-bezier(" + [b, e, a, c].join(",") + ")" | |
| } | |
| ; | |
| d.reverse = function() { | |
| return Ext.fx.CubicBezier.cubicBezier(1 - a, 1 - c, 1 - b, 1 - e) | |
| } | |
| ; | |
| return d | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx, "CubicBezier"], 0)); | |
| (Ext.cmd.derive("Ext.fx.Easing", Ext.Base, function() { | |
| var e = Math | |
| , h = e.PI | |
| , d = e.pow | |
| , b = e.sin | |
| , g = e.sqrt | |
| , a = e.abs | |
| , c = 1.70158; | |
| return { | |
| singleton: true, | |
| linear: Ext.identityFn, | |
| ease: function(r) { | |
| var l = 0.07813 - r / 2 | |
| , k = g(0.0066 + l * l) | |
| , i = k - l | |
| , p = d(a(i), 1 / 3) * (i < 0 ? -1 : 1) | |
| , o = -k - l | |
| , m = d(a(o), 1 / 3) * (o < 0 ? -1 : 1) | |
| , j = p + m + 0.25; | |
| return d(1 - j, 2) * 3 * j * 0.1 + (1 - j) * 3 * j * j + j * j * j | |
| }, | |
| easeIn: function(i) { | |
| return d(i, 1.7) | |
| }, | |
| easeOut: function(i) { | |
| return d(i, 0.48) | |
| }, | |
| easeInOut: function(r) { | |
| var l = 0.48 - r / 1.04 | |
| , k = g(0.1734 + l * l) | |
| , i = k - l | |
| , p = d(a(i), 1 / 3) * (i < 0 ? -1 : 1) | |
| , o = -k - l | |
| , m = d(a(o), 1 / 3) * (o < 0 ? -1 : 1) | |
| , j = p + m + 0.5; | |
| return (1 - j) * 3 * j * j + j * j * j | |
| }, | |
| backIn: function(i) { | |
| return i * i * ((c + 1) * i - c) | |
| }, | |
| backOut: function(i) { | |
| i = i - 1; | |
| return i * i * ((c + 1) * i + c) + 1 | |
| }, | |
| elasticIn: function(k) { | |
| if (k === 0 || k === 1) { | |
| return k | |
| } | |
| var j = 0.3 | |
| , i = j / 4; | |
| return d(2, -10 * k) * b((k - i) * (2 * h) / j) + 1 | |
| }, | |
| elasticOut: function(i) { | |
| return 1 - Ext.fx.Easing.elasticIn(1 - i) | |
| }, | |
| bounceIn: function(i) { | |
| return 1 - Ext.fx.Easing.bounceOut(1 - i) | |
| }, | |
| bounceOut: function(m) { | |
| var j = 7.5625, k = 2.75, i; | |
| if (m < (1 / k)) { | |
| i = j * m * m | |
| } else { | |
| if (m < (2 / k)) { | |
| m -= (1.5 / k); | |
| i = j * m * m + 0.75 | |
| } else { | |
| if (m < (2.5 / k)) { | |
| m -= (2.25 / k); | |
| i = j * m * m + 0.9375 | |
| } else { | |
| m -= (2.625 / k); | |
| i = j * m * m + 0.984375 | |
| } | |
| } | |
| } | |
| return i | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx, "Easing"], function(b) { | |
| var c = b.self | |
| , a = c.prototype; | |
| c.addMembers({ | |
| "back-in": a.backIn, | |
| "back-out": a.backOut, | |
| "ease-in": a.easeIn, | |
| "ease-out": a.easeOut, | |
| "elastic-in": a.elasticIn, | |
| "elastic-out": a.elasticOut, | |
| "bounce-in": a.bounceIn, | |
| "bounce-out": a.bounceOut, | |
| "ease-in-out": a.easeInOut | |
| }) | |
| })); | |
| (Ext.cmd.derive("Ext.fx.DrawPath", Ext.Base, { | |
| singleton: true, | |
| pathToStringRE: /,?([achlmqrstvxz]),?/gi, | |
| pathCommandRE: /([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig, | |
| pathValuesRE: /(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig, | |
| stopsRE: /^(\d+%?)$/, | |
| radian: Math.PI / 180, | |
| is: function(b, a) { | |
| a = String(a).toLowerCase(); | |
| return (a == "object" && b === Object(b)) || (a == "undefined" && typeof b == a) || (a == "null" && b === null ) || (a == "array" && Array.isArray && Array.isArray(b)) || (Object.prototype.toString.call(b).toLowerCase().slice(8, -1)) == a | |
| }, | |
| path2string: function() { | |
| return this.join(",").replace(Ext.fx.DrawPath.pathToStringRE, "$1") | |
| }, | |
| pathToString: function(a) { | |
| return a.join(",").replace(Ext.fx.DrawPath.pathToStringRE, "$1") | |
| }, | |
| parsePathString: function(a) { | |
| if (!a) { | |
| return null | |
| } | |
| var d = { | |
| a: 7, | |
| c: 6, | |
| h: 1, | |
| l: 2, | |
| m: 2, | |
| q: 4, | |
| s: 4, | |
| t: 2, | |
| v: 1, | |
| z: 0 | |
| } | |
| , c = [] | |
| , b = this; | |
| if (b.is(a, "array") && b.is(a[0], "array")) { | |
| c = b.pathClone(a) | |
| } | |
| if (!c.length) { | |
| String(a).replace(b.pathCommandRE, function(g, e, j) { | |
| var i = [] | |
| , h = e.toLowerCase(); | |
| j.replace(b.pathValuesRE, function(l, k) { | |
| if (k) { | |
| i.push(+k) | |
| } | |
| }); | |
| if (h == "m" && i.length > 2) { | |
| c.push([e].concat(Ext.Array.splice(i, 0, 2))); | |
| h = "l"; | |
| e = (e == "m") ? "l" : "L" | |
| } | |
| while (i.length >= d[h]) { | |
| c.push([e].concat(Ext.Array.splice(i, 0, d[h]))); | |
| if (!d[h]) { | |
| break | |
| } | |
| } | |
| }) | |
| } | |
| c.toString = b.path2string; | |
| return c | |
| }, | |
| pathClone: function(g) { | |
| var c = [], a, e, b, d; | |
| if (!this.is(g, "array") || !this.is(g && g[0], "array")) { | |
| g = this.parsePathString(g) | |
| } | |
| for (b = 0, | |
| d = g.length; b < d; b++) { | |
| c[b] = []; | |
| for (a = 0, | |
| e = g[b].length; a < e; a++) { | |
| c[b][a] = g[b][a] | |
| } | |
| } | |
| c.toString = this.path2string; | |
| return c | |
| }, | |
| pathToAbsolute: function(c) { | |
| if (!this.is(c, "array") || !this.is(c && c[0], "array")) { | |
| c = this.parsePathString(c) | |
| } | |
| var k = [], m = 0, l = 0, o = 0, n = 0, g = 0, h = c.length, b, d, e, a; | |
| if (h && c[0][0] == "M") { | |
| m = +c[0][1]; | |
| l = +c[0][2]; | |
| o = m; | |
| n = l; | |
| g++; | |
| k[0] = ["M", m, l] | |
| } | |
| for (; g < h; g++) { | |
| b = k[g] = []; | |
| d = c[g]; | |
| if (d[0] != d[0].toUpperCase()) { | |
| b[0] = d[0].toUpperCase(); | |
| switch (b[0]) { | |
| case "A": | |
| b[1] = d[1]; | |
| b[2] = d[2]; | |
| b[3] = d[3]; | |
| b[4] = d[4]; | |
| b[5] = d[5]; | |
| b[6] = +(d[6] + m); | |
| b[7] = +(d[7] + l); | |
| break; | |
| case "V": | |
| b[1] = +d[1] + l; | |
| break; | |
| case "H": | |
| b[1] = +d[1] + m; | |
| break; | |
| case "M": | |
| o = +d[1] + m; | |
| n = +d[2] + l; | |
| default: | |
| e = 1; | |
| a = d.length; | |
| for (; e < a; e++) { | |
| b[e] = +d[e] + ((e % 2) ? m : l) | |
| } | |
| } | |
| } else { | |
| e = 0; | |
| a = d.length; | |
| for (; e < a; e++) { | |
| k[g][e] = d[e] | |
| } | |
| } | |
| switch (b[0]) { | |
| case "Z": | |
| m = o; | |
| l = n; | |
| break; | |
| case "H": | |
| m = b[1]; | |
| break; | |
| case "V": | |
| l = b[1]; | |
| break; | |
| case "M": | |
| d = k[g]; | |
| a = d.length; | |
| o = d[a - 2]; | |
| n = d[a - 1]; | |
| default: | |
| d = k[g]; | |
| a = d.length; | |
| m = d[a - 2]; | |
| l = d[a - 1] | |
| } | |
| } | |
| k.toString = this.path2string; | |
| return k | |
| }, | |
| interpolatePaths: function(r, l) { | |
| var j = this, d = j.pathToAbsolute(r), m = j.pathToAbsolute(l), n = { | |
| x: 0, | |
| y: 0, | |
| bx: 0, | |
| by: 0, | |
| X: 0, | |
| Y: 0, | |
| qx: null , | |
| qy: null | |
| }, a = { | |
| x: 0, | |
| y: 0, | |
| bx: 0, | |
| by: 0, | |
| X: 0, | |
| Y: 0, | |
| qx: null , | |
| qy: null | |
| }, b = function(p, s) { | |
| if (p[s].length > 7) { | |
| p[s].shift(); | |
| var t = p[s]; | |
| while (t.length) { | |
| Ext.Array.splice(p, s++, 0, ["C"].concat(Ext.Array.splice(t, 0, 6))) | |
| } | |
| Ext.Array.erase(p, s, 1); | |
| o = Math.max(d.length, m.length || 0) | |
| } | |
| } | |
| , c = function(v, u, s, p, t) { | |
| if (v && u && v[t][0] == "M" && u[t][0] != "M") { | |
| Ext.Array.splice(u, t, 0, ["M", p.x, p.y]); | |
| s.bx = 0; | |
| s.by = 0; | |
| s.x = v[t][1]; | |
| s.y = v[t][2]; | |
| o = Math.max(d.length, m.length || 0) | |
| } | |
| } | |
| , h, o, g, q, e, k; | |
| for (h = 0, | |
| o = Math.max(d.length, m.length || 0); h < o; h++) { | |
| d[h] = j.command2curve(d[h], n); | |
| b(d, h); | |
| (m[h] = j.command2curve(m[h], a)); | |
| b(m, h); | |
| c(d, m, n, a, h); | |
| c(m, d, a, n, h); | |
| g = d[h]; | |
| q = m[h]; | |
| e = g.length; | |
| k = q.length; | |
| n.x = g[e - 2]; | |
| n.y = g[e - 1]; | |
| n.bx = parseFloat(g[e - 4]) || n.x; | |
| n.by = parseFloat(g[e - 3]) || n.y; | |
| a.bx = (parseFloat(q[k - 4]) || a.x); | |
| a.by = (parseFloat(q[k - 3]) || a.y); | |
| a.x = q[k - 2]; | |
| a.y = q[k - 1] | |
| } | |
| return [d, m] | |
| }, | |
| command2curve: function(c, b) { | |
| var a = this; | |
| if (!c) { | |
| return ["C", b.x, b.y, b.x, b.y, b.x, b.y] | |
| } | |
| if (c[0] != "T" && c[0] != "Q") { | |
| b.qx = b.qy = null | |
| } | |
| switch (c[0]) { | |
| case "M": | |
| b.X = c[1]; | |
| b.Y = c[2]; | |
| break; | |
| case "A": | |
| c = ["C"].concat(a.arc2curve.apply(a, [b.x, b.y].concat(c.slice(1)))); | |
| break; | |
| case "S": | |
| c = ["C", b.x + (b.x - (b.bx || b.x)), b.y + (b.y - (b.by || b.y))].concat(c.slice(1)); | |
| break; | |
| case "T": | |
| b.qx = b.x + (b.x - (b.qx || b.x)); | |
| b.qy = b.y + (b.y - (b.qy || b.y)); | |
| c = ["C"].concat(a.quadratic2curve(b.x, b.y, b.qx, b.qy, c[1], c[2])); | |
| break; | |
| case "Q": | |
| b.qx = c[1]; | |
| b.qy = c[2]; | |
| c = ["C"].concat(a.quadratic2curve(b.x, b.y, c[1], c[2], c[3], c[4])); | |
| break; | |
| case "L": | |
| c = ["C"].concat(b.x, b.y, c[1], c[2], c[1], c[2]); | |
| break; | |
| case "H": | |
| c = ["C"].concat(b.x, b.y, c[1], b.y, c[1], b.y); | |
| break; | |
| case "V": | |
| c = ["C"].concat(b.x, b.y, b.x, c[1], b.x, c[1]); | |
| break; | |
| case "Z": | |
| c = ["C"].concat(b.x, b.y, b.X, b.Y, b.X, b.Y); | |
| break | |
| } | |
| return c | |
| }, | |
| quadratic2curve: function(b, d, h, e, a, c) { | |
| var g = 1 / 3 | |
| , i = 2 / 3; | |
| return [g * b + i * h, g * d + i * e, g * a + i * h, g * c + i * e, a, c] | |
| }, | |
| rotate: function(b, h, a) { | |
| var d = Math.cos(a) | |
| , c = Math.sin(a) | |
| , g = b * d - h * c | |
| , e = b * c + h * d; | |
| return { | |
| x: g, | |
| y: e | |
| } | |
| }, | |
| arc2curve: function(s, af, H, F, z, n, g, r, ae, A) { | |
| var v = this, d = Math.PI, w = v.radian, E = d * 120 / 180, b = w * (+z || 0), M = [], J = Math, T = J.cos, a = J.sin, V = J.sqrt, u = J.abs, o = J.asin, I, O, N, aa, c, R, U, C, B, m, l, q, j, ad, e, ac, P, S, Q, ab, Z, Y, W, L, X, K, D, G, p; | |
| if (!A) { | |
| I = v.rotate(s, af, -b); | |
| s = I.x; | |
| af = I.y; | |
| I = v.rotate(r, ae, -b); | |
| r = I.x; | |
| ae = I.y; | |
| O = (s - r) / 2; | |
| N = (af - ae) / 2; | |
| aa = (O * O) / (H * H) + (N * N) / (F * F); | |
| if (aa > 1) { | |
| aa = V(aa); | |
| H = aa * H; | |
| F = aa * F | |
| } | |
| c = H * H; | |
| R = F * F; | |
| U = (n == g ? -1 : 1) * V(u((c * R - c * N * N - R * O * O) / (c * N * N + R * O * O))); | |
| C = U * H * N / F + (s + r) / 2; | |
| B = U * -F * O / H + (af + ae) / 2; | |
| m = o(((af - B) / F).toFixed(7)); | |
| l = o(((ae - B) / F).toFixed(7)); | |
| m = s < C ? d - m : m; | |
| l = r < C ? d - l : l; | |
| if (m < 0) { | |
| m = d * 2 + m | |
| } | |
| if (l < 0) { | |
| l = d * 2 + l | |
| } | |
| if (g && m > l) { | |
| m = m - d * 2 | |
| } | |
| if (!g && l > m) { | |
| l = l - d * 2 | |
| } | |
| } else { | |
| m = A[0]; | |
| l = A[1]; | |
| C = A[2]; | |
| B = A[3] | |
| } | |
| q = l - m; | |
| if (u(q) > E) { | |
| D = l; | |
| G = r; | |
| p = ae; | |
| l = m + E * (g && l > m ? 1 : -1); | |
| r = C + H * T(l); | |
| ae = B + F * a(l); | |
| M = v.arc2curve(r, ae, H, F, z, 0, g, G, p, [l, D, C, B]) | |
| } | |
| q = l - m; | |
| j = T(m); | |
| ad = a(m); | |
| e = T(l); | |
| ac = a(l); | |
| P = J.tan(q / 4); | |
| S = 4 / 3 * H * P; | |
| Q = 4 / 3 * F * P; | |
| ab = [s, af]; | |
| Z = [s + S * ad, af - Q * j]; | |
| Y = [r + S * ac, ae - Q * e]; | |
| W = [r, ae]; | |
| Z[0] = 2 * ab[0] - Z[0]; | |
| Z[1] = 2 * ab[1] - Z[1]; | |
| if (A) { | |
| return [Z, Y, W].concat(M) | |
| } else { | |
| M = [Z, Y, W].concat(M).join().split(","); | |
| L = []; | |
| K = M.length; | |
| for (X = 0; X < K; X++) { | |
| L[X] = X % 2 ? v.rotate(M[X - 1], M[X], b).y : v.rotate(M[X], M[X + 1], b).x | |
| } | |
| return L | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx, "DrawPath"], 0)); | |
| (Ext.cmd.derive("Ext.fx.PropertyHandler", Ext.Base, { | |
| statics: { | |
| defaultHandler: { | |
| pixelDefaultsRE: /width|height|top$|bottom$|left$|right$/i, | |
| unitRE: /^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/, | |
| scrollRE: /^scroll/i, | |
| computeDelta: function(j, c, a, g, i) { | |
| a = (typeof a == "number") ? a : 1; | |
| var h = this.unitRE, d = h.exec(j), b, e; | |
| if (d) { | |
| j = d[1]; | |
| e = d[2]; | |
| if (!this.scrollRE.test(i) && !e && this.pixelDefaultsRE.test(i)) { | |
| e = "px" | |
| } | |
| } | |
| j = +j || 0; | |
| d = h.exec(c); | |
| if (d) { | |
| c = d[1]; | |
| e = d[2] || e | |
| } | |
| c = +c || 0; | |
| b = (g != null ) ? g : j; | |
| return { | |
| from: j, | |
| delta: (c - b) * a, | |
| units: e | |
| } | |
| }, | |
| get: function(o, b, a, n, k) { | |
| var m = o.length, d = [], e, h, l, c, g; | |
| for (e = 0; e < m; e++) { | |
| if (n) { | |
| h = n[e][1].from | |
| } | |
| if (Ext.isArray(o[e][1]) && Ext.isArray(b)) { | |
| l = []; | |
| c = 0; | |
| g = o[e][1].length; | |
| for (; c < g; c++) { | |
| l.push(this.computeDelta(o[e][1][c], b[c], a, h, k)) | |
| } | |
| d.push([o[e][0], l]) | |
| } else { | |
| d.push([o[e][0], this.computeDelta(o[e][1], b, a, h, k)]) | |
| } | |
| } | |
| return d | |
| }, | |
| set: function(l, g) { | |
| var h = l.length, c = [], d, a, k, e, b; | |
| for (d = 0; d < h; d++) { | |
| a = l[d][1]; | |
| if (Ext.isArray(a)) { | |
| k = []; | |
| b = 0; | |
| e = a.length; | |
| for (; b < e; b++) { | |
| k.push(a[b].from + a[b].delta * g + (a[b].units || 0)) | |
| } | |
| c.push([l[d][0], k]) | |
| } else { | |
| c.push([l[d][0], a.from + a.delta * g + (a.units || 0)]) | |
| } | |
| } | |
| return c | |
| } | |
| }, | |
| stringHandler: { | |
| computeDelta: function(e, b, d, c, a) { | |
| return { | |
| from: e, | |
| delta: b | |
| } | |
| }, | |
| get: function(k, b, a, j, g) { | |
| var h = k.length, c = [], d, e; | |
| for (d = 0; d < h; d++) { | |
| c.push([k[d][0], this.computeDelta(k[d][1], b, a, e, g)]) | |
| } | |
| return c | |
| }, | |
| set: function(a, g) { | |
| var d = a.length, b = [], c, e; | |
| for (c = 0; c < d; c++) { | |
| e = a[c][1]; | |
| b.push([a[c][0], e.delta]) | |
| } | |
| return b | |
| } | |
| }, | |
| color: { | |
| rgbRE: /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i, | |
| hexRE: /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i, | |
| hex3RE: /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i, | |
| parseColor: function(e, a) { | |
| a = (typeof a == "number") ? a : 1; | |
| var g = false, c = [this.hexRE, this.rgbRE, this.hex3RE], d = c.length, j, b, k, h; | |
| for (h = 0; h < d; h++) { | |
| k = c[h]; | |
| b = (h % 2 === 0) ? 16 : 10; | |
| j = k.exec(e); | |
| if (j && j.length === 4) { | |
| if (h === 2) { | |
| j[1] += j[1]; | |
| j[2] += j[2]; | |
| j[3] += j[3] | |
| } | |
| g = { | |
| red: parseInt(j[1], b), | |
| green: parseInt(j[2], b), | |
| blue: parseInt(j[3], b) | |
| }; | |
| break | |
| } | |
| } | |
| return g || e | |
| }, | |
| computeDelta: function(h, a, e, c) { | |
| h = this.parseColor(h); | |
| a = this.parseColor(a, e); | |
| var g = c ? c : h | |
| , b = typeof g | |
| , d = typeof a; | |
| if (b === "string" || b === "undefined" || d === "string" || d === "undefined") { | |
| return a || g | |
| } | |
| return { | |
| from: h, | |
| delta: { | |
| red: Math.round((a.red - g.red) * e), | |
| green: Math.round((a.green - g.green) * e), | |
| blue: Math.round((a.blue - g.blue) * e) | |
| } | |
| } | |
| }, | |
| get: function(j, a, g, d) { | |
| var h = j.length, c = [], e, b; | |
| for (e = 0; e < h; e++) { | |
| if (d) { | |
| b = d[e][1].from | |
| } | |
| c.push([j[e][0], this.computeDelta(j[e][1], a, g, b)]) | |
| } | |
| return c | |
| }, | |
| set: function(k, e) { | |
| var g = k.length, c = [], d, b, a, h, j; | |
| for (d = 0; d < g; d++) { | |
| b = k[d][1]; | |
| if (b) { | |
| h = b.from; | |
| j = b.delta; | |
| b = (typeof b === "object" && "red"in b) ? "rgb(" + b.red + ", " + b.green + ", " + b.blue + ")" : b; | |
| b = (typeof b === "object" && b.length) ? b[0] : b; | |
| if (typeof b === "undefined") { | |
| return [] | |
| } | |
| a = typeof b === "string" ? b : "rgb(" + [(h.red + Math.round(j.red * e)) % 256, (h.green + Math.round(j.green * e)) % 256, (h.blue + Math.round(j.blue * e)) % 256].join(",") + ")"; | |
| c.push([k[d][0], a]) | |
| } | |
| } | |
| return c | |
| } | |
| }, | |
| object: { | |
| interpolate: function(d, b) { | |
| b = (typeof b === "number") ? b : 1; | |
| var a = {}, c; | |
| for (c in d) { | |
| a[c] = parseFloat(d[c]) * b | |
| } | |
| return a | |
| }, | |
| computeDelta: function(h, a, c, b) { | |
| h = this.interpolate(h); | |
| a = this.interpolate(a, c); | |
| var g = b ? b : h, e = {}, d; | |
| for (d in a) { | |
| e[d] = a[d] - g[d] | |
| } | |
| return { | |
| from: h, | |
| delta: e | |
| } | |
| }, | |
| get: function(j, a, g, d) { | |
| var h = j.length, c = [], e, b; | |
| for (e = 0; e < h; e++) { | |
| if (d) { | |
| b = d[e][1].from | |
| } | |
| c.push([j[e][0], this.computeDelta(j[e][1], a, g, b)]) | |
| } | |
| return c | |
| }, | |
| set: function(l, g) { | |
| var h = l.length, c = [], e = {}, d, j, k, b, a; | |
| for (d = 0; d < h; d++) { | |
| b = l[d][1]; | |
| j = b.from; | |
| k = b.delta; | |
| for (a in j) { | |
| e[a] = j[a] + k[a] * g | |
| } | |
| c.push([l[d][0], e]) | |
| } | |
| return c | |
| } | |
| }, | |
| path: { | |
| computeDelta: function(e, a, c, b) { | |
| c = (typeof c === "number") ? c : 1; | |
| var d; | |
| e = +e || 0; | |
| a = +a || 0; | |
| d = (b != null ) ? b : e; | |
| return { | |
| from: e, | |
| delta: (a - d) * c | |
| } | |
| }, | |
| forcePath: function(a) { | |
| if (!Ext.isArray(a) && !Ext.isArray(a[0])) { | |
| a = Ext.fx.DrawPath.parsePathString(a) | |
| } | |
| return a | |
| }, | |
| get: function(b, l, a, q) { | |
| var c = this.forcePath(l), n = [], s = b.length, d, h, o, g, p, m, e, t, r; | |
| for (o = 0; o < s; o++) { | |
| r = this.forcePath(b[o][1]); | |
| g = Ext.fx.DrawPath.interpolatePaths(r, c); | |
| r = g[0]; | |
| c = g[1]; | |
| d = r.length; | |
| t = []; | |
| for (m = 0; m < d; m++) { | |
| g = [r[m][0]]; | |
| h = r[m].length; | |
| for (e = 1; e < h; e++) { | |
| p = q && q[0][1][m][e].from; | |
| g.push(this.computeDelta(r[m][e], c[m][e], a, p)) | |
| } | |
| t.push(g) | |
| } | |
| n.push([b[o][0], t]) | |
| } | |
| return n | |
| }, | |
| set: function(p, n) { | |
| var o = p.length, e = [], h, g, d, l, m, c, a, b; | |
| for (h = 0; h < o; h++) { | |
| c = p[h][1]; | |
| l = []; | |
| a = c.length; | |
| for (g = 0; g < a; g++) { | |
| m = [c[g][0]]; | |
| b = c[g].length; | |
| for (d = 1; d < b; d++) { | |
| m.push(c[g][d].from + c[g][d].delta * n) | |
| } | |
| l.push(m.join(",")) | |
| } | |
| e.push([p[h][0], l.join(",")]) | |
| } | |
| return e | |
| } | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx, "PropertyHandler"], function() { | |
| var b = ["outlineColor", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "fill", "stroke"], c = b.length, a = 0, d; | |
| for (; a < c; a++) { | |
| d = b[a]; | |
| this[d] = this.color | |
| } | |
| b = ["cursor"]; | |
| c = b.length; | |
| a = 0; | |
| for (; a < c; a++) { | |
| d = b[a]; | |
| this[d] = this.stringHandler | |
| } | |
| })); | |
| (Ext.cmd.derive("Ext.fx.Anim", Ext.Base, { | |
| isAnimation: true, | |
| duration: 250, | |
| delay: 0, | |
| delayStart: 0, | |
| dynamic: false, | |
| easing: "ease", | |
| damper: 1, | |
| bezierRE: /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, | |
| reverse: false, | |
| running: false, | |
| paused: false, | |
| iterations: 1, | |
| autoEnd: false, | |
| alternate: false, | |
| currentIteration: 0, | |
| startTime: 0, | |
| frameCount: 0, | |
| constructor: function(a) { | |
| var b = this, c; | |
| a = a || {}; | |
| if (a.keyframes) { | |
| return new Ext.fx.Animator(a) | |
| } | |
| Ext.apply(b, a); | |
| if (b.from === undefined) { | |
| b.from = {} | |
| } | |
| b.propHandlers = {}; | |
| b.config = a; | |
| b.target = Ext.fx.Manager.createTarget(b.target); | |
| b.easingFn = Ext.fx.Easing[b.easing]; | |
| b.target.dynamic = b.dynamic; | |
| if (!b.easingFn) { | |
| b.easingFn = String(b.easing).match(b.bezierRE); | |
| if (b.easingFn && b.easingFn.length === 5) { | |
| c = b.easingFn; | |
| b.easingFn = Ext.fx.CubicBezier.cubicBezier(+c[1], +c[2], +c[3], +c[4]) | |
| } | |
| } | |
| b.id = Ext.id(null , "ext-anim-"); | |
| b.mixins.observable.constructor.call(b); | |
| Ext.fx.Manager.addAnim(b); | |
| if (a.autoEnd) { | |
| b.running = true; | |
| b.jumpToEnd() | |
| } | |
| }, | |
| setAttr: function(a, b) { | |
| return Ext.fx.Manager.items.get(this.id).setAttr(this.target, a, b) | |
| }, | |
| initAttrs: function() { | |
| var e = this, h = e.from, i = e.to, g = e.initialFrom || {}, c = {}, a, b, j, d; | |
| for (d in i) { | |
| if (i.hasOwnProperty(d)) { | |
| a = e.target.getAttr(d, h[d]); | |
| b = i[d]; | |
| if (!Ext.fx.PropertyHandler[d]) { | |
| if (Ext.isObject(b)) { | |
| j = e.propHandlers[d] = Ext.fx.PropertyHandler.object | |
| } else { | |
| j = e.propHandlers[d] = Ext.fx.PropertyHandler.defaultHandler | |
| } | |
| } else { | |
| j = e.propHandlers[d] = Ext.fx.PropertyHandler[d] | |
| } | |
| c[d] = j.get(a, b, e.damper, g[d], d) | |
| } | |
| } | |
| e.currentAttrs = c | |
| }, | |
| start: function(d) { | |
| var e = this, c = e.delay, b = e.delayStart, a; | |
| if (c) { | |
| if (!b) { | |
| e.delayStart = d; | |
| return | |
| } else { | |
| a = d - b; | |
| if (a < c) { | |
| return | |
| } else { | |
| d = new Date(b.getTime() + c) | |
| } | |
| } | |
| } | |
| if (e.fireEvent("beforeanimate", e) !== false) { | |
| e.startTime = d; | |
| if (!e.paused && !e.currentAttrs) { | |
| e.initAttrs() | |
| } | |
| e.running = true; | |
| e.frameCount = 0 | |
| } | |
| }, | |
| jumpToEnd: function() { | |
| var a = this; | |
| if (!a.endWasCalled) { | |
| if (!a.currentAttrs) { | |
| a.initAttrs() | |
| } | |
| Ext.fx.Manager.jumpToEnd(a); | |
| a.end() | |
| } | |
| }, | |
| runAnim: function(l) { | |
| var i = this, k = i.currentAttrs, d = i.duration, c = i.easingFn, b = i.propHandlers, g = {}, h, j, e, a; | |
| if (l >= d) { | |
| l = d; | |
| a = true | |
| } | |
| if (i.reverse) { | |
| l = d - l | |
| } | |
| for (e in k) { | |
| if (k.hasOwnProperty(e)) { | |
| j = k[e]; | |
| h = a ? 1 : c(l / d); | |
| g[e] = b[e].set(j, h) | |
| } | |
| } | |
| i.frameCount++; | |
| return g | |
| }, | |
| lastFrame: function() { | |
| var c = this | |
| , a = c.iterations | |
| , b = c.currentIteration; | |
| b++; | |
| if (b < a) { | |
| if (c.alternate) { | |
| c.reverse = !c.reverse | |
| } | |
| c.startTime = new Date(); | |
| c.currentIteration = b; | |
| c.paused = false | |
| } else { | |
| c.currentIteration = 0; | |
| c.end(); | |
| c.fireEvent("lastframe", c, c.startTime) | |
| } | |
| }, | |
| endWasCalled: 0, | |
| end: function() { | |
| var a = this; | |
| if (a.endWasCalled++) { | |
| return | |
| } | |
| a.startTime = 0; | |
| a.paused = false; | |
| a.running = false; | |
| Ext.fx.Manager.removeAnim(a); | |
| a.fireEvent("afteranimate", a, a.startTime); | |
| Ext.callback(a.callback, a.scope, [a, a.startTime]); | |
| if (a.remove) { | |
| a.target.destroy() | |
| } | |
| }, | |
| isReady: function() { | |
| return this.paused === false && this.running === false && this.iterations > 0 | |
| }, | |
| isRunning: function() { | |
| return this.paused === false && this.running === true && this.isAnimator !== true | |
| } | |
| }, 1, 0, 0, 0, 0, [["observable", Ext.util.Observable]], [Ext.fx, "Anim"], 0)); | |
| Ext.enableFx = true; | |
| (Ext.cmd.derive("Ext.util.Animate", Ext.Base, { | |
| mixinId: "animate", | |
| isAnimate: true, | |
| animate: function(a) { | |
| var b = this; | |
| if (Ext.fx.Manager.hasFxBlock(b.id)) { | |
| return b | |
| } | |
| Ext.fx.Manager.queueFx(new Ext.fx.Anim(b.anim(a))); | |
| return this | |
| }, | |
| anim: function(a) { | |
| if (!Ext.isObject(a)) { | |
| return (a) ? {} : false | |
| } | |
| var b = this; | |
| if (a.stopAnimation) { | |
| b.stopAnimation() | |
| } | |
| Ext.applyIf(a, Ext.fx.Manager.getFxDefaults(b.id)); | |
| return Ext.apply({ | |
| target: b, | |
| paused: true | |
| }, a) | |
| }, | |
| getAnimationProps: function() { | |
| var b = this | |
| , a = b.layout; | |
| return a && a.animate ? a.animate : {} | |
| }, | |
| stopFx: Ext.Function.alias(Ext.util.Animate, "stopAnimation"), | |
| stopAnimation: function() { | |
| Ext.fx.Manager.stopAnimation(this.id); | |
| return this | |
| }, | |
| syncFx: function() { | |
| Ext.fx.Manager.setFxDefaults(this.id, { | |
| concurrent: true | |
| }); | |
| return this | |
| }, | |
| sequenceFx: function() { | |
| Ext.fx.Manager.setFxDefaults(this.id, { | |
| concurrent: false | |
| }); | |
| return this | |
| }, | |
| hasActiveFx: Ext.Function.alias(Ext.util.Animate, "getActiveAnimation"), | |
| getActiveAnimation: function() { | |
| return Ext.fx.Manager.getActiveAnimation(this.id) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util, "Animate"], 0)); | |
| (Ext.cmd.derive("Ext.dom.Fly", Ext.dom.Element, { | |
| alternateClassName: "Ext.dom.Element.Fly", | |
| validNodeTypes: { | |
| 1: 1, | |
| 9: 1, | |
| 11: 1 | |
| }, | |
| isFly: true, | |
| constructor: function(a) { | |
| this.dom = a; | |
| this.el = this | |
| }, | |
| attach: function(b) { | |
| var a = this; | |
| if (!b) { | |
| return a.detach() | |
| } | |
| a.dom = b; | |
| if (!Ext.cache[b.id]) { | |
| a.getData().isSynchronized = false | |
| } | |
| return a | |
| }, | |
| detach: function() { | |
| this.dom = null | |
| }, | |
| addListener: null , | |
| removeListener: null | |
| }, 1, 0, 0, 0, 0, 0, [Ext.dom, "Fly", Ext.dom.Element, "Fly"], function(a) { | |
| var b = {}; | |
| a.cache = b; | |
| Ext.fly = function(i, d) { | |
| var g = null , e = Ext.fly, c, h; | |
| d = d || (e.caller && e.caller.$name) || "_global"; | |
| i = Ext.getDom(i); | |
| if (i) { | |
| c = i.nodeType; | |
| if (a.prototype.validNodeTypes[c] || (!c && (i.window == i))) { | |
| g = Ext.cache[i.id]; | |
| if (!g || g.dom !== i) { | |
| g = b[d] || (b[d] = new a()); | |
| g.dom = i; | |
| h = g.getData(true); | |
| if (h) { | |
| h.isSynchronized = false | |
| } | |
| } | |
| } | |
| } | |
| return g | |
| } | |
| })); | |
| (Ext.cmd.derive("Ext.dom.CompositeElementLite", Ext.Base, { | |
| alternateClassName: ["Ext.CompositeElementLite"], | |
| isComposite: true, | |
| isLite: true, | |
| statics: { | |
| importElementMethods: function() { | |
| var a = Ext.dom.Element | |
| , b = this.prototype; | |
| Ext.Object.each(a.prototype, function(c, d) { | |
| if (typeof d === "function" && !b[c]) { | |
| b[c] = function() { | |
| return this.invoke(c, arguments) | |
| } | |
| } | |
| }) | |
| } | |
| }, | |
| constructor: function(b, a) { | |
| if (a) { | |
| this.elements = b || [] | |
| } else { | |
| this.elements = []; | |
| this.add(b) | |
| } | |
| }, | |
| getElement: function(b) { | |
| var a = this._fly || (this._fly = new Ext.dom.Fly()); | |
| return a.attach(b) | |
| }, | |
| 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.fly(a || document).query(c) | |
| } else { | |
| if (c.isComposite) { | |
| c = c.elements | |
| } else { | |
| if (!Ext.isIterable(c)) { | |
| c = [c] | |
| } | |
| } | |
| } | |
| for (b = 0, | |
| d = c.length; b < d; ++b) { | |
| e.push(this.transformElement(c[b])) | |
| } | |
| return this | |
| }, | |
| invoke: function(e, b) { | |
| var h = this, j = h.elements, g = j.length, a, d, c; | |
| if (c !== 0) { | |
| a = (h.isLite ? Ext.dom.Fly : Ext.dom.Element).prototype; | |
| for (c = 0; c < g; c++) { | |
| d = j[c]; | |
| if (d) { | |
| a[e].apply(h.getElement(d), b) | |
| } | |
| } | |
| } | |
| return h | |
| }, | |
| item: function(b) { | |
| var c = this.elements[b] | |
| , a = null ; | |
| if (c) { | |
| a = this.getElement(c) | |
| } | |
| return a | |
| }, | |
| slice: function(b, a) { | |
| return Ext.Array.slice(this.elements, b, a) | |
| }, | |
| each: function(g, d) { | |
| var h = this, c = h.elements, a = c.length, b, j; | |
| for (b = 0; b < a; b++) { | |
| j = c[b]; | |
| if (j) { | |
| j = this.getElement(j); | |
| if (g.call(d || j, j, h, b) === false) { | |
| break | |
| } | |
| } | |
| } | |
| return h | |
| }, | |
| fill: function(a) { | |
| var b = this; | |
| b.elements = []; | |
| b.add(a); | |
| return b | |
| }, | |
| insert: function(b, a) { | |
| Ext.Array.insert(this.elements, b, a) | |
| }, | |
| filter: function(b) { | |
| var h = this, c = h.elements, g = c.length, d = [], e = 0, j = typeof b == "function", k, a; | |
| for (; e < g; e++) { | |
| a = c[e]; | |
| k = false; | |
| if (a) { | |
| a = h.getElement(a); | |
| if (j) { | |
| k = b.call(a, a, h, e) !== false | |
| } else { | |
| k = a.is(b) | |
| } | |
| if (k) { | |
| d.push(h.transformElement(a)) | |
| } | |
| } | |
| } | |
| h.elements = d; | |
| return h | |
| }, | |
| indexOf: function(a) { | |
| return Ext.Array.indexOf(this.elements, this.transformElement(a)) | |
| }, | |
| replaceElement: function(e, c, a) { | |
| var b = !isNaN(e) ? e : this.indexOf(e), g; | |
| if (b > -1) { | |
| c = Ext.getDom(c); | |
| if (a) { | |
| g = this.elements[b]; | |
| g.parentNode.insertBefore(c, g); | |
| Ext.removeNode(g) | |
| } | |
| Ext.Array.splice(this.elements, b, 1, c) | |
| } | |
| return this | |
| }, | |
| clear: function(d) { | |
| var c = this | |
| , b = c.elements | |
| , a = b.length - 1; | |
| if (d) { | |
| for (; a >= 0; a--) { | |
| Ext.removeNode(b[a]) | |
| } | |
| } | |
| this.elements = [] | |
| }, | |
| addElements: function(d, b) { | |
| if (!d) { | |
| return this | |
| } | |
| if (typeof d === "string") { | |
| d = Ext.dom.Element.selectorFunction(d, b) | |
| } | |
| var c = this.elements, a = d.length, g; | |
| for (g = 0; g < a; g++) { | |
| c.push(Ext.get(d[g])) | |
| } | |
| 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(e, i) { | |
| e = [].concat(e); | |
| var d = this, g = d.elements, c = e.length, h, b, a; | |
| for (a = 0; a < c; a++) { | |
| h = e[a]; | |
| if ((b = (g[h] || g[h = d.indexOf(h)])) ) { | |
| if (i) { | |
| if (b.dom) { | |
| b.destroy() | |
| } else { | |
| Ext.removeNode(b) | |
| } | |
| } | |
| Ext.Array.erase(g, h, 1) | |
| } | |
| } | |
| return d | |
| }, | |
| destroy: function() { | |
| return this.invoke("destroy", arguments); | |
| this.callParent() | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.dom, "CompositeElementLite", Ext, "CompositeElementLite"], function(b) { | |
| var a = b.prototype; | |
| b.importElementMethods(); | |
| a.on = a.addListener | |
| })); | |
| Ext.define("Ext.overrides.dom.Element", (function() { | |
| var j, l = window, E = document, M = "hidden", q = "isClipped", K = "overflow", u = "overflow-x", t = "overflow-y", x = "originalClip", C = "height", e = "width", g = "visibility", a = "display", G = "none", O = "offsets", c = "clip", m = "originalDisplay", H = "visibilityMode", y = "isVisible", k = "x-hidden-offsets", p = "x-hidden-clip", P = ['<div class="{0}-tl" role="presentation">', '<div class="{0}-tr" role="presentation">', '<div class="{0}-tc" role="presentation"></div>', "</div>", "</div>", '<div class="{0}-ml" role="presentation">', '<div class="{0}-mr" role="presentation">', '<div class="{0}-mc" role="presentation"></div>', "</div>", "</div>", '<div class="{0}-bl" role="presentation">', '<div class="{0}-br" role="presentation">', '<div class="{0}-bc" role="presentation"></div>', "</div>", "</div>"].join(""), J = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig, D = /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, b = /\ssrc=([\'\"])(.*?)\1/i, o = /\S/, i = /\stype=([\'\"])(.*?)\1/i, A = /^-ms-/, B = /(-[a-z])/gi, I = function(Q, R) { | |
| return R.charAt(1).toUpperCase() | |
| } | |
| , n = "x-masked", z = "x-masked-relative", v = "x-mask-msg", s = /^body/i, r = {}, w = function(R) { | |
| var S = R.getData() | |
| , Q = S[H]; | |
| if (Q === undefined) { | |
| S[H] = Q = j.VISIBILITY | |
| } | |
| return Q | |
| } | |
| , N = E.createRange ? E.createRange() : null , F = { | |
| INPUT: true, | |
| TEXTAREA: true | |
| }; | |
| if (Ext.isIE8) { | |
| var h = E.createElement("div") | |
| , L = [] | |
| , d = Ext.Function.createBuffered(function() { | |
| var Q = L.length, R; | |
| for (R = 0; R < Q; R++) { | |
| h.appendChild(L[R]) | |
| } | |
| h.innerHTML = ""; | |
| L.length = 0 | |
| }, 10) | |
| } | |
| return { | |
| override: "Ext.dom.Element", | |
| mixins: ["Ext.util.Animate"], | |
| skipGarbageCollection: false, | |
| _init: function(Q) { | |
| j = Q; | |
| Q.tabbableSelector += ",[" + Q.tabbableSavedCounterAttribute + "]" | |
| }, | |
| statics: { | |
| selectableCls: "x-selectable", | |
| unselectableCls: "x-unselectable", | |
| tabbableSelector: Ext.supports.CSS3NegationSelector ? 'a[href],button,iframe,input,select,textarea,[tabindex]:not([tabindex="-1"]),[contenteditable="true"]' : 'a[href],button,iframe,input,select,textarea,[tabindex],[contenteditable="true"]', | |
| naturallyFocusableTags: { | |
| BUTTON: true, | |
| IFRAME: true, | |
| EMBED: true, | |
| INPUT: true, | |
| OBJECT: true, | |
| SELECT: true, | |
| TEXTAREA: true, | |
| HTML: Ext.isIE ? true : false | |
| }, | |
| naturallyTabbableTags: { | |
| BUTTON: true, | |
| IFRAME: true, | |
| INPUT: true, | |
| SELECT: true, | |
| TEXTAREA: true, | |
| OBJECT: Ext.isIE8m ? true : false | |
| }, | |
| tabbableSavedCounterAttribute: "data-tabindex-counter", | |
| tabbableSavedValueAttribute: "data-tabindex-value", | |
| normalize: function(Q) { | |
| if (Q === "float") { | |
| Q = Ext.supports.Float ? "cssFloat" : "styleFloat" | |
| } | |
| return r[Q] || (r[Q] = Q.replace(A, "ms-").replace(B, I)) | |
| } | |
| }, | |
| addClsOnClick: function(S, V, R) { | |
| var T = this | |
| , U = T.dom | |
| , Q = Ext.isFunction(V); | |
| T.on("mousedown", function() { | |
| if (Q && V.call(R || T, T) === false) { | |
| return false | |
| } | |
| Ext.fly(U).addCls(S); | |
| var X = Ext.getDoc() | |
| , W = function() { | |
| Ext.fly(U).removeCls(S); | |
| X.removeListener("mouseup", W) | |
| } | |
| ; | |
| X.on("mouseup", W) | |
| }); | |
| return T | |
| }, | |
| addClsOnFocus: function(S, V, R) { | |
| var T = this | |
| , U = T.dom | |
| , Q = Ext.isFunction(V); | |
| T.on("focus", function() { | |
| if (Q && V.call(R || T, T) === false) { | |
| return false | |
| } | |
| Ext.fly(U).addCls(S) | |
| }); | |
| T.on("blur", function() { | |
| Ext.fly(U).removeCls(S) | |
| }); | |
| return T | |
| }, | |
| addClsOnOver: function(S, V, R) { | |
| var T = this | |
| , U = T.dom | |
| , Q = Ext.isFunction(V); | |
| T.hover(function() { | |
| if (Q && V.call(R || T, T) === false) { | |
| return | |
| } | |
| Ext.fly(U).addCls(S) | |
| }, function() { | |
| Ext.fly(U).removeCls(S) | |
| }); | |
| return T | |
| }, | |
| addKeyListener: function(R, T, S) { | |
| var Q; | |
| if (typeof R !== "object" || Ext.isArray(R)) { | |
| Q = { | |
| target: this, | |
| key: R, | |
| fn: T, | |
| scope: S | |
| } | |
| } else { | |
| Q = { | |
| target: this, | |
| key: R.key, | |
| shift: R.shift, | |
| ctrl: R.ctrl, | |
| alt: R.alt, | |
| fn: T, | |
| scope: S | |
| } | |
| } | |
| return new Ext.util.KeyMap(Q) | |
| }, | |
| addKeyMap: function(Q) { | |
| return new Ext.util.KeyMap(Ext.apply({ | |
| target: this | |
| }, Q)) | |
| }, | |
| afterAnimate: function() { | |
| var Q = this.shadow; | |
| if (Q && !Q.disabled && !Q.animate) { | |
| Q.show() | |
| } | |
| }, | |
| anchorAnimX: function(Q) { | |
| var R = (Q === "l") ? "right" : "left"; | |
| this.dom.style[R] = "0px" | |
| }, | |
| anim: function(Q) { | |
| if (!Ext.isObject(Q)) { | |
| return (Q) ? {} : false | |
| } | |
| var R = this, S = Q.duration || Ext.fx.Anim.prototype.duration, U = Q.easing || "ease", T; | |
| if (Q.stopAnimation) { | |
| R.stopAnimation() | |
| } | |
| Ext.applyIf(Q, Ext.fx.Manager.getFxDefaults(R.id)); | |
| Ext.fx.Manager.setFxDefaults(R.id, { | |
| delay: 0 | |
| }); | |
| T = { | |
| target: R.dom, | |
| remove: Q.remove, | |
| alternate: Q.alternate || false, | |
| duration: S, | |
| easing: U, | |
| callback: Q.callback, | |
| listeners: Q.listeners, | |
| iterations: Q.iterations || 1, | |
| scope: Q.scope, | |
| block: Q.block, | |
| concurrent: Q.concurrent, | |
| delay: Q.delay || 0, | |
| paused: true, | |
| keyframes: Q.keyframes, | |
| from: Q.from || {}, | |
| to: Ext.apply({}, Q), | |
| userConfig: Q | |
| }; | |
| Ext.apply(T.to, Q.to); | |
| delete T.to.to; | |
| delete T.to.from; | |
| delete T.to.remove; | |
| delete T.to.alternate; | |
| delete T.to.keyframes; | |
| delete T.to.iterations; | |
| delete T.to.listeners; | |
| delete T.to.target; | |
| delete T.to.paused; | |
| delete T.to.callback; | |
| delete T.to.scope; | |
| delete T.to.duration; | |
| delete T.to.easing; | |
| delete T.to.concurrent; | |
| delete T.to.block; | |
| delete T.to.stopAnimation; | |
| delete T.to.delay; | |
| return T | |
| }, | |
| animate: function(Q) { | |
| this.addAnimation(Q); | |
| return this | |
| }, | |
| addAnimation: function(S) { | |
| var U = this, R = U.dom.id || Ext.id(U.dom), T, V, Q; | |
| if (!Ext.fx.Manager.hasFxBlock(R)) { | |
| if (S.listeners) { | |
| T = S.listeners; | |
| delete S.listeners | |
| } | |
| if (S.internalListeners) { | |
| S.listeners = S.internalListeners; | |
| delete S.internalListeners | |
| } | |
| Q = S.autoEnd; | |
| delete S.autoEnd; | |
| V = new Ext.fx.Anim(U.anim(S)); | |
| V.on({ | |
| afteranimate: "afterAnimate", | |
| beforeanimate: "beforeAnimate", | |
| scope: U, | |
| single: true | |
| }); | |
| if (T) { | |
| V.on(T) | |
| } | |
| Ext.fx.Manager.queueFx(V); | |
| if (Q) { | |
| V.jumpToEnd() | |
| } | |
| } | |
| return V | |
| }, | |
| beforeAnimate: function() { | |
| var Q = this.shadow; | |
| if (Q && !Q.disabled && !Q.animate) { | |
| Q.hide() | |
| } | |
| }, | |
| boxWrap: function(Q) { | |
| Q = Q || "x-box"; | |
| var R = Ext.get(this.insertHtml("beforeBegin", "<div class='" + Q + "' role='presentation'>" + Ext.String.format(P, Q) + "</div>")); | |
| R.selectNode("." + Q + "-mc").appendChild(this.dom); | |
| return R | |
| }, | |
| clean: function(R) { | |
| var T = this, V = T.dom, U = T.getData(), W = V.firstChild, S = -1, Q; | |
| if (U.isCleaned && R !== true) { | |
| return T | |
| } | |
| while (W) { | |
| Q = W.nextSibling; | |
| if (W.nodeType === 3) { | |
| if (!(o.test(W.nodeValue))) { | |
| V.removeChild(W) | |
| } else { | |
| if (Q && Q.nodeType === 3) { | |
| W.appendData(Ext.String.trim(Q.data)); | |
| V.removeChild(Q); | |
| Q = W.nextSibling; | |
| W.nodeIndex = ++S | |
| } | |
| } | |
| } else { | |
| Ext.fly(W, "_clean").clean(); | |
| W.nodeIndex = ++S | |
| } | |
| W = Q | |
| } | |
| U.isCleaned = true; | |
| return T | |
| }, | |
| empty: N ? function() { | |
| var Q = this.dom; | |
| if (Q.firstChild) { | |
| N.setStartBefore(Q.firstChild); | |
| N.setEndAfter(Q.lastChild); | |
| N.deleteContents() | |
| } | |
| } | |
| : function() { | |
| var Q = this.dom; | |
| while (Q.lastChild) { | |
| Q.removeChild(Q.lastChild) | |
| } | |
| } | |
| , | |
| clearListeners: function() { | |
| this.removeAnchor(); | |
| arguments.callee.$previous.call(this) | |
| }, | |
| clearPositioning: function(Q) { | |
| Q = Q || ""; | |
| return this.setStyle({ | |
| left: Q, | |
| right: Q, | |
| top: Q, | |
| bottom: Q, | |
| "z-index": "", | |
| position: "static" | |
| }) | |
| }, | |
| createProxy: function(Q, U, T) { | |
| Q = (typeof Q === "object") ? Q : { | |
| tag: "div", | |
| role: "presentation", | |
| cls: Q | |
| }; | |
| var S = this | |
| , R = U ? Ext.DomHelper.append(U, Q, true) : Ext.DomHelper.insertBefore(S.dom, Q, true); | |
| R.setVisibilityMode(j.DISPLAY); | |
| R.hide(); | |
| if (T && S.setBox && S.getBox) { | |
| R.setBox(S.getBox()) | |
| } | |
| return R | |
| }, | |
| clearOpacity: function() { | |
| return this.setOpacity("") | |
| }, | |
| clip: function() { | |
| var R = this, S = R.getData(), Q; | |
| if (!S[q]) { | |
| S[q] = true; | |
| Q = R.getStyle([K, u, t]); | |
| S[x] = { | |
| o: Q[K], | |
| x: Q[u], | |
| y: Q[t] | |
| }; | |
| R.setStyle(K, M); | |
| R.setStyle(u, M); | |
| R.setStyle(t, M) | |
| } | |
| return R | |
| }, | |
| destroy: function() { | |
| var S = this, U = S.dom, T = S.getData(), R, Q; | |
| if (U && S.isAnimate) { | |
| S.stopAnimation() | |
| } | |
| arguments.callee.$previous.call(this); | |
| if (U && Ext.isIE8 && (U.window != U) && (U.nodeType !== 9) && (U.tagName !== "BODY") && (U.tagName !== "HTML")) { | |
| L[L.length] = U; | |
| d() | |
| } | |
| if (T) { | |
| R = T.maskEl; | |
| Q = T.maskMsg; | |
| if (R) { | |
| R.destroy() | |
| } | |
| if (Q) { | |
| Q.destroy() | |
| } | |
| } | |
| }, | |
| enableDisplayMode: function(R) { | |
| var Q = this; | |
| Q.setVisibilityMode(j.DISPLAY); | |
| if (R !== undefined) { | |
| Q.getData()[m] = R | |
| } | |
| return Q | |
| }, | |
| fadeIn: function(S) { | |
| var Q = this | |
| , R = Q.dom; | |
| Q.animate(Ext.apply({}, S, { | |
| opacity: 1, | |
| internalListeners: { | |
| beforeanimate: function(U) { | |
| var T = Ext.fly(R, "_anim"); | |
| if (T.isStyle("display", "none")) { | |
| T.setDisplayed("") | |
| } else { | |
| T.show() | |
| } | |
| } | |
| } | |
| })); | |
| return this | |
| }, | |
| fadeOut: function(S) { | |
| var Q = this | |
| , R = Q.dom; | |
| S = Ext.apply({ | |
| opacity: 0, | |
| internalListeners: { | |
| afteranimate: function(U) { | |
| if (R && U.to.opacity === 0) { | |
| var T = Ext.fly(R, "_anim"); | |
| if (S.useDisplay) { | |
| T.setDisplayed(false) | |
| } else { | |
| T.hide() | |
| } | |
| } | |
| } | |
| } | |
| }, S); | |
| Q.animate(S); | |
| return Q | |
| }, | |
| fixDisplay: function() { | |
| var Q = this; | |
| if (Q.isStyle(a, G)) { | |
| Q.setStyle(g, M); | |
| Q.setStyle(a, Q._getDisplay()); | |
| if (Q.isStyle(a, G)) { | |
| Q.setStyle(a, "block") | |
| } | |
| } | |
| }, | |
| frame: function(Q, T, U) { | |
| var S = this, V = S.dom, R; | |
| Q = Q || "#C3DAF9"; | |
| T = T || 1; | |
| U = U || {}; | |
| R = function() { | |
| var Z = Ext.fly(V, "_anim"), Y = this, aa, X, W; | |
| Z.show(); | |
| aa = Z.getBox(); | |
| X = Ext.getBody().createChild({ | |
| role: "presentation", | |
| id: Z.dom.id + "-anim-proxy", | |
| style: { | |
| position: "absolute", | |
| "pointer-events": "none", | |
| "z-index": 35000, | |
| border: "0px solid " + Q | |
| } | |
| }); | |
| W = new Ext.fx.Anim({ | |
| target: X, | |
| duration: U.duration || 1000, | |
| iterations: T, | |
| from: { | |
| top: aa.y, | |
| left: aa.x, | |
| borderWidth: 0, | |
| opacity: 1, | |
| height: aa.height, | |
| width: aa.width | |
| }, | |
| to: { | |
| top: aa.y - 20, | |
| left: aa.x - 20, | |
| borderWidth: 10, | |
| opacity: 0, | |
| height: aa.height + 40, | |
| width: aa.width + 40 | |
| } | |
| }); | |
| W.on("afteranimate", function() { | |
| X.destroy(); | |
| Y.end() | |
| }) | |
| } | |
| ; | |
| S.animate({ | |
| duration: (Math.max(U.duration, 500) * 2) || 2000, | |
| listeners: { | |
| beforeanimate: { | |
| fn: R | |
| } | |
| }, | |
| callback: U.callback, | |
| scope: U.scope | |
| }); | |
| return S | |
| }, | |
| getColor: function(R, S, X) { | |
| var U = this.getStyle(R), T = X || X === "" ? X : "#", W, Q, V = 0; | |
| if (!U || (/transparent|inherit/.test(U))) { | |
| return S | |
| } | |
| if (/^r/.test(U)) { | |
| U = U.slice(4, U.length - 1).split(","); | |
| Q = U.length; | |
| for (; V < Q; V++) { | |
| W = parseInt(U[V], 10); | |
| T += (W < 16 ? "0" : "") + W.toString(16) | |
| } | |
| } else { | |
| U = U.replace("#", ""); | |
| T += U.length === 3 ? U.replace(/^(\w)(\w)(\w)$/, "$1$1$2$2$3$3") : U | |
| } | |
| return ( T.length > 5 ? T.toLowerCase() : S) | |
| }, | |
| getLoader: function() { | |
| var R = this | |
| , S = R.getData() | |
| , Q = S.loader; | |
| if (!Q) { | |
| S.loader = Q = new Ext.ElementLoader({ | |
| target: R | |
| }) | |
| } | |
| return Q | |
| }, | |
| getPositioning: function(R) { | |
| var Q = this.getStyle(["left", "top", "position", "z-index"]) | |
| , S = this.dom; | |
| if (R) { | |
| if (Q.left === "auto") { | |
| Q.left = S.offsetLeft + "px" | |
| } | |
| if (Q.top === "auto") { | |
| Q.top = S.offsetTop + "px" | |
| } | |
| } | |
| return Q | |
| }, | |
| ghost: function(Q, T) { | |
| var S = this, U = S.dom, R; | |
| Q = Q || "b"; | |
| R = function() { | |
| var Y = Ext.fly(U, "_anim") | |
| , X = Y.getWidth() | |
| , W = Y.getHeight() | |
| , Z = Y.getXY() | |
| , V = Y.getPositioning() | |
| , aa = { | |
| opacity: 0 | |
| }; | |
| switch (Q) { | |
| case "t": | |
| aa.y = Z[1] - W; | |
| break; | |
| case "l": | |
| aa.x = Z[0] - X; | |
| break; | |
| case "r": | |
| aa.x = Z[0] + X; | |
| break; | |
| case "b": | |
| aa.y = Z[1] + W; | |
| break; | |
| case "tl": | |
| aa.x = Z[0] - X; | |
| aa.y = Z[1] - W; | |
| break; | |
| case "bl": | |
| aa.x = Z[0] - X; | |
| aa.y = Z[1] + W; | |
| break; | |
| case "br": | |
| aa.x = Z[0] + X; | |
| aa.y = Z[1] + W; | |
| break; | |
| case "tr": | |
| aa.x = Z[0] + X; | |
| aa.y = Z[1] - W; | |
| break | |
| } | |
| this.to = aa; | |
| this.on("afteranimate", function() { | |
| var ab = Ext.fly(U, "_anim"); | |
| if (ab) { | |
| ab.hide(); | |
| ab.clearOpacity(); | |
| ab.setPositioning(V) | |
| } | |
| }) | |
| } | |
| ; | |
| S.animate(Ext.applyIf(T || {}, { | |
| duration: 500, | |
| easing: "ease-out", | |
| listeners: { | |
| beforeanimate: R | |
| } | |
| })); | |
| return S | |
| }, | |
| hide: function(Q) { | |
| if (typeof Q === "string") { | |
| this.setVisible(false, Q); | |
| return this | |
| } | |
| this.setVisible(false, this.anim(Q)); | |
| return this | |
| }, | |
| highlight: function(T, R) { | |
| var X = this, U = X.dom, Z = {}, W, aa, V, S, Q, Y; | |
| R = R || {}; | |
| S = R.listeners || {}; | |
| V = R.attr || "backgroundColor"; | |
| Z[V] = T || "ffff9c"; | |
| if (!R.to) { | |
| aa = {}; | |
| aa[V] = R.endColor || X.getColor(V, "ffffff", "") | |
| } else { | |
| aa = R.to | |
| } | |
| R.listeners = Ext.apply(Ext.apply({}, S), { | |
| beforeanimate: function() { | |
| W = U.style[V]; | |
| var ab = Ext.fly(U, "_anim"); | |
| ab.clearOpacity(); | |
| ab.show(); | |
| Q = S.beforeanimate; | |
| if (Q) { | |
| Y = Q.fn || Q; | |
| return Y.apply(Q.scope || S.scope || l, arguments) | |
| } | |
| }, | |
| afteranimate: function() { | |
| if (U) { | |
| U.style[V] = W | |
| } | |
| Q = S.afteranimate; | |
| if (Q) { | |
| Y = Q.fn || Q; | |
| Y.apply(Q.scope || S.scope || l, arguments) | |
| } | |
| } | |
| }); | |
| X.animate(Ext.apply({}, R, { | |
| duration: 1000, | |
| easing: "ease-in", | |
| from: Z, | |
| to: aa | |
| })); | |
| return X | |
| }, | |
| hover: function(R, Q, T, S) { | |
| var U = this; | |
| U.on("mouseenter", R, T || U.dom, S); | |
| U.on("mouseleave", Q, T || U.dom, S); | |
| return U | |
| }, | |
| initDD: function(S, R, T) { | |
| var Q = new Ext.dd.DD(Ext.id(this.dom),S,R); | |
| return Ext.apply(Q, T) | |
| }, | |
| initDDProxy: function(S, R, T) { | |
| var Q = new Ext.dd.DDProxy(Ext.id(this.dom),S,R); | |
| return Ext.apply(Q, T) | |
| }, | |
| initDDTarget: function(S, R, T) { | |
| var Q = new Ext.dd.DDTarget(Ext.id(this.dom),S,R); | |
| return Ext.apply(Q, T) | |
| }, | |
| isFocusable: function() { | |
| var R = this.dom, Q = false, S; | |
| if (R && !R.disabled) { | |
| S = R.nodeName; | |
| Q = !!Ext.Element.naturallyFocusableTags[S] || ((S === "A" || S === "LINK") && !!R.href) || R.getAttribute("tabIndex") != null || R.contentEditable === "true"; | |
| if (Ext.isIE8 && S === "INPUT" && R.type === "hidden") { | |
| Q = false | |
| } | |
| Q = Q && this.isVisible(true) | |
| } | |
| return Q | |
| }, | |
| isInputField: function() { | |
| var R = this.dom | |
| , Q = R.contentEditable; | |
| if ((F[R.tagName] && R.type !== "button") || (Q === "" || Q === "true")) { | |
| return true | |
| } | |
| return false | |
| }, | |
| isTabbable: function(S) { | |
| var T = this.dom, V = false, U, R, Q; | |
| if (T && !T.disabled) { | |
| U = T.nodeName; | |
| Q = T.getAttribute("tabIndex"); | |
| R = Q != null ; | |
| Q -= 0; | |
| if (U === "A" || U === "LINK") { | |
| if (T.href) { | |
| V = R && Q < 0 ? false : true | |
| } else { | |
| if (T.contentEditable === "true") { | |
| V = !R || (R && Q >= 0) ? true : false | |
| } else { | |
| V = R && Q >= 0 ? true : false | |
| } | |
| } | |
| } else { | |
| if (T.contentEditable === "true" || Ext.Element.naturallyTabbableTags[U]) { | |
| V = R && Q < 0 ? false : true | |
| } else { | |
| if (R && Q >= 0) { | |
| V = true | |
| } | |
| } | |
| } | |
| if (Ext.isIE8 && U === "INPUT" && T.type === "hidden") { | |
| V = false | |
| } | |
| V = V && (S || ((!this.component || this.component.isVisible(true)) && this.isVisible(true))) | |
| } | |
| return V | |
| }, | |
| isMasked: function(Q) { | |
| var U = this, W = U.getData(), T = W.maskEl, R = W.maskMsg, V = false, S; | |
| if (T && T.isVisible()) { | |
| if (R) { | |
| R.center(U) | |
| } | |
| V = true | |
| } else { | |
| if (Q) { | |
| S = U.findParentNode(); | |
| if (S) { | |
| return Ext.fly(S).isMasked(Q) | |
| } | |
| } | |
| } | |
| return V | |
| }, | |
| load: function(Q) { | |
| this.getLoader().load(Q); | |
| return this | |
| }, | |
| mask: function(X, V, Q) { | |
| var T = this, W = T.dom, U = T.getData(), S = U.maskEl, R; | |
| if (!(s.test(W.tagName) && T.getStyle("position") === "static")) { | |
| T.addCls(z) | |
| } | |
| if (S) { | |
| S.destroy() | |
| } | |
| S = Ext.DomHelper.append(W, { | |
| role: "presentation", | |
| cls: "x-mask x-border-box", | |
| children: { | |
| role: "presentation", | |
| cls: V ? v + " " + V : v, | |
| cn: { | |
| tag: "div", | |
| role: "presentation", | |
| cls: "x-mask-msg-inner", | |
| cn: { | |
| tag: "div", | |
| role: "presentation", | |
| cls: "x-mask-msg-text", | |
| html: X || "" | |
| } | |
| } | |
| } | |
| }, true); | |
| R = Ext.get(S.dom.firstChild); | |
| U.maskEl = S; | |
| T.addCls(n); | |
| S.setDisplayed(true); | |
| if (typeof X === "string") { | |
| R.setDisplayed(true); | |
| R.center(T) | |
| } else { | |
| R.setDisplayed(false) | |
| } | |
| if (W === E.body) { | |
| S.addCls("x-mask-fixed") | |
| } | |
| T.saveTabbableState({ | |
| skipSelf: W === E.body | |
| }); | |
| if (Ext.isIE9m && W !== E.body && T.isStyle("height", "auto")) { | |
| S.setSize(undefined, Q || T.getHeight()) | |
| } | |
| return S | |
| }, | |
| monitorMouseLeave: function(Q, T, S) { | |
| var U = this, V, R = { | |
| mouseleave: function(W) { | |
| if (Ext.isIE9m) { | |
| W.enableIEAsync() | |
| } | |
| V = Ext.defer(T, Q, S || U, [W]) | |
| }, | |
| mouseenter: function() { | |
| clearTimeout(V) | |
| } | |
| }; | |
| U.on(R); | |
| return R | |
| }, | |
| puff: function(U) { | |
| var T = this, V = T.dom, R, S = T.getBox(), Q = T.getStyle(["width", "height", "left", "right", "top", "bottom", "position", "z-index", "font-size", "opacity"], true); | |
| U = Ext.applyIf(U || {}, { | |
| easing: "ease-out", | |
| duration: 500, | |
| useDisplay: false | |
| }); | |
| R = function() { | |
| var W = Ext.fly(V, "_anim"); | |
| W.clearOpacity(); | |
| W.show(); | |
| this.to = { | |
| width: S.width * 2, | |
| height: S.height * 2, | |
| x: S.x - (S.width / 2), | |
| y: S.y - (S.height / 2), | |
| opacity: 0, | |
| fontSize: "200%" | |
| }; | |
| this.on("afteranimate", function() { | |
| var X = Ext.fly(V, "_anim"); | |
| if (X) { | |
| if (U.useDisplay) { | |
| X.setDisplayed(false) | |
| } else { | |
| X.hide() | |
| } | |
| X.setStyle(Q); | |
| Ext.callback(U.callback, U.scope) | |
| } | |
| }) | |
| } | |
| ; | |
| T.animate({ | |
| duration: U.duration, | |
| easing: U.easing, | |
| listeners: { | |
| beforeanimate: { | |
| fn: R | |
| } | |
| } | |
| }); | |
| return T | |
| }, | |
| selectable: function() { | |
| var Q = this; | |
| Q.dom.unselectable = ""; | |
| Q.removeCls(j.unselectableCls); | |
| Q.addCls(j.selectableCls); | |
| return Q | |
| }, | |
| setCapture: function() { | |
| var Q = this.dom; | |
| if (Ext.isIE9m && Q.setCapture) { | |
| Q.setCapture() | |
| } | |
| }, | |
| setHeight: function(Q, R) { | |
| var S = this; | |
| if (!R || !S.anim) { | |
| arguments.callee.$previous.apply(this, arguments) | |
| } else { | |
| if (!Ext.isObject(R)) { | |
| R = {} | |
| } | |
| S.animate(Ext.applyIf({ | |
| to: { | |
| height: Q | |
| } | |
| }, R)) | |
| } | |
| return S | |
| }, | |
| setHorizontal: function() { | |
| var R = this | |
| , Q = R.verticalCls; | |
| delete R.vertical; | |
| if (Q) { | |
| delete R.verticalCls; | |
| R.removeCls(Q) | |
| } | |
| delete R.setWidth; | |
| delete R.setHeight; | |
| if (!Ext.isIE8) { | |
| delete R.getWidth; | |
| delete R.getHeight | |
| } | |
| delete R.styleHooks | |
| }, | |
| updateText: function(T) { | |
| var Q = this, S, R; | |
| if (S) { | |
| R = S.firstChild; | |
| if (!R || (R.nodeType !== 3 || R.nextSibling)) { | |
| R = E.createTextNode(); | |
| Q.empty(); | |
| S.appendChild(R) | |
| } | |
| if (T) { | |
| R.data = T | |
| } | |
| } | |
| }, | |
| setHtml: function(S, R, X, T) { | |
| var U = this, W, V, Q; | |
| if (!U.dom) { | |
| return U | |
| } | |
| S = S || ""; | |
| V = U.dom; | |
| if (R !== true) { | |
| V.innerHTML = S; | |
| Ext.callback(X, U); | |
| return U | |
| } | |
| W = Ext.id(); | |
| S += '<span id="' + W + '" role="presentation"></span>'; | |
| Q = Ext.interval(function() { | |
| var ae, ab, aa, Z, Y, ad, ac; | |
| if (!(ad = E.getElementById(W))) { | |
| return false | |
| } | |
| clearInterval(Q); | |
| Ext.removeNode(ad); | |
| ae = Ext.getHead().dom; | |
| while ((ab = J.exec(S)) ) { | |
| aa = ab[1]; | |
| Z = aa ? aa.match(b) : false; | |
| if (Z && Z[2]) { | |
| ac = E.createElement("script"); | |
| ac.src = Z[2]; | |
| Y = aa.match(i); | |
| if (Y && Y[2]) { | |
| ac.type = Y[2] | |
| } | |
| ae.appendChild(ac) | |
| } else { | |
| if (ab[2] && ab[2].length > 0) { | |
| if (T) { | |
| Ext.functionFactory(ab[2]).call(T) | |
| } else { | |
| Ext.globalEval(ab[2]) | |
| } | |
| } | |
| } | |
| } | |
| Ext.callback(X, T || U) | |
| }, 20); | |
| V.innerHTML = S.replace(D, ""); | |
| return U | |
| }, | |
| setOpacity: function(R, Q) { | |
| var S = this; | |
| if (!S.dom) { | |
| return S | |
| } | |
| if (!Q || !S.anim) { | |
| S.setStyle("opacity", R) | |
| } else { | |
| if (typeof Q != "object") { | |
| Q = { | |
| duration: 350, | |
| easing: "ease-in" | |
| } | |
| } | |
| S.animate(Ext.applyIf({ | |
| to: { | |
| opacity: R | |
| } | |
| }, Q)) | |
| } | |
| return S | |
| }, | |
| setPositioning: function(Q) { | |
| return this.setStyle(Q) | |
| }, | |
| setVertical: function(T, Q) { | |
| var S = this | |
| , R = j.prototype; | |
| S.vertical = true; | |
| if (Q) { | |
| S.addCls(S.verticalCls = Q) | |
| } | |
| S.setWidth = R.setHeight; | |
| S.setHeight = R.setWidth; | |
| if (!Ext.isIE8) { | |
| S.getWidth = R.getHeight; | |
| S.getHeight = R.getWidth | |
| } | |
| S.styleHooks = (T === 270) ? R.verticalStyleHooks270 : R.verticalStyleHooks90 | |
| }, | |
| setSize: function(S, Q, R) { | |
| var T = this; | |
| if (Ext.isObject(S)) { | |
| R = Q; | |
| Q = S.height; | |
| S = S.width | |
| } | |
| if (!R || !T.anim) { | |
| T.dom.style.width = j.addUnits(S); | |
| T.dom.style.height = j.addUnits(Q); | |
| if (T.shadow || T.shim) { | |
| T.syncUnderlays() | |
| } | |
| } else { | |
| if (R === true) { | |
| R = {} | |
| } | |
| T.animate(Ext.applyIf({ | |
| to: { | |
| width: S, | |
| height: Q | |
| } | |
| }, R)) | |
| } | |
| return T | |
| }, | |
| setVisible: function(U, Q) { | |
| var S = this | |
| , T = S.dom | |
| , R = w(S); | |
| if (typeof Q === "string") { | |
| switch (Q) { | |
| case a: | |
| R = j.DISPLAY; | |
| break; | |
| case g: | |
| R = j.VISIBILITY; | |
| break; | |
| case O: | |
| R = j.OFFSETS; | |
| break; | |
| case c: | |
| R = j.CLIP; | |
| break | |
| } | |
| S.setVisibilityMode(R); | |
| Q = false | |
| } | |
| if (!Q || !S.anim) { | |
| if (R === j.DISPLAY) { | |
| return S.setDisplayed(U) | |
| } else { | |
| if (R === j.OFFSETS) { | |
| S[U ? "removeCls" : "addCls"](k) | |
| } else { | |
| if (R === j.CLIP) { | |
| S[U ? "removeCls" : "addCls"](p) | |
| } else { | |
| if (R === j.VISIBILITY) { | |
| S.fixDisplay(); | |
| T.style.visibility = U ? "" : M | |
| } | |
| } | |
| } | |
| } | |
| } else { | |
| if (U) { | |
| S.setOpacity(0.01); | |
| S.setVisible(true) | |
| } | |
| if (!Ext.isObject(Q)) { | |
| Q = { | |
| duration: 350, | |
| easing: "ease-in" | |
| } | |
| } | |
| S.animate(Ext.applyIf({ | |
| callback: function() { | |
| if (!U) { | |
| Ext.fly(T).setVisible(false).setOpacity(1) | |
| } | |
| }, | |
| to: { | |
| opacity: (U) ? 1 : 0 | |
| } | |
| }, Q)) | |
| } | |
| S.getData()[y] = U; | |
| if (S.shadow || S.shim) { | |
| S.setUnderlaysVisible(U) | |
| } | |
| return S | |
| }, | |
| setWidth: function(R, Q) { | |
| var S = this; | |
| if (!Q || !S.anim) { | |
| arguments.callee.$previous.apply(this, arguments) | |
| } else { | |
| if (!Ext.isObject(Q)) { | |
| Q = {} | |
| } | |
| S.animate(Ext.applyIf({ | |
| to: { | |
| width: R | |
| } | |
| }, Q)) | |
| } | |
| return S | |
| }, | |
| setX: function(Q, R) { | |
| return this.setXY([Q, this.getY()], R) | |
| }, | |
| setXY: function(S, Q) { | |
| var R = this; | |
| if (!Q || !R.anim) { | |
| arguments.callee.$previous.call(this, S) | |
| } else { | |
| if (!Ext.isObject(Q)) { | |
| Q = {} | |
| } | |
| R.animate(Ext.applyIf({ | |
| to: { | |
| x: S[0], | |
| y: S[1] | |
| } | |
| }, Q)) | |
| } | |
| return this | |
| }, | |
| setY: function(R, Q) { | |
| return this.setXY([this.getX(), R], Q) | |
| }, | |
| show: function(Q) { | |
| if (typeof Q === "string") { | |
| this.setVisible(true, Q); | |
| return this | |
| } | |
| this.setVisible(true, this.anim(Q)); | |
| return this | |
| }, | |
| slideIn: function(T, S, U) { | |
| var W = this, R = W.dom, Z = R.style, Y, Q, V, X; | |
| T = T || "t"; | |
| S = S || {}; | |
| Y = function() { | |
| var ae = this, ad = S.listeners, ac = Ext.fly(R, "_anim"), af, aa, ag, ab; | |
| if (!U) { | |
| ac.fixDisplay() | |
| } | |
| af = ac.getBox(); | |
| if ((T == "t" || T == "b") && af.height === 0) { | |
| af.height = R.scrollHeight | |
| } else { | |
| if ((T == "l" || T == "r") && af.width === 0) { | |
| af.width = R.scrollWidth | |
| } | |
| } | |
| aa = ac.getStyle(["width", "height", "left", "right", "top", "bottom", "position", "z-index"], true); | |
| ac.setSize(af.width, af.height); | |
| if (S.preserveScroll) { | |
| V = ac.cacheScrollValues() | |
| } | |
| ab = ac.wrap({ | |
| role: "presentation", | |
| id: Ext.id() + "-anim-wrap-for-" + ac.dom.id, | |
| style: { | |
| visibility: U ? "visible" : "hidden" | |
| } | |
| }); | |
| X = ab.dom.parentNode; | |
| ab.setPositioning(ac.getPositioning()); | |
| if (ab.isStyle("position", "static")) { | |
| ab.position("relative") | |
| } | |
| ac.clearPositioning("auto"); | |
| ab.clip(); | |
| if (V) { | |
| V() | |
| } | |
| ac.setStyle({ | |
| visibility: "", | |
| position: "absolute" | |
| }); | |
| if (U) { | |
| ab.setSize(af.width, af.height) | |
| } | |
| switch (T) { | |
| case "t": | |
| ag = { | |
| from: { | |
| width: af.width + "px", | |
| height: "0px" | |
| }, | |
| to: { | |
| width: af.width + "px", | |
| height: af.height + "px" | |
| } | |
| }; | |
| Z.bottom = "0px"; | |
| break; | |
| case "l": | |
| ag = { | |
| from: { | |
| width: "0px", | |
| height: af.height + "px" | |
| }, | |
| to: { | |
| width: af.width + "px", | |
| height: af.height + "px" | |
| } | |
| }; | |
| W.anchorAnimX(T); | |
| break; | |
| case "r": | |
| ag = { | |
| from: { | |
| x: af.x + af.width, | |
| width: "0px", | |
| height: af.height + "px" | |
| }, | |
| to: { | |
| x: af.x, | |
| width: af.width + "px", | |
| height: af.height + "px" | |
| } | |
| }; | |
| W.anchorAnimX(T); | |
| break; | |
| case "b": | |
| ag = { | |
| from: { | |
| y: af.y + af.height, | |
| width: af.width + "px", | |
| height: "0px" | |
| }, | |
| to: { | |
| y: af.y, | |
| width: af.width + "px", | |
| height: af.height + "px" | |
| } | |
| }; | |
| break; | |
| case "tl": | |
| ag = { | |
| from: { | |
| x: af.x, | |
| y: af.y, | |
| width: "0px", | |
| height: "0px" | |
| }, | |
| to: { | |
| width: af.width + "px", | |
| height: af.height + "px" | |
| } | |
| }; | |
| Z.bottom = "0px"; | |
| W.anchorAnimX("l"); | |
| break; | |
| case "bl": | |
| ag = { | |
| from: { | |
| y: af.y + af.height, | |
| width: "0px", | |
| height: "0px" | |
| }, | |
| to: { | |
| y: af.y, | |
| width: af.width + "px", | |
| height: af.height + "px" | |
| } | |
| }; | |
| W.anchorAnimX("l"); | |
| break; | |
| case "br": | |
| ag = { | |
| from: { | |
| x: af.x + af.width, | |
| y: af.y + af.height, | |
| width: "0px", | |
| height: "0px" | |
| }, | |
| to: { | |
| x: af.x, | |
| y: af.y, | |
| width: af.width + "px", | |
| height: af.height + "px" | |
| } | |
| }; | |
| W.anchorAnimX("r"); | |
| break; | |
| case "tr": | |
| ag = { | |
| from: { | |
| x: af.x + af.width, | |
| width: "0px", | |
| height: "0px" | |
| }, | |
| to: { | |
| x: af.x, | |
| width: af.width + "px", | |
| height: af.height + "px" | |
| } | |
| }; | |
| Z.bottom = "0px"; | |
| W.anchorAnimX("r"); | |
| break | |
| } | |
| ab.show(); | |
| Q = Ext.apply({}, S); | |
| delete Q.listeners; | |
| Q = new Ext.fx.Anim(Ext.applyIf(Q, { | |
| target: ab, | |
| duration: 500, | |
| easing: "ease-out", | |
| from: U ? ag.to : ag.from, | |
| to: U ? ag.from : ag.to | |
| })); | |
| Q.on("afteranimate", function() { | |
| var ah = Ext.fly(R, "_anim"); | |
| ah.setStyle(aa); | |
| if (U) { | |
| if (S.useDisplay) { | |
| ah.setDisplayed(false) | |
| } else { | |
| ah.hide() | |
| } | |
| } | |
| if (ab.dom) { | |
| if (ab.dom.parentNode) { | |
| ab.dom.parentNode.insertBefore(ah.dom, ab.dom) | |
| } else { | |
| X.appendChild(ah.dom) | |
| } | |
| ab.destroy() | |
| } | |
| if (V) { | |
| V() | |
| } | |
| ae.end() | |
| }); | |
| if (ad) { | |
| Q.on(ad) | |
| } | |
| } | |
| ; | |
| W.animate({ | |
| duration: S.duration ? Math.max(S.duration, 500) * 2 : 1000, | |
| listeners: { | |
| beforeanimate: Y | |
| } | |
| }); | |
| return W | |
| }, | |
| slideOut: function(Q, R) { | |
| return this.slideIn(Q, R, true) | |
| }, | |
| swallowEvent: function(R, S) { | |
| var U = this, V, Q, T = function(W) { | |
| W.stopPropagation(); | |
| if (S) { | |
| W.preventDefault() | |
| } | |
| } | |
| ; | |
| if (Ext.isArray(R)) { | |
| Q = R.length; | |
| for (V = 0; V < Q; V++) { | |
| U.on(R[V], T) | |
| } | |
| return U | |
| } | |
| U.on(R, T); | |
| return U | |
| }, | |
| switchOff: function(S) { | |
| var R = this, T = R.dom, Q; | |
| S = Ext.applyIf(S || {}, { | |
| easing: "ease-in", | |
| duration: 500, | |
| remove: false, | |
| useDisplay: false | |
| }); | |
| Q = function() { | |
| var Y = Ext.fly(T, "_anim"), X = this, W = Y.getSize(), Z = Y.getXY(), V, U; | |
| Y.clearOpacity(); | |
| Y.clip(); | |
| U = Y.getPositioning(); | |
| V = new Ext.fx.Animator({ | |
| target: T, | |
| duration: S.duration, | |
| easing: S.easing, | |
| keyframes: { | |
| 33: { | |
| opacity: 0.3 | |
| }, | |
| 66: { | |
| height: 1, | |
| y: Z[1] + W.height / 2 | |
| }, | |
| 100: { | |
| width: 1, | |
| x: Z[0] + W.width / 2 | |
| } | |
| } | |
| }); | |
| V.on("afteranimate", function() { | |
| var aa = Ext.fly(T, "_anim"); | |
| if (S.useDisplay) { | |
| aa.setDisplayed(false) | |
| } else { | |
| aa.hide() | |
| } | |
| aa.clearOpacity(); | |
| aa.setPositioning(U); | |
| aa.setSize(W); | |
| X.end() | |
| }) | |
| } | |
| ; | |
| R.animate({ | |
| duration: (Math.max(S.duration, 500) * 2), | |
| listeners: { | |
| beforeanimate: { | |
| fn: Q | |
| } | |
| }, | |
| callback: S.callback, | |
| scope: S.scope | |
| }); | |
| return R | |
| }, | |
| syncContent: function(R) { | |
| R = Ext.getDom(R); | |
| var S = R.childNodes, ad = S.length, ab = this.dom, ac = ab.childNodes, Z = ac.length, X, aa, U, W, T, Q, Y, V = ab._extData; | |
| if (Ext.isIE9m && ab.mergeAttributes) { | |
| ab.mergeAttributes(R, true); | |
| ab.src = R.src | |
| } else { | |
| T = R.attributes; | |
| Q = T.length; | |
| for (X = 0; X < Q; X++) { | |
| Y = T[X].name; | |
| if (Y !== "id") { | |
| ab.setAttribute(Y, T[X].value) | |
| } | |
| } | |
| } | |
| if (V) { | |
| V.isSynchronized = false | |
| } | |
| if (ad !== Z) { | |
| ab.innerHTML = R.innerHTML; | |
| return | |
| } | |
| for (X = 0; X < ad; X++) { | |
| U = S[X]; | |
| aa = ac[X]; | |
| W = U.nodeType; | |
| if (W !== aa.nodeType || (W === 1 && U.tagName !== aa.tagName)) { | |
| ab.innerHTML = R.innerHTML; | |
| return | |
| } | |
| if (W === 3) { | |
| aa.data = U.data | |
| } else { | |
| if (U.id && aa.id !== U.id) { | |
| aa.id = U.id | |
| } | |
| aa.style.cssText = U.style.cssText; | |
| aa.className = U.className; | |
| Ext.fly(aa, "_syncContent").syncContent(U) | |
| } | |
| } | |
| }, | |
| toggle: function(Q) { | |
| var R = this; | |
| R.setVisible(!R.isVisible(), R.anim(Q)); | |
| return R | |
| }, | |
| unmask: function() { | |
| var S = this, T = S.getData(), R = T.maskEl, Q; | |
| if (R) { | |
| Q = R.dom.style; | |
| if (Q.clearExpression) { | |
| Q.clearExpression("width"); | |
| Q.clearExpression("height") | |
| } | |
| if (R) { | |
| R.destroy(); | |
| delete T.maskEl | |
| } | |
| S.removeCls([n, z]) | |
| } | |
| S.restoreTabbableState(S.dom === E.body) | |
| }, | |
| unclip: function() { | |
| var R = this, S = R.getData(), Q; | |
| if (S[q]) { | |
| S[q] = false; | |
| Q = S[x]; | |
| if (Q.o) { | |
| R.setStyle(K, Q.o) | |
| } | |
| if (Q.x) { | |
| R.setStyle(u, Q.x) | |
| } | |
| if (Q.y) { | |
| R.setStyle(t, Q.y) | |
| } | |
| } | |
| return R | |
| }, | |
| translate: function(Q, S, R) { | |
| if (Ext.supports.CssTransforms && !Ext.isIE9m) { | |
| arguments.callee.$previous.apply(this, arguments) | |
| } else { | |
| if (Q != null ) { | |
| this.dom.style.left = Q + "px" | |
| } | |
| if (S != null ) { | |
| this.dom.style.top = S + "px" | |
| } | |
| } | |
| }, | |
| unselectable: function() { | |
| var Q = this; | |
| if (Ext.isOpera) { | |
| Q.dom.unselectable = "on" | |
| } | |
| Q.removeCls(j.selectableCls); | |
| Q.addCls(j.unselectableCls); | |
| return Q | |
| }, | |
| privates: { | |
| findTabbableElements: function(af) { | |
| var Q, aa, ac, U, V, Y = this.dom, X = Ext.Element.tabbableSavedCounterAttribute, ae = [], ad = 0, R, T, W, Z, ab, S; | |
| if (!Y) { | |
| return ae | |
| } | |
| if (af) { | |
| Q = af.skipSelf; | |
| aa = af.skipChildren; | |
| ac = af.excludeRoot; | |
| U = af.includeSaved; | |
| V = af.includeHidden | |
| } | |
| ac = ac && Ext.getDom(ac); | |
| if (ac && ac.contains(Y)) { | |
| return ae | |
| } | |
| if (!Q && ((U && Y.hasAttribute(X)) || this.isTabbable(V))) { | |
| ae[ad++] = Y | |
| } | |
| if (aa) { | |
| return ae | |
| } | |
| R = Y.querySelectorAll(Ext.Element.tabbableSelector); | |
| ab = R.length; | |
| if (!ab) { | |
| return ae | |
| } | |
| W = new Ext.dom.Fly(); | |
| for (Z = 0; Z < ab; Z++) { | |
| T = R[Z]; | |
| S = +T.getAttribute("tabIndex"); | |
| if (((U && T.hasAttribute(X)) || (!(S < 0) && W.attach(T).isTabbable(V))) && !(ac && (ac === T || ac.contains(T)))) { | |
| ae[ad++] = T | |
| } | |
| } | |
| return ae | |
| }, | |
| saveTabbableState: function(U) { | |
| var X = Ext.Element.tabbableSavedCounterAttribute, T = Ext.Element.tabbableSavedValueAttribute, R, S, W, V, Q; | |
| if (!U || U.includeSaved == null ) { | |
| U = Ext.Object.chain(U || null ); | |
| U.includeSaved = true | |
| } | |
| S = this.findTabbableElements(U); | |
| for (V = 0, | |
| Q = S.length; V < Q; V++) { | |
| W = S[V]; | |
| R = +W.getAttribute(X); | |
| if (R > 0) { | |
| W.setAttribute(X, ++R) | |
| } else { | |
| if (W.hasAttribute("tabIndex")) { | |
| W.setAttribute(T, W.getAttribute("tabIndex")) | |
| } else { | |
| W.setAttribute(T, "none") | |
| } | |
| W.setAttribute("tabIndex", "-1"); | |
| W.setAttribute(X, "1") | |
| } | |
| } | |
| return S | |
| }, | |
| restoreTabbableState: function(Q, W) { | |
| var U = this.dom, Y = Ext.Element.tabbableSavedCounterAttribute, Z = Ext.Element.tabbableSavedValueAttribute, S = [], aa, R, S, T, V, X; | |
| if (!U) { | |
| return this | |
| } | |
| if (!W) { | |
| S = Ext.Array.from(U.querySelectorAll("[" + Y + "]")) | |
| } | |
| if (!Q) { | |
| S.unshift(U) | |
| } | |
| for (V = 0, | |
| X = S.length; V < X; V++) { | |
| T = S[V]; | |
| if (!T.hasAttribute(Y) || !T.hasAttribute(Z)) { | |
| continue | |
| } | |
| R = +T.getAttribute(Y); | |
| if (R > 1) { | |
| T.setAttribute(Y, --R); | |
| continue | |
| } | |
| aa = T.getAttribute(Z); | |
| if (aa === "none") { | |
| T.removeAttribute("tabIndex") | |
| } else { | |
| T.setAttribute("tabIndex", aa) | |
| } | |
| T.removeAttribute(Z); | |
| T.removeAttribute(Y) | |
| } | |
| return S | |
| } | |
| }, | |
| deprecated: { | |
| "4.0": { | |
| methods: { | |
| pause: function(Q) { | |
| var R = this; | |
| Ext.fx.Manager.setFxDefaults(R.id, { | |
| delay: Q | |
| }); | |
| return R | |
| }, | |
| scale: function(Q, R, S) { | |
| this.animate(Ext.apply({}, S, { | |
| width: Q, | |
| height: R | |
| })); | |
| return this | |
| }, | |
| shift: function(Q) { | |
| this.animate(Q); | |
| return this | |
| } | |
| } | |
| }, | |
| "4.2": { | |
| methods: { | |
| moveTo: function(Q, S, R) { | |
| return this.setXY([Q, S], R) | |
| }, | |
| setBounds: function(R, U, T, Q, S) { | |
| return this.setBox({ | |
| x: R, | |
| y: U, | |
| width: T, | |
| height: Q | |
| }, S) | |
| }, | |
| setLeftTop: function(T, S) { | |
| var R = this | |
| , Q = R.dom.style; | |
| Q.left = j.addUnits(T); | |
| Q.top = j.addUnits(S); | |
| if (R.shadow || R.shim) { | |
| R.syncUnderlays() | |
| } | |
| return R | |
| }, | |
| setLocation: function(Q, S, R) { | |
| return this.setXY([Q, S], R) | |
| } | |
| } | |
| }, | |
| "5.0": { | |
| methods: { | |
| getAttributeNS: function(R, Q) { | |
| return this.getAttribute(Q, R) | |
| }, | |
| getCenterXY: function() { | |
| return this.getAlignToXY(E, "c-c") | |
| }, | |
| getComputedHeight: function() { | |
| return Math.max(this.dom.offsetHeight, this.dom.clientHeight) || parseFloat(this.getStyle(C)) || 0 | |
| }, | |
| getComputedWidth: function() { | |
| return Math.max(this.dom.offsetWidth, this.dom.clientWidth) || parseFloat(this.getStyle(e)) || 0 | |
| }, | |
| getStyleSize: function() { | |
| var U = this, V = this.dom, R = (V === E || V === E.body), T, Q, S; | |
| if (R) { | |
| return { | |
| width: j.getViewportWidth(), | |
| height: j.getViewportHeight() | |
| } | |
| } | |
| T = U.getStyle(["height", "width"], true); | |
| if (T.width && T.width !== "auto") { | |
| Q = parseFloat(T.width) | |
| } | |
| if (T.height && T.height !== "auto") { | |
| S = parseFloat(T.height) | |
| } | |
| return { | |
| width: Q || U.getWidth(true), | |
| height: S || U.getHeight(true) | |
| } | |
| }, | |
| isBorderBox: function() { | |
| return true | |
| }, | |
| isDisplayed: function() { | |
| return !this.isStyle("display", "none") | |
| }, | |
| focusable: "isFocusable" | |
| } | |
| } | |
| } | |
| } | |
| })(), function() { | |
| var q = Ext.dom.Element, p = q.prototype, w = !Ext.isIE8, b = document, m = b.defaultView, v = /alpha\(opacity=(.*)\)/i, h = /^\s+|\s+$/g, x = p.styleHooks, t = Ext.supports, e, o, d, s, g, y, c; | |
| p._init(q); | |
| delete p._init; | |
| Ext.plainTableCls = "x-table-plain"; | |
| Ext.plainListCls = "x-list-plain"; | |
| if (Ext.CompositeElementLite) { | |
| Ext.CompositeElementLite.importElementMethods() | |
| } | |
| if (!t.Opacity && Ext.isIE) { | |
| Ext.apply(x.opacity, { | |
| get: function(B) { | |
| var A = B.style.filter, z, k; | |
| if (A.match) { | |
| z = A.match(v); | |
| if (z) { | |
| k = parseFloat(z[1]); | |
| if (!isNaN(k)) { | |
| return k ? k / 100 : 0 | |
| } | |
| } | |
| } | |
| return 1 | |
| }, | |
| set: function(B, z) { | |
| var k = B.style | |
| , A = k.filter.replace(v, "").replace(h, ""); | |
| k.zoom = 1; | |
| if (typeof (z) === "number" && z >= 0 && z < 1) { | |
| z *= 100; | |
| k.filter = A + (A.length ? " " : "") + "alpha(opacity=" + z + ")" | |
| } else { | |
| k.filter = A | |
| } | |
| } | |
| }) | |
| } | |
| if (!t.matchesSelector) { | |
| var j = /^([a-z]+|\*)?(?:\.([a-z][a-z\-_0-9]*))?$/i, l = /\-/g, a, u = function(k, z) { | |
| var A = new RegExp("(?:^|\\s+)" + z.replace(l, "\\-") + "(?:\\s+|$)"); | |
| if (k && k !== "*") { | |
| k = k.toUpperCase(); | |
| return function(B) { | |
| return B.tagName === k && A.test(B.className) | |
| } | |
| } | |
| return function(B) { | |
| return A.test(B.className) | |
| } | |
| } | |
| , r = function(k) { | |
| k = k.toUpperCase(); | |
| return function(z) { | |
| return z.tagName === k | |
| } | |
| } | |
| , n = {}; | |
| p.matcherCache = n; | |
| p.is = function(k) { | |
| if (!k) { | |
| return true | |
| } | |
| var z = this.dom, F, B, E, D, C, A, G; | |
| if (z.nodeType !== 1) { | |
| return false | |
| } | |
| if (!(E = Ext.isFunction(k) ? k : n[k])) { | |
| if (!(B = k.match(j))) { | |
| D = z.parentNode; | |
| if (!D) { | |
| C = true; | |
| D = a || (a = b.createDocumentFragment()); | |
| a.appendChild(z) | |
| } | |
| A = Ext.Array.indexOf(Ext.fly(D, "_is").query(k), z) !== -1; | |
| if (C) { | |
| a.removeChild(z) | |
| } | |
| return A | |
| } | |
| G = B[1]; | |
| F = B[2]; | |
| n[k] = E = F ? u(G, F) : r(G) | |
| } | |
| return E(z) | |
| } | |
| } | |
| if (!m || !m.getComputedStyle) { | |
| p.getStyle = function(M, H) { | |
| var I = this, D = I.dom, O = typeof M !== "string", A = M, J = A, G = 1, B = H, z = I.styleHooks, N, F, L, K, C, k, E; | |
| if (O) { | |
| L = {}; | |
| A = J[0]; | |
| E = 0; | |
| if (!(G = J.length)) { | |
| return L | |
| } | |
| } | |
| if (!D || D.documentElement) { | |
| return L || "" | |
| } | |
| F = D.style; | |
| if (H) { | |
| k = F | |
| } else { | |
| k = D.currentStyle; | |
| if (!k) { | |
| B = true; | |
| k = F | |
| } | |
| } | |
| do { | |
| K = z[A]; | |
| if (!K) { | |
| z[A] = K = { | |
| name: q.normalize(A) | |
| } | |
| } | |
| if (K.get) { | |
| C = K.get(D, I, B, k) | |
| } else { | |
| N = K.name; | |
| C = k[N] | |
| } | |
| if (!O) { | |
| return C | |
| } | |
| L[A] = C; | |
| A = J[++E] | |
| } while (E < G);return L | |
| } | |
| } | |
| if (Ext.isIE8) { | |
| c = function(B, z, A, k) { | |
| if (k[this.styleName] === "none") { | |
| return "0px" | |
| } | |
| return k[this.name] | |
| } | |
| ; | |
| d = ["Top", "Right", "Bottom", "Left"]; | |
| s = d.length; | |
| while (s--) { | |
| g = d[s]; | |
| y = "border" + g + "Width"; | |
| x["border-" + g.toLowerCase() + "-width"] = x[y] = { | |
| name: y, | |
| styleName: "border" + g + "Style", | |
| get: c | |
| } | |
| } | |
| var i = "x-sync-repaint"; | |
| p.syncRepaint = function() { | |
| this.addCls(i); | |
| this.getWidth(); | |
| this.removeCls(i) | |
| } | |
| } | |
| if (Ext.isIE10m) { | |
| Ext.override(q, { | |
| focus: function(C, B) { | |
| var A = this, z; | |
| B = B || A.dom; | |
| if (Number(C)) { | |
| Ext.defer(A.focus, C, A, [null , B]) | |
| } else { | |
| Ext.GlobalEvents.fireEvent("beforefocus", B); | |
| if (B && (B.tagName === "INPUT" || B.tagname === "TEXTAREA")) { | |
| Ext.synchronouslyFocusing = document.activeElement | |
| } | |
| try { | |
| B.focus() | |
| } catch (k) { | |
| z = k | |
| } | |
| if (Ext.synchronouslyFocusing && document.activeElement !== B && !z) { | |
| B.focus() | |
| } | |
| Ext.synchronouslyFocusing = null | |
| } | |
| return A | |
| } | |
| }) | |
| } | |
| Ext.apply(Ext, { | |
| enableGarbageCollector: true, | |
| isBorderBox: true, | |
| useShims: false, | |
| getDetachedBody: function() { | |
| var k = Ext.detachedBodyEl; | |
| if (!k) { | |
| k = b.createElement("div"); | |
| Ext.detachedBodyEl = k = new Ext.dom.Fly(k); | |
| k.isDetachedBody = true | |
| } | |
| return k | |
| }, | |
| getElementById: function(A) { | |
| var z = b.getElementById(A), k; | |
| if (!z && (k = Ext.detachedBodyEl)) { | |
| z = k.dom.querySelector(Ext.makeIdSelector(A)) | |
| } | |
| return z | |
| }, | |
| addBehaviors: function(C) { | |
| if (!Ext.isReady) { | |
| Ext.onInternalReady(function() { | |
| Ext.addBehaviors(C) | |
| }) | |
| } else { | |
| var z = {}, B, k, A; | |
| for (k in C) { | |
| if ((B = k.split("@"))[1]) { | |
| A = B[0]; | |
| if (!z[A]) { | |
| z[A] = Ext.fly(document).select(A, true) | |
| } | |
| z[A].on(B[1], C[k]) | |
| } | |
| } | |
| z = null | |
| } | |
| } | |
| }); | |
| if (Ext.isIE9m) { | |
| Ext.getElementById = function(A) { | |
| var z = b.getElementById(A), k; | |
| if (!z && (k = Ext.detachedBodyEl)) { | |
| z = k.dom.all[A] | |
| } | |
| return z | |
| } | |
| ; | |
| p.getById = function(D, k) { | |
| var C = this.dom, z = null , B, A; | |
| if (C) { | |
| A = (w && b.getElementById(D)) || C.all[D]; | |
| if (A) { | |
| if (k) { | |
| z = A | |
| } else { | |
| B = Ext.cache[D]; | |
| if (B) { | |
| if (B.skipGarbageCollection || !Ext.isGarbage(B.dom)) { | |
| z = B | |
| } else { | |
| B.destroy() | |
| } | |
| } | |
| z = z || new Ext.Element(A) | |
| } | |
| } | |
| } | |
| return z | |
| } | |
| } else { | |
| if (!b.querySelector) { | |
| Ext.getDetachedBody = Ext.getBody; | |
| Ext.getElementById = function(k) { | |
| return b.getElementById(k) | |
| } | |
| ; | |
| p.getById = function(A, k) { | |
| var z = b.getElementById(A); | |
| return k ? z : (z ? Ext.get(z) : null ) | |
| } | |
| } | |
| } | |
| if (Ext.isIE && !(Ext.isIE9p && b.documentMode >= 9)) { | |
| p.getAttribute = function(k, A) { | |
| var B = this.dom, z; | |
| if (A) { | |
| z = typeof B[A + ":" + k]; | |
| if (z !== "undefined" && z !== "unknown") { | |
| return B[A + ":" + k] || null | |
| } | |
| return null | |
| } | |
| if (k === "for") { | |
| k = "htmlFor" | |
| } | |
| return B[k] || null | |
| } | |
| } | |
| Ext.onInternalReady(function() { | |
| var B = /^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i, z = [], G = p.setWidth, H = p.setHeight, L = p.setSize, M = /^\d+(?:\.\d*)?px$/i, F, D, k, K; | |
| if (t.FixedTableWidthBug) { | |
| x.width = { | |
| name: "width", | |
| set: function(S, R, P) { | |
| var O = S.style | |
| , N = P._needsTableWidthFix | |
| , Q = O.display; | |
| if (N) { | |
| O.display = "none" | |
| } | |
| O.width = R; | |
| if (N) { | |
| S.scrollWidth; | |
| O.display = Q | |
| } | |
| } | |
| }; | |
| p.setWidth = function(Q, O) { | |
| var S = this | |
| , T = S.dom | |
| , P = T.style | |
| , N = S._needsTableWidthFix | |
| , R = P.display; | |
| if (N && !O) { | |
| P.display = "none" | |
| } | |
| G.call(S, Q, O); | |
| if (N && !O) { | |
| T.scrollWidth; | |
| P.display = R | |
| } | |
| return S | |
| } | |
| ; | |
| p.setSize = function(R, O, P) { | |
| var T = this | |
| , U = T.dom | |
| , Q = U.style | |
| , N = T._needsTableWidthFix | |
| , S = Q.display; | |
| if (N && !P) { | |
| Q.display = "none" | |
| } | |
| L.call(T, R, O, P); | |
| if (N && !P) { | |
| U.scrollWidth; | |
| Q.display = S | |
| } | |
| return T | |
| } | |
| } | |
| if (Ext.isIE8) { | |
| x.height = { | |
| name: "height", | |
| set: function(S, R, P) { | |
| var O = P.component, Q, N; | |
| if (O && O._syncFrameHeight && P === O.el) { | |
| N = O.frameBody.dom.style; | |
| if (M.test(R)) { | |
| Q = O.getFrameInfo(); | |
| if (Q) { | |
| N.height = (parseInt(R, 10) - Q.height) + "px" | |
| } | |
| } else { | |
| if (!R || R === "auto") { | |
| N.height = "" | |
| } | |
| } | |
| } | |
| S.style.height = R | |
| } | |
| }; | |
| p.setHeight = function(N, P) { | |
| var Q = this.component, R, O; | |
| if (Q && Q._syncFrameHeight && this === Q.el) { | |
| O = Q.frameBody.dom.style; | |
| if (!N || N === "auto") { | |
| O.height = "" | |
| } else { | |
| R = Q.getFrameInfo(); | |
| if (R) { | |
| O.height = (N - R.height) + "px" | |
| } | |
| } | |
| } | |
| return H.call(this, N, P) | |
| } | |
| ; | |
| p.setSize = function(R, N, P) { | |
| var Q = this.component, S, O; | |
| if (Q && Q._syncFrameHeight && this === Q.el) { | |
| O = Q.frameBody.dom.style; | |
| if (!N || N === "auto") { | |
| O.height = "" | |
| } else { | |
| S = Q.getFrameInfo(); | |
| if (S) { | |
| O.height = (N - S.height) + "px" | |
| } | |
| } | |
| } | |
| return L.call(this, R, N, P) | |
| } | |
| } | |
| Ext.getDoc().on("selectstart", function(R, S) { | |
| var Q = q.selectableCls | |
| , P = q.unselectableCls | |
| , N = S && S.tagName; | |
| N = N && N.toLowerCase(); | |
| if (N === "input" || N === "textarea") { | |
| return | |
| } | |
| while (S && S.nodeType === 1 && S !== b.documentElement) { | |
| var O = Ext.fly(S); | |
| if (O.hasCls(Q)) { | |
| return | |
| } | |
| if (O.hasCls(P)) { | |
| R.stopEvent(); | |
| return | |
| } | |
| S = S.parentNode | |
| } | |
| }); | |
| function E(R, O, Q, N) { | |
| var P = N[this.name] || ""; | |
| return B.test(P) ? "transparent" : P | |
| } | |
| function J(O, P, N) { | |
| return function() { | |
| O.selectionStart = P; | |
| O.selectionEnd = N | |
| } | |
| } | |
| function I(R) { | |
| var P = t.DisplayChangeInputSelectionBug, Q = t.DisplayChangeTextAreaSelectionBug, S, N, T, O; | |
| if (P || Q) { | |
| S = q.getActiveElement(); | |
| N = S && S.tagName; | |
| if ((Q && N === "TEXTAREA") || (P && N === "INPUT" && S.type === "text")) { | |
| if (Ext.fly(R).isAncestor(S)) { | |
| T = S.selectionStart; | |
| O = S.selectionEnd; | |
| if (Ext.isNumber(T) && Ext.isNumber(O)) { | |
| return J(S, T, O) | |
| } | |
| } | |
| } | |
| } | |
| return Ext.emptyFn | |
| } | |
| function C(T, Q, S, P) { | |
| var N = P.marginRight, O, R; | |
| if (N !== "0px") { | |
| O = T.style; | |
| R = O.display; | |
| O.display = "inline-block"; | |
| N = (S ? P : T.ownerDocument.defaultView.getComputedStyle(T, null )).marginRight; | |
| O.display = R | |
| } | |
| return N | |
| } | |
| function A(U, R, T, Q) { | |
| var N = Q.marginRight, P, O, S; | |
| if (N !== "0px") { | |
| P = U.style; | |
| O = I(U); | |
| S = P.display; | |
| P.display = "inline-block"; | |
| N = (T ? Q : U.ownerDocument.defaultView.getComputedStyle(U, "")).marginRight; | |
| P.display = S; | |
| O() | |
| } | |
| return N | |
| } | |
| if (!t.RightMargin) { | |
| x.marginRight = x["margin-right"] = { | |
| name: "marginRight", | |
| get: (t.DisplayChangeInputSelectionBug || t.DisplayChangeTextAreaSelectionBug) ? A : C | |
| } | |
| } | |
| if (!t.TransparentColor) { | |
| F = ["background-color", "border-color", "color", "outline-color"]; | |
| for (D = F.length; D--; ) { | |
| k = F[D]; | |
| K = q.normalize(k); | |
| x[k] = x[K] = { | |
| name: K, | |
| get: E | |
| } | |
| } | |
| } | |
| p.verticalStyleHooks90 = e = Ext.Object.chain(x); | |
| p.verticalStyleHooks270 = o = Ext.Object.chain(x); | |
| e.width = x.height || { | |
| name: "height" | |
| }; | |
| e.height = x.width || { | |
| name: "width" | |
| }; | |
| e["margin-top"] = { | |
| name: "marginLeft" | |
| }; | |
| e["margin-right"] = { | |
| name: "marginTop" | |
| }; | |
| e["margin-bottom"] = { | |
| name: "marginRight" | |
| }; | |
| e["margin-left"] = { | |
| name: "marginBottom" | |
| }; | |
| e["padding-top"] = { | |
| name: "paddingLeft" | |
| }; | |
| e["padding-right"] = { | |
| name: "paddingTop" | |
| }; | |
| e["padding-bottom"] = { | |
| name: "paddingRight" | |
| }; | |
| e["padding-left"] = { | |
| name: "paddingBottom" | |
| }; | |
| e["border-top"] = { | |
| name: "borderLeft" | |
| }; | |
| e["border-right"] = { | |
| name: "borderTop" | |
| }; | |
| e["border-bottom"] = { | |
| name: "borderRight" | |
| }; | |
| e["border-left"] = { | |
| name: "borderBottom" | |
| }; | |
| o.width = x.height || { | |
| name: "height" | |
| }; | |
| o.height = x.width || { | |
| name: "width" | |
| }; | |
| o["margin-top"] = { | |
| name: "marginRight" | |
| }; | |
| o["margin-right"] = { | |
| name: "marginBottom" | |
| }; | |
| o["margin-bottom"] = { | |
| name: "marginLeft" | |
| }; | |
| o["margin-left"] = { | |
| name: "marginTop" | |
| }; | |
| o["padding-top"] = { | |
| name: "paddingRight" | |
| }; | |
| o["padding-right"] = { | |
| name: "paddingBottom" | |
| }; | |
| o["padding-bottom"] = { | |
| name: "paddingLeft" | |
| }; | |
| o["padding-left"] = { | |
| name: "paddingTop" | |
| }; | |
| o["border-top"] = { | |
| name: "borderRight" | |
| }; | |
| o["border-right"] = { | |
| name: "borderBottom" | |
| }; | |
| o["border-bottom"] = { | |
| name: "borderLeft" | |
| }; | |
| o["border-left"] = { | |
| name: "borderTop" | |
| }; | |
| if (!Ext.scopeCss) { | |
| z.push("x-body") | |
| } | |
| if (t.Touch) { | |
| z.push("x-touch") | |
| } | |
| if (Ext.isIE && Ext.isIE9m) { | |
| z.push("x-ie", "x-ie9m"); | |
| z.push("x-ie8p"); | |
| if (Ext.isIE8) { | |
| z.push("x-ie8") | |
| } else { | |
| z.push("x-ie9", "x-ie9p") | |
| } | |
| if (Ext.isIE8m) { | |
| z.push("x-ie8m") | |
| } | |
| } | |
| if (Ext.isIE10) { | |
| z.push("x-ie10") | |
| } | |
| if (Ext.isIE10p) { | |
| z.push("x-ie10p") | |
| } | |
| if (Ext.isIE11) { | |
| z.push("x-ie11") | |
| } | |
| if (Ext.isGecko) { | |
| z.push("x-gecko") | |
| } | |
| if (Ext.isOpera) { | |
| z.push("x-opera") | |
| } | |
| if (Ext.isOpera12m) { | |
| z.push("x-opera12m") | |
| } | |
| if (Ext.isWebKit) { | |
| z.push("x-webkit") | |
| } | |
| if (Ext.isSafari) { | |
| z.push("x-safari") | |
| } | |
| if (Ext.isChrome) { | |
| z.push("x-chrome") | |
| } | |
| if (Ext.isMac) { | |
| z.push("x-mac") | |
| } | |
| if (Ext.isLinux) { | |
| z.push("x-linux") | |
| } | |
| if (!t.CSS3BorderRadius) { | |
| z.push("x-nbr") | |
| } | |
| if (!t.CSS3LinearGradient) { | |
| z.push("x-nlg") | |
| } | |
| if (t.Touch) { | |
| z.push("x-touch") | |
| } | |
| Ext.getBody().addCls(z) | |
| }, null , { | |
| priority: 1500 | |
| }) | |
| }); | |
| (Ext.cmd.derive("Ext.GlobalEvents", Ext.mixin.Observable, { | |
| alternateClassName: "Ext.globalEvents", | |
| observableType: "global", | |
| singleton: true, | |
| resizeBuffer: 100, | |
| idleEventMask: { | |
| mousemove: 1, | |
| touchmove: 1, | |
| pointermove: 1, | |
| MSPointerMove: 1, | |
| unload: 1 | |
| }, | |
| constructor: function() { | |
| var a = this; | |
| a.callParent(); | |
| Ext.onInternalReady(function() { | |
| a.attachListeners() | |
| }) | |
| }, | |
| attachListeners: function() { | |
| Ext.get(window).on("resize", this.fireResize, this, { | |
| buffer: this.resizeBuffer | |
| }); | |
| Ext.getDoc().on("mousedown", this.fireMouseDown, this) | |
| }, | |
| fireMouseDown: function(a) { | |
| this.fireEvent("mousedown", a) | |
| }, | |
| fireResize: function() { | |
| var d = this | |
| , b = Ext.Element | |
| , a = b.getViewportWidth() | |
| , c = b.getViewportHeight(); | |
| if (d.curHeight !== c || d.curWidth !== a) { | |
| d.curHeight = c; | |
| d.curWidth = a; | |
| d.fireEvent("resize", a, c) | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext, "GlobalEvents", Ext, "globalEvents"], function(a) { | |
| Ext.on = function() { | |
| return a.addListener.apply(a, arguments) | |
| } | |
| ; | |
| Ext.un = function() { | |
| return a.removeListener.apply(a, arguments) | |
| } | |
| })); | |
| Ext.define("Ext.overrides.GlobalEvents", { | |
| override: "Ext.GlobalEvents", | |
| deprecated: { | |
| 5: { | |
| methods: { | |
| addListener: function(d, h, i, j, c, b, e) { | |
| var a, g; | |
| if (d === "ready") { | |
| g = h | |
| } else { | |
| if (typeof d !== "string") { | |
| for (a in d) { | |
| if (a === "ready") { | |
| g = d[a] | |
| } | |
| } | |
| } | |
| } | |
| if (g) { | |
| Ext.onReady(g) | |
| } | |
| this.callParent([d, h, i, j, c, b, e]) | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| Ext.USE_NATIVE_JSON = false; | |
| Ext.JSON = (new (function() { | |
| var me = this | |
| , hasNative = window.JSON && JSON.toString() === "[object JSON]" | |
| , useHasOwn = !!{}.hasOwnProperty | |
| , pad = function(n) { | |
| return n < 10 ? "0" + n : n | |
| } | |
| , doDecode = function(json) { | |
| return eval("(" + json + ")") | |
| } | |
| , doEncode = function(o, newline) { | |
| if (o === null || o === undefined) { | |
| return "null" | |
| } else { | |
| if (Ext.isDate(o)) { | |
| return me.encodeDate(o) | |
| } else { | |
| if (Ext.isString(o)) { | |
| if (Ext.isMSDate(o)) { | |
| return me.encodeMSDate(o) | |
| } else { | |
| return me.encodeString(o) | |
| } | |
| } else { | |
| if (typeof o === "number") { | |
| return isFinite(o) ? String(o) : "null" | |
| } else { | |
| if (Ext.isBoolean(o)) { | |
| return String(o) | |
| } else { | |
| if (o.toJSON) { | |
| return o.toJSON() | |
| } else { | |
| if (Ext.isArray(o)) { | |
| return encodeArray(o, newline) | |
| } else { | |
| if (Ext.isObject(o)) { | |
| return encodeObject(o, newline) | |
| } else { | |
| if (typeof o === "function") { | |
| return "null" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return "undefined" | |
| } | |
| , m = { | |
| "\b": "\\b", | |
| "\t": "\\t", | |
| "\n": "\\n", | |
| "\f": "\\f", | |
| "\r": "\\r", | |
| '"': '\\"', | |
| "\\": "\\\\", | |
| "\v": "\\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) | |
| }) + '"' | |
| } | |
| , encodeMSDate = function(o) { | |
| return '"' + o + '"' | |
| } | |
| , encodeArrayPretty = function(o, newline) { | |
| var len = o.length, cnewline = newline + " ", sep = "," + cnewline, a = ["[", cnewline], i; | |
| for (i = 0; i < len; i += 1) { | |
| a.push(me.encodeValue(o[i], cnewline), sep) | |
| } | |
| a[a.length - 1] = newline + "]"; | |
| return a.join("") | |
| } | |
| , encodeObjectPretty = function(o, newline) { | |
| var cnewline = newline + " ", sep = "," + cnewline, a = ["{", cnewline], i, val; | |
| for (i in o) { | |
| val = o[i]; | |
| if (!useHasOwn || o.hasOwnProperty(i)) { | |
| if (typeof val === "function" || val === undefined) { | |
| continue | |
| } | |
| a.push(me.encodeValue(i) + ": " + me.encodeValue(val, cnewline), sep) | |
| } | |
| } | |
| a[a.length - 1] = newline + "}"; | |
| return a.join("") | |
| } | |
| , encodeArray = function(o, newline) { | |
| if (newline) { | |
| return encodeArrayPretty(o, newline) | |
| } | |
| var a = ["[", ""], len = o.length, i; | |
| for (i = 0; i < len; i += 1) { | |
| a.push(me.encodeValue(o[i]), ",") | |
| } | |
| a[a.length - 1] = "]"; | |
| return a.join("") | |
| } | |
| , encodeObject = function(o, newline) { | |
| if (newline) { | |
| return encodeObjectPretty(o, newline) | |
| } | |
| var a = ["{", ""], i, val; | |
| for (i in o) { | |
| val = o[i]; | |
| if (!useHasOwn || o.hasOwnProperty(i)) { | |
| if (typeof val === "function" || val === undefined) { | |
| continue | |
| } | |
| a.push(me.encodeValue(i), ":", me.encodeValue(val), ",") | |
| } | |
| } | |
| a[a.length - 1] = "}"; | |
| return a.join("") | |
| } | |
| ; | |
| me.encodeString = encodeString; | |
| me.encodeValue = doEncode; | |
| me.encodeDate = function(o) { | |
| return '"' + o.getFullYear() + "-" + pad(o.getMonth() + 1) + "-" + pad(o.getDate()) + "T" + pad(o.getHours()) + ":" + pad(o.getMinutes()) + ":" + pad(o.getSeconds()) + '"' | |
| } | |
| ; | |
| me.encode = function(o) { | |
| if (hasNative && Ext.USE_NATIVE_JSON) { | |
| return JSON.stringify(o) | |
| } | |
| return me.encodeValue(o) | |
| } | |
| ; | |
| me.decode = function(json, safe) { | |
| try { | |
| if (hasNative && Ext.USE_NATIVE_JSON) { | |
| return JSON.parse(json) | |
| } | |
| return doDecode(json) | |
| } catch (e) { | |
| if (safe) { | |
| return null | |
| } | |
| Ext.raise({ | |
| sourceClass: "Ext.JSON", | |
| sourceMethod: "decode", | |
| msg: "You're trying to decode an invalid JSON String: " + json | |
| }) | |
| } | |
| } | |
| ; | |
| me.encodeMSDate = encodeMSDate; | |
| if (!Ext.util) { | |
| Ext.util = {} | |
| } | |
| Ext.util.JSON = me; | |
| Ext.encode = me.encode; | |
| Ext.decode = me.decode | |
| } | |
| )()); | |
| (Ext.cmd.derive("Ext.mixin.Inheritable", Ext.Mixin, { | |
| mixinConfig: { | |
| id: "inheritable" | |
| }, | |
| getInherited: function(j) { | |
| var e = this, h = (j && e.inheritedStateInner) || e.inheritedState, b = e.getRefOwner(), a = e.isContainer, i, c, d, g; | |
| if (!h || h.invalid) { | |
| i = e.getRefOwner(); | |
| g = e.ownerLayout; | |
| if (b) { | |
| d = g ? g === b.layout : true | |
| } | |
| e.inheritedState = h = Ext.Object.chain(i ? i.getInherited(d) : Ext.rootInheritedState); | |
| if (a) { | |
| e.inheritedStateInner = c = Ext.Object.chain(h) | |
| } | |
| e.initInheritedState(h, c); | |
| h = (a && j) ? e.inheritedStateInner : e.inheritedState | |
| } | |
| return h | |
| }, | |
| getInheritedConfig: function(e, a) { | |
| var d = this.inheritedState, b, c; | |
| if (!d || d.invalid) { | |
| d = this.getInherited() | |
| } | |
| c = d[e]; | |
| if (a && d.hasOwnProperty(e)) { | |
| b = c; | |
| delete d[e]; | |
| c = d[e]; | |
| d[e] = b | |
| } | |
| return c | |
| }, | |
| resolveListenerScope: function(g, a) { | |
| var d = this, e = (typeof a === "boolean"), c = Ext._namedScopes[g], b; | |
| if (!c) { | |
| b = d.getInheritedConfig("defaultListenerScope", e ? a : true) || g || d | |
| } else { | |
| if (c.isController) { | |
| b = d.getInheritedConfig("controller", e ? a : !c.isSelf) | |
| } else { | |
| if (c.isSelf) { | |
| b = d.getInheritedConfig("defaultListenerScope", e && a) || d | |
| } else { | |
| if (c.isThis) { | |
| b = d | |
| } | |
| } | |
| } | |
| } | |
| return b || null | |
| }, | |
| resolveSatelliteListenerScope: function(c, e) { | |
| var d = this, b = Ext._namedScopes[e], a; | |
| if (!b) { | |
| a = d.getInheritedConfig("defaultListenerScope") || e || d | |
| } else { | |
| if (b.isController) { | |
| a = d.getInheritedConfig("controller") | |
| } else { | |
| if (b.isSelf) { | |
| a = d.getInheritedConfig("defaultListenerScope") || c | |
| } else { | |
| if (b.isThis) { | |
| a = c | |
| } | |
| } | |
| } | |
| } | |
| return a || null | |
| }, | |
| lookupReferenceHolder: function(a) { | |
| return this.getInheritedConfig("referenceHolder", a !== false) || null | |
| }, | |
| getRefOwner: function() { | |
| var a = this; | |
| return a.ownerCt || a.parent || a.$initParent || a.ownerCmp || a.floatParent | |
| }, | |
| invalidateInheritedState: function() { | |
| var a = this.inheritedState; | |
| if (a) { | |
| a.invalid = true; | |
| delete this.inheritedState | |
| } | |
| }, | |
| privates: { | |
| fixReference: function() { | |
| var a = this, b; | |
| if (a.getReference()) { | |
| b = a.lookupReferenceHolder(); | |
| if (b) { | |
| b.attachReference(a) | |
| } | |
| } | |
| }, | |
| onInheritedAdd: function(b, a) { | |
| var c = this; | |
| if (c.inheritedState && a) { | |
| c.invalidateInheritedState() | |
| } | |
| if (c.getReference()) { | |
| Ext.ComponentManager.markReferencesDirty() | |
| } | |
| }, | |
| onInheritedRemove: function(b) { | |
| var a = this, c; | |
| if (a.getReference()) { | |
| c = a.lookupReferenceHolder(); | |
| if (c) { | |
| c.clearReference(a) | |
| } | |
| } | |
| if (a.inheritedState && !b) { | |
| a.invalidateInheritedState() | |
| } | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.mixin, "Inheritable"], function() { | |
| Ext.rootInheritedState = {} | |
| })); | |
| (Ext.cmd.derive("Ext.mixin.Bindable", Ext.Base, { | |
| mixinId: "bindable", | |
| config: { | |
| bind: { | |
| $value: null , | |
| lazy: true | |
| }, | |
| controller: null , | |
| defaultListenerScope: false, | |
| publishes: { | |
| $value: null , | |
| lazy: true, | |
| merge: function(b, a) { | |
| return this.mergeSets(b, a) | |
| } | |
| }, | |
| reference: null , | |
| session: { | |
| $value: null , | |
| lazy: true | |
| }, | |
| twoWayBindable: { | |
| $value: null , | |
| lazy: true, | |
| merge: function(b, a) { | |
| return this.mergeSets(b, a) | |
| } | |
| }, | |
| viewModel: { | |
| $value: null , | |
| lazy: true | |
| } | |
| }, | |
| defaultBindProperty: null , | |
| validRefRe: /^[a-z_][a-z0-9_]*$/i, | |
| initInheritedState: function(d) { | |
| var e = this | |
| , a = e.getReference() | |
| , b = e.getController() | |
| , c = e.getConfig("viewModel", true) | |
| , h = e.getConfig("session", true) | |
| , g = e.getDefaultListenerScope(); | |
| if (b) { | |
| d.controller = b | |
| } | |
| if (g) { | |
| d.defaultListenerScope = e | |
| } else { | |
| if (b) { | |
| d.defaultListenerScope = b | |
| } | |
| } | |
| if (c) { | |
| if (!c.isViewModel) { | |
| c = e | |
| } | |
| d.viewModel = c | |
| } | |
| if (h) { | |
| if (!h.isSession) { | |
| h = e | |
| } | |
| d.session = h | |
| } | |
| if (a) { | |
| e.referenceKey = (d.referencePath || "") + a; | |
| e.viewModelKey = (d.viewModelPath || "") + a | |
| } | |
| }, | |
| lookupController: function(a) { | |
| return this.getInheritedConfig("controller", a) || null | |
| }, | |
| lookupSession: function(a) { | |
| var b = a ? null : this.getSession(); | |
| if (!b) { | |
| b = this.getInheritedConfig("session", a); | |
| if (b && !b.isSession) { | |
| b = b.getInherited().session = b.getSession() | |
| } | |
| } | |
| return b || null | |
| }, | |
| lookupViewModel: function(a) { | |
| var b = a ? null : this.getViewModel(); | |
| if (!b) { | |
| b = this.getInheritedConfig("viewModel", a); | |
| if (b && !b.isViewModel) { | |
| b = b.getInherited().viewModel = b.getViewModel() | |
| } | |
| } | |
| return b || null | |
| }, | |
| publishState: function(k, j) { | |
| var i = this, b = i.publishedState, e = i.getBind(), h = e && k && e[k], g = 0, c, a, d, l; | |
| if (h && !h.syncing && !h.isReadOnly()) { | |
| if (!(h.calls === 0 && (j == null || j === i.getInitialConfig()[k]))) { | |
| h.setValue(j) | |
| } | |
| } | |
| if (!(a = i.getPublishes())) { | |
| return | |
| } | |
| if (!(d = i.lookupViewModel())) { | |
| return | |
| } | |
| if (!(l = i.viewModelKey)) { | |
| return | |
| } | |
| if (k && b) { | |
| if (!a[k]) { | |
| return | |
| } | |
| if (!(j && j.constructor === Object) && !(j instanceof Array)) { | |
| if (b[k] === j) { | |
| return | |
| } | |
| } | |
| l += "."; | |
| l += k | |
| } else { | |
| b = b || (i.publishedState = {}); | |
| for (c in a) { | |
| ++g; | |
| if (c === k) { | |
| b[c] = j | |
| } else { | |
| b[c] = i[c] | |
| } | |
| } | |
| if (!g) { | |
| return | |
| } | |
| j = b | |
| } | |
| d.set(l, j) | |
| }, | |
| privates: { | |
| addBindableUpdater: function(c) { | |
| var b = this, d = b.self.$config.configs, a = d[c], e; | |
| if (a && !b.hasOwnProperty(e = a.names.update)) { | |
| b[e] = a.bindableUpdater || (a.root.bindableUpdater = b.makeBindableUpdater(a)) | |
| } | |
| }, | |
| applyBind: function(d, k) { | |
| if (!d) { | |
| return d | |
| } | |
| var g = this, i = g.lookupViewModel(), e = g.getTwoWayBindable(), a = g._getBindTemplateScope, h, j, c; | |
| if (!k || typeof k === "string") { | |
| k = {} | |
| } | |
| if (Ext.isString(d)) { | |
| h = d; | |
| d = {}; | |
| d[g.defaultBindProperty] = h | |
| } | |
| for (j in d) { | |
| c = d[j]; | |
| h = k[j]; | |
| if (h && typeof h !== "string") { | |
| h.destroy(); | |
| h = null | |
| } | |
| if (c) { | |
| h = i.bind(c, g.onBindNotify, g); | |
| h._config = Ext.Config.get(j); | |
| h.getTemplateScope = a | |
| } | |
| k[j] = h; | |
| if (e && e[j] && !h.isReadOnly()) { | |
| g.addBindableUpdater(j) | |
| } | |
| } | |
| return k | |
| }, | |
| applyController: function(a) { | |
| if (a) { | |
| a = Ext.Factory.controller(a); | |
| a.setView(this) | |
| } | |
| return a | |
| }, | |
| applyPublishes: function(a) { | |
| if (this.lookupViewModel()) { | |
| for (var b in a) { | |
| this.addBindableUpdater(b) | |
| } | |
| } | |
| return a | |
| }, | |
| applySession: function(c) { | |
| if (!c) { | |
| return null | |
| } | |
| if (!c.isSession) { | |
| var b = this.lookupSession(true) | |
| , a = (c === true) ? {} : c; | |
| if (b) { | |
| c = b.spawn(a) | |
| } else { | |
| c = new Ext.data.Session(a) | |
| } | |
| } | |
| return c | |
| }, | |
| applyViewModel: function(b) { | |
| var c = this, a, d; | |
| if (!b) { | |
| return null | |
| } | |
| if (!b.isViewModel) { | |
| a = { | |
| parent: c.lookupViewModel(true) | |
| }; | |
| a.session = c.getSession(); | |
| if (!d && !a.parent) { | |
| a.session = c.lookupSession() | |
| } | |
| if (b) { | |
| if (b.constructor === Object) { | |
| Ext.apply(a, b) | |
| } else { | |
| if (typeof b === "string") { | |
| a.type = b | |
| } | |
| } | |
| } | |
| b = Ext.Factory.viewModel(a) | |
| } | |
| return b | |
| }, | |
| _getBindTemplateScope: function() { | |
| return this.scope.resolveListenerScope() | |
| }, | |
| destroyBindable: function() { | |
| var c = this | |
| , b = c.getConfig("viewModel", true) | |
| , d = c.getConfig("session", true) | |
| , a = c.getController(); | |
| if (b && b.isViewModel) { | |
| b.destroy(); | |
| c.setViewModel(null ) | |
| } | |
| if (d && d.isSession) { | |
| if (d.getAutoDestroy()) { | |
| d.destroy() | |
| } | |
| c.setSession(null ) | |
| } | |
| if (a) { | |
| c.setController(null ); | |
| a.destroy() | |
| } | |
| }, | |
| initBindable: function() { | |
| this.initBindable = Ext.emptyFn; | |
| this.getBind(); | |
| this.getPublishes() | |
| }, | |
| makeBindableUpdater: function(a) { | |
| var b = a.names.update; | |
| return function(e, c) { | |
| var d = this | |
| , g = d.self.prototype[b]; | |
| if (g) { | |
| g.call(d, e, c) | |
| } | |
| d.publishState(a.name, e) | |
| } | |
| }, | |
| isSyncing: function(b) { | |
| var d = this.getBind(), a = false, c; | |
| if (d) { | |
| c = d[b]; | |
| if (c) { | |
| a = c.syncing > 0 | |
| } | |
| } | |
| return a | |
| }, | |
| onBindNotify: function(b, a, c) { | |
| c.syncing = (c.syncing + 1) || 1; | |
| this[c._config.names.set](b); | |
| --c.syncing | |
| }, | |
| removeBindings: function() { | |
| var b = this, d, a, c; | |
| if (!b.destroying) { | |
| d = b.getBind(); | |
| if (d && typeof d !== "string") { | |
| for (a in d) { | |
| c = d[a]; | |
| c.destroy(); | |
| c._config = c.getTemplateScope = null | |
| } | |
| } | |
| } | |
| b.setBind(null ) | |
| }, | |
| updateSession: function(b) { | |
| var a = this.getInherited(); | |
| if (b) { | |
| a.session = b | |
| } else { | |
| delete a.session | |
| } | |
| }, | |
| updateViewModel: function(b) { | |
| var c = this.getInherited() | |
| , a = this.getController(); | |
| if (b) { | |
| c.viewModel = b; | |
| b.setView(this); | |
| if (a) { | |
| a.initViewModel(b) | |
| } | |
| } else { | |
| delete c.viewModel | |
| } | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.mixin, "Bindable"], 0)); | |
| (Ext.cmd.derive("Ext.mixin.ComponentDelegation", Ext.Mixin, { | |
| mixinConfig: { | |
| id: "componentDelegation" | |
| }, | |
| privates: { | |
| addDelegatedListener: function(g, i, k, l, d, c, e) { | |
| var h = this, b, a, j; | |
| d = d || l.order; | |
| if (d) { | |
| j = (l && l.priority); | |
| if (!j) { | |
| l = l ? Ext.Object.chain(l) : {}; | |
| l.priority = h.$orderToPriority[d] | |
| } | |
| } | |
| b = h.$delegatedEvents || (h.$delegatedEvents = {}); | |
| a = b[g] || (b[g] = new Ext.util.Event(h,g)); | |
| if (a.addListener(i, k, l, c, e)) { | |
| h.$hasDelegatedListeners._incr_(g) | |
| } | |
| }, | |
| clearDelegatedListeners: function() { | |
| var d = this, b = d.$delegatedEvents, a, c, e; | |
| if (b) { | |
| for (a in b) { | |
| c = b[a]; | |
| e = c.listeners.length; | |
| c.clearListeners(); | |
| d.$hasDelegatedListeners._decr_(a, e); | |
| delete b[a] | |
| } | |
| } | |
| }, | |
| doFireDelegatedEvent: function(b, d) { | |
| var h = this, c = true, a, e, g; | |
| if (h.$hasDelegatedListeners[b]) { | |
| a = h.getRefOwner(); | |
| while (a) { | |
| e = a.$delegatedEvents; | |
| if (e) { | |
| g = e[b]; | |
| if (g) { | |
| c = g.fireDelegated(h, d); | |
| if (c === false) { | |
| break | |
| } | |
| } | |
| } | |
| a = a.getRefOwner() | |
| } | |
| } | |
| return c | |
| }, | |
| removeDelegatedListener: function(a, d, c) { | |
| var g = this, b = g.$delegatedEvents, e; | |
| if (b) { | |
| e = b[a]; | |
| if (e && e.removeListener(d, c)) { | |
| g.$hasDelegatedListeners._decr_(a); | |
| if (e.listeners.length === 0) { | |
| delete b[a] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| onClassMixedIn: function(a) { | |
| function b() {} | |
| a.prototype.HasListeners = a.HasListeners = b; | |
| b.prototype = a.hasListeners = new Ext.mixin.ComponentDelegation.HasDelegatedListeners() | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.mixin, "ComponentDelegation"], function(b) { | |
| function a() {} | |
| b.HasDelegatedListeners = a; | |
| a.prototype = b.prototype.$hasDelegatedListeners = new Ext.mixin.Observable.HasListeners() | |
| })); | |
| (Ext.cmd.derive("Ext.Widget", Ext.Evented, { | |
| isWidget: true, | |
| element: { | |
| reference: "element" | |
| }, | |
| observableType: "component", | |
| cachedConfig: { | |
| style: null | |
| }, | |
| config: { | |
| userCls: null | |
| }, | |
| eventedConfig: { | |
| width: null , | |
| height: null | |
| }, | |
| template: [], | |
| constructor: function(b) { | |
| var c = this, a; | |
| c.initId(b); | |
| c.initElement(); | |
| c.mixins.observable.constructor.call(c, b); | |
| Ext.ComponentManager.register(c); | |
| a = c.getController(); | |
| if (a) { | |
| a.init(c) | |
| } | |
| }, | |
| afterCachedConfig: function() { | |
| var j = this, k = j.self.prototype, l = j.referenceList, c = j.renderElement, g, d, e, h, b, a; | |
| k.renderTemplate = g = document.createDocumentFragment(); | |
| g.appendChild(c.clone(true, true)); | |
| a = g.querySelectorAll("[id]"); | |
| for (e = 0, | |
| h = a.length; e < h; e++) { | |
| d = a[e]; | |
| d.removeAttribute("id") | |
| } | |
| for (e = 0, | |
| h = l.length; e < h; e++) { | |
| b = l[e]; | |
| j[b].dom.removeAttribute("reference") | |
| } | |
| }, | |
| addCls: function(a) { | |
| this.el.addCls(a) | |
| }, | |
| applyWidth: function(a) { | |
| return this.filterLengthValue(a) | |
| }, | |
| applyHeight: function(a) { | |
| return this.filterLengthValue(a) | |
| }, | |
| clearListeners: function() { | |
| var a = this; | |
| a.mixins.observable.clearListeners.call(a); | |
| a.mixins.componentDelegation.clearDelegatedListeners.call(a) | |
| }, | |
| destroy: function() { | |
| var e = this, b = e.referenceList, c, d, a; | |
| for (c = 0, | |
| d = b.length; c < d; c++) { | |
| a = b[c]; | |
| if (e.hasOwnProperty(a)) { | |
| e[a].destroy(); | |
| e[a] = null | |
| } | |
| } | |
| e.destroyBindable(); | |
| Ext.Evented.prototype.destroy.call(this); | |
| Ext.ComponentManager.unregister(e) | |
| }, | |
| doFireEvent: function(b, d, a) { | |
| var e = this | |
| , c = e.mixins.observable.doFireEvent.call(e, b, d, a); | |
| if (c !== false) { | |
| c = e.mixins.componentDelegation.doFireDelegatedEvent.call(e, b, d) | |
| } | |
| return c | |
| }, | |
| getElementConfig: function() { | |
| var b = this | |
| , a = b.element; | |
| if (!("children"in a)) { | |
| a = Ext.apply({ | |
| children: b.getTemplate() | |
| }, a) | |
| } | |
| return a | |
| }, | |
| getSize: function() { | |
| return { | |
| width: this.getWidth(), | |
| height: this.getHeight() | |
| } | |
| }, | |
| getTemplate: function() { | |
| return this.template | |
| }, | |
| initElement: function() { | |
| var m = this, n = m.self.prototype, a = m.getId(), o = m.referenceList = m.referenceList = [], c = true, j, e, h, b, g, l, k, d; | |
| if (n.hasOwnProperty("renderTemplate")) { | |
| j = m.renderTemplate.cloneNode(true); | |
| e = j.firstChild | |
| } else { | |
| c = false; | |
| j = document.createDocumentFragment(); | |
| e = Ext.Element.create(m.processElementConfig.call(n), true); | |
| j.appendChild(e) | |
| } | |
| b = j.querySelectorAll("[reference]"); | |
| for (g = 0, | |
| l = b.length; g < l; g++) { | |
| k = b[g]; | |
| d = k.getAttribute("reference"); | |
| if (c) { | |
| k.removeAttribute("reference") | |
| } | |
| if (d === "element") { | |
| k.id = a; | |
| h = m.el = m.addElementReference(d, k); | |
| h.dom.setAttribute("data-componentid", a) | |
| } else { | |
| m.addElementReferenceOnDemand(d, k) | |
| } | |
| o.push(d) | |
| } | |
| if (e === h.dom) { | |
| m.renderElement = h | |
| } else { | |
| m.addElementReferenceOnDemand("renderElement", e) | |
| } | |
| }, | |
| is: function(a) { | |
| return Ext.ComponentQuery.is(this, a) | |
| }, | |
| isXType: function(b, a) { | |
| return a ? (Ext.Array.indexOf(this.xtypes, b) !== -1) : !!this.xtypesMap[b] | |
| }, | |
| removeCls: function(a) { | |
| this.el.removeCls(a) | |
| }, | |
| toggleCls: function(a, b) { | |
| this.element.toggleCls(a, b) | |
| }, | |
| resolveListenerScope: function(b, a) { | |
| return this.mixins.inheritable.resolveListenerScope.call(this, b, a) | |
| }, | |
| setSize: function(b, a) { | |
| if (b !== undefined) { | |
| this.setWidth(b) | |
| } | |
| if (a !== undefined) { | |
| this.setHeight(a) | |
| } | |
| }, | |
| applyStyle: function(b, a) { | |
| if (a && b === a && Ext.isObject(a)) { | |
| b = Ext.apply({}, b) | |
| } | |
| return b | |
| }, | |
| updateStyle: function(a) { | |
| this.element.applyStyles(a) | |
| }, | |
| updateWidth: function(a) { | |
| this.element.setWidth(a) | |
| }, | |
| updateHeight: function(a) { | |
| this.element.setHeight(a) | |
| }, | |
| onFocusEnter: Ext.emptyFn, | |
| onFocusLeave: Ext.emptyFn, | |
| isAncestor: function() { | |
| return false | |
| }, | |
| privates: { | |
| addElementReferenceOnDemand: function(a, b) { | |
| if (this._elementListeners[a]) { | |
| this.addElementReference(a, b) | |
| } else { | |
| Ext.Object.defineProperty(this, a, { | |
| get: function() { | |
| delete this[a]; | |
| return this.addElementReference(a, b) | |
| }, | |
| configurable: true | |
| }) | |
| } | |
| }, | |
| addElementReference: function(c, e) { | |
| var g = this, b = g[c] = Ext.get(e), d = g._elementListeners[c], a, h; | |
| b.skipGarbageCollection = true; | |
| b.component = g; | |
| if (d) { | |
| d = Ext.clone(d); | |
| for (a in d) { | |
| h = d[a]; | |
| if (typeof h === "object") { | |
| h.scope = g | |
| } | |
| } | |
| d.scope = g; | |
| b.on(d) | |
| } | |
| return b | |
| }, | |
| detachFromBody: function() { | |
| Ext.getDetachedBody().appendChild(this.element); | |
| this.isDetached = true | |
| }, | |
| doAddListener: function(a, h, i, j, c, b, d) { | |
| var g = this, e; | |
| if (j && "element"in j) { | |
| g[j.element].doAddListener(a, h, i || g, j, c) | |
| } | |
| if (j) { | |
| e = j.delegate; | |
| if (e) { | |
| g.mixins.componentDelegation.addDelegatedListener.call(g, a, h, i, j, c, b, d); | |
| return | |
| } | |
| } | |
| Ext.Evented.prototype.doAddListener.call(this, a, h, i, j, c, b, d) | |
| }, | |
| doRemoveListener: function(a, c, b) { | |
| var d = this; | |
| d.mixins.observable.doRemoveListener.call(d, a, c, b); | |
| d.mixins.componentDelegation.removeDelegatedListener.call(d, a, c, b) | |
| }, | |
| filterLengthValue: function(a) { | |
| if (a === "auto" || (!a && a !== 0)) { | |
| return null | |
| } | |
| return a | |
| }, | |
| getFocusEl: function() { | |
| return this.element | |
| }, | |
| initElementListeners: function(m) { | |
| var l = this, d = l.self.superclass, c = d._elementListeners, e = m.reference, a = m.children, h, k, b, j, g; | |
| if (l.hasOwnProperty("_elementListeners")) { | |
| h = l._elementListeners | |
| } else { | |
| h = l._elementListeners = (c ? Ext.Object.chain(c) : {}) | |
| } | |
| if (e) { | |
| k = m.listeners; | |
| if (k) { | |
| if (c) { | |
| b = c[e]; | |
| if (b) { | |
| k = Ext.Object.chain(b); | |
| Ext.apply(k, m.listeners) | |
| } | |
| } | |
| h[e] = k; | |
| m.listeners = null | |
| } | |
| } | |
| if (a) { | |
| for (g = 0, | |
| j = a.length; g < j; g++) { | |
| l.initElementListeners(a[g]) | |
| } | |
| } | |
| }, | |
| initId: function(b) { | |
| var c = this | |
| , a = c.config | |
| , d = (b && b.id) || (a && a.id); | |
| if (d) { | |
| c.setId(d); | |
| c.id = d | |
| } else { | |
| c.getId() | |
| } | |
| }, | |
| processElementConfig: function() { | |
| var a = this, c = a.self.superclass, b; | |
| if (a.hasOwnProperty("_elementConfig")) { | |
| b = a._elementConfig | |
| } else { | |
| b = a._elementConfig = a.getElementConfig(); | |
| if (c.isWidget) { | |
| a.processElementConfig.call(c) | |
| } | |
| a.initElementListeners(b) | |
| } | |
| return b | |
| }, | |
| reattachToBody: function() { | |
| this.isDetached = false | |
| }, | |
| updateUserCls: function(b, a) { | |
| this.element.replaceCls(a, b) | |
| } | |
| } | |
| }, 1, ["widget"], ["widget"], { | |
| widget: true | |
| }, ["widget.widget"], [[Ext.mixin.Inheritable.prototype.mixinId || Ext.mixin.Inheritable.$className, Ext.mixin.Inheritable], [Ext.mixin.Bindable.prototype.mixinId || Ext.mixin.Bindable.$className, Ext.mixin.Bindable], [Ext.mixin.ComponentDelegation.prototype.mixinId || Ext.mixin.ComponentDelegation.$className, Ext.mixin.ComponentDelegation]], [Ext, "Widget"], function(b) { | |
| var a = b.prototype; | |
| (a.$elementEventOptions = Ext.Object.chain(Ext.Element.prototype.$eventOptions)).element = 1; | |
| (a.$eventOptions = Ext.Object.chain(a.$eventOptions)).delegate = 1 | |
| })); | |
| Ext.define("Ext.overrides.Widget", { | |
| override: "Ext.Widget", | |
| $configStrict: false, | |
| isComponent: true, | |
| liquidLayout: true, | |
| rendered: true, | |
| rendering: true, | |
| config: { | |
| renderTo: null | |
| }, | |
| cachedConfig: { | |
| baseCls: "x-widget" | |
| }, | |
| constructor: function(a) { | |
| var b = this, c; | |
| (arguments.callee.$previous || Ext.Evented.prototype.constructor).call(this, a); | |
| b.getComponentLayout(); | |
| c = b.getRenderTo(); | |
| if (c) { | |
| b.render(c) | |
| } | |
| }, | |
| addClsWithUI: function(a) { | |
| this.el.addCls(a) | |
| }, | |
| afterComponentLayout: Ext.emptyFn, | |
| updateLayout: function() { | |
| var a = this.getRefOwner(); | |
| if (a) { | |
| a.updateLayout() | |
| } | |
| }, | |
| destroy: function() { | |
| var b = this | |
| , a = b.ownerCt; | |
| if (a && a.remove) { | |
| a.remove(b, false) | |
| } | |
| (arguments.callee.$previous || Ext.Evented.prototype.destroy).call(this) | |
| }, | |
| finishRender: function() { | |
| this.rendering = false; | |
| this.initBindable() | |
| }, | |
| getAnimationProps: function() { | |
| return {} | |
| }, | |
| getComponentLayout: function() { | |
| var b = this | |
| , a = b.componentLayout; | |
| if (!a) { | |
| a = b.componentLayout = new Ext.layout.component.Auto(); | |
| a.setOwner(b) | |
| } | |
| return a | |
| }, | |
| getEl: function() { | |
| return this.element | |
| }, | |
| getTdCls: function() { | |
| return "x-" + this.getTdType() + "-" + (this.ui || "default") + "-cell" | |
| }, | |
| getTdType: function() { | |
| return this.xtype | |
| }, | |
| getItemId: function() { | |
| return this.itemId || this.id | |
| }, | |
| getSizeModel: function() { | |
| return Ext.Component.prototype.getSizeModel.apply(this, arguments) | |
| }, | |
| onAdded: function(b, e, a) { | |
| var d = this | |
| , c = d.inheritedState; | |
| d.ownerCt = b; | |
| d.onInheritedAdd(d, a) | |
| }, | |
| onRemoved: function(b) { | |
| var a = this; | |
| if (!b) { | |
| a.removeBindings() | |
| } | |
| a.onInheritedRemove(b); | |
| a.ownerCt = a.ownerLayout = null | |
| }, | |
| parseBox: function(a) { | |
| return Ext.Element.parseBox(a) | |
| }, | |
| removeClsWithUI: function(a) { | |
| this.el.removeCls(a) | |
| }, | |
| render: function(b, a) { | |
| var e = this, c = e.element, d = Ext.Component.prototype, g; | |
| if (!e.ownerCt || e.floating) { | |
| if (Ext.scopeCss) { | |
| c.addCls(d.rootCls) | |
| } | |
| c.addCls(d.borderBoxCls) | |
| } | |
| if (a) { | |
| g = b.childNodes[a]; | |
| if (g) { | |
| Ext.fly(b).insertBefore(c, g); | |
| return | |
| } | |
| } | |
| Ext.fly(b).appendChild(c) | |
| }, | |
| setPosition: function(a, b) { | |
| this.el.setLocalXY(a, b) | |
| }, | |
| up: function() { | |
| return Ext.Component.prototype.up.apply(this, arguments) | |
| }, | |
| isAncestor: function() { | |
| return Ext.Component.prototype.isAncestor.apply(this, arguments) | |
| }, | |
| onFocusEnter: function() { | |
| return Ext.Component.prototype.onFocusEnter.apply(this, arguments) | |
| }, | |
| onFocusLeave: function() { | |
| return Ext.Component.prototype.onFocusLeave.apply(this, arguments) | |
| }, | |
| isLayoutChild: function(b) { | |
| var a = this.ownerCt; | |
| return a ? (a === b || a.isLayoutChild(b)) : false | |
| } | |
| }, function(b) { | |
| var a = b.prototype; | |
| if (Ext.isIE9m) { | |
| a.addElementReferenceOnDemand = a.addElementReference | |
| } | |
| }); | |
| (Ext.cmd.derive("Ext.ProgressBase", Ext.Base, { | |
| mixinId: "progressbase", | |
| config: { | |
| value: 0, | |
| textTpl: null | |
| }, | |
| applyTextTpl: function(a) { | |
| if (!a.isTemplate) { | |
| a = new Ext.XTemplate(a) | |
| } | |
| return a | |
| }, | |
| applyValue: function(a) { | |
| return a || 0 | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext, "ProgressBase"], 0)); | |
| (Ext.cmd.derive("Ext.Progress", Ext.Widget, { | |
| alternateClassName: "Ext.ProgressBarWidget", | |
| config: { | |
| text: null , | |
| animate: false | |
| }, | |
| cachedConfig: { | |
| baseCls: "x-progress", | |
| textCls: "x-progress-text", | |
| cls: null , | |
| ui: null | |
| }, | |
| template: [{ | |
| reference: "backgroundEl" | |
| }, { | |
| reference: "barEl", | |
| children: [{ | |
| reference: "textEl" | |
| }] | |
| }], | |
| defaultBindProperty: "value", | |
| updateWidth: function(b, a) { | |
| var c = this; | |
| Ext.Widget.prototype.updateWidth.call(this, b, a); | |
| b -= c.element.getBorderWidth("lr"); | |
| c.backgroundEl.setWidth(b); | |
| c.textEl.setWidth(b) | |
| }, | |
| updateCls: function(a, c) { | |
| var b = this.element; | |
| if (c) { | |
| b.removeCls(c) | |
| } | |
| if (a) { | |
| b.addCls(a) | |
| } | |
| }, | |
| updateUi: function(e, d) { | |
| var c = this.element | |
| , a = this.barEl | |
| , b = this.getBaseCls() + "-"; | |
| if (d) { | |
| c.removeCls(b + d); | |
| a.removeCls(b + "bar-" + d) | |
| } | |
| c.addCls(b + e); | |
| a.addCls(b + "bar-" + e) | |
| }, | |
| updateBaseCls: function(b, a) { | |
| this.element.addCls(b); | |
| this.barEl.addCls(b + "-bar") | |
| }, | |
| updateTextCls: function(a) { | |
| this.backgroundEl.addCls(a + " " + a + "-back"); | |
| this.textEl.addCls(a) | |
| }, | |
| updateValue: function(e, b) { | |
| var d = this | |
| , a = d.barEl | |
| , c = d.getTextTpl(); | |
| if (c) { | |
| d.setText(c.apply({ | |
| value: e, | |
| percent: Math.round(e * 100) | |
| })) | |
| } | |
| if (d.getAnimate()) { | |
| a.stopAnimation(); | |
| a.animate(Ext.apply({ | |
| from: { | |
| width: (b * 100) + "%" | |
| }, | |
| to: { | |
| width: (e * 100) + "%" | |
| } | |
| }, d.animate)) | |
| } else { | |
| a.setStyle("width", (e * 100) + "%") | |
| } | |
| }, | |
| updateText: function(a) { | |
| this.backgroundEl.setHtml(a); | |
| this.textEl.setHtml(a) | |
| } | |
| }, 0, ["progress", "progressbarwidget"], ["widget", "progress", "progressbarwidget"], { | |
| widget: true, | |
| progress: true, | |
| progressbarwidget: true | |
| }, ["widget.progress", "widget.progressbarwidget"], [[Ext.ProgressBase.prototype.mixinId || Ext.ProgressBase.$className, Ext.ProgressBase]], [Ext, "Progress", Ext, "ProgressBarWidget"], 0)); | |
| Ext.define("Ext.overrides.Progress", { | |
| override: "Ext.Progress", | |
| config: { | |
| ui: "default" | |
| } | |
| }); | |
| (Ext.cmd.derive("Ext.util.Format", Ext.Base, function() { | |
| var a; | |
| return { | |
| singleton: true, | |
| defaultDateFormat: "m/d/Y", | |
| thousandSeparator: ",", | |
| decimalSeparator: ".", | |
| currencyPrecision: 2, | |
| currencySign: "$", | |
| percentSign: "%", | |
| currencyAtEnd: false, | |
| stripTagsRe: /<\/?[^>]+>/gi, | |
| stripScriptsRe: /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, | |
| nl2brRe: /\r?\n/g, | |
| hashRe: /#+$/, | |
| allHashes: /^#+$/, | |
| formatPattern: /[\d,\.#]+/, | |
| formatCleanRe: /[^\d\.#]/g, | |
| I18NFormatCleanRe: null , | |
| formatFns: {}, | |
| constructor: function() { | |
| a = this | |
| }, | |
| undef: function(b) { | |
| return b !== undefined ? b : "" | |
| }, | |
| defaultValue: function(c, b) { | |
| return c !== undefined && c !== "" ? c : b | |
| }, | |
| substr: "ab".substr(-1) != "b" ? function(c, e, b) { | |
| var d = String(c); | |
| return (e < 0) ? d.substr(Math.max(d.length + e, 0), b) : d.substr(e, b) | |
| } | |
| : function(c, d, b) { | |
| return String(c).substr(d, b) | |
| } | |
| , | |
| lowercase: function(b) { | |
| return String(b).toLowerCase() | |
| }, | |
| uppercase: function(b) { | |
| return String(b).toUpperCase() | |
| }, | |
| usMoney: function(b) { | |
| return a.currency(b, "$", 2) | |
| }, | |
| currency: function(d, g, c, b) { | |
| var j = "" | |
| , h = ",0" | |
| , e = 0; | |
| d = d - 0; | |
| if (d < 0) { | |
| d = -d; | |
| j = "-" | |
| } | |
| c = Ext.isDefined(c) ? c : a.currencyPrecision; | |
| h += (c > 0 ? "." : ""); | |
| for (; e < c; e++) { | |
| h += "0" | |
| } | |
| d = a.number(d, h); | |
| if ((b || a.currencyAtEnd) === true) { | |
| return Ext.String.format("{0}{1}{2}", j, d, g || a.currencySign) | |
| } else { | |
| return Ext.String.format("{0}{1}{2}", j, g || a.currencySign, d) | |
| } | |
| }, | |
| date: function(b, c) { | |
| if (!b) { | |
| return "" | |
| } | |
| if (!Ext.isDate(b)) { | |
| b = new Date(Date.parse(b)) | |
| } | |
| return Ext.Date.dateFormat(b, c || Ext.Date.defaultFormat) | |
| }, | |
| dateRenderer: function(b) { | |
| return function(c) { | |
| return a.date(c, b) | |
| } | |
| }, | |
| hex: function(d, c) { | |
| var b = parseInt(d || 0, 10).toString(16); | |
| if (c) { | |
| if (c < 0) { | |
| c = -c; | |
| if (b.length > c) { | |
| b = b.substring(b.length - c) | |
| } | |
| } | |
| while (b.length < c) { | |
| b = "0" + b | |
| } | |
| } | |
| return b | |
| }, | |
| or: function(c, b) { | |
| return c || b | |
| }, | |
| pick: function(d, c, e) { | |
| if (Ext.isNumber(d)) { | |
| var b = arguments[d + 1]; | |
| if (b) { | |
| return b | |
| } | |
| } | |
| return d ? e : c | |
| }, | |
| stripTags: function(b) { | |
| return !b ? b : String(b).replace(a.stripTagsRe, "") | |
| }, | |
| stripScripts: function(b) { | |
| return !b ? b : String(b).replace(a.stripScriptsRe, "") | |
| }, | |
| fileSize: (function() { | |
| var b = 1024 | |
| , c = 1048576 | |
| , d = 1073741824; | |
| return function(g) { | |
| var e; | |
| if (g < b) { | |
| if (g === 1) { | |
| e = "1 byte" | |
| } else { | |
| e = g + " bytes" | |
| } | |
| } else { | |
| if (g < c) { | |
| e = (Math.round(((g * 10) / b)) / 10) + " KB" | |
| } else { | |
| if (g < d) { | |
| e = (Math.round(((g * 10) / c)) / 10) + " MB" | |
| } else { | |
| e = (Math.round(((g * 10) / d)) / 10) + " GB" | |
| } | |
| } | |
| } | |
| return e | |
| } | |
| })(), | |
| math: (function() { | |
| var b = {}; | |
| return function(d, c) { | |
| if (!b[c]) { | |
| b[c] = Ext.functionFactory("v", "return v " + c + ";") | |
| } | |
| return b[c](d) | |
| } | |
| }()), | |
| round: function(d, c) { | |
| var b = Number(d); | |
| if (typeof c === "number") { | |
| c = Math.pow(10, c); | |
| b = Math.round(d * c) / c | |
| } else { | |
| if (c === undefined) { | |
| b = Math.round(b) | |
| } | |
| } | |
| return b | |
| }, | |
| number: function(m, g) { | |
| if (!g) { | |
| return m | |
| } | |
| if (isNaN(m)) { | |
| return "" | |
| } | |
| var e = a.formatFns[g]; | |
| if (!e) { | |
| var j = g, p = a.thousandSeparator, n = a.decimalSeparator, h = 0, d = "", c, k, l, o, b, i; | |
| if (g.substr(g.length - 2) === "/i") { | |
| if (!a.I18NFormatCleanRe || a.lastDecimalSeparator !== n) { | |
| a.I18NFormatCleanRe = new RegExp("[^\\d\\" + n + "#]","g"); | |
| a.lastDecimalSeparator = n | |
| } | |
| g = g.substr(0, g.length - 2); | |
| c = g.indexOf(p) !== -1; | |
| k = g.replace(a.I18NFormatCleanRe, "").split(n) | |
| } else { | |
| c = g.indexOf(",") !== -1; | |
| k = g.replace(a.formatCleanRe, "").split(".") | |
| } | |
| l = g.replace(a.formatPattern, ""); | |
| if (k.length > 2) {} else { | |
| if (k.length === 2) { | |
| h = k[1].length; | |
| o = k[1].match(a.hashRe); | |
| if (o) { | |
| i = o[0].length; | |
| d = 'trailingZeroes=new RegExp(Ext.String.escapeRegex(utilFormat.decimalSeparator) + "*0{0,' + i + '}$")' | |
| } | |
| } | |
| } | |
| b = ["var utilFormat=Ext.util.Format,extNumber=Ext.Number,neg,absVal,fnum,parts" + (c ? ",thousandSeparator,thousands=[],j,n,i" : "") + (l ? ',formatString="' + g + '",formatPattern=/[\\d,\\.#]+/' : "") + ',trailingZeroes;return function(v){if(typeof v!=="number"&&isNaN(v=extNumber.from(v,NaN)))return"";neg=v<0;', "absVal=Math.abs(v);", "fnum=Ext.Number.toFixed(absVal, " + h + ");", d, ";"]; | |
| if (c) { | |
| if (h) { | |
| b[b.length] = 'parts=fnum.split(".");'; | |
| b[b.length] = "fnum=parts[0];" | |
| } | |
| b[b.length] = "if(absVal>=1000) {"; | |
| b[b.length] = "thousandSeparator=utilFormat.thousandSeparator;thousands.length=0;j=fnum.length;n=fnum.length%3||3;for(i=0;i<j;i+=n){if(i!==0){n=3;}thousands[thousands.length]=fnum.substr(i,n);}fnum=thousands.join(thousandSeparator);}"; | |
| if (h) { | |
| b[b.length] = "fnum += utilFormat.decimalSeparator+parts[1];" | |
| } | |
| } else { | |
| if (h) { | |
| b[b.length] = 'if(utilFormat.decimalSeparator!=="."){parts=fnum.split(".");fnum=parts[0]+utilFormat.decimalSeparator+parts[1];}' | |
| } | |
| } | |
| b[b.length] = 'if(neg&&fnum!=="' + (h ? "0." + Ext.String.repeat("0", h) : "0") + '") { fnum="-"+fnum; }'; | |
| if (o) { | |
| b[b.length] = 'fnum=fnum.replace(trailingZeroes,"");' | |
| } | |
| b[b.length] = "return "; | |
| if (l) { | |
| b[b.length] = "formatString.replace(formatPattern, fnum);" | |
| } else { | |
| b[b.length] = "fnum;" | |
| } | |
| b[b.length] = "};"; | |
| e = a.formatFns[j] = Ext.functionFactory("Ext", b.join(""))(Ext) | |
| } | |
| return e(m) | |
| }, | |
| numberRenderer: function(b) { | |
| return function(c) { | |
| return a.number(c, b) | |
| } | |
| }, | |
| percent: function(c, b) { | |
| return a.number(c * 100, b || "0") + a.percentSign | |
| }, | |
| attributes: function(c) { | |
| if (typeof c === "object") { | |
| var b = [], d; | |
| for (d in c) { | |
| if (c.hasOwnProperty(d)) { | |
| b.push(d, '="', d === "style" ? Ext.DomHelper.generateStyles(c[d], null , true) : Ext.htmlEncode(c[d]), '" ') | |
| } | |
| } | |
| c = b.join("") | |
| } | |
| return c || "" | |
| }, | |
| plural: function(b, c, d) { | |
| return b + " " + (b === 1 ? c : (d ? d : c + "s")) | |
| }, | |
| nl2br: function(b) { | |
| return Ext.isEmpty(b) ? "" : b.replace(a.nl2brRe, "<br/>") | |
| }, | |
| capitalize: Ext.String.capitalize, | |
| uncapitalize: Ext.String.uncapitalize, | |
| ellipsis: Ext.String.ellipsis, | |
| escape: Ext.String.escape, | |
| escapeRegex: Ext.String.escapeRegex, | |
| htmlDecode: Ext.String.htmlDecode, | |
| htmlEncode: Ext.String.htmlEncode, | |
| leftPad: Ext.String.leftPad, | |
| toggle: Ext.String.toggle, | |
| trim: Ext.String.trim, | |
| parseBox: function(c) { | |
| c = c || 0; | |
| if (typeof c === "number") { | |
| return { | |
| top: c, | |
| right: c, | |
| bottom: c, | |
| left: c | |
| } | |
| } | |
| var d = c.split(" ") | |
| , b = d.length; | |
| if (b === 1) { | |
| d[1] = d[2] = d[3] = d[0] | |
| } else { | |
| if (b === 2) { | |
| d[2] = d[0]; | |
| d[3] = d[1] | |
| } else { | |
| if (b === 3) { | |
| d[3] = d[1] | |
| } | |
| } | |
| } | |
| return { | |
| top: parseInt(d[0], 10) || 0, | |
| right: parseInt(d[1], 10) || 0, | |
| bottom: parseInt(d[2], 10) || 0, | |
| left: parseInt(d[3], 10) || 0 | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "Format"], 0)); | |
| (Ext.cmd.derive("Ext.Template", Ext.Base, { | |
| inheritableStatics: { | |
| from: function(b, a) { | |
| b = Ext.getDom(b); | |
| return new this(b.value || b.innerHTML,a || "") | |
| } | |
| }, | |
| useEval: Ext.isGecko, | |
| constructor: function(d) { | |
| var g = this, b = arguments, a = [], c, e = b.length, h; | |
| g.initialConfig = {}; | |
| if (e === 1 && Ext.isArray(d)) { | |
| b = d; | |
| e = b.length | |
| } | |
| if (e > 1) { | |
| for (c = 0; c < e; c++) { | |
| h = b[c]; | |
| if (typeof h === "object") { | |
| Ext.apply(g.initialConfig, h); | |
| Ext.apply(g, h) | |
| } else { | |
| a.push(h) | |
| } | |
| } | |
| } else { | |
| a.push(d) | |
| } | |
| g.html = a.join("") | |
| }, | |
| isTemplate: true, | |
| disableFormats: false, | |
| tokenRe: /\{(?:(?:(\d+)|([a-z_][\w\-]*))(?::([a-z_\.]+)(?:\(([^\)]*?)?\))?)?)\}/gi, | |
| apply: function(a) { | |
| var b = this; | |
| if (b.compiled) { | |
| if (!b.fn) { | |
| b.compile() | |
| } | |
| return b.fn(a).join("") | |
| } | |
| return b.evaluate(a) | |
| }, | |
| evaluate: function(a) { | |
| var g = this | |
| , c = !g.disableFormats | |
| , e = Ext.util.Format | |
| , b = g; | |
| function d(k, j, i, l, h) { | |
| if (i == null || i === "") { | |
| i = j | |
| } | |
| if (l && c) { | |
| if (h) { | |
| h = [a[i]].concat(Ext.functionFactory("return [" + h + "];")()) | |
| } else { | |
| h = [a[i]] | |
| } | |
| if (l.substr(0, 5) === "this.") { | |
| return b[l.substr(5)].apply(b, h) | |
| } else { | |
| if (e[l]) { | |
| return e[l].apply(e, h) | |
| } else { | |
| return k | |
| } | |
| } | |
| } else { | |
| return a[i] !== undefined ? a[i] : "" | |
| } | |
| } | |
| return g.html.replace(g.tokenRe, d) | |
| }, | |
| applyOut: function(a, b) { | |
| var c = this; | |
| if (c.compiled) { | |
| if (!c.fn) { | |
| c.compile() | |
| } | |
| b.push.apply(b, c.fn(a)) | |
| } else { | |
| b.push(c.apply(a)) | |
| } | |
| return b | |
| }, | |
| applyTemplate: function() { | |
| return this.apply.apply(this, arguments) | |
| }, | |
| set: function(a, c) { | |
| var b = this; | |
| b.html = a; | |
| b.compiled = !!c; | |
| b.fn = null ; | |
| return b | |
| }, | |
| compileARe: /\\/g, | |
| compileBRe: /(\r\n|\n)/g, | |
| compileCRe: /'/g, | |
| compile: function() { | |
| var b = this, a; | |
| a = b.html.replace(b.compileARe, "\\\\").replace(b.compileBRe, "\\n").replace(b.compileCRe, "\\'").replace(b.tokenRe, b.regexReplaceFn.bind(b)); | |
| a = (this.disableFormats !== true ? "var fm=Ext.util.Format;" : "") + (b.useEval ? "$=" : "return") + " function(v){return ['" + a + "'];};"; | |
| b.fn = b.useEval ? b.evalCompiled(a) : (new Function("Ext",a))(Ext); | |
| b.compiled = true; | |
| return b | |
| }, | |
| evalCompiled: function($) { | |
| eval($); | |
| return $ | |
| }, | |
| regexReplaceFn: function(d, c, b, e, a) { | |
| if (c == null || c === "") { | |
| c = '"' + b + '"' | |
| } else { | |
| if (this.stringFormat) { | |
| c = parseInt(c) + 1 | |
| } | |
| } | |
| if (e && this.disableFormats !== true) { | |
| a = a ? "," + a : ""; | |
| if (e.substr(0, 5) === "this.") { | |
| e = e + "(" | |
| } else { | |
| if (Ext.util.Format[e]) { | |
| e = "fm." + e + "(" | |
| } else { | |
| return d | |
| } | |
| } | |
| return "'," + e + "v[" + c + "]" + a + "),'" | |
| } else { | |
| return "',v[" + c + "] == undefined ? '' : v[" + c + "],'" | |
| } | |
| }, | |
| insertFirst: function(b, a, c) { | |
| return this.doInsert("afterBegin", b, a, c) | |
| }, | |
| insertBefore: function(b, a, c) { | |
| return this.doInsert("beforeBegin", b, a, c) | |
| }, | |
| insertAfter: function(b, a, c) { | |
| return this.doInsert("afterEnd", b, a, c) | |
| }, | |
| append: function(b, a, c) { | |
| return this.doInsert("beforeEnd", b, a, c) | |
| }, | |
| doInsert: function(b, d, a, e) { | |
| var c = Ext.DomHelper.insertHtml(b, Ext.getDom(d), this.apply(a)); | |
| return e ? Ext.get(c) : c | |
| }, | |
| overwrite: function(c, a, d) { | |
| var b = Ext.DomHelper.overwrite(Ext.getDom(c), this.apply(a)); | |
| return d ? Ext.get(b) : b | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext, "Template"], function(d) { | |
| var c = /\{\d+\}/ | |
| , a = function(g) { | |
| if (c.test(g)) { | |
| g = new d(g,b); | |
| return function() { | |
| return g.apply(arguments) | |
| } | |
| } else { | |
| return function() { | |
| return g | |
| } | |
| } | |
| } | |
| , b = { | |
| useFormat: false, | |
| compiled: true, | |
| stringFormat: true | |
| } | |
| , e = {}; | |
| Ext.String.format = Ext.util.Format.format = function(h) { | |
| var g = e[h] || (e[h] = a(h)); | |
| return g.apply(this, arguments) | |
| } | |
| ; | |
| Ext.String.formatEncode = function() { | |
| return Ext.String.htmlEncode(Ext.String.format.apply(this, arguments)) | |
| } | |
| })); | |
| (Ext.cmd.derive("Ext.util.XTemplateParser", Ext.Base, { | |
| constructor: function(a) { | |
| Ext.apply(this, a) | |
| }, | |
| doTpl: Ext.emptyFn, | |
| parse: function(n) { | |
| var w = this, q = n.length, p = { | |
| elseif: "elif" | |
| }, r = w.topRe, c = w.actionsRe, e, d, j, o, h, k, i, v, u, b, g, a, l; | |
| w.level = 0; | |
| w.stack = d = []; | |
| for (e = 0; e < q; e = b) { | |
| r.lastIndex = e; | |
| o = r.exec(n); | |
| if (!o) { | |
| w.doText(n.substring(e, q)); | |
| break | |
| } | |
| u = o.index; | |
| b = r.lastIndex; | |
| if (e < u) { | |
| j = n.substring(e, u); | |
| if (!(l && Ext.String.trim(j) === "")) { | |
| w.doText(j) | |
| } | |
| } | |
| l = false; | |
| if (o[1]) { | |
| b = n.indexOf("%}", u + 2); | |
| w.doEval(n.substring(u + 2, b)); | |
| b += 2 | |
| } else { | |
| if (o[2]) { | |
| b = n.indexOf("]}", u + 2); | |
| w.doExpr(n.substring(u + 2, b)); | |
| b += 2 | |
| } else { | |
| if (o[3]) { | |
| w.doTag(o[3]) | |
| } else { | |
| if (o[4]) { | |
| g = null ; | |
| while ((v = c.exec(o[4])) !== null ) { | |
| j = v[2] || v[3]; | |
| if (j) { | |
| j = Ext.String.htmlDecode(j); | |
| h = v[1]; | |
| h = p[h] || h; | |
| g = g || {}; | |
| k = g[h]; | |
| if (typeof k == "string") { | |
| g[h] = [k, j] | |
| } else { | |
| if (k) { | |
| g[h].push(j) | |
| } else { | |
| g[h] = j | |
| } | |
| } | |
| } | |
| } | |
| if (!g) { | |
| if (w.elseRe.test(o[4])) { | |
| w.doElse() | |
| } else { | |
| if (w.defaultRe.test(o[4])) { | |
| w.doDefault() | |
| } else { | |
| w.doTpl(); | |
| d.push({ | |
| type: "tpl" | |
| }) | |
| } | |
| } | |
| } else { | |
| if (g["if"]) { | |
| w.doIf(g["if"], g); | |
| d.push({ | |
| type: "if" | |
| }) | |
| } else { | |
| if (g["switch"]) { | |
| w.doSwitch(g["switch"], g); | |
| d.push({ | |
| type: "switch" | |
| }); | |
| l = true | |
| } else { | |
| if (g["case"]) { | |
| w.doCase(g["case"], g) | |
| } else { | |
| if (g.elif) { | |
| w.doElseIf(g.elif, g) | |
| } else { | |
| if (g["for"]) { | |
| ++w.level; | |
| if (a = w.propRe.exec(o[4])) { | |
| g.propName = a[1] || a[2] | |
| } | |
| w.doFor(g["for"], g); | |
| d.push({ | |
| type: "for", | |
| actions: g | |
| }) | |
| } else { | |
| if (g.foreach) { | |
| ++w.level; | |
| if (a = w.propRe.exec(o[4])) { | |
| g.propName = a[1] || a[2] | |
| } | |
| w.doForEach(g.foreach, g); | |
| d.push({ | |
| type: "foreach", | |
| actions: g | |
| }) | |
| } else { | |
| if (g.exec) { | |
| w.doExec(g.exec, g); | |
| d.push({ | |
| type: "exec", | |
| actions: g | |
| }) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } else { | |
| if (o[0].length === 5) { | |
| d.push({ | |
| type: "tpl" | |
| }) | |
| } else { | |
| i = d.pop(); | |
| w.doEnd(i.type, i.actions); | |
| if (i.type == "for" || i.type == "foreach") { | |
| --w.level | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| topRe: /(?:(\{\%)|(\{\[)|\{([^{}]+)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g, | |
| actionsRe: /\s*(elif|elseif|if|for|foreach|exec|switch|case|eval|between)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g, | |
| propRe: /prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/, | |
| defaultRe: /^\s*default\s*$/, | |
| elseRe: /^\s*else\s*$/ | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "XTemplateParser"], 0)); | |
| (Ext.cmd.derive("Ext.util.XTemplateCompiler", Ext.util.XTemplateParser, { | |
| useEval: Ext.isGecko, | |
| useIndex: Ext.isIE8m, | |
| 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, k0, v;\n"]; | |
| if (d.definitions) { | |
| if (typeof d.definitions === "string") { | |
| d.definitions = [d.definitions, b] | |
| } else { | |
| d.definitions.push(b) | |
| } | |
| } else { | |
| d.definitions = [b] | |
| } | |
| d.switches = []; | |
| d.parse(a); | |
| d.definitions.push((d.useEval ? "$=" : "return") + " function (" + d.fnArgs + ") {", d.body.join(""), "}"); | |
| c = d.definitions.join("\n"); | |
| d.definitions.length = d.body.length = d.switches.length = 0; | |
| delete d.definitions; | |
| delete d.body; | |
| delete d.switches; | |
| return c | |
| }, | |
| doText: function(c) { | |
| var b = this | |
| , a = b.body; | |
| c = c.replace(b.aposRe, "\\'").replace(b.newLineRe, "\\n"); | |
| if (b.useIndex) { | |
| a.push("out[out.length]='", c, "'\n") | |
| } else { | |
| a.push("out.push('", c, "')\n") | |
| } | |
| }, | |
| doExpr: function(b) { | |
| var a = this.body; | |
| a.push("if ((v=" + b + ") != null) out"); | |
| if (this.useIndex) { | |
| a.push("[out.length]=v+''\n") | |
| } else { | |
| a.push(".push(v+'')\n") | |
| } | |
| }, | |
| doTag: function(a) { | |
| var b = this.parseTag(a); | |
| if (b) { | |
| this.doExpr(b) | |
| } else { | |
| this.doText("{" + 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(c) { | |
| var b = this, a; | |
| if (c === "." || c === "#") { | |
| a = c === "." ? "values" : "xindex"; | |
| b.body.push("switch (", a, ") {\n") | |
| } else { | |
| if (b.propNameRe.test(c)) { | |
| b.body.push("switch (", b.parseTag(c), ") {\n") | |
| } else { | |
| b.body.push("switch (", b.addFn(c), b.callFn, ") {\n") | |
| } | |
| } | |
| b.switches.push(0) | |
| }, | |
| doCase: function(e) { | |
| var d = this, c = Ext.isArray(e) ? e : [e], g = d.switches.length - 1, a, b; | |
| if (d.switches[g]) { | |
| d.body.push("break;\n") | |
| } else { | |
| d.switches[g]++ | |
| } | |
| for (b = 0, | |
| g = c.length; b < g; ++b) { | |
| a = d.intRe.exec(c[b]); | |
| c[b] = a ? a[1] : ("'" + c[b].replace(d.aposRe, "\\'") + "'") | |
| } | |
| d.body.push("case ", c.join(": case "), ":\n") | |
| }, | |
| doDefault: function() { | |
| var a = this | |
| , b = a.switches.length - 1; | |
| if (a.switches[b]) { | |
| a.body.push("break;\n") | |
| } else { | |
| a.switches[b]++ | |
| } | |
| a.body.push("default:\n") | |
| }, | |
| doEnd: function(b, d) { | |
| var c = this | |
| , a = c.level - 1; | |
| if (b == "for" || b == "foreach") { | |
| if (d.exec) { | |
| c.doExec(d.exec) | |
| } | |
| c.body.push("}\n"); | |
| c.body.push("parent=p", a, ";values=r", a + 1, ";xcount=n" + a + ";xindex=i", a, "+1;xkey=k", a, ";\n") | |
| } else { | |
| if (b == "if" || b == "switch") { | |
| c.body.push("}\n") | |
| } | |
| } | |
| }, | |
| doFor: function(e, h) { | |
| var d = this, c, b = d.level, a = b - 1, g; | |
| if (e === ".") { | |
| c = "values" | |
| } else { | |
| if (d.propNameRe.test(e)) { | |
| c = d.parseTag(e) | |
| } else { | |
| c = d.addFn(e) + d.callFn | |
| } | |
| } | |
| if (d.maxLevel < b) { | |
| d.maxLevel = b; | |
| d.body.push("var ") | |
| } | |
| if (e == ".") { | |
| g = "c" + b | |
| } else { | |
| g = "a" + a + "?c" + a + "[i" + a + "]:c" + a | |
| } | |
| d.body.push("i", b, "=0,n", b, "=0,c", b, "=", c, ",a", b, "=", d.createArrayTest(b), ",r", b, "=values,p", b, ",k", b, ";\n", "p", b, "=parent=", g, "\n", "if (c", b, "){if(a", b, "){n", b, "=c", b, ".length;}else if (c", b, ".isMixedCollection){c", b, "=c", b, ".items;n", b, "=c", b, ".length;}else if(c", b, ".isStore){c", b, "=c", b, ".data.items;n", b, "=c", b, ".length;}else{c", b, "=[c", b, "];n", b, "=1;}}\n", "for (xcount=n", b, ";i", b, "<n" + b + ";++i", b, "){\n", "values=c", b, "[i", b, "]"); | |
| if (h.propName) { | |
| d.body.push(".", h.propName) | |
| } | |
| d.body.push("\n", "xindex=i", b, "+1\n"); | |
| if (h.between) { | |
| d.body.push('if(xindex>1){ out.push("', h.between, '"); } \n') | |
| } | |
| }, | |
| doForEach: function(e, h) { | |
| var d = this, c, b = d.level, a = b - 1, g; | |
| if (e === ".") { | |
| c = "values" | |
| } else { | |
| if (d.propNameRe.test(e)) { | |
| c = d.parseTag(e) | |
| } else { | |
| c = d.addFn(e) + d.callFn | |
| } | |
| } | |
| if (d.maxLevel < b) { | |
| d.maxLevel = b; | |
| d.body.push("var ") | |
| } | |
| if (e == ".") { | |
| g = "c" + b | |
| } else { | |
| g = "a" + a + "?c" + a + "[i" + a + "]:c" + a | |
| } | |
| d.body.push("i", b, "=-1,n", b, "=0,c", b, "=", c, ",a", b, "=", d.createArrayTest(b), ",r", b, "=values,p", b, ",k", b, ";\n", "p", b, "=parent=", g, "\n", "for(k", b, " in c", b, "){\n", "xindex=++i", b, "+1;\n", "xkey=k", b, ";\n", "values=c", b, "[k", b, "];"); | |
| if (h.propName) { | |
| d.body.push(".", h.propName) | |
| } | |
| if (h.between) { | |
| d.body.push('if(xindex>1){ out.push("', h.between, '"); } \n') | |
| } | |
| }, | |
| createArrayTest: ("isArray"in Array) ? function(a) { | |
| return "Array.isArray(c" + a + ")" | |
| } | |
| : function(a) { | |
| return "ts.call(c" + a + ')==="[object Array]"' | |
| } | |
| , | |
| doExec: function(d, e) { | |
| var c = this | |
| , a = "f" + c.definitions.length | |
| , b = c.guards[c.strict ? 0 : 1]; | |
| c.definitions.push("function " + a + "(" + c.fnArgs + ") {", b.doTry, " var $v = values; with($v) {", " " + d, " }", b.doCatch, "}"); | |
| c.body.push(a + c.callFn + "\n") | |
| }, | |
| guards: [{ | |
| doTry: "", | |
| doCatch: "" | |
| }, { | |
| doTry: "try { ", | |
| doCatch: " } catch(e) {\n}" | |
| }], | |
| addFn: function(a) { | |
| var d = this | |
| , b = "f" + d.definitions.length | |
| , c = d.guards[d.strict ? 0 : 1]; | |
| if (a === ".") { | |
| d.definitions.push("function " + b + "(" + d.fnArgs + ") {", " return values", "}") | |
| } else { | |
| if (a === "..") { | |
| d.definitions.push("function " + b + "(" + d.fnArgs + ") {", " return parent", "}") | |
| } else { | |
| d.definitions.push("function " + b + "(" + d.fnArgs + ") {", c.doTry, " var $v = values; with($v) {", " return(" + a + ")", " }", c.doCatch, "}") | |
| } | |
| } | |
| return b | |
| }, | |
| parseTag: function(b) { | |
| var h = this, a = h.tagRe.exec(b), e, i, d, g, c; | |
| if (!a) { | |
| return null | |
| } | |
| e = a[1]; | |
| i = a[2]; | |
| d = a[3]; | |
| g = a[4]; | |
| if (e == ".") { | |
| if (!h.validTypes) { | |
| h.definitions.push("var validTypes={string:1,number:1,boolean:1};"); | |
| h.validTypes = true | |
| } | |
| c = 'validTypes[typeof values] || ts.call(values) === "[object Date]" ? values : ""' | |
| } else { | |
| if (e == "#") { | |
| c = "xindex" | |
| } else { | |
| if (e == "$") { | |
| c = "xkey" | |
| } else { | |
| if (e.substr(0, 7) == "parent.") { | |
| c = e | |
| } else { | |
| if (isNaN(e) && e.indexOf("-") == -1 && e.indexOf(".") != -1) { | |
| c = "values." + e | |
| } else { | |
| c = "values['" + e + "']" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (g) { | |
| c = "(" + c + g + ")" | |
| } | |
| if (i && h.useFormat) { | |
| d = d ? "," + d : ""; | |
| if (i.substr(0, 5) != "this.") { | |
| i = "fm." + i + "(" | |
| } else { | |
| i += "(" | |
| } | |
| } else { | |
| return c | |
| } | |
| return i + c + d + ")" | |
| }, | |
| evalTpl: function($) { | |
| eval($); | |
| return $ | |
| }, | |
| newLineRe: /\r\n|\r|\n/g, | |
| aposRe: /[']/g, | |
| intRe: /^\s*(\d+)\s*$/, | |
| tagRe: /^([\w-\.\#\$]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?$/ | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util, "XTemplateCompiler"], function() { | |
| var a = this.prototype; | |
| a.fnArgs = "out,values,parent,xindex,xcount,xkey"; | |
| a.callFn = ".call(this," + a.fnArgs + ")" | |
| })); | |
| (Ext.cmd.derive("Ext.XTemplate", Ext.Template, { | |
| isXTemplate: true, | |
| emptyObj: {}, | |
| fn: null , | |
| strict: false, | |
| apply: function(a, b, c, d) { | |
| return this.applyOut(a, [], b, c, d).join("") | |
| }, | |
| applyOut: function(a, b, d, h, j) { | |
| var g = this, c; | |
| if (!g.fn) { | |
| c = new Ext.util.XTemplateCompiler({ | |
| useFormat: g.disableFormats !== true, | |
| definitions: g.definitions, | |
| strict: g.strict | |
| }); | |
| g.fn = c.compile(g.html) | |
| } | |
| h = h || 1; | |
| j = j || 1; | |
| if (g.strict) { | |
| g.fn(b, a, d || g.emptyObj, h, j) | |
| } else { | |
| try { | |
| g.fn(b, a, d || g.emptyObj, h, j) | |
| } catch (i) {} | |
| } | |
| return b | |
| }, | |
| compile: function() { | |
| return this | |
| }, | |
| statics: { | |
| getTpl: function(b, d) { | |
| var c = b[d], a; | |
| if (c && !c.isTemplate) { | |
| c = Ext.ClassManager.dynInstantiate("Ext.XTemplate", c); | |
| if (b.hasOwnProperty(d)) { | |
| a = b | |
| } else { | |
| for (a = b.self.prototype; a && !a.hasOwnProperty(d); a = a.superclass) {} | |
| } | |
| a[d] = c; | |
| c.owner = a | |
| } | |
| return c || null | |
| } | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext, "XTemplate"], 0)); | |
| (Ext.cmd.derive("Ext.app.EventDomain", Ext.Base, { | |
| statics: { | |
| instances: {} | |
| }, | |
| isEventDomain: true, | |
| isInstance: false, | |
| constructor: function() { | |
| var a = this; | |
| if (!a.isInstance) { | |
| Ext.app.EventDomain.instances[a.type] = a | |
| } | |
| a.bus = {}; | |
| a.monitoredClasses = [] | |
| }, | |
| dispatch: function(j, n, l) { | |
| n = Ext.canonicalEventName(n); | |
| var m = this, k = m.bus, o = k[n], e, c, b, d, p, h, g, a; | |
| if (!o) { | |
| return true | |
| } | |
| for (e in o) { | |
| if (o.hasOwnProperty(e) && m.match(j, e, m.controller)) { | |
| c = o[e]; | |
| for (b in c) { | |
| if (c.hasOwnProperty(b)) { | |
| d = c[b]; | |
| if (d.controller.isActive()) { | |
| p = d.list; | |
| h = p.length; | |
| for (g = 0; g < h; g++) { | |
| a = p[g]; | |
| if (a.fire.apply(a, l) === false) { | |
| return false | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return true | |
| }, | |
| listen: function(d, n) { | |
| var w = this, m = w.bus, h = w.idProperty, j = w.monitoredClasses, e = j.length, l = n.getId(), v = (w.type === "component"), q = v ? n.getRefMap() : null , s, k, t, r, b, c, a, p, o, u, g; | |
| for (r in d) { | |
| o = d[r]; | |
| if (v) { | |
| r = q[r] || r | |
| } | |
| if (o) { | |
| if (h) { | |
| r = r === "*" ? r : r.substring(1) | |
| } | |
| for (u in o) { | |
| b = null ; | |
| c = o[u]; | |
| a = n; | |
| u = Ext.canonicalEventName(u); | |
| p = new Ext.util.Event(n,u); | |
| if (Ext.isObject(c)) { | |
| b = c; | |
| c = b.fn; | |
| a = b.scope || n; | |
| delete b.fn; | |
| delete b.scope | |
| } | |
| if (typeof c === "string") { | |
| c = a[c] | |
| } | |
| p.addListener(c, a, b); | |
| for (s = 0; s < e; ++s) { | |
| g = j[s].hasListeners; | |
| if (g) { | |
| g._incr_(u) | |
| } | |
| } | |
| k = m[u] || (m[u] = {}); | |
| k = k[r] || (k[r] = {}); | |
| t = k[l] || (k[l] = { | |
| controller: n, | |
| list: [] | |
| }); | |
| t.list.push(p) | |
| } | |
| } | |
| } | |
| }, | |
| match: function(c, a) { | |
| var b = this.idProperty; | |
| if (b) { | |
| return a === "*" || c[b] === a | |
| } | |
| return false | |
| }, | |
| monitor: function(c) { | |
| var b = this | |
| , a = c.isInstance ? c : c.prototype | |
| , d = a.doFireEvent; | |
| b.monitoredClasses.push(c); | |
| a.doFireEvent = function(h, g) { | |
| var e = d.apply(this, arguments); | |
| if (e !== false && !this.isSuspended(h)) { | |
| e = b.dispatch(this, h, g) | |
| } | |
| return e | |
| } | |
| }, | |
| unlisten: function(d) { | |
| var n = this.bus, a = d, r = this.monitoredClasses, l = r.length, b, o, s, m, q, e, p, k, h, c, g; | |
| if (d.isController) { | |
| a = d.getId() | |
| } | |
| for (o in n) { | |
| o = Ext.canonicalEventName(o); | |
| if (n.hasOwnProperty(o) && (p = n[o])) { | |
| for (e in p) { | |
| b = p[e]; | |
| c = b[a]; | |
| if (c) { | |
| s = c.list; | |
| if (s) { | |
| for (k = 0, | |
| m = s.length; k < m; ++k) { | |
| q = s[k]; | |
| q.clearListeners(); | |
| for (h = 0; h < l; ++h) { | |
| g = r[h].hasListeners; | |
| if (g) { | |
| g._decr_(q.name) | |
| } | |
| } | |
| } | |
| delete b[a] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| destroy: function() { | |
| this.monitoredClasses = this.bus = null ; | |
| this.callParent() | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.app, "EventDomain"], 0)); | |
| (Ext.cmd.derive("Ext.app.domain.Component", Ext.app.EventDomain, { | |
| singleton: true, | |
| type: "component", | |
| constructor: function() { | |
| this.callParent(); | |
| this.monitor(Ext.Widget) | |
| }, | |
| dispatch: function(g, d, c) { | |
| var b = g.lookupController(false), e, a; | |
| while (b) { | |
| e = b.compDomain; | |
| if (e) { | |
| if (e.dispatch(g, d, c) === false) { | |
| return false | |
| } | |
| } | |
| a = b.getView(); | |
| b = a ? a.lookupController(true) : null | |
| } | |
| return this.callParent(arguments) | |
| }, | |
| match: function(b, a) { | |
| return b.is(a) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.app.domain, "Component"], 0)); | |
| (Ext.cmd.derive("Ext.util.ProtoElement", Ext.Base, function() { | |
| var b = Ext.String.splitWords | |
| , a = Ext.Array.toMap; | |
| return { | |
| isProtoEl: true, | |
| clsProp: "cls", | |
| styleProp: "style", | |
| removedProp: "removed", | |
| styleIsText: false, | |
| constructor: function(d) { | |
| var g = this, c, e; | |
| if (d) { | |
| Ext.apply(g, d); | |
| c = g.cls; | |
| e = g.style; | |
| delete g.cls | |
| } | |
| g.classList = c ? b(c) : []; | |
| g.classMap = c ? a(g.classList) : {}; | |
| if (e) { | |
| if (typeof e === "string") { | |
| g.style = Ext.Element.parseStyles(e) | |
| } else { | |
| if (Ext.isFunction(e)) { | |
| g.styleFn = e; | |
| delete g.style | |
| } else { | |
| g.style = Ext.apply({}, e) | |
| } | |
| } | |
| } | |
| }, | |
| flush: function() { | |
| this.flushClassList = []; | |
| this.removedClasses = {}; | |
| delete this.style; | |
| delete this.unselectableAttr | |
| }, | |
| addCls: function(n) { | |
| if (!n) { | |
| return this | |
| } | |
| var l = this, m = (typeof n === "string") ? b(n) : n, e = m.length, j = l.classList, d = l.classMap, g = l.flushClassList, h = 0, k; | |
| for (; h < e; ++h) { | |
| k = m[h]; | |
| if (!d[k]) { | |
| d[k] = true; | |
| j.push(k); | |
| if (g) { | |
| g.push(k); | |
| delete l.removedClasses[k] | |
| } | |
| } | |
| } | |
| return l | |
| }, | |
| hasCls: function(c) { | |
| return c in this.classMap | |
| }, | |
| removeCls: function(o) { | |
| var n = this, l = n.classList, g = (n.classList = []), j = a(b(o)), e = l.length, d = n.classMap, k = n.removedClasses, h, m; | |
| for (h = 0; h < e; ++h) { | |
| m = l[h]; | |
| if (j[m]) { | |
| if (k) { | |
| if (d[m]) { | |
| k[m] = true; | |
| Ext.Array.remove(n.flushClassList, m) | |
| } | |
| } | |
| delete d[m] | |
| } else { | |
| g.push(m) | |
| } | |
| } | |
| return n | |
| }, | |
| setStyle: function(g, e) { | |
| var d = this | |
| , c = d.style || (d.style = {}); | |
| if (typeof g === "string") { | |
| if (arguments.length === 1) { | |
| d.setStyle(Ext.Element.parseStyles(g)) | |
| } else { | |
| c[g] = e | |
| } | |
| } else { | |
| Ext.apply(c, g) | |
| } | |
| return d | |
| }, | |
| unselectable: function() { | |
| this.addCls(Ext.dom.Element.unselectableCls); | |
| if (Ext.isOpera) { | |
| this.unselectableAttr = true | |
| } | |
| }, | |
| writeTo: function(h) { | |
| var e = this, g = e.flushClassList || e.classList, d = e.removedClasses, c; | |
| if (e.styleFn) { | |
| c = Ext.apply({}, e.styleFn()); | |
| Ext.apply(c, e.style) | |
| } else { | |
| c = e.style | |
| } | |
| h[e.clsProp] = g.join(" "); | |
| if (c) { | |
| h[e.styleProp] = e.styleIsText ? Ext.DomHelper.generateStyles(c, null , true) : c | |
| } | |
| if (d) { | |
| d = Ext.Object.getKeys(d); | |
| if (d.length) { | |
| h[e.removedProp] = d.join(" ") | |
| } | |
| } | |
| if (e.unselectableAttr) { | |
| h.unselectable = "on" | |
| } | |
| return h | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "ProtoElement"], 0)); | |
| (Ext.cmd.derive("Ext.dom.CompositeElement", Ext.dom.CompositeElementLite, { | |
| alternateClassName: "Ext.CompositeElement", | |
| isLite: false, | |
| getElement: function(a) { | |
| return a | |
| }, | |
| transformElement: function(a) { | |
| return Ext.get(a) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.dom, "CompositeElement", Ext, "CompositeElement"], 0)); | |
| (Ext.cmd.derive("Ext.scroll.Scroller", Ext.Evented, { | |
| factoryConfig: { | |
| defaultType: "dom" | |
| }, | |
| isScroller: true, | |
| _spacerCls: "x-domscroller-spacer", | |
| config: { | |
| direction: undefined, | |
| directionLock: false, | |
| disabled: null , | |
| element: undefined, | |
| indicators: null , | |
| maxPosition: { | |
| x: 0, | |
| y: 0 | |
| }, | |
| maxUserPosition: { | |
| x: 0, | |
| y: 0 | |
| }, | |
| minPosition: { | |
| x: 0, | |
| y: 0 | |
| }, | |
| minUserPosition: { | |
| x: 0, | |
| y: 0 | |
| }, | |
| momentumEasing: null , | |
| size: null , | |
| slotSnapSize: { | |
| x: 0, | |
| y: 0 | |
| }, | |
| x: true, | |
| y: true, | |
| spacerXY: null | |
| }, | |
| statics: { | |
| create: function(a) { | |
| return Ext.Factory.scroller(a, Ext.supports.Touch ? "touch" : "dom") | |
| } | |
| }, | |
| constructor: function(a) { | |
| var b = this; | |
| b.position = { | |
| x: 0, | |
| y: 0 | |
| }; | |
| Ext.Evented.prototype.constructor.call(this, a); | |
| b.onDomScrollEnd = Ext.Function.createBuffered(b.onDomScrollEnd, 100, b) | |
| }, | |
| destroy: function() { | |
| var a = this; | |
| a.setX(Ext.emptyString); | |
| a.setY(Ext.emptyString); | |
| a.setElement(null ); | |
| a.onDomScrollEnd = a._partners = a.component = null ; | |
| Ext.Evented.prototype.destroy.call(this) | |
| }, | |
| addPartner: function(d, b) { | |
| var c = this | |
| , e = c._partners || (c._partners = {}) | |
| , a = d._partners || (d._partners = {}); | |
| e[d.getId()] = { | |
| scroller: d, | |
| axis: b | |
| }; | |
| a[c.getId()] = { | |
| scroller: c, | |
| axis: b | |
| } | |
| }, | |
| applyElement: function(b, a) { | |
| var d = this, c, e; | |
| if (a) { | |
| d.scrollListener.destroy() | |
| } | |
| if (b) { | |
| if (b.isElement) { | |
| c = b | |
| } else { | |
| c = Ext.get(b) | |
| } | |
| if (c.dom === document.body) { | |
| c = Ext.get(document.scrollingElement || (Ext.isWebKit ? document.body : document.documentElement)); | |
| e = Ext.get(Ext.isIE9m ? window : document) | |
| } else { | |
| e = c | |
| } | |
| d.scrollListener = e.on({ | |
| scroll: d.onDomScroll, | |
| scope: d, | |
| destroyable: true | |
| }); | |
| return c | |
| } | |
| }, | |
| getClientSize: function() { | |
| var a = this.getElement().dom; | |
| return { | |
| x: a.clientWidth, | |
| y: a.clientHeight | |
| } | |
| }, | |
| getScrollbarSize: function() { | |
| var g = this, b = 0, k = 0, e, d, j, i, h, c, a; | |
| if (g.isDomScroller || Ext.supports.touchScroll === 1) { | |
| e = g.getElement(); | |
| if (e && !e.destroyed) { | |
| j = g.getX(); | |
| i = g.getY(); | |
| d = e.dom; | |
| if (j || i) { | |
| a = Ext.getScrollbarSize() | |
| } | |
| if (j === "scroll") { | |
| h = true | |
| } else { | |
| if (j) { | |
| h = d.scrollWidth > d.clientWidth | |
| } | |
| } | |
| if (i === "scroll") { | |
| c = true | |
| } else { | |
| if (i) { | |
| c = d.scrollHeight > d.clientHeight | |
| } | |
| } | |
| if (h) { | |
| k = a.height | |
| } | |
| if (c) { | |
| b = a.width | |
| } | |
| } | |
| } | |
| return { | |
| width: b, | |
| height: k | |
| } | |
| }, | |
| getPosition: function() { | |
| return this.position | |
| }, | |
| updateDirectionLock: Ext.emptyFn, | |
| updateDisabled: Ext.emptyFn, | |
| updateIndicators: Ext.emptyFn, | |
| updateMaxPosition: Ext.emptyFn, | |
| updateMaxUserPosition: Ext.emptyFn, | |
| updateMinPosition: Ext.emptyFn, | |
| updateMinUserPosition: Ext.emptyFn, | |
| updateMomenumEasing: Ext.emptyFn, | |
| updateX: Ext.emptyFn, | |
| updateY: Ext.emptyFn, | |
| onPartnerScrollStart: Ext.emptyFn, | |
| onPartnerScrollEnd: Ext.emptyFn, | |
| refresh: function() { | |
| this.fireEvent("refresh", this); | |
| return this | |
| }, | |
| removePartner: function(b) { | |
| var c = this._partners | |
| , a = b._partners; | |
| if (c) { | |
| delete c[b.getId()] | |
| } | |
| if (a) { | |
| delete (a[this.getId()]) | |
| } | |
| }, | |
| scrollBy: function(c, b, d) { | |
| var a = this.getPosition(); | |
| if (c) { | |
| if (c.length) { | |
| d = b; | |
| b = c[1]; | |
| c = c[0] | |
| } else { | |
| if (typeof c !== "number") { | |
| d = b; | |
| b = c.y; | |
| c = c.x | |
| } | |
| } | |
| } | |
| c = (typeof c === "number") ? c + a.x : null ; | |
| b = (typeof b === "number") ? b + a.y : null ; | |
| return this.doScrollTo(c, b, d) | |
| }, | |
| scrollIntoView: function(d, e, b, h) { | |
| var j = this, i = j.getPosition(), g, a, k, c = j.getElement(); | |
| if (d) { | |
| g = Ext.fly(d).getScrollIntoViewXY(c, i.x, i.y); | |
| a = (e === false) ? i.x : g.x; | |
| k = g.y; | |
| if (h) { | |
| j.on({ | |
| scrollend: "doHighlight", | |
| scope: j, | |
| single: true, | |
| args: [d, h] | |
| }) | |
| } | |
| j.doScrollTo(a, k, b) | |
| } | |
| }, | |
| isInView: function(c) { | |
| var d = this, a = { | |
| x: false, | |
| y: false | |
| }, e, g = d.getElement(), b; | |
| if (c && g.contains(c)) { | |
| b = g.getRegion(); | |
| e = Ext.fly(c).getRegion(); | |
| a.x = e.right > b.left && e.left < b.right; | |
| a.y = e.bottom > b.top && e.top < b.bottom | |
| } | |
| return a | |
| }, | |
| scrollTo: function(a, d, b) { | |
| var c; | |
| if (a) { | |
| if (a.length) { | |
| b = d; | |
| d = a[1]; | |
| a = a[0] | |
| } else { | |
| if (typeof a !== "number") { | |
| b = d; | |
| d = a.y; | |
| a = a.x | |
| } | |
| } | |
| } | |
| if (a < 0 || d < 0) { | |
| c = this.getMaxPosition(); | |
| if (a < 0) { | |
| a += c.x | |
| } | |
| if (d < 0) { | |
| d += c.y | |
| } | |
| } | |
| this.doScrollTo(a, d, b) | |
| }, | |
| updateDirection: function(c) { | |
| var b = this, a, d; | |
| if (!c) { | |
| a = b.getX(); | |
| d = b.getY(); | |
| if (a && d) { | |
| c = (d === "scroll" && a === "scroll") ? "both" : "auto" | |
| } else { | |
| if (d) { | |
| c = "vertical" | |
| } else { | |
| if (a) { | |
| c = "horizontal" | |
| } | |
| } | |
| } | |
| b._direction = c | |
| } else { | |
| if (c === "auto") { | |
| a = true; | |
| d = true | |
| } else { | |
| if (c === "vertical") { | |
| a = false; | |
| d = true | |
| } else { | |
| if (c === "horizontal") { | |
| a = true; | |
| d = false | |
| } else { | |
| if (c === "both") { | |
| a = "scroll"; | |
| d = "scroll" | |
| } | |
| } | |
| } | |
| } | |
| b.setX(a); | |
| b.setY(d) | |
| } | |
| }, | |
| updateSize: function(d) { | |
| var e = this, c = e.getElement(), b, a, g; | |
| if (c) { | |
| b = e.getSpacer(); | |
| if (d == null ) { | |
| b.hide() | |
| } else { | |
| if (typeof d === "number") { | |
| a = d; | |
| g = d | |
| } else { | |
| a = d.x || 0; | |
| g = d.y || 0 | |
| } | |
| if (a > 0) { | |
| a -= 1 | |
| } | |
| if (g > 0) { | |
| g -= 1 | |
| } | |
| e.setSpacerXY({ | |
| x: a, | |
| y: g | |
| }); | |
| b.show() | |
| } | |
| } | |
| }, | |
| deprecated: { | |
| "5": { | |
| methods: { | |
| getScroller: function() { | |
| return this | |
| } | |
| } | |
| }, | |
| "5.1.0": { | |
| methods: { | |
| scrollToTop: function(a) { | |
| return this.scrollTo(0, 0, a) | |
| }, | |
| scrollToEnd: function(a) { | |
| return this.scrollTo(Infinity, Infinity, a) | |
| } | |
| } | |
| } | |
| }, | |
| privates: { | |
| getSpacer: function() { | |
| var c = this, a = c._spacer, b; | |
| if (!a) { | |
| b = c.getElement(); | |
| a = c._spacer = b.createChild({ | |
| cls: c._spacerCls, | |
| role: "presentation" | |
| }); | |
| a.setVisibilityMode(2); | |
| b.position() | |
| } | |
| return a | |
| }, | |
| applySpacerXY: function(b, a) { | |
| if (a && b.x === a.x && b.y === a.y) { | |
| b = undefined | |
| } | |
| return b | |
| }, | |
| updateSpacerXY: function(a) { | |
| this.getSpacer().setLocalXY(a.x, a.y) | |
| }, | |
| convertX: function(a) { | |
| return a | |
| }, | |
| doHighlight: function(b, a) { | |
| if (a !== true) { | |
| Ext.fly(b).highlight(a) | |
| } else { | |
| Ext.fly(b).highlight() | |
| } | |
| }, | |
| fireScrollStart: function(a, d) { | |
| var c = this | |
| , b = c.component; | |
| c.invokePartners("onPartnerScrollStart", a, d); | |
| if (c.hasListeners.scrollstart) { | |
| c.fireEvent("scrollstart", c, a, d) | |
| } | |
| if (b && b.onScrollStart) { | |
| b.onScrollStart(a, d) | |
| } | |
| Ext.GlobalEvents.fireEvent("scrollstart", c, a, d) | |
| }, | |
| fireScroll: function(a, d) { | |
| var c = this | |
| , b = c.component; | |
| c.invokePartners("onPartnerScroll", a, d); | |
| if (c.hasListeners.scroll) { | |
| c.fireEvent("scroll", c, a, d) | |
| } | |
| if (b && b.onScrollMove) { | |
| b.onScrollMove(a, d) | |
| } | |
| Ext.GlobalEvents.fireEvent("scroll", c, a, d) | |
| }, | |
| fireScrollEnd: function(a, d) { | |
| var c = this | |
| , b = c.component; | |
| c.invokePartners("onPartnerScrollEnd", a, d); | |
| if (c.hasListeners.scrollend) { | |
| c.fireEvent("scrollend", c, a, d) | |
| } | |
| if (b && b.onScrollEnd) { | |
| b.onScrollEnd(a, d) | |
| } | |
| Ext.GlobalEvents.fireEvent("scrollend", c, a, d) | |
| }, | |
| initXStyle: function() { | |
| var b = this.getElement() | |
| , a = this.getX(); | |
| if (b && b.dom) { | |
| if (!a) { | |
| a = "hidden" | |
| } else { | |
| if (a === true) { | |
| a = "auto" | |
| } | |
| } | |
| b.setStyle("overflow-x", a) | |
| } | |
| }, | |
| initYStyle: function() { | |
| var a = this.getElement() | |
| , b = this.getY(); | |
| if (a && a.dom) { | |
| if (!b) { | |
| b = "hidden" | |
| } else { | |
| if (b === true) { | |
| b = "auto" | |
| } | |
| } | |
| a.setStyle("overflow-y", b) | |
| } | |
| }, | |
| invokePartners: function(i, a, h) { | |
| var c = this, e = c._partners, b, g, d = i === "onPartnerScrollEnd"; | |
| if (!c.suspendSync & !c.isReflecting) { | |
| for (g in e) { | |
| b = e[g].scroller; | |
| b.isReflecting = true; | |
| b[i](c, a, h); | |
| if (d) { | |
| b.isReflecting = false | |
| } | |
| } | |
| } | |
| }, | |
| clearReflecting: function() { | |
| this.isReflecting = false | |
| }, | |
| suspendPartnerSync: function() { | |
| this.suspendSync = (this.suspendSync || 0) + 1 | |
| }, | |
| resumePartnerSync: function() { | |
| if (this.suspendSync) { | |
| this.suspendSync-- | |
| } | |
| }, | |
| updateDomScrollPosition: function() { | |
| var d = this, c = d.getElement(), b, a = d.position; | |
| if (c && !c.destroyed) { | |
| b = d.getElementScroll(c); | |
| a.x = b.left; | |
| a.y = b.top | |
| } | |
| d.positionDirty = false; | |
| return a | |
| }, | |
| getElementScroll: function(a) { | |
| return a.getScroll() | |
| }, | |
| onDomScroll: function() { | |
| var d = this, b, a, e, c; | |
| if (d.isTouchScroller && Ext.supports.touchScroll === 2) { | |
| c = d.getElement().dom; | |
| c.scrollTop = c.scrollLeft = 0; | |
| return | |
| } | |
| b = d.updateDomScrollPosition(); | |
| a = b.x; | |
| e = b.y; | |
| if (!d.isScrolling) { | |
| d.isScrolling = Ext.isScrolling = true; | |
| d.fireScrollStart(a, e) | |
| } | |
| d.fireScroll(a, e); | |
| d.onDomScrollEnd() | |
| }, | |
| onDomScrollEnd: function() { | |
| var c = this | |
| , b = c.getPosition() | |
| , a = b.x | |
| , d = b.y; | |
| c.isScrolling = Ext.isScrolling = false; | |
| c.trackingScrollLeft = a; | |
| c.trackingScrollTop = d; | |
| c.fireScrollEnd(a, d) | |
| }, | |
| onPartnerScroll: function(c, a, d) { | |
| var b = c._partners[this.getId()].axis; | |
| if (b) { | |
| if (b === "x") { | |
| d = null | |
| } else { | |
| if (b === "y") { | |
| a = null | |
| } | |
| } | |
| } | |
| this.doScrollTo(a, d, false, true) | |
| }, | |
| restoreState: function() { | |
| var b = this, a = b.getElement(), c; | |
| if (a) { | |
| c = a.dom; | |
| if (b.trackingScrollTop !== undefined) { | |
| c.scrollTop = b.trackingScrollTop; | |
| c.scrollLeft = b.trackingScrollLeft | |
| } | |
| } | |
| } | |
| } | |
| }, 1, 0, 0, 0, ["scroller.scroller"], [[Ext.mixin.Factoryable.prototype.mixinId || Ext.mixin.Factoryable.$className, Ext.mixin.Factoryable]], [Ext.scroll, "Scroller"], 0)); | |
| (Ext.cmd.derive("Ext.fx.easing.Abstract", Ext.Base, { | |
| config: { | |
| startTime: 0, | |
| startValue: 0 | |
| }, | |
| isEasing: true, | |
| isEnded: false, | |
| constructor: function(a) { | |
| this.initConfig(a); | |
| return this | |
| }, | |
| applyStartTime: function(a) { | |
| if (!a) { | |
| a = Ext.Date.now() | |
| } | |
| return a | |
| }, | |
| updateStartTime: function(a) { | |
| this.reset() | |
| }, | |
| reset: function() { | |
| this.isEnded = false | |
| }, | |
| getValue: Ext.emptyFn | |
| }, 1, 0, 0, 0, 0, 0, [Ext.fx.easing, "Abstract"], 0)); | |
| (Ext.cmd.derive("Ext.fx.easing.Momentum", Ext.fx.easing.Abstract, { | |
| config: { | |
| acceleration: 30, | |
| friction: 0, | |
| startVelocity: 0 | |
| }, | |
| alpha: 0, | |
| updateFriction: function(b) { | |
| var a = Math.log(1 - (b / 10)); | |
| this.theta = a; | |
| this.alpha = a / this.getAcceleration() | |
| }, | |
| updateStartVelocity: function(a) { | |
| this.velocity = a * this.getAcceleration() | |
| }, | |
| updateAcceleration: function(a) { | |
| this.velocity = this.getStartVelocity() * a; | |
| this.alpha = this.theta / a | |
| }, | |
| getValue: function() { | |
| return this.getStartValue() - this.velocity * (1 - this.getFrictionFactor()) / this.theta | |
| }, | |
| getFrictionFactor: function() { | |
| var a = Ext.Date.now() - this.getStartTime(); | |
| return Math.exp(a * this.alpha) | |
| }, | |
| getVelocity: function() { | |
| return this.getFrictionFactor() * this.velocity | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.easing, "Momentum"], 0)); | |
| (Ext.cmd.derive("Ext.fx.easing.Bounce", Ext.fx.easing.Abstract, { | |
| config: { | |
| springTension: 0.3, | |
| acceleration: 30, | |
| startVelocity: 0 | |
| }, | |
| getValue: function() { | |
| var b = Ext.Date.now() - this.getStartTime() | |
| , c = (b / this.getAcceleration()) | |
| , a = c * Math.pow(Math.E, -this.getSpringTension() * c); | |
| return this.getStartValue() + (this.getStartVelocity() * a) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.easing, "Bounce"], 0)); | |
| (Ext.cmd.derive("Ext.fx.easing.BoundMomentum", Ext.fx.easing.Abstract, { | |
| config: { | |
| momentum: null , | |
| bounce: null , | |
| minMomentumValue: 0, | |
| maxMomentumValue: 0, | |
| minVelocity: 0.01, | |
| startVelocity: 0 | |
| }, | |
| applyMomentum: function(a, b) { | |
| return Ext.factory(a, Ext.fx.easing.Momentum, b) | |
| }, | |
| applyBounce: function(a, b) { | |
| return Ext.factory(a, Ext.fx.easing.Bounce, b) | |
| }, | |
| updateStartTime: function(a) { | |
| this.getMomentum().setStartTime(a); | |
| Ext.fx.easing.Abstract.prototype.updateStartTime.apply(this, arguments) | |
| }, | |
| updateStartVelocity: function(a) { | |
| this.getMomentum().setStartVelocity(a) | |
| }, | |
| updateStartValue: function(a) { | |
| this.getMomentum().setStartValue(a) | |
| }, | |
| reset: function() { | |
| this.lastValue = null ; | |
| this.isBouncingBack = false; | |
| this.isOutOfBound = false; | |
| return Ext.fx.easing.Abstract.prototype.reset.apply(this, arguments) | |
| }, | |
| getValue: function() { | |
| var a = this.getMomentum(), k = this.getBounce(), e = a.getStartVelocity(), g = e > 0 ? 1 : -1, h = this.getMinMomentumValue(), d = this.getMaxMomentumValue(), c = (g == 1) ? d : h, i = this.lastValue, j, b; | |
| if (e === 0) { | |
| return this.getStartValue() | |
| } | |
| if (!this.isOutOfBound) { | |
| j = a.getValue(); | |
| b = a.getVelocity(); | |
| if (Math.abs(b) < this.getMinVelocity()) { | |
| this.isEnded = true | |
| } | |
| if (j >= h && j <= d) { | |
| return j | |
| } | |
| this.isOutOfBound = true; | |
| k.setStartTime(Ext.Date.now()).setStartVelocity(b).setStartValue(c) | |
| } | |
| j = k.getValue(); | |
| if (!this.isEnded) { | |
| if (!this.isBouncingBack) { | |
| if (i !== null ) { | |
| if ((g == 1 && j < i) || (g == -1 && j > i)) { | |
| this.isBouncingBack = true | |
| } | |
| } | |
| } else { | |
| if (Math.round(j) == c) { | |
| this.isEnded = true | |
| } | |
| } | |
| } | |
| this.lastValue = j; | |
| return j | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.fx.easing, "BoundMomentum"], 0)); | |
| (Ext.cmd.derive("Ext.fx.easing.Linear", Ext.fx.easing.Abstract, { | |
| config: { | |
| duration: 0, | |
| endValue: 0 | |
| }, | |
| updateStartValue: function(a) { | |
| this.distance = this.getEndValue() - a | |
| }, | |
| updateEndValue: function(a) { | |
| this.distance = a - this.getStartValue() | |
| }, | |
| getValue: function() { | |
| var a = Ext.Date.now() - this.getStartTime() | |
| , b = this.getDuration(); | |
| if (a > b) { | |
| this.isEnded = true; | |
| return this.getEndValue() | |
| } else { | |
| return this.getStartValue() + ((a / b) * this.distance) | |
| } | |
| } | |
| }, 0, 0, 0, 0, ["easing.linear"], 0, [Ext.fx.easing, "Linear"], 0)); | |
| (Ext.cmd.derive("Ext.fx.easing.EaseOut", Ext.fx.easing.Linear, { | |
| config: { | |
| exponent: 4, | |
| duration: 1500 | |
| }, | |
| getValue: function() { | |
| var g = Ext.Date.now() - this.getStartTime() | |
| , d = this.getDuration() | |
| , b = this.getStartValue() | |
| , i = this.getEndValue() | |
| , a = this.distance | |
| , c = g / d | |
| , h = 1 - c | |
| , e = 1 - Math.pow(h, this.getExponent()) | |
| , j = b + (e * a); | |
| if (g >= d) { | |
| this.isEnded = true; | |
| return i | |
| } | |
| return j | |
| } | |
| }, 0, 0, 0, 0, ["easing.ease-out"], 0, [Ext.fx.easing, "EaseOut"], 0)); | |
| (Ext.cmd.derive("Ext.util.translatable.Abstract", 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.mixins.observable.constructor.call(this, a); | |
| this.position = { | |
| x: 0, | |
| y: 0 | |
| } | |
| }, | |
| 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) | |
| }, | |
| getPosition: function() { | |
| var b = this | |
| , a = b.position; | |
| a.x = -b.x; | |
| a.y = -b.y; | |
| return a | |
| }, | |
| 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, i, g) { | |
| var e = this; | |
| if (!Ext.isObject(g)) { | |
| g = {} | |
| } | |
| if (e.isAnimating) { | |
| e.stopAnimation() | |
| } | |
| e.callback = g.callback; | |
| e.callbackScope = g.scope; | |
| var d = Ext.Date.now() | |
| , h = g.easing | |
| , c = (typeof b == "number") ? (g.easingX || h || e.getEasingX() || true) : null | |
| , a = (typeof i == "number") ? (g.easingY || h || e.getEasingY() || true) : null ; | |
| if (c) { | |
| c = e.factoryEasing(c); | |
| c.setStartTime(d); | |
| c.setStartValue(e.x); | |
| c.setEndValue(b); | |
| if ("duration"in g) { | |
| c.setDuration(g.duration) | |
| } | |
| } | |
| if (a) { | |
| a = e.factoryEasing(a); | |
| a.setStartTime(d); | |
| a.setStartValue(e.y); | |
| a.setEndValue(i); | |
| if ("duration"in g) { | |
| a.setDuration(g.duration) | |
| } | |
| } | |
| return e.animate(c, a) | |
| }, | |
| doAnimationFrame: function() { | |
| var e = this, c = e.activeEasingX, b = e.activeEasingY, d = Date.now(), a, g; | |
| 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 = g = Math.round(b.getValue()); | |
| if (b.isEnded) { | |
| e.activeEasingY = null ; | |
| e.fireEvent("axisanimationend", e, "y", g) | |
| } | |
| } else { | |
| g = e.y | |
| } | |
| if (e.lastX !== a || e.lastY !== g) { | |
| e.doTranslate(a, g); | |
| e.lastX = a; | |
| e.lastY = g | |
| } | |
| e.fireEvent("animationframe", e, a, g) | |
| }, | |
| stopAnimation: function() { | |
| var a = this; | |
| if (!a.isAnimating) { | |
| return | |
| } | |
| a.activeEasingX = null ; | |
| a.activeEasingY = null ; | |
| a.isAnimating = false; | |
| Ext.AnimationQueue.stop(a.doAnimationFrame, a); | |
| a.fireEvent("animationend", a, a.x, a.y); | |
| if (a.callback) { | |
| a.callback.call(a.callbackScope); | |
| a.callback = null | |
| } | |
| }, | |
| refresh: function() { | |
| this.translate(this.x, this.y) | |
| }, | |
| destroy: function() { | |
| if (this.isAnimating) { | |
| this.stopAnimation() | |
| } | |
| Ext.Evented.prototype.destroy.call(this) | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util.translatable, "Abstract"], 0)); | |
| (Ext.cmd.derive("Ext.util.translatable.Dom", Ext.util.translatable.Abstract, { | |
| config: { | |
| element: null | |
| }, | |
| applyElement: function(a) { | |
| if (!a) { | |
| return | |
| } | |
| return Ext.get(a) | |
| }, | |
| updateElement: function() { | |
| this.refresh() | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util.translatable, "Dom"], 0)); | |
| (Ext.cmd.derive("Ext.util.translatable.CssTransform", Ext.util.translatable.Dom, { | |
| doTranslate: function(a, c) { | |
| var b = this.getElement(); | |
| if (!this.destroyed && !b.destroyed) { | |
| b.translate(a, c) | |
| } | |
| }, | |
| destroy: function() { | |
| var a = this.getElement(); | |
| if (a && !a.destroyed) { | |
| a.dom.style.webkitTransform = null | |
| } | |
| Ext.util.translatable.Dom.prototype.destroy.call(this) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util.translatable, "CssTransform"], 0)); | |
| (Ext.cmd.derive("Ext.util.translatable.ScrollPosition", 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("x-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 b = this | |
| , a = b.getElement() | |
| , c = b.wrapper; | |
| if (c) { | |
| if (!a.destroyed) { | |
| if (b.getUseWrapper()) { | |
| c.doReplaceWith(a) | |
| } | |
| a.removeCls("x-translatable") | |
| } | |
| if (!c.destroyed) { | |
| c.removeCls("x-translatable-container"); | |
| c.un("painted", "refresh", b) | |
| } | |
| delete b.wrapper; | |
| delete b._element | |
| } | |
| Ext.util.translatable.Dom.prototype.destroy.call(this) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util.translatable, "ScrollPosition"], 0)); | |
| (Ext.cmd.derive("Ext.util.translatable.ScrollParent", Ext.util.translatable.Dom, { | |
| isScrollParent: true, | |
| applyElement: function(a) { | |
| var b = Ext.get(a); | |
| if (b) { | |
| this.parent = b.parent() | |
| } | |
| return b | |
| }, | |
| doTranslate: function(a, c) { | |
| var b = this.parent; | |
| b.setScrollLeft(Math.round(-a)); | |
| b.setScrollTop(Math.round(-c)) | |
| }, | |
| getPosition: function() { | |
| var c = this | |
| , a = c.position | |
| , b = c.parent; | |
| a.x = b.getScrollLeft(); | |
| a.y = b.getScrollTop(); | |
| return a | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util.translatable, "ScrollParent"], 0)); | |
| (Ext.cmd.derive("Ext.util.translatable.CssPosition", 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 ; | |
| Ext.util.translatable.Dom.prototype.destroy.call(this) | |
| } | |
| }, 0, 0, 0, 0, 0, 0, [Ext.util.translatable, "CssPosition"], 0)); | |
| (Ext.cmd.derive("Ext.util.Translatable", Ext.Base, { | |
| constructor: function(a) { | |
| var b = Ext.util.translatable; | |
| switch (Ext.browser.getPreferredTranslationMethod(a)) { | |
| case "scrollposition": | |
| return new b.ScrollPosition(a); | |
| case "scrollparent": | |
| return new b.ScrollParent(a); | |
| case "csstransform": | |
| return new b.CssTransform(a); | |
| case "cssposition": | |
| return new b.CssPosition(a) | |
| } | |
| } | |
| }, 1, 0, 0, 0, 0, 0, [Ext.util, "Translatable"], 0)); | |
| (Ext.cmd.derive("Ext.scroll.Indicator", Ext.Widget, { | |
| config: { | |
| axis: null , | |
| hideAnimation: true, | |
| hideDelay: 0, | |
| scroller: null , | |
| minLength: 24 | |
| }, | |
| defaultHideAnimation: { | |
| to: { | |
| opacity: 0 | |
| }, | |
| duration: 300 | |
| }, | |
| names: { | |
| x: { | |
| side: "l", | |
| getSize: "getHeight", | |
| setLength: "setWidth", | |
| translate: "translateX" | |
| }, | |
| y: { | |
| side: "t", | |
| getSize: "getWidth", | |
| setLength: "setHeight", | |
| translate: "translateY" | |
| } | |
| }, | |
| oppositeAxis: { | |
| x: "y", | |
| y: "x" | |
| }, | |
| cls: "x-scroll-indicator", | |
| applyHideAnimation: function(a) { | |
| if (a) { | |
| a = Ext.mergeIf({ | |
| onEnd: this.onHideAnimationEnd, | |
| scope: this | |
| }, this.defaultHideAnimation, a) | |
| } | |
| return a | |
| }, | |
| constructor: function(a) { | |
| var c = this, b; | |
| Ext.Widget.prototype.constructor.call(this, a); | |
| b = c.getAxis(); | |
| c.names = c.names[b]; | |
| c.element.addCls(c.cls + " " + c.cls + "-" + b) | |
| }, | |
| hide: function() { | |
| var b = this | |
| , a = b.getHideDelay(); | |
| if (a) { | |
| b._hideTimer = Ext.defer(b.doHide, a, b) | |
| } else { | |
| b.doHide() | |
| } | |
| }, | |
| setValue: function(n) { | |
| var l = this, c = l.element, k = l.names, d = l.getAxis(), i = l.getScroller(), h = i.getMaxUserPosition()[d], o = i.getElementSize()[d], j = l.length, b = l.getMinLength(), a = j, g = o - j - l.sizeAdjust, p = Math.round, m = Math.max, e; | |
| if (n < 0) { | |
| a = p(m(j + (j * n / o), b)); | |
| e = 0 | |
| } else { | |
| if (n > h) { | |
| a = p(m(j - (j * (n - h) / o), b)); | |
| e = g + j - a | |
| } else { | |
| e = p(n / h * g) | |
| } | |
| } | |
| l[k.translate](e); | |
| c[k.setLength](a) | |
| }, | |
| show: function() { | |
| var b = this | |
| , a = b.element | |
| , c = a.getActiveAnimation(); | |
| if (c) { | |
| c.end() | |
| } | |
| if (!b._inDom) { | |
| b.getScroller().getElement().appendChild(a); | |
| b._inDom = true; | |
| if (!b.size) { | |
| b.cacheStyles() | |
| } | |
| } | |
| b.refreshLength(); | |
| clearTimeout(b._hideTimer); | |
| a.setStyle("opacity", "") | |
| }, | |
| privates: { | |
| cacheStyles: function() { | |
| var b = this | |
| , a = b.element | |
| , c = b.names; | |
| b.size = a[c.getSize](); | |
| b.margin = a.getMargin(c.side) | |
| }, | |
| doHide: function() { | |
| var b = this.getHideAnimation() | |
| , a = this.element; | |
| if (b) { | |
| a.animate(b) | |
| } else { | |
| a.setStyle("opacity", 0) | |
| } | |
| }, | |
| hasOpposite: function() { | |
| return this.getScroller().isAxisEnabled(this.oppositeAxis[this.getAxis()]) | |
| }, | |
| onHideAnimationEnd: function() { | |
| this.element.setStyle("opacity", "0") | |
| }, | |
| refreshLength: function() { | |
| var j = this | |
| , i = j.names | |
| , d = j.getAxis() | |
| , g = j.getScroller() | |
| , a = g.getSize()[d] | |
| , k = g.getElementSize()[d] | |
| , h = k / a | |
| , c = j.margin * 2 | |
| , e = j.hasOpposite() ? (c + j.size) : c | |
| , b = Math.max(Math.round((k - e) * h), j.getMinLength()); | |
| j.sizeAdjust = e; | |
| j.length = b; | |
| j.element[i.setLength](b) | |
| }, | |
| translateX: function(a) { | |
| this.element.translate(a) | |
| }, | |
| translateY: function(a) { | |
| this.element.translate(0, a) | |
| } | |
| } | |
| }, 1, ["scrollindicator"], ["widget", "scrollindicator"], { | |
| widget: true, | |
| scrollindicator: true | |
| }, ["widget.scrollindicator"], 0, [Ext.scroll, "Indicator"], 0)); | |
| (Ext.cmd.derive("Ext.scroll.TouchScroller", Ext.scroll.Scroller, { | |
| isTouchScroller: true, | |
| config: { | |
| autoRefresh: true, | |
| bounceEasing: { | |
| duration: 400 | |
| }, | |
| elementSize: undefined, | |
| indicators: true, | |
| fps: "auto", | |
| maxAbsoluteVelocity: 6, | |
| momentumEasing: { | |
| momentum: { | |
| acceleration: 30, | |
| friction: 0.5 | |
| }, | |
| bounce: { | |
| acceleration: 30, | |
| springTension: 0.3 | |
| }, | |
| minVelocity: 1 | |
| }, | |
| outOfBoundRestrictFactor: 0.5, | |
| innerElement: null , | |
| size: undefined, | |
| slotSnapEasing: { | |
| duration: 150 | |
| }, | |
| slotSnapOffset: { | |
| x: 0, | |
| y: 0 | |
| }, | |
| startMomentumResetTime: 300, | |
| translatable: { | |
| translationMethod: "auto", | |
| useWrapper: false | |
| } | |
| }, | |
| cls: "x-scroll-container", | |
| scrollerCls: "x-scroll-scroller", | |
| dragStartTime: 0, | |
| dragEndTime: 0, | |
| isDragging: false, | |
| isAnimating: false, | |
| isMouseEvent: { | |
| mousedown: 1, | |
| mousemove: 1, | |
| mouseup: 1 | |
| }, | |
| listenerMap: { | |
| touchstart: "onTouchStart", | |
| touchmove: "onTouchMove", | |
| dragstart: "onDragStart", | |
| drag: "onDrag", | |
| dragend: "onDragEnd" | |
| }, | |
| refreshCounter: 0, | |
| constructor: function(a) { | |
| var b = this | |
| , c = "onEvent"; | |
| b.elementListeners = { | |
| touchstart: c, | |
| touchmove: c, | |
| dragstart: c, | |
| drag: c, | |
| dragend: c, | |
| scope: b | |
| }; | |
| b.minPosition = { | |
| x: 0, | |
| y: 0 | |
| }; | |
| b.startPosition = { | |
| x: 0, | |
| y: 0 | |
| }; | |
| b.velocity = { | |
| x: 0, | |
| y: 0 | |
| }; | |
| b.isAxisEnabledFlags = { | |
| x: false, | |
| y: false | |
| }; | |
| b.flickStartPosition = { | |
| x: 0, | |
| y: 0 | |
| }; | |
| b.flickStartTime = { | |
| x: 0, | |
| y: 0 | |
| }; | |
| b.lastDragPosition = { | |
| x: 0, | |
| y: 0 | |
| }; | |
| b.dragDirection = { | |
| x: 0, | |
| y: 0 | |
| }; | |
| Ext.scroll.Scroller.prototype.constructor.call(this, a); | |
| b.refreshAxes(); | |
| b.scheduleRefresh = { | |
| idle: b.doRefresh, | |
| scope: b, | |
| single: true, | |
| destroyable: true | |
| } | |
| }, | |
| applyBounceEasing: function(b) { | |
| var a = Ext.fx.easing.EaseOut; | |
| return { | |
| x: Ext.factory(b, a), | |
| y: Ext.factory(b, a) | |
| } | |
| }, | |
| applyElementSize: function(b) { | |
| var c = this.getElement(), d, a, e; | |
| if (!c) { | |
| return null | |
| } | |
| d = c.dom; | |
| if (!d) { | |
| return | |
| } | |
| if (b == null ) { | |
| a = d.clientWidth; | |
| e = d.clientHeight | |
| } else { | |
| a = b.x; | |
| e = b.y | |
| } | |
| return { | |
| x: a, | |
| y: e | |
| } | |
| }, | |
| applyIndicators: function(g, c) { | |
| var e = this, b, d, a, h; | |
| if (g) { | |
| if (g === true) { | |
| b = d = {} | |
| } else { | |
| a = g.x; | |
| h = g.y; | |
| if (a || h) { | |
| b = (a == null || a === true) ? {} : a; | |
| d = (a == null || h === true) ? {} : h | |
| } else { | |
| b = d = g | |
| } | |
| } | |
| if (c) { | |
| if (b) { | |
| c.x.setConfig(b) | |
| } else { | |
| c.x.destroy(); | |
| c.x = null | |
| } | |
| if (d) { | |
| c.y.setConfig(d) | |
| } else { | |
| c.y.destroy(); | |
| c.y = null | |
| } | |
| g = c | |
| } else { | |
| g = { | |
| x: null , | |
| y: null | |
| }; | |
| if (b) { | |
| g.x = new Ext.scroll.Indicator(Ext.applyIf({ | |
| axis: "x", | |
| scroller: e | |
| }, b)) | |
| } | |
| if (d) { | |
| g.y = new Ext.scroll.Indicator(Ext.applyIf({ | |
| axis: "y", | |
| scroller: e | |
| }, d)) | |
| } | |
| } | |
| } else { | |
| if (c) { | |
| if (c.x) { | |
| c.x.destroy() | |
| } | |
| if (c.y) { | |
| c.y.destroy() | |
| } | |
| c.x = c.y = null | |
| } | |
| } | |
| return g | |
| }, | |
| applyMomentumEasing: function(b) { | |
| var a = Ext.fx.easing.BoundMomentum; | |
| return { | |
| x: Ext.factory(b, a), | |
| y: Ext.factory(b, a) | |
| } | |
| }, | |
| applyInnerElement: function(a) { | |
| if (a && !a.isElement) { | |
| a = Ext.get(a) | |
| } | |
| return a | |
| }, | |
| applyMaxPosition: function(c, d) { | |
| if (d && c.x === d.x && c.y === d.y) { | |
| return | |
| } | |
| var a = this.getTranslatable(), b; | |
| if (a.isAnimating) { | |
| b = a.activeEasingY; | |
| if (b && b.getStartVelocity && b.getStartVelocity() < 0 && c.y < d.y) { | |
| b.setMinMomentumValue(-c.y) | |
| } | |
| } | |
| return c | |
| }, | |
| applyMaxUserPosition: function(b, a) { | |
| if (a && b.x === a.x && b.y === a.y) { | |
| return | |
| } | |
| return b | |
| }, | |
| applySize: function(b) { | |
| var c = this.getElement(), e, d, a, g; | |
| if (typeof b === "number") { | |
| a = b; | |
| g = b | |
| } else { | |
| if (b) { | |
| a = b.x; | |
| g = b.y | |
| } | |
| } | |
| if (c && (a == null || g == null )) { | |
| e = c.dom; | |
| d = this.getInnerElement().dom; | |
| if (a == null ) { | |
| a = Math.max(d.scrollWidth, e.clientWidth) | |
| } | |
| if (g == null ) { | |
| g = Math.max(d.scrollHeight, e.clientHeight) | |
| } | |
| } | |
| return { | |
| x: a, | |
| y: g | |
| } | |
| }, | |
| applySlotSnapOffset: function(a) { | |
| if (typeof a === "number") { | |
| a = { | |
| x: a, | |
| y: a | |
| } | |
| } | |
| return a | |
| }, | |
| applySlotSnapSize: function(a) { | |
| if (typeof a === "number") { | |
| a = { | |
| x: a, | |
| y: a | |
| } | |
| } | |
| return a | |
| }, | |
| applySlotSnapEasing: function(b) { | |
| var a = Ext.fx.easing.EaseOut; | |
| return { | |
| x: Ext.factory(b, a), | |
| y: Ext.factory(b, a) | |
| } | |
| }, | |
| applyTranslatable: function(b, a) { | |
| return Ext.factory(b, Ext.util.Translatable, a) | |
| }, | |
| destroy: function() { | |
| var c = this | |
| , b = c.getElement() | |
| , d = c.getInnerElement() | |
| , a = c.sizeMonitors; | |
| if (a) { | |
| a.element.destroy(); | |
| a.container.destroy() | |
| } | |
| if (b && !b.destroyed) { | |
| b.removeCls(c.cls) | |
| } | |
| if (d && !d.destroyed) { | |
| d.removeCls(c.scrollerCls) | |
| } | |
| if (c._isWrapped) { | |
| if (!b.destroyed) { | |
| c.unwrapContent() | |
| } | |
| d.destroy() | |
| } | |
| c.setElement(null ); | |
| c.setInnerElement(null ); | |
| c.setIndicators(null ); | |
| Ext.destroy(c.getTranslatable()); | |
| Ext.scroll.Scroller.prototype.destroy.call(this) | |
| }, | |
| refresh: function(a, b) { | |
| var c = this; | |
| ++c.refreshCounter; | |
| if (a) { | |
| c.doRefresh(b) | |
| } else { | |
| if (!c.refreshScheduled) { | |
| c.scheduleRefresh.args = [b]; | |
| c.refreshScheduled = Ext.on(c.scheduleRefresh) | |
| } | |
| } | |
| }, | |
| updateAutoRefresh: function(a) { | |
| this.toggleResizeListeners(a) | |
| }, | |
| updateBounceEasing: function(a) { | |
| this.getTranslatable().setEasingX(a.x).setEasingY(a.y) | |
| }, | |
| updateElementSize: function() { | |
| if (!this.isConfiguring) { | |
| this.refreshAxes() | |
| } | |
| }, | |
| updateDisabled: function(a) { | |
| if (!this.isConfiguring) { | |
| if (a) { | |
| this.detachListeners() | |
| } else { | |
| this.attachListeners() | |
| } | |
| } | |
| }, | |
| updateElement: function(c, b) { | |
| var e = this, g = e.getInnerElement(), d, a; | |
| if (!g) { | |
| g = c.dom.firstChild; | |
| if (!g || g.nodeType !== 1 || !Ext.fly(g).hasCls(e.scrollerCls)) { | |
| g = e.wrapContent(c) | |
| } | |
| e.setInnerElement(g) | |
| } | |
| c.addCls(e.cls); | |
| if (e.isConfiguring) { | |
| if (!e.getTranslatable().isScrollParent) { | |
| c.dom.style.overflowX = c.dom.style.overflowY = ""; | |
| d = e.elementListeners; | |
| d.mousewheel = "onMouseWheel"; | |
| d.scroll = { | |
| fn: "onElementScroll", | |
| delegated: false, | |
| scope: e | |
| } | |
| } | |
| } | |
| if (!e.getDisabled()) { | |
| e.attachListeners() | |
| } | |
| if (!e.isConfiguring) { | |
| a = e.getAutoRefresh(); | |
| if (a !== false) { | |
| e.toggleResizeListeners(a); | |
| if (a) { | |
| e.refresh() | |
| } else { | |
| if (a === null ) { | |
| e.setElementSize(null ) | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| updateFps: function(a) { | |
| if (a !== "auto") { | |
| this.getTranslatable().setFps(a) | |
| } | |
| }, | |
| updateMaxUserPosition: function() { | |
| this.snapToBoundary() | |
| }, | |
| updateMinUserPosition: function() { | |
| this.snapToBoundary() | |
| }, | |
| updateInnerElement: function(a) { | |
| if (a) { | |
| a.addCls(this.scrollerCls) | |
| } | |
| this.getTranslatable().setElement(a) | |
| }, | |
| updateSize: function(a) { | |
| if (!this.isConfiguring) { | |
| if (Ext.supports.touchScroll === 1) { | |
| Ext.scroll.Scroller.prototype.updateSize.call(this, a) | |
| } | |
| this.refreshAxes() | |
| } | |
| }, | |
| updateTranslatable: function(a) { | |
| a.setElement(this.getInnerElement()); | |
| if (!a.isScrollParent) { | |
| a.on({ | |
| animationframe: "onAnimationFrame", | |
| animationend: "onAnimationEnd", | |
| scope: this | |
| }) | |
| } | |
| }, | |
| updateX: function() { | |
| if (!this.isConfiguring) { | |
| this.refreshAxes() | |
| } | |
| }, | |
| updateY: function() { | |
| if (!this.isConfiguring) { | |
| this.refreshAxes() | |
| } | |
| }, | |
| privates: { | |
| attachListeners: function() { | |
| this.getElement().on(this.elementListeners) | |
| }, | |
| constrainX: function(a) { | |
| return Math.min(this.getMaxPosition().x, Math.max(a, 0)) | |
| }, | |
| constrainY: function(a) { | |
| return Math.min(this.getMaxPosition().y, Math.max(a, 0)) | |
| }, | |
| convertEasingConfig: function(a) { | |
| return a | |
| }, | |
| detachListeners: function() { | |
| this.getElement().un(this.elementListeners) | |
| }, | |
| doRefresh: function(b) { | |
| var d = this, c, a; | |
| if (d.refreshScheduled) { | |
| d.refreshScheduled = d.refreshScheduled.destroy() | |
| } | |
| if (d.refreshCounter && d.getElement()) { | |
| d.stopAnimation(); | |
| d.getTranslatable().refresh(); | |
| if (b) { | |
| c = b.size; | |
| a = b.elementSize | |
| } | |
| d.setSize(c); | |
| d.setElementSize(a); | |
| d.fireEvent("refresh", d); | |
| d.refreshCounter = 0 | |
| } | |
| }, | |
| doScrollTo: function(k, j, b, g) { | |
| var i = this | |
| , h = i.isDragging | |
| , l = i.getTranslatable().isScrollParent | |
| , a = !i.isReflecting && !l; | |
| if (i.destroyed || !i.getElement()) { | |
| return i | |
| } | |
| g = g || i.isDragging; | |
| var m = i.getTranslatable(), c = i.position, n = false, e, d; | |
| if (!h || i.isAxisEnabled("x")) { | |
| if (isNaN(k) || typeof k !== "number") { | |
| k = c.x | |
| } else { | |
| if (!g) { | |
| k = i.constrainX(k) | |
| } | |
| if (c.x !== k) { | |
| c.x = k; | |
| n = true | |
| } | |
| } | |
| e = i.convertX(-k) | |
| } | |
| if (!h || i.isAxisEnabled("y")) { | |
| if (isNaN(j) || typeof j !== "number") { | |
| j = c.y | |
| } else { | |
| if (!g) { | |
| j = i.constrainY(j) | |
| } | |
| if (c.y !== j) { | |
| c.y = j; | |
| n = true | |
| } | |
| } | |
| d = -j | |
| } | |
| if (n) { | |
| if (a) { | |
| i.onScrollStart() | |
| } | |
| if (b) { | |
| m.translateAnimated(e, d, b) | |
| } else { | |
| if (!l) { | |
| i.onScroll() | |
| } | |
| m.translate(e, d); | |
| if (a) { | |
| i.onScrollEnd() | |
| } | |
| } | |
| } else { | |
| if (b && b.callback) { | |
| b.callback() | |
| } | |
| } | |
| return i | |
| }, | |
| getAnimationEasing: function(i, l) { | |
| if (!this.isAxisEnabled(i)) { | |
| return null | |
| } | |
| var n = this, h = n.position[i], d = n.getMinUserPosition()[i], k = n.getMaxUserPosition()[i], b = n.getMaxAbsoluteVelocity(), g = null , c = n.dragEndTime, j = l.flick.velocity[i], o = i === "x", a, m; | |
| if (h < d) { | |
| g = d | |
| } else { | |
| if (h > k) { | |
| g = k | |
| } | |
| } | |
| if (o) { | |
| h = n.convertX(h); | |
| g = n.convertX(g) | |
| } | |
| if (g !== null ) { | |
| m = n.getBounceEasing()[i]; | |
| m.setConfig({ | |
| startTime: c, | |
| startValue: -h, | |
| endValue: -g | |
| }); | |
| return m | |
| } | |
| if (j === 0) { | |
| return null | |
| } | |
| if (j < -b) { | |
| j = -b | |
| } else { | |
| if (j > b) { | |
| j = b | |
| } | |
| } | |
| m = n.getMomentumEasing()[i]; | |
| a = { | |
| startTime: c, | |
| startValue: -h, | |
| startVelocity: j * 1.5, | |
| minMomentumValue: -k, | |
| maxMomentumValue: 0 | |
| }; | |
| if (o) { | |
| n.convertEasingConfig(a) | |
| } | |
| m.setConfig(a); | |
| return m | |
| }, | |
| getSnapPosition: function(c) { | |
| var d = this, i = d.getSlotSnapSize()[c], e = null , a, h, g, b; | |
| if (i !== 0 && d.isAxisEnabled(c)) { | |
| a = d.position[c]; | |
| h = d.getSlotSnapOffset()[c]; | |
| g = d.getMaxUserPosition()[c]; | |
| b = Math.floor((a - h) % i); | |
| if (b !== 0) { | |
| if (a !== g) { | |
| if (Math.abs(b) > i / 2) { | |
| e = Math.min(g, a + ((b > 0) ? i - b : b - i)) | |
| } else { | |
| e = a - b | |
| } | |
| } else { | |
| e = a - b | |
| } | |
| } | |
| } | |
| return e | |
| }, | |
| hideIndicators: function() { | |
| var c = this, d = c.getIndicators(), a, b; | |
| if (d) { | |
| if (c.isAxisEnabled("x")) { | |
| a = d.x; | |
| if (a) { | |
| a.hide() | |
| } | |
| } | |
| if (c.isAxisEnabled("y")) { | |
| b = d.y; | |
| if (b) { | |
| b.hide() | |
| } | |
| } | |
| } | |
| }, | |
| isAxisEnabled: function(a) { | |
| this.getX(); | |
| this.getY(); | |
| return this.isAxisEnabledFlags[a] | |
| }, | |
| onAnimationEnd: function() { | |
| this.snapToBoundary(); | |
| this.onScrollEnd() | |
| }, | |
| onAnimationFrame: function(c, b, d) { | |
| var a = this.position; | |
| a.x = this.convertX(-b); | |
| a.y = -d; | |
| this.onScroll() | |
| }, | |
| onAxisDrag: function(d, q) { | |
| if (q && this.isAxisEnabled(d)) { | |
| var r = this, l = r.flickStartPosition, s = r.flickStartTime, j = r.lastDragPosition, n = r.dragDirection, a = r.position[d], o = r.getMinUserPosition()[d], p = r.getMaxUserPosition()[d], h = r.startPosition[d], k = j[d], m = h - q, i = n[d], g = r.getOutOfBoundRestrictFactor(), b = r.getStartMomentumResetTime(), c = Ext.Date.now(), e; | |
| if (m < o) { | |
| m *= g | |
| } else { | |
| if (m > p) { | |
| e = m - p; | |
| m = p + e * g | |
| } | |
| } | |
| if (m > k) { | |
| n[d] = 1 | |
| } else { | |
| if (m < k) { | |
| n[d] = -1 | |
| } | |
| } | |
| if ((i !== 0 && (n[d] !== i)) || (c - s[d]) > b) { | |
| l[d] = a; | |
| s[d] = c | |
| } | |
| j[d] = m; | |
| return true | |
| } | |
| }, | |
| onDomScroll: function() { | |
| var b = this, c, a; | |
| if (b.getTranslatable().isScrollParent) { | |
| c = b.getElement().dom; | |
| a = b.position; | |
| a.x = c.scrollLeft; | |
| a.y = c.scrollTop | |
| } | |
| Ext.scroll.Scroller.prototype.onDomScroll.call(this) | |
| }, | |
| onDrag: function(c) { | |
| var a = this | |
| , b = a.lastDragPosition; | |
| if (!a.isDragging) { | |
| return | |
| } | |
| if (a.onAxisDrag("x", a.convertX(c.deltaX)) | a.onAxisDrag("y", c.deltaY)) { | |
| a.doScrollTo(b.x, b.y) | |
| } | |
| }, | |
| onDragEnd: function(d) { | |
| var c = this, b, a; | |
| if (!c.isDragging) { | |
| return | |
| } | |
| c.dragEndTime = Ext.Date.now(); | |
| c.onDrag(d); | |
| c.isDragging = false; | |
| b = c.getAnimationEasing("x", d); | |
| a = c.getAnimationEasing("y", d); | |
| if (b || a) { | |
| c.getTranslatable().animate(b, a) | |
| } else { | |
| c.onScrollEnd() | |
| } | |
| }, | |
| onDragStart: function(m) { | |
| var n = this | |
| , q = n.getDirection() | |
| , h = m.absDeltaX | |
| , g = m.absDeltaY | |
| , l = n.getDirectionLock() | |
| , j = n.startPosition | |
| , d = n.flickStartPosition | |
| , k = n.flickStartTime | |
| , i = n.lastDragPosition | |
| , c = n.position | |
| , b = n.dragDirection | |
| , p = c.x | |
| , o = c.y | |
| , a = Ext.Date.now(); | |
| if (l && q !== "both") { | |
| if ((q === "horizontal" && h > g) || (q === "vertical" && g > h)) { | |
| m.stopPropagation() | |
| } else { | |
| return | |
| } | |
| } | |
| i.x = p; | |
| i.y = o; | |
| d.x = p; | |
| d.y = o; | |
| j.x = p; | |
| j.y = o; | |
| k.x = a; | |
| k.y = a; | |
| b.x = 0; | |
| b.y = 0; | |
| n.dragStartTime = a; | |
| n.isDragging = true; | |
| if (!n.isScrolling) { | |
| n.onScrollStart() | |
| } | |
| }, | |
| onElementResize: function(a, b) { | |
| this.refresh(true, { | |
| elementSize: { | |
| x: b.contentWidth, | |
| y: b.contentHeight | |
| }, | |
| size: this.getAutoRefresh() ? null : this.getSize() | |
| }) | |
| }, | |
| onElementScroll: function(a, b) { | |
| b.scrollTop = b.scrollLeft = 0 | |
| }, | |
| onEvent: function(b) { | |
| var a = this | |
| , c = b.browserEvent; | |
| if ((!a.self.isTouching || a.isTouching) && ((!a.getTranslatable().isScrollParent) || (!a.isMouseEvent[c.type] && c.pointerType !== "mouse")) && (a.getY() || a.getX())) { | |
| a[a.listenerMap[b.type]](b) | |
| } | |
| }, | |
| onInnerElementResize: function(a, b) { | |
| this.refresh(true, { | |
| size: { | |
| x: b.width, | |
| y: b.height | |
| } | |
| }) | |
| }, | |
| onMouseWheel: function(k) { | |
| var l = this | |
| , n = k.getWheelDeltas() | |
| , d = -n.x | |
| , b = -n.y | |
| , h = l.position | |
| , g = l.getMaxUserPosition() | |
| , a = l.getMinUserPosition() | |
| , m = Math.max | |
| , c = Math.min | |
| , j = m(c(h.x + d, g.x), a.x) | |
| , i = m(c(h.y + b, g.y), a.y); | |
| d = j - h.x; | |
| b = i - h.y; | |
| if (!d && !b) { | |
| return | |
| } | |
| k.stopEvent(); | |
| l.onScrollStart(); | |
| l.scrollBy(d, b); | |
| l.onScroll(); | |
| l.onScrollEnd() | |
| }, | |
| onPartnerScrollEnd: function(a, c) { | |
| var b = this; | |
| if (!b.getTranslatable().isScrollParent) { | |
| b.fireScrollEnd(a, c) | |
| } | |
| Ext.scroll.Scroller.prototype.onPartnerScrollEnd.call(this, a, c); | |
| b.isScrolling = false; | |
| b.hideIndicators() | |
| }, | |
| onPartnerScrollStart: function(a, c) { | |
| var b = this; | |
| b.isScrolling = true; | |
| if (!b.getTranslatable().isScrollParent) { | |
| b.fireScrollStart(a, c) | |
| } | |
| b.showIndicators() | |
| }, | |
| onScroll: function() { | |
| var e = this, c = e.position, b = c.x, h = c.y, g = e.getIndicators(), a, d; | |
| if (g) { | |
| if (e.isAxisEnabled("x")) { | |
| a = g.x; | |
| if (a) { | |
| a.setValue(b) | |
| } | |
| } | |
| if (e.isAxisEnabled("y")) { | |
| d = g.y; | |
| if (d) { | |
| d.setValue(h) | |
| } | |
| } | |
| } | |
| e.fireScroll(b, h) | |
| }, | |
| onScrollEnd: function() { | |
| var b = this | |
| , a = b.position; | |
| if (b.isScrolling && !b.isTouching && !b.snapToSlot()) { | |
| b.hideIndicators(); | |
| b.isScrolling = Ext.isScrolling = false; | |
| b.fireScrollEnd(a.x, a.y) | |
| } | |
| }, | |
| onScrollStart: function() { | |
| var b = this | |
| , a = b.position; | |
| if (!b.isScrolling) { | |
| b.showIndicators(); | |
| b.isScrolling = Ext.isScrolling = true; | |
| b.fireScrollStart(a.x, a.y) | |
| } | |
| }, | |
| onTouchEnd: function() { | |
| var a = this; | |
| a.isTouching = a.self.isTouching = false; | |
| if (!a.isDragging && a.snapToSlot()) { | |
| a.onScrollStart() | |
| } | |
| }, | |
| onTouchMove: function(a) { | |
| a.preventDefault() | |
| }, | |
| onTouchStart: function() { | |
| var a = this; | |
| a.isTouching = a.self.isTouching = true; | |
| Ext.getDoc().on({ | |
| touchend: "onTouchEnd", | |
| scope: a, | |
| single: true | |
| }); | |
| a.stopAnimation() | |
| }, | |
| refreshAxes: function() { | |
| var e = this, c = e.isAxisEnabledFlags, l = e.getSize(), k = e.getElementSize(), j = e.getIndicators(), b, a, i, h, d, g; | |
| if (!l || !k) { | |
| return | |
| } | |
| b = Math.max(0, l.x - k.x); | |
| a = Math.max(0, l.y - k.y); | |
| i = e.getX(); | |
| h = e.getY(); | |
| e.setMaxPosition({ | |
| x: b, | |
| y: a | |
| }); | |
| if (i === true || i === "auto") { | |
| c.x = !!b | |
| } else { | |
| if (i === false) { | |
| c.x = false; | |
| d = j && j.x; | |
| if (d) { | |
| d.hide() | |
| } | |
| } else { | |
| if (i === "scroll") { | |
| c.x = true | |
| } | |
| } | |
| } | |
| if (h === true || h === "auto") { | |
| c.y = !!a | |
| } else { | |
| if (h === false) { | |
| c.y = false; | |
| g = j && j.y; | |
| if (g) { | |
| g.hide() | |
| } | |
| } else { | |
| if (h === "scroll") { | |
| c.y = true | |
| } | |
| } | |
| } | |
| e.setMaxUserPosition({ | |
| x: c.x ? b : 0, | |
| y: c.y ? a : 0 | |
| }); | |
| if (Ext.supports.touchScroll === 1) { | |
| e.initXStyle(); | |
| e.initYStyle() | |
| } | |
| }, | |
| showIndicators: function() { | |
| var c = this, d = c.getIndicators(), a, b; | |
| if (d) { | |
| if (c.isAxisEnabled("x")) { | |
| a = d.x; | |
| if (a) { | |
| a.show() | |
| } | |
| } | |
| if (c.isAxisEnabled("y")) { | |
| b = d.y; | |
| if (b) { | |
| b.show() | |
| } | |
| } | |
| } | |
| }, | |
| snapToBoundary: function() { | |
| var i = this | |
| , h = i.getPosition(); | |
| if (i.isConfiguring || !(h.x || h.y)) { | |
| return | |
| } | |
| var c = i.getMinUserPosition() | |
| , g = i.getMaxUserPosition() | |
| , e = c.x | |
| , d = c.y | |
| , b = g.x | |
| , a = g.y | |
| , k = Math.round(h.x) | |
| , j = Math.round(h.y); | |
| if (k < e) { | |
| k = e | |
| } else { | |
| if (k > b) { | |
| k = b | |
| } | |
| } | |
| if (j < d) { | |
| j = d | |
| } else { | |
| if (j > a) { | |
| j = a | |
| } | |
| } | |
| i.doScrollTo(k, j) | |
| }, | |
| snapToSlot: function() { | |
| var a = this | |
| , c = a.getSnapPosition("x") | |
| , b = a.getSnapPosition("y") | |
| , d = a.getSlotSnapEasing(); | |
| if (c !== null || b !== null ) { | |
| a.doScrollTo(c, b, { | |
| easingX: d.x, | |
| easingY: d.y | |
| }); | |
| return true | |
| } | |
| return false | |
| }, | |
| stopAnimation: function() { | |
| this.getTranslatable().stopAnimation() | |
| }, | |
| toggleResizeListeners: function(a) { | |
| var c = this, b = c.getElement(), g, e, d; | |
| if (b) { | |
| d = c.getInnerElement(); | |
| if (a) { | |
| g = e = "on" | |
| } else { | |
| if (a === null ) { | |
| g = "on"; | |
| e = "un" | |
| } else { | |
| g = e = "un" | |
| } | |
| } | |
| b[g]("resize", "onElementResize", c); | |
| d[e]("resize", "onInnerElementResize", c) | |
| } | |
| }, | |
| unwrapContent: function() { | |
| var a = this.getInnerElement().dom, b = this.getElement().dom, c; | |
| while ((c = a.firstChild) ) { | |
| b.insertBefore(c, a) | |
| } | |
| }, | |
| wrapContent: function(a) { | |
| var b = document.createElement("div"), c = a.dom, d; | |
| while (d = c.lastChild) { | |
| b.insertBefore(d, b.firstChild) | |
| } | |
| c.appendChild(b); | |
| this.setInnerElement(b); | |
| this._isWrapped = true; | |
| return this.getInnerElement() | |
| } | |
| } | |
| }, 1, 0, 0, 0, ["scroller.touch"], 0, [Ext.scroll, "TouchScroller"], 0)); | |
| (Ext.cmd.derive("Ext.scroll.DomScroller", Ext.scroll.Scroller, { | |
| isDomScroller: true, | |
| getMaxPosition: function() { | |
| var b = this.getElement(), a = 0, d = 0, c; | |
| if (b && !b.destroyed) { | |
| c = b.dom; | |
| a = c.scrollWidth - c.clientWidth; | |
| d = c.scrollHeight - c.clientHeight | |
| } | |
| return { | |
| x: a, | |
| y: d | |
| } | |
| }, | |
| getMaxUserPosition: function() { | |
| var c = this, b = c.getElement(), a = 0, e = 0, d; | |
| if (b && !b.destroyed) { | |
| d = b.dom; | |
| if (c.getX()) { | |
| a = d.scrollWidth - d.clientWidth | |
| } | |
| if (c.getY()) { | |
| e = d.scrollHeight - d.clientHeight | |
| } | |
| } | |
| return { | |
| x: a, | |
| y: e | |
| } | |
| }, | |
| getPosition: function() { | |
| var a = this; | |
| if (a.positionDirty) { | |
| a.updateDomScrollPosition() | |
| } | |
| return a.position | |
| }, | |
| getSize: function() { | |
| var b = this.getElement(), a, c; | |
| if (b && !b.destroyed) { | |
| c = b.dom; | |
| a = { | |
| x: c.scrollWidth, | |
| y: c.scrollHeight | |
| } | |
| } else { | |
| a = { | |
| x: 0, | |
| y: 0 | |
| } | |
| } | |
| return a | |
| }, | |
| updateElement: function(b, a) { | |
| this.initXStyle(); | |
| this.initYStyle() | |
| }, | |
| updateX: function(a) { | |
| this.initXStyle() | |
| }, | |
| updateY: function(a) { | |
| this.initYStyle() | |
| }, | |
| privates: { | |
| doScrollTo: function(k, j, a) { | |
| var h = this, d = h.getElement(), e, b, l, m, g, c; | |
| if (d && !d.destroyed) { | |
| b = d.dom; | |
| m = (k === Infinity); | |
| g = (j === Infinity); | |
| if (m || g) { | |
| e = h.getMaxPosition(); | |
| if (m) { | |
| k = e.x | |
| } | |
| if (g) { | |
| j = e.y | |
| } | |
| } | |
| k = h.convertX(k); | |
| if (a) { | |
| l = {}; | |
| if (j != null ) { | |
| l.scrollTop = j | |
| } | |
| if (k != null ) { | |
| l.scrollLeft = k | |
| } | |
| d.animate(Ext.mergeIf({ | |
| to: { | |
| scrollTop: j, | |
| scrollLeft: k | |
| } | |
| }, a)) | |
| } else { | |
| if (j != null ) { | |
| b.scrollTop = j | |
| } | |
| if (k != null ) { | |
| b.scrollLeft = k; | |
| if (Ext.isIE8) { | |
| c = b.scrollLeft; | |
| b.scrollLeft = k | |
| } | |
| } | |
| } | |
| h.positionDirty = true | |
| } | |
| }, | |
| getElementScroll: function(a) { | |
| return a.getScroll() | |
| }, | |
| stopAnimation: function() { | |
| var a = this.getElement().getActiveAnimation(); | |
| if (a) { | |
| a.end() | |
| } |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment