ext-base-min.js 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681
  1. /*
  2. * Ext JS Library 2.0 Copyright(c) 2006-2007, Ext JS, LLC. licensing@extjs.com
  3. *
  4. * http://extjs.com/license
  5. */
  6. (function() {
  7. var B;
  8. Ext.lib.Dom = {
  9. getViewWidth : function(E) {
  10. return E ? this.getDocumentWidth() : this.getViewportWidth()
  11. },
  12. getViewHeight : function(E) {
  13. return E ? this.getDocumentHeight() : this.getViewportHeight()
  14. },
  15. getDocumentHeight : function() {
  16. var E = (document.compatMode != "CSS1Compat")
  17. ? document.body.scrollHeight
  18. : document.documentElement.scrollHeight;
  19. return Math.max(E, this.getViewportHeight())
  20. },
  21. getDocumentWidth : function() {
  22. var E = (document.compatMode != "CSS1Compat")
  23. ? document.body.scrollWidth
  24. : document.documentElement.scrollWidth;
  25. return Math.max(E, this.getViewportWidth())
  26. },
  27. getViewportHeight : function() {
  28. if (Ext.isIE) {
  29. return Ext.isStrict
  30. ? document.documentElement.clientHeight
  31. : document.body.clientHeight
  32. } else {
  33. return self.innerHeight
  34. }
  35. },
  36. getViewportWidth : function() {
  37. if (Ext.isIE) {
  38. return Ext.isStrict
  39. ? document.documentElement.clientWidth
  40. : document.body.clientWidth
  41. } else {
  42. return self.innerWidth
  43. }
  44. },
  45. isAncestor : function(F, G) {
  46. F = Ext.getDom(F);
  47. G = Ext.getDom(G);
  48. if (!F || !G) {
  49. return false
  50. }
  51. if (F.contains && !Ext.isSafari) {
  52. return F.contains(G)
  53. } else {
  54. if (F.compareDocumentPosition) {
  55. return !!(F.compareDocumentPosition(G) & 16)
  56. } else {
  57. var E = G.parentNode;
  58. while (E) {
  59. if (E == F) {
  60. return true
  61. } else {
  62. if (!E.tagName || E.tagName.toUpperCase() == "HTML") {
  63. return false
  64. }
  65. }
  66. E = E.parentNode
  67. }
  68. return false
  69. }
  70. }
  71. },
  72. getRegion : function(E) {
  73. return Ext.lib.Region.getRegion(E)
  74. },
  75. getY : function(E) {
  76. return this.getXY(E)[1]
  77. },
  78. getX : function(E) {
  79. return this.getXY(E)[0]
  80. },
  81. getXY : function(G) {
  82. var F, K, M, N, J = (document.body || document.documentElement);
  83. G = Ext.getDom(G);
  84. if (G == J) {
  85. return [0, 0]
  86. }
  87. if (G.getBoundingClientRect) {
  88. M = G.getBoundingClientRect();
  89. N = C(document).getScroll();
  90. return [M.left + N.left, M.top + N.top]
  91. }
  92. var O = 0, L = 0;
  93. F = G;
  94. var E = C(G).getStyle("position") == "absolute";
  95. while (F) {
  96. O += F.offsetLeft;
  97. L += F.offsetTop;
  98. if (!E && C(F).getStyle("position") == "absolute") {
  99. E = true
  100. }
  101. if (Ext.isGecko) {
  102. K = C(F);
  103. var P = parseInt(K.getStyle("borderTopWidth"), 10) || 0;
  104. var H = parseInt(K.getStyle("borderLeftWidth"), 10) || 0;
  105. O += H;
  106. L += P;
  107. if (F != G && K.getStyle("overflow") != "visible") {
  108. O += H;
  109. L += P
  110. }
  111. }
  112. F = F.offsetParent
  113. }
  114. if (Ext.isSafari && E) {
  115. O -= J.offsetLeft;
  116. L -= J.offsetTop
  117. }
  118. if (Ext.isGecko && !E) {
  119. var I = C(J);
  120. O += parseInt(I.getStyle("borderLeftWidth"), 10) || 0;
  121. L += parseInt(I.getStyle("borderTopWidth"), 10) || 0
  122. }
  123. F = G.parentNode;
  124. while (F && F != J) {
  125. if (!Ext.isOpera
  126. || (F.tagName != "TR" && C(F).getStyle("display") != "inline")) {
  127. O -= F.scrollLeft;
  128. L -= F.scrollTop
  129. }
  130. F = F.parentNode
  131. }
  132. return [O, L]
  133. },
  134. setXY : function(E, F) {
  135. E = Ext.fly(E, "_setXY");
  136. E.position();
  137. var G = E.translatePoints(F);
  138. if (F[0] !== false) {
  139. E.dom.style.left = G.left + "px"
  140. }
  141. if (F[1] !== false) {
  142. E.dom.style.top = G.top + "px"
  143. }
  144. },
  145. setX : function(F, E) {
  146. this.setXY(F, [E, false])
  147. },
  148. setY : function(E, F) {
  149. this.setXY(E, [false, F])
  150. }
  151. };
  152. Ext.lib.Event = function() {
  153. var F = false;
  154. var G = [];
  155. var K = [];
  156. var I = 0;
  157. var H = [];
  158. var E = 0;
  159. var J = null;
  160. return {
  161. POLL_RETRYS : 200,
  162. POLL_INTERVAL : 20,
  163. EL : 0,
  164. TYPE : 1,
  165. FN : 2,
  166. WFN : 3,
  167. OBJ : 3,
  168. ADJ_SCOPE : 4,
  169. _interval : null,
  170. startInterval : function() {
  171. if (!this._interval) {
  172. var L = this;
  173. var M = function() {
  174. L._tryPreloadAttach()
  175. };
  176. this._interval = setInterval(M, this.POLL_INTERVAL)
  177. }
  178. },
  179. onAvailable : function(N, L, O, M) {
  180. H.push({
  181. id : N,
  182. fn : L,
  183. obj : O,
  184. override : M,
  185. checkReady : false
  186. });
  187. I = this.POLL_RETRYS;
  188. this.startInterval()
  189. },
  190. addListener : function(Q, M, P) {
  191. Q = Ext.getDom(Q);
  192. if (!Q || !P) {
  193. return false
  194. }
  195. if ("unload" == M) {
  196. K[K.length] = [Q, M, P];
  197. return true
  198. }
  199. var O = function(R) {
  200. return typeof Ext != "undefined" ? P(Ext.lib.Event
  201. .getEvent(R)) : false
  202. };
  203. var L = [Q, M, P, O];
  204. var N = G.length;
  205. G[N] = L;
  206. this.doAdd(Q, M, O, false);
  207. return true
  208. },
  209. removeListener : function(S, O, R) {
  210. var Q, N;
  211. S = Ext.getDom(S);
  212. if (!R) {
  213. return this.purgeElement(S, false, O)
  214. }
  215. if ("unload" == O) {
  216. for (Q = 0, N = K.length; Q < N; Q++) {
  217. var M = K[Q];
  218. if (M && M[0] == S && M[1] == O && M[2] == R) {
  219. K.splice(Q, 1);
  220. return true
  221. }
  222. }
  223. return false
  224. }
  225. var L = null;
  226. var P = arguments[3];
  227. if ("undefined" == typeof P) {
  228. P = this._getCacheIndex(S, O, R)
  229. }
  230. if (P >= 0) {
  231. L = G[P]
  232. }
  233. if (!S || !L) {
  234. return false
  235. }
  236. this.doRemove(S, O, L[this.WFN], false);
  237. delete G[P][this.WFN];
  238. delete G[P][this.FN];
  239. G.splice(P, 1);
  240. return true
  241. },
  242. getTarget : function(N, M) {
  243. N = N.browserEvent || N;
  244. var L = N.target || N.srcElement;
  245. return this.resolveTextNode(L)
  246. },
  247. resolveTextNode : function(L) {
  248. if (Ext.isSafari && L && 3 == L.nodeType) {
  249. return L.parentNode
  250. } else {
  251. return L
  252. }
  253. },
  254. getPageX : function(M) {
  255. M = M.browserEvent || M;
  256. var L = M.pageX;
  257. if (!L && 0 !== L) {
  258. L = M.clientX || 0;
  259. if (Ext.isIE) {
  260. L += this.getScroll()[1]
  261. }
  262. }
  263. return L
  264. },
  265. getPageY : function(L) {
  266. L = L.browserEvent || L;
  267. var M = L.pageY;
  268. if (!M && 0 !== M) {
  269. M = L.clientY || 0;
  270. if (Ext.isIE) {
  271. M += this.getScroll()[0]
  272. }
  273. }
  274. return M
  275. },
  276. getXY : function(L) {
  277. L = L.browserEvent || L;
  278. return [this.getPageX(L), this.getPageY(L)]
  279. },
  280. getRelatedTarget : function(M) {
  281. M = M.browserEvent || M;
  282. var L = M.relatedTarget;
  283. if (!L) {
  284. if (M.type == "mouseout") {
  285. L = M.toElement
  286. } else {
  287. if (M.type == "mouseover") {
  288. L = M.fromElement
  289. }
  290. }
  291. }
  292. return this.resolveTextNode(L)
  293. },
  294. getTime : function(N) {
  295. N = N.browserEvent || N;
  296. if (!N.time) {
  297. var M = allGetServerTime().getTime();
  298. try {
  299. N.time = M
  300. } catch (L) {
  301. this.lastError = L;
  302. return M
  303. }
  304. }
  305. return N.time
  306. },
  307. stopEvent : function(L) {
  308. this.stopPropagation(L);
  309. this.preventDefault(L)
  310. },
  311. stopPropagation : function(L) {
  312. L = L.browserEvent || L;
  313. if (L.stopPropagation) {
  314. L.stopPropagation()
  315. } else {
  316. L.cancelBubble = true
  317. }
  318. },
  319. preventDefault : function(L) {
  320. L = L.browserEvent || L;
  321. if (L.preventDefault) {
  322. L.preventDefault()
  323. } else {
  324. L.returnValue = false
  325. }
  326. },
  327. getEvent : function(M) {
  328. var L = M || window.event;
  329. if (!L) {
  330. var N = this.getEvent.caller;
  331. while (N) {
  332. L = N.arguments[0];
  333. if (L && Event == L.constructor) {
  334. break
  335. }
  336. N = N.caller
  337. }
  338. }
  339. return L
  340. },
  341. getCharCode : function(L) {
  342. L = L.browserEvent || L;
  343. return L.charCode || L.keyCode || 0
  344. },
  345. _getCacheIndex : function(Q, N, P) {
  346. for (var O = 0, M = G.length; O < M; ++O) {
  347. var L = G[O];
  348. if (L && L[this.FN] == P && L[this.EL] == Q
  349. && L[this.TYPE] == N) {
  350. return O
  351. }
  352. }
  353. return -1
  354. },
  355. elCache : {},
  356. getEl : function(L) {
  357. return document.getElementById(L)
  358. },
  359. clearCache : function() {
  360. },
  361. _load : function(M) {
  362. F = true;
  363. var L = Ext.lib.Event;
  364. if (Ext.isIE) {
  365. L.doRemove(window, "load", L._load)
  366. }
  367. },
  368. _tryPreloadAttach : function() {
  369. if (this.locked) {
  370. return false
  371. }
  372. this.locked = true;
  373. var R = !F;
  374. if (!R) {
  375. R = (I > 0)
  376. }
  377. var Q = [];
  378. for (var M = 0, L = H.length; M < L; ++M) {
  379. var P = H[M];
  380. if (P) {
  381. var O = this.getEl(P.id);
  382. if (O) {
  383. if (!P.checkReady || F || O.nextSibling
  384. || (document && document.body)) {
  385. var N = O;
  386. if (P.override) {
  387. if (P.override === true) {
  388. N = P.obj
  389. } else {
  390. N = P.override
  391. }
  392. }
  393. P.fn.call(N, P.obj);
  394. H[M] = null
  395. }
  396. } else {
  397. Q.push(P)
  398. }
  399. }
  400. }
  401. I = (Q.length === 0) ? 0 : I - 1;
  402. if (R) {
  403. this.startInterval()
  404. } else {
  405. clearInterval(this._interval);
  406. this._interval = null
  407. }
  408. this.locked = false;
  409. return true
  410. },
  411. purgeElement : function(P, Q, N) {
  412. var R = this.getListeners(P, N);
  413. if (R) {
  414. for (var O = 0, L = R.length; O < L; ++O) {
  415. var M = R[O];
  416. this.removeListener(P, M.type, M.fn)
  417. }
  418. }
  419. if (Q && P && P.childNodes) {
  420. for (O = 0, L = P.childNodes.length; O < L; ++O) {
  421. this.purgeElement(P.childNodes[O], Q, N)
  422. }
  423. }
  424. },
  425. getListeners : function(M, R) {
  426. var P = [], L;
  427. if (!R) {
  428. L = [G, K]
  429. } else {
  430. if (R == "unload") {
  431. L = [K]
  432. } else {
  433. L = [G]
  434. }
  435. }
  436. for (var O = 0; O < L.length; ++O) {
  437. var T = L[O];
  438. if (T && T.length > 0) {
  439. for (var Q = 0, S = T.length; Q < S; ++Q) {
  440. var N = T[Q];
  441. if (N && N[this.EL] === M
  442. && (!R || R === N[this.TYPE])) {
  443. P.push({
  444. type : N[this.TYPE],
  445. fn : N[this.FN],
  446. obj : N[this.OBJ],
  447. adjust : N[this.ADJ_SCOPE],
  448. index : Q
  449. })
  450. }
  451. }
  452. }
  453. }
  454. return (P.length) ? P : null
  455. },
  456. _unload : function(S) {
  457. var R = Ext.lib.Event, P, O, M, L, N;
  458. for (P = 0, L = K.length; P < L; ++P) {
  459. M = K[P];
  460. if (M) {
  461. var Q = window;
  462. if (M[R.ADJ_SCOPE]) {
  463. if (M[R.ADJ_SCOPE] === true) {
  464. Q = M[R.OBJ]
  465. } else {
  466. Q = M[R.ADJ_SCOPE]
  467. }
  468. }
  469. M[R.FN].call(Q, R.getEvent(S), M[R.OBJ]);
  470. K[P] = null;
  471. M = null;
  472. Q = null
  473. }
  474. }
  475. K = null;
  476. if (G && G.length > 0) {
  477. O = G.length;
  478. while (O) {
  479. N = O - 1;
  480. M = G[N];
  481. if (M) {
  482. R.removeListener(M[R.EL], M[R.TYPE], M[R.FN], N)
  483. }
  484. O = O - 1
  485. }
  486. M = null;
  487. R.clearCache()
  488. }
  489. R.doRemove(window, "unload", R._unload)
  490. },
  491. getScroll : function() {
  492. var L = document.documentElement, M = document.body;
  493. if (L && (L.scrollTop || L.scrollLeft)) {
  494. return [L.scrollTop, L.scrollLeft]
  495. } else {
  496. if (M) {
  497. return [M.scrollTop, M.scrollLeft]
  498. } else {
  499. return [0, 0]
  500. }
  501. }
  502. },
  503. doAdd : function() {
  504. if (window.addEventListener) {
  505. return function(O, M, N, L) {
  506. O.addEventListener(M, N, (L))
  507. }
  508. } else {
  509. if (window.attachEvent) {
  510. return function(O, M, N, L) {
  511. O.attachEvent("on" + M, N)
  512. }
  513. } else {
  514. return function() {
  515. }
  516. }
  517. }
  518. }(),
  519. doRemove : function() {
  520. if (window.removeEventListener) {
  521. return function(O, M, N, L) {
  522. O.removeEventListener(M, N, (L))
  523. }
  524. } else {
  525. if (window.detachEvent) {
  526. return function(N, L, M) {
  527. N.detachEvent("on" + L, M)
  528. }
  529. } else {
  530. return function() {
  531. }
  532. }
  533. }
  534. }()
  535. }
  536. }();
  537. var D = Ext.lib.Event;
  538. D.on = D.addListener;
  539. D.un = D.removeListener;
  540. if (document && document.body) {
  541. D._load()
  542. } else {
  543. D.doAdd(window, "load", D._load)
  544. }
  545. D.doAdd(window, "unload", D._unload);
  546. D._tryPreloadAttach();
  547. Ext.lib.Ajax = {
  548. request : function(K, I, E, J, F) {
  549. if (F) {
  550. var G = F.headers;
  551. if (G) {
  552. for (var H in G) {
  553. if (G.hasOwnProperty(H)) {
  554. this.initHeader(H, G[H], false)
  555. }
  556. }
  557. }
  558. if (F.xmlData) {
  559. this.initHeader("Content-Type", "text/xml", false);
  560. K = "POST";
  561. J = F.xmlData
  562. } else {
  563. if (F.jsonData) {
  564. this.initHeader("Content-Type", "text/javascript",
  565. false);
  566. K = "POST";
  567. J = typeof F.jsonData == "object" ? Ext
  568. .encode(F.jsonData) : F.jsonData
  569. }
  570. }
  571. }
  572. return this.asyncRequest(K, I, E, J)
  573. },
  574. serializeForm : function(F) {
  575. if (typeof F == "string") {
  576. F = (document.getElementById(F) || document.forms[F])
  577. }
  578. var G, E, H, J, K = "", M = false;
  579. for (var L = 0; L < F.elements.length; L++) {
  580. G = F.elements[L];
  581. J = F.elements[L].disabled;
  582. E = F.elements[L].name;
  583. H = F.elements[L].value;
  584. if (!J && E) {
  585. switch (G.type) {
  586. case "select-one" :
  587. case "select-multiple" :
  588. for (var I = 0; I < G.options.length; I++) {
  589. if (G.options[I].selected) {
  590. if (Ext.isIE) {
  591. K += encodeURIComponent(E)
  592. + "="
  593. + encodeURIComponent(G.options[I].attributes["value"].specified
  594. ? G.options[I].value
  595. : G.options[I].text)
  596. + "&"
  597. } else {
  598. K += encodeURIComponent(E)
  599. + "="
  600. + encodeURIComponent(G.options[I]
  601. .hasAttribute("value")
  602. ? G.options[I].value
  603. : G.options[I].text)
  604. + "&"
  605. }
  606. }
  607. }
  608. break;
  609. case "radio" :
  610. case "checkbox" :
  611. if (G.checked) {
  612. K += encodeURIComponent(E) + "="
  613. + encodeURIComponent(H) + "&"
  614. }
  615. break;
  616. case "file" :
  617. case undefined :
  618. case "reset" :
  619. case "button" :
  620. break;
  621. case "submit" :
  622. if (M == false) {
  623. K += encodeURIComponent(E) + "="
  624. + encodeURIComponent(H) + "&";
  625. M = true
  626. }
  627. break;
  628. default :
  629. K += encodeURIComponent(E) + "="
  630. + encodeURIComponent(H) + "&";
  631. break
  632. }
  633. }
  634. }
  635. K = K.substr(0, K.length - 1);
  636. return K
  637. },
  638. headers : {},
  639. hasHeaders : false,
  640. useDefaultHeader : true,
  641. defaultPostHeader : "application/x-www-form-urlencoded",
  642. useDefaultXhrHeader : true,
  643. defaultXhrHeader : "XMLHttpRequest",
  644. hasDefaultHeaders : true,
  645. defaultHeaders : {},
  646. poll : {},
  647. timeout : {},
  648. pollInterval : 50,
  649. transactionId : 0,
  650. setProgId : function(E) {
  651. this.activeX.unshift(E)
  652. },
  653. setDefaultPostHeader : function(E) {
  654. this.useDefaultHeader = E
  655. },
  656. setDefaultXhrHeader : function(E) {
  657. this.useDefaultXhrHeader = E
  658. },
  659. setPollingInterval : function(E) {
  660. if (typeof E == "number" && isFinite(E)) {
  661. this.pollInterval = E
  662. }
  663. },
  664. createXhrObject : function(I) {
  665. var H, E;
  666. try {
  667. E = new XMLHttpRequest();
  668. H = {
  669. conn : E,
  670. tId : I
  671. }
  672. } catch (G) {
  673. for (var F = 0; F < this.activeX.length; ++F) {
  674. try {
  675. E = new ActiveXObject(this.activeX[F]);
  676. H = {
  677. conn : E,
  678. tId : I
  679. };
  680. break
  681. } catch (G) {
  682. }
  683. }
  684. } finally {
  685. return H
  686. }
  687. },
  688. getConnectionObject : function() {
  689. var F;
  690. var G = this.transactionId;
  691. try {
  692. F = this.createXhrObject(G);
  693. if (F) {
  694. this.transactionId++
  695. }
  696. } catch (E) {
  697. } finally {
  698. return F
  699. }
  700. },
  701. asyncRequest : function(I, F, H, E) {
  702. var G = this.getConnectionObject();
  703. if (!G) {
  704. return null
  705. } else {
  706. G.conn.open(I, F, true);
  707. if (this.useDefaultXhrHeader) {
  708. if (!this.defaultHeaders["X-Requested-With"]) {
  709. this.initHeader("X-Requested-With",
  710. this.defaultXhrHeader, true)
  711. }
  712. }
  713. if (E && this.useDefaultHeader) {
  714. this.initHeader("Content-Type", this.defaultPostHeader)
  715. }
  716. if (this.hasDefaultHeaders || this.hasHeaders) {
  717. this.setHeader(G)
  718. }
  719. this.handleReadyState(G, H);
  720. G.conn.send(E || null);
  721. return G
  722. }
  723. },
  724. handleReadyState : function(F, G) {
  725. var E = this;
  726. if (G && G.timeout) {
  727. this.timeout[F.tId] = window.setTimeout(function() {
  728. E.abort(F, G, true)
  729. }, G.timeout)
  730. }
  731. this.poll[F.tId] = window.setInterval(function() {
  732. if (F.conn && F.conn.readyState == 4) {
  733. window.clearInterval(E.poll[F.tId]);
  734. delete E.poll[F.tId];
  735. if (G && G.timeout) {
  736. window.clearTimeout(E.timeout[F.tId]);
  737. delete E.timeout[F.tId]
  738. }
  739. E.handleTransactionResponse(F, G)
  740. }
  741. }, this.pollInterval)
  742. },
  743. handleTransactionResponse : function(I, J, E) {
  744. if (!J) {
  745. this.releaseObject(I);
  746. return
  747. }
  748. var G, F;
  749. try {
  750. if (I.conn.status !== undefined && I.conn.status != 0) {
  751. G = I.conn.status
  752. } else {
  753. G = 13030
  754. }
  755. } catch (H) {
  756. G = 13030
  757. }
  758. if (G >= 200 && G < 300) {
  759. F = this.createResponseObject(I, J.argument);
  760. if (J.success) {
  761. if (!J.scope) {
  762. J.success(F)
  763. } else {
  764. J.success.apply(J.scope, [F])
  765. }
  766. }
  767. } else {
  768. switch (G) {
  769. case 12002 :
  770. case 12029 :
  771. case 12030 :
  772. case 12031 :
  773. case 12152 :
  774. case 13030 :
  775. F = this.createExceptionObject(I.tId, J.argument, (E
  776. ? E
  777. : false));
  778. if (J.failure) {
  779. if (!J.scope) {
  780. J.failure(F)
  781. } else {
  782. J.failure.apply(J.scope, [F])
  783. }
  784. }
  785. break;
  786. default :
  787. F = this.createResponseObject(I, J.argument);
  788. if (J.failure) {
  789. if (!J.scope) {
  790. J.failure(F)
  791. } else {
  792. J.failure.apply(J.scope, [F])
  793. }
  794. }
  795. }
  796. }
  797. this.releaseObject(I);
  798. F = null
  799. },
  800. createResponseObject : function(E, K) {
  801. var H = {};
  802. var M = {};
  803. try {
  804. var G = E.conn.getAllResponseHeaders();
  805. var J = G.split("\n");
  806. for (var I = 0; I < J.length; I++) {
  807. var F = J[I].indexOf(":");
  808. if (F != -1) {
  809. M[J[I].substring(0, F)] = J[I].substring(F + 2)
  810. }
  811. }
  812. } catch (L) {
  813. }
  814. H.tId = E.tId;
  815. H.status = E.conn.status;
  816. H.statusText = E.conn.statusText;
  817. H.getResponseHeader = M;
  818. H.getAllResponseHeaders = G;
  819. H.responseText = E.conn.responseText;
  820. H.responseXML = E.conn.responseXML;
  821. if (typeof K !== undefined) {
  822. H.argument = K
  823. }
  824. return H
  825. },
  826. createExceptionObject : function(L, H, E) {
  827. var J = 0;
  828. var K = "communication failure";
  829. var G = -1;
  830. var F = "transaction aborted";
  831. var I = {};
  832. I.tId = L;
  833. if (E) {
  834. I.status = G;
  835. I.statusText = F
  836. } else {
  837. I.status = J;
  838. I.statusText = K
  839. }
  840. if (H) {
  841. I.argument = H
  842. }
  843. return I
  844. },
  845. initHeader : function(E, H, G) {
  846. var F = (G) ? this.defaultHeaders : this.headers;
  847. if (F[E] === undefined) {
  848. F[E] = H
  849. } else {
  850. F[E] = H + "," + F[E]
  851. }
  852. if (G) {
  853. this.hasDefaultHeaders = true
  854. } else {
  855. this.hasHeaders = true
  856. }
  857. },
  858. setHeader : function(E) {
  859. if (this.hasDefaultHeaders) {
  860. for (var F in this.defaultHeaders) {
  861. if (this.defaultHeaders.hasOwnProperty(F)) {
  862. E.conn.setRequestHeader(F, this.defaultHeaders[F])
  863. }
  864. }
  865. }
  866. if (this.hasHeaders) {
  867. for (var F in this.headers) {
  868. if (this.headers.hasOwnProperty(F)) {
  869. E.conn.setRequestHeader(F, this.headers[F])
  870. }
  871. }
  872. this.headers = {};
  873. this.hasHeaders = false
  874. }
  875. },
  876. resetDefaultHeaders : function() {
  877. delete this.defaultHeaders;
  878. this.defaultHeaders = {};
  879. this.hasDefaultHeaders = false
  880. },
  881. abort : function(F, G, E) {
  882. if (this.isCallInProgress(F)) {
  883. F.conn.abort();
  884. window.clearInterval(this.poll[F.tId]);
  885. delete this.poll[F.tId];
  886. if (E) {
  887. delete this.timeout[F.tId]
  888. }
  889. this.handleTransactionResponse(F, G, true);
  890. return true
  891. } else {
  892. return false
  893. }
  894. },
  895. isCallInProgress : function(E) {
  896. if (E.conn) {
  897. return E.conn.readyState != 4 && E.conn.readyState != 0
  898. } else {
  899. return false
  900. }
  901. },
  902. releaseObject : function(E) {
  903. E.conn = null;
  904. E = null
  905. },
  906. activeX : ["MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]
  907. };
  908. Ext.lib.Region = function(G, H, E, F) {
  909. this.top = G;
  910. this[1] = G;
  911. this.right = H;
  912. this.bottom = E;
  913. this.left = F;
  914. this[0] = F
  915. };
  916. Ext.lib.Region.prototype = {
  917. contains : function(E) {
  918. return (E.left >= this.left && E.right <= this.right
  919. && E.top >= this.top && E.bottom <= this.bottom)
  920. },
  921. getArea : function() {
  922. return ((this.bottom - this.top) * (this.right - this.left))
  923. },
  924. intersect : function(I) {
  925. var G = Math.max(this.top, I.top);
  926. var H = Math.min(this.right, I.right);
  927. var E = Math.min(this.bottom, I.bottom);
  928. var F = Math.max(this.left, I.left);
  929. if (E >= G && H >= F) {
  930. return new Ext.lib.Region(G, H, E, F)
  931. } else {
  932. return null
  933. }
  934. },
  935. union : function(I) {
  936. var G = Math.min(this.top, I.top);
  937. var H = Math.max(this.right, I.right);
  938. var E = Math.max(this.bottom, I.bottom);
  939. var F = Math.min(this.left, I.left);
  940. return new Ext.lib.Region(G, H, E, F)
  941. },
  942. constrainTo : function(E) {
  943. this.top = this.top.constrain(E.top, E.bottom);
  944. this.bottom = this.bottom.constrain(E.top, E.bottom);
  945. this.left = this.left.constrain(E.left, E.right);
  946. this.right = this.right.constrain(E.left, E.right);
  947. return this
  948. },
  949. adjust : function(G, F, E, H) {
  950. this.top += G;
  951. this.left += F;
  952. this.right += H;
  953. this.bottom += E;
  954. return this
  955. }
  956. };
  957. Ext.lib.Region.getRegion = function(H) {
  958. var J = Ext.lib.Dom.getXY(H);
  959. var G = J[1];
  960. var I = J[0] + H.offsetWidth;
  961. var E = J[1] + H.offsetHeight;
  962. var F = J[0];
  963. return new Ext.lib.Region(G, I, E, F)
  964. };
  965. Ext.lib.Point = function(E, F) {
  966. if (E instanceof Array) {
  967. F = E[1];
  968. E = E[0]
  969. }
  970. this.x = this.right = this.left = this[0] = E;
  971. this.y = this.top = this.bottom = this[1] = F
  972. };
  973. Ext.lib.Point.prototype = new Ext.lib.Region();
  974. Ext.lib.Anim = {
  975. scroll : function(H, F, I, J, E, G) {
  976. this.run(H, F, I, J, E, G, Ext.lib.Scroll)
  977. },
  978. motion : function(H, F, I, J, E, G) {
  979. this.run(H, F, I, J, E, G, Ext.lib.Motion)
  980. },
  981. color : function(H, F, I, J, E, G) {
  982. this.run(H, F, I, J, E, G, Ext.lib.ColorAnim)
  983. },
  984. run : function(I, F, K, L, E, H, G) {
  985. G = G || Ext.lib.AnimBase;
  986. if (typeof L == "string") {
  987. L = Ext.lib.Easing[L]
  988. }
  989. var J = new G(I, F, K, L);
  990. J.animateX(function() {
  991. Ext.callback(E, H)
  992. });
  993. return J
  994. }
  995. };
  996. function C(E) {
  997. if (!B) {
  998. B = new Ext.Element.Flyweight()
  999. }
  1000. B.dom = E;
  1001. return B
  1002. }
  1003. if (Ext.isIE) {
  1004. function A() {
  1005. var E = Function.prototype;
  1006. delete E.createSequence;
  1007. delete E.defer;
  1008. delete E.createDelegate;
  1009. delete E.createCallback;
  1010. delete E.createInterceptor;
  1011. window.detachEvent("onunload", A)
  1012. }
  1013. window.attachEvent("onunload", A)
  1014. }
  1015. Ext.lib.AnimBase = function(F, E, G, H) {
  1016. if (F) {
  1017. this.init(F, E, G, H)
  1018. }
  1019. };
  1020. Ext.lib.AnimBase.prototype = {
  1021. toString : function() {
  1022. var E = this.getEl();
  1023. var F = E.id || E.tagName;
  1024. return ("Anim " + F)
  1025. },
  1026. patterns : {
  1027. noNegatives : /width|height|opacity|padding/i,
  1028. offsetAttribute : /^((width|height)|(top|left))$/,
  1029. defaultUnit : /width|height|top$|bottom$|left$|right$/i,
  1030. offsetUnit : /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i
  1031. },
  1032. doMethod : function(E, G, F) {
  1033. return this.method(this.currentFrame, G, F - G, this.totalFrames)
  1034. },
  1035. setAttribute : function(E, G, F) {
  1036. if (this.patterns.noNegatives.test(E)) {
  1037. G = (G > 0) ? G : 0
  1038. }
  1039. Ext.fly(this.getEl(), "_anim").setStyle(E, G + F)
  1040. },
  1041. getAttribute : function(E) {
  1042. var G = this.getEl();
  1043. var I = C(G).getStyle(E);
  1044. if (I !== "auto" && !this.patterns.offsetUnit.test(I)) {
  1045. return parseFloat(I)
  1046. }
  1047. var F = this.patterns.offsetAttribute.exec(E) || [];
  1048. var J = !!(F[3]);
  1049. var H = !!(F[2]);
  1050. if (H || (C(G).getStyle("position") == "absolute" && J)) {
  1051. I = G["offset" + F[0].charAt(0).toUpperCase() + F[0].substr(1)]
  1052. } else {
  1053. I = 0
  1054. }
  1055. return I
  1056. },
  1057. getDefaultUnit : function(E) {
  1058. if (this.patterns.defaultUnit.test(E)) {
  1059. return "px"
  1060. }
  1061. return ""
  1062. },
  1063. animateX : function(G, E) {
  1064. var F = function() {
  1065. this.onComplete.removeListener(F);
  1066. if (typeof G == "function") {
  1067. G.call(E || this, this)
  1068. }
  1069. };
  1070. this.onComplete.addListener(F, this);
  1071. this.animate()
  1072. },
  1073. setRuntimeAttribute : function(F) {
  1074. var K;
  1075. var G;
  1076. var H = this.attributes;
  1077. this.runtimeAttributes[F] = {};
  1078. var J = function(L) {
  1079. return (typeof L !== "undefined")
  1080. };
  1081. if (!J(H[F]["to"]) && !J(H[F]["by"])) {
  1082. return false
  1083. }
  1084. K = (J(H[F]["from"])) ? H[F]["from"] : this.getAttribute(F);
  1085. if (J(H[F]["to"])) {
  1086. G = H[F]["to"]
  1087. } else {
  1088. if (J(H[F]["by"])) {
  1089. if (K.constructor == Array) {
  1090. G = [];
  1091. for (var I = 0, E = K.length; I < E; ++I) {
  1092. G[I] = K[I] + H[F]["by"][I]
  1093. }
  1094. } else {
  1095. G = K + H[F]["by"]
  1096. }
  1097. }
  1098. }
  1099. this.runtimeAttributes[F].start = K;
  1100. this.runtimeAttributes[F].end = G;
  1101. this.runtimeAttributes[F].unit = (J(H[F].unit))
  1102. ? H[F]["unit"]
  1103. : this.getDefaultUnit(F)
  1104. },
  1105. init : function(G, L, K, E) {
  1106. var F = false;
  1107. var H = null;
  1108. var J = 0;
  1109. G = Ext.getDom(G);
  1110. this.attributes = L || {};
  1111. this.duration = K || 1;
  1112. this.method = E || Ext.lib.Easing.easeNone;
  1113. this.useSeconds = true;
  1114. this.currentFrame = 0;
  1115. this.totalFrames = Ext.lib.AnimMgr.fps;
  1116. this.getEl = function() {
  1117. return G
  1118. };
  1119. this.isAnimated = function() {
  1120. return F
  1121. };
  1122. this.getStartTime = function() {
  1123. return H
  1124. };
  1125. this.runtimeAttributes = {};
  1126. this.animate = function() {
  1127. if (this.isAnimated()) {
  1128. return false
  1129. }
  1130. this.currentFrame = 0;
  1131. this.totalFrames = (this.useSeconds)
  1132. ? Math.ceil(Ext.lib.AnimMgr.fps * this.duration)
  1133. : this.duration;
  1134. Ext.lib.AnimMgr.registerElement(this)
  1135. };
  1136. this.stop = function(O) {
  1137. if (O) {
  1138. this.currentFrame = this.totalFrames;
  1139. this._onTween.fire()
  1140. }
  1141. Ext.lib.AnimMgr.stop(this)
  1142. };
  1143. var N = function() {
  1144. this.onStart.fire();
  1145. this.runtimeAttributes = {};
  1146. for (var O in this.attributes) {
  1147. this.setRuntimeAttribute(O)
  1148. }
  1149. F = true;
  1150. J = 0;
  1151. H = allGetServerTime()
  1152. };
  1153. var M = function() {
  1154. var Q = {
  1155. duration : allGetServerTime() - this.getStartTime(),
  1156. currentFrame : this.currentFrame
  1157. };
  1158. Q.toString = function() {
  1159. return ("duration: " + Q.duration + ", currentFrame: " + Q.currentFrame)
  1160. };
  1161. this.onTween.fire(Q);
  1162. var P = this.runtimeAttributes;
  1163. for (var O in P) {
  1164. this.setAttribute(O,
  1165. this.doMethod(O, P[O].start, P[O].end), P[O].unit)
  1166. }
  1167. J += 1
  1168. };
  1169. var I = function() {
  1170. var O = (allGetServerTime() - H) / 1000;
  1171. var P = {
  1172. duration : O,
  1173. frames : J,
  1174. fps : J / O
  1175. };
  1176. P.toString = function() {
  1177. return ("duration: " + P.duration + ", frames: " + P.frames
  1178. + ", fps: " + P.fps)
  1179. };
  1180. F = false;
  1181. J = 0;
  1182. this.onComplete.fire(P)
  1183. };
  1184. this._onStart = new Ext.util.Event(this);
  1185. this.onStart = new Ext.util.Event(this);
  1186. this.onTween = new Ext.util.Event(this);
  1187. this._onTween = new Ext.util.Event(this);
  1188. this.onComplete = new Ext.util.Event(this);
  1189. this._onComplete = new Ext.util.Event(this);
  1190. this._onStart.addListener(N);
  1191. this._onTween.addListener(M);
  1192. this._onComplete.addListener(I)
  1193. }
  1194. };
  1195. Ext.lib.AnimMgr = new function() {
  1196. var G = null;
  1197. var F = [];
  1198. var E = 0;
  1199. this.fps = 1000;
  1200. this.delay = 1;
  1201. this.registerElement = function(J) {
  1202. F[F.length] = J;
  1203. E += 1;
  1204. J._onStart.fire();
  1205. this.start()
  1206. };
  1207. this.unRegister = function(K, J) {
  1208. K._onComplete.fire();
  1209. J = J || I(K);
  1210. if (J != -1) {
  1211. F.splice(J, 1)
  1212. }
  1213. E -= 1;
  1214. if (E <= 0) {
  1215. this.stop()
  1216. }
  1217. };
  1218. this.start = function() {
  1219. if (G === null) {
  1220. G = setInterval(this.run, this.delay)
  1221. }
  1222. };
  1223. this.stop = function(L) {
  1224. if (!L) {
  1225. clearInterval(G);
  1226. for (var K = 0, J = F.length; K < J; ++K) {
  1227. if (F[0].isAnimated()) {
  1228. this.unRegister(F[0], 0)
  1229. }
  1230. }
  1231. F = [];
  1232. G = null;
  1233. E = 0
  1234. } else {
  1235. this.unRegister(L)
  1236. }
  1237. };
  1238. this.run = function() {
  1239. for (var L = 0, J = F.length; L < J; ++L) {
  1240. var K = F[L];
  1241. if (!K || !K.isAnimated()) {
  1242. continue
  1243. }
  1244. if (K.currentFrame < K.totalFrames || K.totalFrames === null) {
  1245. K.currentFrame += 1;
  1246. if (K.useSeconds) {
  1247. H(K)
  1248. }
  1249. K._onTween.fire()
  1250. } else {
  1251. Ext.lib.AnimMgr.stop(K, L)
  1252. }
  1253. }
  1254. };
  1255. var I = function(L) {
  1256. for (var K = 0, J = F.length; K < J; ++K) {
  1257. if (F[K] == L) {
  1258. return K
  1259. }
  1260. }
  1261. return -1
  1262. };
  1263. var H = function(K) {
  1264. var N = K.totalFrames;
  1265. var M = K.currentFrame;
  1266. var L = (K.currentFrame * K.duration * 1000 / K.totalFrames);
  1267. var J = (allGetServerTime() - K.getStartTime());
  1268. var O = 0;
  1269. if (J < K.duration * 1000) {
  1270. O = Math.round((J / L - 1) * K.currentFrame)
  1271. } else {
  1272. O = N - (M + 1)
  1273. }
  1274. if (O > 0 && isFinite(O)) {
  1275. if (K.currentFrame + O >= N) {
  1276. O = N - (M + 1)
  1277. }
  1278. K.currentFrame += O
  1279. }
  1280. }
  1281. };
  1282. Ext.lib.Bezier = new function() {
  1283. this.getPosition = function(I, H) {
  1284. var J = I.length;
  1285. var G = [];
  1286. for (var F = 0; F < J; ++F) {
  1287. G[F] = [I[F][0], I[F][1]]
  1288. }
  1289. for (var E = 1; E < J; ++E) {
  1290. for (F = 0; F < J - E; ++F) {
  1291. G[F][0] = (1 - H) * G[F][0] + H * G[parseInt(F + 1, 10)][0];
  1292. G[F][1] = (1 - H) * G[F][1] + H * G[parseInt(F + 1, 10)][1]
  1293. }
  1294. }
  1295. return [G[0][0], G[0][1]]
  1296. }
  1297. };
  1298. (function() {
  1299. Ext.lib.ColorAnim = function(I, H, J, K) {
  1300. Ext.lib.ColorAnim.superclass.constructor.call(this, I, H, J, K)
  1301. };
  1302. Ext.extend(Ext.lib.ColorAnim, Ext.lib.AnimBase);
  1303. var F = Ext.lib;
  1304. var G = F.ColorAnim.superclass;
  1305. var E = F.ColorAnim.prototype;
  1306. E.toString = function() {
  1307. var H = this.getEl();
  1308. var I = H.id || H.tagName;
  1309. return ("ColorAnim " + I)
  1310. };
  1311. E.patterns.color = /color$/i;
  1312. E.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;
  1313. E.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;
  1314. E.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;
  1315. E.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/;
  1316. E.parseColor = function(H) {
  1317. if (H.length == 3) {
  1318. return H
  1319. }
  1320. var I = this.patterns.hex.exec(H);
  1321. if (I && I.length == 4) {
  1322. return [parseInt(I[1], 16), parseInt(I[2], 16),
  1323. parseInt(I[3], 16)]
  1324. }
  1325. I = this.patterns.rgb.exec(H);
  1326. if (I && I.length == 4) {
  1327. return [parseInt(I[1], 10), parseInt(I[2], 10),
  1328. parseInt(I[3], 10)]
  1329. }
  1330. I = this.patterns.hex3.exec(H);
  1331. if (I && I.length == 4) {
  1332. return [parseInt(I[1] + I[1], 16), parseInt(I[2] + I[2], 16),
  1333. parseInt(I[3] + I[3], 16)]
  1334. }
  1335. return null
  1336. };
  1337. E.getAttribute = function(H) {
  1338. var J = this.getEl();
  1339. if (this.patterns.color.test(H)) {
  1340. var K = C(J).getStyle(H);
  1341. if (this.patterns.transparent.test(K)) {
  1342. var I = J.parentNode;
  1343. K = C(I).getStyle(H);
  1344. while (I && this.patterns.transparent.test(K)) {
  1345. I = I.parentNode;
  1346. K = C(I).getStyle(H);
  1347. if (I.tagName.toUpperCase() == "HTML") {
  1348. K = "#fff"
  1349. }
  1350. }
  1351. }
  1352. } else {
  1353. K = G.getAttribute.call(this, H)
  1354. }
  1355. return K
  1356. };
  1357. E.doMethod = function(I, M, J) {
  1358. var L;
  1359. if (this.patterns.color.test(I)) {
  1360. L = [];
  1361. for (var K = 0, H = M.length; K < H; ++K) {
  1362. L[K] = G.doMethod.call(this, I, M[K], J[K])
  1363. }
  1364. L = "rgb(" + Math.floor(L[0]) + "," + Math.floor(L[1]) + ","
  1365. + Math.floor(L[2]) + ")"
  1366. } else {
  1367. L = G.doMethod.call(this, I, M, J)
  1368. }
  1369. return L
  1370. };
  1371. E.setRuntimeAttribute = function(I) {
  1372. G.setRuntimeAttribute.call(this, I);
  1373. if (this.patterns.color.test(I)) {
  1374. var K = this.attributes;
  1375. var M = this.parseColor(this.runtimeAttributes[I].start);
  1376. var J = this.parseColor(this.runtimeAttributes[I].end);
  1377. if (typeof K[I]["to"] === "undefined"
  1378. && typeof K[I]["by"] !== "undefined") {
  1379. J = this.parseColor(K[I].by);
  1380. for (var L = 0, H = M.length; L < H; ++L) {
  1381. J[L] = M[L] + J[L]
  1382. }
  1383. }
  1384. this.runtimeAttributes[I].start = M;
  1385. this.runtimeAttributes[I].end = J
  1386. }
  1387. }
  1388. })();
  1389. Ext.lib.Easing = {
  1390. easeNone : function(F, E, H, G) {
  1391. return H * F / G + E
  1392. },
  1393. easeIn : function(F, E, H, G) {
  1394. return H * (F /= G) * F + E
  1395. },
  1396. easeOut : function(F, E, H, G) {
  1397. return -H * (F /= G) * (F - 2) + E
  1398. },
  1399. easeBoth : function(F, E, H, G) {
  1400. if ((F /= G / 2) < 1) {
  1401. return H / 2 * F * F + E
  1402. }
  1403. return -H / 2 * ((--F) * (F - 2) - 1) + E
  1404. },
  1405. easeInStrong : function(F, E, H, G) {
  1406. return H * (F /= G) * F * F * F + E
  1407. },
  1408. easeOutStrong : function(F, E, H, G) {
  1409. return -H * ((F = F / G - 1) * F * F * F - 1) + E
  1410. },
  1411. easeBothStrong : function(F, E, H, G) {
  1412. if ((F /= G / 2) < 1) {
  1413. return H / 2 * F * F * F * F + E
  1414. }
  1415. return -H / 2 * ((F -= 2) * F * F * F - 2) + E
  1416. },
  1417. elasticIn : function(G, E, K, J, F, I) {
  1418. if (G == 0) {
  1419. return E
  1420. }
  1421. if ((G /= J) == 1) {
  1422. return E + K
  1423. }
  1424. if (!I) {
  1425. I = J * 0.3
  1426. }
  1427. if (!F || F < Math.abs(K)) {
  1428. F = K;
  1429. var H = I / 4
  1430. } else {
  1431. var H = I / (2 * Math.PI) * Math.asin(K / F)
  1432. }
  1433. return -(F * Math.pow(2, 10 * (G -= 1)) * Math.sin((G * J - H)
  1434. * (2 * Math.PI) / I))
  1435. + E
  1436. },
  1437. elasticOut : function(G, E, K, J, F, I) {
  1438. if (G == 0) {
  1439. return E
  1440. }
  1441. if ((G /= J) == 1) {
  1442. return E + K
  1443. }
  1444. if (!I) {
  1445. I = J * 0.3
  1446. }
  1447. if (!F || F < Math.abs(K)) {
  1448. F = K;
  1449. var H = I / 4
  1450. } else {
  1451. var H = I / (2 * Math.PI) * Math.asin(K / F)
  1452. }
  1453. return F * Math.pow(2, -10 * G)
  1454. * Math.sin((G * J - H) * (2 * Math.PI) / I) + K + E
  1455. },
  1456. elasticBoth : function(G, E, K, J, F, I) {
  1457. if (G == 0) {
  1458. return E
  1459. }
  1460. if ((G /= J / 2) == 2) {
  1461. return E + K
  1462. }
  1463. if (!I) {
  1464. I = J * (0.3 * 1.5)
  1465. }
  1466. if (!F || F < Math.abs(K)) {
  1467. F = K;
  1468. var H = I / 4
  1469. } else {
  1470. var H = I / (2 * Math.PI) * Math.asin(K / F)
  1471. }
  1472. if (G < 1) {
  1473. return -0.5
  1474. * (F * Math.pow(2, 10 * (G -= 1)) * Math
  1475. .sin((G * J - H) * (2 * Math.PI) / I)) + E
  1476. }
  1477. return F * Math.pow(2, -10 * (G -= 1))
  1478. * Math.sin((G * J - H) * (2 * Math.PI) / I) * 0.5 + K + E
  1479. },
  1480. backIn : function(F, E, I, H, G) {
  1481. if (typeof G == "undefined") {
  1482. G = 1.70158
  1483. }
  1484. return I * (F /= H) * F * ((G + 1) * F - G) + E
  1485. },
  1486. backOut : function(F, E, I, H, G) {
  1487. if (typeof G == "undefined") {
  1488. G = 1.70158
  1489. }
  1490. return I * ((F = F / H - 1) * F * ((G + 1) * F + G) + 1) + E
  1491. },
  1492. backBoth : function(F, E, I, H, G) {
  1493. if (typeof G == "undefined") {
  1494. G = 1.70158
  1495. }
  1496. if ((F /= H / 2) < 1) {
  1497. return I / 2 * (F * F * (((G *= (1.525)) + 1) * F - G)) + E
  1498. }
  1499. return I / 2 * ((F -= 2) * F * (((G *= (1.525)) + 1) * F + G) + 2)
  1500. + E
  1501. },
  1502. bounceIn : function(F, E, H, G) {
  1503. return H - Ext.lib.Easing.bounceOut(G - F, 0, H, G) + E
  1504. },
  1505. bounceOut : function(F, E, H, G) {
  1506. if ((F /= G) < (1 / 2.75)) {
  1507. return H * (7.5625 * F * F) + E
  1508. } else {
  1509. if (F < (2 / 2.75)) {
  1510. return H * (7.5625 * (F -= (1.5 / 2.75)) * F + 0.75) + E
  1511. } else {
  1512. if (F < (2.5 / 2.75)) {
  1513. return H * (7.5625 * (F -= (2.25 / 2.75)) * F + 0.9375)
  1514. + E
  1515. }
  1516. }
  1517. }
  1518. return H * (7.5625 * (F -= (2.625 / 2.75)) * F + 0.984375) + E
  1519. },
  1520. bounceBoth : function(F, E, H, G) {
  1521. if (F < G / 2) {
  1522. return Ext.lib.Easing.bounceIn(F * 2, 0, H, G) * 0.5 + E
  1523. }
  1524. return Ext.lib.Easing.bounceOut(F * 2 - G, 0, H, G) * 0.5 + H * 0.5
  1525. + E
  1526. }
  1527. };
  1528. (function() {
  1529. Ext.lib.Motion = function(K, J, L, M) {
  1530. if (K) {
  1531. Ext.lib.Motion.superclass.constructor.call(this, K, J, L, M)
  1532. }
  1533. };
  1534. Ext.extend(Ext.lib.Motion, Ext.lib.ColorAnim);
  1535. var H = Ext.lib;
  1536. var I = H.Motion.superclass;
  1537. var F = H.Motion.prototype;
  1538. F.toString = function() {
  1539. var J = this.getEl();
  1540. var K = J.id || J.tagName;
  1541. return ("Motion " + K)
  1542. };
  1543. F.patterns.points = /^points$/i;
  1544. F.setAttribute = function(J, L, K) {
  1545. if (this.patterns.points.test(J)) {
  1546. K = K || "px";
  1547. I.setAttribute.call(this, "left", L[0], K);
  1548. I.setAttribute.call(this, "top", L[1], K)
  1549. } else {
  1550. I.setAttribute.call(this, J, L, K)
  1551. }
  1552. };
  1553. F.getAttribute = function(J) {
  1554. if (this.patterns.points.test(J)) {
  1555. var K = [I.getAttribute.call(this, "left"),
  1556. I.getAttribute.call(this, "top")]
  1557. } else {
  1558. K = I.getAttribute.call(this, J)
  1559. }
  1560. return K
  1561. };
  1562. F.doMethod = function(J, N, K) {
  1563. var M = null;
  1564. if (this.patterns.points.test(J)) {
  1565. var L = this
  1566. .method(this.currentFrame, 0, 100, this.totalFrames)
  1567. / 100;
  1568. M = H.Bezier.getPosition(this.runtimeAttributes[J], L)
  1569. } else {
  1570. M = I.doMethod.call(this, J, N, K)
  1571. }
  1572. return M
  1573. };
  1574. F.setRuntimeAttribute = function(S) {
  1575. if (this.patterns.points.test(S)) {
  1576. var K = this.getEl();
  1577. var M = this.attributes;
  1578. var J;
  1579. var O = M["points"]["control"] || [];
  1580. var L;
  1581. var P, R;
  1582. if (O.length > 0 && !(O[0] instanceof Array)) {
  1583. O = [O]
  1584. } else {
  1585. var N = [];
  1586. for (P = 0, R = O.length; P < R; ++P) {
  1587. N[P] = O[P]
  1588. }
  1589. O = N
  1590. }
  1591. Ext.fly(K).position();
  1592. if (G(M["points"]["from"])) {
  1593. Ext.lib.Dom.setXY(K, M["points"]["from"])
  1594. } else {
  1595. Ext.lib.Dom.setXY(K, Ext.lib.Dom.getXY(K))
  1596. }
  1597. J = this.getAttribute("points");
  1598. if (G(M["points"]["to"])) {
  1599. L = E.call(this, M["points"]["to"], J);
  1600. var Q = Ext.lib.Dom.getXY(this.getEl());
  1601. for (P = 0, R = O.length; P < R; ++P) {
  1602. O[P] = E.call(this, O[P], J)
  1603. }
  1604. } else {
  1605. if (G(M["points"]["by"])) {
  1606. L = [J[0] + M["points"]["by"][0],
  1607. J[1] + M["points"]["by"][1]];
  1608. for (P = 0, R = O.length; P < R; ++P) {
  1609. O[P] = [J[0] + O[P][0], J[1] + O[P][1]]
  1610. }
  1611. }
  1612. }
  1613. this.runtimeAttributes[S] = [J];
  1614. if (O.length > 0) {
  1615. this.runtimeAttributes[S] = this.runtimeAttributes[S]
  1616. .concat(O)
  1617. }
  1618. this.runtimeAttributes[S][this.runtimeAttributes[S].length] = L
  1619. } else {
  1620. I.setRuntimeAttribute.call(this, S)
  1621. }
  1622. };
  1623. var E = function(J, L) {
  1624. var K = Ext.lib.Dom.getXY(this.getEl());
  1625. J = [J[0] - K[0] + L[0], J[1] - K[1] + L[1]];
  1626. return J
  1627. };
  1628. var G = function(J) {
  1629. return (typeof J !== "undefined")
  1630. }
  1631. })();
  1632. (function() {
  1633. Ext.lib.Scroll = function(I, H, J, K) {
  1634. if (I) {
  1635. Ext.lib.Scroll.superclass.constructor.call(this, I, H, J, K)
  1636. }
  1637. };
  1638. Ext.extend(Ext.lib.Scroll, Ext.lib.ColorAnim);
  1639. var F = Ext.lib;
  1640. var G = F.Scroll.superclass;
  1641. var E = F.Scroll.prototype;
  1642. E.toString = function() {
  1643. var H = this.getEl();
  1644. var I = H.id || H.tagName;
  1645. return ("Scroll " + I)
  1646. };
  1647. E.doMethod = function(H, K, I) {
  1648. var J = null;
  1649. if (H == "scroll") {
  1650. J = [
  1651. this.method(this.currentFrame, K[0], I[0] - K[0],
  1652. this.totalFrames),
  1653. this.method(this.currentFrame, K[1], I[1] - K[1],
  1654. this.totalFrames)]
  1655. } else {
  1656. J = G.doMethod.call(this, H, K, I)
  1657. }
  1658. return J
  1659. };
  1660. E.getAttribute = function(H) {
  1661. var J = null;
  1662. var I = this.getEl();
  1663. if (H == "scroll") {
  1664. J = [I.scrollLeft, I.scrollTop]
  1665. } else {
  1666. J = G.getAttribute.call(this, H)
  1667. }
  1668. return J
  1669. };
  1670. E.setAttribute = function(H, K, J) {
  1671. var I = this.getEl();
  1672. if (H == "scroll") {
  1673. I.scrollLeft = K[0];
  1674. I.scrollTop = K[1]
  1675. } else {
  1676. G.setAttribute.call(this, H, K, J)
  1677. }
  1678. }
  1679. })()
  1680. })();